:root{color-scheme:dark;font-family:system-ui,-apple-system,sans-serif;--ink:#172f38;--paper:#f9edcf;--gold:#f6cc7f;--line:#779488;--green:#a3d6ad;--red:#f29680}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--ink);color:var(--paper)}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.48}button:focus-visible,a:focus-visible{outline:3px solid #ffe8a2;outline-offset:2px}button{border:1px solid #8ca09266;border-radius:9px;background:#233e47ed;min-width:44px;min-height:44px;padding:8px;display:inline-flex;align-items:center;justify-content:center;gap:6px}button:hover:not(:disabled){background:#3b5758}button.gold,.selected{background:#eac27c!important;border-color:#ffdda0!important;color:#263e40!important}.icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:24px;height:24px}.icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}button.big{width:58px;height:54px}button.big .icon,button.big svg{width:29px;height:29px}#app{height:100dvh;position:relative;isolation:isolate}#scene{display:block;position:absolute;left:0;top:0;width:100%;height:100%;touch-action:none;outline:none}#hud{position:absolute;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));top:max(4px,env(safe-area-inset-top));height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;z-index:4;pointer-events:none}.hud-left,.hud-right,.resources{display:flex;align-items:center;gap:7px;pointer-events:auto}.brand{font:700 19px Georgia,serif;color:#fff0cc;text-shadow:0 2px 8px #153137}.resources{background:#142f39de;border:1px solid #8ca09266;border-radius:10px;padding:7px 11px;gap:14px;font-weight:700;font-size:13px}.resource{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.resource .icon,.resource svg{height:19px;width:19px}.hp{color:#b4ebba}.money{color:#f5d18e}.loot{color:#d9c9ef}.resource.danger{color:#ff9f83}#mission-hud{position:absolute;left:50%;top:54px;transform:translateX(-50%);padding:7px 12px;border-radius:9px;background:#17343bcc;border:1px solid #9db29a55;z-index:3;max-width:65%;font-size:12px;display:flex;align-items:center;gap:7px;white-space:nowrap;pointer-events:none}#mission-hud:empty{display:none}#mission-hud .icon,#mission-hud svg{height:18px;width:18px}.paused-badge{color:#ffdf98;font-weight:800;letter-spacing:.12em;font-size:11px;margin-left:12px}#map-tools{position:absolute;right:max(10px,env(safe-area-inset-right));top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:7px;z-index:4}#map-tools:empty{display:none}#selection-hud{position:absolute;right:64px;top:104px;padding:7px 10px;background:#392f34d9;border:1px solid #a16d60;border-radius:9px;font-size:12px;z-index:3;pointer-events:none}#selection-hud:empty{display:none}#hint{position:absolute;bottom:78px;left:12px;right:12px;text-align:center;min-height:18px;color:#ffe4ac;font-size:12px;line-height:1.4;pointer-events:none;text-shadow:0 2px 3px #12313a;z-index:5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#controls{position:absolute;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));height:64px;display:flex;align-items:center;justify-content:space-between;gap:10px;z-index:5}#controls:empty{display:none}.squad-controls,.orders,.road-controls{display:flex;align-items:center;gap:6px}.hero-button{position:relative;width:80px;height:62px;gap:3px;padding:4px 7px;text-align:left;display:grid;grid-template-columns:31px 1fr;grid-template-rows:1fr 5px;overflow:hidden}.hero-button img{width:34px;height:42px;object-fit:cover;border-radius:5px;grid-row:1}.hero-button .hero-label{font-size:10px;line-height:1.35;min-width:0}.hero-button .hero-label b{display:block;font-size:11px;white-space:nowrap}.hero-button .mini-hp{grid-column:1/-1;width:100%;height:4px;background:#173039;border-radius:3px;overflow:hidden}.mini-hp i{height:100%;display:block;background:var(--green)}.hero-button.dead img{filter:grayscale(1)}.hero-button.dead{opacity:.6}.hero-button.dead .hero-label{color:#efbca9}.cooldown{position:absolute;inset:0;background:#142d37a6;color:#f7e6bd;display:grid;place-items:center;font-weight:800;font-size:19px;border-radius:inherit;pointer-events:none}.skill{position:relative;border-color:#b48f58;background:#665232}.skill.ready{box-shadow:inset 0 0 12px #ffdc7833}.road-choice{min-width:54px;background:#28544deb;border-color:#c0d49d;font-size:24px;color:#fbe3ae}.map-position{font-size:12px;background:#142d37dc;padding:10px;border-radius:9px;max-width:200px}.retreat-count{font-size:12px;font-weight:700;color:var(--red)}#panel{position:absolute;inset:76px max(14px,env(safe-area-inset-right)) 25px max(14px,env(safe-area-inset-left));z-index:6;pointer-events:none;display:flex;align-items:center;justify-content:center}#panel:empty{display:none}.panel{pointer-events:auto;background:linear-gradient(130deg,#213d46f8,#19333bf5);border:1px solid #a8b497aa;border-radius:16px;box-shadow:0 18px 60px #0c222c88;padding:20px;max-height:100%;overflow:auto;overscroll-behavior:contain;min-width:0;width:min(900px,100%)}.panel h1,.panel h2{font-family:Georgia,serif;letter-spacing:-.03em;margin:0 0 12px;font-size:28px;color:#f5deb2}.panel h3{font-size:16px;margin:0}.panel p{font-size:13px;line-height:1.5;color:#bdd0c6;margin:8px 0}.panel-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.panel-top h2{margin:0}.tab-row{display:flex;gap:6px}.tab-row button{min-width:48px}.castle-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:18px}.mission-choices{display:flex;flex-direction:column;gap:7px}.mission-option{justify-content:flex-start;text-align:left;padding:10px 12px;gap:12px;min-height:55px}.mission-option>span:last-child{flex:1}.mission-option b{display:block;font-size:14px}.mission-option small{display:block;margin-top:3px;font-size:11px;color:#bdcfc4}.mission-option.selected small{color:#38544e}.hero-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.hero-tile{display:flex;flex-direction:column;gap:3px;min-width:0;padding:5px}.hero-tile img{height:58px;width:58px;border-radius:8px}.hero-tile b{font-size:12px}.hero-tile small{font-size:11px}.castle-summary{display:flex;align-items:center;justify-content:space-between;margin-top:12px;gap:10px;font-size:12px}.castle-summary button{flex:1;max-width:200px;font-weight:700}.danger-note{display:flex;align-items:center;gap:5px;color:#f4b49d;font-size:11px;margin-top:10px}.toolbar-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:10px}.inventory-list{display:flex;flex-direction:column;gap:7px;max-height:180px;overflow:auto}.inventory-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #8f9d8a55;border-radius:8px}.inventory-row .item-name{flex:1;font-size:13px}.inventory-row small{font-size:11px;display:block;color:#b5c8bd}.grave-list{display:flex;gap:8px;flex-wrap:wrap}.grave-list>span{border:1px solid #9d827c77;border-radius:8px;padding:10px;font-size:12px;color:#d5bdb3}.encounter-panel{width:min(620px,94%);text-align:center}.encounter-panel .scene-icon{display:flex;justify-content:center;color:var(--gold);margin:0 0 8px}.scene-icon .icon,.scene-icon svg{width:48px;height:48px}.reward-line{display:flex;justify-content:center;gap:20px;margin:15px 0;font-size:20px;color:#f0d196}.loot-items{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:12px 0}.loot-item{border:1px solid var(--tier);color:var(--tier);padding:8px 12px;border-radius:8px;font-size:13px}.encounter-actions{display:flex;justify-content:center;gap:8px;margin-top:14px}.encounter-actions button{min-width:76px}.report-deaths{color:#ecab97;font-size:13px}.tiny-link{color:#a5c4bd;font-size:11px}dialog{width:min(630px,94vw);max-height:88dvh;overflow:auto;border:1px solid #9aa989;border-radius:14px;background:#213c45;color:var(--paper);padding:20px;box-shadow:0 20px 80px #0008}dialog::backdrop{background:#091f2cc4}dialog h2{font-family:Georgia,serif;margin:0 0 16px}dialog p{font-size:13px;line-height:1.5;color:#bed1c6}dialog .help-row{display:flex;gap:12px;align-items:center;margin:12px 0;font-size:13px}dialog .help-row .icon{color:var(--gold)}dialog>button{display:flex;margin:14px 0 0 auto;min-width:70px}#rotate{display:none}#fatal{position:fixed;z-index:30;inset:0;background:#162f38;padding:30px;align-items:center;justify-content:center;flex-direction:column;text-align:center;font-size:15px}#fatal:not([hidden]){display:flex}#fatal a{color:var(--gold);margin:20px}#fatal h2{font-family:Georgia,serif}#fatal p{max-width:500px;line-height:1.6}.webgl-loading{color:var(--gold)}
@media(max-width:800px){.brand{font-size:16px}.resources{gap:9px;padding:7px 8px;font-size:12px}.hud-left{gap:7px}.panel{padding:14px}.panel h2{font-size:23px}.hero-tile img{height:46px;width:46px}.mission-option{padding:7px 9px;min-height:48px}.mission-option b{font-size:12px}.hero-grid{gap:4px}.castle-layout{gap:12px}.hero-button{width:70px;padding:4px;grid-template-columns:28px 1fr}.hero-button img{width:29px;height:37px}.hero-button .hero-label b{font-size:10px}.hero-button .hero-label{font-size:10px}.squad-controls,.orders{gap:4px}button.big{min-width:44px;width:48px;height:52px}#controls{gap:5px}.map-position{font-size:11px;max-width:160px}.hero-tile b{font-size:11px}.panel p{font-size:12px}}
@media(max-height:380px) and (orientation:landscape){#hud{height:40px;top:2px}.brand{display:none}#mission-hud{top:47px;padding:5px 9px;font-size:11px}#panel{inset:52px 10px 9px}.panel{padding:12px}.panel h2{font-size:22px}.panel-top{margin-bottom:8px}.mission-option{min-height:45px;padding:6px 8px}.hero-tile img{height:42px;width:42px}.castle-summary{margin-top:8px}.danger-note{margin-top:6px}.hero-button{height:54px}.hero-button img{height:31px}.hero-grid{gap:3px}#controls{height:54px;bottom:4px}#hint{bottom:62px;font-size:11px}.inventory-list{max-height:130px}.encounter-panel .scene-icon{display:none}.panel h1{font-size:23px}.reward-line{margin:10px 0;font-size:17px}.loot-items{margin:8px 0}.encounter-actions{margin-top:8px}.hero-tile small{font-size:10px}.castle-summary{font-size:11px}}
@media(orientation:portrait){#rotate{display:flex;position:fixed;inset:0;z-index:50;background:radial-gradient(circle at 50% 40%,#36574e,#152e38 70%);flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}#rotate>span{font-size:90px;color:var(--gold)}#rotate strong{font:700 30px Georgia,serif}#rotate p{font-size:14px;color:#c0d2c7}#app{visibility:hidden}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Keep the entire battlefield clear of HUDs; roads render inside this viewport. */
#scene{top:48px;height:calc(100% - 124px)}
.mission-option small{display:flex;gap:5px;align-items:center}
.mission-option small .icon,.mission-option small svg,.hero-tile small .icon,.hero-tile small svg{width:13px;height:13px}
.hero-tile small{display:flex;gap:4px;align-items:center}
body[data-screen=castle] #panel{top:58px;bottom:12px}
@media(max-height:380px) and (orientation:landscape){#scene{top:44px;height:calc(100% - 108px)}body[data-screen=castle] #panel{top:49px;bottom:8px}}
@media(max-height:500px) and (orientation:landscape){.encounter-panel{padding:14px}.encounter-panel .scene-icon{display:none}.encounter-panel h2{font-size:24px;margin-bottom:8px}.encounter-panel .reward-line{margin:10px 0;font-size:18px}.encounter-panel .loot-items{margin:8px 0}.encounter-panel p{margin:6px 0;font-size:12px}.encounter-actions{margin-top:10px}}
.mission-brief{font-size:11px!important;margin:7px 0 0!important;color:#d4d7b9!important}
@media(max-height:380px) and (orientation:landscape){.mission-brief{margin-top:3px!important}.castle-panel .panel-top{margin-bottom:6px}}
.party-pages{display:flex;justify-content:space-between;align-items:center;margin-top:5px}.party-pages button{padding:5px}.party-pages small{font-size:11px}.party-paged .hero-tile img{height:40px;width:40px}.party-paged .danger-note{display:none}
body[data-screen=battle] #mission-hud{top:7px;padding:5px 8px;gap:3px;height:36px}body[data-screen=battle] .paused-badge{margin-left:6px;font-size:10px}.hud-right button[data-count]{position:relative}.hud-right button[data-count]:after{content:attr(data-count);position:absolute;right:4px;bottom:1px;font-size:10px;font-weight:800;color:var(--gold)}

/* Explicit reference sheets; primary castle and combat stay viewport-bound. */
.building-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.building-card{padding:12px;border:1px solid #aec19977;border-radius:12px;background:#31514766;display:flex;align-items:center;flex-direction:column;gap:9px;min-width:0}.building-card h3{display:flex;align-items:center;gap:6px}.building-card p{font-size:12px!important;text-align:center;margin:0}.building-card button{width:100%;font-size:12px;gap:4px}.building-card button .icon,.building-card button svg{width:17px;height:17px}.building-level{color:var(--gold);letter-spacing:5px}.quest-cargo{display:flex;align-items:center;justify-content:center;gap:8px;color:#c5edac;font-weight:700;margin:8px 0}
#soldier-detail{width:min(620px,94vw);padding:15px}.soldier-heading{display:flex;align-items:center;gap:12px}.soldier-heading>img{width:65px;height:65px;border:1px solid #9aaf91;border-radius:10px}.soldier-heading h2{margin:0 0 4px;font-size:25px}.soldier-heading>button{margin-left:auto}.soldier-heading small{color:#c6d0ba}.stat-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin:14px 0;gap:8px}.stat-grid>div{display:flex;align-items:center;flex-direction:column;gap:5px;padding:9px 3px;background:#152f3888;border-radius:8px}.stat-grid .icon{color:var(--gold)}.stat-grid small{font-size:10px;color:#beccbb;white-space:nowrap}.soldier-footer{display:flex;align-items:center;justify-content:space-between;font-size:12px;gap:8px}.soldier-footer>span{display:flex;align-items:center;gap:5px;flex-wrap:wrap;max-width:72%}.soldier-footer small{display:block;width:100%;color:#d7c997;font-size:11px}.soldier-footer button{font-size:12px;white-space:nowrap}
@media(max-width:800px){.panel-top h2{font-size:19px}.tab-row{gap:4px}.tab-row button{min-width:44px}.building-grid{gap:7px}.building-card{padding:9px 7px}.building-card h3{font-size:14px}.building-card button{padding:6px;gap:2px}.building-card p{font-size:11px!important}#soldier-detail{padding:12px}.soldier-heading>img{width:53px;height:53px}.soldier-heading h2{font-size:21px}.stat-grid{gap:5px;margin:10px 0}.stat-grid>div{padding:7px 2px}}
body[data-screen=battle] .brand{display:none}body[data-screen=battle] #mission-hud{left:40%;max-width:100px}
@media(max-width:650px){body[data-screen=battle] #mission-hud{left:41%;padding:4px}.building-card h3 .icon{display:none}}

.hero-info-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.hero-info-heading h3{font-size:15px}

.mission-pages{display:flex;align-items:center;justify-content:space-between;margin-top:5px;gap:5px}.mission-pages button{padding:4px}.mission-pages span{font-size:11px;color:#cccfb1}.map-position small{display:block;font-size:10px;color:#c4d6ae;margin:3px 0 0 24px}
.story-panel{width:min(900px,100%);padding:18px}.story-heading{display:flex;align-items:center;gap:8px;margin-bottom:12px}.story-heading h2{font-size:25px;margin:0;flex:1}.story-heading>span:last-child{font-size:11px;color:#b9cfbd}.story-layout{display:grid;grid-template-columns:1.05fr 1fr;gap:22px}.story-copy p{font-size:15px;line-height:1.55;margin:0 0 14px;color:#f1e5c8}.story-copy>small{font-size:11px;color:#abc1b4;display:flex;gap:6px;align-items:center}.story-copy>small .icon{height:17px;width:17px}.story-choices{display:flex;flex-direction:column;gap:8px}.story-choices button{justify-content:flex-start;text-align:left;min-height:57px;padding:7px 10px;gap:9px}.story-choices button>span:last-child{min-width:0}.story-choices b{display:block;font-size:13px}.story-choices small{display:block;font-size:11px;font-weight:400;line-height:1.35;color:#c7d4c1;margin-top:3px}.story-choices .class-choice{border-color:#8abdd0;background:#244a58}.story-choices .class-choice b{color:#bce2ec}.encounter-story{max-width:560px;margin:6px auto!important;color:#e8dfc2!important}
@media(max-width:800px){.story-panel{padding:13px}.story-layout{gap:12px;grid-template-columns:1fr 1.05fr}.story-heading{margin-bottom:9px}.story-heading h2{font-size:21px}.story-heading>span:last-child{display:none}.story-copy p{font-size:13px;line-height:1.45;margin-bottom:8px}.story-copy>small{font-size:10px}.story-choices{gap:6px}.story-choices button{min-height:54px;padding:6px 8px}.story-choices b{font-size:12px}.story-choices small{font-size:10px}.mission-brief{font-size:10px!important}.mission-option{min-height:44px}.mission-pages{margin-top:3px}}
@media(max-height:380px) and (orientation:landscape){.story-panel{padding:12px}.story-heading h2{font-size:20px}.story-copy p{font-size:12px;line-height:1.4}.story-copy>small{display:none}.story-choices button{min-height:52px}.story-heading{margin-bottom:8px}.mission-brief{font-size:10px!important;line-height:1.3!important}.mission-option small{margin-top:1px}.mission-choices{gap:4px}.mission-pages button{min-height:44px}.mission-pages{margin-top:3px}}

.hero-button .hero-label{min-height:0;white-space:nowrap;overflow:hidden}.hero-button .hero-label b{overflow:hidden;text-overflow:ellipsis}

.mission-option small{justify-content:space-between;min-width:0}.mission-region{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mission-pay{display:flex;align-items:center;gap:3px;flex:none}

/* Town is the default castle screen; labels are native 44px building targets. */
#town-hotspots{position:absolute;inset:48px 0 76px;z-index:5;pointer-events:none}#town-hotspots:empty{display:none}.town-hotspot{position:absolute;transform:translate(-50%,-20%);pointer-events:auto;background:#183740ed;border-color:#c5bd8a;min-width:118px;box-shadow:0 3px 12px #14283388;font-size:13px;line-height:1.1}.town-hotspot>span:last-child{text-align:left}.town-hotspot small{display:block;color:#d1d4ad;font-size:10px;margin-top:3px}.town-hotspot .icon{color:var(--gold)}
.resource-summary{padding:0;background:none!important;border:0;min-height:44px}.resource-summary .resources{border-radius:9px}.field-resources{display:grid;grid-template-columns:repeat(3,auto);gap:1px 12px;padding:3px 8px;font-size:11px}.field-resources .icon,.field-resources svg{width:15px;height:15px}.field-resources .resource{gap:3px;line-height:16px}.resource-legend small{display:block;color:#b8cfc1;font-size:12px;line-height:1.4;margin-top:3px}.hud-right{gap:5px}body[data-screen=map] .brand,body[data-screen=encounter] .brand{display:none}
.company-layout{display:grid;grid-template-columns:180px minmax(0,1fr);gap:15px}.company-members{display:flex;flex-direction:column;gap:6px}.company-members button{justify-content:flex-start;text-align:left;font-size:12px}.company-members img{width:37px;height:37px;border-radius:6px}.company-members small{display:block;font-size:10px;margin-top:3px}.company-layout .inventory-list{max-height:230px}.company-layout .hero-info-heading h3{font-size:15px}.company-layout .reward-line{font-size:16px;margin:8px 0}.clinic-layout{display:grid;grid-template-columns:1.3fr 1fr;gap:18px}.clinic-list{max-height:240px;overflow:auto;display:flex;flex-direction:column;gap:7px}.clinic-row{display:flex;align-items:center;gap:9px;padding:6px;border:1px solid #8da18b77;border-radius:8px}.clinic-row img{width:40px;height:40px;border-radius:5px}.clinic-row>span{flex:1;font-size:13px}.clinic-row small{display:block;font-size:10px;color:#d7c89d;margin-top:4px}.clinic-row button{font-size:12px}.clinic-row button .icon,.clinic-row button svg{width:18px;height:18px}
@media(max-width:800px){.hud-left{gap:3px}.hud-right{gap:3px}.hud-right button{padding:6px}.company-layout{grid-template-columns:145px minmax(0,1fr);gap:10px}.clinic-layout{gap:10px}.town-hotspot{min-width:106px;font-size:12px;padding:6px}.town-hotspot .icon{width:20px}.resource-summary .resources{gap:1px 10px}.resources:not(.field-resources){gap:8px}}
@media(max-height:380px) and (orientation:landscape){#town-hotspots{top:44px;bottom:64px}.clinic-list{max-height:190px}.town-hotspot{min-width:102px}.town-hotspot small{font-size:9px}.company-layout .inventory-list{max-height:140px}body[data-screen=battle] #mission-hud{left:42%;max-width:90px}.field-resources{font-size:10px}}

/* Return planning is an explicit reference sheet, never an auto-travel/heal shortcut. */
.home-plan{flex:none;gap:4px;padding:6px 9px}.home-plan small{font-size:12px}.return-layout{display:grid;grid-template-columns:1fr 1fr;gap:18px}.return-layout h3{margin:0;font-size:15px}.return-layout p{font-size:12px}.return-route{color:#eee0b7!important}.return-cost{display:flex;gap:12px;font-size:12px;color:#d4e9b0}.return-patients{display:flex;flex-direction:column;gap:6px;margin-top:10px}.return-patients>div{display:grid;grid-template-columns:1fr auto;font-size:12px;gap:4px;background:#16303988;border-radius:6px;padding:7px}.return-patients small{grid-column:1/-1;color:#d6c59f;font-size:10px}.return-layout>div>button{max-width:100%;font-size:12px}#return-plan{width:min(740px,94vw)}
@media(max-width:650px){body[data-screen=map] .map-position{max-width:118px;font-size:10px;padding:7px}.road-choice{min-width:44px;padding:5px}.road-controls{gap:4px}.home-plan{padding:5px}.return-layout{gap:12px}.return-layout h3{font-size:13px}}

#return-plan[open]{display:flex;flex-direction:column;overflow:hidden}#return-plan .panel-top{flex:none}#return-plan .return-layout{overflow:auto;min-height:0;overscroll-behavior:contain;padding-right:3px}#return-plan .return-footer{flex:none;display:flex;justify-content:flex-end;margin-top:10px}#return-plan .return-footer:empty{display:none}.return-footer button{font-size:12px;min-height:44px}
@media(max-height:380px) and (orientation:landscape){#return-plan{padding:10px;max-height:94dvh}#return-plan .panel-top{margin-bottom:6px}#return-plan h2{font-size:20px}#return-plan .return-layout p{font-size:11px;line-height:1.35;margin:5px 0}#return-plan .return-patients{gap:4px;margin-top:6px}#return-plan .return-patients>div{padding:4px;font-size:11px;gap:2px}#return-plan .return-footer{margin-top:6px}}

/* Saved sortie preparation: visible wounded reserves, not a free recovery action. */
.party-readiness{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;margin-top:8px;font-size:12px}.party-readiness>strong{font-size:12px}.party-readiness>small{grid-column:1;line-height:1.4;color:#d2dccc}.party-readiness>button{grid-column:2;grid-row:1/3;padding:5px;font-size:12px}.party-readiness button small{max-width:80px;font-size:10px}.party-readiness .icon,.party-readiness svg{width:17px;height:17px}
@media(max-height:380px) and (orientation:landscape){.party-readiness{margin-top:4px;font-size:10px}.party-readiness>strong{font-size:10px}.party-readiness>button{gap:3px}.party-readiness button small{max-width:55px;font-size:9px}.party-paged .hero-tile img{height:36px;width:36px}.party-paged .hero-tile b{font-size:10px}}
@media(max-height:380px) and (orientation:landscape){.castle-panel .hero-tile img{height:36px;width:36px}.castle-panel .hero-tile small{line-height:1.1}.castle-panel .hero-tile .icon,.castle-panel .hero-tile svg{width:12px;height:12px}.castle-panel .danger-note{display:none}.castle-panel .mission-brief{font-size:11px;line-height:1.25}}
@media(max-height:500px) and (orientation:landscape){.fresh-preparation .mission-brief{display:none}.fresh-preparation .party-readiness>small{display:none}.fresh-preparation .party-readiness>button{grid-row:1}.fresh-preparation .mission-choices{gap:4px}.fresh-preparation .mission-option{min-height:44px;padding:6px 8px}.fresh-preparation .mission-pages{margin-top:0}.castle-panel:has(.fresh-preparation){padding:10px}.fresh-preparation .party-readiness{align-items:center;margin-top:1px}}
.castle-panel .hero-tile small{white-space:nowrap}

/* Retreat is a paused tactical decision; countdown keeps its full touch slot. */
.retreat-active{position:relative;color:var(--red);border-color:var(--red)}.retreat-active small{position:absolute;right:2px;bottom:1px;background:#173039;font-size:11px;border-radius:3px;padding:0 2px}
#retreat-plan{width:min(670px,94vw)}#retreat-plan h2{margin:0;font-size:24px}.retreat-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:16px}.retreat-layout h3{font-size:15px;margin:0}.retreat-layout p{font-size:12px;line-height:1.4}.retreat-layout .danger-note{font-weight:700;color:#ffb29d}.retreat-actions{display:flex;justify-content:space-between;gap:8px;margin-top:10px}.retreat-actions button{font-size:12px}
@media(max-height:380px) and (orientation:landscape){#retreat-plan{padding:12px;max-height:94dvh}#retreat-plan h2{font-size:20px}#retreat-plan .panel-top{margin-bottom:8px}.retreat-layout{gap:12px}.retreat-layout h3{font-size:13px}.retreat-layout p{font-size:11px;margin:5px 0}.retreat-actions{margin-top:6px}}

/* Native precise targeting without tiny 3D hitboxes or blind cycling. */
#selection-hud{padding:0;pointer-events:auto;right:12px;top:58px;background:transparent;border:0}#selection-hud button{min-height:44px;max-width:220px;padding:5px 8px;font-size:11px;background:#392f34ed}#selection-hud small{display:block;font-size:10px;color:#ffcc9b}
#target-plan{width:min(660px,96vw);padding:12px;max-height:96dvh}#target-plan h2{font-size:20px}#target-plan .panel-top{margin-bottom:6px}.target-layout{display:grid;grid-template-columns:minmax(170px,1fr) 1.5fr;gap:12px}.target-list{display:grid;grid-template-rows:44px 44px 44px;gap:4px}.target-list>button{justify-content:space-between;padding:4px 8px;font-size:12px}.target-list small{font-size:10px}.target-pages{grid-row:3;display:flex;align-items:center;justify-content:space-between}.target-detail{font-size:12px;line-height:1.3}.target-detail p{font-size:11px;line-height:1.35;margin:6px 0}.target-detail .danger-note{color:#ffb29d}.target-actions{display:flex;justify-content:space-between;gap:8px;margin-top:6px}.target-actions button{font-size:12px;min-height:44px}

/* Explicit road reference: browsing never spends or discloses fogged sites. */
body[data-screen=map] .map-position{display:grid;grid-template-columns:24px minmax(0,1fr);text-align:left;gap:1px 5px;min-width:100px;line-height:1.2}body[data-screen=map] .map-position>.icon{grid-row:1/4}body[data-screen=map] .map-position small{margin:0;grid-column:2}.map-name{font-size:10px;color:var(--gold);grid-column:2}#road-plan{width:min(740px,96vw);overflow:hidden}.road-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.road-card{min-width:0;background:#16303988;border:1px solid #8a9b7766;border-radius:9px;padding:12px;display:flex;flex-direction:column}.road-card h3{font-size:16px;margin:0}.road-card p{font-size:12px;margin:8px 0;line-height:1.4}.road-card .road-service{flex:1;color:#e1cfaa}.road-card button{font-size:12px;width:100%;flex:none}.road-lethal{color:var(--red)}.road-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}.road-pages small{font-size:11px}
@media(max-height:440px) and (orientation:landscape){#road-plan{padding:10px;max-height:96dvh}#road-plan .panel-top{margin-bottom:6px}#road-plan h2{font-size:19px}#road-plan .road-options{gap:8px}#road-plan .road-card{padding:8px}#road-plan .road-card h3{font-size:14px}#road-plan .road-card p{font-size:11px;margin:5px 0}#road-plan .road-pages{margin-top:6px}}

.map-position .location-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;grid-column:2}body[data-screen=map] .map-position{height:58px;max-height:58px}

/* Primary clinic: two paid decisions per page, never a hidden eight-patient scroll. */
.clinic-list{max-height:none;overflow:visible;gap:6px}.clinic-row{padding:3px;gap:4px;min-width:0}.clinic-patient{flex:1;min-width:0;justify-content:flex-start;text-align:left;border:0;background:transparent;padding:2px;gap:6px}.clinic-patient span{min-width:0}.clinic-patient b{display:block;white-space:nowrap;font-size:12px}.clinic-patient small{font-size:10px;line-height:1.35;margin:2px 0 0}.clinic-patient img{width:32px;height:40px}.clinic-pages{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:6px}.clinic-pages small{font-size:11px}.clinic-summary{display:flex;flex-direction:column;gap:6px;min-width:0}.clinic-summary p{margin:0;line-height:1.4}.clinic-summary>button{font-size:12px}.clinic-summary>button small{font-size:10px}.clinic-layout{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
@media(max-height:380px) and (orientation:landscape){.clinic-list{max-height:none}.clinic-layout{gap:8px}.clinic-summary p{font-size:11px}.clinic-row>button:last-child{padding:5px;gap:3px}.clinic-patient{padding:2px}.clinic-summary>button{padding:5px;font-size:11px}}

.target-crew{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-bottom:6px}.target-crew button{min-height:44px;padding:3px;font-size:11px;display:flex;flex-direction:column;gap:0}.target-crew small{font-size:10px}.target-detail .impact-receipt{font-size:10px;color:#ffcfb6}#target-plan:has(.target-crew){padding:9px}.target-detail p{margin:4px 0}

#target-plan .target-crew{flex:1;margin:0}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px!important;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Explicit patient orders stay bounded at the shortest landscape size. */
#support-plan{width:min(660px,96vw);max-height:96dvh;padding:9px}#support-plan h2{font-size:18px}#support-plan .panel-top{margin-bottom:6px}.support-layout{display:grid;grid-template-columns:minmax(175px,1fr) 1.5fr;gap:10px}.support-list{display:grid;grid-template-rows:44px 44px 44px;gap:4px}.support-list>button{justify-content:space-between;padding:4px 7px;font-size:12px}.support-list small{font-size:10px}.support-detail{font-size:11px;line-height:1.3}.support-detail p{margin:4px 0}.support-detail small{font-size:10px}.support-threat{color:#ffcfb6}.support-actions{display:flex;gap:6px;justify-content:space-between;margin-top:6px}.support-actions button{min-height:44px;font-size:11px;padding:4px 8px}

.support-detail button.support-threat{display:flex;flex-direction:column;align-items:flex-start;min-height:44px;width:100%;font-size:10px;line-height:1.25;padding:4px 6px;margin:4px 0;text-align:left;gap:2px}

/* Persistent selected-order caption: no extra primary row or page scrolling. */
#order-hud{position:absolute;left:8px;top:58px;z-index:3;max-width:min(210px,31vw)}#order-hud:empty{display:none}#order-hud button{font-size:11px;max-width:100%;min-height:44px;padding:5px 8px}#order-hud span:not(.icon){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#order-plan{width:min(600px,94vw)}#order-plan h2{font-size:20px;margin:0}#order-plan .panel-top{margin-bottom:6px}#order-plan p{font-size:12px;line-height:1.35;margin:6px 0}#order-plan>button{margin-top:8px}

/* Mission tracker stays readable and tappable, without disclosing fogged sites. */
body[data-screen=map] #mission-hud{left:8px;top:52px;transform:none;padding:0;border:0;background:none;max-width:min(320px,48vw);pointer-events:auto;white-space:normal}
.quest-track{min-height:46px;max-width:100%;justify-content:flex-start;text-align:left;background:#18373eea;border-color:#d1b879;box-shadow:0 3px 14px #122a3444;padding:5px 9px;gap:8px}
.quest-track>span:last-child{min-width:0}.quest-track b{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quest-track small{display:block;font-size:10px;color:#e2d0a4;line-height:1.4}.quest-track>.icon{color:var(--gold)}
#help:has(.mission-dossier){width:min(800px,94vw)}.dossier-title{display:flex;align-items:center;gap:12px}.dossier-title>.icon{color:var(--gold);width:36px;height:36px}.dossier-title h2{margin:3px 0;font-size:26px}.dossier-title small,.journal-kicker{color:var(--gold);font-size:10px;letter-spacing:.08em}.mission-dossier .contract-description{color:#fff0cd;border-bottom:1px solid #a5b19b55;padding-bottom:10px}.dossier-columns{display:grid;grid-template-columns:1.1fr 1fr;gap:22px}.dossier-columns h3,.local-chronicle h3{margin:0;font:18px Georgia,serif;color:#f2d397}.mission-dossier blockquote{margin:10px 0;padding:8px 12px;border-left:2px solid #c3a36d;color:#e7d8b8;font-size:12px;font-style:italic;line-height:1.5}.quest-checklist>div{display:flex;gap:7px;align-items:center;font-size:12px;padding:8px 0}.quest-checklist .icon{color:var(--gold)}.quest-checklist small{display:block;font-size:10px;color:#aacbb9;margin-top:4px}.journal-return{color:#e5d0a0!important}.local-chronicle{margin-top:14px;border-top:1px solid #9aaa8855;padding-top:12px}.local-chronicle p{font-style:italic}.dossier-columns>section>small:last-child{font-size:10px;color:#b8cdbb}

/* Hit areas cover the actual buildings. Only a small service seal stays visible. */
.town-hotspot{width:84px;height:64px;min-width:44px;border:0!important;background:transparent!important;box-shadow:none;transform:translate(-50%,-55%);padding:0;border-radius:40%}
.town-hotspot>.icon{position:absolute;right:1px;bottom:0;width:28px;height:28px;border:1px solid #d9c68a99;border-radius:50%;background:#17383fe0;padding:5px;box-shadow:0 2px 6px #142b3377}.town-hotspot>.icon svg{width:18px;height:18px}
.town-hotspot:hover,.town-hotspot:focus-visible{box-shadow:0 0 18px 3px #ffe5ac66;background:#ffe3a317!important}
.town-hotspot .town-tooltip{display:none;position:absolute;bottom:-31px;left:50%;transform:translateX(-50%);background:#17333df5;border:1px solid #c0ac75;border-radius:6px;padding:5px 8px;white-space:nowrap;font-size:11px;pointer-events:none;z-index:2}
.town-hotspot:hover .town-tooltip,.town-hotspot:focus-visible .town-tooltip{display:block}.town-tooltip small{font-size:9px}.town-count{position:absolute;right:-2px;bottom:22px;background:#ab644d;border:1px solid #f3cf9a;border-radius:9px;font:bold 10px system-ui;font-style:normal;min-width:17px;padding:2px;color:white}
.quick-stats{display:flex;gap:7px;margin:8px 0}.quick-stats>span{display:grid;grid-template-columns:19px auto;align-items:center;gap:2px 5px;background:#142f3988;border-radius:7px;padding:5px 7px;flex:1}.quick-stats .icon,.quick-stats svg{width:18px;height:18px;color:var(--gold)}.quick-stats b{font-size:18px}.quick-stats small{grid-column:1/-1;color:#c5d3bf;font-size:10px}
.equipped-weapon{display:flex;gap:8px;align-items:center;background:#142e3655;border:1px solid #a9986955;border-radius:7px;padding:7px;font-size:12px}.equipped-weapon .icon{color:var(--gold)}.equipped-weapon small{display:block;font-size:10px;color:#d2c5a4}.equipped-weapon b{display:block;margin:2px 0}.member-weapon{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e8ce96}.member-comparison{color:#d5e6c4!important}.company-layout{grid-template-columns:195px minmax(0,1fr)}.company-members{min-height:0;max-height:340px;overflow:auto}.company-members button{flex:none;min-width:0}.company-members button>span{min-width:0}.company-layout>div:last-child>p{font-size:10px;line-height:1.3}.company-layout .inventory-list{margin-top:8px}.company-layout .quick-stats{gap:4px}.company-layout .quick-stats>span{padding:5px}.company-layout .hero-info-heading h3{font-size:13px}
.selected-soldier{display:flex;gap:4px;align-items:stretch}.selected-soldier>button:first-child{flex:1;text-align:left;min-width:0}.selected-soldier>button:first-child>span{display:block;white-space:normal}.selected-soldier b{font-size:11px}.selected-soldier small{display:block;font-size:10px;color:#e7cea0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:135px}.selected-soldier>button:last-child{width:44px;padding:5px!important;flex:none}
@media(max-height:380px) and (orientation:landscape){body[data-screen=map] #mission-hud{top:47px;max-width:46vw}.quest-track{padding:4px 7px}.quest-track b{font-size:11px}.quest-track small{font-size:10px}.town-hotspot{width:72px;height:58px;min-width:44px}.town-hotspot .town-tooltip{bottom:-24px;padding:3px 6px}.company-layout{grid-template-columns:175px minmax(0,1fr);gap:10px}.company-members{max-height:228px}.company-members img{width:29px;height:36px}.company-members button{padding:4px;gap:5px}.member-weapon{max-width:125px}.quick-stats{margin:5px 0}.equipped-weapon{padding:5px}#order-hud{top:54px;max-width:190px}.dossier-columns{gap:15px}}
.recruit-row{margin-top:6px}.recruit-row small{font-size:11px}
@media(max-height:380px) and (orientation:landscape){.castle-layout:has(.recruit-row) .quick-stats{margin:4px 0}.castle-layout:has(.recruit-row) .quick-stats b{font-size:16px}.castle-layout:has(.recruit-row) .equipped-weapon{padding:3px 5px}}
#company-detail{width:min(740px,96vw);padding:12px;max-height:94dvh}#company-detail[open]{display:flex;flex-direction:column;overflow:hidden}#company-detail .panel-top{flex:none;margin-bottom:8px}#company-detail .company-layout{min-height:0;overflow:hidden}#company-detail .company-members{max-height:none;overflow:auto}#company-detail .company-layout>div:last-child{overflow:auto;min-height:0;padding-right:3px}
@media(max-height:380px) and (orientation:landscape){#company-detail{height:94dvh;padding:10px}#company-detail h2{font-size:20px}.company-members{gap:4px}.company-members button{padding:3px;line-height:1.1}.company-members small{margin-top:1px;line-height:1.1}.company-layout .inventory-list{max-height:100px}}
#help:has(.mission-dossier)>button{display:none}.dossier-title>button{margin-left:auto;flex:none}.mission-dossier .dossier-title{position:sticky;top:-20px;background:#213c45;z-index:1;padding:4px 0}
@media(max-height:380px) and (orientation:landscape){.castle-panel:has(.recruit-row) .quick-stats>span{padding:3px 5px}.castle-panel:has(.recruit-row) .equipped-weapon{padding:2px 5px}.castle-panel:has(.recruit-row) .equipped-weapon b{margin:0}.castle-panel:has(.recruit-row) .recruit-row{margin-top:4px}}
.member-comparison .icon,.member-comparison svg,.selected-soldier small .icon,.selected-soldier small svg{display:inline-flex!important;width:12px;height:12px;vertical-align:-2px}.company-members .selected small{color:#304a42!important}
/* Recovery is a short scene beside its treasure, not another vertical text stack. */
.loot-items:empty{display:none}.encounter-panel:has(.quest-cargo){display:grid;grid-template-columns:1.1fr 1fr;column-gap:18px;text-align:left;width:min(800px,94%)}.encounter-panel:has(.quest-cargo) .scene-icon{display:none}.encounter-panel:has(.quest-cargo)>h2{grid-column:1/-1;text-align:center}.encounter-panel:has(.quest-cargo)>.reward-line{grid-column:2;grid-row:2;margin:4px 0}.encounter-panel:has(.quest-cargo)>.loot-items{grid-column:2;grid-row:3;margin:5px 0;align-self:center}.encounter-panel:has(.quest-cargo)>.encounter-story{grid-column:1;grid-row:2/4;align-self:center;line-height:1.45;font-size:13px!important;margin:6px 0!important}.encounter-panel:has(.quest-cargo)>.quest-cargo{grid-column:1/-1;margin:6px 0}.encounter-panel:has(.quest-cargo)>.loot-return{display:none}.encounter-panel:has(.quest-cargo)>.encounter-actions{grid-column:1/-1;margin-top:6px}
@media(max-height:380px) and (orientation:landscape){.encounter-panel:has(.quest-cargo){column-gap:12px}.encounter-panel:has(.quest-cargo)>.encounter-story{font-size:12px!important;line-height:1.4}.encounter-panel:has(.quest-cargo) .loot-item{font-size:11px;padding:5px 7px}.encounter-panel:has(.quest-cargo)>.reward-line{gap:10px}}

.mission-route{margin-top:12px;padding:10px;border:1px solid #c3a36d;border-radius:9px;background:#162f3888}.mission-route h3{margin:0;color:var(--gold);font-size:15px}.mission-route p{overflow-wrap:anywhere}.mission-route button{font-size:12px}.road-choice.quest-road,.road-card.quest-road{border-color:var(--gold);box-shadow:inset 0 0 0 1px #f6cc7f88}

/* Couple world-space search clues to the camera-space road arrows. */
.road-choice{flex-direction:column;gap:0;line-height:1}.road-choice small{font-size:10px;line-height:12px;font-weight:700;color:#d9e7c3}.road-bearing{color:var(--gold);font:700 11px system-ui;white-space:nowrap}

/* Weapon swaps expose total attack and actual ownership/health cost before acting. */
.inventory-row .equipment-comparison{color:#f5ddb0;font-weight:700;margin-top:3px}.inventory-row .equipment-consequence{color:#d9dbca}.inventory-row .item-name{min-width:0;overflow-wrap:anywhere}

.company-layout .hero-info-heading .equipped-weapon{padding:0;border:0;background:none;font-size:11px;gap:4px}.company-layout .hero-info-heading .equipped-weapon b{margin:0}.company-layout .hero-info-heading .equipped-weapon .icon{width:17px;height:17px}
.company-layout .hero-info-heading h3{margin:0 0 3px}
@media(max-height:380px) and (orientation:landscape){.company-layout .inventory-list{max-height:112px}}

/* Existing paid repair remains actionable while the return modal owns input. */
#return-plan .return-footer{justify-content:space-between;gap:8px}#return-plan .return-footer button{min-width:44px;min-height:44px}

/* Empty-food arrows consult the existing road quote before spending hull. */
.road-choice .road-cost{color:var(--red);font-size:10px;white-space:nowrap}

/* Named field purchases remain full-size in short landscape. */
.encounter-panel:has([data-id="medicine"]) {width:min(760px,98%)}
.encounter-panel:has([data-id="medicine"]) .encounter-actions{gap:5px}
.encounter-panel:has([data-id="medicine"]) .encounter-actions button{min-width:44px;font-size:12px;padding:6px;gap:3px}
.encounter-panel:has([data-id="medicine"]) .encounter-actions .icon,.encounter-panel:has([data-id="medicine"]) .encounter-actions svg{width:18px;height:18px}

/* Keep pending-contract banking and retained finite care visible in the existing hall. */
.castle-panel .stop-receipt{font-size:11px;line-height:1.35;margin:6px 0}
@media(max-height:380px) and (orientation:landscape){
 .castle-panel:has(.stop-receipt) .encounter-actions{margin-top:4px;gap:5px}
 .castle-panel:has(.stop-receipt) .encounter-actions button{font-size:12px;padding:5px;min-height:44px}
 .castle-panel:has(.stop-receipt) .encounter-actions .icon{width:18px;height:18px}
 .castle-panel:has(.stop-receipt) .stop-receipt{font-size:10px;line-height:1.3;margin:4px 0}
}

/* Recruitment consequences stay visible beside the existing finite hire controls. */
.castle-panel .recruit-note{font-size:11px;line-height:1.25;margin:4px 0}.castle-panel:has(.recruit-row) .hero-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-height:460px) and (orientation:landscape){.castle-panel:has(.recruit-row) .hero-info-heading h3{font-size:12px}.castle-panel:has(.recruit-row) .quick-stats{margin:2px 0}.castle-panel:has(.recruit-row) .recruit-note{font-size:10px;margin:2px 0}.castle-panel:has(.recruit-row) .equipped-weapon{font-size:10px}.castle-panel:has(.recruit-row) .hero-grid{gap:3px}.castle-panel:has(.recruit-row) .hero-tile img{height:38px;width:38px}}
@media(max-height:460px) and (orientation:landscape){.castle-panel:has(.recruit-row){padding:8px 12px}.castle-panel:has(.recruit-row) .panel-top{margin-bottom:5px}.castle-panel:has(.recruit-row) .quick-stats>span{padding:1px 4px}.castle-panel:has(.recruit-row) .quick-stats small{font-size:9px}.castle-panel:has(.recruit-row) .equipped-weapon{padding:0 4px}}

/* The scene continues behind individually floating controls, never a reserved top bar. */
#scene{inset:0;width:100%;height:100%}#hud{background:transparent;border:0;box-shadow:none}.hud-right{padding:0}.hud-right>button{box-shadow:0 2px 9px #102c3444;background:#193942d9;border-color:#aac4ac66}body[data-screen=battle] #mission-hud{left:39%;max-width:82px}
#app[inert]{visibility:hidden}#start-menu{position:fixed;inset:0;z-index:20;background:#203e37 url('assets/menu/dawn-fortress-v3-compact.webp') center/cover no-repeat;display:flex;align-items:center;padding:clamp(14px,4vw,70px);isolation:isolate}#start-menu[hidden]{display:none}#start-menu::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0f282bb8,transparent 75%);z-index:-1}.start-panel{width:350px;max-width:48vw;padding:25px;background:linear-gradient(125deg,#142f37ee,#173b3ad6);border:1px solid #dbc286bb;border-radius:15px;box-shadow:0 20px 60px #10282a88}.menu-eyebrow{font-size:10px;letter-spacing:.25em;color:#e0c38a}.start-panel h1{font:normal 36px/1.1 Georgia,serif;color:#ffedc3;text-shadow:0 3px 10px #061f23;margin:12px 0}.menu-subtitle{font-size:12px;line-height:1.5;color:#d4e0cf;margin:0 0 18px}.start-actions{display:flex;flex-direction:column;gap:9px}.start-actions button{justify-content:flex-start;padding:11px 14px;gap:12px;min-height:48px;font-weight:650}.menu-note{font-size:10px;line-height:1.4;color:#c5d4bd;margin:14px 0 0;max-width:550px}.menu-art-caption{position:absolute;right:22px;bottom:18px;font:italic 18px Georgia,serif;color:#fff1c8;text-shadow:0 2px 8px #172e35}.load-panel{width:min(760px,96vw);max-height:94dvh;margin:auto;padding:18px;background:#16363eea;border:1px solid #d8bf83aa;border-radius:13px;box-shadow:0 15px 60px #0e252d88}.load-panel h2{font:25px Georgia,serif;margin:0}.save-list{display:flex;flex-direction:column;gap:6px}.save-list>button{height:56px;justify-content:space-between;text-align:left;padding:7px 11px}.save-list b{display:block;font-size:13px}.save-list small{display:block;color:#c1d4c2;font-size:11px;margin-top:4px}.save-pages,.save-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px}.save-pages small{font-size:11px}.save-tools button{font-size:12px}.load-panel .menu-note{margin-top:6px}.upgrade-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.upgrade-grid article{background:#16343c99;border:1px solid #aebc9677;border-radius:9px;padding:10px;display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center}.upgrade-grid h3{display:flex;align-items:center;gap:6px;font-size:16px;margin:0}.upgrade-grid article>small{color:var(--gold);letter-spacing:3px}.upgrade-grid p{font-size:12px!important;margin:0!important;flex:1}.upgrade-grid button{font-size:12px;width:100%;gap:5px}.upgrade-grid .icon,.upgrade-grid svg{width:20px;height:20px}.upgrade-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}.upgrade-pages>small{font-size:11px;text-align:center}.tab-row button:has(small){padding:5px 8px;gap:4px}.tab-row button small{font-size:10px}.forge-options{display:flex;gap:8px}.forge-options button{flex:1;font-size:12px}.forge-receipt{margin:12px 0;padding:10px;border:1px solid #a5a07977;border-radius:8px;background:#18333baa}.forge-receipt h3{font:20px Georgia,serif;margin:0 0 8px;color:#ffe1a0}.forge-receipt p{font-size:12px;line-height:1.5;margin:0}.forge-confirm{width:100%;font-size:12px;gap:5px}.forge-warning{display:block;font-size:10px;line-height:1.4;margin-top:7px;color:#ddcba2}#forge-preview{width:min(660px,96vw);padding:12px;max-height:96dvh}#forge-preview h2{font-size:22px}
@media(max-height:500px) and (orientation:landscape){#start-menu{padding:12px 22px}.start-panel{padding:16px 19px;width:310px;max-width:52vw}.start-panel h1{font-size:30px;margin:8px 0}.menu-subtitle{font-size:11px;margin-bottom:10px}.start-actions{gap:6px}.start-actions button{min-height:44px;padding:7px 12px}.start-panel .menu-note{margin-top:9px;font-size:9px}.menu-art-caption{font-size:13px;right:14px;bottom:12px}.load-panel{padding:10px 13px}.load-panel .panel-top{margin-bottom:6px}.save-list>button{height:49px}.save-list small{font-size:10px;margin-top:2px}.save-pages,.save-tools{margin-top:5px}.load-panel .menu-note{font-size:9px}.upgrade-grid{gap:8px}.upgrade-grid article{padding:7px;gap:3px}.upgrade-grid h3{font-size:14px}.upgrade-grid p{font-size:11px!important}.upgrade-pages>small{font-size:10px}.forge-receipt{margin:7px 0;padding:7px}.forge-receipt h3{font-size:18px;margin-bottom:4px}#forge-preview .panel-top{margin-bottom:6px}.forge-receipt p{font-size:11px;line-height:1.35}#forge-preview .forge-confirm{margin-top:6px}.forge-warning{margin-top:5px}}
@media(orientation:portrait){#rotate{z-index:60}}
.save-row{display:flex;gap:6px;align-items:stretch;min-width:0}.save-row>button:first-child{flex:1;min-width:0;height:56px;justify-content:space-between;text-align:left;padding:7px 11px}.save-row>button:first-child>span:first-child{min-width:0}.save-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.save-row>button:last-child:not(:first-child){width:44px;flex:none;color:#e7b7a0}.save-row small{display:block;color:#c1d4c2;font-size:11px;margin-top:4px}
@media(max-height:500px) and (orientation:landscape){.save-row>button:first-child{height:49px}.save-row small{font-size:10px;margin-top:2px}}

/* Native four-slot equipment screen; collection never masquerades as usable gear. */
.menu-full{position:absolute;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));background:#193a40d9;border-color:#d8c28c;box-shadow:0 3px 15px #102a3b77}
#company-detail{width:min(960px,96vw);height:min(560px,94dvh);max-height:94dvh;padding:12px}#company-detail .rpg-heading{margin:0 0 8px;flex:none}#company-detail .rpg-heading h2{font:24px Georgia,serif;margin:0}.rpg-layout{display:grid;grid-template-columns:minmax(175px,.85fr) minmax(0,1.4fr);gap:14px;min-height:0;flex:1}.rpg-character{display:grid;grid-template-rows:44px minmax(90px,1fr) 25px 31px;gap:4px;min-height:0;background:radial-gradient(ellipse,#41616277,#172f3977);border:1px solid #a7b69b55;border-radius:10px;padding:8px}.rpg-character select{font:12px system-ui;background:#203d45;color:#f5e6c4;border:1px solid #a8b69788;border-radius:7px;min-height:44px;min-width:0;width:100%;padding:4px}.rpg-doll{position:relative;min-height:0;display:flex;align-items:center;justify-content:center}.rpg-doll>img{width:min(74%,190px);max-height:95%;object-fit:contain;border-radius:50%;filter:drop-shadow(0 6px 8px #071f2a)}.gear-slot{position:absolute;width:48px;height:48px;padding:3px;background:#203a43e8;border:1px solid #c7b781;display:flex;flex-direction:column;gap:0;box-shadow:0 2px 9px #0e283e55}.gear-slot .icon,.gear-slot svg{width:22px;height:22px}.gear-slot small{font-size:9px}.slot-helmet{left:calc(50% - 24px);top:0}.slot-armor{left:0;top:calc(50% - 24px)}.slot-weapon{right:0;top:calc(50% - 24px)}.slot-shield{left:calc(50% - 24px);bottom:0}.gear-slot.broken{border-color:#f4957b;color:#ffb19a}.rpg-stats{display:flex;justify-content:center;gap:12px;font-size:14px;font-weight:bold}.rpg-stats .icon,.rpg-stats svg{height:17px;width:17px}.rpg-slot-name{text-align:center;overflow:hidden;font-size:11px;line-height:1.25}.rpg-slot-name small{display:block;font-size:10px;color:#d5c797;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.rpg-inventory{min-height:0;display:grid;grid-template-rows:44px minmax(64px,1fr) 44px 44px 15px;gap:4px}.rpg-tabs{display:flex;gap:5px;min-width:0}.rpg-tabs button{flex:1;font-size:12px;padding:4px;min-width:44px;gap:4px}.rpg-tabs .icon,.rpg-tabs svg{height:19px;width:19px}.rpg-item{min-height:0;overflow:auto;padding:8px 10px;border:1px solid #b2b99166;border-radius:8px;background:#16303999}.rpg-item h3{display:flex;align-items:center;gap:6px;margin:0 0 4px;font-size:17px;line-height:1.2}.rpg-item h3 .icon,.rpg-item h3 svg{height:20px;width:20px}.rpg-item>small{font-size:11px;color:#cfd1b1}.rpg-item p{font-size:12px;line-height:1.4;margin:5px 0 0;color:#bcd3c8}.item-condition{height:4px;background:#081e2c;border-radius:3px;overflow:hidden;margin-top:5px}.item-condition i{display:block;height:100%;background:#d5b46d}.gear-pages{display:flex;align-items:center;justify-content:space-between}.gear-pages small{font-size:11px}.gear-actions{display:flex;gap:4px;min-width:0}.gear-actions button{flex:1;min-width:44px;font-size:10px;padding:2px;flex-direction:column;gap:1px;min-height:44px}.gear-actions .icon,.gear-actions svg{height:17px;width:17px}.gear-location{font-size:10px;color:#d5c69f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gear-actions:empty{visibility:hidden}#gear-service,#wreck-loot{width:min(680px,94vw);padding:14px;max-height:94dvh}#gear-service h2,#wreck-loot h2{font-size:21px;margin:0}#gear-service p,#wreck-loot p{font-size:12px;line-height:1.4}#gear-service>small{display:block;font-size:10px;margin-top:8px;color:#d1c598}#wreck-hud{position:absolute;left:8px;bottom:79px;z-index:4}#wreck-hud:empty{display:none}#wreck-hud button{font-size:11px;min-height:44px;background:#53432edb;border-color:#d1b570}.wreck-report{color:#d9d6aa!important;font-size:11px!important}.soldier-footer:has([data-action=equipment-open]){gap:5px}.soldier-footer:has([data-action=equipment-open])>span{max-width:60%}.soldier-footer [data-action=equipment-open]{min-width:44px;font-size:11px;padding:5px}
@media(max-height:500px) and (orientation:landscape){#company-detail{padding:9px}.rpg-layout{gap:9px}.rpg-character{padding:4px;grid-template-rows:44px minmax(85px,1fr) 22px 27px;gap:2px}.rpg-inventory{grid-template-rows:44px minmax(61px,1fr) 44px 44px 12px;gap:3px}.rpg-item{padding:4px 6px}.rpg-item h3{font-size:13px;margin-bottom:1px}.rpg-item>small{font-size:10px}.rpg-item p{font-size:10px;line-height:1.25;margin-top:3px}.rpg-item h3 .icon,.rpg-item h3 svg{height:16px;width:16px}.item-condition{height:3px;margin-top:3px}.rpg-tabs button{font-size:10px;gap:3px}.rpg-tabs .icon,.rpg-tabs svg{height:16px;width:16px}#company-detail .rpg-heading{margin-bottom:5px}#company-detail .rpg-heading h2{font-size:20px}.gear-slot{width:44px;height:44px}.slot-helmet,.slot-shield{left:calc(50% - 22px)}.slot-armor,.slot-weapon{top:calc(50% - 22px)}.gear-location{font-size:9px}#wreck-hud{bottom:70px}#gear-service,#wreck-loot{padding:11px}#gear-service p,#wreck-loot p{font-size:11px;margin:8px 0}}

.rpg-stats{gap:13px;font-size:13px}.rpg-stats>span{position:relative;display:flex;gap:3px;align-items:flex-start;line-height:16px;padding-bottom:10px}.rpg-stats>span>small{position:absolute;left:0;right:0;bottom:0;font-size:8px;line-height:10px;font-weight:normal;text-align:center;color:#c6d2b6}
@media(max-height:500px) and (orientation:landscape){.rpg-character{grid-template-rows:44px minmax(81px,1fr) 28px 25px}.rpg-stats{font-size:12px;gap:10px}}

/* Night-shift clarity: ownership and a single magical accessory, not automatic borrowing. */
.slot-amulet{right:0;bottom:0}.rpg-character:has(.slot-amulet) .slot-shield{left:0}.forge-item-owner{color:#f2d7a0!important;font-weight:600}.rpg-item .amulet-effects{color:#c9deaf;line-height:1.5}.castle-panel h2{font-size:22px}.rpg-heading h2{font-size:20px!important}.inventory-row .item-name{font-size:12px}.toolbar-row button{font-size:12px}.rpg-item h3{font-size:15px}
@media(max-height:500px) and (orientation:landscape){.rpg-character{grid-template-rows:44px minmax(92px,1fr) 28px 25px}.rpg-character:has(.slot-amulet) .slot-armor,.rpg-character:has(.slot-amulet) .slot-weapon{top:0}.rpg-item h3{font-size:12px}.castle-panel h2{font-size:20px}.toolbar-row button{font-size:11px}.rpg-character:has(.slot-amulet) .slot-shield{left:0}.rpg-item .amulet-effects{font-size:11px}}

.castle-panel .forge-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;flex-wrap:nowrap}.castle-panel .forge-actions button{width:100%;min-width:44px;padding:4px;font-size:11px;gap:3px}.castle-panel .forge-actions .icon,.castle-panel .forge-actions svg{width:18px;height:18px}

/* Forge services: explicit owner, result and wallet before committing resources. */
#gear-service .service-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:16px;margin:8px 0}
.service-owner{color:#f2d7a0;font-size:12px;font-weight:600}.service-wallet{border-left:1px solid #c9bb8266;padding-left:14px}.service-wallet>small{font-size:11px;color:#dacb9e}.service-price{display:flex;align-items:center;gap:5px;font-size:16px;margin-top:8px}.service-price .icon,.service-wallet p .icon{width:18px;height:18px;vertical-align:middle}.service-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.service-footer>small{font-size:11px;color:#d1c598}.service-footer button{min-width:110px;min-height:44px}.gear-actions button{position:relative}.gear-actions button:has(small){gap:0}.gear-actions button:has(small)>.icon{display:none}.gear-actions button small{font-size:11px;color:#e7c985}
@media(max-height:500px) and (orientation:landscape){#gear-service .service-layout{gap:10px;margin:3px 0}#gear-service .service-layout p{font-size:11px;line-height:1.3;margin:6px 0}.service-owner{font-size:11px}.service-wallet{padding-left:10px}.service-price{margin-top:6px}.service-footer>small{font-size:10px}}

/* Direct selection shares the existing pager row; no extra vertical menu. */
.gear-pages{gap:6px;min-width:0}.gear-pages>button{flex:none}.gear-pages select{flex:1;min-width:44px;width:0;min-height:44px;background:#203d45;color:#f5e6c4;border:1px solid #a8b69788;border-radius:7px;padding:4px;font:11px system-ui}

/* Bounded forge ledger: browse all slots and route to the actual item/holder. */
.forge-stock{display:flex;flex-direction:column;min-height:0;gap:5px}.forge-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.forge-filters select{width:100%;min-width:0;min-height:44px;padding:4px;font:11px system-ui;background:#203d45;color:#f5e6c4;border:1px solid #a8b69788;border-radius:7px}.forge-stock .inventory-list{flex:1;min-height:0;max-height:180px}.forge-stock .forge-actions{flex:none;margin-top:0}.castle-layout:has(.forge-stock){height:230px;max-height:calc(100dvh - 185px)}.forge-stock .inventory-row{flex:none;gap:6px;padding:6px}.forge-stock .inventory-row>button{flex:none}.forge-stock .inventory-row small{font-size:10px}
@media(max-height:380px) and (orientation:landscape){.castle-layout:has(.forge-stock){height:186px;max-height:calc(100dvh - 134px)}}

/* Equipped passives stay visible in the tactical sheet; same 44px direct slot action. */
.soldier-amulet{width:100%;min-height:44px;display:flex;justify-content:flex-start;gap:8px;padding:4px 8px;margin:0 0 7px;font-size:12px;text-align:left;background:#203e43;border-color:#8b9570}
.soldier-amulet>span{min-width:0;flex:1}.soldier-amulet b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.soldier-amulet small{display:block;color:#d7c997;font-size:11px;line-height:1.3}.soldier-amulet>.icon{flex:none;color:var(--gold)}
@media(max-height:380px) and (orientation:landscape){#soldier-detail{padding:10px}.soldier-heading>img{width:44px;height:44px}.soldier-heading h2{font-size:19px}.stat-grid{margin:7px 0}.stat-grid>div{gap:3px;padding:5px 2px}.soldier-amulet{margin-bottom:5px}}
/* Readiness is decision-critical; unlike long weapon names it must not ellipsize. */
.selected-soldier small.ability-status{white-space:normal;overflow:visible;max-width:135px;line-height:1.25;color:#f5c6a6}.selected-soldier small.ability-status.available{color:#b4ebba}

/* Exact wreck inventory is a reference list; recovery and close never scroll away. */
#wreck-loot[open]{display:flex;flex-direction:column;height:min(470px,94dvh);overflow:hidden;gap:8px}#wreck-loot .panel-top{flex:none;margin:0}#wreck-loot .wreck-summary{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px}#wreck-loot .reward-line{margin:0;gap:10px;font-size:14px}.wreck-items{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid #9ba88566;border-radius:8px;padding:6px}.wreck-items article{padding:6px;border-bottom:1px solid #829a8c44;font-size:12px;overflow-wrap:anywhere}.wreck-items article:last-child{border:0}.wreck-items small{display:block;margin-top:3px;color:#d7c79d;font-size:11px}.wreck-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}.wreck-footer small{font-size:11px;color:#bed1c6}.wreck-footer button{font-size:12px;flex:none}
@media(max-height:380px) and (orientation:landscape){#wreck-loot[open]{gap:5px}#wreck-loot .panel-top h2{font-size:19px}.wreck-items article{padding:5px}.wreck-footer small{font-size:10px}}

/* Preparation warnings reuse the existing readiness row, not a new panel. */
.party-readiness:has(.departure-wear)>strong,.party-readiness:has(.departure-wear)>small{display:none}.party-readiness>.departure-wear{grid-column:1;grid-row:1/3;min-width:0;padding:4px;gap:4px;text-align:left;border-color:#daaa69}.departure-wear span{min-width:0}.departure-wear b{display:block;font-size:10px;overflow-wrap:anywhere}.party-readiness .departure-wear small{display:block;max-width:none;font-size:9px}.weapon-wear{color:#ffe0a4}
@media(max-height:380px) and (orientation:landscape){.fresh-preparation .party-readiness>.departure-wear{grid-row:1;min-height:44px}.fresh-preparation .departure-wear small{font-size:8px}.fresh-preparation .departure-wear b{font-size:10px}.fresh-preparation .hero-tile:has(.weapon-wear){gap:1px}.fresh-preparation .hero-tile:has(.weapon-wear) img{height:30px;width:30px}}
.hero-tile.selected .weapon-wear{color:#65401f;font-weight:700}

/* Last-ration retrace receipt stays inside the primary road choice. */
.road-card .road-reserve{display:block;font-size:11px;line-height:1.25;border-top:1px solid #8a9b7755;padding-top:5px;margin:3px 0 6px;color:var(--gold)}.road-card .road-reserve.danger-note{color:var(--red)}
@media(max-height:440px) and (orientation:landscape){#road-plan .road-card .road-reserve{font-size:10px;margin:2px 0 4px;padding-top:3px}#road-plan .road-card p{margin:3px 0}#road-plan .road-card .road-service{font-size:10px;line-height:1.25}#road-plan .road-card{padding:7px}}

#order-plan .order-actions{display:flex;gap:8px;margin-top:8px}#order-plan .order-actions button{flex:1;min-width:0;font-size:12px}

/* Individual clinic decisions expose exact remaining/missing bank without a new panel. */
.clinic-row>button[data-action="treat"]{flex-direction:column;gap:2px;min-width:76px}.clinic-row>button[data-action="treat"]>span{display:flex;align-items:center;gap:3px}.clinic-row>button[data-action="treat"]>small{font-size:10px;margin:0;white-space:nowrap}

/* Earned loot is inspectable before continuing; only the comparison list scrolls. */
button.loot-item{min-height:44px;gap:5px}button.loot-item>.icon:last-child,button.loot-item>.icon:last-child svg{width:17px;height:17px}
#loot-review[open]{display:flex;flex-direction:column;width:min(660px,96vw);max-height:94dvh;padding:12px;gap:8px;overflow:hidden}
#loot-review .panel-top{margin:0;flex:none}#loot-review h2{font:21px Georgia,serif;margin:0;overflow-wrap:anywhere}#loot-review .loot-description{font-size:12px;line-height:1.4;margin:0;flex:none;color:#eed2a0}
.loot-comparisons{min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid #9ba88566;border-radius:8px;padding:5px}.loot-comparisons article{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px;border-bottom:1px solid #829a8c44;font-size:12px}.loot-comparisons article:last-child{border:0}.loot-comparisons article>div{min-width:0}.loot-comparisons small{display:block;font-size:11px;line-height:1.35;color:#c6d6ba}.loot-comparisons button{flex:none;font-size:11px}.loot-warning{font-size:11px;color:#d8c99f;flex:none}
@media(max-height:380px) and (orientation:landscape){#loot-review[open]{gap:5px;padding:9px}#loot-review h2{font-size:18px}.loot-comparisons article{padding:3px}.loot-warning{font-size:10px}}
@media(max-height:380px) and (orientation:landscape){.encounter-panel:has(button.loot-item){padding:10px}.encounter-panel:has(button.loot-item) h2{font-size:21px;margin-bottom:5px}.encounter-panel:has(button.loot-item) .reward-line,.encounter-panel:has(button.loot-item) .loot-items{margin:5px 0}.encounter-panel:has(button.loot-item) .loot-return{font-size:11px;margin:4px 0}}

.recovery-journal{border-top:1px solid #adb69066;padding-top:8px}.recovery-journal article{border:1px solid #adb69066;border-radius:8px;padding:8px;margin:8px 0}.recovery-journal button{font-size:12px;min-height:44px}.recovery-journal h3 .icon{vertical-align:middle}

/* Real holdout objectives and bounded victory results, including earned multi-loot. */
.hold-target{display:flex;flex-direction:column;gap:2px;white-space:normal;text-align:center}.hold-target b{font-size:12px}.hold-target small{font-size:10px;color:#cbdcc5}
body[data-screen=battle] #mission-hud:has(.hold-target){top:53px;left:50%;width:max-content;max-width:min(330px,70vw);height:auto;padding:5px 8px;gap:5px}
.victory-panel{width:min(780px,98%)}.victory-panel .scene-icon{display:none}.victory-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:center}.victory-context{text-align:left}.victory-loot{min-width:0}.victory-loot .reward-line{margin:4px 0}.victory-loot .loot-items{margin:5px 0}.victory-panel .victory-recovery,.victory-panel .loot-return{margin:4px 0}
@media(max-height:500px) and (orientation:landscape){.victory-panel{padding:10px}.victory-panel h2{font-size:21px;margin-bottom:5px}.victory-body{gap:10px}.victory-panel .encounter-actions{margin-top:5px}.victory-panel .loot-item{font-size:11px;padding:5px 7px}.victory-panel p{font-size:11px;line-height:1.4}.victory-panel .loot-return{font-size:11px}.victory-panel .reward-line{gap:12px}}

.victory-footer{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:6px}.victory-footer .encounter-actions{margin:0}.victory-footer .loot-return{display:flex;align-items:center;gap:5px;max-width:300px}

@media(max-width:650px) and (orientation:landscape){body[data-screen=battle] #mission-hud:has(.hold-target){top:130px}}
/* Whole-party kit is an optional reference; primary departure stays compact. */
#party-kit{width:min(840px,96vw);max-height:calc(100dvh - 16px);padding:12px;overflow:hidden}
#party-kit[open]{display:flex;flex-direction:column;gap:8px}
#party-kit h2{font-size:16px;margin:0}.kit-ledger{overflow:auto;min-height:0;overscroll-behavior:contain}.kit-ledger article+article{margin-top:10px}.kit-ledger h3{font-size:12px;margin:0 0 5px;color:#f1d6a5}.kit-slots{display:grid;grid-template-columns:1fr 1fr;gap:5px}.kit-slots button{min-height:50px;text-align:left;padding:5px;gap:5px;min-width:0}.kit-slots button>span:not(.icon){flex:1;min-width:0}.kit-slots b,.kit-slots small{display:block;overflow-wrap:anywhere}.kit-slots b{font-size:11px}.kit-slots small{font-size:10px;line-height:1.3}.kit-slots .icon{width:18px;flex-shrink:0}.kit-slots .kit-worn{border-color:#e3a163;background:#563f35}.kit-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0}.kit-footer small{font-size:11px}#party-kit>.panel-top{flex-shrink:0;margin:0}
@media(max-height:380px){#party-kit{padding:8px;gap:5px}#party-kit h2{font-size:14px}.kit-footer small{font-size:10px}}

/* Earned return/defeat receipts remain primary panels, not scrollable references. */
.report-panel{width:min(760px,98%)}.report-body{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center}.report-body>.report-ledger:only-child{grid-column:1/-1}.report-body .encounter-story{margin:0!important}.report-panel .report-deaths{margin:6px 0}.report-panel .encounter-actions{margin-top:8px}
@media(max-height:500px) and (orientation:landscape){.report-panel{padding:10px}.report-panel h2{font-size:21px;margin-bottom:5px}.report-panel .reward-line{margin:5px 0;font-size:17px}.report-panel .report-deaths{font-size:11px;margin:5px 0}.report-body{gap:12px}.report-body p{font-size:11px;line-height:1.4;margin:4px 0}.report-panel .encounter-actions{margin-top:5px}}

.kit-tools{display:flex;align-items:center;gap:8px;flex-shrink:0}.kit-budget{flex:1;min-width:0;font-size:11px;line-height:1.35}.kit-budget b,.kit-budget small{display:block;overflow-wrap:anywhere}.kit-budget small{font-size:10px}.kit-tools button{min-width:90px;min-height:44px;padding:5px}.kit-tools button[aria-pressed=true]{border-color:#edb969;background:#563f35}

.kit-short{color:#f1a78c}

/* Finite camp choice: food/repair first, then known-road hunger; no new controls. */
.camp-return{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px;font-size:11px;line-height:1.35;text-align:left;margin:6px 0}.camp-return>div{display:flex;flex-direction:column;border-left:2px solid #94b7a3;padding-left:7px}.camp-return b{color:#f5deb2}.camp-return>small{grid-column:1/-1;text-align:center;font-size:10px;color:#bdd0c6}.camp-return .camp-danger{color:#ffb099;font-weight:700}
@media(max-height:380px) and (orientation:landscape){.encounter-panel:has(.camp-return){width:min(650px,98%);padding:10px}.encounter-panel:has(.camp-return) h2{font-size:21px;margin-bottom:4px}.encounter-panel:has(.camp-return) p{font-size:11px;line-height:1.35;margin:4px 0}.encounter-panel:has(.camp-return) .encounter-actions{margin-top:6px}.encounter-panel:has(.camp-return) .encounter-actions button{font-size:12px}}

.kit-care{min-width:0;font-size:11px;line-height:1.3}.kit-care b,.kit-care small{display:block;overflow-wrap:anywhere}.kit-care small{font-size:10px}.kit-footer>button{flex-shrink:0}

/* Known lost cargo is inspectable remotely, never collectible from this ledger. */
.wreck-remote{font-size:11px;color:#e4c98c;text-align:right}.recovery-journal article>button{margin:3px 4px 3px 0}

/* Cargo is an optional scrollable reference, never a scrolling retreat decision. */
#cargo-manifest{width:min(680px,94vw);padding:12px;max-height:94dvh}#cargo-manifest[open]{display:flex;flex-direction:column;height:min(470px,94dvh);overflow:hidden;gap:8px}#cargo-manifest .panel-top{flex:none;margin:0}#cargo-manifest h2{font-size:21px;margin:0}#cargo-manifest .wreck-summary{flex:none;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px}#cargo-manifest .reward-line{margin:0;gap:10px;font-size:14px}#cargo-manifest .wreck-footer{flex-wrap:wrap}#cargo-manifest .wreck-footer small{font-size:10px}.retreat-actions [data-action=retreat-cargo]{flex:none}

/* General instructions are available on demand through ?, not repeated in menus. */
.rpg-heading h2{flex:1}.rules-section{margin:16px 0}.rules-section h3{font-size:15px;margin:0 0 7px}.rules-section .help-row{font-size:12px;line-height:1.45}

.service-footer,.wreck-footer{justify-content:flex-end}

/* Transaction quotes are visible before the explicit, cancellable sale. */
.item-sale-price{color:#f1d18e}.forge-sale-price{font-size:11px;color:#f1d18e;white-space:nowrap}
#gear-service.sale-confirmation h2{font-size:19px;line-height:1.25;overflow-wrap:anywhere}
#gear-service.sale-confirmation .service-price{font-weight:700;color:#f1d18e}
@media(max-height:500px) and (orientation:landscape){#gear-service.sale-confirmation h2{font-size:17px}.forge-sale-price{font-size:10px}}

/* Illustrated castle: the bitmap and traced hit areas share one contain-fit plane. */
body[data-screen=castle] #scene{visibility:hidden;pointer-events:none}
body[data-screen=castle] #town-hotspots{inset:0;display:flex;align-items:center;justify-content:center;z-index:2;background:#16282b;isolation:isolate;overflow:hidden}
body[data-screen=castle] #town-hotspots::before{content:"";position:absolute;inset:-20px;z-index:-1;background:linear-gradient(#14252966,#14252999),url('assets/castle/dawn-courtyard-v2-compact.webp') center/cover;filter:blur(16px);pointer-events:none}
.castle-art-plane{position:relative;width:min(100%,calc((100dvh - 52px)*1672/941));aspect-ratio:1672/941;flex:none;margin-top:44px;box-shadow:0 0 45px #0b191a88;pointer-events:none}
.castle-art{display:block;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none}
body[data-screen=castle] .town-hotspot{transform:none;min-width:0;min-height:0;border:0!important;border-radius:0;padding:0;background:transparent!important;box-shadow:none;pointer-events:auto;display:block;isolation:isolate}
.town-outline{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.town-outline polygon{fill:#ffdf8c00;stroke:#ffe2a300;stroke-width:2;vector-effect:non-scaling-stroke;transition:fill .16s,stroke .16s}
body[data-screen=castle] .town-hotspot:hover,body[data-screen=castle] .town-hotspot:focus-visible{box-shadow:none;background:transparent!important;outline:none}
.town-hotspot:hover .town-outline polygon,.town-hotspot:focus-visible .town-outline polygon{fill:#ffdf8c26;stroke:#ffe2a3e6}
.town-marker{position:absolute;left:var(--entry-x);top:var(--entry-y);transform:translate(-50%,-50%);display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#192a2bd9;border:1px solid #d9b97fca;box-shadow:0 2px 8px #101b1dc2;color:#ffe1a0;pointer-events:none}
.town-marker .icon,.town-marker svg{width:17px;height:17px}
body[data-screen=castle] .town-tooltip{display:none;position:absolute;z-index:4;bottom:5px;left:50%;transform:translateX(-50%);padding:7px 13px;border:1px solid #c9ab73;border-radius:7px;background:#162a2bf5;text-align:center;white-space:nowrap;pointer-events:none;box-shadow:0 3px 15px #101c1dc9}
body[data-screen=castle] .town-hotspot:hover+.town-tooltip,body[data-screen=castle] .town-hotspot:focus-visible+.town-tooltip{display:block}
.town-tooltip b{font:16px Georgia,serif;color:#ffe5b0}.town-tooltip small{display:block;font-size:10px;color:#d7ddcb;margin-top:3px}
.castle-caption{position:absolute;left:12px;bottom:8px;display:flex;align-items:center;gap:10px;pointer-events:none;text-shadow:0 2px 5px #081d21,0 0 12px #081d21}
.castle-caption b{font:17px Georgia,serif;color:#fff0ce}.castle-caption span{font-size:10px;color:#e6dcc5}
body[data-screen=castle][data-castle-panel=open] .castle-art-plane{filter:brightness(.5) saturate(.8)}
@media(max-height:380px) and (orientation:landscape){.castle-art-plane{width:min(100%,calc((100dvh - 46px)*1672/941));margin-top:42px}.town-marker{width:23px;height:23px}.town-marker .icon,.town-marker svg{width:15px;height:15px}.castle-caption{bottom:5px}.castle-caption b{font-size:14px}.castle-caption span{font-size:9px}}
@media(prefers-reduced-motion:reduce){.town-outline polygon{transition:none}}
