:root {
  --verde: #2f6b3a; --verde-chiaro: #e6f0e3; --verde-scuro: #1f4a27;
  --terra: #8a5a2b; --terra-chiaro: #f5ebe0;
  --sfondo: #f6f4ef; --carta: #ffffff; --testo: #1f2420; --muted: #66706a; --bordo: #dcd8cf;
  --rosso: #b3261e; --rosso-chiaro: #fbe9e7; --giallo: #8a6200; --giallo-chiaro: #fff4d6; --blu: #1d5fa8;
  --raggio: 14px; --tab: 68px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --verde: #7fc18a; --verde-chiaro: #1f3324; --verde-scuro: #a9dcb1;
    --terra: #d9a36b; --terra-chiaro: #33281d;
    --sfondo: #141714; --carta: #1d211d; --testo: #ecefea; --muted: #9aa39c; --bordo: #333a34;
    --rosso: #ff8a80; --rosso-chiaro: #3a1f1d; --giallo: #f0c35a; --giallo-chiaro: #33290f; --blu: #8cbcf5;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sfondo); color: var(--testo);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom) + 16px);
}
a { color: var(--verde); }
h1, h2 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.1rem; }
p { margin: .4em 0; }
code { background: var(--verde-chiaro); padding: 1px 5px; border-radius: 6px; }
.muted { color: var(--muted); }
.piccolo { font-size: .85rem; }
.blu { color: var(--blu); }
.nascosto { display: none !important; }
.centro-testo { text-align: center; }

/* Barra in alto */
.barra {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--verde); color: #fff;
}
.barra h1 { font-size: 1.15rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra select { max-width: 45%; font-size: .95rem; padding: 6px 8px; border-radius: 10px; border: 0; background: rgba(255,255,255,.18); color: #fff; }
.barra select option { color: #000; }
.barra .pill { background: rgba(255,255,255,.2); color: #fff; }
.logo { font-size: 1.4rem; }
.icona-btn { background: none; border: 0; color: inherit; font-size: 1.5rem; min-width: 44px; min-height: 44px; cursor: pointer; }
.icona-btn.piccolo { font-size: 1rem; min-width: 36px; min-height: 36px; color: var(--muted); margin-left: auto; }

main { padding: 12px 12px 0; max-width: 720px; margin: 0 auto; }
main.centro { padding-top: 6vh; }
.sez { margin: 18px 4px 8px; display: flex; align-items: center; gap: 8px; }

/* Barra in basso */
.tab {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; height: calc(var(--tab) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--carta); border-top: 1px solid var(--bordo);
}
.tab a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); font-size: .75rem; }
.tab a span { font-size: 1.4rem; line-height: 1.2; }
.tab a.on { color: var(--verde); font-weight: 600; }
.tab a.piu span { background: var(--verde); color: #fff; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.6rem; margin-top: -14px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* Card */
.card { display: block; background: var(--carta); border: 1px solid var(--bordo); border-radius: var(--raggio); padding: 14px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.card h2 { margin-bottom: 6px; }
.card.vuoto { text-align: center; color: var(--muted); padding: 22px 14px; }
details.card summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.riga-tit { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.riga-tit .link { margin-left: auto; }
.riga-btn { display: flex; gap: 8px; flex-wrap: wrap; }
.riga-btn .btn { flex: 1; }
.pill { display: inline-block; background: var(--verde-chiaro); color: var(--verde-scuro); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.badge { background: var(--verde); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: .85rem; }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px;
  border: 0; border-radius: 12px; background: var(--verde); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: .5; }
.btn.grande { width: 100%; min-height: 56px; font-size: 1.1rem; margin: 6px 0; }
.btn.secondario { background: var(--verde-chiaro); color: var(--verde-scuro); }
.btn.pericolo { background: var(--rosso-chiaro); color: var(--rosso); }
.btn.raccolto { background: var(--terra); color: #fff; }
.btn.piccolo-btn { min-height: 42px; padding: 6px 14px; font-size: .95rem; }
.link { background: none; border: 0; color: var(--verde); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px 4px; min-height: 40px; }
.link-col { display: flex; flex-direction: column; align-items: center; margin-top: 6px; }

/* Form */
form label { display: block; margin: 12px 0; font-weight: 600; font-size: .95rem; }
form label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
form label.check input { width: 24px; height: 24px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 12px; min-height: 48px; font: inherit;
  border: 1px solid var(--bordo); border-radius: 10px; background: var(--sfondo); color: var(--testo);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--verde); border-color: transparent; }
.etichetta { font-weight: 600; font-size: .95rem; margin: 14px 0 6px; }
.scelte { display: flex; flex-wrap: wrap; gap: 8px; }
.scelte button {
  flex: 1 1 auto; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--bordo);
  background: var(--carta); color: var(--testo); font: inherit; cursor: pointer;
}
.scelte button.on { border-color: var(--verde); background: var(--verde-chiaro); color: var(--verde-scuro); font-weight: 600; }
.scelte.specie { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.scelte.specie button { font-size: .8rem; padding: 8px 4px; line-height: 1.25; }
.scelte.specie button::first-line { font-size: 1.6rem; }
.scelte.tipi { display: grid; grid-template-columns: repeat(3, 1fr); }
.scelte.tipi button { display: flex; flex-direction: column; align-items: center; font-size: .85rem; min-height: 72px; }
.scelte.tipi button span { font-size: 1.6rem; }
.scelte.dove button { flex: 0 1 auto; text-align: left; }
.avviso { background: var(--giallo-chiaro); color: var(--giallo); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: .92rem; }
.avviso-testo { color: var(--giallo); }
.consiglio { background: var(--verde-chiaro); color: var(--verde-scuro); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: .92rem; }

/* Kg */
.kg-box { display: flex; gap: 8px; align-items: stretch; }
.kg-box input { text-align: center; font-size: 1.8rem; font-weight: 700; margin: 0; }
.kg-box button { min-width: 64px; font-size: 1.8rem; border-radius: 12px; border: 0; background: var(--terra-chiaro); color: var(--terra); cursor: pointer; }
.kg-rapidi { display: flex; gap: 6px; margin-top: 8px; }
.kg-rapidi button { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--bordo); background: var(--carta); color: var(--testo); font: inherit; cursor: pointer; }

/* Oggi */
.griglia-azioni { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.azione {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 82px;
  border-radius: var(--raggio); border: 1px solid var(--bordo); background: var(--carta); color: var(--testo); font: inherit; font-size: .78rem; cursor: pointer; padding: 6px 2px;
}
.azione span { font-size: 1.7rem; }
.azione.raccolto { background: var(--terra-chiaro); border-color: transparent; color: var(--terra); font-weight: 600; }
.prom { background: var(--carta); border: 1px solid var(--bordo); border-left: 6px solid var(--verde); border-radius: var(--raggio); padding: 12px; margin-bottom: 10px; }
.prom.alta { border-left-color: var(--rosso); }
.prom.info { border-left-color: var(--blu); }
.prom p { margin: 4px 0 0; font-size: .93rem; }
.prom-azioni { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.meteo { display: flex; flex-direction: column; gap: 10px; }
.meteo-ora { display: flex; align-items: center; gap: 12px; }
.meteo-ic { font-size: 2.4rem; }
.meteo-giorni { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.meteo-giorni div { display: flex; flex-direction: column; font-size: 1.2rem; }
.avviso-coda { background: var(--giallo-chiaro); color: var(--giallo); padding: 6px 14px; font-size: .9rem; display: flex; align-items: center; gap: 8px; }

/* Liste */
.lista { padding: 4px 14px; }
.att { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--bordo); color: inherit; text-decoration: none; }
.att:last-child { border-bottom: 0; }
.att-ic { font-size: 1.4rem; width: 32px; text-align: center; flex: none; }
.coltura-riga { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--bordo); text-decoration: none; color: inherit; font-size: 1.05rem; }
.filare .btn { margin-top: 8px; }
.info-lotto { display: flex; gap: 16px; flex-wrap: wrap; }
.info-lotto div { display: flex; flex-direction: column; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { background: var(--verde-chiaro); color: var(--verde-scuro); border-radius: 999px; padding: 4px 10px; font-size: .88rem; }
.lotto-card .chips { margin: 6px 0; }

/* Schede e mesi */
.schede, .mesi { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.schede button, .mesi button {
  flex: 1 0 auto; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--bordo);
  background: var(--carta); color: var(--testo); font: inherit; cursor: pointer; white-space: nowrap;
}
.schede button.on, .mesi button.on { background: var(--verde); color: #fff; border-color: var(--verde); }

/* Tabelle */
.tabella-scroll { overflow-x: auto; padding: 6px; }
.meteo-tab { width: 100%; border-collapse: collapse; font-size: .9rem; }
.meteo-tab th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px; font-size: .8rem; }
.meteo-tab td { padding: 8px 6px; border-top: 1px solid var(--bordo); white-space: nowrap; }
.meteo-tab tr.passato { opacity: .6; }
.meteo-tab tr.oggi { background: var(--verde-chiaro); }
.barra-pioggia { width: 50px; height: 6px; background: var(--bordo); border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: 4px; }
.barra-pioggia span { display: block; height: 100%; background: var(--blu); border-radius: 3px; }
.tab-semplice { width: 100%; border-collapse: collapse; }
.tab-semplice td { padding: 8px 4px; border-top: 1px solid var(--bordo); }
.num { text-align: right; font-weight: 600; }

/* Menu */
.menu .voce { display: grid; grid-template-columns: 44px 1fr; align-items: center; width: 100%; text-align: left; font: inherit; font-weight: 600; cursor: pointer; }
.menu .voce span { font-size: 1.6rem; grid-row: span 2; }
.menu .voce small { font-weight: 400; color: var(--muted); grid-column: 2; }

/* Accesso */
.intestazione-accesso { text-align: center; margin-bottom: 18px; }
.logo-grande { font-size: 3.5rem; }

/* Planimetria */
.mappa { background: linear-gradient(#eef5ea, #e3eedd); border-color: #cfdcc8; padding: 10px; color: #1f2420; }
.mappa .m-divisore { pointer-events: none; }
.m-divisore .d1 { stroke: #fff; stroke-width: 1.1; stroke-linecap: round; }
.m-divisore .d2 { stroke: #1f2420; stroke-width: .35; stroke-dasharray: 1.4 .8; }
.mappa .m-testa { font-size: 1.55px; font-weight: 800; letter-spacing: .05px; }
.mappa .m-testa.inv { fill: #2f6b3a; } .mappa .m-testa.est { fill: #a35f00; }
.m-lotto.mio .m-inv:hover, .m-lotto.mio .m-est:hover { filter: brightness(.93); }
.parti { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 6px; }
.parte { min-height: 60px; border-radius: 14px; border: 2px solid var(--bordo); background: var(--carta); color: var(--testo); font: inherit; font-weight: 700; cursor: pointer; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.parte small { font-weight: 400; font-size: .75rem; color: var(--muted); }
.parte.inv.on { background: #cfe6cf; border-color: #2f6b3a; color: #1f4a27; } .parte.est.on { background: #f6dcae; border-color: #b06a00; color: #5c3a00; }
.parte.on small { color: inherit; } .parte.tutto.on { background: var(--verde-chiaro); border-color: var(--verde); }
.riga-divisoria { border-top: 3px dashed var(--muted); margin: 18px 0 4px; text-align: center; }
.riga-divisoria span { position: relative; top: -12px; background: var(--sfondo); padding: 0 8px; font-size: .8rem; color: var(--muted); }
.btn.meta-inv { background: #cfe6cf; color: #1f4a27; } .btn.meta-est { background: #f6dcae; color: #5c3a00; }
.btn.scelta { outline: 3px solid var(--verde); outline-offset: 2px; }
.legenda { color: #4d5249; } .mappa .foto-terreno summary { color: #2f6b3a; }
.mappa svg { display: block; width: 100%; max-width: 440px; max-height: 80vh; margin: 0 auto; }
.mappa text { font-size: 2px; fill: #5c6258; text-anchor: middle; font-family: inherit; }
.mappa .m-etichetta.forte { font-weight: 700; fill: #3b4038; font-size: 2.2px; }
.mappa .m-piccolo { font-size: 1.7px; text-anchor: start; fill: #4d5249; }
.mappa .m-piccolo.acqua { fill: #1d5fa8; font-weight: 700; }
.m-terreno { stroke: #c2a273; stroke-width: .3; }
.m-albero { fill: #5e9a5a; } .m-albero2 { fill: #7fb878; }
.m-muro { stroke: #8a5a2b; stroke-width: 1.1; stroke-linecap: round; }
.m-muro2 { stroke: #b98a57; stroke-width: .35; stroke-dasharray: 2 1; }
.m-rete { stroke: #8d9488; stroke-width: .3; stroke-dasharray: .6 .6; }
.m-futuri { fill: rgba(255,255,255,.28); stroke: #b89d74; stroke-width: .25; stroke-dasharray: 1.2 1; }
.m-parcheggio { fill: rgba(255,255,255,.3); }
.mappa .m-P { font-size: 5px; font-weight: 800; fill: #9aa39a; }
.m-acqua { fill: #2f7fd0; stroke: #fff; stroke-width: .25; }
.m-casa { fill: #c9744a; stroke: #8f4a2a; stroke-width: .25; } .m-tetto { fill: none; stroke: #8f4a2a; stroke-width: .25; }
.m-pozzo { fill: #9aa5ad; stroke: #5d676e; stroke-width: .2; } .m-pozzo2 { fill: #2f7fd0; }
.m-compost { fill: #7a5a3a; stroke: #4f3a25; stroke-width: .2; }
.m-cancello rect { fill: #4a4f47; } .m-cancello circle { fill: #2e322c; }
.m-bussola circle { fill: #fff; stroke: #9aa39a; stroke-width: .25; } .m-bussola path { fill: #b3261e; }
.mappa .m-bussola text { font-size: 2.2px; font-weight: 700; fill: #3b4038; }
.m-vento path { fill: none; stroke: #2f7fd0; stroke-width: .5; stroke-linecap: round; stroke-linejoin: round; }
.mappa .m-vento text { font-size: 1.8px; fill: #2f7fd0; text-anchor: start; }
.m-lotto { cursor: pointer; }
.m-lotto .m-ombra { fill: rgba(0,0,0,.18); }
.m-lotto .m-bordo { fill: none; stroke: #2f6b3a; stroke-width: .55; }
.m-lotto .m-targa { fill: rgba(255,255,255,.92); stroke: rgba(0,0,0,.12); stroke-width: .15; }
.mappa .m-lotto .m-nome { font-size: 2.7px; font-weight: 800; fill: #1f2420; }
.mappa .m-lotto .m-nome.piccolo { font-size: 2.2px; }
.mappa .m-lotto .m-info { font-size: 1.8px; font-weight: 600; fill: #2f6b3a; }
.m-lotto.preso .m-inv, .m-lotto.preso .m-est { filter: grayscale(1) brightness(.92); }
.m-lotto.preso .m-bordo { stroke: #77776f; }
.mappa .m-lotto.preso .m-info { fill: #6b6b64; }
.m-lotto.mio .m-bordo { stroke: #c77700; stroke-width: 1.2; }
.mappa .m-lotto.mio .m-info { fill: #a35f00; }
.m-lotto.libero .m-bordo { stroke-width: .7; }
.m-lotto:hover .m-bordo, .m-lotto:focus .m-bordo { stroke-width: 1.3; } .m-lotto:focus { outline: none; }
.legenda { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin: 8px 0; color: var(--muted); }
.legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.l-inv { background: #cfe6cf; } .l-est { background: #f6dcae; } .l-preso { background: #c9c9c4; } .l-acqua { background: var(--blu); border-radius: 50% !important; }
.foto-terreno summary { cursor: pointer; color: var(--verde); padding: 8px 0; text-align: center; }
.foto-terreno img { width: 100%; border-radius: 10px; display: block; }
.voce-lotto.preso { opacity: .75; }
.pill.mia { background: #fde9c4; color: #7a4a00; }
.pill.grigia { background: var(--bordo); color: var(--testo); }
.scheda-lotto h2 { font-size: 1.4rem; }
.dati-lotto { list-style: none; padding: 0; margin: 10px 0 14px; }
.dati-lotto li { padding: 7px 0; border-bottom: 1px solid var(--bordo); }
.dati-lotto .q { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 8px; vertical-align: -2px; }
.dati-lotto .q.inv { background: #cfe6cf; } .dati-lotto .q.est { background: #f6dcae; }

.piantina-casa { margin-bottom: 10px; }
.piantina-casa > summary { cursor: pointer; font-weight: 700; padding: 10px 6px; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.piantina-casa .mappa svg { max-height: 62vh; }
.l-mio { background: #fff; border: 2px solid #b06a00; }

/* Colture in programma e piano d'insieme */
.coltura-riga.prog { border-left: 4px dashed var(--muted); padding-left: 10px; }
.foro.prog { border-style: dashed; opacity: .85; }
.piano-btn { background: var(--terra); }
.piano-testa { position: sticky; top: 58px; z-index: 5; background: var(--sfondo); padding: 6px 0; margin: 0 -12px 6px; box-shadow: 0 6px 8px -6px rgba(0,0,0,.25); }
.p-striscia { display: flex; gap: 6px; overflow-x: auto; padding: 2px 12px; scrollbar-width: thin; }
.p-striscia button { flex: 0 0 auto; min-height: 46px; padding: 4px 10px; border-radius: 12px; border: 2px solid var(--bordo); background: var(--carta); color: var(--testo); font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.p-striscia button.on { border-color: var(--verde); background: var(--verde-chiaro); color: var(--verde-scuro); font-weight: 700; }
.p-striscia p { margin: 8px 0; }
.piano { padding: 8px; }
.p-riga { display: flex; align-items: stretch; gap: 6px; padding: 3px 0; }
.p-nome { flex: 0 0 52px; min-height: 40px; border-radius: 10px; border: 1px solid var(--bordo); background: var(--verde-chiaro); color: var(--verde-scuro); font: inherit; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.p-nome small { font-size: .7rem; font-weight: 400; }
.p-fori { flex: 1; display: flex; gap: 2px; min-width: 0; }
.p-foro { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0; border-radius: 8px; border: 1.5px dashed var(--bordo); background: var(--sfondo); cursor: pointer; font-size: .95rem; line-height: 1; overflow: hidden; }
.p-foro.pieno { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 28%, var(--carta)); }
.p-foro.pieno.prog { border-style: dashed; background: color-mix(in srgb, var(--c) 12%, var(--carta)); }
.dialogo.alto { max-height: 86vh; overflow-y: auto; max-width: 480px; }

/* Scheda informativa, tipi di impianto, zona consigliata */
.info-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 34px; padding: 0 4px; border-radius: 17px; border: 2px solid var(--blu); background: var(--carta); color: var(--blu); font: italic 700 1.05rem Georgia, serif; cursor: pointer; flex: none; }
.info-btn.lungo { padding: 0 14px; height: 42px; } .info-btn span { font: 600 .9rem system-ui, sans-serif; }
.velo.sopra { z-index: 70; }
.scheda-coltura h3 { font-size: 1rem; margin: 16px 0 6px; padding-top: 10px; border-top: 1px solid var(--bordo); }
.tipo-info { border: 1px solid var(--bordo); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.tipo-info.on { border: 2px solid var(--verde); background: var(--verde-chiaro); }
.tipo-info p { margin: 2px 0; }
.zona-barra { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: .8rem; color: var(--muted); }
.zb-pista { flex: 1; height: 18px; border-radius: 9px; background: linear-gradient(90deg, #cfe6cf, #f6dcae); position: relative; border: 1px solid var(--bordo); opacity: .9; }
.zb-pista i { position: absolute; top: -3px; bottom: -3px; border-radius: 9px; border: 3px solid var(--verde); background: rgba(47,107,58,.25); }
.meteo-esito.l0 { color: var(--verde); } .meteo-esito.l1 { color: var(--giallo); } .meteo-esito.l2 { color: var(--rosso); }
.griglia-sp { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.sp-cella { position: relative; }
.sp-cella > button:first-child { width: 100%; min-height: 84px; padding: 8px 4px; border-radius: 12px; border: 2px solid var(--bordo); background: var(--carta); color: var(--testo); font: inherit; font-size: .8rem; line-height: 1.25; cursor: pointer; }
.sp-cella > button:first-child::first-line { font-size: 1.6rem; }
.sp-cella .info-btn { position: absolute; top: -6px; right: -6px; min-width: 28px; height: 28px; font-size: .9rem; }
.p-nome.zona { background: #fde9c4; border-color: #c77700; color: #7a4a00; }
.p-nome.zona::after { content: '★'; font-size: .7rem; line-height: 1; }
.scelte.colonna button .pill { font-weight: 400; }

/* Sole sul terreno */
.s-ombra { fill: rgba(20, 30, 70, .34); }
.s-notte { fill: rgba(10, 18, 50, .5); }
.s-percorso { fill: none; stroke: #e0a100; stroke-width: .45; stroke-dasharray: 1 1.2; }
.s-raggio { stroke: #f0b400; stroke-width: .6; stroke-linecap: round; opacity: .8; }
.s-sole { fill: #ffcc1a; stroke: #e08a00; stroke-width: .35; } .s-alone { fill: rgba(255, 204, 26, .35); }
.mappa .s-ora { font-size: 1.7px; fill: #8a5a00; font-weight: 700; }
.sole-comandi input[type=range] { width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; accent-color: #e0a100; }

/* Calendario della stagione */
.parti.tre { grid-template-columns: auto 1fr 1fr; }
.mese-card h2 { text-transform: capitalize; font-size: 1.25rem; }
.sett { border-top: 1px solid var(--bordo); padding: 8px 0 2px; }
.sett-data { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sett-voce { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.sett-voce.impianto { background: var(--verde-chiaro); border-radius: 10px; padding: 8px; margin: 4px 0; }
.sett-voce.raccolta { background: var(--terra-chiaro); border-radius: 10px; padding: 8px; margin: 4px 0; }

/* Attività ricorrenti */
.ric.spenta { opacity: .6; }
.ric .riga-btn { margin-top: 8px; }
.scelta-chip { border: 2px solid transparent; font: inherit; font-size: .9rem; cursor: pointer; min-height: 40px; }
.scelta-chip.on { border-color: var(--verde); font-weight: 700; }
.voce-link { text-decoration: none; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; }
.voce-link small { grid-column: 2; color: var(--muted); }

.profilo { display: block; width: 100%; max-width: 520px; margin: 0 auto; }
.profilo text { font-family: inherit; text-anchor: middle; }
.pr-griglia { stroke: var(--bordo); stroke-width: .2; } .pr-orizzonte { stroke: var(--testo); stroke-width: .4; }
.pr-asse { font-size: 2.6px; fill: var(--muted); } .pr-asse.dx { text-anchor: end; }
.pr-rif { fill: none; stroke: var(--muted); stroke-width: .35; stroke-dasharray: 1 1; }
.pr-nota { font-size: 2.4px; fill: var(--muted); }
.pr-oggi { fill: none; stroke: #e0a100; stroke-width: .9; stroke-linecap: round; }
.pr-filo { stroke: #e0a100; stroke-width: .3; stroke-dasharray: .8 .6; }
.pr-valore { font-size: 3.4px; font-weight: 800; fill: var(--testo); }

.v-frecce { pointer-events: none; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: .55; stroke: #2f7fd0; opacity: .8; }
.v-frecce line { stroke-dasharray: 1.6 .9; animation: v-scorre 1.1s linear infinite; }
.v-frecce.medio { stroke-width: .8; stroke: #1d5fa8; opacity: .9; }
.v-frecce.forte { stroke-width: 1.1; stroke: #b3261e; opacity: .95; }
.v-frecce.forte line { animation-duration: .5s; }
@keyframes v-scorre { to { stroke-dashoffset: -2.5; } }
@media (prefers-reduced-motion: reduce) { .v-frecce line { animation: none; } }

label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 10px 0; }
label.check input { width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0; flex: none; }

/* Finestra di conferma */
.velo { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 20px; }
.dialogo { max-width: 420px; width: 100%; margin: 0; font-size: 1.05rem; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.dialogo p { margin: 4px 0 16px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--verde-scuro); color: var(--carta); padding: 12px 18px; border-radius: 12px; z-index: 50; max-width: 90vw;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); transition: opacity .5s; font-weight: 600;
}
.toast.errore { background: var(--rosso); color: #fff; }
.toast.via { opacity: 0; }

/* Configurazione e disegno dei fori */
.evidenza { border: 2px solid var(--verde); background: var(--verde-chiaro); }
.voce-lotto { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; width: 100%; text-align: left; font: inherit; font-size: 1.15rem; cursor: pointer; min-height: 72px; align-items: center; }
.voce-lotto small { grid-column: 1 / -1; font-size: .85rem; }
.scelte.colonna { flex-direction: column; }
.scelte.colonna button { text-align: left; }
.fori { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.foro { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; min-height: 52px; padding: 0;
  border-radius: 50%; border: 2px dashed var(--bordo); background: var(--sfondo); color: var(--muted); font: inherit; cursor: pointer; }
.foro span { font-size: 1.35rem; line-height: 1; min-height: 1.35rem; }
.foro small { font-size: .65rem; line-height: 1; }
.foro.pieno { border-style: solid; border-width: 3px; background: var(--carta); }
.mini-fori { display: flex; flex-wrap: wrap; gap: 3px; margin: 8px 0 4px; }
.mini-fori i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--bordo)); }
.mini-fori i.prog { background: transparent; border: 2px dashed var(--c); }
.riempi { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: .95rem; }
.passo-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--verde-chiaro); color: var(--verde-scuro); font-size: 1.4rem; cursor: pointer; }
.sugg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sugg-btn { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; text-align: left; min-height: 52px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--bordo); background: var(--carta); color: var(--testo); font: inherit; cursor: pointer; align-items: center; }
.sugg-btn small { grid-column: 2; color: var(--muted); font-size: .82rem; }
.info-lotto .largo { flex-basis: 100%; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }

@media (max-width: 380px) {
  .griglia-azioni { grid-template-columns: repeat(3, 1fr); }
}
