:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --paper: #f2f0e8;
  --ink: #192a2a;
  --muted: #4b615d;
  --line: #d0d4c8;
  --accent: #9f3427;
  --forest: #254640;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 300px; min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .55; }
.masthead, .footer { max-width: 1280px; margin: auto; padding-inline: clamp(20px, 5vw, 62px); }
.masthead { display: flex; justify-content: space-between; align-items: center; height: 76px; }
.brand { display: flex; gap: 10px; align-items: center; border: 0; padding: 0; background: none; }
.brand-icon { width: 22px; height: 19px; position: relative; background: var(--accent); clip-path: polygon(0 100%, 43% 13%, 58% 43%, 73% 21%, 100% 100%); }
.brand b { font: 800 28px/.85 Georgia, serif; letter-spacing: -.06em; }
.brand-name { font-size: 13px; color: var(--muted); padding-left: 8px; border-left: 1px solid var(--line); }
nav { display: flex; gap: 8px; }
.text-button { border: 1px solid transparent; border-radius: 4px; background: none; padding: 9px 12px; font-size: 14px; }
.text-button:hover { border-color: var(--line); }
.board { margin: 0 auto; width: min(1156px, calc(100% - 48px)); display: grid; grid-template-columns: 1.21fr 1fr; min-height: 634px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; box-shadow: 0 19px 65px #253f3315; }
.mountain { position: relative; isolation: isolate; min-height: 560px; background: linear-gradient(168deg, #b6c5bd 0%, #8a9f95 46%, #263f44 100%); overflow: hidden; color: #f7f5eb; }
.scene-art, .scene-shade, .scene-fog { position: absolute; inset: 0; z-index: -1; }
.scene-art { background-position:center 44%; background-size:cover; background-repeat:no-repeat; }
.scene-shade { background: linear-gradient(180deg, #12272e78, transparent 25%, transparent 53%, #0b2226c9 100%); }
.scene-fog { opacity: .55; background: radial-gradient(ellipse at 67% 67%, #e8f1e8ad 0%, transparent 39%), radial-gradient(ellipse at 18% 53%, #dce8e4bb 0%, transparent 36%); }
.scene-head { position: absolute; display: flex; flex-direction: column; gap: 4px; top: 25px; left: 27px; letter-spacing: .15em; font-family: "Songti SC", SimSun, serif; font-weight: 700; font-size: 19px; }
.scene-ruler { position: absolute; top: 20%; bottom: 19%; right: 22px; display: flex; flex-direction: column; justify-content: space-between; color: #f7f5eb; font: 11px/1.2 ui-monospace, monospace; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px #18353b; }
.scene-ruler span { display: flex; align-items: center; justify-content: end; gap: 5px; }
.scene-ruler span:after { content: ""; display: inline-block; width: 10px; height: 1px; background: #f7f5ebaa; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 1px 2px #263638); }
.trail path { fill: none; stroke-width: 1.55; vector-effect: non-scaling-stroke; stroke-linecap: round; }
#trail { stroke: #faf6e1bd; stroke-dasharray: 1 2.25; }
#trail-progress { stroke: #f7cd88; stroke-width: 2.4; stroke-dasharray: 0 100; }
.summit { position: absolute; top: 17%; left: 57%; transform: translate(-50%, -50%); font-size: 16px; color: #f5d4a0; text-shadow: 0 1px 4px #263638; }
.climber { position: absolute; width: 34px; height: 34px; left: 26%; top: 85%; transform: translate(-50%, -86%); filter: drop-shadow(0 2px 2px #102727); }
.climber canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.altitude-readout { position: absolute; bottom: 20px; left: 27px; display: flex; align-items: baseline; gap: 8px; }
.altitude-readout > span:first-child { position: absolute; white-space: nowrap; top: -15px; font-size: 12px; letter-spacing: .1em; }
.altitude-readout strong { font: 700 clamp(37px, 5.5vw, 65px)/1 Georgia, serif; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.055em; }
.unit { font: italic 21px Georgia, serif; }
.stage-tag { position: absolute; bottom: 28px; right: 24px; display: flex; align-items: center; gap: 7px; border: 1px solid #edece788; border-radius: 4px; padding: 7px 9px; font-size: 13px; color: #fff8eb; background: #1a3235b0; }
.pin { width: 6px; height: 6px; transform: rotate(45deg); background: #e2b884; }
.panel { background: #f8f6ef; padding: clamp(24px, 4vw, 55px); display: flex; align-items: center; min-width: 0; }
#screen { width: 100%; }
.day { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.day span + span { border-left: 1px solid var(--line); padding-left: 10px; }
.wordmark { margin: 22px 0 0; font: 700 clamp(90px, 12vw, 150px)/.84 Georgia, serif; letter-spacing: -.095em; }
.headline { font: 800 clamp(33px, 5.2vw, 50px)/1.25 "Songti SC", SimSun, serif; margin: 12px 0 14px; letter-spacing: .12em; }
.subtitle { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0 0 22px; }
.primary, .secondary { width: 100%; padding: 13px 14px; border-radius: 4px; font-weight: 700; font-size: 16px; }
.primary { border: 1px solid var(--accent); background: var(--accent); color: #fffaf0; }
.primary:hover:not(:disabled) { background: #83281e; }
.secondary { background: transparent; border: 1px solid var(--line); color: var(--forest); }
.secondary:hover { background: #e8ece2; }
.action-row { display: flex; gap: 8px; margin-top: 10px; }
.note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 12px 0 0; }
.progress { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 12px 0 27px; }
.progress i { height: 4px; border-radius: 4px; background: var(--line); }
.progress .done { background: var(--forest); }
.progress .current { background: var(--accent); }
.prompt { font: 800 clamp(25px, 3.4vw, 38px)/1.37 "Songti SC", SimSun, serif; margin: 0 0 13px; }
.question-rule { color: var(--muted); font-size: 15px; line-height: 1.68; margin: 0 0 19px; }
input { display: block; width: 100%; color: var(--ink); background: #fffdf7; border: 1px solid #a5b2a7; border-radius: 4px; padding: 13px 14px; font-size: 17px; }
#answer-form .primary { margin-top: 9px; }
#answer-form .text-button { display: block; margin: 5px auto 0; }
.feedback { color: var(--accent); font-size: 14px; line-height: 1.5; margin-block: 8px; }
.feedback:empty { display: none; }
.choices { display: flex; gap: 7px; flex-wrap: wrap; }
.choices button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 4px; background: #ebefe6; }
.reveal { padding: 14px; border: 1px solid var(--line); background: #eef0e7; border-radius: 4px; margin-bottom: 12px; }
.reveal h3 { margin: 0; font: 700 23px/1.25 "Songti SC", SimSun, serif; }
.reveal p { color: var(--muted); margin: 7px 0 0; font-size: 14px; }
.gain { color: var(--accent); font: 700 38px/1 Georgia, serif; letter-spacing: -.03em; }
.result-title { font: 800 39px/1.15 "Songti SC", SimSun, serif; margin: 12px 0; }
.result-height { font: 700 clamp(42px, 6vw, 73px)/1 Georgia, serif; letter-spacing: -.065em; font-variant-numeric: tabular-nums; margin-block: 8px; }
.result-height small { font: italic 23px Georgia, serif; }
.result-list { list-style: none; padding: 0; margin: 18px 0; border-top: 1px solid var(--line); }
.result-list li { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; font-size: 13px; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.result-list span:nth-child(2) { flex: 1; text-align: right; overflow-wrap: anywhere; }
.result-list b { min-width: 55px; text-align: right; font-variant-numeric: tabular-nums; color: var(--forest); }
.footer { padding-block: 17px 20px; display: flex; justify-content: space-between; gap: 9px; color: var(--muted); font-size: 12px; }
dialog { width: min(520px, calc(100vw - 32px)); max-height: 82dvh; border: 1px solid var(--line); border-radius: 8px; padding: 22px; color: var(--ink); background: #f8f6ef; }
dialog::backdrop { background: #1127279c; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { font: 800 27px "Songti SC", SimSun, serif; margin: 0; }
#dialog-body p, #dialog-body li { line-height: 1.6; }
#dialog-body .secondary { margin-top: 9px; text-align: left; }
#dialog-body a { color: var(--forest); }
.rule-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rule-table td, .rule-table th { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 3px; }
.review-item { padding-block: 10px; border-bottom: 1px solid var(--line); }
.review-item summary { cursor: pointer; line-height: 1.5; }
.toast { position: fixed; z-index: 5; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 10px 15px; background: #162e2a; color: white; border-radius: 4px; font-size: 14px; }
@media (max-width: 760px) {
  .masthead { height: 56px; padding-inline: 15px; }
  .board { width: min(100% - 24px, 490px); grid-template-columns: 1fr; min-height: auto; }
  .mountain { min-height: 0; height: clamp(230px, 65vw, 346px); }
  .scene-art { background-position: center 38%; }
  .panel { padding: 21px 18px; }
  .scene-head { top: 14px; left: 16px; font-size: 16px; }
  .scene-ruler { right: 13px; font-size: 10px; }
  .altitude-readout { bottom: 12px; left: 16px; }
  .stage-tag { bottom: 14px; right: 13px; font-size: 12px; }
  .climber { width: 25px; height: 25px; }
  .wordmark { font-size: 88px; margin-top: 12px; }
  .headline { margin-top: 7px; margin-bottom: 6px; }
  .subtitle { font-size: 15px; margin-bottom: 14px; }
  .progress { margin-bottom: 16px; }
  .footer { max-width: 490px; padding-inline: 19px; padding-block: 11px max(14px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .brand-name { display: none; }
  .footer { flex-wrap: wrap; }
}

.poster { display: block; max-width: 100%; max-height: 57dvh; margin: 12px auto 0; border-radius: 4px; }
.poster-download { display: block; text-align: center; margin-top: 12px; }
.answer-clock {
  --watch-case: #f1ba62;
  --watch-ink: #c1e8dc;
  --watch-face: #102d35;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 11px;
}
.answer-clock-face {
  position: relative;
  display: grid;
  place-content: center;
  text-align: center;
  justify-items: center;
  flex: 0 0 58px;
  height: 58px;
  border: 4px solid var(--watch-case);
  border-radius: 50%;
  color: var(--watch-ink);
  background: var(--watch-face);
  box-shadow: inset 0 0 0 2px #142c32, 0 3px 0 #061c24;
}
.answer-clock-face::before {
  content: "";
  position: absolute;
  top: 6px;
  left: calc(50% - 3px);
  width: 6px;
  height: 2px;
  background: var(--watch-case);
}
.answer-clock-face::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 17px;
  width: 4px;
  height: 10px;
  border-radius: 1px;
  background: var(--watch-case);
}
.answer-clock-face strong {
  margin-top: 3px;
  font: 800 24px/1 ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.answer-clock-face span { font-size: 11px; line-height: 1; }
.answer-warning { color: #ffd0c5; font-size: 13px; font-weight: 750; }
.answer-clock.urgent {
  --watch-case: #ff735e;
  --watch-ink: #ffe0d8;
  --watch-face: #502a2b;
}
.answer-clock.urgent .answer-clock-face {
  box-shadow: inset 0 0 0 2px #633332, 0 0 12px #ff604b66;
}
.distribution {
  margin: 14px 0 16px;
  padding: 11px 13px 9px;
  border: 1px solid #4d7783;
  border-radius: 10px;
  background: #102e39;
}
.distribution-head, .distribution-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.distribution-head h3 { margin: 0; font-size: 15px; }
.distribution-head span { color: var(--muted); font-size: 12px; }
.distribution-plot {
  position: relative;
  height: 90px;
  margin-top: 6px;
  border-bottom: 1px solid #54717a;
  background: repeating-linear-gradient(to top, transparent 0 21px, #36586370 21px 22px);
}
.distribution-bars {
  position: absolute;
  inset: 20px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.distribution-bars i {
  flex: 1;
  height: var(--bar-height);
  background: linear-gradient(#8dc5b6, #417e78);
  border-radius: 2px 2px 0 0;
}
.distribution-marker {
  position: absolute;
  inset-block: 1px -1px;
  left: var(--position);
  width: 2px;
  background: var(--accent);
}
.distribution-marker strong {
  position: absolute;
  top: 0;
  left: 4px;
  white-space: nowrap;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--accent);
  color: #302304;
  font-size: 11px;
}
.distribution-marker.align-left strong { left: auto; right: 4px; }
.distribution-axis {
  margin-top: 5px;
  color: var(--muted);
  font: 11px ui-monospace, monospace;
}
.result-record { margin-top: 13px; font-size: 13px; color: var(--muted); }
.result-record summary { cursor: pointer; min-height: 28px; padding-block: 4px; }

/* Arcade game skin */
:root {
  color-scheme: dark;
  --paper: #102a37;
  --ink: #f7fbf7;
  --muted: #aeccd1;
  --line: #365863;
  --accent: #ffd44e;
  --forest: #95e2ce;
}
body { background: radial-gradient(ellipse at 49% 15%, #214759 0%, var(--paper) 66%); }
.masthead { height: 72px; }
.brand-icon { background: var(--accent); }
.brand b { font: 950 28px/.9 system-ui, sans-serif; letter-spacing: -.075em; }
.brand-name { color: var(--muted); font-weight: 700; }
nav .text-button { border-color: var(--line); color: var(--ink); font-weight: 700; border-radius: 10px; background: #123442; }
nav .text-button:hover { background: #204958; }
.board { border: 2px solid #4b7681; border-radius: 18px; min-height: 604px; box-shadow: 0 16px 0 -6px #081e29, 0 25px 72px #061a24bb; }
.mountain { background-color: #366985; }
.scene-art { background-color: #356b90; }
.scene-shade { background: linear-gradient(180deg, #052f46a8, transparent 26%, transparent 62%, #082b35dc 100%); }
.scene-head { font: 800 15px/1 system-ui, sans-serif; letter-spacing: .09em; background: #103644d9; border: 1px solid #75acbe; padding: 8px 11px; border-radius: 7px; }
.scene-ruler { font-weight: 750; }
.summit { color: #ffe05c; }
#trail-progress { stroke: #ffdc58; }
.climber { filter: drop-shadow(1px 1px 0 #fff8bd) drop-shadow(-1px -1px 0 #fff8bd) drop-shadow(0 2px 3px #05191d); }
.altitude-readout strong { font: 950 clamp(39px, 5.5vw, 65px)/1 system-ui, sans-serif; letter-spacing: -.06em; }
.unit { font: 800 18px system-ui, sans-serif; }
.stage-tag { color: #fff8d6; background: #0a2a39d9; border-color: #78a6b0; border-radius: 7px; font-weight: 800; }
.pin { background: var(--accent); }
.panel { background: linear-gradient(158deg, #204859 0%, #102d3a 72%); }
.day { font-weight: 750; letter-spacing: .02em; }
.wordmark { color: var(--accent); font: 950 clamp(77px, 9.2vw, 141px)/.91 system-ui, sans-serif; letter-spacing: -.1em; text-shadow: 0 5px #5a3a0b; margin: 24px 0 0; white-space: nowrap; }
.wordmark span { font: 900 .28em/1 system-ui, sans-serif; letter-spacing: 0; margin-left: .35em; }
.headline { font: 950 clamp(30px, 4vw, 58px)/1.2 system-ui, sans-serif; letter-spacing: .015em; margin-block: 15px 8px; }
.subtitle { color: #d6edf0; margin-bottom: 28px; }
.primary, .secondary { border-radius: 9px; padding: 13px 14px; }
.primary { color: #302304; background: var(--accent); border: 1px solid #ffe991; box-shadow: 0 4px #bd851b; font-weight: 900; }
.primary:hover:not(:disabled) { background: #ffe278; }
.primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px #bd851b; }
.secondary { background: #214754; color: #edfbfb; border-color: #4d7783; }
.secondary:hover { background: #315966; }
.progress i { height: 6px; background: #47707e; }
.progress .done { background: #83e5c3; }
.prompt, .result-title, .dialog-head h2, .reveal h3 { font-family: system-ui, sans-serif; font-weight: 850; }
input { background: #0a222e; color: var(--ink); border: 1px solid #688c95; border-radius: 8px; }
input::placeholder { color: #a5c3c8; }
.choices button { background: #153846; }
.reveal { background: #0e2633; border-color: #4d7883; border-radius: 9px; }
.gain { font: 950 33px/.95 system-ui, sans-serif; }
.result-height { font: 950 clamp(48px, 6vw, 73px)/1 system-ui, sans-serif; color: var(--accent); }
.result-height small { font: 800 22px system-ui, sans-serif; }
dialog { background: #133343; }
.footer { justify-content: flex-end; }
@media (max-width: 760px) {
  .masthead { height: 55px; }
  .board { min-height: 0; border-radius: 14px; }
  .mountain { height: clamp(230px, 67vw, 340px); min-height: 0; }
  .panel { padding: 22px 18px 26px; }
  .wordmark { font-size: clamp(73px, 22vw, 95px); margin-top: 12px; }
  .headline { margin-block: 9px 5px; }
  .subtitle { margin-bottom: 17px; }
}

#sound {display:inline-grid;place-items:center;}
#sound[aria-pressed="false"] .sound-on, #sound[aria-pressed="true"] .sound-off {display:none;}
.result-guide { display:none; }
@media (max-width:760px) and (orientation:portrait) {
  .result-title { position:relative; padding-right:76px; }
  .result-guide { position:absolute; right:0; top:-3px; width:clamp(54px,18vw,78px); height:clamp(54px,18vw,78px); object-fit:contain; display:block; }
}
