/* ============================================================
   Game look for the whole game (2026-11-22)

   Shapes from Randy's trail map (rounded panels, wooden plank rows, painted maps, bright
   scenes), COLORS from the website (Randy, 2026-11-22: "match the colors to the site's colors
   instead of this green"). The first version used the map's own forest green (#203912) with
   cream borders and gold buttons; that green didn't match the site, so it's gone. Now:
     - panels and bars = the site's dark card color (surface #1E2421) on its page color (#13171A)
     - edges = the site's pine green (#6FA87A), like its outlined "Feature Guide" button
     - main buttons = the site's primary button: pine fill, dark label, 8px corners
     - text = the site's cream (#ECE7DB) and muted (#A8A599)
   The map's own tags (cream labels, gold for the picked stop) stay: they're part of the art.

   How it works: this file loads LAST and re-points the --ro-* tokens, so every level picks the
   colors up without code changes. Locked to the site's DARK colors in light and dark mode: the
   paintings, planks and text shadows are built for a dark frame (the site is dark-first too).
   The odd :not(#ro-world) only raises specificity so it beats ro-theme.css's light selectors.
   To undo the whole look, remove the world-theme.css <link> in camping-with-blaze.html.

   Contrast: these are the app's own AA-tuned dark values (theme/index.ts darkColors).
   ============================================================ */
html:root:not(#ro-world) {
  color-scheme: dark;
  --ro-pine: #6FA87A; --ro-pine-dark: #ECE7DB; --ro-pine-soft: #3C5C45;
  --ro-ember: #D68A48; --ro-ember-text: #D57B32; --ro-moss: #8C9A80; --ro-sage: #2C332C;
  --ro-sand: #13171A; --ro-sand-alt: #1A1F1C; --ro-surface: #1E2421; --ro-surface-muted: #262D28;
  --ro-dusk: #7F9DB8; --ro-bark: #ECE7DB; --ro-bark-light: #A8A599;
  --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;
  --ro-danger-soft: #3A2724; --ro-warning-soft: #332C1D; --ro-success-soft: #21301F; --ro-info-soft: #1E2A33;
  --ro-scrim: 19,23,26; --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);
}
html, body { background: #13171A; }

/* Lighter wash so the paintings read bright, like the map. Panels carry the text. */
#scene::after, html:not(.ro-dark) #scene::after, html.ro-light #scene::after { background: rgba(19,23,26,.18) !important; }

/* Website bar: the site's own header colors (see ro-theme.css for its layout). */
.ro-header { background: #1E2421; border-bottom: 1px solid #39413A; }

/* Text that sits right on a painting gets a soft shadow so it never gets lost in the trees. */
.top h1, .top .sub, .label, .world-top h1, .skill-none, .original-campout { text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.5); }

/* ---------- Buttons: the site's buttons (components/Button.tsx) ----------
   Primary = pine fill + dark label, 8px corners. Secondary = dark with a pine edge, like the
   site's "Feature Guide" and Compass Club buttons. */
.btn, .bubble .next, .ro-btn {
  background: #6FA87A; color: #0D1013; border: 1.5px solid #6FA87A;
  border-radius: 8px; font-weight: 700; box-shadow: none;
}
.btn:active:not(:disabled), .bubble .next:active { opacity: .9; transform: translateY(-1px); }
.btn.alt, .ro-btn-ghost, .ro-btn-outline { background: #1E2421; color: #ECE7DB; border: 1.5px solid #6FA87A; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.iconbtn { background: #1E2421; color: #ECE7DB; border: 1.5px solid #6FA87A; border-radius: 8px; }

/* ---------- Panels: rounded like the map's Start panel, in the site's card colors ---------- */
.card, .cert, .bubble, .fcday {
  background: rgba(30,36,33,.97); border: 2px solid #6FA87A; color: #ECE7DB; box-shadow: var(--ro-shadow-card);
}
.card, .cert { border-radius: 20px; }
.bubble { border-radius: 20px 20px 20px 6px; border-width: 2px; }
.bubble b { color: #D6A93C; }
.bubble.yay { background: #21301F; }
.bubble.mad { background: #3A2724; border-color: #D98A7A; }
.overlay .card { border-width: 2px; }

/* Answer tiles and choices: solid panels (no glassy blur) so words read over any painting. */
.item, .choice { background: rgba(30,36,33,.96); border: 1.5px solid #6E8071; color: #ECE7DB; }
.item.good, .choice.done { background: #21301F; border-color: #6FA87A; }
.item.bad, .choice.bad { border-color: #D98A7A; }
.choice.bad { background: #3A2724; }
.chip { background: #1E2421; border-color: #6E8071; color: #ECE7DB; }
.chip.on { background: #6FA87A; border-color: #6FA87A; color: #0D1013; }
.skill-search { background: rgba(30,36,33,.97); border: 1.5px solid #6E8071; color: #ECE7DB; border-radius: 8px; }
.skill-search::placeholder { color: #A8A599; }
.meter { background: #39413A; border: 0; }
.meter > i { background: #6FA87A; }
.card, .item, .choice, .stop, .iconbtn, .btn.alt { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- Trip rows and lesson stops: wooden signs ----------
   The plank is the board from Randy's trail-sign.webp (posts trimmed off). border-image keeps
   its rough ends and nails the same size however long the row is; only the middle stretches. */
.stop {
  background: none; border: 0; border-style: solid; border-width: 16px 22px;
  border-image: url("art/map/plank.webp") 46 58 fill / 16px 22px stretch;
  padding: 0 4px; min-height: 76px; color: #2A1806; box-shadow: none;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.45));
}
.stop .t { color: #2A1806; }
.stop .t small { color: #4A3017; }
.stop .s { color: #6B3E00; letter-spacing: 1px; }
.stop .e, .stop .ro-icon-wrap { color: #2E4D20; }
.stop .ro-icon-wrap { background: rgba(255,241,206,.55); }
/* "Next" stop: a glowing pine-green ring around the sign (the site's accent). */
.stop.next { box-shadow: none; filter: drop-shadow(0 0 3px #6FA87A) drop-shadow(0 0 8px rgba(111,168,122,.85)); }

/* Stars on the result card: the site's star gold (warning token). */
.bigstars { color: #D6A93C; }
.bigstars .off { color: #4B534A; }

/* ---------- The map screen (home) ----------
   Full width: the map is the screen, like Randy's design, not a card in a column. */
body.world-home #app { max-width: 1280px; padding: 0 0 calc(env(safe-area-inset-bottom) + 12px); }
body.world-home #scene { display: none; }
.world-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #1E2421; border-bottom: 1px solid #39413A; }
.world-top h1 { flex: 1; margin: 0; font-size: clamp(20px, 3.4vw, 34px); line-height: 1.15; color: #ECE7DB; }
.world-top h1 small { display: block; font: 700 13px/18px var(--ro-font-body); color: #A8A599; text-shadow: none; }
.world-top .btn { min-height: 44px; padding: 8px 14px; }
body.world-home .amap-wrap { margin: 0; }
body.world-home .amap { border-radius: 0; box-shadow: none; }
/* Phones: the map keeps a readable size and scrolls sideways; it pans to follow Blaze. */
.amap-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.amap-scroll .amap { min-width: 760px; }
@container (max-width: 759px) {
  body.world-home .amap-wrap .panel { margin: 0; border-radius: 0; border-width: 1px 0 0; }
}
@container (max-width: 759px) {
  .amap-wrap .panel { position: static; width: auto; min-width: 0; min-height: 0; margin-top: 8px; flex-direction: row; flex-wrap: wrap; justify-content: space-between; text-align: left; padding: 10px 14px; }
  .amap-wrap .panel b { font-size: 18px; flex: 1 1 auto; }
  .amap-wrap .panel small { font-size: 12px; order: 3; flex-basis: 100%; }
  .amap-wrap .panel button { font-size: 16px; padding: 10px 18px; min-height: 46px; }
}
.amap-wrap .panel button:disabled { opacity: .75; cursor: wait; }
/* Wide map's Start panel and button in the site's colors (base styles are in camping-with-blaze.html). */
.amap-wrap .panel { background: #1E2421; border-color: #6FA87A; color: #ECE7DB; }
.amap-wrap .panel button { background: #6FA87A; color: #0D1013; border-color: #6FA87A; border-radius: 8px; }
/* Tall phones: make the map tall enough to fill the screen instead of leaving an empty band under
   it. Its width follows from the height (the painting is 1672x941), and it scrolls sideways. The
   240px is the bars above and the panel below. */
@media (orientation: portrait) {
  body.world-home .amap-scroll .amap { min-width: max(760px, calc((100dvh - 240px) * 1672 / 941)); }
}

/* ---------- Portrait map (2026-11-22, Randy's portrait assets) ----------
   Whole painting, full width, no sideways scrolling. Tags copy the pack's label style:
   cream tag, dark brown border, round dark-green pin under it. Picked stop = gold tag (the pack's
   "Pack the Essentials" style) with a pulsing pin; finished stops show the green check. */
.pmap-wrap { container-type: inline-size; }
.pmap { position: relative; width: 100%; aspect-ratio: 1122 / 1402; background: #2d4a24; overflow: hidden; }
.pmap > img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
/* The button is the tag + pin; its bottom-centre sits on the pin spot. Min 44px tall to tap. */
.ppin { position: absolute; transform: translate(-50%, calc(-100% + 2.2cqw)); display: flex; flex-direction: column; align-items: center; gap: .6cqw; background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; }
.ppin .tag { display: block; white-space: nowrap; padding: .9cqw 2.4cqw; background: #FFF1D6; color: #2A1806; border: max(2px, .55cqw) solid #3A2412; border-radius: 1.8cqw; font: 600 max(13px, 3.7cqw)/1.1 var(--ro-font-display); box-shadow: 0 .6cqw 1.4cqw rgba(0,0,0,.45); }
.ppin .dot { display: block; width: 3.2cqw; min-width: 12px; aspect-ratio: 1; border-radius: 50%; background: #1E3A24; border: max(2px, .5cqw) solid #FFF1D6; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.ppin .dot.chk { width: 5.4cqw; min-width: 20px; border: 0; background: none; box-shadow: none; }
.ppin.sel .tag { background: linear-gradient(#FFD36A, #F2B33A); }
.ppin.sel .dot:not(.chk) { background: #F3B33D; animation: amap-pulse 1.6s ease-in-out infinite; }
@keyframes amap-pulse { 50% { box-shadow: 0 0 0 6px rgba(243,179,61,.4); } }
.ppin:focus-visible { outline: 3px solid #ECE7DB; outline-offset: 3px; border-radius: 10px; }
/* Panel under the portrait map: one row, sticks to the bottom so Start is always in thumb reach. */
.pmap-wrap .panel { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px); background: #1E2421; border-top: 1px solid #39413A; color: #ECE7DB; }
.pmap-wrap .panel b { flex: 1 1 auto; font: 700 18px/1.2 var(--ro-font-display); }
.pmap-wrap .panel small { order: 3; flex-basis: 100%; font-size: 12px; color: #A8A599; }
.pmap-wrap .panel button:disabled { opacity: .75; cursor: wait; }
.pmap-wrap .panel button { font: 700 16px/1 var(--ro-font-body); color: #0D1013; background: #6FA87A; border: 1.5px solid #6FA87A; border-radius: 8px; padding: 12px 18px; min-height: 46px; cursor: pointer; }
/* First Campout option under the map. */
.world-more { display: flex; justify-content: center; padding: 14px 16px 6px; }
.world-more .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Trip maps (2026-11-22): edge to edge on phones, with rounded corners once there's room around
   it. Full-bleed by viewport math, not -16px: the page's side padding is narrower on small phones
   (camp-trips.css), and a fixed -16px made the page scroll sideways there. */
.trip-map { margin: 4px calc(50% - 50vw) 6px; }
@media (min-width: 560px) { .trip-map { margin: 4px 0 6px; } .trip-map .panel { border-radius: 0 0 var(--ro-r-lg) var(--ro-r-lg); } .trip-map .pmap { border-radius: var(--ro-r-lg) var(--ro-r-lg) 0 0; } }
/* Blaze on the portrait/trip maps (2026-11-22): feet on the point, behind the tags (z-index) so
   the words always win, and he never blocks a tap. ".pmap >" on purpose: it has to beat
   the ".pmap > img" rule that stretches the painting to fill the map. */
.pmap > .pmap-blaze { position: absolute; width: 15%; height: auto; transform: translate(-50%, -98.6%); z-index: 1; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(19,14,9,.6)); }
.ppin { z-index: 2; }

/* ---------- Blaze's instructions always on screen (Randy, 2026-11-22) ----------
   "For all pages, make sure we don't need to scroll to see the instructions." On a long level
   (Stove Safety's list, say) Blaze's bubble sat under the last answer, off the bottom of a
   phone. Now it sticks to the bottom of the screen and the answers scroll behind it, so the
   instruction and the Next button are always in view and still in thumb reach. Levels that put
   the bubble at the TOP (compass, knots, filter, pack order, release) aren't affected: this only
   applies when the bubble is the last thing on the page. */
#app > .talk:last-child {
  position: sticky; bottom: 0; z-index: 5;
  margin: 10px -16px calc(-1 * (env(safe-area-inset-bottom) + 12px));
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 10px);
  background: linear-gradient(rgba(19,23,26,0), rgba(19,23,26,.94) 26px);
}
@media (max-width: 375px) { #app > .talk:last-child { margin-inline: -9px; padding-inline: 9px; } }

/* Title bar under the map (2026-11-22): border on top instead of below; buttons side by side. */
.world-bottom { border-bottom: 0; border-top: 1px solid #39413A; flex-wrap: wrap; }
.world-bottom h1 { font-size: clamp(18px, 2.6vw, 26px); }
.world-actions { display: flex; gap: 8px; }
.world-actions .btn { min-height: 44px; padding: 8px 12px; text-decoration: none; display: inline-flex; align-items: center; font-size: 14px; }

/* Bubble on top (2026-11-22): the sticky-bottom rule above no longer applies to lessons (the bubble
   isn't the last thing on the page any more); it stays for safety. Keep a little room under it. */
#app > .talk { margin: 0 0 10px; }
/* Quiz question: reads as the question, not as one more answer button. No tappable-looking
   border, a "?" marker and larger type, sitting on a darker band. */
.card.quiz-q { background: rgba(13,16,19,.82); border: 0; border-left: 5px solid #D6A93C; border-radius: 12px; font-size: 19px !important; line-height: 1.35; padding: 14px 16px; }
/* Edge tags hang inward (2026-11-22): the pin stays on its spot, the tag shifts toward the middle. */
.ppin.edge-r { transform: translate(calc(-100% + 3cqw), calc(-100% + 2.2cqw)); align-items: flex-end; }
.ppin.edge-l { transform: translate(-3cqw, calc(-100% + 2.2cqw)); align-items: flex-start; }
