/* Layout: barra in alto, contenuto centrato max 1200px; schede e tabelle su pannelli chiari */
:root {
  --bg: #edf1f7;
  --surface: #ffffff;
  --ink: #121a2b;
  --muted: #586579;
  --line: #d6deea;
  --accent: #1565e0;       /* verde petrolio */
  --accent-ink: #ffffff;
  --accent-soft: #e1ebfc;
  --hot: #d9541e;          /* arancio "filamento" per ciò che richiede attenzione */
  --danger: #b3261e;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1220; --surface: #141c2e; --ink: #e6ebf5; --muted: #97a3bb; --line: #26324a;
    --accent: #5aa2ff; --accent-ink: #06142e; --accent-soft: #1a2c4d; --hot: #f07a45; --danger: #ef6b62;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-body); }
body.no-scroll { overflow: hidden; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 .4em; }
h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono, .sku { font-family: var(--font-mono); font-size: .82rem; }
.sku { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.warn { color: var(--hot); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* barra */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px max(16px, calc((100% - 1200px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; color: var(--muted); font-size: .75rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background:
  repeating-linear-gradient(0deg, var(--accent) 0 3px, transparent 3px 6px), var(--accent-soft); border: 2px solid var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
.nav a:hover { background: var(--bg); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--hot); color: #fff; font-size: .75rem; text-align: center; font-weight: 600; }
.userbox { display: flex; gap: 10px; align-items: center; }
.who { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.demo-banner { background: var(--hot); color: #fff; text-align: center; padding: 6px 16px; font-size: .85rem; }

.app { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* bottoni e campi */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 600 .95rem var(--font-body); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.wide { width: 100%; margin-top: 12px; }
.danger-text { color: var(--danger) !important; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 6px 0; font: inherit; text-decoration: underline; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 6px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
label { display: block; font-size: .85rem; font-weight: 500; margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { opacity: .7; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: auto; }
.search { width: 300px; max-width: 100%; }
.hint { color: var(--muted); font-size: .85rem; }
.error { color: var(--danger); font-size: .9rem; margin: 8px 0 0; }
.notice { background: var(--accent-soft); color: var(--ink); padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; }

/* chip filtri */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 6px 12px; border-radius: 999px; cursor: pointer; font: 500 .88rem var(--font-body); }
.chip.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip .count { opacity: .65; font-variant-numeric: tabular-nums; }

/* catalogo */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.card.off { opacity: .6; }
.card-top { display: flex; justify-content: space-between; gap: 8px; }
.cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 600; }
.card h3 { margin: 4px 0 0; }
.desc { color: var(--muted); font-size: .88rem; margin: 0; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.price { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock { font-size: .78rem; color: var(--accent); }
.stock.no { color: var(--danger); }
.buy { display: flex; gap: 6px; align-items: center; }
.buy input { width: 62px; padding: 6px 8px; }

/* pannelli e tabelle */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel.flush { padding: 0; overflow: hidden; }
.pad { padding: 18px; margin: 0; }
.scroll-x { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.clickable tbody tr { cursor: pointer; }
.table.clickable tbody tr:hover { background: var(--bg); }
.table tr.is-new td:first-child { box-shadow: inset 4px 0 0 var(--hot); }
.qty { width: 72px; text-align: right; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.side { position: sticky; top: 80px; }
.ship { margin-top: 12px; font-size: .9rem; padding: 10px; background: var(--bg); border-radius: 8px; }
.totals { margin: 8px 0; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-weight: 700; font-size: 1.1rem; }
.totals .grand dt { color: var(--ink); }

/* stati */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.st-new  { background: #fde5d8; color: #9a3412; }
.st-ok   { background: #e1ebfc; color: #0f5a4d; }
.st-work { background: #e3e8fb; color: #2f43a1; }
.st-ship { background: #efe2fa; color: #6b2fa0; }
.st-done { background: #e4ecd9; color: #3d5c19; }
.st-void { background: transparent; color: var(--muted); border-color: var(--line); }
@media (prefers-color-scheme: dark) {
  .st-new  { background: #4a2414; color: #ffb48f; }
  .st-ok   { background: #173a33; color: #7fdcc6; }
  .st-work { background: #1f2952; color: #a9b8ff; }
  .st-ship { background: #34204a; color: #d6b0f5; }
  .st-done { background: #26361a; color: #b9d98f; }
}

/* ordini cliente */
.orders { display: grid; gap: 14px; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.order-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-card h3 { margin: 0; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.order-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.right { text-align: right; }
.steps { display: flex; list-style: none; padding: 0; margin: 0; gap: 0; }
.steps li { flex: 1; position: relative; padding-top: 16px; font-size: .78rem; color: var(--muted); }
.steps li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 4px; background: var(--line); }
.steps li.done::before { background: var(--accent); }
.steps li.cur span { color: var(--ink); font-weight: 600; }
.steps li small { display: block; }

/* riepilogo admin */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.tile span { color: var(--muted); font-size: .85rem; }
.tile strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
a.tile:hover { border-color: var(--accent); }
.tile.alert { border-left: 4px solid var(--hot); }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.two-col.tight { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.toplist { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.toplist li span { margin-right: 8px; }
.toplist li { display: list-item; }
.toplist li strong { float: right; font-variant-numeric: tabular-nums; }

/* accesso */
.auth { display: flex; justify-content: center; padding-top: 32px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 9px; margin-bottom: 8px; }
.tab { flex: 1; border: 0; background: none; padding: 8px; border-radius: 7px; font: 600 .95rem var(--font-body); color: var(--muted); cursor: pointer; }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.demo-box { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.demo-box p { margin: 0 0 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.success { max-width: 560px; margin: 40px auto; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 28px; }

/* finestra */
.modal { position: fixed; inset: 0; background: rgba(10, 16, 14, .5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal[hidden] { display: none; }
.modal-card { background: var(--surface); color: var(--ink); border-radius: 12px; padding: 22px; width: 100%; max-width: 760px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.modal-head > div { flex: 1; }
.box { background: var(--bg); border-radius: 8px; padding: 12px 14px; }
.box p { margin: 0 0 8px; }
.box h3 { margin-bottom: 6px; }
.box label:first-of-type { margin-top: 0; }
.client-note { background: var(--accent-soft); padding: 10px 12px; border-radius: 8px; }
.history { margin: 12px 0; font-size: .88rem; }
.history ul { margin: 6px 0 0; padding-left: 18px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.actions.spread { justify-content: space-between; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 8px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--hot); color: #fff; }

@media (max-width: 860px) {
  .cart-layout, .two-col, .two-col.tight { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .topbar { gap: 8px 10px; }
  .brand small { display: none; }
  .userbox { margin-left: auto; }
  .who { max-width: 120px; }
  .nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .steps li span { font-size: .7rem; }
  h1 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== ritiro in negozio ===== */
.footer { max-width: 1200px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: .85rem; }
.pickup { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: .9rem; margin: 8px 0 4px; }
.linkbox { display: flex; gap: 8px; margin: 8px 0 16px; }
.linkbox input { font-family: var(--font-mono); font-size: .8rem; }
.status-card { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--hot); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.status-card.is-ready { border-left-color: var(--accent); background: var(--accent-soft); }
.status-card h1 { margin: 2px 0 6px; }
.status-card p { margin: 0; }
.status-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 3px dashed var(--hot); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--accent-ink); }
.is-ready .status-icon { border: 0; background: var(--accent); }
.status-card + .panel .totals { margin-top: 12px; }

.admin-orders { display: grid; gap: 10px; }
.aorder { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--hot); border-radius: var(--radius); padding: 14px 16px; }
.aorder.is-ready { border-left-color: var(--accent); }
.aorder-main { cursor: pointer; display: grid; gap: 4px; min-width: 0; }
.aorder-main:hover strong { text-decoration: underline; }
.aorder-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.aorder-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.note { color: var(--hot); }
.ready-toggle { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; cursor: pointer; font-size: .75rem; font-weight: 600; color: var(--muted); user-select: none; }
.ready-toggle input { appearance: none; -webkit-appearance: none; width: 34px; height: 34px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; }
.ready-toggle input::after { content: "✓"; font-size: 1.2rem; font-weight: 700; color: transparent; }
.ready-toggle input:hover { border-color: var(--accent); }
.ready-toggle input:checked { background: var(--accent); border-color: var(--accent); }
.ready-toggle input:checked::after { color: var(--accent-ink); }
.ready-toggle input:checked + span { color: var(--accent); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag.todo { background: #fde5d8; color: #9a3412; border-color: transparent; }
.notify-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.btn.whatsapp { background: #1565e0; border-color: #1565e0; color: #fff; }
@media (max-width: 560px) {
  .aorder { grid-template-columns: auto 1fr; }
  .aorder-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .status-card { flex-direction: column; }
}

/* ===== acconto ===== */
.totals .balance { font-weight: 700; color: var(--accent); }
.totals .balance dt { color: var(--accent); }
.dep-check { margin-top: 14px; }
.dep { font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.dep.ok { background: var(--accent-soft); color: var(--accent); }
.dep.check { background: #fde5d8; color: #9a3412; }
.dep.none { color: var(--muted); font-weight: 400; }
@media (prefers-color-scheme: dark) { .dep.check, .tag.todo { background: #4a2414; color: #ffb48f; } }
.dep-box { margin-top: 12px; }
.dep-box p { margin: 0 0 4px; }
.dep-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.dep-row > div { width: 140px; }
.dep-row label.check { margin: 0 0 10px; }
.dep-row .btn { margin-bottom: 2px; }

/* ===== colori e personalizzazioni ===== */
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c, #bbb); border: 1px solid rgba(0,0,0,.25); vertical-align: -2px; margin-right: 5px; flex: none; padding: 0; }
.sw.big { width: 26px; height: 26px; margin: 0; }
button.sw { width: 20px; height: 20px; cursor: pointer; margin: 0; }
button.sw:hover { transform: scale(1.15); }
.sw-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.sw-row.inline { display: inline-flex; gap: 2px; margin: 0; vertical-align: middle; }
.sw-row.inline .sw { margin: 0; width: 12px; height: 12px; }
.color-pick { display: flex; gap: 8px; align-items: center; }
.opts { display: grid; gap: 8px; margin-top: 6px; }
.opt label { margin: 0 0 4px; }
.opt textarea { resize: vertical; }
.badge-perso { font-size: .7rem; font-weight: 600; color: var(--hot); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; }
.details { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.perso { color: var(--ink); font-style: italic; white-space: pre-line; }
.tbd { color: var(--hot); font-weight: 600; font-size: .85rem; }
.custom-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--ink); color: var(--surface); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.custom-cta h2 { margin: 0 0 2px; }
.custom-cta p { margin: 0; opacity: .8; }
#app .custom-cta .btn { background: var(--hot); border-color: var(--hot); color: #fff; }
.aitems { list-style: none; margin: 0; padding: 0; font-size: .88rem; display: grid; gap: 2px; }
.price-in { width: 110px; text-align: right; padding: 6px 8px; }
.price-in:placeholder-shown { border-color: var(--hot); }
.warn-notice { background: #fde5d8; color: #7c2d12; }
.row.end { justify-content: flex-end; margin: 8px 0; }
.fs { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 14px; margin: 12px 0 0; }
.fs legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
.color-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 12px; margin: 6px 0; }
.color-check { display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; cursor: pointer; }
.color-check input { width: auto; margin-right: 4px; }
@media (prefers-color-scheme: dark) { .warn-notice { background: #4a2414; color: #ffb48f; } .custom-cta { background: #2a3633; color: var(--ink); } }

/* ===== spunta "fatto" per articolo ===== */
.item-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-weight: 400; font-size: inherit; cursor: pointer; }
.item-check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; border: 2px solid var(--line); border-radius: 5px; background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.item-check input::after { content: "✓"; font-size: .8rem; font-weight: 700; color: transparent; }
.item-check input:hover { border-color: var(--accent); }
.item-check input:checked { background: var(--accent); border-color: var(--accent); }
.item-check input:checked::after { color: var(--accent-ink); }
.item-check.big input { width: 26px; height: 26px; }
.item-check.big input::after { font-size: 1rem; }
.aitems li { padding: 3px 0; }
.aitems li.done > label > span, tr.done td:not(:first-child) { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }
tr.done .price-in { text-decoration: none; }
.prog { font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.prog.all { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ===== bicolore ===== */
.bico { display: inline-block; font-size: .7rem; font-weight: 600; text-decoration: none; padding: 0 6px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, var(--accent) 50%, var(--hot) 50%); vertical-align: 1px; }
.bico-check { margin: 0 0 4px; }
.bico-admin { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.bico-admin .field { max-width: 280px; }

/* ===== foto prodotti ===== */
.card.has-img { padding-top: 0; overflow: hidden; }
.card-img { display: block; position: relative; margin: 0 -16px 8px; padding: 0; border: 0; background: var(--bg); cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.card-img:hover img { transform: scale(1.03); }
.img-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.modal-card.wide { max-width: 860px; }
.gallery-main { background: var(--bg); border-radius: 8px; display: grid; place-items: center; overflow: hidden; }
.gallery-main img { max-width: 100%; max-height: 70vh; display: block; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; width: 72px; height: 72px; }
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-cell { display: flex; gap: 10px; align-items: center; }
.mini { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.mini.none { display: grid; place-items: center; border: 1px dashed var(--line); color: var(--muted); font-size: .65rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.photo-item { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); aspect-ratio: 1; }
.photo-item.main { border: 2px solid var(--accent); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tag, .photo-btn { position: absolute; left: 6px; bottom: 6px; font: 600 .7rem var(--font-body); padding: 3px 8px; border-radius: 999px; border: 0; }
.photo-tag { background: var(--accent); color: var(--accent-ink); }
.photo-btn { background: rgba(255,255,255,.92); color: #121a2b; cursor: pointer; }
.photo-del { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.92); color: #121a2b; }
.photo-add { cursor: pointer; margin: 0; display: inline-flex; }
.photo-add[hidden] { display: none; }

/* ===== componi il centrotavola ===== */
.compo-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; text-decoration: none; color: var(--ink); background: linear-gradient(120deg, var(--accent-soft), var(--surface)); border: 2px solid var(--accent); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.compo-cta h2 { margin: 2px 0; font-size: 1.25rem; }
.compo-cta p { margin: 0; color: var(--muted); }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hot); }
.compo-cta:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.builder { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.builder-main { display: grid; gap: 14px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step.disabled { opacity: .55; }
.step h2 { display: flex; align-items: center; gap: 10px; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: .9rem; }
.counter { margin-left: auto; font-size: .85rem; font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.counter.full { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.base-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pick-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; overflow: hidden; font: inherit; }
.pick-card:hover { border-color: var(--accent); }
.pick-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pick-img, .addon-img { display: block; aspect-ratio: 4/3; background: var(--bg); overflow: hidden; border: 0; padding: 0; width: 100%; }
.pick-img img, .addon-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, var(--bg) 0 10px, var(--surface) 10px 20px); }
.pick-body { display: grid; gap: 4px; padding: 12px; }
.pick-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.pick-card .price { font-size: 1.1rem; }
.base-color { margin-top: 12px; max-width: 360px; }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.addon-card { position: relative; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 10px; overflow: hidden; background: var(--surface); }
.addon-card > :not(.addon-img):not(.addon-n) { margin: 0 10px; }
.addon-card.chosen { border-color: var(--accent); }
.addon-img { aspect-ratio: 1; cursor: zoom-in; }
span.addon-img { cursor: default; }
.addon-n { position: absolute; top: 6px; right: 6px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.addon-color { padding: 5px 8px; font-size: .85rem; width: auto; }
.builder-summary .sum-base { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.sum-base img, .sum-base .noimg { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; }
.sum-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 2px; font-size: .9rem; }
.sum-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.inline-label { margin: 0; }
.comp-list { font-size: .85rem; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.comp-chip { display: inline-block; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: .78rem; color: var(--ink); text-decoration: none; }
.comp-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
@media (max-width: 860px) { .builder { grid-template-columns: 1fr; } .builder-summary { position: static; } }

/* ===== notifiche ===== */
.notif-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.steps-list { padding-left: 20px; display: grid; gap: 10px; margin: 12px 0 16px; }
.steps-list .linkbox { margin: 6px 0 0; max-width: 420px; }
code { font-family: var(--font-mono); font-size: .85em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 860px) { .notif-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   PIÙ VIVA: carattere tondo, intestazione animata, coriandoli, neve
   ===================================================================== */
:root { --font-display: "Exo 2", "Rajdhani", "Trebuchet MS", system-ui, sans-serif; --sun: #ffc93c; --pink: #ff6b9a; }
h1, h2, .brand strong, .price, .tile strong, .hero h1 { font-family: var(--font-display); letter-spacing: 0; }
h1 { font-weight: 700; }
h2 { font-weight: 600; }
.price { font-weight: 600; }
body.admin-mode h1, body.admin-mode h2 { font-family: var(--font-body); }

/* logo: strati di stampa che scorrono */
.brand-mark { background: repeating-linear-gradient(0deg, var(--accent) 0 3px, transparent 3px 6px), var(--accent-soft); background-size: 100% 12px; animation: layers 2.4s linear infinite; }
@keyframes layers { to { background-position: 0 -12px; } }

/* intestazione catalogo */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: center; border-radius: 18px; padding: 28px 28px 24px; margin-bottom: 14px; color: #fff;
  background: linear-gradient(120deg, #1565e0, #0d4fb8 40%, #e2561d 100%); background-size: 200% 200%; animation: heroGrad 14s ease-in-out infinite; }
@keyframes heroGrad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero-sm { grid-template-columns: 1fr; padding: 22px 24px; }
.hero-text { position: relative; z-index: 2; }
.hero-kicker { display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; backdrop-filter: blur(4px); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.1; margin: 12px 0 8px; color: #fff; }
.hero-sm h1 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-top: 10px; }
.hero .hl { color: var(--sun); position: relative; white-space: nowrap; }
.hero .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: .18em; background: var(--sun); opacity: .35; border-radius: 4px; transform-origin: left; animation: underline 1s .4s ease-out both; }
@keyframes underline { from { transform: scaleX(0); } }
.hero p { margin: 0; max-width: 52ch; opacity: .95; font-size: 1.02rem; }
.perks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.perks span { background: rgba(255,255,255,.95); color: #121a2b; font-weight: 600; font-size: .85rem; padding: 6px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.12); animation: popIn .5s cubic-bezier(.3,1.6,.5,1) both; }
.perks span:nth-child(2) { animation-delay: .1s; } .perks span:nth-child(3) { animation-delay: .2s; } .perks span:nth-child(4) { animation-delay: .3s; }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
.hero-art { position: relative; height: 210px; z-index: 1; }
.float { position: absolute; font-size: 2.6rem; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); animation: bob 4s ease-in-out infinite; }
.f0 { left: 10%; top: 8%; font-size: 3.4rem; } .f1 { left: 58%; top: 2%; animation-delay: .6s; } .f2 { left: 78%; top: 44%; animation-delay: 1.2s; font-size: 3rem; }
.f3 { left: 30%; top: 58%; animation-delay: 1.8s; } .f4 { left: 4%; top: 64%; animation-delay: 2.4s; font-size: 2rem; } .f5 { left: 50%; top: 40%; animation-delay: 3s; font-size: 2.2rem; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }
.cube { position: absolute; right: 8%; bottom: 6%; width: 54px; height: 54px; border-radius: 10px; background: repeating-linear-gradient(0deg, rgba(255,255,255,.9) 0 4px, rgba(255,255,255,.55) 4px 8px); transform: rotate(12deg); animation: grow 3.5s ease-in-out infinite; transform-origin: bottom; box-shadow: 0 8px 18px rgba(0,0,0,.2); }
@keyframes grow { 0% { clip-path: inset(100% 0 0 0); } 60%, 85% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
.snow { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.snow span { position: absolute; top: -20px; color: rgba(255,255,255,.85); animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(260px) translateX(20px) rotate(180deg); } }

.search-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 16px; margin-bottom: 14px; transition: border-color .2s, box-shadow .2s; }
.search-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-row .search { border: 0; box-shadow: none !important; width: 100%; background: transparent; }

/* banner sezioni */
.compo-cta { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; }
.compo-emoji { display: flex; gap: 2px; font-size: 1.9rem; }
.compo-emoji span { display: inline-block; animation: bob 2.6s ease-in-out infinite; }
.compo-cta .btn { transition: transform .2s; }
.compo-cta:hover .btn { transform: translateX(4px); }
.custom-cta { background: linear-gradient(110deg, #121a2b, #2c3a37); }

/* chip categorie */
.cats { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: thin; }
.cats .chip { white-space: nowrap; font-size: .95rem; padding: 8px 14px; transition: transform .15s; }
.cats .chip:hover { transform: translateY(-2px); }
.cats .chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* schede prodotto */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s; border-radius: 14px; }
.card:not(.off):hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(21,101,224,.14); border-color: var(--accent); }
.card.enter { animation: cardIn .5s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--i) * 55ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.card .price { font-size: 1.45rem; color: var(--accent); }
.badge-perso { color: #fff; background: linear-gradient(90deg, var(--hot), var(--pink)); border: 0; }
.badge-col { font-size: .7rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.add-btn { transition: transform .15s, background .2s; }
.add-btn:active { transform: scale(.93); }
.add-btn.added { background: var(--hot); border-color: var(--hot); animation: popIn .35s cubic-bezier(.3,1.6,.5,1); }
.btn { transition: transform .12s, filter .2s; border-radius: 10px; }
.btn:not(:disabled):active { transform: scale(.96); }
.send-btn { font-size: 1.05rem; padding: 12px 16px; background: linear-gradient(90deg, var(--accent), #00a3e0); }
.badge.bump { animation: bump .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }

/* coriandoli */
.confetto { position: fixed; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; z-index: 200; transform: translate(-50%, -50%); animation: conf 1.1s cubic-bezier(.15,.7,.35,1) forwards; }
@keyframes conf { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)); opacity: 0; } }

/* vuoti, successi, stato */
.big-empty { padding: 40px 24px; display: grid; justify-items: center; gap: 4px; }
.big-empty p { margin: 0; }
.big-empty .btn { margin-top: 12px; }
.empty-emoji { font-size: 3.4rem; animation: bob 3s ease-in-out infinite; }
.success { text-align: center; }
.success .row { justify-content: center; }
.success-emoji { font-size: 4rem; animation: popIn .6s cubic-bezier(.3,1.6,.5,1) both, bob 3s 1s ease-in-out infinite; }
.success h1 { font-size: 2rem; }
.status-icon { font-size: 1.7rem; border: 0 !important; background: var(--surface) !important; box-shadow: 0 4px 12px rgba(0,0,0,.1); width: 60px; height: 60px; }
.status-card:not(.is-ready) .status-icon { animation: printing 1.2s ease-in-out infinite; }
@keyframes printing { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
.status-card.is-ready .status-icon { animation: popIn .6s cubic-bezier(.3,1.6,.5,1) both; }
.status-card h1 { font-size: 1.8rem; }
.print-bar { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; margin: 6px 0 10px; max-width: 360px; }
.print-bar span { display: block; height: 100%; width: 60%; border-radius: 999px; background: repeating-linear-gradient(45deg, var(--hot) 0 10px, var(--sun) 10px 20px); background-size: 28px 28px; animation: stripes .8s linear infinite, progress 4s ease-in-out infinite alternate; }
@keyframes stripes { to { background-position: 28px 0; } }
@keyframes progress { from { width: 25%; } to { width: 85%; } }

/* componi */
.step { border-radius: 14px; }
.step-n { background: linear-gradient(135deg, var(--accent), var(--hot)); }
.pick-card, .addon-card { transition: transform .2s, box-shadow .2s, border-color .2s; border-radius: 14px; }
.pick-card:hover, .addon-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.08); }
.addon-n { animation: popIn .35s cubic-bezier(.3,1.6,.5,1); }
.counter.pop { animation: bump .45s cubic-bezier(.3,1.8,.5,1); }
.addon-card.chosen { box-shadow: 0 0 0 3px var(--accent-soft); }

/* telefono */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .hero-art { position: absolute; inset: 0; height: auto; opacity: .35; }
  .compo-cta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero, .brand-mark, .float, .cube, .snow, .compo-emoji span, .empty-emoji, .success-emoji, .print-bar span, .status-icon { animation: none !important; }
  .card.enter { animation: none; }
}
.add-btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.buy input { width: 52px; }
.noimg { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, var(--accent-soft), var(--bg) 70%); }
.noimg > span { font-size: 3rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); transition: transform .3s; }
.addon-card:hover .noimg > span, .pick-card:hover .noimg > span { transform: scale(1.15) rotate(-6deg); }
.sum-base .noimg > span { font-size: 1.6rem; }

/* =====================================================================
   COLORI IN MOVIMENTO (solo pagine dei clienti e rivenditori)
   ===================================================================== */
body:not(.admin-mode) { background: #eef2f8; }
body:not(.admin-mode)::before, body:not(.admin-mode)::after {
  content: ""; position: fixed; z-index: -1; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
body:not(.admin-mode)::before { top: -25vmax; left: -20vmax; background: radial-gradient(circle, #ffd27a, #ff8fb1 45%, transparent 70%); animation: blobA 22s ease-in-out infinite alternate; }
body:not(.admin-mode)::after { bottom: -30vmax; right: -25vmax; background: radial-gradient(circle, #7fe0c8, #8fb4ff 45%, transparent 70%); animation: blobB 26s ease-in-out infinite alternate; }
@keyframes blobA { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(25vw, 15vh) scale(1.15); } 100% { transform: translate(10vw, 40vh) scale(.95); } }
@keyframes blobB { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30vw, -20vh) scale(1.1); } 100% { transform: translate(-10vw, -45vh) scale(.9); } }
@media (prefers-color-scheme: dark) { body:not(.admin-mode) { background: #0b111d; } body:not(.admin-mode)::before, body:not(.admin-mode)::after { opacity: .22; } }
body:not(.admin-mode) .topbar { background: rgba(255,255,255,.82); backdrop-filter: blur(10px); }
@media (prefers-color-scheme: dark) { body:not(.admin-mode) .topbar { background: rgba(27,35,33,.85); } }

/* scritte colorate e animate */
.rainbow, body:not(.admin-mode) .page-head h1, body:not(.admin-mode) .step h2, body:not(.admin-mode) .success h1, body:not(.admin-mode) .status-card h1, body:not(.admin-mode) .compo-cta h2, body:not(.admin-mode) .card h3 {
  background: linear-gradient(90deg, #1565e0, #00a3e0, #e2561d, #ff4f8b, #7b3fe4, #1565e0); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: rainbow 8s linear infinite; }
body:not(.admin-mode) .card h3 { animation-duration: 12s; background-size: 400% 100%; }
body:not(.admin-mode) .step h2 .step-n, body:not(.admin-mode) .step h2 .counter { -webkit-text-fill-color: initial; color: var(--surface); }
body:not(.admin-mode) .step h2 .counter { color: var(--muted); }
body:not(.admin-mode) .step h2 .counter.full { color: var(--accent-ink); }
@keyframes rainbow { to { background-position: 300% 0; } }
@media (prefers-color-scheme: dark) { .rainbow, body:not(.admin-mode) .page-head h1, body:not(.admin-mode) .step h2, body:not(.admin-mode) .success h1, body:not(.admin-mode) .status-card h1, body:not(.admin-mode) .compo-cta h2, body:not(.admin-mode) .card h3 { background-image: linear-gradient(90deg, #5fe0c4, #ffd27a, #ff8a5c, #ff7eb0, #b79bff, #5fe0c4); } }
.wave .w { display: inline-block; animation: wave 3.2s ease-in-out infinite; animation-delay: calc(var(--d) * .12s); }
@keyframes wave { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }
.hero .hl { background: linear-gradient(90deg, #ffe066, #ffb347, #ff8fb1, #ffe066); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: rainbow 5s linear infinite; }

.hero .hl::after { background: linear-gradient(90deg, #ffe066, #ff8fb1); }
.brand strong { background: linear-gradient(90deg, var(--accent), var(--hot), var(--pink), var(--accent)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: rainbow 10s linear infinite; }
body.admin-mode .brand strong { animation: none; }
.card .price, .pick-card .price { background: linear-gradient(90deg, var(--accent), #00a3e0); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.card .price .tbd { -webkit-text-fill-color: var(--hot); font-size: .9rem; }
.chip.active { box-shadow: 0 4px 14px rgba(21,101,224,.25); }
.perks span { animation: popIn .5s cubic-bezier(.3,1.6,.5,1) both, floaty 4s 1s ease-in-out infinite; }
.perks span:nth-child(2) { animation-delay: .1s, 1.4s; } .perks span:nth-child(3) { animation-delay: .2s, 1.8s; } .perks span:nth-child(4) { animation-delay: .3s, 2.2s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* rivenditori */
.hero-res { background: linear-gradient(120deg, #3b2f8f, #6a3fd6 45%, #e2561d 100%); background-size: 200% 200%; }
.res-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #5b3fd0, #8f5cf0); }
.res-who { color: #5b3fd0; font-weight: 600; }
.res-box { background: #efe9ff; color: #2c1f6e; border-radius: 10px; padding: 10px 12px; margin: 10px 0 4px; }
@media (prefers-color-scheme: dark) { .res-box { background: #2a2350; color: #e2dbff; } .res-who { color: #b9a6ff; } }
.res-order { text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.res-order:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.res-order.is-ready { border-left: 5px solid var(--accent); }
.rp-in { width: 120px; }

/* foto dei clienti */
.photo-chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #e3f0ff; color: #1e4fb3; text-decoration: none; }
@media (prefers-color-scheme: dark) { .photo-chip { background: #1d2c4a; color: #9cc0ff; } }
.cr-photos { border: 2px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin: 14px 0 8px; background: var(--bg); }
.cr-photos .hint { margin: 4px 0 8px; }
.small-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.order-photos { margin: 10px 0; }
.photo-item.zoom { padding: 0; cursor: zoom-in; }
.zoom-ov { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 20px; gap: 12px; grid-template-rows: 1fr auto; }
.zoom-ov img { max-width: 100%; max-height: 80vh; border-radius: 8px; }
.zoom-bar { display: flex; gap: 10px; }
.zoom-bar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .wave .w, .rainbow, .page-head h1, .step h2, .card h3, .hero .hl, .brand strong, .perks span { animation: none !important; }
}
.emo { -webkit-text-fill-color: initial; color: initial; background: none; }
.hidden-list { margin-top: 14px; }
.hidden-list summary { cursor: pointer; }
.hidden-list ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.hidden-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.mini-btn { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; flex: none; }
.mini-btn:hover .mini { outline: 2px solid var(--accent); }
.mini-btn .mini.none { width: 44px; height: 44px; font-size: .7rem; }

/* ===== scelta del modello dalle foto ===== */
.model-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 2px dashed var(--hot); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 .88rem var(--font-body); cursor: pointer; text-align: left; transition: transform .15s, border-color .2s; }
.model-btn:hover { transform: translateY(-1px); }
.model-btn.chosen { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.model-btn img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; max-height: 64vh; overflow-y: auto; padding: 4px; }
.model-tile { position: relative; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--bg); aspect-ratio: 1; transition: transform .15s, border-color .15s; }
.model-tile:hover { transform: scale(1.02); }
.model-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.model-tile span { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font: 600 .78rem var(--font-body); padding: 3px 10px; border-radius: 999px; }
.model-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.model-tile.selected::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; animation: popIn .3s cubic-bezier(.3,1.6,.5,1); }
.model-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; text-decoration: none; }
.model-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.sum-tiny { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; vertical-align: middle; margin-right: 5px; }
.photo-num { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff; font: 600 .7rem var(--font-body); padding: 2px 7px; border-radius: 999px; }
.pick-check { margin: 10px 0 2px; align-items: flex-start; }
.pick-check input { margin-top: 3px; }

/* ===== pulsante Info ===== */
.info-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 6px; padding: 12px 18px; border: 0; border-radius: 999px; font: 700 1rem var(--font-display); color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #1565e0, #00a3e0); box-shadow: 0 8px 24px rgba(0,163,224,.4); animation: fabIn .6s 1s cubic-bezier(.3,1.6,.5,1) both, fabPulse 3s 2s ease-in-out infinite; }
.info-fab span { font-size: 1.2rem; }
.info-fab:hover { transform: translateY(-2px) scale(1.03); }
@keyframes fabIn { from { transform: scale(0); } }
@keyframes fabPulse { 0%, 100% { box-shadow: 0 8px 24px rgba(0,163,224,.4); } 50% { box-shadow: 0 8px 24px rgba(0,163,224,.4), 0 0 0 10px rgba(31,143,78,.15); } }
body.admin-mode .info-fab { display: none; }
.info-link { align-self: flex-start; background: none; border: 0; padding: 2px 0; color: var(--accent); font: 600 .85rem var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.info-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.info-btn { display: grid; justify-items: center; gap: 2px; padding: 14px 10px; border-radius: 14px; text-decoration: none; color: #fff; font: 700 1rem var(--font-display); transition: transform .15s; }
.info-btn:hover { transform: translateY(-2px); }
.info-btn span { font-size: 1.6rem; }
.info-btn small { font: 500 .75rem var(--font-body); opacity: .9; }
.info-btn.wa { background: linear-gradient(135deg, #25d366, #1565e0); }
.info-btn.tel { background: linear-gradient(135deg, #3b82f6, #1e4fb3); }
.info-btn.mail { background: linear-gradient(135deg, #f59e0b, #e2561d); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 16px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ===== messaggi ===== */
.msgs { display: grid; gap: 12px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.msg.unread { border-left-color: var(--hot); }
.msg header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.msg-text { margin: 4px 0; white-space: pre-line; font-size: 1rem; }

/* ===== contabilità ===== */
.tag.paid { background: #e4ecd9; color: #3d5c19; border-color: transparent; }
@media (prefers-color-scheme: dark) { .tag.paid { background: #26361a; color: #b9d98f; } }
.acc-tiles .tile small { font-size: .78rem; }
.tile.good { border-left: 4px solid var(--accent); }
.tile.good strong { color: var(--accent); }
.acc-chart { margin-bottom: 16px; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; height: 190px; padding-top: 10px; }
.bar-col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; align-items: end; justify-items: center; gap: 4px; }
.bar { width: 70%; max-width: 70px; min-height: 3px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #00a3e0, var(--accent)); align-self: end; transition: height .6s ease; }
.bar-col.cur .bar { background: linear-gradient(180deg, var(--sun, #ffc93c), var(--hot)); }
.bar-val { font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.bar-lab { font-size: .8rem; color: var(--muted); text-transform: capitalize; }
.acc-cols { grid-template-columns: 1fr 1fr; }
.pad-h { padding: 16px 16px 4px; margin: 0; }
.tot-row td { background: var(--bg); }
@media (max-width: 860px) { .acc-cols { grid-template-columns: 1fr; } .info-fab { right: 12px; bottom: 12px; padding: 10px 14px; } }

/* ===== privacy ===== */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.65; }
.legal h2 { margin-top: 22px; font-size: 1.1rem; }
.legal ul { padding-left: 20px; }
.consent { align-items: flex-start; font-size: .85rem; margin-top: 12px; }
.consent input { margin-top: 3px; }
.footer { line-height: 1.8; }

/* ===== logo ===== */
.brand-logo { height: 52px; width: auto; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.12)); transition: transform .3s; }
.brand:hover .brand-logo { transform: rotate(-4deg) scale(1.05); }
.hero-logo { position: absolute; left: 50%; top: 50%; width: min(240px, 80%); transform: translate(-50%, -50%); z-index: 2; filter: drop-shadow(0 10px 22px rgba(0,0,0,.35)); animation: logoFloat 5s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); } 50% { transform: translate(-50%, -56%) rotate(2deg); } }
.hero-art .float { z-index: 1; opacity: .9; }
.auth-logo { display: block; width: 150px; margin: 0 auto 10px; }
@media (max-width: 760px) { .hero-logo { display: none; } .brand-logo { height: 42px; } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }

/* ===== tonalità dell'area amministratore ===== */
body.admin-user[data-admin-theme="sabbia"]  { --bg: #f3ede2; --surface: #fffaf2; --line: #e3d8c6; --accent-soft: #e5efe6; }
body.admin-user[data-admin-theme="azzurro"] { --bg: #e6eefa; --surface: #ffffff; --line: #cddbef; --accent-soft: #dbe9f7; }
body.admin-user[data-admin-theme="menta"]   { --bg: #e2f3ec; --surface: #ffffff; --line: #c6e2d7; --accent-soft: #d2eee3; }
body.admin-user[data-admin-theme="lavanda"] { --bg: #eee9fb; --surface: #ffffff; --line: #dbd1f2; --accent-soft: #e3f0ec; }
body.admin-user[data-admin-theme="scuro"]   { --bg: #0c1220; --surface: #141c2e; --ink: #e6ebf5; --muted: #97a3bb; --line: #26324a; --accent: #5aa2ff; --accent-ink: #06142e; --accent-soft: #1a2c4d; color-scheme: dark; }
body.admin-user[data-admin-theme="notte"]   { --bg: #0d1726; --surface: #142236; --ink: #e4ecf7; --muted: #95a6bf; --line: #233650; --accent: #4f9cff; --accent-ink: #06162b; --accent-soft: #1a3354; --hot: #ff8a4c; color-scheme: dark; }
body.admin-user[data-admin-theme="scuro"] .topbar, body.admin-user[data-admin-theme="notte"] .topbar { background: var(--surface); }
body.admin-user[data-admin-theme="scuro"] .tag.todo, body.admin-user[data-admin-theme="notte"] .tag.todo,
body.admin-user[data-admin-theme="scuro"] .dep.check, body.admin-user[data-admin-theme="notte"] .dep.check { background: #4a2414; color: #ffb48f; }
body.admin-user[data-admin-theme="scuro"] .tag.paid, body.admin-user[data-admin-theme="notte"] .tag.paid { background: #26361a; color: #b9d98f; }
body.admin-user[data-admin-theme="scuro"] .photo-chip, body.admin-user[data-admin-theme="notte"] .photo-chip { background: #1d2c4a; color: #9cc0ff; }
body.admin-user[data-admin-theme="scuro"] .warn-notice, body.admin-user[data-admin-theme="notte"] .warn-notice { background: #4a2414; color: #ffb48f; }
body.admin-user[data-admin-theme="notte"] .bar { background: linear-gradient(180deg, #7db8ff, #4f9cff); }
body.admin-mode { transition: background-color .3s; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.theme-opt { display: grid; gap: 6px; justify-items: center; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 .85rem var(--font-body); cursor: pointer; }
.theme-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-prev { width: 100%; height: 56px; border-radius: 8px; border: 1px solid rgba(0,0,0,.12); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 8px; }
.theme-prev span { border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* ===== correzione: le tonalità chiare usano sempre testo scuro, anche se il dispositivo è in modalità scura ===== */
body.admin-user[data-admin-theme="chiaro"], body.admin-user[data-admin-theme="sabbia"], body.admin-user[data-admin-theme="azzurro"],
body.admin-user[data-admin-theme="menta"], body.admin-user[data-admin-theme="lavanda"] {
  --bg: #edf1f7; --surface: #ffffff; --ink: #121a2b; --muted: #586579; --line: #d6deea;
  --accent: #1565e0; --accent-ink: #ffffff; --accent-soft: #e1ebfc; --hot: #d9541e; --danger: #b3261e;
  color-scheme: light;
}
body.admin-user[data-admin-theme="sabbia"]  { --bg: #f3ede2; --surface: #fffaf2; --line: #e3d8c6; --accent-soft: #e5efe6; }
body.admin-user[data-admin-theme="azzurro"] { --bg: #e6eefa; --surface: #ffffff; --line: #cddbef; --accent-soft: #dbe9f7; }
body.admin-user[data-admin-theme="menta"]   { --bg: #e2f3ec; --surface: #ffffff; --line: #c6e2d7; --accent-soft: #d2eee3; }
body.admin-user[data-admin-theme="lavanda"] { --bg: #eee9fb; --surface: #ffffff; --line: #dbd1f2; --accent-soft: #e3f0ec; }
/* etichette colorate in versione chiara */
body.admin-user:is([data-admin-theme="chiaro"], [data-admin-theme="sabbia"], [data-admin-theme="azzurro"], [data-admin-theme="menta"], [data-admin-theme="lavanda"]) :is(.tag.todo, .dep.check, .warn-notice) { background: #fde5d8; color: #9a3412; }
body.admin-user:is([data-admin-theme="chiaro"], [data-admin-theme="sabbia"], [data-admin-theme="azzurro"], [data-admin-theme="menta"], [data-admin-theme="lavanda"]) .tag.paid { background: #e4ecd9; color: #3d5c19; }
body.admin-user:is([data-admin-theme="chiaro"], [data-admin-theme="sabbia"], [data-admin-theme="azzurro"], [data-admin-theme="menta"], [data-admin-theme="lavanda"]) .photo-chip { background: #e3f0ff; color: #1e4fb3; }
body.admin-user:is([data-admin-theme="chiaro"], [data-admin-theme="sabbia"], [data-admin-theme="azzurro"], [data-admin-theme="menta"], [data-admin-theme="lavanda"]) .res-box { background: #efe9ff; color: #2c1f6e; }
body.admin-user:is([data-admin-theme="chiaro"], [data-admin-theme="sabbia"], [data-admin-theme="azzurro"], [data-admin-theme="menta"], [data-admin-theme="lavanda"]) .topbar { background: var(--surface); }

/* ===== la tonalità scelta vale anche nelle anteprime (Vista cliente, Componi, Carrello) quando sei entrato come titolare ===== */
body.admin-user:not(.admin-mode) { background: var(--bg); }
body.admin-user::before, body.admin-user::after { display: none; }
body.admin-user .topbar { background: var(--surface); backdrop-filter: none; }
/* titoli sfumati più luminosi sulle tonalità scure */
body.admin-user:not(.admin-mode):is([data-admin-theme="scuro"], [data-admin-theme="notte"]) :is(.page-head h1, .step h2, .success h1, .status-card h1, .compo-cta h2, .card h3) {
  background-image: linear-gradient(90deg, #5fe0c4, #ffd27a, #ff8a5c, #ff7eb0, #b79bff, #5fe0c4); }
body.admin-user:is([data-admin-theme="scuro"], [data-admin-theme="notte"]) .compo-cta { background: linear-gradient(120deg, var(--accent-soft), var(--surface)); }
body.admin-user:is([data-admin-theme="scuro"], [data-admin-theme="notte"]) .custom-cta { background: linear-gradient(110deg, #0a0f0e, #1f2a28); }
/* titoli sfumati scuri sulle tonalità chiare, anche se il dispositivo è in modalità scura */
body.admin-user:not(.admin-mode):is([data-admin-theme="chiaro"], [data-admin-theme="sabbia"], [data-admin-theme="azzurro"], [data-admin-theme="menta"], [data-admin-theme="lavanda"]) :is(.page-head h1, .step h2, .success h1, .status-card h1, .compo-cta h2, .card h3) {
  background-image: linear-gradient(90deg, #1565e0, #00a3e0, #e2561d, #ff4f8b, #7b3fe4, #1565e0); }
body.admin-user:is([data-admin-theme="chiaro"], [data-admin-theme="sabbia"], [data-admin-theme="azzurro"], [data-admin-theme="menta"], [data-admin-theme="lavanda"]) .custom-cta { background: linear-gradient(110deg, #121a2b, #2c3a37); color: #fff; }

/* ===== installa app ===== */
.install-btn { background: linear-gradient(135deg, #1e6fe0, #1565e0); border: 0; color: #fff; white-space: nowrap; }
.install-banner { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.06); animation: cardIn .5s .3s both; }
.install-banner img { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.install-banner strong { display: block; }
.install-banner span { font-size: .85rem; color: var(--muted); }
.install-preview { display: grid; justify-items: center; gap: 6px; margin: 6px 0 14px; }
.install-preview img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.install-preview span { font-size: .8rem; color: var(--muted); }
.install-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.install-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.ist-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
@media (max-width: 560px) { .install-banner { grid-template-columns: auto 1fr auto; } .install-banner .btn { grid-column: 1 / -1; } .install-banner #install-x { grid-row: 1; grid-column: 3; } .install-btn { padding: 6px 10px; font-size: .8rem; } }

/* ===== telefono: menu in basso, barra carrello, avviso aggiornamento ===== */
.tabbar, .cartbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tab-item { display: grid; justify-items: center; gap: 2px; padding: 4px 2px; text-decoration: none; color: var(--muted); font: 600 .7rem var(--font-body); border-radius: 12px; -webkit-tap-highlight-color: transparent; }
  .tab-ico { position: relative; font-size: 1.35rem; line-height: 1.2; transition: transform .2s; }
  .tab-item.active { color: var(--accent); }
  .tab-item.active .tab-ico { transform: translateY(-2px) scale(1.12); }
  .tab-item.active::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--accent); margin-bottom: -2px; }
  .tab-item:not(.active)::before { content: ""; height: 3px; margin-bottom: -2px; }
  .tab-badge { position: absolute; top: -4px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hot); color: #fff; font: 700 .65rem/18px var(--font-body); text-align: center; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.has-cartbar { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  .info-fab { display: none; }
  .nav { display: none !important; }
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
  .userbox .who { display: none; }
  body.admin-user .userbox #theme-btn, body.admin-user .userbox #logout { display: none; }
  .cartbar:not([hidden]) { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 44;
    padding: 10px 14px; border-radius: 16px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #1565e0, #00a3e0); box-shadow: 0 10px 24px rgba(21,101,224,.35); animation: cardIn .35s both; }
  .cb-ico { position: relative; font-size: 1.4rem; }
  .cb-txt { display: grid; line-height: 1.2; }
  .cb-txt span { font-size: .8rem; opacity: .9; }
  .cb-go { font-weight: 700; font-size: .85rem; white-space: nowrap; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-cartbar .toast { bottom: calc(146px + env(safe-area-inset-bottom)); }
}
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-item { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 600 .85rem var(--font-body); cursor: pointer; }
.more-item span { font-size: 1.5rem; }
.update-banner { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 400; display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 16px; border-radius: 14px; background: #121a2b; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: popIn .4s cubic-bezier(.3,1.6,.5,1); max-width: calc(100% - 24px); }

/* ===== accessi rivenditori ===== */
.res-tiles { margin-bottom: 14px; }
.act { display: inline-block; font-weight: 600; font-size: .82rem; padding: 2px 8px; border-radius: 999px; }
.act-on { background: #dff5e6; color: #1f7a3d; }
.act-recent { background: var(--accent-soft); color: var(--accent); }
.act-mid { background: #fff3d6; color: #8a5a00; }
.act-away { background: #fde5d8; color: #9a3412; }
.act-never { background: var(--bg); color: var(--muted); border: 1px dashed var(--line); }

@media (max-width: 760px) { .tiles { grid-template-columns: 1fr 1fr; gap: 8px; } .tile { padding: 12px; } .tile strong { font-size: 1.35rem; } }

/* =====================================================================
   VERSIONE TELEFONO: catalogo a riquadri, scheda prodotto dal basso, tabelle a schede
   ===================================================================== */
.sw.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.sw-row.sw-big { gap: 9px; }
.sw-row.sw-big button.sw { width: 30px; height: 30px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: 40px; height: 44px; border: 0; background: var(--bg); color: var(--ink); font: 700 1.2rem var(--font-body); cursor: pointer; }
.stepper input { width: 46px !important; height: 44px; border: 0 !important; border-radius: 0; text-align: center; padding: 0 !important; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* griglia compatta */
.grid.grid-m { grid-template-columns: 1fr 1fr; gap: 10px; }
.ptile { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.04); -webkit-tap-highlight-color: transparent; transition: transform .12s; }
.ptile:active { transform: scale(.97); }
.ptile.off { opacity: .55; }
.ptile.enter { animation: cardIn .45s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--i) * 45ms); }
.ptile-img { position: relative; display: block; aspect-ratio: 1; background: var(--bg); overflow: hidden; }
.ptile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptile-img .noimg > span { font-size: 2.6rem; }
.ptile-badge { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); font-size: .9rem; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.ptile .img-count { font-size: .65rem; padding: 1px 6px; right: 6px; bottom: 6px; }
.ptile-body { display: grid; gap: 4px; padding: 8px 10px 10px; }
.ptile-name { font-weight: 600; font-size: .9rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptile-sw { display: flex; align-items: center; gap: 3px; }
.ptile-sw .sw { width: 12px; height: 12px; margin: 0; }
.ptile-sw small { font-size: .7rem; color: var(--muted); margin-left: 2px; }
.ptile-price { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--accent); }
.ptile-price .tbd { font-size: .75rem; }

/* scheda prodotto dal basso */
.modal.sheet-mode { padding: 0; align-items: flex-end; }
.modal-card.sheet { max-width: 640px; border-radius: 22px 22px 0 0; padding: 0 0 calc(14px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; animation: sheetUp .3s cubic-bezier(.2,.8,.3,1); }
@keyframes sheetUp { from { transform: translateY(40%); opacity: .4; } }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 6px; }
.sheet-img { position: relative; aspect-ratio: 4 / 3; max-height: 42vh; background: var(--bg); overflow: hidden; }
.sheet-img > button:not(.sheet-x) { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.sheet-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-img .noimg { display: grid; width: 100%; height: 100%; }
.sheet-img .noimg > span { font-size: 4rem; }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92) !important; color: #121a2b !important; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.sheet-body { padding: 14px 18px 0; display: grid; gap: 6px; }
.sheet-title { font-size: 1.4rem; margin: 0; }
.sheet-body .opts { gap: 12px; margin-top: 6px; }
.sheet-foot { position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); background: var(--surface); margin: 10px -18px 0; padding: 12px 18px; border-top: 1px solid var(--line); border-top-style: solid; }
.sheet-foot .buy { gap: 10px; }
.sheet-foot .add-btn { padding: 12px 18px; font-size: 1rem; }
.modal-card.sheet .price { font-size: 1.5rem; }

/* tabelle → schede sul telefono */
@media (max-width: 760px) {
  .table.rtable thead { display: none; }
  .table.rtable, .table.rtable tbody, .table.rtable tr, .table.rtable td { display: block; width: 100%; }
  .table.rtable tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .table.rtable tbody tr:last-child { border-bottom: 0; }
  .table.rtable td { border: 0 !important; padding: 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .table.rtable td.num { white-space: normal; }
  .table.rtable td::before { content: attr(data-label); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; flex: none; }
  .table.rtable td[data-label=""]::before { content: none; }
  .table.rtable td:first-child { display: block; text-align: left; font-size: 1rem; padding-bottom: 6px; }
  .table.rtable td:first-child::before { content: none; }
  .table.rtable td > * { max-width: 70%; }
  .table.rtable td:first-child > * { max-width: none; }
  .table.rtable .price-in, .table.rtable .rp-in, .table.rtable .qty { width: 120px; }
  .table.rtable tr.tot-row td:first-child { display: none; }
  .table.clickable.rtable tbody tr:active { background: var(--bg); }
  .scroll-x { overflow-x: visible; }
  .modal-card { padding: 16px; }
}

/* scelta modello: riquadri solidi anche su iPhone (niente aspect-ratio sui pulsanti) */
.model-grid { grid-auto-rows: auto; align-content: start; -webkit-overflow-scrolling: touch; }
.model-tile { display: block; width: 100%; aspect-ratio: auto; height: auto; min-width: 0; }
.model-tile .mt-ph { position: relative; display: block; width: 100%; height: 0; padding-bottom: 100%; overflow: hidden; }
.model-tile .mt-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.model-tile .mt-lb { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
@media (max-width: 760px) {
  .model-grid { grid-template-columns: 1fr 1fr; gap: 10px; max-height: none; overflow: visible; padding: 2px; }
  .model-tile .mt-lb { left: 6px; bottom: 6px; font-size: .7rem; padding: 2px 8px; }
  .model-tile.selected::after { width: 26px; height: 26px; top: 6px; right: 6px; }
  #modal .modal-card:has(#mg) .actions { position: sticky; bottom: -16px; background: var(--surface); margin: 10px -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); z-index: 2; }
}
.model-btn { flex-wrap: wrap; }
.model-btn img + img { margin-left: -4px; }

/* ===== oggetti da scegliere per il vassoio ===== */
.obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.obj-card { position: relative; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); padding-bottom: 10px; transition: border-color .2s, box-shadow .2s; }
.obj-card > strong, .obj-card > .small, .obj-card > .obj-step { margin: 0 10px; }
.obj-card > strong { font-size: .9rem; line-height: 1.25; }
.obj-card.chosen { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.obj-img { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--bg); cursor: pointer; }
.obj-img .mt-ph { position: relative; display: block; width: 100%; height: 0; padding-bottom: 100%; overflow: hidden; }
.obj-img .mt-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.obj-step { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px !important; }
.obj-step .btn { min-width: 40px; padding: 6px 0; font-size: 1.1rem; }
.obj-step b { font-size: 1.05rem; }
.obj-admin { display: grid; gap: 8px; margin: 8px 0; }
.obj-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface); }
.obj-thumb { position: relative; width: 64px; height: 64px; flex: none; border-radius: 8px; overflow: hidden; background: var(--bg); }
.obj-thumb img { width: 100%; height: 100%; object-fit: cover; }
.obj-fields { flex: 1; display: grid; grid-template-columns: 1fr 130px; gap: 6px; min-width: 0; }
.obj-fields input { min-width: 0; }
@media (max-width: 760px) {
  .obj-grid { grid-template-columns: 1fr 1fr; }
  .obj-fields { grid-template-columns: 1fr; }
}

/* =====================================================================
   SEZIONE POKÉMON – tema spaziale
   ===================================================================== */
html:has(body.poke-mode) { background: #0c0f2e; }
body.poke-mode { background: radial-gradient(1200px 700px at 80% -10%, #3b1a7a 0%, transparent 60%), radial-gradient(900px 600px at -10% 40%, #0d3b7a 0%, transparent 60%), linear-gradient(180deg, #070b22 0%, #0c0f2e 50%, #140a2e 100%) !important; background-color: #0c0f2e !important; min-height: 100vh; color: #eef1ff; }
body.poke-mode #footer { color: #a9b0e0; }
body.poke-mode #footer a { color: #ffd23f; }
body.poke-mode .poke-grid .card h3, body.poke-mode .poke-grid .ptile-name { color: #fff !important; -webkit-text-fill-color: #fff; background: none !important; }
body.poke-mode::before, body.poke-mode::after { opacity: 0 !important; }
body.poke-mode #app { --surface: rgba(20, 24, 60, .72); --line: rgba(160, 170, 255, .22); --ink: #eef1ff; --muted: #a9b0e0; --bg: rgba(255,255,255,.06); --accent: #ffd23f; --accent-ink: #1a1440; --accent-soft: rgba(255, 210, 63, .2); color: #eef1ff; }
body.poke-mode #app .muted, body.poke-mode #app .desc, body.poke-mode #app .hint { color: #a9b0e0; }
body.poke-mode #app .notice { background: rgba(255,210,63,.12); color: #ffe9a3; border-color: rgba(255,210,63,.35); }
body.poke-mode #app .notice a { color: #ffd23f; }
body.poke-mode #app input, body.poke-mode #app select, body.poke-mode #app textarea { background: rgba(10, 12, 40, .7); color: #eef1ff; border-color: rgba(160,170,255,.3); }
body.poke-mode #app .btn:not(.ghost) { background: linear-gradient(135deg, #ffd23f, #ff9f1c); color: #1a1440; box-shadow: 0 6px 20px rgba(255, 190, 40, .35); }
body.poke-mode #app .btn.ghost { color: #eef1ff; border-color: rgba(160,170,255,.35); background: transparent; }
body.poke-mode #app .price, body.poke-mode #app .ptile-price { color: #ffd23f; text-shadow: 0 0 12px rgba(255,210,63,.35); }
body.poke-mode #app .chip { background: rgba(20,24,60,.7); color: #dfe3ff; border-color: rgba(160,170,255,.3); }
body.poke-mode #app .chip.active { background: linear-gradient(135deg, #ffd23f, #ff9f1c); color: #1a1440; border-color: transparent; }
body.poke-mode #app .search-row { background: rgba(20,24,60,.7); border-color: rgba(160,170,255,.3); }
body.poke-mode #app .info-link { color: #8fd3ff; }
body.poke-mode #app .tbd { color: #ffb4d2; }

.poke-hero { position: relative; overflow: hidden; border-radius: 26px; padding: 44px 30px 40px; margin-bottom: 18px; min-height: 280px; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 20px;
  background: radial-gradient(600px 300px at 85% 30%, rgba(124, 77, 255, .55), transparent 70%), radial-gradient(500px 300px at 10% 110%, rgba(0, 180, 255, .4), transparent 70%), linear-gradient(135deg, #0a0f35, #1b0f45 60%, #2a0a4a);
  border: 1px solid rgba(160,170,255,.25); box-shadow: 0 20px 60px rgba(40, 20, 120, .45), inset 0 0 80px rgba(120, 90, 255, .15); }
.poke-stars { position: absolute; inset: 0; pointer-events: none; }
.poke-stars i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: twinkle 2.6s var(--d) ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.3); } }
.poke-stars .shoot { position: absolute; width: 120px; height: 2px; background: linear-gradient(90deg, rgba(255,255,255,0), #fff); border-radius: 2px; transform: rotate(-25deg); opacity: 0; animation: shoot 6s linear infinite; }
.poke-stars .s1 { top: 12%; left: 70%; animation-delay: .5s; } .poke-stars .s2 { top: 35%; left: 40%; animation-delay: 2.6s; } .poke-stars .s3 { top: 8%; left: 25%; animation-delay: 4.4s; }
@keyframes shoot { 0% { opacity: 0; transform: rotate(-25deg) translateX(0); } 3% { opacity: 1; } 12% { opacity: 0; transform: rotate(-25deg) translateX(-320px); } 100% { opacity: 0; } }
.poke-planet { position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #8f7bff, #4a2fb8 55%, #1d0f5a); box-shadow: 0 0 80px rgba(143, 123, 255, .6); opacity: .85; }
.poke-planet::after { content: ""; position: absolute; left: -40%; top: 44%; width: 180%; height: 22%; border-radius: 50%; border: 3px solid rgba(255, 210, 63, .55); transform: rotate(-14deg); }
.poke-hero-text { position: relative; z-index: 2; }
.poke-kicker { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(255,210,63,.15); color: #ffe27a; font-weight: 700; font-size: .82rem; border: 1px solid rgba(255,210,63,.4); }
.poke-title { margin: 12px 0 8px; font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; color: #fff; text-shadow: 0 0 24px rgba(140, 160, 255, .6); letter-spacing: .01em; }
.poke-title span { background: linear-gradient(90deg, #ffd23f, #ff9f1c, #ffd23f); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 4s linear infinite; filter: drop-shadow(0 0 14px rgba(255, 200, 40, .45)); }
@keyframes shine { to { background-position: -200% 0; } }
.poke-hero-text p { color: #cfd5ff; max-width: 520px; margin: 0 0 14px; }
.poke-perks { display: flex; flex-wrap: wrap; gap: 8px; }
.poke-perks span { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); font-size: .85rem; font-weight: 600; color: #eef1ff; backdrop-filter: blur(4px); }
.poke-orbit { position: relative; z-index: 2; width: 230px; height: 230px; margin: 0 auto; border-radius: 50%; border: 1px dashed rgba(255,255,255,.25); animation: orbit 30s linear infinite; }
.poke-orbit::before { content: "⚡"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 4rem; filter: drop-shadow(0 0 22px rgba(255,210,63,.9)); animation: orbit 30s linear infinite reverse, pulseGlow 2s ease-in-out infinite; }
.poke-orbit span { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 50%; background: rgba(20,24,60,.75); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 0 14px rgba(140,160,255,.4);
  transform: rotate(calc(var(--k) * 45deg)) translate(115px) rotate(calc(var(--k) * -45deg)); }
.poke-orbit span { animation: none; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulseGlow { 50% { transform: scale(1.12); } }

/* carte "olografiche" */
.poke-grid .card, .poke-grid .ptile { position: relative; background: linear-gradient(160deg, rgba(30, 36, 90, .9), rgba(18, 14, 52, .92)); border: 1px solid rgba(160,170,255,.28); color: #eef1ff; box-shadow: 0 10px 30px rgba(10, 5, 40, .5); overflow: hidden; isolation: isolate; }
.poke-grid .card::before, .poke-grid .ptile::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--ang, 0deg), #ffd23f, #ff5fa2, #7c4dff, #00d4ff, #3dff9e, #ffd23f); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .75; animation: holo 6s linear infinite; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes holo { to { --ang: 360deg; } }
.poke-grid .card::after, .poke-grid .ptile::after { content: ""; position: absolute; inset: -50%; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%); transform: translateX(-60%); transition: transform .9s; }
.poke-grid .card:hover::after, .poke-grid .ptile:active::after { transform: translateX(60%); }
.poke-grid .card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(124, 77, 255, .35); }
.poke-grid .card h3, .poke-grid .ptile-name { color: #fff; }
.poke-grid .card .cat { color: #ffd23f; background: rgba(255,210,63,.12); }
.poke-grid .card-img, .poke-grid .ptile-img { background: radial-gradient(circle at 50% 40%, rgba(124,77,255,.35), rgba(10,12,40,.8)); }
.poke-grid .ptile-badge { background: rgba(255,210,63,.9); }
.poke-empty { background: rgba(20,24,60,.7); color: #dfe3ff; border-color: rgba(160,170,255,.3); }
.poke-custom { background: linear-gradient(135deg, #2a1a6e, #0f3a6e) !important; border-color: rgba(160,170,255,.3) !important; color: #eef1ff; }
body.poke-mode .poke-custom p { color: #cfd5ff !important; }
.poke-custom h2 { color: #fff !important; -webkit-text-fill-color: #fff; background: none !important; }

/* scheda prodotto dal basso nella sezione Pokémon */
body.poke-mode .modal-card { --surface: #141a44; --line: rgba(160,170,255,.25); --ink: #eef1ff; --muted: #a9b0e0; --bg: rgba(255,255,255,.06); --accent: #ffd23f; --accent-ink: #1a1440; --accent-soft: rgba(255,210,63,.2); background: linear-gradient(180deg, #161c4a, #0f0d33); color: #eef1ff; border: 1px solid rgba(160,170,255,.25); }
body.poke-mode .modal-card input, body.poke-mode .modal-card select, body.poke-mode .modal-card textarea { background: rgba(10,12,40,.7); color: #eef1ff; border-color: rgba(160,170,255,.3); }
body.poke-mode .modal-card .btn:not(.ghost) { background: linear-gradient(135deg, #ffd23f, #ff9f1c); color: #1a1440; }
body.poke-mode .modal-card .price { color: #ffd23f; }
body.poke-mode .modal-card .sheet-foot { background: #10123a; }

/* invito nel catalogo */
.poke-cta { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 18px 20px; border-radius: 20px; text-decoration: none; color: #fff;
  background: radial-gradient(400px 200px at 90% 0%, rgba(124,77,255,.7), transparent 70%), linear-gradient(135deg, #0a0f35, #251055); box-shadow: 0 12px 34px rgba(40, 20, 120, .35); border: 1px solid rgba(160,170,255,.3); transition: transform .2s; }
.poke-cta:hover { transform: translateY(-2px); }
.poke-cta-stars { position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 60% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 80% 70%, #fff, transparent), radial-gradient(1px 1px at 35% 80%, #fff, transparent), radial-gradient(2px 2px at 90% 40%, #fff, transparent); animation: twinkle 3s ease-in-out infinite; opacity: .7; }
.poke-cta-ico { position: relative; font-size: 2.6rem; filter: drop-shadow(0 0 16px rgba(255,210,63,.9)); animation: pulseGlow 2s ease-in-out infinite; }
.poke-cta-txt { position: relative; flex: 1; display: grid; gap: 2px; }
.poke-cta-txt .eyebrow { color: #ffe27a; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.poke-cta-txt strong { font-family: var(--font-display); font-size: 1.4rem; }
.poke-cta-txt > span:last-child { color: #cfd5ff; font-size: .9rem; }
.poke-cta .btn { position: relative; background: linear-gradient(135deg, #ffd23f, #ff9f1c); color: #1a1440; flex: none; }

@media (max-width: 760px) {
  .poke-hero { grid-template-columns: 1fr; padding: 28px 18px 24px; min-height: 0; text-align: left; }
  .poke-orbit { position: absolute; right: -40px; top: -30px; width: 170px; height: 170px; opacity: .55; }
  .poke-orbit span { width: 32px; height: 32px; margin: -16px; font-size: 1rem; transform: rotate(calc(var(--k) * 45deg)) translate(85px) rotate(calc(var(--k) * -45deg)); }
  .poke-orbit::before { font-size: 2.6rem; }
  .poke-planet { width: 160px; height: 160px; right: -50px; bottom: -70px; }
  .poke-cta { flex-wrap: wrap; padding: 16px; }
  .poke-cta .btn { width: 100%; justify-content: center; }
  .tabbar .tab-item { min-width: 0; }
  .tabbar .tab-lab { font-size: .64rem; }
}
@media (prefers-reduced-motion: reduce) { .poke-stars i, .poke-stars .shoot, .poke-orbit, .poke-orbit::before, .poke-grid .card::before, .poke-grid .ptile::before, .poke-title span { animation: none !important; } }
.counter small { font-size: .7em; opacity: .8; }
.notice.extra-offer { background: linear-gradient(135deg, #fff4d6, #ffe7f1); border-color: #ffc94a; color: #6b4a00; }
.notice.extra-on { background: #e7f7ee; border-color: #8fd3ad; color: #155c36; }
.counter { white-space: nowrap; flex: none; }

/* ===== calcolatore prezzo ===== */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.calc-form { display: grid; gap: 14px; }
.calc-form .panel h2, .calc-out h2 { margin: 0 0 10px; font-size: 1.1rem; }
.calc-in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.calc-in input { border: 0 !important; border-radius: 0; flex: 1; min-width: 0; }
.calc-in span { padding: 0 10px; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.calc-out { position: sticky; top: 84px; display: grid; gap: 12px; }
.calc-tot .sub { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 700; }
.calc-price { display: grid; gap: 2px; padding: 14px; border-radius: 14px; background: var(--accent-soft); text-align: center; }
.calc-price span { font-size: .85rem; color: var(--muted); }
.calc-price strong { font-family: var(--font-display); font-size: 2rem; color: var(--accent); line-height: 1.1; }
.calc-price small { color: var(--muted); }
.calc-price.res { background: var(--bg); }
.calc-price.res strong { font-size: 1.5rem; color: var(--ink); }
.calc-apply { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 12px; }
.calc-apply label:first-child { font-weight: 600; }
@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .calc-out { position: static; }
}


/* =====================================================================
   TEMA S.N 3D – blu tecnico (diverso dall'app 3D Maverik)
   ===================================================================== */
:root { --sun: #7fd4ff; --pink: #00a3e0; --radius: 6px; }
h1, h2, .brand strong, .hero h1 { letter-spacing: .01em; font-weight: 700; }
.hero h1 { text-transform: none; }
/* sfondo: piano di stampa con griglia e due luci blu */
body:not(.admin-mode) { background-color: #eef2f8; background-image: linear-gradient(rgba(21,101,224,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(21,101,224,.06) 1px, transparent 1px); background-size: 28px 28px; }
body:not(.admin-mode)::before { background: radial-gradient(circle, #7fb8ff, #3d7cf0 40%, transparent 70%); opacity: .28; }
body:not(.admin-mode)::after { background: radial-gradient(circle, #7fe3ff, #00a3e0 40%, transparent 70%); opacity: .22; }
@media (prefers-color-scheme: dark) { body:not(.admin-mode) { background-color: #0b111d; background-image: linear-gradient(rgba(90,162,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(90,162,255,.07) 1px, transparent 1px); } }
/* barra in alto con filo blu */
.topbar { border-bottom: 3px solid #1565e0; }
body:not(.admin-mode) .topbar { background: rgba(255,255,255,.9); }
/* riquadro principale: nero e blu come la stampante del logo */
.hero { background: radial-gradient(500px 260px at 85% 20%, rgba(0,163,224,.55), transparent 70%), radial-gradient(420px 260px at 0% 110%, rgba(21,101,224,.6), transparent 70%), linear-gradient(135deg, #070c18, #0f1d3a 55%, #12306b) !important; animation: none; border: 1px solid rgba(90,162,255,.35); box-shadow: 0 16px 40px rgba(12, 30, 70, .28); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(127,212,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(127,212,255,.08) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.hero-res { background: radial-gradient(500px 260px at 85% 20%, rgba(255,122,26,.45), transparent 70%), linear-gradient(135deg, #070c18, #14213f 60%, #1d3a7a) !important; }
.hero .hl, .hero .hl::after { background: linear-gradient(90deg, #7fd4ff, #ffffff, #7fd4ff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; }
.hero .hl::after { -webkit-background-clip: border-box; background-clip: border-box; }
.hero-kicker { background: rgba(0,163,224,.18); border-color: rgba(127,212,255,.45); }
/* titoli: sfumatura blu → azzurro al posto dell'arcobaleno */
.rainbow, body:not(.admin-mode) .page-head h1, body:not(.admin-mode) .step h2, body:not(.admin-mode) .success h1, body:not(.admin-mode) .status-card h1, body:not(.admin-mode) .compo-cta h2, body:not(.admin-mode) .card h3 {
  background-image: linear-gradient(90deg, #0b1a3a, #1565e0, #00a3e0, #1565e0, #0b1a3a) !important; }
@media (prefers-color-scheme: dark) { .rainbow, body:not(.admin-mode) .page-head h1, body:not(.admin-mode) .step h2, body:not(.admin-mode) .success h1, body:not(.admin-mode) .status-card h1, body:not(.admin-mode) .compo-cta h2, body:not(.admin-mode) .card h3 { background-image: linear-gradient(90deg, #cfe1ff, #5aa2ff, #7fd4ff, #5aa2ff, #cfe1ff) !important; } }
.brand strong { background-image: linear-gradient(90deg, #0b1a3a, #1565e0, #00a3e0, #0b1a3a) !important; }
/* schede più squadrate, con bordo blu al passaggio */
.card, .ptile, .panel, .step, .pick-card, .addon-card, .obj-card { border-radius: 8px !important; }
.card:hover { border-color: #1565e0; box-shadow: 0 10px 26px rgba(21,101,224,.18); }
.btn, .chip, .add-btn { border-radius: 6px; }
.btn:not(.ghost) { background: linear-gradient(135deg, #1565e0, #0d4fb8); }
.chip.active { background: #0b1a3a; color: #fff; border-color: #0b1a3a; }
.tabbar .tab-item.active { color: #1565e0; }
.custom-cta { background: linear-gradient(110deg, #0b1a3a, #12306b) !important; color: #fff; }
.info-fab { background: linear-gradient(135deg, #1565e0, #00a3e0) !important; box-shadow: 0 8px 24px rgba(21,101,224,.4) !important; }
.hero-logo { background: #fff; border-radius: 50%; padding: 12px; box-shadow: 0 0 0 4px rgba(127,212,255,.35), 0 0 40px rgba(0,163,224,.55); }

/* ---------- Area clienti ---------- */
.client-area { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 14px; }
.client-area.is-in { background: var(--accent-soft); border-color: transparent; border-left-color: var(--accent); }
.client-area h2 { margin: 4px 0 4px; font-size: 1.2rem; }
.client-area p { margin: 0; color: var(--muted); max-width: 60ch; }
.client-area.is-in p { color: var(--ink); }
.client-area .eyebrow { color: var(--accent); }
.client-area .row { flex-wrap: wrap; }
.auth-card.cus-card.wide { max-width: 640px; }
.seg { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; margin: 6px 0 14px; }
.seg a { flex: 1; text-align: center; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; }
.seg a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.center { text-align: center; }
.cus-hint { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: .9rem; margin: 10px 0 4px; }
.cus-box { background: var(--accent-soft); }
.cus-badge { background: linear-gradient(90deg, #1565e0, #3f8cff); }
.sub-h { margin: 22px 0 10px; }
.profile-panel { max-width: 760px; }
.btn.cus-btn { white-space: nowrap; }
.cus-short { display: none; }
.btn.cart-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn.cart-btn .badge { background: var(--hot); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; }
.btn.cart-btn .badge.bump { animation: cartBump .45s ease; }
@keyframes cartBump { 30% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (max-width: 560px) {
  .client-area { flex-direction: column; align-items: stretch; }
  .client-area .row .btn { flex: 1; text-align: center; }
  .userbox .cus-long { display: none; }
  .userbox .cart-btn { display: none; }
  .userbox .cus-short { display: inline; }
  body:not(.reseller-mode):not(.admin-user) .userbox #logout { display: none; }
}

/* richieste su misura */
.cr-contact { margin-top: 14px; }
.tag.su-misura { background: #fff1d6; color: #8a5a00; border-color: transparent; }
.msg-photos { margin: 6px 0 10px; }
@media (prefers-color-scheme: dark) { .tag.su-misura { background: #3d2e10; color: #ffd27a; } }

/* personalizzazione con menu a tendina (editor prodotto) */
.ctype-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctype-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.ctype-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ctype-opt input { margin: 4px 0 0; width: auto; flex: 0 0 auto; min-height: 0; }
.ctype-opt span { flex: 1; text-align: left; font-weight: 400; line-height: 1.35; }
.opt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.opt-row { display: grid; grid-template-columns: 24px 1fr 90px 34px 34px; gap: 6px; align-items: center; }
.opt-row .opt-n { color: var(--muted); font-weight: 700; text-align: center; }
.opt-row input { margin: 0; }
@media (max-width: 560px) { .ctype-pick { grid-template-columns: 1fr; } .opt-row { grid-template-columns: 20px 1fr 70px 30px 30px; } }

/* ---------- Richieste su misura (ticket) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seg.seg-inline { display: inline-flex; max-width: 100%; margin: 0 0 16px; }
.seg.seg-inline a { flex: 0 1 auto; padding: 8px 16px; white-space: nowrap; }
.seg .badge { margin-left: 4px; }
.ticket-card { border-left: 4px solid var(--line); }
.ticket-card.has-news { border-left-color: var(--hot); }
.ticket-card.is-closed { opacity: .72; }
.ticket-snip { margin: 8px 0 10px; color: var(--ink); white-space: pre-line; }
.news-dot { color: var(--hot); font-weight: 700; }
.tag.tstat { white-space: nowrap; }
.tstat-nuova { background: #e7f0ff; color: #1b4fb8; }
.tstat-valutazione { background: #eef2f7; color: #3c4a5e; }
.tstat-preventivo { background: #fff1d6; color: #8a5a00; }
.tstat-accettata, .tstat-lavorazione { background: #e3f6ea; color: #1d7a43; }
.tstat-pronta { background: #dff7e8; color: #13693a; font-weight: 700; }
.tstat-completata { background: #eceff3; color: #59636f; }
.tstat-rifiutata, .tstat-annullata { background: #fde8e8; color: #a12828; }
.back-link { margin: 0 0 10px; }
.ticket-status h1 { margin: 2px 0 4px; }
.t-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.t-steps li { flex: 1 0 auto; min-width: 92px; text-align: center; font-size: .78rem; color: var(--muted); padding: 8px 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.t-steps li span { display: block; font-size: 1.15rem; margin-bottom: 2px; filter: grayscale(1); opacity: .55; }
.t-steps li.done { color: var(--ink); }
.t-steps li.done span { filter: none; opacity: .9; }
.t-steps li.now { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.t-steps li.now span { filter: none; opacity: 1; }
.quote-box { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.quote-box.pending { border: 2px solid #f0b54a; background: #fffaf0; }
.quote-price { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.quote-note { margin: 4px 0 0; color: var(--muted); }
.admin-tpanel .t-contact { margin-top: 14px; flex-wrap: wrap; }
.quote-form { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.t-chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 6px 2px 10px; }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.bubble.sys { max-width: 92%; background: #fffaf0; border-color: #f3dca6; }
.b-meta { font-size: .74rem; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.b-text { white-space: pre-wrap; word-break: break-word; }
.t-photos-wrap { margin: 6px 0 12px; }
.t-photos-wrap .photo-grid { margin-top: 6px; }
.t-reply { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.t-reply textarea { flex: 1; margin: 0; resize: vertical; min-height: 46px; }
.req-login { text-align: center; padding: 6px 4px 4px; }
.req-login-ico { font-size: 3rem; }
.req-login .row { justify-content: center; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) {
  .quote-box.pending { background: #2b2414; border-color: #8a6a24; }
  .bubble.sys { background: #2b2414; border-color: #5c4a20; }
  .tstat-nuova { background: #1b2c4d; color: #9cc0ff; } .tstat-valutazione { background: #263140; color: #c5d0de; }
  .tstat-preventivo { background: #3d2e10; color: #ffd27a; } .tstat-accettata, .tstat-lavorazione, .tstat-pronta { background: #173a26; color: #8fe0b0; }
  .tstat-completata { background: #2a2f36; color: #aab3be; } .tstat-rifiutata, .tstat-annullata { background: #3d1c1c; color: #ffb0b0; }
}
@media (max-width: 560px) {
  .bubble { max-width: 92%; }
  .seg.seg-inline { display: flex; } .seg.seg-inline a { flex: 1; padding: 8px 8px; font-size: .9rem; }
  .quote-box .row { width: 100%; } .quote-box .row .btn { flex: 1; }
}

/* spedizione */
.ship-pick { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin: 12px 0 8px; display: grid; gap: 4px; }
.ship-pick legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.ship-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; margin: 0; border: 1px solid transparent; }
.ship-opt input { width: auto; margin-top: 4px; flex: none; }
.ship-opt span { display: grid; gap: 1px; }
.ship-opt small { color: var(--muted); font-size: .82rem; }
.ship-opt:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
#ship-box { margin-bottom: 6px; }
.ship-row { display: grid; grid-template-columns: 92px 1fr 80px; gap: 8px; }
.ship-row > div { min-width: 0; }
.ship-chip { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 700; }
.ship-box .addr { margin: 4px 0 8px; line-height: 1.45; }

/* ---------- Carrello: dati cliente a sinistra | riepilogo e, sotto, prodotti a destra ---------- */
.cart-layout.cart3 { grid-template-columns: minmax(320px, 1.3fr) minmax(300px, 1fr); grid-template-areas: "dati prod" "dati ship" "dati riep"; grid-template-rows: auto auto 1fr; align-items: start; }
.cart3 .checkout-form { display: contents; }
.cart3 .panel h2 { margin-top: 0; }
.cart3 .cust-col { grid-area: dati; }
.cart3 .sum-col { grid-area: riep; position: static; }
.cart3 .cart-items { grid-area: prod; }
.ci-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.ci { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.ci-top { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.ci-name { min-width: 0; overflow-wrap: anywhere; }
.ci-top .icon-btn { flex: none; margin: -4px -6px 0 0; }
.ci-bottom { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ci-unit { color: var(--muted); font-size: .9rem; }
.ci-qty { display: flex; align-items: center; gap: 6px; margin: 0 0 0 auto; font-weight: 400; }
.ci-qty input.qty { width: 64px; margin: 0; text-align: center; padding: 6px 4px; }
.ci-line { min-width: 70px; text-align: right; }
.ci-more { width: 100%; text-align: center; }
.cust-col .ship-pick { margin-top: 0; }
@media (max-width: 760px) {
  .cart-layout.cart3 { grid-template-columns: 1fr; grid-template-areas: "prod" "dati" "ship" "riep"; grid-template-rows: auto; }
}

/* =====================================================================
   TEMA MODERNO (S.N 3D) — colori sobri, caratteri nuovi, meno decorazioni.
   Elemento distintivo: la testata della home con le "linee degli strati"
   di una stampa 3D. Tutto il resto resta calmo e pulito.
   ===================================================================== */
:root {
  --bg: #f2f4f8; --surface: #ffffff; --ink: #0e1a33; --muted: #5b6780; --line: #e1e6ef;
  --accent: #1f5bff; --accent-ink: #ffffff; --accent-soft: #e9efff; --hot: #ff5a1f; --danger: #c62f24;
  --plate: #0e1a33;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1222; --surface: #121b2f; --ink: #e8edf7; --muted: #98a4bb; --line: #223049; --accent: #6b93ff; --accent-ink: #071233; --accent-soft: #1a2747; --hot: #ff7a45; --plate: #070d1a; }
}
body { font: 15.5px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
body:not(.admin-mode) { background: var(--bg); }
body:not(.admin-mode)::before, body:not(.admin-mode)::after { display: none !important; }
h1, h2, h3, .brand strong, .price, .tile strong, .hero h1 { font-family: var(--font-display); }
h1 { font-weight: 700; letter-spacing: -.025em; }
h2 { font-weight: 650; letter-spacing: -.01em; }
.page-head h1, h1 { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--ink); }
.emo, .hero-art .float, .compo-emoji, .cats .chip > span[aria-hidden="true"], .poke-cta-stars { display: none !important; }
.eyebrow { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; color: var(--accent); }

/* barra in alto */
.topbar { background: color-mix(in srgb, var(--surface) 88%, transparent) !important; backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line) !important; box-shadow: none !important; }
.brand strong { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.nav a { font-weight: 550; color: var(--muted); border-radius: 10px; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: transparent; color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.userbox .btn { font-weight: 600; }
#userbox .btn.install-btn { background: transparent !important; color: var(--muted) !important; border-color: transparent !important; }
#userbox .btn.install-btn:hover { color: var(--ink) !important; background: var(--bg) !important; }
#userbox .btn.cart-btn { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
#userbox .btn.cart-btn.active { border-color: var(--ink) !important; }
#userbox .btn.cus-btn:not(.ghost) { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--surface) !important; }
.badge, .btn.cart-btn .badge, .tab-badge { background: var(--hot); }

/* pulsanti, campi, schede */
.btn { border-radius: 10px !important; box-shadow: none !important; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; animation: none; }
.btn:not(.ghost):not(.danger) { background: var(--accent) !important; border-color: var(--accent) !important; color: var(--accent-ink) !important; }
.btn:not(.ghost):not(.danger):hover { background: color-mix(in srgb, var(--accent) 86%, #000) !important; filter: none; }
.btn.add-btn.added { background: var(--hot) !important; border-color: var(--hot) !important; }
.btn.ghost { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.btn.ghost:hover { background: var(--bg); border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
input, select, textarea { border-radius: 10px !important; border-color: var(--line) !important; font-family: var(--font-body); }
input:focus, select:focus, textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; outline: none; }
.panel, .card, .auth-card, .install-banner, .status-card, .success, .order-card { border-radius: var(--radius); box-shadow: none !important; border: 1px solid var(--line); }
.modal-card { border-radius: 18px; }
.chip { border-radius: 999px; font-weight: 550; color: var(--muted); background: var(--surface); }
.chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.tag { border-radius: 6px; font-weight: 600; }

/* testata della home: linee degli strati di stampa */
.hero { background: var(--plate) !important; color: #fff; border-radius: 20px; padding: clamp(28px, 4vw, 48px); grid-template-columns: 1.5fr 1fr; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.055) 0 1px, transparent 1px 7px);
  -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 75%); mask-image: linear-gradient(100deg, transparent 20%, #000 75%); }
.hero::after { content: ""; position: absolute; right: 0; bottom: 0; width: 46%; height: 6px; background: var(--hot); border-radius: 6px 0 0 0; z-index: 0; }
.hero .hero-text { position: relative; z-index: 2; }
.hero-kicker { background: none !important; border: 0 !important; padding: 0 !important; backdrop-filter: none !important; color: rgba(255,255,255,.66); font-weight: 500; font-size: .95rem; }
.hero h1, .hero h1.wave { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; color: #fff !important; -webkit-text-fill-color: #fff !important; margin: 14px 0 14px; max-width: 14ch; }
.hero .hl { color: inherit !important; white-space: normal; }
.hero .hl::after { display: none; }
.hero .w { animation: none !important; transform: none !important; opacity: 1 !important; }
.hero p { color: rgba(255,255,255,.78); font-size: 1.05rem; max-width: 44ch; }
.hero-art { display: grid; place-items: center; height: auto; min-height: 200px; }
.hero-logo { position: relative !important; inset: auto !important; left: auto !important; top: auto !important; transform: none !important; animation: none !important; box-shadow: none !important; width: min(200px, 70%) !important; height: auto !important; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); background: #fff; border-radius: 50%; padding: 10px; }
.hero .perks span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.85); }

/* blocchi della home */
.install-banner { animation: none; }
.search-row { border: 1px solid var(--line); border-radius: 12px; padding: 4px 6px 4px 14px; color: var(--muted); }
.search-row:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.custom-cta { background: var(--surface) !important; color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--hot); border-radius: var(--radius); }
.custom-cta p { color: var(--muted); opacity: 1; }
#app .custom-cta .btn { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--surface) !important; }
.compo-cta { background: var(--surface) !important; border: 1px solid var(--line) !important; border-left: 4px solid var(--accent) !important; grid-template-columns: 1fr auto !important; }
.compo-cta:hover { box-shadow: none; border-color: color-mix(in srgb, var(--ink) 25%, var(--line)) !important; }
.compo-cta:hover .btn { transform: none; }

/* schede prodotto: piatte, l'immagine comanda */
.card { transition: border-color .15s; }
.card:not(.off):hover { transform: none !important; box-shadow: none !important; border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.card.enter { animation: none !important; }
.card-img:hover img { transform: none; }
.card h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; }
.card .price { color: var(--ink); font-weight: 750; letter-spacing: -.02em; }
.card-foot { border-top: 1px solid var(--line); }

/* menu in basso (telefono) e pulsante Info */
.tabbar { background: color-mix(in srgb, var(--surface) 92%, transparent) !important; backdrop-filter: blur(12px); border-top: 1px solid var(--line) !important; box-shadow: none !important; }
.tab-item { color: var(--muted) !important; }
.tab-item.active { color: var(--accent) !important; background: none !important; }
.tab-ico { font-size: 0 !important; }
.tab-ico .ico { width: 23px; height: 23px; }
.tab-item.active .tab-ico .ico { stroke-width: 2.1; }
.tab-lab { font-weight: 600; font-family: var(--font-body); }
.info-fab { background: var(--ink) !important; color: var(--surface) !important; font: 600 .95rem var(--font-body) !important; padding: 11px 16px; box-shadow: 0 8px 24px rgba(14,26,51,.25) !important; animation: none !important; }
.info-fab:hover { transform: none; }
.info-fab .ico { width: 1.2em; height: 1.2em; }

/* stati, conferme, pagine */
.status-card { border-left-width: 4px; }
.status-card .status-icon { animation: none !important; }
.ship-opt strong .ico { color: var(--accent); margin-right: 2px; }
.demo-banner { background: var(--ink); font-weight: 500; }
.toast { border-radius: 12px; font-weight: 500; }
.toast.ok { background: var(--ink); }

/* niente testi a sfumatura né scritte animate: colore pieno */
html body:not(.zz) :is(.rainbow, .page-head h1, .step h2, .success h1, .status-card h1, .compo-cta h2, .card h3, .brand strong, .card .price, .pick-card .price, .hero .hl) {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important; animation: none !important; }
html body:not(.zz) :is(.page-head h1, .step h2, .success h1, .status-card h1, .compo-cta h2, .card h3, .brand strong, .card .price, .pick-card .price) { color: var(--ink) !important; }
html body:not(.zz) .hero .hl { color: #fff !important; }
.snow { display: none !important; }
.cat { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 550; color: var(--muted); }
.badge-perso, .badge-col { background: var(--bg) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; border-radius: 6px; font-weight: 600; font-size: .74rem; padding: 2px 8px; }
.chip.active { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--surface) !important; }
.hero { box-shadow: none !important; border: 0 !important; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero::after { width: 60%; } }
html body:not(.zz) .price { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; -webkit-text-fill-color: currentColor !important; color: var(--ink) !important; animation: none !important; }
@media (max-width: 760px) {
  .compo-cta { grid-template-columns: 1fr !important; }
  .compo-cta .btn { justify-self: start; }
  .hero h1, .hero h1.wave { font-size: clamp(1.9rem, 8vw, 2.4rem); }
}
.cust-col .ship-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.cust-col .ship-section .ship-pick { margin-top: 0; }

.cart3 .ship-col { grid-area: ship; }
.cart3 .ship-col .ship-pick { margin-top: 0; }

.cust-col .ship-addr { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Catalogo: menu delle categorie, home con prodotti in evidenza ---------- */
.nav-dd { position: relative; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border: 0; background: none; font: 550 1rem var(--font-body); color: var(--muted); cursor: pointer; border-radius: 0; }
.nav-dd-btn:hover { color: var(--ink); }
.nav-dd-btn.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-dd .dd-caret { width: 16px; height: 16px; transition: transform .15s; }
.nav-dd.open .dd-caret { transform: rotate(180deg); }
.nav-dd-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 250px; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 16px 40px rgba(14,26,51,.14); }
.nav-dd.open .nav-dd-menu { display: block; }
.nav-dd-menu a, .cat-sheet a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 550; }
.nav-dd-menu a:hover, .cat-sheet a:hover { background: var(--bg); }
.nav-dd-menu a.active, .cat-sheet a.active { background: var(--accent-soft); color: var(--accent); }
.dd-n { color: var(--muted); font-size: .82rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dd-empty { display: block; padding: 9px 12px; color: var(--muted); }
.cat-sheet { display: grid; gap: 2px; }
.cat-sheet a { padding: 13px 14px; font-size: 1.02rem; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 22px 0 12px; }
.sec-head h2 { margin: 0; font-size: 1.35rem; }
.sec-link { font-weight: 600; text-decoration: none; }
.sec-link:hover { text-decoration: underline; }
.cat-tiles-wrap { margin-top: 10px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.cat-tile:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.cat-tile img, .cat-tile-ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--bg); }
.cat-tile-ph { display: grid; place-items: center; font: 800 2.4rem var(--font-display); color: color-mix(in srgb, var(--ink) 22%, var(--bg));
  background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 1px, transparent 1px 7px), var(--bg); }
.cat-tile-txt { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 11px 13px; }
.cat-tile-txt strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 650; }
.cat-tile-txt span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.cat-switch { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
.cat-switch .chip { text-decoration: none; white-space: nowrap; }
.feat-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.feat-check input { width: auto; margin-top: 3px; }
.tag.feat-tag { background: var(--accent-soft); color: var(--accent); border-color: transparent; margin-left: 4px; }
@media (max-width: 560px) { .cat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .cat-tile-txt { flex-direction: column; gap: 0; } }
.nav .nav-dd-menu a { color: var(--ink); padding: 9px 12px; border-radius: 9px; box-shadow: none; }
.nav .nav-dd-menu a.active { color: var(--accent); background: var(--accent-soft); box-shadow: none; border-radius: 9px; }

/* ---------- Schede prodotto in griglia e pagina del prodotto ---------- */
.grid.grid-p { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.pcard:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.pcard:hover .pcard-go { color: var(--accent); }
.pcard.off { opacity: .6; }
.pcard-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--bg); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-ph { display: grid; place-items: center; width: 100%; height: 100%; font: 800 3rem var(--font-display); color: color-mix(in srgb, var(--ink) 20%, var(--bg));
  background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 1px, transparent 1px 7px), var(--bg); }
.pcard-ph.big { font-size: 6rem; aspect-ratio: 1 / 1; }
.pcard-flag { position: absolute; left: 10px; top: 10px; background: var(--surface); color: var(--ink); font-size: .74rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.pcard-cat { color: var(--muted); font-size: .82rem; }
.pcard-name { font-family: var(--font-display); font-weight: 650; font-size: 1.08rem; line-height: 1.25; letter-spacing: -.01em; }
.pcard-sw { display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.pcard-sw .sw { width: 14px; height: 14px; }
.pcard-sw small { color: var(--muted); font-size: .75rem; margin-left: 2px; }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.pcard-price { font-family: var(--font-display); font-weight: 750; font-size: 1.2rem; letter-spacing: -.02em; }
.pcard-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.pp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; margin-top: 6px; }
.pp-media { position: sticky; top: 90px; }
.pp-main { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.pp-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.pp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pp-thumbs button { flex: none; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--bg); cursor: pointer; }
.pp-thumbs button.active { border-color: var(--accent); }
.pp-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.08; margin: 4px 0 8px; }
.pp-price { font: 750 1.8rem var(--font-display); letter-spacing: -.02em; margin-bottom: 10px; }
.pp-desc { color: var(--muted); font-size: 1.02rem; max-width: 60ch; margin: 0 0 16px; }
.pp-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.pp-form .opts { display: grid; gap: 14px; }
.pp-form .card-foot { margin-top: 16px; padding-top: 16px; }
.pp-form .card-foot .price { display: none; }
.pp-form .card-foot { justify-content: flex-end; }
.pp-form .buy { display: flex; gap: 10px; align-items: center; width: 100%; }
.pp-form .buy .add-btn { flex: 1; padding: 13px 18px; font-size: 1.02rem; }
.pp-added { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-weight: 550; }
.pp-added span { flex: 1; }
.pp-info .info-link { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; }
.pp-facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; color: var(--muted); }
.pp-facts li { display: flex; gap: 10px; align-items: center; }
.pp-facts .ico { color: var(--ink); }
.pp-related { margin-top: 40px; }
@media (max-width: 860px) { .pp { grid-template-columns: 1fr; } .pp-media { position: static; } }
@media (max-width: 560px) {
  .grid.grid-p { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard-body { padding: 10px 11px 12px; } .pcard-name { font-size: .98rem; } .pcard-go { display: none; } .pcard-price { font-size: 1.05rem; }
  .pcard-flag { font-size: .68rem; left: 6px; top: 6px; }
}
.pp-form .card-foot.sheet-foot { position: static !important; bottom: auto !important; margin: 16px 0 0 !important; padding: 16px 0 0 !important; background: none !important; box-shadow: none !important; border-top: 1px solid var(--line); width: auto !important; }
.pp, .pp-info, .pp-media, .pp-form { min-width: 0; }
.pp-form .sw-row { flex-wrap: wrap; }

/* ---------- Foto dei prodotti: sempre intere e tutte visibili ---------- */
.pcard-img { background: #fff; }
.pcard-img img { object-fit: contain !important; padding: 6px; }
@media (prefers-color-scheme: dark) { .pcard-img { background: #f4f6fa; } }
.pp-media { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pp-media.has-thumbs { grid-template-columns: 84px minmax(0, 1fr); }
.pp-main { position: relative; aspect-ratio: auto !important; height: min(72vh, 680px); background: #fff; }
.pp-main img { width: 100%; height: 100%; object-fit: contain !important; padding: 10px; cursor: zoom-in; }
.pp-main .pcard-ph.big { height: 100%; aspect-ratio: auto; }
.pp-thumbs { display: none; margin: 0; }
.pp-media.has-thumbs .pp-thumbs { display: flex; flex-direction: column; gap: 8px; max-height: min(72vh, 680px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.pp-thumbs button { width: 84px; height: 84px; background: #fff; border: 2px solid var(--line); opacity: .75; transition: opacity .15s, border-color .15s; }
.pp-thumbs button:hover { opacity: 1; }
.pp-thumbs button.active { border-color: var(--accent); opacity: 1; }
.pp-thumbs img { object-fit: contain !important; padding: 3px; }
.pp-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.92); color: #0e1a33; font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.pp-nav:hover { background: #fff; border-color: #0e1a33; }
.pp-nav.prev { left: 10px; } .pp-nav.next { right: 10px; }
.pp-count { position: absolute; right: 12px; bottom: 12px; background: rgba(14,26,51,.78); color: #fff; font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.pv-ov { position: fixed; inset: 0; z-index: 200; background: rgba(8,13,26,.94); display: grid; place-items: center; padding: 56px 64px; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.pv-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.2rem; cursor: pointer; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 2rem; cursor: pointer; padding: 0 0 4px; }
.pv-nav:hover, .pv-x:hover { background: rgba(255,255,255,.26); }
.pv-nav.prev { left: 12px; } .pv-nav.next { right: 12px; }
.pv-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .pp-media.has-thumbs { grid-template-columns: 1fr; }
  .pp-media.has-thumbs .pp-thumbs { order: 2; flex-direction: row; flex-wrap: wrap; max-height: none; overflow: visible; }
  .pp-main { height: min(62vh, 92vw); }
  .pp-thumbs button { width: 64px; height: 64px; }
  .pv-ov { padding: 56px 8px; }
  .pv-nav { width: 40px; height: 40px; }
}
.pp-main { display: block !important; }
.pp-main img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; }
.pp-main .pcard-ph.big { position: absolute; inset: 0; }
.pv-ov { display: flex; align-items: center; justify-content: center; }
.pv-img { max-width: calc(100vw - 128px); max-height: calc(100vh - 112px); width: auto; height: auto; }
@media (max-width: 860px) { .pv-img { max-width: calc(100vw - 16px); } }
.cat-tile img { object-fit: contain !important; background: #fff; padding: 6px; }
.perso-sec { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: var(--surface); }
.perso-sec .perso-head { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.perso-sec .perso-head input { width: auto; margin-top: 3px; }
.perso-sec .perso-head + .form-grid { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.perso-sec:has(.perso-head input:checked) { border-color: var(--accent); }
.choice strong { font-weight: 650; }
.menus-list { display: grid; gap: 12px; margin: 12px 0 10px; }
.menu-blk { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); }
.menu-blk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.menu-blk-head strong { font-family: var(--font-display); }
.menu-blk .field { margin-bottom: 8px; }
.menu-blk-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.menu-blk-foot .check { margin: 0; }
.dup-btn { white-space: nowrap; }


/* descrizione: a capo e righe vuote restano come le scrivi */
.pp-desc, .card .desc, .sheet .desc, .keep-lines { white-space: pre-line; overflow-wrap: anywhere; }
#p-desc { resize: vertical; min-height: 120px; }
.ship-pay-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #e9f8ef; border: 1px solid #b9e6c9; color: #134a2c; font-size: .93rem; line-height: 1.45; }
.ship-pay-note .ico { flex: none; width: 20px; height: 20px; margin-top: 1px; color: #1d8a4a; }
.ship-pay-note strong { display: block; margin-bottom: 2px; }
@media (prefers-color-scheme: dark) { .ship-pay-note { background: #12301f; border-color: #245c3b; color: #c9f1d8; } }
.success .ship-pay-note { text-align: left; max-width: 520px; margin: 14px auto; }

/* ciò che l'app nasconde resta nascosto, qualunque stile abbia */
[hidden] { display: none !important; }

/* ---------- Coupon ---------- */
.coupon-box { margin: 4px 0 12px; }
.coupon-box label { display: block; font-weight: 600; margin-bottom: 6px; }
.coupon-row-in { display: flex; gap: 8px; }
.coupon-row-in input { flex: 1; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.coupon-row-in .btn { flex: none; }
.coupon-ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #e9f8ef; border: 1px solid #b9e6c9; color: #134a2c; }
.coupon-ok .ico { color: #1d8a4a; flex: none; }
.coupon-ok span { flex: 1; }
.coupon-ok .link { color: #134a2c; font-weight: 600; }
.totals .coupon-row dt, .totals .coupon-row dd { color: #1d8a4a; font-weight: 600; }
.cp-code { font-size: 1.02rem; letter-spacing: .04em; }
.cp-actions { white-space: nowrap; }
.cp-actions .btn { margin-left: 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@media (prefers-color-scheme: dark) { .coupon-ok { background: #12301f; border-color: #245c3b; color: #c9f1d8; } .coupon-ok .link { color: #c9f1d8; } }
