:root {
  --bg: #eef3f5; --sf: #ffffff; --sf2: #f5f8f9; --ink: #12303f; --mute: #4f6877; --line: #d3dee3;
  --accent: #0f6f90; --accent-ink: #ffffff; --focus: #1d8fb3;
  --ottimo: #3fae6c; --buono: #2a9d8f; --discreto: #d99a1e; --scarso: #8fb0c1; --fermo: #c2ced4;
  --ottimo-t: #17693a; --buono-t: #1d7268; --discreto-t: #8a5d00; --scarso-t: #4f6877;
  --div-bg: #fde8e6; --div-ink: #8f1d12; --att-bg: #fff4d9; --att-ink: #6b4b00;
  --notte: #4f5bd5; --alba: #b1461f; --tramonto: #8a5d00; --giorno: #0f6f90;
  --ombra: 0 1px 2px rgba(18, 48, 63, .06), 0 4px 16px rgba(18, 48, 63, .06);
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1821; --sf: #122431; --sf2: #183040; --ink: #e6eef2; --mute: #9fb3bf; --line: #24394a;
    --accent: #5fc9ea; --accent-ink: #062130; --focus: #5fc9ea;
    --ottimo: #3cc47a; --buono: #3fbfb0; --discreto: #f0b93e; --scarso: #7d99a9; --fermo: #8196a3;
    --ottimo-t: #6fdc9f; --buono-t: #6fd6ca; --discreto-t: #f3c566; --scarso-t: #a9c0cd;
    --div-bg: #3a1714; --div-ink: #ffb4aa; --att-bg: #2e2712; --att-ink: #f0d78c;
    --notte: #a3acff; --alba: #ff9a78; --tramonto: #f0b93e; --giorno: #5fc9ea;
    --ombra: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1821; --sf: #122431; --sf2: #183040; --ink: #e6eef2; --mute: #9fb3bf; --line: #24394a;
  --accent: #5fc9ea; --accent-ink: #062130; --focus: #5fc9ea;
  --ottimo: #3cc47a; --buono: #3fbfb0; --discreto: #f0b93e; --scarso: #7d99a9; --fermo: #8196a3;
  --ottimo-t: #6fdc9f; --buono-t: #6fd6ca; --discreto-t: #f3c566; --scarso-t: #a9c0cd;
  --div-bg: #3a1714; --div-ink: #ffb4aa; --att-bg: #2e2712; --att-ink: #f0d78c;
  --notte: #a3acff; --alba: #ff9a78; --tramonto: #f0b93e; --giorno: #5fc9ea;
  --ombra: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; }  /* niente zoom con le dita nelle pagine (richiesta di Daniele) */
.leaflet-container { touch-action: none; }  /* sulla mappa il pinch lo gestisce Leaflet: zoom della carta */
.zoom-box { touch-action: pan-x pan-y; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}
h1, h2, h3 { font-family: "Barlow Condensed", Barlow, system-ui, sans-serif; line-height: 1.1; margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.nascosto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.ico { width: 22px; height: 22px; flex: none; }
.ico.piccola { width: 16px; height: 16px; }

/* testa */
.testa {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line);
}
.posto {
  display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 70%;
  background: var(--sf); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-weight: 600; cursor: pointer;
}
.posto span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stato { color: var(--mute); font-size: .82rem; text-align: right; }

main { max-width: 760px; margin: 0 auto; padding: 12px 16px 24px; }
.titolo { font-size: 2.2rem; margin: 8px 0 12px; }

/* giorni e ore */
.giorni { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.giorni::-webkit-scrollbar { display: none; }
.giorni button {
  flex: none; min-width: 58px; border: 1.5px solid var(--line); background: var(--sf); border-radius: 14px;
  padding: 6px 8px 8px; display: grid; justify-items: center; gap: 0; cursor: pointer; position: relative;
}
.giorni button span { font-size: .78rem; color: var(--mute); text-transform: capitalize; }
.giorni button b { font: 700 1.3rem/1.1 "Barlow Condensed", sans-serif; }
.giorni button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.giorni button[aria-selected="true"] span { color: inherit; opacity: .85; }
.punto { width: 8px; height: 8px; border-radius: 50%; margin-top: 3px; background: var(--fermo); }

.ore-box { background: var(--sf); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 4px; box-shadow: var(--ombra); }
.ore { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 64px; align-items: end; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 8px; }
.ora { height: 100%; display: flex; align-items: flex-end; border-radius: 4px; position: relative; }
.ora.l-n { background: color-mix(in srgb, var(--notte) 10%, transparent); }
.ora.l-c { background: color-mix(in srgb, var(--tramonto) 14%, transparent); }
.ora .barra { display: block; width: 100%; border-radius: 3px 3px 1px 1px; min-height: 4px; }
.ora.passata { opacity: .45; }
.ora.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
/* numeri sotto ogni barra e bolla con l'ora scelta */
.ore-box { position: relative; padding-top: 34px; }
.ore-num { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin-top: 3px; text-align: center; font: 500 .66rem/1.3 Barlow, sans-serif; color: var(--mute); font-variant-numeric: tabular-nums; }
.ore-num span { letter-spacing: -.02em; }
.ore-num .sel { color: var(--ink); font-weight: 700; }
.bolla-ora { position: absolute; top: 4px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font: 700 .9rem/1 Barlow, sans-serif; padding: 5px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.bolla-ora::after { content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.bolla-ora:empty { display: none; }

.barra.ottimo, .pill.ottimo, .l.ottimo, .punto.ottimo { background: var(--ottimo); }
.barra.buono, .pill.buono, .l.buono, .punto.buono { background: var(--buono); }
.barra.discreto, .pill.discreto, .l.discreto, .punto.discreto { background: var(--discreto); }
.barra.scarso, .pill.scarso, .l.scarso, .punto.scarso { background: var(--scarso); }
.barra.fermo, .pill.fermo, .punto.fermo { background: var(--fermo); }

.pill { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 7px; border-radius: 999px; font: 700 .95rem "Barlow Condensed", sans-serif; color: #0b1c26; }
.pill.grande { min-width: 46px; height: 38px; font-size: 1.25rem; border-radius: 12px; }

/* eroe */
.eroe, .scheda { background: var(--sf); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-top: 14px; box-shadow: var(--ombra); }
.eroe-alto { display: flex; gap: 14px; align-items: center; }
.punteggio { position: relative; width: 92px; height: 92px; flex: none; }
.punteggio b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 2.3rem "Barlow Condensed", sans-serif; }
.anello { width: 100%; height: 100%; }
.anello-fondo { fill: none; stroke: var(--sf2); stroke-width: 9; }
.anello-val { fill: none; stroke-width: 9; stroke-linecap: round; }
.anello-val.ottimo { stroke: var(--ottimo); } .anello-val.buono { stroke: var(--buono); } .anello-val.discreto { stroke: var(--discreto); }
.anello-val.scarso { stroke: var(--scarso); } .anello-val.fermo { stroke: var(--fermo); }
.eroe-testo { min-width: 0; }
.quando { margin: 0; color: var(--mute); font-size: .88rem; text-transform: capitalize; }
.eroe h2 { font-size: 1.75rem; margin: 1px 0 2px; }
.giudizio { margin: 0; font-weight: 700; }
.giudizio.ottimo { color: var(--ottimo-t); } .giudizio.buono { color: var(--buono-t); } .giudizio.discreto { color: var(--discreto-t); } .giudizio.scarso, .giudizio.fermo { color: var(--scarso-t); }
.sotto { margin: 2px 0 0; color: var(--mute); font-size: .9rem; }

.top-specie { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.top-specie button { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--sf2); border: 0; border-radius: 12px; padding: 6px 10px 6px 6px; cursor: pointer; text-align: left; }
.top-specie button span { flex: 1; font-weight: 600; }
.mini { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); display: block; }
.senza-foto { display: block; background: var(--line) center/40% no-repeat; }

.motivi { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.motivi li { font-size: .88rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1.5px solid; }
.motivi .pos { color: var(--ottimo-t); border-color: color-mix(in srgb, var(--ottimo) 55%, transparent); }
.motivi .neg { color: var(--mute); border-color: var(--line); }

.avvisi { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.avvisi li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; font-size: .92rem; line-height: 1.35; }
.avvisi li.divieto { background: var(--div-bg); color: var(--div-ink); }
.avvisi li.attenzione { background: var(--att-bg); color: var(--att-ink); }
.avvisi .ico { width: 18px; height: 18px; margin-top: 1px; }
.spot-note { margin: 10px 0 0; font-size: .9rem; color: var(--mute); }
.spot-note b { color: var(--ink); font-weight: 600; }

/* esca */
.esca-ora h2 { font-size: 1.1rem; color: var(--mute); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.esca-prima { display: flex; gap: 12px; align-items: center; }
.esca-foto { width: 120px; height: 84px; object-fit: contain; padding: 4px; border-radius: 12px; background: #fff; flex: none; border: 1px solid var(--line); }
.esca-nome { margin: 0; font: 700 1.35rem/1.15 "Barlow Condensed", sans-serif; }
.codice { display: inline-block; font-size: .95rem; padding: 0 8px; border-radius: 999px; background: var(--ink); color: var(--bg); vertical-align: 2px; }
.esca-col { margin: 2px 0 0; color: var(--mute); font-size: .92rem; }
.perche { margin: 6px 0 0; font-size: .95rem; }
.passi { margin: 12px 0 0; padding-left: 1.3em; }
.passi li { margin: 3px 0; }
.note-esca { margin: 10px 0 0; padding: 8px 10px 8px 26px; background: var(--att-bg); color: var(--att-ink); border-radius: 10px; font-size: .92rem; }
.seconda { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--mute); }
.seconda summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; min-height: 44px; }
.seconda summary::-webkit-details-marker { display: none; }
.seconda .apri { display: block; margin-top: 2px; color: var(--accent); font-weight: 600; }
.seconda .apri::after { content: " ▾"; }
.seconda details[open] .apri::after { content: " ▴"; }
.seconda .passi { color: var(--ink); }
.seconda b { color: var(--ink); }
.esca-mini { width: 64px; height: 40px; object-fit: contain; padding: 2px; border-radius: 8px; background: #fff; flex: none; border: 1px solid var(--line); }

/* blocchi */
.blocco { margin-top: 26px; }
.blocco > h2 { font-size: 1.55rem; margin-bottom: 8px; }
.posti, .finestre { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.posto-riga, .finestra { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--sf); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; cursor: pointer; }
.posto-riga.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.posto-testo, .finestra > span { flex: 1; min-width: 0; display: grid; }
.posto-nome { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.posto-sotto { color: var(--mute); font-size: .88rem; }
.att { width: 16px; height: 16px; color: var(--att-ink); }
.vuoto { color: var(--mute); padding: 8px 2px; }

.condizioni { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cella { background: var(--sf); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.cella h3 { font: 600 .8rem Barlow, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.val { margin: 4px 0 2px; font: 700 1.5rem/1.1 "Barlow Condensed", sans-serif; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.val small { font-size: .9rem; font-weight: 500; color: var(--mute); }
.sub { margin: 0; font-size: .84rem; color: var(--mute); line-height: 1.35; }
.freccia { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sf2); }
.freccia .ico { width: 18px; height: 18px; }
.luna-buia { fill: var(--sf2); stroke: var(--line); }
.luna-luce { fill: #e9d98f; }
.spark { width: 100%; max-width: 170px; height: 38px; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2; }
.spark .dot { fill: var(--ink); }

.avviso-forte { display: flex; gap: 8px; background: var(--div-bg); color: var(--div-ink); padding: 10px; border-radius: 10px; font-weight: 600; }
#avvisi p { margin: 6px 0; }
.nota { color: var(--mute); font-size: .88rem; }
.piede { color: var(--mute); font-size: .85rem; margin-top: 28px; text-align: center; }

/* mappa */
.mappa-barra { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.scelta select {
  appearance: none; -webkit-appearance: none; height: 40px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--sf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%234f6877' stroke-width='2.4'/%3E%3C/svg%3E") no-repeat right 10px center/16px;
  padding: 0 34px 0 14px; font: 600 1rem Barlow, sans-serif; color: var(--ink);
}
.mappa-ora { color: var(--mute); font-size: .9rem; }
.mappa { height: calc(100dvh - 390px); min-height: 320px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
/* vento sulla mappa */
.vento-tasto {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 2px solid rgba(0,0,0,.2); background: #fff; color: #12303f; font: 600 14px Barlow, sans-serif; background-clip: padding-box;
}
.vento-tasto .ico { width: 18px; height: 18px; }
.vento-tasto[aria-pressed="true"] { background: #0f6f90; color: #fff; }
.vento-tasto:focus-visible { outline: 3px solid #f0b93e; outline-offset: 2px; }
.vento-scie { position: absolute; left: 0; top: 0; }
.vento-pannello { margin-top: 8px; }
.tempo-mappa { display: block; position: relative; padding-top: 36px; }
.tempo-mappa label { display: block; }
/* cursore disegnato uguale su iPhone e Chrome: pallino di 28 px, così bolla e scala si allineano al centro */
.tempo-mappa input { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; }
.tempo-mappa input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line); }
.tempo-mappa input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.tempo-mappa input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--sf); border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.tempo-mappa input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--sf); border: 3px solid var(--accent); }
.tempo-mappa input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.scala-tempo { position: relative; height: 30px; margin-top: 2px; }
.scala-tempo .tacca { position: absolute; top: 0; width: 1px; height: 6px; background: var(--mute); transform: translateX(-50%); }
.scala-tempo .tacca.giorno { height: 12px; width: 2px; background: var(--ink); }
.scala-tempo .giorno-nome { position: absolute; top: 12px; transform: translateX(-50%); font: 600 .78rem Barlow, sans-serif; color: var(--mute); white-space: nowrap; }
.vento-qui { margin: 2px 0 6px; font-size: .95rem; min-height: 1.4em; }
.vento-qui small { color: var(--mute); font-size: .85rem; }
.scala-vento .barra { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3b8bd1, #3fbfb0, #9bd14b, #f0b93e, #e4572e, #b0306a); }
.scala-vento .num { display: flex; justify-content: space-between; font-size: .78rem; color: var(--mute); margin-top: 2px; }
.scala-vento .num i { font-style: normal; }
.legenda { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: .85rem; color: var(--mute); }
.legenda span { display: flex; align-items: center; gap: 5px; }
.l { width: 18px; height: 6px; border-radius: 3px; display: inline-block; }
.l.vietato { background: repeating-linear-gradient(90deg, #6b7780 0 4px, transparent 4px 7px); }
.leaflet-popup-content { font: 400 14px/1.4 Barlow, sans-serif; margin: 10px 12px; }
.leaflet-popup-content p { margin: 3px 0; }
.pop-t { font-weight: 700; font-size: 15px; }
.pop-div { color: #8f1d12; }
.pop-sub { color: #4f6877; font-size: 13px; }
.pop-vietato { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #12303f; font-weight: 600; }
.pop-vietato .ico { width: 16px; height: 16px; color: #6b7780; flex: none; }
.pop-punto button { margin-top: 8px; width: 100%; min-height: 40px; }

/* pesci */
.filtri { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filtri button { border: 1.5px solid var(--line); background: var(--sf); border-radius: 999px; padding: 7px 14px; font-weight: 600; cursor: pointer; }
.filtri button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.griglia-pesci { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pesce { width: 100%; display: flex; gap: 12px; align-items: center; background: var(--sf); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 8px; text-align: left; cursor: pointer; }
.pesce .foto { width: 96px; height: 64px; object-fit: contain; padding: 3px; border-radius: 10px; flex: none; background: #fff; display: block; }
.pesce-testo { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pesce-nome { font: 700 1.2rem/1.1 "Barlow Condensed", sans-serif; }
.pesce-sotto { color: var(--mute); font-size: .85rem; }
.riva { font-size: .8rem; font-weight: 600; color: var(--mute); }
.riva.alta { color: var(--ottimo-t); } .riva.media { color: var(--buono-t); }
.mesi { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; max-width: 220px; margin-top: 2px; }
.mesi i { height: 16px; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(var(--v) * 85%), var(--sf2)); position: relative; display: grid; place-items: center; font-style: normal; }
.mesi i em { font-style: normal; font-size: 9px; font-weight: 700; color: var(--ink); opacity: .75; }
.mesi i.ora { outline: 2px solid var(--ink); outline-offset: 0; }
.mesi-grande .mesi { max-width: none; }
.mesi-grande .mesi i { height: 24px; }
.mesi-grande .mesi i em { font-size: 11px; }

/* dialoghi */
dialog.foglio { border: 0; padding: 0 16px 20px; width: min(560px, 100%); max-height: 88dvh; border-radius: 20px; background: var(--bg); color: var(--ink); overflow: auto; }
dialog.foglio.largo { width: min(680px, 100%); }
dialog::backdrop { background: rgba(6, 20, 28, .55); }
@media (max-width: 600px) {
  dialog.foglio { margin: auto 0 0; max-width: 100%; width: 100%; border-radius: 20px 20px 0 0; max-height: 92dvh; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}
.foglio-testa { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; z-index: 2; }
.foglio-testa h2 { font-size: 1.7rem; min-width: 0; }
.chiudi { flex: none; margin-left: 10px; border: 0; background: var(--sf); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.primario { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 12px; cursor: pointer; }
.primario.piccolo { width: auto; padding: 8px 12px; font-size: .92rem; }
.primario:disabled { opacity: .6; }
dialog h3 { font-size: 1.2rem; margin: 16px 0 8px; }
.elenco-posti { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.elenco-posti button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--sf); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; }
.elenco-posti small { color: var(--mute); font-weight: 500; }

.pesce-foto { margin: 0; }
.pesce-foto .grande { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; padding: 8px; border-radius: 14px; display: block; background: #fff; }
.pesce-foto figcaption { font-size: .78rem; color: var(--mute); margin-top: 4px; }
.latino { margin: 8px 0 0; color: var(--mute); }
.adesso { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-weight: 600; }
.mesi-grande { margin: 12px 0 4px; }
.righe { margin: 12px 0 0; border-top: 1px solid var(--line); }
.riga { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.riga dt { font-weight: 700; }
.riga dd { margin: 0; color: var(--mute); }
@media (max-width: 420px) { .riga { grid-template-columns: 1fr; gap: 1px; } }
.norma { background: var(--att-bg); color: var(--att-ink); padding: 8px 10px; border-radius: 10px; font-size: .94rem; }
.consiglio { background: var(--sf); border-left: 4px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.punti { margin: 4px 0 0; padding-left: 1.2em; }
.punti li { margin: 4px 0; }
.esche-pesce { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.esche-pesce li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }

/* esche */
.esca-card { background: var(--sf); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: var(--ombra); }
.esca-card h2 { font-size: 1.75rem; }
.chip { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chip li { font-size: .82rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--sf2); color: var(--mute); }
.colori { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.colori figure { margin: 0; background: var(--sf2); border-radius: 14px; overflow: hidden; border: 2px solid transparent; }
.colori figure.consigliata { border-color: var(--ottimo); }
.col-foto { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #fff; display: block; padding: 4px; }
.colori figure.alternativa { border-color: var(--line); border-style: dashed; }
/* un solo colore (esche lunghe come lo Stylo): scheda a tutta larghezza, foto più bassa */
.colori figure:only-child { grid-column: 1 / -1; }
.colori figure:only-child .col-foto { aspect-ratio: 4 / 1; }
.colori figcaption { padding: 8px 10px 10px; font-size: .9rem; display: grid; gap: 3px; }
.colori figcaption b { font: 700 1.15rem "Barlow Condensed", sans-serif; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags i { font-style: normal; font-size: .76rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1.5px solid currentColor; }
.t-notte { color: var(--notte); } .t-alba { color: var(--alba); } .t-tramonto { color: var(--tramonto); } .t-giorno { color: var(--giorno); }
.cond { color: var(--mute); }
.badge { justify-self: start; background: var(--ottimo); color: #07210f; font-weight: 700; font-size: .78rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.re-bollini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge.due { background: var(--sf); color: var(--ink); border: 1.5px solid var(--line); }
.quando-esca { font-weight: 600; margin: 14px 0 0; }
.tip { background: var(--att-bg); color: var(--att-ink); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; font-size: .94rem; }
.sistema { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; font-size: .94rem; }
.sistema b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); margin-bottom: 2px; }

/* edizione catalogo: «ce l'ho», filtro, kit */
.celho { margin-top: 6px; justify-self: start; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); font: 600 .9rem Barlow, sans-serif; cursor: pointer; }
.celho[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.celho:focus-visible, .filtro button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.filtro { display: flex; gap: 8px; margin: 10px 0 14px; }
.filtro button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); font: 600 1rem Barlow, sans-serif; cursor: pointer; }
.filtro button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filtro button:disabled { opacity: 1; color: var(--mute); cursor: default; }
.kit { background: var(--sf); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; }
.kit h2 { margin: 0; font: 700 1.3rem "Barlow Condensed", sans-serif; }
.kit ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.kit li span { color: var(--mute); font-size: .9rem; }
.kit .ok { font-style: normal; color: var(--ok-ink, var(--accent)); font-weight: 600; }
.compra { font-size: .9rem; }
.cod { font-size: .8rem; color: var(--mute); }
.compra a { color: var(--accent); }
.come-ora { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--sf2); border-radius: 0 10px 10px 0; font-size: .95rem; }
.come-ora b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.esca-stato { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--sf2); font-size: .94rem; }
.compra-stato { background: var(--att-bg); color: var(--att-ink); }

/* regole */
.spunte { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.spunte li { background: var(--sf); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 8px 36px; position: relative; }
.spunte li::before { content: ""; position: absolute; left: 12px; top: 12px; width: 14px; height: 14px; border: 2px solid var(--accent); border-radius: 4px; }
.taglie { width: 100%; border-collapse: collapse; background: var(--sf); border-radius: 12px; overflow: hidden; font-size: .94rem; }
.taglie th, .taglie td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.taglie thead th { background: var(--sf2); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); }
.taglie td:nth-child(2) { font-weight: 700; white-space: nowrap; }
.taglie td:nth-child(3) { color: var(--mute); font-size: .86rem; }
.ordinanze { margin: 0; padding-left: 1.1em; }
.ordinanze li { margin: 6px 0; }
.emergenze { display: flex; gap: 10px; flex-wrap: wrap; }
.emergenze a { background: var(--div-bg); color: var(--div-ink); font-weight: 700; text-decoration: none; padding: 10px 14px; border-radius: 12px; }

/* schede in basso */
.schede {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--sf); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
}
.schede a { display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; color: var(--mute); text-decoration: none; font-size: .9rem; font-weight: 600; border-radius: 14px; }
.schede a[aria-current="page"] { color: var(--ink); background: var(--sf2); }
.schede .ico { width: 32px; height: 32px; }

@media (min-width: 700px) {
  .condizioni { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .schede { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, 100%); bottom: 10px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--ombra); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.misura { margin: 4px 0 0; padding: 4px 8px; border-radius: 8px; background: var(--sf2); font-size: .82rem; color: var(--ink); }
.fonti-misure { grid-column: 1 / -1; margin: 4px 0 0; color: var(--mute); font-size: .78rem; }

/* ===================== dashboard compatta (28/09/2026) ===================== */
.eroe { padding: 14px; }
.eroe .punteggio { width: 76px; height: 76px; }
.eroe .punteggio b { font-size: 2rem; }
.eroe h2 { font-size: 1.55rem; }
.giudizio .sotto { color: var(--mute); font-weight: 500; }
/* stato di adesso: quattro riquadri come nelle app meteo */
.adesso { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.riq { display: grid; justify-items: center; gap: 1px; background: var(--sf2); border-radius: 12px; padding: 8px 4px 7px; text-align: center; min-width: 0; }
.riq b { font: 700 1.02rem/1.1 "Barlow Condensed", sans-serif; white-space: nowrap; }
.riq b small { font: 500 .7rem Barlow, sans-serif; color: var(--mute); }
.riq > small { font-size: .72rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ico-stato { position: relative; display: inline-grid; place-items: center; width: 46px; height: 36px; overflow: hidden; border-radius: 9px; }
.ico-stato svg { width: 100%; height: 100%; overflow: visible; }
.ico-stato video.anim { width: 100%; height: 100%; object-fit: cover; }
.ico-stato.piccola { width: 26px; height: 22px; }
/* mare: le onde scorrono, più ampie e veloci col mare più mosso */
.mare .riga { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; animation: onda-scorre 3.2s linear infinite; }
.mare .r1 { opacity: .65; animation-duration: 4.2s; } .mare .r2 { opacity: .4; animation-duration: 5.2s; }
.mare.poco-mosso .riga { animation-duration: 2.4s; } .mare.mosso .riga { animation-duration: 1.8s; }
.mare.molto-mosso .riga, .mare.agitato .riga, .mare.molto-agitato .riga { animation-duration: 1.3s; }
.mare .spuma { fill: #fff; opacity: .9; animation: spuma 1.6s ease-in-out infinite; }
.mare.piatto .riga { stroke-width: 2; animation-duration: 6s; }
@keyframes onda-scorre { from { transform: translateX(0); } to { transform: translateX(-12px); } }
@keyframes spuma { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
/* vento: scie che corrono e freccia verso cui soffia */
.vento .scia { fill: none; stroke: color-mix(in srgb, var(--accent) 60%, transparent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 10 40; animation: scia 2.4s linear infinite; }
.vento .s1 { animation-delay: -.8s; } .vento .s2 { animation-delay: -1.6s; }
.vento.calmo .scia { animation-duration: 5s; opacity: .5; } .vento.moderato .scia { animation-duration: 1.4s; } .vento.forte .scia { animation-duration: .8s; stroke-width: 2.6; }
@keyframes scia { from { stroke-dashoffset: 50; } to { stroke-dashoffset: 0; } }
.freccia-v { position: absolute; width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ico-stato.vento .freccia-v { right: 3px; bottom: 3px; }
/* luce */
.luce .astro { fill: var(--discreto); } .luce.notte .astro { fill: var(--luna-c, #b8a24a); }
.luce .stella { fill: var(--luna-c, #b8a24a); }
.luce .raggi path { stroke: var(--discreto); stroke-width: 2; stroke-linecap: round; transform-origin: 24px 20px; animation: gira 12s linear infinite; }
.luce .raggi { transform-origin: 24px 20px; animation: gira 14s linear infinite; }
.luce .orizzonte { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.luce.alba .sale { animation: sale 5s ease-in-out infinite alternate; } .luce.tramonto .sale { animation: sale 5s ease-in-out infinite alternate-reverse; fill: #e98b3a; }
.luce .stella { animation: spuma 2.2s ease-in-out infinite; } .luce .stella.s2 { animation-delay: -1s; }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes sale { from { transform: translateY(6px); } to { transform: translateY(-3px); } }
.termo .goccia { fill: color-mix(in srgb, var(--accent) 30%, transparent); stroke: var(--accent); stroke-width: 2; }
/* pesci del momento: in riga */
.eroe .top-specie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.eroe .top-specie li { min-width: 0; }
.eroe .top-specie button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 4px 6px; border-radius: 12px; min-height: 40px; }
.eroe .top-specie button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; text-align: center; }
.eroe .top-specie .tondo { width: 76px; height: 42px; border-radius: 9px; object-fit: contain; padding: 2px; display: block; background: #fff; }
.eroe .top-specie .pill { position: absolute; top: 4px; right: 4px; min-width: 28px; height: 22px; font-size: .85rem; }
.eroe .motivi { margin-top: 8px; }
.eroe .motivi li { font-size: .8rem; padding: 2px 8px; }
/* avvisi del posto: una riga che si apre */
.avvisi-d { margin-top: 10px; border-radius: 10px; background: var(--att-bg); color: var(--att-ink); font-size: .9rem; }
.avvisi-d.divieto { background: var(--div-bg); color: var(--div-ink); }
.avvisi-d summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; font-weight: 600; min-height: 40px; }
.avvisi-d summary::-webkit-details-marker { display: none; }
.avvisi-d summary::after { content: "▾"; margin-left: auto; opacity: .7; }
.avvisi-d[open] summary::after { content: "▴"; }
.avvisi-d .ico { width: 18px; height: 18px; flex: none; }
.avvisi-d .avvisi { margin: 0; padding: 0 10px 10px; gap: 4px; }
.avvisi-d .avvisi li { padding: 0; background: none; color: inherit; font-size: .88rem; }
/* prossime ore: tabella che scorre, un tocco sceglie l'ora */
.striscia-blocco { margin-top: 10px; }
.striscia { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 4px; scroll-behavior: smooth; }
.striscia::-webkit-scrollbar { display: none; }
.col-ora { position: relative; flex: 0 0 52px; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 18px 2px 4px; background: var(--sf); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); font: 500 .8rem Barlow, sans-serif; }
.col-ora.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.col-ora .h { position: absolute; top: 3px; font-weight: 700; color: var(--mute); font-size: .74rem; }
.col-ora .h .gg { color: var(--accent); text-transform: capitalize; }
.col-ora .pill { min-width: 30px; height: 22px; font-size: .88rem; }
.col-ora .v { display: flex; align-items: center; gap: 1px; font-weight: 600; }
.col-ora .v .freccia-v { position: static; width: 14px; height: 14px; stroke-width: 3; }
.col-ora .m { font-size: .68rem; color: var(--mute); white-space: nowrap; }
.col-ora .m.mosso, .col-ora .m.molto-mosso, .col-ora .m.agitato, .col-ora .m.molto-agitato { color: var(--discreto-t, var(--discreto)); font-weight: 700; }
/* esca: i passi si aprono */
.come-usarla { margin-top: 10px; }
.come-usarla > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; list-style: none; color: var(--accent); }
.come-usarla > summary::-webkit-details-marker { display: none; }
.come-usarla > summary::after { content: "▾"; } .come-usarla[open] > summary::after { content: "▴"; }
.note-esca { font-size: .86rem; }
.esca-ora .perche { font-size: .92rem; }
/* posti più bassi */
.posto-riga, .finestra { padding: 6px 10px 6px 6px; gap: 10px; border-radius: 12px; }
.posto-riga .pill.grande, .finestra .pill.grande { min-width: 42px; height: 34px; font-size: 1.15rem; border-radius: 10px; }
.posto-sotto { font-size: .84rem; }
.posti .altri button { width: 100%; min-height: 40px; border-radius: 12px; border: 1.5px dashed var(--line); background: none; color: var(--accent); font: 600 .95rem Barlow, sans-serif; cursor: pointer; }
/* condizioni: riquadri con icona, una riga di dettaglio */
.cella { padding: 9px 11px; }
.cella-testa { display: flex; align-items: center; gap: 6px; }
.cella-testa .ico { width: 16px; height: 16px; color: var(--accent); flex: none; }
.cella-testa .tag { margin-left: auto; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.cella .val { font-size: 1.35rem; margin: 2px 0 0; }
.cella .sub { font-size: .8rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.misura { font-size: .74rem; padding: 3px 7px; margin-top: 5px; }
.fonti-misure summary { cursor: pointer; color: var(--mute); font-size: .8rem; min-height: 32px; display: flex; align-items: center; }
.fonti-misure p { margin: 0 0 4px; font-size: .78rem; color: var(--mute); }
/* finestre: schede che scorrono in orizzontale */
.finestre.scorri { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; padding-bottom: 2px; }
.finestre.scorri::-webkit-scrollbar { display: none; }
.finestre.scorri li { flex: 0 0 180px; }
.finestre.scorri .finestra { height: 100%; flex-direction: row; align-items: center; }
.finestre.scorri .finestra > .ico { display: none; }
/* bollettino richiudibile */
.bollettino > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.bollettino > summary::-webkit-details-marker { display: none; }
.bollettino > summary::after { content: "▾"; color: var(--mute); font-size: 1.1rem; }
.bollettino[open] > summary::after { content: "▴"; }
.bollettino > summary h2 { margin: 0; }
.blocco { margin-top: 20px; }
.blocco > h2 { font-size: 1.35rem; }
@media (prefers-reduced-motion: reduce) {
  .ico-stato *, .ico-stato { animation: none !important; }
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --luna-c: #efe7bf; } }
:root[data-theme="dark"] { --luna-c: #efe7bf; }
.striscia-blocco { margin-top: 20px; }
.col-ora.notte { background: var(--sf2); }
.col-ora.alba, .col-ora.tramonto { background: linear-gradient(to bottom, var(--sf), color-mix(in srgb, var(--discreto) 16%, var(--sf))); }

/* sezioni a fisarmonica (Regole) */
details.fis { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 8px; }
details.fis > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
details.fis > summary::-webkit-details-marker { display: none; }
details.fis > summary h2 { margin: 0; font-size: 1.3rem; }
details.fis > summary::after { content: "▾"; color: var(--mute); font-size: 1.1rem; }
details.fis[open] > summary::after { content: "▴"; }
/* esche: scheda più corta */
.esca-card .quando-esca { margin: 10px 0 0; font-size: .95rem; }
.esca-card .come-usarla > summary { margin-top: 2px; }

/* icone disegnate (Gemini, vettorizzate): intestazioni e tipo di posto */
h2 .ico.h { width: 22px; height: 22px; vertical-align: -3px; margin-right: 6px; color: var(--accent); }
.tipo-ico { width: 15px; height: 15px; vertical-align: -2px; margin-right: 3px; color: var(--mute); }

/* animazioni di Google Flow nei riquadri di stato */
.ico-stato.video { width: 46px; height: 46px; border-radius: 11px; }
.ico-stato .anim { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.ico-stato.video .freccia-v { stroke: #fff; right: 2px; bottom: 2px; width: 18px; height: 18px; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }

/* foto dei pesci di Gemini: pesce intero su bianco, non si taglia */
img.mini[src*="img/pesci/"] { object-fit: contain; background: #fff; padding: 2px; }

/* esche nella scheda del pesce: un tocco apre la foto grande */
.esche-pesce li { display: block; }
.zoom-riga { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--sf); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px 6px 6px; cursor: zoom-in; font-size: .92rem; }
.zoom-mini { position: relative; flex: none; }
.zoom-riga .esca-mini { width: 96px; height: 56px; }
.lente { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--accent); fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; }
.zoom-box { display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; background: #fff; overflow: auto; cursor: zoom-in; -webkit-overflow-scrolling: touch; }
.zoom-box img { display: block; width: 100%; max-width: none; height: auto; transition: width .2s; }
.zoom-box.zoom { cursor: zoom-out; }
.zoom-box.zoom img { width: 240%; }
.zoom-sotto { margin: 10px 0 0; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .zoom-box img { transition: none; } }

/* specie doppie (sgombro e lanzardo): le due foto una sotto l'altra, col nome */
.pesce-foto-doppia { display: grid; gap: 8px; }
.pesce-foto-doppia figcaption { font-weight: 600; color: var(--ink); font-size: .9rem; }

/* ricerca delle esche */
.cerca-esche { position: relative; margin: 0 0 6px; }
.cerca-esche input { width: 100%; min-height: 48px; padding: 10px 14px 10px 44px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); font: 500 1.05rem Barlow, sans-serif; -webkit-appearance: none; appearance: none; }
.cerca-esche input::placeholder { color: var(--mute); }
.cerca-esche input:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.lente-cerca { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--mute); stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.cerca-esito { margin: 0 0 8px; min-height: 1.2em; font-size: .9rem; color: var(--mute); font-weight: 600; }
.colori figure.trovato { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* pagina Esche: elenco compatto, la scheda completa si apre al tocco */
.gruppo-esca { background: var(--sf); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.esca-testa { width: 100%; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; cursor: pointer; color: var(--ink); }
.esca-testa b { font: 700 1.2rem/1.15 "Barlow Condensed", sans-serif; }
.esca-testa span { grid-column: 1; font-size: .84rem; color: var(--mute); }
.esca-testa .ico { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--mute); }
.righe-esca { list-style: none; margin: 0; padding: 0; }
.righe-esca li { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; }
.righe-esca li + li { border-top: 1px solid var(--line); }
.righe-esca li.consigliata { background: color-mix(in srgb, var(--ottimo) 10%, transparent); }
.apri-esca { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.esca-riga { width: 92px; height: 52px; object-fit: contain; padding: 2px; border-radius: 10px; background: #fff; flex: none; border: 1px solid var(--line); }
.re-testo { display: grid; min-width: 0; }
.re-testo b { font-weight: 600; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-testo small { color: var(--mute); font-size: .8rem; }
.re-testo .badge { font-style: normal; }
.righe-esca .celho { margin: 0; flex: none; min-height: 40px; padding: 0 12px; }
.celho[aria-pressed="true"] { background: var(--ottimo); border-color: var(--ottimo); color: #0b1c26; }
.foto-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
#d-esca .esca-card { border: 0; box-shadow: none; padding: 0; background: none; margin: 0; }

/* livelli della mappa: Vento e Mare, uno alla volta */
.strati-tasti { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.strati-tasti .vento-tasto { margin: 0; }
.scala-mare .barra { display: flex; height: 8px; border-radius: 4px; overflow: hidden; }
.scala-mare .barra i { flex: 1; }
.scala-mare .num { display: flex; justify-content: space-between; font-size: .74rem; color: var(--mute); margin-top: 2px; }
.scala-mare .num i { font-style: normal; }

/* webcam */
.cam-segno { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #12303f; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); color: #fff; }
.cam-segno svg { width: 17px; height: 17px; }
.cam-riga { width: 100%; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--sf2); color: var(--ink); text-align: left; cursor: pointer; font-size: .92rem; }
.cam-riga span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-riga .ico { width: 18px; height: 18px; color: var(--accent); flex: none; }
.cam-foto { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #0b1821; }
.cam-foto.vuota { display: grid; place-items: center; color: #9fb3bf; font-weight: 600; }
.cam-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 10px; }
.cam-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cam-link-foto { display: block; margin-bottom: 10px; }
#d-cam .primario { text-decoration: none; margin-top: 4px; }
.cam-fonte { font-size: .8rem; color: var(--mute); margin: 8px 0 0; }

.cam-agg { margin: -4px 0 8px; font-size: .8rem; color: var(--mute); min-height: 1.2em; }
.cam-foto.viva { aspect-ratio: 450 / 264; object-fit: contain; background: #0b1821; }

.badge.arrivo { background: var(--att-bg); color: var(--att-ink); }
.badge.arrivo { white-space: nowrap; display: inline-block; }

/* ===================== bussola del posto e tabella delle previsioni (30/09/2026) ===================== */
:root { --b-mare: #cfe8f4; --b-terra: #ece6d8; --b-terra-l: #b7ad94; --b-linea: rgba(18, 48, 63, .3); --b-n: #c8281e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --b-mare: #1b4057; --b-terra: #8d979d; --b-terra-l: #c6cdd1; --b-linea: rgba(255, 255, 255, .28); --b-n: #ff7a6e; }
}
:root[data-theme="dark"] { --b-mare: #1b4057; --b-terra: #8d979d; --b-terra-l: #c6cdd1; --b-linea: rgba(255, 255, 255, .28); --b-n: #ff7a6e; }

.eroe { overflow: hidden; }
.bussola { position: relative; margin: -14px -14px 12px; }
.bussola-svg { display: block; width: 100%; height: auto; aspect-ratio: 360 / 234; font-family: Barlow, system-ui, sans-serif; }
.b-mare { fill: var(--b-mare); }
.b-terra { fill: var(--b-terra); stroke: var(--b-terra-l); stroke-width: 1; stroke-linejoin: round; }
.b-rosa circle, .b-rosa path { fill: none; stroke: var(--b-linea); stroke-width: 1; }
.b-punto { fill: #fff; stroke: var(--accent); stroke-width: 3; }
.b-lettere text { font-weight: 700; font-size: 13px; fill: var(--ink); paint-order: stroke; stroke: var(--b-mare); stroke-width: 3.5px; stroke-linejoin: round; }
.b-lettere .n { fill: var(--b-n); }
.b-scala path { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.b-scala text { font-size: 10px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--b-mare); stroke-width: 3px; }
.bussola-legenda { position: absolute; left: 10px; bottom: 6px; margin: 0; display: flex; gap: 10px; font-size: .74rem; font-weight: 600; color: var(--ink); text-shadow: 0 0 3px var(--b-mare), 0 0 3px var(--b-mare); }
.bussola-legenda span { display: inline-flex; align-items: center; gap: 4px; }
.bussola-legenda .q { width: 11px; height: 11px; border-radius: 3px; display: inline-block; border: 1px solid rgba(7, 32, 43, .35); }
.bussola-legenda .q.v { background: #9bd14b; } .bussola-legenda .q.o { background: #4fb8ec; }

.prev-testa { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.prev-testa h2 { margin: 0; }
.prev-testa .filtro { margin: 0; }
.prev-box { position: relative; overflow-x: auto; overflow-y: hidden; background: var(--sf); border: 1px solid var(--line); border-radius: 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; box-shadow: var(--ombra); }
.prev-box::-webkit-scrollbar { display: none; }
.prev { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; table-layout: fixed; }
.prev th, .prev td { width: var(--w); min-width: var(--w); max-width: var(--w); height: 30px; padding: 0; text-align: center; font-size: .88rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.prev .fissa { position: sticky; left: 0; z-index: 2; width: 46px; min-width: 46px; max-width: 46px; background: var(--sf2); color: var(--mute); font-size: .72rem; font-weight: 600; border-right: 1px solid var(--line); }
.prev .fissa .ico { width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin: 0; }
.prev .fissa span { vertical-align: middle; }
.prev .giorni-r th { height: 26px; }
.prev .giorno-h { text-align: left; font-size: .8rem; border-left: 2px solid var(--line); overflow: hidden; }
.prev .giorno-h span { position: sticky; left: 52px; display: inline-block; padding: 0 6px; }
.prev .giorno-h b { text-transform: capitalize; }
.prev .giorno-h small { color: var(--mute); font-weight: 500; margin-left: 6px; }
.prev .ore-r button { all: unset; box-sizing: border-box; display: block; width: 100%; height: 30px; line-height: 30px; text-align: center; cursor: pointer; font-weight: 700; color: var(--mute); }
.prev .ore-r button[aria-current] { color: var(--ink); }
.prev .ore-r button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 6px; }
.prev th.notte, .prev td.notte { background: color-mix(in srgb, var(--notte) 13%, transparent); }
.prev th.alba, .prev td.alba, .prev th.tramonto, .prev td.tramonto { background: color-mix(in srgb, var(--discreto) 16%, transparent); }
.prev td.pieno { font-weight: 700; }
.astro { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #f2b632; vertical-align: middle; }
.astro.notte { background: transparent; box-shadow: inset -5px 2px 0 0 var(--notte); }
.astro.alba, .astro.tramonto { background: linear-gradient(to bottom, #f08a2c 0 55%, transparent 55%); border-bottom: 2px solid var(--mute); border-radius: 50% 50% 0 0; height: 10px; }
.freccia-t { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.prev .press-r td { height: 40px; max-width: none; width: auto; }
.prev .press-r svg { display: block; }
.prev .press-r path { fill: none; stroke: var(--discreto); stroke-width: 2; }
.prev .press-r circle { fill: var(--sf); stroke: var(--discreto); stroke-width: 2; }
.prev .press-r text { font: 600 10px Barlow, sans-serif; fill: var(--mute); text-anchor: middle; }
.prev .voto-r td { height: 36px; }
.prev .pill { min-width: 30px; height: 22px; font-size: .88rem; }
.prev-sel { position: absolute; top: 0; bottom: 0; width: 44px; border: 2px solid var(--ink); border-radius: 8px; pointer-events: none; background: color-mix(in srgb, var(--ink) 6%, transparent); z-index: 1; transition: left .15s; }
@media (prefers-reduced-motion: reduce) { .prev-sel { transition: none; } }
.filtro.passo button { min-height: 32px; padding: 0 12px; font-size: .88rem; }

/* previsione contro misura */
.fonti-misure.confronto ul { margin: 2px 0 6px; padding-left: 18px; font-size: .8rem; color: var(--ink); }
.fonti-misure.confronto li { margin: 2px 0; }
.confronto-tab { border-collapse: collapse; font-size: .76rem; margin: 4px 0; font-variant-numeric: tabular-nums; }
.confronto-tab th, .confronto-tab td { padding: 3px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.confronto-tab th[scope="row"] { text-align: left; color: var(--mute); font-weight: 600; }
.confronto-tab td.scarto { color: var(--div-ink); background: var(--div-bg); font-weight: 700; border-radius: 6px; }

/* esche perse */
.persa-btn { flex: none; align-self: center; min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--mute); font: 600 .8rem Barlow, sans-serif; cursor: pointer; white-space: nowrap; }
.persa-btn.conferma { border-color: var(--div-ink); background: var(--div-bg); color: var(--div-ink); }
.esca-card .persa-btn { margin-top: 6px; justify-self: start; }
.esche-perse { margin: 18px 0 8px; }
.esche-perse summary { cursor: pointer; color: var(--mute); font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.esche-perse .apri-esca.persa { opacity: .6; cursor: default; }

/* diario delle uscite */
.diario-testa { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.diario-testa h2 { margin: 0; }
.diario-ultima { color: var(--mute); font-size: .92rem; margin: 8px 0 12px; }
.link { background: none; border: 0; color: var(--accent); font: 600 .95rem Barlow, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; padding: 0 4px; }
.secondario { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); font: 600 .92rem Barlow, sans-serif; cursor: pointer; }
.f-uscita { display: grid; gap: 14px; }
.f-uscita fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 8px; background: var(--sf); }
.f-uscita legend { font: 700 1rem Barlow, sans-serif; padding: 0 6px; }
.f-uscita label { display: grid; gap: 4px; font-size: .88rem; color: var(--mute); }
.f-uscita input, .f-uscita select, .f-uscita textarea { font: 400 16px Barlow, sans-serif; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; min-height: 44px; width: 100%; box-sizing: border-box; }
.f-uscita textarea { min-height: 64px; resize: vertical; }
.f-uscita .riga2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.u-dove { margin: 0; font-weight: 600; color: var(--ink); }
.esito { display: flex; flex-wrap: wrap; gap: 6px; }
.esito label { display: block; }
.esito input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.esito span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; cursor: pointer; }
.esito input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.esito input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.riga-num input { max-width: 110px; }
.catture { display: grid; gap: 6px; }
.cattura { display: grid; grid-template-columns: 1fr 64px 76px; gap: 6px; }
.f-uscita .note { color: var(--ink); }
.u-fatto { display: grid; gap: 10px; padding: 10px 0; }
.uscite { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.uscite li { background: var(--sf); border: 1px solid var(--line); border-left: 5px solid var(--scarso); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.uscite li.esito-preso { border-left-color: var(--ottimo); }
.uscite li.esito-attacchi { border-left-color: var(--discreto); }
.uscite p { margin: 0; }
.u-quando { color: var(--mute); font-size: .86rem; }
.u-app { font-size: .9rem; }
.uscite .persa-btn { justify-self: start; margin-top: 6px; }

/* pannello dei livelli della mappa */
.livelli-tasto small { font: 500 .78rem Barlow, sans-serif; opacity: .85; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livelli-tasto small:empty { display: none; }
.pannello-livelli { margin-top: 0; max-height: calc(100% - 8px); overflow-y: auto; background: #fff; color: #12303f; border: 2px solid rgba(0,0,0,.2); border-radius: 14px; padding: 8px 10px 10px; width: min(300px, calc(100vw - 64px)); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.pannello-livelli[hidden] { display: none; }
.pl-t { margin: 4px 0 6px; font: 700 .82rem Barlow, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: #4f6877; }
.pl-g { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-g button { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 11px; border-radius: 999px; border: 1.5px solid #c9d6dd; background: #fff; color: #12303f; font: 600 .9rem Barlow, sans-serif; cursor: pointer; }
.pl-g button .ico { width: 16px; height: 16px; }
.pl-g button[aria-pressed="true"] { background: #0f6f90; border-color: #0f6f90; color: #fff; }
.pl-g button:focus-visible { outline: 3px solid #f0b93e; outline-offset: 2px; }
.scala-corrente .barra { background: linear-gradient(90deg, #1b3a7a, #2f7fd6, #3fbfb0, #9bd14b, #f0b93e, #e4572e); }
.scala-temp .barra { background: linear-gradient(90deg, rgb(49,54,149), rgb(69,117,180), rgb(116,173,209), rgb(171,217,233), rgb(254,224,144), rgb(253,174,97), rgb(244,109,67), rgb(215,48,39)); }
.scala-cloro .barra { background: linear-gradient(90deg, rgb(237,248,233), rgb(186,228,179), rgb(116,196,118), rgb(49,163,84), rgb(0,109,44), rgb(0,68,27)); }
.legenda-zone span { max-width: 100%; }
.pop-extra p { margin: 3px 0; }
.pop-extra small { color: #4f6877; }

/* pericolo del mare, separato dal voto (dal 4/10/2026): r1 = al limite, r2 = troppo grosso per quel punto */
.l.pericolo { background: radial-gradient(circle, #9aa7ad 2.2px, transparent 2.6px) 0 50% / 7px 6px repeat-x; }
.avvisi li.pericolo { background: var(--div-bg); color: var(--div-ink); }
.pericolo-eroe { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 9px 11px; border-radius: 12px; font-size: .93rem; line-height: 1.35; background: var(--att-bg); color: var(--att-ink); }
.pericolo-eroe.r2 { background: var(--div-bg); color: var(--div-ink); }
.pericolo-eroe .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.rischio { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 1px 7px 1px 5px; border-radius: 999px; font: 600 .78rem Barlow, sans-serif; background: var(--att-bg); color: var(--att-ink); width: max-content; }
.rischio.r2 { background: var(--div-bg); color: var(--div-ink); }
.rischio .ico { width: 13px; height: 13px; }
.ora .barra.rischio { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(0,0,0,.38) 4px 7px); }
.pill.rischio { outline: 2px dashed var(--att-ink); outline-offset: 1px; }
.pill.rischio.r2 { outline-color: var(--div-ink); }
.f-uscita label.spunta { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: .95rem; min-height: 44px; }
.f-uscita label.spunta input { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; accent-color: #0f6f90; }

/* foto dell'esca ingrandita: sempre dritta col telefono in verticale, larga quasi quanto lo schermo, su un velo scuro */
.foto-vista { display: block; flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.foto-vista:focus-visible { outline: 3px solid #f0b93e; outline-offset: 2px; }
.seconda { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.seconda .foto-vista { margin-top: 2px; }
dialog.vista { width: min(94vw, 720px); max-width: 94vw; max-height: 90dvh; margin: auto; padding: 10px; border: 0; border-radius: 16px; background: #fff; overflow: visible; cursor: zoom-out; }
dialog.vista::backdrop { background: rgba(4, 14, 20, .82); }
.vista img { display: block; width: 100%; height: auto; max-height: 80dvh; object-fit: contain; }
.vista-chiudi { position: absolute; z-index: 1; top: -54px; right: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #12303f; cursor: pointer; }
.vista-chiudi .ico { width: 22px; height: 22px; }

.esca-prima .turno { font-size: .84rem; color: var(--mute); margin: 2px 0 4px; }
.esca-prima .turno b { color: var(--ink); font-weight: 600; }

/* Sonda lo spot */
.sonda-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 10px 14px; min-height: 60px; border-radius: 14px; border: 1.5px solid var(--accent); background: var(--sf); color: var(--ink); text-align: left; font: 600 1.05rem Barlow, sans-serif; cursor: pointer; }
.sonda-btn .ico { width: 30px; height: 30px; color: var(--accent); flex: none; }
.sonda-btn small { display: block; font-weight: 400; font-size: .86rem; color: var(--mute); margin-top: 2px; }
.sonda-btn:focus-visible, .sonda-esiti button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sonda-dove { color: var(--mute); margin: 0 0 10px; }
.sonda-colonna { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sonda-colonna li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; min-height: 52px; }
.sonda-colonna li:nth-child(1) { background: color-mix(in srgb, var(--accent) 6%, var(--sf)); }
.sonda-colonna li:nth-child(2) { background: color-mix(in srgb, var(--accent) 13%, var(--sf)); }
.sonda-colonna li:nth-child(3) { background: color-mix(in srgb, var(--accent) 18%, var(--sf)); }
.sonda-colonna li:nth-child(4) { background: color-mix(in srgb, var(--accent) 24%, var(--sf)); }
.sonda-colonna .n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sf); border: 1.5px solid var(--line); font: 700 .95rem "Barlow Condensed", sans-serif; }
.sonda-colonna .st { font-weight: 600; line-height: 1.2; }
.sonda-colonna .st small { display: block; font-weight: 400; color: var(--ink); font-size: .82rem; }
.sonda-colonna li.ora { box-shadow: inset 0 0 0 2.5px var(--accent); }
.sonda-colonna li.ora .n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sonda-colonna li.salta { opacity: .55; }
.sonda-colonna .esca-mini { width: 56px; height: 34px; }
.sonda-num { margin: 0 0 8px; font-size: 1.05rem; }
.sonda-num span { color: var(--mute); font-size: .9rem; }
.sonda-msg { background: var(--att-bg); color: var(--att-ink); padding: 10px 12px; border-radius: 12px; font-weight: 600; margin: 0 0 12px; }
.sonda-msg:focus { outline: none; }
.sonda-come { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0; }
.sonda-come dt { font-weight: 700; }
.sonda-come dd { margin: 0; }
.sonda-domanda { margin: 14px 0 6px; font-weight: 700; }
.sonda-esiti { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sonda-esiti button { min-height: 60px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); font: 700 1.15rem "Barlow Condensed", sans-serif; cursor: pointer; }
.sonda-esiti .esito-preso { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sonda-piedi { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0 0; }
.sonda-fine h3 { margin: 0 0 6px; }
.sonda-fine h3:focus { outline: none; }
.sonda-fine .primario { margin-top: 12px; }
.sonda-log { margin-top: 14px; color: var(--mute); }
.sonda-log summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.sonda-log ol { margin: 4px 0 0; padding-left: 20px; }

/* Recupero animato */
.rec-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 8px 0 4px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1.5px solid var(--accent); background: var(--sf); color: var(--accent); font: 600 .95rem Barlow, sans-serif; cursor: pointer; text-align: left; }
.rec-btn .ico { width: 20px; height: 20px; flex: none; }
.rec-btn:focus-visible, .rec-tasti button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sonda-come dd .rec-btn { display: flex; }
.rec-esca { color: var(--mute); margin: 0 0 8px; }
.rec-quadro { border-radius: 16px; overflow: hidden; background: #0c3e53; box-shadow: var(--ombra); }
.rc-scena { display: block; width: 100%; height: auto; }
.rc-prof line { stroke: #fff; stroke-opacity: .22; stroke-dasharray: 3 5; }
.rc-prof text { fill: #eaf8fc; fill-opacity: .85; font: 600 10px Barlow, sans-serif; }
#rc-esca.alone { filter: url(#rc-alone); }
.rec-ora { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 2px; min-height: 2.2rem; }
.rec-ora b { font: 700 1.75rem/1 "Barlow Condensed", sans-serif; }
.rec-ora span { font: 600 1.2rem/1 "Barlow Condensed", sans-serif; color: var(--mute); }
.rec-tl { display: block; width: 100%; height: auto; }
.rec-tl.ferma .rec-tl-blocchi { opacity: .45; }
.tl-giri { fill: var(--accent); } .tl-giri.lasco { opacity: .6; }
.tl-tacca { stroke: var(--sf); stroke-width: 1.5; }
.tl-pausa { fill: var(--sf2); stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 4 3; }
.tl-colpo { fill: var(--alba); }
.tl-t { font: 700 11px Barlow, sans-serif; fill: var(--mute); text-anchor: middle; }
.tl-t.chiaro { fill: var(--accent-ink); } .tl-t.sopra { fill: var(--ink); }
.rec-tl-testina { stroke: var(--ink); stroke-width: 2; } .rec-tl-testina-p { fill: var(--ink); }
.rec-info { margin: 6px 0 10px; font-weight: 600; }
.rec-tasti { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.rec-tasti > button, .rec-vel button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; min-width: 48px; padding: 0 14px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); font: 700 1rem Barlow, sans-serif; cursor: pointer; }
.rec-tasti .ico { width: 22px; height: 22px; }
.rec-play { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }
.rec-suono[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.rec-suono[aria-pressed="false"] { opacity: .75; text-decoration: line-through; }
.rec-vel { display: flex; align-items: center; justify-content: center; gap: 6px; }
.rec-vel button { padding: 0; }
.rec-vel button:disabled { opacity: .4; cursor: default; }
.rec-vel-t { min-width: 4.6em; text-align: center; font: 700 1.05rem "Barlow Condensed", sans-serif; }
.rec-passi { margin: 12px 0 6px; padding-left: 20px; }
.rec-passi li { margin: 2px 0; }

.rec-titolo { margin: 10px 0 4px; font-weight: 700; }
.rec-lista { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.rec-btn.riga { display: flex; width: 100%; margin: 0; border-radius: 14px; padding: 8px 12px; }
.rec-btn.riga span { display: grid; gap: 2px; }
.rec-btn.riga small { font: 400 .86rem Barlow, sans-serif; color: var(--mute); }
.rec-varianti { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.rec-varianti button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); font: 600 .95rem Barlow, sans-serif; cursor: pointer; }
.rec-varianti button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rec-varianti button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.rec-come { margin: 0 0 6px; }
.rec-canna { margin: 0 0 10px; color: var(--mute); }
.rec-canna b { color: var(--ink); }
.rec-quando { margin: 12px 0 0; }
.tl-caduta { fill: var(--accent); opacity: .3; }
.tl-giri.cammina { opacity: .8; }

.nota-caso { margin: 8px 0 0; color: var(--mute); font-size: .86rem; }

/* Mangianza vista */
.mangianza-btn { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 14px; min-height: 56px; border-radius: 14px;
  border: 1.5px dashed var(--accent); background: var(--sf); color: var(--ink); text-align: left; font: 600 1rem Barlow, sans-serif; cursor: pointer; }
.mangianza-btn .ico { width: 26px; height: 26px; color: var(--accent); flex: none; }
.mangianza-btn small { display: block; font-weight: 400; font-size: .84rem; color: var(--mute); }
.mangianza-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mangianza-attiva { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ottimo) 16%, var(--sf)); }
.mangianza-attiva .ico { width: 22px; height: 22px; flex: none; color: var(--ottimo-t); }
.mangianza-attiva span { flex: 1 1 200px; }
.mangianza-attiva:focus { outline: none; }
