:root{--panel:rgba(250,252,253,.9);--line:rgba(30,50,70,.10);--ink:#1d2a35;--sub:#5b6b78;--accent:#2b6cb0;--accent2:#1f8a6a;--shadow:0 6px 22px rgba(16,32,48,.18);--tb:62px;--safe-b:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none;font:13px/1.35 "Inter","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;color:var(--ink);background:#b9d6ea;-webkit-user-select:none;user-select:none;touch-action:manipulation}
#view{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}
.hidden{display:none!important}
button,select{font:inherit;cursor:pointer;border:1px solid var(--line);background:rgba(255,255,255,.92);border-radius:9px;padding:5px 10px;color:var(--ink);transition:background .15s,box-shadow .15s}
button:hover{background:#fff;box-shadow:0 2px 8px rgba(16,32,48,.12)}
button.on{background:var(--accent);color:#fff;border-color:var(--accent)}
button:disabled{opacity:.45;cursor:default;box-shadow:none}
#topbar,#toolbar,.sheet,#menu,#btn-menu,#viewctl button{background:var(--panel);backdrop-filter:blur(12px) saturate(1.2);-webkit-backdrop-filter:blur(12px) saturate(1.2);border:1px solid rgba(255,255,255,.65);box-shadow:var(--shadow)}
/* top bar: essentials only */
#topbar{position:fixed;top:8px;left:8px;display:flex;gap:10px;align-items:center;border-radius:13px;padding:5px 10px;max-width:calc(100% - 70px);white-space:nowrap;overflow:hidden}
.brand{font-weight:800;letter-spacing:3px;color:var(--accent);font-size:13px}
.stat{font-weight:600;font-variant-numeric:tabular-nums;display:flex;gap:3px;align-items:center}
.fps{color:var(--sub);font-weight:500;font-size:11px}
.speeds{display:flex;gap:2px;background:rgba(30,50,70,.07);padding:2px;border-radius:9px}
.speeds button{padding:2px 9px;border:none;background:transparent;font-weight:700;min-width:34px}
.speeds button.on{background:var(--accent);color:#fff}
#btn-menu{position:fixed;top:8px;right:8px;width:44px;height:40px;border-radius:12px;font-size:20px;padding:0}
#menu{position:fixed;top:54px;right:8px;width:230px;border-radius:14px;padding:6px;display:flex;flex-direction:column;gap:2px;z-index:30;max-height:calc(100% - 70px);overflow:auto}
#menu button,#menu .mrow{display:flex;align-items:center;gap:10px;text-align:left;border:none;background:transparent;padding:9px 10px;border-radius:9px;font-weight:600}
#menu button:hover{background:rgba(43,108,176,.1);box-shadow:none}
#menu i{font-style:normal;width:22px;text-align:center}
#menu .mrow select{margin-left:auto}
#menu hr{border:none;border-top:1px solid var(--line);margin:3px 6px}
/* toolbar: left column on desktop/landscape */
#toolbar{position:fixed;left:8px;top:58px;display:flex;flex-direction:column;gap:3px;padding:5px;border-radius:14px;z-index:5}
#toolbar button{width:var(--tb);height:52px;font-size:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2px;border-radius:10px;border-color:transparent;background:transparent;line-height:1}
#toolbar button.on{background:var(--accent);color:#fff}
#toolbar button span{font-size:10px;margin-top:3px;font-weight:600}
#viewctl{position:fixed;right:8px;bottom:12px;display:flex;gap:6px;z-index:4}
#viewctl button{width:42px;height:42px;border-radius:50%;font-size:19px;padding:0}
/* sheets (info / panels / build menu) */
.sheet{position:fixed;border-radius:14px;padding:9px 12px;z-index:10;overflow:auto}
.sh-head{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-size:14px}
.sh-head b{white-space:nowrap}
.sh-head .x,.x{margin-left:auto;border:none;background:rgba(30,50,70,.07);width:28px;height:28px;padding:0;border-radius:50%;font-size:13px;flex:none}
#info{right:8px;top:54px;width:270px;max-height:min(60vh,420px)}
#panel{left:50%;top:54px;transform:translateX(-50%);width:min(440px,94vw);max-height:70vh}
#buildmenu{left:calc(var(--tb) + 26px);top:58px;width:300px;max-height:72vh}
#bm-cats{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:7px}
#bm-cats button{font-size:12px;padding:3px 8px}
.bitem{display:block;width:100%;text-align:left;margin-bottom:4px;padding:6px 9px;border-radius:10px}
.bitem small{display:block;color:var(--sub);font-size:11px;margin-top:1px}
.bitem.on small{color:#e6eef7}
.res{display:flex;gap:8px;font-size:11px;color:var(--sub);flex-wrap:wrap;font-variant-numeric:tabular-nums}
.row{display:flex;justify-content:space-between;gap:8px;padding:2px 0;border-bottom:1px solid var(--line)}
.row b{font-weight:600;text-align:right}
.btns{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.btns button{padding:4px 9px;font-size:12px}
.sub{color:var(--sub);font-size:11.5px}
.bar{height:6px;background:rgba(30,50,70,.1);border-radius:4px;overflow:hidden;margin:4px 0}
.bar i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2))}
#panel table{width:100%;border-collapse:collapse}#panel td{padding:3px 4px;border-bottom:1px solid var(--line)}#panel td:last-child{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.tech{border:1px solid var(--line);border-radius:10px;padding:7px;margin:5px 0;background:rgba(255,255,255,.55)}
.ok{color:#1f8a4c}.no{color:#a94438}
.log div{padding:3px 0;border-bottom:1px solid var(--line);font-size:12px}.log b{color:var(--sub);font-weight:600;margin-right:6px}
.devrow{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0}
/* toasts: top centre, never under panels */
#toasts{position:fixed;top:56px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:4px;z-index:40;pointer-events:none;width:min(520px,92vw)}
.toast{background:rgba(20,32,44,.88);color:#fff;padding:6px 12px;border-radius:10px;font-size:12.5px;transition:opacity .4s,transform .4s;opacity:0;transform:translateY(-6px);text-align:center;max-width:100%}
.toast.show{opacity:1;transform:none}
.toast.err{background:rgba(150,40,30,.92)}
/* title */
#title{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,rgba(10,20,30,.05),rgba(10,20,30,.55));z-index:50}
.t-card{text-align:center;padding:34px 48px;border-radius:22px;background:rgba(255,255,255,.18);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.45);box-shadow:0 20px 60px rgba(0,0,0,.25);color:#fff;max-width:94vw}
.t-logo{font-size:clamp(44px,12vw,72px);font-weight:800;letter-spacing:.25em;margin-left:.25em;text-shadow:0 4px 24px rgba(0,0,0,.35)}
.t-line{font-size:clamp(14px,4vw,18px);margin:6px 0 24px;text-shadow:0 2px 10px rgba(0,0,0,.4)}
.t-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.t-btns button{font-size:15px;padding:10px 20px;border-radius:12px}
.t-btns .primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.t-q{display:block;margin-top:18px}.t-q select{margin-left:6px}
.t-foot{margin-top:14px;font-size:11px;opacity:.75;letter-spacing:1px}
body.intitle #topbar,body.intitle #toolbar,body.intitle #btn-menu,body.intitle #viewctl,body.intitle .sheet,body.intitle #menu{display:none!important}

/* ---------- phones, portrait: toolbar along the bottom, sheets as bottom sheets ---------- */
@media (max-width: 720px) and (orientation: portrait) {
  #topbar{left:6px;top:6px;gap:7px;padding:4px 8px;font-size:12px;max-width:calc(100% - 60px)}
  .brand,.date,.era span{display:none}
  .speeds button{min-width:30px;padding:2px 6px}
  #btn-menu{top:6px;right:6px;width:42px;height:36px}
  #menu{top:48px;right:6px;width:min(250px,86vw)}
  #toolbar{left:0;right:0;top:auto;bottom:0;flex-direction:row;justify-content:space-around;border-radius:14px 14px 0 0;padding:4px 2px calc(4px + var(--safe-b));gap:0}
  #toolbar button{width:auto;flex:1;height:50px;font-size:19px;min-width:0}
  #toolbar button span{font-size:9.5px}
  #viewctl{bottom:calc(68px + var(--safe-b));right:6px}
  #viewctl button{width:38px;height:38px;font-size:17px}
  .sheet,#info,#panel,#buildmenu{left:0;right:0;top:auto;transform:none;width:auto;bottom:calc(60px + var(--safe-b));border-radius:14px 14px 0 0;max-height:42vh;padding:8px 12px}
  #panel{max-height:58vh}
  #toasts{top:48px}
}
/* phones, landscape: compact left toolbar, sheets on the right */
@media (max-height: 520px) and (orientation: landscape) {
  #topbar{top:4px;gap:8px;padding:3px 8px}
  #toolbar{top:44px;bottom:4px;padding:3px;gap:1px;overflow:auto}
  #toolbar button{width:52px;height:40px;font-size:17px}
  #toolbar button span{display:none}
  .sheet,#info,#panel,#buildmenu{top:44px;bottom:4px;right:4px;left:auto;width:min(320px,45vw);transform:none;max-height:none}
  #viewctl{bottom:6px;right:calc(min(320px,45vw) + 12px)}
  #toasts{top:44px}
}

/* placing chip (armed build tool), legend, selection box, long-press tip */
#placing{position:fixed;left:50%;transform:translateX(-50%);bottom:14px;display:flex;align-items:center;gap:8px;padding:5px 8px 5px 6px;border-radius:14px;z-index:12;background:var(--panel);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.65);font-weight:600}
#placing img{width:36px;height:36px}#placing button{padding:4px 9px}
#placing #pl-ok{white-space:nowrap;background:#2f9e5b;color:#fff;font-weight:700;padding:8px 14px;border-radius:10px;border:0}#placing #pl-ok:disabled{background:#9aa5ad;color:#eef}#placing .hidden{display:none}#pl-name{font-size:13px;line-height:1.2;max-width:46vw}
#legend{right:8px;bottom:62px;width:290px;max-height:70vh;font-size:12px}
#legend table{width:100%;border-collapse:collapse}#legend td{padding:2px 4px;border-bottom:1px solid var(--line);vertical-align:top}#legend td:first-child{white-space:nowrap;font-weight:600;color:var(--accent)}
#legend h5{margin:8px 0 3px;font-size:11px;color:var(--sub);text-transform:uppercase;letter-spacing:1px}
kbd{display:inline-block;border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;padding:0 4px;font:600 11px/16px inherit;background:#fff;margin:0 1px}
#selbox{position:fixed;border:1.5px solid #fff1a8;background:rgba(255,241,168,.15);z-index:3;pointer-events:none;border-radius:2px}
#tip{position:fixed;z-index:60;background:rgba(20,32,44,.92);color:#fff;padding:6px 10px;border-radius:9px;font-size:12px;max-width:240px;pointer-events:none}
/* build grid with thumbnails */
#bm-items{display:block}
.bm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:5px}
.bm-era{margin-top:8px}.bm-era summary{cursor:pointer;font-weight:600;font-size:12px;padding:5px 4px;border-top:1px solid rgba(0,0,0,.08);color:#555}.bm-era summary small{opacity:.6;margin-left:4px}.bm-era .bm-grid{margin-top:4px}
.bitem{display:flex;flex-direction:column;align-items:center;text-align:center;padding:4px 3px 5px;margin:0;width:auto;position:relative}
.bitem img{width:64px;height:64px;display:block}
.bitem .sz{position:absolute;top:3px;left:4px;font-style:normal;font-size:10.5px;font-weight:700;line-height:1;padding:2px 4px;border-radius:6px;background:rgba(20,28,36,.72);color:#fff;pointer-events:none}
.bitem b{font-size:11.5px;line-height:1.15}
.bitem small{font-size:10px}
.bitem.locked{opacity:.5;filter:grayscale(.9)}
.bitem.locked::after{content:"🔒";position:absolute;top:3px;right:5px;font-size:11px}
.bm-detail{grid-column:1/-1;font-size:11px;color:var(--sub);padding:3px 2px}
.sheet,#toolbar,#topbar,#menu,#placing,#viewctl{pointer-events:auto}
@media (max-width: 720px) and (orientation: portrait) {
  #placing{bottom:calc(66px + var(--safe-b))}
  #legend{left:0;right:0;width:auto;bottom:calc(60px + var(--safe-b));border-radius:14px 14px 0 0;max-height:50vh}
  .bm-grid{grid-template-columns:repeat(auto-fill,minmax(76px,1fr))}
  .bitem img{width:52px;height:52px}
}
@media (max-height: 520px) and (orientation: landscape) { #placing{bottom:6px} #legend{top:44px;bottom:4px;right:4px;width:min(320px,45vw);max-height:none} }
@media (max-width: 720px) and (orientation: portrait) { body.sheet-open #viewctl, body.sheet-open #placing{display:none} }

/* ---------- v2.2 status: population line, bars with 15 s report deltas, era goal ---------- */
#status{position:fixed;left:calc(var(--tb) + 26px);top:54px;width:310px;z-index:4;background:var(--panel);backdrop-filter:blur(12px) saturate(1.2);-webkit-backdrop-filter:blur(12px) saturate(1.2);border:1px solid rgba(255,255,255,.65);box-shadow:var(--shadow);border-radius:13px;padding:5px 8px;font-size:11.5px;font-variant-numeric:tabular-nums}
#st-head{display:flex;align-items:center;gap:6px}
#st-tog{border:none;background:rgba(30,50,70,.07);width:22px;height:22px;padding:0;border-radius:6px;font-size:11px;flex:none}
#st-pop{flex:1;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#st-pop small{color:var(--sub)}#st-pop .dim{color:var(--sub)}
#st-cycle{position:relative;width:22px;height:22px;flex:none}
#st-cycle svg{width:22px;height:22px;transform:rotate(-90deg)}
#st-cycle circle{fill:none;stroke-width:2.6}#st-cycle .bg{stroke:rgba(30,50,70,.13)}#st-cycle .fg{stroke:var(--accent);stroke-dasharray:43.98;stroke-linecap:round}
#st-cd{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:8.5px;font-weight:700;color:var(--sub)}
#st-bars{display:grid;grid-template-columns:1fr 1fr;gap:3px 10px;margin-top:5px}
.sb{display:grid;grid-template-columns:16px 1fr auto 26px;align-items:center;gap:4px;min-width:0}
.sb .ic{font-size:11px;text-align:center}
.sb .bt{height:6px;background:rgba(30,50,70,.12);border-radius:4px;overflow:hidden}
.sb .bt i{display:block;height:100%;background:#5aa36a;transition:width .4s}
.sb.warn .bt i{background:#d9a13a}.sb.low .bt i{background:#d9534a}.sb.low b{color:#a94438}
.sb b{font-weight:600;font-size:11px;white-space:nowrap}
.sb em{font-style:normal;font-size:10px;font-weight:700;text-align:right}
.sb em.up{color:#1f8a4c}.sb em.dn{color:#c0392b}
#status.pulse .sb em{animation:stpulse 1.2s ease-out}
@keyframes stpulse{0%{transform:scale(1.5);opacity:.3}100%{transform:none;opacity:1}}
#st-goal{margin-top:4px;color:var(--sub);font-size:10.5px;line-height:1.3}
#st-goal .ok{color:#1f8a4c}
#status.collapsed #st-bars,#status.collapsed #st-goal{display:none}

#btn-idle{position:fixed;left:calc(var(--tb) + 26px);bottom:14px;z-index:4;border-radius:12px;padding:6px 11px;font-weight:600;background:var(--panel);box-shadow:var(--shadow)}
/* floating progress bars over buildings */
#pbars{position:fixed;inset:0;pointer-events:none;z-index:2;overflow:hidden}
.pb{position:absolute;left:0;top:0;width:40px;height:6px;border-radius:4px;background:rgba(20,30,40,.55);border:1px solid rgba(255,255,255,.7);will-change:transform}
.pb i{display:block;height:100%;border-radius:3px;background:#6cc070}
.pb.build i{background:#f0b840}.pb.dis i{background:#d9534a}
.pb .pop{position:absolute;left:12px;top:-6px;font-size:14px;animation:pbpop 1.2s ease-out forwards}
@keyframes pbpop{0%{transform:translateY(0) scale(.6);opacity:0}20%{opacity:1;transform:translateY(-6px) scale(1.15)}100%{transform:translateY(-26px) scale(1);opacity:0}}
body.intitle #status,body.intitle #btn-idle,body.intitle #pbars{display:none!important}
#info h5{margin:8px 0 2px;font-size:11px;color:var(--sub);text-transform:uppercase;letter-spacing:1px}
@media (max-width: 720px) and (orientation: portrait) {
  #status{left:6px;right:54px;top:46px;width:auto;padding:4px 7px}
  #st-bars{gap:3px 8px}
  #btn-idle{left:6px;bottom:calc(68px + var(--safe-b))}
  body.sheet-open #btn-idle{display:none}
}
@media (max-height: 520px) and (orientation: landscape) { #status{left:66px;top:40px;width:250px} #btn-idle{left:66px;bottom:6px} }
/* v2.3: next-era checklist and research button (status only) */
#st-goal .gh{font-size:11px;color:var(--ink);margin-bottom:2px}
#st-goal .chk{display:flex;flex-wrap:wrap;gap:2px 8px}
#st-goal .chk span{white-space:nowrap}
#st-goal .chk .no{color:var(--sub)}
#st-goal .chk .tech{cursor:pointer;text-decoration:underline dotted}
#st-goal .st-res{margin-top:4px;padding:2px 8px;font-size:11px;border-radius:7px;display:flex;align-items:center;gap:5px}
#st-goal .rb{display:inline-block;width:50px;height:5px;background:#e3e6e8;border-radius:3px;overflow:hidden}
#st-goal .rb i{display:block;height:100%;background:#4f8fd6;transition:width .6s}
.sb .bt i{transition:width .8s ease}

/* research availability: the research button pulses and shows a dot while a tech can be started */
#st-goal .st-res.glow{box-shadow:0 0 0 2px #f2c14e,0 0 12px 2px rgba(242,193,78,.75);animation:resglow 1.6s ease-in-out infinite}
#st-goal .st-res .badge{color:#e8a317;font-style:normal;font-size:10px}
@keyframes resglow{50%{box-shadow:0 0 0 2px #f2c14e,0 0 4px 0 rgba(242,193,78,.3)}}
.tech.ready{outline:2px solid #f2c14e;border-radius:6px}
.tech .chk{display:flex;flex-wrap:wrap;gap:2px 8px;font-size:11px;margin-top:2px}
.tech .chk .no{color:#a0522d}

/* build menu: full height, header and category tabs stay put, only the item list scrolls; foldable */
#buildmenu{display:flex;flex-direction:column;overflow:hidden;bottom:14px;max-height:none}
#buildmenu.hidden{display:none}
#buildmenu .sh-head,#bm-cats{flex:none}
#bm-items{flex:1 1 auto;overflow-y:auto;min-height:0;align-content:start;padding-right:2px}
#buildmenu.folded #bm-cats,#buildmenu.folded #bm-items{display:none}
#buildmenu.folded{bottom:auto}
#bm-fold{margin-left:auto}
@media (max-width: 720px) and (orientation: portrait) { #buildmenu{bottom:calc(60px + var(--safe-b));max-height:46vh} #buildmenu.folded{max-height:none} }

/* status panel: top right, one row per stat (icon, name, bar, value, 15 s change), all rows visible; info card sits below it */
#status{left:auto;right:8px;top:54px;width:262px;max-height:calc(100vh - 70px);overflow:auto}
#st-bars{grid-template-columns:1fr;gap:3px}
.sb{grid-template-columns:16px 66px 1fr 54px 30px}
.sb .nm{font-size:11px;color:var(--ink);white-space:nowrap}
.sb b{text-align:right}
#info{top:auto;bottom:14px;right:8px}
body.st-tall #info{max-height:calc(100vh - 440px)}
@media (max-width: 720px) and (orientation: portrait) {
  #status{left:auto;right:6px;top:46px;width:min(250px,64vw)}
  .sb{grid-template-columns:14px 58px 1fr 46px 26px}
  #info{bottom:calc(60px + var(--safe-b))}
}
@media (max-height: 520px) and (orientation: landscape) { #status{left:auto;right:6px;top:40px;width:240px} }

/* underground: deposit legend and hover/tap label (known deposits only) */
#ulegend{position:fixed;left:calc(var(--tb) + 26px);bottom:14px;z-index:5;display:flex;flex-wrap:wrap;gap:4px 10px;max-width:420px;padding:6px 10px;border-radius:10px;background:rgba(20,18,16,.78);color:#eee;font-size:11px;pointer-events:none}
#ulegend span{display:flex;align-items:center;gap:4px}#ulegend i{width:11px;height:11px;border-radius:3px;display:inline-block;border:1px solid rgba(255,255,255,.4)}
#utip{position:fixed;z-index:40;padding:3px 7px;border-radius:6px;background:rgba(20,18,16,.85);color:#fff;font-size:11px;pointer-events:none;white-space:nowrap}
@media (max-width: 720px) and (orientation: portrait) { #ulegend{left:6px;right:6px;bottom:calc(66px + var(--safe-b))} }

/* v3.8 tasks */
#btn-tasks{position:relative}
#tasks-n{position:absolute;top:-4px;right:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#c0392b;color:#fff;font-size:10.5px;line-height:17px;font-weight:700}
.task{display:flex;align-items:center;gap:8px;padding:5px 2px;border-bottom:1px solid rgba(0,0,0,.07)}
.task img{width:36px;height:36px;flex:none}
.task .tx{flex:1;min-width:0}.task .tx b{display:block;font-size:12.5px}.task .tx small{display:block;color:var(--sub);font-size:11px;overflow-wrap:anywhere}
.task button{flex:none;padding:5px 9px;font-size:12px;border-radius:8px;min-height:32px}

.bitem small.pp{font-size:10px;color:var(--sub);white-space:nowrap}

/* v3.8.3 phone placing: one compact panel pinned top-left (thumbnail, name · people · size · cost, status chip, ✓ ↻ ☰ ✕) */
body.tplace #status #st-bars, body.tplace #status #st-goal{display:none}
body.tplace #placing{left:calc(6px + env(safe-area-inset-left,0px));top:calc(84px + env(safe-area-inset-top,0px));bottom:auto;transform:none;flex-wrap:wrap;width:min(300px,calc(100vw - 20px));gap:5px 6px;padding:5px 6px;border-radius:12px}
body.tplace #placing img{width:30px;height:30px}
body.tplace #pl-name{flex:1 1 calc(100% - 44px);min-width:0;max-width:none;font-size:12px;line-height:1.25;white-space:normal}
body.tplace #placing #pl-ok{order:5;flex:1 1 auto;padding:7px 10px}
body.tplace #placing #pl-rot,body.tplace #placing #pl-menu,body.tplace #placing #pl-x{order:6;padding:6px 11px}
body.tplace #placing #pl-x{order:7}
@media (max-width: 720px) and (orientation: portrait) {
  #topbar{top:calc(6px + env(safe-area-inset-top,0px))} #btn-menu{top:calc(6px + env(safe-area-inset-top,0px))}
  #status{top:calc(46px + env(safe-area-inset-top,0px))}
  body.tplace #status{width:auto;left:auto}
}
@media (max-height: 520px) and (orientation: landscape) {
  #topbar{left:calc(8px + env(safe-area-inset-left,0px))}
  body.tplace #placing{left:calc(76px + env(safe-area-inset-left,0px));top:44px;width:min(300px,40vw)}
}
