:root {
  --paper: #f8f5eb;
  --surface: #fffdf7;
  --ink: #193834;
  --ink-light: #465c54;
  --teal: #17554c;
  --line: #d9dfd1;
  --gold: #f6c976;
  --orange: #a04121;
  --mint: #dcebe2;
  --radius: 22px;
  --display: Georgia, "Times New Roman", serif;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

:root:lang(zh) {
  --display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
button, label:has(input:enabled) { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b55321; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 3; top: 8px; left: 8px; padding: 10px; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.topbar { background: #153a37; color: #fffaf0; }
.topbar-inner {
  max-width: 1264px;
  min-height: 72px;
  margin: auto;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.13rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gold);
  color: #18423c;
  font-size: 1.35rem;
  transform: rotate(-9deg);
}
.case-nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 36px); }
.case-nav a { padding: 8px 2px; color: #e3ece4; font-size: .91rem; white-space: nowrap; }
.case-nav a:hover, .page-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.topbar-tools, .language-nav { display: flex; align-items: center; flex-shrink: 0; }
.topbar-tools { gap: 10px; }
.language-nav { padding: 2px; border: 1px solid #74958a; border-radius: 10px; }
.language-nav a { display: grid; place-items: center; min-height: 32px; padding: 3px 7px; border-radius: 7px; font-size: .82rem; }
.language-nav a:hover { background: #24524d; }
.language-nav a[aria-current="page"] { background: var(--gold); color: var(--ink); font-weight: 750; }
.progress { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid #74958a; border-radius: 50px; color: #e3ece4; font-size: .81rem; white-space: nowrap; }
.progress-icon { color: var(--gold); font-weight: 800; }

.page { max-width: 1264px; padding: 35px 26px 65px; margin: auto; }
.hero {
  display: grid;
  grid-template-columns: .79fr 1fr;
  min-height: 448px;
  border: 1px solid #e1d5bb;
  border-radius: 27px;
  overflow: hidden;
  background: #fff4d9;
}
.hero-copy {
  align-self: center;
  min-width: 0;
  padding: clamp(27px, 4vw, 58px);
}
.case-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .86rem; letter-spacing: .11em; font-weight: 750; color: var(--orange); }
.case-label > span:first-child:not(.small-dot) { font-size: 1rem; }
.small-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
h1 {
  margin: 21px 0 20px;
  font: 800 clamp(2.3rem, 4.3vw, 3.9rem)/1.06 var(--display);
  letter-spacing: -.035em;
}
h1 span:last-child { color: #215951; }
h1:lang(zh) { font-size: clamp(3.1rem, 6vw, 5.45rem); }
.intro { max-width: 26em; color: #3c5047; font-size: 1.04rem; line-height: 1.8; }
.intro strong { color: var(--ink); font-weight: 750; }
.hero-actions, .report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 20px; margin-top: 25px; }
.duration { color: #536159; margin-top: 12px; font-size: .82rem; }
.hero-art { position: relative; min-height: 100%; background: #243f41; }
.hero-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 53% 49%; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 9px 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; line-height: 1.4; }
.primary { color: #fffdf3; background: var(--teal); }
.primary:hover { background: #103e35; }
.outline { color: var(--teal); background: var(--surface); border-color: #aabdb0; }
.outline:hover { border-color: var(--teal); background: #edf5eb; }
.audio-button { gap: 7px; }
.audio-button.playing { background: var(--mint); border-color: #659385; }
.audio-status { flex-basis: 100%; color: var(--orange); font-size: .9rem; }
.audio-status:empty { display: none; }

.case-section { margin-top: 39px; scroll-margin-top: 16px; }
.section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 17px; }
.section-sign { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 12px; font-size: 1.25rem; font-weight: 800; }
.section-sign.orange { background: #f9dfc7; color: var(--orange); }
.mint { background: var(--mint); color: var(--teal); }
.yellow { background: #fae4ad; color: #683d19; }
.magnifier { width: 17px; height: 17px; position: relative; border: 2px solid currentColor; border-radius: 100%; transform: translate(-2px,-2px); }
.magnifier::after { content: ""; position: absolute; inset: auto auto -4px 12px; width: 8px; height: 2px; background: currentColor; transform: rotate(45deg); transform-origin: left; }
.speech-mark { height: 17px; width: 21px; font-size: 1rem; line-height: 9px; border: 2px solid currentColor; border-radius: 5px; text-align: center; position: relative; }
.speech-mark::after { content: ""; position: absolute; left: 3px; bottom: -5px; width: 5px; height: 5px; border-left: 2px solid currentColor; transform: skewY(-35deg); }
h2 { font: 800 clamp(1.5rem, 3vw, 2.05rem)/1.25 var(--display); }
.section-heading p { color: var(--ink-light); margin-top: 3px; }
.hint-trigger { margin-left: auto; flex-shrink: 0; }

.investigation { display: grid; grid-template-columns: 1.42fr 1fr; gap: 19px; align-items: stretch; }
.map-panel, .notebook, .report { border: 1px solid var(--line); border-radius: var(--radius); }
.map-panel { background: #e8efe1; padding: 20px; }
.map-title { display: flex; justify-content: space-between; align-items: center; font-size: .95rem; font-weight: 750; margin-bottom: 10px; }
.map-title span:last-child { color: #456358; }
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid #829e8b;
  border-radius: 13px;
  overflow: hidden;
}
.room { min-height: 92px; display: flex; align-items: center; gap: 9px; position: relative; padding: 12px 52px 12px 13px; background: #fff9e5; }
.room:not(:has(.marker)) { padding-inline-end: 13px; }
.room:nth-child(2n) { border-left: 1px solid #8fa995; }
.room.theater { background: #e2eae9; }
.room.storage { background: #f3ead7; border-left: none; }
.room.desk { background: #e4eee0; border-left: 1px solid #8fa995; }
.room-name { font-size: .98rem; font-weight: 750; }
.room-symbol { font-family: system-ui, sans-serif; color: #39695e; font-size: 1.5rem; width: 26px; text-align: center; flex: 0 0 26px; }
.hall { grid-column: 1/-1; position: relative; min-height: 55px; display: flex; align-items: center; gap: 14px; padding: 5px 58px 5px 15px; border-block: 1px solid #829e8b; background: #d5e4d6; font-size: .87rem; }
.hall-path { display: block; flex: 1; border-block-start: 2px dashed #8ba192; }
.marker {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 2px solid #fff9e4;
  border-radius: 50%;
  background: #9f4127;
  color: #fff;
  box-shadow: 0 0 0 1px #9f4127;
  font-weight: 800;
}
.marker:hover, .marker.viewed { background: var(--teal); box-shadow: 0 0 0 1px var(--teal); }

.notebook { background: var(--surface); padding: 19px 20px; }
h3 { font: 800 1.35rem/1.35 var(--display); }
.notebook p { margin: 3px 0 11px; color: var(--ink-light); font-size: .94rem; }
.clue-list { display: grid; gap: 8px; }
.clue-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfaf2;
}
.clue-card:hover, .witness-card:hover { border-color: #639085; }
.clue-number { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: #f7e8cd; color: #824225; font-size: .92rem; font-weight: 800; }
.viewed .clue-number { background: var(--mint); color: var(--teal); }
.clue-card small, .witness-copy small { display: block; color: var(--ink-light); font-size: .79rem; }
.clue-action { color: var(--teal); font-size: .83rem; font-weight: 750; white-space: nowrap; }
.clue-action::after { content: " ›"; }

.witness-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }
.witness-card { display: grid; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; text-align: left; background: var(--surface); }
.witness-card img { width: 100%; height: clamp(130px, 18vw, 220px); object-fit: cover; object-position: center 45%; background: #e6ecda; }
.witness-copy { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; gap: 5px; }
.witness-copy strong { font-size: 1.12rem; }

.report { background: var(--surface); padding: clamp(17px, 3.5vw, 38px); }
.report-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { min-inline-size: 0; margin: 0 0 16px; padding: 10px 0 0; border: 0; }
legend { padding: 0; font-weight: 750; }
.options { display: flex; flex-wrap: wrap; gap: 7px; }
.option { display: inline-flex; gap: 8px; min-height: 44px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; background: #f9f8f0; }
.option:has(input:checked) { background: var(--mint); border-color: #659385; }
.option:has(input:disabled) { color: #5f665e; background: #f3f2ed; }
.option input { margin: 0; accent-color: var(--teal); width: 16px; height: 16px; }
.evidence-help { color: var(--ink-light); margin: -3px 0 8px; font-size: .9rem; }
.report-actions { margin-top: 9px; }
#feedback { color: #8b3d26; }
.solution { display: flex; align-items: start; gap: 15px; padding: 17px; background: #e5efe1; border-radius: 13px; }
.solution-star { color: #79501d; font-size: 2rem; line-height: 1; }
.solution p { margin-top: 8px; }
.solution-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.page-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1264px; padding: 16px 26px 28px; margin: auto; border-top: 1px solid var(--line); color: var(--ink-light); font-size: .88rem; }
.case-dialog {
  width: min(480px, calc(100% - 32px));
  padding: clamp(19px, 4vw, 29px);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #d8d6c5;
  border-radius: var(--radius);
  box-shadow: 0 24px 85px #102a2580;
  max-height: calc(100% - 32px);
}
.case-dialog::backdrop { background: #102c29bd; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 1.55rem; line-height: 1; }
.close:hover { background: var(--mint); }
.case-dialog h2 { margin: 7px 0 16px; }
.case-dialog p { font-size: 1.09rem; line-height: 1.8; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.case-dialog .audio-status { font-size: .9rem; }
#detail-visual:not(:empty) { margin-bottom: 15px; }
.drip-picture, .tracks-picture, .boot-list { background: #e9eee3; border-radius: 12px; padding: 14px; margin: 0; }
.drip-picture { display: flex; justify-content: center; align-items: start; gap: 9px; position: relative; height: 75px; }
.drip-picture i { width: 10px; height: 10px; background: #406e82; transform: rotate(-45deg); border-radius: 50% 0 50% 50%; }
.drip-picture i:nth-child(2) { margin-top: 10px; }
.drip-picture span { position: absolute; inset: auto calc(50% - 37px) 12px; height: 20px; border-radius: 50%; background: #387e70; box-shadow: inset 0 -4px #2b685e; }
.tracks-picture { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: .93rem; }
.tracks-picture b { color: #356257; font-size: clamp(.75rem, 4vw, 1.3rem); }
.boot-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 5px 10px; }
.boot-list > div + div { border-top: 1px solid #c2d3c5; }
.boot-list dd { margin: 0; min-width: 86px; font-weight: 750; }
.boot-list dd span { display: inline-block; margin-right: 8px; width: 1.3em; text-align: center; color: var(--teal); }
.notice { padding: 14px; margin-top: 12px; background: #fae4ad; }

@media (max-width: 850px) {
  .case-nav { display: none; }
  .hero { min-height: 410px; }
  .hero-copy { padding: 27px; }
  .hero-actions { gap: 10px 14px; }
  .room-symbol { display: none; }
}

@media (max-width: 690px) {
  .topbar-inner { padding: 0 16px; min-height: 60px; gap: 10px; }
  .page { padding: 17px 15px 43px; }
  .hero { grid-template-columns: 1fr; border-radius: 20px; }
  .hero-copy { padding: 25px 23px 27px; }
  h1 { margin: 14px 0; font-size: clamp(2.5rem, 11vw, 4rem); }
  .hero-art { aspect-ratio: 3 / 2; }
  .case-section { margin-top: 28px; }
  .section-heading { gap: 9px; }
  .section-heading p { font-size: .87rem; }
  .section-sign { flex-basis: 37px; height: 37px; }
  .hint-trigger { padding-inline: 9px; gap: 4px; font-size: .85rem; }
  .investigation, .report-questions { grid-template-columns: 1fr; gap: 12px; }
  .map-panel, .notebook { padding: 13px; }
  .room { min-height: 68px; }
  .witness-list { gap: 7px; }
  .witness-copy { flex-direction: column; align-items: flex-start; padding: 7px 8px; }
  .witness-card img { height: clamp(92px, 24vw, 155px); }
  .page-footer { padding-inline: 15px; }
}

@media (max-width: 460px) {
  .topbar-inner { padding-inline: 12px; gap: 6px; }
  .brand { font-size: .95rem; line-height: 1.15; white-space: normal; gap: 6px; }
  .brand-mark { flex: 0 0 27px; height: 27px; }
  .topbar-tools { gap: 5px; }
  .language-nav a { min-height: 36px; }
  .progress { padding-inline: 6px; }
  .progress-icon { display: none; }
}

@media (max-width: 360px) {
  .progress-word { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
