:root{font-family:Georgia,serif;color:#f7e9d2;background:#100e0e;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,summary:focus-visible{outline:3px solid #ffd08b;outline-offset:3px}.shell{min-height:100dvh;display:flex;flex-direction:column;max-width:100%;margin:auto;background:#17110f}.topbar{position:relative;z-index:4;padding:12px 14px;background:linear-gradient(135deg,#130f10,#281910);border-bottom:1px solid #9d6d43}.brand{text-align:center;color:#efbc7a;font-size:1.5rem;letter-spacing:.1em}.brand small{display:block;font:11px system-ui;color:#bba58e;letter-spacing:.04em}.world-title{text-align:center;font-size:.82rem;color:#f3c994;margin:5px 0}#stats{font:12px/1.6 system-ui;color:#e9d7bb;text-align:center}.scene{position:relative;flex:1;min-height:68dvh;background:radial-gradient(ellipse at 47% 57%,#d27c36 0%,#8d4825 17%,transparent 43%),linear-gradient(150deg,transparent 35%,#4a261b 36%,#2d1b16 41%,transparent 43%),repeating-linear-gradient(90deg,#38221b 0 12px,#422a20 12px 17px,#241915 17px 21px);overflow:hidden}.scene:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 15% 15%,#f6b34c7d,transparent 35%),radial-gradient(ellipse at 90% 32%,#c44f2b99,transparent 35%),linear-gradient(0deg,#150f10 0%,transparent 40%)}.exploring .scene{background:radial-gradient(ellipse at 50% 18%,#f6be76,transparent 45%),linear-gradient(145deg,#6b2b19 0%,#c36b2d 25%,#6d3d22 45%,#243323 75%,#171f1a 100%)}.hotspots{position:absolute;inset:0;pointer-events:none;z-index:1}.hotspot{position:absolute;pointer-events:auto;min-height:48px;min-width:60px;border:1px solid #eab97a;border-radius:25px;background:#211711dd;color:#ffe1ad;padding:8px;box-shadow:0 0 15px #ef9b4477}.hotspot span{display:block;font-size:.75rem}.library{left:8%;top:17%}.workbench{right:5%;top:32%}.door{right:7%;top:51%}.corner-tools{position:absolute;right:10px;top:10px;z-index:3;display:flex;gap:7px}.corner-tools[hidden],.hotspots[hidden],.room-nav[hidden]{display:none}.corner-tools button{display:grid;place-items:center;min-width:57px;min-height:54px;border:1px solid #9b6d42;background:#211916eb;color:#f6d2a2;border-radius:12px}.corner-tools button span{font-size:1.3rem}.corner-tools small{font:11px system-ui}.story-wrap{position:relative;z-index:2;max-width:660px;margin:clamp(195px,40dvh,370px) auto 24px;padding:0 14px}.story-wrap section{padding:20px;background:#1a1514ed;border:1px solid #ba8552;border-radius:20px;box-shadow:0 12px 36px #000a;max-height:none}.story-wrap h2{font-size:1.35rem;color:#f3c58b;margin:8px 0 12px}.story-wrap p{line-height:1.6}.note{font:12px system-ui;color:#c6a786}.choice,.story-wrap button,#leave{display:block;width:100%;min-height:46px;margin:9px 0;padding:12px 14px;background:linear-gradient(110deg,#33241f,#1c191a);border:1px solid #a8794c;border-radius:12px;color:#fff0d9;text-align:left}.choice:hover,.story-wrap button:hover{background:#5c3826}button:disabled{opacity:.45;cursor:not-allowed}button[hidden]{display:none!important}input,select{width:100%;padding:12px;margin:8px 0;border:1px solid #9e764e;border-radius:10px;background:#201915;color:#fff}.room-nav{position:sticky;bottom:0;z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:8px 6px max(8px,env(safe-area-inset-bottom));gap:4px;background:#151215f5;border-top:1px solid #a67b50}.room-nav button{border:1px solid transparent;background:transparent;color:#f5d4ab;border-radius:12px;padding:6px 1px;min-height:58px;font:11px system-ui}.room-nav button span{display:block;font-size:24px;margin-bottom:3px}.room-nav button.active{border-color:#e7ac6b;background:#513021;box-shadow:0 0 12px #c8783c66}footer{background:#161113;padding:5px 14px;font:12px system-ui;color:#b7a08a}footer summary{cursor:pointer}footer button{padding:10px;background:#3c2421;color:white;border:1px solid #8b5c4b;border-radius:8px}.shell:not(.in-world) .scene{background:linear-gradient(135deg,#35231c,#17181a)}.shell:not(.in-world) .story-wrap{margin:30px auto}.sanctuary-view .story-wrap{margin-top:clamp(280px,53dvh,570px)}@media(min-width:750px){.shell{max-width:1280px}.topbar{display:grid;grid-template-columns:1fr 1fr 2fr;align-items:center}.brand{text-align:left}.scene{min-height:750px}.story-wrap{margin-top:200px}.sanctuary-view .story-wrap{max-width:500px;margin:440px 30px 30px auto}.hotspot.library{left:15%;top:27%}.hotspot.workbench{right:18%;top:35%}.hotspot.door{right:8%;top:64%}.room-nav{max-width:720px;width:100%;align-self:center}.corner-tools{top:20px;right:20px}}@media(prefers-reduced-motion:no-preference){.hotspot{transition:transform .2s,box-shadow .2s}.hotspot:hover{transform:scale(1.06);box-shadow:0 0 22px #ffb85c}}
/* Mobile hotspot fix: sanctuary description must never cover the Explore door. */
.sanctuary-view .scene{display:flex;flex-direction:column;min-height:0;overflow:visible}
.sanctuary-view .hotspots{position:relative;inset:auto;flex:0 0 auto;min-height:320px;pointer-events:none}
.sanctuary-view .hotspot{z-index:3}
.sanctuary-view .hotspot.library{left:6%;top:18%}
.sanctuary-view .hotspot.workbench{right:5%;top:43%}
.sanctuary-view .hotspot.door{right:5%;top:73%}
.sanctuary-view .story-wrap{margin:0 auto 20px;width:100%;max-width:660px}
.sanctuary-view .story-wrap section{position:relative}
@media(min-width:750px){.sanctuary-view .scene{min-height:750px}.sanctuary-view .hotspots{position:absolute;inset:0;min-height:0}.sanctuary-view .hotspot.library{left:15%;top:27%}.sanctuary-view .hotspot.workbench{right:18%;top:35%}.sanctuary-view .hotspot.door{right:8%;top:64%}.sanctuary-view .story-wrap{margin:440px 30px 30px auto;max-width:500px}}

/* 0.9.2: mobile sanctuary structural repair. Keep hotspot layer in normal flow
   and prevent its content from overlapping the narrative card. */
@media(max-width:749px){
 .sanctuary-view .scene{display:block;overflow:visible}
 .sanctuary-view .hotspots{position:relative!important;inset:auto!important;display:block;min-height:390px;height:390px;flex:none;z-index:2}
 .sanctuary-view .hotspot.library{top:100px;left:7%}
 .sanctuary-view .hotspot.workbench{top:200px;right:5%}
 .sanctuary-view .hotspot.door{top:290px;right:7%;min-width:110px}
 .sanctuary-view .story-wrap{position:relative;z-index:1;margin:0 auto!important;padding:0 14px 20px;clear:both}
 .sanctuary-view .corner-tools{z-index:4}
 .room-nav{position:sticky;bottom:0}
 .story-wrap section{padding-bottom:28px}
}

/* v0.9.3: five primary mobile tabs; exploration must not depend on an obscured scene hotspot. */
.room-nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
.room-nav button{font-size:10px;padding:6px 0;min-width:0}
.room-nav button span{font-size:22px}
@media(max-width:749px){.sanctuary-view .hotspot.door{display:none}}
