/* ============================================================
   Revamped Outdoors Co. theme for the web games (2026-11-22)

   Every value here is copied from the app's theme/index.ts (lightColors,
   darkColors, lightFeedback/darkFeedback, fonts, spacing, radius, makeShadow)
   so the games look like the app. If the app's theme changes, change it
   here too: this is the ONE place both games read their colors from.

   Dark is the default, because the app is dark-first on web (see
   WEB_THEME_FLASH_2026_09_10.md). Light applies when the phone or computer is
   set to light, the same way the app follows the system setting.

   Contrast: these are the app's AA-tuned values. Don't swap in a "close"
   color without re-checking it. Notably:
   - text ON an accent fill uses --ro-on-accent, never white (white on dark
     mode's light-green pine is 2.78:1)
   - small ember-colored text uses --ro-ember-text (emberDark), not --ro-ember
   ============================================================ */
:root {
  color-scheme: dark light;
  /* darkColors */
  --ro-pine: #6FA87A;
  --ro-pine-dark: #ECE7DB;        /* heading text (light on dark) */
  --ro-pine-soft: #3C5C45;
  --ro-ember: #D68A48;
  --ro-ember-text: #D57B32;       /* = darkColors.emberDark, AA as text on cards */
  --ro-moss: #8C9A80;
  --ro-sage: #2C332C;
  --ro-sand: #13171A;             /* page background */
  --ro-sand-alt: #1A1F1C;
  --ro-surface: #1E2421;          /* cards */
  --ro-surface-muted: #262D28;
  --ro-dusk: #7F9DB8;
  --ro-bark: #ECE7DB;             /* primary text */
  --ro-bark-light: #A8A599;       /* muted text */
  --ro-on-accent: #0D1013;
  --ro-on-accent-muted: rgba(13,16,19,0.86);
  --ro-border: #39413A;
  --ro-border-strong: #4B534A;
  --ro-border-control: #6E8071;
  --ro-success: #6FA87A;
  --ro-danger: #D98A7A;
  --ro-danger-text: #D98A7A;
  --ro-warning: #D6A93C;
  --ro-warning-text: #D6A93C;
  /* darkFeedback */
  --ro-danger-soft: #3A2724;
  --ro-warning-soft: #332C1D;
  --ro-success-soft: #21301F;
  --ro-info-soft: #1E2A33;
  /* Hero scrim over photos, as an rgb triplet so callers set their own alpha.
     App: rgba(19,23,26,x) dark / rgba(247,240,228,x) light. */
  --ro-scrim: 19,23,26;
  /* Secondary button: dark mode fills with ember (light fill, dark label). */
  --ro-secondary: #D68A48;
  --ro-shadow-card: 0 8px 24px rgba(0,0,0,0.30);
  --ro-shadow-raised: 0 14px 34px rgba(0,0,0,0.45);

  /* fonts (app: Fraunces_600SemiBold, Fraunces_500Medium_Italic, Arimo 400/700) */
  --ro-font-display: "Fraunces", Georgia, serif;
  --ro-font-body: "Arimo", "Helvetica Neue", Arial, sans-serif;
  --ro-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* spacing + radius */
  --ro-xs: 4px; --ro-sm: 8px; --ro-md: 16px; --ro-lg: 24px; --ro-xl: 32px;
  --ro-r-sm: 8px; --ro-r-md: 14px; --ro-r-lg: 20px; --ro-r-xl: 28px; --ro-r-pill: 999px;
}
/* Light mode, two ways in (2026-11-22):
   1. On the website and family link, the phone's setting decides (media query).
   2. Inside the app (app/blaze-game.tsx), the APP's own theme choice decides: the
      app adds html.ro-light or html.ro-dark before the page draws, because a
      person can pick a theme in the app that differs from their phone's.
   html.ro-dark therefore switches the media query off. The light values are
   listed twice on purpose (CSS can't share one block between a media query and
   a class); change both together, and copy both from theme/index.ts. */
@media (prefers-color-scheme: light) {
  :root:not(.ro-dark) {
    /* lightColors */
    --ro-pine: #243A2A;
    --ro-pine-dark: #142419;
    --ro-pine-soft: #35533B;
    --ro-ember: #B86A2B;
    --ro-ember-text: #914E1D;
    --ro-moss: #5F6B54;
    --ro-sage: #E2E8D9;
    --ro-sand: #F7F0E4;
    --ro-sand-alt: #EFE5D5;
    --ro-surface: #FFFDF8;
    --ro-surface-muted: #F8F4EC;
    --ro-dusk: #3E5C76;
    --ro-bark: #1F2A21;
    --ro-bark-light: #625F55;
    --ro-on-accent: #FFFFFF;
    --ro-on-accent-muted: rgba(255,255,255,0.85);
    --ro-border: #D6C9B4;
    --ro-border-strong: #BDAA8B;
    --ro-border-control: #9E8457;
    --ro-success: #35633B;
    --ro-danger: #B0483A;
    --ro-danger-text: #963A2E;
    --ro-warning: #C28A34;
    --ro-warning-text: #8A5E12;
    --ro-danger-soft: #F3D9D3;
    --ro-warning-soft: #F3E4C6;
    --ro-success-soft: #D8E7D5;
    --ro-info-soft: #D8E2E9;
    --ro-scrim: 247,240,228;
    /* Light mode: emberDark fill so the white label meets AA (Button.tsx). */
    --ro-secondary: #914E1D;
    --ro-shadow-card: 0 8px 24px rgba(27,43,30,0.06);
    --ro-shadow-raised: 0 14px 34px rgba(27,43,30,0.12);
  }
}
html.ro-light {
    /* lightColors */
    --ro-pine: #243A2A;
    --ro-pine-dark: #142419;
    --ro-pine-soft: #35533B;
    --ro-ember: #B86A2B;
    --ro-ember-text: #914E1D;
    --ro-moss: #5F6B54;
    --ro-sage: #E2E8D9;
    --ro-sand: #F7F0E4;
    --ro-sand-alt: #EFE5D5;
    --ro-surface: #FFFDF8;
    --ro-surface-muted: #F8F4EC;
    --ro-dusk: #3E5C76;
    --ro-bark: #1F2A21;
    --ro-bark-light: #625F55;
    --ro-on-accent: #FFFFFF;
    --ro-on-accent-muted: rgba(255,255,255,0.85);
    --ro-border: #D6C9B4;
    --ro-border-strong: #BDAA8B;
    --ro-border-control: #9E8457;
    --ro-success: #35633B;
    --ro-danger: #B0483A;
    --ro-danger-text: #963A2E;
    --ro-warning: #C28A34;
    --ro-warning-text: #8A5E12;
    --ro-danger-soft: #F3D9D3;
    --ro-warning-soft: #F3E4C6;
    --ro-success-soft: #D8E7D5;
    --ro-info-soft: #D8E2E9;
    --ro-scrim: 247,240,228;
    /* Light mode: emberDark fill so the white label meets AA (Button.tsx). */
    --ro-secondary: #914E1D;
    --ro-shadow-card: 0 8px 24px rgba(27,43,30,0.06);
    --ro-shadow-raised: 0 14px 34px rgba(27,43,30,0.12);
  }
html.ro-light { color-scheme: light; }
html.ro-dark { color-scheme: dark; }

/* In the app (2026-11-24), the app's own header is already on screen above the game, so the
   game's "Revamped Outdoors Co." brand is hidden. html.in-app is added only by
   app/christmas-game.tsx. This file started as a copy of the Camping with Blaze one, which
   hides the WHOLE header in the app. Don't copy that rule back: in this game the header also
   holds the 🔊 mute, 🗺️ Map and 🗒️ Clues buttons, and hiding it left kids with no way to
   mute, open the map or read their clues. The bar stays, slimmer, with the buttons on the right. */
html.in-app .ro-header .brand { display: none; }
html.in-app .ro-header { min-height: 0; padding-top: var(--ro-xs, 4px); padding-bottom: var(--ro-xs, 4px); }
html.in-app .ro-header .top { min-height: 0; justify-content: flex-end; }


/* ---- App header, copied from components/MobileSubNav.tsx ----
   Surface bar, bottom border, logo + two-line wordmark. */
.ro-header { min-height: 64px; background: var(--ro-surface); border-bottom: 1px solid var(--ro-border);
  padding: calc(env(safe-area-inset-top) + 8px) var(--ro-md) var(--ro-sm); display: flex; justify-content: center; }
.ro-header-inner { flex: 1; max-width: 760px; display: flex; align-items: center; justify-content: space-between; gap: var(--ro-md); }
.ro-brand { display: flex; align-items: center; gap: var(--ro-sm); text-decoration: none; }
.ro-brand img { width: 34px; height: 34px; object-fit: contain; }
.ro-brand-top { display: block; font-family: var(--ro-font-display); font-weight: 600; font-size: 15px; line-height: 17px; letter-spacing: .5px; color: var(--ro-pine-dark); }
.ro-brand-bottom { display: block; font-family: var(--ro-font-body); font-weight: 700; font-size: 9px; line-height: 11px; letter-spacing: 1.5px; color: var(--ro-moss); }

/* ---- Buttons, copied from components/Button.tsx ----
   minHeight 46, radius.sm (8), Arimo bold 15, primary = pine fill + onAccent. */
.ro-btn { min-height: 46px; padding: 12px var(--ro-lg); border-radius: var(--ro-r-sm); border: 1px solid var(--ro-pine);
  background: var(--ro-pine); color: var(--ro-on-accent); font: 700 15px/20px var(--ro-font-body); }
.ro-btn-secondary { background: var(--ro-secondary); border-color: var(--ro-secondary); color: var(--ro-on-accent); }
.ro-btn-ghost { background: transparent; border-color: var(--ro-border-strong); color: var(--ro-pine-dark); }
.ro-btn-outline { background: var(--ro-surface); border-color: var(--ro-pine); color: var(--ro-pine-dark); }
.ro-btn:active:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.ro-btn:disabled { opacity: .48; }

/* Visible keyboard focus everywhere (the app's a11y pass requires it). */
:focus-visible { outline: 3px solid var(--ro-pine); outline-offset: 2px; }

/* ---- Wide screens: the website's own top bar (2026-11-22) ----
   Randy: "On the website the top nav bar should stay the same as the main site." At 900px and up
   the site shows WebTopNav (hooks/useIsWideWeb.ts breakpoint): full width, 50px logo, one-line
   "Revamped Outdoors Co.", then Backpacking / Camping / Compass Club on the right. These copy
   its sizes and colors (components/WebTopNav.tsx makeStyles). Below 900px the game keeps the
   phone bar above, which is what the site shows there too. The app hides this bar entirely. */
.ro-brand-wide, .ro-nav { display: none; }
@media (min-width: 900px) {
  .ro-header { min-height: 84px; padding: calc(env(safe-area-inset-top) + 8px) var(--ro-xl) var(--ro-sm); align-items: center; }
  .ro-header-inner { max-width: none; }
  .ro-brand img { width: 50px; height: 50px; }
  .ro-brand-stack { display: none; }
  .ro-brand-wide { display: block; font-family: var(--ro-font-display); font-weight: 600; font-size: 19px; color: var(--ro-pine-dark); }
  .ro-nav { display: flex; align-items: center; gap: var(--ro-xs); margin-left: auto; }
  .ro-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 11px; border-bottom: 3px solid transparent; font: 700 12px/1 var(--ro-font-body); letter-spacing: .45px; text-transform: uppercase; color: var(--ro-bark); text-decoration: none; }
  .ro-nav a:hover { border-bottom-color: var(--ro-pine); }
  .ro-nav a.ro-nav-club { margin-left: var(--ro-xs); padding: 8px 14px; border: 1.5px solid var(--ro-pine); border-radius: var(--ro-r-pill); background: var(--ro-sage); color: var(--ro-pine-dark); }
}
