@font-face{font-family:"Chakra Petch";font-weight:600;font-display:swap;src:url(fonts/ChakraPetch-600-latin.woff2) format("woff2")}
@font-face{font-family:"Chakra Petch";font-weight:700;font-display:swap;src:url(fonts/ChakraPetch-700-latin.woff2) format("woff2")}
@font-face{font-family:Barlow;font-weight:400;font-display:swap;src:url(fonts/Barlow-400-latin.woff2) format("woff2")}
@font-face{font-family:Barlow;font-weight:600;font-display:swap;src:url(fonts/Barlow-600-latin.woff2) format("woff2")}

:root{
  --bg:#0b1d36;--bar:#10294a;--panel:#17365f;--panel-hi:#1f4676;
  --text:#ffffff;--muted:#b6c6dc;--rule:#2d4f7e;
  --gold:#ffd23f;--on-gold:#0b1d36;
  --gutter:clamp(12px,2.5vw,28px);--gap:12px;--r:14px;
  --display:"Chakra Petch",system-ui,sans-serif;--body:Barlow,system-ui,sans-serif;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--text);font:400 17px/1.5 var(--body);min-height:100vh}
a{color:inherit;text-decoration:none}
button,input{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.skip{position:absolute;left:-999px;top:8px;background:var(--gold);color:var(--on-gold);padding:8px 16px;border-radius:8px;z-index:50}
.skip:focus{left:8px}

.masthead{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:var(--gutter);
  padding:10px var(--gutter);background:var(--bar);border-bottom:1px solid var(--rule)}
.wordmark{font:700 26px/1 var(--display);letter-spacing:.02em;white-space:nowrap;display:flex;align-items:center;gap:10px}
.wordmark b{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--gold);color:var(--on-gold);font-size:22px}
.find{flex:1;max-width:620px;margin-left:auto;margin-right:auto;position:relative}
.find input{width:100%;height:46px;border-radius:23px;border:2px solid transparent;background:var(--panel);padding:0 18px 0 46px;font-size:17px}
.find input::placeholder{color:var(--muted)}
.find input:focus{outline:none;border-color:var(--gold)}
.find svg{position:absolute;left:15px;top:12px;width:22px;height:22px;fill:none;stroke:var(--muted);stroke-width:2.4;stroke-linecap:round}

.frame{display:grid;grid-template-columns:1fr;gap:var(--gutter);padding:var(--gutter)}
.cats{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
.cats a,.cats button{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 16px;border:0;border-radius:22px;
  background:var(--panel);font:600 16px/1 var(--body);cursor:pointer;white-space:nowrap}
.cats a:hover,.cats button:hover{background:var(--panel-hi)}
.cats [aria-current="true"]{background:var(--gold);color:var(--on-gold)}
.cats small{font-size:13px;opacity:.8}
@media(min-width:900px){
  .frame{grid-template-columns:200px 1fr;align-items:start}
  .cats{position:sticky;top:84px;flex-direction:column;overflow:visible;padding:0}
  .cats a,.cats button{border-radius:12px;justify-content:space-between}
}

h1,h2{font-family:var(--display);margin:0}
.shelf{margin:0 0 36px}
.shelf>h2{font-size:22px;margin-bottom:14px;display:flex;align-items:baseline;gap:12px}
.shelf>h2 small{font:400 15px var(--body);color:var(--muted)}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));grid-auto-flow:dense;gap:var(--gap)}
@media(min-width:700px){.tiles{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}}
.tile{position:relative;display:block;aspect-ratio:1;border-radius:var(--r);overflow:hidden;background:var(--panel);
  transition:transform .15s ease,box-shadow .15s ease}
.tile:hover{transform:scale(1.04);box-shadow:0 0 0 3px var(--gold);z-index:2}
.tile.big{grid-column:span 2;grid-row:span 2}
.tile img,.tile .blank{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.tile .blank{display:grid;place-items:center;font:700 clamp(48px,9vw,88px)/1 var(--display);color:rgba(255,255,255,.92)}
.tile .name{position:absolute;left:0;right:0;bottom:0;padding:22px 10px 9px;
  background:linear-gradient(transparent,rgba(5,14,28,.88));font:700 15px/1.2 var(--display);
  text-shadow:0 1px 2px rgba(0,0,0,.6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tile.big .name{font-size:20px;padding:36px 14px 14px}
.tile .flag{position:absolute;top:8px;left:8px;padding:3px 9px;border-radius:10px;background:var(--gold);color:var(--on-gold);font:700 12px/1.3 var(--display);letter-spacing:.06em}

.none{padding:40px 0;color:var(--muted);font-size:19px}
.none b{color:var(--text)}
.empty{max-width:560px;padding:48px 0}
.empty h1{font-size:32px;margin-bottom:12px}
.empty p{color:var(--muted)}

.stage{max-width:1280px;margin:0 auto;padding:var(--gutter)}
.stage-head{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;margin-bottom:14px}
.stage-head h1{font-size:clamp(24px,4vw,34px);flex:1;min-width:0}
.back{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:22px;background:var(--panel);font-weight:600}
.back:hover{background:var(--panel-hi)}
.screen{position:relative;height:calc(100vh - 150px);height:calc(100dvh - 150px);min-height:360px;width:100%;background:#000;border-radius:var(--r);overflow:hidden}
.screen iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000}
.screen:fullscreen{height:100%;max-height:none;border-radius:0}
.bar{display:flex;gap:12px;align-items:center;margin:14px 0 0;flex-wrap:wrap}
.bar button,.bar a.pill{min-height:44px;padding:0 20px;border:0;border-radius:22px;background:var(--gold);color:var(--on-gold);font:700 16px/1 var(--display);cursor:pointer;display:inline-flex;align-items:center}
.bar button:hover,.bar a.pill:hover{background:#ffe07a}
.bar .about{color:var(--muted);flex:1;min-width:220px;margin:0}
.tag{display:inline-block;padding:2px 12px;border-radius:12px;background:var(--panel);font-size:15px;font-weight:600}
.more{margin-top:40px}
@media(prefers-reduced-motion:reduce){.tile{transition:none}.tile:hover{transform:none}}
@media(max-width:560px){.wordmark .nm{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}

.tile .pl{position:absolute;top:8px;right:8px;padding:3px 9px;border-radius:10px;background:rgba(5,14,28,.82);font:700 12px/1.3 var(--display);letter-spacing:.04em}
.ext{max-width:640px;display:flex;flex-direction:column;gap:12px;align-items:flex-start;padding:8px 0}
.ext p{margin:0}.ext .credit{color:var(--muted)}.ext .sub{color:var(--muted);font-size:15px}
.ext .pill{display:inline-flex;align-items:center;min-height:48px;padding:0 24px;border-radius:24px;background:var(--gold);color:var(--on-gold);font:700 18px var(--display)}
.ext .pill:hover{background:#ffe07a}

.scores{max-width:420px;margin:20px 0 0;padding:14px 18px;background:var(--panel);border-radius:var(--r)}
.scores h2{font-size:20px;margin-bottom:6px}.scores .mine{margin:0 0 6px;font-weight:600}.scores .sub{margin:4px 0;color:var(--muted);font-size:15px}
.scores .tabs{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.scores .tab{font:inherit;font-weight:600;font-size:14px;padding:5px 12px;border-radius:999px;border:1px solid var(--rule);background:transparent;color:inherit;cursor:pointer}.scores .tab[aria-pressed=true]{background:var(--gold);color:var(--on-gold);border-color:transparent}.scores.times{max-width:460px}.scores li b{font-variant-numeric:tabular-nums}
.scores ol{margin:6px 0 0;padding-left:26px}.scores li{padding:2px 0}.scores li span{display:inline-block;min-width:150px}

.fs-exit{display:none;position:absolute;bottom:10px;left:10px;z-index:5;min-height:36px;padding:0 14px;border:0;border-radius:18px;background:rgba(5,14,28,.8);color:#fff;font:700 14px var(--display);cursor:pointer;opacity:.55}
.fs-exit:hover{opacity:1}
.screen:fullscreen .fs-exit{display:block}
/* the game's own Chat button sits bottom left (mcchat.js), so Exit starts to its right */
/* full screen: the game fills the whole screen (no black strip); the Exit and Report-a-bug buttons are small and float in the bottom corners, faint until pointed at */
.screen:fullscreen iframe{inset:0;height:100%}
.screen:fullscreen .fs-exit{bottom:6px;left:66px;min-height:30px;padding:0 12px;font-size:13px;opacity:.4}
.screen:fullscreen .fs-exit:hover,.screen:fullscreen .fs-exit:focus-visible{opacity:1}
/* car games: speedo, gauges and help panels fill both bottom corners, so Exit and Report a bug stack on the right edge below the buttons and above the pedals */
.screen.cars:fullscreen .fs-exit{bottom:auto;left:auto;right:6px;top:calc(60% - 34px)}
.screen.cars:fullscreen .fs-bug{bottom:auto;right:6px;top:calc(60% + 4px)}
/* touch screens: both sides carry the on-screen pads and buttons, so the pair is stacked just left of the bottom centre, between the pads and above the hint line */
/* touch screens: the game's own Chat button sits bottom left and the pad bottom right, so Exit goes bottom centre */
@media(pointer:coarse){.screen:fullscreen button.fs-exit{left:calc(50% - 62px)}.screen:fullscreen button.fs-bug{right:auto;left:calc(50% + 4px)}}        /* 2026-11-18: moved right so the pair no longer covers the pad's down arrow (x 72-128) */
@media(pointer:coarse){.screen.cars:fullscreen .fs-exit{top:auto;bottom:80px;left:calc(50% - 125px);right:auto}.screen.cars:fullscreen .fs-bug{top:auto;bottom:44px;left:calc(50% - 125px);right:auto}}
/* not in full screen: the Friends button and the live player count are fixed to the right edge, so the game leaves room for them instead of sitting under them */
@media (min-width:601px){.screen:not(:fullscreen){width:calc(100% - 170px)}}
@media (max-width:600px){.screen:not(:fullscreen){height:calc(100vh - 166px);height:calc(100dvh - 166px);min-height:300px}}
.mast-links{display:flex;gap:8px;margin-left:auto}
.sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@media(max-width:560px){.masthead{flex-wrap:wrap}.find{order:2;flex:1 1 140px}.mast-links{order:3;width:100%;margin:0;justify-content:center;gap:6px}.mast-links a{padding:0 14px;flex:0 1 auto}}
.mast-links a{display:flex;align-items:center;min-height:40px;padding:0 16px;border-radius:20px;font:600 16px/1 var(--body);background:var(--panel)}
.mast-links a:hover{background:var(--panel-hi)}
.mast-links a[aria-current]{background:var(--gold);color:var(--on-gold)}

.legal{max-width:760px;margin:0 auto;padding:28px var(--gutter) 40px}
.legal h1{font:700 34px/1.15 var(--display);margin:0 0 6px}
.legal h2{font:700 22px/1.25 var(--display);margin:30px 0 8px}
.legal .updated{color:var(--muted);margin:0 0 8px}
.legal ul{padding-left:22px}.legal li{margin:6px 0}
.legal a,.foot a{text-decoration:underline;text-underline-offset:3px}
.legal code{background:var(--panel);padding:1px 6px;border-radius:6px;font-size:15px}
.foot{border-top:1px solid var(--rule);padding:18px var(--gutter) 26px;color:var(--muted);font-size:15px}
.foot p{margin:0;max-width:1400px}

.seek{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#0b1d36;color:#fff;text-align:center;padding:16px}
.seek h2{margin:0;font:800 clamp(24px,4vw,36px) var(--display)}
.seek p{margin:0;font-size:18px}
.seek button{min-height:44px;padding:0 20px;border:0;border-radius:22px;background:#ffd23f;color:#0b1d36;font:700 16px var(--display);cursor:pointer}
.tile .on{position:absolute;top:8px;left:8px;padding:3px 9px;border-radius:10px;background:rgba(5,14,28,.82);color:#c9d3e0;font:700 12px/1.3 var(--display)}
.tile .flag~.on{top:36px}
.tile .on.live,.on-head.live{color:#7dffa8}
.on-head{padding:3px 10px;border-radius:12px;background:rgba(5,14,28,.82);color:#c9d3e0;font:700 14px var(--display)}
.doc{max-width:760px;margin:0 auto;padding:28px var(--gutter) 40px}
.doc h1{font-size:clamp(28px,5vw,40px);margin:0 0 14px}.doc h2{margin:28px 0 8px}.doc p{line-height:1.6}
.gl{list-style:none;padding:0;columns:2 280px;column-gap:28px}.gl li{padding:5px 0;break-inside:avoid}.gl span{color:var(--muted);font-size:14px}
.about-game,.about-site{max-width:900px;margin:0 auto;padding:8px var(--gutter) 26px;color:var(--muted);font-size:15px;line-height:1.6}
.about-game h2,.about-site h2{font-size:18px;color:inherit}.all-az summary{cursor:pointer;margin:8px 0}

.playtime{margin:10px 0 0;font-size:14px;opacity:.75;font-variant-numeric:tabular-nums}
.tile .ptime{position:absolute;right:6px;bottom:30px;padding:2px 7px;border-radius:10px;background:rgba(0,0,0,.72);color:#fff;font-size:11px;font-weight:600}
.livenone{margin:6px 0 0;color:#b6c6dc;font-size:14px}
.on[hidden],.on-head[hidden]{display:none}

/* touch screens: text links get a finger-sized row without changing how they look */
@media(pointer:coarse){
  .gl li a{display:inline-block;padding:11px 0}
  .mast-links a,.wordmark{display:inline-flex;align-items:center;min-height:40px}
  .foot p{line-height:2.6}
  .foot a,.about-site a{padding:6px 2px}
}

/* landscape-only games on a phone held upright: cover the game with a turn-your-phone screen (the Exit and Report a bug tabs stay above it) */
.turn{display:none}
@media(orientation:portrait) and (pointer:coarse) and (max-width:700px){
.screen.land .turn{display:flex;position:absolute;inset:0;z-index:4;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px;text-align:center;background:#050e1c;color:#fff}
.turn-ico{font-size:72px;line-height:1;animation:turn-tilt 2.4s ease-in-out infinite}
.turn p{margin:0;font:700 20px var(--display)}
}
@keyframes turn-tilt{0%,25%{transform:rotate(0)}60%,100%{transform:rotate(-90deg)}}
@media(prefers-reduced-motion:reduce){.turn-ico{animation:none}}

/* game page (the one with #screen): a slim top so the game gets the screen. Logo strip, header and title row are all shorter, the header no longer sticks, the phone header is one row */
body:has(#screen) #fnd-bar{padding:2px 12px!important}
body:has(#screen) #fnd-bar img{height:22px!important;width:auto!important}
body:has(#screen) .masthead{position:static;padding:5px var(--gutter);gap:12px}
body:has(#screen) .wordmark{font-size:20px;gap:8px}
body:has(#screen) .wordmark b{width:28px;height:28px;font-size:17px;border-radius:8px}
body:has(#screen) .find input{height:34px;font-size:15px;padding-left:38px}
body:has(#screen) .find svg{left:12px;top:8px;width:18px;height:18px}
body:has(#screen) .mast-links a{min-height:32px;padding:0 14px;font-size:15px}
body:has(#screen) .stage{padding-top:6px;padding-bottom:var(--gutter)}
body:has(#screen) .stage-head{gap:6px 12px;margin-bottom:6px;flex-wrap:nowrap}
body:has(#screen) .stage-head h1{font-size:clamp(18px,2.4vw,24px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:has(#screen) .stage-head .back{min-height:32px;padding:0 12px;font-size:15px}
body:has(#screen) .stage-head .tag{padding:1px 10px;font-size:13px;flex:none}
body:has(#screen) .screen{height:calc(100vh - 130px);height:calc(100dvh - 130px)}
@media(max-width:560px){
  body:has(#screen) .masthead{flex-wrap:nowrap}
  body:has(#screen) .find{order:0;flex:1 1 auto}
  body:has(#screen) .mast-links{display:none}
  body:has(#screen) .stage-head .tag{display:none}
  body:has(#screen) .screen{height:calc(100vh - 120px);height:calc(100dvh - 120px)}
}
.about-game h3{font-size:16px;color:inherit;margin:18px 0 6px}.about-game ul{padding-left:22px}.about-game li{margin:4px 0}
