/* Ver 3.0: readable controls, content-sized rows, and separate scene/roster layers. */
:root{font-size:16px;--ink-soft:#49615a}
*,*::before,*::after{box-sizing:border-box}
button{overflow-wrap:anywhere}button:focus-visible,summary:focus-visible{outline:3px solid #b77a15;outline-offset:3px}
button,input,select{font-size:14px}select{min-height:44px}button:disabled{opacity:.6}
.primary,.soft-button,.text-button{font-size:14px}.primary,.soft-button{min-height:42px}
h1{font-size:26px}h2{font-size:20px}h3{font-size:16px}
.screen-instruction,.muted,.chip,.attention-bar,.attention-link,.nav-item b,.nav-bottom,.nav-bottom .text-button{font-size:14px}
.eyebrow{font-size:11px;letter-spacing:.08em}.section-heading{flex-wrap:wrap}.section-heading>div{min-width:0}
.workspace{grid-template-columns:190px minmax(0,1fr)}.nav-item{padding:12px 9px;min-height:46px;gap:8px}.nav-item b{white-space:normal}
.environment .topbar{grid-template-columns:minmax(210px,1fr) auto minmax(245px,1fr) auto;gap:16px;padding:12px 18px}
.brand small,.brand small b,.day-display small,.weather-summary small,.weather-summary summary,.weather-summary .weather-effects,.weather-effects small{font-size:13px}
.header-actions{flex-wrap:wrap;justify-content:flex-end}.header-actions .soft-button{min-height:40px}.day-display{flex-shrink:0}
.resourcebar{overflow-x:auto;min-height:46px}.resource{font-size:14px;flex:0 0 auto;padding:8px 14px}.rescue-small{font-size:13px;flex-shrink:0}
.environment .workspace main{padding:20px;scrollbar-gutter:stable}
.content-grid.view-map{grid-template-columns:minmax(0,1fr) 350px;gap:20px}
.map-pin .pin-name{font-size:12px}.map-pin{min-width:28px;min-height:28px;padding:2px;gap:3px}.pin-dot{width:20px;height:20px}
.view-map .map-frame{aspect-ratio:3/2}.view-map .map-caption{max-width:40%}.map-bottom{font-size:13px;flex-wrap:wrap}
.mobile-locations{display:flex;flex-wrap:wrap;gap:6px;padding:12px 0;overflow:visible}
.mobile-locations button{padding:8px 10px;min-height:38px;font-size:13px;background:var(--paper);border:1px solid var(--line);border-radius:6px}
.mobile-locations button.selected{background:var(--teal);color:#fff}
.map-key,.weather-note{display:none}.island-forecast{font-size:14px;flex-wrap:wrap}.island-forecast small,.island-forecast summary{font-size:12px}
.island-forecast details p{font-size:14px;max-width:75vw}.nui-suggestions summary,.nui-suggestions p{font-size:14px}
.inspector-top{flex-wrap:wrap;gap:8px}.inspector h2{font-size:23px}.inspector .danger,.place-sub,.assignment-talent,.assignment-talent small{font-size:13px}
.view-map .char-picker{max-width:none}.char-picker{grid-template-columns:repeat(3,minmax(0,1fr))}
.char-picker>button{display:flex;flex-direction:column;align-items:center;min-height:100px;padding:8px 3px;gap:3px}
.char-picker .nui{width:45px;height:52px;max-height:none;flex-shrink:0}.char-picker span,.char-picker small{font-size:12px}
.view-map .action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.action-tile{font-size:14px;min-height:46px}
.action-heading h3,.action-heading span,.action-help,.plan-estimate,.assigned,.destination-details summary,.destination-details .description{font-size:14px}
.loot-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.loot-row>span{font-size:13px;min-width:0;white-space:normal}.loot-row b,.loot-row small{font-size:12px}
.assigned-avatars{display:flex;flex-direction:column;align-items:flex-start;gap:8px;font-size:14px;height:auto;min-height:0;overflow:visible}
.assigned-crew{display:flex;flex-wrap:wrap;align-items:center;height:auto;gap:8px;padding:3px;overflow:visible}
.assigned-crew .nui{width:48px!important;height:58px!important;max-height:none!important;flex:0 0 48px;object-fit:contain;transform:none!important}
/* Footer uses intrinsic height and scrollable cards instead of clipping text. */
.phasebar{position:relative;inset:auto;display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,1fr) auto;grid-template-rows:auto auto;gap:8px 16px;padding:10px 16px;flex:0 0 auto;max-height:none;overflow:visible}
.phase-track{grid-column:1;grid-row:1;gap:14px}.phase-track>span,.phase-track i{font-size:14px}.phase-note{display:block;grid-column:2;grid-row:1}.phase-note strong,.phase-note small{font-size:12px}
.phasebar>.advance{grid-column:3;grid-row:1!important;min-height:42px;min-width:160px;max-width:260px;font-size:14px}
.order-crew{grid-row:2;grid-column:1/-1;display:flex;gap:8px;overflow-x:auto;padding:2px 2px 7px;scroll-snap-type:x proximity;min-width:0}
.phasebar .order-nui{flex:1 0 235px;min-width:235px;max-width:none;display:flex;flex-direction:row;align-items:center;gap:10px;padding:10px;text-align:left;overflow:visible;min-height:110px;touch-action:pan-x;scroll-snap-align:start}
.order-nui .nui{display:block;width:44px!important;min-width:44px;height:64px!important;flex:0 0 44px;max-height:none;object-fit:contain;transform:none}
.order-nui>span{flex:1;min-width:0}.order-nui b{font-size:14px;white-space:normal;letter-spacing:0}
.order-nui .order-work{font-size:12px;white-space:normal;overflow:visible!important;text-overflow:clip;max-height:none;line-height:1.5;overflow-wrap:anywhere}
.order-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 8px;font-size:12px;line-height:1.4;margin-top:5px}
.order-stats>span{display:flex;justify-content:space-between;gap:4px;white-space:nowrap;letter-spacing:0!important}.order-stats strong{font-size:13px}
/* Everything interactive remains in normal flow below the scenic image. */
.camp-life-layout,.night-prep-layout{grid-template-columns:minmax(0,1fr) minmax(310px,370px);gap:20px}
.camp-scene{min-width:0;background:var(--paper);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-bottom:16px}
.camp-scene-heading{padding:16px 18px}.camp-scene-heading>span{font-size:13px;color:var(--ink-soft)}.camp-scene-heading h2{font-size:21px;margin:6px 0}.camp-scene-heading p{font-size:14px;margin:4px 0 0}
.camp-scene .camp-art-frame{border:0;border-radius:0;box-shadow:none;aspect-ratio:16/9;min-height:0;margin:0}
.camp-scene .camp-facility{width:18%;height:27%}.camp-scene .facility-fire{width:13%;height:20%}.camp-scene .facility-raft{width:17%;height:22%}.camp-scene .facility-fence{width:26%;height:16%}
.camp-scene .facility-label{display:none}.camp-scene .camp-facility>.scene-sprite{transform:none}.camp-scene .camp-roof{pointer-events:none}
.camp-building-list{display:flex;flex-wrap:wrap;gap:6px;padding:12px}.camp-building-list button{font-size:13px;min-height:38px;padding:6px 10px;border:1px solid var(--line);border-radius:6px;background:#edf2e3}.camp-building-list b{font-size:12px;display:block}
.camp-residents{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:12px;padding:12px;background:#f3f1e4}
.camp-residents .camp-resident{position:static;transform:none;filter:none;width:112px;max-width:100%;height:auto;min-height:130px;padding:8px;display:flex;flex-direction:column;align-items:center;gap:5px;border-radius:10px;background:#fffdf7;border:1px solid var(--line)}
.camp-resident .nui{width:68px;height:78px;object-fit:contain;transform:none}.camp-residents .camp-human{width:168px}.camp-human .nui{width:145px;height:165px}
.camp-residents .camp-resident>span{position:static;transform:none;white-space:normal;font-size:13px;line-height:1.5;padding:0;background:none}.camp-resident>small{font-size:12px;color:var(--ink-soft)}
.camp-neighbours{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;border-top:1px solid var(--line);padding:12px}
.camp-animal-resident{display:flex;flex-direction:column;align-items:center;gap:4px;width:95px;font-size:13px}.camp-animal-resident .scene-sprite{width:70px;height:70px}.camp-animal-resident small{font-size:12px}
.camp-actions p,.camp-conversation summary,.chore-button strong,.chore-button small,.evening-shortcuts button{font-size:14px}.chore-grid{gap:10px}.chore-button{min-height:116px;padding:12px 8px}
.section-tabs{width:100%;overflow-x:auto;flex-wrap:nowrap;gap:5px}.section-tabs button{font-size:14px;min-height:42px;flex:0 0 auto;padding:9px 14px}
.build-grid,.animal-grid,.craft-grid,.project-grid,.status-roster,.specialty-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:16px}
.status-card{display:flex;flex-direction:column;gap:0;padding:18px}.status-identity{width:100%}.status-identity small,.status-identity span,.tag,.meter-label,.meter-label strong small{font-size:12px}.status-identity h2{font-size:20px}
.status-card .main-vitals,.status-equipment,.status-actions,.status-talent,.status-card .condition-list{width:100%}.status-talent{margin:14px 0}.status-equipment{margin-top:12px}.status-actions{align-self:auto;flex-wrap:wrap}
.status-talent p,.status-talent b,.status-equipment p,.status-equipment h3,.status-equipment h3 small,.status-actions button,.condition-item p,.condition-item h4,.care-advice,.specialty-grid .white-panel p{font-size:14px}
.meter-label,.meter-label strong{font-size:14px}.status-history p,.skills-table caption,.skills-table td b{font-size:14px}
.build-card p,.build-progress,.animal-card small,.craft-card p,.project-grid p,.route-card p,.route-card li,.guide-grid p,.guide-grid dd,.guide-steps p,.rules-list dt,.journal-entry,.dialog-content p{font-size:15px}
.build-card h3,.animal-card h3,.craft-card h3,.project-grid h3{font-size:18px}.craft-card p{min-height:0}.animal-card{flex-direction:column}.animal-card .scene-sprite{flex-shrink:0}
.craft-actor-options{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}.craft-actor-options .craft-actor .nui{width:44px;height:64px;flex-basis:44px}.craft-actor small{font-size:13px}
.costs{display:flex;flex-wrap:wrap;gap:6px;min-width:0}.cost,.cost-count,.chore-button .cost,.chore-button .cost-count{font-size:12px;white-space:normal;line-height:1.5}.cost{max-width:100%;overflow-wrap:anywhere}
.storage-hub .item-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}.item>span:nth-child(2),.item small,.gear-row{font-size:14px}.item{min-height:80px}.storage-controls{flex-wrap:wrap}
.pockets{grid-template-columns:1fr}.pocket-title{min-width:0}.pocket-title .nui{flex-shrink:0}.gear-row{flex-wrap:wrap}.equipment-selects label,.craft-equipment label,.craft-equipment select{font-size:14px}
.route-card{min-width:0}.route-card li{overflow-wrap:anywhere}.route-card li>div{min-width:0}.breakfast-crew{grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr))}
/* Guest panels and new reaction illustrations. */
.guest-panel{display:grid;grid-template-columns:155px minmax(0,1fr);gap:20px;align-items:center;border-left:4px solid #287484}
.guest-portrait .nui{width:150px;height:180px;object-fit:contain}.guest-details{min-width:0}.guest-details h2{font-size:22px;margin:5px 0}.guest-details p{font-size:14px;margin:8px 0}.guest-details small{font-size:13px}
.guest-stats,.guest-actions{display:flex;flex-wrap:wrap;gap:8px}.guest-stats b{font-size:14px;padding:6px 9px;background:#e8f1ed;border-radius:5px}.guest-actions{margin:12px 0}
.guest-arrival{display:grid;grid-template-columns:180px minmax(0,1fr);gap:20px;align-items:center}.guest-arrival>.nui{width:180px;height:250px;object-fit:contain}.guest-arrival p{line-height:1.9}
.arrival-plushes{display:flex;justify-content:center;gap:14px}.arrival-plushes .nui{width:88px;height:105px;object-fit:contain}.human-portrait{object-fit:contain;flex-shrink:0;mix-blend-mode:normal;opacity:1}
.guest-breakfast{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:14px;background:#e9f3ef;border-radius:8px}
.guest-camp-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:10px 14px;margin-bottom:14px;background:#e5efeb;border:1px solid #b9d1c8;border-radius:9px}.guest-camp-summary>.nui{width:42px;height:56px;flex:0 0 42px}.guest-camp-summary>div{flex:1;min-width:150px}.guest-camp-summary b{font-size:15px}.guest-camp-summary small{display:block;font-size:13px;margin-top:5px}
.map-pin:not(.selected):not(:hover):not(:focus-visible) .pin-name{display:none}
.save-slot{display:flex;gap:10px;flex-wrap:wrap}.save-slot>div{flex:1;min-width:160px}.save-slot small{font-size:13px}.save-tools{flex-wrap:wrap}.feed-button{min-width:0;flex-wrap:wrap;gap:10px}.feed-button>.nui{flex:0 0 48px;width:48px;height:64px}.feed-button>span{flex:1;min-width:140px}.feed-button small{font-size:13px}.speech>div{min-width:0}.speech>.nui{width:58px;height:74px;flex:0 0 58px;object-fit:contain}
dialog{width:min(720px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:90dvh;overflow-y:auto;overflow-x:hidden;padding:0}
dialog.wide-dialog{width:min(1000px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
.dialog-header{display:flex;gap:14px;align-items:center;justify-content:space-between}.dialog-header h2{font-size:20px;min-width:0}.close-button{flex:0 0 38px;min-width:38px;width:38px;height:38px}.dialog-content{min-width:0;padding:20px}
.conversation-line,.speech{min-width:0}.conversation-line .nui{flex-shrink:0;object-fit:contain}.conversation-line p,.speech p,.conversation-bubble{font-size:15px;overflow-wrap:anywhere}
.night-crew{gap:8px}.night-crew .nui{max-width:22%;object-fit:contain}.night-crew .human-portrait{height:150px;width:110px}
#toast{bottom:190px;max-width:min(650px,90vw);font-size:14px;pointer-events:none}
@media(max-width:1250px){
 .environment .topbar{grid-template-columns:minmax(180px,1fr) auto auto}.weather-summary{grid-row:2;grid-column:1/-1}.weather-summary summary{justify-content:flex-start}.weather-summary summary>span:nth-child(2){flex:0 1 auto}.weather-summary small{display:inline;margin-left:10px}
 .workspace{grid-template-columns:170px minmax(0,1fr)}.content-grid.view-map,.camp-life-layout,.night-prep-layout{grid-template-columns:1fr}.view-map>.inspector{position:static;display:block}.view-map .map-frame{max-width:1000px}
 .view-map .action-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.view-map .char-picker{max-width:550px}.camp-residents{justify-content:space-evenly}
}
@media(max-width:800px){
 .workspace{grid-template-columns:145px minmax(0,1fr)}.nav-item b{font-size:13px}.environment .workspace main{padding:14px}.route-grid,.storage-overview,.status-history{grid-template-columns:1fr}
 .phase-note{display:none}.phasebar{grid-template-columns:1fr auto}.phasebar>.advance{grid-column:2;min-width:0}.phase-track{gap:10px}
 .guest-panel{grid-template-columns:105px minmax(0,1fr);gap:12px}.guest-portrait .nui{width:105px;height:150px}.guest-actions{grid-column:1/-1}
 .map-pin .pin-name{display:none!important}.view-map .map-frame{aspect-ratio:3/2}.map-caption,.compass{display:none}
}
@media(max-width:650px){
 .environment .topbar{padding:10px 12px;gap:8px;grid-template-columns:minmax(0,1fr) auto auto}.brand{font-size:19px}.brand small{font-size:11px}.brand small b{display:none}.brand-mark{display:none}.day-number{font-size:25px}.day-display span:nth-child(2),.day-display small{font-size:11px}
 .header-actions .soft-button{font-size:13px;padding:7px 9px}.weather-summary .weather-symbol{font-size:20px}.weather-summary summary,.weather-summary small{font-size:12px}.weather-summary small{margin-left:6px}.weather-summary .weather-effects{left:0;right:auto;max-width:90vw}
 .resourcebar{min-height:40px;padding:0 12px}.resource{font-size:13px;padding:7px 12px}.resource strong{font-size:16px}.rescue-small{font-size:12px}
 .workspace{display:flex;flex-direction:column}.sidenav{display:flex;flex-direction:row;overflow-x:auto;flex:0 0 auto;gap:5px;min-height:49px;padding:6px 8px}.nav-item{flex:0 0 auto;width:auto;min-height:37px;padding:8px 10px}.nav-item b{white-space:nowrap;font-size:13px}.nav-caption,.nav-bottom{display:none}
 .environment .workspace main{flex:1;height:auto;min-height:0;padding:12px}.attention-bar{font-size:13px}.attention-link{font-size:13px}.screen-instruction{font-size:14px}h1{font-size:23px}
 .view-map .action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.view-map .map-frame{aspect-ratio:1.35}.map-nui-label{font-size:10px!important}.mobile-locations button{font-size:12px;padding:7px 8px;min-height:36px}.island-forecast>div{padding:4px;min-width:90px}
 .char-picker>button{min-height:100px}.section-tabs button{flex:0 0 auto;font-size:14px}.chore-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.build-grid,.animal-grid,.craft-grid,.project-grid,.status-roster,.specialty-grid{grid-template-columns:1fr}
 .phasebar{padding:8px;gap:7px}.phasebar>.advance{font-size:12px;min-height:36px;padding:7px 9px;max-width:155px}.phase-track{gap:7px}.phase-track>span,.phase-track i{font-size:12px}.phase-track>span{gap:3px}
 .phasebar .order-nui{flex:0 0 235px;min-width:235px;min-height:110px}.order-crew{gap:7px}.order-nui b{font-size:14px}.order-nui .order-work{font-size:12px}.order-stats{font-size:12px}
 .camp-residents{gap:8px;padding:10px}.camp-residents .camp-resident{width:calc(50% - 4px)}.camp-human .nui{height:140px;width:120px}.camp-human{min-height:200px!important}.camp-scene .camp-art-frame{aspect-ratio:16/9}
 .guest-panel{grid-template-columns:1fr}.guest-portrait{display:none}.guest-arrival{grid-template-columns:1fr;gap:8px}.guest-arrival>.nui{margin:auto;width:150px;height:200px}.arrival-plushes .nui{width:72px;height:88px}.guest-actions>button{flex:1 1 130px}
 dialog,dialog.wide-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px)}.dialog-content{padding:16px}.dialog-header{padding:12px 16px}.dialog-header h2{font-size:18px}.opening-dialogue p{font-size:15px}.night-crew .human-portrait{height:100px}
 #toast{bottom:184px}.skills-table th,.skills-table td{font-size:13px;padding:10px 8px}.skills-table{min-width:420px}
}
@media(max-height:650px){.order-crew{max-height:124px;overflow-y:auto}.environment .topbar{padding-top:6px;padding-bottom:6px}.phasebar{gap:4px;padding-top:6px;padding-bottom:4px}}

/* Ver 3.1: human-scale home, in normal flow with independent artwork bounds. */
.guest-tent-scene{margin:20px 0;padding:20px;border:1px solid #d6dcca;border-radius:18px;background:linear-gradient(140deg,#f7f2df,#e8f0e4);color:#244749}
.tent-home-heading h3{font-size:20px;margin:6px 0}.tent-home-heading p{margin:8px 0;line-height:1.6}
.tent-home-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:18px}
.tent-home-art{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-width:0;width:100%;padding:12px;border:1px solid #c8d5c3;border-radius:14px;background:#ffffff65;color:#244749;cursor:pointer;font:inherit}
.tent-home-art .scene-sprite{position:static;display:block;width:min(100%,320px);height:auto;aspect-ratio:1;transform:none;filter:drop-shadow(0 7px 5px #233c3220)}
.tent-home-art>span:last-child{font-size:14px;font-weight:700}.empty-tent{font-size:48px;padding:16px}
.tent-object-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));align-items:end;gap:12px;min-width:0}
.tent-object-row figure{margin:0;text-align:center;min-width:0}.tent-object-row .scene-sprite{display:block;width:100%;height:auto;aspect-ratio:1;position:static;transform:none}.tent-object-row figcaption{font-size:14px;font-weight:700;padding-top:4px}
.tent-plans{margin:14px 0 24px}.tent-stages{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:14px;margin:18px 0}
.tent-stage{min-width:0;padding:16px;border:1px solid #d9e2d8;border-radius:14px;background:#fafaf4;display:flex;flex-direction:column;align-items:stretch;gap:8px}.tent-stage.current{border:2px solid #3b7976;background:#edf5ed}
.tent-stage .tent-stage-art{position:static;width:100%;height:auto;aspect-ratio:1;transform:none}.tent-stage h3{font-size:17px;margin:4px 0}.tent-stage p{font-size:14px;line-height:1.7;margin:0}.tent-stage .tag{align-self:flex-start;white-space:normal;line-height:1.6}.tent-stage .costs{margin-top:auto;display:flex;flex-wrap:wrap;gap:6px}
.housing-notice,.night-housing{margin:14px 0;padding:16px;border-radius:12px;background:#edf4ea;border:1px solid #cddfc8;line-height:1.7}.housing-notice.unsettled{background:#fff3df;border-color:#e7c68e}.housing-notice b{display:block}.housing-notice p,.night-housing p{margin:6px 0;font-size:14px}.housing-notice small{display:block;margin:4px 0 10px}.housing-notice button{margin-top:8px}
.tent-build-preview{display:grid;grid-template-columns:minmax(100px,180px) minmax(0,1fr);gap:16px;align-items:center}.tent-build-preview .scene-sprite{width:100%;height:auto;aspect-ratio:1;position:static;transform:none}.tent-build-preview h3{font-size:18px}.tent-build-preview p{font-size:14px;line-height:1.7}
.time-night .guest-tent-scene{background:linear-gradient(140deg,#e2e6dc,#cad8d4)}.weather-rain .guest-tent-scene,.weather-storm .guest-tent-scene{border-color:#aebfbd}
@media(max-width:640px){.guest-tent-scene{padding:14px}.tent-home-layout{grid-template-columns:minmax(0,1fr)}.tent-object-row{grid-template-columns:repeat(3,minmax(0,1fr))}.tent-build-preview{grid-template-columns:minmax(0,1fr)}.tent-build-preview .scene-sprite{max-width:230px;margin:auto}}
