/* Dusk Arcade - site styles, "Today".
   A white page of big, rounded story cards: full-bleed game art, chunky coral pill buttons that sit on a hard "lip",
   calm Manrope type and one coral accent. Motion is light (cards lift, art zooms slowly, buttons press onto their lip,
   the chest pops) and only ever animates transform and opacity. Under prefers-reduced-motion everything is still.
   Order: fonts, tokens, looks, base, buttons, header and tab bar, home, tiles, progress parts, game page, badges and
   events, content pages, footer, celebrations, motion, reduced motion. */

@font-face{font-family:"Manrope";font-weight:500;font-style:normal;font-display:swap;src:url("../fonts/manrope-500.woff2") format("woff2")}
@font-face{font-family:"Manrope";font-weight:600;font-style:normal;font-display:swap;src:url("../fonts/manrope-600.woff2") format("woff2")}
@font-face{font-family:"Manrope";font-weight:700;font-style:normal;font-display:swap;src:url("../fonts/manrope-700.woff2") format("woff2")}
@font-face{font-family:"Manrope";font-weight:800;font-style:normal;font-display:swap;src:url("../fonts/manrope-800.woff2") format("woff2")}

:root{
  color-scheme:light;
  --ink:#111322;           /* text: 17:1 on white */
  --mute:#646a80;          /* secondary text: 5.4:1 on white, 4.9:1 on --soft */
  --soft:#f4f5f8;          /* quiet fills */
  --soft-2:#eceef3;        /* ring tracks, pressed fills */
  --line:#e7e8ee;          /* hairlines */
  --acc:#ff5a3c;           /* the coral accent: rings, bars, flame, today */
  --acc-btn:#d93d22;       /* coral behind white text: 4.5:1 */
  --acc-ink:#c8361c;       /* coral text on white: 5.3:1 */
  --acc-soft:#ffe9e3;      /* played days, soft coral fills */
  --acc2:#ffb347;
  --gold:#b07a00;          /* medal icons on white */
  --ok:#15803d;            /* success text: 5:1 */
  --bad:#c0202d;           /* error text: 5.9:1 */
  --font:"Manrope",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --r:28px;
  --r-md:22px;
  --r-sm:16px;
  --lip:#a82a14;           /* the hard shadow under a coral button */
  --ease:cubic-bezier(.2,.8,.2,1);
  --spring:cubic-bezier(.34,1.4,.64,1);
  --gutter:32px;
  --tabbar:0px;
  --shadow:0 1px 2px rgba(17,19,34,.04),0 8px 24px rgba(17,19,34,.06);
  --z-raised:10;--z-header:50;--z-toast:60;--z-top:100;
}
@media (max-width:760px){:root{--gutter:16px;--r:24px;--r-md:20px;--r-sm:12px;--tabbar:calc(68px + env(safe-area-inset-bottom))}}

/* Profile looks: the level ring and the streak chip wear the visitor's chosen colours (me.js sets data-look on
   <html>; Coral needs nothing, so the default never flashes). Every ink colour is 4.5:1 or better on its fill. */
:root,[data-look="coral"]{--look:#ff5a3c;--look-ring:#ff5a3c;--look-soft:#ffe9e3;--look-ink:#c8361c}
[data-look="mint"]{--look:#14b8a6;--look-ring:#14b8a6;--look-soft:#dcf7f1;--look-ink:#0f6b63}
[data-look="sky"]{--look:#0ea5e9;--look-ring:#0ea5e9;--look-soft:#e0f2fe;--look-ink:#03649a}
[data-look="grape"]{--look:#7c5cff;--look-ring:#7c5cff;--look-soft:#ede9fe;--look-ink:#5b21b6}
[data-look="rose"]{--look:#e0457b;--look-ring:#e0457b;--look-soft:#fde7ef;--look-ink:#a8174f}
[data-look="gold"]{--look:#f5a524;--look-ring:#f5a524;--look-soft:#fff4d6;--look-ink:#7a4f00}
[data-look="night"]{--look:#3b3f8f;--look-ring:#3b3f8f;--look-soft:#23264d;--look-ink:#ffd166}
[data-look="rainbow"]{--look:#7c5cff;--look-ring:url(#look-rainbow);--look-soft:linear-gradient(90deg,#ffe9e3,#fff4d6,#dcf7f1,#e0f2fe,#ede9fe);--look-ink:#4c1d95}
.defs{position:absolute;width:0;height:0;overflow:hidden}

/* ------------------------------------------------------------ base */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:#fff;scroll-padding-top:24px}
body{margin:0;background:#fff;color:var(--ink);font:500 15px/1.5 var(--font);min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;overflow-x:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding-bottom:var(--tabbar)}
main{flex:1 0 auto;display:block}
main:focus{outline:none}
img,svg,video{display:block;max-width:100%}
img{height:auto}
h1,h2,h3,h4{margin:0;line-height:1.15;font-weight:800;letter-spacing:-.02em;text-wrap:balance}
p,dl,dd{margin:0}
ul,ol{margin:0;padding:0}
a{color:inherit;text-decoration-thickness:1.5px;text-underline-offset:.18em}
button,input{font:inherit;color:inherit}
:focus-visible{outline:2.5px solid var(--ink);outline-offset:3px;border-radius:10px}
.icon{width:20px;height:20px;flex:none}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.muted{color:var(--mute)}
[hidden]{display:none!important}

.wrap{width:100%;max-width:calc(1280px + 2 * var(--gutter));margin:0 auto;padding:0 max(var(--gutter),env(safe-area-inset-right)) 0 max(var(--gutter),env(safe-area-inset-left))}
.narrow{max-width:calc(820px + 2 * var(--gutter))}
.skip-link{position:absolute;left:var(--gutter);top:-100px;z-index:var(--z-top);background:var(--ink);color:#fff;font-weight:700;padding:10px 18px;border-radius:999px;text-decoration:none}
.skip-link:focus{top:12px}

.eyebrow{font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.eyebrow--dark{color:var(--mute)}

/* ------------------------------------------------------------ buttons
   Chunky pills that sit on a hard "lip" shadow and press down onto it. */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:0 24px;border:0;border-radius:999px;background:#fff;color:var(--ink);font:800 16px/1 var(--font);text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;box-shadow:0 4px 0 var(--soft-2),inset 0 0 0 1.5px var(--line);transition:transform .15s var(--ease)}
.btn .icon{width:18px;height:18px}
.btn-acc,.btn-primary{min-height:52px;background:var(--acc-btn);color:#fff;box-shadow:0 6px 0 var(--lip),0 14px 24px -8px rgba(217,61,34,.55)}
.btn-acc:hover,.btn-primary:hover{background:#c8361c}
.btn-soft,.btn-quiet{background:var(--soft);box-shadow:0 4px 0 var(--soft-2)}
.btn-soft:hover,.btn-quiet:hover{background:var(--soft-2)}
.btn-white{background:#fff;color:var(--acc-btn);box-shadow:0 5px 0 rgba(0,0,0,.2)}
.btn-glass{background:rgba(255,255,255,.18);color:#fff;box-shadow:none}
.btn-glass:hover{background:rgba(255,255,255,.26)}
.btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--soft-2),inset 0 0 0 1.5px var(--line)}
.btn-acc:active,.btn-primary:active{box-shadow:0 3px 0 var(--lip)}
.btn-white:active{box-shadow:0 2px 0 rgba(0,0,0,.2)}
.btn-soft:active,.btn-quiet:active{box-shadow:0 1px 0 var(--soft-2)}
.btn-glass:active{box-shadow:none}
.btn:disabled{cursor:not-allowed;opacity:.55;transform:none}
/* Parts that need JavaScript (Open, Share, the sound switch) are hidden without it, with a note where it matters. */
.nojs-note{display:none}
@media (scripting:none){.js-only{display:none!important}.nojs-note{display:block}}

/* ------------------------------------------------------------ header */
.site-header{position:relative;z-index:var(--z-header);background:#fff;view-transition-name:site-header}
.header-in{display:flex;align-items:center;gap:28px;height:72px}
.footer-in{--inset:max(var(--gutter),env(safe-area-inset-left));background:linear-gradient(var(--line),var(--line)) no-repeat;background-position:var(--inset) 0;background-size:calc(100% - 2 * var(--inset)) 1px}
.brand{display:inline-flex;align-items:center;gap:10px;min-height:44px;color:var(--ink);text-decoration:none;border-radius:12px}
.logo-mark{width:28px;height:28px;flex:none}
.brand-name{font:800 18px/1 var(--font);letter-spacing:-.02em;white-space:nowrap}
.site-nav{display:flex;gap:4px}
.nav-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 15px;border-radius:999px;color:var(--mute);font-weight:700;font-size:14.5px;text-decoration:none}
.nav-link:hover{color:var(--ink);background:var(--soft)}
.nav-link[aria-current="page"]{color:var(--ink);background:var(--soft)}
.nav-icon{display:none}
.hd-r{margin-left:auto;display:flex;align-items:center;gap:10px}
.chip{position:relative;display:inline-flex;align-items:center;gap:7px;height:44px;margin:0;padding:0 15px;border-radius:999px;background:var(--soft);color:var(--mute);font-weight:800;font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap;text-decoration:none}
.chip-svg{width:18px;height:18px}
.chip-gift{background:#fff4d6;color:#7a4f00}
a.chip-gift:hover{background:#ffeab0}
.chip-gift.is-ready::after{content:"";position:absolute;top:-1px;right:-1px;width:12px;height:12px;border-radius:50%;background:var(--acc);border:2px solid #fff}
.streak{cursor:default}
.streak.is-on{background:var(--look-soft);color:var(--look-ink)}
.lvl{position:relative;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--ink);text-decoration:none}
.lvl-ring{position:absolute;inset:2px;width:40px;height:40px}
.lvl-num{position:relative;font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.ring{transform:rotate(-90deg);overflow:visible}
.ring circle{fill:none}
.ring-track{stroke:var(--soft-2)}
.ring-fill{stroke:var(--acc);stroke-linecap:round}
.lvl-ring .ring-fill,.me-svg .ring-fill,.me-card-svg .ring-fill,.levelup-svg .ring-fill{stroke:var(--look-ring)}
.ring-fill[stroke-dasharray^="0.0 "]{opacity:0} /* no stray dot at zero */

/* Phones: logo and the three chips on top; the nav becomes the tab bar at the bottom of the screen. */
@media (max-width:760px){
  .header-in{height:60px;gap:10px}
  .brand-name{font-size:16px}
  .hd-r{gap:6px}
  .chip{height:40px;padding:0 11px;font-size:13px;gap:5px}
  .chip-svg{width:16px;height:16px}
  .lvl{width:40px;height:40px}
  .lvl-ring{inset:2px;width:36px;height:36px}
  .site-nav{position:fixed;left:0;right:0;bottom:0;z-index:var(--z-header);display:grid;grid-template-columns:repeat(4,1fr);gap:0;padding:6px max(6px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));background:rgba(255,255,255,.94);border-top:1px solid var(--line);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px)}
  .nav-link{flex-direction:column;justify-content:center;gap:4px;min-height:54px;padding:0 4px;border-radius:14px;font-size:11.5px}
  .nav-link:hover,.nav-link[aria-current="page"]{background:none}
  .nav-link[aria-current="page"]{color:var(--acc-ink);font-weight:800}
  .nav-link[aria-current="page"] .nav-icon{stroke-width:2.4}
  .nav-icon{display:block;width:22px;height:22px}
  .is-locked .site-nav{display:none}
}
@media (max-width:389px){.brand-name{display:none}.chip-gift .chip-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}

/* ------------------------------------------------------------ sections */
.section{padding-top:48px}
.section-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin-bottom:16px}
.section-title{font-size:24px}
.section-link,.section-note{color:var(--mute);font-weight:700;font-size:14px;text-decoration:none}
.section-link{display:inline-flex;align-items:center;min-height:44px}
.section-link:hover{color:var(--ink);text-decoration:underline}
@media (max-width:760px){.section{padding-top:32px}.section-title{font-size:21px}.section-head{margin-bottom:12px}}

/* ------------------------------------------------------------ home: "Today" */
.home-head{margin:18px 0 20px}
.home-date{min-height:20px;color:var(--mute);font-size:14px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.home-title{font-size:44px;letter-spacing:-.03em}
@media (max-width:760px){.home-head{margin:10px 0 14px}.home-title{font-size:32px}.home-date{font-size:12.5px;min-height:18px}}

.feed{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
@media (min-width:641px){.feed{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}}
@media (min-width:1024px){.feed{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}}

/* A story card: full-bleed art, the title on a dark scrim at the top, a frosted bar with Play at the bottom. */
.story{position:relative;aspect-ratio:4/5;border-radius:var(--r);overflow:hidden;background:#141625;color:#fff;isolation:isolate;box-shadow:0 18px 40px -22px rgba(17,19,34,.55)}
@media (min-width:641px){.story{aspect-ratio:3/4}.story--big{grid-column:span 2;aspect-ratio:auto;min-height:100%}}
@media (min-width:641px) and (max-width:1023px){.story--big{aspect-ratio:16/10}}
.story-link{position:absolute;inset:0;display:block;color:inherit;text-decoration:none;border-radius:inherit}
.story-link:focus-visible{outline:3px solid #fff;outline-offset:-7px;border-radius:calc(var(--r) - 4px)}
.story:has(.story-link:focus-visible){box-shadow:0 0 0 3px var(--ink)}
.story-art,.story-art picture{position:absolute;inset:0;display:block}
.story-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.story-art::after{content:"";position:absolute;inset:0;background:linear-gradient(rgba(8,8,22,.8),rgba(8,8,22,.5) 26%,rgba(8,8,22,0) 50%)}
.story-top{position:absolute;left:24px;right:24px;top:22px;z-index:1;text-shadow:0 1px 12px rgba(8,8,22,.45)}
.story-top .eyebrow{display:block;opacity:.92}
.story-title{margin:6px 0;font-size:34px;letter-spacing:-.025em;line-height:1.05}
.story--big .story-title{font-size:52px}
.story-line{display:block;max-width:34em;font-size:15px;font-weight:600;opacity:.92}
.story-bot{position:absolute;left:0;right:0;bottom:0;z-index:1;display:flex;align-items:center;gap:12px;padding:14px 18px;background:rgba(20,20,34,.62);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.story-thumb{flex:none;width:44px;height:44px;border-radius:11px;object-fit:cover}
.story-meta{flex:1;min-width:0;line-height:1.3}
.story-meta b{display:block;font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.story-meta small{display:block;font-size:12.5px;font-weight:600;opacity:.86;font-variant-numeric:tabular-nums}
.pill{flex:none;display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 18px 0 14px;border-radius:999px;background:#fff;color:var(--acc-btn);font-weight:800;font-size:14px;box-shadow:0 3px 0 rgba(0,0,0,.22)}
.pill .icon{width:13px;height:13px}
.story-goal{position:absolute;left:0;right:0;bottom:0;z-index:2;height:4px}
.story-goal .bar{height:4px;border-radius:0;background:rgba(255,255,255,.22)}
.story-goal .bar-fill{border-radius:0;background:#ffd166}
.story-chip{position:absolute;right:16px;top:18px;z-index:2;display:inline-flex;align-items:center;gap:4px;padding:5px 11px 5px 8px;border-radius:999px;background:#fff;color:var(--ok);font-size:12.5px;font-weight:800}
.story-chip .icon{width:15px;height:15px}
@media (max-width:760px){
  .story-top{left:18px;right:18px;top:18px}
  .story-title,.story--big .story-title{font-size:32px}
  .story-line{font-size:14px}
  .story-bot{padding:12px 14px}
}
@media (min-width:641px) and (max-width:1023px){.story-title{font-size:28px}.story--big .story-title{font-size:42px}}

/* Today's challenge: a coral card (white text 4.5:1 or better everywhere on it). */
.daily{position:relative;display:flex;flex-direction:column;min-height:300px;padding:24px;border-radius:var(--r);overflow:hidden;background:linear-gradient(160deg,#d93d22,#b02a14);color:#fff;isolation:isolate}
@media (min-width:641px){.daily{aspect-ratio:3/4}}
.daily-mark{position:absolute;right:-8px;top:56px;z-index:-1;font-size:240px;font-weight:800;line-height:1;letter-spacing:-.06em;opacity:.12;pointer-events:none}
.daily-title{margin:8px 0;font-size:34px;letter-spacing:-.025em;line-height:1.08}
.daily-sub{font-weight:600}
.daily-prog{display:flex;align-items:center;gap:10px;margin-top:16px}
.daily-prog > span:first-child{flex:1}
.daily .bar{height:8px;background:rgba(255,255,255,.25)}
.daily .bar-fill{background:#fff}
.daily-count{font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
.daily-foot{margin-top:auto;padding-top:16px;font-weight:700;font-size:14px}
.daily-row{display:flex;gap:10px;margin-top:14px;padding-bottom:5px}
.daily-play{flex:1}
.daily-share{flex:none;width:52px;min-height:52px;padding:0}
.daily-share-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.daily.is-done .daily-row{flex-direction:row-reverse}
.daily.is-done .daily-share{flex:1;width:auto;padding:0 22px;background:#fff;color:var(--acc-btn);box-shadow:0 5px 0 rgba(0,0,0,.2)}
.daily.is-done .daily-share-text{position:static;width:auto;height:auto;clip:auto}
.daily.is-done .daily-play{flex:none;width:52px;padding:0;background:rgba(255,255,255,.18);color:#fff;box-shadow:none}
.daily.is-done .daily-play [data-ch-go-text]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.share-field{width:100%;margin-top:12px;padding:10px 12px;border:0;border-radius:12px;background:#fff;color:var(--ink);font:600 13px/1.4 var(--font)}
@media (max-width:760px){.daily{padding:22px 20px}.daily-title{font-size:30px}.daily-mark{font-size:180px;top:40px}}
@media (min-width:641px) and (max-width:1023px){.daily-title{font-size:28px}}

/* The daily gift chest. */
.chest-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:28px 24px;border:1.5px solid #ffe2a8;border-radius:var(--r);background:linear-gradient(160deg,#fff8e6,#ffeadb);text-align:center;overflow:hidden}
@media (min-width:641px) and (max-width:1023px){.chest-card{grid-column:span 2}}
@media (min-width:1024px){.chest-card{aspect-ratio:3/4}}
.chest{position:relative;width:140px;height:140px;margin:4px 0 14px;transform:rotate(-6deg)}
.chest::before{content:"";position:absolute;inset:-22px;border-radius:50%;background:radial-gradient(circle,rgba(255,201,77,.55),rgba(255,201,77,0) 65%)}
.chest-rays{position:absolute;inset:-46px;border-radius:50%;background:repeating-conic-gradient(rgba(255,201,77,0) 0deg 12deg,rgba(255,190,60,.5) 12deg 20deg);-webkit-mask:radial-gradient(circle,#000 30%,transparent 70%);mask:radial-gradient(circle,#000 30%,transparent 70%);opacity:0;transform:scale(.5)}
.chest-base{position:absolute;left:13px;right:13px;bottom:13px;height:66px;border-radius:14px 14px 22px 22px;background:linear-gradient(#f5a524,#d97a06);box-shadow:inset 0 -13px 0 rgba(0,0,0,.14)}
.chest-lid{position:absolute;left:6px;right:6px;top:22px;height:53px;border-radius:30px 30px 9px 9px;background:linear-gradient(#ffc94d,#f5a524);box-shadow:inset 0 6px 0 rgba(255,255,255,.5);transform-origin:12% 100%}
.chest-lock{position:absolute;left:50%;top:60px;width:30px;height:34px;margin-left:-15px;border-radius:9px;background:#fff7df;box-shadow:0 0 0 5px #8a5a00}
.chest-card.is-open .chest-lid{transform:translate(-10px,-28px) rotate(-24deg)}
.chest-card.is-open .chest-lock{transform:translateY(6px) scale(.9)}
.chest-card.is-open .chest-rays{opacity:1;transform:none}
.chest-kicker{color:#a8280f}
.chest-title{font-size:30px;letter-spacing:-.02em}
.chest-text{max-width:300px;color:#4f5468;font-weight:600}
.chest-card .btn{margin-top:10px;min-width:180px}
.chest-card .chest-double{min-width:0;max-width:100%;white-space:normal;text-align:center}
.chest-card .chest-double .icon{width:16px;height:16px}
.chest-card .nojs-note{color:#4f5468;font-weight:700}
@media (max-width:760px){.chest{width:120px;height:120px;transform:rotate(-6deg) scale(.86)}.chest-title{font-size:26px}}

/* Under the feed: the weekly event and this week (or the Sunday gift). */
.strip{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:22px}
@media (min-width:900px){.strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
.t-card{display:flex;align-items:center;gap:14px;min-width:0;padding:16px;border:1.5px solid var(--line);border-radius:var(--r-md);background:#fff;color:inherit;text-decoration:none}
a.t-card:hover{border-color:#d6d8e1}
.t-img{flex:none;width:64px;height:64px;border-radius:16px;object-fit:cover;background:var(--soft)}
.t-body{display:block;flex:1;min-width:0}
.t-kicker{display:block;margin-bottom:3px;color:var(--acc-ink);font-size:11px}
.t-kicker .is-done,[data-gift-note].is-ready{color:var(--ok)}
.t-title{font-size:17px;letter-spacing:-.01em}
.t-card .bar{margin:8px 0 6px;height:8px}
.t-sub{display:block;color:var(--mute);font-size:13px;font-variant-numeric:tabular-nums}
.t-week .cal{margin-top:8px;gap:5px}
.t-week .cal-box{height:28px}
.t-week .cal-day{margin-top:3px}
.t-gift-btn{flex:none;min-height:48px}

/* "Almost yours" */
.near-list{list-style:none;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
@media (min-width:900px){.near-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}}
.nb{display:flex;gap:12px;align-items:center;height:100%;padding:14px;border-radius:20px;background:var(--soft);color:inherit;text-decoration:none}
.nb:hover{background:var(--soft-2)}
.nb .bd-icon{flex:none;width:48px;height:48px;margin:0}
.nb .bd-icon .icon{width:22px;height:22px}
.nb-body{flex:1;min-width:0}
.nb-name{display:block;font-weight:800;font-size:15px}
.nb .bar{margin:6px 0 4px;height:7px;background:#fff}
.nb-line{display:block;color:var(--mute);font-size:12.5px;font-weight:600;font-variant-numeric:tabular-nums}

/* Card labels (Events page): a small uppercase heading with its status on the right. */
.lbl{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.lbl h2,.lbl h3{font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--mute)}
.lbl span{font-size:12.5px;font-weight:800;color:var(--acc-ink);white-space:nowrap}
.lbl span.is-done{color:var(--ok)}
.lbl h2 span{font-size:inherit;color:inherit}
.evh-art picture,.player-stage picture{display:contents}

/* A thin progress bar: the fill is a transform (scaleX by --p). */
.bar{position:relative;display:block;height:6px;border-radius:9px;background:var(--soft-2);overflow:hidden}
.bar-fill{position:absolute;inset:0;display:block;border-radius:9px;background:var(--acc);transform-origin:0 50%;transform:scaleX(var(--p,0));transition:transform .9s var(--ease)}

/* This week: Monday to Sunday. */
.cal{list-style:none;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;text-align:center}
.cal-cell{min-width:0}
.cal-box{display:grid;place-items:center;height:32px;border-radius:9px;background:var(--soft);color:var(--mute)}
.cal-box .icon{width:14px;height:14px}
.cal-day{display:block;margin-top:5px;font-size:11px;font-weight:700;color:var(--mute);white-space:nowrap}
.is-played .cal-box{background:var(--acc-soft);color:var(--acc-ink)}
.is-today .cal-box{background:var(--acc);color:#fff}
.is-today .cal-day{color:var(--ink)}
.is-frozen .cal-box{background:#e0f2fe;color:#03649a}
.is-gift .cal-box{background:#fff;border:1.5px dashed #c9ccd8;color:var(--gold)}
.is-gift.is-played .cal-box{border-color:#f3b6a8}
.is-gift.is-ready .cal-box{border:0;background:linear-gradient(135deg,var(--acc2),var(--acc));color:#fff}
.is-gift.is-claimed .cal-box{border:0;background:var(--acc-soft);color:var(--acc-ink)}
.cal-gift{display:block;width:100%;padding:0;border:0;background:none;cursor:pointer;border-radius:10px}
.cal-gift:hover .cal-box{filter:brightness(1.05)}
[data-gift-note].is-ready{color:var(--acc-ink)}

/* ------------------------------------------------------------ game rows (Top 50 page) */
.jb-list{list-style:none;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
@media (min-width:640px){.jb-list--top{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media (min-width:1000px){.jb-list--top{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}}
.jb{display:flex;gap:14px;align-items:center;height:100%;padding:12px;border:1.5px solid var(--line);border-radius:var(--r-md);color:inherit;text-decoration:none;background:#fff;transition:transform .25s var(--ease)}
.jb:hover{border-color:#d6d8e1}
.jb-img{flex:none;width:120px;aspect-ratio:4/3;height:auto;border-radius:12px;object-fit:cover;background:var(--soft)}
.jb-text{flex:1;min-width:0}
.jb-title{display:block;font-size:16px;font-weight:800}
.jb-meta{display:block;color:var(--mute);font-size:13px}
.jb-next{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:12.5px;font-weight:700}
.jb-next .icon{width:15px;height:15px;color:var(--gold)}
.jb-play{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--soft)}
.jb-play .icon{width:16px;height:16px}
.jb:hover .jb-play{background:var(--acc-btn);color:#fff}
@media (max-width:760px){.jb-img{width:88px}}

/* ------------------------------------------------------------ tiles */
.tile-grid{list-style:none;display:grid;gap:20px 12px;grid-template-columns:repeat(3,minmax(0,1fr))}
@media (min-width:1100px){.tile-grid--grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}}
@media (min-width:1100px){.tile-grid--row{grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}}
@media (min-width:761px) and (max-width:1099px){.tile-grid{gap:24px 18px}}
.tile{min-width:0}
.tile-link{display:block;color:inherit;text-decoration:none;border-radius:var(--r-sm)}
.tile-link:focus-visible{outline-offset:4px}
.tile-media{position:relative;display:block;aspect-ratio:3/4;border-radius:var(--r-sm);overflow:hidden;background:var(--soft);isolation:isolate}
.tile-grid--row .tile-media{aspect-ratio:4/3}
.tile-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease)}
.tile-title{margin-top:10px;font-size:16px;letter-spacing:-.01em}
.tile-genre{display:block;color:var(--mute);font-size:13px}
.tile-chip{position:absolute;left:8px;bottom:8px;z-index:1;display:inline-flex;align-items:center;gap:4px;max-width:calc(100% - 16px);padding:4px 9px;border-radius:999px;background:rgba(255,255,255,.94);font-size:12px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chip-icon{width:13px;height:13px;color:var(--gold)}
@media (max-width:760px){.tile-title{font-size:14px;margin-top:6px}.tile-genre{font-size:12.5px}.tile-chip{left:5px;bottom:5px;padding:3px 7px;font-size:11px}}

/* ------------------------------------------------------------ badges */
.bd-icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 8px;border-radius:50%;color:#fff;position:relative}
.bd-icon .icon{width:26px;height:26px}
.is-locked .bd-icon{background:var(--soft) !important;color:#7d8399}
.tone-1{background:linear-gradient(135deg,#ffb347,#ff5a3c)}
.tone-2{background:linear-gradient(135deg,#38e1ff,#7c5cff)}
.tone-3{background:linear-gradient(135deg,#7bd88f,#2bb3a0)}
.tone-4{background:linear-gradient(135deg,#ffd166,#7c5cff)}
.tone-5{background:linear-gradient(135deg,#ff7a45,#4cc9f0)}
.tone-6{background:linear-gradient(135deg,#ff8fb1,#e0457b)}
.tone-7{background:linear-gradient(135deg,#ffcf5c,#ff5a3c)}
.tone-8{background:linear-gradient(135deg,#9b8cff,#3b3f8f)}
/* Tier pip on game badges: bronze, silver, gold. */
.bd-icon.tier-1::after,.bd-icon.tier-2::after,.bd-icon.tier-3::after{content:"";position:absolute;right:0;bottom:0;width:15px;height:15px;border:2.5px solid #fff;border-radius:50%}
.bd-icon.tier-1::after{background:#c67b45}
.bd-icon.tier-2::after{background:#a9b1c2}
.bd-icon.tier-3::after{background:#f2b705}
.is-locked .bd-icon::after{opacity:.5}

.bd-grid{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.bd-card{display:flex;gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:18px;background:#fff}
.bd-card .bd-icon{flex:none;width:56px;height:56px;margin:0}
.bd-card .bd-icon .icon{width:24px;height:24px}
.bd-body{flex:1;min-width:0}
.bd-card .bd-name{display:block;font-weight:800}
.bd-req{display:block;color:var(--mute);font-size:13px;line-height:1.4}
.bd-prog{display:flex;align-items:center;gap:10px;margin-top:8px}
.bd-prog .bar{flex:1}
.bd-count{font-size:12px;font-weight:700;color:var(--mute);font-variant-numeric:tabular-nums;white-space:nowrap}
.bd-state{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:12.5px;font-weight:800;color:var(--ok)}
.bd-state .icon{width:15px;height:15px}
.bd-card.is-earned{border-color:#f6c8bd;background:linear-gradient(180deg,#fff,#fff7f4)}

/* ------------------------------------------------------------ game page */
.game{padding-top:28px}
.game-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 14px;padding-bottom:16px}
.game-title{font-size:clamp(30px,4vw,44px);letter-spacing:-.03em}
.game-genre{color:var(--mute);font-weight:700}
@media (max-width:760px){.game{padding-top:16px}.game-head{padding-bottom:12px}}

.player{position:relative;border-radius:var(--r);overflow:hidden;background:#0b0c16;color:#fff}
.player-stage{position:relative;aspect-ratio:16/9;width:100%;background:#0b0c16;view-transition-name:hero}
.vt-leaving .player-stage{view-transition-name:none}
@media (max-width:767px) and (orientation:portrait){.player-stage{aspect-ratio:auto;height:max(300px,min(calc(100vh - 330px),133vw));height:max(300px,min(calc(100svh - 330px),133vw))}}
@media (min-width:768px){.player-stage{max-height:calc(100vh - 230px);max-height:calc(100svh - 230px);min-height:320px}}
.player-cover{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.player-start{position:absolute;inset:0;z-index:var(--z-raised);display:flex;align-items:center;justify-content:center;width:100%;border:0;padding:0;cursor:pointer;background:linear-gradient(0deg,rgba(10,10,20,.55),rgba(10,10,20,.15));-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.player-start:focus-visible{outline:3px solid #fff;outline-offset:-10px;border-radius:20px}
.player-start-btn{min-height:64px;padding:0 36px 0 30px;font-size:22px;box-shadow:0 10px 30px rgba(0,0,0,.3);transition:transform .25s var(--ease)}
.player-start-btn .icon{width:22px;height:22px}
@media (scripting:none){.player-start{display:none}}
.player-note{position:absolute;left:16px;right:16px;bottom:16px;z-index:var(--z-raised);background:#fff;color:var(--ink);border-radius:14px;padding:12px 16px;font-weight:600}
.player-frame{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;background:#0b0c16}
.player-error{position:absolute;inset:0;z-index:var(--z-raised);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center;background:rgba(11,12,22,.96);color:#e6e8f0}
.player-error-icon{width:40px;height:40px;color:var(--acc2)}
.player-error-title{font-size:24px;font-weight:800;color:#fff}
.player-error .btn{margin-top:8px}
@media (orientation:landscape) and (max-height:540px){.player-stage{max-height:calc(100vh - 24px);max-height:calc(100svh - 24px);min-height:0}}

/* "How do you want to play?" (phones and tablets) */
.player-choose{position:absolute;inset:0;z-index:calc(var(--z-raised) + 1);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,4vh,26px);padding:16px;background:rgba(11,12,22,.86);text-align:center}
.player-choose[hidden],.player-turn[hidden],.player-exit[hidden]{display:none}
.player-choose-title{font-size:clamp(22px,5.5vw,30px);font-weight:800;letter-spacing:-.02em;color:#fff;text-wrap:balance}
.player-choose-row{display:flex;justify-content:center;gap:clamp(12px,4vw,24px);width:100%}
.orient-btn{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;flex:0 1 180px;min-width:0;min-height:clamp(120px,30vh,168px);padding:16px 10px 14px;border:0;border-radius:22px;background:#fff;color:var(--ink);font:800 clamp(17px,4.6vw,20px)/1.1 var(--font);cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:transform .2s var(--ease)}
.orient-btn.is-last{box-shadow:0 0 0 3px var(--acc)}
.orient-btn:focus-visible{outline:3px solid #fff;outline-offset:4px;border-radius:22px}
.orient-icon{width:clamp(42px,11vw,56px);height:clamp(42px,11vw,56px);stroke-width:1.8;color:var(--acc-ink)}
.orient-btn[data-orient="landscape"] .orient-icon{transform:rotate(-90deg)}
.orient-last{position:absolute;top:-11px;right:-4px;padding:3px 10px;border-radius:999px;background:var(--acc-btn);color:#fff;font:800 12px/1.2 var(--font)}
@media (orientation:landscape) and (max-height:540px){.orient-btn{min-height:min(140px,calc(100svh - 150px))}}

/* The game, open full: native fullscreen on the player, or this CSS "filled" mode (iPhone, or when fullscreen is
   refused) that covers the whole window and locks the page behind it. */
.player:fullscreen{display:flex;flex-direction:column;width:100%;height:100%;margin:0;border-radius:0}
.player:-webkit-full-screen{display:flex;flex-direction:column;width:100%;height:100%;margin:0;border-radius:0}
.player.is-filled{position:fixed;inset:0;z-index:var(--z-top);display:flex;flex-direction:column;width:100%;height:100vh;height:100dvh;margin:0;border-radius:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);animation:none}
.player:fullscreen .player-stage,.player.is-filled .player-stage{flex:1 1 auto;aspect-ratio:auto;height:auto;max-height:none;min-height:0}
.player:-webkit-full-screen .player-stage{flex:1 1 auto;aspect-ratio:auto;height:auto;max-height:none;min-height:0}
.is-locked,.is-locked body{overflow:hidden;overscroll-behavior:none}

/* The one extra control: a small, see-through "Close game" near a top corner, placed by player.js. */
.player-exit{position:absolute;z-index:calc(var(--z-raised) + 3);top:8px;left:8px;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1.5px solid rgba(255,255,255,.4);border-radius:50%;background:rgba(11,12,22,.5);color:#fff;opacity:.72;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:opacity .2s ease}
.player-exit .icon{width:20px;height:20px;stroke-width:2.6}
.player-exit:hover,.player-exit:focus-visible{opacity:1}
.player-exit:focus-visible{outline:3px solid #fff;outline-offset:2px;border-radius:50%}

/* "Turn your phone" */
.player-turn{position:absolute;inset:0;z-index:calc(var(--z-raised) + 2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 64px;background:rgba(11,12,22,.97);color:#e6e8f0;text-align:center}
.turn-phone{display:grid;place-items:center;width:92px;height:92px;margin-bottom:6px;border-radius:26px;background:#fff;color:var(--acc-ink)}
.turn-icon{width:54px;height:54px;stroke-width:1.8}
.player-turn[data-want="portrait"] .turn-icon{transform:rotate(-90deg)}
.player-turn-title{font-size:clamp(22px,5.5vw,28px);font-weight:800;color:#fff;text-wrap:balance}
.player-turn-note{max-width:30ch;font-size:15px}

/* Under the player: today's goal and your level side by side (stacked on a phone). */
.game-strips{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:16px}
@media (min-width:900px){.game-strips{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}}
.goal,.me-strip{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;padding:14px 18px;border:1px solid var(--line);border-radius:18px;background:#fff}
.goal{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"label label badge" "target meter text";align-content:center;gap:10px 14px}
.goal-label{grid-area:label}.goal-badge{grid-area:badge;justify-self:end}.goal-target{grid-area:target;font-size:18px}.goal .meter{grid-area:meter;align-self:center}.goal-text{grid-area:text;justify-self:end}
.goal-label{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--mute)}
.goal-icon{width:18px;height:18px;color:var(--acc)}
.goal-target{font-weight:800;font-variant-numeric:tabular-nums}
.goal-target:empty{display:none}
.meter{position:relative;flex:1 1 140px;min-width:80px;height:6px;border-radius:9px;background:var(--soft-2);overflow:hidden}
.meter-fill{position:absolute;inset:0;display:block;border-radius:9px;background:var(--acc);transform-origin:0 50%;transform:scaleX(var(--p,0));transition:transform .9s var(--ease)}
.goal.is-done .meter-fill{background:var(--ok)}
.goal-text{color:var(--mute);font-size:13.5px;font-variant-numeric:tabular-nums}
.goal-badge{display:none;align-items:center;gap:4px;padding:3px 10px 3px 7px;border-radius:999px;background:#e8f7ee;color:var(--ok);font-size:13px;font-weight:800}
.goal-badge .icon{width:15px;height:15px}
.goal.is-done .goal-badge{display:inline-flex}
@media (max-width:599px){.goal{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"label badge" "target text" "meter meter"}}

.me-ring{position:relative;display:grid;place-items:center;flex:none;width:48px;height:48px;color:var(--ink);text-decoration:none}
.me-svg{position:absolute;inset:0;width:48px;height:48px}
.me-ring b{position:relative;font-size:15px;font-weight:800}
.me-main{flex:1 1 180px;min-width:0}
.me-line{display:flex;flex-wrap:wrap;gap:0 8px;align-items:baseline;margin-bottom:6px}
.me-sub{color:var(--mute);font-size:13px}
.me-gain{display:flex;flex-direction:column;align-items:flex-end;line-height:1.25}
.me-gain b{color:var(--acc-ink);font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
.me-gain span{color:var(--mute);font-size:11.5px;font-weight:600}
.me-tasks{list-style:none;flex-basis:100%;display:grid;gap:6px;padding-top:10px;border-top:1px solid var(--line)}
.task{display:flex;align-items:center;gap:10px;font-size:13.5px}
.task > .icon{width:17px;height:17px;color:var(--acc)}
.task-text{flex:1;min-width:0}
.task-text a{color:var(--acc-ink);font-weight:700}
.task-count{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.task-done{display:inline-flex;align-items:center;gap:3px;color:var(--ok);font-weight:800;white-space:nowrap}
.task-done .icon{width:15px;height:15px}
.task.is-done > .icon{color:var(--ok)}
@media (max-width:599px){.me-gain{flex-basis:100%;flex-direction:row;align-items:baseline;gap:8px}}

/* Tabs: a soft segmented control. Without JavaScript the tab list is hidden and all panels show with headings. */
.tabs{padding-top:28px}
.tablist{position:relative;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);max-width:480px;padding:4px;background:var(--soft);border-radius:999px}
.tab-pill{position:absolute;top:4px;bottom:4px;left:4px;width:calc((100% - 8px) / var(--n,3));border-radius:999px;background:#fff;box-shadow:0 1px 3px rgba(17,19,34,.12);transform:translateX(calc(var(--i,0) * 100%));transition:transform .35s var(--ease)}
.tab{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 10px;border:0;border-radius:999px;background:none;color:var(--mute);font:700 15px/1 var(--font);white-space:nowrap;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.tab:hover{color:var(--ink)}
.tab[aria-selected="true"]{color:var(--ink);font-weight:800}
.tab:focus-visible{outline-offset:-3px}
@media (max-width:599px){.tabs{padding-top:22px}.tab{font-size:14px;padding:0 6px}}
.tabpanel{margin-top:20px;padding:28px;border:1px solid var(--line);border-radius:var(--r);background:#fff}
@media (max-width:599px){.tabpanel{padding:20px 16px;margin-top:14px}.stats{gap:8px}.stat{padding:10px}.stat dd{font-size:18px}}
.tabpanel-title{font-size:22px;margin-bottom:16px}
.is-tabbed .tabpanel-title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.is-tabbed .tabpanel:focus-visible{outline-offset:4px}

.block-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:8px}
.block-title{font-size:18px;margin-bottom:14px}
.block-head .block-title{margin-bottom:0}
.sub-title{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--mute);margin:22px 0 8px}
.note{margin-top:14px;font-size:14px;color:var(--mute)}
.note:empty{display:none}

/* Scores tab */
.scores-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:36px}
@media (min-width:900px){.scores-grid.has-board{grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:48px}}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{min-width:0;padding:12px 14px;border-radius:14px;background:var(--soft)}
.stat dt{font-size:12.5px;font-weight:700;color:var(--mute)}
.stat dd{font-size:22px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.scores.is-new .stat:first-child{background:var(--acc-soft)}
.top-list{list-style:none}
.top-list li{display:grid;grid-template-columns:28px 1fr auto;align-items:baseline;gap:8px;padding:9px 2px;border-bottom:1px solid var(--line)}
.top-rank{font-weight:700;color:var(--mute)}
.top-score{font-weight:800;font-variant-numeric:tabular-nums}
.top-date{color:var(--mute);font-size:13px}

.board-status{padding:14px 16px;border-radius:14px;background:var(--soft);color:var(--mute);font-weight:600}
.board-list{list-style:none;display:grid;gap:2px}
.board-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:44px;padding:0 12px 0 6px;border-radius:12px}
.board-row:nth-child(odd){background:var(--soft)}
.board-rank{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;color:var(--mute);font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
.board-row.is-first .board-rank{background:#f2b705;color:var(--ink)}
.board-row.is-podium .board-rank{color:var(--ink)}
.board-who{display:flex;align-items:center;gap:8px;min-width:0}
.board-player{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board-score{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.board-row.is-you{background:var(--acc-soft);box-shadow:inset 0 0 0 1.5px #f3b6a8}
.board-row.is-you .board-player{font-weight:800}
.board-tag{flex:none;padding:1px 8px;border-radius:999px;background:var(--acc-btn);color:#fff;font-size:11px;font-weight:800;line-height:1.4}
.board-gap{padding:0;color:var(--mute);text-align:center;line-height:1.2}
.board-you{padding:12px 4px 0;font-size:14px;color:var(--mute);font-variant-numeric:tabular-nums}
.board-more{margin-top:16px}
.board-form{margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}
.board-label{display:block;margin-bottom:8px;font-size:14px;font-weight:800}
.board-field{display:flex;gap:10px;max-width:460px}
.board-input{flex:1 1 auto;min-width:0;min-height:48px;padding:0 16px;border:1.5px solid #d6d8e1;border-radius:14px;background:#fff;color:var(--ink);font:600 16px/1.2 var(--font)}
.board-input:focus-visible{outline:2.5px solid var(--acc-ink);outline-offset:1px;border-color:transparent}
.board-input[aria-invalid="true"]{border-color:var(--bad);background:#fff5f5}
.board-input:disabled{opacity:.55;cursor:not-allowed}
.board-hint{margin-top:8px;font-size:13.5px;line-height:1.4;color:var(--mute)}
.board-hint.is-error{color:var(--bad);font-weight:700}
.board-hint.is-ok{color:var(--ok);font-weight:700}

/* How to play tab */
.how{display:grid;grid-template-columns:minmax(0,1fr);gap:32px}
@media (min-width:900px){.how{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:48px}}
.steps{list-style:none;counter-reset:step;display:grid;gap:12px;max-width:65ch}
.steps li{position:relative;counter-increment:step;padding-left:44px;min-height:30px}
.steps li::before{content:counter(step);position:absolute;left:0;top:-2px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--acc-soft);color:var(--acc-ink);font-weight:800;font-size:14px}
.seg{display:inline-flex;padding:3px;border-radius:999px;background:var(--soft)}
.seg-btn{min-height:40px;padding:0 16px;border:0;border-radius:999px;background:none;color:var(--mute);font:700 14px/1 var(--font);cursor:pointer;touch-action:manipulation}
.seg-btn:hover{color:var(--ink)}
.seg-btn[aria-pressed="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(17,19,34,.12)}
.controls{width:100%;border-collapse:collapse;margin-top:14px}
.controls caption{text-align:left;font-size:14px;font-weight:800;color:var(--mute);padding-bottom:8px}
.is-toggled .controls caption{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.controls td{padding:10px 14px 10px 0;border-bottom:1px solid var(--line);vertical-align:top}
.controls td:first-child{width:40%}
.controls td:last-child{padding-right:0}
kbd{display:inline-block;font:700 13px/1.6 var(--font);color:var(--ink);background:#fff;border:1px solid #d6d8e1;border-radius:8px;box-shadow:0 2px 0 #d6d8e1;padding:0 8px;overflow-wrap:anywhere}

/* About tab */
.about-text{max-width:65ch;color:var(--mute)}
.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:22px}
@media (min-width:768px){.facts{grid-template-columns:repeat(4,minmax(0,1fr))}}
.facts div{padding:12px 14px;border-radius:14px;background:var(--soft)}
.facts dt{font-size:12.5px;color:var(--mute);font-weight:700}
.facts dd{font-weight:800;line-height:1.3}
.tags{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
.tags li{padding:4px 12px;border-radius:999px;font-size:13px;font-weight:700;background:var(--soft);color:var(--mute)}

.game .section{padding-top:44px}

/* ------------------------------------------------------------ badges, events and top 50 pages */
.page-head{padding:40px 0 8px;max-width:720px}
.page-title{font-size:clamp(34px,5vw,52px);letter-spacing:-.035em;line-height:1.02}
.lead{margin-top:12px;font-size:17px;color:var(--mute)}
@media (max-width:760px){.page-head{padding-top:24px}.lead{font-size:15.5px}}

.me-card{display:flex;flex-wrap:wrap;align-items:center;gap:20px 28px;margin-top:24px;padding:24px;border:1px solid var(--line);border-radius:var(--r);background:#fff}
.me-card-ring{position:relative;display:grid;place-items:center;flex:none;width:96px;height:96px}
.me-card-svg{position:absolute;inset:0;width:96px;height:96px}
.me-card-ring b{position:relative;font-size:30px;font-weight:800}
.me-card-main{flex:1 1 260px;min-width:0}
.me-card-title{font-size:24px}
.me-card-sub{color:var(--mute);margin:2px 0 10px}
.me-stats{flex:1 1 420px;display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px}
.me-stats div{padding:12px 14px;border-radius:14px;background:var(--soft)}
.me-stats dt{font-size:12.5px;font-weight:700;color:var(--mute)}
.me-stats dd{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
@media (max-width:599px){.me-card{padding:18px}.me-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.panel-note{margin-top:16px;padding:12px 14px;border-radius:12px;background:var(--soft);color:var(--mute)}

.xp-list{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.xp-list li{padding:14px 16px;border-radius:16px;background:var(--soft)}
.xp-list b{display:block;font-weight:800}
.xp-list span{color:var(--mute);font-size:14px}

.evh{position:relative;margin-top:24px;border-radius:var(--r);overflow:hidden;background:#0b0c16;color:#fff;min-height:400px;display:flex;align-items:flex-end;isolation:isolate}
.evh-art{position:absolute;inset:0;z-index:-1}
.evh-art img{width:100%;height:100%;object-fit:cover}
.evh-art::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(10,10,20,.9),rgba(10,10,20,.55) 55%,rgba(10,10,20,.1))}
.evh-in{position:relative;max-width:560px;padding:36px}
.evh .eyebrow{opacity:.9}
.evh .eyebrow .is-done{color:#86efac}
.evh-title{font-size:clamp(34px,4.6vw,52px);letter-spacing:-.035em;margin:8px 0 8px}
.evh-text{font-size:16px;opacity:.92}
.evh-prog{display:flex;align-items:center;gap:12px;margin:18px 0 10px}
.evh-prog > span:first-child{flex:1}
.evh .bar{background:rgba(255,255,255,.22);height:8px}
.evh-count{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:14px}
.evh-reward{display:flex;align-items:center;gap:8px;margin-bottom:18px;font-weight:700;font-size:14px}
.evh-reward .icon{width:18px;height:18px;color:var(--acc2)}
@media (max-width:760px){.evh{min-height:440px}.evh-in{padding:22px 18px}.evh-art::after{background:linear-gradient(0deg,rgba(10,10,20,.92),rgba(10,10,20,.5) 60%,rgba(10,10,20,.15))}}

.ev-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-top:16px}
@media (min-width:900px){.ev-grid{grid-template-columns:1fr 1fr;gap:20px}}
.card{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:22px;border:1.5px solid var(--line);border-radius:var(--r);background:#fff}
.card .lbl{width:100%}
.card .cal{width:100%}
.card [data-cal-box]{width:100%}
.card-big{font-size:20px;font-weight:800;letter-spacing:-.02em}
.card-sub{color:var(--mute);font-size:14px}
.card-prog{display:flex;align-items:center;gap:12px;width:100%;margin:8px 0 10px}
.card-prog > span:first-child{flex:1}
.card.is-done .card-big{color:var(--mute)}

.up-list{list-style:none;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
@media (min-width:760px){.up-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}}
.up{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid var(--line);border-radius:18px}
.up-img{flex:none;width:88px;aspect-ratio:4/3;height:auto;border-radius:12px;object-fit:cover}
.up b{display:block;font-weight:800}
.up small{display:block;color:var(--mute);font-size:13px}

/* ------------------------------------------------------------ content pages and 404 */
.back-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:24px 0 0;padding:0 16px 0 12px;border-radius:999px;background:var(--soft);color:var(--ink);font-weight:700;text-decoration:none}
.back-link:hover{background:var(--soft-2)}
.prose{padding:24px 0 8px;max-width:720px}
.prose .lead{margin-top:14px;font-size:18px}
.prose h2{font-size:22px;margin:36px 0 4px}
.prose p,.prose ul,.prose ol{margin-top:12px;font-size:16px;line-height:1.65}
.prose ul,.prose ol{padding-left:1.3em;display:grid;gap:6px}
.prose li::marker{color:var(--acc)}
.prose a{font-weight:700;color:var(--acc-ink)}
.faq-list{margin-top:14px;display:grid;gap:8px}
.faq-item{border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden}
.faq-item summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 18px;cursor:pointer;font-weight:800;list-style:none}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--soft);font-size:18px;line-height:1;transition:transform .3s var(--ease)}
.faq-item[open] summary::after{transform:rotate(45deg)}
.faq-item summary:focus-visible{outline-offset:-4px}
.prose .faq-item p{margin:0;padding:0 18px 16px;color:var(--mute);font-size:15px}
.intro{display:flex;flex-direction:column;align-items:flex-start;gap:12px;max-width:640px;padding:56px 0 8px}
.intro-mark{width:72px;height:72px}
.intro-title{font-size:clamp(38px,6vw,60px);letter-spacing:-.035em;line-height:1}
.intro-text{font-size:18px;color:var(--mute)}
.intro-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
@media (max-width:760px){.intro{padding-top:32px}.intro-text{font-size:16px}}

/* ------------------------------------------------------------ ads (only rendered when ads are on)
   Display slots: a small "Advertisement" label over a box of a fixed, reserved size (adpolicy.SLOT_SIZES), centred
   between sections with plenty of air around it, so an ad never moves the page and never looks like site content.
   Phone sizes below 768px, wide sizes from 768px. */
.ad{width:100%;max-width:728px;margin:64px auto 0;contain:layout}
.ad-label{margin:0 0 6px;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--mute)}
.ad-box{position:relative;display:flex;align-items:stretch;justify-content:center;width:100%;height:90px;overflow:hidden;border-radius:12px;background:var(--soft);outline:1px solid var(--line);outline-offset:-1px}
.ad-unit{display:inline-block;width:728px;height:90px}
@media (max-width:767px){
  .ad{margin-top:48px}
  .ad--home,.ad--game{max-width:300px}
  .ad--home .ad-box,.ad--game .ad-box{height:250px}
  .ad--home .ad-unit,.ad--game .ad-unit{width:300px;height:250px}
  .ad--footer,.ad--progress{max-width:320px}
  .ad--footer .ad-box,.ad--progress .ad-box{height:100px}
  .ad--footer .ad-unit,.ad--progress .ad-unit{width:320px;height:100px}
}
/* The game page slot sits under the tabbed panel: well over 150px below the player, and never shown full screen. */
.game .ad--game{margin-top:72px}
.is-locked .ad{visibility:hidden}

/* Demo house ads: one of our own games, or a plain "ad space" card. Laid out for each reserved size. */
.house{display:flex;align-items:center;gap:16px;width:100%;height:100%;padding:0 18px 0 0;color:var(--ink);text-decoration:none}
.house-art{flex:none;width:120px;height:100%;overflow:hidden;background:#0b0c16}
.house-art img{width:100%;height:100%;object-fit:cover}
.house-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.house-kicker{font-size:11.5px;font-weight:700;color:var(--mute)}
.house-title{font-size:17px;font-weight:800;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.house-line{font-size:13.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.house-cta{flex:none;display:inline-flex;align-items:center;min-height:40px;padding:0 18px;border-radius:999px;background:#fff;outline:1px solid var(--line);font-weight:800;font-size:14px}
a.house:hover .house-cta{background:var(--soft-2)}
a.house:focus-visible{outline-offset:-4px}
.house--plain{flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:0 20px;text-align:center}
.house--plain .house-title,.house--plain .house-line{white-space:normal}
.house--plain .house-title{font-size:15px}
.house--plain .house-line{font-size:12.5px}
@media (max-width:767px){
  .ad--home .house,.ad--game .house{flex-direction:column;align-items:stretch;gap:0;padding:0}
  .ad--home .house-art,.ad--game .house-art{width:100%;height:150px}
  .ad--home .house-copy,.ad--game .house-copy{padding:10px 14px 0}
  .ad--home .house-cta,.ad--game .house-cta{position:absolute;right:12px;bottom:12px;min-height:36px;padding:0 14px;font-size:13px}
  .ad--home .house-line,.ad--game .house-line{padding-right:92px}
  .ad--footer .house-art,.ad--progress .house-art{width:96px}
  .ad--footer .house,.ad--progress .house{gap:12px;padding-right:12px}
  .ad--footer .house-cta,.ad--progress .house-cta{display:none}
  .house-title{font-size:15.5px}
  .house--plain .house-kicker{display:none}
}

/* "Double this run's XP": an opt-in offer inside the progress strip under the player. */
.xp-offer{flex-basis:100%;display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;padding-top:10px;border-top:1px solid var(--line)}
.xp-offer-icon{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--acc-soft);color:var(--acc-ink)}
.xp-offer-icon .icon{width:19px;height:19px}
.xp-offer-text{flex:1 1 180px;display:flex;flex-direction:column;line-height:1.3}
.xp-offer-text b{font-size:14.5px}
.xp-offer-text span{color:var(--mute);font-size:12.5px}
.xp-offer-btn{min-height:44px;padding:0 18px;font-size:14.5px}
@media (max-width:420px){.xp-offer-btn{flex:1 1 100%}}

/* "Next up" after a run, Share buttons and the share fallback field. */
.next-up{grid-column:1/-1}
.next-card{padding:12px 16px 12px 12px}
.pill--acc{background:var(--acc-btn);color:#fff;box-shadow:0 3px 0 var(--lip)}
.task-share{min-height:44px;padding:0 14px;font-size:13.5px;gap:6px}
.task-share .icon{width:16px;height:16px}
.task{flex-wrap:wrap}
.task .share-field{flex-basis:100%;margin-top:6px;background:var(--soft)}
.share-best{margin-top:16px;min-height:44px;font-size:14.5px}
.share-best .icon,.card-row .icon{width:17px;height:17px}
.scores .share-field{background:var(--soft)}
.btn.is-copied{color:var(--ok)}
.card-row{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 6px;padding-bottom:6px}
.card .share-field{background:var(--soft)}

/* Your looks (Badges page) */
.looks-lead{margin:-6px 0 16px;color:var(--mute);max-width:60ch}
.looks{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:12px}
.look-btn{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;min-height:44px;padding:16px 10px 14px;border:1.5px solid var(--line);border-radius:var(--r-md);background:#fff;color:var(--ink);font:inherit;cursor:pointer;touch-action:manipulation}
.look-btn:hover{border-color:#d6d8e1}
.look.is-on .look-btn{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.look.is-locked .look-btn{cursor:default;background:var(--soft);border-color:transparent}
.look-sw{display:grid;place-items:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--look-soft);box-shadow:inset 0 0 0 7px var(--look);color:#7d8399}
.look-sw[data-look="rainbow"]{background:radial-gradient(circle,#fff 0 20px,transparent 21px),conic-gradient(#ff5a3c,#f5a524,#14b8a6,#0ea5e9,#7c5cff,#ff5a3c);box-shadow:none}
.look.is-locked .look-sw{opacity:.45}
.look-sw .icon{width:18px;height:18px;opacity:1}
.look-name{font-weight:800}
.look-how{font-size:12.5px;font-weight:700;color:var(--mute)}
.look.is-on .look-how{color:var(--ok)}

/* The demo video / break overlay (adoverlay.js): full screen, clearly labelled, calm. */
.adov{position:fixed;inset:0;z-index:calc(var(--z-top) + 10);display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:rgba(11,12,22,.9);color:var(--ink);font-family:var(--font);overflow:auto}
.adov:focus{outline:none}
.adov-card{width:min(560px,100%);border-radius:22px;background:#fff;overflow:hidden;box-shadow:0 30px 80px rgba(0,0,0,.4)}
.adov-top{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 16px}
.adov-tag{font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--mute)}
.adov-count{margin-left:auto;font-size:13px;font-weight:700;color:var(--mute);font-variant-numeric:tabular-nums;white-space:nowrap}
.adov-icon,.adov-close{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:0;border-radius:999px;background:var(--soft);color:var(--ink);font:800 14px/1 var(--font);cursor:pointer;touch-action:manipulation}
.adov-close{padding:0 16px;white-space:nowrap}
.adov-close.is-primary{background:var(--acc-btn);color:#fff}
.adov-close:disabled{cursor:default;color:var(--mute)}
.adov-icon .icon{width:19px;height:19px}
.adov-media{position:relative;aspect-ratio:16/9;max-height:42vh;background:#0b0c16}
.adov-media img{width:100%;height:100%;object-fit:cover}
.adov-meter{position:absolute;left:0;right:0;bottom:0;height:4px;background:rgba(255,255,255,.25)}
.adov-meter i{display:block;height:100%;background:var(--acc);transform-origin:0 50%;transform:scaleX(0);transition:transform .2s linear}
.adov-copy{padding:16px 20px 20px}
.adov-kicker{font-size:12px;font-weight:700;color:var(--acc-ink)}
.adov-title{margin-top:2px;font-size:24px}
.adov-line{margin-top:2px;color:var(--mute)}
.adov-what{margin-top:12px;padding-top:12px;border-top:1px solid var(--line);font-size:13px;color:var(--mute)}
@media (max-width:420px){.adov-top{flex-wrap:wrap}.adov-count{order:3;flex-basis:100%;margin-left:0}.adov-close{margin-left:auto}}
@media (orientation:landscape) and (max-height:540px){.adov-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:min(760px,100%)}.adov-top{grid-column:1/-1}.adov-media{max-height:none;aspect-ratio:auto;min-height:160px}.adov-copy{padding:12px 16px 16px}.adov-title{font-size:20px}}
@media (prefers-reduced-motion:no-preference){.adov{animation:fade-in .2s ease both}.adov-card{animation:rise-in .35s var(--ease) both}}

/* /ads-demo/ (the owner's page) */
.note-box{margin-top:20px;padding:14px 18px;border-radius:16px;background:var(--soft);font-size:15px}
.table-wrap{overflow-x:auto;margin-top:8px}
.ad-table{width:100%;border-collapse:collapse;font-size:14.5px}
.ad-table th,.ad-table td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.ad-table thead th{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--mute)}
.ad-table .num{text-align:right;font-variant-numeric:tabular-nums;font-weight:800;white-space:nowrap}
.table-wrap + .note + .table-wrap{margin-top:24px}
.ad-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}

/* ------------------------------------------------------------ footer */
.site-footer{margin-top:72px}
.footer-in{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 28px;padding-top:24px;padding-bottom:max(36px,env(safe-area-inset-bottom))}
.brand--small .logo-mark{width:26px;height:26px}
.brand--small .brand-name{font-size:17px}
.footer-links{list-style:none;display:flex;flex-wrap:wrap;gap:0 2px}
.footer-links a{display:inline-flex;align-items:center;min-height:44px;padding:0 10px;border-radius:10px;font-weight:700;font-size:14px;color:var(--mute);text-decoration:none}
.footer-links a:hover{color:var(--ink);background:var(--soft)}
.footer-note{flex-basis:100%;font-size:13px;color:var(--mute)}
.sound-toggle{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border:0;border-radius:999px;background:var(--soft);color:var(--ink);font:700 14px/1 var(--font);cursor:pointer;touch-action:manipulation}
.sound-toggle:hover{background:var(--soft-2)}
.sound-toggle .icon{width:18px;height:18px}
.sound-toggle .sound-off,.sound-toggle.is-off .sound-on{display:none}
.sound-toggle.is-off .sound-off{display:block}
.sound-toggle.is-off{color:var(--mute)}
@media (max-width:760px){.site-footer{margin-top:48px}.footer-in{flex-direction:column;align-items:flex-start;gap:6px;padding-bottom:24px}.footer-links{margin-left:-10px}}

/* ------------------------------------------------------------ celebrations */
/* Toast (aria-live via role="status"). It stays in the accessibility tree while hidden. */
.toast{position:fixed;left:50%;bottom:calc(var(--tabbar) + max(18px,env(safe-area-inset-bottom)));z-index:var(--z-toast);display:flex;align-items:center;gap:12px;width:max-content;max-width:calc(100% - 32px);padding:10px 18px 10px 10px;border-radius:999px;background:var(--ink);color:#fff;font-weight:700;font-size:14.5px;box-shadow:0 12px 32px rgba(17,19,34,.25);opacity:0;pointer-events:none;transform:translate(-50%,16px);transition:opacity .2s ease,transform .45s var(--spring)}
.toast.is-shown{opacity:1;transform:translate(-50%,0)}
.toast-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--acc2),var(--acc));color:#fff}
.toast-icon .icon{width:18px;height:18px}
.toast:not(.is-shown) .toast-icon{visibility:hidden}

/* Level up: a calm card with a ring that fills; it closes itself. */
.levelup{position:fixed;left:50%;top:max(84px,env(safe-area-inset-top));z-index:var(--z-toast);display:flex;align-items:center;gap:18px;width:min(420px,calc(100% - 32px));padding:18px 20px;border-radius:24px;background:#fff;box-shadow:0 24px 60px rgba(17,19,34,.22),0 0 0 1px var(--line);transform:translateX(-50%)}
.levelup-ring{position:relative;display:grid;place-items:center;flex:none;width:72px;height:72px}
.levelup-svg{position:absolute;inset:0;width:72px;height:72px}
.levelup-ring b{position:relative;font-size:26px;font-weight:800}
.levelup-text{flex:1;min-width:0}
.levelup-kicker{display:block;font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--acc-ink)}
.levelup-title{display:block;font-size:24px;font-weight:800;letter-spacing:-.02em}
.levelup-sub{display:block;color:var(--mute);font-size:13.5px}
.levelup-close{align-self:flex-start;display:grid;place-items:center;width:44px;height:44px;margin:-8px -8px 0 0;padding:0;border:0;border-radius:50%;background:none;color:var(--mute);cursor:pointer}
.levelup-close:hover{background:var(--soft);color:var(--ink)}
.levelup-close .icon{width:18px;height:18px}

/* Confetti: a fixed layer under the player (never over the game), filled by confetti.js */
.confetti{position:fixed;left:0;right:0;bottom:0;z-index:var(--z-toast);overflow:hidden;pointer-events:none}
.confetti i{position:absolute;display:block;width:9px;height:13px;border-radius:3px}
.confetti i:nth-child(3n){border-radius:50%;width:10px;height:10px}
.confetti i:nth-child(4n){width:6px;height:16px}

/* ============================================================ motion
   Everything below only moves things (transform) or fades them (opacity), and only when the visitor has not
   asked for reduced motion. */
@media (prefers-reduced-motion:no-preference){
  /* Page changes: a cross-document view transition; the tapped picture grows into the player. */
  @view-transition{navigation:auto}
  ::view-transition-group(hero){animation-duration:.5s;animation-timing-function:cubic-bezier(.3,1.1,.4,1)}
  ::view-transition-old(hero),::view-transition-new(hero){height:100%;object-fit:cover;overflow:hidden}
  ::view-transition-old(root){animation:.2s ease both vt-out}
  ::view-transition-new(root){animation:.35s var(--ease) both vt-in}

  /* Load-in: the feed cards rise in with a short stagger (transform and opacity only, so nothing shifts, and every
     card ends fully visible); the player and the big cards of other pages rise in too. */
  .feed > *,.player,.me-card,.evh{animation:rise-in .5s var(--ease) backwards}
  .feed > :nth-child(2){animation-delay:.05s}.feed > :nth-child(3){animation-delay:.1s}.feed > :nth-child(4){animation-delay:.15s}
  .feed > :nth-child(5){animation-delay:.2s}.feed > :nth-child(n+6){animation-delay:.25s}
  /* Story cards lift; their art zooms in slowly (hover and focus below; on touch, the card nearest the middle of the
     screen, picked by motion.js). */
  .story{transition:transform .25s var(--ease)}
  .story-img{transition:transform 1.6s var(--ease)}
  .story.is-centre .story-img{transform:scale(1.06)}
  /* The chest: it nudges while it waits, then the lid pops, the rays spin up and the reward pops in. */
  .chest-card:not(.is-open) .chest{animation:chest-wait 3.2s ease-in-out 1.2s infinite}
  .chest-lid,.chest-lock{transition:transform .3s var(--spring)}
  .chest-rays{transition:opacity .3s ease,transform .45s var(--spring)}
  .chest-card.is-open .chest-rays{animation:spin 18s linear infinite}
  .chest-card.is-revealed .chest-title,.chest-card.is-revealed .chest-kicker{animation:pop-in .35s var(--spring) both}
  .chip-gift.is-ready::after{animation:pop-in .4s var(--spring) .6s both}
  .tile{animation:rise-in .5s var(--ease) both;animation-delay:.15s}
  .tile:nth-child(2){animation-delay:.2s}.tile:nth-child(3){animation-delay:.25s}.tile:nth-child(4){animation-delay:.3s}
  .tile:nth-child(5){animation-delay:.35s}.tile:nth-child(n+6){animation-delay:.4s}
  .is-tabbed .tabpanel:not([hidden]){animation:panel-in .35s var(--ease) both}
  .me-gain.is-new{animation:gain-in .7s var(--spring) both}
  .streak.is-on .streak-icon{animation:flicker 2.4s ease-in-out infinite;transform-origin:50% 90%}
  .is-gift.is-ready .cal-box{animation:nudge 2.4s ease-in-out 1s infinite}

  /* The orientation question pops in; the "turn your phone" picture keeps turning the way to go. */
  .player-choose:not([hidden]){animation:fade-in .2s ease both}
  .player-choose:not([hidden]) .orient-btn{animation:pop-in .45s var(--spring) .05s both}
  .player-choose:not([hidden]) .orient-btn + .orient-btn{animation-delay:.11s}
  .player-turn:not([hidden]) .turn-icon{animation:turn-to-side 2.2s var(--spring) infinite}
  .player-turn[data-want="portrait"]:not([hidden]) .turn-icon{animation-name:turn-upright}

  /* Below-the-fold blocks fade up as they scroll into view (motion.js adds .rv, then .rv-in). */
  .rv{opacity:0;transform:translateY(20px);animation:none!important}
  .rv.rv-in{opacity:1;transform:none;transition:opacity .4s ease,transform .6s var(--ease)}

  /* Scoreboard rows stagger in each time the board is drawn. */
  .board-row,.top-list li{animation:row-in .4s var(--ease) both}
  .board-row:nth-child(2),.top-list li:nth-child(2){animation-delay:.03s}
  .board-row:nth-child(3),.top-list li:nth-child(3){animation-delay:.06s}
  .board-row:nth-child(4),.top-list li:nth-child(4){animation-delay:.09s}
  .board-row:nth-child(5),.top-list li:nth-child(5){animation-delay:.12s}
  .board-row:nth-child(n+6){animation-delay:.15s}
  .goal.is-done .goal-badge{animation:pop-in .45s var(--spring) both}

  /* Level up: the card drops in, the ring draws itself, the number pops. */
  .levelup.is-in{animation:drop-in .55s var(--spring) both}
  .levelup.is-in .levelup-svg{animation:ring-draw .9s var(--ease) .1s both}
  .levelup.is-in .levelup-ring b{animation:pop-in .5s var(--spring) .55s both}

  /* Presses */
  .orient-btn:active,.jb:active,.nb:active,.t-card:active{transform:scale(.98)}
  .player-start:active .player-start-btn{transform:scale(.97)}
  .tab:active,.seg-btn:active,.nav-link:active{transform:scale(.95)}
  .tab,.seg-btn,.nav-link{transition:transform .2s var(--ease)}
}

/* Hover only where there is a real pointer. */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .tile-link:hover .tile-media img,.tile-link:focus-visible .tile-media img{transform:scale(1.05)}
  .tile-link:hover .tile-media,.tile-link:focus-visible .tile-media{transform:translateY(-4px)}
  .tile-media{transition:transform .35s var(--ease)}
  .jb:hover{transform:translateY(-2px)}
  .player-start:hover .player-start-btn{transform:translateY(-1px)}
  .tile-link:hover .tile-media img,.tile-link:focus-visible .tile-media img{transition-duration:1.6s}
  .story:hover,.story:has(.story-link:focus-visible){transform:translateY(-4px)}
  .story-link:hover .story-img,.story-link:focus-visible .story-img{transform:scale(1.06)}
}

@keyframes chest-wait{0%,78%,100%{transform:rotate(-6deg)}84%{transform:rotate(-11deg) scale(1.04)}90%{transform:rotate(-1deg) scale(1.04)}}
@keyframes spin{to{transform:rotate(1turn)}}
@keyframes pop-in{0%{opacity:0;transform:scale(.6)}100%{opacity:1;transform:none}}
@keyframes rise-in{0%{opacity:0;transform:translateY(14px)}100%{opacity:1;transform:none}}
@keyframes panel-in{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:none}}
@keyframes row-in{0%{opacity:0;transform:translateX(-10px)}100%{opacity:1;transform:none}}
@keyframes gain-in{0%{opacity:0;transform:translateY(8px) scale(.8)}100%{opacity:1;transform:none}}
@keyframes drop-in{0%{opacity:0;transform:translate(-50%,-24px) scale(.92)}100%{opacity:1;transform:translate(-50%,0)}}
@keyframes ring-draw{0%{opacity:0;transform:rotate(-300deg) scale(.7)}100%{opacity:1;transform:rotate(-90deg)}}
@keyframes flicker{0%,100%{transform:scale(1) rotate(0)}30%{transform:scale(1.06,.95) rotate(-3deg)}60%{transform:scale(.96,1.05) rotate(2deg)}}
@keyframes nudge{0%,80%,100%{transform:none}86%{transform:rotate(-8deg) scale(1.06)}93%{transform:rotate(6deg) scale(1.06)}}
@keyframes vt-out{to{opacity:0}}
@keyframes vt-in{from{opacity:0;transform:translateY(10px)}}
@keyframes fade-in{from{opacity:0}}
@keyframes turn-to-side{0%,20%{transform:rotate(0)}55%,85%{transform:rotate(-90deg)}100%{transform:rotate(0)}}
@keyframes turn-upright{0%,20%{transform:rotate(-90deg)}55%,85%{transform:rotate(0)}100%{transform:rotate(-90deg)}}

/* Reduced motion: everything holds still (colour changes only); the toast and cards simply appear. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .toast{transition:opacity .2s ease!important;transform:translate(-50%,0)}
  /* the "turn your phone" picture holds still, already turned the way to go */
  .player-turn[data-want="landscape"] .turn-icon{transform:rotate(-90deg)}
  .player-turn[data-want="portrait"] .turn-icon{transform:none}
}
