/* Paper Berry: a calm, local-asset catalog. No web fonts; stable input targets. */
:root {
  --bg: #f8f6f0;
  --paper: #fffefa;
  --ink: #282824;
  --muted: #66645c;
  --line: #deddd3;
  --accent: #733453;
  --soft: #efe6ed;
  --on-accent: #fffefa;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
img { display: block; max-width: 100%; height: auto; }
button { border: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.045em; overflow-wrap: break-word; }
h1 { font-size: clamp(40px, 5vw, 68px); line-height: 1.06; margin-bottom: 24px; }
h2 { font-size: 30px; line-height: 1.16; margin-bottom: 14px; }
h3 { font-size: 22px; line-height: 1.18; margin-bottom: 8px; }
p { line-height: 1.65; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
main, .header-inner, .site-footer { width: min(1240px, calc(100% - 80px)); margin: auto; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 14px 20px; background: var(--accent); color: var(--on-accent); z-index: 20; }
.skip-link:focus { top: 8px; }
.site-header { min-height: 96px; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 95px; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; font-size: 25px; font-weight: 800; letter-spacing: -1px; line-height: .9; min-height: 48px; }
.brand-games { display: block; font-size: 12px; letter-spacing: 2.7px; margin-top: 7px; font-weight: 600; }
.brand-mark { height: 43px; width: 43px; border-radius: 14px; background: var(--accent); color: var(--bg); font-size: 44px; line-height: 36px; padding-left: 9px; font-weight: 800; position: relative; }
.brand-mark span { font-size: 22px; line-height: 1; position: absolute; right: 5px; bottom: 0; }
.header-inner > nav { display: flex; align-items: center; gap: 26px; flex: 1; font-size: 14px; font-weight: 600; }
.header-inner > nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 0; color: var(--muted); }
.header-inner > nav a.active { color: var(--ink); box-shadow: inset 0 -2px var(--accent); }
.header-inner > nav a:hover { color: var(--accent); }
.language { font-size: 13px; min-height: 44px; display: flex; align-items: center; line-height: 1.45; max-width: 175px; }
.language::before { content: '◎'; font-size: 25px; margin-right: 8px; }
.eyebrow { display: block; font-size: 11px; letter-spacing: 1.8px; line-height: 1.5; font-weight: 700; color: var(--muted); margin-bottom: 18px; text-transform: uppercase; }
.lead { font-size: 19px; line-height: 1.65; color: var(--muted); max-width: 560px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 14px 23px; gap: 15px; border-radius: 12px; font-size: 15px; font-weight: 700; line-height: 1.35; text-align: center; }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: #5c2942; }
.button.secondary { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line); padding: 8px 0; }
.hero { display: grid; grid-template-columns: 1.03fr 1fr; gap: 60px; min-height: 485px; align-items: center; padding: 56px 0 58px; }
.hero h1 { font-size: clamp(48px, 4.4vw, 66px); margin-bottom: 22px; }
.hero-copy .button { margin-top: 8px; }
.hero-art { min-width: 0; }
.art-plate { height: 320px; position: relative; background: #e9e7d9; border-radius: 45% 48% 44% 37%; }
.hero-card { position: absolute; width: 72%; aspect-ratio: 16/9; object-fit: cover; border: 7px solid var(--paper); border-radius: 17px; box-shadow: 0 16px 28px #36281f26; }
.hero-card-one { top: 3%; left: 0; transform: rotate(-9deg); }
.hero-card-two { right: -2%; bottom: -3%; transform: rotate(10deg); }
.art-spark { position: absolute; left: 1%; bottom: 0; font-size: 64px; line-height: 1; color: var(--accent); }
.orbit-dot { position: absolute; right: 0; top: 12%; height: 34px; width: 34px; background: #c6c59c; border-radius: 50%; }
.neutral-art { height: 300px; border-radius: 45%; background: var(--soft); display: grid; place-items: center; color: var(--accent); }
.neutral-art > span { font-size: 200px; font-weight: bold; letter-spacing: -30px; }
.neutral-art > span > span { color: #a5ae79; }
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0 0 60px; }
.lane { position: relative; min-height: 187px; padding: 30px 88px 28px 30px; border-radius: 18px; overflow: hidden; display: flex; align-items: center; }
.lane .eyebrow { font-size: 10px; margin-bottom: 12px; color: inherit; }
.lane h2 { font-size: 28px; max-width: 360px; margin-bottom: 9px; }
.lane p { font-size: 14px; margin: 0; max-width: 350px; color: inherit; }
.puzzle-lane { background: #e5e9d6; color: #35432b; }
.board-lane { background: #e9dfe6; color: #58354b; }
.lane:hover { box-shadow: inset 0 0 0 2px currentColor; }
.lane-icon { position: absolute; right: 30px; top: 45px; font-family: Georgia, serif; font-weight: bold; font-size: 48px; letter-spacing: -7px; transform: rotate(-12deg); opacity: .22; }
.chess-icon { font-size: 110px; letter-spacing: 0; line-height: 1; top: 22px; }
.lane-arrow { position: absolute; right: 24px; bottom: 20px; font-size: 27px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.section-head h2 { font-size: 32px; margin: 0; }
.game-section { margin-bottom: 55px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.game-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; position: relative; }
.game-card-link { display: block; height: 100%; }
.cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--soft); }
.cover > img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { width: 100%; height: 100%; min-height: 120px; background: #e9e6dc; color: var(--accent); display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 10px; }
.cover-fallback > span { font-size: 58px; font-weight: 700; line-height: 1; font-family: Georgia, serif; }
.cover-fallback > small { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.game-card[data-family="board"] .cover-fallback { background: #e9dfe6; }
.game-card[data-family="puzzle"] .cover-fallback { background: #e5e9d6; }
.card-body { padding: 18px 20px 21px; }
.genre { display: block; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; font-weight: 600; padding-right: 28px; min-height: 14px; }
.card-body p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0; }
.card-favorite { width: 44px; height: 44px; border-radius: 50%; position: absolute; top: 10px; right: 10px; background: var(--paper); color: var(--accent); font-size: 28px; box-shadow: 0 1px 5px #0002; }
.game-card:hover { border-color: var(--accent); }
.editorial-body { padding: 0 0 50px; max-width: 850px; color: var(--muted); font-size: 15px; }
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 26px; display: grid; grid-template-columns: 1fr auto; gap: 20px; }
.site-footer .brand { font-size: 21px; }
.site-footer .brand-mark { height: 35px; width: 35px; font-size: 36px; line-height: 31px; border-radius: 10px; padding-left: 8px; }
.site-footer .brand-games { font-size: 10px; margin-top: 5px; }
.site-footer p { font-size: 13px; margin: 17px 0 0; color: var(--muted); }
.footer-links { display: flex; gap: 26px; align-items: flex-start; font-size: 13px; padding-top: 4px; }
.footer-links a { display: flex; align-items: center; min-height: 44px; }
.copyright { grid-column: 1/-1; font-size: 11px; color: var(--muted); }
.page-heading { padding: 52px 0 32px; }
.page-heading h1 { font-size: clamp(38px, 4vw, 52px); margin-bottom: 15px; }
.page-heading .lead { max-width: 880px; margin: 0; font-size: 18px; }
.catalog-layout { margin-bottom: 55px; }
.catalog-controls { display: grid; grid-template-columns: minmax(250px, 1fr) auto; gap: 20px 28px; margin-bottom: 24px; align-items: end; }
.search-form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.search-wrap { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; min-height: 52px; padding: 3px 4px 3px 15px; }
.search-wrap > span { font-size: 25px; color: var(--muted); }
.search-wrap input { min-width: 0; width: 100%; border: 0; color: var(--ink); background: transparent; font-size: 16px; min-height: 44px; }
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap button { background: var(--soft); color: var(--ink); border-radius: 8px; width: 44px; min-height: 44px; flex-shrink: 0; font-size: 20px; }
.view-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-filters button { font-size: 12px; font-weight: 600; min-height: 44px; padding: 10px 14px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 25px; }
.view-filters button[aria-pressed="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.select-filters { display: flex; gap: 20px; grid-column: 1/-1; }
.select-filters label { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; position: relative; }
.select-filters label::after { content: ''; position: absolute; right: 17px; top: calc(50% - 4px); width: 7px; height: 7px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.select-filters select { appearance: none; cursor: pointer; background: var(--paper); color: var(--ink); min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 44px 10px 16px; max-width: 100%; }
.catalog-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.catalog-actions { display: flex; gap: 15px; }
.quiet-button { background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; font-size: 12px; min-height: 44px; padding: 8px 3px; }
.empty-state { text-align: center; border: 1px dashed var(--line); padding: 48px 22px; border-radius: 16px; }
.empty-state > span { font-size: 50px; display: block; color: var(--muted); margin-bottom: 18px; }
.empty-state p { font-size: 20px; max-width: 500px; margin: 0 auto 24px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); padding: 24px 0; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumbs a:hover { text-decoration: underline; }
.play-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 18px; }
.play-heading h1 { font-size: 44px; margin-bottom: 12px; }
.play-heading p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; max-width: 800px; }
.play-heading .game-author { margin-top: 10px; font-size: 12px; }
.rules-jump { font-size: 13px; white-space: nowrap; border-bottom: 1px solid var(--line); padding: 12px 0; min-height: 44px; }
.fact-tags { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0 0 18px; }
.fact-tags li { background: var(--soft); color: var(--accent); padding: 6px 10px; border-radius: 6px; font-size: 12px; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 28px; }
.player-panel { min-width: 0; }
.play-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.favorite-button, .fullscreen-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 10px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 13px; color: var(--ink); }
.favorite-button > .player-control-icon { color: var(--accent); font-size: 26px; line-height: 1; }
.game-stage { height: min(68vh, 680px); min-height: 530px; background: #292c29; position: relative; border-radius: 20px; overflow: hidden; overflow: clip; display: grid; place-items: center; isolation: isolate; }
.game-backdrop { position: absolute; inset: 0; filter: blur(13px) brightness(.30); transform: scale(1.1); z-index: -1; }
.game-backdrop > img, .game-backdrop > .cover-fallback { width: 100%; height: 100%; object-fit: cover; }
/* The active frame covers the poster; remove its overflow in legacy engines. */
.player-panel[data-player-active="true"] .game-backdrop { display: none; }
.launch-card { text-align: center; color: white; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 760px; }
.launch-cover { width: min(76%, 520px); height: auto; aspect-ratio: 16/9; object-fit: contain; border-radius: 12px; box-shadow: 0 14px 32px #0007; margin: 0; }
.launch-card h2 { font-size: 22px; line-height: 1.2; margin: 0; max-width: 100%; }
.launch-card .button { min-width: min(220px, 100%); max-width: 100%; background: #fff8dd; color: #292820; min-height: 52px; box-shadow: 0 3px 0 #0002; }
.launch-card .button:hover { background: #eee5c3; }
.unavailable-copy { font-size: 15px; max-width: 340px; margin-bottom: 22px; color: #f4f1e6; }
.frame-slot { position: absolute; inset: 0; z-index: 2; background: white; }
.frame-slot:empty { display: none; }
.game-frame { display: block; width: 100%; height: 100%; border: 0; background: white; }
.player-status { font-size: 13px; color: var(--muted); padding: 14px 0 0; line-height: 1.6; min-height: 35px; }
.player-status:empty { display: none; }
.player-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding-top: 12px; }
.player-actions .button { min-height: 44px; font-size: 13px; padding: 10px 16px; }
.play-aside { padding-top: 62px; }
.play-aside > .eyebrow { font-size: 10px; margin-bottom: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.play-aside .card-body { padding: 12px 14px; }
.play-aside h3 { font-size: 18px; margin: 0; }
.play-aside .genre { font-size: 9px; margin-bottom: 5px; padding: 0; }
.play-aside .card-body p { display: none; }
.play-aside .card-favorite { width: 44px; height: 44px; top: 6px; right: 6px; }
.rules-panel { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; max-width: 1050px; padding: 48px 0 65px; }
.rules-panel h2 { font-size: 30px; }
.rules-panel .eyebrow { font-size: 10px; margin-bottom: 12px; }
.rules-panel p { font-size: 15px; color: var(--muted); }
.rules-copy .text-link { margin: 8px 20px 0 0; }
.nojs { background: var(--soft); padding: 16px; border-radius: 10px; font-size: 13px; margin: 18px 0 0; }
.guide-heading { padding: 5px 0 35px; max-width: 900px; }
.guide-heading h1 { font-size: 54px; margin-bottom: 18px; }
.guide-heading .lead { max-width: 760px; font-size: 18px; }
.guide-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 55px; margin-bottom: 70px; }
.guide-toc { font-size: 13px; padding-top: 15px; }
.guide-toc strong { display: block; margin-bottom: 16px; color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.guide-toc a { display: flex; align-items: center; min-height: 44px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-content { max-width: 850px; min-width: 0; }
.guide-cover { width: 100%; max-height: 350px; object-fit: cover; border-radius: 16px; margin-bottom: 35px; }
.guide-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 20px; padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.guide-step p { font-size: 16px; color: var(--muted); max-width: 720px; margin-bottom: 10px; }
.step-number { color: var(--accent); font-family: Georgia, serif; font-size: 28px; line-height: 1.4; }
.guide-cta { display: flex; align-items: center; gap: 20px; background: var(--soft); padding: 26px; border-radius: 16px; margin-top: 30px; }
.guide-cta h2 { font-size: 23px; margin-bottom: 8px; }
.guide-cta p { font-size: 13px; color: var(--muted); margin: 0; }
.guide-cta-piece { font-size: 50px; color: var(--accent); }
.guide-cta .button { margin-left: auto; flex-shrink: 0; font-size: 13px; padding: 12px 18px; }
.root-main { min-height: 650px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 90px; padding: 65px 30px 75px; }
.root-copy h1 { font-size: 76px; }
.root-copy .lead { font-size: 23px; }
.root-body { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.language-choices { display: flex; flex-wrap: wrap; gap: 12px; }
.language-choices .button { min-width: 145px; }
.root-art .art-plate { height: 360px; }
.surface-root .header-inner { justify-content: space-between; }
.surface-root .header-inner > nav { display: none; }
.notfound-page { text-align: center; min-height: 610px; padding: 60px 0 85px; display: flex; flex-direction: column; align-items: center; }
.error-number { font-size: 155px; letter-spacing: -12px; line-height: 1; color: var(--line); font-weight: 800; margin-bottom: 24px; }
.error-number > span { color: var(--accent); }
.notfound-page h1 { font-size: 43px; }
.notfound-page .lead { font-size: 17px; max-width: 540px; }
.notfound-page .button { margin-top: 12px; }
.service-symbol { color: var(--accent); font-size: 100px; line-height: 1; margin-bottom: 24px; }
.service-body { max-width: 700px; color: var(--muted); font-size: 15px; }
@media (max-width: 1150px) {
  main, .header-inner, .site-footer { width: calc(100% - 48px); }
  .header-inner { gap: 24px; }
  .header-inner > nav { gap: 18px; font-size: 12px; }
  .language { font-size: 12px; max-width: 145px; }
  .hero { gap: 30px; min-height: 430px; }
  .hero h1 { font-size: 54px; }
  .art-plate { height: 260px; }
  .hero-card { width: 76%; }
  .lane { padding-right: 75px; }
  .lane h2 { font-size: 24px; }
  .lane-icon { right: 20px; }
  .catalog-controls { grid-template-columns: 1fr; }
  .play-layout { grid-template-columns: minmax(0, 1fr) 200px; gap: 22px; }
  .game-stage { min-height: 480px; }
  .root-main { gap: 50px; padding-left: 0; padding-right: 0; }
  .root-copy h1 { font-size: 64px; }
  .root-art .art-plate { height: 300px; }
  .guide-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 30px; }
  .guide-cta { flex-wrap: wrap; }
  .guide-cta .button { margin-left: 0; }
}
@media (max-width: 800px) {
  main, .header-inner, .site-footer { width: calc(100% - 40px); }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 86px; gap: 8px 16px; padding: 16px 0 10px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 39px; line-height: 33px; padding-left: 8px; }
  .brand-games { font-size: 10px; letter-spacing: 2.8px; margin-top: 6px; }
  .header-inner > nav { grid-column: 1/-1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0 19px; font-size: 12px; }
  .header-inner > nav a { padding: 9px 0; }
  .language { grid-column: 2; grid-row: 1; max-width: 165px; font-size: 11px; }
  .language::before { margin-right: 5px; font-size: 22px; }
  .hero { grid-template-columns: 1fr; gap: 35px; min-height: 0; padding: 40px 0 50px; }
  .hero h1 { font-size: 46px; max-width: 600px; }
  .hero .lead { font-size: 17px; max-width: 620px; }
  .hero-art { max-width: 480px; width: 90%; margin: 0 auto; }
  .art-plate { height: 250px; }
  .hero-card { width: 68%; }
  .lanes { gap: 18px; margin-bottom: 45px; }
  .lane { padding: 23px 60px 24px 23px; min-height: 195px; }
  .lane h2 { font-size: 23px; }
  .lane p { font-size: 12px; }
  .lane .eyebrow { font-size: 9px; }
  .lane-icon { right: 18px; top: 48px; font-size: 35px; }
  .chess-icon { font-size: 72px; top: 30px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .card-body { padding: 16px; }
  .card-body h3 { font-size: 20px; }
  .section-head h2 { font-size: 27px; }
  .section-head .text-link { font-size: 12px; }
  .page-heading { padding: 35px 0 28px; }
  .page-heading h1 { font-size: 40px; }
  .page-heading .lead { font-size: 16px; }
  .play-layout { grid-template-columns: 1fr; gap: 32px; }
  .play-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .play-heading h1 { font-size: 40px; }
  .play-aside { padding-top: 0; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rules-panel { grid-template-columns: 1fr; gap: 10px; padding: 38px 0 45px; }
  .rules-panel h2 { font-size: 30px; }
  .game-stage { height: min(70vh, 630px); min-height: 470px; }
  .guide-layout { grid-template-columns: 1fr; gap: 28px; }
  .guide-toc { display: flex; flex-wrap: wrap; gap: 0 20px; padding-top: 0; }
  .guide-toc strong { width: 100%; margin-bottom: 4px; }
  .guide-toc a { font-size: 12px; }
  .guide-heading h1 { font-size: 44px; }
  .root-main { grid-template-columns: 1fr; padding: 45px 0 60px; gap: 45px; min-height: 0; }
  .root-copy h1 { font-size: 64px; }
  .root-art .art-plate { height: 280px; }
  .site-footer { padding-top: 28px; }
  .footer-links { gap: 14px; flex-wrap: wrap; justify-content: flex-end; max-width: 300px; }
}
@media (max-width: 520px) {
  main, .header-inner, .site-footer { width: calc(100% - 40px); }
  .header-inner { gap: 4px 12px; }
  .language { max-width: 150px; }
  .hero { padding-top: 32px; gap: 32px; }
  .hero h1 { font-size: 42px; letter-spacing: -.045em; }
  .hero .eyebrow { font-size: 10px; margin-bottom: 16px; }
  .hero-art { width: 94%; }
  .art-plate { height: 220px; }
  .hero-card { border-width: 5px; border-radius: 12px; width: 72%; }
  .hero-card-one { top: 6%; }
  .hero-card-two { bottom: 3%; right: 0; }
  .art-spark { font-size: 45px; }
  .orbit-dot { width: 24px; height: 24px; }
  .lanes { grid-template-columns: 1fr; gap: 14px; margin-bottom: 36px; }
  .lane { min-height: 160px; padding: 24px 75px 24px 24px; }
  .lane h2 { font-size: 25px; }
  .lane p { font-size: 13px; }
  .chess-icon { font-size: 96px; top: 23px; }
  .lane-icon { right: 24px; top: 36px; }
  .lane .chess-icon { top: 23px; }
  .section-head { align-items: flex-start; gap: 10px; }
  .section-head h2 { font-size: 26px; }
  .section-head .text-link { max-width: 110px; min-height: 36px; line-height: 1.5; padding-top: 0; }
  .game-grid { gap: 14px; }
  .game-card { border-radius: 12px; }
  .card-body { padding: 13px 12px 16px; }
  .card-body h3 { font-size: 19px; }
  .genre { font-size: 8px; letter-spacing: .35px; line-height: 1.4; padding: 0; margin-bottom: 7px; }
  .card-body p { font-size: 12px; line-height: 1.5; }
  .card-favorite { top: 5px; right: 5px; width: 44px; height: 44px; font-size: 25px; }
  .cover-fallback > span { font-size: 45px; }
  .cover-fallback > small { font-size: 8px; letter-spacing: 1px; }
  .cover-fallback { min-height: 90px; }
  .game-section { margin-bottom: 35px; }
  .editorial-body { padding-bottom: 30px; font-size: 14px; }
  .catalog-controls { gap: 18px; }
  .view-filters { gap: 6px; }
  .view-filters button { padding: 9px 12px; font-size: 11px; }
  .select-filters { gap: 12px; flex-wrap: wrap; }
  .select-filters label { flex-direction: column; align-items: flex-start; gap: 7px; }
  .select-filters label:first-child { flex: 1; min-width: 140px; }
  .select-filters select { width: 100%; font-size: 12px; padding-right: 44px; }
  .catalog-meta { align-items: flex-start; flex-direction: column; gap: 0; }
  .catalog-actions { gap: 20px; justify-content: space-between; width: 100%; }
  .quiet-button { font-size: 11px; text-align: left; }
  .empty-state { padding: 34px 18px; }
  .empty-state p { font-size: 18px; }
  .breadcrumbs { padding: 14px 0 18px; font-size: 11px; gap: 8px; }
  .play-heading { margin-bottom: 18px; }
  .play-heading h1 { font-size: 39px; }
  .play-heading p { font-size: 14px; }
  .play-toolbar { gap: 8px; margin-bottom: 16px; }
  .favorite-button, .fullscreen-button { font-size: 12px; padding: 8px 12px; }
  .game-stage { border-radius: 15px; min-height: 450px; height: 58vh; }
  .launch-card { padding: 20px 16px; gap: 12px; }
  .launch-card h2 { font-size: 18px; }
  .launch-cover { width: min(94%, 340px); }
  .unavailable-copy { font-size: 14px; }
  .player-actions { gap: 10px 16px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .play-aside .card-body { padding: 12px; }
  .play-aside h3 { font-size: 18px; }
  .rules-panel p { font-size: 14px; }
  .guide-heading { padding-bottom: 25px; }
  .guide-heading h1 { font-size: 40px; }
  .guide-heading .lead { font-size: 16px; }
  .guide-step { grid-template-columns: 26px minmax(0, 1fr); gap: 13px; }
  .step-number { font-size: 24px; }
  .guide-step p { font-size: 15px; }
  .guide-cover { border-radius: 12px; margin-bottom: 28px; }
  .guide-cta { padding: 22px; gap: 15px; }
  .guide-cta-piece { display: none; }
  .guide-cta .button { width: 100%; }
  .root-copy h1 { font-size: 58px; }
  .root-copy .lead { font-size: 21px; }
  .language-choices { gap: 10px; }
  .language-choices .button { min-width: 0; flex: 1; padding: 14px 15px; }
  .root-art .art-plate { height: 230px; }
  .site-footer { grid-template-columns: 1fr; gap: 18px; }
  .footer-links { max-width: none; justify-content: flex-start; gap: 24px; font-size: 12px; }
  .copyright { margin-top: 0; }
  .notfound-page { min-height: 520px; padding: 45px 0 60px; }
  .error-number { font-size: 130px; }
  .notfound-page h1 { font-size: 35px; }
  .notfound-page .lead { font-size: 16px; }
}
@media (max-width: 350px) {
  main, .header-inner, .site-footer { width: calc(100% - 32px); }
  .language { max-width: 135px; font-size: 10px; }
  .header-inner > nav { gap: 0 14px; font-size: 11px; }
  .hero h1 { font-size: 37px; }
  .art-plate { height: 190px; }
  .page-heading h1, .guide-heading h1 { font-size: 35px; }
  .view-filters button { padding: 9px 10px; font-size: 10px; }
  .game-grid, .related-grid { gap: 10px; }
  .card-body { padding: 11px 10px 14px; }
  .card-body h3 { font-size: 18px; }
  .card-body p { font-size: 11px; }
  .game-stage { min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Cover-first catalog: stable media, persistent names, compact discovery tools. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main, .header-inner, .site-footer { width: min(1360px, calc(100% - 64px)); }
.site-header { min-height: 80px; }
.header-inner { min-height: 79px; }
.game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 14px; }
.game-card { border: 0; background: transparent; overflow: visible; border-radius: 12px; }
.game-card-link { border-radius: 12px; }
.cover { border-radius: 12px; }
.cover-fallback { min-height: 0; }
.cover-fallback > span { font-size: 48px; }
.cover-fallback > small { font-size: 8px; }
.card-body, .play-aside .card-body { padding: 8px 1px 0; }
.card-body h3, .play-aside h3 { font-size: 14px; line-height: 1.35; letter-spacing: -.2px; margin: 0; min-height: 38px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-favorite { top: 2px; right: 2px; background: transparent; width: 44px; height: 44px; box-shadow: none; display: grid; place-items: center; opacity: 0; transition: opacity .14s ease; }
.card-favorite > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--accent); box-shadow: 0 1px 5px #0002; font-size: 23px; line-height: 1; }
.card-favorite[aria-pressed="true"] { background: transparent; opacity: 1; }
.game-card:focus-within .card-favorite { opacity: 1; }
.game-card-link:focus-visible .cover { box-shadow: 0 0 0 2px var(--accent); }
.card-preview { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity .14s ease; }
.game-card.is-previewing .card-preview { opacity: 1; }
.browse-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 0 18px; }
.browse-heading h1 { font-size: 36px; line-height: 1.12; margin: 0; }
.browse-heading .search-form { width: min(420px, 42%); flex-shrink: 0; }
.catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 2px; }
.select-filters { grid-column: auto; gap: 12px; justify-content: flex-end; }
.select-filters label { gap: 0; }
.select-filters select { max-width: 235px; }
.catalog-meta { min-height: 44px; margin-bottom: 12px; gap: 14px; }
.catalog-actions { gap: 14px; }
.catalog-meta [data-clear-lists][hidden] { display: none; }
.catalog-layout + .editorial-body { border-top: 1px solid var(--line); padding-top: 28px; max-width: 850px; }
@media (hover: hover) and (pointer: fine) {
  .game-card:hover .card-favorite { opacity: 1; }
  .game-card:hover .cover { box-shadow: 0 0 0 2px var(--accent); }
}
@media (max-width: 1100px) {
  main, .header-inner, .site-footer { width: calc(100% - 40px); }
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalog-controls { flex-wrap: wrap; }
  .select-filters { flex: 1; }
}
@media (max-width: 800px) {
  .header-inner { min-height: 0; padding: 12px 0 4px; gap: 4px 16px; }
  .header-inner > nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 0 20px; scrollbar-width: thin; }
  .header-inner > nav a { flex-shrink: 0; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-body, .play-aside .card-body { padding: 8px 1px 0; }
  .card-body h3, .play-aside h3 { font-size: 14px; }
  .browse-heading { gap: 20px; }
  .browse-heading h1 { font-size: 32px; }
  .catalog-controls { gap: 12px; }
  .select-filters { justify-content: flex-start; }
  .card-favorite { opacity: 1; }
}
@media (max-width: 600px) {
  main, .header-inner, .site-footer { width: calc(100% - 32px); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 12px; }
  .cover { border-radius: 10px; }
  .browse-heading { display: block; padding: 16px 0 12px; }
  .browse-heading h1 { font-size: 29px; margin-bottom: 12px; }
  .browse-heading .search-form { width: 100%; }
  .search-wrap { min-height: 48px; }
  .catalog-controls { display: block; }
  .view-filters { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 3px 0 8px; }
  .view-filters button { flex-shrink: 0; min-height: 44px; padding: 9px 12px; font-size: 12px; }
  .select-filters { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
  .select-filters label, .select-filters label:first-child { flex: 1; min-width: 0; flex-direction: row; gap: 0; }
  .select-filters select { width: 100%; max-width: 100%; min-height: 44px; font-size: 12px; }
  .catalog-meta { flex-direction: row; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; }
  .catalog-actions { width: auto; gap: 8px; justify-content: flex-end; }
  .quiet-button { font-size: 11px; }
  .card-body h3, .play-aside h3 { font-size: 13px; min-height: 36px; }
  .card-favorite, .play-aside .card-favorite { top: 0; right: 0; }
  .card-favorite > span { width: 27px; height: 27px; font-size: 22px; }
}
@media (max-width: 350px) {
  main, .header-inner, .site-footer { width: calc(100% - 24px); }
  .game-grid { gap: 12px 10px; }
  .view-filters button { font-size: 11px; padding: 9px 11px; }
}
@media (hover: none), (pointer: coarse) {
  .card-favorite { opacity: 1; }
  .card-preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card-preview { display: none; }
}
.catalog-categories { position: relative; margin-right: auto; font-size: 12px; }
.catalog-categories summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); color: var(--ink); list-style: none; }
.catalog-categories summary::-webkit-details-marker { display: none; }
.catalog-categories summary::after { content: '⌄'; font-size: 16px; }
.catalog-categories summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.catalog-categories > nav { position: absolute; top: calc(100% + 6px); left: 0; width: min(360px, calc(100vw - 40px)); max-height: min(400px, 55vh); overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 12px 25px #28282422; z-index: 10; display: grid; gap: 2px; }
.catalog-categories > nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; line-height: 1.4; }
.catalog-categories > nav a:hover, .catalog-categories > nav a:focus-visible, .catalog-categories > nav a[aria-current="page"] { background: var(--soft); color: var(--accent); }
.external-play-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 600px) {
  .catalog-categories { margin-right: 0; }
  .catalog-categories summary { padding: 0 16px; font-size: 11px; }
  .catalog-categories > nav { left: 50%; transform: translateX(-50%); width: min(300px, calc(100vw - 32px)); }
  .catalog-meta { flex-wrap: wrap; }
  .catalog-meta .catalog-actions { margin-left: auto; }
}

/* Discovery shelves reuse the same stable cover and small permanent title. */
.card-body, .play-aside .card-body { padding: 5px 1px 0; }
.card-body h3, .play-aside h3 { display: block; min-height: 16px; font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.offer-notice { display: block; margin-top: 2px; font-size: 10px; font-weight: 400; line-height: 14px; color: var(--muted); }
.game-grid { gap: 14px 12px; }
.home-heading { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 22px 0 14px; }
.home-heading > div { min-width: 0; }
.home-heading h1 { font-size: 32px; line-height: 1.12; margin-bottom: 7px; }
.home-heading p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; max-width: 700px; }
.home-search { width: min(420px, 38%); flex-shrink: 0; }
.home-categories { display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px 10px; margin: 0 -2px 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.home-categories a { min-height: 44px; display: flex; align-items: center; flex-shrink: 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); font-size: 12px; white-space: nowrap; }
.home-categories a:hover { color: var(--accent); border-color: var(--accent); }
.home-shelf { margin-bottom: 22px; }
.home-shelf .section-head { margin-bottom: 7px; gap: 16px; }
.home-shelf .section-head h2 { min-width: 0; margin: 0; font-size: 21px; line-height: 1.25; }
.home-shelf .section-head h2 a { display: inline-flex; align-items: center; min-height: 44px; }
.section-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.home-shelf .text-link { font-size: 12px; border: 0; white-space: nowrap; }
.shelf-controls { display: flex; gap: 4px; }
.shelf-controls button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 24px; line-height: 1; }
.shelf-controls button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.game-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 6); gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 3px 2px 10px; margin: -3px -2px 0; scroll-snap-type: x proximity; scroll-padding-inline: 2px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.game-row .game-card { scroll-snap-align: start; }
.card-added { display: block; margin-top: 2px; font-size: 10px; line-height: 14px; color: var(--muted); }
.catalog-topic-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; min-width: 0; }
.browse-categories { display: flex; gap: 8px; overflow-x: auto; padding: 6px 3px; margin: -3px; min-width: 0; }
.browse-categories a { display: flex; align-items: center; flex-shrink: 0; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 24px; font-size: 12px; white-space: nowrap; }
.browse-categories a:hover { border-color: var(--accent); color: var(--accent); }
.browse-categories a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.catalog-topic-bar .catalog-categories { flex-shrink: 0; margin-right: 0; }
.catalog-topic-bar .catalog-categories > nav { left: auto; right: 0; transform: none; }
.header-inner > nav, .home-categories, .browse-categories, .game-row { scrollbar-width: none; }
.header-inner > nav::-webkit-scrollbar, .home-categories::-webkit-scrollbar, .browse-categories::-webkit-scrollbar, .game-row::-webkit-scrollbar { display: none; }
.game-row { padding: 6px 5px 10px; margin: -6px -5px 0; scroll-padding-inline: 5px; }
.home-categories { padding-top: 6px; }
.discovery-home > .editorial-body { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 32px; }
@media (max-width: 1100px) {
  .game-row { grid-auto-columns: calc((100% - 36px) / 4); }
}
@media (max-width: 800px) {
  .home-heading { gap: 20px; }
  .home-heading h1 { font-size: 28px; }
  .home-search { width: 40%; }
  .game-row { grid-auto-columns: 42%; gap: 10px; }
  .shelf-controls { display: flex; }
  .home-shelf .section-head h2 { font-size: 20px; }
}
@media (max-width: 600px) {
  .home-heading { display: block; padding: 16px 0 10px; }
  .home-heading h1 { font-size: 27px; margin-bottom: 6px; }
  .home-heading p { font-size: 12px; }
  .home-search { width: 100%; margin-top: 12px; }
  .home-categories { margin-bottom: 4px; }
  .home-categories a { padding: 8px 16px; font-size: 11px; }
  .home-shelf { margin-bottom: 17px; }
  .home-shelf .section-head { gap: 12px; margin-bottom: 4px; align-items: center; }
  .home-shelf .section-head h2 { font-size: 19px; }
  .home-shelf .section-head .text-link { min-height: 44px; max-width: none; font-size: 11px; padding: 8px 0; }
  .section-actions { gap: 0; }
  .home-shelf .section-head { flex-wrap: wrap; }
  .home-shelf .section-actions { flex-basis: 100%; justify-content: space-between; }
  .catalog-topic-bar { gap: 6px; }
  .browse-categories a { padding: 8px 16px; font-size: 11px; }
  .card-body, .play-aside .card-body { padding: 4px 1px 0; }
  .card-body h3, .play-aside h3 { font-size: 11px; line-height: 15px; min-height: 15px; }
  .game-grid { gap: 12px 10px; }
  .offer-notice { margin-top: 1px; }
}
@media (max-width: 350px) {
  .home-heading h1 { font-size: 25px; }
  .home-shelf .section-head h2 { font-size: 18px; }
  .game-row { grid-auto-columns: 44%; }
}
/* Pure CSS follows browser preference on first paint and when it changes. */
@media (prefers-color-scheme: dark) {
  :root { --bg: #14151b; --paper: #20212a; --ink: #f4f2f6; --muted: #bcb8c5; --line: #3b3b48; --accent: #e9a9ce; --soft: #2b2632; --on-accent: #2b1622; }
  .button.primary:hover { background: #f0b8d6; }
  .art-plate { background: #242630; }
  .puzzle-lane { background: #283126; color: #dde6d1; }
  .board-lane { background: #322633; color: #ead7e6; }
  .cover-fallback, .game-card[data-family="board"] .cover-fallback, .game-card[data-family="puzzle"] .cover-fallback { background: var(--soft); }
  .launch-card .button.primary:hover { background: #eee5c3; }
}

/* Current journey: stable card targets, game-first content and edge-to-edge play. */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 24px; }
.direction-link { display: inline-flex; align-items: center; gap: 12px; padding-right: 3px; }
.link-arrow { display: inline-flex; flex: 0 0 1.25em; width: 1.25em; height: 1.25em; transition: transform .2s ease; }
.link-arrow svg { display: block; width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.link-arrow-diagonal svg { transform: rotate(-135deg); }
.direction-link:is(:hover, :focus-visible) .link-arrow { transform: translate(3px, -3px); }
.direction-link:is(:hover, :focus-visible) .link-arrow-down { transform: translateY(3px); }
.heart-icon { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[data-favorite][aria-pressed="true"] .heart-icon { fill: currentColor; }
.card-favorite, .play-aside .card-favorite { width: 44px; height: 44px; background: transparent; border-radius: 50%; }
.card-favorite > .favorite-disc, .favorite-disc { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--paper); color: var(--accent); }
.card-favorite[aria-pressed="true"] > .favorite-disc { background: var(--paper); color: var(--accent); }
.cover > img, .cover > .card-preview { transform: scale(1); transition: transform .15s ease, opacity .14s ease; }
@media (hover: hover) and (pointer: fine) {
  .game-card:is(:hover, :focus-within) .cover > img,
  .game-card:is(:hover, :focus-within) .cover > .card-preview { transform: scale(1.025); }
}

.play-catalog-back { display: none; }
.play-detail-language { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; color: var(--accent); }
.play-page { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 0 28px; padding-top: 16px; }
.play-layout { display: block; grid-column: 1; grid-row: 1; min-width: 0; }
.play-page > .breadcrumbs { grid-column: 1; grid-row: 2; margin: 12px 0 6px; padding: 0; }
.play-heading { grid-column: 1; grid-row: 3; margin: 16px 0; }
.play-heading h1 { font-size: 32px; margin-bottom: 10px; }
.play-page > .fact-tags { grid-column: 1; grid-row: 4; }
.play-page > .rules-panel { grid-column: 1; grid-row: 5; padding: 24px 0 36px; gap: 24px; }
.play-page > .play-aside { grid-column: 2; grid-row: 1 / span 5; align-self: start; min-width: 0; }
.player-panel { position: relative; display: grid; grid-template-columns: 44px 44px minmax(0, 1fr) 44px; grid-template-rows: auto 44px; gap: 8px 6px; min-width: 0; }
.player-panel .game-stage { grid-column: 1/-1; grid-row: 1; width: 100%; border-radius: 12px; }
.play-toolbar, .player-actions.player-recovery { display: contents; }
.player-panel .player-control { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; padding: 0; gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); box-shadow: none; grid-row: 2; }
.player-panel .favorite-button { grid-column: 1; }
.player-panel .retry-button { grid-column: 2; }
.player-panel .fullscreen-button { grid-column: 4; }
.player-panel .player-return { grid-column: 3; grid-row: 2; justify-self: end; font-size: 13px; margin-right: 6px; }
.player-control-icon { display: inline-flex; align-items: center; justify-content: center; }
.player-control-icon svg { display: block; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.player-panel .favorite-button .heart-icon { width: 20px; height: 20px; stroke-width: 1.6; }
.player-panel .favorite-button[aria-pressed="true"] .heart-icon { fill: currentColor; }
.player-panel .fullscreen-button .player-control-icon { width: 28px; height: 28px; }
.player-panel .fullscreen-button svg { width: 28px; height: 28px; }
.fullscreen-button .fullscreen-collapse-icon { display: none; }
.player-panel[data-expanded="true"] .fullscreen-expand-icon { display: none; }
.player-panel[data-expanded="true"] .fullscreen-collapse-icon { display: block; }
.player-control-label, .player-status {
  position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.player-panel > noscript { grid-column: 1/-1; grid-row: 3; }
.player-language-notice { display: block; }
.player-language-notice .offer-notice { margin: 0; color: #fff; font-size: 12px; line-height: 16px; }
.launch-poster { display: contents; }
.player-panel:is([data-player-state="slow"], [data-player-state="failed"]) .player-recovery {
  position: absolute; z-index: 4; top: calc(50% - 26px); left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(420px, calc(100% - 32px)); max-height: calc(100% - 72px); overflow: auto;
  padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 8px 30px #0004; text-align: center;
}
.player-panel:is([data-player-state="slow"], [data-player-state="failed"]) .player-status {
  position: static; width: auto; height: auto; min-height: 0; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; font-size: 14px; line-height: 1.5;
}
.player-panel:is([data-player-state="slow"], [data-player-state="failed"]) .retry-button { width: auto; padding: 8px 16px; gap: 10px; background: var(--accent); color: var(--on-accent); }
.player-panel:is([data-player-state="slow"], [data-player-state="failed"]) .retry-button .player-control-label { position: static; width: auto; height: auto; padding: 0; margin: 0; clip: auto; overflow: visible; white-space: normal; font-size: 14px; }
@media (max-width: 980px) {
  .play-page { grid-template-columns: minmax(0, 1fr); }
  .play-page > .play-aside { grid-column: 1; grid-row: 6; margin: 0 0 24px; }
}
/* Keep this predicate identical to the runtime mobile query. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  :is(.surface-play, .surface-mode) .site-header { min-height: calc(48px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  :is(.surface-play, .surface-mode) .header-inner { width: calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); min-height: 47px; height: 47px; padding: 0; gap: 12px; display: flex; justify-content: space-between; }
  :is(.surface-play, .surface-mode) .header-inner > nav,
  :is(.surface-play, .surface-mode) .header-inner > .language { display: none; }
  :is(.surface-play, .surface-mode) .header-inner .brand { min-height: 44px; font-size: 17px; letter-spacing: -.5px; gap: 6px; }
  :is(.surface-play, .surface-mode) .header-inner .brand > span:last-child { display: flex; gap: 4px; }
  :is(.surface-play, .surface-mode) .header-inner .brand-games { display: inline; margin: 0; font-size: inherit; font-weight: inherit; letter-spacing: inherit; }
  :is(.surface-play, .surface-mode) .header-inner .brand-mark { width: 24px; height: 24px; border-radius: 7px; font-size: 26px; line-height: 20px; padding-left: 5px; }
  :is(.surface-play, .surface-mode) .header-inner .brand-mark span { font-size: 14px; right: 2px; bottom: -1px; }
  .play-catalog-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; white-space: nowrap; }
  .play-page { width: 100%; padding-top: 0; gap: 0; }
  .play-page > .breadcrumbs { margin: 14px 16px 6px; }
  .play-heading { margin: 12px 16px 16px; gap: 8px; }
  .play-heading h1 { font-size: 28px; }
  .play-heading p { font-size: 14px; }
  .play-page > .fact-tags { margin: 0 16px 18px; }
  .play-page > .rules-panel { width: auto; margin: 0 16px; padding: 24px 0 30px; }
  .play-page > .play-aside { margin: 0 16px 24px; padding-top: 0; }
  .play-page .player-panel { padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); background: var(--paper); }
  .play-page .player-panel .game-stage {
    height: min(68vh, calc(var(--player-viewport-height, 100vh) - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    height: min(68svh, calc(var(--player-viewport-height, 100svh) - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    min-height: 0; border-radius: 0;
  }
  .play-page .launch-card { height: 100%; max-height: 100%; min-height: 0; max-width: 760px; padding: 16px; gap: 16px; justify-content: center; }
  .play-page .launch-poster { display: flex; flex: 0 1 auto; min-height: 0; width: 100%; aspect-ratio: 16 / 9; align-items: center; justify-content: center; }
  .play-page .launch-cover { width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; aspect-ratio: auto; object-fit: contain; }
  .play-page .launch-card h2 { display: none; }
  .play-page .launch-card .button { flex: 0 0 auto; min-height: 52px; }
  .play-page .player-language-notice { flex: 0 0 auto; }
  .play-page .unavailable-copy { flex: 0 0 auto; margin: 0; font-size: 14px; line-height: 1.4; }
  .play-page .player-return { font-size: 12px; }
}
@media (max-width: 760px) and (max-height: 500px), (pointer: coarse) and (max-height: 500px) {
  .play-page .player-panel .game-stage {
    height: calc(var(--player-viewport-height, 100svh) - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
  .play-page .launch-card { padding: 12px 16px; gap: 8px; }
}
/* Expanded iframe gets every viewport pixel; safe areas apply to Exit, not a rail. */
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) {
  position: fixed; z-index: 100; top: var(--player-viewport-top, 0px); left: var(--player-viewport-left, 0px);
  width: var(--player-viewport-width, 100vw); height: 100vh; height: var(--player-viewport-height, 100dvh);
  max-width: none; margin: 0; padding: 0; display: block; overflow: hidden; background: #000; border: 0; border-radius: 0;
}
.player-panel:fullscreen { top: 0; left: 0; width: 100%; height: 100%; }
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .game-stage {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
}
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .favorite-button,
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .player-return,
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) > noscript { display: none; }
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .retry-button { display: none; }
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .fullscreen-button {
  position: absolute; z-index: 6; top: max(8px, env(safe-area-inset-top, 0px)); right: max(8px, env(safe-area-inset-right, 0px));
  width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; background: #181820b8; color: #fff; border: 1px solid #ffffff50; border-radius: 8px;
}
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen):is([data-player-state="slow"], [data-player-state="failed"]) .player-recovery { top: 50%; }
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen):is([data-player-state="slow"], [data-player-state="failed"]) .retry-button { display: inline-flex; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link-arrow, .cover > img, .cover > .card-preview { transition: none; }
  .direction-link:is(:hover, :focus-visible) .link-arrow,
  .game-card:is(:hover, :focus-within) .cover > img,
  .game-card:is(:hover, :focus-within) .cover > .card-preview { transform: none; }
}

.search-context { margin: -4px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* Playgama's observed ad Close is right; keep the single Pora Exit clear of it. */
:is(.player-panel[data-expanded="true"][data-player-provider="playgama"], .player-panel[data-player-provider="playgama"]:fullscreen) .fullscreen-button {
  left: max(8px, env(safe-area-inset-left, 0px)); right: auto;
}
/* Dragging moves only the same Exit; iframe bounds and normal inline row stay fixed. */
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .fullscreen-button {
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; transition: none;
}
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .fullscreen-button:active { cursor: grabbing; }
:is(.player-panel[data-expanded="true"], .player-panel:fullscreen) .fullscreen-button[data-exit-positioned="true"] {
  left: clamp(max(8px, env(safe-area-inset-left, 0px)), var(--player-exit-left, 8px), calc(100% - 44px - max(8px, env(safe-area-inset-right, 0px))));
  top: clamp(max(8px, env(safe-area-inset-top, 0px)), var(--player-exit-top, 8px), calc(100% - 44px - max(8px, env(safe-area-inset-bottom, 0px))));
  right: auto;
}
