:root {
  color-scheme: light;
  --ink: #28231b;
  --paper: #fff6e4;
  --cream: #fffaf0;
  --red: #a42c1d;
  --mustard: #efa932;
  --gold-paper: #fff0ca;
  --teal: #174b4d;
  --teal-paper: #e1eee6;
  --rule: #d7c3a0;
  --muted: #665543;
  font-family: "Noto Sans CJK SC", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  min-width: 0;
  margin: 0;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
h1, h2, p, figure { margin: 0; }
h1, h2 { line-height: 1.24; }
h1 { font-size: clamp(27px, 6.7vw, 39px); font-weight: 900; letter-spacing: -.035em; }
h2 { font-size: 19px; }
a { color: var(--teal); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, .chat-log:focus-visible {
  outline: 3px solid #096469;
  outline-offset: 3px;
}
h1:focus { outline: none; }
[hidden] { display: none !important; }

.app {
  min-height: 100svh;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.cover { position: relative; min-height: 100dvh; background: #ffdb8d; }
.cover-art, .route-art { position: relative; min-width: 0; }
.cover-art { height: 100dvh; }
.cover-art > img, .route-art > img { width: 100%; height: 100%; object-fit: fill; }
.cover-hit {
  position: absolute;
  display: block;
  border: 0;
  background: transparent;
  border-radius: 13px;
}
.cover-hit:hover { box-shadow: inset 0 0 0 2px #fff6dfaa; }
.cover-start { left: 10%; top: 79.7%; width: 81%; height: 13.6%; }
.cover-help { left: 31%; bottom: 0; width: 38%; height: max(6%, 36px); }
.resume-button {
  position: absolute;
  top: 36.5%;
  right: 4%;
  min-height: 40px;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--teal);
  color: white;
  box-shadow: 2px 2px var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.travel {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100dvh;
  background: #fff3de;
}
.route-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route-cart {
  fill: #fff1d2;
  stroke: #b72f1c;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 2px #3f1f1480);
}
.travel-bar {
  padding: 6px 16px max(7px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--cream);
  border-top: 2px solid var(--ink);
}
.travel-bar p { line-height: 1.3; }
.travel-bar p span, .travel-bar p strong { display: block; }
.travel-bar p span { font-size: 11px; color: var(--muted); font-weight: 750; }
.travel-bar p strong { font-size: 17px; }
.travel-bar .action { width: auto; padding-inline: 14px; }
.travel-controls { display: flex; align-items: center; gap: 8px; }
.sound-toggle {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 5px;
  background: var(--cream);
  color: var(--teal);
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.sound-toggle[aria-pressed="false"] { color: var(--muted); }
.cover-art .sound-toggle {
  position: absolute;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(7px, env(safe-area-inset-bottom));
  border-radius: 999px;
  box-shadow: 1px 2px var(--ink);
}

.page {
  min-height: 100svh;
  max-width: 560px;
  margin-inline: auto;
  padding: 0 clamp(14px, 4.5vw, 24px) calc(26px + env(safe-area-inset-bottom));
}
.top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  min-height: calc(53px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom: 2px solid var(--red);
}
.back {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.station { justify-self: center; display: flex; gap: 6px; align-items: center; font-size: 15px; }
.round {
  white-space: nowrap;
  padding: 1px 5px;
  border: 1px solid var(--red);
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: .02em;
  color: var(--red);
}
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.intro { margin-bottom: 13px; }
.intro h1 + p { margin-top: 7px; color: var(--muted); }
.scene-tag { margin-bottom: 5px; color: var(--red); font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.scene {
  position: relative;
  margin: 0 2px 6px 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #f2dfba;
  box-shadow: 3px 3px 0 var(--ink);
}
.scene img { width: 100%; }
.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  min-height: 44px;
  min-width: 44px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.pin-icon, .pin-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  box-shadow: 1px 2px var(--ink);
}
.pin-icon {
  z-index: 1;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--mustard);
}
.pin-icon .icon { width: 15px; height: 15px; }
.pin-label {
  min-height: 23px;
  margin-left: -4px;
  padding: 1px 5px 1px 8px;
  background: var(--cream);
  border-radius: 0 4px 4px 0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.pin:hover .pin-icon, .pin[aria-expanded="true"] .pin-icon { background: var(--teal); color: #fff; }
.hint { margin: 8px 0 11px; color: var(--muted); font-size: 12px; }
.card {
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: var(--cream);
}
.clue { padding: 0; overflow: hidden; margin-bottom: 12px; }
.clue h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #fff9ea;
  background: var(--teal);
  font-size: 16px;
}
.clue-body { padding: 9px 12px; }
.clue-note, .meta { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.rows { margin: 7px 0 0; font-variant-numeric: tabular-nums; }
.rows div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--rule); }
.rows div:last-child { border: 0; }
.rows dd { margin: 0; color: var(--red); font-weight: 800; text-align: right; }
.actions, .decision-choices { display: grid; gap: 8px; }
.actions { margin-top: 12px; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.decision { padding-top: 8px; border-top: 1px dashed var(--rule); }
.decision-line { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.decision-line strong { flex: none; color: var(--teal); font-variant-numeric: tabular-nums; }
.action {
  display: grid;
  place-content: center;
  gap: 3px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  text-align: center;
  line-height: 1.3;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.action:hover { border-color: var(--red); }
.action:active { transform: translateY(1px); }
.action.primary { background: var(--red); color: #fff8e7; box-shadow: 2px 2px var(--ink); }
.decision-choices .action {
  position: relative;
  min-height: 51px;
  padding-inline: 12px 39px;
  text-align: start;
  justify-content: start;
  background: var(--gold-paper);
}
.decision-choices .action:nth-of-type(even) { background: var(--teal-paper); }
.decision-choices .action::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  transform: translateY(-50%) rotate(45deg);
  border: solid currentColor;
  border-width: 2px 2px 0 0;
}
.action-hint { color: var(--muted); font-size: 12px; font-weight: 500; }
.result-card { margin-top: 12px; border-top: 4px solid var(--teal); }
.result-card > h2 { color: var(--teal); }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 7px; margin-top: 9px; }
.chip { padding: 7px 8px; border: 1px solid var(--rule); border-radius: 5px; }
.chip span, .chip strong { display: block; }
.chip span { color: var(--muted); font-size: 12px; }
.chip strong { color: var(--red); font-size: clamp(19px, 5.8vw, 28px); font-variant-numeric: tabular-nums; line-height: 1.2; }
.refund-ticket {
  margin-top: 17px;
  border: 2px solid var(--ink);
  border-top-width: 2px;
  box-shadow: 2px 3px var(--teal);
}
.ticket-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  padding: 2px 9px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--mustard);
  font-weight: 850;
}
.refund-ticket [data-order-status] { font-size: 14px; }
.refund-ticket .chip { border: 0; }
.refund-ticket .chip + .chip { border-radius: 0; border-left: 1px dashed var(--rule); }
.chat {
  margin-top: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 2px 3px var(--teal);
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 5px 5px 0 0;
  background: var(--teal);
  color: #fff9e9;
}
.chat-header h2 { font-size: 16px; }
.chat-header span { color: #ffe3ab; font-size: 12px; }
.chat-log {
  display: grid;
  gap: 9px;
  max-height: clamp(170px, 30svh, 280px);
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  list-style: none;
  overscroll-behavior-y: contain;
  background:
    radial-gradient(circle, #85612b22 1px, transparent 1.5px) 0 0 / 9px 9px,
    #f7ead1;
}
.chat-line {
  justify-self: start;
  width: fit-content;
  max-width: 93%;
  min-width: 0;
  outline: none;
}
.chat-mine { justify-self: end; }
.chat-speaker { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 800; }
.chat-mine .chat-speaker { text-align: end; }
.chat-line p {
  padding: 7px 9px;
  border: 1px solid var(--ink);
  border-radius: 2px 8px 8px;
  background: var(--cream);
  font-size: 14px;
  line-height: 1.5;
}
.chat-mine p { border-radius: 8px 2px 8px 8px; background: var(--teal-paper); }
.chat-replies { padding: 6px 10px 10px; border-top: 1px solid var(--rule); }
.reply-label, .chat-end { padding: 1px 1px 5px; color: var(--teal); font-size: 12px; font-weight: 800; }
.chat-end { padding-block: 5px 1px; }
.reply-grid, .evidence-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.reply-grid .action { min-height: 44px; padding: 6px 4px; background: var(--gold-paper); font-size: 13px; }
.reply-grid .action:only-child { grid-column: 1 / -1; }
.evidence { margin-top: 14px; padding: 0 11px; }
.evidence summary {
  min-height: 44px;
  padding-block: 8px;
  cursor: pointer;
  color: var(--teal);
  font-weight: 800;
}
.evidence summary span { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.evidence-inner { padding: 1px 0 11px; }
.evidence-inner h3 { margin: 0 0 6px; font-size: 14px; }
.evidence-tabs { margin-bottom: 8px; }
.evidence-tabs .action { min-height: 44px; font-size: 13px; }
.evidence-tabs .action[aria-pressed="true"] { color: #fff9e9; background: var(--teal); }
#evidence-content > p { color: var(--muted); font-size: 14px; }
#evidence-content > .scene { margin-bottom: 9px; }
.evidence-checklist { margin: 5px 0 0; padding: 0; list-style: none; }
.evidence-checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border-top: 1px dashed var(--rule);
  cursor: pointer;
}
.evidence-checklist input { width: 18px; height: 18px; accent-color: var(--teal); }
.review-dialog { margin-top: 7px; color: var(--teal); font-size: 13px; }
.review-dialog summary { min-height: 44px; padding-block: 9px; cursor: pointer; font-weight: 800; }
.review-dialog ol { margin: 0; padding-left: 18px; }
.review-dialog li + li { margin-top: 6px; }
.takeaway { margin-top: 12px; padding: 9px 11px; border-left: 3px solid var(--mustard); background: var(--gold-paper); font-size: 14px; }
.news-heading { padding: 13px 14px; border: 1.5px solid var(--ink); border-radius: 7px 7px 0 0; background: var(--teal); color: #fff9e9; }
.news-heading p { margin-bottom: 5px; color: #ffd98d; font-size: 13px; font-weight: 850; }
.news-heading h1 { font-size: clamp(23px, 5.8vw, 31px); }
.news-card { border-top: 0; border-radius: 0 0 7px 7px; }
.news-section { margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--rule); }
.news-section p { margin-top: 5px; }
.news-photo { margin-top: 10px; }
.news-photo img { width: 100%; border-radius: 4px; }
.news-photo figcaption { margin-top: 4px; color: var(--muted); font-size: 12px; }
.sources { margin: 8px 0 0; padding-left: 1.2em; }
.sources a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.review-list { display: grid; gap: 10px; margin-top: 12px; }
.review-list .card p { margin-top: 5px; font-size: 14px; }
.review-list .card h2 { color: var(--red); }

@media (max-width: 360px) {
  .station { font-size: 14px; }
  .pin-label { font-size: 10px; }
}
@media (min-width: 700px) {
  .cover {
    background: radial-gradient(circle, #9a2e1725 1px, transparent 1.5px) 0 0 / 10px 10px,
      linear-gradient(125deg, #fff1c9 20%, #ffd371 72%, #efab40);
  }
  .cover-art { width: min(100%, calc(100dvh * .5628)); margin-inline: auto; }
  .route-art { width: min(100%, calc((100dvh - 60px) * .5628)); justify-self: center; }
  .travel-bar { justify-self: center; width: min(100%, 540px); }
}
@media (max-width: 699px) and (max-height: 480px) {
  .cover-art, .travel { min-height: 480px; }
}

