
:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:#174267;--blue:#067fe0;--border:#cce7f7}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}
body{background:#83cc73}button,input,select{font:inherit}button{cursor:pointer}
#game-shell{height:100dvh;width:100%;position:relative;overflow:hidden}
#game{width:100%;height:100%;display:block;touch-action:none}
.game-header{position:absolute;top:9px;left:12px;right:12px;z-index:20;display:flex;align-items:center;gap:10px;pointer-events:none}
.game-header>*{pointer-events:auto}
.logo-wrap{width:244px;height:81px;flex:0 0 244px;position:relative;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 4px 5px #16577c55)}
.logo-wrap img{width:100%;height:100%;object-fit:contain}
.version-tag{position:absolute;bottom:2px;right:14px;background:#ffffffeb;border:1px solid #b9e4f5;color:#076eaf;border-radius:8px;padding:1px 5px;font-size:9px;font-weight:800}
.stats-pill,.time-pill,.actions-pill{background:#f9fdfff1;border:2px solid #c5e9fc;box-shadow:0 4px 15px #0c55853d;border-radius:18px}
.stats-pill{flex:1;min-width:100px;max-width:none;height:49px;display:flex;align-items:center;padding:0 14px;color:#096cb2;font-size:12px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.time-pill,.actions-pill{display:flex;align-items:center;gap:5px;padding:5px;height:49px}
.time-pill #clock{font-size:12px;font-weight:750;white-space:nowrap;padding:0 5px;color:#0a6aab}
.time-pill select{border:1px solid #c5e4f6;border-radius:10px;background:white;padding:7px 4px;color:#126ca4;max-width:135px;font-size:11px}
.game-header button{border:1px solid #c7e3f4;background:linear-gradient(#fff,#eaf6ff);color:#096bab;border-radius:11px;padding:8px 9px;font-size:12px;font-weight:750;white-space:nowrap}
.game-header #pause{background:linear-gradient(#16b7f7,#007ad8);color:white;border-color:#0589dd}
#quick-nav{position:absolute;top:105px;left:14px;z-index:12;display:flex;flex-direction:column;gap:7px;background:#f9fcfff2;border:2px solid #d4eafb;border-radius:18px;padding:7px;box-shadow:0 5px 18px #165d8b45}
#quick-nav button{width:66px;height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #e0eff8;border-radius:13px;background:#fff;color:#17496b;font-size:26px}
#quick-nav button small{font-size:10px;font-weight:800}
#quick-nav button.active{background:linear-gradient(#14a4ee,#0676d3);color:white;border-color:#087bc9}
#mini{position:absolute;top:106px;right:15px;z-index:10;width:164px;height:164px;background:#fff;border:4px solid white;border-radius:16px;box-shadow:0 5px 17px #135b8445;overflow:hidden}
#minimap{width:100%;height:100%;display:block}
#zoom{position:absolute;right:18px;bottom:156px;z-index:12;display:grid;gap:8px}
#zoom button{width:51px;height:51px;border:2px solid #a6dcf9;background:#fff;border-radius:14px;color:#057cc9;font-size:27px;font-weight:700;box-shadow:0 4px 12px #135b8445}
#catalog{position:absolute;left:103px;right:16px;bottom:12px;z-index:13;height:130px;border-radius:20px;border:2px solid #c9e8fa;background:#f8fcfff5;box-shadow:0 6px 22px #0b588e40;padding:9px 13px}
.catalog-top{height:35px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.category-chips{display:flex;gap:5px;min-width:0;overflow-x:auto}
.category-chips button{border:1px solid #e0edf5;background:#edf3f9;color:#285270;border-radius:22px;padding:7px 17px;font-size:11px;font-weight:800;white-space:nowrap}
.category-chips button.active{background:linear-gradient(#169eee,#0077d8);border-color:#0085d9;color:white}
.catalog-search{display:flex;align-items:center;gap:6px;background:white;border:1px solid #c4dfee;border-radius:15px;padding:5px 11px;color:#3484b2}
.catalog-search input{border:0;outline:0;background:transparent;color:#175275;width:165px;font-size:12px}
#catalog-items{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;height:73px;padding-top:5px;scrollbar-width:thin}
#catalog-items button{flex:0 0 87px;min-width:87px;height:67px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:1px solid #d7e8f4;border-radius:12px;background:linear-gradient(#fff,#eff7fd);color:#184c71;font-size:10px;font-weight:750;padding:3px;line-height:1.15}
#catalog-items button .ico{font-size:25px}
#catalog-items button .catalog-thumb{height:35px;width:54px;object-fit:contain;filter:drop-shadow(0 2px 2px #184e5a30)}
#catalog-items button small{font-size:9px;color:#6b8799}
#catalog-items button.active{background:#d7efff;border:2px solid #0285df}
#catalog-items button[hidden]{display:none}
#edit-tools{position:absolute;left:14px;bottom:154px;z-index:13;display:flex;gap:5px;padding:5px;border:2px solid #d3e8f6;border-radius:15px;background:#f9fdfff1;box-shadow:0 4px 16px #12527d33}
#edit-tools button{border:1px solid #d5e8f4;background:white;border-radius:10px;padding:9px 11px;font-size:12px;font-weight:750;color:#17648f}
#edit-tools button.active{background:#cbeeff;border-color:#188bd0}
#hospital-debug{display:none;position:absolute;top:75px;right:14px;z-index:22;gap:8px;padding:14px;background:#fffffff4;border:2px solid #c9e5f5;border-radius:15px;box-shadow:0 6px 18px #0d4f7c44;font-size:13px}
#hospital-debug.is-visible{display:grid}
#hospital-debug label{display:flex;align-items:center;gap:7px}
#toast{position:absolute;z-index:25;top:95px;left:50%;transform:translateX(-50%);display:none;border-radius:12px;background:#0b648d;color:white;padding:10px 15px;box-shadow:0 4px 12px #15435e66}
@media(max-width:1280px){
.logo-wrap{width:190px;flex-basis:190px;height:66px}.stats-pill{font-size:10px;padding:0 9px}
.game-header{gap:6px}.game-header button span{display:none}
.time-pill #clock{display:none}.time-pill select{max-width:113px}
}
@media(max-width:850px){
.game-header{top:4px;left:5px;right:5px;gap:4px;flex-wrap:wrap}
.logo-wrap{width:135px;flex:0 0 135px;height:52px}.version-tag{font-size:7px;right:2px}
.stats-pill{order:5;flex:0 0 100%;height:28px;font-size:10px;padding:0 8px}
.time-pill,.actions-pill{height:43px;padding:3px;gap:3px}.time-pill select{max-width:96px;padding:5px 2px;font-size:10px}
.game-header button{padding:6px;font-size:12px}
#quick-nav{top:93px;left:5px;padding:4px;gap:4px;border-radius:13px}
#quick-nav button{width:45px;height:51px;font-size:19px}
#quick-nav button small{font-size:8px}
#mini{top:98px;right:7px;width:100px;height:100px}
#catalog{left:5px;right:5px;bottom:5px;height:123px;padding:6px 8px;border-radius:15px}
.category-chips button{padding:6px 10px;font-size:10px}
.catalog-search input{width:95px;font-size:10px}
#catalog-items{height:75px}
#catalog-items button{flex-basis:75px;min-width:75px}
#edit-tools{left:5px;bottom:137px;padding:4px}
#edit-tools button{padding:7px;font-size:10px}
#zoom{right:7px;bottom:141px}
#zoom button{width:40px;height:40px}
#hospital-debug{top:93px;right:5px}
}
@media(max-width:530px){
.logo-wrap{flex-basis:130px;width:130px;height:46px}
.game-header .time-pill{margin-left:auto}
.game-header .actions-pill #traffic{display:none}
.game-header .actions-pill #fresh{display:none}
.game-header .actions-pill button{padding:6px 4px}
#mini{display:none}
.catalog-search input{width:72px}
.category-chips button{padding:6px 8px}
#edit-tools button span{display:none}
}

.catalog-heading{font-size:13px;color:#0c70b3;font-weight:850;letter-spacing:.1px}
@media(max-width:850px){.catalog-heading{font-size:11px}}

#catalog-count{font-size:10px;color:#6b8e9f;font-weight:600;margin-left:7px}
#quick-nav button.active{background:linear-gradient(#18b0fa,#0471c8);color:#fff;border-color:#0b78c9;box-shadow:inset 0 1px 2px #ffffff55,0 3px 7px #0c72ab50}
#catalog-items button[hidden]{display:none!important}

/* 1.8.9 — primary editing controls, clearly visible on all devices */
#edit-tools{left:16px;bottom:160px;gap:9px;padding:9px;border:3px solid #b4def7;border-radius:20px;background:#f9fdfff7;box-shadow:0 7px 25px #134a7b66}
#edit-tools button{min-width:116px;min-height:57px;padding:12px 16px;border:2px solid #c4dff1;border-radius:14px;font-size:15px;font-weight:850;background:linear-gradient(#fff,#edf8ff);color:#0b629e;box-shadow:0 3px 0 #b5d8ed}
#edit-tools button:hover{border-color:#2f9ee2;background:#e0f3ff}
#edit-tools button.active{background:linear-gradient(#098fe5,#056dc3);color:#fff;border-color:#035a9f;box-shadow:0 3px 0 #064e8c}
#edit-tools button:focus-visible,#toggle-debug:focus-visible{outline:3px solid #ffbd4d;outline-offset:2px}
#toggle-debug.active{background:#cbeeff;border-color:#238acb}
#hospital-debug{max-width:300px;max-height:min(65vh,420px);overflow:auto}
#hospital-debug small{font-size:11px;color:#58798d;line-height:1.4}
#hospital-debug input{width:20px;height:20px;accent-color:#0785dc}
@media(max-width:850px){
 #edit-tools{left:6px;bottom:137px;padding:5px;gap:5px}
 #edit-tools button{min-width:92px;min-height:49px;padding:9px 10px;font-size:13px}
}
@media(max-width:530px){
 #edit-tools{bottom:137px}
 #edit-tools button{min-width:66px;min-height:50px;padding:8px;font-size:22px}
 #edit-tools button span{display:none}
 #game-shell .actions-pill #toggle-debug{display:inline-flex}
}
/* 0.1.003 — responsive controls, independent lighting, recovery and loading. */
[hidden]{display:none!important}
button{touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ffc24f;outline-offset:3px}button:disabled{opacity:.4;cursor:default}
#lighting{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.game-header{top:max(10px,env(safe-area-inset-top));align-items:center}
.logo-wrap{width:226px;flex-basis:226px;height:88px}.version-tag{font-size:10px;bottom:2px}
.stats-pill{font-size:12px;white-space:normal;line-height:1.5;height:52px}
.time-pill,.actions-pill{height:52px;border-radius:16px}.time-pill select{font-size:12px;max-width:132px}
.game-header button{min-height:38px;min-width:38px;font-size:19px}.game-header button span{font-size:13px}
#quick-nav{top:116px}#quick-nav button{font-size:32px}#mini{top:116px;width:145px;height:145px;cursor:crosshair}
#edit-tools{left:16px;bottom:176px;border-width:2px;padding:6px;gap:5px;border-radius:16px}
#edit-tools button{min-width:44px;min-height:44px;padding:8px 12px;font-size:17px;border-width:1px;box-shadow:none}
#edit-tools button span{font-size:12px}#catalog{left:16px;right:16px;bottom:max(12px,env(safe-area-inset-bottom));height:151px;padding:10px 14px;border-radius:20px}
.catalog-heading{display:flex;align-items:center;gap:12px;font-size:13px}.catalog-heading button{background:#e7f5ff;color:#0878be;border:1px solid #badced;border-radius:8px;padding:6px 10px;min-height:30px;font-size:12px}
#catalog-items{height:95px;gap:9px}#catalog-items button{min-width:95px;flex-basis:95px;height:87px;font-size:10px;padding:3px;gap:1px}
#catalog-items canvas{height:51px;width:75px;object-fit:contain}#catalog-empty{margin:12px;font-size:13px;color:#5a7890}
#zoom{bottom:176px}#zoom button{width:46px;height:46px}
#settings{position:absolute;right:16px;top:92px;width:315px;z-index:30;background:#f8fcfff7;border:2px solid #c2e7f9;border-radius:20px;padding:18px;box-shadow:0 12px 45px #123f6b55;max-height:calc(100dvh - 112px);overflow:auto;font-size:12px}
.panel-title{display:flex;justify-content:space-between;align-items:center;font-size:19px;color:#075f9f}.panel-title button,#welcome-close{border:0;background:transparent;color:#4b7393;font-size:27px;padding:0 8px}
.settings-buttons{display:grid;gap:7px}.settings-buttons button{background:white;border:1px solid #c6e0ee;border-radius:9px;padding:10px;color:#1169a5;text-align:left;font-size:12px;min-height:40px}
#settings fieldset{margin:16px 0;padding:10px;border:1px solid #cee5f2;border-radius:12px}#settings legend{color:#437794}#settings label{display:flex;align-items:center;gap:8px;padding:6px 0}#settings input[type=checkbox]{width:19px;height:19px;accent-color:#0087de}#settings details{margin-top:15px;color:#53748b;line-height:1.6}#save-status{color:#0f9376;font-weight:700}#diagnostics{font-size:10px;color:#6b8b9d}
#loading{position:absolute;inset:0;z-index:100;background:radial-gradient(ellipse at 50% 45%,#eaffd1,#a1df7c);display:flex;align-items:center;justify-content:center;flex-direction:column;color:#166785;font-weight:700;padding:30px;text-align:center}
#loading img{width:min(420px,85vw);filter:drop-shadow(0 10px 10px #1b6f7a22)}#loading progress{width:min(280px,75vw);height:10px;accent-color:#0599e5;border:0}#loading button{border:0;padding:12px;border-radius:10px;background:#fff;margin-top:20px}
#welcome{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);width:min(430px,calc(100vw - 34px));z-index:24;background:#fafffff5;border:2px solid #c4eaff;border-radius:24px;padding:30px;box-shadow:0 18px 60px #12474455;color:#1b5f7e}
#welcome-close{position:absolute;top:8px;right:8px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;text-transform:uppercase;color:#008fd7}#welcome h1{font-size:38px;line-height:1.08;margin:16px 0;color:#056cac;letter-spacing:-1.5px}#welcome p{font-size:14px;line-height:1.6}#welcome>button:not(#welcome-close){width:100%;padding:13px;border:1px solid #bddfe9;background:#fff;border-radius:11px;color:#0c6d9e;font-size:13px;font-weight:700;margin-top:9px}.primary,#welcome>button.primary{background:linear-gradient(#08b1ee,#007cd7);color:#fff;border:1px solid #007dcf}
#toast{top:110px;display:block;max-width:min(600px,calc(100vw - 30px));font-size:13px;line-height:1.5;z-index:90;text-align:center}
dialog{border:2px solid #c5e8f8;border-radius:20px;padding:25px;color:#245670;width:min(430px,90vw);box-shadow:0 15px 70px #0b315677}dialog::backdrop{background:#12365270}dialog h2{font-size:21px}dialog p{font-size:14px;line-height:1.6}dialog>div{display:flex;gap:9px;justify-content:flex-end}dialog button{padding:11px 16px;border-radius:9px;background:white;border:1px solid #c2deed;color:#07679a}
@media(max-width:1100px){.logo-wrap{width:185px;flex-basis:185px;height:70px}.stats-pill{font-size:10px}.game-header button span{display:none}#quick-nav,#mini{top:94px}#settings{top:83px}}
@media(max-width:850px){.game-header{top:max(5px,env(safe-area-inset-top));left:7px;right:7px;gap:5px}.logo-wrap{width:145px;flex-basis:145px;height:55px}.time-pill,.actions-pill{height:47px;padding:3px}.time-pill select{max-width:112px;font-size:11px}.game-header button{min-width:35px;min-height:36px;font-size:18px;padding:4px 6px}.stats-pill{height:29px;order:5;flex-basis:100%;font-size:10px}.version-tag{font-size:8px}.time-pill{margin-left:auto}#quick-nav{top:103px;left:7px;padding:5px}#quick-nav button{width:46px;height:49px;font-size:25px}#quick-nav button small{font-size:8px}#mini{top:104px;right:8px;width:100px;height:100px}#catalog{left:7px;right:7px;bottom:max(6px,env(safe-area-inset-bottom));height:144px;padding:7px 9px;border-radius:16px}.catalog-heading{font-size:11px;gap:5px}.catalog-search input{width:110px;font-size:11px}#catalog-items button{flex-basis:87px;min-width:87px;height:86px}#edit-tools{left:7px;bottom:160px;padding:4px}#edit-tools button{min-width:42px;min-height:44px;padding:6px 9px;font-size:19px}#edit-tools button span{display:none}#zoom{bottom:160px;right:7px;gap:5px}#zoom button{width:42px;height:44px}#settings{top:95px;right:7px;max-height:calc(100dvh - 110px)}#toast{top:104px;font-size:12px}}
@media(max-width:530px){.logo-wrap{flex-basis:120px;width:120px;height:48px}.game-header{gap:3px}.time-pill,.actions-pill{gap:2px}.time-pill select{max-width:90px;font-size:10px}.game-header .actions-pill #fresh{display:none}.game-header button{min-width:32px;padding:4px;font-size:17px}.stats-pill{font-size:9px;height:26px}#quick-nav{top:91px}#quick-nav button{height:46px;width:43px}#settings{top:86px;width:min(315px,calc(100vw - 14px))}#mini{display:none}.catalog-search{padding:5px 7px}.catalog-search input{width:86px}.catalog-heading{font-size:10px}.catalog-heading button{padding:5px;font-size:10px}#selected-tool{max-width:105px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#welcome{padding:24px;top:43%}#welcome h1{font-size:32px}#toast{top:91px}}
@media(max-height:540px){.game-header{top:3px}.logo-wrap{height:43px;width:135px;flex-basis:135px}.stats-pill{display:none}.game-header{flex-wrap:nowrap}#quick-nav{top:59px;flex-direction:row;gap:3px}#quick-nav button{height:42px;width:49px;font-size:22px}#quick-nav small{font-size:7px}#mini{display:none}#catalog{height:116px}#catalog-items{height:72px}#catalog-items button{height:67px;min-width:85px}#catalog-items canvas{height:35px}#edit-tools,#zoom{bottom:130px}#settings{top:58px;max-height:calc(100dvh - 68px)}#welcome{top:48%;padding:18px;width:400px}#welcome h1{font-size:26px;display:inline;margin:8px 0}#welcome p{font-size:12px;margin:5px 0}#welcome>button:not(#welcome-close){padding:8px;width:49%;font-size:10px}#welcome .eyebrow{display:block;margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
#welcome #welcome-demo{background:linear-gradient(#09ace8,#007bd4);border-color:#0083d1;color:white}

.train-setting{display:grid;gap:6px;font-size:13px;margin:12px 0}.train-setting select{padding:8px;border:1px solid #b9dfef;border-radius:8px;background:white;color:#174d77}
/* 0.1.006: thematic sections stay accessible without a single endless object row. */
#quick-nav{max-height:calc(100dvh - 334px);overflow-y:auto;scrollbar-width:thin}
#quick-nav button{height:53px;min-height:53px;width:80px;font-size:23px;gap:2px}
#quick-nav button small{font-size:9px;line-height:1.12;max-width:75px}
#catalog{height:196px}
#catalog-items{height:116px;gap:18px;padding-top:3px;align-items:flex-start}
.catalog-section{flex:0 0 auto;min-width:0;padding-right:17px;border-right:1px solid #c6e4f3}
.catalog-section:last-child{border-right:0}
.catalog-section h3{font-size:11px;margin:1px 0 5px;color:#1175af}
.section-items{display:flex;gap:8px}
.catalog-meta{display:flex;align-items:center;gap:14px;height:28px;font-size:11px;color:#52788d}
.catalog-meta label{display:flex;align-items:center;gap:6px;white-space:nowrap}
.catalog-meta select{border:1px solid #bbdfef;border-radius:7px;background:white;color:#14628f;padding:3px 6px;font-size:11px;max-width:190px}
#tool-hint{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
#edit-tools,#zoom{bottom:220px}
@media(max-width:850px){#catalog{height:195px}#quick-nav{max-height:calc(100dvh - 332px)}#quick-nav button{width:60px;min-height:48px;height:48px}#quick-nav button small{font-size:8px;max-width:57px}#edit-tools,#zoom{bottom:211px}.catalog-meta{gap:7px}.catalog-meta select{max-width:156px}.catalog-meta #tool-hint{display:none}#catalog-count{margin-left:auto;white-space:nowrap}}
@media(max-height:540px){#catalog{height:156px}.catalog-meta{height:23px}#catalog-items{height:83px}.catalog-section h3{font-size:10px;margin-bottom:3px}#edit-tools,#zoom{bottom:171px}#quick-nav{top:57px;max-height:48px;right:7px;flex-direction:row;overflow-x:auto;overflow-y:hidden}#quick-nav button{min-width:65px;height:36px;min-height:36px;flex-direction:row;font-size:15px}#quick-nav button small{font-size:7px}.catalog-meta select{padding:1px 4px}}

@media(max-height:540px){.catalog-top{height:30px}#catalog-items{height:89px}#catalog-items button{height:64px}#catalog-items canvas{height:29px;flex-shrink:0}#catalog-items button span{max-width:81px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#catalog-items button small{font-size:8px}}
/* 0.1.007 — unobstructed branding, compact controls, optional catalog and statistics. */
.logo-wrap{height:auto;display:flex;flex-direction:column;gap:2px;align-items:center;filter:drop-shadow(0 3px 4px #16577c44)}
.logo-wrap img{width:100%;height:auto;display:block}
.version-tag{position:static;align-self:flex-end;right:auto;bottom:auto;margin-right:12px;font-size:9px;line-height:1.25;white-space:nowrap}
.time-pill{margin-left:auto}
#fullscreen[aria-pressed=true]{background:#d5efff;border-color:#1596de}
#game-shell:fullscreen{width:100vw;height:100dvh;background:#83cc73}
#game-shell:-webkit-full-screen{width:100vw;height:100vh;background:#83cc73}
#settings #stats-panel{margin:10px 0 14px;padding:10px 12px;border:1px solid #bfdfef;border-radius:10px;background:#eef8ff}
#stats-panel summary{font-weight:750;color:#126a9d;cursor:pointer;padding:4px 0;min-height:25px}
#stats-panel p{font-size:12px;line-height:1.8;margin:8px 0}
#catalog-toggle{order:3;margin-left:0;flex-shrink:0;display:flex;align-items:center;gap:5px;background:#e5f4ff;color:#12699b;border:1px solid #b9ddec;border-radius:9px;min-height:30px;padding:5px 9px;font-size:11px;font-weight:700}
.catalog-search{margin-left:auto;min-width:0}
.catalog-collapsed #catalog{height:58px}
.catalog-collapsed #catalog-toggle{margin-left:auto}
.catalog-collapsed #edit-tools,.catalog-collapsed #zoom{bottom:82px}
.catalog-collapsed #quick-nav{max-height:calc(100dvh - 205px)}
#settings{top:112px;max-height:calc(100dvh - 128px)}
@media(max-width:1100px){#settings{top:96px;max-height:calc(100dvh - 110px)}}
@media(max-width:850px){.logo-wrap{width:145px;flex-basis:145px;height:auto}.version-tag{font-size:8px;margin-right:7px}.game-header{flex-wrap:nowrap}.catalog-collapsed #catalog{height:51px}.catalog-collapsed #edit-tools,.catalog-collapsed #zoom{bottom:66px}#quick-nav{top:88px}#mini{top:88px}#settings{top:87px;max-height:calc(100dvh - 102px)}}
@media(max-width:530px){.logo-wrap{width:104px;flex-basis:104px;flex-shrink:1;min-width:82px}.version-tag{font-size:7px;margin-right:4px}.time-pill select{max-width:82px;font-size:10px}.time-pill,.actions-pill{height:43px;gap:1px}.game-header button{min-width:30px;min-height:34px;padding:3px;font-size:17px}#quick-nav{top:74px;max-height:calc(100dvh - 305px)}#settings{top:74px;max-height:calc(100dvh - 88px)}.catalog-search input{width:74px}.catalog-heading{min-width:0;gap:3px}#selected-tool{max-width:90px}#catalog-toggle{padding:4px 7px;min-width:32px}.toggle-label{display:none}.catalog-collapsed .toggle-label{display:inline}#toast{top:77px}}
@media(max-height:540px){.logo-wrap{width:120px;flex-basis:120px}.logo-wrap img{max-height:43px;object-fit:contain}.version-tag{font-size:7px;margin-top:-1px}.game-header{top:2px}#quick-nav{top:61px;max-height:48px}#settings{top:61px;max-height:calc(100dvh - 72px)}.catalog-collapsed #catalog{height:45px}.catalog-collapsed #edit-tools,.catalog-collapsed #zoom{bottom:59px}.catalog-collapsed #quick-nav{max-height:48px}#catalog-toggle{min-height:26px;padding:3px 8px}.catalog-collapsed .catalog-top{height:26px}}
/* 0.1.008 — language choice sits below the logo without widening the mobile header. */
.brand-meta{display:flex;align-items:center;justify-content:flex-end;gap:7px;width:100%;padding-right:8px}
.brand-meta .version-tag{align-self:center;margin:0}
#language-select{font:700 11px system-ui,sans-serif;color:#07679a;background:#f7fcff;border:1px solid #a7d7ef;border-radius:8px;padding:3px 2px;min-height:28px;width:56px;cursor:pointer}
#language-select:focus-visible{outline:3px solid #005fa8;outline-offset:2px}
#quick-nav,#mini{top:132px}
#settings{top:122px;max-height:calc(100dvh - 138px)}
#catalog-items canvas{height:43px;flex-shrink:0}
#catalog-items button span{max-width:100%;overflow-wrap:anywhere;line-height:1.15;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:23px;overflow:hidden;flex-shrink:0}
#quick-nav button small{overflow-wrap:anywhere}
#settings .train-setting{flex-wrap:wrap}
#settings .train-setting select{max-width:100%}
@media(max-width:1100px){#quick-nav,#mini{top:111px}#settings{top:111px;max-height:calc(100dvh - 126px)}}
@media(max-width:850px){#quick-nav,#mini{top:94px}#settings{top:94px;max-height:calc(100dvh - 109px)}}
@media(max-width:530px){.brand-meta{padding-right:0;gap:3px}#language-select{width:52px;min-height:28px;font-size:10px}#quick-nav{top:78px}#settings{top:78px;max-height:calc(100dvh - 93px)}.catalog-meta select{max-width:145px}#catalog-count{font-size:10px}#welcome h1{overflow-wrap:anywhere}}
@media(max-height:540px){.logo-wrap img{max-height:32px}.brand-meta{gap:3px;padding-right:0}#language-select{min-height:25px;font-size:10px;width:52px}#quick-nav{top:65px}#settings{top:65px;max-height:calc(100dvh - 76px)}}
@media(max-height:540px){#catalog-items canvas{height:29px}#catalog-items button span{display:block;max-height:12px}}
