:root {
  color-scheme: light;
  --paper: #f5efdf;
  --paper-light: #fcf9f1;
  --ink: #352e27;
  --muted: #7a7165;
  --red: #963f32;
  --red-dark: #752d24;
  --line: #ded5c3;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, canvas:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
button { touch-action: manipulation; }
a { color: var(--red); text-underline-offset: 4px; }
.app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 88px minmax(0, 1fr) 42px; height: 100vh; height: 100dvh; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 30px; border-bottom: 1px solid var(--line); background: var(--paper-light); z-index: 5; }
.brand { display: flex; align-items: center; gap: 15px; }
.brand-seal { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 41px; height: 48px; border: 1px solid var(--red); padding: 4px; color: var(--red); font: 17px/1.12 var(--serif); border-radius: 2px; }
.brand h1 { margin: 0; font: 27px/1.2 var(--serif); letter-spacing: .22em; white-space: nowrap; }
.brand p { margin: 6px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .22em; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.action { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; background: transparent; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; white-space: nowrap; transition: background .2s, color .2s; }
.action:hover { background: #eee5d3; }
.action[aria-pressed="true"] { color: var(--red); border-color: var(--red); background: #f4e6da; }
.action.primary { background: var(--red); border-color: var(--red); color: white; }
.action.primary:hover { background: var(--red-dark); }
.action.primary[aria-pressed="true"] { background: var(--red-dark); color: white; }
.action-icon { font-family: var(--serif); font-size: 17px; line-height: 1; }
.help-action { width: 42px; padding: 0; font-family: var(--serif); font-size: 18px; border-radius: 50%; }
.experience { display: grid; grid-template-columns: minmax(0, 1fr) 292px; min-height: 0; position: relative; }
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #f5eede; }
#c { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage-heading { pointer-events: none; position: absolute; top: 28px; left: 30px; z-index: 1; }
.eyebrow { margin: 0; color: var(--red); font-size: 10px; font-weight: 500; letter-spacing: .2em; }
.stage-heading h2 { margin: 13px 0 9px; font: 30px/1.35 var(--serif); letter-spacing: .12em; }
.stage-heading .lead { margin: 0; color: var(--muted); font: 12px/1.7 var(--serif); letter-spacing: .05em; }
.mode-switch { position: absolute; top: 28px; right: 26px; display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fcf9f1ed; z-index: 2; }
.mode-switch button { min-height: 36px; padding: 0 15px; background: transparent; border: none; border-radius: 3px; font-size: 12px; color: var(--muted); }
.mode-switch button[aria-pressed="true"] { color: var(--paper-light); background: var(--ink); }
.stage[data-mode="plate"] .stage-heading, .stage[data-mode="fly"] .stage-heading { display: none; }
.stage[data-mode="plate"] .mode-switch, .stage[data-mode="fly"] .mode-switch { display: none; }
.back { position: absolute; top: 24px; left: 26px; z-index: 2; background: #fcf9f1ed; color: var(--red); border-color: #cbb49c; }
.zoom-controls { position: absolute; left: 26px; bottom: 30px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: #fcf9f1f2; z-index: 2; }
.zoom-controls button { display: grid; place-items: center; border: none; background: transparent; min-width: 42px; min-height: 42px; font-size: 20px; }
.zoom-controls button:hover { color: var(--red); background: #ede3d2; }
.zoom-controls .reset { font-size: 11px; border-inline: 1px solid var(--line); padding: 0 13px; }
.hint { pointer-events: none; position: absolute; bottom: 36px; right: 26px; margin: 0; color: #726758; font-size: 11px; letter-spacing: .06em; }
.hover-label { position: absolute; padding: 8px 12px; max-width: 220px; pointer-events: none; color: var(--paper-light); background: var(--ink); border-radius: 4px; font: 13px/1.4 var(--serif); z-index: 3; }
.loading { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: var(--paper); z-index: 4; }
.loading .loading-mark { margin: auto auto 15px; padding: 12px 10px; border: 1px solid var(--red); color: var(--red); writing-mode: vertical-rl; font: 24px/1.3 var(--serif); letter-spacing: .2em; }
.loading p { font-size: 12px; color: var(--muted); letter-spacing: .15em; }
.directory { display: flex; flex-direction: column; min-height: 0; background: var(--paper-light); border-left: 1px solid var(--line); padding: 26px 20px 14px; z-index: 6; }
.directory-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.directory-title h2 { margin: 9px 0 0; font: 21px/1.4 var(--serif); letter-spacing: .12em; }
.directory-count { color: #9a8d78; font: 33px/1 var(--serif); padding-top: 9px; }
.directory-intro { margin: 12px 0 18px; font-size: 11px; color: var(--muted); line-height: 1.8; }
.search-box { display: flex; align-items: center; position: relative; }
.search-box input { width: 100%; min-height: 41px; padding: 0 36px 0 13px; color: var(--ink); background: #f3eddf; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }
.search-box input::placeholder { color: #8d8272; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear { position: absolute; right: 4px; width: 32px; height: 32px; border: none; background: transparent; font-size: 19px; }
.result-count { font-size: 10px; color: var(--muted); margin: 13px 0 4px; letter-spacing: .06em; }
.spot-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9bda6 transparent; padding: 0 4px 0 0; margin: 0 -4px 0 0; list-style: none; }
.spot-list li { border-bottom: 1px solid #e7dfd0; }
.spot-button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 7px; min-height: 57px; background: transparent; border: none; border-radius: 3px; }
.spot-button:hover, .spot-button:focus-visible { background: #f1e8d9; }
.spot-button[aria-current="true"] { background: #f0e0d3; color: var(--red-dark); }
.spot-number { color: #a79880; font: 13px/1 var(--serif); min-width: 23px; }
.spot-button[aria-current="true"] .spot-number { color: var(--red); }
.spot-copy { flex: 1; }
.spot-name { display: block; font: 16px/1.3 var(--serif); letter-spacing: .08em; }
.spot-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.spot-arrow { color: #aa9a81; font-size: 13px; }
.empty { padding: 25px 4px; font-size: 12px; line-height: 1.9; color: var(--muted); }
.directory-footer { margin: 12px 0 0; display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); }
.home-link { color: var(--muted); text-decoration: none; }
.home-link:hover { color: var(--red); }
.reading { position: absolute; bottom: 25px; left: 50%; width: min(600px, calc(100% - 52px)); transform: translateX(-50%); padding: 20px 25px 15px; background: #fcf9f1f5; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 35px #48341d0a; z-index: 2; }
.reading-meta { display: flex; justify-content: space-between; color: var(--red); font-size: 10px; letter-spacing: .15em; }
.reading-actions { display: flex; align-items: center; gap: 12px; }
.reading-actions button { background: #eee2cc; color: var(--red-dark); border: 1px solid #ccbaa0; border-radius: 4px; min-height: 28px; padding: 0 9px; font-size: 11px; letter-spacing: .04em; }
.reading-actions button:hover { background: #e8d7b8; }
.reading h2 { margin: 10px 0 8px; font: 24px/1.4 var(--serif); letter-spacing: .1em; }
.reading p { margin: 0; font: 13px/1.8 var(--serif); color: #786b59; }
.detail-nav { display: flex; gap: 6px; margin-top: 10px; }
.detail-nav button { flex: 1; min-width: 0; min-height: 34px; padding: 5px 8px; border: 1px solid #d9cbb3; border-radius: 4px; background: #f7f0e3; color: #796044; font-size: 11px; letter-spacing: .04em; }
.detail-nav button:hover { background: #eee2cc; }
.detail-nav button[aria-pressed="true"] { background: #eee0ca; border-color: #a97a50; color: var(--red-dark); }
.reading .detail-caption { margin-top: 8px; font-size: 11px; line-height: 1.5; color: #8a7054; }
.reading-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.reading-nav button { min-height: 32px; padding: 0 5px; border: none; background: transparent; color: var(--red); font-size: 12px; }
.reading-nav span { color: var(--muted); font-size: 10px; }
.tour-status { position: absolute; top: 25px; right: 25px; padding: 12px 15px; background: var(--ink); border-radius: 5px; color: var(--paper-light); font-size: 11px; letter-spacing: .06em; z-index: 3; }
.tour-status progress { display: block; width: 160px; height: 3px; margin-top: 8px; accent-color: #c7a56a; }
.footer { display: flex; justify-content: space-between; align-items: center; padding: 0 28px; border-top: 1px solid var(--line); background: var(--paper-light); font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.footer p { margin: 0; }
.footer .footer-note { display: inline-block; margin-left: 15px; padding-left: 15px; border-left: 1px solid var(--line); }
kbd { font: 10px var(--sans); display: inline-block; border: 1px solid #d8cebb; border-radius: 3px; padding: 2px 4px; margin: 0 2px; }
.mobile-nav, .directory-close, .scrim { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
dialog { width: min(560px, calc(100% - 32px)); max-height: min(85dvh, 740px); overflow: auto; padding: 33px; border: 1px solid #c9baa2; border-radius: 7px; background: var(--paper-light); color: var(--ink); box-shadow: 0 20px 80px #352e2733; }
dialog::backdrop { background: #352e2766; backdrop-filter: blur(4px); }
dialog h2 { margin: 12px 0 20px; font: 28px/1.4 var(--serif); letter-spacing: .12em; }
dialog p { font-size: 13px; line-height: 1.9; color: #6c6255; }
.dialog-close { position: absolute; right: 15px; top: 12px; width: 40px; height: 40px; border: none; background: transparent; font-size: 24px; }
.instructions { margin: 22px 0; }
.instructions div { display: grid; grid-template-columns: 95px 1fr; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.8; }
.instructions dt { color: var(--red); }
.instructions dd { margin: 0; color: var(--muted); }
.dialog-note { padding: 14px 17px; border-left: 2px solid #b89463; background: #f2eadb; }
.error-message { max-width: 380px; padding: 20px; line-height: 1.8; }
@media (min-width: 1500px) {
  .experience { grid-template-columns: minmax(0, 1fr) 320px; }
  .directory { padding-inline: 26px; }
  .spot-button { padding-block: 13px; }
}
@media (max-width: 1100px) and (min-width: 961px) {
  .masthead { padding-inline: 22px; }
  .stage-heading h2 { font-size: 25px; }
  .mode-switch { top: 122px; left: 28px; right: auto; }
  .hint { font-size: 10px; right: 18px; bottom: 85px; }
}
@media (max-width: 960px) {
  .app { grid-template-rows: 76px minmax(0, 1fr) calc(66px + env(safe-area-inset-bottom)); }
  .masthead { padding: max(4px, env(safe-area-inset-top)) 18px 0; gap: 12px; }
  .brand { gap: 10px; }
  .brand-seal { width: 31px; height: 39px; font-size: 15px; }
  .brand h1 { font-size: 23px; }
  .brand p { font-size: 8px; letter-spacing: .1em; }
  .header-actions { gap: 6px; }
  .action { min-height: 40px; padding: 0 11px; font-size: 11px; }
  #audio-label, #tour-label, #record-label { display: none; }
  #audio-btn, #tour-btn, #record-video-btn { width: 40px; padding: 0; }
  .help-action { width: 36px; }
  .experience { display: block; }
  .stage { height: 100%; }
  .stage-heading { top: 24px; left: 23px; }
  .stage-heading h2 { font-size: 28px; }
  .mode-switch { display: none; }
  .directory { display: none; position: absolute; bottom: 0; left: 0; right: 0; max-width: 550px; margin: auto; height: min(82%, 610px); border: 1px solid var(--line); border-bottom: none; border-radius: 15px 15px 0 0; padding: 24px 24px 18px; box-shadow: 0 -15px 60px #352e2726; z-index: 21; }
  .directory.is-open { display: flex; }
  .directory-count { display: none; }
  .directory-intro { margin-bottom: 12px; }
  .directory-close { display: block; width: 40px; height: 40px; position: absolute; right: 17px; top: 14px; border: none; border-radius: 50%; background: #f1e8d9; font-size: 21px; }
  .scrim:not([hidden]) { display: block; position: absolute; inset: 0; width: 100%; border: none; background: #352e274a; backdrop-filter: blur(2px); z-index: 20; cursor: default; }
  .footer { display: none; }
  .mobile-nav { display: flex; position: relative; z-index: 22; align-items: stretch; background: var(--paper-light); border-top: 1px solid var(--line); padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); gap: 5px; }
  .mobile-nav button { flex: 1; border: none; background: transparent; border-radius: 5px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
  .mobile-nav button[aria-pressed="true"], .mobile-nav button[aria-expanded="true"] { background: #f0e3d4; color: var(--red-dark); }
  .mobile-nav .nav-symbol { display: block; margin-bottom: 3px; font-size: 17px; }
  .zoom-controls { left: 20px; bottom: 50px; }
  .zoom-controls button { min-width: 40px; min-height: 40px; }
  .hint { bottom: 20px; left: 22px; right: 15px; font-size: 10px; letter-spacing: 0; }
  .back { top: 18px; left: 18px; }
  .stage[data-mode="plate"] .zoom-controls { top: 18px; right: 18px; left: auto; bottom: auto; }
  .reading { bottom: 16px; width: calc(100% - 32px); padding: 17px 19px 12px; }
  .reading h2 { font-size: 23px; }
  .reading p { font-size: 12px; }
  .tour-status { top: 18px; right: 18px; padding: 9px 11px; font-size: 10px; }
  .tour-status progress { width: 105px; }
}
@media (max-width: 460px) {
  .reading-actions #reading-category { display: none; }
  .masthead { padding-inline: 13px; gap: 7px; }
  .brand { gap: 9px; }
  .brand h1 { font-size: 21px; }
  .brand p { font-size: 7px; }
  .brand-seal { width: 26px; height: 35px; font-size: 13px; }
  .header-actions { gap: 4px; }
  #season-btn { padding-inline: 8px; min-width: 74px; }
  #season-btn .action-icon { display: none; }
  #audio-btn, #tour-btn, #record-video-btn { width: 34px; min-height: 38px; }
  .help-action { width: 32px; min-height: 34px; font-size: 16px; }
  .stage-heading { top: 26px; }
  .stage-heading h2 { font-size: 25px; }
  .stage-heading .lead { max-width: 280px; font-size: 11px; }
  dialog { padding: 28px 23px; }
  dialog h2 { font-size: 24px; }
  .reading h2 { font-size: 21px; }
}
@media (max-width: 360px) {
  .brand-seal { display: none; }
  .brand h1 { font-size: 20px; }
  #season-btn { min-width: 62px; padding-inline: 6px; }
}
@media (max-height: 580px) and (min-width: 700px) {
  .app { grid-template-rows: 64px minmax(0, 1fr) 34px; }
  .stage-heading { top: 18px; }
  .stage-heading h2 { font-size: 22px; margin-block: 8px; }
  .stage-heading .lead { display: none; }
  .reading { bottom: 12px; padding: 12px 20px 8px; }
  .reading h2 { margin-block: 5px; font-size: 20px; }
  .reading-nav { margin-top: 6px; padding-top: 5px; }
  .zoom-controls { bottom: 14px; }
  .hint { bottom: 18px; }
  .footer { font-size: 9px; }
  .directory { padding-top: 16px; }
  .directory-intro { display: none; }
  .search-box { margin-top: 10px; }
  .mobile-nav { padding-block: 3px; }
  .mobile-nav .nav-symbol { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* 视频录制控制与进度浮层样式 */
.record-overlay {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center;
  background: rgba(43, 37, 32, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.record-modal {
  width: min(92vw, 460px);
  padding: 32px 28px 26px;
  background: #fbf7ee;
  border: 1px solid #d5c8b2;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
  text-align: center;
}
.record-seal {
  margin: 0 auto 16px; width: 44px; height: 58px;
  display: grid; place-items: center;
  border: 1.5px solid var(--red); color: var(--red);
  font: 18px/1.3 var(--serif); letter-spacing: 0.15em;
  background: #fff8f5; border-radius: 3px;
}
.record-modal h3 {
  margin: 0 0 8px; font: 22px/1.35 var(--serif);
  color: var(--ink); letter-spacing: 0.08em;
}
.record-modal p {
  margin: 0 0 20px; font-size: 12px; color: var(--muted);
  line-height: 1.6;
}
.record-progress-bar {
  width: 100%; height: 8px;
  background: #eae2d1; border-radius: 4px;
  overflow: hidden; margin-bottom: 12px;
}
.record-progress-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #c27155, var(--red));
  border-radius: 4px;
  transition: width 0.25s ease-out;
}
.record-status-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: #756a5c; font-family: var(--serif);
  margin-bottom: 22px;
}
.record-status-row #record-percent {
  font-weight: 600; color: var(--red);
}
#record-video-btn {
  background: #fdfaf2;
  border-color: #d1bda6;
  color: #7a3a2a;
}
#record-video-btn:hover {
  background: #f5ebe0;
  color: var(--red-dark);
}
