:root {
  color-scheme: light; --back:#e6f6fb; --panel:#f7fdff; --panel-deep:#f7fdff; --line:#a6cfdb;
  --text:#152f49; --dim:#415e72; --green:#ffcc66; --gold:#ad5316; --error:#8d3829;
  font-family: "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif;
}
* {box-sizing:border-box}
body {margin:0;color:var(--text);background:radial-gradient(ellipse at 50% 0%, #bee9f0 0, var(--back) 65%);font-size:16px;min-height:100vh}
[hidden] {display:none!important}
main {width:100%;max-width:800px;margin:auto;padding:22px 24px 0}
h1,h2,h3,p {margin:0}
h1 {font-size:clamp(1.9rem,4.4vw,2.8rem);letter-spacing:.025em;line-height:1.15}
h2 {font-size:clamp(1.35rem,3.7vw,1.8rem);line-height:1.3;letter-spacing:.025em}
header {display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin:12px 0 22px;flex-wrap:wrap}
.brand {display:flex;gap:11px;align-items:center;color:#176375;font-size:.72rem;letter-spacing:.15em;font-weight:750;margin-bottom:11px}
.brand-mark {display:inline-grid;place-items:center;width:24px;height:24px;color:#273142;background:var(--green);border-radius:6px;font:900 11px/1 system-ui;letter-spacing:0}
header .tools {display:flex;gap:7px;align-items:center}
button,a,input {font:inherit}
button {cursor:pointer;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:9px 14px;background:#edf8fc;color:var(--text);font-weight:700;line-height:1.33}
button:disabled {cursor:default;opacity:.52}
button:not(:disabled):hover {border-color:var(--green)}
:focus-visible {outline:3px solid var(--gold);outline-offset:3px}
.secondary {background:transparent}
.primary {background:var(--green);color:#342017;border-color:transparent}
.primary:not(:disabled):hover {background:#ffe1af}
.full {width:100%}
.small {font-size:.84rem}
.subtle {color:var(--dim);line-height:1.6}
.card {border:1px solid var(--line);background:var(--panel);border-radius:16px;overflow:hidden;box-shadow:0 16px 56px #5a94ad2f}
.top {padding:18px 21px 16px}
#stats {display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:.83rem;color:var(--dim);font-variant-numeric:tabular-nums}
#stats strong {color:#145d67}
#ticker {display:grid;gap:4px;margin:11px 0 17px}
#ticker i {display:block;height:4px;border-radius:2px;background:#d8edf3}
#ticker i.done {background:#1d8e82}
#ticker i.current {background:var(--gold)}
#info {color:var(--dim);line-height:1.55;margin-top:6px}
.symbols {margin-top:10px;padding:8px 12px;background:#eaf7fc;border-left:3px solid #4d9eaa;border-radius:6px;font-size:.88rem;line-height:1.45}
.symbols dl {margin:4px 0 0;display:grid;gap:2px}
.symbols dl div {display:grid;grid-template-columns:1em 1fr;gap:7px}
.symbols dt {font-weight:800;color:#146d66}
.symbols dd {margin:0}
#question {line-height:1.45;margin:11px 0 10px;font-weight:750}
#options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.option {display:flex;align-items:center;gap:9px;text-align:left;padding:7px 10px;background:#eaf7fc;font-size:.92rem}
.option span {display:grid;place-items:center;flex:0 0 24px;height:24px;border-radius:5px;background:#d8edf6;color:var(--dim);font:700 .74rem system-ui}
.option[aria-pressed=true] {border-color:var(--gold);background:#fff0c7}
.option[aria-pressed=true] span {background:var(--gold);color:#3c260c}
.map {margin:0 15px;background:linear-gradient(#d1f1fa13,#edfaff24),url(canyon.webp) center/cover,#a8e6f5;overflow:hidden;border:1px solid #7ab6c6;border-radius:11px}
#scene {width:100%;height:auto;aspect-ratio:8/5;display:block;touch-action:pan-y}
#scene.drag {touch-action:none;cursor:grab}
.actions {padding:13px 21px 17px;display:grid;gap:9px}
#startForm {display:grid;grid-template-columns:1fr auto;gap:9px}
#name {width:100%;min-height:44px;border:1px solid #aacddc;background:#effaff;color:var(--text);border-radius:8px;padding:8px 10px}
#feedback,#error,#result p {padding:10px 12px;border-radius:7px;background:#e6f6fa;border-inline-start:3px solid #91bfcd;font-size:.91rem;line-height:1.55}
#feedback.good {border-color:var(--green)}
#feedback.wrong,#error {border-color:var(--gold);color:var(--error)}
#control {display:grid;gap:8px}
#slider-row {display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;min-height:44px}
#range {width:100%;min-height:42px;accent-color:var(--gold);cursor:pointer}
#range-readout {color:var(--gold);font-weight:750;min-width:55px;text-align:center}
#extra {display:flex;flex-wrap:wrap;gap:7px}
#extra button {font-size:.82rem}
.section {margin-top:16px;padding:17px 20px 18px;border:1px solid var(--line);border-radius:13px;background:var(--panel-deep)}
.section h2 {font-size:1.05rem;margin-bottom:10px}
#archive {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#archive button {text-align:left;font-size:.83rem}
#archive span {color:#146d66;margin-right:6px;font-variant-numeric:tabular-nums}
#result {display:grid;gap:8px}
#result h2 {margin:0}
.receipts {padding-top:3px;display:grid;gap:7px}
.receipts div {display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.receipts output {font-size:.81rem;overflow-wrap:anywhere;max-width:100%;color:var(--dim)}
#board table {width:100%;border-collapse:collapse;margin:9px 0}
#board td,#board th {padding:8px 4px;border-bottom:1px solid #cde3eb;text-align:left;overflow-wrap:anywhere}
#board td {font-size:.85rem}
#board th {font-size:.76rem;color:var(--dim)}
#board nav {display:flex;flex-wrap:wrap;gap:7px;align-items:center}
footer {padding:20px 0 26px;text-align:center;color:var(--dim);font-size:.84rem}
a {color:#195789}
@media(max-width:560px) {
  main {padding:10px 11px 0}
  header {margin:10px 0 14px}
  .top {padding:13px 13px 12px}
  .actions {padding:11px 13px}
  .map {margin:0 8px}
  #options {grid-template-columns:1fr}
  #startForm {grid-template-columns:1fr}
  #archive {grid-template-columns:repeat(2,minmax(0,1fr))}
}
