@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Pellicola */
  --film: #121212;
  --film-deep: #070707;
  --frame: #262523;
  --frame-hi: #312f2c;
  --seam: #3b3935;
  --text: #ebe6da;
  --text-2: #a8a296;
  --text-3: #7d786e;
  /* Stampa */
  --print: #ebe6da;
  --print-2: #dfd9cb;
  --print-line: #cbc4b4;
  --ink: #161513;
  --ink-2: #5a554c;
  /* Segni */
  --edge: #e8732a;        /* numeri di bordo */
  --edge-ink: #94470f;    /* numeri di bordo stampati sulla carta */
  --grease: #d7262e;      /* matita grassa: selezione e azione */
  --grease-press: #b51d25;
  --paid: #8cc084;

  --r-frame: 4px;
  --r-print: 8px;
  --r-btn: 12px;
  --pad: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: calc(56px + var(--safe-b));
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--film); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--film);
  color: var(--text);
  font: 400 17px/1.4 "Archivo", system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
::selection { background: var(--grease); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--edge); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 14px) 0 calc(var(--tabbar-h) + 24px);
}
.app.has-dock { padding-bottom: calc(var(--tabbar-h) + 172px); }

/* --------------------------------------------------------------- testata */
.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px var(--pad) 14px;
}
.head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: -0.015em;
}
.head .meta { color: var(--edge); }
.head .back {
  display: inline-flex; align-items: center; gap: 2px;
  margin: 0 0 0 -8px; padding: 8px; border: 0; background: none;
  color: var(--text-2); font-size: 16px; text-decoration: none;
}
.head .back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Numeri di bordo: maiuscoletto spaziato, il carattere della pellicola */
.edge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--edge);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- striscia di pellicola */
.strip {
  position: relative;
  background: var(--film-deep);
  margin-bottom: 16px;
}
.strip-track {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
/* La pellicola vera e propria: fori sopra e sotto, scorre insieme ai giorni */
.strip-reel {
  display: flex;
  gap: 8px;
  width: max-content;
  padding: 22px var(--pad);
  background:
    radial-gradient(circle at 50% 50%, #2a2927 2.6px, transparent 3px) 0 5px / 14px 7px repeat-x,
    radial-gradient(circle at 50% 50%, #2a2927 2.6px, transparent 3px) 0 calc(100% - 5px) / 14px 7px repeat-x;
}
.strip-track::-webkit-scrollbar { display: none; }

.fr {
  position: relative;
  flex: 0 0 auto;
  width: 104px;
  min-height: 84px;
  padding: 9px 10px 8px;
  border: 0;
  border-radius: var(--r-frame);
  background: var(--frame);
  color: var(--text);
  text-align: left;
  scroll-snap-align: end;
  display: flex; flex-direction: column; gap: 3px;
  transition: background-color .2s var(--ease-out);
}
.fr:active { background: var(--frame-hi); }
.fr .d { font-size: 12px; color: var(--text-2); font-weight: 600; }
.fr .d b { color: var(--text); font-weight: 700; }
.fr .who { font-size: 14px; font-weight: 650; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fr .who.none { color: var(--text-2); font-weight: 500; }
.fr .amt { margin-top: auto; font-size: 12px; color: var(--edge); font-weight: 700; letter-spacing: .04em; }
.fr .d i { font-style: normal; color: var(--edge); font-weight: 700; }
.fr.today .d b::after { content: " · oggi"; color: var(--edge); font-weight: 700; }
.datepick { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 0 8px 8px; cursor: pointer; }
.datepick svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.datepick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.datepick input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.strip-nav { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--seam); background: var(--film); color: var(--text); place-items: center; z-index: 2; }
.strip-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.strip-nav.prev { left: 4px; }
.strip-nav.next { right: 4px; }
.strip-nav.next svg { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) { .strip-nav { display: grid; } .strip-nav:hover { border-color: var(--text-2); } }
.fr.pick { width: 64px; align-items: center; justify-content: center; background: transparent; border: 1px dashed var(--seam); color: var(--text-2); font-size: 13px; text-align: center; }
.fr.pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.fr.pick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Il cerchio a matita grassa */
.grease {
  position: absolute;
  inset: -9px -10px -9px -9px;
  width: calc(100% + 19px);
  height: calc(100% + 18px);
  pointer-events: none;
  overflow: visible;
}
.grease path {
  fill: none;
  stroke: var(--grease);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: 0;
}
.grease.draw path { animation: grease .52s var(--ease-out) both; }
@keyframes grease { from { stroke-dashoffset: var(--len, 400); } }

/* --------------------------------------------------------------- clienti (scelta) */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 0 var(--pad) 14px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--seam);
  background: transparent;
  color: var(--text);
  font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background-color .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out);
}
.chip[aria-pressed="true"] { background: var(--print); color: var(--ink); border-color: var(--print); }
.chip.ghost { color: var(--text-2); border-style: dashed; text-decoration: none; }
.chip.small { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* --------------------------------------------------------------- la stampa */
.print {
  margin: 0 12px;
  background: var(--print);
  color: var(--ink);
  border-radius: var(--r-print);
  padding: 4px 16px 6px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
}
.print .cap {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--print-line);
  color: var(--edge-ink);
}
.print .cap a { color: var(--edge-ink); text-underline-offset: 3px; }
.print .cap span:first-child { flex: 0 0 auto; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.print .cap span:last-child { min-width: 0; text-align: right; text-wrap: balance; line-height: 1.5; }
.field {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  column-gap: 10px;
  min-height: 60px;
  padding: 8px 0;
  border-bottom: 1px solid var(--print-line);
}
.field:last-child { border-bottom: 0; }
.field > .lab { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.field.stack { grid-template-columns: 1fr; row-gap: 8px; padding-top: 12px; }
.field.stack > .lab { font-size: 15px; }

.print input[type="text"], .print input[type="number"], .print textarea {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 18px; font-weight: 600;
  padding: 8px 0;
  caret-color: var(--grease);
}
.print input::placeholder, .print textarea::placeholder { color: #6b665c; font-weight: 500; }
.print textarea { resize: none; min-height: 40px; font-weight: 500; font-size: 17px; line-height: 1.35; field-sizing: content; max-height: 160px; }
.print :focus-visible { outline-color: var(--edge-ink); }

.suggest { display: flex; gap: 6px; flex-wrap: wrap; }
.suggest button {
  border: 1px solid var(--print-line); background: var(--print-2); color: var(--ink);
  border-radius: 999px; padding: 6px 11px; font-size: 14px; font-weight: 600; min-height: 34px;
}

/* Riprese: dalle → alle = ore */
.times { display: flex; align-items: center; gap: 6px; }
.time {
  position: relative;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--print-2);
  border-radius: 8px;
  padding: 5px 10px 6px;
}
.time small { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.time input {
  -webkit-appearance: none; appearance: none;
  border: 0; background: transparent; color: var(--ink);
  font-size: 22px; font-weight: 700; padding: 0; margin: 0;
  min-height: 30px; width: 100%; text-align: left;
}
.time input::-webkit-date-and-time-value { text-align: left; }
.time input::-webkit-calendar-picker-indicator { display: none; }
.time.unset input { color: transparent; }
.time.unset::after { content: "--:--"; position: absolute; left: 10px; bottom: 6px; font-size: 22px; font-weight: 700; color: #6b665c; pointer-events: none; line-height: 30px; }
.times .arrow { color: var(--ink-2); flex: 0 0 auto; }
.times .arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dur { flex: 0 0 62px; text-align: right; font-size: 20px; font-weight: 760; }
.dur.zero { color: #6b665c; font-weight: 600; }

/* Più orari nello stesso giorno (es. pausa pranzo) */
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot-del {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--print-line); background: var(--print-2); color: var(--ink-2);
  display: grid; place-items: center; padding: 0;
}
.slot-del:active { background: var(--print-line); }
.slot-del svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.slots-total { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 0 0; border-top: 1px dashed var(--print-line); }
.slots-total .edge { color: var(--ink-2); }
.slots-total .dur { flex: 0 0 auto; padding-top: 6px; }
.slot-add {
  justify-self: start; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px dashed var(--print-line); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 6px 12px 6px 9px; min-height: 36px; font-size: 14px; font-weight: 600;
}
.slot-add:active { background: var(--print-2); }
.slot-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Contatore */
.stepper { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--print-line); background: var(--print-2); color: var(--ink);
  display: grid; place-items: center;
}
.stepper button:active { background: var(--print-line); }
.stepper button:disabled { opacity: .4; }
.stepper button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.stepper input { width: 78px !important; text-align: center; font-size: 22px !important; font-weight: 760 !important; padding: 6px 0 !important; }
.row-split { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--print-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); min-height: 40px; font-size: 15px; font-weight: 600; padding: 0 8px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--print); }

.euro { display: flex; align-items: baseline; gap: 4px; }
.euro input { font-size: 22px !important; font-weight: 760 !important; }
.euro span { font-size: 20px; font-weight: 700; color: var(--ink-2); }

/* --------------------------------------------------------------- totale fisso */
.dock {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--tabbar-h);
  z-index: 20;
  background: linear-gradient(to bottom, rgba(18, 18, 18, 0), var(--film) 18px);
  padding: 22px 0 10px;
}
.dock-in { max-width: 560px; margin: 0 auto; padding: 0 var(--pad); }
.total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 52px; }
.total .sum { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.total .sum.muted { color: var(--text-3); }
.total .sum.pending { color: var(--edge); font-size: 30px; padding-bottom: 4px; }
.rowlink .money b.pending { color: var(--edge); font-size: 15px; }
.demo { margin: -8px var(--pad) 10px; font-size: 11px; }
.summary .plus { display: block; font-size: 12px; font-weight: 600; color: var(--edge); margin-top: 2px; }
.total .sum { flex: 0 0 auto; }
.total .how { flex: 1 1 auto; min-width: 0; text-wrap: balance; text-align: right; font-size: 13px; line-height: 1.4; color: var(--text-2); }
.total .how .warn { color: var(--edge); font-weight: 600; }
.total .how a { color: var(--edge); text-underline-offset: 3px; }
.actions { display: flex; gap: 10px; }
.btn {
  flex: 1;
  min-height: 54px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--grease);
  color: #fff;
  font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .15s var(--ease-out), opacity .15s;
  text-decoration: none;
}
.btn:active { background: var(--grease-press); }
.btn:disabled { opacity: .38; }
.btn.quiet { background: var(--frame); color: var(--text); }
.btn.quiet:active { background: var(--frame-hi); }
.btn.danger { flex: 0 0 auto; padding: 0 18px; background: transparent; border: 1px solid var(--seam); color: var(--text-2); }
.btn.busy { opacity: .6; pointer-events: none; }

/* --------------------------------------------------------------- tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: var(--tabbar-h);
  padding-bottom: var(--safe-b);
  display: flex; justify-content: center;
  background: var(--film-deep);
  border-top: 1px solid #1f1e1c;
}
.tabbar a {
  flex: 0 1 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); text-decoration: none; font-size: 11px; font-weight: 650; letter-spacing: .04em;
}
.tabbar a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg { stroke: var(--edge); }

/* --------------------------------------------------------------- liste */
.filters { padding-bottom: 6px; }
.summary {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 4px var(--pad) 20px;
  border-top: 1px solid var(--seam);
  border-bottom: 1px solid var(--seam);
}
.summary div { padding: 12px 0; }
.summary div + div { padding-left: 12px; border-left: 1px solid var(--seam); }
.summary b { display: block; font-size: 20px; font-weight: 760; margin-top: 2px; }
.summary .edge { font-size: 11px; color: var(--text-2); }
.summary .open b { color: var(--edge); }

.group { margin: 0 0 18px; }
.group > h2 {
  margin: 0; padding: 0 var(--pad) 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--edge);
  display: flex; justify-content: space-between;
}
.group > h2 span:last-child { color: var(--text-2); }
.rows { list-style: none; margin: 0; padding: 0; }
.rowlink {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px var(--pad);
  color: inherit; text-decoration: none;
  border-top: 1px solid #222120;
}
.rows li:first-child .rowlink { border-top: 0; }
.rowlink:active { background: var(--frame); }
.rowlink .day { text-align: center; line-height: 1.05; background: var(--frame); border-radius: var(--r-frame); padding: 6px 0 5px; }
.rowlink .day b { display: block; font-size: 19px; font-weight: 760; }
.rowlink .day span { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.rowlink .what { min-width: 0; }
.rowlink .what b { display: block; font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowlink .what span { display: block; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowlink .money { text-align: right; }
.rowlink .money b { display: block; font-size: 17px; font-weight: 700; }
.status { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.status.open { color: var(--edge); }
.status.invoiced { color: var(--text-2); }
.status.paid { color: var(--paid); }

.empty {
  margin: 8px var(--pad);
  padding: 28px 20px;
  border: 1px dashed var(--seam);
  border-radius: var(--r-print);
  text-align: center;
  color: var(--text-2);
}
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; max-width: 240px; margin-left: auto; margin-right: auto; display: flex; }

/* Clienti */
.client-row { grid-template-columns: 1fr auto; }
.client-row .what b { font-size: 18px; }
.client-row .rates { font-size: 14px; color: var(--text-2); }
.client-row .what .warn { display: block; font-size: 14px; color: var(--edge); font-weight: 600; }

/* Modelli di tariffa: righe della stampa, la scelta cerchiata a matita */
.models { display: grid; padding: 0 0 4px; }
.model {
  display: grid; gap: 2px; justify-items: start;
  padding: 12px 0; border: 0; border-top: 1px solid var(--print-line); background: transparent; color: var(--ink); text-align: left;
}
.model:first-child { border-top: 0; }
.model .mark { position: relative; display: inline-block; padding: 2px 6px; margin-left: -6px; }
.model .mark b { font-size: 16px; font-weight: 650; }
.model .mark .grease { inset: -6px -8px; width: calc(100% + 16px); height: calc(100% + 12px); visibility: hidden; }
.model[aria-checked="true"] .mark .grease { visibility: visible; }
.model[aria-checked="true"] .mark b { font-weight: 760; }
.model > span:last-child { font-size: 14px; color: var(--ink-2); }
.rate-missing { color: var(--edge-ink); font-size: 14px; font-weight: 600; border-bottom: 0 !important; }

.form-actions { padding: 20px var(--pad) 0; display: flex; gap: 10px; }
.form-error { margin: 12px var(--pad) 0; color: #ff8a80; font-size: 15px; }
.print .form-error { margin: 8px 0; color: #a3161d; }
.readonly-note { margin: 10px 12px 0; padding: 12px 14px; border-radius: var(--r-print); background: var(--frame); color: var(--text-2); font-size: 15px; }

/* --------------------------------------------------------------- accesso */
.login { min-height: 80dvh; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--pad); }
.login h1 { font-size: 34px; margin: 0 0 6px; font-weight: 780; letter-spacing: -0.02em; }
.login p { color: var(--text-2); margin: 0 0 22px; }
.login input {
  width: 100%; min-height: 54px; border-radius: var(--r-btn); border: 1px solid var(--seam);
  background: var(--frame); color: var(--text); padding: 0 16px; font-size: 18px; margin-bottom: 12px;
  caret-color: var(--grease);
}
.login .btn { width: 100%; }

/* --------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; z-index: 40;
  bottom: calc(var(--tabbar-h) + 150px);
  transform: translateX(-50%);
  width: min(92vw, 420px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px;
  background: var(--print); color: var(--ink);
  border-radius: var(--r-btn);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .8);
  font-size: 15px; font-weight: 600;
  animation: toast .35s var(--ease-out) both;
}
.toast.noDock { bottom: calc(var(--tabbar-h) + 16px); }
.toast button { border: 0; background: var(--ink); color: var(--print); border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 700; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (hover: hover) {
  .fr:hover { background: var(--frame-hi); }
  .chip:hover { border-color: var(--text-2); }
  .chip[aria-pressed="true"]:hover { border-color: var(--print); }
  .btn:hover { background: var(--grease-press); }
  .btn.quiet:hover { background: var(--frame-hi); }
  .btn.danger:hover { background: transparent; border-color: var(--text-2); color: var(--text); }
  .rowlink:hover { background: #1a1918; }
  .tabbar a:hover { color: var(--text); }
  .stepper button:hover, .suggest button:hover { background: var(--print-line); }
  .seg button:not([aria-pressed="true"]):hover { color: var(--ink); }
  .model:hover .mark b { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--print-line); }
  .head .back:hover { color: var(--text); }
}

@media (prefers-reduced-motion: reduce) {
  .grease.draw path, .toast { animation: none; }
  * { transition: none !important; }
}

/* Da PC: stessa colonna, più aria */
@media (min-width: 700px) {
  .app { padding-top: 40px; }
  .print { margin: 0 var(--pad); }
  .tabbar { top: 0; bottom: auto; height: 56px; padding: 0; border-top: 0; border-bottom: 1px solid #1f1e1c; }
  .tabbar a { flex-direction: row; gap: 8px; font-size: 14px; }
  .app { padding-top: 76px; padding-bottom: 40px; }
  .app.has-dock { padding-bottom: 190px; }
  .dock { bottom: 0; padding-bottom: 20px; }
  .toast { bottom: 170px; }
  .toast.noDock { bottom: 24px; }
}

/* Pulsante "Accedi con Google" (è un link) */
a.btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 650; }
