
/* MiniGames platform design — visual layer only; game logic and route contract unchanged. */
:root{--mg-brand:#6257ef;--mg-text:#18233e;--mg-muted:#64728a;--mg-line:#e1e6ef;--mg-surface:#fff;--mg-bg:#f0f3f9}
body{background:var(--mg-bg);color:var(--mg-text)}
.shell{max-width:1600px;padding-inline:clamp(18px,3vw,48px)}
.site-header{height:75px;border-bottom:1px solid #dce2ee;gap:24px}
.logo{font:900 26px/1 var(--body);letter-spacing:-1.6px;color:#1e2b48}
.logo-dot{color:var(--mg-brand)}
.logo-mark{width:32px;height:32px;display:grid;grid-template-columns:repeat(2,12px);gap:3px;transform:rotate(-8deg);background:#6257ef;padding:3px;border-radius:8px}
.logo-mark i{background:#fff;border-radius:2px}.logo-mark i:nth-child(2){background:#b4afff}.logo-mark i:nth-child(3){background:#d4d0ff}.logo-mark i:nth-child(4){background:#fff}
.nav{gap:28px;margin-left:auto;margin-right:0}
.nav-link{font:750 13px/1.3 var(--body);letter-spacing:.035em;color:#53627d;padding:14px 1px}
.nav-link[aria-current=page]{color:#5649df;text-decoration-thickness:3px;text-underline-offset:8px}
.header-play{background:#6257ef;color:white;min-width:120px;border:0;padding:13px 18px;box-shadow:0 3px 9px #6257ef25}
.header-play:hover{background:#5043dc;color:white}
.footer{border-top:1px solid var(--mg-line);font:600 11px/1.6 var(--body);color:#66758d;padding:24px 0}
.footer a,.ads-footer-control{color:#52627d}
#home .hero{margin:24px 0 0;border:0;min-height:0;grid-template-columns:minmax(0,1.618fr) minmax(0,1fr);border-radius:13px;background:#1d2b51;color:white}
#home .hero-copy{padding:25px 32px;display:flex;justify-content:center}
#home .hero h1{font:800 clamp(27px,3.4vw,50px)/1.06 var(--body);letter-spacing:-.048em;margin:9px 0 10px}
#home .hero h1 br{display:none}#home .hero h1 span{color:#bcb7ff}
#home .hero-copy>p{color:#c9d3e8;font-size:14px;line-height:1.45;margin:0 0 16px;max-width:530px}
#home .hero-cta{gap:16px}
#home .hero .pixel-button{background:#766af9;border:0;color:#fff;padding:10px 15px;box-shadow:none}
#home .hero .text-link{color:#dbe4ff;font-size:13px}
#home .hero .tiny-label{color:#a9b9dc;font:750 10px/1.3 var(--body);letter-spacing:.09em}
#home .hero .live-dot{background:#a4f0cd}
#home .hero-footnote{display:none}
#home .hero-art{min-height:0;height:210px;border:0;border-radius:0;background:#2a3972 url('covers/tic.svg') center/cover no-repeat}
#home .hero-art:after,#home .hero-art .console,#home .hero-art .art-spark,#home .hero-art .art-caption{display:none}
#home .home-bottom{padding:26px 0 13px;display:flex;align-items:end;flex-direction:row}
#home .home-bottom h2{font:800 clamp(24px,2.7vw,35px)/1.1 var(--body);letter-spacing:-.045em;color:var(--mg-text)}
#home .home-bottom .tiny-label{font:750 10px/1.5 var(--body);color:#75819b;letter-spacing:.1em}
#home .underlined-link{color:#5246da;font-weight:750;font-size:13px}
#home .featured-tile{border:1px solid #d8deec;background:#fff;border-radius:12px;box-shadow:none;padding:12px 16px;gap:15px;margin:0 0 14px}
#home .featured-icon{background:#29387f url('covers/tic.svg') center/cover;border:0;width:103px;height:64px;border-radius:8px;flex:0 0 auto}
#home .featured-icon span{visibility:hidden}
#home .featured-tile h3{font:800 17px/1.25 var(--body);margin:2px 0;color:var(--mg-text)}
#home .featured-tile p{font:13px/1.4 var(--body);color:var(--mg-muted)}
#home .tile-tag{font:750 9px/1.4 var(--body);color:#6257ef;letter-spacing:.08em}
#home .featured-tile .pixel-button{background:#6257ef;color:white;border:0;padding:10px 16px;min-width:83px}
#home .mg-section-note{font:14px/1.4 var(--body);color:var(--mg-muted);margin:5px 0 13px}
#home .home-games{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:stretch;margin:0 0 26px}
#home .home-game{display:flex;flex-direction:column;align-items:stretch;padding:0;gap:0;overflow:hidden;position:relative;background:white;border:1px solid #dce3ef;border-radius:10px;box-shadow:0 1px 3px #152c4a08;min-width:0;transition:transform .15s,box-shadow .15s}
#home .home-game:hover{background:white;transform:translateY(-3px);box-shadow:0 7px 18px #20335d20;border-color:#bcb7ff}
#home .home-game-icon{display:block;position:relative;width:100%;height:auto;flex:0 0 auto;aspect-ratio:1.618;background-color:#27385f;background-size:cover;background-position:center;border:0;border-radius:0;font-size:0!important}
#home .home-game-text{display:flex;min-width:0;gap:3px;flex:1;padding:10px 29px 12px 11px;justify-content:center}
#home .home-game strong{font:800 14px/1.25 var(--body);color:var(--mg-text);overflow-wrap:anywhere}
#home .home-game small{font:11px/1.35 var(--body);color:var(--mg-muted)}
#home .home-game-arrow{display:block;position:absolute;right:10px;bottom:12px;color:#7a87a3;font-size:16px}
#home .home-game:first-child,#home .home-game:nth-child(2){grid-column:span 2;grid-row:span 2}
#home .home-game:first-child .home-game-icon,#home .home-game:nth-child(2) .home-game-icon{flex:1;aspect-ratio:auto;min-height:170px}
#home .home-game:first-child .home-game-text,#home .home-game:nth-child(2) .home-game-text{flex:0;padding:14px 32px 15px 15px}
#home .home-game:first-child strong,#home .home-game:nth-child(2) strong{font-size:20px}
#home .home-game:first-child small,#home .home-game:nth-child(2) small{font-size:12px}
#home .home-last-played{background:white;border:1px solid var(--mg-line);border-radius:8px}
#home .home-last-played strong{font:750 10px/1.4 var(--body);color:#6257ef}
#home .home-values{gap:13px;margin-bottom:28px}
#home .home-values>div{background:#f7f9fd;border:1px solid #e0e6f1;padding:17px}
#home .home-values strong{font:750 15px/1.3 var(--body);color:var(--mg-text)}
#home .home-values span{font:700 10px/1.4 var(--body);color:#6257ef}
#home .home-values p{font-size:12px}
#games .page-heading{padding:24px 0 5px}
#games .page-heading .tiny-label{font:750 10px/1.4 var(--body);color:#6257ef;letter-spacing:.12em}
#games .page-heading h1{font:800 clamp(30px,4vw,47px)/1.05 var(--body);letter-spacing:-.048em;margin:8px 0 7px;color:var(--mg-text)}
#games .page-heading h1 br{display:none}#games .page-heading h1 span{color:#6257ef}
#games .page-heading p{font:14px/1.4 var(--body);color:var(--mg-muted)}
#games .library-count{display:inline-block;margin-top:10px;font:750 10px/1.3 var(--body);color:#6257ef}
#games .games-tools{margin:13px 0 17px;gap:10px}
#games .games-search{border:1px solid #d9e1ee;border-radius:9px;max-width:330px;background:white;min-height:41px}
#games .games-filter{border:1px solid #dce3ef;border-radius:7px;font:750 11px/1.3 var(--body);color:#4c5b77;background:white;padding:10px 12px}
#games .games-filter[aria-pressed=true]{background:#6257ef;border-color:#6257ef;color:white}
#games .games-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}
#games .game-card{border:1px solid #dce3ef;border-radius:10px;background:white;overflow:hidden;box-shadow:0 2px 4px #152c4a08;transition:transform .15s,box-shadow .15s}
#games .game-card:hover{transform:translateY(-3px);box-shadow:0 7px 18px #20335d20}
#games .game-cover{background-size:cover;background-position:center;aspect-ratio:1.618;height:auto;isolation:auto;border:0;display:block}
#games .game-cover:before,#games .game-cover:after{display:none!important}
#games .game-cover>*:not(.cover-sticker){visibility:hidden}
#games .cover-sticker{display:none}
#games .game-details{padding:12px;gap:0}
#games .game-details h2{font:800 17px/1.2 var(--body);color:var(--mg-text);margin:8px 0 6px}
#games .card-topline{font:750 9px/1.3 var(--body);color:#697893}
#games .game-details p{font:12px/1.45 var(--body);color:var(--mg-muted);margin-bottom:13px}
#games .favorite-toggle{width:27px;height:27px;right:9px;top:8px;border:1px solid #dce3ef;background:#f6f7fc}
#games .favorite-toggle[aria-pressed=true]{background:#fff1b7}
#games .game-details .pixel-button{background:#edf0ff;color:#4b41cb;border:0;box-shadow:none;font:750 12px/1.3 var(--body);padding:10px 12px;border-radius:7px}
#games .game-details .pixel-button:hover{background:#6257ef;color:#fff}
#games .games-empty{border-color:#dce3ef}
html:not([data-active-view=home]):not([data-active-view=games]) .game-page-header h1,html:not([data-active-view=home]):not([data-active-view=games]) .chess-header h1,html:not([data-active-view=home]):not([data-active-view=games]) .miner-heading h1,html:not([data-active-view=home]):not([data-active-view=games]) .arcade-game-head h1,html:not([data-active-view=home]):not([data-active-view=games]) .extras-header h1{color:#1e2b48}
#mg-mondiad-banner,#mg-mondiad-native{border-color:#dce3ef!important;background:#f7f9fd!important}
@media(max-width:1180px){#games .games-grid{grid-template-columns:repeat(4,minmax(0,1fr))}#home .home-games{grid-template-columns:repeat(4,minmax(0,1fr))}#home .home-game:first-child,#home .home-game:nth-child(2){grid-row:span 1}#home .home-game:first-child .home-game-icon,#home .home-game:nth-child(2) .home-game-icon{aspect-ratio:1.618;flex:0 0 auto}}
@media(max-width:820px){#home .hero-copy{padding:18px 21px}#home .hero-art{height:190px}#home .home-games{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#home .home-game:first-child,#home .home-game:nth-child(2){grid-column:span 1}#home .home-game:first-child .home-game-icon,#home .home-game:nth-child(2) .home-game-icon{min-height:0}#home .home-game:first-child .home-game-text,#home .home-game:nth-child(2) .home-game-text{padding:10px 29px 12px 11px}#home .home-game:first-child strong,#home .home-game:nth-child(2) strong{font-size:14px}#games .games-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.shell{padding-inline:13px}.site-header{height:60px;gap:10px}.logo{font-size:21px}.logo-mark{transform:scale(.8)}.nav{gap:14px}.nav-link{font-size:11px}.header-play{display:none}#home .hero{grid-template-columns:1fr 34%;margin-top:12px;border-radius:10px}#home .hero-copy{padding:15px 12px}#home .hero h1{font-size:25px}#home .hero-copy>p{font-size:12px;margin-bottom:10px}#home .hero-art{height:auto;min-height:158px;background-position:center}#home .hero .pixel-button{font-size:11px;padding:8px 10px}#home .hero .text-link{font-size:11px}#home .hero-cta{gap:8px}#home .home-bottom{padding:19px 0 10px;gap:8px;align-items:end}#home .home-bottom h2{font-size:23px}#home .home-bottom .underlined-link{font-size:10px}#home .featured-tile{padding:9px;flex-wrap:nowrap;gap:9px}#home .featured-icon{width:66px;height:51px}#home .featured-tile .pixel-button{width:auto;min-width:0;padding:8px 10px;margin-left:auto}#home .featured-tile h3{font-size:14px}#home .featured-tile p{font-size:11px}#home .home-games{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#home .home-game strong{font-size:13px}#home .home-game small{font-size:10px}#home .home-game-text{padding:8px 24px 10px 9px}#home .home-game-arrow{right:7px;font-size:14px}#home .home-game:first-child .home-game-text,#home .home-game:nth-child(2) .home-game-text{padding:8px 24px 10px 9px}#games .games-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#games .game-card{flex-direction:column;min-height:0}#games .game-cover{width:100%;flex:0 0 auto;aspect-ratio:1.618;min-height:0}#games .game-details{padding:9px}#games .game-details h2{font-size:14px}#games .game-details p{font-size:11px}#games .game-details .pixel-button{padding:9px;font-size:11px}#games .games-search{max-width:none}#games .games-filter{padding:8px;font-size:10px}}
@media(prefers-reduced-motion:reduce){#home .home-game,#games .game-card{transition:none;transform:none!important}}
#home .home-game[data-view="tictactoe"] .home-game-icon,#games .game-cover.cover-tic{background-image:url('covers/tic.svg')}
#home .home-game[data-mini="lockpick"] .home-game-icon,#games .game-cover.cover-lockpick{background-image:url('covers/lockpick.svg')}
#home .home-game[data-mini="grid-breaker"] .home-game-icon,#games .game-cover.cover-breaker{background-image:url('covers/grid-breaker.svg')}
#home .home-game[data-mini="pin-cracker"] .home-game-icon,#games .game-cover.cover-pin{background-image:url('covers/pin-cracker.svg')}
#home .home-game[data-mini="tile-collapse"] .home-game-icon,#games .game-cover.cover-collapse{background-image:url('covers/tile-collapse.svg')}
#home .home-game[data-mini="rapid-keys"] .home-game-icon,#games .game-cover.cover-keys{background-image:url('covers/rapid-keys.svg')}
#home .home-game[data-mini="word-memory"] .home-game-icon,#games .game-cover.cover-memory{background-image:url('covers/word-memory.svg')}
#home .home-game[data-view="chess"] .home-game-icon,#games .game-cover.cover-chess{background-image:url('covers/chess.svg')}
#home .home-game[data-view="miner"] .home-game-icon,#games .game-cover.cover-miner{background-image:url('covers/miner.svg')}
#home .home-game[data-extra="2048"] .home-game-icon,#games .game-cover.ex-cover-2048{background-image:url('covers/2048.svg')}
#home .home-game[data-extra="snake"] .home-game-icon,#games .game-cover.ex-cover-snake{background-image:url('covers/snake.svg')}
#home .home-game[data-extra="minesweeper"] .home-game-icon,#games .game-cover.ex-cover-minesweeper{background-image:url('covers/minesweeper.svg')}
#home .home-game[data-extra="bricks"] .home-game-icon,#games .game-cover.ex-cover-bricks{background-image:url('covers/bricks.svg')}
#home .home-game[data-extra="sudoku"] .home-game-icon,#games .game-cover.ex-cover-sudoku{background-image:url('covers/sudoku.svg')}
#home .home-game[data-extra="flappy"] .home-game-icon,#games .game-cover.ex-cover-flappy{background-image:url('covers/flappy.svg')}
#home .home-game[data-extra="memory"] .home-game-icon,#games .game-cover.ex-cover-memory{background-image:url('covers/memory.svg')}
#home .home-game[data-extra="reaction"] .home-game-icon,#games .game-cover.ex-cover-reaction{background-image:url('covers/reaction.svg')}
#home .home-game[data-extra="tower"] .home-game-icon,#games .game-cover.ex-cover-tower{background-image:url('covers/tower.svg')}
#home .home-game[data-extra="connect4"] .home-game-icon,#games .game-cover.ex-cover-connect4{background-image:url('covers/connect4.svg')}

/* Keep all illustrated covers centered, including the two featured tiles.
   Older nth-child background shorthands reset size, repeat and position. */
#home .home-games .home-game .home-game-icon,
#games .games-grid .game-card .game-cover,
#home .hero-art,
#home .featured-tile .featured-icon {
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}
