:root{color-scheme:dark;--ink:#102827;--panel:#182e30;--gold:#e6c68a;--cream:#fff0cf;--muted:#b5c9c1;--line:#b2966270}*{box-sizing:border-box}body{margin:0;background:#0e2223;color:var(--cream);font-family:Georgia,serif;background-image:radial-gradient(ellipse at top,#28534366,transparent 60%)}button,select{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{border:1px solid var(--line);border-radius:7px;padding:10px 14px;color:var(--cream);background:#213e3e;cursor:pointer;min-height:42px;transition:background .15s,transform .15s}button:hover:not(:disabled){background:#36534b;transform:translateY(-1px)}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,canvas:focus-visible,select:focus-visible{outline:3px solid #9df1e1;outline-offset:3px}[hidden]{display:none!important}main{max-width:1600px;margin:auto}header{height:92px;display:flex;align-items:center;justify-content:space-between;padding:14px 4%;border-bottom:1px solid var(--line);background:#102629ed}.brand{text-decoration:none;color:var(--gold);font-size:37px;line-height:1}.brand span{font-size:24px;letter-spacing:2px}.brand small{display:block;font:10px system-ui;letter-spacing:5px;margin:9px 0 0 2px}.headerRight{display:flex;align-items:center;gap:10px}.headerRight>span{color:#f4d98d;font:16px system-ui;margin-right:8px}.gold{background:linear-gradient(135deg,#eed49b,#b79053);color:#282b25;font-weight:bold;border-color:#f2deb1;box-shadow:0 4px 18px #0002}.gold:hover:not(:disabled){background:#eed7a7}.eyebrow{font:10px system-ui;letter-spacing:2.5px;color:var(--gold);margin:0 0 10px}.landing{min-height:720px;height:calc(100svh - 92px);max-height:1000px;position:relative;background:url('assets/woodland.webp') center/cover;display:flex;align-items:center;isolation:isolate}.veil{position:absolute;inset:0;background:linear-gradient(90deg,#0d2525ed,#0d252599 42%,#10292311 80%),linear-gradient(0deg,#0d2425bb,transparent 50%);z-index:-1}.intro{padding:60px 6%;max-width:730px}.intro h1{font-size:clamp(42px,5vw,78px);font-weight:400;line-height:1.1;margin:20px 0 26px;letter-spacing:-1.5px;text-shadow:0 4px 20px #0005}.intro>p:not(.eyebrow){color:#e1e6d6;font-size:19px;line-height:1.8}.intro button{padding:16px 25px;margin:14px 8px 14px 0}.intro button span{margin-left:18px}.glass{background:#193734cc}.intro small{display:block;color:#bacbc0;font:11px system-ui;margin-top:15px}.heroParty{position:absolute;bottom:40px;right:5%;display:flex;align-items:center;padding:15px 20px;background:#132c2cbd;border:1px solid var(--line);border-radius:14px;backdrop-filter:blur(8px)}.heroParty img{width:55px;height:65px;object-fit:cover;border:1px solid var(--gold);border-radius:28px;margin-left:-8px}.heroParty span{font-size:14px;margin-left:18px}#mission{padding:24px 3%}.chapterbar{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:20px}h1,h2,h3{font-weight:400}.chapterbar h1{font-size:32px;margin:0}.turns{display:grid;grid-template-columns:auto auto;gap:7px 18px;align-items:center}.turns strong{font:14px system-ui}.turns small{color:var(--muted);font:11px system-ui;grid-column:1}.turns button{grid-column:2;grid-row:1/3}.gameLayout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:20px}.mapWrap{min-width:0;align-self:start;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#183636;box-shadow:0 14px 50px #0003}canvas{width:100%;height:auto;display:block;touch-action:manipulation;cursor:pointer;background:#1e493c}.mapLegend{display:flex;align-items:center;gap:20px;padding:8px 16px;color:#ccddcf;font:11px system-ui;background:#122d2ddf}.mapLegend button{margin-left:auto;font-size:10px;min-height:30px;padding:5px 9px}.journal{padding:15px 18px;font:13px/1.7 system-ui;color:#e2e9d6;min-height:70px;background:#10282c;border-top:1px solid var(--line)}aside{background:#132b2ddf;border:1px solid var(--line);border-radius:12px;padding:15px}.hero{width:100%;display:flex;align-items:center;text-align:left;gap:11px;padding:8px;margin:6px 0;background:#1f3738}.hero.selected{border-color:#efd28e;box-shadow:inset 3px 0 #e6c68a;background:#3a453c}.hero img{width:48px;height:51px;object-fit:cover;border-radius:7px;border:1px solid #b49a68}.hero strong{font:16px Georgia;display:block}.hero small{display:block;font:10px/1.6 system-ui;color:#c0d2c8}.hero .pips{margin-left:auto;font-size:13px;color:#9de0c7}.abilities{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:15px 0}.abilities button{font:11px/1.5 system-ui;padding:8px 6px;text-align:left}.abilities button.active{background:#bca06b;color:#152e2c;border-color:#f5deaa}.abilities small{display:block;font-size:9px}.targetBox{border-top:1px solid var(--line);padding-top:14px;font:11px/1.6 system-ui}.targetBox select{display:block;width:100%;background:#102729;color:var(--cream);border:1px solid var(--line);border-radius:5px;padding:10px 4px;margin:7px 0}.targetBox>div{display:flex;gap:5px}.targetBox button{font-size:10px;padding:8px}.targetBox small{display:block;color:#adcbc2;margin-top:12px}.objectives{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.objective{border:1px solid var(--line);background:#1a3434;border-radius:8px;flex:1;min-width:170px;padding:12px;font:12px/1.6 system-ui}.objective strong{display:block;color:#e3cb96}.objective.done{border-color:#6dac91;color:#bce5cb}.missionFoot{display:flex;align-items:center;gap:12px;margin-top:15px}.missionFoot span{font:11px system-ui;color:#9db7af;margin-right:auto}.missionFoot button{font-size:11px}.sanctuaryHead{padding:65px 5% 45px;background:linear-gradient(90deg,#102c2ced,#153b3999),url('assets/woodland.webp') center/cover}.sanctuaryHead h1{font-size:42px;margin:15px 0}.sanctuaryHead>p:not(.eyebrow){color:#b7d4c6;font-size:17px}.sanctuaryHead button{margin-top:12px}.sanctuaryStats{padding:22px 5%;display:flex;gap:28px;border-bottom:1px solid var(--line);font:13px/1.8 system-ui}.sanctuaryStats strong{font-size:24px;display:block;color:#edcf91}.buildings{padding:30px 5%;display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.building{border:1px solid var(--line);border-radius:12px;background:linear-gradient(145deg,#254940,#1b3036);padding:25px}.building .icon{font-size:35px;color:#ecd192}.building h2{font-size:24px;margin:15px 0}.building p{font:13px/1.8 system-ui;color:#c0d5ca;min-height:68px}.building button{width:100%}.sectionTitle{margin:20px 5%;font-size:28px}.skillGrid{padding:0 5% 30px;display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.skillCard{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#1c3635}.skillCard img{width:100%;height:150px;object-fit:cover;object-position:center 25%}.skillCard>div{padding:15px}.skillCard h3{margin:0;font-size:21px}.skillCard p{font:11px/1.7 system-ui;color:#bed2c7}.skillCard button{font:11px system-ui;width:100%}.residents{display:flex;flex-wrap:wrap;gap:15px;padding:0 5% 30px}.resident{text-align:center;border:1px solid var(--line);border-radius:10px;padding:10px;background:#1e3c36}.resident img{width:88px;height:88px;border-radius:8px}.resident small{display:block;margin-top:8px}.saveNote{font:11px/1.7 system-ui;color:#a1bcb0;margin:15px 5% 35px}footer{padding:25px 4%;border-top:1px solid var(--line);font:10px/1.8 system-ui;letter-spacing:1px;color:#a3bfb2;display:flex;justify-content:space-between}dialog{width:min(540px,92vw);max-height:85svh;background:#1b3433;color:var(--cream);border:1px solid var(--gold);border-radius:15px;padding:32px;box-shadow:0 20px 100px #0008}dialog::backdrop{background:#071819db;backdrop-filter:blur(5px)}dialog h2{font-size:30px;margin:15px 0}dialog p,dialog li{font:14px/1.8 system-ui;color:#d2e0d5}dialog .gold{margin-top:20px;width:100%}.close{float:right;font-size:25px;background:transparent;min-height:34px;padding:0 9px}dialog li{margin-bottom:8px}@media(max-width:1050px){.gameLayout{grid-template-columns:minmax(0,1fr) 255px;gap:12px}.heroParty{bottom:20px;right:3%}.intro{padding-left:5%}}@media(max-width:760px){header{height:80px;padding:12px 4%}.brand{font-size:27px}.brand span{font-size:15px;letter-spacing:1px}.brand small{font-size:8px;letter-spacing:2.5px}.headerRight{gap:5px}.headerRight button{font-size:10px;padding:7px;min-height:36px}.headerRight>span{font-size:12px;margin-right:0}.landing{min-height:680px;height:calc(100svh - 80px);background-position:60% center}.veil{background:linear-gradient(90deg,#0d2525d9,#0d252555),linear-gradient(0deg,#0d2525dd,transparent)}.intro{padding:25px 6% 130px}.intro h1{font-size:49px}.intro>p:not(.eyebrow){font-size:16px}.intro button{padding:13px 16px;font-size:14px}.heroParty{bottom:25px;left:6%;right:auto}.heroParty img{width:44px;height:53px}.heroParty span{font-size:12px}.chapterbar h1{font-size:23px}.chapterbar .eyebrow{font-size:8px}.turns{gap:6px}.turns strong{font-size:11px}.turns small{font-size:9px}.turns button{font-size:11px;padding:8px}.gameLayout{display:flex;flex-direction:column}.mapWrap{width:100%}canvas{aspect-ratio:1.25;object-fit:cover}.mapLegend{gap:10px;font-size:9px;padding:6px 10px}.journal{font-size:12px;padding:12px;min-height:65px}aside{width:100%;padding:12px}#party{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.hero{flex-direction:column;gap:4px;padding:6px 3px;text-align:center;margin:0}.hero img{width:44px;height:44px}.hero strong{font-size:12px}.hero small{font-size:8px}.hero .pips{margin:0}.abilities{grid-template-columns:repeat(4,1fr);margin:10px 0}.abilities button{font-size:10px;min-height:60px}.abilities small{font-size:8px}.targetBox>div{display:inline-flex;margin-left:5px}.targetBox select{width:57%;display:inline-block;font-size:11px}.targetBox label{display:block}.targetBox small{font-size:10px}.missionFoot{flex-wrap:wrap}.missionFoot span{order:3;width:100%}.buildings{grid-template-columns:1fr;padding:20px 5%;gap:12px}.building{padding:20px}.building p{min-height:0}.skillGrid{grid-template-columns:1fr 1fr;gap:10px}.skillCard img{height:130px}.sanctuaryHead{padding:40px 5%}.sanctuaryHead h1{font-size:32px}.sanctuaryStats{gap:20px;font-size:10px}.sanctuaryStats strong{font-size:20px}footer{display:block;font-size:8px}footer span{display:block}.objectives{gap:7px}.objective{font-size:10px;min-width:140px;padding:9px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Immersive illustrated edition */
body{background:#182720}main{max-width:none}header{position:absolute;top:0;left:0;right:0;z-index:30;height:78px;border:0;background:linear-gradient(#101b20e6,#101b2066,transparent);padding:10px 25px}.brand{font-size:31px;text-shadow:0 2px 8px #000}.brand span{font-size:21px}.brand small{font-size:8px;letter-spacing:4px}.headerRight button{background:#142229aa;backdrop-filter:blur(7px);border:1px solid #dac38b80;border-radius:50px;font-size:11px}.headerRight #sound{font-size:22px;width:42px;padding:5px}.headerRight>span{padding:8px 13px;background:#142229aa;border:1px solid #dac38b60;border-radius:50px}.landing{height:100svh;min-height:650px;max-height:none}.intro{padding:100px 6% 80px}.intro h1{font-size:clamp(60px,7vw,100px)}.veil{background:linear-gradient(90deg,#142126c9,#182f2740 60%,transparent),linear-gradient(0deg,#12202160,transparent 50%)}.heroParty{background:transparent;border:0;backdrop-filter:none;bottom:30px}.heroParty img{width:65px;height:75px;box-shadow:0 5px 15px #0008}.heroParty span{display:none}footer{display:none}#mission{position:relative;width:100%;height:100svh;min-height:640px;padding:0;overflow:hidden}.chapterbar{position:absolute;z-index:10;top:90px;left:28px;right:28px;pointer-events:none;margin:0;align-items:flex-start}.chapterbar h1{font-size:29px;text-shadow:0 2px 8px #000}.chapterbar .eyebrow{font-size:8px;margin-bottom:7px}.turns{pointer-events:auto;background:#172329bb;border:1px solid #dec38c90;border-radius:12px;padding:10px 14px;backdrop-filter:blur(8px)}.gameLayout{display:contents}.mapWrap{position:absolute;inset:0;border:0;border-radius:0;box-shadow:none;background:url('assets/woodland.webp') center/cover;overflow:hidden}canvas{width:100%;height:100%;aspect-ratio:auto;object-fit:fill;background:transparent}.mapLegend{position:absolute;bottom:16px;left:24px;background:transparent;padding:0;gap:8px}.mapLegend span{display:none}.mapLegend button{background:#172329c9;border-radius:30px;font-size:10px;padding:8px 12px}.journal{position:absolute;top:155px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(650px,70%);min-height:0;padding:9px 16px;border:1px solid #dbc48f70;border-radius:25px;background:#182731b8;backdrop-filter:blur(6px);font:12px/1.5 Georgia;text-align:center;pointer-events:none;color:#fff2cc}aside{display:contents}aside>.eyebrow{display:none}#party{position:absolute;left:20px;top:210px;z-index:12;display:flex;flex-direction:column;gap:10px;width:88px}.hero{display:flex;flex-direction:column;gap:2px;padding:0;width:82px;min-height:90px;background:transparent!important;border:0;box-shadow:none!important;text-align:center;margin:0}.hero img{width:62px;height:65px;border:2px solid #d7bd80;border-radius:40px;box-shadow:0 3px 15px #0008}.hero.selected img{border:3px solid #ffe8a9;box-shadow:0 0 20px #ffe7a58c}.hero strong{font-size:12px;text-shadow:0 2px 4px #000}.hero small{display:none}.hero .pips{position:absolute;right:5px;background:#172329df;border:1px solid #d5b47d;border-radius:10px;padding:0 3px;font-size:12px}.abilities{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:15;margin:0;background:#151f2aca;padding:10px;border:1px solid #e3c78b90;border-radius:18px;box-shadow:0 5px 30px #0005;backdrop-filter:blur(8px)}.abilities button{width:77px;height:72px;min-height:0;text-align:center;padding:5px 3px;background:#26363a9c;border:1px solid #baa37599;border-radius:12px;font:10px Georgia;color:#eeddba}.abilities button.active{background:linear-gradient(#e5c98f,#ab844e);color:#2c251b;box-shadow:0 0 15px #d3b06644}.abilityIcon{display:block;font-size:27px;line-height:34px}.abilities small{display:none}.targetBox{position:absolute;bottom:20px;right:20px;border:1px solid #d3b97b80;background:#14262acf;border-radius:12px;padding:10px;z-index:16;backdrop-filter:blur(8px);max-width:300px}.targetBox summary{font:10px Georgia;cursor:pointer;list-style:none}.targetBox[open]{bottom:110px}.targetBox[open] summary{margin-bottom:10px}.questPanel{position:absolute;top:205px;right:25px;z-index:11;max-width:270px;background:#16282bb3;border:1px solid #d3b97b70;border-radius:12px;padding:10px 12px;backdrop-filter:blur(6px)}.questPanel summary{font:12px Georgia;cursor:pointer;list-style:none;color:#f1d89d}.objectives{display:block;margin-top:10px}.objective{min-width:0;padding:8px;border:0;border-bottom:1px solid #d3b97b40;background:none;border-radius:0;font:11px/1.6 Georgia}.objective strong{font-size:12px}.missionFoot{position:absolute;bottom:15px;right:20px;z-index:9;display:none}.sanctuaryHead{background:none;position:absolute;top:115px;left:5%;padding:0;z-index:6;text-shadow:0 2px 12px #000}.sanctuaryHead h1{font-size:42px;margin:12px 0}.sanctuaryHead>p:not(.eyebrow){font-size:15px;color:#fff1d6}.sanctuaryHead button{position:fixed;bottom:32px;right:30px;border-radius:40px;padding:16px 25px;z-index:10}#sanctuary{position:relative;height:100svh;min-height:700px;overflow:hidden;background:linear-gradient(0deg,#16252144,transparent 65%),url('assets/woodland.webp') center/cover}.sanctuaryStats{position:absolute;top:100px;right:25px;border:1px solid #e0c38577;border-radius:30px;padding:10px 18px;gap:20px;background:#15272db3;z-index:8;font:9px Georgia;backdrop-filter:blur(6px)}.sanctuaryStats strong{font:17px Georgia}.buildings{padding:0;display:contents}.building{position:absolute;z-index:7;width:190px;padding:0;background:none;border:0;text-align:center;filter:drop-shadow(0 4px 10px #0008)}.building:nth-child(1){left:53%;top:57%}.building:nth-child(2){left:72%;top:34%}.building:nth-child(3){left:12%;top:40%}.building .icon{display:inline-grid;place-items:center;font-size:36px;width:64px;height:64px;border:2px solid #e9c983;border-radius:50%;background:radial-gradient(#567c6099,#18302ac9);color:#ffedbe;box-shadow:0 0 30px #e6d58f44}.building h2{font-size:17px;line-height:1.1;margin:10px 0;color:#fff1c4;text-shadow:0 2px 5px #000}.building p{display:none}.building button{width:auto;padding:8px 15px;background:#1a2933d9;border:1px solid #f0d49b9c;border-radius:30px;font-size:11px;backdrop-filter:blur(6px)}.building button:disabled{opacity:.85}.building.restored .icon{background:radial-gradient(#e0d199,#507252);border-color:#fff2c6;box-shadow:0 0 45px #fff1a577}.partyDrawer{position:absolute;left:30px;bottom:30px;z-index:14;border:1px solid #d6bd8199;background:#16262bce;border-radius:14px;backdrop-filter:blur(8px);padding:12px 18px;max-width:800px}.partyDrawer>summary{list-style:none;cursor:pointer;color:#f2d89d;font-size:14px}.partyDrawer .skillGrid{padding:20px 0 0;margin:0;gap:12px;max-height:60svh;overflow:auto}.skillCard{background:#18302acc;min-width:130px}.skillCard img{height:140px}.residents{position:absolute;left:35%;bottom:120px;padding:0;z-index:8;gap:10px;display:flex}.residents>p{font:13px Georgia;color:#fff4cf;background:#193132aa;border-radius:15px;padding:10px}.resident{border:0;background:transparent;padding:0;filter:drop-shadow(0 3px 7px #0008)}.resident img{width:60px;height:60px;border-radius:50%;border:2px solid #e3c785}.resident small{font-size:11px;color:#fff2ce;text-shadow:0 2px 3px #000}.saveNote{position:absolute;left:25px;bottom:0;max-width:55%;font:8px Georgia;margin:0;color:#e7e4cf99;padding:3px;display:none}dialog{background:linear-gradient(135deg,#293534,#17252d);border:2px solid #c9ac73}.close{border:0}.targetBox select{width:100%;display:block}#sceneMenu{display:none}
@media(max-width:760px){header{height:67px;padding:9px 12px}.brand{font-size:25px}.brand span{font-size:14px}.brand small{font-size:6px;letter-spacing:2.6px;margin-top:6px}.headerRight{gap:5px}.headerRight button{padding:7px;font-size:9px;min-height:33px}.headerRight #sound{width:33px;font-size:19px}.headerRight>span{font-size:10px;padding:7px 9px}.landing{min-height:100svh}.intro{padding:70px 6% 120px}.intro h1{font-size:62px}.intro .eyebrow{font-size:8px;max-width:250px;line-height:1.8}.intro>p:not(.eyebrow){font-size:15px;max-width:250px}.heroParty{bottom:35px;left:6%;padding:0}.heroParty img{width:58px;height:66px}#mission{min-height:650px}.chapterbar{top:80px;left:16px;right:16px}.chapterbar h1{font-size:21px}.chapterbar .eyebrow{font-size:7px}.turns{padding:8px;gap:3px 6px}.turns button{font-size:10px;padding:7px;min-height:36px}.turns strong{font-size:9px}.turns small{font-size:8px}.journal{top:152px;width:88%;max-width:88%;font-size:11px;padding:8px 12px}.questPanel{top:200px;right:12px;max-width:230px;padding:8px 10px}.questPanel summary{font-size:10px}#party{left:50%;top:auto;bottom:132px;transform:translateX(-50%);flex-direction:row;width:auto;gap:12px}.hero{width:62px;min-height:68px}.hero img{width:52px;height:54px}.hero strong{font-size:10px}.hero .pips{right:0}.abilities{bottom:56px;gap:5px;padding:7px;max-width:calc(100% - 16px);border-radius:14px}.abilities button{width:45px;min-width:37px;height:59px;font-size:8px;padding:3px 2px;line-height:1.3}.abilityIcon{font-size:24px;line-height:29px}.targetBox{bottom:10px;right:12px;padding:7px 10px;max-width:290px}.targetBox[open]{bottom:220px}.mapLegend{bottom:10px;left:12px}.mapLegend button{font-size:9px;min-height:30px}.sanctuaryHead{top:95px;left:6%;max-width:85%}.sanctuaryHead h1{font-size:28px}.sanctuaryHead p:not(.eyebrow){font-size:13px}.sanctuaryHead button{bottom:30px;right:15px;font-size:11px;padding:13px 16px;max-width:200px}.sanctuaryStats{top:213px;left:6%;right:auto;gap:14px;padding:9px 14px;font-size:8px}.sanctuaryStats strong{font-size:15px}#sanctuary{min-height:750px;background-position:52% center}.building{width:140px}.building:nth-child(1){left:46%;top:61%}.building:nth-child(2){left:53%;top:38%}.building:nth-child(3){left:5%;top:44%}.building .icon{font-size:28px;width:53px;height:53px}.building h2{font-size:14px;margin:8px 0}.building button{font-size:10px;padding:7px 10px}.partyDrawer{left:15px;bottom:30px;padding:12px;max-width:calc(100% - 30px)}.partyDrawer[open]{bottom:100px}.partyDrawer>summary{font-size:11px}.partyDrawer .skillGrid{grid-template-columns:1fr 1fr;max-width:350px;max-height:55svh}.skillCard{min-width:0}.skillCard img{height:100px}.skillCard>div{padding:10px}.residents{left:8%;bottom:130px;gap:7px}.resident img{width:44px;height:44px}.resident small{font-size:9px}.residents>p{font-size:10px;max-width:200px}.sanctuaryStats div{white-space:nowrap}}@media(max-height:650px) and (min-width:761px){#party{top:150px;gap:4px}.hero{min-height:70px}.hero img{width:48px;height:48px}.abilities{bottom:12px}.journal{top:120px}.questPanel{top:160px}.chapterbar{top:75px}}
.hero{position:relative}body[data-scene="mission"],body[data-scene="sanctuary"]{overflow:hidden}.targetBox[open] label{font-size:11px}.targetBox[open] button{font-size:10px}
#mission,#sanctuary{min-height:100svh}.heroParty img{object-fit:cover}.abilities{bottom:calc(30px + env(safe-area-inset-bottom,0px))}@media(max-width:760px){.abilities{bottom:calc(56px + env(safe-area-inset-bottom,0px))}#party{bottom:calc(132px + env(safe-area-inset-bottom,0px))}}@media(max-height:520px){.journal{display:none}.chapterbar{top:70px}.chapterbar h1{font-size:18px}.questPanel{top:125px;right:15px}#party{top:130px;bottom:auto;left:12px;transform:none;flex-direction:column;gap:2px;width:60px}.hero{min-height:55px;width:55px}.hero img{width:36px;height:38px}.hero strong{font-size:8px}.abilities{bottom:12px}.abilities button{height:52px;width:58px}.abilityIcon{font-size:22px;line-height:25px}.targetBox{bottom:12px}.mapLegend{bottom:12px}.sanctuaryHead{top:75px}.sanctuaryHead h1{font-size:24px}.sanctuaryHead p:not(.eyebrow){display:none}.sanctuaryStats{top:80px;left:auto;right:20px}.building .icon{width:40px;height:40px;font-size:22px}.building h2{font-size:12px}.building:nth-child(3){top:40%}.building:nth-child(1){top:55%}.building:nth-child(2){top:32%}.residents{bottom:80px}.partyDrawer[open]{bottom:75px}}
/* Explicit scene sizing avoids collapsed absolute children in mobile WebKit. */
#mission{height:100vh;height:100dvh;min-height:0;isolation:isolate}
#mission .gameLayout{display:block;position:absolute;inset:0;width:100%;height:100%;min-height:0;z-index:0;pointer-events:none}
#mission .mapWrap{display:block;position:absolute;inset:0;align-self:stretch;width:100%;height:100%;min-height:0;pointer-events:auto;z-index:0}
#sceneArt{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
#map{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;max-height:100%;aspect-ratio:auto;background:transparent;z-index:1}
#mission aside{display:block;position:absolute;inset:0;width:100%;height:100%;padding:0;background:none;border:0;pointer-events:none;z-index:12}
#mission aside>*{pointer-events:auto}#mission .mapLegend{z-index:3}#mission .journal{z-index:3}
/* Visual restoration and three-chapter trail. */
.restoredArt{display:block;width:260px;max-width:none;height:210px;object-fit:contain;margin:-40px 0 0 -35px;filter:drop-shadow(0 10px 18px #13261bb3);animation:restoreBloom .7s ease-out}.ruinPlot{width:110px;height:80px;margin:0 auto;border:2px dashed #d1b57b80;border-radius:50%;background:radial-gradient(ellipse,#877b4866,#283629aa);color:#c4b584;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 5px 15px #0004}.ruinPlot span{font-size:30px}.ruinPlot small{font:8px Georgia;color:#c7c0a0}.building h2{margin:4px 0 8px}.missionRoute{position:absolute;bottom:115px;left:50%;transform:translateX(-50%);z-index:12;display:flex;gap:10px;padding:8px;background:#102329b0;border:1px solid #c9ad73aa;border-radius:14px;backdrop-filter:blur(7px)}.missionRoute button{width:180px;padding:11px;text-align:left;border-radius:10px;background:#233b35d9;border-color:#e0c78b77}.missionRoute small{font:8px system-ui;letter-spacing:1.5px;color:#d4c08e;display:block}.missionRoute strong{font:14px Georgia;display:block;margin:5px 0}.missionRoute span{display:block;font:8px/1.5 system-ui;color:#b9d4bd}.missionRoute button:disabled{opacity:.6}.residents{bottom:225px}.mapLegend{gap:5px;max-width:calc(100% - 40px);flex-wrap:wrap;pointer-events:auto}.mapLegend button{min-width:34px;font-size:11px;min-height:34px}#confirmMove{font-weight:bold;border:2px solid #ffe5a5;color:#30291e;box-shadow:0 0 22px #ffe7a566}#map{touch-action:none}.questPanel{pointer-events:auto}.building.restored{z-index:8}@keyframes restoreBloom{from{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.restoredArt{animation:none}}@media(max-width:760px){.restoredArt{width:180px;height:155px;margin:-25px 0 0 -20px}.building:nth-child(3){top:37%;left:3%}.building:nth-child(2){top:37%;left:57%}.building:nth-child(1){top:55%;left:38%}.building h2{font-size:12px}.building button{font-size:9px}.ruinPlot{width:85px;height:64px}.ruinPlot span{font-size:25px}.ruinPlot small{font-size:7px}.missionRoute{bottom:90px;gap:5px;padding:6px;max-width:calc(100% - 20px);width:360px}.missionRoute button{width:calc(100% / 3);padding:8px 6px}.missionRoute strong{font-size:11px;margin:5px 0}.missionRoute small{font-size:7px;letter-spacing:.7px}.missionRoute span{font-size:7px}.residents{bottom:190px;left:5%;max-width:35%;flex-wrap:wrap}.resident img{width:32px;height:32px}.resident small{font-size:7px}.residents>p{font-size:9px}.mapLegend{bottom:12px;left:10px;gap:4px;max-width:66%}.mapLegend button{font-size:9px;padding:7px 9px;min-height:31px}.mapLegend #confirmMove{position:fixed;bottom:220px;left:50%;transform:translateX(-50%);font-size:13px;padding:12px 18px}.targetBox{max-width:30%;padding:7px}.targetBox[open]{max-width:290px}.targetBox summary{font-size:9px}.partyDrawer{max-width:calc(100% - 30px)}}@media(max-height:520px){.restoredArt{height:115px;width:160px;margin:-25px 0 0 -10px}.building:nth-child(1){top:40%;left:41%}.building:nth-child(2){top:35%;left:72%}.building:nth-child(3){top:35%;left:8%}.missionRoute{bottom:72px;left:50%;padding:4px}.missionRoute button{padding:6px;width:150px}.residents{bottom:160px;left:3%}}

.musicLink{display:block;width:fit-content;color:#f2d69d;font-size:15px;padding:10px 0;text-underline-offset:4px}#map{user-select:none;-webkit-user-select:none;overscroll-behavior:contain}

/* Restoration buttons occupy their own layout cells; decorative art cannot intercept taps. */
body[data-scene="sanctuary"]{overflow:auto}
#sanctuary{display:flex;flex-direction:column;gap:22px;height:auto;min-height:100svh;overflow:visible;padding:110px 5% 40px;background-attachment:fixed}
#sanctuary .sanctuaryHead{position:static;order:0;max-width:none;padding:0}
#sanctuary .sanctuaryHead h1{font-size:clamp(29px,5vw,44px);margin:12px 0}
#sanctuary .sanctuaryHead button{position:static;margin-top:14px;padding:13px 22px;font-size:16px}
#sanctuary .sanctuaryStats{position:static;order:1;align-self:flex-start;max-width:100%;flex-wrap:wrap;gap:18px;transform:none}
#sanctuary .buildings{order:3;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:8px 0;max-width:1050px;width:100%;align-self:center}
#sanctuary .building{position:relative;inset:auto;width:auto;min-width:0;padding:0;z-index:auto;pointer-events:none;filter:none;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;text-align:center}
#sanctuary .restoredArt{width:100%;max-width:280px;height:210px;margin:0;pointer-events:none;object-fit:contain}
#sanctuary .ruinPlot{margin:0 0 45px;height:100px;width:150px;pointer-events:none}
#sanctuary .building h2{margin:8px 0 12px;text-shadow:0 2px 6px #000}
#sanctuary .building button{pointer-events:auto;position:relative;z-index:1;min-height:48px;padding:12px 20px;font-size:14px;touch-action:manipulation}
#sanctuary .residents{position:static;order:4;max-width:none;display:flex;flex-wrap:nowrap;overflow-x:auto;gap:15px;width:100%;padding:12px 2px;pointer-events:auto}
#sanctuary .resident{flex:0 0 65px;text-align:center}
#sanctuary .resident img{width:52px;height:52px}#sanctuary .resident small{font-size:11px;display:block}
#sanctuary .missionRoute{position:static;order:5;transform:none;align-self:center;width:100%;max-width:800px;gap:10px;margin:0}
#sanctuary .missionRoute button{flex:1;width:auto;min-width:0;padding:13px 10px}#sanctuary .missionRoute strong{font-size:14px}#sanctuary .missionRoute span{font-size:10px}
#sanctuary .partyDrawer{position:static;order:6;max-width:100%;align-self:flex-start;margin:0}
#sanctuary .partyDrawer[open]{width:100%}#sanctuary .partyDrawer .skillGrid{max-height:none;overflow:visible;flex-wrap:wrap}
#sanctuary .sanctuaryMilestone{order:2;margin:0;max-width:750px;padding:12px 0;color:#ffe6a6;text-shadow:0 2px 8px #000;font:17px/1.6 Georgia}
#sanctuary .sanctuaryMilestone.completed{font-size:21px;color:#fff0bf}
#sanctuary .saveNote{position:static;order:7;max-width:100%}
@media(max-width:760px){#sanctuary{padding:100px 18px 35px;gap:18px;background-position:52% center}#sanctuary .buildings{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px}#sanctuary .building:last-child{grid-column:1/-1;max-width:220px;width:100%;justify-self:center}#sanctuary .restoredArt{height:160px;max-width:210px}#sanctuary .ruinPlot{width:110px;height:90px;margin-bottom:28px}#sanctuary .building h2{font-size:15px}#sanctuary .building button{font-size:14px;min-height:48px;padding:12px 16px}#sanctuary .sanctuaryStats{gap:16px;padding:12px 15px}#sanctuary .missionRoute strong{font-size:12px}#sanctuary .missionRoute span{font-size:9px}#sanctuary .missionRoute small{font-size:8px}#sanctuary .sanctuaryHead>p:not(.eyebrow){display:block;font-size:14px}#sanctuary .partyDrawer{padding:14px 18px}}

#sanctuary .missionRoute{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}#sanctuary .missionRoute button{width:100%;min-height:100px}#sanctuary .missionRoute button:nth-child(n+4){background:linear-gradient(135deg,#254e5c,#19393f);border-color:#9bdbe9}.briefArt{width:100%;max-height:230px;object-fit:cover;border-radius:10px;object-position:50% 35%}#story{font-size:11px;margin-top:9px;padding:8px 12px}#balm{color:#fff0be;border-color:#8bd9d3}@media(max-width:760px){#sanctuary .missionRoute{grid-template-columns:repeat(2,minmax(0,1fr))}#sanctuary .missionRoute button{min-height:95px}}

#sanctuary .loreDrawer{order:6;max-width:750px;background:#142e39df;border:1px solid #c6ab7077;border-radius:12px;padding:15px 20px}#sanctuary .loreDrawer summary{cursor:pointer;color:#f1d39b}#sanctuary .loreDrawer p{line-height:1.7;font-size:15px;color:#dde7df}#sanctuary .loreDrawer article{padding-top:15px}.companionGift{order:4;color:#ffe7b0;margin:0;text-shadow:0 2px 8px #000}

.sanctuaryExtras{order:5;display:flex;gap:14px;flex-wrap:wrap;align-items:center}.sanctuaryExtras a{color:#ffe4a5;padding:12px 0;text-underline-offset:4px;font-size:14px}.sanctuaryExtras button{font-size:14px}

.targetBox[open]{z-index:45;max-height:55svh;overflow-y:auto;overscroll-behavior:contain}.targetBox summary{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:15px;position:relative;cursor:pointer}.targetBox:not([open]) summary span{transform:rotate(180deg)}.closeTargets{display:block;margin:0 0 12px auto;min-width:90px;min-height:44px;position:sticky;top:0;z-index:3;background:#30483f;border-color:#eed39b}.targetBox[open] summary{padding-right:6px}.targetBox button{touch-action:manipulation}@media(max-width:760px){.targetBox[open]{position:fixed;left:12px;right:12px;bottom:225px;max-width:none;width:auto;padding:12px;max-height:50svh}.targetBox[open] summary{font-size:14px}.targetBox:not([open]) summary{min-height:32px}.targetBox[open]>div{display:flex;flex-wrap:wrap}.targetBox[open]>div button{flex:1;min-width:90px}}

.journal{pointer-events:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.4;max-height:72px;padding:10px 15px}#mapKey{font:12px/1.5 Georgia;color:#ffe6af;background:#183539cc;padding:7px 10px;border-radius:20px;white-space:normal}#resetMap{border-color:#f4d496;color:#fff0b8}@media(max-width:760px){.journal{font-size:12px;padding:9px 12px;max-height:55px}#mapKey{font-size:10px}.mapLegend{max-width:64%;gap:4px}.mapLegend button{padding:7px 8px}#mapKey{flex-basis:100%;width:fit-content}}

.grandPanel{position:absolute;top:180px;left:5%;right:5%;z-index:18;max-width:650px;margin:auto;display:flex;gap:14px;align-items:center;padding:12px 18px;border:1px solid #f0d28d;border-radius:18px;background:linear-gradient(110deg,#273c45ee,#203c35e6);box-shadow:0 0 30px #efd38933}.grandPanel img{height:70px;width:70px;border-radius:50%;border:2px solid #f4d99d;object-fit:cover}.grandPanel small{font:9px system-ui;letter-spacing:1.5px;color:#f0d394;display:block}.grandPanel strong{font:21px Georgia;display:block;margin:5px 0}.grandPanel span{font:14px/1.5 Georgia;color:#fff1cb}.guardianArt{width:150px;height:150px;object-fit:cover;border-radius:50%;border:3px solid #e1c27f;display:block;margin:0 auto 20px}#sanctuary .nextAdventure{order:0;margin:0;max-width:850px;border-top:1px solid #efcf8877;border-bottom:1px solid #efcf8877;padding:20px 0}#sanctuary .nextAdventure h2{font-size:25px;margin:8px 0 15px}#sanctuary .nextAdventure button{display:inline-block;min-height:48px;margin:0 10px 10px 0;padding:13px 20px;font-size:16px}#sanctuary .nextAdventure small{display:block;font:13px/1.6 system-ui;color:#e3e7d5;text-shadow:0 2px 5px #000}.grandArchive{order:6;background:#17343cdd;border:1px solid #dbc18b88;border-radius:14px;padding:15px;max-width:850px}.grandArchive summary{cursor:pointer;color:#f4dca7}#grandRoutes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-top:15px}#grandRoutes button{display:flex;gap:10px;align-items:center;text-align:left;font:14px Georgia;min-height:70px}#grandRoutes img{width:50px;height:50px;object-fit:cover;border-radius:50%;border:1px solid #dbbe83}#grandRoutes small{display:block;font:11px/1.5 system-ui;margin-top:5px;color:#c4d9d2}@media(max-width:760px){.grandPanel{top:165px;left:15px;right:15px;padding:10px;gap:10px}.grandPanel img{width:55px;height:55px}.grandPanel strong{font-size:17px}.grandPanel span{font-size:12px}#grandRoutes{grid-template-columns:1fr}#sanctuary .nextAdventure button{width:100%;margin-right:0}.grandPanel:not([hidden])~.gameLayout .journal{opacity:0;pointer-events:none}}

.abilities.grandAbilities{grid-template-columns:repeat(4,minmax(0,1fr))}.abilities.grandAbilities button{min-width:60px}

.apothecaryPortal{margin:20px 0;padding:22px;border:1px solid #d5b77588;border-radius:24px;display:flex;align-items:center;justify-content:center;gap:30px;background:linear-gradient(120deg,#172e3aeb,#344041e8);color:#fff0ce;text-decoration:none;box-shadow:0 12px 40px #0004}.apothecaryPortal h2{margin:8px 0;font-size:30px}.apothecaryPortal strong{color:#f1d590}.potionDisplay{display:flex;align-items:center;max-width:45%}.potionDisplay img{width:33.33%;max-width:140px;filter:drop-shadow(0 5px 15px #edc06a33)}#tideForecast{display:block;font:13px/1.5 system-ui;color:#bcecf2;margin:8px 0}#tideWheel{padding:8px 14px;min-height:44px}@media(max-width:600px){.apothecaryPortal{display:block;text-align:center;padding:18px}.potionDisplay{max-width:280px;margin:0 auto 14px}.apothecaryPortal h2{font-size:26px}.apothecaryPortal p{font-size:14px}}

.roomEntry{display:block;position:relative;z-index:2;margin:14px auto 0;padding:12px 18px;width:fit-content;color:#fff0c8;border:1px solid #dfbf7c88;border-radius:16px;text-decoration:none;background:#214442e8;pointer-events:auto}.roomEntry:hover{background:#3b5e50}

/* Companion selection stays inside the collapsible shortcuts, away from the grid. */
#specialistPanel{border-top:1px solid #d9bc7b77;padding:14px 0;margin-top:14px}#specialistArt{width:70px;height:70px;object-fit:cover;border:2px solid #e3c68c;border-radius:50%;display:block;margin:0 auto 10px}#specialistEffect{display:block;font:12px/1.6 system-ui;color:#d5e6de}.companionAction img{display:block;width:34px;height:34px;object-fit:cover;border-radius:50%;border:1px solid #ffe3aa;margin:0 auto 4px}.abilities .companionAction{border-color:#ffe6a4;background:#42514b}#mission .abilities{max-width:calc(100% - 20px)}@media(max-width:760px){.abilities button{flex-shrink:1;min-width:35px}.abilities .companionAction img{width:28px;height:28px}.abilities.grandAbilities .companionAction{min-width:44px}}

.journeyTravel{position:absolute;z-index:35;top:25%;left:50%;transform:translateX(-50%);width:min(600px,calc(100% - 30px));padding:26px;border:2px solid #e9ce8d;border-radius:25px;background:linear-gradient(135deg,#284953f5,#292a40f5);box-shadow:0 10px 50px #0008;max-height:65svh;overflow-y:auto}.journeyTravel h2{font-size:28px;margin:12px 0}.journeyTravel p{font:15px/1.7 Georgia}.journeyTravel button{display:block;width:100%;min-height:50px;margin-top:14px;padding:14px}.journeyTravel .eyebrow{font:11px system-ui;color:#f6d89a}.sanctuaryExtras a.gold{padding:13px 18px;border-radius:16px;text-decoration:none}

#storyDialog{box-sizing:border-box;width:min(960px,100vw);height:min(820px,94svh);max-width:100vw;max-height:96svh;padding:0;border:1px solid #d8ba7e;border-radius:24px;background:#182f36;color:#fff0d3;overflow:auto}#storyDialog::backdrop{background:#06161bd9}#storyBackdrop{position:absolute;inset:0;background-position:center;background-size:cover;opacity:.65;pointer-events:none}#storyContent{position:relative;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end;padding:70px 26px 28px;box-sizing:border-box;background:linear-gradient(0deg,#10282df5,transparent 95%)}.storyTools{position:absolute;right:15px;top:12px;z-index:2}.storyTools button{min-height:44px}.storyLeadCards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.storyLeadCards button{padding:8px;min-width:0;background:#172e36ed;border:1px solid #ddbe81}.storyLeadCards img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:12px}.storyLeadCards strong{display:block;margin:10px 0}.storyLeadCards small{font:13px/1.5 system-ui;display:block}.storyPortrait{height:clamp(160px,32svh,300px);width:auto;max-width:60%;object-fit:contain;object-position:bottom;margin-left:10px;align-self:flex-start;border-radius:24px 24px 0 0;filter:drop-shadow(0 0 18px #ffdf9f55)}.storySpeech{background:#142e35f5;border:1px solid #e0c68d;border-radius:20px;padding:22px;box-shadow:0 8px 30px #0005}.storySpeech h2{margin:6px 0 12px;font:28px Georgia}.storySpeech p{font:18px/1.65 Georgia;margin:10px 0}.storySpeech small{color:#d8c08c;font:12px system-ui}.storyChoices{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.storyChoices button{min-height:48px;flex:1}.storyJournal{max-height:44svh;overflow:auto}.storyJournal article{padding:14px 0;border-bottom:1px solid #dac28a55}.storyJournal p{font-size:16px}.storySpeech button{min-height:46px}@media(max-width:600px){#storyDialog{height:94svh;border-radius:18px}#storyContent{padding:65px 15px 20px}.storyLeadCards{grid-template-columns:repeat(2,1fr)}.storyLeadCards img{max-height:150px;object-position:top}.storyLeadCards small{font-size:12px}.storySpeech{padding:17px}.storySpeech p{font-size:17px}.storySpeech h2{font-size:24px}.storyPortrait{height:27svh}}

.storyBook{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.storyBook button{text-align:left;background:#203c42;border:1px solid #bdac7f;padding:14px;min-height:78px}.storyBook strong{font:17px/1.4 Georgia;display:block}.storyBook small{display:block;margin-top:7px}.storyBook button:disabled{opacity:.6;cursor:default}.storySpeech .storyBookHelp{font:14px/1.5 system-ui;color:#d7dfd5}.woodlandBook{order:4;min-height:48px;margin:16px 0;background:#193638ed}#storyDialog[open]{animation:storyReveal .22s ease-out}@keyframes storyReveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){#storyDialog[open]{animation:none}}@media(max-width:600px){.storyBook{grid-template-columns:1fr}.storyBook strong{font-size:16px}}
#storyDialog .storySpeech button{color:#fff1d3;background:#25474e;border:1px solid #d7bf85;font:16px/1.4 Georgia;cursor:pointer}#storyDialog .storySpeech button.gold{color:#302718;background:linear-gradient(135deg,#f2dba1,#bd9455);font-weight:bold}#storyDialog .storySpeech button:focus-visible,#storyDialog .storyTools button:focus-visible{outline:3px solid #a8eee3;outline-offset:3px}#storyDialog .storySpeech button:disabled{cursor:default}
#storyDialog .storyTools{position:sticky;top:12px;right:auto;height:0;margin-right:15px;display:flex;justify-content:flex-end;z-index:3}#storyDialog .storyTools button{align-self:flex-start;background:#193b40;color:#fff1d3;border:1px solid #ddc58e}

.storyRouteGroup{border-top:1px solid #d5bd8355;margin-top:12px;padding-top:10px}.storyRouteGroup summary{cursor:pointer;min-height:44px;padding:10px 0;font:19px Georgia;color:#f0d39c}.storyRouteGroup .storyBook{padding:8px 0 12px}
