/* Packshakedown, The Game — Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400;0,600;0,700;1,400&family=Cabin+Condensed:wght@600;700&display=swap');

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --desert-sand: #D4A96A;
  --trail-green: #4A7C3F;
  --sierra-blue: #2D6A9F;
  --sun-gold: #F5A623;
  --bark-brown: #C47D0A;
  --stone-gray: #7A8B98;
  --night-dark: #1C3A1C;
  --brand-dark: #1C3A1C;
  --cream: #F5F0E8;
  --text-primary: #2C1810;
  --text-secondary: #5A4A3A;
  --danger: #E74C3C;
  --warning: #F39C12;
  --success: #27AE60;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.15);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Cabin', 'Segoe UI', sans-serif;
  background: var(--night-dark);
  color: var(--text-primary);
}

#app {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ─── Scenes ─── */
.scene {
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: 'Cabin', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--sun-gold); color: #0D1117; }
.btn-primary:hover { background: #E0941F; }
.btn-secondary { background: rgba(255,255,255,0.15); color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn-secondary:hover { background: rgba(255,255,255,0.25); }
.btn-outline { background: transparent; color: var(--trail-green); border: 2px solid var(--trail-green); }
.btn-outline:hover { background: var(--trail-green); color: white; }
.btn-cutscene { background: var(--sun-gold); color: #0D1117; font-size: 1.1rem; padding: 14px 32px; font-weight: 700; }
.btn-cutscene:hover { background: #E0941F; }
.btn-large { font-size: 1.15rem; padding: 16px 36px; }
.btn-small { font-size: 0.85rem; padding: 8px 16px; }
.btn-full { width: 100%; }

/* ─── Title Scene ─── */
.scene-title {
  background: var(--night-dark);
  align-items: center;
  justify-content: center;
}
.title-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.title-bg svg { width: 100%; height: 100%; object-fit: cover; }
/* Photo backgrounds — shared rules for all bg containers */
.bg-photo, .bg-photo-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bg-photo { object-fit: cover; object-position: center; z-index: 0; }
.bg-photo-fallback { z-index: -1; }
.title-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 48px 20px 40px;
  background: linear-gradient(to bottom, rgba(28,58,28,0.55) 0%, rgba(15,32,15,0.80) 100%);
  width: 100%;
  text-align: center;
}
.title-sub {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sun-gold);
  margin-bottom: 12px;
  opacity: 0.9;
}
/* Real logo image — sized to read well on title screen */
.title-logo-img {
  height: 80px;
  width: auto;
  margin-bottom: 8px;
  border-radius: 12px;
  /* Blend the logo's dark green bg into the scene */
  mix-blend-mode: screen;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}
/* Brand wordmark: "Pack" white + "Shakedown" gold */
.title-wordmark {
  font-family: 'Cabin', sans-serif;
  font-size: clamp(2.6rem, 7.5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
  margin-bottom: 6px;
}
.title-word-pack  { color: #ffffff; }
.title-word-shake { color: var(--sun-gold); }
/* "Presents" line below logo */
.title-presents {
  font-family: 'Cabin', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  margin-top: 20px;
  margin-bottom: 10px;
}
/* "PCT the Game" headline */
.title-pct-game {
  font-family: 'Cabin', sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  color: white;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.title-pct-letters {
  color: #F5A623;
}
.title-main {
  font-family: 'Cabin Condensed', 'Cabin', sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  color: white;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
  line-height: 1.1;
  margin-bottom: 16px;
}
.title-tagline {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
}
.title-miles {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 36px;
  letter-spacing: 0.12em;
}
/* Brand CTA button — gold bg, dark text */
.btn-brand {
  background: var(--sun-gold);
  color: #0D1117;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.btn-brand:hover { background: #E0941F; color: #0D1117; }
/* Save card on title screen */
.title-save-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(245,166,35,0.4);
  border-radius: 10px;
  padding: 14px 24px;
  margin-bottom: 24px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.save-card-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--sun-gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.save-card-name {
  font-family: 'Cabin', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}
.save-card-details {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.save-card-date {
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

/* Ghost button */
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  padding: 8px 16px;
}
.btn-ghost:hover { color: rgba(255,255,255,0.8); background: transparent; box-shadow: none; }

.title-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; align-items: center; margin-bottom: 48px; flex-direction: column; }
.title-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
  justify-content: center;
}
.title-link { color: var(--sun-gold); text-decoration: none; font-weight: 600; }
.title-link:hover { text-decoration: underline; }

/* ─── Character Scene ─── */
.scene-character {
  background: var(--cream);
  overflow-y: auto;
}
.scene-header {
  position: relative;
  padding: 40px 32px 24px;
  color: white;
  background: var(--night-dark);
  border-bottom: 2px solid var(--sun-gold);
}
.scene-header-bg {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: linear-gradient(135deg, #1A2A3A, var(--night-dark));
}
.scene-title {
  position: relative;
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  z-index: 1;
}
.scene-subtitle { position: relative; z-index: 1; opacity: 0.85; margin-top: 4px; }

.character-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}

.character-preview-panel {
  background: #1C3A1C;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px;
  gap: 0;
  position: sticky;
  top: 0;
  overflow-y: auto;
  height: fit-content;
}
/* ─── Trail Passport Card ─── */
.passport-card {
  width: 228px;
  background: #F5EDD6;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  font-family: 'Cabin', sans-serif;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Header */
.pp-header {
  background: #1C3A1C;
  border-bottom: 2px solid #F5A623;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pp-header-logo { flex-shrink: 0; }
.pp-header-logo-img {
  height: 30px;
  width: auto;
  display: block;
  border-radius: 4px;
  /* blend the logo's dark green bg with the header's dark green */
  mix-blend-mode: screen;
}
.pp-header-text { flex: 1; min-width: 0; }
.pp-agency {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #F5A623;
  line-height: 1.2;
}
.pp-permit {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.pp-header-stamp {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #F5A623;
  border: 1.5px solid #F5A623;
  border-radius: 3px;
  padding: 2px 5px;
  flex-shrink: 0;
  opacity: 0.8;
}

/* Sections */
.pp-section {
  padding: 10px 14px;
  border-bottom: 1px solid #E8DCC0;
}
.pp-field-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8B7355;
  margin-bottom: 5px;
}

/* Trail Name */
.pp-name-section { padding-top: 12px; }
.pp-trail-name {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #2C1810;
  line-height: 1.1;
  min-height: 1.4em;
  letter-spacing: -0.01em;
}

/* Gender label under trail name */
.pp-gender-label {
  font-size: 0.68rem;
  color: #8B7355;
  margin-top: 2px;
}

/* Hiker body stats: height / weight / pack% */
.pp-body-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.pp-body-stat {
  flex: 1;
  text-align: center;
}
.pp-body-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2C1810;
  line-height: 1.2;
}
.pp-body-label {
  font-size: 0.58rem;
  color: #8B7355;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.pp-body-divider {
  width: 1px;
  height: 32px;
  background: #D4C9A8;
  flex-shrink: 0;
}

/* Archetype */
.pp-arch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1C3A1C;
  color: #F5A623;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
  border: 1px solid rgba(245,166,35,0.3);
}
.pp-arch-icon { font-size: 0.85rem; }
.pp-arch-label { letter-spacing: 0.02em; }
.pp-arch-flavor {
  font-size: 0.67rem;
  color: #7A6040;
  font-style: italic;
  line-height: 1.4;
  margin-top: 3px;
}

/* Appearance swatches */
.pp-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-swatch-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pp-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.pp-swatch-label {
  font-size: 0.58rem;
  color: #8B7355;
  font-weight: 600;
  text-align: center;
}

/* Stats */
.pp-stat-rows { display: flex; flex-direction: column; gap: 7px; }
.pp-stat-row {
  display: grid;
  grid-template-columns: 16px 44px 1fr 28px;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
}
.pp-stat-icon { font-size: 0.8rem; text-align: center; }
.pp-stat-name { color: #5A4A3A; font-weight: 600; font-size: 0.68rem; }
.pp-bar-track {
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.pp-bar-fill {
  height: 6px;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.pp-stat-num {
  font-weight: 700;
  color: #2C1810;
  text-align: right;
  font-size: 0.72rem;
}

/* Footer */
.pp-footer {
  padding: 8px 14px 10px;
  background: #EDE0C0;
}
.pp-route {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6A5030;
  text-align: center;
}
.pp-distance {
  font-size: 0.56rem;
  color: #8B7040;
  text-align: center;
  margin-top: 2px;
  letter-spacing: 0.06em;
}

/* Decorative stamp */
.pp-stamp {
  position: absolute;
  bottom: 44px;
  right: 10px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid rgba(245,166,35,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-18deg);
  pointer-events: none;
}
.pp-stamp-inner {
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(245,166,35,0.45);
  text-align: center;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Passport in act complete screen */
.complete-passport {
  transform: scale(1.1);
  margin: 8px 0 16px;
}

.character-options {
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.option-group { display: flex; flex-direction: column; gap: 10px; }
.option-label {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.option-hint { font-size: 0.8rem; color: var(--text-secondary); font-style: italic; margin-top: 6px; }

/* option-label inline badge */
.option-value-badge {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-style: normal;
  background: #EDE0C0;
  padding: 1px 8px;
  border-radius: 6px;
}

/* Range sliders */
.stat-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #D4C9A8;
  border-radius: 3px;
  outline: none;
  margin: 10px 0 4px;
  cursor: pointer;
}
.stat-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sun-gold);
  border: 2px solid #1C3A1C;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.stat-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sun-gold);
  border: 2px solid #1C3A1C;
  cursor: pointer;
}
.slider-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Pack % hint colors */
.pack-pct-hint { font-style: normal !important; font-size: 0.82rem !important; }
.hint-good { color: var(--success) !important; }
.hint-warn { color: var(--warning) !important; }
.hint-bad  { color: var(--danger)  !important; }

.trail-name-input {
  padding: 12px 16px;
  border: 2px solid #D4C9A8;
  border-radius: 8px;
  font-family: 'Cabin', sans-serif;
  font-size: 1rem;
  width: 100%;
  background: white;
  transition: border-color 0.2s;
}
.trail-name-input:focus { outline: none; border-color: var(--sun-gold); box-shadow: 0 0 0 2px rgba(245,166,35,0.2); }

.option-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px;
  border: 2px solid #D4C9A8;
  border-radius: 20px;
  background: white;
  font-family: 'Cabin', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--sun-gold); }
.chip-active { background: #1C3A1C; color: var(--sun-gold); border-color: var(--sun-gold); }

.skin-tones { display: flex; gap: 8px; flex-wrap: wrap; }
.skin-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.skin-swatch:hover { transform: scale(1.15); }
.skin-swatch-active { border-color: var(--night-dark); transform: scale(1.15); }

.archetype-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.archetype-card {
  padding: 14px 16px;
  border: 2px solid #D4C9A8;
  border-radius: var(--radius);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Cabin', sans-serif;
}
.archetype-card:hover { border-color: var(--sun-gold); background: #FFFBF5; }
.archetype-active { border-color: var(--sun-gold); background: #FFF8EC; }
.archetype-name { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 4px; }
.archetype-desc { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 6px; }
.archetype-flavor { font-size: 0.75rem; color: var(--bark-brown); font-style: italic; }

.scene-footer {
  padding: 20px 32px;
  background: white;
  border-top: 2px solid #E8DCC8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-note { font-size: 0.85rem; color: var(--text-secondary); }

/* ─── Pack Optimizer ─── */
.scene-minigame {
  background: var(--cream);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Background layer — used by Act 2 mini-games (Mosquito, River Ford, Snow Nav, Gear Cache) */
.minigame-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.minigame-bg img { width: 100%; height: 100%; object-fit: cover; }

/* Dark overlay — sits on top of bg image, below scene content; keeps UI readable */
.minigame-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0,0,0,0.55);
}

/* Content layer — sits on top of the background */
.minigame-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.minigame-header {
  padding: 20px 28px;
  background: var(--night-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.minigame-header.compact { padding: 12px 20px; }
.minigame-title { font-family: 'Cabin Condensed', sans-serif; font-size: 1.6rem; font-weight: 700; }
.minigame-subtitle { font-size: 0.9rem; opacity: 0.8; margin-top: 2px; }

.pack-weight-display { text-align: right; min-width: 200px; }
.weight-number { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.weight-label { font-size: 0.9rem; opacity: 0.85; margin-bottom: 8px; }
.weight-bar-track { height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; margin: 6px 0; }
.weight-bar-fill { height: 8px; border-radius: 4px; transition: width 0.3s, background 0.3s; }
.weight-hints { display: flex; justify-content: space-between; font-size: 0.7rem; opacity: 0.75; }

.pack-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.gear-list {
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gear-category { }
.gear-category-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  padding: 8px 0 6px;
  border-bottom: 1px solid #E0D8CC;
  margin-bottom: 6px;
}
.gear-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 14px;
  background: white;
  border: 2px solid #E8DCC8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  gap: 12px;
}
.gear-item:hover:not(.gear-mandatory) { border-color: var(--sun-gold); background: #FFFBF5; }
.gear-selected { border-color: var(--sun-gold); background: #FFF8EC; }
.gear-mandatory { cursor: default; opacity: 0.9; border-color: #C4B89A; }
.gear-exclusive { opacity: 0.4; cursor: not-allowed; }

.gear-item-left { display: flex; align-items: flex-start; gap: 10px; flex: 1; }
.gear-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #C4B89A;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.gear-checkbox.checked { background: #1C3A1C; border-color: var(--sun-gold); color: var(--sun-gold); }
.gear-checkbox.mandatory { background: #C4B89A; border-color: #C4B89A; color: white; font-size: 0.7rem; }
.gear-item-info { flex: 1; }
.gear-item-name { font-weight: 600; font-size: 0.92rem; }
.gear-item-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.gear-item-stats { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.stat-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.stat-pos { background: #E8F5E8; color: var(--success); }
.stat-neg { background: #FEE8E8; color: var(--danger); }
.gear-item-weight { font-weight: 700; font-size: 0.9rem; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; }

.pack-summary {
  overflow-y: auto;
  padding: 16px;
  background: #F0E8D8;
  border-left: 2px solid #D4C9A8;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.summary-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid #E0D8CC;
}
.summary-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.pack-warnings { background: rgba(231,76,60,0.1); border: 1px solid rgba(231,76,60,0.3); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.pack-warning-title { font-size: 0.8rem; font-weight: 700; color: var(--danger); margin-bottom: 4px; }
.pack-warning-item { font-size: 0.78rem; color: var(--danger); opacity: 0.85; }
.pack-all-clear { font-size: 0.8rem; color: var(--success); font-weight: 600; margin-bottom: 8px; }
.summary-archetype { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 10px; font-style: italic; }
.summary-items { display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; }
.summary-item { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 2px 0; }
.summary-fixed { color: var(--text-secondary); }
.summary-weight { font-weight: 600; color: var(--text-secondary); }
.summary-divider { height: 1px; background: #E0D8CC; margin: 10px 0; }
.summary-total { font-size: 1.2rem; font-weight: 700; }
.summary-impacts { margin-top: 12px; font-size: 0.82rem; }
.impact-title { font-weight: 700; margin-bottom: 6px; color: var(--text-secondary); }
.impact-row { display: flex; justify-content: space-between; padding: 2px 0; }
.impact-stat { text-transform: capitalize; }
.impact-val { font-weight: 700; }
.impact-val.pos { color: var(--success); }
.impact-val.neg { color: var(--danger); }
.impact-warning { color: var(--warning); font-size: 0.78rem; margin-top: 6px; }
.impact-good { color: var(--success); font-size: 0.78rem; margin-top: 6px; }

.packshakedown-cta {
  background: var(--night-dark);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  color: white;
}
.cta-text { font-size: 0.82rem; margin-bottom: 10px; opacity: 0.85; }

/* ─── Trail Scene ─── */
.scene-trail {
  background: var(--night-dark);
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.trail-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.trail-bg img { width: 100%; height: 100%; object-fit: cover; }
.bg-gradient {
  position: absolute;
  inset: 0;
  background-size: 200% 200%;
  animation: gradientDrift 20s ease infinite;
}
.bg-weather-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: background 2s ease;
}
@keyframes gradientDrift {
  0%   { background-position: 50% 0%; }
  50%  { background-position: 50% 100%; }
  100% { background-position: 50% 0%; }
}

.trail-hud {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  gap: 16px;
}
.hud-left { min-width: 110px; }
.hud-trailname { font-weight: 700; color: var(--sun-gold); font-size: 1.25rem; line-height: 1.2; }
.hud-day { font-size: 1rem; color: rgba(255,255,255,0.85); margin-top: 2px; }
.hud-right { text-align: right; min-width: 160px; }
.hud-right-top { display: flex; align-items: baseline; gap: 6px; justify-content: flex-end; }
.hud-right-sub { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin-top: 3px; }
.hud-sep { color: rgba(255,255,255,0.3); font-size: 0.85rem; }
.hud-miles { font-size: 1.3rem; font-weight: 800; color: white; }
.hud-avgmpd { font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.75); }
.hud-zone { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.hud-weather-inline { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.hud-pack { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 2px; }

.hud-stats { display: flex; gap: 12px; flex: 1; justify-content: center; flex-wrap: wrap; }
.hud-stat { display: flex; align-items: center; gap: 6px; }
.hud-stat-icon { font-size: 1rem; }
.hud-stat-bar { width: 60px; height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; }
.hud-stat-fill { height: 8px; border-radius: 4px; transition: width 0.4s, background 0.4s; }
.hud-stat-val { font-size: 0.78rem; color: rgba(255,255,255,0.85); min-width: 28px; }

.mile-progress {
  position: relative;
  z-index: 2;
  padding: 8px 20px 4px;
  background: rgba(0,0,0,0.4);
}
.mile-bar { height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
.mile-fill { height: 6px; background: var(--sun-gold); border-radius: 3px; transition: width 0.5s; }
.mile-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: rgba(255,255,255,0.6); margin-top: 3px; }

.event-container {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 16px 20px;
}

/* ─── Event Card (decision screen) ─── */
.event-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius);
  padding: 24px 26px;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  box-shadow: 0 12px 50px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.9);
  animation: cardSlideUp 0.3s ease;
}
@keyframes cardSlideUp {
  from { transform: translateY(16px); opacity: 0.7; }
  to   { transform: translateY(0);    opacity: 1;   }
}
.event-zone-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--trail-green);
  margin-bottom: 6px;
}
.event-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}
.event-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.event-choices { display: flex; flex-direction: column; gap: 10px; }
.choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid #E0D8CC;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  font-family: 'Cabin', sans-serif;
  line-height: 1.4;
  width: 100%;
}
.choice-btn:hover {
  border-color: var(--sun-gold);
  background: #FFFBF5;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(74,124,63,0.15);
}
.choice-btn:active { transform: translateY(0); }
.choice-icon { font-size: 1.4rem; flex-shrink: 0; }
.choice-text-wrap { flex: 1; }
.choice-text { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }

/* ─── Outcome — Full-screen dramatic reveal ─── */
.outcome-dramatic {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(10, 18, 28, 0.88);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 32px 20px 40px;
  gap: 24px;
  animation: overlayIn 0.4s ease;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Narrative text */
.outcome-narrative-wrap {
  max-width: 620px;
  width: 100%;
  text-align: center;
  animation: narrativeIn 0.6s ease 0.1s both;
}
@keyframes narrativeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.outcome-chapter {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--sun-gold);
  margin-bottom: 14px;
}
.outcome-story {
  font-size: 1.15rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.93);
  font-style: italic;
}

/* Stat reveal panel */
.reveal-panel {
  opacity: 0;
  transition: opacity 0.55s ease;
  max-width: 580px;
  width: 100%;
}
.reveal-panel.reveal-visible { opacity: 1; }

.outcome-stats-panel {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.osp-no-change {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  padding: 12px 0 4px;
}

.osp-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.osp-bars { display: flex; flex-direction: column; gap: 14px; }

/* Individual stat reveal row */
.stat-reveal-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  align-items: center;
  gap: 12px;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.stat-reveal-row.row-active { opacity: 1; }
.srr-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}
.srr-bar-track {
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  overflow: hidden;
}
.srr-bar-fill {
  height: 10px;
  border-radius: 5px;
  /* transition applied by JS */
}
.srr-values {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.sval-old { color: rgba(255,255,255,0.45); }
.sval-arrow { color: rgba(255,255,255,0.3); font-size: 0.7rem; }
.sval-new { font-size: 1rem; transition: color 0.3s; }
.sval-pending { color: rgba(255,255,255,0.25); }
.sval-up   { color: #2ECC71; }
.sval-down { color: #E74C3C; }

/* Stable (unchanged) stat rows */
.stat-row-stable .srr-label { opacity: 0.55; }
.srr-bar-stable { background-color: #3A5068 !important; }
.sval-stable { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.5); min-width: 28px; text-align: right; }

/* Trail summary row — miles, days, avg, pack */
.osp-trail-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 10px;
  margin-top: 8px;
}
.osp-trail-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.otr-icon { font-size: 0.85rem; }
.otr-val { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.otr-label { font-size: 0.6rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.04em; }

/* Learn fact — bear canister result screen */
.learn-fact {
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  max-width: 500px;
  text-align: center;
}

/* Learn fact — trail outcome */
.outcome-learn-fact {
  background: rgba(45, 106, 159, 0.25);
  border: 1px solid rgba(85, 170, 230, 0.35);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: rgba(180, 220, 255, 0.92);
  line-height: 1.65;
}

/* Continue button */
.btn-outcome {
  background: var(--sun-gold);
  color: #0D1117;
  font-size: 1.05rem;
  padding: 15px 40px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-family: 'Cabin', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 24px rgba(74,124,63,0.4);
  transition: background 0.15s, transform 0.15s, opacity 0.55s ease;
  margin-top: 8px;
}
.btn-outcome:hover { background: #E0941F; transform: translateY(-2px); }
.btn-outcome.reveal-visible { opacity: 1; }

/* ─── Game Over ─── */
.scene-gameover { position: relative; background: var(--night-dark); }

/* Failure narrative */
.go-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sun-gold);
}
.go-narrative {
  max-width: 560px;
  width: 100%;
  text-align: left;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,0.08);
}
.go-para {
  font-size: 0.97rem;
  line-height: 1.78;
  color: rgba(255,255,255,0.88);
  margin-bottom: 14px;
}
.go-para:last-child { margin-bottom: 0; }

/* Save CTA block */
.go-save-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 420px;
  width: 100%;
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.go-save-hint {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  text-align: center;
}
.go-save-error { color: #E74C3C; }
.go-save-btn {
  background: var(--sun-gold);
  color: #0D1117;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  font-family: 'Cabin', sans-serif;
  transition: background 0.15s, transform 0.15s;
}
.go-save-btn:hover { background: #E0941F; transform: translateY(-1px); }
.go-save-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}
.go-saved-confirm {
  font-size: 0.92rem;
  color: #2ECC71;
  text-align: center;
  line-height: 1.6;
}
.go-saved-confirm a {
  color: var(--sun-gold);
  text-decoration: underline;
  display: block;
  margin-top: 4px;
}

/* Title screen "record saved" toast */
.title-record-toast {
  background: rgba(39,174,96,0.15);
  border: 1px solid rgba(39,174,96,0.35);
  border-radius: 8px;
  color: #2ECC71;
  font-size: 0.82rem;
  padding: 8px 16px;
  text-align: center;
  max-width: 400px;
}

.gameover-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 48px 20px 60px;
  background: rgba(0,0,0,0.7);
  text-align: center;
  gap: 20px;
  overflow-y: auto;
}
.gameover-title { font-family: 'Cabin Condensed', sans-serif; font-size: 2.5rem; color: white; }
.gameover-reason { font-size: 1.1rem; color: rgba(255,255,255,0.8); max-width: 480px; }
.gameover-stats { display: flex; gap: 32px; color: white; }
.gameover-stat { font-size: 1rem; }
.gameover-journal { background: rgba(255,255,255,0.1); border-radius: var(--radius); padding: 20px; max-width: 500px; width: 100%; text-align: left; }
.journal-title { font-weight: 700; color: var(--sun-gold); margin-bottom: 12px; }
.journal-entry { font-size: 0.82rem; color: rgba(255,255,255,0.8); padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.1); line-height: 1.5; }
.gameover-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; width: 100%; max-width: 320px; }
.gameover-actions .btn { width: 100%; }
.btn-ghost { background: transparent; border: 2px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.6); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.6); color: rgba(255,255,255,0.9); }

/* ─── Cutscene ─── */
.scene-cutscene { position: relative; background: var(--night-dark); overflow: hidden; }
.cutscene-bg { position: absolute; inset: 0; z-index: 0; }
.cutscene-bg svg { width: 100%; height: 100%; object-fit: cover; }
.cutscene-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cutscene-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.75) 100%);
}
.cutscene-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  gap: 24px;
  text-align: center;
}
.cutscene-milestone { }
.cutscene-miles { font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sun-gold); margin-bottom: 8px; }
.cutscene-title { font-family: 'Cabin Condensed', sans-serif; font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 700; color: white; text-shadow: 0 3px 20px rgba(0,0,0,0.5); }
.cutscene-subtitle { font-size: 1rem; color: rgba(255,255,255,0.8); margin-top: 4px; }
.cutscene-text-box {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 640px;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.15);
}
.cutscene-para {
  color: rgba(255,255,255,0.92);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 12px;
}
.cutscene-para:last-child { margin-bottom: 0; }
.cutscene-stats-bar {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.4);
  padding: 10px 20px;
  border-radius: 20px;
}
.cs-stat { font-weight: 600; }

/* ─── Water Carry ─── */
.water-intro { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.water-intro-bg { position: absolute; inset: 0; z-index: 0; }
.water-intro-bg svg { width: 100%; height: 100%; object-fit: cover; }
.water-intro-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  max-width: 700px;
  width: 90%;
}
.water-fact-box {
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius);
  padding: 20px 24px;
  width: 100%;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.fact-title { font-weight: 700; color: var(--sierra-blue); margin-bottom: 10px; font-size: 1rem; }
.water-segments-preview {
  display: flex;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}
.segment-preview {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  padding: 12px 14px;
  color: white;
  flex: 1;
  min-width: 160px;
}
.seg-num { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 4px; }
.seg-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.seg-dist { font-size: 0.82rem; opacity: 0.85; margin-bottom: 4px; }
.seg-diff { font-size: 0.78rem; font-style: italic; }
.seg-diff-exposed { color: #F39C12; }
.seg-diff-moderate { color: #F7DC6F; }
.seg-diff-easy { color: #2ECC71; }

.water-progress { display: flex; align-items: center; gap: 8px; }
.water-seg-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.water-seg-dot.done { background: var(--success); }
.water-seg-dot.active { background: var(--sierra-blue); box-shadow: 0 0 0 3px rgba(45,106,159,0.4); }
.water-seg-line { flex: 1; height: 2px; background: rgba(255,255,255,0.3); }

.water-planning { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.water-source-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow);
}
.source-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.source-name { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.source-badge { font-size: 0.78rem; background: #EFF8FF; color: var(--sierra-blue); padding: 4px 10px; border-radius: 10px; font-weight: 600; }
.source-info { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.source-detail { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-secondary); }
.source-detail strong { color: var(--text-primary); }
.diff-exposed { color: var(--warning); }
.diff-moderate { color: var(--bark-brown); }
.diff-easy { color: var(--success); }
.carry-question { font-weight: 700; font-size: 1rem; margin-bottom: 14px; color: var(--text-primary); }
.carry-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.carry-btn {
  flex: 1;
  min-width: 70px;
  padding: 12px 8px;
  border: 2px solid #E0D8CC;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: 'Cabin', sans-serif;
}
.carry-btn:hover { border-color: var(--sierra-blue); }
.carry-active { border-color: var(--sierra-blue); background: #EFF8FF; }
.carry-liters { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.carry-lbs { font-size: 0.72rem; color: var(--text-secondary); }
.carry-analysis {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  background: #F8F4EC;
  border-radius: 8px;
}
.analysis-current, .analysis-hint { flex: 1; }
.analysis-title { font-weight: 700; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 4px; }
.analysis-weight { font-size: 0.85rem; }
.analysis-penalty { color: var(--warning); font-size: 0.82rem; font-weight: 600; }
.analysis-good { color: var(--success); font-size: 0.82rem; font-weight: 600; }
.analysis-need { font-size: 1.5rem; font-weight: 700; color: var(--sierra-blue); }
.analysis-note { font-size: 0.72rem; color: var(--text-secondary); }

.prev-results { max-width: 600px; width: 100%; }
.prev-title { font-weight: 700; color: white; margin-bottom: 8px; font-size: 0.85rem; }
.prev-result { font-size: 0.82rem; padding: 6px 12px; border-radius: 6px; margin-bottom: 4px; }
.prev-perfect { background: rgba(39,174,96,0.3); color: white; }
.prev-good { background: rgba(52,152,219,0.3); color: white; }
.prev-warning { background: rgba(243,156,18,0.35); color: white; }
.prev-danger { background: rgba(231,76,60,0.35); color: white; }
.prev-heavy { background: rgba(127,140,141,0.35); color: white; }

.water-complete { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.complete-score { font-size: 1.5rem; font-weight: 700; color: white; text-align: center; padding: 16px; }
.segment-results { display: flex; flex-direction: column; gap: 12px; max-width: 640px; width: 100%; }
.result-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: white;
  align-items: flex-start;
}
.result-perfect { border-left: 4px solid var(--success); }
.result-good { border-left: 4px solid var(--sierra-blue); }
.result-warning { border-left: 4px solid var(--warning); }
.result-danger { border-left: 4px solid var(--danger); }
.result-heavy { border-left: 4px solid var(--stone-gray); }
.result-icon { font-size: 1.6rem; flex-shrink: 0; }
.result-info { flex: 1; }
.result-title { font-weight: 700; margin-bottom: 2px; }
.result-seg { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 4px; }
.result-text { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); }
.result-carry { text-align: right; flex-shrink: 0; }
.result-liters { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.result-need { font-size: 0.72rem; color: var(--text-secondary); }

/* ─── Bear Canister ─── */
.bear-intro { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.bear-intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 600px;
  width: 100%;
}
.bear-controls { background: var(--night-dark); color: white; border-radius: var(--radius); padding: 16px 20px; width: 100%; }
.controls-title { font-weight: 700; margin-bottom: 10px; color: var(--sun-gold); }
.control-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 0.88rem; }
kbd {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
}

.bear-hud { text-align: right; }
.bear-score { font-size: 0.88rem; opacity: 0.8; }
.bear-days { font-size: 1.1rem; font-weight: 700; color: var(--sun-gold); }
.bear-rows { font-size: 0.8rem; opacity: 0.7; margin-top: 2px; }
.days-complete { color: var(--success); }
.progress-hint { font-size: 0.7rem; opacity: 0.55; text-align: center; margin-top: 4px; font-style: italic; }

.bear-game-layout {
  display: flex;
  gap: 20px;
  flex: 1;
  overflow: hidden;
  padding: 16px 20px;
  align-items: flex-start;
  justify-content: center;
}
.bear-canvas-wrap { flex-shrink: 0; }
.bear-sidebar { display: flex; flex-direction: column; gap: 14px; min-width: 160px; }
.bear-next-card { background: white; border-radius: var(--radius); padding: 14px; }
.next-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 8px; }
.next-item-name { font-weight: 700; font-size: 0.9rem; }
.next-item-days { font-size: 0.8rem; color: var(--trail-green); font-weight: 600; }
.bear-progress-card { background: white; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.progress-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.progress-bar-wrap { width: 30px; flex: 1; background: #E0D8CC; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 80px; }
.progress-bar-fill { width: 100%; border-radius: 4px 4px 0 0; transition: height 0.3s; }
.progress-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; }
.bear-mobile-controls { background: rgba(255,255,255,0.1); border-radius: var(--radius); padding: 10px; display: none; flex-direction: column; gap: 6px; align-items: center; }
.ctrl-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  color: white;
  font-family: 'Cabin', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.3); }
.ctrl-row { display: flex; gap: 6px; }
.ctrl-drop { background: rgba(74,124,63,0.5); border-color: var(--trail-green); width: 100%; }

.bear-result {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--night-dark);
  color: white;
}
.result-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 3rem; }
.result-win .result-title { color: var(--success); }
.result-ok .result-title { color: var(--sun-gold); }
.result-title { font-family: 'Cabin Condensed', sans-serif; font-size: 1.5rem; font-weight: 700; color: white; }
.result-stats { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.result-stat { font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.result-message { max-width: 500px; text-align: center; color: rgba(255,255,255,0.8); font-size: 0.95rem; line-height: 1.65; }

/* ─── Act Complete ─── */
.scene-complete { position: relative; background: var(--night-dark); overflow-y: auto; }
.complete-bg { position: absolute; inset: 0; z-index: 0; }
.complete-bg svg { width: 100%; height: 100%; object-fit: cover; }
.complete-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.8)); }
.complete-content {
  position: relative;
  z-index: 2;
  overflow-y: auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.complete-badge { font-size: 3rem; }
.complete-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.complete-subtitle { font-size: 1rem; color: var(--sun-gold); letter-spacing: 0.1em; }
.complete-hiker { }
.complete-trailname { font-size: 1.4rem; font-weight: 700; color: white; }
.complete-tagline { font-size: 0.9rem; color: var(--sun-gold); font-style: italic; }
/* Act complete — trail summary number row */
.ac-trail-summary {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 14px 8px;
}
.ac-ts-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ac-ts-val { font-size: 1.6rem; font-weight: 700; color: white; line-height: 1; }
.ac-ts-label { font-size: 0.65rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.04em; }

/* Act complete — health bars */
.ac-health-bars {
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ac-bar-row { display: flex; align-items: center; gap: 10px; }
.ac-bar-label { font-size: 0.8rem; color: rgba(255,255,255,0.75); min-width: 72px; }
.ac-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  overflow: hidden;
}
.ac-bar-fill { height: 100%; border-radius: 5px; }
.ac-bar-val { font-size: 0.9rem; font-weight: 700; color: white; min-width: 28px; text-align: right; }

.complete-journal {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-width: 600px;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
}
.journal-header { font-weight: 700; color: var(--sun-gold); margin-bottom: 12px; font-size: 1rem; }
.journal-entry-complete {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  line-height: 1.5;
}
.journal-day { color: var(--sun-gold); white-space: nowrap; font-weight: 600; font-size: 0.78rem; }
.journal-text { color: rgba(255,255,255,0.8); }

.complete-cta {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 500px;
  width: 100%;
  text-align: center;
}
.cta-headline { font-size: 1.1rem; font-weight: 700; color: white; margin-bottom: 8px; }
.cta-body { font-size: 0.88rem; color: rgba(255,255,255,0.75); line-height: 1.6; margin-bottom: 16px; }

.complete-footer { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-coming { font-size: 0.85rem; color: rgba(255,255,255,0.5); font-style: italic; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal h2 { font-family: 'Cabin Condensed', sans-serif; font-size: 1.6rem; color: var(--text-primary); }
.modal p { font-size: 0.92rem; line-height: 1.65; color: var(--text-secondary); }

/* ─── Weather HUD ─── */
.hud-weather {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  text-align: right;
  margin-top: 2px;
}

/* ─── Act 2 mile bar ─── */
.act2-bar .mile-fill { background: linear-gradient(90deg, #2A7ABF, #6EC6F0); }

/* ═══════════════════════════════════════════════════════════════
   MOSQUITO HELL MINI-GAME
═══════════════════════════════════════════════════════════════ */
.mh-hud {
  display: flex;
  gap: 24px;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  border-radius: 12px;
  padding: 12px 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.12);
}
.mh-hud-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mh-hud-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); }
.mh-hud-val { font-size: 1.4rem; font-weight: 800; color: #F5A623; font-family: 'Cabin Condensed', sans-serif; }
.mh-bites { color: #E74C3C !important; }

.mh-arena {
  position: relative;
  background: rgba(0,0,0,0.35);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mh-body-container {
  z-index: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mh-hiker-svg {
  height: 300px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

/* SVG zone interactivity */
.mh-zone {
  cursor: pointer;
  transition: filter 0.08s, opacity 0.08s;
}
.mh-zone:hover {
  filter: brightness(1.25) drop-shadow(0 0 6px rgba(245,166,35,0.7));
}
.mh-zone:active {
  filter: brightness(1.5) drop-shadow(0 0 10px #F5A623);
  opacity: 0.85;
}

/* Mosquito swarm layer */
.mh-swarm-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  cursor: pointer;
}
.mh-mosquito {
  position: absolute;
  font-size: 1.5rem;
  cursor: grab;
  pointer-events: all;
  animation: mhBuzz 0.4s ease-in-out infinite alternate;
  transform-origin: center;
  filter: drop-shadow(0 0 4px rgba(200,50,50,0.6));
  transition: transform 0.1s;
  user-select: none;
}
.mh-mosquito:hover { transform: scale(1.2); }
@keyframes mhBuzz {
  from { transform: translate(0, 0) rotate(-5deg); }
  to { transform: translate(2px, -3px) rotate(5deg); }
}
.mh-swatted {
  animation: mhSwat 0.3s forwards !important;
}
.mh-bit {
  animation: mhBite 0.4s forwards !important;
}
@keyframes mhSwat {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); }
  100% { transform: scale(0); opacity: 0; }
}
@keyframes mhBite {
  0% { opacity: 1; }
  100% { transform: translateY(-20px) scale(0.5); opacity: 0; }
}
.mh-effect-hit, .mh-effect-bite {
  position: absolute;
  font-size: 1.2rem;
  pointer-events: none;
  animation: effectPop 0.6s forwards;
}
@keyframes effectPop {
  0% { transform: scale(0.5) translateY(0); opacity: 1; }
  100% { transform: scale(1.5) translateY(-30px); opacity: 0; }
}

/* Start overlay */
.mh-start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 16px;
  z-index: 20;
  padding: 24px;
  text-align: center;
}
.mh-start-icon { font-size: 3rem; }
.mh-start-title { font-family: 'Cabin Condensed', sans-serif; font-size: 2rem; color: #F5A623; font-weight: 700; }
.mh-start-sub { font-size: 0.9rem; color: rgba(255,255,255,0.8); line-height: 1.6; }

/* Fog/bite pressure bar */
.mh-fog-bar {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}
.mh-fog-fill {
  height: 100%;
  background: linear-gradient(90deg, #27AE60, #F39C12, #E74C3C);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.mh-fog-label { font-size: 0.7rem; color: rgba(255,255,255,0.5); text-align: center; margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   RIVER FORD — FROGGER CANVAS GAME
═══════════════════════════════════════════════════════════════ */
.rf-frog-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}
.rf-frog-lives {
  font-size: 1.1rem;
  letter-spacing: 2px;
  flex-shrink: 0;
}
.rf-frog-canvas-wrap {
  width: 100%;
  max-width: 460px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  cursor: pointer;
  display: block;
}
#rfCanvas {
  display: block;
}
.rf-frog-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.rf-dpad-row {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.rf-dpad-btn {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.22);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: background 0.1s;
  line-height: 1;
}
.rf-dpad-btn:active, .rf-dpad-btn:hover { background: rgba(255,255,255,0.26); }
.rf-dpad-gap {
  width: 54px;
  height: 54px;
}
.rf-frog-key-hint {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════
   RIVER FORD MINI-GAME (legacy lane-decision styles kept below)
═══════════════════════════════════════════════════════════════ */
.rf-hud {
  display: flex;
  gap: 24px;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  border-radius: 12px;
  padding: 12px 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.12);
}
.rf-hud-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.rf-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); }
.rf-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  overflow: hidden;
}
.rf-bar-fill {
  height: 100%;
  background: #27AE60;
  border-radius: 5px;
  transition: width 0.4s ease, background 0.4s ease;
}
.rf-progress-fill { background: #2A7ABF !important; }

.rf-arena {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(0,0,20,0.4);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  position: relative;
}
.rf-bank {
  background: rgba(50,80,30,0.7);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rf-bank-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.rf-far-bank { background: rgba(30,80,50,0.7); }
.rf-hiker-icon { font-size: 1.8rem; }

.rf-river {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.rf-lane {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s ease;
  position: relative;
  overflow: hidden;
}
.rf-lane::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(42,122,191,0.15);
  pointer-events: none;
}
.rf-lane-calm::before { background: rgba(39,174,96,0.1); }
.rf-lane-moving::before { background: rgba(243,156,18,0.15); }
.rf-lane-surge::before { background: rgba(231,76,60,0.2); animation: surgeFlash 0.8s ease-in-out infinite alternate; }
.rf-lane-done::before { background: rgba(0,0,0,0.2); }
@keyframes surgeFlash {
  from { background: rgba(231,76,60,0.15); }
  to { background: rgba(231,76,60,0.35); }
}

.rf-current {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.rf-step-btn {
  flex: 1;
  padding: 10px 16px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}
.rf-step-btn:hover { background: rgba(255,255,255,0.15); border-color: #F5A623; }
.rf-lane-hiker { font-size: 1.5rem; flex-shrink: 0; }

/* Start / instruction overlays */
.rf-start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  z-index: 20;
}
.rf-start-title { font-family: 'Cabin Condensed', sans-serif; font-size: 2rem; color: #6EC6F0; font-weight: 700; }
.rf-start-sub { font-size: 0.85rem; color: rgba(255,255,255,0.8); line-height: 1.7; max-width: 380px; }
.rf-legend { display: flex; gap: 16px; font-size: 0.8rem; font-weight: 600; margin-top: 4px; }
.rf-legend-item { padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.08); }
.rf-calm { color: #27AE60; }
.rf-moving { color: #F39C12; }
.rf-surge { color: #E74C3C; }
.rf-instruction {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 10px;
  min-height: 20px;
  transition: color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   SNOW NAVIGATION MINI-GAME
═══════════════════════════════════════════════════════════════ */
.sn-hud {
  display: flex;
  gap: 24px;
  justify-content: center;
  background: rgba(4,14,24,0.88);
  border-radius: 12px;
  padding: 14px 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(200,232,248,0.2);
}
.sn-hud-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.sn-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.65); }
.sn-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  overflow: hidden;
}
.sn-bar-fill {
  height: 100%;
  background: #27AE60;
  border-radius: 6px;
  transition: width 0.5s ease, background 0.5s ease;
}

.sn-decision {
  background: rgba(4,14,24,0.92);
  border-radius: 16px;
  border: 1px solid rgba(200,232,248,0.18);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sn-step-badge {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #F5A623;
  font-weight: 700;
}
.sn-situation {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.95);
  border-left: 3px solid #F5A623;
  padding-left: 14px;
}
.sn-topo {
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid rgba(200,232,248,0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sn-start { font-size: 0.9rem; font-weight: 700; color: #F5A623; margin-bottom: 4px; }
.sn-paths { display: flex; flex-direction: column; gap: 10px; }
.sn-path {
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}
.sn-path-icon { font-size: 1.2rem; }
.sn-path-label { font-size: 0.97rem; font-weight: 600; color: #fff; margin-top: 2px; }
.sn-path-clue { font-size: 0.85rem; color: rgba(255,255,255,0.65); margin-top: 5px; font-style: italic; }
.sn-path-correct { background: rgba(39,174,96,0.25) !important; border-color: #27AE60 !important; }
.sn-path-wrong { background: rgba(231,76,60,0.25) !important; border-color: #E74C3C !important; }

.sn-clue-box { display: flex; flex-direction: column; gap: 8px; }
.sn-clue-row { font-size: 0.93rem; color: rgba(255,255,255,0.92); background: rgba(255,255,255,0.08); padding: 8px 12px; border-radius: 6px; }
.sn-traverse-viz {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  font-size: 0.9rem;
}
.sn-ridge { color: #C8E8F8; font-weight: 700; }
.sn-slope { color: #E0EEF8; background: rgba(200,216,224,0.15); padding: 10px; border-radius: 6px; }
.sn-rocks { color: #E74C3C; font-size: 0.88rem; }

.sn-choices {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.sn-choice-btn {
  flex: 1;
  padding: 14px 8px;
  background: rgba(245,166,35,0.12);
  border: 2px solid rgba(245,166,35,0.4);
  border-radius: 10px;
  color: #F5A623;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Cabin Condensed', sans-serif;
}
.sn-choice-btn:hover:not(:disabled) {
  background: rgba(245,166,35,0.28);
  border-color: #F5A623;
  transform: translateY(-1px);
}
.sn-choice-btn:disabled { opacity: 0.4; cursor: default; }

.sn-feedback {
  border-radius: 10px;
  padding: 16px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sn-feedback-good { background: rgba(39,174,96,0.2); border: 1px solid rgba(39,174,96,0.5); }
.sn-feedback-bad { background: rgba(231,76,60,0.2); border: 1px solid rgba(231,76,60,0.5); }
.sn-feedback-icon { font-weight: 700; font-size: 1.05rem; }
.sn-feedback-good .sn-feedback-icon { color: #2ECC71; }
.sn-feedback-bad .sn-feedback-icon { color: #E74C3C; }
.sn-feedback-text { font-size: 0.95rem; line-height: 1.65; color: rgba(255,255,255,0.92); }

/* Start overlay */
.sn-start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2,10,20,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 32px;
  z-index: 20;
  border-radius: 16px;
}
.sn-start-icon { font-size: 3.5rem; }
.sn-start-title { font-family: 'Cabin Condensed', sans-serif; font-size: 2.2rem; color: #C8E8F8; font-weight: 700; letter-spacing: 0.05em; }
.sn-start-sub { font-size: 1rem; color: rgba(255,255,255,0.9); line-height: 1.8; max-width: 400px; }

/* ─── Dry Stretch Mini-game ─── */
.ds-hud {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(4,14,24,0.92);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(245,166,35,0.2);
}
.ds-hud-item { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ds-hud-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.12); flex-shrink: 0; }
.ds-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); }
.ds-bar-track { height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; }
.ds-bar-fill { height: 100%; border-radius: 5px; }
.ds-bar-val { font-size: 0.78rem; color: rgba(255,255,255,0.75); }
.ds-heat-badge {
  display: inline-block;
  background: rgba(231,76,60,0.2);
  border: 1px solid rgba(231,76,60,0.5);
  color: #E74C3C;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 2px;
}
.ds-card {
  background: rgba(4,14,24,0.92);
  border-radius: 16px;
  border: 1px solid rgba(245,166,35,0.18);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ds-step-badge { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: #F5A623; font-weight: 700; }
.ds-seg-name { font-family: 'Cabin Condensed', sans-serif; font-size: 1.3rem; color: #fff; font-weight: 700; }
.ds-situation { font-size: 1rem; line-height: 1.7; color: rgba(255,255,255,0.9); border-left: 3px solid #F5A623; padding-left: 14px; }
.ds-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ds-choice {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ds-choice:hover { background: rgba(245,166,35,0.1); border-color: rgba(245,166,35,0.4); transform: translateY(-1px); }
.ds-choice-top { display: flex; align-items: center; gap: 10px; }
.ds-choice-icon { font-size: 1.3rem; flex-shrink: 0; }
.ds-choice-label { font-size: 1rem; font-weight: 700; color: #fff; flex: 1; }
.ds-choice-cost { font-size: 0.85rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }
.ds-cost-high { background: rgba(231,76,60,0.2); color: #E74C3C; border: 1px solid rgba(231,76,60,0.3); }
.ds-cost-med  { background: rgba(243,156,18,0.2); color: #F39C12; border: 1px solid rgba(243,156,18,0.3); }
.ds-cost-low  { background: rgba(39,174,96,0.2);  color: #27AE60; border: 1px solid rgba(39,174,96,0.3); }
.ds-choice-detail { font-size: 0.88rem; color: rgba(255,255,255,0.6); padding-left: 34px; }
.ds-feedback {
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}
.ds-feedback-text { font-size: 0.95rem; line-height: 1.65; color: rgba(255,255,255,0.9); }
.ds-start-overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(2,8,16,0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center; padding: 32px;
  border-radius: 16px;
}
.ds-start-icon { font-size: 3.5rem; }
.ds-start-title { font-family: 'Cabin Condensed', sans-serif; font-size: 2.2rem; color: #F5A623; font-weight: 700; letter-spacing: 0.06em; }
.ds-start-sub { font-size: 1rem; color: rgba(255,255,255,0.88); line-height: 1.8; max-width: 400px; }

/* ─── Snow Melt Mini-game ─── */
.sm-card {
  background: rgba(4,14,28,0.93);
  border-radius: 16px;
  border: 1px solid rgba(200,232,248,0.18);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
  margin: 0 auto;
}
.sm-header { display: flex; align-items: center; gap: 14px; }
.sm-header-icon { font-size: 2.4rem; flex-shrink: 0; }
.sm-title { font-family: 'Cabin Condensed', sans-serif; font-size: 1.5rem; color: #C8E8F8; font-weight: 700; letter-spacing: 0.05em; }
.sm-subtitle { font-size: 0.8rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 2px; }
.sm-situation { font-size: 0.97rem; line-height: 1.7; color: rgba(255,255,255,0.88); border-left: 3px solid #C8E8F8; padding-left: 14px; }
.sm-canister { display: flex; flex-direction: column; gap: 6px; }
.sm-canister-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); }
.sm-canister-track { height: 14px; background: rgba(255,255,255,0.1); border-radius: 7px; overflow: hidden; }
.sm-canister-fill { height: 100%; border-radius: 7px; transition: width 0.4s ease, background 0.4s ease; }
.sm-canister-val { font-size: 0.82rem; color: rgba(255,255,255,0.7); }
.sm-allocations { display: flex; flex-direction: column; gap: 14px; }
.sm-alloc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
}
.sm-alloc-info { flex: 1; }
.sm-alloc-label { font-size: 0.97rem; font-weight: 700; color: #fff; }
.sm-alloc-detail { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-top: 3px; line-height: 1.4; }
.sm-alloc-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sm-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.sm-btn:hover:not(:disabled) { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.6); }
.sm-btn:disabled { opacity: 0.25; cursor: default; }
.sm-alloc-pips { display: flex; gap: 5px; }
.sm-pip {
  width: 14px; height: 14px;
  border-radius: 3px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.sm-pip-on { background: #C8E8F8; border-color: #C8E8F8; box-shadow: 0 0 6px rgba(200,232,248,0.5); }
.sm-status {
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.sm-status-ready {
  color: #27AE60;
  background: rgba(39,174,96,0.1);
  border-color: rgba(39,174,96,0.3);
}
.sm-result-notes { display: flex; flex-direction: column; gap: 10px; margin: 4px 0; }
.sm-result-note {
  font-size: 0.93rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 10px 14px;
  border-left: 3px solid rgba(200,232,248,0.4);
}

/* ─── Gear Cache Mini-game ─── */
.gc-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 100vh;
}

.gc-header { text-align: center; }
.gc-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #F5E6C8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gc-subtitle { font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-top: 4px; }

.gc-weight-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.45);
  border-radius: 12px;
  padding: 16px;
}
.gc-weight-col { flex: 1; text-align: center; }
.gc-weight-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); margin-bottom: 4px; }
.gc-weight-val { font-family: 'Cabin Condensed', sans-serif; font-size: 1.6rem; font-weight: 700; color: #F5E6C8; }
.gc-weight-sub { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 2px; }
.gc-weight-arrow { font-size: 1.4rem; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.gc-saved { color: #27AE60 !important; }

.gc-pct-track {
  position: relative;
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  overflow: visible;
}
.gc-pct-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease, background 0.3s ease;
}
.gc-pct-markers {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
}
.gc-pct-markers span {
  position: absolute;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  transform: translateX(-50%);
}
.gc-pct-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  font-size: 0.72rem;
  margin-top: 18px;
}

.gc-gear-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gc-category {}
.gc-cat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
  padding-left: 4px;
}
.gc-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 6px;
}
.gc-item-row:hover { background: rgba(255,255,255,0.08); }
.gc-item-selected {
  background: rgba(39,174,96,0.2) !important;
  border-color: rgba(39,174,96,0.5) !important;
}
.gc-item-locked {
  opacity: 0.45;
  cursor: default;
}
.gc-item-check {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.gc-item-selected .gc-item-check::before { content: '☑'; }
.gc-item-check { color: rgba(255,255,255,0.5); }
.gc-locked-icon { font-size: 0.9rem; }
.gc-item-icon { font-size: 1.3rem; flex-shrink: 0; }
.gc-item-info { flex: 1; min-width: 0; }
.gc-item-name { font-size: 0.9rem; font-weight: 600; color: #F5E6C8; }
.gc-item-desc { font-size: 0.75rem; color: rgba(255,255,255,0.55); margin-top: 2px; }
.gc-item-weight {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
  white-space: nowrap;
}

.gc-mandatory-section { margin-top: 4px; }

.gc-actions { text-align: center; padding-top: 8px; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

/* ─── Pack mobile footer (always present, only visible on mobile) ─── */
.pack-mobile-footer {
  display: none; /* shown via media query */
  padding: 12px 16px;
  background: white;
  border-top: 2px solid #E8DCC8;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.pack-mobile-weight {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .character-layout { grid-template-columns: 1fr; }
  .character-preview-panel { position: static; flex-direction: row; padding: 16px; }
  .pack-layout { grid-template-columns: 1fr; }
  .pack-summary { display: none; }
  .archetype-cards { grid-template-columns: 1fr; }
  .bear-game-layout { flex-direction: column; align-items: center; }
  .hud-stats { display: none; }
  .ac-trail-summary { gap: 6px; }
  .ac-ts-val { font-size: 1.3rem; }
}

/* ─── Mobile (≤ 480px) ─── */
@media (max-width: 480px) {

  /* ── Pack Optimizer mobile footer ── */
  .pack-mobile-footer {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: white;
    border-top: 2px solid #E8DCC8;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    padding: 10px 16px 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  /* Give gear list breathing room above the fixed footer */
  .gear-list {
    padding-bottom: 100px;
  }

  /* ── Character scene — hide passport card, fix footer ── */
  .character-preview-panel {
    display: none; /* passport card not useful on mobile, causes layout traps */
  }
  .character-layout {
    display: block; /* drop grid, just flow the options */
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-bottom: 80px; /* room for fixed footer */
  }
  .character-options {
    overflow-y: visible;
    padding: 16px 16px 8px;
  }
  .scene-character .scene-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: white;
    border-top: 2px solid #E8DCC8;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }
  .scene-character .scene-footer .footer-note {
    font-size: 0.78rem;
    text-align: center;
  }

  /* ── Title ── */
  .title-content {
    padding: 28px 16px 28px;
  }
  .title-logo-img {
    height: 60px;
  }
  .title-presents {
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }
  .title-pct-game {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
    margin-bottom: 6px;
  }
  .title-tagline {
    font-size: 0.95rem;
  }
  .title-miles {
    font-size: 0.8rem;
    margin-bottom: 24px;
  }
  .title-actions {
    margin-bottom: 28px;
    gap: 12px;
  }
  .btn-large {
    font-size: 1rem;
    padding: 14px 28px;
  }
  .title-save-card {
    padding: 12px 16px;
  }

  /* ── Trail HUD ── */
  .trail-hud {
    padding: 8px 12px;
    gap: 8px;
  }
  .hud-left, .hud-right {
    min-width: 80px;
  }
  .hud-trailname {
    font-size: 1rem;
  }
  .hud-miles {
    font-size: 1.1rem;
  }
  .hud-day {
    font-size: 0.85rem;
  }
  .hud-zone, .hud-pack, .hud-weather-inline {
    font-size: 0.65rem;
  }
  .hud-avgmpd {
    font-size: 0.8rem;
  }
  .mile-progress {
    padding: 5px 12px 3px;
  }

  /* ── Event Card ── */
  .event-container {
    padding: 10px 12px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start; /* flex-end clips tall cards behind HUD on mobile */
    min-height: 0;
  }
  .event-card {
    padding: 16px 16px;
  }
  .event-title {
    font-size: 1.2rem;
  }
  .event-text {
    font-size: 0.88rem;
    margin-bottom: 14px;
  }
  .choice-btn {
    padding: 12px 14px;
    gap: 10px;
  }
  .choice-icon {
    font-size: 1.2rem;
  }
  .choice-text {
    font-size: 0.88rem;
  }

  /* ── Outcome ── */
  .outcome-dramatic {
    padding: 20px 14px 32px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
    gap: 16px;
  }
  .outcome-story {
    font-size: 1rem;
    line-height: 1.75;
  }
  .stat-reveal-row {
    grid-template-columns: 82px 1fr 76px;
    gap: 8px;
  }
  .srr-label {
    font-size: 0.78rem;
  }
  .srr-values {
    font-size: 0.78rem;
  }
  .sval-new {
    font-size: 0.88rem;
  }
  .outcome-stats-panel {
    padding: 14px 16px;
  }
  .btn-outcome {
    font-size: 0.95rem;
    padding: 13px 28px;
  }
  .outcome-learn-fact {
    font-size: 0.82rem;
    padding: 12px 14px;
  }

  /* ── Game Over ── */
  .gameover-content {
    padding: 28px 16px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
    gap: 16px;
  }
  .gameover-title {
    font-size: 2rem;
  }
  .gameover-reason {
    font-size: 0.95rem;
  }
  .gameover-stats {
    gap: 20px;
  }
  .gameover-journal {
    padding: 14px 16px;
  }

  /* ── Cutscene ── */
  .scene-cutscene {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
  }
  .cutscene-content {
    padding: 28px 16px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
    gap: 16px;
    justify-content: flex-start; /* avoid center-clipping on long text */
    padding-top: 40px;
  }
  .cutscene-text-box {
    padding: 18px 18px;
  }
  .cutscene-para {
    font-size: 0.92rem;
  }
  .cutscene-stats-bar {
    gap: 12px;
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  /* ── Act Complete ── */
  .scene-complete {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
  }
  .complete-content {
    padding: 28px 16px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
    gap: 14px;
  }
  .complete-journal {
    padding: 14px 16px;
  }
  .complete-cta {
    padding: 18px 18px;
  }

  /* ── Minigame shared ── */
  .minigame-header {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .minigame-title {
    font-size: 1.1rem;
  }
  .minigame-subtitle {
    font-size: 0.78rem;
  }
  .minigame-wrap {
    padding-bottom: 8px;
  }

  /* ── Water Carry ── */
  .water-planning {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    padding: 12px;
    flex: 1;
    min-height: 0;
  }
  .water-source-card {
    padding: 14px 16px;
  }
  .source-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 10px;
  }
  .source-name {
    font-size: 1.1rem;
  }
  .source-info {
    gap: 5px;
    margin-bottom: 12px;
  }
  .source-detail {
    font-size: 0.82rem;
  }
  .carry-question {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }
  .carry-selector {
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .carry-btn {
    min-width: 52px;
    padding: 10px 6px;
    flex: 1;
  }
  .carry-liters {
    font-size: 1rem;
  }
  .carry-lbs {
    font-size: 0.65rem;
  }
  .carry-analysis {
    gap: 10px;
    padding: 10px;
    margin-bottom: 12px;
  }
  .analysis-need {
    font-size: 1.2rem;
  }
  .water-progress {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* ── Bear Canister ── */
  .bear-mobile-controls {
    display: flex; /* show on mobile */
  }
  .bear-game-layout {
    padding: 8px 10px;
    gap: 10px;
  }
  .bear-canvas-wrap {
    zoom: 0.70; /* scale canvas to fit 375px screens */
  }
  .bear-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    min-width: auto;
    width: 100%;
    gap: 8px;
  }
  .bear-next-card, .bear-progress-card {
    flex: 1;
    min-width: 120px;
  }
  .bear-mobile-controls {
    width: 100%;
    padding: 8px 12px;
  }
  .ctrl-btn {
    font-size: 1rem;
    padding: 12px 18px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .ctrl-drop {
    font-size: 1rem;
    padding: 12px;
    min-height: 48px;
  }

  /* ── River Ford ── */
  .rf-hud {
    padding: 8px 14px;
    gap: 14px;
  }
  .rf-lane {
    padding: 10px 12px;
    gap: 10px;
  }
  .rf-step-btn {
    padding: 10px 10px;
    font-size: 0.82rem;
  }
  .rf-bank {
    padding: 12px 14px;
  }
  .rf-start-sub {
    font-size: 0.8rem;
  }
  .rf-start-title {
    font-size: 1.6rem;
  }

  /* ── SnowMelt ── */
  .sm-card {
    padding: 16px 16px;
    gap: 14px;
  }
  .sm-title {
    font-size: 1.2rem;
  }
  .sm-alloc-row {
    padding: 10px 12px;
  }
  .sm-alloc-detail {
    font-size: 0.75rem;
  }

  /* ── Snow Navigation ── */
  .sn-decision {
    padding: 16px 16px;
    gap: 12px;
  }
  .sn-hud {
    padding: 10px 14px;
    gap: 14px;
  }
  .sn-situation {
    font-size: 0.95rem;
  }

  /* ── Dry Stretch ── */
  .ds-card {
    padding: 16px 16px;
    gap: 12px;
  }
  .ds-hud {
    padding: 10px 14px;
    gap: 8px;
  }
  .ds-situation {
    font-size: 0.93rem;
  }
  .ds-choice-label {
    font-size: 0.92rem;
  }

  /* ── Gear Cache ── */
  .gc-wrap {
    padding: 14px 12px 28px;
    gap: 12px;
  }
  .gc-title {
    font-size: 1.6rem;
  }
  .gc-weight-val {
    font-size: 1.3rem;
  }

  /* ── Bear / Minigame Result ── */
  .bear-result {
    padding: 24px 16px;
    gap: 16px;
  }
  .bear-result-icon {
    font-size: 2.5rem;
  }
  .bear-result-title {
    font-size: 1.3rem;
  }
  .learn-fact {
    font-size: 0.82rem;
    padding: 12px 14px;
  }

  /* ── Mosquito HUD ── */
  .mh-hud {
    padding: 8px 14px;
    gap: 14px;
  }
  .mh-hud-val {
    font-size: 1.2rem;
  }
  .mh-head { font-size: 2.2rem; }
  .mh-torso { font-size: 2rem; }
  .mh-arm { font-size: 1.5rem; }
  .mh-leg { font-size: 1.6rem; }
}

/* ═══════════════════════════════════════════════════════════════
   ACT 2 GATE — REAL GEAR ENTRY FORM + SIGN-IN
═══════════════════════════════════════════════════════════════ */

.complete-gear-entry {
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.cge-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #F5E6C8;
  text-align: center;
}

.cge-intro {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
  line-height: 1.6;
}

.real-gear-header-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px 80px;
  gap: 8px;
  padding: 0 4px;
}

.rg-col-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
}

.real-gear-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px 80px 32px;
  gap: 8px;
  align-items: center;
}

.rg-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 7px 10px;
  color: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  width: 100%;
  min-width: 0;
  transition: border-color 0.15s;
}

.rg-input:focus {
  outline: none;
  border-color: rgba(245,166,35,0.6);
  background: rgba(255,255,255,0.12);
}

.rg-input::placeholder { color: rgba(255,255,255,0.3); }

.rg-select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 7px 6px;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
  min-width: 0;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.rg-select:focus {
  outline: none;
  border-color: rgba(245,166,35,0.6);
}

.rg-select option { background: #1a2a3a; color: #fff; }

.rg-delete {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(231,76,60,0.4);
  background: rgba(231,76,60,0.1);
  color: #E74C3C;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  line-height: 1;
  padding: 0;
}

.rg-delete:hover { background: rgba(231,76,60,0.25); border-color: #E74C3C; }

.gear-empty-hint {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 12px 0;
  font-style: italic;
}

.cge-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 4px;
}

/* ─── Sign-in gate ─── */
.complete-gate {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.gate-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #F5E6C8;
  text-align: center;
}

.gate-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  text-align: center;
  line-height: 1.6;
  margin-top: -6px;
}

.gate-email-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.gate-email-input {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
  min-width: 0;
}

.gate-email-input:focus {
  outline: none;
  border-color: rgba(245,166,35,0.7);
  background: rgba(255,255,255,0.14);
}

.gate-email-input::placeholder { color: rgba(255,255,255,0.35); }

.gate-divider {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 11px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-google:hover { background: #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.google-icon { font-size: 1.1rem; flex-shrink: 0; }

.gate-msg {
  font-size: 0.88rem;
  text-align: center;
  min-height: 20px;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
  transition: color 0.3s;
}

.gate-msg-success { color: #2ECC71 !important; }
.gate-msg-error   { color: #E74C3C !important; }

/* ─── Responsive: gear form on small screens ─── */
@media (max-width: 480px) {
  .real-gear-header-row { display: none; }
  .real-gear-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 6px;
  }
  .real-gear-row .rg-select { grid-column: 1 / -1; }
  .rg-delete { justify-self: end; }
  .complete-gate { padding: 20px 16px; }
  .gate-email-row { flex-direction: column; }
}

/* ─── Gear Choice Scene ─── */
.scene-gear-choice { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gear-choice-bg { position: absolute; inset: 0; z-index: 0; }
.gear-choice-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7)); }
.gear-choice-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 40px 20px; max-width: 640px; width: 100%; text-align: center; }
.gear-choice-header { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gear-choice-presents { font-size: 0.85rem; color: rgba(255,255,255,0.6); letter-spacing: 0.15em; text-transform: uppercase; }
.gear-choice-title { font-family: 'Cabin Condensed', sans-serif; font-size: clamp(2rem, 6vw, 3rem); color: white; font-weight: 700; }
.gear-choice-tagline { font-size: 0.85rem; color: var(--sun-gold); letter-spacing: 0.08em; }
.gear-choice-question { font-size: 1.1rem; color: rgba(255,255,255,0.85); font-weight: 600; }
.gear-choice-cards { display: flex; gap: 16px; width: 100%; }
.gear-choice-card {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; text-align: center; color: white;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.gear-choice-card:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.5); transform: translateY(-2px); }
.gcc-active { border-color: var(--sun-gold) !important; }
.gcc-locked { opacity: 0.85; }
.gcc-icon { font-size: 2rem; }
.gcc-title { font-size: 1.1rem; font-weight: 700; }
.gcc-body { font-size: 0.83rem; color: rgba(255,255,255,0.75); line-height: 1.5; }
.gcc-cta { font-size: 0.85rem; font-weight: 700; color: var(--sun-gold); margin-top: 4px; }
.gear-choice-footer { font-size: 0.8rem; }
@media (max-width: 500px) {
  .gear-choice-cards { flex-direction: column; }
}

/* ─── Google sign-in button ─── */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  background: white; color: #3c4043;
  border: 1px solid #dadce0; border-radius: 4px;
  font-size: 0.95rem; font-weight: 500; font-family: 'Roboto', sans-serif;
  cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.modal-divider { text-align: center; color: var(--text-secondary); font-size: 0.85rem; margin: 14px 0; position: relative; }
.modal-divider::before, .modal-divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border); }
.modal-divider::before { left: 0; }
.modal-divider::after { right: 0; }

/* ─── Pack Picker Scene ─── */
.scene-pack-picker { align-items: center; justify-content: center; }
.pack-picker-container {
  position: relative; z-index: 2;
  max-width: 520px; width: calc(100% - 40px);
  margin: 0 auto;
  padding: 32px 28px 36px;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius);
  box-shadow: 0 12px 50px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.9);
  animation: cardSlideUp 0.3s ease;
}
.pack-picker-container .minigame-title { color: var(--text-primary); }
.pack-picker-container .minigame-subtitle { color: var(--text-secondary); opacity: 1; }
.pack-picker-header { margin-bottom: 4px; }
.pack-picker-loading { color: var(--text-secondary); font-size: 0.9rem; text-align: center; padding: 32px 0; }
.pack-picker-error { color: var(--danger); font-size: 0.88rem; background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.25); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.pack-picker-empty { text-align: center; background: var(--cream); border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius); padding: 32px 24px; color: var(--text-primary); }
.pack-picker-list { display: flex; flex-direction: column; gap: 10px; }
.pack-picker-item { display: flex; justify-content: space-between; align-items: center; background: var(--cream); border: 2px solid rgba(0,0,0,0.1); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; text-align: left; color: var(--text-primary); transition: background 0.15s, border-color 0.15s; }
.pack-picker-item:hover { background: #ede8df; border-color: var(--trail-green); }
.pack-picker-selected { border-color: var(--bark-brown) !important; background: #fffbf0 !important; }
.ppi-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.ppi-meta { font-size: 0.8rem; color: var(--text-secondary); }
.ppi-check { font-size: 1.2rem; color: var(--sun-gold); min-width: 24px; text-align: right; }
.pack-picker-note { font-size: 0.78rem; color: var(--text-secondary); text-align: center; font-style: italic; }

/* ─── Sign-in steps ─── */
.signin-steps { display: flex; flex-direction: column; gap: 16px; margin: 4px 0; }
.signin-step { display: flex; gap: 14px; align-items: flex-start; }
.signin-step-num { min-width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: white; font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; margin-top: 2px; flex-shrink: 0; }
.signin-step-label { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.signin-step-hint { font-size: 0.82rem; color: var(--text-secondary); margin-top: 2px; }

/* ─── Weight view toggle (Base / Worn / Total) ─── */
.weight-view-toggle { display: flex; gap: 4px; margin-bottom: 12px; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 3px; }
.wvt-btn { flex: 1; padding: 5px 0; border: none; border-radius: 6px; background: transparent; color: rgba(255,255,255,0.55); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; }
.wvt-btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); }
.wvt-btn.wvt-active { background: var(--brand, #2D86C4); color: white; }

/* ─── Weight breakdown rows ─── */
.weight-breakdown { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 0.82rem; }
.wb-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.wb-label { color: rgba(255,255,255,0.6); }
.wb-val { font-weight: 700; color: var(--text-primary); }
.wb-total { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 6px; margin-top: 2px; }
.wb-total .wb-label { color: rgba(255,255,255,0.85); font-weight: 600; }
.wb-total .wb-val { font-size: 0.95rem; }

/* ─── Pack Editor Scene ─── */
.pack-editor-loading { position: relative; z-index: 2; max-width: 420px; width: 100%; margin: 80px auto 0; padding: 40px 24px; text-align: center; background: rgba(0,0,0,0.5); border-radius: var(--radius); color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════════
   GEAR SHED — exact match to packshakedown.ai
   Colors, fonts, spacing, components all sourced directly from
   packshakedown.ai/styles.css
   ═══════════════════════════════════════════════════════════════════ */

/* CSS variables (mirrors packshakedown.ai :root) */
.gs-page {
  --gs-blue:        #2563eb;
  --gs-green:       #2d6a4f;
  --gs-green-light: #d8f3dc;
  --gs-green-sel-bg:#f0fdf4;
  --gs-green-sel-bd:#bbf7d0;
  --gs-gray-50:     #f9fafb;
  --gs-gray-100:    #f3f4f6;
  --gs-gray-200:    #e5e7eb;
  --gs-gray-300:    #d1d5db;
  --gs-gray-400:    #9ca3af;
  --gs-gray-500:    #6b7280;
  --gs-gray-700:    #374151;
  --gs-gray-900:    #111827;
  --gs-nav:         #1a3d2e;
  --gs-radius:      10px;
}

/* Page shell — must be height:100vh + overflow-y:auto so it scrolls inside #app (which is overflow:hidden) */
.gs-page {
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f5f0e8;
  font-family: 'Cabin', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gs-gray-900);
}

/* Nav bar */
.gs-nav {
  background: var(--gs-nav);
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.gs-nav-logo { height: 36px; display: block; }
.gs-nav-tag {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px; padding: 4px 12px;
}

/* Content shell */
.gs-shell { max-width: 1100px; margin: 0 auto; padding: 0 32px 80px; }

/* Page header (dash-header) */
.gs-header { padding: 28px 0 20px; }
.gs-header h1 { font-size: 32px; font-weight: 900; letter-spacing: -.5px; color: var(--gs-gray-900); }
.gs-header p  { font-size: 15px; color: var(--gs-gray-700); font-weight: 500; margin-top: 4px; }

/* Build mode banner */
.gs-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gs-green); color: #fff;
  padding: 10px 16px; border-radius: 10px; margin-bottom: 16px;
}
.gs-banner-name { font-size: 14px; font-weight: 800; }
.gs-banner-hint { font-size: 12px; opacity: .75; margin-top: 2px; }

/* Split layout: gear list left, pack panel right */
.gs-split {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 800px) {
  .gs-split { grid-template-columns: 1fr; }
  .gs-shell { padding: 0 16px 120px; }
  .gs-nav { padding: 0 16px; }
}

/* Category block */
.gs-cat { margin-bottom: 20px; }
.gs-cat-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: var(--gs-gray-900);
  border-radius: 8px;
  margin-bottom: 6px;
}
.gs-cat-hd-label {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  color: #fff;
}
.gs-cat-hd-meta {
  font-size: 11px; color: rgba(255,255,255,.5);
}

/* Item row */
.gs-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--gs-gray-200);
  border-radius: 7px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.gs-item:hover { background: var(--gs-gray-50); }
.gs-item.gs-in-pack {
  background: var(--gs-green-sel-bg) !important;
  border-color: var(--gs-green-sel-bd) !important;
}
.gs-item.gs-mandatory {
  background: var(--gs-green-sel-bg);
  border-color: var(--gs-green-sel-bd);
  cursor: default;
  opacity: .85;
}
.gs-item.gs-exclusive { opacity: .45; }
.gs-item-left { flex: 1; min-width: 0; }
.gs-item-name { font-weight: 600; color: var(--gs-gray-900); font-size: 13px; }
.gs-item-brand { font-size: 11px; color: var(--gs-gray-500); margin-left: 6px; }
.gs-item-notes { font-size: 11px; color: var(--gs-gray-400); margin-top: 2px; }
.gs-item-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.gs-stat-tag {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 10px;
}
.gs-stat-pos { background: #d1fae5; color: #065f46; }
.gs-stat-neg { background: #fee2e2; color: #991b1b; }
.gs-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gs-item-weight { font-size: 12px; font-weight: 600; color: var(--gs-gray-700); }
.gs-lock-badge {
  font-size: 10px; color: var(--gs-gray-400);
  background: var(--gs-gray-100); border-radius: 4px; padding: 2px 6px;
}

/* Pack panel (pb-panel) */
.gs-panel {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid var(--gs-green-sel-bd);
  box-shadow: 0 4px 24px rgba(45,106,79,.12);
  position: sticky;
  top: 72px;
  overflow: hidden;
}
.gs-panel-hd {
  background: var(--gs-green);
  padding: 14px 16px;
}
.gs-ph-name {
  font-size: 15px; font-weight: 800; color: #fff;
  margin-bottom: 10px;
}
.gs-ph-weights {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.gs-ph-wt {
  background: rgba(0,0,0,.2);
  border-radius: 7px; padding: 7px 6px; text-align: center;
}
.gs-ph-val {
  font-size: 14px; font-weight: 900; color: #fff;
}
.gs-ph-lbl {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.6); margin-top: 2px;
}
.gs-panel-items {
  max-height: 360px; overflow-y: auto; padding: 10px 12px;
}
.gs-panel-empty {
  padding: 24px 12px; text-align: center;
  font-size: 13px; color: var(--gs-gray-400);
}
.gs-pi-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--gs-gray-50);
  border-radius: 8px; margin-bottom: 5px;
}
.gs-pi-name {
  font-size: 13px; font-weight: 600; color: var(--gs-gray-900);
  flex: 1; min-width: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.gs-pi-wt { font-size: 11px; color: var(--gs-gray-400); flex-shrink: 0; }
.gs-panel-footer {
  padding: 12px; border-top: 1px solid var(--gs-gray-100);
}
.gs-panel-footer .gs-warn {
  font-size: 12px; color: #d97706;
  background: #fef3c7; border-radius: 6px;
  padding: 8px 10px; margin-bottom: 8px;
}
.gs-panel-footer .gs-all-clear {
  font-size: 12px; color: var(--gs-green);
  background: var(--gs-green-sel-bg); border-radius: 6px;
  padding: 8px 10px; margin-bottom: 8px;
}

/* Confirm / CTA buttons in gear shed */
.gs-btn-primary {
  display: block; width: 100%; padding: 12px;
  background: var(--gs-green); color: #fff;
  font-size: 15px; font-weight: 700;
  border: none; border-radius: 8px; cursor: pointer;
  text-align: center; transition: background .15s;
}
.gs-btn-primary:hover { background: #1f4d38; }
.gs-btn-ghost {
  display: block; width: 100%; padding: 10px;
  background: transparent; color: var(--gs-gray-500);
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--gs-gray-200); border-radius: 8px;
  cursor: pointer; text-align: center; margin-top: 8px;
  transition: border-color .15s, color .15s;
}
.gs-btn-ghost:hover { border-color: var(--gs-gray-400); color: var(--gs-gray-700); }

/* Mobile sticky footer */
.gs-mobile-footer {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--gs-gray-200);
  padding: 12px 16px; z-index: 50;
  box-shadow: 0 -4px 12px rgba(0,0,0,.1);
}
@media (max-width: 800px) {
  .gs-mobile-footer { display: block; }
  .gs-split { padding-bottom: 100px; }
  .gs-panel { display: none; } /* hidden on mobile — summary in footer only */
}
.gs-mobile-weight {
  font-size: 13px; font-weight: 700; color: var(--gs-green);
  margin-bottom: 8px; text-align: center;
}

/* ─── Respawn Modal (failure 1 or 2) ──────────────────────────────────────── */
.go-respawn-scene { position: relative; min-height: 100vh; }
.go-respawn-bg { position: absolute; inset: 0; z-index: 0; filter: blur(3px) brightness(0.4); }
.go-respawn-bg svg, .go-respawn-bg img { width: 100%; height: 100%; object-fit: cover; }
.go-respawn-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(0,0,0,0.55);
}
.go-respawn-modal {
  position: relative; z-index: 2;
  max-width: 520px; margin: 0 auto;
  padding: 40px 28px 48px;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; text-align: center;
}

.go-respawn-strike-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); border-radius: 24px;
  padding: 8px 18px;
}
.go-life-pip { font-size: 1.5rem; line-height: 1; }
.go-life-dead  { opacity: 0.9; }
.go-life-alive { opacity: 0.9; }
.go-respawn-strike-label {
  font-size: 0.78rem; font-weight: 800; color: rgba(255,255,255,0.7);
  text-transform: uppercase; letter-spacing: .08em; margin-left: 6px;
}

.go-respawn-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 2.2rem; color: #fff; line-height: 1.1; margin-top: 4px;
}
.go-respawn-body {
  font-size: 1rem; color: rgba(255,255,255,0.85); line-height: 1.65;
  max-width: 460px;
}
.go-respawn-note {
  background: rgba(255,255,255,0.1); border-radius: 10px;
  padding: 12px 18px; font-size: 0.88rem; color: rgba(255,255,255,0.75);
  font-style: italic; display: flex; gap: 10px; align-items: flex-start;
  max-width: 460px; text-align: left;
}
.go-respawn-note-icon { font-size: 1.1rem; flex-shrink: 0; }
.go-respawn-stats {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
}
.go-respawn-stat { color: rgba(255,255,255,0.9); font-size: 0.95rem; }
.go-respawn-lives-note {
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.07); border-radius: 8px;
  padding: 8px 16px;
}
.go-respawn-btn { margin-top: 8px; min-width: 280px; }
.go-respawn-subtext {
  font-size: 0.78rem; color: rgba(255,255,255,0.4); font-style: italic;
}

/* ─── True Game Over (failure 3) ─────────────────────────────────────────── */
.go-trueover-scene { position: relative; }
.go-trueover-content { padding-top: 56px; }
.go-trueover-badge {
  display: flex; gap: 10px; justify-content: center;
  font-size: 2rem; margin-bottom: 4px;
}
.go-trueover-eyebrow {
  font-size: 0.75rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: #ef4444; margin-bottom: 4px;
}
.go-trueover-title { font-size: 2.8rem !important; margin-bottom: 4px; }
.go-trueover-stats { flex-wrap: wrap; justify-content: center; gap: 20px !important; }
.go-trueover-epitaph {
  font-size: 0.92rem; color: rgba(255,255,255,0.55); font-style: italic;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  padding: 12px 20px; max-width: 460px;
}
.go-trueover-verdict {
  font-size: 0.88rem; color: rgba(255,255,255,0.45);
  max-width: 420px; line-height: 1.5;
}

/* ─── Badge Modal ─── */
.badge-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: badge-overlay-in 0.35s ease;
}

@keyframes badge-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.badge-modal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 48px 40px 40px;
  text-align: center;
  max-width: 380px;
  width: 100%;
}

.badge-modal-img-wrap {
  width: 220px;
  height: 220px;
  margin-bottom: 32px;
}

.badge-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: badge-spin-land 2s cubic-bezier(0.12, 0.8, 0.32, 1.0) forwards;
  filter: drop-shadow(0 0 32px rgba(245, 166, 35, 0.5));
}

@keyframes badge-spin-land {
  from { transform: rotate(0deg) scale(0.7); opacity: 0.3; }
  30%  { opacity: 1; }
  to   { transform: rotate(1080deg) scale(1); opacity: 1; }
}

.badge-modal-text {
  opacity: 0;
  transform: translateY(10px);
  animation: badge-text-in 0.5s ease forwards;
  animation-delay: 2.1s;
}

@keyframes badge-text-in {
  to { opacity: 1; transform: translateY(0); }
}

.badge-modal-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.badge-modal-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sun-gold);
  margin-bottom: 0;
}

.badge-modal-btn-wrap {
  margin-top: 32px;
  opacity: 0;
  animation: badge-text-in 0.4s ease forwards;
  animation-delay: 2.7s;
}


/* ═══════════════════════════════════════════════════════════════
   CONVERSATION MODAL
   Typewriter-driven NPC dialogue with multi-round decision trees.
   All classes prefixed conv- to avoid collisions.
   ═══════════════════════════════════════════════════════════════ */

#conv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 24, 16, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.conv-modal {
  background: #0f2318;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.conv-header {
  background: rgba(0,0,0,0.3);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.conv-hdr-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.conv-hdr-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.conv-portraits {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 24px 0;
  flex-shrink: 0;
}

.conv-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.conv-av {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
}

.conv-av-npc {
  background: rgba(45,106,79,0.4);
  border: 2px solid rgba(82,183,136,0.45);
}

.conv-av-player {
  background: rgba(245,166,35,0.15);
  border: 2px solid rgba(245,166,35,0.35);
}

.conv-av-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.conv-bubbles {
  margin: 12px 16px 0;
  background: #f7f5f0;
  border-radius: 14px 14px 0 0;
  padding: 14px;
  min-height: 140px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.conv-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.65;
  animation: convFadeUp .22s ease;
}

@keyframes convFadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.conv-bubble-npc {
  align-self: flex-start;
  background: #d8f3e8;
  border: 1px solid #a8dfc4;
  color: #0f3d25;
  border-bottom-left-radius: 4px;
}

.conv-bubble-player {
  align-self: flex-end;
  background: #fef3da;
  border: 1px solid #f5d68a;
  color: #5a3a00;
  border-bottom-right-radius: 4px;
}

.conv-cursor {
  display: inline-block;
  width: 2px;
  height: 13px;
  background: #2d6a4f;
  margin-left: 2px;
  vertical-align: middle;
  animation: convBlink .7s step-end infinite;
}

@keyframes convBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Choices ── */
.conv-choices {
  background: #f7f5f0;
  margin: 0 16px;
  border-radius: 0 0 14px 14px;
  padding: 4px 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid #e2ded6;
}

.conv-choices.hidden { display: none; }

.conv-choices-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8a8278;
  padding-top: 10px;
  margin-bottom: 1px;
}

.conv-choice-btn {
  background: #fff;
  border: 1.5px solid #c8c3bb;
  border-radius: 10px;
  padding: 11px 13px;
  color: #1a1a1a;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all .18s;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
}

.conv-choice-btn:hover {
  background: #d8f3e8;
  border-color: #52b788;
  color: #0f3d25;
}

.conv-choice-btn:focus-visible {
  outline: 3px solid #52b788;
  outline-offset: 2px;
}

.conv-choice-btn.conv-choice-selected {
  background: #fef3da;
  border-color: #f5d68a;
  color: #8a6820;
  pointer-events: none;
}

.conv-choice-icon { font-size: 16px; flex-shrink: 0; }

/* ── Footer: pips + skip ── */
.conv-footer {
  padding: 11px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.conv-pips { display: flex; gap: 6px; }

.conv-pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  transition: background .3s;
}

.conv-pip-active { background: rgba(82,183,136,0.55); }
.conv-pip-done   { background: #52b788; }

.conv-skip {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  color: rgba(255,255,255,0.38);
  font-size: 12px;
  padding: 7px 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.conv-skip:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.conv-skip:hover {
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.3);
}

.conv-continue {
  background: var(--brand, #2d6a4f);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.conv-continue:hover {
  background: #3a8a65;
}

/* ─── Landscape Prompt (portrait mobile only) ─── */
.landscape-prompt {
  display: none;
  position: fixed; inset: 0; z-index: 99999;
  background: #0d1f12;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 32px;
  font-family: 'Cabin', 'Segoe UI', sans-serif;
}
.landscape-prompt-icon {
  font-size: 56px; margin-bottom: 20px;
  animation: lp-rotate 1.8s ease-in-out infinite alternate;
}
@keyframes lp-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(90deg); }
}
.landscape-prompt-title {
  font-size: 22px; font-weight: 700; color: #fff;
  margin-bottom: 10px; letter-spacing: -.02em;
}
.landscape-prompt-sub {
  font-size: 14px; color: rgba(255,255,255,.55); line-height: 1.6; max-width: 260px;
}
@media (orientation: portrait) and (max-width: 900px) {
  .landscape-prompt { display: flex; }
}
