/* 《毕业分岔路》H5 — 使用 assets/ui 正式素材，场景为 CSS 像素插画 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --orange: #F5A623;
  --cream: #FFF8F0;
  --navy: #1E3A5F;
  --green: #10B981;
  --purple: #8B5CF6;
  --red: #EF4444;
  --gold: #F59E0B;
  --blue: #3B82F6;
  --brown: #5c3d2e;
  --shadow: 0 4px 0 rgba(0,0,0,0.28);
  --font-pixel: 'Press Start 2P', 'Microsoft YaHei', sans-serif;
  --font-body: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #12121f;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.stage-wrap {
  width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #252545 0%, #12121f 100%);
}

.stage {
  position: relative;
  width: 100%; max-width: 430px;
  height: 100%; max-height: 860px;
  background: var(--cream);
  overflow: hidden;
  box-shadow: 0 0 48px rgba(0,0,0,0.55);
}

#app { width: 100%; height: 100%; position: relative; }

.page {
  position: absolute; inset: 0;
  overflow: hidden;
  animation: fadeIn 0.45s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.popup-in { animation: popupIn 0.35s ease; }
.pulse { animation: pulse 1.4s infinite; }
.shake { animation: shake 0.45s ease; }

/* ─── P001 封面（正式素材 cover.png） ─── */
.page-cover { background: #000; }

.cover-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.cover-mask {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  pointer-events: none;
}

.cover-actions {
  position: absolute;
  left: 50%; bottom: 3.5%;
  transform: translateX(-50%);
  width: 68%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 5;
}

.img-btn {
  background: none; border: none; padding: 0;
  width: 100%; cursor: pointer;
  transition: transform 0.15s;
}

.img-btn img {
  width: 100%; height: auto; display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,0.35));
}

.img-btn:active { transform: scale(0.96); }
.img-btn.disabled { opacity: 0.45; pointer-events: none; }

.pixel-btn-sm {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px; font-weight: bold;
  color: var(--cream);
  background: linear-gradient(180deg, #6b4423 0%, #4a2f18 100%);
  border: 3px solid #2a1810;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.pixel-btn-sm:active { transform: scale(0.97); }

/* ─── P002 路径选择 ─── */
.page-path {
  background: linear-gradient(180deg, #0f172a 0%, var(--navy) 35%, #2a1810 100%);
}

.path-stage {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 24px 16px 20px;
  overflow-y: auto;
}

.path-logo {
  width: 88%; max-width: 320px;
  height: auto; margin-bottom: 8px;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.4));
}

.path-subtitle {
  color: rgba(255,248,240,0.85);
  font-size: 13px; margin-bottom: 16px;
}

.path-spotlights {
  display: flex; gap: 20px; margin-bottom: 16px;
}

.spotlight {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: rgba(0,0,0,0.45);
  border: 3px solid var(--orange);
  box-shadow: 0 0 16px rgba(245,166,35,0.35);
  animation: float 2.5s ease-in-out infinite;
}

.spotlight:nth-child(2) { animation-delay: 0.4s; border-color: var(--navy); background: rgba(30,58,95,0.6); }
.spotlight:nth-child(3) { animation-delay: 0.8s; border-color: var(--green); }

.path-title {
  color: var(--cream);
  font-size: 16px; text-align: center;
  margin-bottom: 14px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.path-buttons {
  width: 100%; display: flex; flex-direction: column; gap: 10px;
}

.path-btn {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  padding: 12px 14px;
  text-align: left;
  border: 3px solid var(--path-color, var(--orange));
  background: rgba(0,0,0,0.55);
  color: var(--cream);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.path-btn:active { transform: scale(0.98); }

.path-icon { grid-row: 1 / 3; font-size: 26px; text-align: center; }
.path-btn-label { font-size: 15px; font-weight: bold; }
.path-btn-sub { grid-column: 2; font-size: 12px; opacity: 0.8; }

.path-back { margin-top: 14px; max-width: 200px; }

/* ─── 场景插画层 ─── */
.scene-illustration {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
}

.page-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
}

/* 默认/宿舍 */
.scene-dorm {
  background: linear-gradient(180deg, #1a2744 0%, #3d2a1a 55%, #5c4030 100%);
}

.scene-email {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.scene-interview {
  background: linear-gradient(180deg, #1e3a5f 0%, #475569 60%, #64748b 100%);
}

.scene-offer, .scene-cards {
  background: linear-gradient(180deg, #4a2c2a 0%, var(--navy) 50%, #2a1810 100%);
}

.scene-office {
  background: linear-gradient(180deg, #334155 0%, #1e293b 70%, #0f172a 100%);
}

.theme-study.scene-library,
.scene-library { background: linear-gradient(180deg, #4c1d95 0%, var(--purple) 55%, #312e81 100%); }

.theme-study.scene-campus,
.scene-campus { background: linear-gradient(180deg, #3730a3 0%, var(--purple) 50%, #581c87 100%); }

.theme-study.scene-exam,
.scene-exam { background: linear-gradient(180deg, #312e81 0%, #4338ca 100%); }

.theme-study.scene-interview-study,
.scene-interview-study { background: linear-gradient(180deg, #4c1d95 0%, #6366f1 100%); }

.theme-study.scene-result,
.scene-result { background: linear-gradient(180deg, #581c87 0%, var(--purple) 100%); }

.theme-gov.scene-gov-desk,
.scene-gov-desk { background: linear-gradient(180deg, #0f172a 0%, var(--navy) 100%); }

.theme-gov.scene-gov-study,
.scene-gov-study { background: linear-gradient(180deg, #1e3a5f 0%, #334155 100%); }

.theme-gov.scene-gov-exam,
.scene-gov-exam { background: linear-gradient(180deg, #0f172a 0%, #1e40af 100%); }

.theme-gov.scene-gov-interview,
.scene-gov-interview { background: linear-gradient(180deg, #1e3a5f 0%, #475569 100%); }

.theme-gov.scene-gov-final,
.scene-gov-final { background: linear-gradient(180deg, #0f172a 0%, var(--navy) 80%, #1e293b 100%); }

.scene-default {
  background: linear-gradient(180deg, var(--navy) 0%, var(--orange) 70%, var(--cream) 100%);
}

/* 像素装饰元素 */
.decor-window {
  position: absolute; top: 12%; right: 8%;
  width: 42%; height: 28%;
  background: linear-gradient(180deg, #1e3a5f 0%, #2563eb 100%);
  border: 4px solid var(--brown);
  box-shadow: inset 0 0 20px rgba(147,197,253,0.3);
}

.decor-window::after {
  content: ''; position: absolute; inset: 45% 0;
  height: 4px; background: var(--brown);
}

.decor-desk {
  position: absolute; bottom: 28%; left: 8%;
  width: 55%; height: 8%;
  background: var(--brown);
  border: 3px solid #3d2518;
}

.decor-lamp {
  position: absolute; bottom: 36%; left: 12%;
  width: 12px; height: 40px;
  background: var(--orange);
  box-shadow: 0 0 24px rgba(245,166,35,0.6);
}

.decor-laptop {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
  width: 70%; height: 38%;
  background: #334155;
  border: 4px solid #1e293b;
  border-radius: 4px;
}

.decor-laptop::before {
  content: '收件箱 · 12';
  position: absolute; top: 12px; left: 12px;
  font-size: 11px; color: #94a3b8;
}

.decor-mail-alert {
  position: absolute; top: 38%; left: 58%;
  width: 36px; height: 36px;
  background: var(--red);
  color: #fff; font-weight: bold; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fff;
  animation: blink 1s infinite;
}

.decor-table {
  position: absolute; bottom: 32%; left: 50%; transform: translateX(-50%);
  width: 65%; height: 10%;
  background: #78350f;
  border: 4px solid #451a03;
}

.decor-boss {
  position: absolute; bottom: 42%; left: 18%;
  width: 48px; height: 64px;
  background: #475569;
  border: 3px solid #1e293b;
}

.decor-boss::after {
  content: '面试官';
  position: absolute; bottom: -18px; left: -8px;
  font-size: 10px; color: var(--cream);
  white-space: nowrap;
}

.decor-city {
  position: absolute; top: 14%; left: 10%; right: 10%; height: 18%;
  background: repeating-linear-gradient(90deg, #1e293b 0, #1e293b 16px, #334155 16px, #334155 20px);
  opacity: 0.7;
}

.decor-letter {
  position: absolute; bottom: 35%;
  width: 28%; height: 18%;
  background: var(--cream);
  border: 3px solid var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 24px;
  animation: float 2s infinite;
}

.decor-letter-a { left: 14%; color: var(--red); }
.decor-letter-b { right: 14%; color: var(--green); animation-delay: 0.5s; }

.decor-monitor {
  position: absolute; top: 28%; left: 50%; transform: translateX(-50%);
  width: 50%; height: 22%;
  background: #0ea5e9;
  border: 4px solid #334155;
  box-shadow: 0 0 12px rgba(14,165,233,0.4);
}

.decor-clock {
  position: absolute; top: 16%; right: 12%;
  width: 44px; height: 44px;
  border: 4px solid var(--cream);
  border-radius: 50%;
  background: #1e293b;
}

.decor-clock::after {
  content: '22:30';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: var(--cream);
}

.decor-coffee {
  position: absolute; bottom: 38%; right: 16%;
  width: 20px; height: 24px;
  background: #fff;
  border: 2px solid #94a3b8;
}

.decor-card {
  position: absolute; bottom: 30%;
  width: 22%; height: 16%;
  border: 3px solid var(--cream);
  animation: float 2.2s infinite;
}

.decor-card-1 { left: 12%; background: rgba(239,68,68,0.5); }
.decor-card-2 { left: 39%; background: rgba(59,130,246,0.5); animation-delay: 0.3s; }
.decor-card-3 { right: 12%; background: rgba(16,185,129,0.5); animation-delay: 0.6s; }

.decor-books {
  position: absolute; bottom: 30%; left: 10%;
  width: 50%; height: 20%;
  background: repeating-linear-gradient(0deg, #7c3aed 0, #7c3aed 8px, #6d28d9 8px, #6d28d9 16px);
  border: 3px solid #4c1d95;
}

.decor-building {
  position: absolute; bottom: 25%; left: 50%; transform: translateX(-50%);
  width: 60%; height: 25%;
  background: #4338ca;
  border: 4px solid #312e81;
}

.decor-paper {
  position: absolute; top: 30%; left: 20%;
  width: 60%; height: 30%;
  background: var(--cream);
  border: 3px solid #94a3b8;
}

.decor-envelope {
  position: absolute; bottom: 35%; left: 50%; transform: translateX(-50%);
  width: 40%; height: 22%;
  background: var(--gold);
  border: 3px solid var(--brown);
}

.decor-doc {
  position: absolute; bottom: 32%; left: 15%;
  width: 50%; height: 18%;
  background: var(--cream);
  border: 3px solid var(--navy);
}

.decor-stamp {
  position: absolute; bottom: 38%; right: 20%;
  width: 48px; height: 48px;
  border: 4px solid var(--red);
  border-radius: 50%;
  color: var(--red); font-size: 11px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-12deg);
}

/* ─── HUD ─── */
.hud {
  flex-shrink: 0;
  padding: 8px 10px;
  background: rgba(0,0,0,0.62);
  border-bottom: 3px solid var(--orange);
}

.hud-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}

.hud-path { color: var(--cream); font-size: 12px; font-weight: bold; }
.hud-level { color: var(--orange); font-size: 11px; font-weight: bold; }

.hud-stats { display: flex; flex-direction: column; gap: 5px; }

.stat-bar {
  display: grid;
  grid-template-columns: 52px 1fr 22px;
  align-items: center; gap: 5px;
}

.stat-label { color: var(--cream); font-size: 10px; }
.stat-track { height: 7px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); }
.stat-fill { height: 100%; transition: width 0.7s ease; }
.stat-val { color: var(--cream); font-size: 11px; font-weight: bold; text-align: right; }

/* ─── 叙事 / 选项 ─── */
.page-narrative { cursor: pointer; }

.narrative-box, .feedback-box, .risk-box {
  flex: 1;
  display: flex; align-items: flex-end;
  padding: 10px 12px 6px;
}

.narrative-box p, .feedback-box p, .risk-box p {
  width: 100%;
  background: rgba(255,248,240,0.96);
  border: 3px solid var(--navy);
  padding: 14px;
  font-size: 14px; line-height: 1.65; color: #222;
  box-shadow: var(--shadow);
}

.speaker-badge {
  align-self: flex-start;
  margin: 6px 12px 0;
  padding: 5px 10px;
  background: var(--navy); color: var(--cream);
  font-size: 11px; border: 2px solid var(--orange);
}

.tap-hint {
  text-align: center; padding: 10px;
  color: var(--cream); font-size: 13px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.choice-question {
  padding: 8px 12px 6px;
  color: var(--cream); font-size: 14px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.85);
}

.choice-list {
  flex: 1; overflow-y: auto;
  padding: 6px 10px 14px;
  display: flex; flex-direction: column; gap: 8px;
}

.choice-card {
  position: relative; text-align: left;
  padding: 12px 14px;
  background: rgba(255,248,240,0.96);
  border: 3px solid var(--navy);
  cursor: pointer;
  box-shadow: var(--shadow);
  animation: float 2.8s ease-in-out infinite;
}

.choice-card:nth-child(2) { animation-delay: 0.25s; }
.choice-card:nth-child(3) { animation-delay: 0.5s; }
.choice-card:active { transform: scale(0.98); }
.choice-card.risk { border-color: var(--red); }
.choice-card.recommended { border-color: var(--green); }

.choice-text { display: block; font-size: 13px; line-height: 1.5; color: #222; margin-bottom: 4px; }
.choice-stats { font-size: 10px; color: var(--navy); font-weight: bold; }
.risk-icon { position: absolute; top: 6px; right: 8px; animation: blink 0.9s infinite; }
.rec-icon { display: block; font-size: 10px; color: var(--green); margin-bottom: 2px; }

/* ─── 数据卡 / 反馈 / 风险 ─── */
.page-datacard .page-content,
.page-feedback .page-content,
.page-stats .page-content,
.page-risk .page-content {
  justify-content: flex-end;
  padding-bottom: 12px;
}

.data-card, .feedback-box, .stats-panel, .risk-box {
  margin: 0 12px;
  background: rgba(255,248,240,0.97);
  border: 4px solid var(--orange);
  padding: 16px;
  box-shadow: 0 6px 0 rgba(0,0,0,0.25);
}

.data-card h3 { font-size: 15px; color: var(--navy); margin-bottom: 10px; }
.data-card ul { list-style: none; margin-bottom: 10px; }
.data-card li {
  padding: 6px 0; font-size: 13px; color: #444;
  border-bottom: 2px dashed rgba(0,0,0,0.08);
}

.data-bars { margin-bottom: 10px; }
.data-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; color: #555; }
.data-bar { flex: 1; height: 8px; background: #e5e7eb; border: 1px solid #ccc; }
.data-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--orange)); }

.data-tip { font-size: 12px; color: var(--red); font-weight: bold; margin-bottom: 12px; }
.feedback-box.success { border-color: var(--green); }

.page-risk .risk-box {
  background: rgba(40,0,0,0.92);
  border-color: var(--red);
}

.page-risk .risk-box p {
  background: transparent; border: none; color: var(--cream); box-shadow: none;
}

.risk-icon-big { font-size: 42px; text-align: center; margin-bottom: 8px; }

.stats-title { font-size: 16px; color: var(--navy); margin-bottom: 10px; text-align: center; }

.stat-row {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 0; font-size: 13px; color: #333;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.stat-from { opacity: 0.55; }
.stat-to { font-weight: bold; color: var(--orange); }
.stat-diff.up { color: var(--green); font-weight: bold; }
.stat-diff.down { color: var(--red); font-weight: bold; }

/* ─── 结局 ─── */
.page-ending { background: #1a1a2e; }

.ending-good { background: linear-gradient(180deg, #1a1a2e 0%, #92400e 45%, var(--cream) 100%); }
.ending-bad { background: linear-gradient(180deg, #1a0505 0%, #450a0a 50%, #27272a 100%); }

.ending-canvas {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
}

.ending-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px 16px; text-align: center; overflow-y: auto;
}

.ending-badge { font-size: clamp(18px, 5.5vw, 26px); font-weight: bold; margin-bottom: 10px; }
.ending-good .ending-badge { color: var(--gold); text-shadow: 2px 2px 0 rgba(0,0,0,0.3); }
.ending-bad .ending-badge { color: var(--red); }

.ending-overlay h2 { font-size: 17px; color: var(--cream); margin-bottom: 10px; }
.ending-desc { font-size: 13px; color: rgba(255,248,240,0.92); line-height: 1.65; max-width: 300px; margin-bottom: 12px; }

.ending-stats {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  font-size: 11px; color: var(--cream); margin-bottom: 8px;
}

.ending-compare { font-size: 11px; color: rgba(255,248,240,0.7); margin-bottom: 8px; }
.ending-resource { font-size: 12px; color: var(--orange); margin-bottom: 12px; }

.ending-actions {
  display: flex; flex-direction: column; gap: 8px;
  width: 100%; max-width: 260px;
}

/* ─── 报告 / 海报 / 重玩 ─── */
.page-report, .page-replay {
  background: linear-gradient(180deg, var(--navy) 0%, var(--cream) 100%);
  overflow-y: auto;
}

.report-card, .replay-card {
  margin: 16px 12px;
  background: var(--cream);
  border: 4px solid var(--orange);
  padding: 18px;
  box-shadow: var(--shadow);
}

.report-card h2, .replay-card h2 { font-size: 17px; color: var(--navy); margin-bottom: 14px; }
.report-section { margin-bottom: 14px; }
.report-section h4 { font-size: 12px; color: var(--orange); margin-bottom: 4px; }
.report-path { font-size: 12px; line-height: 1.55; color: #444; word-break: break-all; }

.mini-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 72px; margin-top: 8px; padding: 6px;
  background: rgba(0,0,0,0.04);
}

.mini-chart .bar {
  flex: 1; background: var(--blue); min-height: 6px;
  display: flex; align-items: flex-start; justify-content: center;
}

.mini-chart .bar span { font-size: 9px; color: #fff; margin-top: 2px; }

.report-compare {
  padding: 8px; background: rgba(245,166,35,0.12);
  font-size: 11px; margin-bottom: 12px;
}

.page-poster {
  background: #181818;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px; overflow-y: auto;
}

#posterCanvas {
  max-width: 100%; height: auto;
  border: 4px solid var(--orange);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.poster-tip { color: #999; font-size: 11px; margin: 10px 0; }
.poster-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 260px; }

.replay-list { margin: 12px 0; }
.replay-item {
  padding: 10px; margin-bottom: 6px;
  background: rgba(0,0,0,0.04);
  font-size: 13px; color: #666;
  border: 2px solid #ddd;
}

.replay-item.done { color: var(--green); border-color: var(--green); background: rgba(16,185,129,0.08); }

.certificate {
  text-align: center; padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #fff; font-weight: bold;
  margin-bottom: 12px; border: 3px solid var(--navy);
}

/* ─── 按钮 ─── */
.btn-primary, .btn-secondary, .btn-danger {
  display: block; width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px; font-weight: bold;
  border: 3px solid; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.12s;
}

.btn-primary:active, .btn-secondary:active, .btn-danger:active { transform: scale(0.97); }

.btn-primary { background: var(--orange); border-color: #b45309; color: #fff; margin-top: 8px; }
.btn-secondary { background: transparent; border-color: var(--navy); color: var(--navy); margin-top: 6px; }
.btn-danger { background: var(--red); border-color: #991b1b; color: #fff; margin-top: 10px; }

.page-ending .btn-secondary { border-color: var(--cream); color: var(--cream); }

/* ─── 弹窗 / Toast ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-box {
  width: 100%; max-width: 340px;
  background: var(--cream);
  border: 4px solid var(--orange);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.modal-box h3 { font-size: 17px; color: var(--navy); margin-bottom: 12px; }
.modal-box p { font-size: 13px; line-height: 1.7; color: #444; margin-bottom: 14px; }
.modal-box .help-text { white-space: pre-line; }

.toast {
  position: fixed; bottom: 72px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(0,0,0,0.88);
  color: var(--cream);
  padding: 10px 18px;
  border: 2px solid var(--orange);
  font-size: 13px; z-index: 9999;
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; max-width: 90vw; text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.choice-list::-webkit-scrollbar,
.page-report::-webkit-scrollbar,
.path-stage::-webkit-scrollbar { width: 4px; }
.choice-list::-webkit-scrollbar-thumb { background: var(--orange); }
