.encounter{position:fixed;z-index:30;top:max(100px,14dvh);bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(620px,calc(100% - 28px));max-height:none;overflow-y:auto;overscroll-behavior:contain;padding:26px 24px 24px;background:rgba(15,27,39,.97);border:1px solid #9e8a5b;border-radius:24px;box-sizing:border-box;scrollbar-width:thin}.encounter[hidden]{display:none!important}.encounter h2{font-size:36px;line-height:1.15;margin:15px 0 12px}.encounter .close{position:absolute;right:18px;top:18px;width:44px;height:44px}.enc-category{display:inline-block;max-width:calc(100% - 54px);background:#efdab0;color:#20252a;border-radius:10px;padding:8px 12px;font-weight:700;font-size:14px}.enc-speaker{color:#ecd5a5;font-weight:650;font-size:15px;margin:0 0 16px}.enc-text{font-size:clamp(19px,3vw,24px);line-height:1.5;margin:14px 0 20px}.enc-choice{font-size:15px;color:#c7d3df;border-left:2px solid #c2ab73;padding-left:12px}.enc-options{display:grid;gap:10px;margin-top:10px}.enc-options button{width:100%;text-align:left;font-size:17px;line-height:1.4;padding:15px 16px;border:1px solid #6f8192;border-radius:14px;background:#1e3446;color:#fff}.enc-options button:hover,.enc-options button:focus-visible{border-color:#f0d293;background:#2b465b}.enc-listen{display:flex;gap:10px;align-items:center;justify-content:center;width:100%;background:#165449;border:1px solid #64aa95;border-radius:14px;color:#fff;font-weight:600;padding:13px;font-size:18px}.enc-listen svg{width:20px;height:20px;fill:currentColor}.enc-listen.playing{background:#194a43}.enc-audio-note{font-size:13px;line-height:1.4;color:#aebfcd}.enc-next{margin-top:16px;display:flex;align-items:center;justify-content:center;gap:14px;width:100%}.enc-arrow{width:34px;height:34px;stroke:currentColor;stroke-width:2;fill:none;flex-shrink:0}.hotspot{font-size:16px!important;padding:10px 16px!important;white-space:nowrap}.hotspot:after{height:12px!important}.subtle{font-size:14px}.encounter button:focus-visible{outline:3px solid #f1d39a;outline-offset:3px}@media(max-height:650px){.encounter{top:80px;padding:18px}.encounter h2{font-size:28px}.enc-text{font-size:18px;margin:10px 0}.enc-options button{padding:10px}.enc-category{font-size:12px}}
.encounter .close{margin:0;transform:none;display:flex;align-items:center;justify-content:center;padding:0;line-height:1}.enc-reaction{color:#dfc990;font-size:17px;line-height:1.45}.encounter:focus{outline:none}

.enc-progress{display:block;width:100%;height:6px;accent-color:#efdab0;margin:0 0 18px}.enc-thought-intro{color:#efdab0;font-size:18px;line-height:1.4}

/* Persistent numbers and accessible controls in both scenes. */
.hotspot b,.hotspot.seen b{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;line-height:1;margin-right:8px;background:#e6c477;color:#17212b;border-radius:50%;font-size:15px}
#controls{width:min(700px,calc(100% - 20px))}
#controls .toolbar{display:flex;flex-wrap:nowrap;gap:6px;align-items:stretch}
#controls .toolbar button{min-width:0;min-height:48px;flex:1;padding:10px 6px;font-size:clamp(11px,2.9vw,16px);line-height:1.15}
#controls .toolbar #center{flex:0 0 48px;font-size:26px;padding:0}
.enc-arrow{width:48px;height:48px}.enc-next{min-height:60px}

/* Office v25: a separate persistent back control, never layered over Continue. */
.enc-back{position:sticky;top:0;z-index:3;display:block;min-height:48px;max-width:calc(100% - 58px);width:auto;margin:0 0 18px;background:#21394b;border:1px solid #a6bdc9;padding:12px 18px;text-align:left}.enc-back::before{content:"←";margin-right:10px}.enc-section-title{font-size:21px;color:#efdab0;line-height:1.35;margin:26px 0 8px}.enc-guest-label{font-size:15px;color:#bfd4da;margin:0}.encounter .enc-next{position:static;margin-top:20px}.encounter .enc-back:focus-visible{outline-offset:-4px}

/* v26 seek controls and clear play/pause colours. */
.audio-seek{display:block;width:100%;height:32px;margin:8px 0 0;accent-color:#e8c984;cursor:pointer;touch-action:pan-y}.audio-time{font-size:13px;color:#d3dce3;text-align:right;margin:0 0 8px;font-variant-numeric:tabular-nums}.enc-listen.playing,#introAudioToggle.playing{background:#983e40;border-color:#ef999c}.enc-listen:not(.playing),#introAudioToggle:not(.playing){background:#165449;border-color:#64aa95}#introPlayer{margin-bottom:20px}#introPlayer .audio-toggle{width:100%}.entry-note p{margin:0}.entry-note #demoNote{margin-top:10px;font-size:16px;color:#f0dcac}

/* Completion stays visible while preserving each guest's number. */
.hotspot.seen b::after{content:'✓';position:absolute;top:-5px;right:-5px;width:17px;height:17px;line-height:17px;border-radius:50%;background:#bce1ce;color:#132b24;font-size:12px}.hotspot b{position:relative}

/* Persistent encounter audio and navigation. */
.encounter .enc-toolbar{position:sticky;top:-26px;z-index:10;background:#111f2b;padding:16px 0 8px;margin:-16px 0 22px;box-shadow:0 8px 12px #111f2b}
.enc-toolbar-row{display:flex;align-items:center;gap:8px}
.encounter .enc-toolbar .enc-back,.encounter .enc-toolbar .enc-listen{position:static;flex:1;min-width:0;max-width:none;width:auto;margin:0;padding:10px 8px;min-height:46px;font-size:14px;justify-content:center;white-space:nowrap}
.encounter .enc-toolbar .close{position:static;flex:0 0 42px;width:42px;height:42px;margin:0;transform:none;font-size:30px}
.encounter .enc-toolbar .enc-listen svg{width:17px;height:17px}.enc-toolbar .audio-time{margin-bottom:0}.enc-toolbar .audio-seek{margin-top:8px}
.enc-milestones{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:0 0 22px}
.enc-milestone{font-size:11px;text-align:center;color:#bbc6ce;border-top:4px solid #46515a;padding-top:7px;white-space:nowrap}.enc-milestone.reached{border-color:#efdab0;color:#efdab0}.enc-milestone[aria-current]{font-weight:bold;color:#fff}
@media(max-width:600px){.encounter .enc-toolbar{top:-22px}.encounter .enc-toolbar .enc-back::before{margin-right:4px}.encounter .enc-toolbar .enc-back,.encounter .enc-toolbar .enc-listen{font-size:12px;padding:9px 5px}.enc-milestone{font-size:10px}}

/* Keep the entire control row inside the scroll viewport on all sizes. */
.encounter .enc-toolbar{top:-26px}
.enc-category{max-width:100%;box-sizing:border-box;margin-bottom:4px}
@media(max-height:650px){.encounter .enc-toolbar{top:-18px}}
@media(max-width:380px){.encounter .enc-toolbar .enc-back{white-space:normal}.enc-milestone{white-space:normal}}

/* v32: transport is outside scrolling panels and always above their content. */
#persistentTransport{position:fixed;z-index:100;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(620px,calc(100% - 24px));display:flex;gap:8px;padding:10px;background:#111f2b;border:1px solid #9e8a5b;border-radius:16px;box-sizing:border-box;box-shadow:0 6px 22px #0008}
#persistentTransport[hidden],#centralChoice[hidden]{display:none!important}
#persistentTransport button{flex:1;min-width:0;min-height:46px;padding:9px 6px;font-size:14px;border-radius:10px;background:#21394b;color:white;border:1px solid #8eabb8}
#persistentTransport button:nth-child(2){background:#165449}#persistentTransport button.playing{background:#983e40}#persistentTransport button:last-child{flex:0 0 44px;font-size:30px;padding:0;background:#fff;color:#152432}
.has-fixed-transport .enc-toolbar-row{display:none!important}
.has-fixed-transport .enc-toolbar{position:static;padding:0;margin:0 0 12px;box-shadow:none}
.has-fixed-transport{scroll-padding-top:20px}
#centralChoice{position:fixed;z-index:40;left:50%;top:50%;transform:translate(-50%,-50%);width:min(440px,calc(100% - 40px));min-height:88px;padding:24px;font-size:clamp(24px,6vw,32px);font-weight:750;border:2px solid #ffe3a0;border-radius:20px;background:#efd49a;color:#17212b;box-shadow:0 12px 55px #000b}
@media(max-width:600px){.has-fixed-transport.panel{top:max(94px,calc(env(safe-area-inset-top) + 86px));max-height:calc(100dvh - 112px)}#persistentTransport button{font-size:12px}}

/* Standalone transport buttons, without a surrounding card. */
#persistentTransport{display:block;background:none;border:0;box-shadow:none;padding:0}.transport-row{display:flex;align-items:center;gap:8px}
#persistentTransport button{border-radius:100px;box-shadow:0 2px 8px #0004}#persistentTransport .transport-row button:nth-child(2){background:#168342;border-color:#73d89b;display:flex;align-items:center;justify-content:center;gap:8px}#persistentTransport .transport-row button.playing{background:#c52f3e;border-color:#ff8e98}#persistentTransport button svg{width:20px;height:20px;fill:currentColor}#persistentTransport .audio-seek{margin:4px 0 0}#persistentTransport.intro-transport .transport-row button{flex:1;max-width:none}
.has-fixed-transport #introListen,.has-fixed-transport #introAudioToggle,.has-fixed-transport #introSeek,.has-fixed-transport #introPlayer .audio-time,.has-fixed-transport .enc-toolbar{display:none!important}
@media(max-width:600px){.has-fixed-transport.panel{top:max(112px,calc(env(safe-area-inset-top) + 104px));max-height:calc(100dvh - 130px)}}

/* v35: progress, steps, then transport. */
#persistentTransport.encounter-transport{background:#111f2bf2;padding:10px 12px;border-radius:16px}
#persistentTransport .enc-progress{margin:0 0 9px;height:6px}#persistentTransport .enc-milestones{margin:0 0 12px}#persistentTransport .enc-milestone{border:0;padding:0}
.encounter.has-fixed-transport{top:max(172px,calc(env(safe-area-inset-top) + 164px));max-height:calc(100dvh - 190px)}
#encSummary p{font-size:clamp(16px,3vw,20px);line-height:1.45;margin:14px 0}#encSummary h2{font-size:28px}#encSummary .primary{margin-top:20px}
@media(max-height:550px){#persistentTransport.encounter-transport{padding:5px 10px}#persistentTransport .enc-milestones{margin-bottom:6px}.encounter.has-fixed-transport{top:145px;max-height:calc(100dvh - 155px)}}

/* Keep Continue reachable while long feedback scrolls, in both scenes. */
.encounter .enc-next{position:sticky;bottom:-24px;z-index:11;margin-top:20px;margin-bottom:0;box-shadow:0 -12px 18px rgba(15,27,39,.97);flex-shrink:0}
@media(max-height:650px){.encounter .enc-next{bottom:-18px}}

/* Mobile review: preserve the person above the scrollable lower half. */
#persistentTransport.intro-transport{top:max(82px,calc(env(safe-area-inset-top) + 66px));width:150px;left:20px;transform:none}
#persistentTransport.intro-transport button{min-height:42px;padding:8px 14px}
#language{position:relative;z-index:110}
.encounter.has-fixed-transport{top:50dvh;bottom:max(10px,env(safe-area-inset-bottom));max-height:none;padding:18px 20px;overflow-y:scroll;scrollbar-width:auto;scrollbar-color:#efd49a #24394a;scrollbar-gutter:stable}
.encounter::-webkit-scrollbar{width:10px}.encounter::-webkit-scrollbar-track{background:#24394a}.encounter::-webkit-scrollbar-thumb{background:#efd49a;border-radius:8px}
.encounter .enc-next{width:auto;min-width:125px;min-height:44px;padding:8px 18px;margin-left:auto;bottom:-18px;font-size:16px;gap:10px}
.encounter .enc-arrow{width:26px;height:26px}.encounter h2{font-size:27px;margin:8px 0}.encounter .enc-choice{font-size:18px;color:#fff;margin-top:8px}.encounter .enc-reaction{margin-bottom:22px}
@media(max-width:600px){#persistentTransport.encounter-transport{top:max(76px,calc(env(safe-area-inset-top) + 60px));padding:7px 10px}.encounter.has-fixed-transport{top:50dvh;max-height:none}.encounter .enc-text{font-size:18px}}
/* Keep playback controls below the face, inside the lower-half panel. */
#persistentTransport.encounter-transport{top:calc(50dvh + 8px);width:min(580px,calc(100% - 64px));padding:6px 8px}
.encounter.has-fixed-transport{padding-top:146px;scroll-padding-top:146px}
@media(max-width:600px){#persistentTransport.encounter-transport{top:calc(50dvh + 8px)}.encounter.has-fixed-transport{padding-top:142px}}

/* v40 birthday: fixed header/footer, independently scrolling text. */
.encounter,.encounter.has-fixed-transport{top:28dvh;bottom:max(10px,env(safe-area-inset-bottom));max-height:none;padding:0;display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:auto;scroll-padding:0}
.encounter .enc-toolbar,.encounter.has-fixed-transport .enc-toolbar{display:block!important;position:relative;top:auto;flex:none;padding:12px 16px 10px;margin:0;box-shadow:none;background:#111f2b;z-index:2}
.encounter .enc-toolbar-row{display:flex!important;gap:8px}
.encounter .enc-toolbar .enc-back,.encounter .enc-toolbar .enc-listen{min-height:44px;padding:6px 8px;font-size:13px;border-radius:30px}
.encounter .enc-toolbar .close{width:44px;height:44px;flex-basis:44px;font-size:28px}
.encounter .enc-listen:not(.playing){background:#168342}.encounter .enc-listen.playing{background:#c52f3e}
.encounter .enc-progress,.encounter .audio-seek,.encounter .audio-time{display:none!important}
.encounter .enc-milestones{margin:0 0 10px;gap:4px}
.encounter .enc-milestone{border:0;padding:0;font-size:11px;color:#aebbc5}
.encounter .enc-milestone[aria-current]{color:#efd49a;font-weight:750}
.enc-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:8px 18px 16px;scrollbar-width:thin;scrollbar-color:#efd49a #24394a}
.enc-footer{flex:none;display:flex;justify-content:center;padding:8px 16px 12px;background:#111f2b}.enc-footer[hidden]{display:none}
.encounter .enc-next{position:static;width:48px;height:48px;min-width:48px;min-height:48px;padding:8px;margin:0;border-radius:50%;background:#efd49a;color:#16354b;box-shadow:none}
.encounter .enc-arrow{width:32px;height:32px}
body:has(.encounter) #decision{position:fixed;top:max(16px,env(safe-area-inset-top));bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(620px,calc(100% - 28px));height:auto;max-height:none;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;z-index:120;margin:0;padding:22px}
#encSummary .primary{position:static;width:100%;margin:16px 0 0}#encSummary h2{margin-top:0}
@media(max-height:500px){.encounter,.encounter.has-fixed-transport{top:15dvh}.encounter .enc-toolbar{padding-top:6px}.enc-footer{padding:4px 12px}}

/* Birthday entry: centered playback above a bounded, scrollable card. */
:is(.birthday-scene,.office-scene) #persistentTransport.intro-transport{top:max(100px,calc(env(safe-area-inset-top) + 94px));left:50%;transform:translateX(-50%);width:150px}
:is(.birthday-scene,.office-scene) #persistentTransport.intro-transport .audio-seek{display:none!important}
:is(.birthday-scene,.office-scene) #intro,:is(.birthday-scene,.office-scene) #intro.has-fixed-transport{position:fixed;top:max(156px,calc(env(safe-area-inset-top) + 150px));bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);height:auto;max-height:none;min-height:0;display:flex;flex-direction:column;overflow:hidden}
:is(.birthday-scene,.office-scene) #intro .intro-copy{flex:1 1 0;min-height:0;overflow-y:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-width:auto;scrollbar-color:#efd49a #24394a}
:is(.birthday-scene,.office-scene) #intro .intro-copy::-webkit-scrollbar{width:6px}
:is(.birthday-scene,.office-scene) #intro .intro-copy::-webkit-scrollbar-thumb{background:#efd49a;border-radius:6px}
@media(max-height:500px){:is(.birthday-scene,.office-scene) #intro .intro-controls #demoNote{font-size:12px;margin:4px 0 0}:is(.birthday-scene,.office-scene) #intro .intro-controls .drag-entry{min-height:30px;padding:4px}:is(.birthday-scene,.office-scene) #intro{gap:6px;padding:12px 18px}}

:is(.birthday-scene,.office-scene) #introTag{font-family:inherit;font-size:17px;font-weight:400;line-height:1.55;letter-spacing:normal;color:var(--gold);text-transform:none}

/* v42: content-sized birthday cards with one continuous background. */
.encounter,.encounter.has-fixed-transport{top:auto;bottom:max(12px,env(safe-area-inset-bottom));height:auto;max-height:72dvh;background:#101e2b}
.encounter .enc-toolbar,.encounter .enc-footer{background:transparent}
.encounter .enc-toolbar{padding:18px 16px 12px}
.encounter .enc-milestones{margin:0 0 18px;gap:8px}
.encounter .enc-milestone{font-size:clamp(12px,3.2vw,14px);line-height:1.4}
.encounter .enc-body{flex:0 1 auto;min-height:0;padding-top:4px}
.encounter .enc-footer{padding:8px 16px 16px}
.encounter .enc-next{width:auto;max-width:100%;height:auto;min-width:130px;min-height:46px;padding:9px 20px;gap:10px;border-radius:26px;font-size:16px}
.encounter .enc-arrow{width:28px;height:28px}
@media(max-height:500px){.encounter,.encounter.has-fixed-transport{top:auto;max-height:85dvh}.encounter .enc-toolbar{padding:10px 14px}.encounter .enc-milestones{margin-bottom:12px}}

/* Explicitly confirm an answer before feedback: no inferred or default choice. */
.enc-options button[aria-pressed="true"]{background:#34516a;border:2px solid #efd49a;box-shadow:inset 4px 0 #efd49a}
/* The closing shot uses the continuous centre of the room, away from the panorama join. */
body.birthday-closing{min-height:100dvh;background:#101c28 url('/verjaardag/birthday-room-v24.png') center center / cover no-repeat}
body.birthday-closing #scene,body.birthday-closing #sceneCPU{visibility:hidden}
body.birthday-closing .hotspot,body.birthday-closing #compass{visibility:hidden}
#encSummary>.enc-listen{margin:18px 0 12px}

/* v45: visible, wider indicators at the outer edge of every scrolling panel. */
.intro,.intro-copy,.encounter,.enc-body,.dialog,.decision,.perspective-copy,#perspective,#sensorHelp{scrollbar-width:none!important}
.intro::-webkit-scrollbar,.intro-copy::-webkit-scrollbar,.encounter::-webkit-scrollbar,.enc-body::-webkit-scrollbar,.dialog::-webkit-scrollbar,.decision::-webkit-scrollbar,.perspective-copy::-webkit-scrollbar,#perspective::-webkit-scrollbar,#sensorHelp::-webkit-scrollbar{display:none}
.intro-copy{margin-right:-14px;padding-right:22px!important}
.enc-body{padding-right:26px}
.visible-scroll-track{position:fixed;width:10px;border-radius:8px;background:#24394a;box-shadow:0 0 0 1px #eed09a55;z-index:200;pointer-events:auto;touch-action:none;cursor:pointer}
.visible-scroll-track i{display:block;width:10px;border-radius:8px;background:#efd49a;min-height:0}
.visible-scroll-track[hidden]{display:none!important}

#encSummary .enc-listen{background:#21834e!important;border:2px solid #64c58e!important;color:white}#encSummary .enc-listen.playing{background:#b1323a!important;border-color:#e07b82!important}.enc-choice-feedback{font-size:18px;line-height:1.5;color:#f1d49b}

/* Center the home audio button in both scenes. */
#persistentTransport.intro-transport{left:50%;transform:translateX(-50%)}

#intro #persistentTransport.intro-transport {
  position:static; inset:auto; transform:none; width:min(100%, 250px);
  margin:18px auto; padding:0;
}
#intro #persistentTransport.intro-transport .transport-row button:nth-child(2) {
  min-height:54px; font-size:18px; font-weight:700;
}

/* Leave the lower-left back target clear on every wrapped line of the intro note. */
#intro #demoNote {
  box-sizing: border-box;
  padding-inline-start: calc(max(10px, env(safe-area-inset-left, 0px)) + 44px + 8px);
  overflow-wrap: break-word;
}

@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  body #intro.panel .intro-controls {
    margin-bottom: clamp(52px, 8dvh, 82px);
  }
}
body :is(#scene-exit, #roomExit, #roomBack, button.close, #persistentTransport .transport-row button:last-child) {
  color: #183246 !important;
  background-color: #bfd8ef !important;
}

@media(max-width:700px){
 body .topline{right:calc(env(safe-area-inset-right) + 64px)!important}
 body #toast{box-sizing:border-box;left:calc(env(safe-area-inset-left) + 68px)!important;right:14px!important;width:auto!important;transform:none!important;padding:9px 13px;bottom:calc(env(safe-area-inset-bottom) + 8px)!important}
 body #scene-back{bottom:max(3px,env(safe-area-inset-bottom))!important}
 #intro:not([hidden]){display:flex;flex-direction:column;max-height:calc(100dvh - 110px);overflow:hidden}
 #intro .intro-copy{min-height:0;overflow-y:auto}
 #intro .intro-controls{flex:none}
}

html:root body :is(.korys-home-return,.korys-home-close,.moment-nav,.home-back,.back-link,.lesson-close,.scene-close,.pov-reflect-back,#scene-back,#scene-exit,#roomBack,#roomExit,[aria-label="Back"],[aria-label="Terug"],[aria-label="Sluiten"],[aria-label="Close"]) {color:#fff!important;-webkit-text-fill-color:#fff!important}
html:root body :is(.korys-home-return,.korys-home-close,.moment-nav,.home-back,.back-link,.lesson-close,.scene-close,.pov-reflect-back,#scene-back,#scene-exit,#roomBack,#roomExit,[aria-label="Back"],[aria-label="Terug"],[aria-label="Sluiten"],[aria-label="Close"]) svg path[stroke],html:root body :is(.korys-home-return,.korys-home-close,.moment-nav,.home-back,.back-link,.lesson-close,.scene-close,.pov-reflect-back,#scene-back,#scene-exit,#roomBack,#roomExit,[aria-label="Back"],[aria-label="Terug"],[aria-label="Sluiten"],[aria-label="Close"]) svg[stroke] path {stroke:#fff!important}
