/* onecalendar.css — tema ispirato a OneCalendar (Code Spark).
   Stile piatto e pulito: barra superiore grigio chiaro, griglia bianca a linee sottili,
   eventi a blocchi pieni con testo bianco, numero di oggi in rosso, numeri di settimana,
   niente gradienti né ombre. Caricato per ultimo: per tornare al tema precedente basta
   togliere il <link> in index.html. I colori delle categorie restano quelli scelti da voi. */

html body.organized{
  --oc-bg:#ffffff;
  --oc-bar:#f5f5f5;
  --oc-line:#e0e0e0;
  --oc-line-soft:#eeeeee;
  --oc-text:#212121;
  --oc-text-2:#616161;
  --oc-text-3:#9e9e9e;
  --oc-accent:#e0313f;
  --oc-accent-dark:#1565c0;
  --oc-accent-soft:#e3f2fd;
  --oc-today:#e53935;
  --oc-radius:4px;
  /* variabili del tema precedente riportate sulla nuova palette */
  --workspace-accent:var(--oc-accent);
  --workspace-soft:var(--oc-accent-soft);
  font-family:Roboto,"Segoe UI","Helvetica Neue",Arial,system-ui,sans-serif!important;
  background:var(--oc-bg)!important;
  color:var(--oc-text)!important;
}
html body.organized :is(h1,h2,h3,h4,p,small,span,strong,label,summary,button,input,select,textarea,a,td,th){font-family:inherit!important}
html body.organized main{background:var(--oc-bg)!important}

/* Niente gradienti, ombre o riflessi: tutto piatto */
html body.organized main *:not(.event):not(.category-dot):not(.dot):not(.napoli-legend-dot),
html body.organized>header,html body.organized>header *{background-image:none!important;box-shadow:none!important;text-shadow:none!important}
html body.organized :is(h1,h2,h3){font-weight:500!important;letter-spacing:0!important;color:var(--oc-text)!important}
html body.organized :is(.section-label,.eyebrow,.brand){color:var(--oc-text-3)!important;letter-spacing:.06em!important;font-weight:500!important}
html body.organized .muted{color:var(--oc-text-2)!important}

/* ---------- Barra superiore (app bar) ---------- */
html body.organized>header{background:var(--oc-bar)!important;color:var(--oc-text)!important;border:0!important;border-bottom:1px solid var(--oc-line)!important}
html body.organized>header :is(small,.brand){color:var(--oc-text-2)!important}
html body.organized>header .brand span{color:var(--oc-accent)!important}
html body.organized>header nav a{background:transparent!important;color:var(--oc-text-2)!important;border-radius:0!important;border:0!important;border-bottom:2px solid transparent!important;font-weight:500!important}
html body.organized>header nav a:is(.active,[aria-current="page"]){color:var(--oc-accent)!important;border-bottom-color:var(--oc-accent)!important}
html body.organized .alerts-bell{background:transparent!important;border:0!important;color:var(--oc-text-2)!important;border-radius:50%!important}
html body.organized .alerts-bell:hover{background:#0000000d!important}

/* ---------- Superfici: card piatte con bordo sottile ---------- */
html body.organized main :is(.card,.dashboard-card,.home-hero,.page-heading,.upcoming-dashboard,.agenda-preview,#trainLiveToggle,.napoli-reminder-button,.shopping-hero,.shopping-quick-area,.stat,.calendar-summary-grid>div,details.napoli-match-section,details.napoli-learn,.napoli-source-bar,.napoli-main-score,#nextShift,.office-schedule,.eav-table-wrap){
  background:var(--oc-bg)!important;border:1px solid var(--oc-line)!important;border-radius:var(--oc-radius)!important;color:var(--oc-text)!important}
html body.organized main :is(.home-hero,.page-heading){border:0!important;border-bottom:1px solid var(--oc-line)!important;border-radius:0!important;padding-left:4px!important;padding-right:4px!important}
html body.organized main .card::before,html body.organized main .dashboard-card::before,html body.organized main .card::after,html body.organized main .dashboard-card::after{display:none!important}
html body.organized main :is(.card,.dashboard-card,.agenda-preview,#trainLiveToggle,.shopping-hero,.napoli-reminder-button) :is(h2,h3,h4,strong,p,span,small,div){color:inherit}
html body.organized main :is(.shopping-hero,.napoli-reminder-button) *{color:var(--oc-text)!important}
html body.organized main :is(.shopping-hero,.napoli-reminder-button) :is(small,p){color:var(--oc-text-2)!important}
html body.organized main .napoli-crest{background:var(--oc-accent)!important;color:#fff!important}
html body.organized main .napoli-crest *{color:#fff!important}

/* Riepilogo di Raimondo: non più blu notte */
html body.organized main #calendarSummary,html body.organized main #calendarSummary :is(summary,p,span,strong){background:var(--oc-bg)!important;color:var(--oc-text)!important}
html body.organized main #calendarSummary .calendar-summary-grid>div{background:var(--oc-bar)!important}

/* ---------- Pulsanti in stile Material ---------- */
html body.organized main :where(button:not(.day,.event,.personal-quick,.shift-preset,.person-card,#trainLiveToggle,.napoli-reminder-button,.subtle,.danger,.shopping-remove)),
html body.organized main :where(a.button,.home-hero a),html body.organized dialog :where(button:not(.subtle,.danger,.day,.event,.shift-preset,.personal-quick)){
  background:var(--oc-accent)!important;color:#fff!important;border:0!important;border-radius:var(--oc-radius)!important;font-weight:500!important;letter-spacing:.02em}
html body.organized main button.subtle:not(.shopping-remove),html body.organized dialog button.subtle,html body.organized main .home-hero a+a{
  background:transparent!important;color:var(--oc-accent)!important;border:1px solid var(--oc-line)!important}
html body.organized :is(main,dialog) :is(button.danger,.shopping-remove){background:transparent!important;color:#d32f2f!important;border:1px solid #f1c6c6!important}
html body.organized main :is(button,a.button):hover{filter:none!important;background-color:var(--oc-accent-dark)}
html body.organized main button.subtle:hover{background:var(--oc-accent-soft)!important}

/* Campi di testo: linea sottile, niente riempimenti colorati */
html body.organized :is(main,dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea){
  background:var(--oc-bg)!important;border:1px solid #bdbdbd!important;border-radius:var(--oc-radius)!important;color:var(--oc-text)!important}
html body.organized :is(main,dialog) :is(input,select,textarea):focus{border-color:var(--oc-accent)!important;outline:2px solid var(--oc-accent-soft)!important}
html body.organized :is(main,dialog) :is(input[type=checkbox],input[type=radio]){accent-color:var(--oc-accent)}

/* ---------- Selettore RA / RO e stato connessione ---------- */
html body.organized .people .person-card{background:var(--oc-bg)!important;border:1px solid var(--oc-line)!important;border-radius:var(--oc-radius)!important;color:var(--oc-text-2)!important}
html body.organized .people .person-card.chosen{border:2px solid var(--oc-accent)!important;color:var(--oc-accent)!important;background:var(--oc-accent-soft)!important}
html body.organized .people .person-card .person-heart{color:var(--oc-today)!important}
html body.organized .people #appConnectionBar{background:var(--oc-bg)!important;border:1px solid var(--oc-line)!important;border-radius:var(--oc-radius)!important}
html body.organized .people #appConnectionBar button{background:transparent!important;color:var(--oc-accent)!important;border:1px solid var(--oc-line)!important}

/* ---------- Calendario mese ---------- */
html body.organized #calendarPanel{background:var(--oc-bg)!important;color:var(--oc-text)!important;border:0!important;border-radius:0!important;padding-left:0!important;padding-right:0!important}
html body.organized #calendarPanel :is(h2,h3,p,span,small,strong,summary,legend,label){color:inherit}
html body.organized #calendarPanel .muted{color:var(--oc-text-2)!important}
/* intestazione: "settembre 2026" in minuscolo come nell'app */
html body.organized #calendarPanel #month{font-size:22px!important;font-weight:400!important;text-transform:lowercase!important;color:var(--oc-text)!important}
html body.organized #calendarPanel :is(#prev,#next,#today){background:transparent!important;color:var(--oc-text-2)!important;border:0!important;border-radius:50%!important;min-width:40px}
html body.organized #calendarPanel #today{border-radius:var(--oc-radius)!important;color:var(--oc-accent)!important;font-weight:500!important}
html body.organized #calendarPanel :is(#prev,#next,#today):hover{background:#0000000d!important}
html body.organized #calendarPanel #calendarAdd{background:transparent!important;color:var(--oc-accent)!important;border:1px solid var(--oc-line)!important}

/* giorni della settimana: minuscoli e grigi */
html body.organized #calendarPanel .week{background:var(--oc-bg)!important;border:0!important;border-radius:0!important;color:var(--oc-text-2)!important;font-size:13px!important;text-transform:lowercase!important;letter-spacing:0!important;font-weight:400!important;border-bottom:1px solid var(--oc-line)!important}
html body.organized #calendarPanel .week span{color:inherit!important}

/* griglia bianca a linee sottili */
html body.organized #calendar{background:var(--oc-bg)!important;border:0!important;border-left:1px solid var(--oc-line-soft)!important;border-radius:0!important;gap:0!important}
html body.organized #calendar .day{background:var(--oc-bg)!important;color:var(--oc-text)!important;border:0!important;border-right:1px solid var(--oc-line-soft)!important;border-bottom:1px solid var(--oc-line)!important;border-radius:0!important;box-shadow:none!important;outline:0}
html body.organized #calendar .day:hover{background:#fafafa!important}
html body.organized #calendar .day.out{background:var(--oc-bg)!important;opacity:1!important}
html body.organized #calendar .day.out .num{color:#bdbdbd!important}
html body.organized #calendar .day.out .event{opacity:.45}
/* numero del giorno: semplice, in alto a sinistra */
html body.organized #calendar .day .num{background:transparent!important;color:var(--oc-text)!important;box-shadow:none!important;font-weight:400!important;font-size:14px!important;min-width:0!important;height:auto!important;padding:0 2px!important;border-radius:0!important;display:inline-block!important}
/* oggi: numero rosso in grassetto e colonna leggermente grigia */
html body.organized #calendar .day.today{background:#f5f5f5!important}
html body.organized #calendar .day.today .num{color:var(--oc-today)!important;font-weight:700!important;background:transparent!important}
/* giorno selezionato: bordo azzurro sottile */
html body.organized #calendar .day.selected{box-shadow:inset 0 0 0 2px var(--oc-accent)!important;background:var(--oc-accent-soft)!important}
html body.organized #calendar .day.selected.today{background:#f5f5f5!important}
/* pallini (promemoria) più discreti */
html body.organized #calendar .day::after{box-shadow:none!important}

/* eventi: blocchi pieni, testo bianco, angoli appena smussati */
html body.organized #calendar .event{border:0!important;border-radius:2px!important;box-shadow:none!important;font-weight:400!important;font-size:11px!important;line-height:1.3!important;padding:2px 4px!important;margin:0 0 2px!important;text-align:left!important}
html body.organized #calendar .event.wife.shift-morning{background:#f06292!important;color:#fff!important}
html body.organized #calendar .event.wife.shift-afternoon{background:#c2185b!important;color:#fff!important}
html body.organized #calendar .event.wife.shift-night{background:#7b1fa2!important;color:#fff!important}
html body.organized #calendar .event.rest{background:#9e9e9e!important;color:#fff!important}
html body.organized #calendar .event.rest[data-kind="Riposo"]{background:#33b679!important}
html body.organized #calendar .event.leave{background:#8e24aa!important;color:#fff!important}
html body.organized #calendar .event.salary-event{background:#0b8043!important;color:#fff!important}
html body.organized #calendar .event.napoli-event{background:#039be5!important;color:#fff!important}
html body.organized #calendar .event.birthday-event{background:#f4511e!important;color:#fff!important}
html body.organized #calendar .event:is(.family,.me,.wife):not([class*="shift-"]){background:#4285f4!important;color:#fff!important}
html body.organized #calendar .event.raimondo-category:not(.custom-event-color){background:var(--category-bg)!important;color:var(--category-fg)!important}
html body.organized #calendar .event.custom-event-color{background:var(--custom-event-color)!important;color:var(--custom-event-contrast,#fff)!important}

/* numeri di settimana a sinistra (aggiunti da onecal-ui.js) */
html body.organized #calendarPanel.oc-weeks .week,html body.organized #calendarPanel.oc-weeks #calendar{margin-left:26px!important}
html body.organized #calendarPanel.oc-weeks #calendar{position:relative;overflow:visible!important}
html body.organized #calendar .day[data-week]{position:relative;overflow:visible!important}
html body.organized #calendar .day[data-week]::before{content:attr(data-week);position:absolute;left:-26px;top:50%;width:22px;transform:translateY(-50%);text-align:center;font-size:12px;color:var(--oc-text-3);pointer-events:none}

/* legenda e scorciatoie sotto il calendario */
html body.organized #calendarPanel :is(.legend,details) summary{color:var(--oc-text-2)!important}
html body.organized #calendarPanel :is(.personal-quick,.shift-preset,.eav-quick>summary){border-radius:var(--oc-radius)!important;box-shadow:none!important}
html body.organized #calendarPanel .shift-preset{background:var(--oc-bg)!important;border:1px solid var(--oc-line)!important;color:var(--oc-text)!important}
html body.organized #calendarPanel .shift-preset[aria-pressed="true"]{border:2px solid var(--oc-accent)!important;background:var(--oc-accent-soft)!important}

/* ---------- Pannello del giorno: stile agenda ---------- */
html body.organized #dayPanel{background:var(--oc-bg)!important;border:0!important;border-top:1px solid var(--oc-line)!important;border-radius:0!important}
html body.organized #dayPanel #selectedTitle{font-weight:500!important;color:var(--oc-accent-dark)!important;text-transform:lowercase}
html body.organized #dayPanel #selectedTitle::first-letter{text-transform:uppercase}
html body.organized #dayPanel .entry{background:var(--oc-bg)!important;border:0!important;border-left:6px solid var(--entry-edge,var(--category-bg,var(--oc-accent)))!important;border-bottom:1px solid var(--oc-line-soft)!important;border-radius:0!important;box-shadow:none!important;padding:12px 12px 12px 14px!important;margin:0!important}
html body.organized #dayPanel .entry.wife.shift-morning{border-left-color:#f06292!important}
html body.organized #dayPanel .entry.wife.shift-afternoon{border-left-color:#c2185b!important}
html body.organized #dayPanel .entry.wife.shift-night{border-left-color:#7b1fa2!important}
html body.organized #dayPanel .entry.rest{border-left-color:#9e9e9e!important}
html body.organized #dayPanel .entry :is(h3,h4,strong){color:var(--oc-text)!important;font-weight:500!important}
html body.organized #dayPanel .entry :is(small,p){color:var(--oc-text-2)!important}
html body.organized #dayPanel .entry .entry-schedule{background:transparent!important;color:var(--oc-text-2)!important;padding:0!important;border:0!important}
html body.organized #dayPanel .entry .entry-now{background:var(--oc-today)!important;color:#fff!important;border-radius:2px!important}
html body.organized #dayPanel .entry .personal-category-badge{border-radius:2px!important}
html body.organized #dayPanel #rosariaDayAdd,html body.organized #dayPanel [id$="DayAdd"]{background:transparent!important;color:var(--oc-accent)!important;border:1px dashed var(--oc-accent)!important}

/* ---------- Home ---------- */
html body.organized main .agenda-preview{border-left:6px solid var(--oc-accent)!important}
html body.organized main .agenda-preview.agenda-current{border-left-color:var(--oc-today)!important}
html body.organized main .agenda-state{background:var(--oc-accent)!important;color:#fff!important;border-radius:2px!important}
html body.organized main .agenda-current .agenda-state{background:var(--oc-today)!important}
html body.organized main .agenda-deadline{background:var(--oc-bar)!important;color:var(--oc-text)!important;border-radius:var(--oc-radius)!important;border:0!important}
html body.organized main .agenda-deadline *{color:var(--oc-text)!important}
html body.organized main #wasteReminder{border-left:6px solid #0b8043!important}
html body.organized main #wasteReminder .waste-time{background:#0b8043!important;color:#fff!important;border-radius:var(--oc-radius)!important}
html body.organized main #wasteReminder :is(.waste-today,.waste-next){background:var(--oc-bar)!important;border:0!important;border-radius:var(--oc-radius)!important}
html body.organized main #trainLiveToggle{border-left:6px solid var(--oc-accent)!important}

/* ---------- Spesa ---------- */
html body.organized main .shopping-hero{border-left:6px solid #0b8043!important}
html body.organized main .shopping-hero .shopping-mode{background:transparent!important;color:#0b8043!important;border:1px solid var(--oc-line)!important}
html body.organized main .shopping-hero-icon{background:var(--oc-bar)!important}
html body.organized main .shopping-group-head{background:var(--oc-bar)!important;border-radius:0!important}
html body.organized main .shopping-group-head span{background:var(--oc-accent)!important;color:#fff!important}
html body.organized main #shoppingPanel .shopping-row{border-radius:0!important}
html body.organized main .shopping-checkmark{border-radius:2px!important;border-color:#757575!important}
html body.organized main .shopping-check input:checked+.shopping-checkmark{background:var(--oc-accent)!important;border-color:var(--oc-accent)!important}
html body.organized main .shopping-quick-area a,html body.organized main .shopping-offers a{background:transparent!important;color:var(--oc-accent)!important;border:1px solid var(--oc-line)!important;border-radius:var(--oc-radius)!important}
html body.organized main .shopping-offers-heading{background:var(--oc-bar)!important}

/* ---------- Barra di navigazione mobile ---------- */
html body.organized nav.mobile-nav{background:var(--oc-bar)!important;border-top:1px solid var(--oc-line)!important;box-shadow:none!important;backdrop-filter:none!important}
html body.organized nav.mobile-nav a{background:transparent!important;color:var(--oc-text-2)!important;border-radius:0!important}
html body.organized nav.mobile-nav a:is(.active,[aria-current="page"]){background:transparent!important;color:var(--oc-accent)!important;font-weight:700!important}
html body.organized nav.mobile-nav button#mobileAdd{background:var(--oc-accent)!important;color:#fff!important;border-radius:50%!important;flex:0 0 52px!important;width:52px;height:52px;min-height:52px!important;margin:0 4px!important;box-shadow:0 2px 6px #0000004d!important;font-size:0!important}
html body.organized nav.mobile-nav button#mobileAdd span{font-size:28px!important;color:#fff!important}

/* ---------- Finestre di dialogo ---------- */
html body.organized dialog{border-radius:var(--oc-radius)!important;border:0!important;box-shadow:0 8px 28px #00000040!important;background:var(--oc-bg)!important;color:var(--oc-text)!important}

/* footer */
html body.organized footer{color:var(--oc-text-3)!important}

/* Sul telefono: solo le sigle dei turni (la regola generica sopra rimetteva il testo intero) */
@media (max-width:600px){
  html body.organized #calendar .event:is([data-kind="Mattina"],[data-kind="Pomeriggio"],[data-kind="Notte"],[data-kind="Smonto"],[data-kind="Riposo"]){font-size:0!important;line-height:0!important;padding:3px 3px!important}
  html body.organized #calendar .event:is([data-kind="Mattina"],[data-kind="Pomeriggio"],[data-kind="Notte"],[data-kind="Smonto"],[data-kind="Riposo"])::after{font-size:11px;line-height:1.3;font-weight:500}
  html body.organized #calendar .event{font-size:10px!important;padding:2px 3px!important}
  html body.organized #calendarPanel.oc-weeks .week,html body.organized #calendarPanel.oc-weeks #calendar{margin-left:20px!important}
  html body.organized #calendar .day[data-week]::before{left:-20px;width:18px;font-size:11px}
}

/* Scorciatoie turni di Rosaria: pulsanti a contorno, non blocchi blu pieni */
html body.organized main :is(.rosaria-toolbar,.rosaria-more) button{background:var(--oc-bg)!important;color:var(--oc-text)!important;border:1px solid var(--oc-line)!important;border-radius:var(--oc-radius)!important;font-weight:500!important}
html body.organized main :is(.rosaria-toolbar,.rosaria-more) button:hover{background:var(--oc-accent-soft)!important}

/* Calendario di Raimondo: i testi pensati per il fondo scuro tornano leggibili */
html body.organized #calendarPanel :is(legend,.calendar-shortcuts>p,.office-schedule,.office-schedule *){color:var(--oc-text-2)!important}
html body.organized #calendarPanel .section-label{color:var(--oc-text-3)!important}

/* Spesa: pulsanti rapidi a contorno e gruppi con angoli piccoli */
html body.organized main button.shopping-quick{background:var(--oc-bg)!important;color:var(--oc-text)!important;border:1px solid var(--oc-line)!important;border-radius:var(--oc-radius)!important}
html body.organized main button.shopping-quick:hover{background:var(--oc-accent-soft)!important}
html body.organized main .shopping-group{border-radius:var(--oc-radius)!important;border-color:var(--oc-line)!important}

/* Home di Rosaria: il contenitore dell'agenda non ha bisogno di un secondo bordo */
html body.organized main .upcoming-dashboard{border:0!important;padding-left:0!important;padding-right:0!important}
html body.organized main #nextShift{padding:12px 14px!important;border-left:6px solid #f06292!important}
html body.organized nav.mobile-nav a:is(.active,[aria-current="page"]){border-color:var(--oc-accent)!important;outline-color:var(--oc-accent)!important}
html body.organized main :is(.agenda-preview,#nextShift) :is(a,button){border-radius:var(--oc-radius)!important}

/* ---------- Scheda del giorno (tocco su un giorno del calendario) ---------- */
html body.organized dialog.oc-day-sheet{width:min(560px,100vw);max-width:100vw;max-height:85dvh;padding:0!important;overflow:auto;border-radius:12px!important}
html body.organized dialog.oc-day-sheet::backdrop{background:#0006}
html body.organized .oc-day-sheet-bar{position:sticky;top:0;z-index:2;display:flex;gap:8px;align-items:center;justify-content:space-between;padding:10px 12px;background:var(--oc-bar);border-bottom:1px solid var(--oc-line)}
html body.organized .oc-day-sheet-bar #dayDialogAdd{background:var(--oc-accent)!important;color:#fff!important;border:0!important;border-radius:var(--oc-radius)!important;padding:10px 16px!important;font-weight:500!important;font-size:15px!important;margin:0!important}
html body.organized .oc-day-sheet-bar #dayDialogClose{background:transparent!important;color:var(--oc-text-2)!important;border:0!important;margin:0!important;padding:10px!important}
html body.organized .oc-day-sheet #dayPanel{border:0!important;margin:0!important;padding:14px 14px 20px!important;display:block!important}
/* il pulsante "Aggiungi impegno" del pannello è già nella barra in alto */
html body.organized .oc-day-sheet #rosariaDayAdd{display:none!important}
@media (max-width:600px){
  html body.organized dialog.oc-day-sheet[open]{margin:auto 0 0!important;width:100vw;border-radius:14px 14px 0 0!important;padding-bottom:env(safe-area-inset-bottom)!important;animation:ocSheetUp .18s ease-out}
}
@keyframes ocSheetUp{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){html body.organized dialog.oc-day-sheet[open]{animation:none}}

/* etichetta della categoria nel dettaglio del giorno: testo leggibile sul suo colore */
html body.organized #dayPanel .entry .personal-category-badge{color:var(--category-fg,#fff)!important}
html body.organized #dayPanel .entry.custom-event-color .personal-category-badge,html body.organized #dayPanel .entry .personal-category-badge.custom-event-color{color:var(--custom-event-contrast,#fff)!important}


/* ================= Sfondi personali dei due calendari ================= */

/* ---- RA · Raimondo: musica (pentagrammi, note, cuffie e un vinile) ---- */
html body.organized[data-person="me"] #calendarPanel{background:linear-gradient(180deg,#e6ecfb,#f3f1fb 60%)!important;border-radius:var(--oc-radius)!important;padding:14px 12px!important}
html body.organized[data-person="me"] #calendarPanel .week{background:transparent!important;border-bottom-color:#ffffffb3!important;color:#3d5573!important;font-weight:500!important}
html body.organized[data-person="me"] #calendar{background:#eaeffc url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 1200 800%22 preserveAspectRatio=%22xMidYMid slice%22%3E %3Cdefs%3E %3ClinearGradient id=%22bg%22 x1=%220%22 y1=%220%22 x2=%221%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23e6eefc%22/%3E%3Cstop offset=%22.55%22 stop-color=%22%23eef0fb%22/%3E%3Cstop offset=%221%22 stop-color=%22%23f3ecfa%22/%3E%3C/linearGradient%3E %3CradialGradient id=%22glow%22 cx=%22.78%22 cy=%22.3%22 r=%22.45%22%3E%3Cstop offset=%220%22 stop-color=%22%23ffffff%22 stop-opacity=%22.9%22/%3E%3Cstop offset=%221%22 stop-color=%22%23ffffff%22 stop-opacity=%220%22/%3E%3C/radialGradient%3E %3Cg id=%22n8%22%3E%3Cellipse cx=%220%22 cy=%220%22 rx=%2213%22 ry=%229.5%22 transform=%22rotate%28-22%29%22/%3E%3Crect x=%2210%22 y=%22-62%22 width=%223.6%22 height=%2262%22/%3E%3Cpath d=%22M13.6 -62 c10 8 24 14 20 34 c-2 -12 -10 -18 -20 -20z%22/%3E%3C/g%3E %3Cg id=%22n16%22%3E%3Cellipse cx=%220%22 cy=%220%22 rx=%2212%22 ry=%229%22 transform=%22rotate%28-22%29%22/%3E%3Cellipse cx=%2246%22 cy=%22-12%22 rx=%2212%22 ry=%229%22 transform=%22translate%2846 -12%29 rotate%28-22%29 translate%28-46 12%29%22/%3E%3Crect x=%229.5%22 y=%22-60%22 width=%223.4%22 height=%2260%22/%3E%3Crect x=%2255.5%22 y=%22-72%22 width=%223.4%22 height=%2260%22/%3E%3Cpath d=%22M9.5 -60 L58.9 -72 L58.9 -64 L9.5 -52z%22/%3E%3C/g%3E %3C/defs%3E %3Crect width=%221200%22 height=%22800%22 fill=%22url%28%23bg%29%22/%3E %3Crect width=%221200%22 height=%22800%22 fill=%22url%28%23glow%29%22/%3E %3Cg fill=%22none%22 stroke=%22%239db0d6%22 stroke-width=%222%22 opacity=%22.55%22%3E %3Cpath d=%22M-20 300 C200 220 380 380 600 300 S1000 220 1220 300%22/%3E %3Cpath d=%22M-20 318 C200 238 380 398 600 318 S1000 238 1220 318%22/%3E %3Cpath d=%22M-20 336 C200 256 380 416 600 336 S1000 256 1220 336%22/%3E %3Cpath d=%22M-20 354 C200 274 380 434 600 354 S1000 274 1220 354%22/%3E %3Cpath d=%22M-20 372 C200 292 380 452 600 372 S1000 292 1220 372%22/%3E %3C/g%3E %3Cg fill=%22none%22 stroke=%22%23c3b3e0%22 stroke-width=%221.6%22 opacity=%22.5%22%3E %3Cpath d=%22M-20 560 C240 640 460 500 700 560 S1060 640 1220 560%22/%3E %3Cpath d=%22M-20 576 C240 656 460 516 700 576 S1060 656 1220 576%22/%3E %3Cpath d=%22M-20 592 C240 672 460 532 700 592 S1060 672 1220 592%22/%3E %3Cpath d=%22M-20 608 C240 688 460 548 700 608 S1060 688 1220 608%22/%3E %3Cpath d=%22M-20 624 C240 704 460 564 700 624 S1060 704 1220 624%22/%3E %3C/g%3E %3Cg fill=%22%236f86bf%22 opacity=%22.42%22%3E %3Cuse href=%22%23n8%22 transform=%22translate%28170 290%29 scale%28.9%29%22/%3E %3Cuse href=%22%23n16%22 transform=%22translate%28330 345%29 scale%28.85%29%22/%3E %3Cuse href=%22%23n8%22 transform=%22translate%28520 320%29 scale%28.8%29%22/%3E %3Cuse href=%22%23n8%22 transform=%22translate%28700 300%29 scale%28.95%29%22/%3E %3Cuse href=%22%23n16%22 transform=%22translate%28880 270%29 scale%28.8%29%22/%3E %3Cuse href=%22%23n8%22 transform=%22translate%281080 310%29 scale%28.85%29%22/%3E %3C/g%3E %3Cg fill=%22%239a82c9%22 opacity=%22.35%22%3E %3Cuse href=%22%23n16%22 transform=%22translate%28120 600%29 scale%28.75%29%22/%3E %3Cuse href=%22%23n8%22 transform=%22translate%28420 560%29 scale%28.7%29%22/%3E %3Cuse href=%22%23n8%22 transform=%22translate%28760 600%29 scale%28.75%29%22/%3E %3Cuse href=%22%23n16%22 transform=%22translate%28980 640%29 scale%28.7%29%22/%3E %3C/g%3E %3Cg transform=%22translate%28930 150%29%22 opacity=%22.28%22%3E %3Ccircle r=%2292%22 fill=%22%2335466e%22/%3E %3Ccircle r=%2280%22 fill=%22none%22 stroke=%22%236b7fae%22 stroke-width=%221.2%22/%3E %3Ccircle r=%2266%22 fill=%22none%22 stroke=%22%236b7fae%22 stroke-width=%221.2%22/%3E %3Ccircle r=%2252%22 fill=%22none%22 stroke=%22%236b7fae%22 stroke-width=%221.2%22/%3E %3Ccircle r=%2230%22 fill=%22%23e8a3b8%22/%3E %3Ccircle r=%224%22 fill=%22%23fff%22/%3E %3C/g%3E %3Cg fill=%22none%22 stroke=%22%237d93c6%22 stroke-width=%223%22 stroke-linecap=%22round%22 opacity=%22.35%22 transform=%22translate%28110 120%29%22%3E %3Cpath d=%22M0 60 a50 50 0 0 1 100 0%22/%3E%3Crect x=%22-10%22 y=%2255%22 width=%2222%22 height=%2238%22 rx=%229%22 fill=%22%237d93c6%22 stroke=%22none%22/%3E%3Crect x=%2288%22 y=%2255%22 width=%2222%22 height=%2238%22 rx=%229%22 fill=%22%237d93c6%22 stroke=%22none%22/%3E %3C/g%3E %3C/svg%3E") center/cover no-repeat!important;border-left-color:#ffffff80!important;border-radius:var(--oc-radius)!important;overflow:visible}
html body.organized[data-person="me"] #calendar .day{background:#ffffff8c!important;border-right-color:#ffffff!important;border-bottom-color:#ffffff!important;backdrop-filter:blur(2px)}
html body.organized[data-person="me"] #calendar .day.out{background:#ffffff4d!important}
html body.organized[data-person="me"] #calendar .day:hover{background:#ffffffe6!important}
html body.organized[data-person="me"] #calendar .day.today{background:#fffffff0!important}
html body.organized[data-person="me"] #calendar .day.selected{background:#e3f2fdf2!important}
html body.organized[data-person="me"] #calendarPanel #month{color:#1f3a5c!important}
html body.organized[data-person="me"] #calendar .day[data-week]::before{color:#3d5573}
html body.organized[data-person="me"] #calendarPanel .office-schedule{background:#ffffffc7!important;border-color:#ffffff!important}
html body.organized[data-person="me"] #calendarPanel .calendar-shortcuts{background:#ffffffcc;border-radius:var(--oc-radius);padding:8px 10px}

/* ---- RO · Rosaria, infermiera: rosa cipria, battito del cuore, stetoscopio, croci e cuori ---- */
html body.organized[data-person="wife"]{
  --oc-accent:#c75b87;--oc-accent-dark:#a8456f;--oc-accent-soft:#fbe6ee;--oc-today:#c2185b;
  --ro-blush:#fff6f9;--ro-petal:#fdeef3;--ro-line:#f5d6e2;--ro-ink:#7a3553}
html body.organized[data-person="wife"] main{background:var(--ro-blush)!important}
html body.organized[data-person="wife"] #calendarPanel{background:var(--ro-petal)!important;border-radius:var(--oc-radius)!important;padding:14px 12px!important}
html body.organized[data-person="wife"] #calendarPanel #month,html body.organized[data-person="wife"] #dayPanel #selectedTitle{color:var(--ro-ink)!important}
html body.organized[data-person="wife"] #calendarPanel .week{background:transparent!important;color:#a0607c!important;border-bottom-color:var(--ro-line)!important}
html body.organized[data-person="wife"] #calendar{background:#fdeef4 url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 1200 800%22 preserveAspectRatio=%22xMidYMid slice%22%3E %3Cdefs%3E %3ClinearGradient id=%22bg%22 x1=%220%22 y1=%220%22 x2=%221%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23fff4f8%22/%3E%3Cstop offset=%22.5%22 stop-color=%22%23fdeef4%22/%3E%3Cstop offset=%221%22 stop-color=%22%23f7ecf8%22/%3E%3C/linearGradient%3E %3Cpath id=%22h%22 d=%22M0 8 C-14 -8 -30 4 -18 18 L0 34 L18 18 C30 4 14 -8 0 8z%22/%3E %3Cpath id=%22c%22 d=%22M-6 -18 h12 v12 h12 v12 h-12 v12 h-12 v-12 h-12 v-12 h12z%22/%3E %3C/defs%3E %3Crect width=%221200%22 height=%22800%22 fill=%22url%28%23bg%29%22/%3E %3Cpath d=%22M-10 420 H250 l22 -40 l20 90 l26 -150 l24 170 l18 -70 H560 l20 -34 l18 70 l24 -120 l22 140 l16 -56 H1210%22 fill=%22none%22 stroke=%22%23e59ab6%22 stroke-width=%223.2%22 stroke-linejoin=%22round%22 stroke-linecap=%22round%22 opacity=%22.55%22/%3E %3Cg transform=%22translate%28860 520%29%22 fill=%22none%22 stroke=%22%23c77a9a%22 stroke-width=%227%22 stroke-linecap=%22round%22 opacity=%22.32%22%3E %3Cpath d=%22M-70 -150 C-80 -60 -40 -10 0 -10 C40 -10 80 -60 70 -150%22/%3E %3Cpath d=%22M0 -10 C0 60 60 90 110 70 C150 54 160 10 130 -10%22/%3E %3Ccircle cx=%22130%22 cy=%22-24%22 r=%2222%22 fill=%22%23f3c6d6%22 stroke-width=%226%22/%3E %3Ccircle cx=%22-70%22 cy=%22-158%22 r=%227%22 fill=%22%23c77a9a%22 stroke=%22none%22/%3E%3Ccircle cx=%2270%22 cy=%22-158%22 r=%227%22 fill=%22%23c77a9a%22 stroke=%22none%22/%3E %3C/g%3E %3Cg fill=%22%23e7a2bb%22 opacity=%22.45%22%3E %3Cuse href=%22%23h%22 transform=%22translate%28140 150%29 scale%281.4%29%22/%3E %3Cuse href=%22%23h%22 transform=%22translate%28420 640%29 scale%281%29%22/%3E %3Cuse href=%22%23h%22 transform=%22translate%281060 170%29 scale%281.2%29%22/%3E %3Cuse href=%22%23h%22 transform=%22translate%28640 200%29 scale%28.8%29%22/%3E %3Cuse href=%22%23h%22 transform=%22translate%28260 540%29 scale%28.7%29%22/%3E %3C/g%3E %3Cg fill=%22%23b8a3dd%22 opacity=%22.35%22%3E %3Cuse href=%22%23c%22 transform=%22translate%28320 160%29 scale%281.1%29%22/%3E %3Cuse href=%22%23c%22 transform=%22translate%28880 120%29 scale%28.9%29%22/%3E %3Cuse href=%22%23c%22 transform=%22translate%28120 620%29 scale%28.9%29%22/%3E %3Cuse href=%22%23c%22 transform=%22translate%281100 640%29 scale%281.1%29%22/%3E %3Cuse href=%22%23c%22 transform=%22translate%28560 700%29 scale%28.7%29%22/%3E %3C/g%3E %3Ctext x=%22600%22 y=%22300%22 text-anchor=%22middle%22 font-family=%22'Dancing Script'%2C'Brush Script MT'%2C'Segoe Script'%2Ccursive%22 font-size=%2292%22 fill=%22%23d57c9f%22 opacity=%22.28%22%3ERosaria%3C/text%3E %3C/svg%3E") center/cover no-repeat!important;border-left-color:var(--ro-line)!important;border-radius:var(--oc-radius)!important}
html body.organized[data-person="wife"] #calendar .day{background:#ffffff7a!important;border-right-color:var(--ro-line)!important;border-bottom-color:var(--ro-line)!important}
html body.organized[data-person="wife"] #calendar .day.out{background:#ffffff40!important}
html body.organized[data-person="wife"] #calendar .day:hover{background:#ffffffd9!important}
html body.organized[data-person="wife"] #calendar .day.today{background:#fce4ecd9!important}
html body.organized[data-person="wife"] #calendar .day.selected{background:#fbe6ee!important;box-shadow:inset 0 0 0 2px var(--oc-accent)!important}
html body.organized[data-person="wife"] #calendar .day[data-week]::before{color:#c48aa3}
html body.organized[data-person="wife"] main :is(.card,.dashboard-card,.agenda-preview,#nextShift,.shopping-hero){border-color:var(--ro-line)!important}
html body.organized[data-person="wife"] main :is(.home-hero,.page-heading){border-bottom-color:var(--ro-line)!important;background:transparent!important}
html body.organized[data-person="wife"] :is(main,dialog) :is(.rosaria-toolbar,.rosaria-more) button{border-color:var(--ro-line)!important;color:var(--ro-ink)!important}
html body.organized[data-person="wife"]>header{background:#fdf0f5!important;border-bottom-color:var(--ro-line)!important}
html body.organized[data-person="wife"] nav.mobile-nav{background:#fdf0f5!important;border-top-color:var(--ro-line)!important}
html body.organized[data-person="wife"] .people .person-card.chosen{border-color:var(--oc-accent)!important;color:var(--oc-accent)!important;background:var(--oc-accent-soft)!important}
html body.organized[data-person="wife"] dialog.oc-day-sheet .oc-day-sheet-bar{background:#fdf0f5;border-bottom-color:var(--ro-line)}

/* ---------- Scelta per gli eventi ripetuti ---------- */
html body.organized dialog.series-dialog{width:min(420px,calc(100vw - 32px));padding:20px!important}
html body.organized dialog.series-dialog::backdrop{background:#0006}
html body.organized dialog.series-dialog h3{margin:0 0 8px;font-size:18px}
html body.organized dialog.series-dialog p{margin:0 0 16px;color:var(--oc-text-2);line-height:1.45}
html body.organized dialog.series-dialog .series-actions{display:flex;flex-direction:column;gap:8px}
html body.organized dialog.series-dialog button{width:100%;margin:0!important;padding:12px!important;font-size:15px!important}
html body.organized dialog.series-dialog .series-cancel{margin-top:8px!important;border:0!important;color:var(--oc-text-2)!important}

/* ---------- Treni EAV: "Dov'è il treno?" ---------- */
html body.organized .train-find{margin:16px 0 8px;padding:14px;border:1px solid var(--oc-line);border-radius:var(--oc-radius);background:var(--oc-bg)}
html body.organized .train-find h3{margin:0 0 4px;font-size:17px}
html body.organized .train-find-hint{margin:0 0 10px;color:var(--oc-text-2);font-size:13px}
html body.organized .train-find-form{display:grid;grid-template-columns:1fr 1.6fr auto;gap:8px;align-items:end}
html body.organized .train-find-form label{margin:0;font-size:12px;color:var(--oc-text-2);display:flex;flex-direction:column;gap:4px}
html body.organized .train-find-form button{margin:0!important;height:44px}
@media (max-width:520px){html body.organized .train-find-form{grid-template-columns:1fr 1fr}html body.organized .train-find-form button{grid-column:1/-1}}
html body.organized .train-find-result{margin-top:12px}
html body.organized .train-find-head{padding:10px 12px;border-left:6px solid var(--oc-accent);background:var(--oc-bar);border-radius:var(--oc-radius)}
html body.organized .train-find-head.train-phase-at,html body.organized .train-find-head.train-phase-departing{border-left-color:#0b8043}
html body.organized .train-find-head.train-phase-none{border-left-color:#9e9e9e}
html body.organized .train-find-head strong{display:block;font-size:15px}
html body.organized .train-find-status{margin:4px 0;font-size:18px;font-weight:500;color:var(--oc-text)}
html body.organized .train-find-meta{font-size:13px;color:var(--oc-text-2)}
html body.organized .train-find-error{color:#c62828;margin:0}
html body.organized .train-find-loading,html body.organized .train-find-checked{color:var(--oc-text-3);font-size:12px}
html body.organized .train-stops{list-style:none;margin:10px 0 6px;padding:0;position:relative}
html body.organized .train-stops::before{content:"";position:absolute;left:7px;top:10px;bottom:10px;width:2px;background:var(--oc-line)}
html body.organized .train-stop{position:relative;display:grid;grid-template-columns:18px 1fr auto;gap:8px;align-items:baseline;padding:5px 0}
html body.organized .train-stop-dot{width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid #9e9e9e;margin-top:3px;z-index:1}
html body.organized .train-stop-name{font-size:14px}
html body.organized .train-stop-time{font-variant-numeric:tabular-nums;font-weight:500}
html body.organized .train-stop-extra{grid-column:2/-1;color:var(--oc-text-3);font-size:11px;margin-top:-2px}
html body.organized .train-stop.done{opacity:.55}
html body.organized .train-stop.done .train-stop-dot{background:#9e9e9e}
html body.organized .train-stop.now .train-stop-dot{background:var(--oc-accent);border-color:var(--oc-accent);box-shadow:0 0 0 4px var(--oc-accent-soft)}
html body.organized .train-stop.now .train-stop-name{font-weight:700}

/* ---------- Treni EAV: "Linea live" ---------- */
html body.organized dialog.train-dialog{width:min(760px,calc(100vw - 16px))!important;max-width:760px!important}
html body.organized .train-line{margin:6px 0 14px;padding:14px;border:1px solid var(--oc-line);border-radius:var(--oc-radius);background:var(--oc-bg)}
html body.organized .train-line-head{display:flex;align-items:center;justify-content:space-between}
html body.organized .train-line-head h3{margin:0;font-size:17px}
html body.organized .train-line-clock{font-variant-numeric:tabular-nums;color:var(--oc-text-2);font-weight:500}
html body.organized .train-line-chips{display:flex;gap:6px;overflow-x:auto;padding:10px 0 6px;scrollbar-width:none}
html body.organized .train-line-chips button.train-line-chip{flex:none;margin:0!important;padding:7px 14px!important;border-radius:999px!important;background:var(--oc-bg)!important;color:var(--oc-text)!important;border:1px solid var(--oc-line)!important;font-size:14px!important}
html body.organized .train-line-chips button.train-line-chip.on{background:#00796b!important;border-color:#00796b!important;color:#fff!important}
html body.organized .train-line-map{overflow-x:auto;overflow-y:hidden;margin:4px -4px 0;padding:0 4px;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}
html body.organized .train-line-track{position:relative;height:200px}
html body.organized .train-line-rail{position:absolute;left:0;right:0;top:62px;height:6px;border-top:3px solid #26a69a;border-bottom:3px solid #26a69a}
html body.organized .train-line-station{position:absolute;top:50px;width:0}
html body.organized .train-line-station .tick{position:absolute;left:-1px;top:0;width:3px;height:30px;background:#80cbc4}
html body.organized .train-line-station.end .tick{background:#00695c;width:5px;left:-2px}
html body.organized .train-line-station .name{position:absolute;top:36px;left:-8px;writing-mode:vertical-rl;white-space:nowrap;font-size:12px;color:var(--oc-text-2);max-height:112px;overflow:hidden;text-overflow:ellipsis}
html body.organized .train-line-station.end .name{color:var(--oc-text);font-weight:700}
html body.organized .train-line-track button.train-line-badge{position:absolute;transform:translateX(-50%);margin:0!important;padding:3px 8px!important;min-height:0;border-radius:8px!important;font-size:13px!important;font-weight:700!important;color:#fff!important;border:0!important;z-index:2;box-shadow:0 1px 3px #0003!important}
html body.organized .train-line-badge.up{top:24px}
html body.organized .train-line-badge.down{top:78px}
html body.organized .train-line-badge.ok{background:#2e7d32!important}
html body.organized .train-line-badge.slow{background:#ef6c00!important}
html body.organized .train-line-badge.late{background:#c62828!important}
html body.organized .train-line-badge.wait{background:#fff!important;color:var(--oc-text)!important;outline:2px dashed #9e9e9e;box-shadow:none!important}
html body.organized .train-line-legend{font-size:12px;color:var(--oc-text-2);margin:6px 0 2px;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center}
html body.organized .train-line-legend .dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:3px;vertical-align:-1px}
html body.organized .train-line-legend .dot.ok{background:#2e7d32}.train-line-legend .dot.slow{background:#ef6c00}.train-line-legend .dot.late{background:#c62828}
html body.organized .train-line-legend .dot.wait{border:2px dashed #9e9e9e;width:8px;height:8px}
html body.organized .train-line-note{font-size:12px;color:var(--oc-text-3);margin:2px 0 8px}
html body.organized .train-line-list{display:flex;flex-direction:column}
html body.organized .train-line-list button.train-line-row{display:grid!important;grid-template-columns:64px 1fr auto 48px;gap:8px;align-items:center;text-align:left;margin:0!important;padding:10px 4px!important;background:transparent!important;color:var(--oc-text)!important;border:0!important;border-top:1px solid var(--oc-line-soft)!important;border-radius:0!important;font-weight:400!important}
html body.organized .train-line-row .num{font-size:19px;font-variant-numeric:tabular-nums}
html body.organized .train-line-row .num.ok{color:#2e7d32}.train-line-row .num.slow{color:#ef6c00}.train-line-row .num.late{color:#c62828}
html body.organized .train-line-row .mid{min-width:0;display:flex;flex-direction:column}
html body.organized .train-line-row .dest{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.organized .train-line-row .st{color:var(--oc-text-2);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.organized .train-line-row .time{font-variant-numeric:tabular-nums;font-weight:700}
html body.organized .train-line-row .delay{justify-self:end;padding:4px 8px;border-radius:8px;background:var(--oc-bar);font-weight:700}
html body.organized .train-line-row .delay.ok{color:#2e7d32}.train-line-row .delay.slow{color:#ef6c00}.train-line-row .delay.late{color:#c62828}
html body.organized .train-line-empty{color:var(--oc-text-2);font-size:14px}
/* rinforzi dentro la finestra dei treni (vincono sulle regole generiche di #trainLive) */
html body.organized #trainLive .train-dialog-head h2{color:#fff!important}
html body.organized #trainLive :is(.train-line-legend,.train-line-note,.train-find-hint){font-weight:400!important}
html body.organized #trainLive .train-line-note{margin:2px 0 8px!important}
html body.organized #trainLive .train-line-track button.train-line-badge{min-height:0!important;height:auto!important;line-height:1.3!important;padding:3px 8px!important;font-size:13px!important;width:auto!important;min-width:0!important}
html body.organized #trainLive .train-line-track button.train-line-badge.wait{background:#fff!important;color:#424242!important}
html body.organized #trainLive .train-line-list button.train-line-row{min-height:0!important;width:100%!important}
html body.organized #trainLive .train-line-track{height:228px}
html body.organized #trainLive .train-line-station .name{top:54px;max-height:120px}
html body.organized #trainLive .train-line-track button.train-line-badge.down{top:74px}
html body.organized #trainLive .train-line-track button.train-line-badge.up{top:30px}
html body.organized #trainLive .train-line-legend{font-size:12px!important;margin:0 0 2px!important}
html body.organized #trainLive .train-line-note{font-size:12px!important}
html body.organized #trainLive .train-line-list button.train-line-row{font-size:14px!important}html body.organized #trainLive .train-line-row .num{font-size:18px!important}

/* Treni in movimento: scorrono lentamente sulla linea */
html body.organized #trainLive .train-line-track button.train-line-badge{transition:left 1s linear}
html body.organized #trainLive .train-line-track button.train-line-badge.moving::after{content:"";position:absolute;left:50%;bottom:-6px;width:6px;height:6px;margin-left:-3px;border-radius:50%;background:#00796b;opacity:.9;animation:ocTrainPulse 1s ease-in-out infinite}
html body.organized #trainLive .train-line-track button.train-line-badge.up.moving::after{bottom:auto;top:auto;bottom:-6px}
@keyframes ocTrainPulse{0%,100%{transform:scale(.6);opacity:.4}50%{transform:scale(1.2);opacity:1}}
@media (prefers-reduced-motion:reduce){html body.organized #trainLive .train-line-track button.train-line-badge{transition:none}html body.organized #trainLive .train-line-badge.moving::after{animation:none}}

/* ---------- Treni EAV: "Partenze" ---------- */
html body.organized #trainLive .train-board{margin:0 0 14px;padding:14px;border:1px solid var(--oc-line);border-radius:var(--oc-radius);background:var(--oc-bg)}
html body.organized #trainLive .train-board-head h3{margin:0 0 8px;font-size:17px}
html body.organized #trainLive .train-board select{width:100%;margin-bottom:8px}
html body.organized #trainLive .train-board-list{display:flex;flex-direction:column}
html body.organized #trainLive .train-board-list button.train-board-row{display:grid!important;grid-template-columns:58px 1fr auto 44px;gap:8px;align-items:center;text-align:left;width:100%!important;min-height:0!important;margin:0!important;padding:9px 2px!important;background:transparent!important;color:var(--oc-text)!important;border:0!important;border-top:1px solid var(--oc-line-soft)!important;border-radius:0!important;font-weight:400!important;font-size:14px!important}
html body.organized #trainLive .train-board-row .time{display:flex;flex-direction:column;font-variant-numeric:tabular-nums}
html body.organized #trainLive .train-board-row .time strong{font-size:17px}
html body.organized #trainLive .train-board-row .time s{font-size:11px;color:var(--oc-text-3)}
html body.organized #trainLive .train-board-row .mid{display:flex;flex-direction:column;min-width:0}
html body.organized #trainLive .train-board-row .dest{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.organized #trainLive .train-board-row .tb-num{color:var(--oc-text-2);font-size:12px}
html body.organized #trainLive .train-board-row .plat{font-weight:700;color:#00695c;white-space:nowrap}
html body.organized #trainLive .train-board-row .delay{justify-self:end;padding:3px 7px;border-radius:8px;background:var(--oc-bar);font-weight:700;color:#2e7d32}
html body.organized #trainLive .train-board-row.slow .delay{color:#ef6c00}
html body.organized #trainLive .train-board-row.late .delay{color:#c62828}
html body.organized #trainLive .train-board-note,html body.organized #trainLive .train-board-empty{font-size:12px!important;font-weight:400!important;color:var(--oc-text-3)}
html body.organized #trainLive .train-board-row>.mid{width:100%;min-width:0;overflow:hidden}
html body.organized #trainLive .train-board-row .tb-num,html body.organized #trainLive .train-board-row .dest{display:block;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;max-width:100%}
html body.organized #trainLive .train-board-search{width:100%;margin-bottom:6px}
/* Treni arrivati */
html body.organized .train-line-arrived-title{margin:14px 0 2px;font-size:14px;font-weight:600;color:#0b8043}
html body.organized .train-line-row.arrived .num.done{color:#0b8043}
html body.organized .train-line-row.arrived .dest{color:#0b8043}
html body.organized .train-find-head.train-phase-arrived{border-left-color:#0b8043;background:#e6f4ea}
html body.organized .train-find-head.train-phase-arrived .train-find-status{color:#0b5d2f}
/* Invio evento a un amico */
dialog.friend-share-dialog{width:min(440px,calc(100vw - 32px));border:0;border-radius:20px;padding:20px;box-shadow:0 20px 60px #0004}
dialog.friend-share-dialog::backdrop{background:#0006}
.friend-share-dialog h3{margin:0 0 8px;font-size:19px}
.friend-share-what{margin:0 0 6px;font-weight:600}
.friend-share-hint{margin:0 0 14px;color:#5f6368;font-size:14px}
.friend-share-actions{display:grid;gap:8px}
.friend-share-actions>*{margin:0!important;width:100%;text-align:center;justify-content:center}
.friend-share-wa{display:block;padding:12px;border-radius:12px;text-decoration:none;background:#25d366!important;color:#fff!important;font-weight:700}
.friend-share-done{min-height:1.2em;margin:10px 0 0;color:#0b8043;font-size:14px}
.friend-share-close{margin:8px 0 0!important;width:100%}

/* Segui il treno: tratta attuale con trenino animato */
html body.organized .train-follow{margin:12px 0 6px;padding:14px 14px 10px;border-radius:16px;background:linear-gradient(180deg,#eef6ff,#fff);border:1px solid #d6e6f7}
html body.organized .train-follow .tf-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline;font-weight:600}
html body.organized .train-follow .tf-state{font-size:15px;color:#1a2b3c}
html body.organized .train-follow .tf-count{font-variant-numeric:tabular-nums;font-size:15px;color:#0b57d0;white-space:nowrap}
html body.organized .train-follow .tf-track{position:relative;height:64px;margin:6px 26px 0}
html body.organized .train-follow .tf-rail{position:absolute;left:0;right:0;bottom:8px;height:6px;border-radius:3px;background:repeating-linear-gradient(90deg,#90a4ae 0 10px,#cfd8dc 10px 14px)}
html body.organized .train-follow .tf-done{position:absolute;left:0;bottom:8px;height:6px;border-radius:3px;background:#0b8043;width:0;transition:width 1s linear}
html body.organized .train-follow .tf-stop{position:absolute;bottom:3px;width:16px;height:16px;border-radius:50%;background:#fff;border:4px solid #0b8043;transform:translateX(-50%)}
html body.organized .train-follow .tf-a{left:0}html body.organized .train-follow .tf-b{left:100%;border-color:#0b57d0}
html body.organized .train-follow .tf-train{position:absolute;bottom:12px;left:0;width:84px;transform:translateX(-50%);transition:left 1s linear;filter:drop-shadow(0 3px 3px #0003)}
html body.organized .train-follow .tf-train svg{display:block;width:100%;height:auto}
html body.organized .train-follow.moving .tf-wheel{animation:tf-spin .6s linear infinite}
html body.organized .train-follow.moving .tf-body{animation:tf-bob .5s ease-in-out infinite alternate}
@keyframes tf-spin{to{transform:rotate(360deg)}}
@keyframes tf-bob{from{transform:translateY(0)}to{transform:translateY(-1.2px)}}
html body.organized .train-follow .tf-labels{display:flex;justify-content:space-between;gap:10px;margin-top:6px}
html body.organized .train-follow .tf-labels span{display:flex;flex-direction:column;max-width:48%}
html body.organized .train-follow .tf-lb{text-align:right;align-items:flex-end}
html body.organized .train-follow .tf-labels b{font-size:14px;line-height:1.2}
html body.organized .train-follow .tf-labels small{color:#5f6368;font-size:12px}
html body.organized .train-follow .tf-progress{margin-top:8px;font-size:12px;color:#5f6368}
@media (prefers-reduced-motion:reduce){html body.organized .train-follow .tf-wheel,html body.organized .train-follow .tf-body{animation:none!important}}
html body.organized .train-find-warning{display:block;margin:6px 0;color:#b06000;font-size:12px}
/* Binario pubblicato: rosso, grande, si vede subito */
html body.organized #trainLive .train-board-row .plat.published{display:inline-flex;align-items:baseline;gap:3px;padding:3px 10px;border-radius:10px;background:#fdecea;border:2px solid #d32f2f;color:#c62828!important;line-height:1}
html body.organized #trainLive .train-board-row .plat.published small{font-size:11px;font-weight:800;letter-spacing:.04em;color:#c62828}
html body.organized #trainLive .train-board-row .plat.published b{font-size:26px;font-weight:900;color:#c62828;font-variant-numeric:tabular-nums}
html body.organized #trainLive .train-board-row .plat:not(.published){color:#9e9e9e!important;font-weight:600}
html body .shift-dashboard[hidden],html body .dashboard-card[hidden]{display:none!important}
/* Ogni tasto ha la sua pagina: in alto restano solo le cose che servono a quella pagina.
   RA/RO serve solo in Home, Calendario e Riepilogo; il riquadro dei treni solo in Home. */
html body:is([data-page="materialsView"],[data-page="shoppingView"],[data-page="toolsView"]) .workspace-heading>.people{display:none!important}
html body:not([data-page="homeView"]) .workspace-heading>#trainLiveToggle{display:none!important}
html body:is([data-page="materialsView"],[data-page="shoppingView"],[data-page="toolsView"]) .workspace-heading{padding-top:0!important;margin-top:0!important;min-height:0!important}
