:root{color-scheme:light;--paper:#f3effc;--panel:#fff;--ink:#211739;--muted:#5e5374;--line:#dfd6ed;--accent:#6338db;--on-accent:#fff;--tint:#eae0ff;--radius:18px;--display:"Bahnschrift","Segoe UI",sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font:1rem/1.58 "Segoe UI",system-ui,sans-serif}
img{max-width:100%;display:block}
a{color:inherit;text-underline-offset:.22em}
button{font:inherit;color:inherit}
button:enabled{cursor:pointer}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
h1,h2,h3,p{margin-top:0}
h1,h2,h3{line-height:1.13}
h1,h2{font-family:var(--display);letter-spacing:-.035em}
.frame{width:min(100% - 3rem,78rem);margin-inline:auto}
.skip{position:absolute;left:1rem;top:.5rem;z-index:10;transform:translateY(-160%);background:var(--panel);padding:.65rem 1rem}
.skip:focus{transform:none}
.masthead{background:var(--panel);border-bottom:1px solid var(--line)}
.mast-inner{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;min-height:76px}
.brand{display:inline-flex;flex:0 0 auto;text-decoration:none;align-items:center}
.brand img{width:218px;height:auto}
.category-nav{display:flex;align-items:center;gap:clamp(.1rem,1vw,.78rem);font-size:.88rem;font-weight:650}
.category-nav a,.category-dialog nav a{padding:.35rem .38rem;border-radius:5px;text-decoration:none;white-space:nowrap}
.category-nav a:hover,.category-nav a[aria-current],.category-dialog nav a:hover,.category-dialog nav a[aria-current]{background:var(--tint);color:var(--ink)}
.menu-trigger{display:none}
.secondary,.category-dialog button,.board-actions button,.keypad button{background:var(--panel);border:1px solid var(--line);border-radius:8px;font-weight:650;padding:.5rem .85rem}
.category-dialog{width:min(calc(100% - 2rem),27rem);max-height:calc(100% - 2rem);margin:auto;border:1px solid var(--line);border-radius:var(--radius);padding:1.1rem;background:var(--panel);color:var(--ink)}
.category-dialog::backdrop{background:#131121a6}
.dialog-title{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.8rem}
.dialog-title h2{margin:0;font-size:1.55rem}
.category-dialog nav{display:grid;grid-template-columns:1fr 1fr;gap:.45rem}
.category-dialog nav a{border:1px solid var(--line);padding:.65rem}
main{padding-block:clamp(1.25rem,4vw,3rem) 4rem;min-height:68vh}
.hero{position:relative;display:grid;grid-template-columns:1.05fr .85fr;gap:clamp(1.25rem,5vw,5rem);align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:clamp(1.35rem,4.8vw,4.5rem);overflow:hidden}
.hero-copy{position:relative;z-index:1}
.edition{display:block;margin:0 0 .75rem;color:var(--accent);font-size:.82rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.hero h1{font-size:clamp(2.7rem,6.15vw,6rem);margin:0 0 .85rem}
.hero p:not(.edition){color:var(--muted);max-width:40rem;margin-bottom:1.4rem;font-size:clamp(1rem,1.65vw,1.18rem)}
.hero-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem 1rem}
.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;background:var(--accent);color:var(--on-accent);font-weight:750;border:1px solid transparent;border-radius:8px;padding:.65rem 1rem;text-decoration:none}
.button:hover{filter:brightness(1.12)}
.plain-link{font-weight:680}
.recommendations{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;margin-block:clamp(1.4rem,4vw,3.25rem)}
.shelf{min-width:0;padding:clamp(1rem,2vw,1.65rem);background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.shelf header{margin-bottom:1rem}
.shelf h2{margin:0 0 .35rem;font-size:clamp(1.4rem,2.4vw,2rem)}
.shelf p{color:var(--muted);margin:0}
.tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(.55rem,1.3vw,1.2rem);list-style:none;margin:0;padding:0}
.tile{min-width:0}
.tile a{display:block;overflow:hidden;border:1px solid var(--line);background:var(--panel);border-radius:calc(var(--radius) * .62);height:100%;text-decoration:none;transition:border-color .15s,transform .15s}
.tile a:hover{transform:translateY(-2px);border-color:var(--accent)}
.tile img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;background:var(--tint)}
.tile strong{display:block;font-size:.92rem;line-height:1.24;padding:.65rem .66rem;overflow-wrap:anywhere}
.recommendations .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.recommendations .tile a{display:grid;grid-template-columns:minmax(3.25rem,36%) 1fr;align-items:center;min-height:3.7rem}
.recommendations .tile img{height:100%;min-height:3.7rem}
.recommendations .tile strong{padding:.45rem}
.catalog{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
.catalog .shelf{position:relative}
.catalog .shelf-header{display:flex;justify-content:space-between;align-items:start;gap:.55rem}
.shelf-header a{font-size:.85rem;font-weight:650;flex-shrink:0}
.catalog .tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.section-heading{font-size:clamp(1.85rem,3.7vw,3.1rem);margin-bottom:1.05rem}
.library-intro{margin-bottom:1.5rem}
.page-heading{margin-bottom:1.65rem;max-width:70ch}
.page-heading h1,.detail h1,.player-title h1{font-size:clamp(2.1rem,5.2vw,4.35rem);margin-bottom:.6rem}
.page-heading p,.detail p,.player-title p{color:var(--muted);margin-bottom:0}
.library-grid .tile-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.trail{display:flex;gap:.45rem;flex-wrap:wrap;color:var(--muted);font-size:.9rem;margin-bottom:1.25rem}
.detail{display:grid;grid-template-columns:minmax(0,11rem) 1fr;align-items:center;gap:clamp(1rem,3vw,2.5rem);background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:clamp(1.2rem,4vw,3.2rem)}
.detail-cover{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:calc(var(--radius) * .68);background:var(--tint)}
.detail .button{margin-top:1.25rem}
.detail .edition{margin:0 0 .5rem}
.related{margin-top:1.8rem}
.readable{max-width:78ch;margin-inline:auto}
.legal{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:clamp(1.1rem,4vw,3rem)}
.legal h2{font-size:1.35rem;margin-top:1.55rem;margin-bottom:.5rem}
.legal p:last-child{margin-bottom:0}
.legal ul{padding-inline-start:1.35rem}
.legal li+li{margin-top:.36rem}
.legal a{overflow-wrap:anywhere}
.player-title{margin-bottom:1.1rem}
.player{max-width:55rem;margin-inline:auto}
.footer{border-top:1px solid var(--line);background:var(--panel)}
.footer-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1rem;padding-block:1.25rem;color:var(--muted);font-size:.9rem}
.footer-row nav{display:flex;flex-wrap:wrap;gap:.45rem 1rem}
.footer-row a{text-decoration:none}
.footer-row a:hover{text-decoration:underline}
.no-script{margin:1rem 0;color:var(--muted)}

.theme-snake{color-scheme:dark;--paper:#0c181b;--panel:#112529;--ink:#f0fffa;--muted:#afc8c7;--line:#29454a;--accent:#49edd0;--on-accent:#092b27;--tint:#1b3739;--radius:13px}
.theme-snake .hero{background:radial-gradient(ellipse at 85% 28%,#1b423d,transparent 56%),var(--panel)}
.theme-snake .recommendations{grid-template-columns:1.35fr 1fr}
.theme-snake .catalog .shelf{border-top:3px solid #2d6e67}

.theme-wordsearch{--paper:#f9f3e6;--panel:#fffaf0;--ink:#2d231d;--muted:#66554b;--line:#d9cbb9;--accent:#8a2922;--on-accent:#fff8ed;--tint:#f0dfc8;--radius:4px;--display:Georgia,serif}
.theme-wordsearch .hero{grid-template-columns:1fr .65fr;border-width:3px 0;padding-inline:clamp(.1rem,3vw,2rem);background:transparent}
.theme-wordsearch .hero h1{max-width:10ch}
.theme-wordsearch .recommendations .shelf{background:transparent;border:0;border-bottom:1px solid var(--line);padding-inline:0}
.theme-wordsearch .recommendations .shelf:first-child{border-right:1px solid var(--line);padding-inline-end:1.25rem}
.theme-wordsearch .catalog{grid-template-columns:1fr}
.theme-wordsearch .catalog .shelf{display:grid;grid-template-columns:minmax(8rem,1fr) 3fr;gap:1rem}
.theme-wordsearch .catalog .shelf-header{display:block}
.theme-wordsearch .catalog .shelf-header a{display:inline-block;margin-top:.5rem}
.theme-wordsearch .catalog .tile a{display:grid;grid-template-columns:minmax(3.2rem,38%) 1fr;align-items:center}
.theme-wordsearch .catalog .tile img{height:100%}

.theme-memorymatch .hero{background:radial-gradient(circle at 79% 20%,#ddcaff,transparent 54%),linear-gradient(115deg,#fff,#efe5ff);border-radius:28px}
.theme-memorymatch .recommendations .shelf:nth-child(2){background:#e9dcfb}
.theme-memorymatch .catalog .shelf:nth-child(4n+1),.theme-memorymatch .catalog .shelf:nth-child(4n){background:#ebdefa}

.theme-checkers{--paper:#f7f3ef;--panel:#fffdf8;--ink:#211f22;--muted:#5c5355;--line:#ddceca;--accent:#a72d35;--on-accent:#fff;--tint:#efd8d5;--radius:7px}
.theme-checkers .masthead{border-top:5px solid var(--accent)}
.theme-checkers .hero{grid-template-columns:.73fr 1.27fr;border:0;background:#ecd6d2;border-radius:0}
.theme-checkers .hero-copy{grid-column:2;grid-row:1}
.theme-checkers .hero h1{max-width:11ch}
.theme-checkers .recommendations .shelf{border-radius:0;border-top:4px solid var(--accent)}
.theme-checkers .catalog .shelf:nth-child(odd){border-left:4px solid var(--accent)}

.theme-minesweeper{color-scheme:dark;--paper:#101b2d;--panel:#162941;--ink:#edf8ff;--muted:#b9cde0;--line:#365573;--accent:#7cc5ff;--on-accent:#132338;--tint:#223d5a;--radius:10px;--display:"Bahnschrift","Segoe UI",sans-serif}
.theme-minesweeper .hero{grid-template-columns:1fr .76fr;background:linear-gradient(125deg,#1b3553 0%,#12223b 63%);border:0;border-block:2px solid var(--line);border-radius:0}
.theme-minesweeper .hero h1{max-width:11ch}
.theme-minesweeper .recommendations{grid-template-columns:.95fr 1.05fr}
.theme-minesweeper .catalog .shelf{border-top:1px dashed #6a8eab}

@media(max-width:940px){
  .category-nav{display:none}
  .menu-trigger{display:inline-block}
  .library-grid .tile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:720px){
  .frame{width:calc(100% - 1.5rem)}
  .mast-inner{min-height:60px;gap:.25rem}
  .brand img{width:clamp(149px,52vw,205px)}
  .menu-trigger{font-size:.9rem;padding:.4rem .54rem}
  .hero,.theme-wordsearch .hero,.theme-checkers .hero,.theme-minesweeper .hero{grid-template-columns:1fr;gap:1.25rem}
  .hero h1{font-size:clamp(2.35rem,10.6vw,3.8rem);max-width:none}
  .theme-wordsearch .hero .art,.theme-snake .hero .art{width:min(88%,15rem);margin:.25rem auto}
  .theme-checkers .hero-copy,.theme-checkers .hero .art{grid-column:auto;grid-row:auto}
  .recommendations,.catalog,.theme-snake .recommendations,.theme-minesweeper .recommendations{grid-template-columns:1fr;gap:.85rem}
  .theme-wordsearch .recommendations .shelf:first-child{border-right:0;padding-inline-end:0}
  .theme-wordsearch .catalog .shelf{display:block}
  .theme-wordsearch .catalog .shelf-header{display:flex}
  .theme-wordsearch .catalog .tile a{display:block}
  .theme-wordsearch .catalog .tile img{height:auto}
  .library-grid .tile-grid,.related .tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .detail{grid-template-columns:minmax(0,7rem) 1fr}
}
@media(max-width:410px){
  .shelf{padding:.8rem}
  .library-grid .tile-grid,.related .tile-grid,.catalog .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .detail{grid-template-columns:1fr;gap:.75rem}
  .detail .detail-cover,.detail .art{width:6.5rem;margin:0}
  .footer-row{align-items:flex-start;flex-direction:column}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* The advertising wrapper supplies spacing without changing the neighboring sections. */
.has-top-ad{padding-block-start:0}
.ad-placement{display:grid;justify-items:center;min-width:0;min-height:350px;margin:0;padding-block:50px}
.ad-placement > div{max-width:100%;text-align:center}

.hero,.theme-wordsearch .hero,.theme-minesweeper .hero{
  grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  gap:clamp(1.25rem,4vw,3.2rem);padding:clamp(1.25rem,3.6vw,3.1rem);
}
.hero h1,.theme-wordsearch .hero h1,.theme-checkers .hero h1,.theme-minesweeper .hero h1{
  font-size:clamp(2.35rem,5.1vw,4.6rem);max-width:15ch
}
.feature{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:clamp(.75rem,1.8vw,1.35rem);align-items:center;
  min-width:0;text-decoration:none;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:.8rem}
.feature:hover{border-color:var(--accent)}
.feature img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain;background:var(--tint);border-radius:calc(var(--radius) * .65)}
.feature-label{display:block;margin-bottom:.35rem;color:var(--accent);font-size:.8rem;font-weight:750}
.feature-name{display:block;font-size:clamp(1.05rem,2.2vw,1.6rem);line-height:1.15}
.feature-note{display:block;margin-top:.4rem;font-size:.87rem;color:var(--muted);line-height:1.38}
.theme-checkers .hero{grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr)}
.theme-checkers .feature{grid-column:1;grid-row:1}
.theme-wordsearch .feature{border:1px solid var(--line);box-shadow:4px 4px 0 var(--tint)}
.theme-memorymatch .feature{border-radius:17px}
.theme-minesweeper .feature{border-style:dashed}

.recommendations,.theme-snake .recommendations,.theme-minesweeper .recommendations{
  grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;margin-block:1.45rem 2.4rem
}
.ad-placement + .recommendations{margin-block-start:0}
.recommendations .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.recommendations .tile a{
  display:grid;grid-template-columns:clamp(3rem,5.6vw,4.6rem) minmax(0,1fr);
  align-items:center;gap:.48rem;min-height:4.1rem;padding:.35rem;text-decoration:none
}
.recommendations .tile img{width:100%;height:auto;min-height:0;aspect-ratio:1;object-fit:contain;border-radius:4px}
.recommendations .tile strong{padding:.15rem;line-height:1.22}
.catalog .tile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.catalog .tile img,.library-grid .tile img,.related .tile img{height:auto;aspect-ratio:1;object-fit:contain}
.catalog .tile a,.theme-wordsearch .catalog .tile a{display:block}
.theme-wordsearch .catalog .shelf{grid-template-columns:minmax(8.5rem,.82fr) minmax(0,3fr);align-items:start}
.theme-wordsearch .catalog .tile img{height:auto}
.shelf-header h2{overflow-wrap:anywhere}

.detail-cover{aspect-ratio:4/3;object-fit:contain}
.detail h1{overflow-wrap:anywhere}
.detail-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-block-start:1.25rem}
.detail-notes section{padding:clamp(1rem,2.6vw,1.7rem);background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.detail-notes section:last-child{grid-column:1/-1;border-inline-start:3px solid var(--accent)}
.detail-notes h2{font-size:clamp(1.2rem,2.1vw,1.62rem);margin-bottom:.47rem}
.detail-notes p{margin:0;color:var(--muted)}
.detail-notes p + p{margin-block-start:.6rem}
.detail-notes a{font-weight:700;color:var(--ink)}

.player{max-width:70rem}
.player-stage{
  display:grid;grid-template-rows:auto minmax(0,1fr);background:var(--panel);min-width:0;overflow:hidden;
  border:1px solid var(--line);border-radius:var(--radius)
}
.player-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.55rem;padding:.68rem .8rem;background:var(--panel)}
.player-tools strong{font-size:1rem}
.player-tools button{min-height:42px}
.player-frame{display:block;width:100%;height:clamp(440px,76svh,830px);border:0;background:var(--paper)}
.player-notice{margin:.75rem 0 0;color:var(--muted);font-size:.88rem}
.player-stage:fullscreen,.player-stage.is-expanded{
  display:grid;width:100%;height:100dvh;border:0;border-radius:0
}
.player-stage.is-expanded{position:fixed;inset:0;z-index:20}
.player-stage:fullscreen .player-frame,.player-stage.is-expanded .player-frame{height:100%;min-height:0}
body.player-expanded{overflow:hidden}

@media(max-width:1020px){
  .theme-wordsearch .catalog .shelf{display:block}
  .theme-wordsearch .catalog .shelf-header{display:flex}
}
@media(max-width:850px){
  .catalog .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .theme-wordsearch .catalog .tile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:720px){
  .hero,.theme-wordsearch .hero,.theme-checkers .hero,.theme-minesweeper .hero{grid-template-columns:minmax(0,1fr);gap:1rem}
  .hero h1,.theme-wordsearch .hero h1,.theme-checkers .hero h1,.theme-minesweeper .hero h1{font-size:clamp(2.05rem,8.7vw,3.5rem)}
  .hero .feature,.theme-checkers .hero .feature{grid-column:auto;grid-row:auto}
  .feature{grid-template-columns:minmax(0,7rem) minmax(0,1fr)}
  .recommendations,.theme-snake .recommendations,.theme-minesweeper .recommendations{grid-template-columns:1fr;gap:.85rem}
  .detail-notes{grid-template-columns:1fr;gap:.65rem}
  .player-frame{height:max(440px,72svh)}
}
@media(max-width:500px){
  .theme-wordsearch .catalog .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:365px){
  .recommendations .tile-grid{grid-template-columns:1fr}
  .recommendations .tile a{grid-template-columns:3.5rem minmax(0,1fr)}
}
