:root{font-family:"Segoe UI",Arial,sans-serif;color:#19231f;background:#14201f;--glass:#172321e8;--blue:#1769c2;--edge:clamp(12px,1.7vw,28px);--paper:#fbfaf6}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #73b5ff;outline-offset:2px}[hidden]{display:none!important}
main{position:relative;height:100vh;height:100dvh;overflow:hidden;isolation:isolate;background:#263633;touch-action:none;user-select:none}
#lens{position:absolute;inset:0;overflow:hidden;cursor:grab}#lens:active{cursor:grabbing}
#camera{position:absolute;top:50%;left:50%;width:0;height:0;transform-style:preserve-3d}
.face{position:absolute;left:-512px;top:-512px;width:1024px;height:1024px;backface-visibility:hidden;pointer-events:none}
main::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,#0c181d60,transparent 17%,transparent 71%,#0a151cab)}
.identity,.langs,.tools,.arrows,.caption,.narration-bar,#marker{position:absolute;z-index:2}
.identity{left:calc(var(--edge) + 57px);top:var(--edge);color:white;text-shadow:0 1px 5px #0a151c;pointer-events:none}
.identity small,.caption small{display:block;font-size:10px;font-weight:700;letter-spacing:.13em}
h1,h2{margin:0;font-family:"Times New Roman",serif;font-weight:400}
h1{font-size:clamp(23px,2.5vw,37px);line-height:1.12}.langs{top:var(--edge);right:var(--edge);display:flex;padding:3px;background:var(--glass);border:1px solid #ffffff40;border-radius:28px}
.langs button{border:none;color:white;font-weight:650;font-size:12px;background:none;border-radius:22px;padding:8px 14px}
.langs button[aria-pressed=true]{background:var(--blue)}
.tools{top:var(--edge);left:var(--edge);display:grid;gap:1px;border-radius:9px;overflow:hidden;box-shadow:0 3px 10px #0003}
.tools button{border:0;width:38px;height:37px;background:#fafbf7f5;color:#1a2424;font-size:22px}.tools button:hover{background:white}
.caption{left:var(--edge);bottom:84px;color:white;max-width:calc(100% - 300px);text-shadow:0 2px 5px #102025;pointer-events:none}
.caption h2{font-size:clamp(25px,3vw,43px);margin-top:4px}
.arrows{left:var(--edge);bottom:var(--edge);display:flex;align-items:center;gap:4px;background:var(--glass);border:1px solid #ffffff45;padding:4px;border-radius:12px;color:white}
.arrows button{color:inherit;background:none;border:0;height:38px;min-width:38px;font-size:21px;border-radius:8px}.arrows button:hover{background:#ffffff25}
#catalog{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:600;padding:0 12px}#catalog i{font-size:24px;font-style:normal}
#marker{background:none;border:0;color:white;transform:translate(-50%,-50%);padding:5px}
#marker b{display:grid;place-content:center;width:47px;height:47px;border-radius:50%;background:#12293978;border:2px solid white;box-shadow:0 0 0 5px #ffffff54,0 2px 10px #0005;transform:rotate(-90deg);font:700 23px Arial}
#marker span{position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);white-space:nowrap;background:#fffffff2;color:#124f87;font-size:13px;font-weight:700;border-radius:6px;padding:4px 10px;box-shadow:0 1px 6px #0003}
.narration-bar{bottom:var(--edge);right:var(--edge);background:var(--glass);border:1px solid #ffffff55;border-radius:13px;color:white;width:235px;padding:10px;touch-action:auto;box-shadow:0 3px 14px #0003}
.guide{position:absolute;bottom:100%;right:19px;width:auto;height:clamp(96px,18vh,160px);object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 3px #0004)}
.audio-actions,.timeline{display:flex;align-items:center;gap:6px}.audio-actions button{border:0;border-radius:18px;font-size:12px;font-weight:650;padding:8px 10px}.audio-actions #listen{flex:1;background:var(--blue);color:white}#read-script{background:#f4eee3;color:#262626}.timeline{margin-top:7px;gap:8px}.timeline input{width:0;flex:1;accent-color:#75b8ff}.timeline output{font-size:10px;font-variant-numeric:tabular-nums}
#status{position:absolute;z-index:4;left:50%;top:18%;transform:translateX(-50%);background:var(--glass);color:white;padding:8px 13px;border-radius:6px;font-size:13px}
dialog{width:min(590px,94vw);max-height:88dvh;color:#202825;border:1px solid #c7cec8;border-radius:14px;padding:22px;background:var(--paper)}
dialog::backdrop{background:#0e1e2499}.gallery-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.gallery-head h2{font-size:29px}.gallery-head button,.chapter button{border:1px solid #cbd0cb;background:white;color:#21302c;border-radius:50%;width:36px;height:36px;font-size:22px}
#gallery{margin:auto auto var(--edge) var(--edge);width:min(420px,94vw)}#search{width:100%;margin-top:12px;border-radius:8px;border:1px solid #c5cdc7;padding:11px;background:white}
#groups h3{font-size:13px;margin:16px 0 8px;color:#30584e}.grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.stop{display:flex;align-items:center;gap:7px;padding:4px;border:1px solid #d4d9d4;background:white;text-align:left;color:#17231e;border-radius:6px;min-width:0}.stop[aria-current=step]{border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}.stop img{width:52px;height:47px;object-fit:cover;border-radius:3px}.stop em,.stop strong{display:block;font-size:12px;line-height:1.25}.stop em{font-size:10px;color:#32616f;font-style:normal}
#narration-audio{width:100%;margin:14px 0 6px}.chapter{padding-left:12px;border-left:3px solid #d0d2c9}.chapter.selected{border-color:var(--blue)}.chapter h3{display:flex;gap:8px;align-items:center;margin-bottom:3px;font-size:16px}.chapter button{font-size:11px;width:30px;height:30px}.chapter p{line-height:1.55;margin:0 0 16px}.voice-credit,#empty{font-size:12px;color:#59605d}
@media(max-width:620px){.identity{left:64px;top:15px}.identity small{font-size:8px}.langs button{padding:7px 10px}.narration-bar{width:calc(100% - 2 * var(--edge));padding:8px 10px;display:flex;align-items:center;gap:7px}.audio-actions{flex:none}.timeline{flex:1;margin:0;min-width:0}.timeline output{font-size:9px}.guide{right:4px;height:108px}.arrows{bottom:72px}.caption{bottom:128px;max-width:calc(100% - 90px)}.caption small{font-size:9px}.tools button{width:36px;height:36px}.audio-actions button{padding:8px;font-size:11px}dialog{padding:14px}#gallery{margin:auto;width:min(420px,94vw)}}
@media(max-height:480px){.guide{height:73px}.caption{bottom:70px}.identity h1{font-size:22px}.tools button{height:30px}.caption h2{font-size:24px}}
#read-script[hidden]{display:none!important}
#switch-tour{font-size:13px;font-weight:600;padding:0 12px;border-left:1px solid #ffffff40;border-radius:0}
.tour-choices{display:grid;gap:10px;margin-top:18px}.tour-choices a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px;border:1px solid #c5cdc7;border-radius:8px;color:#174e67;text-decoration:none;background:white}.tour-choices a:hover,.tour-choices a[aria-current=page]{border-color:var(--blue);background:#eaf3fc}.tour-choices small{white-space:nowrap;font-weight:600}.tour-choices a:focus-visible{outline:3px solid #1769c2;outline-offset:2px}
/* Reserve space for language controls and keep long scene titles above navigation. */
.identity{right:calc(var(--edge) + 105px)}
.identity h1{overflow-wrap:break-word}
body:not(:has(.narration-bar)) .arrows{bottom:var(--edge)}
body:not(:has(.narration-bar)) .caption{bottom:calc(var(--edge) + 66px);max-width:calc(100% - 2 * var(--edge))}
@media(max-width:620px){
  #catalog{font-size:12px;padding:0 8px}#catalog i{display:none}#switch-tour{font-size:12px;padding:0 8px}.arrows{max-width:calc(100% - 2 * var(--edge));gap:2px}
  .identity{right:calc(var(--edge) + 94px)}
  .identity h1{font-size:clamp(18px,4.8vw,23px);line-height:1.15}
  .caption h2{font-size:clamp(22px,5vw,28px)}
  body:has(.narration-bar) .caption{bottom:128px}
}

.tour-home{position:absolute;z-index:8;top:16px;left:calc(var(--edge) + 57px);color:#fff;text-decoration:none;font:600 13px system-ui;background:#14201fcc;padding:9px 13px;border:1px solid #ffffff35;border-radius:24px}.tour-home:focus-visible{outline:3px solid #ebc878}.identity{top:65px}@media(max-width:640px){.tour-home{top:12px;left:calc(var(--edge) + 57px);padding:7px 10px}.identity{top:59px}}

.identity{right:var(--edge)}
