:root{color-scheme:dark;--panel:#171b18;--line:rgba(211,215,190,.22);--text:#f1eedf;--muted:#b5baa9;--amber:#e5ba72;--cyan:#a5dcdb;--safe-top:max(18px,env(safe-area-inset-top));--safe-bottom:max(18px,env(safe-area-inset-bottom))}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#10130f;font-family:Arial,Helvetica,sans-serif;touch-action:none;user-select:none}button,input,select{font:inherit}button,a,select,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--amber);outline-offset:4px}button:disabled{opacity:.45;cursor:wait}button,input,select{color:inherit}button{border-radius:0}button:active{transform:translateY(1px)}[hidden]{display:none!important}
canvas{position:fixed;inset:0;z-index:10;display:block;width:100%;height:100%;background:transparent;cursor:crosshair;outline:none;touch-action:none}.worldVignette{position:fixed;inset:0;z-index:15;pointer-events:none;box-shadow:inset 0 0 14vw rgba(9,13,11,.38)}
#experienceGate{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;padding:clamp(24px,7vw,110px);background:linear-gradient(90deg,rgba(7,13,11,.96) 0%,rgba(7,13,11,.79) 37%,rgba(7,13,11,.09) 100%),linear-gradient(0deg,rgba(8,13,10,.62),transparent 45%),url('../assets/intro/title_theater_v28.webp') center/cover;color:var(--text)}#experienceGate.hidden{display:none}.gateGrain{position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0,transparent 3px,rgba(0,0,0,.035) 4px);opacity:.45}.gateTop,.gateBottom{position:absolute;left:clamp(24px,7vw,110px);right:clamp(24px,7vw,110px);display:flex;justify-content:space-between;gap:16px;color:#bdc5b7;font-size:10px;font-weight:600;letter-spacing:.16em}.gateTop{top:var(--safe-top);padding-top:9px;border-top:1px solid var(--line)}.gateBottom{bottom:var(--safe-bottom);padding-bottom:9px;border-bottom:1px solid var(--line)}.experienceCard{position:relative;max-width:720px;width:100%;padding:40px 0}.experienceEyebrow{display:flex;align-items:center;gap:10px;margin-bottom:24px;color:var(--amber);font-size:10px;letter-spacing:.23em;font-weight:700}.experienceEyebrow i{width:6px;height:6px;background:var(--amber);border-radius:50%;box-shadow:0 0 14px #e5ba7260}h1{font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(46px,7vw,104px);line-height:.98;letter-spacing:-.045em;margin:0 0 26px}h1 em{font-style:normal;color:var(--amber)}.gateStory{font-family:Georgia,'Times New Roman',serif;font-size:clamp(17px,1.7vw,23px);line-height:1.55;margin:0 0 30px;color:#d7dacc}.experienceActions{display:flex;gap:12px;max-width:480px}.experienceBtn{min-height:48px;padding:14px 20px;border:1px solid var(--line);background:#e5ba720a;color:var(--text);font-size:12px;font-weight:600;letter-spacing:.03em;display:flex;align-items:center;justify-content:space-between;gap:24px;transition:background .2s}.experienceBtn.primary{background:var(--amber);border-color:var(--amber);color:#1b2019}.experienceBtn:hover{background:#ffffff18}.experienceBtn.primary:hover{background:#f1cf97}.experienceCard .gateNote{font-size:10px;line-height:1.6;color:#9ea895;max-width:390px;margin:16px 0 0}#loadStatus{font-size:10px;letter-spacing:.06em;margin-top:15px;color:var(--cyan)}
#visualNovel{position:fixed;inset:0;z-index:900;display:none;overflow:hidden;background:#10150f;color:var(--text)}#visualNovel.active{display:block}#novelImage{width:100%;height:100%;object-fit:cover;display:block}.novelShade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(3,8,6,.5),transparent 30%,rgba(4,10,7,.84) 100%)}.novelTopbar{position:absolute;left:clamp(20px,5vw,76px);right:clamp(20px,5vw,76px);top:var(--safe-top);display:flex;justify-content:space-between;align-items:center;gap:15px;color:#d8ddcf;font-size:10px;letter-spacing:.12em;font-weight:600}#novelCounter{margin-left:18px;color:var(--amber)}.textButton{border:0;background:transparent;color:var(--amber);min-height:40px;font-size:11px;padding:8px 0}.textButton:hover{color:#f5d3a0}.novelDialogue{position:absolute;left:clamp(20px,5vw,76px);right:clamp(20px,5vw,76px);bottom:clamp(24px,5vh,58px);padding:26px 0 0;border-top:1px solid #c3cbb44d;max-height:60%;overflow-y:auto;touch-action:pan-y}.chapterLabel{font-size:9px;color:var(--amber);letter-spacing:.17em;font-weight:700;display:block}#novelText{max-width:970px;margin:16px 0 0;font-family:Georgia,'Times New Roman',serif;font-size:clamp(17px,2.1vw,29px);line-height:1.55;white-space:pre-line}#novelNext{float:right;margin-top:16px;min-height:44px;border:0;background:transparent;color:var(--amber);font-size:12px;font-weight:600;letter-spacing:.05em}#novelNext span{font-size:25px;vertical-align:-2px;margin-left:12px}
#worldFlash{position:fixed;inset:0;z-index:850;display:grid;place-items:center;background:#e4e7d8;color:#3a463b;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 1.4s ease,visibility 1.4s}#worldFlash.active{opacity:1;visibility:visible;pointer-events:auto;transition:none}#worldFlashLabel{font-size:11px;letter-spacing:.2em;text-transform:uppercase}#activationVeil{position:fixed;inset:0;z-index:70;pointer-events:none;opacity:0;background:radial-gradient(circle at 50% 50%,rgba(50,170,255,.1),rgba(0,0,0,.85));transition:opacity .28s}#activationVeil.active{opacity:1}
#hud{position:fixed;left:max(24px,env(safe-area-inset-left));top:var(--safe-top);z-index:20;color:#dde3d5;font-size:10px;text-shadow:0 2px 8px #000;pointer-events:none}.hudArchive{display:block;font-family:Georgia,serif;letter-spacing:.16em;font-size:14px;margin-bottom:11px}.hudArchive span{font:8px Arial,sans-serif;letter-spacing:.12em;color:var(--amber);margin-left:12px}#hud p{margin:0;opacity:.65;font-size:10px}#hud p span{margin:0 4px}#objectiveHud{position:fixed;left:max(24px,env(safe-area-inset-left));bottom:var(--safe-bottom);z-index:20;display:flex;align-items:center;gap:12px;color:#e7e9db;text-shadow:0 2px 8px #000;pointer-events:none;max-width:360px;padding-bottom:8px}.objectiveMarker{width:7px;height:7px;border:1px solid var(--amber);transform:rotate(45deg)}#objectiveHud p{font-size:12px;line-height:1.5;margin:6px 0 0}.worldToolbar{position:fixed;right:max(24px,env(safe-area-inset-right));top:var(--safe-top);z-index:30;display:flex;gap:8px}.worldToolbar button{width:42px;height:42px;border:1px solid #d3d7be4d;background:#101a1599;color:var(--text);font-size:15px}.worldToolbar button:hover{background:#29362ccc}#hint{position:fixed;left:50%;bottom:24px;z-index:20;transform:translateX(-50%);color:#e0e6d6;font-size:12px;text-shadow:0 2px 8px #000;pointer-events:none;text-align:center;max-width:min(90%,640px);line-height:1.5}#centerDot{position:fixed;left:50%;top:50%;z-index:22;width:4px;height:4px;margin:-2px 0 0 -2px;border-radius:50%;background:#fff9;box-shadow:0 0 7px #fff5;pointer-events:none;transition:transform .15s,background .15s,box-shadow .15s}#centerDot.discoverable{transform:scale(2);background:var(--amber);box-shadow:0 0 14px #e5ba7299}
#mobileControls{position:fixed;inset:0;z-index:25;pointer-events:none;display:none}#stick{position:absolute;left:max(24px,env(safe-area-inset-left));bottom:var(--safe-bottom);width:112px;height:112px;border-radius:50%;background:#151f1760;border:1px solid #e2e7d14d;pointer-events:auto;touch-action:none}#stick:before{content:'';position:absolute;inset:12px;border:1px solid #e2e7d11a;border-radius:50%}#knob{position:absolute;left:36px;top:36px;width:40px;height:40px;border-radius:50%;background:#e3e5daba;box-shadow:0 2px 16px #0005}.mobileActions{position:absolute;right:max(20px,env(safe-area-inset-right));bottom:var(--safe-bottom);display:flex;gap:10px;align-items:flex-end}.mobileActions button{width:72px;height:72px;border:1px solid #e2e7d14d;background:#15221b85;color:#f0f1e5;font-size:10px;font-weight:600;pointer-events:auto;border-radius:50%;touch-action:none}.mobileActions button span{display:block;font-size:15px;margin-top:6px;opacity:.65}.mobileActions #interactBtn{width:82px;height:82px;border-color:#e5ba7299;color:var(--amber)}.mobileActions #interactBtn:disabled{opacity:.3;cursor:default}
#stageVideoWrap{position:fixed;left:0;top:0;width:960px;height:540px;z-index:8;overflow:hidden;transform-origin:0 0;opacity:0;visibility:hidden;pointer-events:none;background:black}#stageVideoWrap.visible{opacity:1;visibility:visible}#stageVideo{width:960px;height:540px;border:0;display:block;pointer-events:none}#stageZoneNotice{position:fixed;left:50%;top:67%;z-index:45;transform:translate(-50%,-50%);padding:12px 18px;border:1px solid #a5dcdb70;background:#101d19e6;color:var(--text);font-size:11px;opacity:0;visibility:hidden;pointer-events:none;cursor:pointer}#stageZoneNotice span{border:1px solid #a5dcdb4d;padding:2px 5px;margin-left:10px}#stageZoneNotice.active{opacity:1;visibility:visible;pointer-events:auto}
#videoMenu{position:fixed;right:max(24px,env(safe-area-inset-right));top:50%;z-index:60;width:min(380px,calc(100vw - 32px));max-height:calc(100dvh - 36px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;transform:translateY(-50%) translateX(18px);padding:22px;border:1px solid #a5dcdb4d;background:#111a16f5;color:var(--text);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s,transform .18s,visibility .18s;box-shadow:0 20px 60px #0005}#videoMenu.active{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(-50%)}.panelHeading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.closeButton{width:36px;height:36px;font-size:25px;border:1px solid var(--line);background:transparent;color:var(--muted)}#videoMenu h2{font-family:Georgia,serif;font-size:30px;font-weight:400;margin:0 0 9px}#videoMenu p{margin:0 0 15px;color:var(--muted);font-size:11px;line-height:1.5}#videoList{display:grid;gap:6px;max-height:34vh;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;padding:3px}#videoList button{touch-action:pan-y}.videoChoice,.videoBtn{border:1px solid #d3d7be26;background:#eff2dc05;color:var(--text);cursor:pointer}.videoChoice{width:100%;padding:12px;text-align:left;font-size:12px}.videoChoice:hover{background:#eff2dc0d}.videoChoice.active{border-color:var(--amber);background:#e5ba7214}.videoChoice small{display:block;margin-top:4px;opacity:.4;font-size:9px}.videoButtons{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:15px}.videoBtn{min-height:42px;font-size:11px}#videoStatus{margin:12px 0;min-height:16px;font-size:11px;line-height:1.4;color:var(--cyan)}#videoMenu p.archiveHelp{font-size:10px;margin-bottom:6px}#externalVideoLink{display:inline-block;color:var(--amber);font-size:11px;min-height:32px;padding:8px 0;text-underline-offset:3px}
#pausePanel{position:fixed;inset:0;z-index:800;background:#060e0bc7;backdrop-filter:blur(7px);color:var(--text);display:grid;place-items:center;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:max(24px,env(safe-area-inset-top)) 24px max(24px,env(safe-area-inset-bottom))}.pauseCard{width:min(470px,100%);padding:24px 0}.pauseCard .experienceEyebrow{margin-bottom:18px}.pauseCard h2{font-family:Georgia,serif;font-weight:400;font-size:clamp(32px,5vw,52px);line-height:1.06;margin:0 0 28px}.pauseCard>.experienceBtn{width:100%}.settingsGroup{margin-top:22px;border-top:1px solid var(--line)}.settingsGroup label{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:60px;border-bottom:1px solid var(--line);font-size:12px}.settingsGroup select{max-width:150px;padding:9px;border:1px solid var(--line);background:#1c2920;border-radius:0;font-size:12px}.settingsGroup input[type=range]{width:105px;accent-color:var(--amber);touch-action:pan-x}.settingsGroup output{width:32px;font-size:10px;color:var(--amber)}.settingsGroup label:has(input[type=range]) span{flex:1}.settingsGroup input[type=checkbox]{accent-color:var(--amber);width:18px;height:18px}.pauseActions{display:flex;gap:20px;justify-content:space-between;margin-top:12px}.controlHelp{font-size:10px;color:var(--muted);line-height:1.9;margin-top:18px}.controlHelp b{font-weight:500;color:var(--text)}.controlHelp span{opacity:.75}#systemMessage{position:fixed;left:50%;top:17%;z-index:80;max-width:min(620px,90vw);transform:translate(-50%,-12px);padding:16px 22px;border-left:2px solid var(--cyan);background:#0c1915eb;color:var(--text);text-align:center;letter-spacing:.07em;font-size:11px;font-weight:600;line-height:1.6;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .25s,transform .25s,visibility .25s}#systemMessage.active{opacity:1;visibility:visible;transform:translate(-50%,0)}.noScript{position:fixed;inset:0;z-index:2000;padding:50px;background:#101710;color:var(--text)}
body[data-state=sound-gate] #hud,body[data-state=sound-gate] #hint,body[data-state=sound-gate] #objectiveHud,body[data-state=sound-gate] .worldToolbar,body[data-state=sound-gate] #mobileControls,body[data-state=prologue] #hud,body[data-state=prologue] #hint,body[data-state=prologue] #objectiveHud,body[data-state=prologue] .worldToolbar,body[data-state=prologue] #mobileControls,body[data-paused=true] #mobileControls,body[data-paused=true] #centerDot{visibility:hidden}
@media(pointer:coarse),(max-width:740px){#mobileControls{display:block}#hud p{display:none}#hud{left:20px;top:max(22px,env(safe-area-inset-top))}.hudArchive{font-size:12px}.hudArchive span{font-size:7px;margin-left:7px}#objectiveHud{left:20px;bottom:158px;max-width:230px}#objectiveHud p{font-size:10px}#hint{bottom:158px;max-width:85%;width:85%;font-size:11px}#objectiveHud:has(+ #hint:not(:empty)){bottom:194px}#videoMenu{right:16px;top:var(--safe-top);max-height:calc(100dvh - 36px);transform:translateX(18px)}#videoMenu.active{transform:translateX(0)}.worldToolbar{right:16px}.worldToolbar button{width:38px;height:38px}#stageZoneNotice{top:58%}}
@media(max-width:620px){#experienceGate{align-items:center;background-position:59% center;background-image:linear-gradient(90deg,rgba(7,13,11,.9),rgba(7,13,11,.35)),linear-gradient(0deg,rgba(7,13,11,.6),transparent),url('../assets/intro/title_theater_v28.webp')}.gateTop,.gateBottom{font-size:8px;letter-spacing:.1em}.gateTop span:first-child{max-width:210px;line-height:1.5}.gateBottom span:first-child{max-width:230px;line-height:1.5}.experienceCard{padding:45px 0 30px}.experienceEyebrow{font-size:9px;margin-bottom:22px}h1{font-size:clamp(43px,11.8vw,72px)}.experienceActions{flex-direction:column;max-width:340px;gap:9px}.experienceActions .experienceBtn{min-height:46px}.gateStory{font-size:17px;margin-bottom:25px}.gateNote{max-width:280px!important}.novelTopbar{font-size:8px}.novelTopbar .textButton{font-size:10px}#novelCounter{margin-left:7px}.novelDialogue{padding-top:18px;max-height:65%;bottom:max(20px,env(safe-area-inset-bottom))}#novelText{font-size:17px;line-height:1.5}#novelNext{margin-top:8px}#hud p{display:none}#objectiveHud{max-width:230px}#objectiveHud p{font-size:11px}#hint{bottom:88px;width:85%;font-size:11px}.settingsGroup label{font-size:11px}.settingsGroup input[type=range]{width:85px}.pauseActions{gap:12px}.pauseActions .textButton{font-size:10px}}
@media(max-height:600px) and (orientation:landscape){#experienceGate{align-items:center}.gateTop,.gateBottom{font-size:7px}.experienceCard{padding:35px 0 20px}h1{font-size:45px;margin-bottom:12px}.experienceEyebrow{margin-bottom:12px}.gateStory{font-size:14px;line-height:1.4;margin-bottom:16px}.experienceActions{flex-direction:row}.experienceBtn{padding:10px 16px;min-height:40px}.experienceCard .gateNote{margin-top:8px}#loadStatus{margin-top:5px}.novelDialogue{max-height:67%;padding-top:12px}#novelText{font-size:16px;line-height:1.4}#novelNext{margin-top:4px}#objectiveHud{bottom:145px}.pauseCard{padding:10px 0}.pauseCard h2{font-size:30px}.settingsGroup label{min-height:48px}#systemMessage{top:21%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}body[data-reduced-motion=true] *{transition:none!important;animation:none!important}

/* HUD rows have separate vertical bands; touch controls reserve their own space. */
#objectiveHud{bottom:var(--safe-bottom);width:min(360px,calc(100vw - 48px));max-width:none}
#hint{bottom:calc(var(--safe-bottom) + 82px);width:min(640px,calc(100vw - 48px));max-width:none;padding:8px 12px;background:rgba(10,20,15,.68);border:1px solid rgba(211,215,190,.12);line-height:1.5;font-size:11px;text-wrap:balance}
#hint:empty{display:none}
#worldFlash{padding:24px;background:#101912;color:var(--text)}
#worldFlashLabel{display:block;width:min(520px,100%);padding:30px 24px;border:1px solid var(--line);background:#19251bcf;text-align:center;line-height:1.9;letter-spacing:.08em;font-size:12px;text-transform:none;overflow-wrap:anywhere;box-shadow:0 24px 80px #0004}
#worldFlashLabel:before{content:'RECUPERANDO EL ARCHIVO';display:block;margin-bottom:18px;color:var(--amber);font-size:9px;font-weight:700;letter-spacing:.2em}
#worldFlashLabel .experienceBtn{margin:22px auto 0;justify-content:center;min-width:180px;background:var(--amber);border-color:var(--amber);color:#172017;letter-spacing:normal}
@media(pointer:coarse),(max-width:740px){
  #objectiveHud,#objectiveHud:has(+ #hint:not(:empty)){left:max(20px,env(safe-area-inset-left));bottom:calc(var(--safe-bottom) + 134px);width:min(360px,calc(100vw - 40px));max-width:none}
  #objectiveHud p{font-size:11px}
  #hint{bottom:calc(var(--safe-bottom) + 210px);width:min(580px,calc(100vw - 40px));font-size:10px;padding:7px 10px}
}
@media(pointer:coarse) and (orientation:landscape) and (max-height:600px), (max-width:740px) and (orientation:landscape) and (max-height:600px){
  #objectiveHud,#objectiveHud:has(+ #hint:not(:empty)){top:72px;bottom:auto;width:min(450px,calc(100vw - 48px));padding-bottom:0}
  #hint{bottom:calc(var(--safe-bottom) + 118px);width:min(500px,calc(100vw - 280px))}
  #stageZoneNotice{top:auto;bottom:calc(var(--safe-bottom) + 166px);transform:translateX(-50%);padding:10px 16px}
}
@media(pointer:fine) and (min-width:741px) and (max-height:600px){#stageZoneNotice{top:auto;bottom:calc(var(--safe-bottom) + 164px);transform:translateX(-50%)}}
