*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg-deep:   #060d1a;
  --bg-panel:  rgba(8, 18, 36, 0.94);
  --border:    rgba(255, 255, 255, 0.12);
  --text:      #e8f0fe;
  --text-rgb:  232,240,254;
  --muted:     #7a9ab8;
  --accent:    #4fc3f7;
  --accent-rgb: 79,195,247;
  --accent-strong: #0288d1;
  --accent-strong-rgb: 2,136,209;
  --accent-text: #ffffff;
  --accent-gold:#fbbc05;
  --accent-green:#34a853;
  --accent-red: #ef5350;
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.6);

  /* Design-theme tokens (shape + typography + button "personality"), independent
     of the colour tokens above - a design theme never sets --bg-*/--accent/etc,
     so it combines freely with any of the 22 colour themes, same rule WB core's
     own design_themes.css states for itself. Defaults here are exactly today's
     hardcoded values for .big-btn/.panel/.loc-setup-card, so "no design theme"
     (no body.design-<id> class) renders pixel-identical to before this existed. */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --btn-radius: 16px;
  --card-radius: 18px;
  --chip-radius: 14px;
  --panel-radius: 14px;
  --btn-shadow: 0 8px 28px rgba(var(--accent-strong-rgb),.4);
  --card-shadow: 0 8px 32px rgba(0,0,0,0.5);
  --btn-border-width: 0px;
  --btn-text-transform: none;
  --btn-letter-spacing: 0.5px;
  --btn-font-weight: 800;
}

body {
  /* Matches the canvas land colour, so a slow first paint never flashes dark. */
  background: #e9e3cc;
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* touch-action:none (overriding body's manipulation) so a horizontal
   drag-to-steer gesture (game.js, M1 drag-to-steer addendum) is never
   mistaken for a page-pan attempt before our own pointermove handler sees it. */
canvas { position: absolute; top:0; left:0; display:block; width:100%; height:100%; z-index: 1; touch-action: none; }

/* Data attribution. Required for OpenStreetMap-derived places, and only fair to
   Wikipedia for the pictures and the words. */
#dataAttrib {
  position: absolute;
  right: 6px;
  bottom: 4px;
  z-index: 200;
  font-size: 9px;
  line-height: 1.3;
  color: rgba(232,240,254,0.7);
  background: rgba(6,13,26,0.55);
  border-radius: 5px;
  padding: 3px 7px;
  pointer-events: auto;
  max-width: 70vw;
  text-align: right;
}
#dataAttrib a { color: rgba(232,240,254,0.85); text-decoration: none; }
#dataAttrib a:hover { text-decoration: underline; }

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Steering + throttle buttons (M1/M2, arcade-ification). Shared circular
   look in .arcade-btn; each control's own position is a separate class so a
   third one (M3's jump, if it ever needs a button as well as a tap) can
   reuse the base without touching these. Sit mid-height / mid-screen rather
   than the bottom corners, which #findPanel's own mobile layout (below)
   already claims full-width once the satchel has something in it.
   Provisional placement: not yet confirmed live on a real device, see
   CURRENT_STATE.md. */
.arcade-btn {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(var(--text-rgb), 0.14);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  z-index: 120;
}
.arcade-btn:active { background: rgba(var(--accent-rgb), 0.35); }

/* Box position / speed (M2): forward in the box (up) is faster, back (down)
   is slower — see update()'s own comment in game.js. Centred horizontally,
   stacked vertically. The steer-btn-left/-right pair that used to flank
   these on the edges was removed under ADR-035 (lateral steering gone). */
.throttle-btn { left: 50%; transform: translate(-50%, -50%); }
#gasBtn { top: 44%; }
#brakeBtn { top: 66%; }

.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* TOP DASHBOARD LAYOUT */
#topDash {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

/* RESOURCE PANEL */
#resourcePanel {
  width: 270px;
  padding: 10px 12px;
  flex-shrink: 0;
}

.res-block { margin-bottom: 6px; }
.res-block:last-child { margin-bottom: 0; }

.res-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.res-name { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.res-pct { font-size: 11px; font-weight: 800; color: var(--text); }

.res-row { display: flex; align-items: center; gap: 6px; }
.res-min-icon, .res-max-icon {
  font-size: 13px; flex-shrink: 0; width: 16px; text-align: center;
  line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.res-track { flex: 1; height: 6px; background: rgba(var(--text-rgb),0.08); border-radius: 3px; overflow: hidden; }
.res-fill  { height: 100%; border-radius: 3px; transition: width .4s ease, background .4s ease; }
.res-fill.fuel   { background: linear-gradient(90deg,#1a7a38,#34a853); }
.res-fill.hunger { background: linear-gradient(90deg,#c68200,#fbbc05); }
.res-fill.tired  { background: linear-gradient(90deg,#6a2fa0,#9b5de5); }

/* GPS & DECISION CENTER */
#gpsCenter {
  flex: 1;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.gps-panel {
  padding: 8px 16px;
  text-align: center;
  border: 1.5px solid rgba(var(--accent-rgb),0.45);
  background: var(--bg-panel);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(var(--accent-rgb),0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gps-icon {
  font-size: 16px;
  color: var(--accent);
  animation: pulseGps 2s infinite ease-in-out;
}
@keyframes pulseGps { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.15); } }

#goalText { 
  font-size: 14px; font-weight: 800; color: var(--text); letter-spacing: 0.2px; text-shadow: 0 2px 4px rgba(0,0,0,0.6); 
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* DECISION WRAPPER & CARDS */
#decisionWrap {
  width: 100%;
  display: none;
  pointer-events: auto;
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#decisionTitle {
  text-align: center; font-size: 10px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
#decisionOptions { display: flex; gap: 8px; justify-content: center; }

.dec-btn {
  flex: 1;
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(var(--text-rgb),0.15);
  border-radius: 14px;
  padding: 8px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  min-width: 100px;
  max-width: 200px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.dec-btn:hover, .dec-btn:active {
  border-color: var(--accent);
  background: var(--bg-panel);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(var(--accent-rgb),0.3);
}
.dec-btn.hl { border-color: rgba(251,188,5,0.7); }

/* Real Photo Container in Card */
.dec-img-wrap {
  width: 100%;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
  background: rgba(0,0,0,0.4);
}
.dec-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.dec-btn:hover .dec-img { transform: scale(1.08); }
.dec-icon-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 14px;
  line-height: 1;
}

.dec-name { font-size: 12px; font-weight: 800; line-height: 1.2; text-align: center; color: var(--text); }
.dec-sub  { font-size: 10px; color: var(--muted); margin-top: 2px; }
.dec-dir  { font-size: 10px; color: var(--accent); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-top: 3px; }
.dec-pts  { font-size: 10px; color: var(--accent-gold); font-weight: 700; margin-top: 2px; }

.dec-timer { height: 4px; background: rgba(var(--text-rgb),0.08); border-radius: 2px; margin-top: 6px; overflow: hidden; width: 100%; }
.dec-timer-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 2px; transition: width .12s linear; }

/* RIGHT STATS & SPEEDO */
#rightStats {
  display: flex; gap: 8px; flex-shrink: 0;
}

.chip { padding: 6px 12px; text-align: center; border-radius: var(--chip-radius); }
.chip-label { font-size: 8px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.chip-value { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.2; }

#speedo { padding: 6px 12px; display: flex; align-items: center; gap: 8px; }
.speed-sign {
  width: 28px; height: 28px; background: #fff; border: 2.5px solid #e53935;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900; color: #000;
}
.speed-num { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1; }
.speed-unit { font-size: 8px; color: var(--muted); font-weight: 600; letter-spacing: 1px; }

/* NOTIFICATIONS */
#notifs {
  position: absolute;
  top: 130px;
  right: 12px;
  width: 260px;
  pointer-events: none;
  z-index: 110;
}
.notif {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-left: 3px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: slideIn .25s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateX(16px)} to{opacity:1;transform:translateX(0)} }
.notif-title { font-size: 11px; font-weight: 800; color: var(--text); }
.notif-body  { font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.3; }

@keyframes warn { 0%,100%{opacity:1} 50%{opacity:.3} }
.warning { animation: warn .7s ease-in-out infinite; color: var(--accent-red) !important; }

/* OVERLAY SCREENS */
.overlay-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
}

#startScreen {
  background: var(--bg-deep);
}

/* Sticky header/footer shell shared with the rest of the suite (On The Road,
   Car Bingo) so Explorer reads as the same mobile app when a traveller moves
   between modules (Joakim, 2026-08-23) - same shape as CB's .cb-topbar/
   .cb-bottombar, which itself mirrors WB core's OTR mobile shell. Both bars
   are plain flex children of .overlay-screen, not overlays: sticky only pins
   them to the viewport edges while .overlay-body scrolls past underneath, it
   never covers content. Built on Explorer's own theme tokens (ADR-019), not a
   separate palette, so all 22 suite themes reach this chrome too. Start
   screen only for the Guide link - the game-over screen keeps the exclusion
   .guide-link's own history already established (see below); the module
   switcher is new and applies to both, since "where to go next" fits someone
   who just finished exactly as well as someone arriving. */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  min-height: 52px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}
.app-topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text);
}

/* Groups the lang switch + Guide link as one right-hand cluster (2026-09-04)
   so .app-topbar's own justify-content:space-between still reads as a
   two-way split (title vs. actions) with a third item added, not three items
   spread apart — same reasoning WB Car Bingo's .cb-topbar-actions states for
   its identical pairing. */
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Suite-wide language switch (2026-09-04) — every sibling module already has
   one (Car Bingo's .cb-lang-switch was the reference); Explorer was the odd
   one out, relying entirely on WB core's outbound ?lang= link and an
   account preference, with no way to change language from inside the app
   itself. data-lang drives js/i18n.js's setLanguage() directly; the "active"
   state is kept in sync by that same file's syncLanguageSwitchButtons(),
   called from every language-changing code path (click here, ?lang= on
   load, or an account preference) rather than duplicated per call site — see
   that function's own comment for the bug this avoids. */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-deep);
  flex: 0 0 auto;
}
.lang-switch-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.lang-switch-btn:hover, .lang-switch-btn:focus-visible { color: var(--text); }
.lang-switch-btn.active {
  background: var(--accent);
  color: var(--accent-text);
}

.overlay-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Reserves the sticky .app-bottombar's own footprint at the end of the
     scrollable content, so content growing at runtime (the Google/Microsoft
     auth-providers dropdown, opened via JS after load) always has room to
     scroll fully above the bar instead of sitting *behind* it - sticky
     positioning keeps the bar pinned to the viewport, it doesn't reserve
     space for itself against a centered flex sibling that later overflows.
     Found live on a real phone, 2026-08-31: the dropdown, closed at load so
     the overflow this guards against never happened until a user opened it.
     Matches .app-bottombar's own min-height + safe-area bottom padding. */
  padding-bottom: calc(20px + 64px + env(safe-area-inset-bottom));
}

.app-bottombar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex: 0 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  min-height: 64px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
}
.app-bottombar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 2px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.app-bottombar-link span { font-size: 1.3rem; line-height: 1; }
.app-bottombar-link:hover,
.app-bottombar-link:focus-visible {
  color: var(--text);
  background: rgba(var(--accent-rgb),0.1);
}

.logo-sub {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  text-align: center;
}

/* Lives in .app-topbar now (2026-08-23), not on the logo's own line - the sticky
   header shared with the rest of the suite gave every screen a natural corner to
   hang it off, the thing the original 2026-08-16 placement was working around not
   having. Still start screen only: the HUD during play is pointer-events:none by
   design and the game should not compete with itself for attention, and the
   game-over screen was considered and left alone - someone who just finished is
   choosing between playing again and leaving, not reading documentation. */
.guide-link {
  background: rgba(var(--accent-rgb),0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  /* 11px vertical lands this on exactly 44px - the same target every Guide button in
     the suite gives a thumb. Measured; 12px came out at 46. */
  padding: 11px 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.guide-link:hover,
.guide-link:focus-visible {
  background: rgba(var(--accent-rgb),0.18);
  border-color: var(--accent);
  color: var(--text);
}

/* REAL WORLD LOCATION SETUP BOX ON START SCREEN */
.loc-setup-card {
  background: rgba(var(--text-rgb),0.04);
  border: 1px solid rgba(var(--accent-rgb),0.3);
  border-radius: var(--card-radius);
  padding: 16px 20px;
  width: 100%;
  max-width: 520px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
}

.loc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.loc-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.gps-btn {
  background: rgba(var(--accent-rgb),0.15);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gps-btn:hover { background: rgba(var(--accent-rgb),0.3); transform: translateY(-1px); }

/* Login lives in its own footer row near the bottom of the screen
   (2026-08-23), aligned with where the rest of the suite puts account state -
   a quiet text row plus a quiet delete-account action, not a pill button of
   its own any more. One account across the suite rather than a picker of its
   own (ADR-020). Shape and tone copied from WB Car Bingo's .cb-auth-widget/
   .cb-auth-status/.cb-auth-delete (2026-08-23), same suite-consistency
   reasoning as the topbar/bottombar shell above. */
.account-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  /* Positioned ancestor for #authProviders (2026-09-04) — see that rule's
     own comment for why it pops upward from here instead of sitting in flow. */
  position: relative;
}
.auth-status-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 0;
  cursor: pointer;
  text-align: left;
}
.auth-status-btn:hover, .auth-status-btn:focus-visible { color: var(--text); }

/* Quiet, not red - this button does something irreversible, but looking at it
   isn't the dangerous part, so it doesn't need to shout (same reasoning Car
   Bingo's own version states). */
.auth-delete-btn {
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  flex: 0 0 auto;
}
.auth-delete-btn:hover { background: rgba(var(--accent-rgb),0.15); }
.auth-delete-btn[hidden] { display: none; }

/* Anchored popup, not in-flow content (2026-09-04, found live). This used to
   sit in normal document flow below .account-footer, pushing whatever came
   after it downward — harmless while it only held two OAuth buttons, but the
   local-login form's own two extra inputs made it taller than the room
   actually left above the sticky .app-bottombar on this start screen, which
   the app deliberately never scrolls (body is overflow:hidden, a fixed
   one-viewport layout). The result: the submit button laid out *behind* the
   bottombar with no way to reach it — confirmed with elementFromPoint(), not
   just by eye. Same failure class backlog item 513251a2 already found once
   here (that one was width, this one height). Fixed the way WB Open Places'
   identical popover already solves it: position:absolute, bottom:100% of
   .account-footer (its new positioned ancestor, see that rule), so it grows
   upward from the login button instead of pushing page content down —
   structurally incapable of colliding with the bottombar regardless of how
   tall its content gets. max-height + overflow-y stay as a second line of
   defence for a very short viewport, same pattern .saved-finds-list uses. */
.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  max-height: min(280px, calc(100vh - 96px));
  overflow-y: auto;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: 8px;
  padding: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 30;
}
/* The class above sets its own display, which otherwise beats the browser's
   default [hidden]{display:none} — same fix #findPanel already needed. */
.auth-providers[hidden] { display: none; }
.auth-oauth-row {
  display: flex;
  gap: 8px;
}
.auth-provider-btn {
  background: rgba(var(--accent-rgb),0.15);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}
.auth-provider-btn:hover { background: rgba(var(--accent-rgb),0.3); }

/* Local WB-account login (cross-suite backlog 9e9d40d1) — email/password
   against the same shared account project the OAuth buttons above already
   reach. Ported from WB Open Places' identical form (backlog ae060481),
   restyled with Explorer's own tokens rather than copied verbatim. */
.auth-local-divider {
  border: 0;
  border-top: 1px dashed var(--border);
  margin: 0;
  width: 100%;
}
.auth-local-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-local-input {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 7px 8px;
  width: 100%;
}
.auth-local-input:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.auth-local-submit {
  flex: none;
}
.auth-local-error {
  color: var(--accent-red);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}
.auth-local-error[hidden] { display: none; }

.saved-finds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.loc-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  background: rgba(0,0,0,0.3);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-hints { font-size: 11px; color: var(--muted); margin-bottom: 16px; text-align: center; }
.key-hints kbd {
  display: inline-block; background: rgba(var(--text-rgb),0.08);
  border: 1px solid rgba(var(--text-rgb),0.18); border-radius: 4px;
  padding: 1px 6px; font-size: 10px; font-family: inherit; color: var(--accent);
}

.big-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: var(--btn-border-width) solid var(--accent-strong);
  border-radius: var(--btn-radius); padding: 16px 48px; font-size: 17px;
  font-weight: var(--btn-font-weight); text-transform: var(--btn-text-transform);
  color: var(--accent-text); cursor: pointer; font-family: var(--font-body);
  letter-spacing: var(--btn-letter-spacing); transition: all .2s ease;
  box-shadow: var(--btn-shadow);
}
.big-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(var(--accent-strong-rgb),.6); }

/* Secondary variant (ADR-035): an outline rather than the filled primary
   gradient, so a prototype entry point reads as a lesser, experimental
   choice next to the real "start the game" button, not a competing one. */
.big-btn.secondary {
  background: transparent; color: var(--text);
  box-shadow: none; margin-top: 10px; text-decoration: none;
  display: inline-block;
}
.big-btn.secondary:hover { box-shadow: 0 8px 24px rgba(var(--text-rgb),.18); }

/* GAME OVER SCREEN & VISITED TRAVEL LOG */
#gameOverScreen {
  background: var(--bg-deep); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px); display: none;
  padding: 24px 16px;
}
.go-title {
  font-size: 44px; font-weight: 900; letter-spacing: -1px;
  font-family: var(--font-heading);
  background: linear-gradient(135deg,#4fc3f7,#9b5de5);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 4px; text-align: center;
}
#goReason { font-size: 15px; color: var(--muted); max-width: 440px; text-align: center; margin-bottom: 20px; }

.score-box {
  background: rgba(var(--text-rgb),0.04); border: 1px solid rgba(var(--text-rgb),0.1);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow);
  padding: 16px 36px; text-align: center; margin-bottom: 20px;
}
.score-label { font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.score-big   { font-size: 56px; font-weight: 900; color: var(--text); letter-spacing: -1px; line-height: 1; }
.score-unit  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.score-stats { display: flex; gap: 24px; margin-top: 14px; justify-content: center; }
.score-stat  { text-align: center; }
.ss-val { font-size: 22px; font-weight: 800; color: var(--accent); }
.ss-lbl { font-size: 9px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

/* VISITED TRAVEL LOG SECTION */
.visited-card {
  width: 100%;
  max-width: 580px;
  background: rgba(var(--text-rgb),0.03);
  border: 1px solid rgba(var(--accent-rgb),0.3);
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}
.visited-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.visited-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.copy-btn {
  background: rgba(var(--accent-rgb),0.15);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.copy-btn:hover { background: rgba(var(--accent-rgb),0.3); }

.visited-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.visited-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(var(--text-rgb),0.08);
  border-radius: 10px;
  padding: 8px 12px;
}
.visited-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.visited-info { flex: 1; }
.visited-name { font-size: 12px; font-weight: 800; color: var(--text); }
.visited-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* MOBILE RESPONSIVE MEDIA QUERIES (< 768px) */
@media (max-width: 768px) {
  #topDash {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    top: 8px; left: 8px; right: 8px;
  }

  #resourcePanel {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
  }
  .res-block { flex: 1; margin-bottom: 0; }
  .res-name { font-size: 8px; letter-spacing: 0.5px; }
  .res-pct { font-size: 10px; }
  .res-track { height: 5px; }

  #gpsCenter { max-width: 100%; order: 2; }
  .gps-panel { padding: 6px 12px; }
  #goalText { font-size: 12px; }

  #rightStats {
    justify-content: space-between;
    width: 100%;
    order: 3;
  }
  .chip { flex: 1; padding: 4px 8px; }
  .chip-value { font-size: 14px; }
  #speedo { padding: 4px 8px; }
  .speed-num { font-size: 16px; }

  #decisionWrap {
    position: fixed;
    bottom: 12px;
    left: 8px;
    right: 8px;
    width: auto;
    z-index: 150;
  }
  #decisionOptions { gap: 6px; }
  .dec-btn { min-width: 0; padding: 6px; border-radius: 12px; }
  .dec-img-wrap { height: 54px; margin-bottom: 4px; }
  .dec-name { font-size: 10px; }
  .dec-sub  { font-size: 9px; }
  .dec-dir  { font-size: 9px; }

  .logo-sub { font-size: 12px; margin-bottom: 16px; }
  .loc-setup-card { padding: 12px 14px; margin-bottom: 16px; }
  /* Matches WB core's #calcBtn exactly (measured live, 2026-08-23): same
     thickness across the suite's primary mobile action button. */
  .big-btn { padding: 7px 9px; font-size: 13px; width: 100%; }
}

/* ── WAYBOUND EXPLORER: new elements after the rebuild ───────────────── */

.loc-note {
  font-size: 11px; line-height: 1.45; color: var(--muted);
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(var(--text-rgb),0.08);
}

.disclaimer {
  max-width: 520px; margin-top: 18px;
  font-size: 10.5px; line-height: 1.5; text-align: center;
  color: var(--muted);
  background: rgba(var(--text-rgb),0.04);
  border: 1px solid rgba(var(--text-rgb),0.08);
  border-radius: 10px; padding: 9px 14px;
}
.disclaimer strong { color: var(--accent); }

/* Hero crest above the start screen's own subtitle — Joakim's own asset,
   2026-08-31, delivered alongside the OutRun pivot. */
.hero-logo { display: block; max-width: 200px; width: 100%; height: auto; margin: 0 auto 4px; }

/* The classic top-down game's own way in, after the OutRun pivot demoted
   it from the start screen's main button — Joakim's own explicit call:
   keep the code and a way to reach it, but not as a second big-btn
   competing for attention. A plain small link, not styled like a button
   at all. */
.classic-link {
  display: block; margin: 6px auto 0; padding: 4px 8px;
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--muted); text-decoration: underline;
  text-underline-offset: 2px;
}
.classic-link:hover, .classic-link:focus-visible { color: var(--text); }

/* Decision cards now carry a live description under the name. */
.dec-desc {
  font-size: 9.5px; line-height: 1.35; color: var(--muted);
  margin-top: 3px; min-height: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.dec-icon-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: rgba(var(--text-rgb),0.05);
}

/* Travel log entries carry the true distance from the start point. */
.visited-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: rgba(var(--text-rgb),0.06); border-radius: 8px;
}
.visited-dist { font-size: 10px; color: var(--accent); margin-top: 3px; font-weight: 700; }
.visited-empty { text-align: center; color: var(--muted); font-size: 12px; padding: 14px; }

@media (max-width: 768px) {
  .disclaimer { font-size: 9.5px; padding: 8px 11px; }
  .dec-desc { display: none; }
}

/* Commons licences want the photographer credited, so the credit sits on the
   picture it belongs to rather than in a footnote nobody reads. */
.dec-credit {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 7.5px; line-height: 1.3; padding: 2px 4px;
  color: rgba(var(--text-rgb),0.82);
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── THE SATCHEL: finds accumulating during play ─────────────────────── */

#findPanel {
  position: absolute;
  top: 96px;
  right: 12px;
  width: 232px;
  max-height: 46vh;
  padding: 8px 6px 6px 10px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  z-index: 110;
}
#findPanel[hidden] { display: none; }

.find-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-right: 4px; margin-bottom: 6px; flex-shrink: 0;
}
.find-title {
  font-size: 9px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted);
}
.find-count {
  font-size: 11px; font-weight: 800; color: var(--accent);
  background: rgba(var(--accent-rgb),0.14); border-radius: 6px; padding: 1px 7px;
}

.find-list { overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 4px; }
.find-list::-webkit-scrollbar { width: 4px; }
.find-list::-webkit-scrollbar-thumb { background: rgba(var(--text-rgb),0.18); border-radius: 2px; }

.find-item {
  display: flex; align-items: center; gap: 7px;
  background: rgba(var(--text-rgb),0.045);
  border: 1px solid rgba(var(--text-rgb),0.07);
  border-radius: 8px; padding: 4px 6px;
  animation: findIn .35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes findIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.find-thumb {
  width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
}
.find-thumb-icon {
  width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: rgba(var(--text-rgb),0.07);
}
.find-text { min-width: 0; }
.find-name {
  font-size: 10.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.find-dist { font-size: 9px; color: var(--accent); margin-top: 1px; }

@media (max-width: 768px) {
  /* On a phone the dashboard already stacks; the satchel goes below it, low and wide. */
  #findPanel {
    top: auto; bottom: 8px; left: 8px; right: 8px;
    width: auto; max-height: 22vh;
  }
  .find-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .find-item { flex-shrink: 0; max-width: 150px; }
}

/* ── THEME: the HUD chrome follows WB core's palette, the world does not ──────
   The floating panels above (gauges, decision cards, notifications, satchel,
   both overlay screens) read these tokens. The canvas world in renderer.js
   does not and is not meant to - it is a deliberately pale khaki terrain-map
   palette, unrelated to this system; see ADR-019 in DECISIONS.md for why the
   two were kept separate and what "themed" means here specifically (the whole
   light/dark mode per theme, not just an accent-colour swap - also decided,
   not assumed).

   One block per WB core theme id, values read from their own themes.css
   (styles/themes.css there), not re-designed here - so this can never drift
   from what the picker itself offers. body.theme-<id> is WB core's own
   application mechanism, reused rather than inventing a second one; js/i18n.js
   applies the class after validating an incoming ?theme= against this exact
   set of ids. --accent-gold/--accent-green/--accent-red stay constant across
   every block on purpose: fuel, hunger and tired-warning colours carry meaning
   (danger, caution) that a decorative theme swap must not reinterpret. */

body.theme-sand {
  --bg-deep: #f8f1e7;
  --bg-panel: rgba(251, 246, 238, 0.94);
  --border: #ddc7a3;
  --text: #3a2c1a;
  --text-rgb: 58,44,26;
  --muted: #8a7355;
  --accent: #c08a4e;
  --accent-rgb: 192,138,78;
  --accent-strong: #9c6b34;
  --accent-strong-rgb: 156,107,52;
  --accent-text: #111111;
}

body.theme-sun {
  --bg-deep: #fffbea;
  --bg-panel: rgba(255, 253, 243, 0.94);
  --border: #f0d97a;
  --text: #211a02;
  --text-rgb: 33,26,2;
  --muted: #7a6a1f;
  --accent: #eab308;
  --accent-rgb: 234,179,8;
  --accent-strong: #ca8a04;
  --accent-strong-rgb: 202,138,4;
  --accent-text: #111111;
}

body.theme-asphalt {
  --bg-deep: #1f2937;
  --bg-panel: rgba(17, 24, 39, 0.94);
  --border: #374151;
  --text: #e5e7eb;
  --text-rgb: 229,231,235;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-rgb: 56,189,248;
  --accent-strong: #0ea5e9;
  --accent-strong-rgb: 14,165,233;
  --accent-text: #111111;
}

body.theme-mountain {
  --bg-deep: #f4f5f6;
  --bg-panel: rgba(249, 250, 251, 0.94);
  --border: #cdd2d8;
  --text: #1c2126;
  --text-rgb: 28,33,38;
  --muted: #5b6670;
  --accent: #64748b;
  --accent-rgb: 100,116,139;
  --accent-strong: #475569;
  --accent-strong-rgb: 71,85,105;
  --accent-text: #ffffff;
}

body.theme-air {
  --bg-deep: #f7fbff;
  --bg-panel: rgba(251, 253, 255, 0.94);
  --border: #d7e7f5;
  --text: #10202f;
  --text-rgb: 16,32,47;
  --muted: #5b7186;
  --accent: #7dd3fc;
  --accent-rgb: 125,211,252;
  --accent-strong: #38bdf8;
  --accent-strong-rgb: 56,189,248;
  --accent-text: #111111;
}

body.theme-sea {
  --bg-deep: #e8f0fb;
  --bg-panel: rgba(238, 244, 252, 0.94);
  --border: #a9c3e0;
  --text: #0b1e3a;
  --text-rgb: 11,30,58;
  --muted: #3d5776;
  --accent: #1d4ed8;
  --accent-rgb: 29,78,216;
  --accent-strong: #1e3a8a;
  --accent-strong-rgb: 30,58,138;
  --accent-text: #ffffff;
}

body.theme-grass {
  --bg-deep: #eef7ea;
  --bg-panel: rgba(243, 250, 240, 0.94);
  --border: #b7dba7;
  --text: #10250c;
  --text-rgb: 16,37,12;
  --muted: #4c6b41;
  --accent: #16a34a;
  --accent-rgb: 22,163,74;
  --accent-strong: #15803d;
  --accent-strong-rgb: 21,128,61;
  --accent-text: #111111;
}

body.theme-moss {
  --bg-deep: #eaf0e6;
  --bg-panel: rgba(238, 243, 234, 0.94);
  --border: #a7bf98;
  --text: #10180c;
  --text-rgb: 16,24,12;
  --muted: #47543d;
  --accent: #3f6212;
  --accent-rgb: 63,98,18;
  --accent-strong: #2d4a0d;
  --accent-strong-rgb: 45,74,13;
  --accent-text: #ffffff;
}

body.theme-lingonberry {
  --bg-deep: #fbecec;
  --bg-panel: rgba(253, 241, 241, 0.94);
  --border: #e8a8a8;
  --text: #2a0a0a;
  --text-rgb: 42,10,10;
  --muted: #7a4040;
  --accent: #b91c1c;
  --accent-rgb: 185,28,28;
  --accent-strong: #7f1414;
  --accent-strong-rgb: 127,20,20;
  --accent-text: #ffffff;
}

body.theme-rose {
  --bg-deep: #fdf0f5;
  --bg-panel: rgba(254, 244, 248, 0.94);
  --border: #f0b8cf;
  --text: #2f0a1a;
  --text-rgb: 47,10,26;
  --muted: #834b64;
  --accent: #db2777;
  --accent-rgb: 219,39,119;
  --accent-strong: #9d174d;
  --accent-strong-rgb: 157,23,77;
  --accent-text: #ffffff;
}

body.theme-lavender {
  --bg-deep: #f4f0fb;
  --bg-panel: rgba(248, 244, 253, 0.94);
  --border: #cbb8ea;
  --text: #1f1230;
  --text-rgb: 31,18,48;
  --muted: #6b5c8a;
  --accent: #9061c9;
  --accent-rgb: 144,97,201;
  --accent-strong: #6d3fa8;
  --accent-strong-rgb: 109,63,168;
  --accent-text: #ffffff;
}

body.theme-rest {
  --bg-deep: #ede7f5;
  --bg-panel: rgba(241, 236, 248, 0.94);
  --border: #b39cd0;
  --text: #170c26;
  --text-rgb: 23,12,38;
  --muted: #5a4a73;
  --accent: #6d28d9;
  --accent-rgb: 109,40,217;
  --accent-strong: #4c1d95;
  --accent-strong-rgb: 76,29,149;
  --accent-text: #ffffff;
}

body.theme-pathfinder {
  /* Background family resynced 2026-08-26 (ADR-037) - WB core donated
     theme-asphalt's blue-slate background to Pathfinder 2026-08-24 (own
     comment: Pathfinder's native grey was "tråkig", Joakim). Only the
     structural background/border changed; accent/text/muted did not. */
  --bg-deep: #1f2937;
  --bg-panel: rgba(17, 24, 39, 0.94);
  --border: #374151;
  --text: #e5f9ff;
  --text-rgb: 229,249,255;
  --muted: #8a9a9d;
  --accent: #00f3ff;
  --accent-rgb: 0,243,255;
  --accent-strong: #00c4cc;
  --accent-strong-rgb: 0,196,204;
  --accent-text: #111111;
}

body.theme-nomad {
  /* Background family resynced 2026-08-26 (ADR-037) - WB core donated
     theme-grass's richer green background to Nomad 2026-08-24 (own comment:
     Nomad's native cream measured 31.3% saturation vs Grass's 44.8%). Only
     the structural background/border changed; accent/text/muted did not. */
  --bg-deep: #eef7ea;
  --bg-panel: rgba(243, 250, 240, 0.94);
  --border: #b7dba7;
  --text: #33402f;
  --text-rgb: 51,64,47;
  --muted: #6b7a63;
  --accent: #6bbf71;
  --accent-rgb: 107,191,113;
  --accent-strong: #4a5c48;
  --accent-strong-rgb: 74,92,72;
  --accent-text: #111111;
}

body.theme-overlander {
  --bg-deep: #1e1e1e;
  --bg-panel: rgba(35, 35, 35, 0.94);
  --border: #3a3d40;
  --text: #f5ede1;
  --text-rgb: 245,237,225;
  --muted: #9a9a9a;
  --accent: #ff8a00;
  --accent-rgb: 255,138,0;
  --accent-strong: #cc6e00;
  --accent-strong-rgb: 204,110,0;
  --accent-text: #111111;
}

body.theme-grandtourer {
  /* Background family and accent-text resynced 2026-08-26 (ADR-037) - WB
     core donated theme-sun's saturated gold background to Grand Tourer
     2026-08-24 (own comment: the native near-white background read "blek"
     against its own gold accent, Joakim). accent-text also changed from
     plain black to a WCAG-picked warm bronze (#4c3e10, measures 4.98:1) -
     WB core found #111111 on #d4af37 (2.10:1) fails AA. Only the structural
     background/border/accent-text changed; accent/text/muted did not. */
  --bg-deep: #fffbea;
  --bg-panel: rgba(255, 253, 243, 0.94);
  --border: #f0d97a;
  --text: #1a1f36;
  --text-rgb: 26,31,54;
  --muted: #5e5e65;
  --accent: #d4af37;
  --accent-rgb: 212,175,55;
  --accent-strong: #a5842a;
  --accent-strong-rgb: 165,132,42;
  --accent-text: #4c3e10;
}

body.theme-sunrise {
  --bg-deep: #fff2e6;
  --bg-panel: rgba(255, 250, 245, 0.94);
  --border: #ffd0a8;
  --text: #3a2318;
  --text-rgb: 58,35,24;
  --muted: #9c7a63;
  --accent: #f86f61;
  --accent-rgb: 248,111,97;
  --accent-strong: #e2503f;
  --accent-strong-rgb: 226,80,63;
  --accent-text: #111111;
}

body.theme-explorer {
  --bg-deep: #f2efe3;
  --bg-panel: rgba(250, 248, 240, 0.94);
  --border: #c9c2a0;
  --text: #333d24;
  --text-rgb: 51,61,36;
  --muted: #767a5c;
  --accent: #6f8f3f;
  --accent-rgb: 111,143,63;
  --accent-strong: #556b2f;
  --accent-strong-rgb: 85,107,47;
  --accent-text: #111111;
}

body.theme-alpine {
  --bg-deep: #f5f9fc;
  --bg-panel: rgba(255, 255, 255, 0.94);
  --border: #c7d6e2;
  --text: #1c2b36;
  --text-rgb: 28,43,54;
  --muted: #5b7182;
  --accent: #c62828;
  --accent-rgb: 198,40,40;
  --accent-strong: #8e1c1c;
  --accent-strong-rgb: 142,28,28;
  --accent-text: #ffffff;
}

body.theme-coastline {
  --bg-deep: #eef6fa;
  --bg-panel: rgba(255, 255, 255, 0.94);
  --border: #bcdbe9;
  --text: #0f2d3a;
  --text-rgb: 15,45,58;
  --muted: #4f7686;
  --accent: #0077b6;
  --accent-rgb: 0,119,182;
  --accent-strong: #00557f;
  --accent-strong-rgb: 0,85,127;
  --accent-text: #ffffff;
}

body.theme-campfire {
  --bg-deep: #241a14;
  --bg-panel: rgba(43, 32, 24, 0.94);
  --border: #4a3626;
  --text: #f5e6d3;
  --text-rgb: 245,230,211;
  --muted: #a98a6c;
  --accent: #ff8c42;
  --accent-rgb: 255,140,66;
  --accent-strong: #cc6a26;
  --accent-strong-rgb: 204,106,38;
  --accent-text: #111111;
}

body.theme-vanlifer {
  --bg-deep: #eef7f7;
  --bg-panel: rgba(255, 255, 255, 0.94);
  --border: #bfe3e1;
  --text: #0f3d3c;
  --text-rgb: 15,61,60;
  --muted: #4f7d7a;
  --accent: #0fa3b1;
  --accent-rgb: 15,163,177;
  --accent-strong: #0a7580;
  --accent-strong-rgb: 10,117,128;
  --accent-text: #111111;
}

/* ── Design themes (shape + typography + button "personality") ──────────
   Values copied straight from WB core's web/styles/design_themes.css, not
   redesigned here - same reasoning ADR-019 already gives for the colour
   themes above, extended to a second, independent dimension (Joakim,
   2026-08-23). Applied via body.design-<id>, set by js/i18n.js. Ten active
   ids, all of which already exist as colour-theme names above too - WB
   core's own picker pairs each design theme with the identically-named
   colour theme by default (see its settings.js saveDesignThemePicker), but
   the two are read and applied independently here, same as everywhere else
   in the suite. "No class" (Standard) renders exactly as before this
   existed - see the :root defaults it falls back to.

   2026-08-26 (ADR-037 resync): "Overlander" and "Alpine" were retired from
   the active roster 2026-08-24, replaced by "Waybound" (WB core's new
   suite-wide default) and "Purple Haze". Their blocks stay defined below,
   just excluded from js/i18n.js's VALID_DESIGN_THEMES - a traveller whose
   account still carries the old id is migrated to a live replacement by
   DESIGN_THEME_LEGACY_MAP there, not left on these unreachable classes. */

body.design-pathfinder {
  --font-heading: "Roboto Mono", ui-monospace, monospace;
  --font-body: "Roboto Mono", ui-monospace, monospace;
  --btn-radius: 2px;
  --card-radius: 2px;
  --chip-radius: 2px;
  --panel-radius: 2px;
  --btn-shadow: none;
  --card-shadow: none;
  --btn-border-width: 2px;
  --btn-text-transform: uppercase;
  --btn-letter-spacing: 0.04em;
  --btn-font-weight: 700;
}
/* Matches button.primary's own text colour (WB core's themes.css), not --accent -
   the button's background IS --accent, so accent-coloured brackets would vanish
   against it. */
body.design-pathfinder .big-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
body.design-pathfinder .big-btn::before,
body.design-pathfinder .big-btn::after {
  color: var(--accent-text);
  font-weight: 700;
}
body.design-pathfinder .big-btn::before { content: "[ "; }
body.design-pathfinder .big-btn::after { content: " ]"; }

body.design-nomad {
  --font-heading: "Lora", Georgia, serif;
  --font-body: "Open Sans", -apple-system, sans-serif;
  --btn-radius: 18px;
  --card-radius: 18px;
  --chip-radius: 16px;
  --panel-radius: 16px;
  --btn-shadow: none;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --btn-border-width: 2px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 600;
}

body.design-vanlifer {
  --font-heading: "Manrope", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --btn-radius: 999px;
  --card-radius: 20px;
  --chip-radius: 999px;
  --panel-radius: 20px;
  --btn-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 700;
}

/* RETIRED 2026-08-24 (ADR-037) from js/i18n.js's active VALID_DESIGN_THEMES -
   kept defined for a possible revival, matching WB core's own treatment.
   DESIGN_THEME_LEGACY_MAP there resolves a stored "overlander" to "campfire". */
body.design-overlander {
  --font-heading: "Montserrat", -apple-system, sans-serif;
  --font-body: "Montserrat", -apple-system, sans-serif;
  --btn-radius: 4px;
  --card-radius: 4px;
  --chip-radius: 4px;
  --panel-radius: 4px;
  --btn-shadow: none;
  --card-shadow: none;
  --btn-border-width: 2px;
  --btn-text-transform: uppercase;
  --btn-letter-spacing: 0.03em;
  --btn-font-weight: 700;
}

body.design-grandtourer {
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Lato", -apple-system, sans-serif;
  --btn-radius: 10px;
  --card-radius: 10px;
  --chip-radius: 10px;
  --panel-radius: 10px;
  --btn-shadow: 0 1px 3px rgba(26, 31, 54, 0.12);
  --card-shadow: 0 2px 8px rgba(26, 31, 54, 0.08);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: 0.02em;
  --btn-font-weight: 600;
}

body.design-sunrise {
  --font-heading: "Poppins", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --btn-radius: 14px;
  --card-radius: 14px;
  --chip-radius: 14px;
  --panel-radius: 14px;
  --btn-shadow: 0 3px 8px rgba(248, 111, 97, 0.18);
  --card-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 700;
}

body.design-explorer {
  --font-heading: "IBM Plex Sans", -apple-system, sans-serif;
  --font-body: "IBM Plex Mono", ui-monospace, monospace;
  --btn-radius: 6px;
  --card-radius: 6px;
  --chip-radius: 6px;
  --panel-radius: 6px;
  --btn-shadow: none;
  --card-shadow: none;
  --btn-border-width: 2px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 600;
}

/* RETIRED 2026-08-24 (ADR-037) from js/i18n.js's active VALID_DESIGN_THEMES -
   kept defined for a possible revival, matching WB core's own treatment.
   DESIGN_THEME_LEGACY_MAP there resolves a stored "alpine" to "purplehaze". */
body.design-alpine {
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, sans-serif;
  --btn-radius: 4px;
  --card-radius: 4px;
  --chip-radius: 4px;
  --panel-radius: 4px;
  --btn-shadow: none;
  --card-shadow: 0 1px 2px rgba(28, 43, 54, 0.06);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 600;
}

body.design-coastline {
  --font-heading: "Nunito", -apple-system, sans-serif;
  --font-body: "Work Sans", -apple-system, sans-serif;
  --btn-radius: 16px;
  --card-radius: 16px;
  --chip-radius: 16px;
  --panel-radius: 16px;
  --btn-shadow: 0 2px 6px rgba(0, 119, 182, 0.15);
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 700;
}

body.design-campfire {
  --font-heading: "Merriweather", Georgia, serif;
  --font-body: "Cabin", -apple-system, sans-serif;
  --btn-radius: 12px;
  --card-radius: 12px;
  --chip-radius: 12px;
  --panel-radius: 12px;
  --btn-shadow: 0 2px 8px rgba(255, 140, 66, 0.22);
  --card-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 600;
}

/* Added 2026-08-26 (ADR-037 resync). WB core's own flagship identity, paired
   by default with the Sand colour theme, its base/starter theme every
   first-time traveller sees before making an active choice. Reuses Source
   Serif 4/Source Sans 3, already vendored above for the retired Alpine
   design theme. A moderate, unremarkable-on-purpose radius/shadow - the
   "home base" look, not the most extreme choice on either end the way
   Pathfinder or Vanlifer are. */
body.design-waybound {
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, sans-serif;
  --btn-radius: 8px;
  --card-radius: 10px;
  --chip-radius: 8px;
  --panel-radius: 10px;
  --btn-shadow: 0 2px 6px rgba(139, 94, 30, 0.15);
  --card-shadow: 0 2px 8px rgba(139, 94, 30, 0.08);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: 0.01em;
  --btn-font-weight: 700;
}

/* Added 2026-08-26 (ADR-037 resync), replacing the retired Alpine in the
   active roster. Paired by default with the surviving Lavender colour theme.
   Quicksand/Karla vendored specifically for this theme
   (scripts/vendor_google_fonts.py) - a soft, rounded, unhurried pairing
   nothing else in the roster covers; generous chip/button radius for the
   same reason. */
body.design-purplehaze {
  --font-heading: "Quicksand", -apple-system, sans-serif;
  --font-body: "Karla", -apple-system, sans-serif;
  --btn-radius: 20px;
  --card-radius: 18px;
  --chip-radius: 999px;
  --panel-radius: 18px;
  --btn-shadow: 0 4px 14px rgba(144, 97, 201, 0.20);
  --card-shadow: 0 3px 12px rgba(144, 97, 201, 0.10);
  --btn-border-width: 1px;
  --btn-text-transform: none;
  --btn-letter-spacing: normal;
  --btn-font-weight: 600;
}
