/* EVASHED Viewer — the desktop viewer's look (ViewerDesktop/Themes/Theme.xaml):
   light blue chrome, grey toolbars, white cards on a grey panel, a solid blue status bar. */
:root {
  --ink: #EEF5FF;  --ink-line: #C7D2DB;  --ink-edge: #D5E2F2;  --ink-hover: #E2ECFA;
  --on-ink: #1A1A2E;  --on-ink-muted: #5A6270;
  --text: #1A1A2E;  --text2: #3C4450;  --muted: #5A6270;  --faint: #8E939D;
  --surface: #FFFFFF;  --panel: #F0F2F5;  --well: #EEF1F5;  --panel-header: #F7F9FC;  --hover: #EAF2FE;
  --line: #DDE3EA;  --line-soft: #EEF1F5;  --line-strong: #C7D2DB;
  --signal: #2F6FED;  --signal-deep: #1B4F91;  --signal-soft: #EEF5FF;  --signal-line: #A9C4F5;
  --steel: #2F6FED;  --steel-ink: #1B4F91;  --steel-soft: #DBEAFE;  --steel-line: #A9C4F5;
  --on-switch: #4CAF50;  --status: #3B7ACD;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, Menlo, monospace;
  --pop-shadow: 0 3px 20px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: grid; grid-template-rows: 48px auto 1fr 28px; height: 100dvh; overflow: hidden;
  font: 13px/1.35 var(--font); color: var(--text); background: var(--surface);
}
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

/* Icons (drawn by viewer.js into <i data-icon> / <i data-vi>) */
i[data-icon], i[data-vi] { display: inline-flex; flex: none; }
i[data-icon] svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
i[data-vi] svg { width: 16px; height: 16px; }
i.chev svg { width: 9px; height: 9px; stroke-width: 1.8; }

/* ── Buttons (FlatButtonTemplate: radius 6) ── */
.ink-btn, .ink-toggle, .sec-btn, .drop-toggle, .soft-btn, .primary-btn, .ghost-btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border-radius: 6px; cursor: pointer; white-space: nowrap; border: 1px solid transparent;
}
:is(.ink-btn, .ink-toggle, .sec-btn, .drop-toggle, .soft-btn, .primary-btn, .ghost-btn, .seg button, .edge-tab):focus-visible {
  outline: 2px solid var(--signal); outline-offset: 1px;
}
:is(.ink-btn, .ink-toggle, .sec-btn, .drop-toggle, .soft-btn, .primary-btn):disabled { opacity: .45; cursor: default; }

.ink-btn, .ink-toggle { height: 30px; padding: 0 12px; background: var(--surface); border-color: var(--ink-line); color: var(--text2); }
.ink-btn:hover { background: var(--ink-hover); border-color: var(--signal-line); }
.ink-toggle:hover { background: var(--ink-hover); }
.ink-toggle[aria-expanded="true"] { background: var(--steel-soft); border-color: var(--steel-line); color: var(--steel-ink); }

.sec-btn { height: 32px; padding: 0 10px; background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.sec-btn:hover { background: var(--hover); }

.drop-toggle { height: 32px; padding: 0 12px; background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.drop-toggle:hover { background: var(--hover); }
.drop-toggle[aria-expanded="true"] { background: var(--steel-soft); border-color: var(--steel-line); color: var(--steel-ink); }
#showSummary { min-width: 58px; text-align: left; }
.chev { margin-left: 2px; }

.soft-btn { height: 28px; padding: 0 9px; background: var(--panel); border-color: var(--line); color: var(--text2); }
.soft-btn:hover { background: var(--hover); border-color: var(--signal-line); }
.soft-btn.small { height: 24px; }

.primary-btn { height: 36px; padding: 0 18px; background: var(--signal); color: #fff; font-weight: 600; border: 0; }
.primary-btn:hover { background: var(--signal-deep); }
.primary-btn.small { height: 26px; padding: 0 10px; font-weight: 400; }

.ghost-btn { width: 26px; height: 26px; padding: 0; background: transparent; color: var(--text2); }
.ghost-btn:hover { background: var(--hover); }

.pane-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

/* ═══ Top bar ═══ */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0;
  padding: 0 12px 0 16px; background: var(--ink); border-bottom: 1px solid var(--ink-edge);
}
.tb-left, .tb-right { display: flex; align-items: center; min-width: 0; }
.logo { width: 22px; height: 22px; margin-right: 10px; flex: none; fill: none; stroke-linejoin: round; }
.logo-a { stroke: var(--signal); stroke-width: 2; }
.logo-b { stroke: var(--signal-deep); stroke-width: 1.6; }
.app-name { font-size: 14px; font-weight: 600; color: var(--on-ink); white-space: nowrap; }
.file-chip {
  display: flex; gap: 8px; min-width: 0; margin-left: 16px; padding: 4px 10px;
  background: var(--surface); border: 1px solid var(--ink-edge); border-radius: 6px; white-space: nowrap;
}
.fc-title { font-weight: 600; color: var(--on-ink); overflow: hidden; text-overflow: ellipsis; max-width: 40ch; }
.fc-file { color: var(--signal); }
#openBtn { margin-left: 14px; }

.search {
  display: flex; align-items: center; gap: 8px; width: 280px; height: 30px; margin-right: 10px; padding: 0 10px;
  background: var(--surface); border: 1px solid var(--ink-line); border-radius: 6px; color: var(--on-ink-muted);
}
.search:focus-within { border-color: var(--steel); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); padding: 0; }
.search input::placeholder { color: var(--on-ink-muted); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 11px var(--font); padding: 0 5px; border: 1px solid var(--ink-line); border-radius: 4px; color: var(--on-ink-muted); }

/* ── Popups (Card + drop shadow) ── */
.dropdown { position: relative; }
.popup {
  position: absolute; top: calc(100% + 6px); z-index: 40;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--pop-shadow);
}
.show-popup { left: 0; width: 220px; padding: 10px 8px 8px; }
.popup-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px 8px; }
.popup-head .soft-btn + .soft-btn { margin-left: 4px; }
.env-popup { right: 0; width: 400px; max-width: calc(100vw - 24px); }

/* CheckRow: tick box, colour dot, label; off = empty box, faded dot, muted text */
.check-row {
  display: flex; align-items: center; height: 32px; padding: 0 8px; border-radius: 5px; cursor: pointer; user-select: none;
}
.check-row:hover { background: var(--hover); }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row .box {
  width: 16px; height: 16px; margin-right: 10px; border-radius: 3px; flex: none;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong);
}
.check-row .box svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 2; visibility: hidden; }
.check-row input:checked + .box { background: var(--signal); border-color: var(--signal); }
.check-row input:checked + .box svg { visibility: visible; }
.check-row input:focus-visible + .box { outline: 2px solid var(--signal); outline-offset: 1px; }
.check-row .dot { width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); flex: none; }
.check-row input:not(:checked) ~ .dot { opacity: .45; }
.check-row input:not(:checked) ~ .lbl { color: var(--muted); }
.row-sep { height: 1px; margin: 4px 8px; background: var(--line-soft); }

/* ── Environment panel ── */
.env-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 18px 10px; }
.env-head .t { font-size: 15px; font-weight: 600; }
.env-head .s { font-size: 12px; color: var(--muted); }
.env-head .sec-btn { height: 28px; }
.env-body { max-height: min(660px, calc(100dvh - 140px)); overflow: auto; padding: 0 18px 16px; }
.env-body .pane-label { display: block; margin-bottom: 8px; }
.env-sep { height: 1px; background: var(--line-soft); margin: 14px 0; }
.tiles { display: grid; gap: 6px; }
.tiles.c4 { grid-template-columns: repeat(4, 1fr); }
.tiles.c2 { grid-template-columns: repeat(2, 1fr); }
.tile {
  display: block; text-align: left; padding: 5px; min-width: 0; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.tile:hover { border-color: var(--line-strong); }
.tile.on { border: 2px solid var(--steel); background: var(--hover); padding: 4px; }
.tile:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.tile .lbl { display: block; margin-top: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sw { display: block; height: 26px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .15); }
.tile .sw.small { height: 22px; display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.tile .scene { display: grid; grid-template-rows: 2fr 1fr; height: 34px; border-radius: 5px; overflow: hidden; }
.tile.light { padding: 6px 9px; }
.tile.light.on { padding: 5px 8px; }
.tile.light b { display: block; font-weight: 600; }
.tile.light small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.env-row > .cap { color: var(--text2); flex: none; }
.env-row input[type="text"] {
  flex: 1; min-width: 0; height: 30px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px;
  font: 12px var(--mono); background: var(--surface);
}
.env-row input[type="text"]:focus { outline: 0; border-color: var(--steel); }
.env-row input[type="range"] { flex: 1; accent-color: var(--steel); }
.env-row .val { width: 42px; text-align: right; font: 12px var(--mono); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.switch-row .grid-sample { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; color: #C63B30; font-weight: 700; }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--line-strong); pointer-events: none; transition: background .12s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .12s; }
.switch input:checked + span { background: var(--on-switch); }
.switch input:checked + span::after { left: 18px; }
.switch input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 1px; }

/* ═══ View toolbar ═══ */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px; min-width: 0;
  padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.tgroup { display: flex; align-items: center; gap: 0; }
.tgroup > .pane-label { margin-right: 8px; }
.tgroup > .sec-btn, .tgroup > .dropdown + .sec-btn { margin-left: 6px; }
.vdiv { width: 1px; height: 24px; margin: 0 14px; background: var(--line); }

/* Segmented control (SegmentHost + Segment) */
.seg { display: inline-flex; padding: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  background: transparent; border: 1px solid transparent; border-radius: 5px; color: var(--text2); cursor: pointer; white-space: nowrap;
}
.seg button:hover { background: var(--hover); }
.seg button.on { background: var(--steel-soft); border-color: var(--steel-line); color: var(--steel-ink); font-weight: 600; }

/* ═══ Body ═══ */
.body { display: grid; grid-template-columns: 1fr auto auto; min-height: 0; min-width: 0; }
.viewport {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  background: linear-gradient(#EEF2F7, #FFFFFF 62%);   /* set from the Environment */
}
#canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
/* Helix's overlays: both 100 × 100 in the bottom corners; the cube at ViewCubeOpacity 0.5. */
.axes { position: absolute; left: 0; bottom: 14px; width: 100px; height: 100px; pointer-events: none; }
.viewcube { position: absolute; right: 0; bottom: 0; width: 100px; height: 100px; opacity: .5; touch-action: none; }

.sel-chip {
  position: absolute; left: 14px; top: 14px; z-index: 5; max-width: calc(100% - 28px);
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 6px 6px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.sel-dot { width: 10px; height: 10px; margin-right: 8px; border-radius: 2px; background: var(--signal); flex: none; }
.sel-name { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-info { color: var(--muted); margin: 0 10px 0 10px; white-space: nowrap; }
.sel-sep { width: 1px; height: 18px; margin: 0 8px; background: var(--line); }

.iso-banner {
  position: absolute; right: 30px; top: 14px; z-index: 5; max-width: calc(100% - 60px);
  display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 12px;
  background: var(--steel-soft); border: 1px solid var(--steel-line); border-radius: 8px; color: var(--steel-ink);
}
.iso-banner b { font-weight: 600; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 4px; }

.nav-hint {
  position: absolute; left: 104px; bottom: 22px; padding: 5px 10px; border-radius: 6px; pointer-events: none;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line); color: var(--text2); font-size: 12px; white-space: nowrap;
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.empty-state {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 32px; max-width: calc(100% - 32px);
}
.es-title { font-size: 20px; font-weight: 600; }
.es-text { color: var(--text2); margin-top: 8px; max-width: 46ch; }
.es-note { color: var(--muted); margin: 2px 0 0; max-width: 46ch; }
#esOpen { margin-top: 14px; }

.loading {
  position: absolute; inset: 0; z-index: 7; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: rgba(247, 249, 252, .85); color: var(--text2); font-size: 14px;
}
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--signal-line); border-top-color: var(--signal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.drop-zone {
  position: absolute; inset: 10px; z-index: 30; display: grid; place-items: center; pointer-events: none;
  border: 2px dashed var(--signal); border-radius: 12px; background: rgba(238, 245, 255, .9);
  color: var(--signal-deep); font-size: 16px; font-weight: 600;
}

.edge-tab {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 16px; height: 56px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--text2); border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px;
}
.edge-tab:hover { background: var(--hover); }
.edge-tab i[data-icon] svg { width: 10px; height: 10px; stroke-width: 1.8; }

.splitter { width: 1px; background: var(--line); cursor: col-resize; position: relative; }
.splitter::after { content: ""; position: absolute; inset: 0 -4px; }

/* ── Properties ── */
.props-pane { width: 340px; min-width: 240px; display: flex; flex-direction: column; min-height: 0; background: var(--well); }
.props-label { margin: 12px 16px 8px; }
.prop-head {
  margin: 0 12px 10px; padding: 12px 14px; border-radius: 8px; flex: none;
  background: var(--surface); border: 1px solid var(--line);
}
.prop-head.picked { background: var(--signal-soft); border-color: var(--signal-line); }
.prop-title-row { display: flex; align-items: center; }
.prop-swatch { width: 16px; height: 16px; margin-right: 10px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .25); flex: none; }
.prop-title { font-size: 15px; font-weight: 600; word-break: break-word; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badges:has(.badge:not([hidden])) { margin-top: 8px; }
.badge { padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; color: var(--text2); }
.badge.kind { font-weight: 600; color: var(--text2); }
.prop-head.picked .badge.kind { color: var(--signal-deep); border-color: var(--signal-line); }
.prop-sub { margin-top: 6px; color: var(--muted); }
.props-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 12px 12px; }

.pgroup { margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.pgroup > button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; text-align: left; cursor: pointer;
  background: var(--panel-header); border: 0; border-bottom: 1px solid var(--line-soft); font-weight: 600;
}
.pgroup > button i svg { width: 10px; height: 10px; stroke-width: 1.8; color: var(--text2); }
.pgroup.closed > button { border-bottom: 0; }
.pgroup.closed .pbody { display: none; }
.pbody { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; column-gap: 12px; padding: 6px 12px 8px; }
.pbody .k { color: var(--muted); padding: 3px 0; }
.pbody .v { padding: 3px 0; word-break: break-word; user-select: text; }

.detail-card { margin-bottom: 10px; padding: 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.dc-head { display: flex; align-items: center; margin-bottom: 8px; }
.dc-title { font-weight: 600; }
.dc-name { color: var(--muted); margin-left: 8px; flex: 1; }
.dc-head .ghost-btn { width: 22px; height: 22px; color: var(--muted); }
.dc-frame { background: #000; border-radius: 4px; padding: 2px; }
#detailCanvas { display: block; width: 100%; }
#detailImage { display: block; max-width: 100%; max-height: 320px; margin: 0 auto; }

/* ═══ Status bar ═══ */
.statusbar { display: flex; align-items: center; gap: 0; min-width: 0; padding: 0 16px; background: var(--status); color: #fff; font-size: 12px; }
.statusbar > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-div { width: 1px; height: 14px; margin: 0 14px; background: rgba(255, 255, 255, .45); flex: none; }
.sb-sel { flex: 1; min-width: 0; }
.sb-units { font-size: 11px; margin-left: 16px; }

/* ═══ Right-click menu (Windows-style) ═══ */
.ctx-menu {
  position: fixed; z-index: 60; min-width: 220px; padding: 3px; font-size: 12px;
  background: #F9F9F9; border: 1px solid #CCCEDB; box-shadow: 2px 3px 8px rgba(0, 0, 0, .2);
}
.ctx-item {
  display: flex; align-items: center; width: 100%; min-height: 24px; padding: 2px 10px 2px 28px;
  background: none; border: 1px solid transparent; text-align: left; cursor: default; position: relative; white-space: nowrap;
}
.ctx-item:not(:disabled):hover, .ctx-item.open { background: #E5F1FB; border-color: #CCE4F7; }
.ctx-item:disabled { color: #A0A0A0; }
.ctx-item .g { margin-left: auto; padding-left: 28px; color: #6D6D6D; }
.ctx-item:disabled .g { color: #B0B0B0; }
.ctx-item .arrow { margin-left: auto; padding-left: 28px; }
.ctx-sep { height: 1px; margin: 3px 2px 3px 28px; background: #D7D7D7; }
.ctx-sub { position: fixed; }

/* ═══ Detail window ═══ */
.detail-window { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(15, 20, 28, .45); }
.dw-frame {
  display: flex; flex-direction: column; width: min(1200px, 92vw); height: 88dvh;
  background: #000; border: 1px solid #555; box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}
.dw-bar { display: flex; align-items: center; height: 32px; padding: 0 0 0 12px; background: var(--surface); color: var(--text); font-size: 12px; }
.dw-bar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-bar button { width: 46px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 13px; }
.dw-bar button:hover { background: #E81123; color: #fff; }
.dw-body { position: relative; flex: 1; min-height: 0; }
#dwCanvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
#dwImage { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.dw-hint {
  position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 6px; pointer-events: none;
  background: rgba(23, 32, 43, .78); color: #fff; font-size: 12px;
}

/* ═══ Message box ═══ */
.msg-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(15, 20, 28, .3); padding: 16px; }
.msg-box { max-width: 440px; padding: 18px 20px 14px; box-shadow: var(--pop-shadow); }
.msg-actions { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ═══ Smaller screens: same pieces, reflowed ═══ */
@media (hover: none) { .nav-hint { display: none; } }
@media (max-width: 1100px) {
  .search { width: 200px; }
  .fc-title { max-width: 22ch; }
}
@media (max-width: 900px) {
  body { grid-template-rows: auto auto 1fr 28px; }
  .topbar { flex-wrap: wrap; row-gap: 6px; padding: 8px 10px; }
  .tb-left { flex: 1 1 auto; }
  .tb-right { flex: 1 1 100%; }
  .search { flex: 1; width: auto; }
  .file-chip { display: none; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; }
  .toolbar > * { flex: none; }
  .body { grid-template-columns: 1fr; position: relative; }
  .splitter { display: none; }
  .props-pane { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; max-width: 88vw; box-shadow: var(--pop-shadow); }
  .nav-hint { display: none; }
  .viewcube { width: 84px; height: 84px; }
  .axes { width: 84px; height: 84px; }
  .sel-name { max-width: 150px; }
  .env-popup { position: fixed; top: 96px; right: 8px; }
  .show-popup { position: fixed; top: auto; left: 8px; }
}
@media (max-width: 520px) {
  .app-name { display: none; }
  #openBtn { margin-left: 0; }
  .statusbar .sb-units { display: none; }
}
