/* Shared campaign panels: one bounded crossfade, never flashed. */
body .partner-promo::after{display:none!important}
.wow-frame{position:relative;height:clamp(70px,21vw,88px);overflow:hidden;background:#172440;color:#fff}
.wow-face{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;padding:8px 7%;font-family:system-ui,sans-serif;text-align:left;line-height:1.12}
.wow-face span{display:grid;gap:3px}.wow-face small{font-size:clamp(14px,4vw,18px);font-weight:650;color:#ffedce}.wow-face b{font-size:clamp(24px,6vw,32px);color:white;letter-spacing:-.055em}
.wow-first{background:linear-gradient(112deg,#14213b,#2b4468)}.wow-logo{display:block;position:relative;overflow:hidden;width:48px;height:48px;border-radius:8px;background:#ed1723}.wow-logo img{position:absolute;width:112%;height:112%;max-width:none;left:-6%;top:-6%}
.wow-second{background:linear-gradient(110deg,#271522,#4d2634 65%,#825644);color:#ffe0a0;opacity:0;animation:campaignCut 6.4s ease-in-out infinite}.wow-second b{color:#ffdf9a}
@keyframes campaignCut{0%,23%,100%{opacity:0;translate:4px 0}30%,91%{opacity:1;translate:0}}
body:has(#result:not([hidden])) .app>.partner-promo{display:none!important}body #result .result-promo{margin:12px auto!important;max-width:none}
body .game-transition{position:fixed!important;inset:0!important;background:#152037!important;isolation:isolate;justify-content:flex-end!important;padding:0 0 max(5dvh,22px)!important;gap:4px!important;overflow:hidden}
body .game-transition::before{content:'';position:absolute;inset:0;z-index:-1;background:url('assets/coming-poster.webp') center top / auto 100% no-repeat;opacity:.52}
body .game-transition .transition-hourglass{width:43px;height:55px;margin:0}body .game-transition>strong{background:#122037ed;color:#fff8e5;padding:8px 16px;border-radius:8px;font-size:18px}
body #adventureStart,body #hub.picking .pick-cta{position:relative;isolation:isolate;overflow:hidden!important;background:linear-gradient(#ffeb91,#ffd03b)!important;color:#263526!important;border:2px solid #ffec96!important;text-shadow:none!important;animation:directorBeat 1.45s ease-in-out infinite!important}
body #adventureStart::after,body #hub.picking .pick-cta::after{content:'';position:absolute;pointer-events:none;inset:0;background:linear-gradient(110deg,transparent 35%,#fff8 48%,transparent 64%);transform:translateX(-130%);animation:directorSweep 2.8s ease-out infinite}
@keyframes directorBeat{50%{box-shadow:inset 0 0 0 4px #fff6be, inset 0 -5px 12px #df911c!important;filter:brightness(1.13)}}
@keyframes directorSweep{0%,20%{transform:translateX(-130%)}65%,100%{transform:translateX(130%)}}
body #hub.picking .pick-cta{padding:5px 12px!important;border-radius:6px;align-self:start}
body #start .difficulty-option b{display:block;width:100%;height:29px;line-height:29px;background-position:center;background-repeat:no-repeat;background-size:auto 80%;color:transparent!important;text-shadow:none!important}
.difficulty-option:has([value=easy]) b{background-image:url('assets/level-easy.png')}.difficulty-option:has([value=normal]) b{background-image:url('assets/level-normal.png')}.difficulty-option:has([value=hard]) b{background-image:url('assets/level-hard.png')}
body #game .qcard{background:repeating-linear-gradient(0deg,#604e2310 0 1px,transparent 1px 26px),#faf1db!important;border:1px solid #cbb484!important;border-left:4px solid #b79552!important;color:#26372f!important}
body #game .qcard :is(.qtext,.type,.selection-hint){color:#354238!important}body #game .qcard .tag{color:#654b14!important;background:#f1dca4!important}
body .director-exit{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:none;min-height:42px;padding:5px 9px;background:#f7e5ba;color:#293d32;border:1px solid #ac945c;border-radius:8px;font:700 16px/1 system-ui,sans-serif}
.director-exit svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.4}
body:has(#hub:not(.picking):not([hidden])) .director-exit,body .topbar :is(#chooseBack,.mr-back,.quiz-result-back),body #game #quizQuit,body #mole #moleHome,body #league #rankHome{display:none!important}
body.mole-playing #mole>.actions{display:none!important}body.mole-playing #mole{grid-template-rows:48px auto minmax(0,1fr)!important}body .mole-hud .director-exit{font-size:15px;min-height:40px;padding:4px 8px}
body #result .stamped-score{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;margin:auto}
body #result .stamped-score #fAmount{margin:8px 0 12px!important}
.stamped-score img{flex:none;width:clamp(48px,14vw,65px);height:auto}.review-accordion summary{cursor:pointer;font-size:20px;font-weight:750;padding:6px 0}.review-accordion summary small{display:block;font-size:15px;font-weight:500;color:var(--ink-sub);margin-top:5px}
@media(prefers-reduced-motion:reduce){body #adventureStart,body #adventureStart::after,body #hub.picking .pick-cta,body #hub.picking .pick-cta::after{animation:none!important}.wow-second{animation:campaignStatic 6.4s steps(1) infinite}@keyframes campaignStatic{0%,100%{opacity:0}24%,90%{opacity:1}}}
body .game-transition{animation:none!important;background:#142031!important}
body .game-transition::before{background-size:contain;background-position:center center}
body #hub.picking .game-choice .pick-cta{color:#2c3020!important}
@keyframes directorBeat{0%,100%{filter:brightness(.98);box-shadow:inset 0 0 0 1px #f5bf46}50%{filter:brightness(1.15);box-shadow:inset 0 0 0 4px #fff6be,inset 0 -5px 12px #df911c}}
body.mole-playing #mole{grid-template-columns:minmax(0,1fr)!important}
body.mole-playing .mole-hud{width:100%!important;min-width:0!important;box-sizing:border-box!important;gap:6px!important;padding:4px 6px!important}
body.mole-playing .mole-hud span{gap:4px!important;font-size:clamp(14px,4vw,17px)!important}
body.mole-playing .mole-hud b{font-size:clamp(18px,5vw,24px)!important}
body.mole-playing .mole-hud .director-exit{font-size:15px;padding:4px 6px;gap:2px}
@media(max-width:370px){body.mole-playing .mole-hud span{letter-spacing:-.04em}}
/* One editorial campaign, with two focal points: station mark, then the partner. */
body .partner-promo{border:1px solid #59616b;border-radius:9px;box-shadow:0 2px 6px #07121c1a}
.wow-frame{height:clamp(82px,22vw,96px);background:#18242d}
.wow-face{padding:8px clamp(15px,5%,26px);overflow:hidden}
.wow-face span{position:relative;z-index:2;gap:5px}
.wow-first{background:radial-gradient(ellipse at 84% 120%,#506577 0,transparent 57%),linear-gradient(112deg,#18232d,#283946)}
.wow-first{justify-content:center;gap:14px}
.wow-first .wow-logo{width:44px;height:44px;border-radius:9px;box-shadow:0 3px 10px #08101940}
.wow-face small{color:#e2d3b8;font-size:clamp(14px,3.6vw,16px);font-weight:650;letter-spacing:.012em}
.wow-first b,.wow-second b{font-size:clamp(24px,6vw,30px);font-weight:820;letter-spacing:-.045em}
.wow-face.wow-second{padding:0;justify-content:center;background:#435258;isolation:isolate}
.campaign-photo{position:absolute;inset:0;display:grid;grid-template-columns:minmax(0,calc(50% + 6px)) clamp(122px,32.8vw,143px) minmax(0,1fr);z-index:-1}
.campaign-photo svg{width:100%;height:100%;display:block;overflow:hidden}
.wow-second::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#101b24d9 0%,#15222ac9 40%,#17232c55 60%,transparent 78%);pointer-events:none}
.wow-second>span{position:absolute;right:calc(50% - 27px);max-width:calc(50% + 15px);text-align:right;gap:5px}
.wow-second small{color:#f5e9d6;white-space:nowrap;font-size:clamp(13px,3.6vw,16px)}
.wow-second b{color:#fff8e8}
body .topbar .director-exit,body.mole-playing .mole-hud .director-exit{box-sizing:border-box;height:44px;min-height:44px;gap:4px;padding:0 9px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:9px;box-shadow:none;font:700 15px/1 system-ui,sans-serif}
body .topbar .director-exit{margin-right:4px}body .director-exit svg{width:16px;height:16px;flex:none}
body.mole-playing .mole-hud .director-exit{background:transparent;padding:0 5px;height:40px;min-height:40px}
body .director-exit:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
/* Fade through the shared ink ground so two headlines never occupy one line. */
.wow-face.wow-first{animation:campaignFirst 8s linear infinite}
.wow-face.wow-second{animation:campaignSecond 8s linear infinite;translate:none}
@keyframes campaignFirst{0%,38%,100%{opacity:1;visibility:visible}41%,97%{opacity:0;visibility:hidden}}
@keyframes campaignSecond{0%,41%,97%,100%{opacity:0;visibility:hidden}44%,94%{opacity:1;visibility:visible}}

@media(prefers-reduced-motion:reduce){.wow-face.wow-first{animation:campaignFirst 8s steps(1) infinite}.wow-face.wow-second{animation:campaignSecond 8s steps(1) infinite}}
/* The title card and its header use the same centered column on wide screens. */
body:has(#hub:not([hidden]):not(.picking)) .topbar {
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}
body .app>.partner-promo{width:var(--campaign-card-width,100%);max-width:100%;margin-inline:auto}
body #result .result-promo{width:100%;box-sizing:border-box}

body.mole-playing #mole .mole-hud {
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:10px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body.mole-playing #mole .mole-hud .director-exit {
  height:44px;
  min-height:44px;
  padding-inline:9px;
  color:#203c32;
  background:#f5e6bf;
  border:1px solid #b8a475;
}
.mole-readout {
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-sizing:border-box;
  gap:6px;
  min-width:0;
  min-height:38px;
  padding:4px 9px;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:9px;
}
.mole-hud.time-low .mole-readout {border-color:#bd6959}
@media(max-width:345px){
  body.mole-playing #mole .mole-hud{gap:6px!important}
  .mole-readout{padding-inline:5px}
  body.mole-playing #mole .mole-hud .director-exit{padding-inline:5px}
}

/* Unanswered choices use blue-gray, distinct from the cream question sheet. */
#game #opts .opt:not(:disabled):not(.pending):not(.sel-right):not(.sel-wrong) {
  background:#364c5e!important;
  border-color:#89a2b2!important;
  color:#fffaf1!important;
}
:root[data-theme=light] #game #opts .opt:not(:disabled):not(.pending):not(.sel-right):not(.sel-wrong) {
  background:#dce8ee!important;
  border-color:#748f9f!important;
  color:#1c3442!important;
}
#game #opts .opt:enabled:not(.pending) .mk {
  background:#253a49;color:#fffaf1;
}
:root[data-theme=light] #game #opts .opt:enabled:not(.pending) .mk {
  background:#c3d6df;color:#203947;
}
/* An incorrect answer opens a separate reading surface inside its feedback card. */
#game #fb:has(#fbHead.no) #fbExp {
  background:#f0e3c9!important;
  color:#352d21!important;
  border-left-color:#a47529!important;
}
#game #fb:has(#fbHead.no) #fbExp * {color:#352d21!important}
#game #fb:has(#fbHead.no) #fbExp .learn-label {color:#704b15!important}
:root[data-theme=light] #game #fb:has(#fbHead.no) #fbExp {
  background:#fffaf0!important;
  box-shadow:inset 0 0 0 1px #cbb78f;
}
/* Quiet surfaces for secondary actions; yellow is reserved for starting play. */
#mole {
  --earth-panel: linear-gradient(145deg,#4e4032,#392f29);
  --earth-ink: #fff1d7;
  --earth-edge: #796652;
  --guide-panel: #31464b;
  --guide-ink: #f4f3e7;
  --guide-edge: #627a7b;
  --record-panel: #304840;
  --record-ink: #e8efdf;
  --record-edge: #667a68;
}
:root[data-theme=light] #mole {
  --earth-panel: linear-gradient(145deg,#f3e4c6,#e7d6b7);
  --earth-ink: #402f23;
  --earth-edge: #c9b394;
  --guide-panel: #e1eaeb;
  --guide-ink: #263f42;
  --guide-edge: #9aabad;
  --record-panel: #e2e8dc;
  --record-ink: #2d4333;
  --record-edge: #a4b09d;
}
body:not(.mole-playing) #mole .mole-hero {
  background:var(--earth-panel)!important;
  border-color:var(--earth-edge)!important;
}
body:not(.mole-playing) #mole .mole-hero h1 {color:var(--earth-ink)!important}
body:not(.mole-playing) #mole .mole-guide {
  background:var(--guide-panel)!important;
  border-color:var(--guide-edge)!important;
  color:var(--guide-ink)!important;
}
#mole .mole-guide > summary {
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;list-style:none;color:inherit!important;
}
#mole .mole-guide > summary::-webkit-details-marker {display:none}
#mole .mole-guide > summary::after {
  content:"";flex:none;width:9px;height:9px;margin-right:4px;
  border:solid currentColor;border-width:0 2px 2px 0;
  transform:translateY(-2px) rotate(45deg);
}
#mole .mole-guide[open] > summary::after {transform:translateY(2px) rotate(225deg)}
#mole .mole-guide p {color:inherit!important}
body #mole #moleScoreboard {
  display:flex;align-items:center;justify-content:center;gap:8px;
  background:var(--record-panel)!important;color:var(--record-ink)!important;
  border-color:var(--record-edge)!important;box-shadow:none!important;
}
body #mole #moleScoreboard::after {display:none}
#moleScoreboard::before {
  content:"";width:20px;height:20px;flex:none;background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 4v16h16M8 16v-4m5 4V7m5 9v-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Multiple choice: warm olive complements the question paper. */
#game #opts:not(.ox) .opt:not(:disabled):not(.pending):not(.sel-right):not(.sel-wrong) {
  background:linear-gradient(125deg,#505441,#424735)!important;
  color:#fffae9!important;border-color:#92957a!important;
}
#game #opts:not(.ox) .opt:enabled:not(.pending) .mk {background:#343a2b;color:#f4e7bb}
:root[data-theme=light] #game #opts:not(.ox) .opt:not(:disabled):not(.pending):not(.sel-right):not(.sel-wrong) {
  background:linear-gradient(125deg,#e6e9d6,#dde2cd)!important;
  color:#303a26!important;border-color:#929d80!important;
}
:root[data-theme=light] #game #opts:not(.ox) .opt:enabled:not(.pending) .mk {background:#cbd2b7;color:#344229}
.next-game-invite {
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:44px;max-width:100%;margin:8px auto 0;padding:5px 16px;
  border:1px solid #adba9f;border-radius:9px;background:#e7ebda;color:#284232;
  font:700 17px/1.3 system-ui,sans-serif;cursor:pointer;
}
.next-game-invite:hover,.next-game-invite:focus-visible{background:#d9e2cb}
.next-game-invite:focus-visible{outline:3px solid #44694d;outline-offset:2px}
@media (max-width:600px) and (max-height:750px), (max-width:600px){
  body #moleResult .mr-hero{margin:4px 0!important}
  body #moleResult .mr-hero .mr-mascot{height:54px!important}
  body #moleResult .composed-result{padding-block:9px!important}
  body #moleResult .mr-dock{margin-top:8px!important}
}
:root {
  --ad-face-height:clamp(64px,9dvh,82px);
  --ad-space:calc(var(--ad-face-height) + 10px + env(safe-area-inset-bottom,0px));
}
.campaign-dock {
  position:fixed;inset:auto 0 0;z-index:64;box-sizing:border-box;
  padding:4px 0 calc(4px + env(safe-area-inset-bottom,0px));
  background:var(--bg);touch-action:none;
}
body .campaign-dock .partner-promo {
  display:block!important;width:var(--campaign-card-width,520px);
  max-width:calc(100% - 16px);margin:0 auto!important;
}
.campaign-dock .wow-frame{height:var(--ad-face-height)}
.campaign-dock .campaign-photo{grid-template-columns:minmax(0,calc(50% + 6px)) calc(var(--ad-face-height)*1.49) minmax(0,1fr)}
body:not(.mole-playing)::after{display:block;content:"";height:var(--ad-space);pointer-events:none}
body.mole-playing .app{height:calc(100dvh - var(--ad-space))!important;max-height:calc(100dvh - var(--ad-space))!important}
body.mole-playing #mole{max-height:100%!important}
@media(max-width:767px){
  #game:not([hidden]){min-height:0!important}
  #game:not(.answered) .qcard,#game:not(.answered) .opts{flex:0 0 auto!important}
  #game:not(.answered) .opts{gap:9px!important;margin-top:6px!important}
  #game:not(.answered) .opts:not(.ox) .opt{flex:0 0 auto;min-height:clamp(60px,16vw,76px)!important}
  #game:not(.answered) .opts.ox{height:auto!important;margin-block:8px 0!important;padding-block:0!important;align-items:stretch}
  #game:not(.answered) .opts.ox .opt{min-height:clamp(88px,25vw,116px)!important}
  #game.answered .feedback{flex:0 0 auto!important;justify-content:flex-start!important}
  body #result .result-dock{bottom:var(--ad-space)!important}
}
body .game-transition .transition-hourglass{animation-duration:4s!important}
.campaign-dock{z-index:10000}
body .game-transition{padding-bottom:calc(var(--ad-space) + 12px)!important}
@media(max-width:767px){
  #game:not(.answered):has(.opts.ox) .qcard{margin-top:20px!important}
  #game:not(.answered) .opts:not(.ox){gap:8px!important}
  #game:not(.answered) .opts:not(.ox) .opt{padding-block:7px!important}
}

/* On wide layouts the ad belongs to the viewport, not the active game card. */
@media (min-width: 560px) {
  :root { --ad-face-height: 76px; }
  .campaign-dock { width: 100vw; }
  body .campaign-dock .partner-promo { width: 520px; }
}

body:not(.mole-playing):has(#mole:not([hidden])) .topbar {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

:root {
  --exit-fill:#384b58;
  --exit-ink:#f7fafb;
  --exit-line:#81969e;
}
:root[data-theme=light] {
  --exit-fill:#e0e9ed;
  --exit-ink:#273e49;
  --exit-line:#879ea8;
}
body .topbar .director-exit,
body.mole-playing #mole .mole-hud .director-exit {
  background:var(--exit-fill);color:var(--exit-ink);border-color:var(--exit-line);
}
body .director-exit:focus-visible {outline-color:var(--exit-line)}

/* Keep mobile result actions in the same hit-testing layer above the ad. */
@media(max-width:767px){
 body #result .result-dock{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:6px 10px;width:100%;max-width:100vw}
 body #result .result-dock>button{box-sizing:border-box;position:static;transform:none;order:0;width:100%;min-width:0;margin:0;min-height:44px;height:auto;padding:5px 8px;font-size:16px;line-height:1.25}
 body #result .result-dock>.next-game-invite{grid-column:1/-1;grid-row:1;justify-content:center}
 body #result .result-dock>#copyBtn{grid-column:1/-1;grid-row:2;min-height:44px;height:auto}
 body #result .result-dock.perfect>#againBtn{grid-column:1/-1}
}
body .game-transition .transition-hourglass{animation-duration:6.5s!important}
.campaign-dock .wow-first small{font-size:clamp(21px,5.4vw,24px);font-weight:750;line-height:1.05}
.campaign-dock .wow-second{
  --portrait-width:calc(var(--ad-face-height)*1.49);
  display:grid;
  grid-template-columns:minmax(6px,1fr) fit-content(calc(100% - var(--portrait-width) - 12px)) var(--portrait-width) minmax(6px,1fr);
  grid-template-rows:100%;
  justify-content:normal;
  font-size:16px;
}
.campaign-dock .wow-second>span{
  position:relative;grid-area:1/2;left:auto;
  right:auto;width:auto;min-width:0;max-width:none;text-align:center;gap:2px;
}
.campaign-dock .wow-second small{font-size:clamp(19.5px,5.4vw,24px);line-height:1.04;font-weight:730;letter-spacing:-.035em;white-space:normal}
.campaign-dock .wow-second .award-line{display:inline-block;white-space:nowrap}
.campaign-dock .wow-second b{font-size:clamp(20px,5vw,26px);line-height:1.05}
.campaign-dock .campaign-photo{grid-area:1/3/2/4;inset:0;grid-template-columns:100%}
.campaign-dock .campaign-photo svg:nth-child(2){grid-area:1/1}
.campaign-dock .campaign-photo svg:first-child,.campaign-dock .campaign-photo svg:last-child{position:absolute;top:0;width:520px}
.campaign-dock .campaign-photo svg:first-child{right:100%}
.campaign-dock .campaign-photo svg:last-child{left:100%}

.wow-frame a.wow-face{color:inherit;text-decoration:none}.wow-frame:focus-within .wow-face{animation-play-state:paused}.wow-face:focus-visible{outline:3px solid #eec96b;outline-offset:-3px}