/* Warm ivory shells, honey accents and soft, tactile game slots. */
body{background:#dcd5bf;color:#705c48}button{font-weight:650}.topbar{background:linear-gradient(#f8efd55c,transparent)}.gold{color:#705633;text-shadow:0 1px #fffcf0;background:#fff6dfed;border:2px solid #fffbed;border-radius:22px;padding:9px 16px;top:14px;box-shadow:0 3px 0 #b6a07555;font-size:16px}#quality{background:#fff6e5f5;border:2px solid #fffdf4;color:#917754;border-radius:15px;box-shadow:0 3px 0 #a18a6644}#map-title{color:#fff9e5;text-shadow:0 2px 3px #715a40,0 0 15px #715a4060}.bottom-hud{background:linear-gradient(transparent,#f2e6c9a8 46%,#f5ead1);padding-top:28px}.skillbar{gap:8px}.slot{background:#fff4dc;border:2px solid #fffdf2;border-radius:17px;box-shadow:0 4px 0 #b7a07b55,inset 0 0 0 1px #dbc8a2}.slot.basic{background:linear-gradient(#fff2cf,#f2d89f);border-color:#fffbeb;box-shadow:0 4px 0 #c6a46b}.slot.basic:after{background:#aa845143}.slot.empty:before{border-color:#ccbb97;border-radius:3px}.auto-dot{background:#8ea86b;box-shadow:0 0 0 2px #fff4d7;z-index:2}.navigation{background:#fff4df;border-top:2px solid #fffdf2;border-radius:25px 25px 0 0;box-shadow:0 -4px 18px #6a553819;padding-top:11px}.nav-button{color:#a18c6c;gap:6px;font-weight:750}.nav-button.active{color:#84612e;background:#efdab1;border-radius:16px}.nav-button:hover{color:#75542b}.nav-button svg{stroke-width:1.9}#panel{background:#fff7e8fa;border:3px solid #fffdf4;border-radius:26px;box-shadow:0 7px 0 #c2ad8580,0 15px 40px #4e412d35;color:#705c48;backdrop-filter:blur(14px)}.panel-head{background:#fff7e8f5;padding-top:18px;border-bottom:1px solid #e8d9bb}.panel-head h2{font-weight:800;font-size:20px;letter-spacing:-.6px}#panel-close{background:#efe3cb;color:#9d8462;border-radius:12px;box-shadow:0 2px 0 #d1bd96}.panel-body{padding-top:14px}.muted{color:#a08e72;font-weight:500}.center{text-align:center}.stat-row{border-bottom:1px dashed #ddccac}.stat-row strong{color:#7c633c}.item{background:#f7ecd5;border:2px solid #fffdf4;border-radius:18px;box-shadow:0 2px 0 #d6c19a55}.item-icon{background:#ecdfc3;color:#9a7848;border-radius:14px}.item-info p{color:#a18b67}.action{background:#ebca86;border:2px solid #fff1c6;color:#7d5c30;border-radius:13px;box-shadow:0 3px 0 #c9a76a}.action:disabled{background:#e5e9cb;color:#8a9667;border-color:#f8f8e4;box-shadow:none}.empty-state{background:#f7ecd5;border-radius:18px;font-size:13px;margin-top:15px}.empty-state svg{color:#c4ab7e}.region{background:#f8edd7;border:2px solid #fffef6;border-radius:18px;color:#796246;box-shadow:0 3px 0 #ddcba651;padding:16px}.region.current{background:#eaf0d7;border-color:#fffef2}.region small{color:#a18c6d}.region em{color:#a77e3e;font-weight:700}.npc-link{background:#f1e6cd;color:#887051;border-radius:13px}.toast{background:#fff7e8f5;color:#8a6c42;border:2px solid #fffef4;border-radius:24px;box-shadow:0 3px 0 #bba47e44}dialog{background:#fff7e8;color:#796246;border:3px solid #fffdf5;border-radius:24px}dialog::backdrop{background:#594e3f55}#close-dialog{color:#927951}
.atlas{display:inline-block;width:48px;height:48px;flex-shrink:0;background-repeat:no-repeat;background-size:600% 600%;vertical-align:middle;pointer-events:none}.atlas.skills{background-image:url('assets/skills-36.svg')}.atlas.equipment{background-image:url('assets/equipment-36.svg')}.slot .atlas{width:86%;height:86%}.item-icon .atlas{width:100%;height:100%}.bag-summary{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;font-size:12px;color:#a18b68}.bag-summary strong{background:#eee2c8;border-radius:20px;padding:5px 12px;font-size:11px}.bag-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px;border:2px solid #e1ccaa;background:#e9d9b9;border-radius:20px;box-shadow:inset 0 3px 5px #bb9f7140}.bag-cell{position:relative;aspect-ratio:1;border:2px solid #fff8e9;border-radius:13px;background:#fff3db;box-shadow:0 2px 0 #c7af86;display:grid;place-items:center;padding:3px}.bag-cell .atlas{width:100%;height:100%}.bag-cell.vacant{background:#ecdfc6;border-color:#f3e9d3;box-shadow:inset 0 2px 4px #ba9b6e20}.bag-cell.selected{border-color:#c3954e;box-shadow:0 0 0 2px #e8c88f}.bag-cell i{position:absolute;right:3px;top:2px;font-style:normal;font-size:9px;border-radius:5px;padding:2px 4px;background:#a2b17a;color:#fffce8}.item-detail .item{margin-bottom:0}.gear-layout{display:grid;grid-template-columns:70px minmax(0,1fr) 70px;gap:8px;align-items:center}.gear-column{display:grid;gap:12px}.gear-slot{background:#f1e3c5;border:2px solid #fffdf1;border-radius:16px;box-shadow:0 3px 0 #d8c29c;padding:5px 3px;color:#9a7f58;display:flex;align-items:center;flex-direction:column;font-size:11px;gap:1px}.gear-slot .atlas{width:54px;height:54px}.gear-slot.unowned .atlas{opacity:.3;filter:grayscale(.7)}.avatar-stage{position:relative;min-width:0;border-radius:50%;background:radial-gradient(ellipse at 50% 60%,#f0e3bd 0%,#fbf2de 50%,transparent 70%);text-align:center;color:#a58a5e;font-size:11px}.avatar-stage:after{content:'';position:absolute;bottom:34px;left:20%;width:60%;height:17px;border-radius:50%;background:#bca57933;z-index:-1}#equipment-avatar{width:100%!important;height:auto!important;max-height:260px;object-fit:contain;image-rendering:pixelated}.avatar-stage>span{display:block;margin-top:-8px}.gear-layout+.muted{font-size:10px;margin-top:22px}
@container game (max-width:480px){.slot{border-radius:13px}.skillbar{gap:6px}.gold{font-size:14px;padding:8px 13px;top:12px}.gear-layout{grid-template-columns:62px minmax(0,1fr) 62px;gap:4px}.gear-slot .atlas{width:45px;height:45px}.gear-slot{border-radius:13px;font-size:10px}.gear-column{gap:10px}.bag-grid{gap:7px;padding:10px}.bag-cell{border-radius:11px}.panel-head h2{font-size:18px}.region{padding:13px}.region em{font-size:10px}}
/* Compact panels: details stay above the bag, never below a long scroll. */
#stage #panel{left:50%;right:auto;transform:translateX(-50%);width:calc(100% - 32px);max-width:340px;bottom:132px;max-height:min(430px,calc(100% - 210px));border-width:2px;border-radius:20px;overflow:hidden;display:flex;flex-direction:column;backdrop-filter:none}
#stage #panel[hidden]{display:none}#stage .panel-head{position:static;flex-shrink:0;padding:11px 13px 9px}#stage .panel-head h2{font-size:16px}#stage #panel-close{width:29px;height:29px;font-size:20px}#stage .panel-body{padding:10px 12px 13px;overflow-y:auto;min-height:0;overscroll-behavior:contain}
#stage .bottom-hud{padding-top:18px}#stage .skillbar{max-width:310px;margin:0 auto 9px;gap:6px;padding:0 6px}#stage .slot{height:auto;min-width:0;border-radius:11px;border-width:1px}#stage .navigation{padding:7px 8px 9px;border-radius:18px 18px 0 0}#stage .nav-button{padding:3px 0;gap:3px;font-size:10px}#stage .nav-button svg{width:20px;height:20px}
#stage .bag-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;padding:7px;border-radius:13px;border-width:1px}#stage .bag-cell{width:100%;min-width:0;min-height:0;aspect-ratio:1;border-radius:8px;border-width:1px;padding:0;overflow:hidden}#stage .bag-cell .atlas{position:absolute;inset:0;width:100%;height:100%}#stage .bag-cell i{pointer-events:none;font-size:8px;right:1px;top:1px;padding:1px 3px}#stage .bag-summary{margin:10px 1px 6px;font-size:10px}#stage .bag-summary strong{padding:3px 8px;font-size:10px}
#stage .item-detail{background:#f5ead4;border:1px solid #e5d3b2;border-radius:13px;padding:9px 11px;min-height:54px}#stage .detail-top{display:flex;gap:9px;align-items:center}#stage .detail-top .atlas{width:39px;height:39px}#stage .detail-top strong{font-size:13px}#stage .detail-top small{display:block;color:#ac9270;font-size:10px;margin-top:3px}#stage .detail-stats{font-size:11px;line-height:1.7;margin:5px 0 7px;color:#927552}#stage .detail-stats b{color:#765832}#stage .detail-actions{display:flex;gap:7px}#stage .detail-actions .action{flex:1;padding:7px 5px;font-size:11px;border-radius:10px;border-width:1px;min-height:32px}#stage .sell{background:#eadccc;border-color:#fbf2e7;color:#9a7252;box-shadow:0 2px #ccb49a}#stage .action:disabled{opacity:.7;box-shadow:none}#stage .detail-note{font-size:9px;color:#ac9678;margin-top:6px}#stage .detail-empty{font-size:11px;color:#a88e6a;text-align:center;padding:9px 0}
#stage .gear-layout{grid-template-columns:53px minmax(0,1fr) 53px;gap:5px;max-width:270px;margin:auto}#stage .gear-slot{padding:3px 2px;border-width:1px;border-radius:11px;font-size:9px}#stage .gear-slot .atlas{width:38px;height:38px}#stage .gear-column{gap:8px}#stage #equipment-avatar{max-height:185px}#stage .muted{font-size:11px;margin:6px 0 10px}#stage .gear-layout+.muted{font-size:9px;margin:12px 0 0}#stage .region{padding:11px;margin:4px 0;border-radius:12px}#stage .region strong{font-size:12px}#stage .region small{font-size:10px}#stage .stat-row{font-size:12px;padding:9px 0}#stage .empty-state{padding:17px 8px;margin-top:10px}#stage .toast{bottom:138px;font-size:11px;padding:8px 12px}
#objective{position:absolute;left:17px;top:62px;max-width:calc(100% - 34px);border:1px solid #fff8e4;background:#fff4dfeb;color:#8b704b;font-size:10px;border-radius:14px;padding:7px 11px;box-shadow:0 2px 6px #4c42251a;text-align:left}#stage .skill-choice{display:flex;align-items:center;gap:7px;padding:9px 0;border-bottom:1px solid #e8d8bb}#stage .skill-choice .atlas{width:35px;height:35px}#stage .skill-choice>div{flex:1}#stage .skill-choice strong,#stage .build-card strong{font-size:11px}#stage .skill-choice small,#stage .build-card small{display:block;font-size:9px;color:#a28c6c;line-height:1.6;margin-top:3px}#stage .skill-choice .action,#stage .build-card .action{padding:7px 9px;font-size:10px;flex-shrink:0}#stage .village-summary{background:#f1e6cd;border-radius:13px;padding:11px;font-size:12px}#stage .village-summary small{display:block;font-size:9px;color:#a38a64;margin-top:5px}#stage .village-summary p{font-size:11px;margin:9px 0 0;color:#8d6c36}#stage .region-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:12px 0}#stage .region-mini{font-size:10px;padding:8px;min-height:33px}#stage .section-title{font-size:12px;margin:12px 0 3px}#stage .build-card{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px dashed #e3d1ad}#stage .plan-button{width:100%;margin-top:13px;font-size:11px}.slot:not(.empty) .atlas{width:86%;height:86%}

#stage #map-title{top:106px}

#start-screen{position:absolute;inset:0;z-index:100;display:grid;place-items:center;background:#293d30aa;backdrop-filter:blur(3px)}
#start-screen[hidden]{display:none}.start-card{width:min(78%,300px);box-sizing:border-box;padding:30px 23px;background:#fff9e9;border:3px solid #eadab7;border-radius:30px;text-align:center;box-shadow:0 12px 0 #26352333;color:#60533e}.start-card h1{font-size:25px;margin:14px 0}.start-card p{font-size:13px;line-height:1.8}.start-card small{display:block;font-size:10px;color:#97876a}.start-card button{display:block;width:100%;margin:12px 0;min-height:42px}.start-card button[hidden]{display:none}.start-card .action:first-of-type{background:#d6e6b4}#cancel-new{border:0;background:transparent;color:#78664f}.next-action{text-align:center;padding:12px 8px}.next-action>small{font-size:11px;color:#988466}.next-action h3{font-size:19px;margin:12px 0}.next-action p{font-size:13px;line-height:1.7;color:#8b795e;min-height:45px}.action-emblem{margin:18px auto 8px;width:58px;height:58px;padding:14px;box-sizing:border-box;background:#e8edcf;border-radius:20px;color:#7c9261}.action-emblem svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.6}.confirm-action{width:100%;min-height:44px;background:#dce9ba!important}.confirm-action:disabled{opacity:.55}#celebration{pointer-events:none;position:absolute;z-index:110;left:12%;right:12%;top:38%;text-align:center;font-size:40px;color:#ffdb73;opacity:0;text-shadow:0 2px #b38345}#celebration.burst{animation:celebrate .65s ease-out}@keyframes celebrate{0%{opacity:0;transform:scale(.3)}30%{opacity:1}100%{opacity:0;transform:scale(1.7) translateY(-50px)}}

/* Fixed square sprites avoid percentage-height cropping in grid buttons. */
#stage .slot .atlas{position:absolute;inset:7%;width:auto;height:auto;aspect-ratio:1}
#stage .range-tag{position:absolute;right:3px;bottom:2px;font-size:8px;background:#fff9e9e8;color:#806241;border-radius:4px;padding:1px 3px;z-index:2}
#stage .slot.incompatible .atlas{opacity:.4}
#stage .skill-choice .skill-actions{flex:0 0 auto;display:flex;flex-direction:column;gap:5px}
#stage .skill-actions .secondary{background:#ece4ce;box-shadow:none}
#stage .skill-choice .skill-type{color:#72865b;font-weight:700}

#stage #objective{width:min(310px,calc(100% - 34px));padding:9px 12px;border-radius:15px;line-height:1.45}
#stage .objective-title{display:block;font-size:11px;font-weight:800;color:#79613e}
#stage .objective-detail{display:block;font-size:9px;font-weight:500;margin:3px 0 6px;color:#95805f}
#stage .objective-track{display:block;height:5px;background:#e4d6b9;border-radius:8px;overflow:hidden}
#stage .objective-track i{display:block;height:100%;background:#9caf79;border-radius:8px;transition:width .2s linear}
#stage .objective-meta{display:block;font-size:9px;color:#998361;margin-top:4px}

#story-scene{position:absolute;inset:0;z-index:80;pointer-events:none;background:linear-gradient(#151b29b8,transparent 18%,transparent 65%,#151b29bb)}
#story-scene[hidden]{display:none}.cinema-top{position:absolute;top:0;left:0;right:0;padding:18px 16px;display:flex;justify-content:space-between;align-items:center;color:#fff4d9;background:#172131bb;font-size:11px;pointer-events:auto}.cinema-top button{border:1px solid #ffffff40;border-radius:12px;background:#ffffff14;color:#fff5df;font-size:10px;padding:6px 9px}
.cinema-dialog{position:absolute;left:5%;right:5%;bottom:7%;padding:18px;border:2px solid #fff4d8;border-radius:20px;background:#fff3dff5;color:#725a3e;pointer-events:auto;box-shadow:0 8px 30px #17213170}.cinema-dialog small{font-size:12px;font-weight:800;color:#997a49}.cinema-dialog p{font-size:14px;line-height:1.8;margin:12px 0 16px}.cinema-dialog .action{display:block;margin-left:auto;padding:8px 17px;font-size:12px}

#story-scene{pointer-events:auto}

#game{touch-action:none}#farm-hud{position:absolute;z-index:15;left:0;right:0;bottom:0;background:#fff4dfee;border-radius:22px 22px 0 0;padding:10px 12px 12px;box-shadow:0 -3px 15px #6b5c3c25;color:#826944}#farm-hud[hidden]{display:none}#farm-hud button,#farm-hud select{border:1px solid #e4cfaa;background:#fff9eb;color:#826944;border-radius:10px;font-size:10px;padding:8px 7px;min-height:34px}#farm-hud button.selected{background:#dce8bd;border-color:#9cb17a;color:#536c37}#farm-resources{text-align:center;font-size:10px;margin-bottom:7px}.farm-quick,.farm-tools,.farm-options{display:flex;gap:5px}.farm-quick>*{flex:1}.farm-tools>*{flex:1;min-width:0}.farm-tools select{max-width:35%}.farm-options{margin-top:6px;flex-wrap:wrap}.farm-options button{flex:1;white-space:nowrap;padding:5px!important;font-size:9px!important;min-height:28px!important}#farm-status{font-size:10px;line-height:1.5;text-align:center;margin:7px 0}#farm-confirm{width:100%;background:#d7e5b3!important;border-color:#a4b879!important;margin-bottom:7px;font-weight:800}#farm-confirm[hidden]{display:none}
.farm-seeds{display:flex;align-items:center;justify-content:center;gap:6px;margin-bottom:6px;font-size:10px}.farm-seeds button{min-height:26px!important;padding:4px 7px!important}#build-editor{position:absolute;z-index:18;left:4%;right:4%;top:112px;max-height:40%;overflow:auto;padding:12px;border:2px solid #fff8e7;border-radius:20px;background:#fff3dfee;color:#796347;box-shadow:0 6px 24px #3b422533;font-size:11px}#build-editor[hidden]{display:none}#build-editor header{display:flex;justify-content:space-between;align-items:center}#build-editor button{border:1px solid #dbcba7;background:#fff9e9;color:#796347;border-radius:8px;padding:6px;min-height:30px;font-size:11px}#build-editor p{margin:7px 0;line-height:1.4}.build-row{display:flex;gap:5px;margin-top:6px;align-items:center}.build-row button{flex:1}.build-row b{min-width:26px;text-align:center}#build-start{background:#d8e7b8!important;font-weight:700}#build-grid{display:grid;gap:3px;max-width:220px;margin:auto}#build-grid button{padding:2px;min-height:25px}#build-grid .edge{background:#e9d9b7}#build-grid .floor{background:#edf0d8}#build-grid .selected{background:#c6dfb4;outline:2px solid #7a9c5b}#build-summary{font-size:10px}#build-close{min-height:24px!important}
/* Compact model editor: the preview is isolated from the moving world camera. */
#build-editor{top:92px;bottom:245px;max-height:480px;padding:10px;overscroll-behavior:contain;scrollbar-width:thin}#build-model{width:100%!important;height:160px!important;image-rendering:pixelated;touch-action:none;border-radius:12px;cursor:pointer}.build-model-wrap{border:1px solid #ddd2b8;border-radius:13px;overflow:hidden;background:#eee9d7}.build-view-tools{font-size:10px;justify-content:space-between}.build-view-tools button{min-height:28px!important;font-size:10px!important}.build-view-tools span{min-width:28px;text-align:center}#build-editor #build-part{font-size:10px}#build-editor .build-row{margin-top:5px}@media(min-height:850px){#build-editor{top:105px;bottom:245px}#build-model{height:190px!important}}@media(max-height:700px){#build-editor{top:75px;bottom:230px}#build-model{height:130px!important}}
#build-editor .build-row>*{min-width:0}#build-editor button:disabled{opacity:.42}#build-editor button.selected{background:#dce8bd;border-color:#91aa69}#build-window-options{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:10px}#build-window-options[hidden]{display:none}#build-window-options select{border:1px solid #dbcba7;background:#fff9e9;color:#796347;border-radius:7px;padding:5px}#build-window-options small{font-size:9px;color:#95836c}.build-view-tools{flex-wrap:wrap}.build-view-tools button{white-space:nowrap;padding:5px!important}
#build-material-scope[hidden]{display:none}#build-material-scope button{min-height:27px;font-size:10px}#build-material-scope{margin-bottom:3px}
/* Quiet ivory HUD. Tools appear only in their relevant mode. */
#farm-hud{left:12px;right:12px;bottom:12px;padding:9px 10px 7px;border:1px solid #fffdf2;border-radius:23px;background:#fff8eaf7;box-shadow:0 6px 24px #3b38252b;color:#77674c}
#farm-hud button,#farm-hud select{border:1px solid #e8dfc9;border-radius:12px;background:#fffdf5;font-size:11px;color:#79694e;transition:background .15s,transform .15s}#farm-hud button:active{transform:scale(.96)}
.hud-stock{display:flex;align-items:center;gap:5px;min-height:30px;padding:0 3px 5px}.hud-stock #farm-resources{flex:1;text-align:left;margin:0;font-size:10px;color:#95815e;letter-spacing:.1px}.hud-stock #farm-center,.hud-stock #hud-more{width:29px;min-height:27px;padding:2px;background:transparent;border:0;font-size:20px;color:#9b8b6f}
.farm-dock{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;border-top:1px solid #eae1cf;padding-top:6px}.farm-dock button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:54px!important;border:0!important;background:transparent!important;border-radius:15px!important;font-weight:650;font-size:10px!important}.farm-dock svg{width:23px;height:23px;stroke-width:1.6}.farm-dock button.selected{background:#e4edce!important;color:#637b43!important}.farm-dock button:not(.selected){color:#a18c69!important}
#hud-context{padding:8px 3px 10px;border-top:1px solid #eee4d0}#hud-context[hidden],#hud-extra[hidden],#walk-resume[hidden],#farm-status[hidden]{display:none!important}.context-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px}.context-heading strong{font-size:13px;color:#746246}.context-heading span{font-size:9px;color:#ad9a79}.farm-seeds{justify-content:space-between;margin:0 0 8px}.farm-seeds span{font-size:10px;color:#917b56}.farm-seeds button{background:#f1ead7!important}.farm-quick{gap:6px;margin-bottom:8px}.farm-quick button{min-height:34px}.farm-options{align-items:center;flex-wrap:nowrap;margin:8px 0 0;gap:5px}.farm-options>span{font-size:10px;color:#aa9673;margin-right:5px}.farm-options button{min-height:29px!important;font-size:10px!important}.build-context{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#9c8965}.build-context button{font-size:10px!important}.decor-context select{width:100%;padding:9px!important}
#farm-hud[data-mode="farm"] .build-context,#farm-hud[data-mode="farm"] .decor-context,#farm-hud[data-mode="build"] .farm-seeds,#farm-hud[data-mode="build"] .farm-quick,#farm-hud[data-mode="build"] .decor-context,#farm-hud[data-mode="decor"] .farm-seeds,#farm-hud[data-mode="decor"] .farm-quick,#farm-hud[data-mode="decor"] .build-context{display:none}
#hud-extra{display:flex;gap:5px;padding:8px 0}#hud-extra button{flex:1;font-size:10px!important}#farm-confirm{margin:9px 0 0;padding:10px!important;background:#8ca46b!important;color:#fffdf1!important;border:0!important;font-size:12px!important;box-shadow:0 3px 0 #718950}#farm-status{font-size:10px;margin:8px 0 0;text-align:left;color:#9c8359}#walk-resume{display:flex;align-items:center;justify-content:space-between;width:100%;margin:3px 0 8px;padding:9px 12px!important;background:#f4e5bf!important;border:0!important;font-size:11px!important}
#farm-hud[data-editing="true"] #hud-context,#farm-hud[data-editing="true"] #hud-extra{display:none!important}#build-editor{left:12px;right:12px;top:115px;bottom:132px;max-height:none;border-radius:22px;background:#fff8eefb;box-shadow:0 8px 32px #51463030;border:1px solid #fffdf4;padding:14px}#build-editor header strong{font-size:14px}#build-close{border:0!important;background:#eee7d5!important;width:28px;font-size:19px!important}#build-editor button{border-radius:10px;min-height:33px}#build-model{height:180px!important}#build-summary{color:#a18a64;line-height:1.6!important;margin:8px 0!important}#build-start{background:#8ca46b!important;color:#fffdf1!important;border-color:#8ca46b!important}#build-delete{background:transparent!important;border:0!important;color:#b09a80!important}#build-editor .build-row{gap:6px;margin-top:8px}#build-part{padding:7px 9px;background:#f2eddc;border-radius:9px;color:#94805a}#build-material-scope button{min-height:28px}#build-window-options small{display:none}
#stage #objective{left:17px;top:64px;width:auto;max-width:calc(100% - 80px);background:#fff8eadc;border:1px solid #fffdf0;border-radius:14px;padding:8px 11px;box-shadow:0 3px 8px #5947230c;pointer-events:auto}#stage .objective-meta{display:none}#stage .objective-detail{margin:3px 0 0;font-size:9px}#stage .objective-track{height:3px;margin-top:6px}#stage .objective-title{font-size:11px}.topbar{background:none}.toast{bottom:140px!important;white-space:normal!important;width:max-content;max-width:86%;text-align:center}
@media(max-height:700px){#build-editor{top:95px;bottom:126px}#build-model{height:125px!important}#farm-hud{bottom:8px}.context-heading{margin-bottom:6px}.farm-options{margin-top:5px}}
#farm-hud[data-placement="invalid"] #farm-status{display:block;background:#fbe6e0;border:1px solid #e8b6a8;border-left:4px solid #c76551;color:#944737;border-radius:10px;padding:10px 11px;font-size:11px;line-height:1.7;font-weight:650;white-space:pre-line;margin:9px 0 0}#farm-hud #farm-confirm:disabled{background:#ead8d1!important;color:#987064!important;border:1px solid #d4b4a7!important;box-shadow:none!important;opacity:1;cursor:not-allowed;transform:none!important}#farm-hud[data-placement="valid"] #farm-status{background:#edf3de;border:1px solid #d9e5c3;border-radius:10px;padding:8px 10px;color:#657b42;font-size:10px;line-height:1.6}

.world-travel{display:grid;gap:8px}.world-travel h3,.world-travel p{margin:0 0 5px}.world-travel .action{padding:11px 16px;text-align:left;border-radius:15px}.world-travel .action:disabled{opacity:.55}#world-menu{font-size:12px;white-space:nowrap;min-width:38px}
/* Compact shared header, distinct combat and building/life workspaces. */
#play-mode{margin-left:auto;margin-right:8px;border:1px solid #e4d7bc;border-radius:22px;background:#fff9eb;color:#7b6b50;padding:10px 13px;font-size:12px;font-weight:700;box-shadow:0 3px 0 #bdb19144}#play-mode[hidden]{display:none}#stage[data-play-mode="combat"] #play-mode{background:#eee6d8}#stage[data-play-mode="combat"] #farm-hud{display:none!important}#stage[data-play-mode="life"] .bottom-hud{display:none!important}.combat-actions{display:flex;gap:8px;justify-content:center;margin:0 18px 12px;pointer-events:auto}.combat-actions button{border:1px solid #e1d3b5;background:#fff8e7;color:#7a684b;padding:10px 16px;border-radius:18px;font-size:12px}.farm-seeds{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.farm-seeds #seed-select{max-width:100px;min-height:34px}.farm-seeds #seed-count{flex:1;font-size:10px}#crop-info{font-size:10px;color:#988361;margin:2px 2px 8px}#farm-hud:not([data-mode="farm"]) #crop-info{display:none}.seed-card{display:grid;grid-template-columns:32px 1fr;gap:8px;padding:12px;border:1px solid #e9dfca;border-radius:17px;background:#fffaf0}.seed-card .crop-icon{font-size:26px;align-self:center}.seed-card strong{font-size:13px;color:#776448}.seed-card small{display:block;font-size:10px;color:#a18a65;line-height:1.6}.seed-actions{grid-column:1/-1;display:flex;gap:7px}.seed-actions button,.shop-wallet button,.auto-actions button,.produce-summary button{border:1px solid #ddd5bd;background:#f2f0df;color:#7b7653;border-radius:11px;padding:9px 11px;font-size:11px}.seed-actions button{flex:1}.seed-actions button:last-child{background:#e3ebcf;color:#607447}.seed-actions button:disabled{opacity:.55}.seed-list{display:grid;gap:9px}.shop-note{font-size:11px;line-height:1.7;color:#9b8663;margin-top:0}.shop-wallet{display:flex;justify-content:space-between;align-items:center;margin:0 0 12px;color:#826a45;font-weight:bold;font-size:13px}.automation-card{padding:14px;border-radius:18px;background:#e9eedb;color:#6d7951}.automation-card small{display:block;font-size:10px;margin-bottom:7px}.automation-card strong{font-size:12px;line-height:1.7;display:block}.auto-actions{display:flex;gap:7px;margin-top:10px}.auto-choices{display:grid;gap:8px;margin-top:12px}.auto-choices>button{text-align:left;border:1px solid #e9deca;border-radius:15px;padding:12px;background:#fffaf1;color:#7b694b}.auto-choices b{font-size:12px}.auto-choices small{display:block;font-size:10px;color:#aa9574;margin-top:5px;line-height:1.5}.auto-choices button:disabled{opacity:.5}.produce-summary{border-top:1px dashed #d9c9ab;margin-top:14px;padding-top:12px;font-size:11px;color:#907b58}.produce-summary p{margin:7px 0}#stage #panel{max-height:min(68vh,580px)}#stage #panel .panel-body{overflow-y:auto}#stage .bottom-hud .skillbar{margin-bottom:10px}.hud-stock>button{white-space:nowrap}
.topbar{z-index:25}#play-mode{position:absolute;right:69px;top:14px;margin:0;pointer-events:auto;min-height:38px}#stage #panel{z-index:40;max-height:min(68vh,calc(100% - 225px))}.seed-actions button{min-height:36px}.auto-actions button{min-height:36px}
#world-shortcuts{position:absolute;z-index:28;right:13px;top:65px;display:flex;gap:5px}#world-shortcuts[hidden]{display:none}#world-shortcuts button{border:1px solid #eee2ca;border-radius:15px;background:#fff8e9ee;color:#857356;padding:9px 10px;font-size:11px;min-height:36px;box-shadow:0 2px 5px #5e4d3020}#stage #objective{max-width:calc(100% - 155px)}#stage[data-placing="true"] #farm-hud,#stage[data-placing="true"] .bottom-hud,#stage[data-placing="true"] #objective{display:none!important}#placement-tools{position:absolute;z-index:32;left:12px;right:12px;bottom:12px;background:#fff9ecf7;border:1px solid #fffdf4;border-radius:19px;padding:8px 10px;box-shadow:0 4px 18px #4a3c2729}#placement-tools[hidden]{display:none}#placement-info{font-size:10px;color:#887355;line-height:1.4;margin:0 0 5px;max-height:29px;overflow:auto}.placement-nudge,.placement-actions{display:flex;gap:5px}.placement-nudge{margin-bottom:5px}.placement-nudge button,.placement-actions button{border:1px solid #e4d9c0;border-radius:11px;background:#fffdf4;color:#8a7655;min-height:32px;padding:5px 10px;font-size:12px}.placement-nudge button{flex:1}.placement-actions button{flex:1}.placement-actions #placement-confirm{flex:1.4;background:#8da571;color:#fff;border-color:#8da571}.placement-actions #placement-confirm:disabled{background:#e4d7cb;color:#a18b77;border-color:#d8c8b7}.wide-select{width:100%;margin:3px 0 8px;background:#e9efdc!important;color:#70834f!important}#stage #panel[data-kind="explore"]{bottom:115px;max-height:calc(100% - 225px);max-width:370px}.region-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.region-card{text-align:left;border:1px solid #e5d8bc;background:#fffaf0;border-radius:16px;padding:12px 10px;min-height:112px;color:#817052}.region-card>b{float:right;font-size:21px;color:#98a77d}.region-card>strong{display:block;font-size:13px;padding-top:3px}.region-card>small{display:block;font-size:10px;line-height:1.5;margin-top:8px;color:#a18e70}.region-card>span{display:block;font-size:10px;margin-top:10px;color:#81965c}.region-card.current{background:#e8eed9;border-color:#adc18d}.region-card.current>span{font-weight:bold}.village-overview{background:#eaf0dc;border-radius:17px;padding:13px;color:#6c7d50}.village-overview small{font-size:10px}.village-overview h3{font-size:20px;margin:5px 0 7px}.village-overview p{font-size:10px;margin:4px 0}.village-goals{display:grid;gap:8px;margin-top:10px}.village-goals span{display:block;font-size:10px;margin-bottom:3px}.village-goals progress{width:100%;height:5px;accent-color:#8da571}.resident-note{font-size:10px;line-height:1.7;color:#9c8764}.resident-card{display:flex;gap:10px;padding:13px 10px;border:1px solid #e9dfc9;border-radius:16px;margin:9px 0;background:#fffaf0}.resident-avatar{background:#ecedda;border-radius:15px;width:42px;height:46px;display:grid;place-items:center;font-size:23px;flex-shrink:0}.resident-card strong{font-size:13px;color:#7c6a4c}.resident-card small{font-size:10px;display:block;color:#9a8868;line-height:1.6}.resident-card strong small{display:inline}.resident-card p{font-size:11px;line-height:1.6;color:#907c5d;margin:6px 0}.resident-card button{border:1px solid #d9dec3;border-radius:11px;background:#e5ecd4;color:#6f8151;padding:9px 10px;margin-top:8px;font-size:11px;min-height:36px}@media(max-height:700px){#placement-tools{bottom:6px;padding:6px 8px}.placement-nudge button,.placement-actions button{min-height:30px}#stage #panel[data-kind="explore"]{bottom:100px;max-height:calc(100% - 210px)}}
#resident-build-note{font-size:10px;line-height:1.5;margin:4px 0 7px;padding:6px 8px;border-radius:10px;background:#e8efdc;color:#718253}#resident-build-note[hidden]{display:none}
/* Start from a quiet preview; reveal editing tools only when requested. */
#stage[data-blueprint="true"] #farm-hud,#stage[data-blueprint="true"] .bottom-hud,#stage[data-blueprint="true"] #objective,#stage[data-blueprint="true"] #world-shortcuts{display:none!important}#stage #build-editor{top:50%;bottom:auto;transform:translateY(-50%);left:14px;right:14px;max-height:78%;overflow-y:auto;padding:15px;border-radius:23px;z-index:35}#build-editor[hidden]{display:none!important}#build-editor header{display:flex;align-items:center;justify-content:space-between}#build-editor #build-title{font-size:15px}#build-editor #build-summary{font-size:11px;line-height:1.5;margin:7px 0 11px!important}#build-editor #build-model{height:180px!important;max-width:100%;border-radius:15px}.blueprint-view{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:8px}.blueprint-view>button{border:1px solid #e5dbc7;background:#fffcf2;color:#8c7b5d;padding:7px 12px;min-height:34px}.blueprint-view #build-view-label{display:none}.blueprint-view #build-roof-view{margin-left:auto;font-size:10px}.blueprint-view #build-top-view{display:none!important}#blueprint-edit[hidden],#blueprint-details[hidden],#blueprint-openings[hidden]{display:none!important}.blueprint-tabs{display:flex;gap:7px;margin-top:13px}.blueprint-tabs>button{flex:1;border:1px solid #e2dac5;background:#fffaf0;color:#968466;padding:8px;font-size:11px}.blueprint-tabs>button.selected{background:#e6edda;color:#738452;border-color:#becaa7}#build-editor #build-part{font-size:10px;margin:8px 0;padding:8px}#build-editor .build-row>button{flex:1;font-size:11px}#build-editor .build-row>span{font-size:11px;align-self:center}#editor-detail-toggle{width:100%;border:0!important;background:transparent;color:#aa9675;font-size:10px;margin-top:7px}#blueprint-details{padding:0 8px 9px;background:#f0ebdd;border-radius:12px}#build-editor .blueprint-footer{display:flex;gap:8px;margin-top:15px;position:sticky;bottom:-15px;background:#fff8ee;padding:8px 0 3px}#build-editor .blueprint-footer>button{min-height:43px;border-radius:14px;font-size:12px;font-weight:700}#editor-modify{flex:1;background:#fffdf5;border:1px solid #dfd6c2;color:#8c7b5c}#build-editor #build-start{flex:1.35;white-space:normal}#blueprint-hint{font-size:10px;line-height:1.6;text-align:center;color:#a18d6d;margin:8px 0 1px}#stage #build-editor[data-editor="preview"]{max-width:360px;margin:auto}#stage #build-editor[data-editor="edit"]{max-width:390px;margin:auto}#build-editor #build-start:disabled{opacity:.5}#resident-build-note{font-size:10px}@media(max-height:700px){#stage #build-editor{max-height:80%;padding:12px}#build-editor #build-model{height:140px!important}#build-editor .blueprint-footer{bottom:-12px}}

#game-speed{position:absolute;right:165px;top:14px;width:43px;min-height:38px;pointer-events:auto;background:#fff6e5f5;border:2px solid #fffdf4;border-radius:15px;color:#917754;font-size:14px;font-weight:800;box-shadow:0 3px 0 #a18a6644}#game-speed[aria-pressed="true"]{background:#e3edc9;color:#607641;border-color:#f9ffe9}

.town-life{padding:12px;background:#edf0dc;border-radius:16px;margin-bottom:12px}.town-life>p{font-size:11px;line-height:1.55;margin:6px 0;color:#8c8169}.town-life-row{display:grid;grid-template-columns:40px 1fr;padding:8px 0;border-top:1px solid #d8dec6;font-size:12px;gap:3px}.town-life-row small{grid-column:2;color:#92846d;font-size:10px}.town-event{font-size:11px;padding:6px 0;color:#7e715b;border-top:1px dashed #d9d9c0}

#next-task{position:absolute;right:14px;top:112px;width:44%;max-width:210px;z-index:26;text-align:left;padding:10px 12px;border:1px solid #fffdf4;border-radius:17px;background:#fff8e9f2;box-shadow:0 3px 0 #a18a662b;color:#7b684a}#next-task[hidden]{display:none}#next-task small{display:block;font-size:9px;color:#879866;font-weight:800}#next-task strong{display:block;font-size:12px;margin:4px 0}#next-task span{display:block;font-size:10px;line-height:1.4;color:#978465}#next-task b{display:block;font-size:9px;margin-top:5px;color:#7c915b}#next-task progress{display:block;width:100%;height:4px;margin-top:7px;accent-color:#91a771}#stage[data-blueprint="true"] #next-task,#stage[data-placing="true"] #next-task{display:none!important}@container game (max-width:360px){#next-task{right:10px;top:108px;padding:8px 9px}#next-task strong{font-size:11px}}

.farm-dock{grid-template-columns:repeat(5,minmax(0,1fr))}.farm-dock #hud-demolish{color:#b97863!important}.farm-dock #hud-demolish.selected{background:#f4dfd3!important;color:#a65f4b!important}

.decor-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.decor-picker button{min-height:55px!important;padding:9px 5px!important;border-radius:13px!important;background:#fffaf0!important;border:1px solid #e4d9c1!important;color:#806c4c!important}.decor-picker strong,.decor-picker small{display:block}.decor-picker strong{font-size:12px}.decor-picker small{font-size:9px;font-weight:400;margin-top:5px;color:#a28d6c}#farm-decor[hidden]{display:none!important}
