:root{color-scheme:dark;--ink:#f0f2df;--muted:#c0cfc3;--green:#c9e6b4;--panel:rgba(14,37,35,.92)}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#8bc4c6;color:var(--ink);font:15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:1px solid #ffffff26;background:#183e3bd9;border-radius:7px;padding:10px 15px;transition:background .15s,transform .15s}button:hover{background:#32615b}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #e1edb4;outline-offset:4px}button:active{transform:translateY(1px)}button.primary{background:var(--green);color:#183d33;border:0;display:flex;align-items:center;justify-content:space-between;width:100%;padding:15px 19px;font-weight:650}.primary:hover{background:#e2f5ce}#world,#world canvas,#shade{position:fixed;inset:0;width:100%;height:100%}#world canvas{display:block;touch-action:none}#shade{pointer-events:none;background:linear-gradient(180deg,#102d3444,transparent 22%,transparent 68%,#0a262344)}header{position:fixed;top:27px;left:32px;right:32px;display:flex;align-items:center;justify-content:space-between;gap:20px;pointer-events:none}header>*{pointer-events:auto}.brand{display:flex;gap:11px;align-items:center;text-shadow:0 2px 12px #102525}.brand .mark{font-size:38px;color:#d6efb8}.brand strong{font-size:21px;letter-spacing:5px;line-height:1.3}.brand div{display:flex;flex-direction:column}.brand div>span{font-size:10px;font-weight:650;letter-spacing:2.3px}.sky-clock{background:#173c3c8c;backdrop-filter:blur(15px);border:1px solid #ffffff22;border-radius:30px;padding:8px 17px;display:flex;align-items:center;gap:10px;font-size:14px}.sky-clock #sunIcon{color:#f7dfa1;font-size:20px}#dayLabel{color:#d3e1d3;border-left:1px solid #ffffff30;padding-left:10px}nav{display:flex;gap:8px}nav button{font-size:13px;backdrop-filter:blur(12px)}kbd{font:11px system-ui;border:1px solid #ffffff40;border-radius:3px;padding:2px 5px;white-space:nowrap}nav kbd{margin-left:10px;color:#c8dabf}.glass{background:linear-gradient(140deg,#123936e8,#183937bc);backdrop-filter:blur(18px);border:1px solid #e3f9e332;box-shadow:0 25px 80px #0a241b40;border-radius:12px}#welcome{position:fixed;left:7vw;top:50%;transform:translateY(-48%);width:380px;padding:32px}.eyebrow{font-size:10px;letter-spacing:2.1px;font-weight:650;color:#c3dda9}h1,h2{font-family:Georgia,'Times New Roman',serif;font-weight:400}h1{font-size:45px;line-height:1.08;letter-spacing:-1.5px;margin:21px 0}#welcome p{font-size:15px;color:#d0ddd0;margin:0 0 27px}.welcome-keys{display:flex;flex-wrap:wrap;gap:9px 15px;font-size:11px;margin-top:19px;color:#c7d7cb}.welcome-foot{border-top:1px solid #e0edd226;margin-top:27px;padding-top:17px;font-size:10px;color:#bbcfb9}.tiny-tree{font-size:19px;margin-right:7px}#location{position:fixed;bottom:34px;left:265px;pointer-events:none;text-shadow:0 2px 8px #102d24}#location h2{font-size:32px;line-height:1.15;margin:8px 0 4px}#location p{font-size:13px;color:#e0e8da;margin:0}#minimapWrap{position:fixed;left:32px;bottom:31px;width:198px;height:198px;border:1px solid #dcecc45c;border-radius:50%;background:#153b38;box-shadow:0 5px 30px #09251b44}#minimap{width:100%;height:100%;border-radius:50%;opacity:.92}.north{position:absolute;top:7px;left:92px;font-size:11px;color:#f2e3b7;font-weight:700}#expandMap{position:absolute;bottom:5px;right:4px;border-radius:50%;width:31px;height:31px;padding:0}.map-caption{position:absolute;bottom:-22px;width:100%;text-align:center;font-size:9px;letter-spacing:1.8px}#hint{position:fixed;right:32px;bottom:32px;font-size:11px;background:#153a3999;padding:10px 14px;border-radius:6px;color:#e0e6d5}#hint span{margin:0 7px}#crosshair{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);font:20px monospace;color:#ffffffe0;text-shadow:0 1px 3px #000}#prompt{position:fixed;left:50%;top:60%;transform:translateX(-50%);padding:10px 16px;border-radius:6px;background:#123834e8;font-size:14px}#prompt kbd{margin-right:10px}#toast{position:fixed;left:50%;top:110px;transform:translate(-50%,-15px);border-radius:7px;padding:12px 22px;background:#153b36ed;color:#e7eedb;opacity:0;pointer-events:none;transition:opacity .3s,transform .3s;font-size:14px}#toast.show{opacity:1;transform:translate(-50%,0)}.panel{position:fixed;right:24px;top:100px;bottom:24px;width:min(630px,calc(100vw - 48px));background:var(--panel);backdrop-filter:blur(24px);border:1px solid #dbecc331;border-radius:12px;padding:26px;box-shadow:0 20px 80px #061e2266;overflow:auto}.panel.small{width:400px;bottom:auto;max-height:calc(100vh - 125px)}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.panel h2{font-size:30px;line-height:1.15;margin:6px 0 22px}.close{padding:0;width:30px;height:30px;font:25px/1 system-ui;flex:none;border:0;background:transparent}.muted{font-size:12px;color:#bbcebf}.panel #bigmap{display:block;width:100%;border-radius:8px;background:#224e49}#destinations{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:17px}.destination{padding:11px 12px;display:flex;text-align:left;gap:10px;align-items:center;font-size:13px;background:#ffffff06}.destination>span:first-child{color:#e6d99d;font-size:20px}.destination small{display:block;color:#aebfaf;font-size:11px}.destination.visited{border-color:#a7c98666}.guide-foot{display:flex;justify-content:space-between;gap:15px;margin-top:20px;border-top:1px solid #ffffff20;padding-top:14px;font-size:11px;color:#c7d9ba}.small label{display:block;margin:23px 0;color:#dce7d8;font-size:14px}.small output{float:right;color:#c7e49f}input[type=range]{display:block;width:100%;accent-color:#d5e5ab;margin-top:14px}input[type=checkbox]{accent-color:#c7dfb0;width:19px;height:19px}.small label.row{display:flex;justify-content:space-between;align-items:center}select{display:block;background:#224842;color:#eff4e6;border:1px solid #ffffff30;border-radius:5px;padding:9px;width:100%;margin-top:10px}.wide{display:block;width:100%;margin-top:10px;text-align:left}#storyText{color:#d4dfcf;line-height:1.8;margin-bottom:28px}#loading{position:fixed;inset:0;background:#163f3b;z-index:10;display:flex;align-items:center;justify-content:center;gap:16px;font-size:15px}.loader{width:22px;height:22px;border:2px solid #aac99b40;border-top-color:#cce7b3;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}[hidden]{display:none!important}#touchControls{display:none}body.playing #welcome{display:none}body.playing #hint{opacity:.8}body:not(.playing) #location{display:none}
@media(max-width:1000px){header{left:20px;right:20px;top:18px}.sky-clock #dayLabel{display:none}nav button{padding:9px}#hint{max-width:320px;text-align:center;font-size:10px}#location{left:200px}#minimapWrap{width:145px;height:145px;left:24px}.north{left:65px}#welcome{left:5vw;width:350px;padding:27px}h1{font-size:42px}}
@media(max-width:650px){header{gap:7px;left:14px;right:14px}.brand strong{font-size:16px;letter-spacing:3px}.brand div>span{font-size:7px;letter-spacing:1px}.brand .mark{font-size:26px}.brand{gap:6px}.sky-clock{padding:4px 9px;font-size:11px;gap:5px}.sky-clock #sunIcon{font-size:15px}nav{gap:4px}nav button{font-size:11px;padding:8px}nav kbd{display:none}#welcome{left:20px;top:48%;width:calc(100vw - 40px);max-width:360px;padding:25px}h1{font-size:38px}#minimapWrap{left:18px;bottom:23px;width:110px;height:110px}.north{left:47px}.map-caption{display:none}#location{left:145px;bottom:35px;right:10px}#location h2{font-size:24px}#location .eyebrow{font-size:8px}#location p{font-size:11px}#hint{display:none}.panel{right:10px;top:78px;bottom:10px;width:calc(100vw - 20px);padding:18px}.panel.small{width:calc(100vw - 20px);max-height:calc(100vh - 95px)}.panel h2{font-size:26px}.guide-foot{font-size:10px}#toast{top:85px;width:max-content;max-width:90vw;font-size:12px}.destination{font-size:12px;padding:8px}#prompt{top:65%}}
@media(pointer:coarse){body.playing #touchControls{display:block}#joystick{position:fixed;left:28px;bottom:155px;width:100px;height:100px;border:1px solid #eef7d666;background:#18463b66;border-radius:50%;touch-action:none}#joystick>div{position:absolute;left:30px;top:30px;width:40px;height:40px;border-radius:50%;background:#daecc777}.touch-actions{position:fixed;right:25px;bottom:160px;display:flex;gap:12px}.touch-actions button{border-radius:50%;width:50px;height:50px;touch-action:none}#crosshair{display:none}}

/* Sanctuary v2 experience layer */
#labShortcut{position:fixed;right:32px;top:91px;border-color:#9cddcb66;background:#123a3ce8;color:#d3f5e7;font-size:13px}#experience{position:fixed;inset:0;z-index:30;pointer-events:none}#gameHolder{position:absolute;inset:0;background:#0b202b;visibility:hidden;opacity:0;transition:opacity .3s}#experience.active #gameHolder{opacity:1;visibility:visible;pointer-events:auto}#gameHolder iframe{width:100%;height:100%;border:0;display:block}#experienceBar{position:absolute;left:20px;right:20px;bottom:16px;display:flex;align-items:center;justify-content:space-between;gap:20px;pointer-events:none}#experienceStatus{padding:12px 20px;background:#112e3bf2;border:1px solid #98d7df55;border-radius:8px}#leaveGame{margin-left:auto;pointer-events:auto;background:#153d49f2;border-color:#a4edee66;box-shadow:0 4px 20px #0008}body.experience-mode>header,body.experience-mode>#labShortcut,body.experience-mode>#touchControls,body.experience-mode>#prompt,body.experience-mode>#crosshair,body.experience-mode>#location,body.experience-mode>#hint,body.experience-mode>#minimapWrap,body.experience-mode>.panel{visibility:hidden}#prompt{cursor:pointer}#prompt:hover{background:#2f6962}@media(max-width:650px){#labShortcut{right:14px;top:76px;font-size:11px;padding:8px}#experienceBar{left:10px;right:10px;bottom:8px}#experienceStatus{font-size:12px}#leaveGame{font-size:12px;padding:9px}}

/* Mobile / fullscreen: safe insets follow the current orientation. */
html,body{width:100%;height:100%;overscroll-behavior:none}html:fullscreen,html:-webkit-full-screen{width:100%;height:100%;background:#153c39}
header{top:max(18px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right))}
body.touch-device.playing #touchControls{display:block}
body.touch-device #joystick{position:fixed;left:max(24px,env(safe-area-inset-left));bottom:max(28px,env(safe-area-inset-bottom));width:112px;height:112px;border:1px solid #eef7d666;background:#18463b99;border-radius:50%;touch-action:none;user-select:none}
body.touch-device #joystick>div{position:absolute;left:34px;top:34px;width:44px;height:44px;border-radius:50%;background:#daecc799;pointer-events:none}
body.touch-device .touch-actions{position:fixed;right:max(24px,env(safe-area-inset-right));bottom:max(42px,env(safe-area-inset-bottom));display:flex;gap:12px}
body.touch-device .touch-actions button{border-radius:50%;width:56px;height:56px;touch-action:none;user-select:none}
body.touch-device #minimapWrap{left:max(24px,env(safe-area-inset-left));bottom:170px;width:92px;height:92px}
body.touch-device .north{left:40px}body.touch-device .map-caption,body.touch-device #hint,body.touch-device #crosshair{display:none}
body.touch-device #location{left:138px;right:15px;bottom:184px}body.touch-device #location h2{font-size:22px}body.touch-device #location p{font-size:11px}
#experienceBar{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}
#welcome,.panel{max-height:calc(100dvh - 110px);overflow-y:auto;touch-action:pan-y}
@media(max-width:650px){header .sky-clock{display:none}header .brand div>span{display:none}header nav button{min-height:44px;padding:8px;font-size:11px}header{gap:6px;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right))}header .brand strong{font-size:14px;letter-spacing:2px}#labShortcut{top:max(76px,calc(env(safe-area-inset-top) + 58px))}}
@media(max-height:500px){header .sky-clock{display:none}header{top:max(8px,env(safe-area-inset-top))}#labShortcut{top:65px}#welcome{top:62px;transform:none;max-height:calc(100dvh - 76px);padding:20px}#welcome h1{font-size:30px;margin:10px 0}#welcome p{margin-bottom:12px}.welcome-foot{display:none}.panel{top:64px;bottom:12px;max-height:calc(100dvh - 76px)}.panel.small{max-height:calc(100dvh - 76px)}body.touch-device #minimapWrap,body.touch-device #location{display:none}body.touch-device #joystick{width:100px;height:100px;bottom:max(18px,env(safe-area-inset-bottom))}body.touch-device #joystick>div{left:28px;top:28px}body.touch-device .touch-actions{bottom:max(28px,env(safe-area-inset-bottom))}#toast{top:65px}#prompt{top:52%}}
@media(max-width:380px){header .brand .mark{display:none}}
