/* Unified, readable controls and a map-first command dock. */
:root{--ink:#23382c;--cream:#fff3d0;--gold:#efd08c;--dock-height:280px}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f3cb69;outline-offset:3px}button:disabled{opacity:1;background:#506052;color:#d1d8cc;border-color:#73806e;cursor:not-allowed}
header{top:12px;left:18px;right:18px;gap:12px}.brand{min-width:220px}.brand h1{font-size:24px}.brand-icon{font-size:34px}.brand small,.kids .brand small{font-size:11px;letter-spacing:.7px}.stats{padding:9px 3px;border-radius:12px}.stats>div,.kids .stats>div{padding:0 13px;min-width:72px}.stats b,.kids .stats b{font-size:22px}.stats span{font-size:12px}header #music,header #voice,header #help,.kids header #help{height:42px;min-width:42px;width:42px;font-size:19px}.speed-controls,.kids .speed-controls{top:90px;right:18px}.kids #pause{height:38px;width:40px;font-size:20px}.workforce{top:100px;left:18px;width:224px;padding:12px;max-height:calc(100vh - var(--dock-height) - 115px);overflow:auto}.workforce h2{font-size:20px;margin:12px 0 6px}.workforce .job{padding:4px 0}#detail{top:138px;max-height:calc(100vh - var(--dock-height) - 160px);overflow:auto}#selectionPanel,.kids #selectionPanel{top:100px;left:18px;width:235px;max-height:calc(100vh - var(--dock-height) - 120px);overflow:auto}#recent{display:none}
footer,.kids footer{display:flex;flex-direction:column;width:1120px;max-width:calc(100% - 32px);bottom:10px;filter:drop-shadow(0 6px 14px #14271955)}.dock-tabs{order:0;display:flex;align-items:center;gap:6px;padding:6px 9px;background:#1d332bee;border:1px solid #dfc89755;border-radius:12px 12px 0 0}.dock-tabs button{padding:8px 16px;min-height:36px;font-size:14px;font-weight:650;border:1px solid #cdbb8733;background:#314b3c}.dock-tabs button[aria-pressed=true]{background:var(--gold);color:var(--ink);border-color:#ffe4a9}.dock-tip{color:#d3dcc8;font-size:12px;margin-left:8px}.dock-tabs #toggleDock{margin-left:auto;background:transparent;font-weight:400;color:#f1e6c8}.dock-tabs #dockPopulation{margin-left:7px;font-size:12px}.chiefbar{order:1;border-radius:0;margin:0;padding:6px 8px;gap:5px;border-top:0;background:#293f33f5;box-shadow:none;flex-wrap:nowrap}.chiefbar button,.chiefbar .recruit{min-height:40px;padding:6px 9px;font-size:13px;border-radius:7px;white-space:normal}.chiefbar .recruit{gap:5px;flex:1.35;background:#ebd19b}.chiefbar .recruit img{height:29px;width:27px}.chiefbar .recruit b{padding:3px;font-size:12px}.chiefbar>button:not(.recruit){flex:1}.chiefbar #expand{flex:1.25}.unitbar,.buildbar,.kids .buildbar{order:2;margin:0;border-radius:0;background:#263c30f5;border:1px solid #d8bf8744;border-top:0;padding:6px 9px;box-shadow:none}.unitbar{min-height:88px;max-height:100px}.categories{padding-bottom:4px;gap:6px}.categories button{padding:4px 10px;font-size:13px}.categories button.active{background:#e6c994;color:#23382c}#buildings,.kids #buildings{display:flex;gap:5px;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;padding:5px 0;scrollbar-width:thin;scrollbar-color:#b9a473 #263c30}#buildings button,.kids #buildings button{flex:1 0 102px;min-width:102px;max-width:145px;min-height:67px;display:flex;flex-direction:row;gap:7px;padding:6px;border:1px solid #d3bf8822;border-radius:8px;background:#344b39!important;color:#f9eed5;text-align:left;transform:none}.kids #buildings button{flex:1 0 94px;min-width:94px;max-width:125px}#buildings button:hover,.kids #buildings button:hover{background:#4a6043!important;border-color:#dec186;transform:none}#buildings button.active,.kids #buildings button.active{background:#665f36!important;border:2px solid #f6d281;box-shadow:none;transform:none}#buildings img,.kids #buildings img{width:37px;height:42px;flex-shrink:0;filter:none!important}#buildings strong,.kids #buildings strong,.kids #buildings button:nth-child(n) strong{font-size:13px;font-weight:600;line-height:1.3}#buildings small,.kids #buildings small{display:block;font-size:12px;color:#e2d5ae!important;margin-top:3px}#hint,.kids #hint{font-size:12px;color:#d4dec7;padding:3px 0 1px}footer[data-panel=build] .unitbar{display:none}footer[data-panel=units] .buildbar{display:none}footer[data-panel=units] .unitbar{display:flex}.timeline,.kids .timeline{order:3;display:flex;gap:12px;padding:7px 12px;border-radius:0 0 10px 10px;background:#e8d8b4}.timeline .date{min-width:130px}.date strong{font-size:16px;margin-top:2px}.date span{font-size:10px}.timeline .era{font-size:11px;padding-top:4px}.timeline button{padding:5px 10px;font-size:12px}.timeline button small{font-size:11px}.kids .timeline .eras,.kids .timeline #advance{display:none}.kids .timeline .date{display:flex;align-items:center;gap:12px}.footnote,.kids .footnote{order:4;font-size:11px;padding:5px 3px 0}.footnote button,.kids .footnote button{padding:4px 8px;font-size:11px}footer.dock-collapsed .unitbar,footer.dock-collapsed .chiefbar,footer.dock-collapsed .buildbar,footer.dock-collapsed .timeline{display:none!important}footer.dock-collapsed .dock-tabs{border-radius:10px}.zoom,.kids .zoom{right:18px;gap:4px}.zoom button,.kids .zoom button{height:37px;width:37px;font-size:23px}#notification,.kids #notification{font-size:14px;max-width:560px;padding:10px 16px;border-radius:9px}#hungerAlert{top:90px;font-size:13px}
/* Dialog actions always have explicit foreground and background colors. */
dialog{padding:24px;max-height:calc(100dvh - 40px);border:2px solid #ad9466;background:#f1e7ce;color:#24392c}dialog::backdrop{background:#10271db3;backdrop-filter:blur(3px)}dialog h2{font-size:27px;margin:0 0 18px}dialog p,dialog li{font-size:15px;line-height:1.55}dialog button,#stockDialog button{color:#24372c;background:#edcd88;border:1px solid #aa8244;font-weight:650;min-height:44px;border-radius:8px}dialog button:hover,#stockDialog button:hover{background:#f9dda2;color:#172d21}dialog button:disabled,#stockDialog button:disabled{color:#53604f;background:#d7d9c5;border-color:#adb49b;opacity:1}dialog select{background:#fff9e7;color:#24372c}#lordForm{background:#fff8e3;border:1px solid #d9c99f;padding:16px}#lordForm label{font-size:15px;font-weight:600}.lord-name-row{display:flex;gap:9px}.lord-name-row input{color:#23382c;background:#fffdf5;border:2px solid #a9b395;padding:11px;font-size:17px}.lord-name-row button{flex:0 0 auto;width:auto;background:#f1ce7e;color:#23382c!important;padding:11px 17px}#lordNameStatus{color:#2f633e;font-size:14px}#rulerScore{display:block;font:22px/1.4 Georgia,serif;margin:15px 0}#rulerFactors p{padding:9px 0;margin:0;font-size:15px}.stock-actions button{color:#24372c}.stock-heading #closeStock{min-width:44px}.stock-cards strong small{font-size:14px}
@media(max-width:1000px){.brand{min-width:175px}.brand h1{font-size:20px}.stats>div,.kids .stats>div{padding:0 9px;min-width:60px}.chiefbar button,.chiefbar .recruit{font-size:12px;padding:5px}.chiefbar .recruit{flex:1.5}.chiefbar .recruit img{width:23px}.chiefbar .recruit b{font-size:11px}.dock-tip{display:none}.timeline .eras{gap:4px}}
@media(max-width:760px){header{top:8px;left:10px;right:10px;gap:6px}.brand{min-width:0}.brand h1,.kids .brand h1{font-size:19px}.brand-icon{font-size:28px}.brand small,.kids .brand small{font-size:10px}header #music,header #voice,header #help,.kids header #help{height:36px;min-width:36px;width:36px;font-size:17px}.stats,.kids .stats{order:3;width:100%;padding:6px 0;margin:0}.stats>div,.kids .stats>div{flex:1;padding:0 7px;min-width:0}.stats b,.kids .stats b{font-size:18px}.stats span{font-size:11px}footer,.kids footer{max-width:calc(100% - 12px);bottom:5px}.dock-tabs{padding:4px;gap:4px}.dock-tabs button{font-size:13px;min-height:34px;padding:6px 10px}.chiefbar{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start}.chiefbar .recruit,.chiefbar>button:not(.recruit){flex:0 0 auto;min-width:90px;min-height:39px}.chiefbar .recruit{min-width:145px}.chiefbar #expand{min-width:145px}.categories{gap:2px}.categories button{font-size:12px;padding:4px 8px}#buildings,.kids #buildings{display:flex;gap:4px}#buildings button,.kids #buildings button{flex:0 0 118px;min-width:118px;min-height:64px}#buildings strong,.kids #buildings strong,.kids #buildings button:nth-child(n) strong{font-size:13px}#buildings img,.kids #buildings img{width:36px;height:38px}#hint,.kids #hint{font-size:11px}.timeline,.kids .timeline{padding:5px 9px;gap:8px;flex-wrap:nowrap}.timeline .eras{display:none}.timeline .date{min-width:110px}.date strong{font-size:14px}.timeline button small{display:none}.timeline button{font-size:11px}.unitbar{min-height:81px;max-height:90px}.speed-controls,.kids .speed-controls{top:117px;right:10px}.workforce,#selectionPanel,.kids #selectionPanel{top:155px;left:10px;max-height:calc(100dvh - var(--dock-height) - 168px)}#detail{top:155px;right:10px;max-height:calc(100dvh - var(--dock-height) - 168px)}#hungerAlert{top:113px;left:10px;max-width:68%;font-size:12px}.zoom,.kids .zoom{right:10px}.footnote,.kids .footnote{font-size:10px}dialog{padding:18px;max-width:94%;max-height:calc(100dvh - 24px)}dialog h2{font-size:24px}.lord-name-row{flex-wrap:wrap}.lord-name-row input{flex:1 1 100%}.lord-name-row button{width:100%}}
@media(prefers-reduced-motion:reduce){button,#notification{transition:none}}

#weatherStatus{position:absolute;left:50%;top:86px;transform:translateX(-50%);padding:8px 14px;border:1px solid #b5d4c0;background:#284f43;color:#f6f2d8;font-size:13px;min-height:35px;z-index:2}#weatherStatus.hot{background:#754326;border-color:#e8b767;color:#fff2ce}#hungerAlert{top:128px}#igniteTool.active{background:#c8763d;color:#fff4d6;border:2px solid #ffe1a0}#buildingDamage{background:#e0d2ad;padding:10px;border-radius:8px;font-weight:600}#crueltyValue{padding:10px;border-left:4px solid #a44f31;background:#e4cda9}.chiefbar #igniteTool{min-width:65px;flex:.7}#world{cursor:crosshair}@media(max-width:760px){#weatherStatus{top:114px;left:10px;transform:none;max-width:65%;font-size:12px;padding:6px 10px}#hungerAlert{top:152px}.chiefbar #igniteTool{flex:0 0 75px}}

#joystickWrap{position:absolute;left:max(16px,env(safe-area-inset-left));bottom:var(--dock-height);z-index:5;display:flex;align-items:center;flex-direction:column;gap:5px;user-select:none;-webkit-user-select:none;pointer-events:none}#cameraJoystick{position:relative;width:108px;height:108px;border-radius:50%;background:radial-gradient(circle,#52634be8 0 31%,#233e32ed 33% 66%,#132e25f2 68%);border:2px solid #dbc692b3;box-shadow:0 5px 20px #10271966,inset 0 0 0 7px #fff1c509;touch-action:none;pointer-events:auto;cursor:grab;outline-offset:4px}#cameraJoystick.in-use{border-color:#ffe4a0;background:radial-gradient(circle,#746d43ed 0 31%,#354d36f5 33% 66%,#233b2cf2 68%);cursor:grabbing}#joystickKnob{position:absolute;left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff1bd,#cbaa64);border:2px solid #f5df9c;box-shadow:0 4px 9px #10221970;will-change:transform;pointer-events:none}#cameraJoystick span:not(#joystickKnob){position:absolute;color:#e9d9b0;font-size:12px;line-height:1}.joy-north{top:7px;left:calc(50% - 6px)}.joy-south{bottom:7px;left:calc(50% - 6px)}.joy-west{left:7px;top:calc(50% - 6px)}.joy-east{right:7px;top:calc(50% - 6px)}.joystick-label{font-size:10px;font-weight:700;letter-spacing:1px;color:#fff0ca;background:#20382dd9;border-radius:5px;padding:3px 7px}.workforce,#selectionPanel,.kids #selectionPanel{max-height:max(80px,calc(100dvh - var(--dock-height) - 250px))}.zoom button,.kids .zoom button{touch-action:manipulation}html,body{overscroll-behavior:none}@media(pointer:coarse){#cameraJoystick{width:120px;height:120px}.zoom button,.kids .zoom button{width:44px;height:44px}.joystick-label{font-size:11px}.unit-types button{min-height:40px}}@media(max-height:600px){#cameraJoystick{width:88px;height:88px}#joystickKnob{width:38px;height:38px;left:calc(50% - 19px);top:calc(50% - 19px)}#joystickWrap{gap:2px}.joystick-label{font-size:9px}.workforce,#selectionPanel,.kids #selectionPanel{max-height:max(70px,calc(100dvh - var(--dock-height) - 240px))}}

/* v16: a fixed strategy-game command desk, leaving the map as the main surface. */
:root{--dock-height:218px;--bronze:#a28a57;--panel:#23382df5}
header{inset:0 0 auto;min-height:64px;padding:8px 16px;gap:12px;background:linear-gradient(#21372ff7,#293e31f2);border-bottom:1px solid #b99c6159;box-shadow:0 3px 15px #12241944;z-index:3}.brand{min-width:195px}.brand h1,.kids .brand h1{font-size:21px;letter-spacing:.5px}.brand small,.kids .brand small{display:block;max-width:220px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand-icon{font-size:29px}.stats,.kids .stats{margin:auto;border:0;border-radius:0;box-shadow:none;background:transparent;padding:0;backdrop-filter:none}.stats>div,.kids .stats>div{padding:0 15px;min-width:66px}.stats b,.kids .stats b{font-size:21px;font-variant-numeric:tabular-nums}.stats span{font-size:12px}header #music,header #voice,header #help,.kids header #help{width:40px;height:40px;min-width:40px;font-size:18px}
#weatherStatus{top:72px;left:16px;transform:none;font-size:13px;padding:6px 12px;min-height:33px}#hungerAlert{top:72px;left:50%;max-width:48%;padding:7px 12px;font-size:13px}.speed-controls,.kids .speed-controls{top:72px;right:16px}.speed-controls button,.kids #pause{height:34px;min-width:38px;font-size:15px}.workforce{top:112px;max-height:calc(100dvh - var(--dock-height) - 128px);display:none}.workforce.mobile-open{display:block;z-index:5}#peopleToggle{display:block}.kids #peopleToggle{display:none}
footer#commandDock,.kids footer#commandDock{left:0;bottom:0;transform:none;width:100%;max-width:none;display:grid;grid-template-columns:160px minmax(0,1fr) 222px;grid-template-rows:40px 106px 36px 18px;gap:0 10px;padding:8px 12px 4px;background:linear-gradient(180deg,#344936,#1c3028);border-top:3px solid #b7a16b;box-shadow:0 -6px 24px #13251e55;filter:none;z-index:6}
.map-panel{grid-column:1;grid-row:1/4;min-width:0;background:#172d24;border:1px solid #b49c6655;border-radius:7px;overflow:hidden;padding:5px 6px;display:flex;flex-direction:column;justify-content:center;gap:5px}.map-heading{display:flex;align-items:center;justify-content:space-between;color:#eedcae;font-size:12px;letter-spacing:1px}.map-heading button{height:24px;width:28px;font-size:19px;border:0}.map-panel #minimap{width:100%;height:auto;aspect-ratio:1.5;max-height:118px;border:1px solid #b4aa77;touch-action:none;cursor:crosshair;display:block}.map-panel small{font-size:12px;color:#c8cfb5;text-align:center}.dock-tabs{grid-column:2;grid-row:1;border:0;border-bottom:1px solid #ccb17155;border-radius:0;padding:0 0 5px;background:transparent;gap:5px;min-width:0}.dock-tabs button{font-size:14px;padding:6px 13px;min-height:34px}.dock-tabs #toggleDock{padding:6px 8px;font-size:12px}.dock-tabs #dockPopulation{font-size:12px}.dock-tabs #minimapToggle,.dock-tabs #mapInteraction{display:none}
footer#commandDock .buildbar,footer#commandDock .unitbar,footer#commandDock .chiefbar{grid-column:2;grid-row:2;min-width:0;height:106px;max-height:106px;margin:0;padding:5px 0;border:0;background:transparent;box-shadow:none;border-radius:0}.categories{padding:0 0 3px;min-height:27px;border:0;gap:4px}.categories button{font-size:13px;padding:3px 9px;min-height:26px}#buildings,.kids #buildings{gap:5px;padding:2px 0 4px;min-width:0;scrollbar-width:thin}#buildings button,.kids #buildings button{flex:1 0 122px;min-width:122px;max-width:172px;min-height:66px;padding:5px 7px;border-radius:5px;gap:7px;background:#3d523d!important}#buildings strong,.kids #buildings strong,.kids #buildings button:nth-child(n) strong{font-size:14px;line-height:1.25}#buildings small,.kids #buildings small{font-size:12px;margin-top:4px}#buildings img,.kids #buildings img{width:37px;height:42px}.kids #buildings button{height:92px;min-width:109px;flex-basis:109px;flex-direction:column;gap:1px;text-align:center}.kids #buildings img{height:34px;width:36px}.kids #buildings small{margin-top:1px}#hint,.kids #hint{display:none}
footer#commandDock .chiefbar{display:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;align-content:center;overflow:auto}.chiefbar button,.chiefbar .recruit{width:100%;min-width:0!important;min-height:44px;padding:4px 7px;font-size:13px}.chiefbar .recruit{gap:5px;white-space:normal;justify-content:center}.chiefbar .recruit b{font-size:12px}.chiefbar .recruit img{width:23px;height:29px}.chiefbar #selectTool,.chiefbar #igniteTool{font-size:14px}footer#commandDock[data-panel=commands] .chiefbar{display:grid}footer#commandDock[data-panel=commands] .buildbar,footer#commandDock[data-panel=commands] .unitbar{display:none}footer#commandDock[data-panel=units] .unitbar{display:flex}.unit-types{min-width:140px}.unit-types button{font-size:13px;min-height:42px}#unitRoster button{min-height:89px;flex-basis:74px;font-size:13px}#unitRoster img{width:34px;height:42px}#unitRoster small{font-size:12px}
.timeline,.kids .timeline{grid-column:2;grid-row:3;padding:3px 0;gap:12px;background:transparent;border-top:1px solid #a18b5b66;border-radius:0;color:#f5e4bc;min-width:0;justify-content:flex-start}.timeline .date,.kids .timeline .date{min-width:125px;display:block;text-align:left}.date span,.kids .timeline .date span{display:none}.date strong,.kids .timeline .date strong{font-size:16px;display:block;margin:0}.timeline .eras{align-items:center;gap:5px}.timeline .era{font-size:12px;color:#c7c9af;padding-top:4px;white-space:nowrap}.timeline .era.current{color:#ffe3a0}.timeline .era.past{border-color:#a5bf81}.timeline button{font-size:12px;padding:4px 8px;min-height:28px;white-space:nowrap}.timeline button small{display:none}.timeline button:disabled{background:transparent;border:0;color:#e9d79f}.footnote,.kids .footnote{grid-column:1/-1;grid-row:4;align-items:end;padding:0;font-size:12px;justify-content:space-between;color:#bbcab5}.footnote button,.kids .footnote button{font-size:12px;padding:0 6px;border-radius:3px}
.dock-context{grid-column:3;grid-row:1/4;min-width:0;max-height:182px;overflow-y:auto;padding:9px 10px;background:#1b3027cc;border:1px solid #c8ae7455;border-radius:7px;scrollbar-width:thin}.dock-context #detail,.dock-context #selectionPanel,.kids .dock-context #selectionPanel{position:static;top:auto;left:auto;right:auto;width:auto;max-height:none;border:0;border-radius:0;padding:0;margin:0;background:none;box-shadow:none;overflow:visible}.dock-context #detail[hidden],.dock-context #selectionPanel[hidden],#colonyContext[hidden]{display:none}.dock-context #selectionCount{display:block;font-size:14px;color:#ffe2a0}.dock-context #selectionPanel p{font-size:12px;line-height:1.45;margin:6px 0}.dock-context #selectionPanel button{min-height:32px;padding:4px;font-size:13px;width:auto;margin:2px 3px 2px 0}.dock-context #detail{margin-top:12px;border-top:1px solid #e7d49e33;padding-top:8px}.dock-context #detail h3{font-size:20px;margin-bottom:3px}.dock-context #detail small,.dock-context #detail label{font-size:12px}.dock-context #detail p{font-size:13px}.dock-context #detail .close{display:none}#colonyContext>small{color:#c8b77f;letter-spacing:1px;font-size:12px}#contextLord{display:block;font:22px Georgia,serif;margin:6px 0;overflow-wrap:anywhere}#contextStatus{font-size:14px;line-height:1.5;margin:5px 0}.context-help{font-size:12px;color:#bfceb8;line-height:1.6;border-top:1px solid #e0c89530;padding-top:8px;margin:7px 0}
footer#commandDock.dock-collapsed{grid-template-columns:1fr;grid-template-rows:38px;padding:5px 12px}footer#commandDock.dock-collapsed .dock-tabs{grid-column:1;grid-row:1;border:0;padding:0}footer#commandDock.dock-collapsed .map-panel,footer#commandDock.dock-collapsed .dock-context,footer#commandDock.dock-collapsed .footnote{display:none}#joystickWrap{bottom:calc(var(--dock-height) + 4px);left:18px}#cameraJoystick{width:84px;height:84px}#joystickKnob{width:36px;height:36px;left:calc(50% - 18px);top:calc(50% - 18px)}.joystick-label{font-size:12px;letter-spacing:.5px}.zoom,.kids .zoom{right:14px}.zoom button,.kids .zoom button{width:36px;height:36px;font-size:22px}#notification,.kids #notification{z-index:7;max-width:min(570px,70%);font-size:14px;padding:9px 14px}
.health-readout{--health:#3c823e;background:#fff9e8;border:1px solid #b2b698;border-radius:9px;padding:12px;margin:12px 0;color:#273a2d}.health-readout[data-tone=damaged]{--health:#b07b10;border-color:#c2a353}.health-readout[data-tone=critical]{--health:#c33330;border-color:#c86555;background:#fff0e8}.health-readout>div{display:flex;justify-content:space-between;font-size:16px;gap:10px}.health-readout progress{display:block;width:100%;height:12px;margin:9px 0 6px;border:0;border-radius:4px;overflow:hidden;background:#d5d9c6;accent-color:var(--health)}.health-readout progress::-webkit-progress-bar{background:#d5d9c6}.health-readout progress::-webkit-progress-value{background:var(--health)}.health-readout progress::-moz-progress-bar{background:var(--health)}.health-readout small{font-size:14px;color:var(--health)}
@media(max-width:1100px){footer#commandDock,.kids footer#commandDock{grid-template-columns:132px minmax(0,1fr) 188px;gap:0 8px;padding-left:8px;padding-right:8px}.brand{min-width:164px}.brand h1,.kids .brand h1{font-size:18px}.brand-icon{display:none}.stats>div,.kids .stats>div{padding:0 10px}.timeline .eras{display:none}.timeline #advance{margin-left:auto}.dock-tabs button{padding:6px 10px}.map-panel small{font-size:12px;line-height:1.2}.chiefbar .recruit img{display:none}.chiefbar button,.chiefbar .recruit{font-size:12px;padding:4px}.chiefbar .recruit{flex-wrap:wrap;gap:1px}.dock-context{padding:8px}.dock-context #selectionPanel button{font-size:12px}.map-heading{font-size:12px;letter-spacing:0}}
@media(max-width:760px){header,.kids header{padding:6px 9px;gap:5px;min-height:100px}.brand{flex:1}.brand h1,.kids .brand h1{font-size:18px}.brand small,.kids .brand small{font-size:12px;max-width:180px}header #music,header #voice,header #help,.kids header #help{height:36px;min-width:36px;width:36px}.stats,.kids .stats{order:3;width:100%;margin:0;padding:4px 0 0}.stats span{font-size:12px}.stats b,.kids .stats b{font-size:17px}.stats>div,.kids .stats>div{padding:0 7px;text-align:left}.speed-controls,.kids .speed-controls{top:106px;right:8px}#weatherStatus{top:106px;left:8px;max-width:62%;font-size:12px;padding:6px 9px}#hungerAlert{top:145px;left:8px;transform:none;max-width:80%;font-size:12px}.workforce{top:145px;max-height:calc(100dvh - var(--dock-height) - 155px)}footer#commandDock,.kids footer#commandDock{grid-template-columns:minmax(0,1fr);grid-template-rows:44px 104px 34px;gap:0;padding:4px 6px max(4px,env(safe-area-inset-bottom));border-top-width:2px}.dock-tabs{grid-column:1;grid-row:1;gap:3px;overflow-x:auto;scrollbar-width:none}.dock-tabs button{padding:7px 9px;font-size:13px;flex-shrink:0;min-height:36px}.dock-tabs #dockPopulation{display:none}.dock-tabs #toggleDock{font-size:12px;padding:5px;margin-left:auto}.dock-tabs #minimapToggle,.dock-tabs #mapInteraction{display:block;font-size:12px;padding:6px}.dock-tabs #mapInteraction[aria-pressed=true]{background:#efd08c;color:#23382c}.map-panel{display:none}.map-open .map-panel{display:flex;position:absolute;bottom:calc(100% + 8px);left:8px;width:188px;height:166px;background:#20382bf5;box-shadow:0 6px 25px #10271b88}.map-panel #minimap{max-height:116px}footer#commandDock .buildbar,footer#commandDock .unitbar,footer#commandDock .chiefbar{grid-column:1;grid-row:2;height:104px;max-height:104px}.categories button{font-size:13px;padding:3px 10px;min-height:27px}#buildings button,.kids #buildings button{min-width:124px;flex-basis:124px;min-height:64px}.kids #buildings button{min-width:106px;flex-basis:106px;height:91px}.chiefbar .recruit{flex-wrap:wrap;gap:0}.chiefbar .recruit img{display:none}footer#commandDock .chiefbar{grid-template-columns:repeat(4,minmax(0,1fr))}.chiefbar button,.chiefbar .recruit{font-size:12px;min-height:45px;padding:3px}.chiefbar #selectTool,.chiefbar #igniteTool{font-size:12px}.timeline,.kids .timeline{grid-column:1;grid-row:3;padding:3px 2px;min-width:0;gap:5px}.timeline .date,.kids .timeline .date{min-width:120px}.date strong,.kids .timeline .date strong{font-size:15px}.timeline button{font-size:12px;padding:3px 6px}.footnote,.kids .footnote{display:none}.dock-context{display:none;position:absolute;right:6px;bottom:calc(100% + 8px);width:218px;max-height:142px;background:#20382bf2}.dock-context:has(#selectionPanel:not([hidden])){display:block}.dock-context #detail{display:none}.dock-context #selectionPanel p{font-size:12px;margin:5px 0}.dock-context #selectionPanel button{font-size:13px;min-height:34px}#joystickWrap{left:10px;bottom:calc(var(--dock-height) + 2px)}#cameraJoystick{width:88px;height:88px}.joystick-label{font-size:12px}.zoom,.kids .zoom{right:8px}.zoom button,.kids .zoom button{width:38px;height:38px}body:has(.map-open) #joystickWrap{display:none}body:has(#selectionPanel:not([hidden])) .zoom{top:148px;bottom:auto!important;grid-template-columns:repeat(2,36px);gap:3px}.unit-types{min-width:125px}.unit-types button{font-size:12px}.unit-types img{width:22px;height:28px}#unitRoster button{font-size:12px;min-height:89px;flex-basis:68px}#unitRoster small{font-size:12px}#notification,.kids #notification{max-width:calc(100% - 24px);width:auto;font-size:13px}footer#commandDock.dock-collapsed{grid-template-rows:40px;padding:4px 6px}.health-readout>div{font-size:15px}}
@media(max-height:570px) and (min-width:761px){footer#commandDock,.kids footer#commandDock{grid-template-rows:36px 94px 30px;grid-template-columns:120px minmax(0,1fr) 190px;padding-top:4px}footer#commandDock .buildbar,footer#commandDock .unitbar,footer#commandDock .chiefbar{height:94px;max-height:94px}.footnote,.kids .footnote{display:none}.dock-context{max-height:160px}.categories{min-height:24px;padding:0}.categories button{min-height:24px;padding:2px 7px}#buildings button,.kids #buildings button{min-height:57px}.kids #buildings button{height:84px}.map-panel small{display:none}header{min-height:56px;padding-top:5px;padding-bottom:5px}#weatherStatus,.speed-controls,.kids .speed-controls{top:62px}#joystickWrap{bottom:calc(var(--dock-height) + 2px)}#cameraJoystick{width:68px;height:68px}.joystick-label{display:none}}
@media(pointer:coarse){.dock-tabs #mapInteraction{display:block;min-height:36px;font-size:13px;padding:6px 8px}.dock-tabs #mapInteraction[aria-pressed=true]{background:#efd08c;color:#23382c}#cameraJoystick{width:94px;height:94px}}
@media(max-height:520px) and (max-width:760px){header,.kids header{min-height:52px;flex-wrap:nowrap;padding:5px 8px}.brand,header #voice{display:none}.stats,.kids .stats{order:0;width:auto;flex:1;margin:0;padding:0}.stats>div,.kids .stats>div{padding:0 7px}.stats span{font-size:12px}.stats b,.kids .stats b{font-size:16px}header #music,header #help,.kids header #help{width:34px;height:34px;min-width:34px}#weatherStatus,.speed-controls,.kids .speed-controls{top:57px}#hungerAlert{top:93px}footer#commandDock,.kids footer#commandDock{grid-template-rows:36px 89px 29px}.dock-tabs button{min-height:30px;padding:5px 9px}footer#commandDock .buildbar,footer#commandDock .unitbar,footer#commandDock .chiefbar{height:89px;max-height:89px;padding:2px 0}.categories{min-height:24px;padding:0}.categories button{min-height:24px;padding:2px 8px}#buildings button,.kids #buildings button{min-height:57px}.kids #buildings button{height:81px}.kids #buildings img{height:28px}.chiefbar button,.chiefbar .recruit{min-height:40px}.timeline .date strong,.kids .timeline .date strong{font-size:14px}#cameraJoystick{width:66px;height:66px}.joystick-label{display:none}.zoom button,.kids .zoom button{width:32px;height:30px}#notification,.kids #notification{font-size:12px;padding:6px 10px}.dock-context{max-height:100px}.dock-context #selectionPanel p{display:none}.map-open .map-panel{height:124px;width:160px}.map-panel small{display:none}.map-panel #minimap{max-height:89px}}

/* Secondary-button/two-finger click-drag gives clear camera feedback. */
#world.panning{cursor:grabbing}

.sound-settings{padding:14px;background:#fff8e7;border:1px solid #c7b98e;border-radius:10px;margin:12px 0}.sound-settings label{display:flex;justify-content:space-between;font-size:16px;font-weight:600}.sound-settings input{width:100%;accent-color:#49623c;min-height:32px;margin:8px 0}.sound-settings button{font-size:15px}#prisonAlert{position:absolute;top:113px;left:50%;transform:translateX(-50%);z-index:5;background:#8b3728;color:#fff2cc;border:2px solid #ffd385;min-height:40px;padding:8px 15px;font-size:14px;box-shadow:0 3px 18px #31190c66}#prisonAlert[hidden]{display:none}dialog button.rescue-action{background:#ffe1a0!important;color:#63221b!important;border:2px solid #ab462d;font-weight:800}@media(max-width:760px){#prisonAlert{top:150px;left:8px;transform:none;max-width:calc(100% - 95px);font-size:13px}body:has(#prisonAlert:not([hidden])) #hungerAlert{top:205px}}
/* Progression, local warehouse trading and children. */
#treasuryButton{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:64px;height:44px;padding:4px 10px;background:#f0cc7d;color:#263d2c;font-size:12px;border-color:#fff0bd}#treasuryButton b{font-size:20px}#treasuryButton[hidden]{display:none}#goalsButton{border-color:#d9b76d;color:#ffe5a6}#goalsButton.reward-ready{background:#f2d391;color:#263b2d}#findChildren{font-size:13px;min-height:32px;background:#486549;color:#fff4d0;padding:5px 8px;margin:0 0 5px}.dialog-heading{display:flex;gap:16px;align-items:start;justify-content:space-between}.dialog-heading button{flex:0 0 42px;margin:0;min-width:42px}.dialog-heading h2{margin-bottom:12px}#goalsDialog{width:720px}#treasuryDialog{width:570px}#goalsDialog p,#treasuryDialog p,.trade-box p{font-size:16px}#goalTrail{display:flex;gap:6px;flex-wrap:wrap;margin:18px 0}#goalTrail span{font-size:13px;padding:7px 10px;background:#ddd8c5;border-radius:6px;color:#4a5946}#goalTrail .current{background:#34563d;color:#fff4d2}#goalTrail .done{background:#bdd0a9;color:#203c27}.current-goal{padding:18px;border:1px solid #c3ac79;border-radius:12px;background:#fff7df}.current-goal h3{font:25px Georgia,serif;margin:8px 0}.current-goal small{font-size:13px;letter-spacing:1px;color:#566445}.goal-check{display:grid;grid-template-columns:1fr auto;gap:4px 10px;margin:13px 0;font-size:14px}.goal-check progress{grid-column:1/-1;width:100%;height:8px;accent-color:#426e42}.goal-check.met{color:#2a643b}.current-goal #claimGoal{width:100%;font-size:16px;margin-top:7px}.goal-shortcuts,.trade-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.goal-shortcuts button,.trade-actions button{font-size:14px;padding:10px;line-height:1.4;margin:0}.trade-box{padding:16px;border:1px solid #c5ab71;background:#fff7df;border-radius:10px;margin:16px 0}.trade-box h3{margin:0 0 8px}.trade-box p{margin:8px 0}#tradeStatus,#marketStatus{min-height:24px;color:#365a3b;font-weight:600}#treasuryBalance{font:36px Georgia,serif;display:block;color:#49613c;margin:12px 0}#marketStore{display:block;width:100%;padding:10px;margin:9px 0;font-size:16px}#prosperityBuilding{background:#fff7df;border:1px solid #bcb085;padding:12px;border-radius:10px}#prosperityBuildingInfo{margin:0 0 12px;font-size:16px}#prosperityBuilding button{margin:5px;font-size:15px}
@media(max-width:760px){#treasuryButton{min-width:50px;height:36px;padding:2px 5px;font-size:11px}#treasuryButton b{font-size:16px}#goalsDialog,#treasuryDialog{width:94%;padding:16px}.current-goal{padding:12px}.goal-shortcuts,.trade-actions{gap:6px}.goal-shortcuts button,.trade-actions button{padding:8px;font-size:14px}.dock-tabs #goalsButton{font-size:13px;padding:6px 9px}.brand h1,.kids .brand h1{font-size:17px}.brand small,.kids .brand small{max-width:145px}header #voice{display:none}}
/* v22: visible recovery and the colony chronicle. */
#recoverButton{background:#f3d486;color:#2c351f;font-weight:750;border-color:#ffedb7;min-width:125px}
#deathNotice{position:fixed;left:50%;top:136px;transform:translateX(-50%);z-index:8;max-width:min(530px,calc(100vw - 28px));padding:9px 16px;background:#4f3029ed;color:#fff1d8;border:1px solid #edc8a2;box-shadow:0 3px 14px #19291e40;font-size:13px}
#deathNotice[hidden],#recoverButton[hidden],#survivalBuilding[hidden]{display:none}
#survivalBuilding{margin:14px 0;padding:12px;background:#eff0d8;border:1px solid #b9bb93;border-radius:10px}
#survivalBuilding button{margin:4px 6px 0 0}
#recoveryDialog,#chronicleDialog{max-width:620px;width:calc(100vw - 30px)}
#confirmRecovery{font-weight:750;background:#e7c476;color:#283821;border:1px solid #8c733d}
#deathHistory{max-height:48vh;overflow:auto;padding-right:6px}.chronicle-entry{padding:10px 12px;border-left:3px solid #a37b48;background:#ece4d0;border-radius:4px;font-size:14px}
.music-settings{padding:13px;border:1px solid #b3ba95;background:#e9e9d2;border-radius:9px;margin:12px 0}.music-settings label{display:flex;justify-content:space-between;gap:12px;font-weight:700}.music-settings input{width:100%;accent-color:#496b48}.music-settings p{font-size:13px;margin-bottom:0}
@media(max-width:760px){#deathNotice{top:165px;font-size:12px;padding:8px 11px}.speed-controls{gap:4px}#recoverButton{min-width:0;font-size:12px;padding:0 8px}.dock-tabs{overflow-x:auto;justify-content:flex-start;flex-wrap:nowrap}.dock-tabs button{white-space:nowrap;flex-shrink:0}}
@media(max-height:520px){#deathNotice{top:95px;left:16px;transform:none;max-width:55vw}}
/* v23: persistent, high-contrast building slider and small session menu. */
header #gameMenuButton{min-width:42px;width:42px;height:42px;font-size:24px;background:#edcc89;color:#263c2d;border-color:#ffe9ad}
footer#commandDock,.kids footer#commandDock{grid-template-rows:40px 140px 36px 18px}
footer#commandDock .buildbar{height:140px;max-height:140px;display:flex;flex-direction:column;gap:2px}
footer#commandDock .categories{flex:0 0 27px}
#buildings,.kids #buildings{flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:0;align-items:stretch;overscroll-behavior-x:contain}
#buildings::-webkit-scrollbar{display:none}
#buildings button,.kids #buildings button{height:auto;min-height:64px}.kids #buildings button{max-height:90px}
.build-scroll{display:flex;align-items:center;gap:8px;min-height:34px;flex:0 0 34px;width:100%}
.build-scroll button{height:34px;min-width:36px;padding:4px 9px;font-size:14px;border:1px solid #dbc186;background:#496344;color:#fff0be;flex-shrink:0}
.build-scroll #demolishTool{min-width:111px;background:#ead097;color:#243925;font-weight:750}.build-scroll #demolishTool.active{background:#ffb091;border-color:#ffe5ba;color:#5c2116}
.build-scroll input{min-width:40px;flex:1;height:30px;accent-color:#f6d591;cursor:ew-resize;margin:0}.build-scroll input:disabled{opacity:.45}
#world.demolishing:not(.panning){cursor:url("assets/demolish-cursor.svg") 5 11,url("assets/demolish-cursor.png") 5 11, pointer} #demolishTool img{width:26px;height:26px;vertical-align:middle;margin-right:4px}
.sale-form{display:grid;grid-template-columns:minmax(0,1fr) 105px;gap:12px;margin:14px 0}.sale-form label{font-size:14px;font-weight:700}.sale-form select,.sale-form input{display:block;width:100%;min-width:0;padding:11px 9px;margin-top:7px;font-size:16px;border:1px solid #8b9979;border-radius:6px;background:#fffdf4;color:#233d2d}
#confirmSale{width:100%;min-height:48px;font-weight:750;font-size:16px;background:#e7c479;color:#253721;border:1px solid #917839}
#gameMenuDialog{width:min(440px,calc(100vw - 28px));padding:26px}#gameMenuDialog>small{letter-spacing:2px;color:#66704e;font-size:12px}#gameMenuDialog h2{margin:9px 0 12px}#gameMenuDialog p{font-size:15px;line-height:1.6}.game-menu-actions{display:grid;gap:10px;margin:20px 0}.game-menu-actions button{margin:0;width:100%;min-height:49px;font-size:17px}#menuResume{background:#e8c77f;color:#20351e;border:2px solid #b08d43;font-weight:750}#menuReset{background:#eee2c6;color:#6b3d2c;border:1px solid #b59a72}#resetConfirm{padding:15px;border:1px solid #b58064;border-radius:9px;background:#fff0d9}#resetConfirm[hidden]{display:none}#resetConfirm h3{margin:0;font-size:19px}#confirmReset{background:#edb280;color:#4f281a;font-weight:750}#gameMenuDialog .menu-note{font-size:12px;color:#637053}#downloadResetBackup{font-size:14px}
footer#commandDock.dock-collapsed{grid-template-rows:38px}footer#commandDock.dock-collapsed .buildbar{display:none}
@media(max-width:760px){header #gameMenuButton{height:36px;width:36px;min-width:36px;font-size:21px}footer#commandDock,.kids footer#commandDock{grid-template-rows:44px 136px 34px}footer#commandDock .buildbar{height:136px;max-height:136px}.build-scroll{gap:5px}.build-scroll #demolishTool{min-width:100px;font-size:13px}.build-scroll button{min-width:34px;padding:4px 6px}footer#commandDock.dock-collapsed{grid-template-rows:40px}}
@media(max-height:570px){footer#commandDock,.kids footer#commandDock{grid-template-rows:36px 116px 29px}footer#commandDock .buildbar{height:116px;max-height:116px;padding:2px 0}.build-scroll{min-height:30px;flex-basis:30px}.build-scroll button{height:30px}.build-scroll input{height:28px}footer#commandDock .categories{flex-basis:24px;min-height:24px}#buildings button,.kids #buildings button{min-height:53px}.kids #buildings img{height:27px}.kids #buildings button{gap:0}footer#commandDock.dock-collapsed{grid-template-rows:36px}}
footer#commandDock[data-panel=units] .buildbar,footer#commandDock[data-panel=commands] .buildbar{display:none}
#buildings,.kids #buildings{justify-content:flex-start}
/* v24: Army is reachable in the simple mode as well. */
.kids .categories{display:flex}.kids .categories [data-category=nature],.kids .categories [data-category=industry]{display:none}
.categories{overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;scrollbar-width:none}.categories button{flex-shrink:0}
#armyRecruitBar{display:flex;gap:7px;align-items:center;flex:0 0 38px;min-height:38px}#armyRecruitBar[hidden],#armyBuilding[hidden]{display:none}#armyRecruitBar button{padding:5px 9px;min-height:36px;font-size:13px;background:#e5c68b;color:#253b2a;font-weight:700;border-color:#fff0be}#armyRecruitBar button:disabled{opacity:.55}#armySummary{font-size:12px;color:#e8ddb2;margin-left:auto;white-space:nowrap}
footer#commandDock[data-army=true]{grid-template-rows:40px 181px 36px 18px}footer#commandDock[data-army=true] .buildbar{height:181px;max-height:181px}
#selectSoldiers{display:flex;align-items:center;justify-content:center;gap:5px;min-width:103px;max-width:110px;font-size:14px;white-space:normal;flex-shrink:0}#selectSoldiers.active{background:#edcb86;color:#253a29}#unitRoster progress{width:44px;height:4px;accent-color:#b4d792;margin:3px auto 0;display:block}
#armyBuilding{padding:13px;background:#eee8cf;border:1px solid #bda46e;border-radius:9px;margin:12px 0}#armyBuilding p{font-size:15px}#bearDialog{width:min(460px,calc(100vw - 24px))}#bearDialog p{font-size:16px}#bearDialog button{font-size:15px}#bearStatus{position:absolute;top:111px;right:15px;z-index:5;padding:8px 11px;font-size:13px;background:#e5c890;color:#243927;border:1px solid #fff0c4}#bearStatus.bear-danger{background:#a44e36;color:#fff0d2;border-color:#ffbe80}
@media(max-width:760px){footer#commandDock[data-army=true]{grid-template-rows:44px 176px 34px}footer#commandDock[data-army=true] .buildbar{height:176px;max-height:176px}#armySummary{display:none}#armyRecruitBar button{flex:1;font-size:12px;min-height:38px;padding:3px 5px}#selectSoldiers{min-width:74px;max-width:80px;flex-direction:column;font-size:12px}#bearStatus{top:148px;right:8px;padding:6px;font-size:12px}.unit-types{min-width:95px}.unit-types button{font-size:12px}}
@media(max-height:570px){footer#commandDock[data-army=true]{grid-template-rows:36px 157px 29px}footer#commandDock[data-army=true] .buildbar{height:157px;max-height:157px}#bearStatus{top:96px}}
footer#commandDock.dock-collapsed[data-army=true]{grid-template-rows:38px}footer#commandDock.dock-collapsed[data-army=true] .buildbar{display:none}
@media(min-height:571px){footer#commandDock:not([data-army=true]):not(.dock-collapsed),.kids footer#commandDock:not([data-army=true]):not(.dock-collapsed){grid-template-rows:40px 144px 36px 18px}footer#commandDock:not([data-army=true]) .buildbar{height:144px;max-height:144px}}
@media(min-height:571px) and (max-width:760px){footer#commandDock:not([data-army=true]):not(.dock-collapsed),.kids footer#commandDock:not([data-army=true]):not(.dock-collapsed){grid-template-rows:44px 144px 34px}}
/* v26: explicit housing and residents; compact controls stay reachable on touchscreens. */
#housingAvailability{display:block;font-size:10px;line-height:1.3;color:#d6dfbf;white-space:nowrap;margin-top:2px}
footer#commandDock[data-panel=units] .unitbar{display:grid;grid-template-columns:174px minmax(0,1fr);grid-template-rows:34px minmax(0,1fr);height:144px;max-height:144px;gap:5px;padding:5px 0;overflow:hidden}
.resident-toolbar{grid-column:1/-1;display:flex;gap:12px;align-items:center;min-width:0}.resident-toolbar #addResidents{background:#efd08c;color:#23382c;border:1px solid #fff1bb;font-weight:750;padding:6px 12px;min-height:33px;white-space:nowrap;font-size:14px}.resident-toolbar #unitHousing{font-size:12px;color:#efe4bf;line-height:1.4}
.unitbar .unit-types{min-width:0;display:grid;grid-template-columns:1fr 1fr;gap:4px}.unitbar .unit-types button,.unitbar #selectSoldiers{display:flex;flex-direction:row;gap:4px;min-height:36px;min-width:0;max-width:none;width:100%;padding:4px;font-size:12px;align-items:center;justify-content:center}.unitbar .unit-types img{width:18px;height:26px}.unitbar #unitRoster{min-width:0;align-items:stretch}.unitbar #unitRoster button{min-height:72px;max-height:96px;padding:4px;flex-shrink:0}.unitbar #unitRoster img{height:30px;width:28px}.unitbar #unitRoster small{font-size:10px;max-width:94px;white-space:normal}.unitbar #unitRoster progress{margin-top:2px}
#residentsDialog{width:min(780px,calc(100vw - 24px));max-height:88dvh;overflow:auto;padding:22px}#residentsDialog .dialog-heading small{letter-spacing:1.7px;font-size:11px;color:#61704e}#residentHousing{padding:12px;border-radius:8px;background:#e7eacb;color:#2e482d;font-weight:750}#residentsDialog .resident-help{font-size:14px;line-height:1.6}#residentChoices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#residentChoices button{display:flex;flex-direction:column;align-items:center;gap:6px;min-height:174px;padding:12px 9px;margin:0;background:#f7ebc9;border:1px solid #ad9a6a;color:#263c2a;text-align:center}#residentChoices button:hover:not(:disabled){background:#ffe7a7;border-color:#7e743e}#residentChoices button:disabled{background:#e4e1d5;color:#5a6251;border-color:#bebaa4;opacity:1}#residentChoices .resident-icon{font-size:25px;line-height:1.1}#residentChoices strong{font-size:15px}#residentChoices b{font-size:13px;color:#755026}#residentChoices small{font-size:12px;line-height:1.5;font-weight:400}#residentChoices em{font-size:12px;line-height:1.5;font-style:normal;margin-top:auto;font-weight:700}#residentChoices button:not(:disabled) em{color:#2d603c}#residentStatus{min-height:22px;font-size:14px;font-weight:700;color:#365239}#residentBuildHut{background:#efd08c;color:#263c2d;font-weight:700;min-height:44px}#sendBuilders{background:#ecd095;color:#263c2d;font-weight:700}
@media(max-width:760px){footer#commandDock[data-panel=units] .unitbar{grid-template-columns:137px minmax(0,1fr)}.resident-toolbar{gap:7px}.resident-toolbar #addResidents{font-size:13px;padding:5px 8px}.resident-toolbar #unitHousing{font-size:11px}#housingAvailability{font-size:9px;max-width:100px;white-space:normal}#residentsDialog{padding:15px}#residentChoices{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#residentChoices button{min-height:167px;padding:10px 7px}.unitbar .unit-types img{display:none}.unitbar .unit-types button,.unitbar #selectSoldiers{font-size:11px}}
@media(max-height:570px){footer#commandDock[data-panel=units] .unitbar{height:116px;max-height:116px;grid-template-rows:29px minmax(0,1fr);gap:3px;padding:2px 0}.resident-toolbar #addResidents{min-height:28px;padding:3px 9px}.unitbar .unit-types button,.unitbar #selectSoldiers{min-height:30px}.unitbar #unitRoster button{min-height:64px}.unitbar #unitRoster img{height:24px}.unitbar #unitRoster small{font-size:9px}#housingAvailability{display:none}}
footer#commandDock.dock-collapsed[data-panel=units] .unitbar{display:none}
/* v29: make recovery from an empty colony explicit and readable. */
#recoveryDialog{padding:24px;background:#f5eddb;border:2px solid #b59b63;border-radius:16px;width:min(640px,calc(100vw - 24px));max-height:90vh;max-height:90dvh;overflow:auto;color:#2c442e}#recoveryDialog h2{font:30px/1.2 Georgia,serif;margin:8px 0 16px}#recoveryDialog .dialog-heading small{font-size:10px;letter-spacing:1.5px;color:#66784f}#recoveryDialog p{font-size:14px;line-height:1.6}#recoveryDialog #closeRecovery{width:44px;min-height:44px;margin:0;padding:0;background:#e5d7b7;font-size:24px;color:#31432c;border:1px solid #ad9361}.recovery-crew{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:15px 0}.recovery-crew span{display:flex;align-items:center;flex-direction:column;text-align:center;gap:8px;background:#e3e8d0;border:1px solid #b9c69e;border-radius:10px;padding:14px 7px;font-size:25px}.recovery-crew b{font-size:12px;line-height:1.4}.recovery-actions{display:grid;grid-template-columns:1fr;gap:9px}.recovery-actions button{min-height:48px;margin:0;font-size:15px;font-weight:750;border:1px solid #b29750;color:#293e2b;background:#ecd08e;border-radius:8px;padding:12px}#recoveryDialog .recovery-actions .rescue-action{color:#293e2b!important;border:2px solid #98833f;background:#f9dc90!important}#recoveryDialog button:disabled{background:#e0e3d6!important;color:#657253!important;opacity:1}#recoveryProgress{padding:12px;background:#e6e9d4;border-radius:9px;color:#395736}#recoveryStatus:empty{display:none}#recoveryDialog .recovery-note{font-size:12px;color:#627052}#recoveryDialog :focus-visible{outline:3px solid #6d8548;outline-offset:2px}
@media(max-width:560px){#recoveryDialog{padding:17px}#recoveryDialog h2{font-size:25px}.recovery-crew{grid-template-columns:repeat(2,minmax(0,1fr))}.recovery-actions button{font-size:14px}}

/* v35: clearly armed placement and a visible exit on mouse and touch. */
#world.placing{cursor:crosshair}.categories #cancel.active{background:#f2d38d;color:#21382b;font-weight:750;white-space:nowrap;flex-shrink:0}#workplaceBuilding{padding:10px 12px;border:1px solid #f2d38d55;border-radius:9px;background:#223d2d}#workplaceBuilding h3{margin:0 0 6px}#workplaceBuilding p{margin:6px 0}

/* v37: every locked profession retains a keyboard/touch help action. */
.recruit-card-wrap{flex:0 0 178px;display:flex;flex-direction:column;gap:4px;scroll-snap-align:start}
#quickResidents .recruit-card-wrap .recruit-card{width:100%;flex:1 0 auto;min-height:128px}
#quickResidents .recruit-help{width:100%;min-height:36px;background:#f2d38d;color:#263c29;border:1px solid #aa8d51;border-radius:7px;font-weight:700;font-size:12px}
#quickResidents .recruit-reason{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35}
.army-reason{background:#fff4d7;border-left:4px solid #a56c28;padding:10px 12px;color:#423421;font-weight:700}
#armyBuildingChecks .recruit-checks{margin:8px 0;padding:0;list-style:none}
#armyBuildingChecks .requirement-action{background:#f3d184;color:#24382a;margin:4px 0}
#armyBuilding button{min-height:44px}
#residentShowAll{margin-bottom:12px;background:#f2d38d;color:#263c29}
