:root{
  font-family:"Arial Rounded MT Bold","Trebuchet MS",system-ui,sans-serif;
  color:#614527;background:#b8d4a5;font-synthesis:none;
  --paper:#fff4d1;--ink:#614527;--rim:#a66b35;--gold:#edbf61;
  --blue:#54a6d0;--blue-dark:#346d99;--green:#7eb94c;
}
*{box-sizing:border-box}body{margin:0;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #fff8a6;outline-offset:4px}button:disabled{cursor:not-allowed;filter:grayscale(.7);opacity:.5}[hidden]{display:none!important}h1,h2,h3,p{margin:0}button .ui-icon{pointer-events:none}.ui-icon{width:100%;height:100%;display:block;overflow:visible}#world{position:fixed;inset:0;width:100%;height:100%;outline:none;touch-action:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

/* Floating counters leave the town visible between the HUD elements. */
.topbar{position:absolute;top:20px;left:22px;right:22px;display:flex;align-items:center;gap:22px;height:66px;pointer-events:none;z-index:4}.topbar>*{pointer-events:auto}.brand{position:relative;display:flex;align-items:center;gap:5px;min-width:196px;height:59px;padding:4px 17px 6px 55px;border:3px solid #93633d;border-radius:18px;background:linear-gradient(#d3a875,#b17a48);box-shadow:inset 0 2px #ffdea5,inset 0 -4px #8f5c35,0 3px 0 #60492c,0 6px 9px #354d3433}.brand::after{content:"";position:absolute;inset:5px;border:1px solid #e5b77d;border-radius:11px;pointer-events:none}.brand-mark{position:absolute;width:69px;height:69px;left:-12px;top:-12px;filter:drop-shadow(0 3px 0 #493e3140);z-index:1}.brand-name{font-size:26px;line-height:1;color:#fff5cd;letter-spacing:-.8px;text-shadow:0 2px #7d4c2f;-webkit-text-stroke:.3px #7d4c2f;z-index:1}.brand-small{display:block;font-size:9px;letter-spacing:3px;text-align:center;margin-top:5px;color:#fff0b7;text-shadow:0 1px #7d4c2f;-webkit-text-stroke:0}.resources{display:flex;gap:18px;margin:auto;align-items:center}.resource-chip{position:relative;display:flex;align-items:center;min-width:121px;height:51px;padding:4px 14px 4px 39px;border:3px solid #bc8d47;border-radius:25px;background:linear-gradient(#fffce5,#f1dfb5);box-shadow:inset 0 2px #fffef5,inset 0 -3px #e0c796,0 3px 0 #7e603b,0 5px 8px #38532f2b}.resource-icon{position:absolute;width:52px;height:52px;left:-15px;top:-6px;filter:drop-shadow(0 2px 0 #7a593c33)}.resource-chip small{display:block;font-size:9px;letter-spacing:.2px;color:#8b6b44;line-height:1.2}.resource-chip strong{display:block;font-size:21px;line-height:1.12;white-space:nowrap;letter-spacing:-.5px;color:#624622;font-weight:900;text-shadow:0 1px #fff}.resource-chip em{font-size:12px;font-style:normal;color:#a28a61;letter-spacing:0}.homes-chip{border-color:#799cc1}.wellbeing-chip{border-color:#d69b9d;min-width:111px}.supply-resource{border-color:#94a96d;min-width:110px}

/* Painted buttons have a raised lip, highlight and clear pressed state. */
.game-button{position:relative;display:grid;place-items:center;width:51px;height:51px;padding:9px;background:linear-gradient(#7fc5e8,#438cbe);border:3px solid #315d82;border-radius:15px;box-shadow:inset 0 2px #c2ecfc,inset 0 -4px #3377a7,0 3px 0 #294963,0 5px 8px #304e3533;transition:transform .12s,filter .12s,box-shadow .12s}.game-button>span{display:block;width:100%;height:100%}.game-button:hover{filter:brightness(1.10);transform:translateY(-2px)}.game-button:active{transform:translateY(3px);box-shadow:inset 0 2px #add7ef,inset 0 -1px #3377a7,0 0 0 #294963}.game-button[aria-pressed=true]{background:linear-gradient(#b8d76f,#70a540);border-color:#577638;box-shadow:inset 0 2px #e6f5a1,inset 0 -3px #659436,0 3px 0 #42632d}.icon-button{width:54px;height:54px;padding:8px}

/* Quest board: a parchment page held in a carved frame. */
.goals-panel{position:absolute;left:22px;top:113px;width:235px;padding:0 15px 10px;background:linear-gradient(105deg,#ffedbd,#fff7dc 45%,#f2dfab);border:3px solid #a87840;border-radius:15px;box-shadow:inset 0 0 0 3px #f9d78e,inset 0 -5px #dabb80,0 4px 0 #795b35,0 8px 14px #3f562b25;z-index:2}.goals-panel::before,.goals-panel::after{content:"";position:absolute;width:7px;height:7px;border-radius:50%;background:#b48d50;box-shadow:inset 0 1px #f6d7a0,0 1px #fff7d1;bottom:9px}.goals-panel::before{left:9px}.goals-panel::after{right:9px}.quest-title{position:relative;display:flex;align-items:center;justify-content:center;margin:-9px -25px 0;height:55px;padding-left:18px;background:linear-gradient(#78b7d7,#4385b0);border:3px solid #3c6e8e;border-radius:13px 13px 9px 9px;box-shadow:inset 0 2px #b4e1ef,inset 0 -3px #386e99,0 3px 0 #8e6b3e}.quest-title h1{font-size:22px;line-height:1;color:#fff7d7;text-shadow:0 2px #315c7e;-webkit-text-stroke:.3px #315c7e}.quest-emblem{position:absolute;width:55px;height:55px;left:5px;top:-9px;transform:rotate(-9deg);filter:drop-shadow(0 3px 0 #53473133)}.goal-current{padding-top:16px}.goal-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;font-weight:900;color:#a17c43;letter-spacing:.5px}.quest-reward{display:flex;align-items:center;color:#976024;font-size:14px;letter-spacing:0;background:#f5deb0;padding:2px 7px 2px 1px;border-radius:15px;box-shadow:inset 0 1px 2px #cba66a66}.quest-reward .ui-icon{width:25px;height:25px;margin-top:-3px;margin-bottom:-2px}.goal-current h3{font-size:16px;line-height:1.2;margin:9px 0 6px;color:#72502c;text-shadow:0 1px #fff8df}.goal-current p{font-size:12px;line-height:1.45;color:#94734c}.goal-progress{display:flex;align-items:center;gap:9px;margin-top:13px}.goal-track{height:16px;background:#bdab7a;border:2px solid #b8975c;border-radius:12px;box-shadow:inset 0 2px 3px #7d693e44,0 1px #fff7df;flex:1;overflow:hidden}.goal-track i{display:block;height:100%;border-radius:8px;background:linear-gradient(#c5e974 0%,#99cc51 45%,#6fa83a 50%,#7db641 100%);box-shadow:inset 0 1px #e8ffac;transition:width .3s ease}.goal-progress>span{font-size:12px;white-space:nowrap;color:#786237;font-weight:900}.text-button{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:900;color:#9c7141;border:0;background:none;padding:8px 0}.text-button .ui-icon,.text-button>span[data-ui-icon]{width:23px;height:23px}.text-button>span:last-child{width:16px;height:16px}.goals-panel>.text-button{margin:6px auto 0}.goal-list-row{display:flex;justify-content:space-between;gap:8px;border-top:1px dashed #d6ba82;padding:9px 0;font-size:11px;line-height:1.3}.goal-list-row>span:last-child{color:#66953b;white-space:nowrap}.goals-complete{text-align:center}.goals-complete>.ui-icon{width:65px;height:65px;margin:auto}.goals-complete h3{color:#7a992d}

/* Construction dock and individual illustrated building tiles. */
.build-tray{position:absolute;left:50%;bottom:73px;transform:translateX(-50%);width:min(910px,calc(100% - 76px));padding:34px 12px 11px;background:repeating-linear-gradient(0deg,#b77c46 0px,#b77c46 20px,#b17a44 21px,#c18b52 23px);border:3px solid #7d522f;border-radius:19px;box-shadow:inset 0 0 0 3px #e0b378,inset 0 -5px #926033,0 5px 0 #66462a,0 10px 20px #31442e33}.build-tray::before,.build-tray::after{content:"";position:absolute;width:8px;height:8px;top:9px;background:#8c613b;border-radius:50%;box-shadow:inset 0 1px 1px #5c3f26,0 1px #edc385}.build-tray::before{left:9px}.build-tray::after{right:9px}.tray-heading{position:absolute;top:-19px;left:16px;right:16px;display:flex;align-items:center;gap:17px;justify-content:space-between}.build-title{display:flex;align-items:center;justify-content:center;position:relative;gap:8px;padding:8px 20px 9px 45px;background:linear-gradient(#a4d869,#6daa44);border:3px solid #567f38;border-radius:12px;box-shadow:inset 0 2px #d5eea1,inset 0 -3px #5f9438,0 3px 0 #674d2e;color:#fff9dc;font-size:18px;text-shadow:0 2px #547736;white-space:nowrap}.build-title>span{position:absolute;width:43px;height:43px;left:1px;top:-8px;transform:rotate(-12deg)}.tray-heading small{font-size:10px;color:#fff2c8;text-shadow:0 1px #79532e;text-align:right;line-height:1.3;margin-top:24px;padding-right:4px}.build-options{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.build-option{position:relative;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;min-width:0;height:125px;padding:0 4px 7px;border:2px solid #96703f;border-radius:12px;background:linear-gradient(#fffbe4,#f5e9c1);box-shadow:inset 0 2px #fffef2,inset 0 -3px #dfcb99,0 3px 0 #6e4e2e;transition:transform .15s,box-shadow .15s}.build-option:hover{transform:translateY(-5px);box-shadow:inset 0 2px #fffef2,inset 0 -3px #dfcb99,0 5px 0 #6e4e2e,0 8px 10px #684a2c22}.build-option:active{transform:translateY(1px)}.build-art{position:relative;display:grid;place-items:center;height:78px;width:100%}.build-art>img{width:100px;height:82px;object-fit:contain;filter:drop-shadow(0 3px 1px #7e633522);transition:transform .15s}.build-option:hover .build-art>img{transform:translateY(-2px) scale(1.05)}.build-name{align-self:stretch;min-width:0;font-size:12px;font-weight:900;color:#775332;line-height:1.15;white-space:normal;overflow-wrap:anywhere}.cost{display:flex;align-items:center;justify-content:center;gap:2px;min-width:55px;max-width:100%;margin-top:4px;height:22px;padding:1px 7px 1px 2px;background:#e8d6a6;border-radius:12px;color:#79552d;font-size:12px;font-weight:900;box-shadow:inset 0 1px 2px #b99b6133}.cost .ui-icon{width:21px;height:21px;flex-shrink:0;margin-top:-2px}.locked .build-art>img{filter:grayscale(.65);opacity:.45}.locked .cost{font-size:9px;padding:1px 4px 1px 1px}.locked .cost .ui-icon{width:16px;height:16px}.locked .build-name{color:#9c8d6e}.lock-badge{position:absolute;left:50%;top:50%;transform:translate(-50%,-35%);width:30px;height:30px;filter:drop-shadow(0 2px #fff6d7)}.selected-badge{display:none;position:absolute;right:-7px;top:-8px;width:27px;height:27px;border-radius:50%;border:2px solid #507d33;background:#eff8ba;padding:3px;box-shadow:0 2px #567737}.build-option[aria-pressed=true]{border:3px solid #598d3d;background:linear-gradient(#edf8c9,#c5df93);transform:translateY(-6px);box-shadow:inset 0 2px #fffbd7,inset 0 -3px #aac675,0 4px #42652f,0 6px 0 2px #f2d574}.build-option[aria-pressed=true] .selected-badge{display:block}

.view-controls{position:absolute;right:18px;bottom:282px;display:flex;flex-direction:column;gap:9px;z-index:2}.view-controls .game-button{width:48px;height:48px;padding:9px}.placement-hint{position:absolute;bottom:272px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;min-height:61px;padding:6px 9px;background:linear-gradient(#fff9df,#f5e2b4);border:3px solid #ae7d42;border-radius:15px;box-shadow:inset 0 2px #fffdf0,0 3px #7f5b33,0 7px 12px #344c2e22;max-width:calc(100% - 120px);z-index:3}.placement-tool{width:37px;height:37px;flex-shrink:0}.placement-hint>span:not(.placement-tool){font-size:12px;line-height:1.3;max-width:280px}.placement-hint .game-button{width:42px;height:42px;padding:7px;flex-shrink:0}.placement-hint kbd{position:absolute;right:-5px;bottom:-5px;font:9px "Trebuchet MS",sans-serif;font-weight:900;background:#fff1bd;border:1px solid #a8874b;border-radius:4px;padding:2px 4px;color:#796336}#cancel-build{background:linear-gradient(#eea49a,#cd6c60);border-color:#9a5147;box-shadow:inset 0 2px #ffd0b3,inset 0 -3px #b86251,0 3px #783e35}.toast{position:absolute;bottom:343px;left:50%;transform:translateX(-50%);max-width:calc(100% - 40px);padding:11px 21px;color:#fff9dc;background:linear-gradient(#79ac4b,#5e8c37);border:2px solid #446c2d;border-radius:20px;box-shadow:inset 0 2px #a7cd73,0 3px #355321,0 6px 10px #3c5a2925;font-size:12px;text-shadow:0 1px #476e2a;text-align:center;pointer-events:none;z-index:8}.toast.error{background:linear-gradient(#db9c63,#b87a45);border-color:#936039;text-shadow:0 1px #81532c;box-shadow:inset 0 2px #efc598,0 3px #75472d}

/* Time controls are a compact game cluster rather than a website footer. */
.bottom-bar{position:absolute;left:22px;right:22px;bottom:14px;display:flex;align-items:center;justify-content:space-between;height:45px;pointer-events:none}.bottom-bar>*{pointer-events:auto}.save-badge{display:flex;align-items:center;gap:6px;padding:5px 11px 5px 6px;background:#ecf3d6d9;border:2px solid #719257;border-radius:18px;box-shadow:inset 0 1px #fff,0 2px #526d3f;color:#577443;font-size:10px}.save-badge>span[data-ui-icon]{width:23px;height:23px}.camera-help{font-size:10px;color:#55733b;text-shadow:0 1px #e1edbf;background:#d7e5b97d;padding:6px 12px;border-radius:15px}.time-controls{display:flex;align-items:center;gap:9px}.day-badge{display:flex;align-items:center;gap:4px;padding:4px 12px 4px 3px;background:linear-gradient(#fff7d9,#ecd79e);border:2px solid #aa8344;border-radius:17px;box-shadow:inset 0 1px #fff8e4,0 2px #7f653c;min-width:108px}.day-badge>span[data-ui-icon]{width:34px;height:34px}.day-badge b{display:block;font-size:12px;white-space:nowrap;color:#8a642e}.day-badge small{display:block;font-size:10px;color:#a18350;margin-top:2px}.time-controls>#pause{width:43px;height:43px;padding:8px;border-radius:13px}.speed-buttons{display:flex;padding:3px;gap:3px;border:2px solid #89653d;background:#c2a06a;border-radius:13px;box-shadow:inset 0 2px #9d7b4e,0 2px #6a5031}.speed-buttons button{width:35px;height:29px;border:0;border-radius:8px;background:linear-gradient(#f4e4b9,#e2c791);color:#9b794a;font-size:12px;font-weight:900;box-shadow:inset 0 1px #fff3d4,0 2px #997548}.speed-buttons button[aria-pressed=true]{background:linear-gradient(#a0cd6b,#6ca242);color:#fff9d8;text-shadow:0 1px #577d31;box-shadow:inset 0 1px #d0e9a1,0 2px #4f782e}

/* Matching building sheets and pause/menu panels. */
.inspector{position:absolute;right:21px;top:113px;width:282px;padding:0 16px 16px;background:linear-gradient(#fff8dc,#f3e0b3);border:3px solid #a77840;border-radius:17px;box-shadow:inset 0 0 0 3px #fadd9e,0 4px #775633,0 8px 18px #3f562b30;z-index:5;animation:panel-in .18s ease-out}.close-button{position:absolute;right:-11px;top:-12px;width:32px;height:32px;padding:5px;border-width:2px;border-radius:50%;background:linear-gradient(#f7a89b,#d36f60);border-color:#9f5046;box-shadow:inset 0 1px #ffd6bd,0 3px #7f4339;z-index:2}.inspector-hero{display:flex;align-items:center;gap:5px;min-height:91px;margin:0 -16px 12px;padding:6px 10px;background:linear-gradient(#8abed5,#649cba);border-radius:13px 13px 0 0;border-bottom:3px solid #a58a55;box-shadow:inset 0 2px #b7ddeb}.inspector-hero img{width:88px;height:83px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 3px 1px #3d68852b)}.eyebrow{font-size:9px;font-weight:900;letter-spacing:.7px;color:#ac8655}.inspector-hero .eyebrow{color:#e7f1dd;font-size:8px;line-height:1.5;letter-spacing:.2px;text-shadow:0 1px #5b87a0}.inspector h2{font-size:24px;line-height:1.05;color:#fff8db;text-shadow:0 2px #466b87;margin-top:5px}.inspector>p{font-size:12px;line-height:1.5;color:#9a7a4e}.detail-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:10px 0;border-bottom:1px dashed #dbbf8c;font-size:11px;line-height:1.35}.detail-row span:first-child{color:#ac8856;flex-shrink:0}.detail-row span:last-child{text-align:right;color:#795b31}#inspector-data{margin:8px 0 14px}#inspector-actions{display:flex;flex-direction:column;gap:9px}#inspector-actions button,.primary{display:flex;justify-content:center;align-items:center;gap:7px;padding:8px 10px;background:linear-gradient(#a3ce69,#6da440);border:2px solid #557f34;border-radius:11px;box-shadow:inset 0 2px #cce99c,inset 0 -3px #5e9335,0 3px #41672b;color:#fff8d9;text-shadow:0 1px #547a33;font-size:12px;font-weight:900;min-height:40px}#inspector-actions button .ui-icon{width:25px;height:25px;flex-shrink:0}#inspector-actions button:hover,.primary:hover{filter:brightness(1.08)}#inspector-actions .secondary{background:linear-gradient(#e9cca0,#d7b782);border-color:#bb9967;box-shadow:inset 0 1px #ffebc3,0 2px #a58151;color:#92703e;text-shadow:0 1px #f8e4be;font-size:10px}#inspector-actions .secondary .ui-icon{width:17px;height:17px;opacity:.7}.town-menu{position:absolute;right:22px;top:106px;width:300px;padding:23px;background:linear-gradient(#fff9df,#ecd5a7);border:3px solid #a3743d;border-radius:18px;box-shadow:inset 0 0 0 3px #f7dda0,0 4px #765534,0 8px 20px #33482d40;z-index:7}.town-menu h2{font-size:24px;color:#826039;margin:8px 0 12px}.town-menu p:not(.eyebrow){font-size:12px;line-height:1.6;color:#a08051;margin-bottom:13px}.town-menu>button:not(.text-button){display:flex;justify-content:space-between;align-items:center;width:100%;padding:12px;margin-top:9px;background:linear-gradient(#77b8da,#4c92bc);border:2px solid #416e8d;border-radius:10px;box-shadow:inset 0 1px #c0e2ee,0 3px #365976;color:#fff8df;font-size:12px;text-shadow:0 1px #446c89}.town-menu>.text-button{margin:15px auto 0}.dialog-backdrop{position:fixed;inset:0;background:#203b3c80;backdrop-filter:blur(3px);display:grid;place-items:center;z-index:20}.dialog{width:min(440px,calc(100% - 36px));padding:30px;background:linear-gradient(#fff9df,#efd9ac);border:4px solid #a97b42;border-radius:20px;box-shadow:inset 0 0 0 3px #ffdfa0,0 5px #745332,0 20px 80px #142c3066}.dialog h2{font-size:28px;color:#826039;line-height:1.15;margin:13px 0}.dialog>p:not(.eyebrow){font-size:13px;line-height:1.6;color:#a08051}.dialog>div{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:24px}.dialog>div button{padding:12px 14px;border-radius:10px;font-size:12px}#dialog-cancel{border:2px solid #b5996c;background:linear-gradient(#f7e8c6,#e3cc9d);box-shadow:0 2px #a7895e;color:#937347}.loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:radial-gradient(ellipse at center,#d9ebaa,#98bd79);z-index:30}.loading-mark{width:130px;height:130px;filter:drop-shadow(0 5px 0 #5c6e3b44);animation:bob 2s ease-in-out infinite}.loading h2{font-size:32px;color:#fff8d4;-webkit-text-stroke:.5px #768e42;text-shadow:0 3px #728b3d;margin:18px 0 25px}.loading-track{width:220px;height:19px;border:3px solid #819453;background:#a7b979;border-radius:12px;box-shadow:inset 0 2px #64793866,0 1px #def0ac;overflow:hidden}.loading-track i{display:block;width:65%;height:100%;border-radius:8px;background:linear-gradient(#fff4ad,#e6bd57);animation:loading-pulse 1.5s ease-in-out infinite}.loading p{font-size:12px;color:#60803e;margin-top:15px}.loading button{margin-top:15px;padding:12px 20px;background:var(--blue);border:2px solid var(--blue-dark);border-radius:10px;color:#fff8dc}
@keyframes panel-in{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:none}}@keyframes bob{50%{transform:translateY(-7px)}}@keyframes loading-pulse{50%{opacity:.6}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

@media(min-width:1500px){.topbar{left:30px;right:30px}.resources{gap:28px}.resource-chip{min-width:140px}.goals-panel{left:30px;top:126px;width:249px}.build-tray{width:950px}.build-option{height:132px}.build-art{height:85px}.build-art>img{width:110px;height:89px}}
@media(max-width:1150px){.topbar{gap:18px}.supply-resource{display:none}.resources{gap:20px;margin-left:auto;margin-right:auto}.brand{min-width:180px;padding-right:12px}.brand-name{font-size:24px}.resource-chip{min-width:116px}.wellbeing-chip{min-width:108px}.build-tray{width:calc(100% - 90px)}.build-name{font-size:11px}.camera-help{display:none}}
@media(max-width:850px){.topbar{left:16px;right:16px;gap:15px}.brand{min-width:160px;padding-left:44px;height:53px}.brand-mark{width:61px;height:61px;top:-10px}.brand-name{font-size:22px}.resource-chip{min-width:108px;padding-left:32px;padding-right:10px}.resource-icon{width:47px;height:47px;left:-15px;top:-2px}.resources{gap:16px}.resource-chip strong{font-size:19px}.goals-panel{width:210px;left:17px;top:111px}.quest-title h1{font-size:20px}.quest-emblem{width:48px;height:48px;left:5px;top:-5px}.goal-current h3{font-size:14px}.goal-current p{font-size:11px}.inspector{width:260px}.build-tray{width:calc(100% - 32px);padding-left:9px;padding-right:9px}.build-options{gap:6px}.build-option{height:117px}.build-art{height:72px}.build-art>img{width:86px;height:72px}.build-name{font-size:10px}.view-controls{right:15px;bottom:272px}.view-controls .game-button{width:43px;height:43px}.tray-heading small{font-size:9px;max-width:220px}.tray-heading{left:14px;right:11px}.build-title{font-size:16px}.bottom-bar{left:16px;right:16px}}
@media(max-width:650px){.topbar{top:13px;left:15px;right:11px;gap:11px;height:49px}.brand{min-width:133px;height:45px;padding:4px 8px 5px 35px;border-radius:13px;border-width:2px}.brand::after{inset:4px;border-radius:8px}.brand-mark{width:53px;height:53px;left:-13px;top:-9px}.brand-name{font-size:19px;letter-spacing:-.7px}.brand-small{font-size:7px;letter-spacing:2px;margin-top:4px}.wellbeing-chip{display:none}.resources{gap:13px;margin:0 auto}.resource-chip{height:41px;min-width:97px;border-width:2px;padding-left:29px;padding-right:9px}.resource-chip strong{font-size:18px}.resource-chip small{font-size:8px}.resource-chip em{font-size:10px}.resource-icon{width:42px;height:42px;left:-14px;top:-4px}.topbar .icon-button{width:43px;height:43px;border-radius:13px;padding:7px;border-width:2px;flex-shrink:0}.goals-panel{top:91px;width:197px;left:15px;padding:0 12px 6px;border-width:2px}.quest-title{margin-left:-20px;margin-right:-20px;height:44px;border-width:2px;padding-left:18px}.quest-title h1{font-size:19px}.quest-emblem{width:45px;height:45px;left:3px;top:-7px}.goal-current{padding-top:10px}.goal-heading{font-size:8px}.quest-reward{font-size:12px;padding-right:5px}.quest-reward .ui-icon{width:22px;height:22px}.goal-current h3{font-size:13px;margin-top:6px}.goal-current p{font-size:10px;line-height:1.35}.goal-progress{margin-top:9px;gap:6px}.goal-track{height:13px}.goal-progress>span{font-size:10px}.goals-panel>.text-button{font-size:10px;margin-top:3px;padding-top:5px;padding-bottom:5px}.text-button .ui-icon,.text-button>span[data-ui-icon]{width:19px;height:19px}.goal-list-row{font-size:10px;padding:7px 0}.build-tray{bottom:69px;width:calc(100% - 20px);padding:29px 7px 9px;border-width:2px;border-radius:15px}.tray-heading{top:-16px;left:11px;right:11px}.tray-heading small{display:none}.build-title{padding:7px 13px 8px 34px;font-size:15px;border-width:2px;border-radius:10px}.build-title>span{width:34px;height:34px;top:-5px}.build-options{display:flex;gap:7px;overflow-x:auto;overflow-y:visible;padding:7px 3px 6px;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#e4c082 transparent}.build-option{min-width:86px;width:86px;height:112px;flex-shrink:0;scroll-snap-align:start}.build-art{height:67px}.build-art>img{width:87px;height:72px}.build-name{font-size:10px}.cost{height:21px;font-size:11px;min-width:50px}.cost .ui-icon{width:19px;height:19px}.locked .cost{font-size:8px}.lock-badge{width:26px;height:26px}.view-controls{right:12px;bottom:270px;gap:8px}.view-controls .game-button{width:40px;height:40px;padding:7px;border-width:2px;border-radius:12px}.placement-hint{bottom:253px;left:12px;transform:none;max-width:calc(100% - 72px);gap:7px;padding:6px;border-width:2px;min-height:50px;border-radius:12px}.placement-tool{width:25px;height:25px}.placement-hint>span:not(.placement-tool){font-size:10px;max-width:155px}.placement-hint .game-button{width:34px;height:34px;padding:6px;border-width:2px;border-radius:10px}.placement-hint kbd{display:none}.toast{bottom:313px;font-size:11px;max-width:calc(100% - 25px);width:max-content;padding:10px 13px;line-height:1.4}.bottom-bar{bottom:13px;left:12px;right:12px;height:40px}.save-badge{font-size:8px;padding:3px 7px 3px 4px;border-radius:13px;max-width:110px;line-height:1.2}.save-badge>span[data-ui-icon]{width:19px;height:19px;flex-shrink:0}.time-controls{gap:6px}.day-badge{min-width:80px;padding:3px 8px 3px 1px;border-radius:13px}.day-badge>span[data-ui-icon]{width:29px;height:29px}.day-badge b{font-size:10px}.day-badge small{font-size:8px;margin-top:1px}.time-controls>#pause{width:37px;height:37px;padding:7px;border-width:2px;border-radius:11px}.speed-buttons{gap:2px;padding:2px;border-radius:10px}.speed-buttons button{width:26px;height:26px;font-size:10px;border-radius:6px}.inspector{top:90px;right:13px;width:250px;max-height:calc(100dvh - 300px);overflow:auto;padding:0 13px 13px}.inspector-hero{margin-left:-13px;margin-right:-13px;min-height:80px}.inspector-hero img{width:77px;height:74px}.inspector h2{font-size:22px}.inspector>p{font-size:11px}.detail-row{font-size:10px;padding:8px 0}.close-button{position:sticky;float:right;top:5px;right:0;margin-right:-7px;margin-bottom:-30px;z-index:3}.town-menu{top:81px;right:13px;width:280px;padding:20px}.dialog{padding:25px}.dialog h2{font-size:25px}.loading h2{font-size:26px}.loading p{font-size:11px;padding:0 25px;text-align:center}}
@media(max-width:400px){.brand{min-width:112px;padding-left:29px;padding-right:5px}.brand-name{font-size:17px}.brand-small{font-size:6px}.brand-mark{width:48px;height:48px;left:-13px;top:-7px}.resource-chip{min-width:87px;padding-left:25px;padding-right:7px}.resource-chip strong{font-size:16px}.resource-chip small{font-size:7px}.resource-icon{width:37px;height:37px;left:-13px;top:-1px}.topbar{gap:9px}.resources{gap:11px}.topbar .icon-button{width:37px;height:39px;padding:6px}.time-controls{gap:4px}.save-badge{max-width:89px}.day-badge{min-width:74px}.speed-buttons button{width:24px}}
@media(max-width:375px){.brand{min-width:44px;width:44px;padding:0;flex-shrink:0}.brand-name{display:none}.brand-mark{width:51px;height:51px;left:-6px;top:-7px}.resource-chip{min-width:85px}.resources{gap:10px}.topbar{gap:8px}.placement-tool{display:none}.placement-hint>span:not(.placement-tool){max-width:137px}.placement-hint{max-width:calc(100% - 65px)}}
.menu-icon{display:block;width:25px;height:25px}.import-icon{transform:rotate(-90deg)}.goal-current{animation:panel-in .2s ease-out}
@media(max-height:700px) and (min-width:651px){.goals-panel{top:103px}.goal-current{padding-top:10px}.goals-panel>.text-button{margin-top:2px;padding:5px 0}.build-option{height:108px}.build-art{height:62px}.build-art>img{width:85px;height:68px}.build-tray{bottom:65px;padding-top:30px}.view-controls{bottom:250px}.placement-hint{bottom:242px}.toast{bottom:310px}.bottom-bar{bottom:10px}}

/* Construction timing stays within the existing tile and inspector layout. */
.build-time{position:absolute;top:3px;right:3px;z-index:1;padding:2px 5px;border:1px solid #b69761;border-radius:7px;background:#fff0c7;color:#725731;font-size:9px;font-weight:800;box-shadow:0 1px 2px #76573325}
.construction-progress{height:14px;overflow:hidden;margin:12px 0 4px;border:2px solid #8b673b;border-radius:8px;background:#d9c397;box-shadow:inset 0 2px 3px #73532f38}
.construction-progress i{display:block;height:100%;background:repeating-linear-gradient(125deg,#edba4d 0 10px,#ffe29a 10px 20px);border-radius:5px}

@font-face{font-family:"Noto Sans Myanmar";src:url('./assets/fonts/NotoSansMyanmar.ttf') format('truetype');font-weight:100 900;font-stretch:62.5% 100%;font-display:swap}
.language-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;padding:10px 0;border-block:1px solid #d6b983}
.language-setting label{font-size:13px;color:#775b37}
.language-setting select{font:600 13px "Noto Sans Myanmar",sans-serif;line-height:1.8;min-width:135px;padding:6px 9px;border:2px solid #a57b44;border-radius:9px;background:#fff4d1;color:#6e4c2b;cursor:pointer}
.language-setting select:focus-visible{outline:3px solid #528eaa;outline-offset:2px}
.build-title>b{font:inherit}
:root:lang(my){font-family:"Noto Sans Myanmar","Myanmar Text",sans-serif;font-weight:600;line-height:1.65}
:lang(my) .brand-name{font-size:23px;line-height:1.55;letter-spacing:0}
:lang(my) .brand-small{font-size:10px;line-height:1.5;letter-spacing:0;margin-top:0}
:lang(my) .resource-chip{height:59px;padding-block:4px}
:lang(my) .resource-chip small{font-size:11px;letter-spacing:0;line-height:1.7;white-space:normal}
:lang(my) .resource-chip strong{line-height:1.2}
:lang(my) .wellbeing-chip{max-width:150px}
:lang(my) .goals-panel{width:265px}
:lang(my) .quest-title h1{font-size:17px;line-height:1.7}
:lang(my) .goal-heading{font-size:10px;line-height:1.8}
:lang(my) .goal-current h3{font-size:15px;line-height:1.9}
:lang(my) .goal-current p{font-size:12px;line-height:1.9;color:#87653e}
:lang(my) .text-button{line-height:1.8}
:lang(my) .build-option{height:149px;padding-bottom:9px}
:lang(my) .build-name{display:flex;align-items:center;justify-content:center;white-space:normal;text-align:center;min-height:39px;font-size:12px;line-height:1.75}
:lang(my) .build-art{height:69px}
:lang(my) .build-time{font-size:9px;line-height:1.7;padding:1px 4px}
:lang(my) .locked .cost{height:auto;min-height:25px;line-height:1.8;text-align:center;font-size:10px}
:lang(my) .build-title{font-size:15px;line-height:1.7}
:lang(my) .tray-heading small{font-size:11px;line-height:1.8;max-width:360px}
:lang(my) .inspector{width:315px;max-height:calc(100dvh - 330px);overflow-y:auto}
:lang(my) .inspector h2{font-size:21px;line-height:1.8}
:lang(my) .inspector-hero .eyebrow{font-size:10px;line-height:1.9}
:lang(my) .inspector>p{font-size:12px;line-height:2}
:lang(my) .detail-row{align-items:flex-start;gap:12px;font-size:12px;line-height:1.95}
:lang(my) .detail-row span:first-child{flex-shrink:1;min-width:35%}
:lang(my) #inspector-actions button{font-size:12px;line-height:1.9}
:lang(my) .town-menu{width:min(350px,calc(100vw - 26px));max-height:calc(100dvh - 125px);overflow-y:auto}
:lang(my) .town-menu h2,:lang(my) .dialog h2{font-size:23px;line-height:1.8}
:lang(my) .town-menu p:not(.eyebrow),:lang(my) .dialog>p:not(.eyebrow){font-size:13px;line-height:2;color:#87653e}
:lang(my) .town-menu>button:not(.text-button),:lang(my) .dialog>div button{font-size:13px;line-height:1.9}
:lang(my) .placement-hint>span:not(.placement-tool){font-size:12px;line-height:1.9}
:lang(my) .save-badge{font-size:11px;line-height:1.8}
:lang(my) .day-badge b{font-size:12px;line-height:1.8}
:lang(my) .loading h2{line-height:1.9}
:lang(my) .toast{font-size:13px;line-height:1.9}
@media(max-width:650px){:lang(my) .brand{min-width:135px}:lang(my) .brand-name{font-size:18px}:lang(my) .brand-small{font-size:8px}:lang(my) .resource-chip{height:46px;min-width:100px}:lang(my) .resource-chip small{font-size:9px}:lang(my) .goals-panel{width:210px}:lang(my) .quest-title h1{font-size:14px}:lang(my) .goal-current h3{font-size:12px}:lang(my) .goal-current p{font-size:11px}:lang(my) .build-option{height:142px;min-width:105px;width:105px}:lang(my) .build-name{font-size:11px}:lang(my) .build-title{font-size:13px}:lang(my) .inspector{width:min(290px,calc(100vw - 26px));max-height:calc(100dvh - 310px)}:lang(my) .save-badge{max-width:100px;font-size:9px}:lang(my) .town-menu{top:81px;max-height:calc(100dvh - 95px)}:lang(my) .view-controls{bottom:292px}:lang(my) .placement-hint{bottom:278px}:lang(my) .toast{bottom:340px}}
:lang(my) .wellbeing-chip small{white-space:nowrap}
:lang(my) .inspector{overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#bc965c #f3e0b3}
:lang(my) .inspector .close-button{position:sticky;float:right;top:5px;right:0;margin-right:-7px;margin-bottom:-30px;z-index:3}
@media(max-width:400px){:lang(my) .brand{min-width:110px;padding-left:29px;padding-right:5px}:lang(my) .brand-name{font-size:16px}:lang(my) .brand-small{font-size:8px}:lang(my) .resource-chip{min-width:87px;padding-left:25px;padding-right:7px}:lang(my) .resource-chip small{font-size:8px;line-height:1.7}:lang(my) .resource-chip strong{font-size:16px}}
@media(max-width:375px){:lang(my) .brand{min-width:44px;width:44px;padding:0}:lang(my) .brand-name{display:none}:lang(my) .resource-chip{min-width:82px}}
:lang(my) .inspector .close-button{position:absolute;float:none;top:6px;right:6px;margin:0}
:lang(my) .inspector-hero{padding-right:34px}

/* Chapter two keeps production buildings in their own construction category. */
.build-options{grid-template-columns:repeat(var(--build-columns,7),minmax(0,1fr))}
.build-categories{display:flex;gap:7px;margin:0 0 9px}
.build-categories button{padding:5px 13px;border:2px solid #795632;border-radius:8px;background:#e7c997;color:#795431;font-size:11px;line-height:1.5;box-shadow:0 2px #76502d}
.build-categories button[aria-pressed=true]{background:linear-gradient(#a4d869,#6daa44);color:#fff9dc;border-color:#527a32}
.food-flow{font-size:11px;color:#fff2ce;line-height:1.7;margin:0 0 8px;text-align:center;text-shadow:0 1px #79532e}
.build-tray[data-category=food]{width:min(670px,calc(100% - 90px))}
:lang(my) .build-categories button{font-size:12px;line-height:1.8}
:lang(my) .food-flow{font-size:11px;line-height:1.9}
@media(max-width:650px){.build-tray[data-category=food]{width:calc(100% - 20px)}.build-categories{gap:6px;margin-bottom:7px}.build-categories button{padding:4px 10px;font-size:10px}.food-flow{font-size:10px;text-align:left}.build-tray[data-category=food] .build-options{display:flex}.build-tray[data-category=food] .build-option{min-width:100px;width:100px}:lang(my) .build-categories button{font-size:11px}}
body:has(.build-tray[data-category=food]) .placement-hint{bottom:337px}
body:has(.build-tray[data-category=food]) .toast{bottom:407px}
:lang(my) body:has(.build-tray[data-category=food]) .placement-hint{bottom:367px}
:lang(my) body:has(.build-tray[data-category=food]) .toast{bottom:437px}
@media(max-width:650px){body:has(.build-tray[data-category=food]) .placement-hint{bottom:340px}:lang(my) body:has(.build-tray[data-category=food]) .placement-hint{bottom:375px}}

/* The land grant uses the same timber and painted buttons as the construction HUD. */
.district-action{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;margin:10px 0 5px;padding:9px 8px;border:2px solid #39795c;border-radius:10px;background:linear-gradient(#8bc683,#5b9f65);color:#fff9dc;font-family:inherit;font-size:12px;font-weight:800;box-shadow:0 3px 0 #356c4d,inset 0 1px 0 #d4e7a9;text-shadow:0 1px 1px #345736;cursor:pointer}
.district-action .ui-icon{width:23px;height:23px;flex-shrink:0}
.district-sign{position:fixed;z-index:4;transform:translate(-50%,-100%);width:184px;padding:30px 11px 11px;border:4px solid #8a5a30;border-radius:12px;background:linear-gradient(100deg,#ffe3a5,#edc07c);color:#684321;box-shadow:0 5px 0 #684125,0 10px 17px #405a4140;text-align:center;cursor:pointer;font-family:inherit}
.district-sign::after{content:"";position:absolute;top:calc(100% + 4px);left:calc(50% - 6px);width:12px;height:24px;background:#81572f;box-shadow:inset 3px 0 #b0864a;pointer-events:none}
.district-sign-art{position:absolute;width:61px;height:61px;left:calc(50% - 30px);top:-34px;filter:drop-shadow(0 3px 1px #68432155)}
.district-sign strong{display:block;font-size:15px;line-height:1.25}.district-sign small{display:block;margin:5px 0 9px;font-size:11px;color:#876137}.district-sign b{display:block;border:2px solid #39795c;border-radius:8px;padding:7px 3px;background:linear-gradient(#8bc683,#5b9f65);box-shadow:0 2px 0 #356c4d;color:#fff9dc;text-shadow:0 1px #345736;font-size:12px}
.district-action:focus-visible,.district-sign:focus-visible{outline:3px solid #2b7896;outline-offset:4px}
:lang(my) .district-action{font-family:inherit;font-size:11px;line-height:1.8}
:lang(my) .district-sign strong{font-size:13px;line-height:1.8}:lang(my) .district-sign small,:lang(my) .district-sign b{font-size:10px;line-height:1.8}
@media(max-width:650px){.district-action{font-size:10px;padding:6px}.district-sign{width:148px;padding:24px 8px 8px;border-width:3px}.district-sign strong{font-size:12px}.district-sign small{font-size:9px;margin:4px 0 6px}.district-sign b{font-size:10px;padding:5px 2px}.district-sign-art{width:48px;height:48px;left:calc(50% - 24px);top:-29px}}

/* Touch play keeps the town clear until a player opens a panel. */
.mobile-only{display:none}.touch-help{display:none}
#confirm-placement{min-height:44px;min-width:88px;padding:9px 13px;border:2px solid #39795c;border-radius:10px;background:linear-gradient(#8bc683,#5b9f65);color:#fff9dc;font-weight:800;box-shadow:0 3px #356c4d}
.dialog{max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}.dialog>div{flex-wrap:wrap}
.town-menu{max-width:calc(100vw - 24px);max-height:calc(100dvh - 125px);overflow-y:auto;overscroll-behavior:contain}
html,body{overscroll-behavior:none}button{user-select:none;-webkit-user-select:none}
@media(pointer:coarse){button,.game-button,.topbar .icon-button,.time-controls>#pause,.speed-buttons button,.view-controls .game-button,.placement-hint .game-button{min-width:44px;min-height:44px}.touch-help{display:block}.game-button:hover,.build-option:hover,.build-option:hover .build-art>img{transform:none;filter:none}}
@media(max-width:720px),(max-height:500px){
  :root{--safe-bottom:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-top,0px);--dock-height:60px}
  .mobile-only{display:flex}.touch-help{display:block}
  .topbar{top:calc(10px + var(--safe-top));left:max(12px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));gap:10px;height:50px}
  .brand,:lang(my) .brand{min-width:44px;width:44px;height:44px;padding:0;flex-shrink:0}.brand-name,:lang(my) .brand-name{display:none}.brand-mark{width:51px;height:51px;left:-6px;top:-7px}
  .resources{gap:12px;margin:0 auto}.resource-chip,:lang(my) .resource-chip{min-width:83px;height:44px;padding-left:25px;padding-right:7px}.resource-chip strong{font-size:16px}.resource-chip small,:lang(my) .resource-chip small{font-size:8px}.resource-icon{width:37px;height:37px;left:-13px;top:-1px}.wellbeing-chip,.supply-resource{display:none}
  .topbar .icon-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:8px}
  .goals-panel,:lang(my) .goals-panel{top:calc(78px + var(--safe-top));left:max(12px,env(safe-area-inset-left));width:min(265px,calc(100% - 78px));max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 180px);overflow-y:auto;overscroll-behavior:contain;padding:0 10px 8px;z-index:5}
  .quest-title{position:sticky;top:0;z-index:2;margin:0 -10px;padding:0 44px 0 44px;height:48px;border-width:2px}.quest-title h1,:lang(my) .quest-title h1{font-size:14px;line-height:1.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quest-emblem{left:0;top:-3px;width:46px;height:46px}
  #toggle-goals-panel{position:absolute;right:0;top:0;align-items:center;justify-content:center;width:44px;height:44px;border:0;background:none;padding:11px;color:#fff8db}#toggle-goals-panel>span{width:22px;height:22px;transform:rotate(90deg)}
  .goals-open #toggle-goals-panel>span{transform:rotate(-90deg)}
  body:not(.goals-open) .goals-panel{padding-bottom:0;background:none;border-color:transparent;box-shadow:none;overflow:visible}
  body:not(.goals-open) .goals-panel>:not(.quest-title),body:not(.goals-open) .goals-panel::before,body:not(.goals-open) .goals-panel::after{display:none!important}
  .goals-panel .text-button,.district-action,:lang(my) .district-action{min-height:44px;font-size:12px}.goal-current p,:lang(my) .goal-current p{font-size:12px;line-height:1.7}.goal-current h3,:lang(my) .goal-current h3{font-size:14px;line-height:1.6}
  .build-tray,.build-tray[data-category=food]{position:fixed;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(68px + var(--safe-bottom));width:auto;transform:none;padding:5px 7px;border-radius:14px;max-height:44dvh;overflow-y:auto;overscroll-behavior:contain;z-index:4}
  .tray-heading{display:none}.build-toggle{align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:46px;padding:4px 8px;background:none;border:0;color:#fff8db;font-family:inherit;font-size:14px;text-shadow:0 1px #6b492b}.build-toggle>span{width:30px;height:30px;flex-shrink:0}.build-toggle>span:last-child{width:20px;height:20px;transform:rotate(-90deg)}.build-open .build-toggle>span:last-child{transform:rotate(90deg)}
  body:not(.build-open) .build-tray>:not(.build-toggle){display:none!important}
  .build-categories{margin-top:5px;gap:8px}.build-categories button,:lang(my) .build-categories button{min-height:44px;padding:7px 12px;font-size:12px}.build-options,.build-tray[data-category=food] .build-options{display:flex;gap:10px;overflow-x:auto;padding:8px 3px 9px;touch-action:pan-x pan-y;scroll-padding:4px}.build-option,.build-tray[data-category=food] .build-option{min-width:102px;width:102px;height:127px}.build-name{font-size:12px}.food-flow,:lang(my) .food-flow{font-size:11px}.build-option:hover,.build-option:hover .build-art>img{transform:none}
  .view-controls,:lang(my) .view-controls{right:max(12px,env(safe-area-inset-right));bottom:calc(80px + var(--safe-bottom) + var(--dock-height));display:grid;grid-template-columns:44px 44px;gap:8px}.view-controls .game-button{width:44px;height:44px;padding:8px;min-width:44px;min-height:44px}.building-mode .view-controls{display:none}
  .placement-hint,body:has(.build-tray[data-category=food]) .placement-hint,:lang(my) .placement-hint,:lang(my) body:has(.build-tray[data-category=food]) .placement-hint{position:fixed;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(80px + var(--safe-bottom) + var(--dock-height));transform:none;max-width:none;display:grid;grid-template-columns:1fr 44px 44px;gap:8px;padding:10px;border-width:2px;z-index:6}
  .placement-tool{display:none}.placement-hint>span:not(.placement-tool),:lang(my) .placement-hint>span:not(.placement-tool){grid-column:1/-1;max-width:none;font-size:13px;line-height:1.7}.placement-hint .game-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:8px}.placement-hint kbd{display:none}#confirm-placement{font-family:inherit;font-size:13px}#rotate{grid-column:2}#cancel-build{grid-column:3}
  .toast,body:has(.build-tray[data-category=food]) .toast,:lang(my) .toast,:lang(my) body:has(.build-tray[data-category=food]) .toast{bottom:calc(200px + var(--safe-bottom) + var(--dock-height));font-size:12px;line-height:1.7;max-width:calc(100% - 28px);padding:8px 13px}
  .bottom-bar{position:fixed;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:calc(10px + var(--safe-bottom));height:48px}.save-badge{display:none}.time-controls{width:100%;justify-content:flex-end;gap:6px}.time-controls>#pause{width:44px;height:44px;min-width:44px;min-height:44px}.speed-buttons{gap:4px;padding:3px}.speed-buttons button{width:44px;height:44px;font-size:13px}.day-badge{min-width:73px;padding-right:7px}.day-badge b,:lang(my) .day-badge b{font-size:11px}.day-badge>span[data-ui-icon]{width:25px;height:25px}
  .inspector,:lang(my) .inspector{position:fixed;top:auto;bottom:calc(74px + var(--safe-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 160px);padding:0 14px 14px;overflow-y:auto;overscroll-behavior:contain;z-index:7}.inspector-hero{position:sticky;top:0;z-index:2;background:#f8e7bf;margin:0 -14px;padding-right:48px}.inspector>p,:lang(my) .inspector>p{font-size:13px;line-height:1.8}.detail-row,:lang(my) .detail-row{font-size:12px;line-height:1.8}.inspector .close-button,:lang(my) .inspector .close-button{position:sticky;float:right;top:7px;right:0;min-width:44px;min-height:44px;margin:7px -7px -51px 0;z-index:4}.inspector h2,:lang(my) .inspector h2{font-size:21px}#inspector-actions button,:lang(my) #inspector-actions button{min-height:48px;font-size:13px;line-height:1.7}
  body:has(#inspector:not([hidden])) .build-tray,body:has(#inspector:not([hidden])) .goals-panel,body:has(#inspector:not([hidden])) .view-controls{display:none}
  .town-menu,:lang(my) .town-menu{position:fixed;top:calc(76px + var(--safe-top));right:max(12px,env(safe-area-inset-right));width:min(350px,calc(100% - 24px));max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 96px);padding:18px;z-index:10}.town-menu button,.town-menu select{min-height:44px}.language-setting select{font-size:16px;max-width:62%}
  .dialog{padding:22px;max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px)}.dialog>div button{min-height:48px;flex:1;font-size:13px}.dialog h2{font-size:24px}.dialog>p:not(.eyebrow){font-size:13px;line-height:1.7}
}
@media(max-height:500px){.goals-panel,:lang(my) .goals-panel{max-height:calc(100dvh - 100px);width:250px}.build-tray,.build-tray[data-category=food]{max-height:calc(100dvh - 145px);left:auto;width:min(430px,calc(100% - 300px))}.placement-hint,body:has(.build-tray[data-category=food]) .placement-hint,:lang(my) body:has(.build-tray[data-category=food]) .placement-hint{left:auto;width:min(430px,calc(100% - 300px))}.toast,body:has(.build-tray[data-category=food]) .toast,:lang(my) body:has(.build-tray[data-category=food]) .toast{bottom:calc(80px + var(--safe-bottom));left:12px;transform:none;max-width:250px}.inspector,:lang(my) .inspector{left:auto;width:min(380px,calc(100% - 24px));bottom:calc(12px + var(--safe-bottom));max-height:calc(100dvh - 90px)}.topbar{right:12px}.build-option{height:110px}}

@media(max-height:500px){.view-controls,:lang(my) .view-controls{left:max(12px,env(safe-area-inset-left));right:auto;bottom:calc(80px + var(--safe-bottom))}.build-toggle{position:sticky;top:0;background:#b77c46;z-index:2}}

@media(max-width:720px),(max-height:500px){
  #placement-hint{grid-template-columns:48px 48px minmax(0,1fr)}
  #rotate,#cancel-build,#confirm-placement{grid-row:2;min-height:48px}
  #rotate{grid-column:1;width:48px}
  #cancel-build{grid-column:2;width:48px}
  #confirm-placement{grid-column:3}
  #confirm-placement:disabled{background:#e4dece;color:#635e53;box-shadow:none;border-color:#b5ac97}
  .build-options{scroll-snap-type:x proximity}
  .build-option{scroll-snap-align:start}
}

.detail-row .inventory-icon{vertical-align:middle;margin-inline-end:5px;object-fit:contain}
