:root {
  --bg: #f4f6f7; --card: #ffffff; --ink: #14201f; --muted: #5f6f6d; --line: #dde4e3;
  --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: #d9f2ee;
  --danger: #b42318; --ok: #16a34a; --warn: #d97706;
  --paper: #fffef9; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.05);
  --r: 14px; --nav-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1413; --card: #161f1e; --ink: #e6eeed; --muted: #94a5a3; --line: #26332f;
    --accent: #2dd4bf; --accent-ink: #04201c; --accent-soft: #123a35; --danger: #f97066;
    --paper: #f3f1e8; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1413; --card: #161f1e; --ink: #e6eeed; --muted: #94a5a3; --line: #26332f;
  --accent: #2dd4bf; --accent-ink: #04201c; --accent-soft: #123a35; --danger: #f97066;
  --paper: #f3f1e8; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.err { color: var(--danger); font-size: 13px; margin: 8px 0 0; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- header / nav */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-right: auto; }
.brand img { border-radius: 7px; }
.pills { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; max-width: 46vw;
}
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pill.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.pill.busy .dot { background: var(--warn); animation: pulse 1s infinite; }
.pill.off .dot { background: var(--warn); }
@keyframes pulse { 50% { opacity: .3; } }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line);
}
.tabs button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative;
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer;
}
.tabs button.on { color: var(--accent); font-weight: 600; }
.badge { position: absolute; top: 6px; left: calc(50% + 8px); background: var(--danger); color: #fff; border-radius: 99px; font-style: normal; font-size: 11px; padding: 0 6px; }

/* ---------- layout */
main { max-width: 1100px; margin: 0 auto; padding: 14px; }
.page { display: none; }
.page.on { display: block; }
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.cards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.col-edit, .col-prev { min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.kind { display: none; }
.kind.on { display: block; }

@media (min-width: 880px) {
  :root { --nav-h: 0px; }
  body { padding-bottom: 0; }
  .top { padding: 10px 22px; }
  .tabs { position: static; height: auto; border: 0; padding: 0; background: none; gap: 4px; order: 0; }
  .tabs button { flex-direction: row; gap: 8px; padding: 8px 14px; border-radius: 10px; font-size: 14px; }
  .tabs button.on { background: var(--accent-soft); }
  .badge { position: static; }
  .brand { margin-right: 18px; }
  .pills { margin-left: auto; }
  .top { }
  .grid { grid-template-columns: minmax(0, 1fr) 440px; align-items: start; }
  .col-prev { position: sticky; top: 76px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .cards .card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .top { gap: 8px; padding-left: 10px; padding-right: 10px; }
  #netPill span { display: none; }
  #netPill { padding: 4px 8px; }
  .pill { max-width: 52vw; }
}

/* ---------- forms */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.f.wide, .check.wide { grid-column: 1 / -1; }
.f span output { color: var(--ink); font-weight: 600; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 10px; min-width: 0;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="range"] { padding: 0; height: 36px; accent-color: var(--accent); background: none; border: 0; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); align-self: end; min-height: 38px; }
.fold { margin-top: 4px; }
.fold summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; border-radius: 11px; padding: 10px 14px; cursor: pointer; min-height: 42px;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.row-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.row-actions input, .row-actions select { flex: 1 1 140px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.head-row h2 { margin: 0; }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow-x: auto; }
.seg button { flex: 1; white-space: nowrap; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-btn, .chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; }
.chip-btn { cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); }
.chip { color: var(--accent); background: var(--accent-soft); border-color: transparent; font-weight: 600; }
.chip.muted { color: var(--muted); background: var(--bg); }

/* ---------- items */
.items { display: grid; gap: 8px; margin-bottom: 8px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 64px 84px 38px; gap: 6px; align-items: center; }
.item input { padding: 8px; }
.item .x { height: 38px; width: 38px; border: 1px solid var(--line); background: none; border-radius: 10px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.item .x:hover { color: var(--danger); border-color: var(--danger); }
.row-actions + .row-actions { margin-top: 8px; }

.drop {
  display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 12px;
  padding: 22px 12px; cursor: pointer; background: var(--bg);
}
.drop:hover, .drop.over { border-color: var(--accent); }

/* ---------- preview */
.prev-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.prev-head h2 { margin: 0 auto 0 0; }
.paper-wrap { background: color-mix(in srgb, var(--bg) 70%, var(--line)); border-radius: 12px; padding: 14px 8px; display: flex; justify-content: center; overflow: auto; max-height: 70vh; }
.paper { background: var(--paper); box-shadow: 0 2px 10px rgba(0,0,0,.25); max-width: 100%; }
.paper canvas { display: block; max-width: 100%; height: auto; image-rendering: auto; }
.paper pre { margin: 0; padding: 10px; font-size: 11.5px; color: #222; overflow: auto; max-width: 100%; }

/* ---------- action bar */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 14px; background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
#page-print { padding-bottom: 84px; }
.actionbar .primary { flex: 1; max-width: 260px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--card); }
.stepper button { width: 36px; height: 42px; border: 0; background: none; color: var(--ink); font-size: 18px; cursor: pointer; }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; }
.progress { position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
@media (min-width: 880px) { .actionbar { left: 0; right: 0; } }

/* ---------- printer page */
.status { font-weight: 600; margin: 0 0 12px; }
.support { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.support li { font-size: 12.5px; border-radius: 999px; padding: 3px 10px; background: var(--bg); border: 1px solid var(--line); }
.support li.yes { color: var(--ok); } .support li.no { color: var(--muted); text-decoration: line-through; }
.tips { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.tips li { margin: 6px 0; }
.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv td { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.kv td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.console { background: #0b1110; color: #b5f3d9; border-radius: 10px; padding: 10px; font-size: 12px; height: 180px; overflow: auto; margin: 8px 0 0; white-space: pre-wrap; word-break: break-all; }
.console .err { color: #ff8f85; margin: 0; font-size: inherit; } .console .tx { color: #8fc7ff; } .console .rx { color: #ffd98f; }

/* ---------- jobs */
.jobs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.jobs li { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.jobs .meta { flex: 1; min-width: 0; }
.jobs .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobs .meta small { color: var(--muted); }
.jobs .meta small.fail { color: var(--danger); }
.jobs .btn { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.empty { color: var(--muted); font-size: 14px; padding: 10px 0; text-align: center; }

/* ---------- toasts */
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 76px); z-index: 50; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: #18211f; color: #fff; padding: 10px 14px; border-radius: 12px; max-width: 520px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.3); display: flex; gap: 12px; align-items: center; }
.toast.err { background: #7a1a12; }
.toast button { background: none; border: 0; color: #7cf0df; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- studio templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tpl { display: flex; gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 12px; padding: 9px 10px; font: inherit; cursor: pointer; min-width: 0; }
.tpl:hover { border-color: var(--accent); }
.tpl.on { border-color: var(--accent); background: var(--accent-soft); }
.tpl i { font-style: normal; font-size: 20px; flex: none; }
.tpl b { display: block; font-size: 13px; line-height: 1.2; }
.tpl small { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; }
#studioForm .f.list { grid-column: 1 / -1; }
.lrows { display: grid; gap: 6px; }
.lrow { display: flex; gap: 6px; align-items: center; }
.lrow input[type="text"], .lrow select { padding: 7px 8px; font-size: 14px; }
.lrow select { width: auto; flex: none; }
.lrow .flex { flex: 1; min-width: 0; }
.lrow .x { flex: none; height: 34px; width: 34px; border: 1px solid var(--line); background: none; border-radius: 9px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.lrow .x:hover { color: var(--danger); border-color: var(--danger); }
.sketch-wrap { grid-column: 1 / -1; }
.sketch-wrap canvas { width: 100%; max-width: 384px; height: auto; background: #fff; border: 2px dashed var(--line); border-radius: 8px; touch-action: none; cursor: crosshair; display: block; }
.sketch-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.sketch-tools input[type="range"] { width: 110px; }
.chip-btn.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ---------- preview extras */
.tele { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tele .chip.hot { color: #b45309; background: #fef3c7; }
.tele .chip.cool { color: var(--ok); }
.banner { border-radius: 10px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 10px; }
.banner.warn { background: #fef3c7; color: #78350f; }
.banner.bad { background: #fee2e2; color: #7f1d1d; }
.tools .btn { flex: 1 1 100px; min-height: 38px; padding: 6px 10px; font-size: 13px; }
.roll { margin-top: 12px; }
.paper { position: relative; }
.paper canvas { mix-blend-mode: multiply; } /* lets the paper colour show through the white dots */
.paper[data-tint="yellow"] { background: #fff2a8; }
.paper[data-tint="kraft"] { background: #cfae83; }
.paper[data-tint="blue"] { background: #d4eafd; }
.paper[data-tint="pink"] { background: #ffd6e5; }
.paper[data-tint="archival"] { background: #f4f1e6; }
#labelGuide { position: absolute; left: 0; right: 0; border-top: 2px dashed #e11d48; pointer-events: none; }
#labelGuide::after { content: "label end"; position: absolute; right: 4px; top: 2px; font-size: 10px; color: #e11d48; }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); padding: 0; width: min(640px, 94vw); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dlg { padding: 16px; }
.dlg textarea { font-size: 12px; }

/* ---------- setup wizard */
.cards .card.full { grid-column: 1 / -1; }
.step-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.step-h h2 { margin: 0 0 2px; }
.step-h p { margin: 0; font-size: 13px; }
.num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.section-h { grid-column: 1 / -1; margin: 10px 0 -4px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stepno { display: inline-block; font-size: 10px; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 0 4px; margin-right: 2px; }
.detect { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.detect h3 { margin: 0; }
.kv td:nth-child(2) { text-align: right; font-weight: 600; }
.kv td.src { text-align: right; width: 1%; white-space: nowrap; font-size: 11px; font-weight: 400; color: var(--muted); padding-left: 10px; }
.src.read { color: var(--ok); } .src.self-test { color: var(--accent); }
.panel { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.label-grid { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; margin-top: 10px; }
.diagram { width: 100%; max-width: 190px; color: var(--ink); }
@media (max-width: 560px) { .label-grid { grid-template-columns: 1fr; } .diagram { margin: 0 auto; } }
.ptype-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; }
.summary b { font-weight: 700; }
.summary button { margin-left: auto; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- canvas designer */
.tool-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tool-row.small { margin-top: 10px; }
.tool-row .sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.tbtn { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 56px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 11.5px; cursor: pointer; }
.tbtn b { font-size: 16px; line-height: 1.1; }
.tbtn:hover { border-color: var(--accent); }
.tbtn.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tbtn.s { min-width: 36px; min-height: 36px; flex-direction: row; justify-content: center; font-size: 16px; padding: 4px 8px; }
.tbtn.danger { color: var(--danger); }
.f.inline { flex-direction: row; align-items: center; gap: 8px; }
.f.inline select, .f.inline input { width: auto; }
.props { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.props h3 { margin: 0 0 8px; }
.props .fields { margin-top: 0; }
.stage-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; font-size: 12.5px; }
.stage { display: grid; grid-template-columns: 22px max-content; grid-template-rows: 18px max-content; max-height: 72vh; overflow: auto; background: color-mix(in srgb, var(--bg) 70%, var(--line)); border-radius: 12px; }
.stage canvas { display: block; }
.ruler-corner { position: sticky; top: 0; left: 0; z-index: 3; background: var(--card); font-size: 8px; color: var(--muted); display: grid; place-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#rulerTop { position: sticky; top: 0; z-index: 2; background: var(--card); border-bottom: 1px solid var(--line); }
#rulerLeft { position: sticky; left: 0; z-index: 2; background: var(--card); border-right: 1px solid var(--line); }
.stage .paper-wrap { background: none; padding: 10px; max-height: none; overflow: visible; display: block; border-radius: 0; }
.paper #overlay { position: absolute; left: 0; top: 0; mix-blend-mode: normal; touch-action: none; cursor: default; }
.paper.select-mode #overlay { cursor: move; }
.paper.draw-mode #overlay { cursor: crosshair; }
.paper.static #overlay { pointer-events: none; }
.paper.label-shape { border-radius: 6px; outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 3px; }

/* phone: the paper comes first, tools underneath */
@media (max-width: 879px) {
  #page-print .grid { display: flex; flex-direction: column; }
  #page-print .col-prev { order: -1; }
  .stage { max-height: 46vh; }
  .preview .tele, .preview .tools, .preview .banner { font-size: 12px; }
}

/* ---------- new design dialog, gallery, icons, zoom */
.dlg.wide { max-height: 86vh; overflow: auto; }
dialog:has(.dlg.wide) { width: min(900px, 96vw); }
.nd-step { display: flex; gap: 10px; align-items: center; margin: 16px 0 8px; }
.nd-step:first-of-type { margin-top: 4px; }
.nd-size { display: flex; align-items: center; gap: 14px; margin-top: 12px; min-height: 64px; }
.nd-rect { background: #fff; border: 2px solid var(--accent); border-radius: 4px; flex: none; box-shadow: var(--shadow); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 6px; }
.gal { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 8px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gal:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.gal .thumb { background: #fff; border-radius: 6px; min-height: 70px; display: grid; place-items: center; overflow: hidden; }
.gal .thumb canvas { display: block; max-width: 100%; height: auto; max-height: 150px; width: auto; }
.gal b { font-size: 12.5px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.icon-grid button { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 4px; cursor: pointer; color: var(--ink); font: inherit; font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.icon-grid button:hover { border-color: var(--accent); }
.icon-grid svg { width: 30px; height: 30px; fill: currentColor; }
.zoombar { display: inline-flex; align-items: center; gap: 4px; }
.zoombar select { width: auto; padding: 6px 8px; font-size: 13px; }
.row-actions.start { margin: 0 0 12px; }
