/*
  DRAAISLAG / DAREBACK — PUBLIC DESIGN SYSTEM v1.0
  Reference: current light Draaislag homepage.
  Shared across both domains; no domain-specific colors.
  Only public marketing pages, homepage footer and public gallery are themed here.
  Game screens, admin, school dashboards and account mechanics are deliberately excluded.
  Page-specific stylesheets still provide layouts and specialized components.
*/

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap");

/* 1. Single source of truth: public colors, corners, shadows and text. */
:root {
  --db-ink: #101b48;
  --db-copy: #485477;
  --db-paper: #fff8ed;
  --db-surface: #fffdf8;
  --db-edge: #e8d8c5;
  --db-yellow: #ffd426;
  --db-lilac: #f0e4ff;
  --db-mint: #d8f6ef;
  --db-peach: #ffe3d9;
  --db-link: #373278;
  --db-focus: #4328a1;
  --db-shadow: 0 10px 26px rgba(80,49,84,.10);
  --db-radius: 20px;
  /* Shared registration palette; used by signup-unified.css on both brands. */
  --db-signup-panel: #fff5e6;
  --db-signup-ink: #21152f;
  --db-signup-edge: #eac9a4;
  --db-signup-field: #fffdf8;
  --db-signup-field-edge: #cbb7a8;
  --db-signup-google: #294d98;
  --db-signup-action: #ffc83d;
  --db-signup-muted: #65546b;
  --db-signup-link: #542d87;
}

/* 2. Public information pages. Override old dark-mode theme variables LOCALLY.
      Do not alter the theme variables for the game or account screens. */
html body.db-light-public {
  --text: var(--db-ink);
  --muted: var(--db-copy);
  --navy: var(--db-ink);
  --line: var(--db-edge);
  --panel: var(--db-surface);
  --card: var(--db-surface);
  --soft: var(--db-lilac);
  --yellow: var(--db-yellow);
  --vivid-bg: var(--db-paper);
  --vivid-card: var(--db-surface);
  --vivid-soft: var(--db-lilac);
  --vivid-ink: var(--db-ink);
  --vivid-muted: var(--db-copy);
  --vivid-line: var(--db-edge);
  --db-ux-muted: var(--db-copy);
  --db-ux-line: var(--db-edge);
  color: var(--db-ink);
  background: radial-gradient(ellipse at 10% 8%,#ffe6d8 0%,transparent 32rem),
              radial-gradient(ellipse at 90% 34%,#f0e2fc 0%,transparent 32rem),
              var(--db-paper);
  color-scheme: light;
  font-family: 'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
}
html[data-dareback-theme="vivid"] body.db-light-public {
  background: radial-gradient(ellipse at 10% 8%,#ffe6d8 0%,transparent 32rem),
              radial-gradient(ellipse at 90% 34%,#f0e2fc 0%,transparent 32rem),
              var(--db-paper);
  color: var(--db-ink);
}
body.db-light-public main {color: var(--db-ink)}
body.db-light-public main :is(h1,h2,h3,h4,h5,h6,dt,strong) {color: var(--db-ink)}
body.db-light-public main :is(h1,h2,h3,h4,.btn) {font-family: Outfit,system-ui,sans-serif}
/* Many older modules hardcode pale text (#cedaf0) for a dark background. */
html body.db-light-public main :is(p,li,dd,figcaption) {color: var(--db-copy)}
html body.db-light-public main :is(a:not(.btn),.text-link) {color: var(--db-link)}
html body.db-light-public main :is(a:not(.btn),.text-link):hover {color: #9a3c42}
body.db-light-public main .eyebrow {color:#9a6200;font-weight:800}

/* 3. Shared public cards and callouts. All these panels become light. */
html body.db-light-public main :is(
  .how-route,.exampleIdea,.orgSteps article,.orgJoinNote,.orgOptions>div,
  .exampleOptions>div,.exampleSetupNote,.trainingExamples article,
  .educationUses article,.educationDesign,.educationContact,.educationDemo,
  .educationIdeaLists article,.orgContact
) {
  background: var(--db-surface);
  color: var(--db-ink);
  border-color: var(--db-edge);
  box-shadow: var(--db-shadow);
  border-radius: var(--db-radius);
}
html body.db-light-public main :is(.orgOptions>div,.exampleOptions>div) {
  background: #f5f3ff;
  box-shadow: none;
  border-radius: 0 12px 12px 0;
}
html body.db-light-public main :is(.orgCombination,.exampleCombination) {
  background: #f7f1ff;
  border-color: var(--db-edge);
  border-radius: 14px;
}
html body.db-light-public main :is(.exampleSetupNote,.orgJoinNote) {
  border-left: 4px solid #c98b00;
}
html body.db-light-public main :is(.exampleSetupNote,.exampleOptions dt,.orgOptions dt,
  .educationFacts dt,.educationDesign strong) {color: var(--db-ink)!important}
html body.db-light-public main :is(.educationDemo .eduReel h3,.educationDemo .eduDemoResult,
  .exampleCombination strong) {color:#885600}
html body.db-light-public main :is(.orgContactAddress a,.educationMailAddress a) {
  color:var(--db-link);
  text-decoration:underline;
}
html body.db-light-public main :is(.orgContact,.educationContact) {
  border: 2px solid #e4ca7a;
  background: linear-gradient(145deg,var(--db-surface),#f7f0ff);
}
html body.db-light-public main :is(.orgContact h2,.educationContact h2,
  .trainingExamples h3,.educationUses h2,.educationIdeaLists h3) {color:var(--db-ink)}
html body.db-light-public main :is(.orgPage figcaption,.exampleIdea .exampleIntro) {color:var(--db-copy)}

/* 4. Shared button appearance (public informational pages only). */
html body.db-light-public main .btn {
  color:var(--db-ink);
  background:var(--db-yellow);
  border:2px solid var(--db-ink);
  border-radius:999px;
  box-shadow:0 3px 0 var(--db-ink);
  padding:12px 18px;
  text-decoration:none;
  max-width:100%;
  white-space:normal;
}
html body.db-light-public main .btn:hover:not(:disabled) {background:#ffe475;color:var(--db-ink)}
html body.db-light-public main .btn.alt,
html body.db-light-public main .btn:is(.ghost,.secondary) {
  background:var(--db-lilac);
  color:var(--db-ink);
  border-color:#cdb8e2;
  box-shadow:none;
}
html body.db-light-public main .btn.alt:hover:not(:disabled) {background:#e4d4ff;color:var(--db-ink)}

/* 5. One readable footer across both brands and all public pages.
      Overrides the old pale-blue-on-cream footer links. */
html body:is(.homepage,.db-light-public,.db-public-gallery) .db-public-footer {
  color:var(--db-copy);
  border-top:1px solid var(--db-edge);
}
html body:is(.homepage,.db-light-public,.db-public-gallery) .db-public-footer .db-footer-links a {
  color:var(--db-link)!important;
  opacity:1;
  font-weight:650;
  text-decoration:underline;
  text-decoration-color:#b9accf;
  text-underline-offset:4px;
}
html body:is(.homepage,.db-light-public,.db-public-gallery) .db-public-footer .db-footer-links a:hover,
html body:is(.homepage,.db-light-public,.db-public-gallery) .db-public-footer .db-footer-links a:focus-visible {
  color:#a53743!important;
  text-decoration-color:currentColor;
}
html body:is(.homepage,.db-light-public,.db-public-gallery) .db-public-footer .db-footer-caption {
  color:var(--db-copy)!important;
  opacity:1;
}
html body:is(.homepage,.db-light-public,.db-public-gallery) .db-public-footer [aria-current="page"] {
  font-weight:850;
  color:var(--db-ink)!important;
}
/* The link below the highlighted monthly challenge on the homepage. */
html body.homepage .arcade-continuation #home-start a[href^="/uitgelicht/"] {
  color:var(--db-link)!important;
  font-weight:750;
  text-decoration:underline;
  text-underline-offset:4px;
}

/* 6. Public gallery: old dark panel styles inherit the same light palette. */
html body.db-public-gallery {
  --text:var(--db-ink);
  --muted:var(--db-copy);
  --navy:var(--db-ink);
  --yellow:var(--db-yellow);
  --vivid-bg:var(--db-paper);
  --vivid-card:var(--db-surface);
  --vivid-soft:var(--db-lilac);
  --vivid-muted:var(--db-copy);
  --vivid-line:var(--db-edge);
  background: radial-gradient(ellipse at 10% 7%,#ffe6d8,transparent 32rem),
              radial-gradient(ellipse at 95% 33%,#f0e2fc,transparent 32rem),
              var(--db-paper);
  color:var(--db-ink);
  color-scheme:light;
  font-family:'DM Sans',system-ui,sans-serif;
}
html body.db-public-gallery :is(h1,h2,h3,h4) {color:var(--db-ink);font-family:Outfit,system-ui,sans-serif}
html body.db-public-gallery :is(.intro>p:last-child,#gallery-status,.result,.text-preview,.card-body time) {color:var(--db-copy)}
html body.db-public-gallery :is(a,.open-entry) {color:var(--db-link)}
html body.db-public-gallery :is(.gallery-card,#gallery-filters,dialog) {
  background:var(--db-surface);
  color:var(--db-ink);
  border-color:var(--db-edge);
  box-shadow:var(--db-shadow);
}
html body.db-public-gallery .gallery-card .badges span {background:var(--db-mint);color:var(--db-ink)}
html body.db-public-gallery .card-media {background:#f3eafd}
html body.db-public-gallery :is(input:not([type=checkbox]),select,textarea) {
  background:#fff;
  color:var(--db-ink);
  border-color:#b7aec7;
}
html body.db-public-gallery :is(button,.selections a) {
  background:var(--db-lilac);
  color:var(--db-ink);
  border-color:#cdb8e2;
}
html body.db-public-gallery :is(button:hover,.selections a:hover) {background:#e4d4ff;color:var(--db-ink)}
html body.db-public-gallery :is(#gallery-filters>button,.selections a[aria-current="page"]) {
  background:var(--db-yellow);color:var(--db-ink);border-color:#c9a000;
}
html body.db-public-gallery :is(.eyebrow,.winner) {color:#885600}
html body.db-public-gallery footer {border-top:1px solid var(--db-edge);color:var(--db-copy)}
html body.db-public-gallery footer a {color:var(--db-link)}

/* 7. Keyboard and small-screen readability. */
html body:is(.db-light-public,.db-public-gallery) :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid var(--db-focus)!important;
  outline-offset:3px;
}
@media(max-width:650px) {
  html body.db-light-public main :is(.orgContact,.educationContact,.educationDesign) {padding:20px}
  html body.db-light-public main :is(.orgContactActions .btn,.educationContact .btn) {width:100%}
  html body:is(.homepage,.db-light-public,.db-public-gallery) .db-public-footer .db-footer-links {
    row-gap:4px;
  }
}
@media(prefers-reduced-motion:no-preference) {
  html body.db-light-public main :is(.how-route,.exampleIdea,.orgSteps article,.trainingExamples article) {
    transition: box-shadow .2s ease, transform .2s ease;
  }
  html body.db-light-public main :is(.how-route,.exampleIdea,.orgSteps article,.trainingExamples article):hover {
    box-shadow:0 12px 32px rgba(80,49,84,.14);
    transform:translateY(-2px);
  }
}

/* 8. Public link contrast fix (v1.1).
   ux.js adds .db-ux-scope to the body. Its legacy UX stylesheet gives
   all normal links a pale color intended for dark screens. That rule is
   more specific than the earlier general link rule. In public light pages,
   apply the centralized link color instead, without changing game screens. */
html body.db-light-public.db-ux-scope main a:not(.btn):not(.primaryNav):not(.primary):not(.skip):not(.logo):not(.brand) {
  color: var(--db-link) !important;
  opacity: 1;
  text-decoration-color: #8578b5;
  text-underline-offset: 4px;
}
html body.db-light-public.db-ux-scope main a:not(.btn):not(.primaryNav):not(.primary):not(.skip):not(.logo):not(.brand):is(:hover,:focus-visible) {
  color: #943640 !important;
  text-decoration-color: currentColor;
}

/* 9. GAME ENTRY — THE SECOND STAGE OF THE SHARED DESIGN SYSTEM (v1.2).
   The start screen matches Draaislag's light homepage. Once the player opens an
   actual game screen, all game-specific dark styles, reels and status states stay
   as they were. The :has condition ensures we do not recolor active gameplay. */
html[data-dareback-theme="vivid"] body.db-game-app {
  font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
}
html[data-dareback-theme="vivid"] body.db-game-app :is(h1,h2,h3,h4) {
  font-family:Outfit,system-ui,sans-serif;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) {
  background:radial-gradient(ellipse at 6% 5%,#ffe6d8 0%,transparent 34rem),
             radial-gradient(ellipse at 97% 35%,#efe2ff 0%,transparent 36rem),
             var(--db-paper) !important;
  color:var(--db-ink);
  color-scheme:light;
}
html[data-dareback-theme="vivid"] body.db-game-app #home.screen.active {
  background:transparent!important;
  border-color:transparent!important;
  color:var(--db-ink)!important;
  box-shadow:none!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home .p01Intro {
  background:var(--db-surface)!important;
  border:1px solid var(--db-edge)!important;
  border-radius:var(--db-radius);
  box-shadow:var(--db-shadow)!important;
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.p01Intro h1,.launchCard h2,.homeMenuCopy strong) {
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.p01Intro p,.launchCard p,.homeMenuCopy small,.startAccessNote,.organizationRoutes p) {
  color:var(--db-copy)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.eyebrow,.recommendedLabel) {
  color:#936000!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.launchCard,.homeMenuItem,.compactChoice) {
  background:var(--db-surface)!important;
  border:1px solid var(--db-edge)!important;
  border-radius:var(--db-radius)!important;
  color:var(--db-ink)!important;
  box-shadow:var(--db-shadow)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.launchCard.recommendedRoute,.recommendedStart) {
  background:#fff5da!important;
  border:2px solid #e5ad1b!important;
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.organizationRoutes,.howItWorks) {
  background:var(--db-surface)!important;
  border-color:var(--db-edge)!important;
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.compactChoice small,.compactChoice strong,.homeMenuItem small,.homeMenuItem strong,.homeMenuItem .homeMenuIcon) {
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home .compactChoice small,
html[data-dareback-theme="vivid"] body.db-game-app #home .homeMenuItem small {color:var(--db-copy)!important}
/* Keep the existing game-mode icons legible on the new pale cards. */
html[data-dareback-theme="vivid"] body.db-game-app #home .compactChoice :is(.icon,.arrow,.appLineIcon),
html[data-dareback-theme="vivid"] body.db-game-app #home .homeMenuItem :is(.arrow,.homeMenuArrow) {
  color:#795010!important;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid var(--db-focus)!important;
  outline-offset:3px;
}
html[data-dareback-theme="vivid"] body.db-game-app #home .btn:not(.alt):not(.ghost) {
  background:var(--db-yellow)!important;
  color:var(--db-ink)!important;
  border-color:#d9a30b!important;
  border-radius:999px;
}
html[data-dareback-theme="vivid"] body.db-game-app #home .btn:is(.alt,.ghost),
html[data-dareback-theme="vivid"] body.db-game-app #home .howOpen {
  background:var(--db-lilac)!important;
  color:var(--db-ink)!important;
  border-color:#d5c0ec!important;
  border-radius:999px;
}
html[data-dareback-theme="vivid"] body.db-game-app #home :is(.organizationInfoLink,a:not(.btn)) {
  color:var(--db-link)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) :is(.appTopbar,.appTopbar .homeLink,.appTopbar .brand,.appMenu>summary) {
  color:var(--db-ink)!important;
  border-color:var(--db-edge)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) .appMenuPanel {
  background:var(--db-surface)!important;
  color:var(--db-ink)!important;
  border-color:var(--db-edge)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) .appMenuPanel :is(a,button) {
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) .db-public-footer {
  border-top:1px solid var(--db-edge);
  color:var(--db-copy);
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) .db-public-footer :is(.db-footer-links a,.db-footer-caption) {
  color:var(--db-link)!important;
  opacity:1!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) .db-bottom-nav a {
  background:var(--db-surface)!important;
  color:var(--db-ink)!important;
  border-color:var(--db-edge)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(#home.screen.active) :is(.appTopbar a,.appMenuPanel a,#home a,.db-public-footer a):focus-visible {
  outline:3px solid var(--db-focus)!important;
  outline-offset:3px;
}
@media(max-width:650px) {
  html[data-dareback-theme="vivid"] body.db-game-app #home .p01Intro {padding:15px!important}
  html[data-dareback-theme="vivid"] body.db-game-app #home .homeMenuItem {border-radius:16px!important}
}


/* 10. ACTIVE GAME SCREENS — light page, original gameplay logic untouched (v1.3).
   The older game stylesheet explicitly painted html and body navy with !important,
   even after leaving #home. Scope this correction to a visible non-home screen.
   Dark in-game panels/reels remain dark for legibility, with local text variables. */
html[data-dareback-theme="vivid"]:has(body.db-game-app .screen.active:not(#home)) {
  background:var(--db-paper)!important;
  color-scheme:light;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) {
  background:radial-gradient(ellipse at 8% 10%,#ffe6d8 0%,transparent 33rem),
             radial-gradient(ellipse at 93% 38%,#f0e2fc 0%,transparent 35rem),
             var(--db-paper)!important;
  color:var(--db-ink)!important;
  color-scheme:light;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))::before {
  background:none!important;
  opacity:0!important;
}
/* The game screen has deliberately been transparent since version 0.7.11.
   Give it an accessible pale surface instead of leaving white labels on cream. */
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) {
  --text:var(--db-ink);
  --muted:var(--db-copy);
  color:var(--db-ink)!important;
  background:var(--db-surface)!important;
  border:1px solid var(--db-edge)!important;
  border-radius:var(--db-radius)!important;
  box-shadow:var(--db-shadow)!important;
  padding:clamp(12px,2vw,24px)!important;
}
/* Preserve contrast in the intentionally dark gameplay panels and controls. */
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.card,.phonePanel,.playerCard,.companion,.compactRoleCard) {
  --text:#fffdf4;
  --muted:#b9c8dc;
  color:#fffdf4!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.alphaInfo,.browseHead,.executionHero) {
  color:var(--db-ink);
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) .alphaInfo {
  background:#f3effb!important;
  border-color:var(--db-edge)!important;
  color:var(--db-copy)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) .alphaInfo b {
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.eyebrow,.challenge,.browseHead h1,.executionHero h1) {
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) .eyebrow {
  color:#8c6008!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.hint,.small,.crumb,.feedbackMeta) {
  color:var(--db-copy)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.card,.phonePanel,.playerCard,.compactRoleCard) :is(.hint,.small,.crumb,.feedbackMeta) {
  color:#c9d7e9!important;
}
/* Header, menu and footer remain readable against the pale page. */
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  :is(.appTopbar,.appTopbar .brand,.appTopbar .homeLink,.appMenu>summary) {
  color:var(--db-ink)!important;
  border-color:var(--db-edge)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .appMenuPanel {
  background:var(--db-surface)!important;
  border-color:var(--db-edge)!important;
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  .appMenuPanel :is(a,button,.appAbout,.appAbout b) {color:var(--db-ink)!important}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  .mobileFlow span {color:var(--db-copy)!important}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  .mobileFlow span.current {color:var(--db-ink)!important;border-color:#bd840e!important}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  .db-public-footer {color:var(--db-copy)!important;border-color:var(--db-edge)!important}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  .db-public-footer a {color:var(--db-link)!important;opacity:1!important}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  .db-bottom-nav a {background:var(--db-surface)!important;color:var(--db-ink)!important;border-color:var(--db-edge)!important}
/* Ghost buttons outside navy cards need a visible surface on cream. */
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) > .btn.ghost,
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) > .row > .btn.ghost {
  background:var(--db-lilac)!important;
  color:var(--db-ink)!important;
  border-color:#cdb8e5!important;
}
@media(max-width:650px){
  html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home){padding:12px!important}
}

/* Some headings and labels sit inside navy gameplay cards, not on the pale
   page. Their local contrast must win over the generic pale-screen headings. */
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.card,.phonePanel,.playerCard,.compactRoleCard) :is(h1,h2,h3,h4,.challenge) {
  color:#fffdf4!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.card,.phonePanel,.playerCard,.compactRoleCard) .eyebrow {
  color:#ffe06a!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  :is(.brand,.homeLink) {color:var(--db-ink)!important}


/* 11. GAME CONTRAST FOLLOW-UP v1.3.1.
   Fix the dark-on-navy header and washed-out copy after gameplay begins.
   Applies to active game screens only; buttons, reels and logic unchanged. */
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .appTopbar {
  background:var(--db-surface)!important;
  color:var(--db-ink)!important;
  border:1px solid var(--db-edge)!important;
  border-radius:16px!important;
  box-shadow:var(--db-shadow)!important;
  padding:7px clamp(10px,2vw,18px)!important;
  min-height:62px;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home))
  :is(.appTopbar .brand,.appTopbar .homeLink,.appTopbar .homeLink:visited) {
  color:var(--db-ink)!important;
  text-decoration-color:var(--db-link)!important;
  opacity:1!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .appMenu>summary {
  background:#fffdf8!important;
  color:var(--db-ink)!important;
  border:1px solid #b7a9a3!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .appMenu[open]>summary {
  background:var(--db-lilac)!important;
  border-color:var(--db-focus)!important;
}
/* All non-active stages must remain readable; current stage remains prominent. */
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .mobileFlow span {
  color:#415275!important;
  border-top-color:#6682ae!important;
  opacity:1!important;
  font-size:clamp(10px,1.15vw,12px)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .mobileFlow span.current {
  color:var(--db-ink)!important;
  border-top-color:#cc8b00!important;
}
html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .mobileFlow span.done {
  color:#243a5f!important;
  border-top-color:#33847b!important;
}
/* The wheel labels sit directly on the pale card, not on navy game panels. */
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) .slotWrap > .label,
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) .reelLabel {
  color:#875e06!important;
  opacity:1!important;
}
/* General helper text directly on a pale game screen: avoid inherited ice blue. */
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home)
  :is(.hint,.small,.crumb):not(.card :is(.hint,.small,.crumb)):not(.phonePanel :is(.hint,.small,.crumb)):not(.playerCard :is(.hint,.small,.crumb)):not(.compactRoleCard :is(.hint,.small,.crumb)) {
  color:var(--db-copy)!important;
  opacity:1!important;
}
/* In the final instruction panel, use a deliberate light surface + dark copy. */
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) #afterDraw > .card {
  background:var(--db-surface)!important;
  border:1px solid var(--db-edge)!important;
  color:var(--db-ink)!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) #afterDraw .card :is(.small,.small b,.hint,.challenge) {
  color:var(--db-ink)!important;
  opacity:1!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .screen.active:not(#home) #afterDraw .card .eyebrow {
  color:#875e06!important;
}
@media (max-width:650px) {
  html[data-dareback-theme="vivid"] body.db-game-app:has(.screen.active:not(#home)) .appTopbar {
    padding:6px 9px!important;
    min-height:52px;
  }
}


/* 12. SHARED GAME TOP BAR — start, ready screen and active gameplay (v1.3.2).
   The old navy top bar remained on #home, where its dark brand and link
   were unreadable. Keep the same light, accessible header in every game state. */
html[data-dareback-theme="vivid"] body.db-game-app .appTopbar {
  background:#fffdf9!important;
  color:#111c42!important;
  border:1px solid #e8dacd!important;
  border-radius:16px!important;
  box-shadow:0 7px 22px rgba(23,30,70,.07)!important;
  padding:7px clamp(10px,2vw,18px)!important;
  min-height:62px;
}
html[data-dareback-theme="vivid"] body.db-game-app .appTopbar :is(.brand,.homeLink,.homeLink:visited) {
  color:#111c42!important;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appTopbar .homeLink {
  text-decoration-color:#425889!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appTopbar .homeLink:hover {
  color:#254b91!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appTopbar .brand .alpha {
  color:#865e00!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appMenu > summary {
  background:#fffdf9!important;
  color:#111c42!important;
  border:1px solid #b6a9a6!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appMenu[open] > summary {
  background:#eee6fa!important;
  color:#111c42!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appMenuPanel {
  background:#fffdf9!important;
  color:#111c42!important;
  border-color:#e8dacd!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appMenuPanel :is(a,button) {
  color:#111c42!important;
}
html[data-dareback-theme="vivid"] body.db-game-app .appTopbar :is(a,summary,button):focus-visible {
  outline:3px solid #2653b2!important;
  outline-offset:3px!important;
}
@media(max-width:650px){
  html[data-dareback-theme="vivid"] body.db-game-app .appTopbar {
    min-height:52px;
    padding:6px 9px!important;
  }
}

/* Public pages using the shared light palette. */
html[data-dareback-theme="vivid"]:has(body.db-public-refresh) {
  background: var(--db-paper);
  color-scheme: light;
}
html[data-dareback-theme="vivid"] body.db-public-refresh {
  min-height: 100vh;
}
body.db-public-refresh main :is(.card,.panel,.notice,.db-ux-notice) {
  background: var(--db-surface);
  color: var(--db-ink);
  border-color: var(--db-edge);
}
body.db-public-refresh main :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select) {
  background: var(--db-surface);
  color: var(--db-ink);
  border-color: var(--db-copy);
}
body.db-public-refresh main :is(input,textarea)::placeholder {
  color: var(--db-copy);
}
body.db-game-app .db-bottom-nav [data-back][hidden] {
  display: none !important;
}
body.db-game-app .soloAccountNote {
  color: var(--db-copy);
  margin: 0 auto 8px;
  max-width: 900px;
}

/* Light form fields on the public game setup and catalogue screens. */
html[data-dareback-theme="vivid"] body.db-game-app
  :is(#playLibrary,#challengeSetup,#selfChallengeSetup,#customChallenge,#build).screen
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),textarea,select) {
  background: var(--db-surface) !important;
  color: var(--db-ink) !important;
  border-color: var(--db-copy) !important;
  color-scheme: light;
}
html[data-dareback-theme="vivid"] body.db-game-app
  :is(#playLibrary,#challengeSetup,#selfChallengeSetup,#customChallenge,#build).screen
  :is(input,textarea)::placeholder {
  color: var(--db-copy) !important;
  opacity: 1;
}

/* Catalogue cards have their own legacy navy backgrounds and blue buttons. */
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen
  :is(.playNameBox,#playLibraryGrid .pick) {
  background: var(--db-surface) !important;
  color: var(--db-ink) !important;
  border-color: var(--db-edge) !important;
}
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen
  #playLibraryGrid .pick :is(b,.officialTitle,.officialMaker,.eyebrow) {
  color: var(--db-ink) !important;
}
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen
  #playLibraryGrid .pick :is(.small,.lockedNoteText) {
  color: var(--db-copy) !important;
}
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen
  #playLibraryGrid .pick :is(.orgCategory,.conditions span) {
  background: var(--db-lilac) !important;
  color: var(--db-ink) !important;
  border-color: var(--db-edge) !important;
}
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen #playLibraryGrid .pick .btn {
  background: var(--db-yellow) !important;
  color: var(--db-ink) !important;
  border-color: #a37206 !important;
  box-shadow: 0 3px 0 #a37206 !important;
}
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen #playLibraryGrid .pick .btn:hover:not(:disabled) {
  background: #ffe475 !important;
}
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen .browseHead .btn.ghost {
  background: var(--db-lilac) !important;
  color: var(--db-ink) !important;
  border-color: var(--db-copy) !important;
}
html[data-dareback-theme="vivid"] body.db-game-app #playLibrary.screen
  :is(button,input):focus-visible {
  outline: 3px solid var(--db-focus) !important;
  outline-offset: 3px;
}
