@font-face {
  font-family: PalaceSerif;
  src: local("方正小标宋简体"), local("FZXiaoBiaoSong-B05S"), local("Noto Serif CJK SC"), local("SimSun");
  font-display: swap;
}
:root {
  --scene-rgb: 13, 43, 35;
  --scene-accent: #e0c88d;
  --scene-muted: #c6d6c7;
  --scene-pale: #f1e9d2;
  --realm-image: url("assets/realms/scene01-静心殿.png");
  --focal-x: 50%;
  --ink: #163d31;
  --rule: rgba(224, 200, 141, .22);
  --serif: PalaceSerif, "Songti SC", serif;
  --sans: "Microsoft YaHei", "PingFang SC", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: rgb(var(--scene-rgb)); color: var(--scene-pale); font: 16px/1.85 var(--sans); }
button, input { font: inherit; color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .34; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--scene-accent); outline-offset: 5px; }
a { color: inherit; text-underline-offset: 5px; }
::selection { color: var(--ink); background: #e0d5af; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: #8fae99; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -80px; left: 20px; z-index: 30; background: #e7e2c5; color: var(--ink); padding: 10px 16px; }
.skip:focus { top: 10px; }

/* A complete, clear portrait stage blends into an atmospheric continuation. */
.palace { position: relative; width: 100%; height: 100svh; overflow: clip; isolation: isolate; }
.ambient { position: absolute; inset: -28px; background-position: var(--focal-x) center; background-size: cover; filter: blur(18px) brightness(.54) saturate(.92); transform: scale(1.04); }
.palace::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 17, 14, .31), transparent 27%, transparent 60%, rgba(3, 17, 13, .38)); pointer-events: none; }
.image-stage { position: absolute; top: 0; bottom: 0; left: 50%; width: min(100vw, calc(100svh * 2 / 3)); transform: translateX(-50%); transition: transform .55s var(--ease), opacity .4s; }
.image-stage img { display: block; height: 100%; width: 100%; object-fit: cover; object-position: var(--focal-x) center; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.scene-header { position: absolute; inset: 28px 42px auto; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; text-shadow: 0 3px 18px #021c17; transition: opacity .4s; }
.scene-header h1 { font: 50px/1.4 var(--serif); font-weight: 500; margin: 0; letter-spacing: .06em; }
.scene-header p { margin: 5px 0 0; font-size: 13px; letter-spacing: .15em; color: var(--scene-muted); }
.scene-header .brand { font: 21px/1.6 var(--serif); letter-spacing: .1em; text-align: right; color: var(--scene-pale); }
.brand span { display: block; font: 11px/1.7 var(--sans); letter-spacing: .12em; color: var(--scene-muted); }

/* The scene is the spectacle; the low dock keeps the single playback head. */
.tour-player { position: absolute; z-index: 2; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 48px)); padding: 15px 25px 11px; border: 1px solid rgba(224, 200, 141, .29); border-radius: 18px; color: var(--scene-pale); background: rgba(var(--scene-rgb), .62); backdrop-filter: blur(26px) brightness(.64) saturate(.9); -webkit-backdrop-filter: blur(26px) brightness(.64) saturate(.9); box-shadow: 0 12px 38px #021a1540; transition: transform .55s var(--ease), opacity .4s, background-color .5s; }
.tour-player::before { content: ""; position: absolute; left: 20%; right: 20%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--scene-accent), transparent); pointer-events: none; opacity: .75; }
.track-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.track-title { min-width: 0; }
.track-title h2 { font: 23px/1.4 var(--serif); font-weight: 500; letter-spacing: .015em; margin: 0; text-wrap: balance; }
.track-title > span { display: block; color: var(--scene-muted); font-size: 12px; line-height: 1.6; margin-top: 2px; }
.narrator-name { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--scene-muted); white-space: nowrap; }
.speaking-dot { width: 5px; height: 5px; background: #8db296; border-radius: 50%; }
.speaking-dot.active { background: var(--scene-accent); }
.timeline { margin: 6px 0 0; }
.timeline input { display: block; width: 100%; height: 24px; margin: 0; accent-color: var(--scene-accent); cursor: pointer; caret-color: var(--scene-accent); }
.time-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--scene-muted); font-size: 11px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.time-row > :nth-child(2) { text-align: center; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 9px auto 0; max-width: 560px; }
.jade-control { display: grid; place-items: center; background: transparent url("assets/ui/jade-button-v1.png") center/112% 112% no-repeat; border: 0; border-radius: 50%; color: #f6e2ad; filter: drop-shadow(0 4px 6px #031a1666); transition: filter .2s, transform .2s; }
.jade-control svg { display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-control { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 64px; min-width: 48px; padding: 0; color: var(--scene-muted); background: none; border: 0; font-size: 11px; line-height: 1.5; }
.side-control > .jade-control { width: 46px; height: 46px; }
.transport { width: 46px; height: 46px; padding: 12px; margin-top: -16px; }
.main-play { width: 74px; height: 74px; margin-top: -16px; }
.main-play svg { height: 27px; width: 27px; stroke: none; fill: currentColor; filter: drop-shadow(0 1px 2px #062b2099); }
.jade-control:hover, .side-control:hover > .jade-control { filter: brightness(1.14) drop-shadow(0 4px 6px #031a1666); }
.jade-control:active, .side-control:active > .jade-control { transform: scale(.96); }
.is-playing .main-play { filter: brightness(1.1) drop-shadow(0 4px 7px #021c1766); }
#collection-count { margin-left: 4px; font-variant-numeric: tabular-nums; color: var(--scene-accent); }
.player-foot { margin-top: 7px; text-align: center; font-size: 12px; color: var(--scene-accent); }

/* All panels are made from the same scene-tinted jade, not a second website. */
dialog { position: fixed; inset: 16px 16px 16px auto; margin: 0; width: min(550px, calc(100% - 32px)); height: calc(100svh - 32px); max-height: calc(100svh - 32px); max-width: calc(100% - 32px); padding: 0; color: var(--scene-pale); background: rgba(var(--scene-rgb), .95); border: 1px solid rgba(224, 200, 141, .36); border-radius: 22px; overflow: hidden; box-shadow: -12px 16px 50px #04171259; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); isolation: isolate; }
dialog::before { content: ""; position: absolute; inset: -25px; z-index: -1; background: var(--realm-image) var(--focal-x) center / cover; filter: blur(24px) saturate(.65); opacity: .1; pointer-events: none; }
dialog::backdrop { background: rgba(2, 16, 12, .22); backdrop-filter: blur(1px); }
dialog[open] { display: flex; flex-direction: column; animation: panel-arrive .38s var(--ease); }
@keyframes panel-arrive { from { opacity: .35; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.drawer-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 24px 18px; border-bottom: 1px solid var(--rule); background: linear-gradient(110deg, rgba(var(--scene-rgb), .96), rgba(var(--scene-rgb), .66)), var(--realm-image) var(--focal-x) 42% / cover; }
.drawer-heading { min-width: 0; flex: 1; }
.drawer-head h2 { font: 26px/1.5 var(--serif); font-weight: 500; margin: 0; text-wrap: balance; }
.drawer-head h2:focus { outline: none; }
.drawer-head p { font-size: 12px; margin: 5px 0 0; color: var(--scene-accent); letter-spacing: .03em; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; padding: 11px; background: rgba(209, 222, 183, .07); color: var(--scene-pale); border: 1px solid rgba(224, 200, 141, .19); border-radius: 50%; }
.icon-button:hover { background: rgba(209, 222, 183, .15); }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#drawer-body { overflow-y: auto; min-height: 0; flex: 1; padding: 18px 26px 32px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.drawer-tabs { display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--rule); margin: 0 0 20px; }
.drawer-tabs button { position: relative; border: 0; background: none; min-height: 46px; padding: 8px 0 12px; color: var(--scene-muted); font-size: 14px; white-space: nowrap; }
.drawer-tabs button[aria-pressed=true] { color: var(--scene-accent); }
.drawer-tabs button[aria-pressed=true]::after { content: ""; height: 2px; position: absolute; left: 0; right: 0; bottom: -1px; background: var(--scene-accent); }
p { margin: 0 0 17px; overflow-wrap: anywhere; }
h3 { font: 25px/1.6 var(--serif); font-weight: 500; margin: 22px 0 12px; text-wrap: balance; }
.drawer-intro, .lede { color: var(--scene-muted); font-size: 15px; line-height: 1.9; }
.quiet { color: var(--scene-muted); font-size: 12px; }
.realm-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px 15px; }
.realm-option { border: 0; background: none; padding: 0; text-align: left; min-width: 0; border-radius: 6px; }
.realm-option img { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 7px; box-shadow: 0 7px 18px #00140e33; transition: filter .2s; }
.realm-option strong { display: block; font: 21px/1.6 var(--serif); margin-top: 8px; font-weight: 500; }
.realm-option small { font-size: 12px; color: var(--scene-muted); }
.realm-option[aria-current=true] img { outline: 2px solid var(--scene-accent); outline-offset: 3px; }
.realm-option[aria-current=true] strong { color: var(--scene-accent); }
.realm-option:hover img { filter: brightness(1.13); }
.method-list, .track-list { list-style: none; padding: 0; margin: 0; }
.method-row, .track-row { border-bottom: 1px solid var(--rule); }
.method-row button, .track-row button { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; min-height: 74px; padding: 17px 2px; border: 0; background: none; text-align: left; }
.method-row strong, .track-row strong { font: 21px/1.5 var(--serif); font-weight: 500; }
.method-row small, .track-row small { display: block; font-size: 12px; color: var(--scene-muted); margin-top: 5px; }
.method-row span, .track-row span { font-size: 12px; color: var(--scene-accent); white-space: nowrap; }
.method-row button:hover strong, .track-row button:hover strong { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.track-row[aria-current=true] strong { color: var(--scene-accent); }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 13px 21px; border: 0; border-radius: 7px; color: #173e31; background: linear-gradient(125deg, #e5ead3, #c3d7b7); font-size: 15px; text-decoration: none; box-shadow: 0 5px 13px #021b1533; }
.primary:hover { background: #e1ebce; }
.primary svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.full { width: 100%; }
.secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 16px; color: var(--scene-pale); background: rgba(211, 226, 193, .07); border: 1px solid rgba(224, 200, 141, .38); border-radius: 7px; }
.secondary:hover { background: rgba(211, 226, 193, .14); }
.text-button { background: none; border: 0; color: var(--scene-muted); text-align: left; font-size: 14px; padding: 10px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(224, 200, 141, .5); }
.text-button:hover { color: var(--scene-accent); }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.discovery { display: flex; align-items: center; gap: 22px; margin: 25px 0; }
.jade-card { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 88px; min-width: 88px; height: 132px; border: 1px solid #d8c086; border-radius: 16px; color: #efdcaa; font: 25px/1.8 var(--serif); background: radial-gradient(ellipse at 20% 6%, #b9dfcb77, transparent 50%), linear-gradient(145deg, #2f7c68, #073e31 60%, #226854); box-shadow: 0 10px 22px #0119104d, inset 0 1px 3px #e9f5ca59; }
.jade-card::before { content: ""; height: 7px; width: 7px; border: 1px solid #d4c48e; border-radius: 50%; margin-bottom: 11px; }
.discovery > p { font-size: 14px; line-height: 1.9; color: var(--scene-muted); margin: 0; }
.definition { font-size: 16px; line-height: 1.9; color: var(--scene-pale); }
.boundary { color: var(--scene-muted); font-size: 13px; }
details { border-top: 1px solid var(--rule); padding-top: 9px; margin: 22px 0; }
summary { cursor: pointer; min-height: 44px; padding: 8px 0; font-size: 14px; }
details p { font-size: 14px; margin-top: 8px; }
.saved-mark { color: #d3e0b5; font-size: 13px; margin: 16px 0; }
.invitation { border-top: 1px solid var(--rule); margin: 28px 0 18px; padding-top: 22px; }
.invitation h3 { margin: 0 0 12px; font-size: 24px; }
.invitation p { font-size: 14px; color: var(--scene-muted); }
.matrix-image { display: block; width: 100%; height: auto; border-radius: 7px; margin: 22px 0; }
.info-block { border-block: 1px solid var(--rule); margin: 24px 0; padding: 18px 0; }
.info-block p { font-size: 14px; margin-bottom: 10px; }
.info-block p:last-child { margin-bottom: 0; }
.transcript { font-size: 16px; line-height: 2; color: var(--scene-pale); margin: 22px 0; }
.transcript p { margin-bottom: 19px; }
.transcript-controls { position: sticky; top: -18px; z-index: 1; display: flex; align-items: center; gap: 20px; background: rgb(var(--scene-rgb)); border-bottom: 1px solid var(--rule); padding: 8px 0 17px; margin-bottom: 24px; }
.empty { padding: 10px 0 25px; }
.help-footer { margin-top: 28px; }
.error-note { color: #ffd3b2; font-size: 13px; margin: 15px 0; }
.notice { position: fixed; bottom: max(248px, calc(env(safe-area-inset-bottom) + 235px)); left: 50%; transform: translateX(-50%); z-index: 30; width: max-content; max-width: calc(100% - 32px); padding: 10px 17px; background: rgba(var(--scene-rgb), .97); color: var(--scene-pale); border: 1px solid rgba(224, 200, 141, .38); border-radius: 8px; box-shadow: 0 6px 18px #001a124d; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.notice.visible { opacity: 1; }
.error-screen { position: relative; padding: 80px 25px; max-width: 600px; margin: auto; color: var(--scene-pale); }

@media (min-width: 1100px) {
  .drawer-open .image-stage { transform: translateX(calc(-50% - 180px)) scale(.97); }
  .drawer-open .tour-player { transform: translateX(calc(-50% - 180px)) scale(.94); opacity: .6; }
  .drawer-open .scene-header { opacity: .65; }
}
@media (min-width: 1700px) {
  .scene-header { inset: 36px 55px auto; }
  .tour-player { bottom: 24px; }
}
@media (max-width: 760px) {
  .ambient { filter: blur(16px) brightness(.55); }
  .image-stage { left: 0; width: 100%; transform: none; }
  .image-stage img { mask-image: none; }
  .palace::after { background: linear-gradient(180deg, #02171094, transparent 22%, transparent 55%, #031a1659); }
  .scene-header { inset: max(20px, env(safe-area-inset-top)) 22px auto; gap: 12px; }
  .scene-header h1 { font-size: 35px; }
  .scene-header p { font-size: 12px; margin-top: 3px; }
  .scene-header .brand { font-size: 18px; }
  .brand span { font-size: 11px; }
  .tour-player { width: calc(100% - 24px); bottom: max(12px, env(safe-area-inset-bottom)); padding: 14px 18px 9px; border-radius: 17px; }
  .track-title h2 { font-size: 21px; }
  .track-title > span { font-size: 11px; line-height: 1.6; }
  .narrator-name { font-size: 11px; gap: 5px; }
  .timeline { margin-top: 5px; }
  .controls { gap: 12px; margin-top: 10px; }
  .side-control { min-width: 44px; min-height: 64px; }
  .side-control > .jade-control, .transport { height: 44px; width: 44px; }
  .transport { padding: 11px; }
  .main-play { height: 68px; width: 68px; }
  .main-play svg { height: 26px; width: 26px; }
  .player-foot { font-size: 11px; }
  dialog { inset: auto 8px max(8px, env(safe-area-inset-bottom)); width: calc(100% - 16px); max-width: calc(100% - 16px); height: min(84svh, 850px); max-height: 90svh; border-radius: 23px; }
  .drawer-head { padding: 20px 18px 16px; gap: 10px; }
  .drawer-head h2 { font-size: 24px; }
  #drawer-body { padding: 13px 20px 28px; }
  .drawer-tabs { gap: 20px; margin-bottom: 19px; }
  .drawer-tabs button { font-size: 13px; }
  .realm-list { gap: 20px 13px; }
  .realm-option strong { font-size: 19px; }
  .realm-option small { font-size: 11px; }
  .transcript { font-size: 15px; }
  .transcript-controls { top: -13px; }
  .drawer-open .image-stage { transform: scale(.985); }
  .notice { bottom: 231px; font-size: 12px; }
}
@media (max-width: 359px) {
  .scene-header { inset-inline: 18px; }
  .scene-header h1 { font-size: 31px; }
  .brand span { display: none; }
  .tour-player { width: calc(100% - 20px); padding-inline: 15px; }
  .track-title h2 { font-size: 19px; }
  .track-title > span { max-width: 204px; }
  .narrator-name { display: none; }
  .controls { gap: 6px; }
  .main-play { width: 62px; height: 62px; }
  .realm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer-tabs { gap: 15px; }
  .drawer-tabs button { font-size: 12px; }
}
@media (max-height: 600px) and (min-width: 761px) {
  .scene-header { top: 18px; }
  .scene-header h1 { font-size: 37px; }
  .tour-player { bottom: 12px; }
}
@media (max-height: 800px) and (min-width: 761px) {
  .image-stage { bottom: 64px; width: min(100vw, calc((100svh - 64px) * 2 / 3)); }
}
@media (max-width: 760px) {
  .scene-header .brand { display: none; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .image-stage { bottom: 90px; }
}
@supports not (backdrop-filter: blur(1px)) {
  .tour-player { background: rgba(var(--scene-rgb), .91); }
  dialog { background: rgb(var(--scene-rgb)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* 1.0 working forms inherit the same scene light, not a second visual world. */
.quick-actions,.search-row,.feedback-options{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}.search-row input{flex:1;min-width:150px}.quick-actions button{flex:1}label{display:block;margin:16px 0 8px;color:var(--scene-muted);font-size:15px}input:not([type=range]),textarea,select{max-width:100%;width:100%;padding:12px 14px;border:1px solid #94b2a1;border-radius:7px;background:#09241e;color:#f1e9d2;font:inherit;line-height:1.7;min-height:46px}input::placeholder,textarea::placeholder{color:#b1c4b8}textarea{resize:vertical}form>.primary{margin-top:14px}.guide-reply{margin-top:24px;padding-top:12px;border-top:1px solid #6d8a77}.file-label{padding:12px 0}.file-label input{font-size:13px;margin-top:10px}.feedback-options button{min-height:44px}.drawer-tabs{flex-wrap:wrap}select{max-width:240px}

#drawer-notice{flex-shrink:0;margin:0 24px;padding:12px 16px;border:1px solid var(--scene-muted);border-radius:8px;background:var(--scene-panel,#153e34);color:var(--scene-ink,#f1e9d2);line-height:1.65}#drawer-notice[hidden]{display:none!important}

.player-foot{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.filing{font-size:10px;color:var(--scene-muted);text-decoration:none;white-space:nowrap}.filing:hover{text-decoration:underline}
