/* Boia deh! — colori del mare di Livorno, sabbia, scacchiera della Terrazza e tramonto sulla Gorgona.
   Misure su una griglia di 4 px; testi con contrasto ≥ 4,5:1 (WCAG AA) in chiaro e in scuro; bersagli ≥ 44 px. */

/* caratteri nostri (OFL), ridotti al latino con gli accenti italiani: Bricolage Grotesque 500-800 e Instrument Sans 400-700 */
@font-face { font-family: 'Bricolage'; font-style: normal; font-display: swap; font-weight: 500 800;
  src: url(../fonts/bricolage.woff2) format('woff2-variations'), url(../fonts/bricolage.woff2) format('woff2'); }
@font-face { font-family: 'Instrument'; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(../fonts/instrument.woff2) format('woff2-variations'), url(../fonts/instrument.woff2) format('woff2'); }

:root {
  --mare: #0b3954;
  --mare-2: #13527a;
  --tirreno: #0f9a9c;        /* per sfondi e icone */
  --tirreno-t: #0c7678;      /* lo stesso mare, scuro abbastanza per i testi e i link */
  --tirreno-vivo: #12b5b3;
  --sabbia: #efe4cf;
  --tramonto: #ff7a45;
  --tramonto-scuro: #c2410c;
  --verde: #1c9a64;
  --rosso: #d64545;

  --fondo: #fffdf9;
  --card: #f6f0e5;
  --card-2: #ece3d3;
  --testo: #0c2b3d;
  --testo-2: #4f6977;
  --linea: rgba(11, 57, 84, .11);
  --ombra: 0 10px 30px -12px rgba(8, 36, 54, .35), 0 2px 6px rgba(8, 36, 54, .08);
  --ombra-s: 0 1px 2px rgba(8, 36, 54, .08), 0 4px 12px -6px rgba(8, 36, 54, .18);
  --vetro: rgba(255, 253, 249, .92);
  --aperto: #0f7a52;
  --chiuso: #b03a2b;
  --fuoco: #12b5b3;
  --allerta-f: #fff1e8;
  --allerta-t: #6b2a0c;
  --sk: rgba(11, 57, 84, .08);
  --sk-2: rgba(11, 57, 84, .14);

  --display: 'Bricolage', 'Avenir Next', system-ui, sans-serif;
  --testo-f: 'Instrument', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-foglio: 26px;
  --r-s: 12px;
  --r: 16px;
  --r-l: 20px;
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --gut: 16px;
  --scacchi: conic-gradient(#0c1a22 25%, #fff 0 50%, #0c1a22 0 75%, #fff 0);
  --molla: cubic-bezier(.2, .9, .25, 1);
  color-scheme: light;
}
/* scuro = NERO E BLU: fondo quasi nero, carte blu notte, blu acceso per i comandi; arancione solo come accento.
   È il tema predefinito (index.html mette data-theme="dark" prima del disegno); «auto» segue il telefono. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo: #0b0d10; --card: #121a24; --card-2: #1a2633; --testo: #eef3f7; --testo-2: #a8b6c3;
    --linea: rgba(255, 255, 255, .08); --vetro: rgba(11, 13, 16, .88); --aperto: #3ccf94; --chiuso: #ff8a73;
    --ombra: 0 10px 30px -10px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4); --mare: #7cc4ff; --mare-2: #1d6aa5; --tirreno: #2ec4c1; --tirreno-t: #6cc0ff;
    --fuoco: #4cb3ff; --tramonto-scuro: #ff9a6a; --allerta-f: #2a1a12; --allerta-t: #ffd8c4; --sk: rgba(255, 255, 255, .06); --sk-2: rgba(255, 255, 255, .12);
    --ombra-s: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px -6px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fondo: #0b0d10; --card: #121a24; --card-2: #1a2633; --testo: #eef3f7; --testo-2: #a8b6c3;
  --linea: rgba(255, 255, 255, .08); --vetro: rgba(11, 13, 16, .88); --aperto: #3ccf94; --chiuso: #ff8a73;
  --ombra: 0 10px 30px -10px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4); --mare: #7cc4ff; --mare-2: #1d6aa5; --tirreno: #2ec4c1; --tirreno-t: #6cc0ff;
  --fuoco: #4cb3ff; --tramonto-scuro: #ff9a6a; --allerta-f: #2a1a12; --allerta-t: #ffd8c4; --sk: rgba(255, 255, 255, .06); --sk-2: rgba(255, 255, 255, .12);
  --ombra-s: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px -6px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body > :not(#avvio):not(script) { visibility: visible !important; }
body { font: 15px/1.4 var(--testo-f); color: var(--testo); background: #f2ede3; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
:root[data-theme="dark"] body { background: #07090b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: #07090b; } }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--tirreno-t); }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--fuoco); outline-offset: 2px; border-radius: 10px; }
.ico { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }

#mappa { position: fixed; inset: 0; touch-action: none; }
/* mappa che non arriva: al suo posto il mare di Livorno (l'app va lo stesso) */
body.senza-mappa #mappa { background: radial-gradient(120% 70% at 30% 20%, #d9ecee 0%, #f2ede3 60%); }
:root[data-theme="dark"] body.senza-mappa #mappa { background: radial-gradient(120% 70% at 30% 20%, #10304c 0%, #07090b 60%); }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-top-left { top: calc(var(--sat) + 74px); }
.maplibregl-ctrl-attrib.maplibregl-compact { background: var(--vetro); color: var(--testo-2); box-shadow: var(--ombra); }
.maplibregl-ctrl-attrib.maplibregl-compact a { color: var(--testo-2); }
:root[data-theme="dark"] .maplibregl-ctrl-attrib-button { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .maplibregl-ctrl-attrib-button { filter: invert(1); } }

/* ---------- cerca ---------- */
#cerca {
  position: fixed; z-index: 30; top: calc(var(--sat) + 10px); left: 12px; right: 12px; height: 56px;
  display: flex; align-items: center; gap: 10px; padding: 0 8px; border-radius: 18px;
  background: var(--vetro); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: var(--ombra); border: 1px solid var(--linea); transition: opacity .2s;
}
.cerca-marchio { width: 40px; height: 40px; border-radius: 12px; flex: none; overflow: hidden; box-shadow: var(--ombra-s); }
.cerca-marchio img { width: 100%; height: 100%; display: block; }
#q { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font: 500 17px var(--testo-f); color: var(--testo); }
#q::placeholder { color: var(--testo-2); }
#q::-webkit-search-cancel-button { display: none; }
.cerca-x { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--testo-2); }

/* ---------- controlli mappa ---------- */
#controlli { position: fixed; z-index: 20; right: 12px; display: flex; flex-direction: column; gap: 10px;
  bottom: calc(var(--alt-foglio, 40vh) + 14px); transition: bottom .35s var(--molla), opacity .2s; }
#controlli .bd-ctrl { gap: 10px; }
body[data-foglio="alto"] #controlli { opacity: 0; pointer-events: none; }
body.senza-mappa #controlli { display: none; }
.ctrl { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--vetro);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: var(--ombra); border: 1px solid var(--linea); color: var(--mare);
  transition: transform .15s ease, background-color .2s ease; }
.ctrl:active, .bd-btn:active { transform: scale(.94); }
.ctrl[aria-pressed="true"] { background: var(--mare-2); color: #fff; }
.ctrl.ok { color: #1a7fe0; }
.bd-btn { border: 1px solid var(--linea); }

/* ---------- guida (navigazione passo-passo) ---------- */
#guida { position: fixed; z-index: 35; left: 12px; right: 12px; top: calc(var(--sat) + 10px); border-radius: 22px; padding: 14px 16px;
  background: var(--mare-2); color: #fff; box-shadow: var(--ombra); display: flex; gap: 14px; align-items: center; animation: scende .3s var(--molla); }
@keyframes scende { from { transform: translateY(-16px); opacity: 0; } }
#guida .ico { width: 40px; height: 40px; }
#guida .g-m { font: 800 26px/1.05 var(--display); }
#guida .g-t { font-weight: 600; font-size: 16px; line-height: 1.25; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#guida .g-x { margin-left: auto; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
#guida .g-x .ico { width: 22px; height: 22px; }
#guida.allarme { background: #b4400c; }
body.guida #cerca { opacity: 0; pointer-events: none; }

/* ---------- foglio ---------- */
#foglio {
  position: fixed; z-index: 25; left: 0; right: 0; top: 0; height: 100%; display: flex; flex-direction: column;
  background: var(--fondo); border-radius: var(--r-foglio) var(--r-foglio) 0 0; box-shadow: 0 -8px 40px -12px rgba(8, 36, 54, .4);
  transform: translateY(46vh); transition: transform .42s var(--molla); will-change: transform; touch-action: none;
}
.maniglia { height: 28px; flex: none; display: grid; place-items: center; cursor: grab; touch-action: none; }
.maniglia i { width: 46px; height: 6px; border-radius: 4px; background: var(--scacchi) 0 0 / 6px 6px; opacity: .5; }
.testata { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 var(--gut) 12px; }
#foglio.casa .testata { display: none; }
.testata .tit { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.testata .tit > div { min-width: 0; flex: 1; }
/* titoli lunghi: a capo fra le parole (mai a metà parola coi puntini), su due righe al massimo */
.testata h2 { font-size: 21px; font-weight: 750; line-height: 1.12; overflow-wrap: break-word; hyphens: manual; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.testata h2.lungo { font-size: 18px; }
.testata p { margin: 3px 0 0; color: var(--testo-2); font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tit-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.tit-sigla { font: 800 15px var(--display); letter-spacing: -.02em; }
.testata .azioni { display: flex; gap: 6px; flex: none; }
.tondo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--testo); flex: none; transition: transform .15s ease, background-color .2s; text-decoration: none; }
.tondo:active { transform: scale(.92); }
.tondo.attivo { color: var(--tramonto); }
.tondo.attivo .ico { fill: currentColor; }
.tondo.pieno { background: var(--mare-2); color: #fff; }
.tondo.verde { background: #128c4a; color: #fff; }
.corpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gut) calc(var(--sab) + 32px + var(--y, 0px)); touch-action: pan-y pinch-zoom; -webkit-overflow-scrolling: touch; }
.corpo.entra { animation: entra .3s var(--molla); }
@keyframes entra { from { opacity: 0; transform: translateX(14px); } }

/* ---------- casa ---------- */
.casa-testa { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 0 14px; }
.marchio { font: 800 34px/0.95 var(--display); letter-spacing: -.035em; color: var(--mare); display: inline-flex; align-items: baseline; }
.marchio .esc { color: var(--tramonto); margin-left: 1px; }
.saluto { margin: 6px 0 0; color: var(--testo-2); font-size: 14px; line-height: 1.35; }
.casa-azioni { display: flex; gap: 8px; }

.sez { margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sez h3 { font-size: 18px; font-weight: 720; }
.sez .piccolo { color: var(--testo-2); font-size: 13px; white-space: nowrap; }

.scorri-x { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut); margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) 6px; scrollbar-width: none; touch-action: pan-x; }
.scorri-x::-webkit-scrollbar { display: none; }
.adesso { scroll-snap-align: start; flex: none; width: min(72vw, 280px); min-height: 150px; border-radius: 22px; padding: 14px; background: var(--card); text-align: left; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; transition: transform .15s ease; }
.adesso:active { transform: scale(.985); }
.adesso.largo { width: min(82vw, 330px); }
.adesso h4 { margin: 0; font: 700 15px/1.2 var(--testo-f); display: flex; align-items: center; gap: 8px; min-width: 0; }
.adesso h4 .ico { width: 18px; height: 18px; color: var(--tirreno-t); }
.adesso .tc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.adesso .sotto { color: var(--testo-2); font-size: 13px; line-height: 1.35; display: flex; align-items: center; flex-wrap: wrap; gap: 0 5px; }
.adesso .vuoto { color: var(--testo-2); font-size: 14px; margin: auto 0; display: flex; gap: 8px; align-items: flex-start; }
.adesso .vuoto .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--tirreno-t); }
.adesso .vuoto.chiaro { color: rgba(255, 255, 255, .85); }
.adesso .orari-vecchi { margin: auto 0; display: flex; gap: 8px; align-items: flex-start; color: var(--allerta-t); background: var(--allerta-f); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.adesso .orari-vecchi .ico { width: 18px; height: 18px; margin-top: 1px; }
.adesso.mare-card { background: linear-gradient(160deg, var(--mare-2), #0e6d84 70%, #0b7f86); color: #fff; }
.adesso.mare-card .sotto, .adesso.mare-card h4 .ico { color: rgba(255, 255, 255, .86); }
.adesso.mare-card::after { content: ''; position: absolute; right: -10px; bottom: -10px; width: 90px; height: 40px; background: var(--scacchi) 0 0 / 10px 10px; opacity: .12; transform: skewX(-30deg); }
.gradi { font: 750 44px/0.9 var(--display); letter-spacing: -.04em; }
.vento-riga { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.freccia { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.freccia .ico { width: 16px; height: 16px; transform: rotate(var(--r)); }
.adesso.avviso-card { background: var(--allerta-f); color: var(--allerta-t); }
.adesso.avviso-card h4 .ico { color: var(--allerta-t); }
.adesso.avviso-card .sotto { color: inherit; opacity: .8; }
.avviso-tit { font-weight: 650; font-size: 14px; line-height: 1.3; }

/* strisce in cima alla casa: allerta del Comune, sciopero */
.striscia { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; margin: 0 0 10px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.3; text-decoration: none; color: var(--allerta-t); background: var(--allerta-f); min-height: 48px; }
.striscia .ico { width: 20px; height: 20px; flex: none; }
.striscia > .ico:last-child { width: 18px; height: 18px; opacity: .6; margin-left: auto; }
.striscia > span { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.striscia.allerta-gialla { background: #fff4c2; color: #5c4400; }
.striscia.allerta-arancione { background: #ffe1c7; color: #6b2a0c; }
.striscia.allerta-rossa { background: #b02a2a; color: #fff; }
:root[data-theme="dark"] .striscia.allerta-gialla { background: #3d3410; color: #ffe58a; }
:root[data-theme="dark"] .striscia.allerta-arancione { background: #3a2418; color: #ffd8c4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .striscia.allerta-gialla { background: #3d3410; color: #ffe58a; } :root:not([data-theme="light"]) .striscia.allerta-arancione { background: #3a2418; color: #ffd8c4; } }

.partenza { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 36px; }
.partenza .dest { font-size: 14px; font-weight: 500; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.partenza .quando { font: 700 17px/1 var(--display); text-align: right; white-space: nowrap; display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.partenza .quando small { font: 500 12px var(--testo-f); color: var(--testo-2); }
.pill { display: inline-grid; place-items: center; min-width: 40px; max-width: 64px; height: 28px; padding: 0 8px; border-radius: 9px; font: 750 14px/1 var(--display); color: #fff; background: var(--c, var(--mare-2)); white-space: nowrap; overflow: hidden; }
.pill.mini { min-width: 30px; height: 22px; font-size: 12px; border-radius: 7px; padding: 0 6px; }
.vivo { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tirreno-vivo); box-shadow: 0 0 0 3px rgba(18, 181, 179, .22); animation: pulsa 2s infinite; flex: none; vertical-align: middle; }
@keyframes pulsa { 50% { box-shadow: 0 0 0 6px rgba(18, 181, 179, 0); } }

.ztl-righe { display: flex; flex-wrap: wrap; gap: 6px; }
.ztl-z { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; border-radius: 10px; background: var(--fondo); font-size: 13px; font-weight: 600; }
.ztl-z b { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; font: 800 13px var(--display); color: #fff; background: #0b7285; padding: 0 4px; }
.ztl-z.on b { background: #c2410c; }
.dentro { color: var(--tramonto-scuro); font-weight: 700; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.dentro .ico { width: 18px; height: 18px; }

/* griglia servizi */
.griglia { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 4px; }
.servizio { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px 6px; border-radius: 16px; text-align: center; font-size: clamp(10.5px, 3.25vw, 12.5px); font-weight: 550; line-height: 1.15; min-height: 88px; overflow-wrap: break-word; hyphens: manual; }
.servizio .s-ico, .tit-ico.t3d { position: relative; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; overflow: hidden;
  background: linear-gradient(165deg, color-mix(in srgb, var(--c) 62%, #fff) 0%, var(--c) 48%, color-mix(in srgb, var(--c) 78%, #000) 100%);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .38), inset 0 -3px 0 rgba(0, 0, 0, .16), 0 6px 14px -6px color-mix(in srgb, var(--c) 80%, #000);
  transition: transform .15s ease; }
.servizio .s-ico::before, .tit-ico.t3d::before { content: ''; position: absolute; left: -20%; right: -20%; top: -55%; height: 95%; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, 0)); pointer-events: none; }
.servizio .s-ico .ico { width: 26px; height: 26px; position: relative; }
.tg { width: 40px; height: 40px; fill: #fff; position: relative; filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, .22)); overflow: visible; }
.tg .k { fill: var(--c); }
.tg .m { fill: rgba(255, 255, 255, .62); }
.tg .ks { stroke: var(--c); }
.tg .ws { stroke: #fff; }
.tg .ms { stroke: rgba(255, 255, 255, .62); }
.tit-ico.t3d { width: 44px; height: 44px; border-radius: 14px; }
.tit-ico.t3d .tg { width: 32px; height: 32px; }
.servizio:active .s-ico { transform: scale(.92); }

.preferiti { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color .2s, color .2s; }
.chip .ico { width: 17px; height: 17px; }
.chip.on { background: var(--mare-2); color: #fff; }
:root[data-theme="dark"] .chip.on { background: #1d6aa5; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { background: #1d6aa5; color: #fff; } }
.filtri { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gut)) 12px; padding: 2px var(--gut); scrollbar-width: none; }
.filtri::-webkit-scrollbar { display: none; }

.piede { margin: 28px 0 0; padding: 16px 0 0; border-top: 1px solid var(--linea); color: var(--testo-2); font-size: 13px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.piede button { color: var(--tirreno-t); font-weight: 650; min-height: 44px; padding: 0 4px; white-space: nowrap; }

/* «Oggi a Livorno»: carte piccole che scorrono */
.oggi-card { scroll-snap-align: start; flex: none; width: min(62vw, 220px); min-height: 132px; border-radius: 20px; padding: 12px 14px; text-align: left; background: var(--card);
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; transition: transform .15s ease; }
.oggi-card:active { transform: scale(.98); }
.oggi-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.oggi-card .oc-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--c); color: #fff; display: grid; place-items: center; margin-bottom: 4px; }
.oggi-card .oc-ico .ico { width: 18px; height: 18px; }
.oggi-card small { color: var(--testo-2); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.oggi-card b { font: 700 15px/1.25 var(--testo-f); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oggi-card span:not(.oc-ico) { color: var(--testo-2); font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oggi-card.sk .oc-ico { background: var(--sk-2); }
.oggi-card.sk i { display: block; height: 12px; border-radius: 6px; background: var(--sk); margin-top: 8px; width: 80%; }
.oggi-card.sk i + i { width: 55%; }

/* ---------- liste ---------- */
.lista { display: flex; flex-direction: column; }
.riga { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linea); text-align: left; width: 100%; min-height: 60px; color: inherit; text-decoration: none; }
.riga:last-child { border-bottom: 0; }
button.riga:active, a.riga:active { background: var(--card); }
.riga .r-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c, var(--tirreno)); flex: none; }
.riga .r-ico .ico { width: 20px; height: 20px; }
.r-testo { min-width: 0; }
.riga .r-t { font-weight: 600; font-size: 15.5px; line-height: 1.25; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.riga .r-t small { color: var(--testo-2); font-weight: 500; font-size: 12.5px; }
.riga .r-s { color: var(--testo-2); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.riga .r-s.lungo { white-space: normal; line-height: 1.35; }
.riga .r-s.piccolo { font-size: 12px; }
.riga .r-s.num { font: 650 14px var(--display); color: var(--testo); letter-spacing: .01em; }
.riga .r-d { text-align: right; font-size: 13px; color: var(--testo-2); white-space: nowrap; }
.riga .r-d b { display: block; font: 700 16px var(--display); color: var(--testo); }
.riga .r-d .ico { width: 18px; height: 18px; }
.riga .r-azioni { display: flex; gap: 6px; }
.riga.numero { grid-template-columns: minmax(0, 1fr) auto; }
.riga.statica { min-height: 52px; }
.riga.treno { grid-template-columns: 58px minmax(0, 1fr) auto; }
.ora-grande { font: 750 19px var(--display); letter-spacing: -.01em; }
.riga.zona { align-items: flex-start; }
.zona-id { font: 800 17px var(--display); background: #0b7285 !important; }
.zona-id.on { background: #c2410c !important; }
.zona-id.lungo { font-size: 13px; }
.fonti-riga { display: block; margin-top: 6px; color: var(--testo-2); font-size: 11.5px; line-height: 1.35; opacity: .9; }
.st-ap { color: var(--aperto); font-weight: 600; }
.st-ch { color: var(--chiuso); font-weight: 600; }
.st-presto { color: var(--tramonto-scuro); font-weight: 600; }
.data-tondo { width: 44px; height: 44px; border-radius: 12px; background: var(--card); display: grid; place-content: center; text-align: center; line-height: 1; }
.data-tondo b { font: 800 17px var(--display); }
.data-tondo small { font-size: 11px; color: var(--testo-2); text-transform: uppercase; letter-spacing: .04em; }

/* stati vuoti e attese */
.vuoto-grande { text-align: center; padding: 32px 16px; color: var(--testo-2); }
.vuoto-grande .vg-ico { width: 64px; height: 64px; border-radius: 22px; display: inline-grid; place-items: center; background: var(--card); color: var(--tirreno-t); margin-bottom: 12px; }
.vuoto-grande .vg-ico .ico { width: 30px; height: 30px; }
.vuoto-grande h4 { margin: 0 0 6px; color: var(--testo); font: 700 18px/1.25 var(--display); }
.vuoto-grande p { margin: 0 auto; max-width: 32ch; line-height: 1.45; }
.vuoto-grande .btn { margin-top: 16px; }
.scheletro { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.scheletro.carta { background: var(--card); border-radius: var(--r-l); padding: 12px 14px; }
.sk-riga { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; min-height: 52px; }
.sk-riga span { display: flex; flex-direction: column; gap: 8px; }
.sk-ico, .sk-t, .sk-s, .sk-gradi, .sk-linea, .sk-punto { display: block; background: var(--sk); border-radius: 8px; }
.sk-ico { width: 40px; height: 40px; border-radius: 12px; }
.sk-t { height: 13px; }
.sk-s { height: 10px; background: var(--sk); opacity: .7; }
.adesso .sk-gradi { width: 70px; height: 36px; border-radius: 10px; margin-top: 4px; }
.adesso .sk-linea { width: 80%; height: 12px; }
.mare-card .sk-gradi, .mare-card .sk-linea { background: rgba(255, 255, 255, .16); }
.sk-punto { display: inline-block; width: 34px; height: 16px; vertical-align: middle; }
.adesso .scheletro { padding: 0; }
.adesso .sk-riga { min-height: 36px; grid-template-columns: 40px 1fr; }
.adesso .sk-ico { width: 40px; height: 26px; border-radius: 9px; }
.sk-ico, .sk-t, .sk-s, .sk-gradi, .sk-linea, .sk-punto, .oggi-card.sk i { animation: luccica 1.4s ease-in-out infinite; }
@keyframes luccica { 50% { opacity: .45; } }

.nota { color: var(--testo-2); font-size: 13px; line-height: 1.4; margin: 12px 0; display: flex; gap: 8px; align-items: flex-start; }
.nota .ico { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.nota.fonte { font-size: 12px; }
.nota b { color: var(--testo); }
.banda { border-radius: 14px; padding: 10px 12px; font-size: 13.5px; line-height: 1.35; display: flex; gap: 10px; align-items: center; margin: 4px 0 12px; background: var(--card); width: 100%; text-align: left; }
.banda .ico { width: 18px; height: 18px; flex: none; }
.banda > span { flex: 1; min-width: 0; }
.banda.live { background: rgba(18, 181, 179, .12); }
.banda.prev { background: rgba(255, 122, 69, .12); }
.banda.allerta { background: var(--allerta-f); color: var(--allerta-t); }
.banda.notte { background: #102f44; color: #e5f1f6; flex-wrap: wrap; }
.banda.notte b { color: #fff; }
.banda .btn { height: 44px; flex: none; }
.btn-112 { padding: 0 14px; }
.btn-piccolo { height: 40px !important; padding: 0 12px; font-size: 14px; }
.sciopero-banda > .ico:last-child { opacity: .6; }

/* avvisi dei bus */
.avviso-blocco { background: var(--card); border-radius: var(--r-l); padding: 12px 14px; margin-bottom: 10px; }
.avviso-blocco.sciopero { background: var(--allerta-f); color: var(--allerta-t); }
.ab-testa { display: flex; gap: 10px; align-items: flex-start; }
.ab-testa .ico { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--tramonto-scuro); }
.ab-testa h4 { margin: 0; font: 700 15.5px/1.3 var(--testo-f); }
.ab-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0 30px; font-size: 12.5px; color: var(--testo-2); }
.ab-testo { margin: 6px 0 0 30px; }
.ab-testo summary { cursor: pointer; color: var(--tirreno-t); font-weight: 600; font-size: 13.5px; min-height: 36px; display: flex; align-items: center; }
.ab-testo p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; white-space: pre-line; color: var(--testo); }

/* farmacie di turno, emergenza */
.turno-card { background: linear-gradient(160deg, #0f4c3a, #127a58); color: #fff; border-radius: 22px; padding: 14px 14px 6px; margin-bottom: 12px; box-shadow: var(--ombra-s); }
.turno-card.verde { background: linear-gradient(160deg, #1f5130, #2b7a3b); }
.tc-testa { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.tc-testa > .ico { width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.tc-testa b { display: block; font: 750 18px/1.2 var(--display); }
.tc-testa small { color: rgba(255, 255, 255, .82); font-size: 12.5px; }
.turno-card .riga { border-color: rgba(255, 255, 255, .14); }
.turno-card .riga .r-s, .turno-card .riga .r-d { color: rgba(255, 255, 255, .82); }
.turno-card .riga .r-d b { color: #fff; }
.turno-card .r-ico { background: rgba(255, 255, 255, .18) !important; }
.riga.farmacia-turno.evidente .r-t::after { content: ' · 24h'; color: var(--aperto); }
.chips-testo { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-testo span { background: var(--card); border-radius: 10px; padding: 6px 10px; font-size: 13px; }

/* eventi */
.eventi { display: flex; flex-direction: column; gap: 10px; }
.evento { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--card); border-radius: var(--r-l); padding: 8px; color: inherit; text-decoration: none; min-height: 92px; }
.ev-ico { position: relative; width: 76px; height: 76px; border-radius: 14px; background: var(--card-2); display: grid; place-items: center; color: var(--tirreno-t); overflow: hidden; }
.ev-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 6px; }
.ev-t small { color: var(--tramonto-scuro); font-weight: 650; font-size: 12.5px; }
.ev-t b { font: 650 15px/1.25 var(--testo-f); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-t span { color: var(--testo-2); font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.ev-t span .ico { width: 14px; height: 14px; }

/* ---------- scheda luogo ---------- */
.stato-grande { font: 700 19px/1.2 var(--display); margin: 2px 0 4px; }
.meta { color: var(--testo-2); font-size: 14px; line-height: 1.4; margin: 0 0 14px; }
.bottoni { display: flex; gap: 8px; margin: 6px 0 14px; overflow-x: auto; scrollbar-width: none; }
.bottoni::-webkit-scrollbar { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 18px; border-radius: 16px; background: var(--card); font-weight: 650; font-size: 15px; white-space: nowrap; flex: none; text-decoration: none; color: var(--testo); transition: transform .15s ease, filter .2s; }
.btn:active { transform: scale(.97); }
.btn.primo { background: var(--mare-2); color: #fff; flex: 1; }
:root[data-theme="dark"] .btn.primo { background: linear-gradient(#2a7fc4, #1d6aa5); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primo { background: linear-gradient(#2a7fc4, #1d6aa5); color: #fff; } }
.btn.pieno { width: 100%; flex: 1; }
.btn.tramonto { background: #c2410c; color: #fff; }
.btn .ico { width: 20px; height: 20px; }
.tabella { background: var(--card); border-radius: var(--r); padding: 4px 14px; margin-bottom: 12px; }
.tabella .tr { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.tabella .tr:last-child { border: 0; }
.tabella .tr.oggi { font-weight: 700; }
.tabella .tr span:first-child { color: var(--testo-2); }
.tabella .tr.oggi span:first-child { color: var(--testo); }
.prezzi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.prezzo { background: var(--card); border-radius: var(--r); padding: 12px; }
.prezzo b { display: block; font: 750 24px/1 var(--display); margin-top: 4px; }
.prezzo small { color: var(--testo-2); }

/* ---------- bus ---------- */
.seg { display: flex; background: var(--card); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 44px; padding: 0 10px; border-radius: 11px; font-weight: 650; font-size: 14px; color: var(--testo-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .2s, color .2s; min-width: 0; }
.seg button .ico { width: 16px; height: 16px; flex: none; }
.seg .seg-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 32vw; }
.seg button[aria-selected="true"] { background: var(--fondo); color: var(--testo); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.seg button .n { font: 700 12px var(--display); color: #fff; background: #c2410c; border-radius: 9px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.linee-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.linee-griglia button { min-height: 48px; }
.linee-griglia .pill { height: 48px; font-size: 17px; border-radius: 13px; width: 100%; max-width: none; }
.fermata-blocco { background: var(--card); border-radius: var(--r-l); padding: 6px 14px 10px; margin-bottom: 10px; }
.fermata-blocco .fb-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; min-height: 48px; }
.fermata-blocco .fb-t h4 { margin: 0; font: 700 16px/1.25 var(--testo-f); min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; }
.fermata-blocco .fb-t h4 .ico { width: 16px; height: 16px; color: var(--tramonto); fill: currentColor; }
.fermata-blocco .fb-t span { color: var(--testo-2); font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.fermata-blocco .fb-t span .ico { width: 16px; height: 16px; }
.fermata-blocco .nota { margin: 6px 0; }
.percorso-linea { position: relative; padding-left: 4px; }
.fermata-l { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; width: 100%; text-align: left; position: relative; }
.fermata-l::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 4px; background: var(--c); }
.fermata-l:first-child::before { top: 50%; }
.fermata-l:last-child::before { bottom: 50%; }
.fermata-l .pt { width: 14px; height: 14px; border-radius: 50%; background: var(--fondo); border: 3.5px solid var(--c); position: relative; z-index: 1; margin-left: 6px; }
.fermata-l .nome { font-size: 14.5px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.fermata-l .t { font-size: 13px; color: var(--testo-2); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.fermata-l .busqui { position: absolute; left: 1px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--fondo); }
.fermata-l .busqui .ico { width: 14px; height: 14px; }
.fermata-l.vicina .nome { font-weight: 700; }
.vicina-tag { color: var(--tirreno-t); font-weight: 600; }
.orari-tutti { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; margin: 6px 0 14px; }
.orari-tutti span { text-align: center; padding: 8px 0; border-radius: 9px; background: var(--card); font: 600 13.5px var(--display); }
.orari-tutti span.passato { opacity: .4; }

/* ---------- percorso ---------- */
.da-a { background: var(--card); border-radius: var(--r-l); padding: 6px 6px 6px 14px; display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 12px; align-items: center; margin-bottom: 12px; }
.da-a .pt-da, .da-a .pt-a { width: 12px; height: 12px; border-radius: 50%; }
.da-a .pt-da { border: 3px solid var(--tirreno-vivo); }
.da-a .pt-a { background: var(--tramonto); border-radius: 3px; }
.da-a .v { padding: 10px 0; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-a .v + .v { border-top: 1px solid var(--linea); }
.da-a .v small { display: block; color: var(--testo-2); font-weight: 500; font-size: 12px; white-space: normal; }
.modi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.modo { border-radius: 16px; background: var(--card); padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 78px; justify-content: center; transition: background-color .2s, color .2s; }
.modo .ico { width: 22px; height: 22px; }
.modo b { font: 750 18px/1 var(--display); white-space: nowrap; }
.modo small { font-size: 12px; color: var(--testo-2); text-align: center; }
.modo[aria-selected="true"] { background: var(--mare-2); color: #fff; }
.modo[aria-selected="true"] small { color: rgba(255, 255, 255, .85); }
.modo .sk-punto { background: rgba(127, 127, 127, .25); }
.riepilogo { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.riepilogo b { font: 750 30px/1 var(--display); letter-spacing: -.02em; }
.riepilogo span { color: var(--testo-2); }
.passi { list-style: none; margin: 0; padding: 0; }
.passi li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.passi li .p-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--card); display: grid; place-items: center; }
.passi li .p-m { color: var(--testo-2); font-size: 13px; white-space: nowrap; }
.opzione { width: 100%; text-align: left; background: var(--card); border-radius: var(--r-l); padding: 14px; margin-bottom: 10px; display: block; transition: outline-color .2s; outline: 2.5px solid transparent; }
.opzione .o-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.opzione .o-linee { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.opzione .o-linee .ico { width: 16px; height: 16px; color: var(--testo-2); }
.opzione .o-d { font: 750 22px/1 var(--display); white-space: nowrap; }
.opzione .o-s { margin-top: 8px; color: var(--testo-2); font-size: 13.5px; line-height: 1.35; display: flex; align-items: flex-start; gap: 6px; }
.opzione .o-s .ico { width: 16px; height: 16px; margin-top: 1px; }
.opzione .o-s .vivo { margin-top: 5px; }
.opzione.scelta { outline-color: var(--tirreno-vivo); }
.tappe { position: relative; margin: 4px 0 14px; }
.tappa { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 8px 0; position: relative; }
.tappa .t-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--card); color: var(--testo); position: relative; z-index: 1; }
.tappa.bus .t-ico { background: var(--c); color: #fff; }
.tappa::before { content: ''; position: absolute; left: 21px; top: 44px; bottom: -10px; width: 3px; background: var(--linea); }
.tappa:last-child::before { display: none; }
.tappa h5 { margin: 2px 0; font: 650 15.5px/1.3 var(--testo-f); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tappa p { margin: 0; color: var(--testo-2); font-size: 13.5px; line-height: 1.4; }
.interruttore { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 18px; padding: 12px 14px; margin: 8px 0 12px; width: 100%; text-align: left; min-height: 64px; }
.interruttore b { display: block; }
.interruttore small { color: var(--testo-2); line-height: 1.35; display: block; }
.lev { width: 52px; height: 32px; border-radius: 20px; background: var(--card-2); position: relative; flex: none; transition: background .2s; }
.lev::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--molla); }
[aria-checked="true"] .lev { background: var(--tirreno-vivo); }
[aria-checked="true"] .lev::after { transform: translateX(20px); }

/* ---------- meteo ---------- */
.meteo-top { border-radius: 24px; padding: 18px; color: #fff; background: linear-gradient(165deg, var(--mare-2), #0e6d84 65%, #0b7f86); position: relative; overflow: hidden; margin-bottom: 12px; }
.meteo-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--scacchi) 0 0 / 14px 14px; opacity: .14; }
.meteo-top .gradi { font-size: 68px; }
.meteo-top .riga-m { display: flex; justify-content: space-between; align-items: flex-start; }
.meteo-top .ico.grande { width: 58px; height: 58px; }
.meteo-top p { margin: 6px 0 0; opacity: .92; }
.battuta { font: 650 16px/1.3 var(--display); margin: 12px 0 0 !important; opacity: 1 !important; }
.quadri { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.quadro { background: var(--card); border-radius: 18px; padding: 12px 14px; min-width: 0; }
.quadro.largo { grid-column: 1 / -1; }
.quadro small { color: var(--testo-2); font-size: 12.5px; }
.quadro b { display: flex; align-items: center; gap: 8px; font: 750 22px/1.1 var(--display); margin: 4px 0 2px; }
.quadro span { font-size: 13px; color: var(--testo-2); line-height: 1.35; }
.aria-pallino { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--aq, #2b8a3e); flex: none; }
.aria-0 { --aq: #2b8a3e; } .aria-1 { --aq: #74b816; } .aria-2 { --aq: #f2b705; } .aria-3 { --aq: #f76707; } .aria-4 { --aq: #e03131; } .aria-5 { --aq: #862e9c; }
.aria-mini { font-weight: 600; }
.aria-mini .aria-pallino { width: 9px; height: 9px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); margin-right: 2px; }
.ore { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gut)) 12px; padding: 0 var(--gut); scrollbar-width: none; }
.ore::-webkit-scrollbar { display: none; }
.ora-m { flex: none; width: 64px; border-radius: 16px; background: var(--card); padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12.5px; }
.ora-m b { font: 700 16px var(--display); }
.ora-m .ico { width: 22px; height: 22px; }
.ora-m .v { color: var(--testo-2); font-size: 11.5px; text-align: center; line-height: 1.2; display: flex; flex-direction: column; }
.ora-m .pioggia { color: #1864ab; font-weight: 700; }
:root[data-theme="dark"] .ora-m .pioggia { color: #74c0fc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ora-m .pioggia { color: #74c0fc; } }
.giorni .tr { align-items: center; }
.giorni .ico { width: 20px; height: 20px; }

/* ---------- ricerca ---------- */
.ris-gruppo { color: var(--testo-2); font-size: 13px; font-weight: 650; margin: 16px 0 4px; text-transform: none; }
.recenti { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- info ---------- */
.testo-lungo h4 { font: 700 17px var(--display); margin: 20px 0 6px; }
.testo-lungo p, .testo-lungo li { color: var(--testo); font-size: 14.5px; line-height: 1.5; }
.testo-lungo ul { padding-left: 18px; margin: 6px 0; }
.testo-lungo small { color: var(--testo-2); }

/* ---------- il mio punto ---------- */
.io { width: 22px; height: 22px; position: relative; pointer-events: none; }
.io i { position: absolute; border-radius: 50%; }
.io-punto { inset: 3px; background: #1a7fe0; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.io-alone { inset: -10px; background: rgba(26, 127, 224, .16); animation: alone 2.4s ease-out infinite; }
@keyframes alone { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.io-cono { display: none; }
.io.con-dir .io-cono { display: block; left: -19px; top: -40px; width: 60px; height: 60px; border-radius: 0; transform: rotate(var(--dir)); transform-origin: 50% 85%;
  background: radial-gradient(circle at 50% 85%, rgba(26, 127, 224, .45), rgba(26, 127, 224, 0) 70%); clip-path: polygon(50% 85%, 15% 0, 85% 0); }

/* ---------- avvio, toast, suggerimento iPhone, nuova versione ---------- */
#avvio { position: fixed; inset: 0; z-index: 100; background: radial-gradient(120% 70% at 50% 38%, #123a5a 0%, #0c1b28 45%, #0b0d10 80%); display: grid; place-items: center; align-content: center; gap: 18px; transition: opacity .45s .05s, visibility .45s .05s; color: #fff; text-align: center; padding: 24px; }
#avvio.via { opacity: 0; visibility: hidden; }
#avvio.errore { opacity: 1; visibility: visible; }
#avvio p { margin: 0; font: 600 16px/1.4 var(--testo-f); max-width: 28ch; }
#avvio .avvio-frase { font: 800 22px/1.15 var(--display); max-width: none; }
#avvio button { background: #fff; color: #0b3954; font-weight: 700; padding: 12px 22px; border-radius: 14px; min-height: 48px; }
.avvio-marchio { width: 132px; height: 132px; border-radius: 34px; background: linear-gradient(#13527a, #0b3954); position: relative; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 18px; color: #fff; font: 800 38px/0.92 var(--display); letter-spacing: -.035em; animation: respira 2s ease-in-out infinite; }
.avvio-marchio b { display: block; font-weight: 800; }
.avvio-marchio i { font-style: normal; color: var(--tramonto); }
.avvio-marchio::before { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 30px; background: var(--scacchi) 0 0 / 30px 30px; }
.avvio-marchio::after { content: ''; position: absolute; left: 0; right: 0; bottom: 36px; height: 4px; background: #12b5b3; }
@keyframes respira { 50% { transform: scale(1.03); } }
#toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--sab) + 24px); transform: translate(-50%, 20px); background: #0c2b3d; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; line-height: 1.35; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); width: max-content; text-align: center; box-shadow: var(--ombra); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.suggerimento { background: var(--card); border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; margin-top: 16px; font-size: 13.5px; line-height: 1.4; }
.suggerimento .ico { color: var(--tirreno-t); }
.nuova { position: fixed; z-index: 95; left: 50%; top: calc(var(--sat) + 76px); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); text-align: left; display: flex; gap: 8px; align-items: center; background: var(--mare-2); color: #fff; font-weight: 650; font-size: 14px; padding: 10px 16px; border-radius: 999px; box-shadow: var(--ombra); min-height: 44px; animation: scende .3s var(--molla); }
.nuova .ico { width: 18px; height: 18px; }

/* ---------- schermo largo e telefono in orizzontale: pannello a sinistra ---------- */
@media (min-width: 900px), (orientation: landscape) and (min-width: 640px) and (max-height: 560px) {
  #cerca { left: 16px; right: auto; width: 408px; top: calc(var(--sat) + 12px); }
  #foglio { left: 16px; right: auto; width: 408px; top: calc(var(--sat) + 80px); bottom: 12px; height: auto; transform: none !important; border-radius: 24px; box-shadow: var(--ombra); touch-action: auto; }
  .maniglia { display: none; }
  #foglio .testata { padding-top: 14px; }
  #foglio.casa .corpo { padding-top: 14px; }
  .corpo { padding-bottom: calc(var(--sab) + 24px); }
  #controlli { bottom: 24px !important; right: 16px; }
  body[data-foglio="alto"] #controlli, body[data-foglio="largo"] #controlli { opacity: 1; pointer-events: auto; }
  #guida { left: 440px; right: auto; width: 420px; top: 16px; }
  .maplibregl-ctrl-top-left { top: 16px; left: 432px; }
  .adesso { width: 300px; }
}
@media (orientation: landscape) and (min-width: 640px) and (max-height: 560px) {
  #cerca { width: 360px; } #foglio { width: 360px; } #guida { left: 392px; } .maplibregl-ctrl-top-left { left: 384px; }
}

/* ZTL: testi lunghi in tabella, dubbi */
.tabella.testo-tab .tr { flex-direction: column; gap: 2px; }
.tabella.testo-tab .tr b { font-size: 13px; color: var(--testo-2); font-weight: 650; }
.tabella.testo-tab .tr span { color: var(--testo) !important; line-height: 1.45; }
.tabella.testo-tab .tr span.fonti-riga { color: var(--testo-2) !important; }
.dubbi { margin: 6px 0 12px; color: var(--testo-2); font-size: 13px; }
.dubbi summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; gap: 6px; color: var(--testo); list-style: none; }
.dubbi summary::-webkit-details-marker { display: none; }
.dubbi summary::after { content: '+'; margin-left: auto; font: 700 18px var(--display); color: var(--testo-2); }
.dubbi[open] summary::after { content: '–'; }
.dubbi li { margin: 4px 0; line-height: 1.45; }

/* casa: bus a tutta larghezza, meteo e ZTL affiancati */
.adesso-bus:not(.scorri-x) .adesso { width: 100%; }
.adesso-bus.scorri-x { padding-bottom: 4px; }
.adesso-due { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.adesso-due .adesso { width: auto; min-width: 0; min-height: 172px; padding: 13px 12px 12px; }
.adesso-due .gradi { font-size: 40px; }
.adesso-due .vento-riga { font-size: 13.5px; gap: 6px; }
.adesso-due .vento-riga span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adesso-due .sotto { font-size: 12.5px; line-height: 1.3; }
.battuta-mini { font: 600 12.5px/1.3 var(--display); opacity: .95; }
.adesso.largo-tutto { width: 100%; min-height: 0; margin-bottom: 10px; }
.ztl-stato { font: 750 20px/1.1 var(--display); color: var(--tirreno-t); letter-spacing: -.01em; }
.ztl-stato.on { color: var(--tramonto-scuro); }
.adesso-due .ztl-righe { gap: 4px; }
.adesso-due .ztl-z { padding: 0; background: none; }
.adesso-due .ztl-z b { min-width: 24px; height: 24px; border-radius: 7px; font-size: 12px; }

/* dock: i servizi più usati, una riga che scorre */
.dock { gap: 2px; margin: 0 calc(-1 * var(--gut)) 12px; padding: 2px 10px 4px; scroll-snap-type: x proximity; }
.servizio.mini { flex: none; width: 76px; min-height: 0; padding: 4px 0 2px; font-size: 11.5px; letter-spacing: -.01em; gap: 6px; scroll-snap-align: start; }
.servizio.mini .s-ico { width: 50px; height: 50px; border-radius: 16px; }
.servizio.mini .tg { width: 34px; height: 34px; }
.s-ico.tutti { --c: #4f6977; }
.s-ico.tutti .ico { width: 24px; height: 24px; position: relative; }

/* ---------- telefoni piccoli (320–375 px) ---------- */
@media (max-width: 374px) {
  :root { --gut: 12px; }
  .marchio { font-size: 30px; }
  .adesso-due { gap: 8px; }
  .adesso-due .adesso { padding: 12px 10px; }
  .adesso-due .gradi { font-size: 34px; }
  .griglia { gap: 4px 2px; }
  .testata .tit-ico { display: none; }
  .servizio .s-ico { width: 50px; height: 50px; border-radius: 16px; }
  .servizio .tg { width: 34px; height: 34px; }
  .testata { gap: 8px; }
  .testata h2 { font-size: 18px; }
  .testata h2.lungo { font-size: 16px; }
  .tit-ico, .tit-ico.t3d { width: 38px; height: 38px; border-radius: 12px; }
  .tit-ico.t3d .tg { width: 28px; height: 28px; }
  .testata .azioni { gap: 4px; }
  .modo b { font-size: 16px; }
  .btn { padding: 0 14px; font-size: 14.5px; }
  .riga { gap: 10px; }
  .riga .r-ico { width: 36px; height: 36px; }
  .pill { min-width: 36px; padding: 0 6px; }
  .seg button { padding: 0 8px; font-size: 13.5px; }
  .ora-grande { font-size: 17px; }
  .riga.treno { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .partenza .quando { font-size: 16px; }
}

/* ---------- scritte in rilievo, timbri e adesivi (js/rilievo.js) ----------
   Il 3D è fatto con ombre del testo a strati (niente immagini, niente librerie); le entrate muovono solo transform e
   opacity (scheda grafica, niente ricalcolo della pagina). Sono decorazioni: minuti, linee e ZTL restano scritti chiari. */
.ril { --ril-f: #0b3954; --ril-e: #ff7a45; --ril-o: rgba(11, 57, 84, .28);
  display: inline-block; font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--ril-f);
  text-shadow: .012em .016em 0 var(--ril-e), .024em .032em 0 var(--ril-e), .036em .048em 0 var(--ril-e), .048em .064em 0 var(--ril-e),
    .06em .08em 0 color-mix(in srgb, var(--ril-e) 72%, #000), .07em .1em .14em var(--ril-o); }
.ril-alto { text-shadow: .012em .016em 0 var(--ril-e), .024em .032em 0 var(--ril-e), .036em .048em 0 var(--ril-e), .048em .064em 0 var(--ril-e),
    .06em .08em 0 var(--ril-e), .072em .096em 0 var(--ril-e), .084em .112em 0 color-mix(in srgb, var(--ril-e) 70%, #000), .1em .15em .2em var(--ril-o); }
.ril-bianco { --ril-f: #fff; --ril-e: #062a40; --ril-o: rgba(0, 0, 0, .3); }
.ril-sole { --ril-f: #fff; --ril-e: #ff7a45; --ril-o: rgba(0, 0, 0, .35); }
.ril-fuoco { --ril-f: #d9480f; --ril-e: #0b3954; --ril-o: rgba(11, 57, 84, .2); }
:root[data-theme="dark"] .ril-mare { --ril-f: #fff; --ril-e: #3d93dc; --ril-o: rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .ril-fuoco { --ril-f: #ff9a6a; --ril-e: #000d14; --ril-o: rgba(0, 0, 0, .4); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ril-mare { --ril-f: #fff; --ril-e: #3d93dc; --ril-o: rgba(0, 0, 0, .6); }
  :root:not([data-theme="light"]) .ril-fuoco { --ril-f: #ff9a6a; --ril-e: #000d14; --ril-o: rgba(0, 0, 0, .4); }
}
.ril-parola { display: inline-block; white-space: nowrap; }
.ril-l { display: inline-block; }

/* entrate: una volta sola (rilievo.js mette ril-fermo ai ridisegni) */
.ril-pop { animation: ril-pop .6s cubic-bezier(.3, 1.45, .5, 1) var(--fa, 0ms) both; }
.ril-dondola { animation: ril-dondola .9s ease-out var(--fa, 0ms) both; transform-origin: 30% 80%; }
.ril-brivido { animation: ril-pop .5s cubic-bezier(.3, 1.45, .5, 1) var(--fa, 0ms) both, ril-brivido .09s linear calc(var(--fa, 0ms) + .6s) 8; }
.ril-rimbalzo .ril-l { animation: ril-salta .75s cubic-bezier(.25, .8, .35, 1) calc(var(--fa, 0ms) + var(--i) * 32ms) both; transform-origin: 50% 100%; }
.ril-goccia .ril-l { animation: ril-goccia .6s cubic-bezier(.3, 1.3, .5, 1) calc(var(--fa, 0ms) + var(--i) * 28ms) both; transform-origin: 50% 0; }
/* vento (libeccio, raffiche): la frase arriva e poi le lettere si piegano a raffiche, come i panni sugli Scali */
.ril-vento { animation: ril-pop .55s cubic-bezier(.3, 1.45, .5, 1) var(--fa, 0ms) both; }
.ril-vento .ril-l { animation: ril-raffica 3.4s ease-in-out calc(.8s + var(--i) * 38ms) infinite; transform-origin: 50% 90%; }
.ril-fermo, .ril-fermo:not(.ril-vento) .ril-l { animation: none !important; }

@keyframes ril-pop { from { opacity: 0; transform: scale(.35) rotate(-5deg); } }
@keyframes ril-dondola { 0% { opacity: 0; transform: rotate(-10deg) scale(.7); } 35% { opacity: 1; transform: rotate(6deg) scale(1.05); }
  55% { transform: rotate(-3.5deg); } 75% { transform: rotate(1.5deg); } 100% { transform: none; } }
@keyframes ril-salta { 0% { opacity: 0; transform: translateY(-.75em) rotate(-8deg); } 45% { opacity: 1; transform: translateY(.06em) scale(1.08, .86); }
  65% { transform: translateY(-.14em) scale(.97, 1.04); } 82% { transform: translateY(0) scale(1.02, .97); } 100% { transform: none; } }
@keyframes ril-goccia { from { opacity: 0; transform: translateY(-.55em) scaleY(1.25); } }
@keyframes ril-brivido { 50% { transform: translateX(.03em) rotate(.6deg); } }
@keyframes ril-raffica { 0%, 52%, 100% { transform: none; } 60% { transform: translateX(.08em) rotate(8deg) skewX(-10deg); }
  68% { transform: translateX(-.03em) rotate(-4deg); } 76% { transform: translateX(.05em) rotate(4deg) skewX(-5deg); } 86% { transform: translateX(-.01em) rotate(-1deg); } }

/* timbro di gomma: doppio bordo, un po' storto, si «timbra» entrando */
.timbro { --tb: #c92a2a; --tb-f: #fff; display: inline-block; font: 800 12px/1.15 var(--display); letter-spacing: .03em; text-transform: uppercase;
  color: var(--tb); background: var(--tb-f); padding: 6px 10px 5px; border: 2.5px solid currentColor; border-radius: 8px; rotate: var(--rot, -3deg);
  box-shadow: inset 0 0 0 2px var(--tb-f), inset 0 0 0 3.5px currentColor, 0 4px 10px -6px rgba(8, 36, 54, .45);
  text-shadow: .03em .045em 0 color-mix(in srgb, currentColor 28%, transparent); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  animation: timbra .55s cubic-bezier(.2, .9, .3, 1.15) var(--fa, 0ms) both; }
.tb-tramonto { --tb: #c2410c; }
.tb-verde { --tb: #0f7a52; }
:root[data-theme="dark"] .timbro { --tb: #ff8f8f; --tb-f: #2a1416; }
:root[data-theme="dark"] .timbro.tb-tramonto { --tb: #ffb08a; --tb-f: #2b1a10; }
:root[data-theme="dark"] .timbro.tb-verde { --tb: #5fe0a9; --tb-f: #0f2a20; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .timbro { --tb: #ff8f8f; --tb-f: #2a1416; }
  :root:not([data-theme="light"]) .timbro.tb-tramonto { --tb: #ffb08a; --tb-f: #2b1a10; }
  :root:not([data-theme="light"]) .timbro.tb-verde { --tb: #5fe0a9; --tb-f: #0f2a20; }
}
@keyframes timbra { 0% { opacity: 0; transform: scale(2.1); } 55% { opacity: 1; transform: scale(.93); } 78% { transform: scale(1.03); } 100% { transform: none; } }

/* adesivo fustellato: bordo bianco, ombra, un po' di sghimbescio */
.adesivo { --ad: #ff7a45; --ad-t: #0b3954; display: inline-block; font: 800 12px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
  color: var(--ad-t); background: var(--ad); padding: 6px 10px 5px; border-radius: 10px; border: 2.5px solid #fff; rotate: var(--rot, -3deg);
  box-shadow: 0 1.5px 0 rgba(0, 0, 0, .1), 0 6px 12px -6px rgba(8, 36, 54, .6); position: relative;
  animation: attacca .6s cubic-bezier(.3, 1.45, .5, 1) var(--fa, 0ms) both; }
.ad-mare { --ad: #13527a; --ad-t: #fff; }
.ad-verde { --ad: #117a4f; --ad-t: #fff; }
.ad-giallo { --ad: #ffd43b; --ad-t: #0b3954; }
.ad-scacchi { padding-left: 22px; overflow: hidden; }
.ad-scacchi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--scacchi) 0 0 / 6px 6px; border-right: 2px solid #12b5b3; }
.timbro.ril-fermo, .adesivo.ril-fermo { animation: none; }
@keyframes attacca { 0% { opacity: 0; transform: scale(.4) translateY(8px); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: none; } }

/* casa: adesivo col marchio, saluto grande in rilievo */
.casa-testa { align-items: flex-start; }
.ct-testo { min-width: 0; flex: 1; }
.ct-riga { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 30px; }
.marchio-ad { display: inline-block; position: relative; overflow: hidden; margin: 0; font: 800 17px/1 var(--display); letter-spacing: -.03em; color: #fff;
  background: #0b3954; padding: 5px 10px 10px; border-radius: 9px; rotate: -3deg; box-shadow: 0 1.5px 0 rgba(0, 0, 0, .12), 0 6px 12px -6px rgba(8, 36, 54, .6); }
.marchio-ad .esc { color: var(--tramonto); }
.marchio-ad::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--scacchi) 0 0 / 5px 5px; border-top: 1.5px solid #12b5b3; }
:root[data-theme="dark"] .marchio-ad { background: #13527a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marchio-ad { background: #13527a; } }
.ct-ora { color: var(--testo-2); font-size: 13px; font-weight: 550; }
.saluto-ril { margin: 10px 0 0; font-size: clamp(27px, 8.4vw, 34px); line-height: 1.04; padding-bottom: .12em; }
.saluto-ril .ril { line-height: 1.04; }

/* il tormentone der giorno */
.tormentone { position: relative; display: block; width: 100%; text-align: left; margin: 22px 0 0; padding: 14px 16px 30px; border-radius: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(110% 90% at 100% 0%, rgba(255, 168, 120, .55) 0%, rgba(255, 168, 120, 0) 55%), linear-gradient(155deg, #f2652a, #d9480f 60%, #b8380a);
  box-shadow: var(--ombra-s); transition: transform .15s ease; }
.tormentone:active { transform: scale(.985); }
.tormentone::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--scacchi) 0 0 / 12px 12px; border-top: 3px solid #12b5b3; }
.tm-tit { --rot: -2.5deg; }
.tm-frase { display: block; margin: 12px 0 10px; font-size: clamp(20px, 5.9vw, 24px); line-height: 1.14; min-height: 2.3em; }
.tm-frase .ril { line-height: 1.16; }
.tm-sotto { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 13px; color: #fff; }
.tm-sotto .ico { width: 16px; height: 16px; }
.casa-firma { display: flex; justify-content: center; margin: 26px 0 -8px; }
.casa-firma .adesivo { --rot: -2deg; font-size: 13px; }

/* avvisi in rilievo: sciopero (timbro sopra al testo, che resta tutto leggibile) */
.con-timbro { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; }
.con-timbro > .timbro { grid-column: 1; justify-self: start; display: inline-block; flex: none; -webkit-line-clamp: none; margin: 2px 0 0 2px; }
.con-timbro > span:not(.timbro) { grid-column: 1; }
.con-timbro > .ico:last-child { grid-column: 2; grid-row: 1 / span 2; }
.striscia.con-timbro { padding-top: 12px; }

/* ZTL: timbro nell'angolo della carta in casa, timbro grande in cima alla scheda */
.adesso .ztl-angolo { position: absolute; top: 12px; right: 9px; --rot: 7deg; font-size: 10px; padding: 4px 6px 3px; z-index: 1; max-width: 58%; }
.adesso .ztl-angolo.adesivo { border-width: 2px; }
.ril-riga { display: flex; justify-content: center; margin: 4px 0 14px; }
.ril-riga .timbro, .ril-riga .adesivo { font-size: 16px; padding: 8px 14px 7px; }

/* bus: «arriva!» in rilievo al posto dei minuti, adesivo «corri» nell'angolo della carta */
.quando .arriva { font-size: 17px; text-transform: uppercase; letter-spacing: 0; }
.adesso .ad-angolo { position: absolute; top: 11px; right: 10px; z-index: 1; --rot: 4deg; font-size: 11px; }
.adesso.con-adesivo h4 { padding-right: min(46%, 168px); }
.r-adesivo { display: block; margin: 0 0 5px; }
.r-adesivo .adesivo { font-size: 10.5px; padding: 4px 8px 3px; border-width: 2px; --rot: -2deg; }
.banda.notte .ad-riga { flex-basis: 100%; margin: 2px 0 2px; }

/* meteo: la battuta grossa e in rilievo */
.meteo-top .battuta .ril { font-size: 21px; line-height: 1.18; }
.battuta-mini .ril { font-size: 13px; line-height: 1.22; letter-spacing: -.01em; }
.vuoto-grande h4 .ril { font-size: 23px; line-height: 1.12; }
.adesso .vuoto .ril { font-size: 17px; }
#toast .toast-ril { display: block; font-size: 19px; margin: 2px 0 6px; }
#guida .g-m.ril { font-size: 26px; line-height: 1.05; }
.firma-info { margin: 22px 0 6px; display: grid; justify-items: start; gap: 12px; }
.firma-info .ril { font-size: 20px; line-height: 1.18; }


/* nero e blu: il tormentone diventa blu mare sul nero, l'etichetta un adesivo nero */
:root[data-theme="dark"] .tormentone { background: radial-gradient(110% 90% at 100% 0%, rgba(76, 179, 255, .35) 0%, rgba(76, 179, 255, 0) 55%), linear-gradient(155deg, #2373b3, #13527a 55%, #0b3954); }
:root[data-theme="dark"] .tormentone .ril-bianco { --ril-e: #03111c; }
:root[data-theme="dark"] .tm-tit { --ad: #0b0d10; --ad-t: #fff; }
:root[data-theme="dark"] .marchio-ad { background: #1d6aa5; }
:root[data-theme="light"] #avvio { background: linear-gradient(#13527a, #0b3954); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tormentone { background: radial-gradient(110% 90% at 100% 0%, rgba(76, 179, 255, .35) 0%, rgba(76, 179, 255, 0) 55%), linear-gradient(155deg, #2373b3, #13527a 55%, #0b3954); }
  :root:not([data-theme="light"]) .tormentone .ril-bianco { --ril-e: #03111c; }
  :root:not([data-theme="light"]) .tm-tit { --ad: #0b0d10; --ad-t: #fff; }
}
@media (prefers-color-scheme: light) { :root:not([data-theme]) #avvio { background: linear-gradient(#13527a, #0b3954); } }

/* ---------- meno movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .vivo, .io-alone, .avvio-marchio { animation: none !important; }
  /* le scritte restano in rilievo, solo ferme */
  .ril, .ril .ril-l, .timbro, .adesivo { animation: none !important; }
}
