/* Local UI refinement. All video pixels and embedded subtitles remain unchanged. */
.toolbar{top:3.5%;right:2.5%;gap:clamp(4px,.55cqw,10px);align-items:center;flex-wrap:nowrap;transform:none}
.toolbar .icon-button,.transport .icon-button{width:clamp(28px,2.65cqw,44px);height:clamp(28px,2.65cqw,44px);min-width:0;min-height:0;flex-shrink:0;padding:0;line-height:1;display:grid;place-items:center;font-size:0}
.icon-button svg{display:block;width:45%;height:45%;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.icon-button svg path{vector-effect:non-scaling-stroke}
#qte{--gesture-progress:0;--hold-progress:0;isolation:isolate;cursor:grab}
#qte .qte-shade{background:linear-gradient(90deg,transparent 52%,#07101c26 65%,#07101cba 100%);pointer-events:none}
#qte .qte-target{position:absolute;inset:auto 5% 12% auto;transform:none;width:25%;height:auto;padding:0;display:flex;align-items:center;flex-direction:column;gap:.5cqw;border:0;background:none;box-shadow:none;filter:drop-shadow(0 2px 7px #000b);pointer-events:auto;animation:qte-arrive .45s ease-out both}
.qte-topline{display:flex;align-items:center;justify-content:center;gap:.55cqw;width:100%;min-height:26px;color:#c8b994}
#qte .qte-label{font-size:clamp(9px,.95cqw,16px);line-height:1.5;letter-spacing:.12em;white-space:normal;text-align:center}
.qte-small-rune{font-size:clamp(13px,1.4cqw,24px);color:#c8b994;flex-shrink:0}
.qte-clock{position:relative;display:grid;place-items:center;width:clamp(24px,2.4cqw,40px);height:clamp(24px,2.4cqw,40px);margin-left:.25cqw;flex-shrink:0}
.qte-clock svg{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:#bfa57735;stroke-width:1.1;transform:rotate(-90deg)}
#qte-clock-ring{stroke:#cdb88a;stroke-dasharray:1;stroke-dashoffset:0}
#qte-seconds{font:clamp(10px,.95cqw,16px) Georgia,serif;color:#dfd1ae}
#qte .qte-visual{width:100%;height:19cqw;min-height:0;position:relative;display:grid;place-items:center}
.gesture-drawing{position:absolute;inset:0;display:none;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;overflow:visible;pointer-events:none}
#qte[data-direction=up] .gesture-up,#qte[data-direction=right] .gesture-right,#qte[data-direction=hold] .gesture-hold{display:block}
.rune-faint,.gesture-goal,.gesture-touch,.gesture-chevron,.gesture-rail,.gesture-fill,.armor-outline,.armor-seam{fill:none;stroke:#c8b788;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.rune-faint{stroke:#c8b78845;stroke-width:.9}.gesture-rail{stroke:#b49b6850;stroke-width:1;stroke-dasharray:2 6}
.gesture-fill{stroke:url(#qte-gold);stroke-width:2;stroke-dasharray:1;stroke-dashoffset:1;filter:drop-shadow(0 0 4px #ddca9670)}
.gesture-goal{stroke:#d9c58b80;stroke-width:1}.gesture-touch{stroke:#dfcca7b0;stroke-width:1.4}.gesture-chevron{stroke:#dfcca7;stroke-width:1.6}
.gesture-sparks{fill:#d7c69b;opacity:.55;animation:qte-spark 2.6s ease-in-out infinite}.wand-ink{stroke:#e0d3b0;fill:#ad956b;stroke-width:3;stroke-linejoin:round;stroke-linecap:round}.wand-ink path:last-child{fill:#e8dbb6;stroke-width:1}
#qte-up-thumb,#qte-right-thumb{transition:filter .2s ease;filter:drop-shadow(0 0 4px #dfd0a33a)}
#qte[data-dragging=true] .gesture-touch{stroke:#f2e2b7;stroke-width:2}
#qte[data-dragging=true] #qte-up-thumb,#qte[data-dragging=true] #qte-right-thumb{filter:drop-shadow(0 0 7px #dfd0a380)}
#qte strong{font-size:clamp(14px,1.65cqw,27px);font-weight:400;letter-spacing:.18em;line-height:1.55;white-space:normal;text-align:center;color:#eee0bf}
#qte .qte-hint{font:clamp(9px,.86cqw,14px)/1.7 system-ui,sans-serif;letter-spacing:.04em;color:#bbb8a8;text-align:center;margin:0;min-height:1.7em;white-space:normal}
#qte .qte-assist{font:clamp(9px,.8cqw,13px)/1.5 system-ui,sans-serif;letter-spacing:.05em;background:#101a2340;border:1px solid #bca57535;border-radius:3px;color:#c6b995;padding:.3cqw .8cqw;min-height:24px;touch-action:none}
#qte .qte-assist:hover,#qte .qte-assist:focus-visible{border-color:#cbb68b99;background:#1a2a35c0}
#qte .qte-assist.held{background:#a9955a36;border-color:#e2d09b}
#qte[data-direction=hold] .qte-assist{min-width:9cqw;padding:.65cqw 1.8cqw;border-color:#baa17380;font-size:clamp(11px,1.05cqw,17px)}
#qte .qte-timer{width:76%;height:1px;min-width:0;margin:.5cqw 0 0;background:#b59b6a2e}
#qte .qte-timer i{background:#cbb68a;box-shadow:0 0 6px #cbb68a42}
#qte .hold-meter{display:none!important}.hold-ring{fill:none;stroke:#e4d4a4;stroke-width:2;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;transform:rotate(-90deg);transform-origin:100px 150px;filter:drop-shadow(0 0 5px #ddca9670)}
#qte[data-direction=right] .qte-target{inset:auto auto 13% 50%;transform:translateX(-50%);width:46%;background:radial-gradient(ellipse at center,#07111ccd,transparent 73%);gap:.35cqw;padding:1cqw 0}
#qte[data-direction=right] .qte-shade{background:linear-gradient(0deg,#07101c8c,transparent 63%)}
#qte[data-direction=right] .qte-visual{height:16cqw}
#qte[data-direction=right] .qte-visual{order:1}#qte[data-direction=right] .qte-topline{order:2}#qte[data-direction=right] strong{order:3}#qte[data-direction=right] .qte-hint{order:4}#qte[data-direction=right] .qte-assist{order:5}#qte[data-direction=right] .qte-timer{order:6}
#qte:focus,#river-track:focus{outline:none}
.armor-outline{stroke:#bca57525;stroke-width:1}.armor-seam{stroke:#bca57560;stroke-width:1.7}
#qte[data-phase=success] .gesture-goal,#qte[data-phase=success] .gesture-touch{stroke:#f5e9bf;filter:drop-shadow(0 0 7px #f1dc95)}
#qte[data-phase=success] .qte-label,#qte[data-phase=success] strong{color:#f6e7bb}
#qte[data-phase=assisted] .qte-label,#qte[data-phase=assisted] strong{color:#d3c7a8}
#qte[data-urgent=true] #qte-clock-ring{stroke:#c99a78}
@keyframes qte-arrive{from{opacity:0;filter:blur(3px)}to{opacity:1;filter:blur(0)}}
@keyframes qte-spark{0%,100%{opacity:.25}50%{opacity:.8}}
#river-qte{background:linear-gradient(0deg,#07101c12,transparent 45%);--river-progress:0}
#river-qte .river-card{position:absolute;left:50%;bottom:14%;transform:translateX(-50%);width:44%;padding:.85cqw 1.8cqw .7cqw;background:linear-gradient(90deg,#08131d20,#08131de8 24%,#08131de8 76%,#08131d20);border-top:1px solid #baa47648;border-bottom:1px solid #baa47628;filter:none;animation:qte-arrive .25s ease-out both}
.river-head{display:flex;justify-content:space-between;align-items:center;color:#c7b48b;font:clamp(9px,.75cqw,12px)/1.4 system-ui,sans-serif;letter-spacing:.15em}
#river-clock{letter-spacing:0;font-family:Georgia,serif;min-width:2em;text-align:right}
#river-qte .river-card strong{display:block;font-size:clamp(13px,1.38cqw,23px);letter-spacing:.14em;line-height:1.65;font-weight:400;margin-top:.2cqw}
#river-qte .river-track{position:relative;display:grid;place-items:center;height:5.6cqw;min-height:40px;margin:0;touch-action:none;cursor:grab;filter:none}
#river-route{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;max-height:100%;overflow:visible;pointer-events:none}
.river-rail,.river-route-fill,.river-goal,.river-goal-arrow,.river-touch,.river-wand-ink{fill:none;stroke:#d9c699;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.river-rail{stroke:#bca5753b;stroke-dasharray:2 5}.river-route-fill{stroke:#e2d3aa;stroke-width:2;stroke-dasharray:1;stroke-dashoffset:1}.river-goal{stroke:#c8b27c85}.river-touch{stroke:#e2d3aad0;stroke-width:1.6}.river-wand-ink{stroke:#e4d7b1;stroke-width:2.4}.river-goal-arrow{stroke:#d9c699;stroke-width:1.5}
#river-qte .river-hint{display:block;text-align:center;color:#b8b8a9;font:clamp(9px,.8cqw,13px)/1.5 system-ui,sans-serif;letter-spacing:.03em}
.river-steps{display:flex;justify-content:center;gap:.65cqw;margin:.6cqw 0 .3cqw}.river-steps i{width:4px;height:4px;border:1px solid #bda6784a;transform:rotate(45deg);transition:background .2s,box-shadow .2s}.river-steps i.current{border-color:#e0c996;box-shadow:0 0 5px #c6ad773b}.river-steps i.won{background:#d9c38b;border-color:#d9c38b}.river-steps i.missed{background:#68767a;border-color:#68767a}
#river-qte .river-timer{width:76%;height:1px;margin:.3cqw auto 0;background:#bca5752a}#river-qte .river-timer i{background:#c8b181}
.river-hold-action{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:.55cqw 1.6cqw;min-height:28px;border:1px solid #c5ad7870;border-radius:3px;background:#0e1a25d9;color:#d8c69c;font:clamp(11px,1cqw,16px) system-ui,sans-serif;letter-spacing:.08em;touch-action:none;white-space:nowrap}
.river-hold-action.held{background:#71623f55;border-color:#e4d3a6}
#river-qte[data-phase=success] .river-card strong{color:#eee1b7}#river-qte[data-phase=success] .river-touch{stroke:#f4e7bb;filter:drop-shadow(0 0 5px #edd9a0)}
.stage[data-river-active=true] #toolbar,.stage[data-river-active=true] #transport{visibility:hidden!important;opacity:0!important;pointer-events:none!important}
@media(max-width:700px){#qte .qte-target{right:4%;bottom:9%;width:30%;gap:.3cqw}#qte .qte-visual{height:20cqw}#qte .qte-topline{gap:3px}#qte .qte-small-rune{display:none}#qte .qte-label{font-size:9px;letter-spacing:.03em}#qte strong{font-size:13px}#qte .qte-hint{font-size:9px;line-height:1.45}#qte .qte-assist{font-size:9px;min-height:22px;padding:2px 7px}#qte[data-direction=right] .qte-target{left:50%;right:auto;bottom:11%;width:58%;padding:1cqw 0}#qte[data-direction=right] .qte-visual{height:13cqw}#river-qte .river-card{width:62%;bottom:14%;padding:1.2cqw 2.4cqw 1cqw}#river-qte .river-card strong{font-size:12px}#river-qte .river-track{height:8cqw;min-height:35px}.river-head{font-size:9px}#river-qte .river-hint{font-size:9px}.river-steps{margin:4px 0 2px;gap:5px}}
@media(prefers-reduced-motion:reduce){#qte .qte-target,#river-qte .river-card,.gesture-sparks{animation:none}}
#transport-hotspot{display:none;position:absolute;z-index:7;left:7%;right:7%;bottom:1.5%;height:10%;background:transparent;pointer-events:auto}
.stage[data-mode=playing]:not([data-river-active=true]) #transport-hotspot{display:block}
#transport:not(.awake){opacity:0;pointer-events:none}
#transport.awake{opacity:1;pointer-events:auto}
@media(max-width:700px){#transport-hotspot{left:3%;right:3%;height:12%;bottom:1%}}

#bilingual-subtitles{position:absolute;z-index:3;left:4%;width:92%;bottom:4.2%;text-align:center;pointer-events:none;color:#fff;font-family:Arial,"Microsoft YaHei",sans-serif;font-weight:400;line-height:1.18;text-shadow:0 1px 2px #000,1px 0 2px #000,-1px 0 2px #000;-webkit-text-stroke:.035cqw #151515;paint-order:stroke fill}
#bilingual-subtitles span{display:block}#subtitle-zh{font-size:2.35cqw}#subtitle-en{font-size:2.25cqw;margin-top:.2cqw}
#bilingual-subtitles[hidden]{display:none}
/* Unified cinematic polish: legible interaction cards and restrained choice emphasis. */
#qte .qte-target{right:4.5%;bottom:17%;width:29%;padding:1.4cqw 1.5cqw 1.2cqw;gap:.7cqw;border:1px solid #c8b58b38;border-radius:12px;background:linear-gradient(145deg,#14232ee8,#07131ce8);box-shadow:0 16px 45px #0005,inset 0 1px #ffffff08;filter:none;backdrop-filter:blur(8px)}
#qte .qte-visual{height:13cqw}#qte strong{font-size:clamp(14px,1.65cqw,25px);letter-spacing:.08em}#qte .qte-hint{font-size:clamp(10px,1cqw,15px);color:#c6c9c3;line-height:1.65;min-height:3.3em;max-width:24em}#qte .qte-label{font-size:clamp(10px,1cqw,16px);letter-spacing:.06em}
#qte .qte-clock{width:clamp(30px,3cqw,44px);height:clamp(30px,3cqw,44px)}#qte-seconds{font-size:clamp(10px,1cqw,15px)}
#qte .qte-assist{padding:.45cqw 1.2cqw;min-height:28px;border-radius:20px;background:#c3ac7310}#qte .qte-timer{height:3px;border-radius:3px;overflow:hidden;width:90%;margin-top:.4cqw}
#qte[data-direction=right] .qte-target{left:50%;right:auto;bottom:17%;width:46%;padding:1.2cqw 2cqw;background:linear-gradient(145deg,#14232ee8,#07131ce8);gap:.55cqw}
#qte[data-direction=right] .qte-visual{height:10cqw;order:2}#qte[data-direction=right] .qte-topline{order:0}#qte[data-direction=right] strong{order:1}#qte[data-direction=right] .qte-hint{order:3;min-height:1.65em}#qte[data-direction=right] .qte-assist{order:4}#qte[data-direction=right] .qte-timer{order:5}
#qte[data-phase=ready] .gesture-chevron{animation:guide-breathe 1s ease-in-out infinite}#qte[data-phase=success] .qte-target{border-color:#d8c48d9c;box-shadow:0 0 32px #c5aa5425}
#river-qte .river-card{bottom:17%;width:47%;padding:1.2cqw 2cqw;border:1px solid #c8b58b38;border-radius:12px;background:linear-gradient(145deg,#14232eee,#07131cee);box-shadow:0 12px 40px #0005;backdrop-filter:blur(8px)}
#river-qte .river-card strong{text-align:center;font-size:clamp(14px,1.6cqw,25px);letter-spacing:.07em;margin:.6cqw 0}.river-head{font-size:clamp(10px,.95cqw,15px)}#river-qte .river-hint{font-size:clamp(10px,1cqw,15px);line-height:1.7}#river-qte .river-track{height:7cqw;min-height:45px}.river-steps i{width:6px;height:6px}.river-steps{gap:12px;margin:.8cqw 0}#river-qte .river-timer{height:3px;width:95%;border-radius:3px;overflow:hidden}
.choice-panel{width:78%;bottom:10%}.choice-panel h2{font-size:clamp(17px,2cqw,31px);font-weight:400;letter-spacing:.12em;margin-bottom:1.8cqw}.options{gap:1cqw 1.2cqw}.option{min-height:5.1cqw;padding:1cqw 1.4cqw;border:1px solid #a9987040;border-radius:7px;background:linear-gradient(110deg,#172a36d9,#101d28bd);box-shadow:0 4px 18px #0002;font-size:clamp(12px,1.3cqw,21px);letter-spacing:.04em;transition:border-color .2s,background .2s,box-shadow .2s}
.option:before,.option:after{display:none}.option:hover,.option:focus-visible{transform:none;outline:none;border-color:#dac394b0;background:linear-gradient(110deg,#33414be8,#1c303ee8);box-shadow:inset 3px 0 #d4bd8b,0 0 16px #c9b07012}.option:active{background:#42515c}.option-key{border-right-color:#b3a27b2b;color:#d9c497}.option-end{opacity:.5}.option:hover .option-end{opacity:1}
.menu-button{border-radius:5px;transition:background .2s,color .2s}.menu-button:hover,.menu-button:focus-visible{outline:none;background:#bba57012;border-bottom-color:transparent;color:#f2dfb7}.home-actions .primary{border-radius:6px;box-shadow:0 5px 25px #0003}.archive-card,.spell-card{border-radius:9px;border-color:#a4916938}.archive-tabs button.active{color:#eddbb4}.letter-card{border-radius:12px}.toolbar .icon-button{background:#101c27b3;border-color:#b4a47a40;box-shadow:0 4px 14px #0002}.toolbar .icon-button:hover{background:#263a48d9;border-color:#cdb98c99}
@keyframes guide-breathe{0%,100%{opacity:.4}50%{opacity:1;filter:drop-shadow(0 0 4px #e3cd92)}}
@media(max-width:700px){#qte .qte-target{right:4%;bottom:16%;width:34%;padding:1.3cqw 1.5cqw;gap:.5cqw;border-radius:8px}#qte .qte-visual{height:12cqw}#qte .qte-hint{font-size:10px;line-height:1.45;min-height:2.9em}#qte .qte-label{font-size:10px}#qte strong{font-size:14px}#qte .qte-assist{font-size:10px;min-height:24px;padding:2px 10px}#qte[data-direction=right] .qte-target{width:64%;bottom:16%;padding:1.5cqw 2cqw}#qte[data-direction=right] .qte-visual{height:9cqw}#qte[data-direction=right] .qte-hint{min-height:0}#river-qte .river-card{width:68%;bottom:17%;padding:1.4cqw 2.5cqw}#river-qte .river-track{height:8cqw}.choice-panel{width:86%;bottom:9%}.option{min-height:8cqw;padding:1.2cqw 1.4cqw;font-size:12px}.choice-panel h2{font-size:17px;margin-bottom:2cqw}.options{gap:1.5cqw}.river-head{font-size:10px}}
@media(prefers-reduced-motion:reduce){#qte[data-phase=ready] .gesture-chevron{animation:none}.option{transition:none}}

#qte .qte-visual{height:17cqw}#qte[data-direction=right] .qte-visual{height:12cqw}@media(max-width:700px){#qte .qte-visual{height:17cqw}#qte[data-direction=right] .qte-visual{height:14cqw}}
/* Minimal in-scene gesture prompts. */
#qte .qte-target,#qte[data-direction=right] .qte-target{background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;padding:0;gap:.55cqw;filter:drop-shadow(0 2px 5px #000c)}
#qte .qte-target{right:6%;bottom:19%;width:23%}#qte .qte-shade{background:linear-gradient(90deg,transparent 58%,#04101b36)}
#qte .qte-topline{display:none}#qte .qte-hint{display:none}#qte .qte-assist{display:none}#qte[data-direction=hold] .qte-assist{display:block;border-radius:30px;min-height:34px;padding:.6cqw 2cqw;background:#101c28b3}
#qte .qte-visual{height:18cqw}#qte strong{font-size:clamp(14px,1.5cqw,24px);letter-spacing:.08em;text-shadow:0 2px 8px #000;line-height:1.5}
#qte .qte-timer{width:45%;height:2px;opacity:.7;margin-top:.5cqw}
#qte[data-direction=right] .qte-target{left:50%;right:auto;bottom:20%;width:44%}#qte[data-direction=right] .qte-visual{height:12cqw;order:1}#qte[data-direction=right] strong{order:0}#qte[data-direction=right] .qte-timer{order:2;width:50%}
#qte[data-phase=success] .qte-target{border:0;box-shadow:none}#qte[data-direction=right] .qte-shade{background:linear-gradient(0deg,#03101b50,transparent 50%)}
.armor-outline,.armor-seam,.gesture-sparks,.rune-faint{opacity:.35}.gesture-rail{stroke:#e1cfa277;stroke-width:1.5;stroke-dasharray:none}.gesture-chevron{stroke:#fff0c7;stroke-width:2.4}.gesture-touch{stroke:#fff0c7;stroke-width:2}.gesture-goal{stroke:#e7d29c;stroke-width:1.5}
#river-qte .river-card{background:none;border:0;box-shadow:none;border-radius:0;backdrop-filter:none;padding:0;bottom:19%;width:46%;filter:drop-shadow(0 2px 5px #000c)}#river-qte .river-head,#river-qte .river-hint,#river-qte .river-steps{display:none}#river-qte .river-card strong{font-size:clamp(14px,1.5cqw,24px);margin:0;letter-spacing:.08em}#river-qte .river-timer{width:45%;height:2px;opacity:.7}#river-qte .river-track{height:8cqw}
@media(max-width:700px){#qte .qte-target{right:5%;bottom:19%;width:25%}#qte .qte-visual{height:21cqw}#qte strong{font-size:14px}#qte[data-direction=right] .qte-target{width:55%;bottom:20%}#qte[data-direction=right] .qte-visual{height:15cqw}#river-qte .river-card{width:58%;bottom:19%}#river-qte .river-track{height:10cqw}}

#test-outcome{position:absolute;z-index:4;left:15%;right:15%;top:10%;padding:1cqw 1.8cqw;text-align:center;background:#08131dde;border:1px solid #b9a57945;border-radius:6px;pointer-events:none;color:#e4d8bc;box-shadow:0 5px 22px #0004}
#test-outcome span{font:clamp(10px,.9cqw,15px) system-ui,sans-serif;letter-spacing:.16em;color:#bba678}#test-outcome p{font:clamp(12px,1.35cqw,21px)/1.7 system-ui,sans-serif;margin:.55cqw 0 0}#failure-message{max-width:36em;line-height:1.8}
