/* V9 · A scene always fills the screen; every tool is an optional overlay. */
:root{color-scheme:dark;--glass:rgba(13,17,15,.77)}
html,body,#experience{width:100%;height:100%;min-height:100dvh;background:#101411}
body #viewport,body[data-mode]:not(.intro) #viewport,body.clean[data-mode]:not(.intro) #viewport{inset:0;height:auto;min-height:0;max-height:none;border:0;border-radius:0}
.scene-film{object-fit:cover}
.chrome{align-items:center;padding:16px 40px}
.brand{padding:0;overflow:hidden;flex-shrink:0}
.brand-lockup,.closing-header img{width:128px;height:78px;object-fit:cover;object-position:center;filter:none;mix-blend-mode:screen}
body.intro #welcome{left:6%;right:6%;bottom:12%;max-width:1200px}
body.intro #welcome h1{font-size:clamp(60px,6.2vw,96px)!important}
body.intro #welcome p.welcome-lead{font-size:18px;margin-top:16px}
.mode-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:1180px;margin-top:30px}
.mode-card{display:flex;flex-direction:column;align-items:flex-start;min-height:208px;padding:23px 21px;border-radius:10px;background:rgba(10,16,12,.72);backdrop-filter:blur(16px);text-align:left;transition:background .2s,transform .2s,border-color .2s}
.mode-card:hover{transform:translateY(-4px);background:rgba(29,39,29,.92)}
.mode-number{width:100%;display:flex;justify-content:space-between;margin-bottom:15px;font-size:10px}
.mode-number svg{width:20px;height:20px}.mode-card strong{font-size:29px}.mode-card>span:not(.mode-number){font-size:12px;line-height:1.55;margin-top:10px}.mode-card em{margin-top:auto;padding-top:22px;font-size:9px}.mode-card em svg{width:16px}
.mode-card.featured{background:rgba(196,181,136,.92);color:#1c241b}.mode-card.featured:hover{background:#e1d7b9}
.entry-audio{margin-top:20px;gap:24px}.enter-music,.greeting-link{font-size:12px}.enter-music input{width:16px;height:16px}.intro .shade.bottom{height:88%;background:linear-gradient(transparent,rgba(7,14,9,.45) 30%,rgba(7,14,9,.93))}
#introCaption{left:6%;bottom:24px}#introCaption small{font-size:10px}#introCaption span{font-size:8px}
#modeDock,body[data-mode=cinema]:not(.intro) #modeDock{top:118px;left:40px}
#modeDock select{min-height:40px;font-size:12px}#modeDescription{font-size:11px;max-width:280px}
.icon-button,.round{min-width:40px;min-height:40px}.pill{min-height:40px}.top-actions .icon-button{width:40px;height:40px}
#viewTools .icon-button{width:38px;height:38px}#viewTools{background:var(--glass);border:1px solid #dce5c829;border-radius:28px;backdrop-filter:blur(16px)}
#sceneFooter,body[data-mode=cinema]:not(.intro) #sceneFooter{left:40px;right:40px;bottom:100px}
#tourBar{left:40px;right:40px;bottom:29px;gap:12px}#filmTime{font-size:11px;white-space:nowrap}#tourBar button{flex-shrink:0}#sceneTitle{font-size:clamp(27px,3vw,40px)}
body[data-mode=free]:not(.intro) #gestureHint{top:176px;font-size:10px}#ritualNote{top:194px}
body[data-mode=narrated] #viewTools,body[data-mode=narrated] #gestureHint,body[data-mode=narrated] #ritualNote{display:none}
body[data-mode=narrated] #filmClean{display:flex}
body[data-mode=narrated] #sceneFooter .scene-actions{display:none}
body[data-mode=narrated] #sceneMediaState{display:none}
#narratedCaption{position:absolute;z-index:4;left:50%;bottom:220px;transform:translateX(-50%);width:min(720px,82%);text-align:center;pointer-events:none;text-shadow:0 2px 14px #000}
#narratedCaption .overline{font-size:9px;letter-spacing:2.3px;color:#ddd4b7}
#narratedWords{font-size:clamp(16px,1.5vw,20px);line-height:1.7;margin:10px 0 0;background:rgba(6,11,7,.5);padding:15px 22px;border-radius:10px;backdrop-filter:blur(8px)}
#narratedSeek{min-width:40px;flex:1;max-width:none;accent-color:#d6c59b;height:28px;cursor:pointer}
#narratedSpeed{min-height:40px;padding:5px 8px;font-size:12px;background:var(--glass);color:#f2ecd9;border:1px solid #dce5c82c;border-radius:7px}
#narratedSeek[hidden],#narratedSpeed[hidden],#narratedCaption[hidden],#autoMeter[hidden]{display:none!important}
body.clean #narratedCaption{bottom:10%}.intro #narratedCaption{display:none}
body[data-mode=study]:not(.intro) #studyPanel{top:174px;bottom:108px;background:rgba(13,21,16,.88)}
#studyIntroduction{font-size:14px;line-height:1.75}#studyPanel .narration-transcript{margin:18px 0;font-size:13px;line-height:1.7}
body[data-mode=study]:not(.intro) #ritualNote{top:178px}
#studyTitle{font-size:34px}.study-focus p{font-size:13px}.study-object{font-size:13px}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #f1dcb2;outline-offset:5px}
#closingDialog{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;color:#f6f1e6;background:linear-gradient(90deg,rgba(6,13,9,.94),rgba(6,13,9,.73)),url('./escenas-v7/umbral.webp') center/cover;overflow-y:auto}
#closingDialog .closing-shell{min-height:100%;padding:25px 40px 36px;display:flex;flex-direction:column;align-items:center}
#closingDialog .closing-header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}.closing-header .close{position:static}
#closingDialog .closing-content{width:min(760px,100%);margin:auto;text-align:center;padding:20px 0 10px}
#closingDialog .overline{font-size:10px;letter-spacing:2.5px;color:#d5c198}
#closingDialog h2{font-size:clamp(42px,4.7vw,66px);font-weight:400;line-height:1.08;margin:19px 0 23px;letter-spacing:-1.4px}
#closingDialog .closing-intro{max-width:580px;font-size:16px;line-height:1.7;margin:0 auto;color:#d5d6c9}
#closingDialog blockquote{font-size:clamp(23px,2.1vw,30px);line-height:1.5;font-family:Georgia,serif;font-style:italic;margin:30px auto 0;max-width:660px;color:#f3e7ce}
#closingDialog #closingReference{margin:15px 0 0;font-size:11px;color:#d4c195}
#closingDialog #closingBody{margin:24px auto 14px;max-width:none;font-size:14px}
#closingDialog #closingListen{margin:0 auto;background:transparent;border:0;color:#dbccaa;font-size:12px}
#closingDialog .closing-actions{display:flex;justify-content:center;gap:12px;margin-top:27px}#closingDialog .closing-actions button{font-size:13px;min-height:48px}
#closingDialog .closing-context{display:inline-block;margin-top:24px;font-size:10px;color:#aeb7a9}
@media(max-width:1000px) and (min-width:701px){.mode-card{padding:18px 15px;min-height:200px}.mode-card strong{font-size:25px}.mode-card>span:not(.mode-number){font-size:11px}.mode-card br{display:none}#narratedCaption{bottom:210px}}
@media(max-width:700px){
 .chrome{padding:10px 18px}.brand-lockup,.closing-header img{width:96px;height:59px}.top-actions{gap:3px}.top-actions .icon-button,.top-actions .pill{width:36px;height:40px;min-width:36px;padding:8px}.top-actions svg{width:18px;height:18px}
 body.intro #welcome{left:22px;right:22px;bottom:max(80px,9dvh);top:auto}body.intro #welcome h1{font-size:clamp(42px,11vw,66px)!important;letter-spacing:-1.4px}body.intro #welcome .overline{font-size:8px;letter-spacing:1.4px;margin-bottom:12px}body.intro #welcome p.welcome-lead{font-size:14px;line-height:1.5;margin-top:14px}
 .mode-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:23px}.mode-card{display:flex;padding:15px;min-height:156px;border-radius:9px;gap:0}.mode-number{font-size:8px;margin-bottom:11px;justify-content:space-between}.mode-number span{display:block}.mode-number svg{width:17px;height:17px}.mode-card strong{font-size:25px}.mode-card>span:not(.mode-number){font-size:10px;margin-top:7px;line-height:1.5}.mode-card em{font-size:8px;align-self:auto;padding-top:13px;margin-top:auto;width:100%;justify-content:space-between}.mode-card em svg{width:14px}
 .entry-audio{gap:10px 17px;margin-top:17px}.enter-music{font-size:10px}.greeting-link{font-size:10px}.greeting-link svg{width:13px}.intro #introCaption{left:22px;bottom:20px}.intro #introCaption span{font-size:6px;letter-spacing:1.2px}.intro #introCaption small{font-size:9px}
 #modeDock,body[data-mode=cinema]:not(.intro) #modeDock,body[data-mode=study]:not(.intro) #modeDock{top:86px;left:18px;right:18px}#modeDescription{display:none}#modeDock select{font-size:11px;min-height:39px}
 #viewTools,body[data-mode=study]:not(.intro) #viewTools{right:12px;top:40%;padding:5px 2px}#viewTools .icon-button,body[data-mode=study]:not(.intro) #viewTools .icon-button{width:36px;height:36px;min-width:36px;min-height:36px}
 body[data-mode=free]:not(.intro) #gestureHint{top:138px;font-size:8px}#ritualNote{top:160px;font-size:8px}
 #sceneFooter,body[data-mode=cinema]:not(.intro) #sceneFooter{left:18px;right:18px;bottom:105px}.scene-meta h2,body[data-mode=cinema]:not(.intro) .scene-meta h2{font-size:27px}.scene-meta .overline{font-size:7px}.scene-verse{font-size:10px}.scene-actions .text-button{font-size:11px}.stepper{gap:8px}.stepper .round{width:42px;height:42px}
 #tourBar,body[data-mode=free]:not(.intro) #tourBar{left:16px;right:16px;bottom:27px;gap:7px}#tourBar .icon-button{width:36px;height:40px;min-width:36px;min-height:40px}#tourBar .pill{min-height:36px}#filmTime{font-size:9px}#narratedSpeed{font-size:10px;min-height:36px;width:53px;padding:4px}#narratedSeek{width:50px}body[data-mode=narrated] #filmTime{display:none}body[data-mode=narrated] #replayScene{display:none}
 #narratedCaption{width:calc(100% - 36px);bottom:220px}#narratedWords{font-size:15px;line-height:1.65;padding:13px 15px;margin-top:8px}#narratedCaption .overline{font-size:8px}
 body[data-mode=cinema]:not(.intro) #filmSubtitles{bottom:220px;font-size:16px}body[data-mode=study]:not(.intro) #studyPanel{top:auto;left:12px;right:12px;bottom:94px;max-height:42dvh;width:auto;padding:18px 20px;background:rgba(11,20,14,.91)}body[data-mode=study]:not(.intro) #sceneFooter{left:18px;right:18px;bottom:30px}body[data-mode=study]:not(.intro) #studyPanelToggle{display:flex}#studyTitle{font-size:30px}#studyIntroduction{font-size:13px}
 #closingDialog .closing-shell{padding:12px 22px 30px}#closingDialog .closing-content{padding-top:25px}#closingDialog h2{font-size:42px;margin:17px 0 20px}#closingDialog .overline{font-size:8px}#closingDialog .closing-intro{font-size:14px;line-height:1.65}#closingDialog blockquote{font-size:24px;line-height:1.45;margin-top:25px}#closingDialog #closingReference{font-size:9px}#closingDialog #closingBody{font-size:12px;margin-top:23px}#closingDialog .closing-actions{flex-direction:row;flex-wrap:wrap;gap:9px;margin-top:20px}#closingDialog .closing-actions button{font-size:11px;padding:12px 16px}#closingDialog .closing-context{font-size:9px;margin-top:20px}
}
@media(max-height:720px) and (max-width:700px){body.intro #welcome{bottom:62px}body.intro #welcome h1{font-size:42px!important}body.intro #welcome p.welcome-lead{font-size:12px;margin-top:8px}.mode-cards{margin-top:16px}.mode-card{min-height:128px;padding:11px 13px}.mode-number{margin-bottom:6px}.mode-card strong{font-size:23px}.mode-card>span:not(.mode-number){font-size:9px}.mode-card em{padding-top:9px}.entry-audio{margin-top:12px}.greeting-link{display:none}#narratedCaption{bottom:205px}#narratedWords{font-size:13px;line-height:1.55}}
@media(max-height:560px) and (min-width:701px){body.intro #welcome{bottom:48px}body.intro #welcome h1{font-size:48px!important}body.intro #welcome p.welcome-lead{font-size:13px;margin-top:8px}.mode-cards{margin-top:17px}.mode-card{min-height:145px;padding:12px 17px}.mode-number{margin-bottom:7px}.mode-card strong{font-size:24px}.mode-card>span:not(.mode-number){font-size:10px;margin-top:6px}.mode-card em{padding-top:10px}.entry-audio{margin-top:13px}#modeDock,body[data-mode=cinema]:not(.intro) #modeDock{top:90px}#narratedCaption{bottom:175px}#narratedWords{font-size:15px;line-height:1.55}.chrome{padding:8px 25px}.brand-lockup{width:96px;height:59px}#sceneFooter,body[data-mode=cinema]:not(.intro) #sceneFooter{bottom:70px}#tourBar{bottom:12px}}
@media(prefers-reduced-motion:reduce){.mode-card{transition:none}.mode-card:hover{transform:none}}
/* Use the approved wordmark itself as a luminance mask, preserving its lettering. */
.brand-lockup,.closing-header img{mask-image:url('./marca/logo-aprobado.png');mask-mode:luminance;mask-size:100% auto;mask-position:center;mask-repeat:no-repeat;mix-blend-mode:normal}
@media(max-width:700px){body[data-mode=narrated] #replayScene{display:flex}body[data-mode=narrated] #tourBar{gap:5px}body[data-mode=narrated] #tourBar .pill{font-size:9px;padding:6px}body[data-mode=narrated] #narratedSpeed{width:48px}body[data-mode=narrated] #filmClean{display:none}}
#closingDialog .closing-actions button{flex:none;width:auto;height:auto;min-height:48px;padding:14px 23px;white-space:nowrap}
