/* RaggruppaScontrini — stile */

:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f9f8f5;
  --surface-3: #efece6;
  --border: #e2ded6;
  --border-strong: #cfc9bf;
  --text: #1c1a17;
  --muted: #6c665d;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #e3f2ef;
  --on-accent: #ffffff;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #9a4a07;
  --warn-soft: #fdf1e1;
  --ok: #067647;
  --sheet-bg: #e7e3dc;
  --shadow: 0 1px 2px rgb(40 30 10 / 6%), 0 4px 14px rgb(40 30 10 / 7%);
  --shadow-lg: 0 10px 40px rgb(20 15 5 / 22%);
  --radius: 10px;
  --radius-sm: 7px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --appbar-h: 60px;
  --tabbar-h: 0px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311;
    --surface: #1d1c19;
    --surface-2: #232220;
    --surface-3: #2b2a27;
    --border: #36342f;
    --border-strong: #4a4740;
    --text: #edeae4;
    --muted: #a19b91;
    --accent: #2cc5b2;
    --accent-hover: #5fd8c8;
    --accent-soft: #12332f;
    --on-accent: #06201d;
    --danger: #f97066;
    --danger-soft: #3a1a17;
    --warn: #f5b454;
    --warn-soft: #34260f;
    --ok: #47cd89;
    --sheet-bg: #0e0d0c;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 14px rgb(0 0 0 / 30%);
    --shadow-lg: 0 10px 40px rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141311; --surface: #1d1c19; --surface-2: #232220; --surface-3: #2b2a27;
  --border: #36342f; --border-strong: #4a4740; --text: #edeae4; --muted: #a19b91;
  --accent: #2cc5b2; --accent-hover: #5fd8c8; --accent-soft: #12332f; --on-accent: #06201d;
  --danger: #f97066; --danger-soft: #3a1a17; --warn: #f5b454; --warn-soft: #34260f; --ok: #47cd89;
  --sheet-bg: #0e0d0c; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
code { font-size: .9em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-weight: 550; font-size: 14px; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .seg label:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--danger); }
.btn-danger:not(.btn-ghost) { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-icon { padding: 0; width: 38px; }
.btn-sm.btn-icon { width: 32px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* ---------------------------------------------------------------- barra superiore */
.appbar {
  height: var(--appbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand h1 { font-size: 17px; letter-spacing: -.01em; }
.brand-sub { margin: 1px 0 0; font-size: 12px; color: var(--muted); }
.appbar-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------------------------------------------------------------- layout */
.layout {
  height: calc(100dvh - var(--appbar-h) - var(--tabbar-h));
  display: grid;
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr) minmax(300px, 340px);
  gap: 1px;
  background: var(--border);
}
.panel { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.panel-docs, .panel-rules { background: var(--surface); }
.panel-head {
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 8px 12px 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.panel-head h2 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.panel-tools { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; }
.panel-scroll { flex: 1; overflow: auto; min-height: 0; overscroll-behavior: contain; }

.tabbar { display: none; }

/* ---------------------------------------------------------------- avviso conservazione dati */
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--border); font-size: 13px;
}
.notice p { margin: 0; flex: 1; }
.notice .btn { flex: none; }

/* ---------------------------------------------------------------- coda */
.queue { padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.queue-bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 20%, transparent); overflow: hidden; }
.queue-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.queue p { margin: 6px 0 0; font-size: 12.5px; color: var(--accent-hover); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .queue p { color: var(--accent); } }

/* ---------------------------------------------------------------- stato vuoto */
.empty { padding: 36px 24px; text-align: center; }
.empty h3 { font-size: 18px; margin: 18px 0 6px; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 34ch; }
.empty .hint { font-size: 12.5px; margin-top: 14px; }
.empty-actions { display: flex; flex-direction: column; gap: 8px; margin: 20px auto 0; max-width: 290px; }
.empty-art { position: relative; width: 132px; height: 110px; margin: 0 auto; }
.empty-art span {
  position: absolute; bottom: 0; width: 44px; border-radius: 3px 3px 0 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  background-image: repeating-linear-gradient(to bottom, transparent 0 9px, var(--border) 9px 10.5px);
  background-size: 70% 100%; background-repeat: no-repeat; background-position: center 10px;
}
.empty-art span:nth-child(1) { left: 6px; height: 78px; transform: rotate(-8deg); }
.empty-art span:nth-child(2) { left: 44px; height: 104px; z-index: 1; box-shadow: var(--shadow); }
.empty-art span:nth-child(3) { left: 82px; height: 64px; transform: rotate(7deg); }

/* ---------------------------------------------------------------- schede documento */
.doc-grid {
  list-style: none; margin: 0; padding: 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.doc {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); overflow: hidden;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.doc:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.doc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc.excluded .doc-thumb img { opacity: .35; filter: grayscale(1); }
.doc.dragging { opacity: .4; }
.doc.drop-before { box-shadow: -3px 0 0 var(--accent); }
.doc.highlight { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.doc-thumb {
  position: relative; aspect-ratio: 3 / 4; display: grid; place-items: center;
  background: var(--surface-3); overflow: hidden;
}
.doc-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.doc-num {
  position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700;
  background: rgb(20 20 20 / 72%); color: #fff; border-radius: 5px; padding: 1px 6px;
}
.doc-toggle {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgb(255 255 255 / 88%); color: #333; box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
}
.doc-toggle .ic { width: 16px; height: 16px; }
.doc-status {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center;
  background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: 12px; color: var(--muted); padding: 8px;
}
.doc-status.error { color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 88%, transparent); }
.spinner {
  width: 26px; height: 26px; margin: 0 auto; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.doc-info { padding: 8px 9px 9px; display: grid; gap: 2px; min-width: 0; }
.doc-line { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.doc-date { font-weight: 650; }
.doc-total { font-weight: 650; font-variant-numeric: tabular-nums; }
.doc-merchant { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.tag-type { background: var(--accent-soft); color: var(--accent-hover); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-type { color: var(--accent); } }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.missing { color: var(--warn); font-weight: 500; }

.drop-overlay {
  position: absolute; inset: 8px; z-index: 5; display: grid; place-items: center;
  border: 2px dashed var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 92%, transparent);
  font-weight: 650; color: var(--accent-hover); pointer-events: none;
}

/* ---------------------------------------------------------------- fogli */
.panel-sheets { background: var(--sheet-bg); }
.sheets-scroll { padding: 20px; }
.sheets { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; align-items: flex-start; }
.sheet-wrap { display: grid; gap: 6px; justify-items: center; }
.sheet {
  display: block; background: #fff; border-radius: 2px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 18%), 0 6px 22px rgb(0 0 0 / 12%);
  cursor: pointer;
}
.sheets[data-zoom="s"] .sheet { width: 170px; }
.sheets[data-zoom="m"] .sheet { width: 300px; }
.sheets[data-zoom="l"] .sheet { width: min(620px, 100%); }
.sheet-cap { font-size: 12px; color: var(--muted); }
.sheets-empty { text-align: center; color: var(--muted); margin: 60px auto; max-width: 30ch; }
.warnings {
  display: grid; gap: 4px; padding: 8px 16px; font-size: 12.5px;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--border);
}
.warnings p { margin: 0; display: flex; gap: 6px; align-items: center; }
.warnings .ic { width: 15px; height: 15px; }

.export-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border);
}
.export-format select { min-height: 38px; }
.export-status { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--muted); min-height: 1em; }
.export-status:empty { display: none; }

/* ---------------------------------------------------------------- controlli */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button, .seg label span {
  display: block; border: 0; background: var(--surface); padding: 5px 11px; font-size: 13px; cursor: pointer; font-weight: 550;
}
.seg button + button, .seg label + label span { border-left: 1px solid var(--border-strong); }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg-full { display: flex; }
.seg-full label { flex: 1; text-align: center; }

select, input[type="text"], input[type="number"], input[type="date"], input[type="tel"], textarea {
  width: 100%; min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 14px;
}
textarea { resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; line-height: 1.5; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

.rules { padding: 4px 16px 24px; }
fieldset { border: 0; padding: 14px 0 16px; margin: 0; border-bottom: 1px solid var(--border); display: grid; gap: 12px; }
fieldset:last-child { border-bottom: 0; }
legend { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 2px; float: left; width: 100%; }
fieldset > legend + * { clear: both; }
.field { display: grid; gap: 5px; font-size: 13px; font-weight: 550; }
.field output { font-weight: 700; color: var(--accent); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; }
.help { font-size: 12px; font-weight: 400; color: var(--muted); margin: 0; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 550;
  border: 1px solid var(--border-strong); background: var(--surface);
}
.chips input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-cards { display: grid; gap: 8px; }
.radio-cards label { cursor: pointer; }
.radio-cards input { position: absolute; opacity: 0; pointer-events: none; }
.radio-cards span {
  display: grid; gap: 2px; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
}
.radio-cards b { font-size: 13.5px; }
.radio-cards small { font-size: 12px; color: var(--muted); font-weight: 400; }
.radio-cards input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.radio-cards input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- dialoghi */
.dlg {
  border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
}
.dlg::backdrop { background: rgb(15 12 8 / 55%); backdrop-filter: blur(2px); }
.dlg-wide { width: min(1100px, calc(100vw - 24px)); }
.dlg-frame { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.dlg-head, .dlg-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; }
.dlg-head { border-bottom: 1px solid var(--border); }
.dlg-head h2 { font-size: 16px; }
.dlg-head .btn { margin-left: auto; }
.dlg-foot { border-top: 1px solid var(--border); padding: 10px 14px; }
.dlg-body { overflow: auto; padding: 4px 18px 12px; }
.settings fieldset:first-child { padding-top: 10px; }

.editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 18px; padding-top: 14px; }
.crop { display: grid; gap: 8px; align-content: start; min-width: 0; }
.crop-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crop-stage {
  position: relative; display: grid; place-items: center; min-height: 240px;
  background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface-2) 0 50%) 0 0 / 16px 16px;
  border-radius: var(--radius-sm); overflow: hidden; touch-action: none;
}
#crop-canvas { display: block; max-width: 100%; cursor: crosshair; }
.loupe {
  position: absolute; top: 8px; left: 8px; width: 140px; height: 140px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 2px 12px rgb(0 0 0 / 45%); pointer-events: none;
}
.crop .hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.ed-side { display: grid; gap: 12px; align-content: start; }
.ed-result {
  display: grid; place-items: center; height: 220px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-3); border: 1px solid var(--border);
}
.ed-result img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s; }
.ocr-text summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.ocr-text pre {
  max-height: 180px; overflow: auto; white-space: pre-wrap; font-size: 11.5px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; margin: 8px 0 0;
}

/* ---------------------------------------------------------------- fotocamera */
.dlg-camera {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; background: #000;
}
.cam { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
#cam-video, #cam-overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#cam-overlay { pointer-events: none; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.cam-flash.on { opacity: .85; transition: none; }
.cam-top, .cam-bottom { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.cam-top { top: 0; justify-content: space-between; background: linear-gradient(rgb(0 0 0 / 55%), transparent); }
.cam-bottom { bottom: 26px; justify-content: space-between; padding: 14px 28px; }
.cam-hint { color: #fff; font-size: 14px; text-shadow: 0 1px 3px #000; }
.cam-btn { background: rgb(255 255 255 / 16%); color: #fff; border-color: rgb(255 255 255 / 30%); backdrop-filter: blur(6px); }
.cam-btn:hover { background: rgb(255 255 255 / 28%); }
.cam-done { min-width: 88px; }
.cam-shutter {
  width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: rgb(255 255 255 / 25%);
  cursor: pointer; transition: transform .1s, background .1s;
}
.cam-shutter:active { transform: scale(.92); background: #fff; }
.cam-alt { position: absolute; bottom: 4px; left: 0; right: 0; margin: 0; text-align: center; font-size: 12px; color: rgb(255 255 255 / 70%); }
.cam-alt .link { color: #fff; }

/* ---------------------------------------------------------------- toast */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(18px + var(--tabbar-h)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius);
  background: #1f1d1a; color: #f4f1eb; box-shadow: var(--shadow-lg); font-size: 14px;
  animation: toast-in .2s ease-out;
}
.toast.error { background: #7a1d14; }
.toast.ok { background: #0b4f49; }
.toast a { color: #9ff0e4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  :root { --tabbar-h: 62px; }
  .layout { grid-template-columns: 1fr; }
  .layout > .panel { display: none; }
  .layout[data-tab="docs"] > .panel-docs,
  .layout[data-tab="rules"] > .panel-rules,
  .layout[data-tab="sheets"] > .panel-sheets { display: flex; }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .tabbar button {
    display: grid; place-items: center; gap: 2px; align-content: center;
    border: 0; background: none; color: var(--muted); font-size: 11.5px; font-weight: 600; cursor: pointer;
  }
  .tabbar button[aria-current="page"] { color: var(--accent); }
  .tabbar .ic { width: 22px; height: 22px; }
  .rules { max-width: 640px; margin: 0 auto; width: 100%; }
}
@media (max-width: 720px) {
  :root { --appbar-h: 56px; }
  .brand-sub { display: none; }
  .brand h1 { font-size: 16px; }
  .appbar { gap: 8px; padding: 0 12px; }
  .appbar-actions .btn span { display: none; }
  .appbar-actions .btn { padding: 0; width: 40px; }
  .doc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 10px; gap: 8px; }
  .sheets-scroll { padding: 14px; }
  .sheets[data-zoom="m"] .sheet { width: min(300px, 100%); }
  .export-bar .btn span { display: none; }
  .export-bar .btn { padding: 0 11px; }
  .export-bar #btn-download span { display: inline; }
  .editor { grid-template-columns: 1fr; }
  .dlg { width: 100vw; max-height: 100dvh; border-radius: 0; }
  .dlg-frame { max-height: 100dvh; height: 100dvh; }
  .field-pair { grid-template-columns: 1fr 1fr; }
  .panel-tools .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
