:root {
  color-scheme: light;
  --ink: #193a30;
  --green: #234c40;
  --paper: #f6f3eb;
  --muted: #626c61;
  --line: #d9dcd2;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--green);
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button { font: inherit; cursor: pointer; min-height: 44px; min-width: 44px; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible { outline: 3px solid #d79c42; outline-offset: 3px; }
[hidden] { display: none !important; }
#tour-app { position: relative; height: 100vh; height: 100dvh; overflow: hidden; }
#viewer { position: absolute; inset: 0 0 var(--dock-space, 240px); z-index: 0; }
#viewer:focus-visible, #transcript:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.topbar { position: absolute; z-index: 5; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 18px 28px; color: white; background: linear-gradient(#132a25d9, #132a2500); pointer-events: none; }
.brand { min-width: 0; text-shadow: 0 1px 3px #142d25; }
.brand span { display: block; font-size: 17px; font-weight: 600; letter-spacing: .03em; }
.brand small { display: block; margin-top: 5px; font-size: 11px; }
.quiet-button { pointer-events: auto; border: 1px solid #ffffff60; color: white; border-radius: 6px; background: #234c40; padding: 0 13px; white-space: nowrap; }
.quiet-button[aria-pressed="true"] { color: var(--ink); background: var(--paper); }
.view-hint { position: absolute; top: 105px; left: 12px; right: 12px; text-align: center; color: white; font-size: 12px; text-shadow: 0 1px 4px #000; pointer-events: none; }
.view-status { position: absolute; top: 127px; left: 0; right: 0; text-align: center; color: white; font-size: 12px; text-shadow: 0 1px 4px #000; pointer-events: none; }
.view-error { position: absolute; z-index: 7; top: 165px; left: 16px; right: 16px; max-width: 550px; margin: auto; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border-radius: 6px; box-shadow: 0 2px 12px #0003; font-size: 13px; }
.view-error button { border: 1px solid var(--green); color: var(--green); background: none; border-radius: 4px; padding: 0 12px; flex-shrink: 0; }
.bottom-dock { position: absolute; z-index: 6; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; right: 12px; max-width: 640px; margin: auto; background: var(--paper); border: 1px solid #fff8; border-radius: 10px; box-shadow: 0 8px 30px #122a2938; }
.narration { padding: 13px 16px 12px; }
.narration-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.point-heading { min-width: 0; }
.point-heading small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .08em; }
h1 { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 3px 0 0; }
.text-button { border: 0; background: none; color: var(--green); padding: 0 0 0 8px; font-size: 12px; white-space: nowrap; }
.playback { display: flex; align-items: center; gap: 11px; margin-top: 8px; }
.play-button { border: 0; border-radius: 5px; color: white; background: var(--green); padding: 0 12px; font-size: 12px; }
.playback-info { flex: 1; min-width: 0; }
#audio-status { display: block; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
progress { display: block; width: 100%; height: 3px; margin-top: 7px; border: 0; background: var(--line); accent-color: var(--green); }
progress::-webkit-progress-bar { background: var(--line); border-radius: 2px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 2px; }
progress::-moz-progress-bar { background: var(--green); }
#audio-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
#transcript { margin-top: 10px; max-height: min(18dvh, 120px); overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 4px 0; }
#transcript p { margin: 0 0 8px; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
#transcript small { font-size: 11px; color: var(--muted); }
.point-strip { display: flex; gap: 10px; padding: 11px 16px 4px; border-top: 1px solid var(--line); overflow-x: auto; overscroll-behavior-x: contain; }
.point-card { position: relative; display: flex; align-items: center; gap: 9px; flex: 1 1 0; min-width: 0; padding: 5px; border: 2px solid transparent; border-radius: 6px; background: #e9e8df; color: #4e594f; text-align: left; }
.point-card img { width: 51px; height: 39px; flex-shrink: 0; border-radius: 3px; object-fit: cover; }
.point-card span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.point-card[aria-current="location"] { border-color: var(--green); color: var(--ink); background: #e1e7df; }
.disclaimer { margin: 6px 8px 9px; text-align: center; font-size: 10px; color: var(--muted); }
.navigation-hotspot { display: flex; align-items: center; justify-content: center; gap: 7px; width: 164px; height: 48px; padding: 0 10px; border: 1px solid #f7f2dfcc; border-radius: 6px; color: white; background: var(--green); box-shadow: 0 4px 18px #0004; font-size: 12px; white-space: nowrap; }
.navigation-hotspot::before { content: "›"; font-size: 27px; line-height: 1; }
.welcome { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: #142d25a6; }
.welcome-card { width: 100%; max-width: 350px; padding: 28px 23px 23px; background: var(--paper); border-radius: 10px; box-shadow: 0 14px 60px #0003; text-align: center; }
.welcome-symbol { font-size: 32px; letter-spacing: -.04em; color: var(--green); }
.welcome-card h2 { margin: 9px 0 18px; font-size: 22px; font-weight: 600; }
.welcome-card p { margin: 10px 0; font-size: 13px; line-height: 1.6; }
.test-notice { color: var(--green); font-weight: 600; }
#start, #reload { width: 100%; border: 0; background: var(--green); color: white; padding: 13px; border-radius: 6px; margin: 15px 0 11px; font-size: 15px; }
.welcome-card small { display: block; font-size: 11px; color: var(--muted); line-height: 1.6; }
#welcome-error:empty { display: none; }
.psv-loader-container { background: transparent; }
@media (min-width: 768px) {
  .topbar { padding: 24px 30px 40px; }
  .brand span { font-size: 20px; }
  .brand small { font-size: 12px; }
  .bottom-dock { bottom: 24px; }
  .narration { padding: 15px 20px; }
  .point-strip { padding: 12px 20px 4px; }
  .point-card img { width: 76px; height: 43px; }
  .point-card span { font-size: 13px; }
}
@media (max-height: 600px) {
  .bottom-dock { bottom: 5px; }
  .point-strip { padding-top: 5px; }
  .narration { padding-top: 6px; padding-bottom: 6px; }
  #transcript { max-height: 80px; }
  .view-hint, .view-status { display: none; }
  .welcome-card { padding: 14px 22px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #viewer { inset: 0 calc(min(38vw, 300px) + 24px) 0 0; }
  .bottom-dock { left: auto; right: 8px; bottom: 8px; width: min(38vw, 300px); max-height: calc(100dvh - 16px); overflow-y: auto; }
  .topbar { right: calc(min(38vw, 300px) + 24px); padding: 12px 14px 20px; }
  .brand span { font-size: 15px; }
  .brand small { font-size: 10px; }
  .narration { padding: 8px 10px; }
  h1 { font-size: 16px; }
  #transcript { max-height: 80px; }
  .point-strip { padding: 6px 10px 4px; gap: 6px; }
  .point-card img { width: 36px; height: 34px; }
  .disclaimer { margin: 5px 4px 7px; font-size: 9px; }
  .view-error { right: calc(min(38vw, 300px) + 32px); top: 85px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
