/* Price Passport web: the desktop layout (desktop.js sets html.dk on a window at least 1100 x 560 CSS px and groups each
   screen's parts into .dk-a, .dk-b, ...). A side menu down the start edge, and each screen a wide page beside it.
   Colours are the game's own tokens, so the light and dark themes follow the game's. Logical CSS only: Arabic mirrors. */
html.dk{--dk-rail:232px;--dk-pad:40px;--dk-gap:28px;--dk-play:clamp(400px,36vw,540px)}
html.dk body{background:var(--bg);padding-inline-start:var(--dk-rail)}
html.dk .app{max-width:1480px;margin-inline:auto;padding:28px var(--dk-pad) 48px}
html.dk .app.has-tabs,html.dk .app.has-banner{padding-bottom:48px}
html.dk .dock{display:none}
html.dk .has-tabs{scroll-padding-bottom:0}
html.dk .screen{gap:20px}

/* ---------- the menu ---------- */
.dk-rail{display:none}
html.dk .dk-rail{display:flex;flex-direction:column;gap:6px;position:fixed;inset-block:0;inset-inline-start:0;width:var(--dk-rail);
  box-sizing:border-box;padding:24px 16px;overflow-y:auto;z-index:10;background:var(--surface);border-inline-end:1px solid var(--line)}
.dk-brand{display:flex;align-items:center;gap:10px;padding:4px 10px 20px;font:700 1.15rem/1.1 var(--display,inherit);color:var(--ink)}
.dk-brand img{border-radius:10px}
.dk-brand b{white-space:nowrap}
html.dk .dk-rail .tabbar{display:flex;flex-direction:column;gap:4px;padding:0;position:static;background:none;box-shadow:none;border:0}
html.dk .dk-rail .tab{flex-direction:row;justify-content:flex-start;gap:12px;min-height:48px;padding:0 14px;font-size:1rem;width:100%;text-align:start;border-radius:14px;cursor:pointer}
html.dk .dk-rail .tab span{text-align:start}
html.dk .dk-rail .tab:hover{background:var(--surface2)}
html.dk .dk-rail .tab .dotbadge{position:static;margin-inline-start:auto}
html.dk .dk-rail .dk-settings{margin-top:10px;border-top:1px solid var(--line);border-radius:0 0 14px 14px;padding-top:6px}
html.dk .dk-get{margin-top:auto;display:flex;flex-direction:column;gap:8px;padding:16px 4px 0}
html.dk .dk-get .pp-stores{flex-direction:column}

/* ---------- shared cards ---------- */
.dk-card{display:flex;flex-direction:column;gap:6px;width:100%;box-sizing:border-box;padding:16px;border-radius:var(--r-lg,18px);
  background:var(--surface);border:1px solid var(--line);color:var(--ink);text-align:start;font:inherit;box-shadow:var(--shadow)}
button.dk-card{cursor:pointer;transition:transform .15s ease,border-color .15s ease}
.dk-card .eyebrow{display:flex;align-items:center;gap:6px}
.dk-card .eyebrow .ic{width:16px;height:16px}
.dk-card b{font-size:1.1rem}
.dk-map{width:100%;height:auto;border-radius:10px}
.dk-stats{flex-direction:row;justify-content:space-between}
.dk-stats span{display:flex;flex-direction:column;align-items:center;gap:2px;flex:1;font-size:.8rem;color:var(--muted);text-align:center;min-width:0;overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto}
.dk-stats .ic{color:var(--gold-deep)}
.dk-stats b{font-size:1.5rem;color:var(--ink)}
/* the menu carries the name and Settings: Home's own bar goes, and the other bars drop the name */
html.dk .scr-home .home > .bar{display:none}
html.dk .bar .wordmark{visibility:hidden}
html.dk .bar-title{font-size:1.9rem}

/* two columns of cards (the Daily, the passport, Settings, challenges, results, onboarding) */
html.dk .dk-cols{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:var(--dk-gap);align-items:start}
html.dk .dk-cols > div{display:flex;flex-direction:column;gap:16px;min-width:0}

/* ---------- Home: the hero beside the Daily, the passport, Quick match and the week's theme; the modes in a row ---------- */
html.dk .screen.home{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;align-items:start;grid-auto-flow:row dense}
html.dk .screen.home > *{grid-column:1/-1;min-width:0}
html.dk .screen.home > .hero{grid-column:span 7;grid-row:span 4;align-self:stretch;padding:36px 36px 28px;gap:14px;justify-content:center}
html.dk .screen.home > .hero h1{font-size:clamp(2.8rem,1.4rem + 2.2vw,4rem);max-width:14ch}
html.dk .screen.home > .hero p{font-size:1.1rem;max-width:40ch}
html.dk .screen.home > .hero .cta{max-width:420px}
html.dk .screen.home > .hero .hero-stats b{font-size:1.6rem}
html.dk .screen.home > :is(.dailycard,.dk-pass,.pp-appcard,.matchcard,.theme){grid-column:span 5}
html.dk .screen.home > .dk-pass .dk-map{max-height:150px;object-fit:cover}
html.dk .screen.home > .sec{margin-top:8px}
/* the five mode tiles: in a six-column grid the first three take two columns and the last two three, so no row holds a
   single tile beside empty cells (the page's own rule for an odd last tile, which spans a phone's two columns, would
   put Pay & life on a row of its own); five in a row from 1600 px */
html.dk .screen.home > .modes{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
html.dk .screen.home .mode:nth-child(-n+3){grid-column:span 2}
html.dk .screen.home .mode:nth-child(n+4){grid-column:span 3}
html.dk .screen.home .mode{min-height:150px;padding:18px;cursor:pointer}
html.dk .screen.home .mode b{font-size:1.35rem}
html.dk .screen.home .mode small{font-size:.9rem;max-width:26ch}
html.dk .screen.home > .social{grid-column:span 6}
html.dk .screen.home > .fine{grid-column:1/-1}
@media (min-width:1600px){html.dk .screen.home > .modes{grid-template-columns:repeat(5,minmax(0,1fr))}html.dk .screen.home .mode:is(:nth-child(-n+3),:nth-child(n+4)){grid-column:auto}}

/* ---------- the Daily ---------- */
html.dk .dailyhero{padding:32px;gap:16px}
html.dk .dailyhero h2{font-size:2.2rem}
html.dk .dailyhero p{font-size:1.05rem}
html.dk .seq{gap:8px}
html.dk .seq li{border-radius:14px}

/* ---------- results: the score big on one side, the stamps, the meter and the next steps on the other ---------- */
html.dk .bigresult{padding:40px 32px;gap:14px}
html.dk .br-num{font-size:clamp(5.4rem,3rem + 4vw,8.5rem)}
html.dk .br-sub{font-size:1.1rem}
html.dk .emoji-grid{font-size:1.6rem}

/* ---------- the passport: the map large, the cover, the meter and the cities on the way to gold beside it ---------- */
html.dk .passport .dk-cols{grid-template-columns:minmax(0,2fr) minmax(320px,1fr)}
html.dk .passport .mapcard{padding:16px}
html.dk .passport .stampgrid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
html.dk .passport .covers{grid-template-columns:repeat(4,minmax(0,1fr))}

/* ---------- Settings and challenges ---------- */
html.dk .settings .dk-cols,html.dk .challenge .dk-cols{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
html.dk .langgrid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
html.dk .codecard{padding:32px}
html.dk .codecard .code i{font-size:2.2rem}

/* ---------- onboarding ---------- */
html.dk .onboard .dk-cols{grid-template-columns:minmax(0,5fr) minmax(0,7fr);align-items:center;min-height:calc(100vh - 120px)}
html.dk .ob-hero h1{font-size:3.2rem}
html.dk .ob-hero p,html.dk .ob-head p{font-size:1.1rem}
html.dk .onboard .cta[data-act="ob-next"]{position:static}
html.dk .onboard .citylist{max-height:min(320px,40vh)}

/* ---------- sheets: a dialog in the middle, not a phone's bottom sheet ---------- */
html.dk .overlay{align-items:center;padding-inline-start:var(--dk-rail)}
html.dk .sheet{max-width:560px;border-radius:28px;padding:24px 28px 28px;box-shadow:var(--shadow)}
html.dk .sheet .grab{display:none}

/* ---------- rounds: the whole round in the window ---------- */
/* The page never scrolls in a round: the round takes the window's height, and only a group taller than its place
   scrolls on its own (a long reveal's charts). Each group has a little padding inside, so focus rings and shadows are
   not cut at its edges. */
html.dk .app.scr-game{max-width:1680px;height:100vh;height:100dvh;box-sizing:border-box;padding-block:20px}
html.dk .screen.game{height:100%;box-sizing:border-box;display:grid;gap:16px var(--dk-gap);
  grid-template-columns:minmax(0,1fr) var(--dk-play);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"hud hud" "a b"}
html.dk .game > .hud{grid-area:hud}
html.dk .game > :is(.dk-a,.dk-b,.dk-c){display:flex;flex-direction:column;gap:16px;min-width:0;min-height:0;overflow:auto;
  padding:6px 8px 10px;margin:-6px -8px -10px;scrollbar-width:thin}
html.dk .game > .dk-a{grid-area:a}
html.dk .game > .dk-b{grid-area:b}
html.dk .game > .dk-c{grid-area:c}
/* the question larger; the map takes the room left under it */
html.dk .game .qhead h2{font-size:clamp(1.55rem,.9rem + 1.1vw,2.2rem)}
html.dk .game .qbadge{font-size:.95rem}
html.dk .game .dk-a .qmap{flex:1 1 0;min-height:160px;width:100%;height:auto;aspect-ratio:auto!important;border-radius:var(--r-lg,18px)}
html.dk .game .cta{min-height:64px;font-size:1.3rem}
/* Lock it in sits at the foot of its column, under the control, not stuck to the screen. The round's own fits
   (rounds.js fitAsk) read where the Lock bar is from its `bottom` (which a static button doesn't use): set to the
   page's padding under the round, they see the button where it is, and only a control too tall for its column (a short
   window) takes the game's smaller steps, as on a phone */
html.dk .game.ask .cta[data-act="lock"]{position:static;bottom:20px}
/* the control's column: what the question gives, the control and Lock it in (on the reveal, Next) stand together in its
   middle, not the button at its foot under a band of nothing (the review of 15 Nov: 300 to 500 px at 1440x900 and
   1920x1080). Two spacers share the free height; with none free they are nothing (their negative margins take back the
   gaps beside them), so a column the round fitted to the window stands as before */
html.dk .game > .dk-b::before,html.dk .game > .dk-b::after{content:"";flex:1 1 0;min-height:0}
html.dk .game > .dk-b::before{margin-block-end:-16px}
html.dk .game > .dk-b::after{margin-block-start:-16px}
html.dk .game .verdict{padding:20px 22px}
/* a part taller than its place (a long reveal's charts in a short window) scrolls on its own; while there is more under
   its foot, the foot fades out, so the cut chart reads as more to come (desktop.js sets .dk-more) */
html.dk .game > .dk-more{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 56px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 56px),transparent)}
html.dk .game > .dk-c > .verdict{order:-1}  /* the verdict and its accuracy first, then its charts */
html.dk .game .vacc{font-size:clamp(2.2rem,1.4rem + 1.2vw,3rem)}
html.dk .game .verdict h3{font-size:1.6rem}
html.dk .game .verdict p{font-size:1.05rem}

/* the reveal: the verdict and its charts under the question, in place of the map */
html.dk .game.reveal{grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:"hud hud" "a b" "c b"}
html.dk .game.reveal > .dk-a{overflow:visible}
html.dk .game.reveal > .dk-a .qmap{display:none}
/* a very wide window: the question with its map, the control and the verdict side by side */
@media (min-width:1700px){
  html.dk .game.reveal{grid-template-columns:minmax(0,1fr) var(--dk-play) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"hud hud hud" "a b c"}
  html.dk .game.reveal > .dk-a{overflow:auto}
  html.dk .game.reveal > .dk-a .qmap{display:block}
}

/* ---------- mouse and keyboard ---------- */
@media (hover:hover){
  html.dk button.dk-card:hover,html.dk .dailycard:is(button):hover,html.dk .social:hover{transform:translateY(-2px);border-color:var(--gold)}
  html.dk .mode:hover{transform:translateY(-3px);filter:brightness(1.05)}
  html.dk :is(.chipbtn:not(.on),.rowbtn,.switchrow,.ghost,.citylist button,.iconbtn):hover{background:var(--surface2)}
  html.dk .cta:not([aria-disabled="true"]):not(:disabled):hover{filter:brightness(1.1)}
  html.dk :is(.dailycard,.social,.mode,.cta,.ghost,.chipbtn,.rowbtn){transition:transform .12s,background-color .12s,border-color .12s,filter .12s}
}
html.dk :focus-visible{outline:3px solid var(--focus);outline-offset:3px}

/* the narrower desktops (1100 to 1279 px) */
@media (max-width:1279px){html.dk{--dk-rail:196px;--dk-pad:24px;--dk-gap:22px}.dk-brand{font-size:.98rem;gap:8px}.dk-brand img{width:32px;height:32px}}
/* a short window (600 to 759 px): tighter rounds */
@media (max-height:759px){
  html.dk .app.scr-game{padding-block:14px}
  html.dk .game.ask .cta[data-act="lock"]{bottom:14px}
  html.dk .screen.game{gap:12px var(--dk-gap)}
  html.dk .game > :is(.dk-a,.dk-b,.dk-c){gap:12px}
  html.dk .game > .dk-b::before{margin-block-end:-12px}
  html.dk .game > .dk-b::after{margin-block-start:-12px}
  html.dk .game .cta{min-height:56px}
}
