/* Family Control - stile unico per desktop (control center) e PWA (card pulite, stato verde/giallo/rosso). */
:root{
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #f8fafc; --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --primary: #3f6ad8; --primary-ink: #ffffff; --danger: #dc2626; --warn: #b45309;
  --green: #15803d; --yellow: #eab308; --red: #dc2626; --grey: #94a3b8;
  --green-bg: #dcfce7; --yellow-bg: #fef9c3; --red-bg: #fee2e2;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
  --sidebar: #0f172a; --sidebar-ink: #cbd5e1;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root{
    --bg: #0b1220; --surface: #111a2e; --surface-2: #0f172a; --text: #e2e8f0; --muted: #94a3b8; --line: #1f2a44;
    --primary: #6d8ff0; --primary-ink: #0b1220; --green: #4ade80; --warn: #fbbf24; --danger: #fca5a5; --green-bg: #0f2e1d; --yellow-bg: #3a300a; --red-bg: #3b1212; --sidebar: #070d1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{ margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a{ color: var(--primary); text-decoration: none; }
a:hover{ text-decoration: underline; }
h1{ font-size: 1.5rem; margin: 0 0 .25rem; } h2{ font-size: 1.15rem; margin: 1.5rem 0 .6rem; } h3{ font-size: 1rem; margin: 1.2rem 0 .5rem; }
code, pre{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted{ color: var(--muted); } .small{ font-size: .84rem; } .text-warn{ color: var(--warn); } .text-danger{ color: var(--danger) !important; }
.mt{ margin-top: .75rem; } .inline{ display: inline; } [hidden]{ display: none !important; }

/* Pulsanti e form */
.btn{ display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-decoration: none; }
.btn:hover{ text-decoration: none; filter: brightness(.97); }
.btn-primary{ background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-danger{ background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost{ background: transparent; }
.btn-small{ padding: .25rem .55rem; font-size: .85rem; }
.btn-block{ width: 100%; justify-content: center; margin-top: .5rem; }
.btn-google{ background: #fff; color: #1f2937; border-color: #d1d5db; }
.btn:disabled{ opacity: .5; cursor: not-allowed; }
.link{ background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }
.icon-btn{ position: relative; font-size: 1.1rem; padding: .3rem .5rem; text-decoration: none; }
.icon-btn .dot{ position: absolute; top: -4px; right: -6px; background: var(--red); color: #fff; font-size: .7rem; border-radius: 99px; padding: 0 .35rem; }
input, select, textarea{ font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: .45rem .6rem; max-width: 100%; }
input[type=checkbox], input[type=radio]{ width: auto; }
input[type=color]{ padding: 0; width: 2.4rem; height: 2rem; }
textarea{ width: 100%; }
.form{ display: flex; flex-direction: column; gap: .6rem; }
.form label{ display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; color: var(--muted); }
.form label > input, .form label > select, .form label > textarea{ color: var(--text); }
.form label.check, label.check{ flex-direction: row; align-items: center; gap: .4rem; color: var(--text); }
.form-inline{ display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.form-inline label{ display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--muted); }
.form-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
.form-grid .span-2{ grid-column: span 2; }
fieldset{ border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
legend{ font-size: .85rem; color: var(--muted); padding: 0 .3rem; }
.radio-row{ display: flex; flex-direction: column; gap: .3rem; }
.narrow{ max-width: 520px; }
details > summary{ cursor: pointer; color: var(--primary); font-size: .9rem; }

/* Card, badge, stati */
.card{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card-accent{ border-left: 4px solid var(--primary); }
.card-label{ font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-bottom: .35rem; }
.big{ font-size: 1.8rem; font-weight: 700; }
.grid{ display: grid; gap: 1rem; }
.cards-2{ grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.cards-4{ grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.badge{ display: inline-block; font-size: .74rem; padding: .08rem .5rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge-green{ background: var(--green-bg); color: var(--green); border-color: transparent; }
.badge-yellow{ background: var(--yellow-bg); color: var(--warn); border-color: transparent; }
.badge-red{ background: var(--red-bg); color: var(--red); border-color: transparent; }
.badge-grey{ opacity: .7; }
.badge-missing{ background: var(--yellow-bg); color: var(--warn); border: 1px dashed var(--yellow); }
.status-pill{ display: inline-block; vertical-align: middle; font-size: .8rem; padding: .15rem .6rem; border-radius: 99px; font-weight: 600; }
.status-green{ background: var(--green-bg); color: var(--green); } .status-yellow{ background: var(--yellow-bg); color: var(--warn); } .status-red{ background: var(--red-bg); color: var(--red); }
.dot-status{ display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; flex: none; vertical-align: middle; }
.dot-green{ background: var(--green); } .dot-yellow{ background: var(--yellow); } .dot-red{ background: var(--red); }
.flash{ padding: .7rem .9rem; border-radius: 10px; margin: 0 0 1rem; border: 1px solid var(--line); background: var(--surface); }
.flash-ok{ background: var(--green-bg); border-color: transparent; }
.flash-error{ background: var(--red-bg); border-color: transparent; }
.flash-warn{ background: var(--yellow-bg); border-color: transparent; }
.flash-info{ background: var(--surface-2); }
.banner{ background: var(--yellow-bg); padding: .5rem 1.5rem; font-size: .9rem; }

/* Turni, chip, eventi */
.shift{ display: inline-block; padding: .2rem .55rem; border-radius: 8px; font-size: .85rem; font-weight: 600; }
.shift-work{ background: #dbeafe; color: #1e3a8a; } .shift-rest, .shift-off{ background: var(--surface-2); color: var(--muted); }
.shift-leave{ background: var(--green-bg); color: var(--green); } .shift-missing{ background: var(--yellow-bg); color: var(--warn); border: 1px dashed var(--yellow); }
.needs-check{ outline: 2px dashed var(--yellow); }
@media (prefers-color-scheme: dark) { .shift-work{ background: #1e2f5a; color: #c7d7ff; } }
.chip{ display: inline-block; font-size: .75rem; padding: .1rem .4rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); margin: .1rem 0; }
.chip-drop{ border-color: #93c5fd; } .chip-pick{ border-color: #fdba74; } .chip-closure{ background: var(--yellow-bg); }
.ev{ display: block; font-size: .78rem; padding: .15rem .35rem; margin: .15rem 0; border-radius: 6px; border-left: 3px solid var(--c, var(--primary)); background: var(--surface-2); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ev[draggable=true]{ cursor: grab; }
.ev.dragging{ opacity: .4; }
.drop-hover{ outline: 2px dashed var(--primary); outline-offset: -2px; }

/* Conflitti e timeline */
.conflicts{ list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.conflict{ display: flex; gap: .55rem; align-items: flex-start; padding: .55rem .6rem; border-radius: 10px; background: var(--surface-2); }
.conflict.sev-red{ background: var(--red-bg); } .conflict.sev-yellow{ background: var(--yellow-bg); }
.conflict .dot-status{ margin-top: .3rem; }
.conflict.is-acknowledged, .conflict.is-resolved{ opacity: .65; }
.ok-line{ display: flex; align-items: center; gap: .5rem; }
.timeline{ list-style: none; margin: 0; padding: 0; }
.tl{ display: grid; grid-template-columns: 3.4rem 1rem 1fr; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.tl time{ font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-dot{ width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); }
.tl-dropoff .tl-dot{ background: #3b82f6; } .tl-pickup .tl-dot{ background: #f97316; } .tl-shift_start .tl-dot, .tl-shift_end .tl-dot{ background: #1e3a8a; }
.tl-missing{ background: var(--yellow-bg); }
.mini-list{ list-style: none; margin: 0; padding: 0; } .mini-list li{ padding: .2rem 0; }

/* Tabelle */
.table-wrap{ overflow-x: auto; }
.table{ width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; }
.table th, .table td{ text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th{ font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); }
.leg-late td{ background: var(--red-bg); } .leg-tight td{ background: var(--yellow-bg); }

/* Shell desktop */
.shell{ display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar{ background: var(--sidebar); color: var(--sidebar-ink); padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand{ display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; margin: 0 .4rem 1.2rem; text-decoration: none; }
.brand-lg{ color: var(--text); font-size: 1.2rem; justify-content: center; margin-bottom: 1.5rem; }
.sidebar nav{ display: flex; flex-direction: column; gap: .15rem; }
.sidebar nav a{ display: flex; align-items: center; gap: .6rem; color: var(--sidebar-ink); padding: .5rem .6rem; border-radius: 9px; text-decoration: none; }
.sidebar nav a svg{ width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a:hover{ background: rgba(255, 255, 255, .06); }
.sidebar nav a.active{ background: var(--primary); color: #fff; }
.sidebar-mobile{ margin-top: auto; font-size: .82rem; color: var(--sidebar-ink); padding: .5rem; }
.main-wrap{ min-width: 0; display: flex; flex-direction: column; }
.topbar{ display: flex; align-items: center; gap: 1rem; padding: .7rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-date{ color: var(--muted); }
.topbar-actions{ margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.content{ padding: 1.5rem; flex: 1; }
.footer{ padding: 1rem 1.5rem; font-size: .8rem; color: var(--muted); }
.page-head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar{ display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.filters{ display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.cat-filter{ font-size: .82rem; border-left: 4px solid var(--c); padding: .15rem .4rem; background: var(--surface); border-radius: 6px; display: inline-flex; gap: .3rem; align-items: center; }
.with-panel{ display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.panel{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; position: sticky; top: 4.5rem; max-height: calc(100vh - 6rem); overflow: auto; }
.panel h3:first-child{ margin-top: 0; }
.tabs{ display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a{ padding: .5rem .8rem; border-radius: 9px 9px 0 0; color: var(--muted); text-decoration: none; }
.tabs a.active{ background: var(--surface); color: var(--text); border: 1px solid var(--line); border-bottom-color: var(--surface); margin-bottom: -1px; }
.kv{ display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: 0; } .kv dt{ color: var(--muted); } .kv dd{ margin: 0; }

/* Griglia settimanale multi-persona */
.week-grid{ display: grid; grid-template-columns: 130px repeat(var(--cols), minmax(120px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.week-grid > *{ background: var(--surface); }
.wg-corner, .wg-head{ padding: .5rem; font-weight: 600; font-size: .85rem; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: .2rem; }
.wg-head.is-today{ background: #e0e7ff; } @media (prefers-color-scheme: dark) { .wg-head.is-today{ background: #1e2a4d; } }
.wg-head.status-red{ box-shadow: inset 0 -3px 0 var(--red); } .wg-head.status-yellow{ box-shadow: inset 0 -3px 0 var(--yellow); }
.wg-person{ padding: .5rem; font-weight: 600; border-left: 4px solid var(--line); }
.wg-cell{ padding: .35rem; min-height: 84px; position: relative; }
.cell-add{ position: absolute; right: 4px; bottom: 4px; border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; opacity: 0; }
.wg-cell:hover .cell-add{ opacity: 1; }
.month-grid{ display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mg-head{ background: var(--surface-2); padding: .4rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.mg-cell{ background: var(--surface); min-height: 110px; padding: .3rem; }
.mg-cell.is-out{ opacity: .5; } .mg-cell.is-today{ box-shadow: inset 0 0 0 2px var(--primary); }
.mg-day{ font-weight: 700; font-size: .85rem; color: var(--text); }
.agenda-list{ list-style: none; margin: 0; padding: 0; }
.agenda-list li{ border-left: 4px solid var(--c); padding: .4rem .6rem; background: var(--surface); margin-bottom: .3rem; border-radius: 6px; display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.agenda-list .time{ font-weight: 700; min-width: 7rem; }

/* Documenti, regole */
.doc-text{ white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; max-height: 480px; overflow: auto; font-size: .85rem; }
.rules-grid{ display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rule-card header{ display: flex; gap: .3rem; }
.rule-card h3{ margin: .4rem 0; }
.rule-card.status-disabled, .rule-card.status-superseded{ opacity: .6; }
.source{ border-left: 3px solid var(--primary); padding: .3rem .6rem; margin-bottom: .6rem; background: var(--surface-2); border-radius: 0 8px 8px 0; }
blockquote{ margin: .3rem 0; font-style: italic; }
.rule-list li{ padding: .25rem 0; }
.codes, .secret{ font-size: 1.05rem; letter-spacing: .08em; }
.log{ font-size: .75rem; max-height: 300px; overflow: auto; white-space: pre-wrap; }
.steps{ list-style: none; padding: 0; } .steps li{ padding: .5rem 0; display: flex; gap: .6rem; align-items: center; }
.step-n{ display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; }
.steps li.done .step-n{ background: var(--green); color: #fff; border-color: var(--green); }
.notif-list{ list-style: none; padding: 0; } .notif-list li{ padding: .6rem; border-bottom: 1px solid var(--line); } .notif-list li.unread{ background: var(--surface); }
.map{ height: 360px; border-radius: var(--radius); margin-top: 1rem; border: 1px solid var(--line); }
.schedule-grid select{ width: 100%; } .custom-times{ display: flex; gap: .2rem; margin-top: .2rem; }
.legal{ max-width: 720px; }

/* Pagine di accesso */
body.auth{ display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.auth-box{ width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; box-shadow: var(--shadow); }
body.auth .auth-box:has(.legal), body.auth .auth-box:has(.table){ max-width: 760px; }
.auth-foot{ text-align: center; font-size: .8rem; color: var(--muted); margin-top: 1.4rem; }

/* PWA mobile (iPhone): stile "Family Control" - card chiare, iniziali colorate, azione primaria blu */
body.mobile{
  --m-blue: #1f6feb; --m-blue-soft: #e8f0fe; --m-card: #ffffff; --m-bg: #f5f7fb; --m-ink: #0f1b3d; --m-sub: #5b6785; --m-line: #e6eaf2;
  --m-green: #16a34a; --m-green-soft: #e7f7ec; --m-red: #dc2626; --m-red-soft: #fdeaea; --m-amber: #b45309; --m-amber-soft: #fff5e0;
  --m-shadow: 0 1px 2px rgba(16, 24, 64, .05), 0 6px 20px rgba(16, 24, 64, .06);
  background: var(--m-bg); color: var(--m-ink); padding-bottom: calc(82px + env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  body.mobile{ --m-blue: #5b9bff; --m-blue-soft: #16264a; --m-card: #121a2e; --m-bg: #0b1220; --m-ink: #e6ebf5; --m-sub: #97a3bf; --m-line: #22304d; --m-green: #4ade80; --m-green-soft: #10291b; --m-red: #f87171; --m-red-soft: #331417; --m-amber: #fbbf24; --m-amber-soft: #33270d; --m-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
}
body.mobile a{ color: var(--m-blue); }
body.mobile svg{ fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-top{ position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .5rem; padding: calc(.7rem + env(safe-area-inset-top)) 1rem .6rem; background: color-mix(in srgb, var(--m-bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.m-title{ flex: 1; min-width: 0; }
.m-top h1{ font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
.m-top-home h1{ font-size: 1.9rem; }
.m-sub{ color: var(--m-sub); font-weight: 600; }
.m-top-actions{ display: flex; gap: .25rem; }
.m-icon{ position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--m-ink) !important; }
.m-icon svg{ width: 24px; height: 24px; }
.m-top-actions .m-icon + .m-icon{ background: var(--m-blue-soft); color: var(--m-blue) !important; }
.m-badge{ position: absolute; top: 6px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--m-blue); color: #fff; font-size: .65rem; font-weight: 700; line-height: 16px; text-align: center; }
.m-content{ padding: .25rem 1rem 1.25rem; display: flex; flex-direction: column; gap: .8rem; max-width: 640px; margin: 0 auto; }
.m-card{ background: var(--m-card); border-radius: 18px; padding: 1rem; box-shadow: var(--m-shadow); color: var(--m-ink); text-decoration: none; display: block; border: 1px solid var(--m-line); }
a.m-card, a.m-card:hover{ color: var(--m-ink) !important; text-decoration: none; }
.m-grow{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-line{ display: block; font-size: .88rem; }
.m-chev{ color: var(--m-sub); font-size: 1.6rem; line-height: 1; }
.m-kicker{ font-size: .85rem; color: var(--m-sub); font-weight: 600; }
.m-card-title{ display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 800; margin: 0 0 .7rem; }
.m-card-title svg{ width: 22px; height: 22px; }
.m-h2{ font-size: 1.1rem; font-weight: 800; margin: .3rem 0 -.2rem; }
.m-note{ text-align: center; }
.m-link-center{ display: block; text-align: center; font-weight: 600; padding: .5rem; }
 .m-weeknav{ display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
 .m-weeknav a{ min-width: 44px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; text-decoration: none; color: var(--m-ink) !important; }

/* Stato del giorno e prossima azione */
.m-ok, .m-alert, .m-next, .m-routecard{ display: flex; align-items: center; gap: .9rem; }
.m-ok{ background: var(--m-green-soft); border-color: transparent; }
.m-ok strong{ font-size: 1.1rem; }
.m-ok-ico, .m-next-ico, .m-alert-ico, .m-route-ico{ flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.m-ok-ico{ background: var(--m-green); }
.m-ok-ico svg{ width: 28px; height: 28px; stroke-width: 2.6; }
.m-alert{ border-color: transparent; }
.m-alert.sev-red{ background: var(--m-red-soft); }
.m-alert.sev-yellow{ background: var(--m-amber-soft); }
.m-alert-ico{ font-size: 1.6rem; font-weight: 900; }
.sev-red .m-alert-ico{ background: var(--m-red); }
.sev-yellow .m-alert-ico{ background: #f59e0b; }
.m-alert strong{ font-size: 1.05rem; }
.sev-red strong{ color: var(--m-red); }
.sev-yellow strong{ color: var(--m-amber); }
.m-next{ background: linear-gradient(135deg, var(--m-green-soft), var(--m-card) 70%); }
.m-next-ico{ background: var(--m-green); }
.m-next-ico svg, .m-route-ico svg{ width: 26px; height: 26px; }
.m-next-title{ font-size: 1.15rem; line-height: 1.3; }
.m-next-time{ font-size: 1.6rem; font-weight: 800; color: var(--m-blue); font-variant-numeric: tabular-nums; }
.m-route-ico{ background: var(--m-blue-soft); color: var(--m-blue); }

/* Persone */
.av{ --c: #4f7cff; flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; font-size: 1.15rem; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.av-sm{ width: 30px; height: 30px; font-size: .85rem; box-shadow: none; }
.av-lg{ width: 56px; height: 56px; font-size: 1.4rem; }
.m-person-head{ display: flex; align-items: center; gap: .65rem; margin-bottom: .55rem; }
.m-person-head strong{ font-size: 1.1rem; }
.m-chip{ display: inline-block; margin-top: .5rem; font-size: .8rem; font-weight: 600; padding: .3rem .65rem; border-radius: 99px; }
.m-chip-ok{ background: var(--m-green-soft); color: var(--m-green); }
.m-chip-off{ background: var(--m-bg); color: var(--m-sub); }

/* Timeline */
.m-tl{ list-style: none; margin: 0; padding: 0; }
.m-tl li{ --c: #94a3b8; position: relative; display: grid; grid-template-columns: 3.2rem 1fr; gap: .6rem; padding: .35rem 0 .35rem 1.3rem; font-size: .95rem; }
.m-tl li::before{ content: ""; position: absolute; left: 0; top: .72rem; width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.m-tl li::after{ content: ""; position: absolute; left: 5px; top: 1.45rem; bottom: -.4rem; width: 2px; background: color-mix(in srgb, var(--c) 35%, transparent); }
.m-tl li:last-child::after{ display: none; }
.m-tl time{ font-weight: 700; font-variant-numeric: tabular-nums; }
.m-tl a{ color: inherit !important; }
.m-tl .is-missing{ background: var(--m-amber-soft); border-radius: 8px; }

/* Settimana */

.m-wk{ display: flex; flex-direction: column; gap: .45rem; }
.m-wk-row{ display: grid; grid-template-columns: 3.6rem repeat(7, minmax(0, 1fr)); gap: .25rem; align-items: stretch; }
.m-wk-who{ display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .7rem; font-weight: 600; overflow: hidden; }
.m-wk-who span:last-child{ max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-cell{ display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: .15rem; border-radius: 9px; font-size: .66rem; font-weight: 600; line-height: 1.15; color: var(--m-ink) !important; text-decoration: none; overflow: hidden; }
.wk-cell span{ display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wk-work{ background: #fdf0d5; }
.wk-check{ outline: 2px dashed #f59e0b; outline-offset: -2px; }
.wk-rest, .wk-off{ background: var(--m-bg); color: var(--m-sub) !important; }
.wk-leave{ background: var(--m-green-soft); }
.wk-missing{ background: var(--m-amber-soft); border: 1px dashed #f59e0b; }
.wk-school{ background: var(--m-blue-soft); }
.wk-event{ background: color-mix(in srgb, var(--c) 22%, var(--m-card)); }
@media (prefers-color-scheme: dark) { .wk-work{ background: #3a2e12; } }
.m-evlist, .m-agenda{ list-style: none; margin: 0; padding: 0; }
.m-evlist li{ display: grid; grid-template-columns: 3.4rem 3rem 1fr; gap: .4rem; padding: .5rem 0; border-bottom: 1px solid var(--m-line); font-size: .9rem; }
.m-evlist li:last-child{ border-bottom: 0; }
.m-evday{ font-weight: 700; }
.m-evtime{ color: var(--m-sub); font-variant-numeric: tabular-nums; }
.m-evlist a, .m-agenda a{ color: var(--m-ink) !important; }

/* Calendario mese */
.m-month{ padding: .6rem; }
.m-month-grid{ display: grid; grid-template-columns: repeat(7, 1fr); gap: .15rem; text-align: center; }
.m-mh{ font-size: .72rem; color: var(--m-sub); font-weight: 600; padding: .2rem 0; }
.m-md{ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; border-radius: 12px; color: var(--m-ink) !important; text-decoration: none; font-weight: 600; }
.m-md.is-out{ opacity: .35; }
.m-md.is-sun span{ color: var(--m-red); }
.m-md.is-today{ background: var(--m-blue-soft); }
.m-md.is-sel{ background: var(--m-blue); }
.m-md.is-sel span{ color: #fff; }
.m-dots{ display: flex; gap: 2px; height: 5px; }
.m-dots b{ width: 5px; height: 5px; border-radius: 50%; }
.m-agenda li{ --c: #94a3b8; display: flex; gap: .7rem; align-items: baseline; padding: .55rem 0 .55rem 1.1rem; position: relative; border-bottom: 1px solid var(--m-line); }
.m-agenda li::before{ content: ""; position: absolute; left: 0; top: .95rem; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.m-agenda-time{ min-width: 5.6rem; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .9rem; }
.m-add{ display: block; text-align: center; padding: .7rem 0 .1rem; font-weight: 700; }

/* Percorsi */
.m-seg{ display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--m-line); padding: 3px; border-radius: 12px; gap: 3px; }
.m-seg a{ text-align: center; padding: .5rem; border-radius: 10px; font-weight: 600; color: var(--m-sub) !important; text-decoration: none; }
.m-seg a.is-on{ background: var(--m-card); color: var(--m-blue) !important; box-shadow: var(--m-shadow); }
.m-seg-sm{ margin-bottom: .7rem; }
.m-routeform{ display: flex; flex-direction: column; gap: .7rem; }
.m-routeform > label{ display: grid; grid-template-columns: 2rem 1fr; align-items: center; gap: .5rem; font-weight: 600; color: var(--m-sub); }
.m-modes{ display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.m-mode{ position: relative; }
.m-mode input{ position: absolute; opacity: 0; }
.m-mode span{ display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .5rem .2rem; border-radius: 12px; border: 1px solid var(--m-line); font-size: .78rem; font-weight: 600; cursor: pointer; }
.m-mode svg{ width: 22px; height: 22px; }
.m-mode input:checked + span{ background: var(--m-blue); border-color: var(--m-blue); color: #fff; }
.m-mode input:focus-visible + span{ outline: 3px solid var(--m-blue); outline-offset: 2px; }
.m-routeres{ display: flex; flex-direction: column; gap: .5rem; }
.m-routeline{ display: flex; gap: .7rem; align-items: flex-start; }
.m-pin{ flex: none; width: 14px; height: 14px; border-radius: 50%; margin-top: .3rem; }
.m-pin-a{ background: var(--m-blue); }
.m-pin-b{ background: var(--m-red); }
.m-stops{ list-style: none; margin: 0 0 .5rem; padding: 0; }
.m-stops li{ display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; }
.m-stop-n{ flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--m-blue); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }

/* Famiglia, menu, permessi */
.m-family{ display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: .6rem; text-align: center; }
.m-fam-p{ display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.m-fam-p > span:last-child{ font-size: .75rem; color: var(--m-sub); }
.m-menu{ padding: .3rem .9rem; }
.m-menu a{ display: flex; align-items: center; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--m-line); color: var(--m-ink) !important; text-decoration: none; }
.m-menu a:last-child{ border-bottom: 0; }
.m-menu-ico{ --c: #475569; flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); }
.m-menu-ico svg{ width: 22px; height: 22px; }
.m-actions a.is-on{ background: var(--m-blue-soft); margin: 0 -.9rem; padding: .75rem .9rem; }
.m-sub-date{ margin: -.2rem 0 0; color: var(--m-sub); font-size: .9rem; }
.m-kv{ display: flex; flex-direction: column; padding: .35rem 0; border-bottom: 1px solid var(--m-line); font-size: .9rem; }
.m-kv:last-child{ border-bottom: 0; }
.m-bal{ display: flex; flex-direction: column; gap: 1rem; }
.m-bal-head{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .5rem; font-size: .92rem; margin-bottom: .35rem; }
.m-bal-head strong{ flex: 1 1 55%; }
.m-bal-head > span{ color: var(--m-sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-bal-head .badge-missing{ white-space: normal; }
.m-bar{ height: 9px; border-radius: 99px; background: var(--m-line); overflow: hidden; }
.m-bar i{ display: block; height: 100%; border-radius: 99px; background: var(--c); }
body.mobile .flash{ border-radius: 14px; }
body.mobile .btn{ border-radius: 14px; padding: .7rem 1rem; font-weight: 600; }
body.mobile .btn-primary{ background: var(--m-blue); border-color: var(--m-blue); color: #fff !important; }
/* niente zoom automatico su iOS: campi a 16px */
body.mobile .form input, body.mobile .form select, body.mobile .form textarea, body.mobile .m-routeform select{ font-size: 16px; padding: .65rem; border-radius: 12px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); width: 100%; }

/* Turni del mese: pennello sul calendario */
.sb-card{ display: flex; flex-direction: column; gap: .6rem; }
.sb-brushes{ display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: .3rem; }
.sb-brush{ position: relative; }
.sb-brush input{ position: absolute; opacity: 0; width: 1px; height: 1px; }
.sb-b{ --sb: #94a3b8; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 .15rem; border-radius: 12px; border: 2px solid var(--sb); color: var(--sb); font-weight: 800; font-size: .8rem; line-height: 1.1; cursor: pointer; background: var(--m-card); font-variant-numeric: tabular-nums; text-align: center; }
.sb-brush input:checked + .sb-b{ background: var(--sb); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--sb) 40%, transparent); }
.sb-brush input:focus-visible + .sb-b{ outline: 3px solid var(--m-blue); outline-offset: 2px; }
.sb-hint{ margin: 0; }
.sb-breve{ --sb: #3b82f6; }
.sb-medio{ --sb: #0891b2; }
.sb-lungo{ --sb: #1e3a8a; }
.sb-riposo{ --sb: #64748b; }
.sb-x{ --sb: #dc2626; }
@media (prefers-color-scheme: dark) { .sb-lungo{ --sb: #93b4ff; } .sb-riposo{ --sb: #a3b0c6; } }
.sb-cal{ display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sb-wd{ text-align: center; font-size: .72rem; font-weight: 700; color: var(--m-sub); padding-bottom: 2px; }
.sb-day{ display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 58px; padding: 5px 1px; border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .08s; }
.sb-day:active{ transform: scale(.94); }
.sb-day .sb-n{ font-weight: 700; font-size: .95rem; }
.sb-day .sb-l{ font-size: .62rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; min-height: .7rem; }
.sb-day:not(.sb-none){ background: var(--sb); border-color: var(--sb); color: #fff; }
.sb-day.sb-none .sb-l{ color: var(--m-amber); }
.sb-day.is-red .sb-n{ color: var(--m-red); }
.sb-day:not(.sb-none).is-red .sb-n{ color: #fff; text-decoration: underline; }
.sb-day.is-today{ box-shadow: 0 0 0 2px var(--m-ink); }
.sb-day.is-saving{ opacity: .55; }
.sb-day.is-error{ box-shadow: 0 0 0 2px var(--m-red); }
.sb-copy-list{ display: flex; flex-wrap: wrap; gap: .4rem; }
.sb-copy-list .btn{ padding: .5rem .8rem; }
body.mobile details > summary{ font-weight: 700; color: var(--m-ink); }
body.mobile fieldset{ border: 1px solid var(--m-line); border-radius: 12px; }
body.mobile .form label.check > input[type=checkbox], body.mobile .form label.check > input[type=radio]{ width: 1.15rem; height: 1.15rem; flex: 0 0 1.15rem; margin: .25rem 0; padding: 0; }
.family-policy{ display: grid; gap: .8rem; }
.family-policy fieldset{ min-width: 0; }
.family-policy legend{ max-width: 100%; }
.family-policy label.check{ min-height: 44px; }

/* Percorsi gratuiti: tempi abituali e verifica arrivi */
.m-eta{ display: flex; flex-direction: column; gap: .2rem; padding: .7rem .8rem; border-radius: 12px; background: var(--m-blue-soft); }
.m-eta > strong{ font-size: 1.4rem; color: var(--m-blue); }
.m-eta-dep{ color: var(--m-blue); font-size: 1.05rem; }
.m-stops .m-leg{ display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-left: 12px; padding: .15rem 0 .15rem 1.3rem; border-left: 2px dashed var(--m-line); font-size: .82rem; color: var(--m-sub); }
.m-leg-tag{ font-weight: 700; padding: .1rem .5rem; border-radius: 99px; font-size: .75rem; }
.m-leg-tag.is-ok{ background: var(--m-green-soft); color: var(--m-green); }
.m-leg-tag.is-tight{ background: var(--m-amber-soft); color: var(--m-amber); }
.m-leg-tag.is-late{ background: var(--m-red-soft); color: var(--m-red); }
.m-times{ display: flex; flex-direction: column; gap: .15rem; }
.m-time-row{ display: grid; grid-template-columns: minmax(0, 1fr) 4.6rem auto; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--m-line); }
.m-time-pair{ font-size: .9rem; font-weight: 600; line-height: 1.25; }
.m-time-row input, .m-time-new input, .m-time-new select, .m-time-park input{ font-size: 16px; padding: .5rem; border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); width: 100%; }
.m-time-check{ font-size: .82rem; font-weight: 700; white-space: nowrap; }
.m-time-new{ display: grid; grid-template-columns: 1fr 1fr 4.6rem; gap: .4rem; margin-top: .5rem; }
.m-time-park{ display: grid; grid-template-columns: minmax(0, 1fr) 4.6rem; gap: .5rem; align-items: center; margin: .7rem 0 .2rem; font-size: .88rem; color: var(--m-sub); }

/* Barra di navigazione in basso */
.bottom-nav{ position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--m-card, #fff) 94%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--m-line, #e6eaf2); padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom)); z-index: 10; }
.bottom-nav a{ display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .7rem; font-weight: 600; color: var(--m-sub, #64748b) !important; text-decoration: none; }
.bottom-nav a svg{ width: 25px; height: 25px; }
.bottom-nav a.active{ color: var(--m-blue, #1f6feb) !important; }
.bottom-nav a.active svg{ fill: color-mix(in srgb, currentColor 18%, transparent); }

/* Responsive: il desktop resta usabile su tablet */
@media (max-width: 1100px){ .with-panel { grid-template-columns: 1fr; } .panel { position: static; max-height: none; } }
@media (max-width: 800px) {
  .shell{ grid-template-columns: 1fr; } .sidebar{ position: static; height: auto; } .sidebar nav{ flex-direction: row; flex-wrap: wrap; }
  .form-grid{ grid-template-columns: 1fr; } .form-grid .span-2{ grid-column: auto; }
  .week-grid{ overflow-x: auto; display: grid; grid-template-columns: 110px repeat(var(--cols), 140px); }
}

/* Accessibilità: focus e aree tattili, senza alterare la gerarchia operativa. */
:focus-visible{ outline: 3px solid var(--primary); outline-offset: 3px; }
.bottom-nav > a{ min-width: 44px; min-height: 44px; }
.bottom-nav > a{ flex-direction: column; }
.conflicts a{ display: inline-block; padding: .5rem 0; min-height: 44px; }
.mobile .small, .mobile label{ font-size: .875rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after{ scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

/* Partenza, conto alla rovescia, ritardi, conferme "fatto", perché */

.m-late-form{ display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: .5rem; padding-top: .55rem; border-top: 1px solid var(--m-line); }
.m-late-form > span{ grid-column: 1 / -1; }
.m-late-form .btn{ justify-content: center; padding: .5rem 0; }
.m-late{ display: flex; align-items: center; gap: .8rem; background: var(--m-amber-soft); border-color: transparent; }
.m-late-ico{ font-size: 1.5rem; }
.m-why{ display: block; font-size: .78rem; color: var(--m-sub); font-style: italic; }
.m-done{ display: inline-block; margin-top: .2rem; font-size: .8rem; font-weight: 700; color: var(--m-green); background: var(--m-green-soft); padding: .15rem .55rem; border-radius: 99px; }

/* Conflitto: soluzioni a pulsante */
.m-sol{ display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--m-line); }
.m-sol:last-child{ border-bottom: 0; }
.m-sol form{ margin: 0; }
.m-sol .btn-small{ padding: .45rem .8rem; }
.m-sol-leave .m-grow strong{ font-size: .95rem; }
.m-sol-actions{ display: flex; flex-direction: column; gap: .4rem; }
.m-rule-order ol{ margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.m-days{ display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.m-day-opt{ position: relative; }
.m-day-opt input{ position: absolute; opacity: 0; }
.m-day-opt span{ display: block; text-align: center; padding: .5rem 0; border-radius: 10px; border: 1px solid var(--m-line); font-weight: 700; font-size: .8rem; cursor: pointer; }
.m-day-opt input:checked + span{ background: var(--m-blue); border-color: var(--m-blue); color: #fff; }
.m-day-opt input:focus-visible + span{ outline: 3px solid var(--m-blue); outline-offset: 2px; }
.fc-admin-banner{ display: block; padding: .7rem 1rem; background: #fff5e0; color: #7c4a03 !important; font-weight: 600; text-decoration: none; border-bottom: 1px solid #f5d38a; }
.fc-admin-banner.m-card{ border-radius: 14px; border: 1px solid #f5d38a; }

/* Testi minimi più leggibili su iPhone */
.sb-day .sb-l{ font-size: .7rem; }
.wk-cell{ font-size: .72rem; }
.m-mh, .sb-wd{ font-size: .78rem; }
.bottom-nav a{ font-size: .72rem; }

/* Desktop nello stesso stile dell'iPhone: chiaro, card arrotondate, blu come colore d'azione */
:root{
  --bg: #f5f7fb; --surface: #ffffff; --surface-2: #f1f4fa; --text: #0f1b3d; --muted: #5b6785; --line: #e6eaf2;
  --primary: #1f6feb; --primary-ink: #ffffff; --primary-soft: #e8f0fe;
  --radius: 18px; --shadow: 0 1px 2px rgba(16, 24, 64, .05), 0 6px 20px rgba(16, 24, 64, .06);
  --sidebar: #ffffff; --sidebar-ink: #3b4668;
}
@media (prefers-color-scheme: dark) {
  :root{
    --bg: #0b1220; --surface: #121a2e; --surface-2: #0f172a; --text: #e6ebf5; --muted: #97a3bf; --line: #22304d;
    --primary: #5b9bff; --primary-ink: #0b1220; --primary-soft: #16264a; --sidebar: #0e1628; --sidebar-ink: #b8c2da;
  }
}
body:not(.mobile):not(.auth) h1{ font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
body:not(.mobile):not(.auth) h2{ font-weight: 800; }
.sidebar{ border-right: 1px solid var(--line); }
.brand{ color: var(--text); font-size: 1.1rem; }
.sidebar nav a{ font-weight: 600; }
.sidebar nav a:hover{ background: var(--surface-2); text-decoration: none; }
.sidebar nav a.active{ background: var(--primary-soft); color: var(--primary); }
.sidebar-mobile{ color: var(--primary); font-weight: 600; }
.topbar{ background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card{ border-radius: var(--radius); }
.btn{ border-radius: 12px; font-weight: 600; }
.btn-primary{ box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 28%, transparent); }
input, select, textarea{ border-radius: 12px; }
.tabs{ border-bottom: 0; gap: .35rem; background: var(--surface-2); padding: 4px; border-radius: 14px; display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.tabs a{ border-radius: 10px; font-weight: 600; }
.tabs a.active{ background: var(--surface); color: var(--primary); border: 0; margin-bottom: 0; box-shadow: var(--shadow); }
.table{ border-radius: 14px; }
.flash{ border-radius: 14px; }
.week-grid, .month-grid{ border-radius: var(--radius); }
.shift-work{ background: var(--primary-soft); color: var(--primary); }

/* Coperture tra genitori, cosa portare, scadenze, vacanze, equilibrio, link nonni */
.m-cover{ display: flex; flex-direction: column; gap: .3rem; border: 2px solid var(--m-blue); }
.m-cover.is-waiting{ border: 1px dashed var(--m-line); background: var(--m-bg); }
.m-cover-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .3rem; }
.m-cover-actions .btn{ margin-top: 0; }
.m-deadline-soon{ display: flex; flex-direction: column; gap: .15rem; background: var(--m-red-soft); border-color: transparent; }
.m-checklist{ display: flex; flex-direction: column; gap: .1rem; }
.m-check-row{ display: flex; align-items: center; gap: .7rem; padding: .35rem 0; }
.m-check-box{ flex: none; width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--m-line); background: var(--m-card); color: #fff; font-weight: 900; cursor: pointer; }
.m-check-row.is-done .m-check-box{ background: var(--m-green); border-color: var(--m-green); }
.m-check-row.is-done > span{ text-decoration: line-through; color: var(--m-sub); }
.m-dl-days{ flex: none; min-width: 3.4rem; text-align: center; font-weight: 800; font-size: .8rem; padding: .3rem .4rem; border-radius: 10px; background: var(--m-bg); }
.m-dl-days.is-soon{ background: var(--m-amber-soft); color: var(--m-amber); }
.m-dl-days.is-late{ background: var(--m-red-soft); color: var(--m-red); }
.m-hol > summary{ display: flex; align-items: center; gap: .6rem; list-style: none; cursor: pointer; }
.m-hol > summary::-webkit-details-marker{ display: none; }
.m-hol-days{ list-style: none; margin: .6rem 0 0; padding: 0; }
.m-hol-days li{ display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--m-line); font-size: .88rem; }
.m-hol-days li.is-uncovered{ background: color-mix(in srgb, var(--m-red-soft) 60%, transparent); margin: 0 -.5rem; padding: .45rem .5rem; border-radius: 8px; }
.m-hol-date{ flex: none; width: 4.6rem; font-weight: 700; }
.m-ok-text{ color: var(--m-green); }
.m-prop{ display: flex; flex-direction: column; gap: .25rem; padding: .5rem 0; border-bottom: 1px solid var(--m-line); }
.m-bal-stats{ display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .8rem; margin-top: .4rem; color: var(--m-sub); }
.m-bal-stats strong{ color: var(--m-ink); }
.m-link-box{ width: 100%; font-size: 14px; padding: .6rem; border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-ink); margin: .3rem 0; }
.m-sol-helper{ flex-wrap: wrap; }
.m-sol .btn-small + .btn-small{ margin-left: -.3rem; }
.helper-page{ max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: .8rem; }
.helper-item{ display: flex; flex-direction: column; gap: .3rem; }
.helper-ok{ color: var(--green); font-weight: 800; margin: .3rem 0 0; }

/* Chi ritira: scelta in un tocco */
.m-pickup{ display: flex; flex-direction: column; gap: .25rem; border: 2px solid var(--m-blue); }
.m-pickup-who{ font-size: 1.25rem; font-weight: 800; }
.m-pickup-btns{ display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
.m-pickup-btns form{ margin: 0; }
.m-pickup-btn{ --c: #1f6feb; width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; border-radius: 14px; border: 2px solid var(--c); background: var(--m-card); color: var(--m-ink); font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; }
.m-pickup-btn.is-on{ background: color-mix(in srgb, var(--c) 16%, var(--m-card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.m-pickup-reset{ margin-top: .3rem; text-align: center; }
.m-wk-pick{ margin-top: -.2rem; }
.wk-pick{ background: color-mix(in srgb, var(--c) 22%, var(--m-card)); font-weight: 800; }
.m-rule-simple{ border: 2px solid var(--m-blue); }
.m-rule-list{ margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }

/* ===== Restyling 25/09: Oggi con "Adesso", avvisi raggruppati, bambini compatti, pulsante +, settimana compatta ===== */
.m-strip{ display: grid; grid-template-columns: 1.6rem repeat(7, minmax(0, 1fr)) 1.6rem; gap: .2rem; align-items: stretch; margin: -.2rem 0 0; }
.m-strip a{ display: flex; flex-direction: column; align-items: center; padding: .35rem 0; border-radius: 12px; color: var(--m-ink) !important; text-decoration: none; font-size: .72rem; font-weight: 600; }
.m-strip a strong{ font-size: 1.05rem; }
.m-strip a.is-today{ background: var(--m-blue-soft); }
.m-strip a.is-sel{ background: var(--m-blue); color: #fff !important; }
.m-strip .m-strip-arrow{ justify-content: center; font-size: 1.4rem; color: var(--m-sub) !important; }
.m-back-today{ align-self: center; font-weight: 700; font-size: .9rem; margin-top: -.4rem; }
body.is-swiping-next .m-content{ transform: translateX(-12px); opacity: .6; transition: .15s; }
body.is-swiping-prev .m-content{ transform: translateX(12px); opacity: .6; transition: .15s; }

.m-now{ display: flex; flex-direction: column; gap: .2rem; border: 2px solid var(--m-blue); }
.m-now.is-late{ border-color: var(--m-red); }
.m-now-head{ display: flex; align-items: center; justify-content: space-between; }
.m-now-title{ font-size: 1.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.m-now-title [data-countdown].is-soon{ color: var(--m-amber); }
.m-now-title [data-countdown].is-late{ color: var(--m-red); }
.m-now-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .55rem; align-items: start; }
.m-now-actions .btn-block{ margin-top: 0; }
.m-now-actions > .m-done{ align-self: center; justify-self: start; }
.m-late-pick > summary{ list-style: none; }
.m-late-pick > summary::-webkit-details-marker{ display: none; }
.m-late-pick[open]{ grid-column: 1 / -1; }
.m-late-pick .m-late-form{ border-top: 0; padding-top: 0; }
.m-alert .m-alert-ico{ font-size: 1.3rem; }

.m-gaps{ display: flex; flex-direction: column; gap: .35rem; background: var(--m-amber-soft); border-color: transparent; }
.m-gaps-title{ color: var(--m-amber); font-size: 1.05rem; }
.m-gap-row{ display: grid; grid-template-columns: minmax(0, 1fr) 4.4rem auto; gap: .45rem; align-items: center; padding: .35rem 0; border-top: 1px solid color-mix(in srgb, var(--m-amber) 22%, transparent); }
.m-gap-pair{ font-weight: 600; font-size: .9rem; line-height: 1.25; }
.m-gap-row input{ font-size: 16px; padding: .5rem; border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); width: 100%; text-align: center; }
.m-gap-row .btn{ margin: 0; }
.m-gap-link{ display: block; font-weight: 600; font-size: .9rem; padding: .3rem 0; }
.m-gaps-more > summary{ font-size: .88rem; padding: .3rem 0; }

.m-kids{ display: flex; flex-direction: column; padding: .3rem 1rem; }
.m-kid{ padding: .6rem 0; border-bottom: 1px solid var(--m-line); }
.m-kid:last-child{ border-bottom: 0; }
.m-kid-row{ display: flex; align-items: center; gap: .6rem; }
.m-kid-row .m-grow strong{ font-size: 1rem; }
.m-kid-checks{ display: flex; gap: .4rem; }
.m-ck-wrap{ display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.m-ck-wrap small{ font-size: .66rem; color: var(--m-sub); font-weight: 600; }
.m-ck-form{ margin: 0; }
.m-ck{ width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--m-line); background: var(--m-card); color: var(--m-sub); display: inline-grid; place-items: center; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .1s; }
.m-ck:active{ transform: scale(.9); }
.m-ck svg{ width: 22px; height: 22px; stroke-width: 2.6; opacity: .35; }
.m-ck.is-done{ background: var(--m-green); border-color: var(--m-green); color: #fff; }
.m-ck.is-done svg{ opacity: 1; }
.m-ck.is-off{ cursor: default; opacity: .5; }
.m-kid-ev{ display: flex; align-items: center; gap: .6rem; padding: .35rem 0 0 2.4rem; font-size: .9rem; }
.m-kid-more{ margin: .35rem 0 0 2.4rem; }
.m-kid-more > summary{ font-size: .82rem; font-weight: 600; color: var(--m-sub); }
.m-kid-more form{ margin: .3rem 0 0; }
.m-kid-more .btn{ width: 100%; justify-content: flex-start; }

.m-adults{ display: flex; flex-direction: column; gap: .45rem; padding: .7rem 1rem; }
.m-adult{ display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .55rem; }
.m-adult-shift{ color: var(--m-sub); font-variant-numeric: tabular-nums; font-weight: 600; }
.m-adult .m-chip{ margin: 0; }

.m-fold > summary{ font-weight: 700; color: var(--m-ink); list-style: none; display: flex; align-items: center; gap: .6rem; min-height: 28px; }
.m-fold > summary::-webkit-details-marker{ display: none; }
.m-fold > summary::after{ content: "›"; margin-left: auto; font-size: 1.4rem; color: var(--m-sub); transition: transform .15s; }
.m-fold[open] > summary::after{ transform: rotate(90deg); }
.m-fold[open] > summary{ margin-bottom: .6rem; }
.m-setup > summary .m-bar{ flex: 0 0 5rem; }
.m-setup-list{ list-style: none; margin: 0; padding: 0; }
.m-setup-list li{ display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--m-line); }
.m-setup-list a{ color: var(--m-ink) !important; font-weight: 600; }
.m-setup-ico{ flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--m-line); display: grid; place-items: center; font-size: .75rem; font-weight: 900; color: #fff; }
.m-setup-list li.is-done .m-setup-ico{ background: var(--m-green); border-color: var(--m-green); }

/* Pulsante + e foglio dal basso */
.m-fab{ position: fixed; right: 1rem; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 12; }
.m-fab > summary{ list-style: none; width: 58px; height: 58px; border-radius: 50%; background: var(--m-blue); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px color-mix(in srgb, var(--m-blue) 40%, transparent); -webkit-tap-highlight-color: transparent; }
.m-fab > summary::-webkit-details-marker{ display: none; }
.m-fab > summary svg{ width: 28px; height: 28px; stroke-width: 2.4; transition: transform .15s; }
.m-fab[open] > summary{ position: fixed; right: 1rem; top: calc(env(safe-area-inset-top) + .8rem); z-index: 21; width: 48px; height: 48px; }
.m-fab[open] > summary svg{ transform: rotate(45deg); }
.m-fab[open]::before{ content: ""; position: fixed; inset: 0; background: rgba(8, 14, 30, .35); }
.m-sheet, .m-shiftsheet{ position: fixed; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; background: var(--m-card); color: var(--m-ink); border-radius: 22px 22px 0 0; padding: .6rem 1rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(8, 14, 30, .18); display: flex; flex-direction: column; gap: .7rem; z-index: 20; }
.m-sheet-grip{ width: 40px; height: 5px; border-radius: 3px; background: var(--m-line); align-self: center; }
.m-sheet-title{ font-size: 1.1rem; }
.m-sheet-late{ display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.m-sheet-late > span{ grid-column: 1 / -1; font-size: .88rem; color: var(--m-sub); font-weight: 600; }
.m-sheet-late .btn{ justify-content: center; padding: .55rem 0; }
.m-sheet-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.m-qa{ display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .2rem; border-radius: 16px; border: 1px solid var(--m-line); text-align: center; font-size: .8rem; font-weight: 700; color: var(--m-ink) !important; text-decoration: none; }
.m-qa-ico{ --c: #2563eb; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.m-qa-ico svg{ width: 22px; height: 22px; }
.m-shiftsheet[hidden]{ display: none; }
.m-shiftsheet-opts{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.m-shiftsheet-opts .btn{ justify-content: center; margin: 0; }
.m-shiftsheet-opts .btn[hidden]{ display: none; }
.m-shiftsheet .link{ align-self: center; font-weight: 700; }

/* Messaggio con "Annulla" */
.m-toast{ position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(146px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 1rem; max-width: calc(100% - 2rem); padding: .75rem 1rem; border-radius: 14px; background: #0f1b3d; color: #fff; font-weight: 600; font-size: .92rem; box-shadow: 0 10px 30px rgba(8, 14, 30, .3); }
.m-toast[hidden]{ display: none; }
.m-toast-undo{ border: 0; background: transparent; color: #9cc2ff; font: inherit; font-weight: 800; cursor: pointer; padding: .2rem .3rem; }
.m-toast-undo[hidden]{ display: none; }
body.desktop .m-toast{ bottom: 1.5rem; }

/* Settimana compatta */
.m-wkgrid{ padding: .6rem .5rem; display: flex; flex-direction: column; gap: .3rem; }
.m-wkgrid .m-wk-row{ grid-template-columns: 2.1rem repeat(var(--days, 7), minmax(0, 1fr)); gap: .2rem; }
.m-wkgrid .m-wk-who{ justify-content: center; }
.m-wk-head{ align-items: end; }
.m-wk-day{ display: flex; flex-direction: column; align-items: center; gap: 1px; padding: .2rem 0; border-radius: 10px; color: var(--m-ink) !important; text-decoration: none; font-size: .7rem; font-weight: 600; }
.m-wk-day strong{ font-size: .95rem; }
.m-wk-day i{ width: 6px; height: 6px; }
.m-wk-day.is-today{ background: var(--m-blue-soft); }
.m-wk-day.is-sel{ box-shadow: inset 0 0 0 2px var(--m-blue); }
.m-wkgrid .wk-cell{ min-height: 40px; font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; border: 0; font-family: inherit; cursor: pointer; white-space: nowrap; }
.m-wkgrid .wk-cell span{ display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; letter-spacing: -.02em; }
.m-wkgrid .wk-cell svg{ width: 20px; height: 20px; }
.m-wkgrid .wk-cell small{ display: block; font-size: .62rem; font-weight: 700; opacity: .75; line-height: 1; }
.m-wkgrid .wk-work{ background: var(--m-blue-soft); color: var(--m-blue) !important; }
.m-wkgrid .wk-long{ background: var(--m-amber-soft); color: var(--m-amber) !important; }
.m-wkgrid .wk-school{ background: var(--m-bg); color: var(--m-sub) !important; }
.m-wkgrid .wk-event{ background: color-mix(in srgb, var(--c) 18%, var(--m-card)); color: var(--c) !important; }
.m-wkgrid .wk-closed{ background: var(--m-red-soft); color: var(--m-red) !important; }
.m-wkgrid .wk-pickav, .m-wkgrid .wk-split{ background: transparent; }
.m-wkgrid .wk-split{ color: var(--m-sub) !important; font-size: 1rem; }
.m-wkgrid .wk-cell.is-picking{ box-shadow: 0 0 0 3px var(--m-blue); }
.m-wkgrid .wk-cell.is-saving{ opacity: .5; }
.m-wk-pickrow{ margin-top: .2rem; padding-top: .35rem; border-top: 1px solid var(--m-line); }
.m-wk-lab{ font-size: .66rem; color: var(--m-sub); font-weight: 700; align-self: center; text-align: center; }
.m-wk-legend{ display: flex; flex-wrap: wrap; gap: .2rem .7rem; margin: .4rem .2rem 0; font-size: .74rem; color: var(--m-sub); }
.m-wk-legend span{ display: inline-flex; align-items: center; gap: .2rem; }
.m-wk-legend svg{ width: 14px; height: 14px; }

/* Famiglia a riquadri */
.m-group-title{ font-size: .85rem; font-weight: 700; color: var(--m-sub); margin: .3rem .2rem -.35rem; }
.m-tiles{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.m-tile{ position: relative; display: flex; flex-direction: column; gap: .45rem; padding: .85rem; border-radius: 18px; background: var(--m-card); border: 1px solid var(--m-line); box-shadow: var(--m-shadow); color: var(--m-ink) !important; text-decoration: none !important; min-height: 92px; }
.m-tile-label{ font-weight: 700; font-size: .92rem; line-height: 1.25; }
.m-tile-badge{ position: absolute; top: .6rem; right: .6rem; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--m-red); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }

/* Tema scuro: colori che prima erano fissi */
@media (prefers-color-scheme: dark){
  .fc-admin-banner, .fc-admin-banner.m-card { background: #33270d; color: #fbbf24 !important; border-color: #5c4413; }
  .btn-google { background: #1f2937; color: #f3f4f6; border-color: #374151; }
  .m-fab[open]::before { background: rgba(0, 0, 0, .55); }
  .m-toast { background: #e6ebf5; color: #0b1220; }
  .m-toast-undo { color: #1f4fd0; }
}

/* Computer: 3 colonne e ricerca veloce (Ctrl+K) */
.dash-week .wk-work{ background: var(--primary-soft); color: var(--primary); }
.dash-week .wk-long{ background: var(--yellow-bg); color: var(--warn); }
.dash-week .wk-missing{ background: var(--yellow-bg); color: var(--warn); outline: 1px dashed var(--yellow); }
.dash-week .wk-rest, .dash-week .wk-off{ background: var(--surface-2); color: var(--muted); }
.dash-week .wk-cell.is-picking{ box-shadow: 0 0 0 3px var(--primary); }
.dash-week .wk-cell.is-saving{ opacity: .5; }
.dash-week .wk-cell span{ display: block; overflow: hidden; }
body.desktop .m-shiftsheet{ background: var(--surface); color: var(--text); border: 1px solid var(--line); bottom: 1rem; border-radius: 18px; }
.dash3{ display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr) minmax(0, .95fr); gap: 1rem; align-items: start; }
.dash3 > section{ display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.dash3 h2{ margin: 0 0 .5rem; font-size: 1.05rem; }
.dash-now{ border: 2px solid var(--primary); }
.dash-now .big{ font-size: 1.6rem; }
.dash-week{ display: grid; grid-template-columns: 2.4rem repeat(7, minmax(0, 1fr)); gap: 4px; font-size: .8rem; align-items: center; }
.dash-week .dh{ text-align: center; color: var(--muted); font-weight: 700; padding: .2rem 0; text-decoration: none; }
.dash-week .dh.is-today{ color: var(--primary); }
.dash-week .dc{ text-align: center; border-radius: 8px; padding: .35rem .1rem; font-weight: 700; white-space: nowrap; overflow: hidden; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; border: 0; font-family: inherit; font-size: .8rem; }
.dash-week .dc.w{ background: var(--primary-soft); color: var(--primary); }
.dash-week .dc.l{ background: var(--yellow-bg); color: var(--warn); }
.dash-week .dc.m{ background: var(--yellow-bg); color: var(--warn); outline: 1px dashed var(--yellow); }
.dash-week button.dc{ cursor: pointer; }
.dash-week .dw{ display: grid; place-items: center; }
.dash-setup{ list-style: none; padding: 0; margin: .4rem 0 0; }
.dash-setup li{ display: flex; gap: .5rem; align-items: baseline; padding: .3rem 0; }
.dash-setup .ok{ color: var(--green); font-weight: 800; }
.dash-setup .todo{ color: var(--muted); font-weight: 800; }
.palette{ position: fixed; inset: 0; background: rgba(8, 14, 30, .4); z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette[hidden]{ display: none; }
.palette-box{ width: min(560px, 92vw); background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(8, 14, 30, .35); overflow: hidden; border: 1px solid var(--line); }
.palette-box input{ width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem; font-size: 1.05rem; background: transparent; }
.palette-box input:focus{ outline: none; }
.palette-list{ max-height: 50vh; overflow: auto; padding: .4rem; }
.palette-list a{ display: flex; justify-content: space-between; padding: .6rem .8rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.palette-list a[hidden]{ display: none; }
.palette-list a.is-first, .palette-list a:hover{ background: var(--primary-soft); color: var(--primary); }
.palette-list a span{ color: var(--muted); font-size: .85rem; }
.search-btn{ display: inline-flex; gap: .5rem; align-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: .4rem .8rem; font: inherit; font-size: .9rem; cursor: pointer; }
.search-btn kbd{ font: inherit; font-size: .75rem; border: 1px solid var(--line); border-radius: 5px; padding: 0 .3rem; }
@media (max-width: 1200px) { .dash3{ grid-template-columns: 1fr 1fr; } .dash3 > section:last-child{ grid-column: 1 / -1; } }
@media (max-width: 800px) { .dash3{ grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { body.is-swiping-next .m-content, body.is-swiping-prev .m-content{ transform: none; } }

/* ===== Comandi Siri, scheda d'emergenza, spesa, malattia dei bambini, turni da foto ===== */
.m-steps-list{ margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .45rem; font-size: .92rem; }
.m-sc-row{ display: flex; flex-direction: column; gap: .15rem; padding: .4rem 0; border-top: 1px solid var(--m-line); }
.m-emerg-alert{ background: var(--m-red-soft); color: var(--m-red); border-radius: 12px; padding: .55rem .7rem; margin-bottom: .5rem; }
.m-emerg .btn-block{ margin-top: .6rem; }
.m-shop-add{ display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .6rem; }
.m-shop-add input{ font-size: 16px; padding: .65rem; border-radius: 12px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); min-width: 0; }
.m-shop-add .btn{ margin: 0; }
.m-tile-badge.is-info{ background: var(--m-blue); }
.m-sick-row{ display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .45rem 0; border-top: 1px solid var(--m-line); }
.m-sick-row strong{ min-width: 4.5rem; }
.m-sick-list{ list-style: none; margin: 0 0 .3rem; padding: 0 0 0 4.5rem; font-size: .85rem; color: var(--m-sub); }
.m-scan-row{ display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: .5rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--m-line); }
.m-scan-row.is-warn{ background: color-mix(in srgb, var(--m-amber-soft) 70%, transparent); margin: 0 -.5rem; padding: .45rem .5rem; border-radius: 10px; }
.m-scan-row select{ font-size: 16px; padding: .5rem; border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); width: 100%; }
.m-scan-day{ display: flex; flex-direction: column; }

/* ===== Demo pubblica e scheda di famiglia ===== */
.demo-banner{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem .8rem; padding: .6rem .9rem; border-radius: 14px; background: #fff5e0; color: #7c4a03; font-size: .9rem; border: 1px solid #f5d38a; }
.demo-banner a{ font-weight: 800; color: #7c4a03 !important; }
body.desktop .demo-banner{ margin-bottom: 1rem; }
.btn-demo{ background: #fff5e0; border-color: #f5d38a; color: #7c4a03 !important; font-weight: 700; }
@media (prefers-color-scheme: dark) { .demo-banner, .btn-demo{ background: #33270d; color: #fbbf24 !important; border-color: #5c4413; } .demo-banner a{ color: #fbbf24 !important; } }
body.auth .auth-box:has(.setup){ max-width: 820px; }
.setup-form{ gap: 1rem; }
.setup-sec{ display: flex; flex-direction: column; gap: .7rem; padding: .9rem 1rem 1rem; border-radius: 16px; }
.setup-sec > legend{ font-size: 1rem; font-weight: 800; color: var(--text); }
.setup-row{ display: flex; flex-direction: column; gap: .5rem; padding: .7rem 0 .2rem; border-top: 1px solid var(--line); }
.setup-row:first-of-type{ border-top: 0; padding-top: 0; }
.setup-row-title{ font-size: .95rem; }
.setup-sub{ display: flex; flex-direction: column; gap: .3rem; }
.setup-checks{ display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.setup-checks label.check{ font-size: .92rem; }
.setup-more > summary{ padding: .4rem 0; font-weight: 700; }
.setup-radio{ align-items: flex-start !important; padding: .35rem 0; }
.setup-radio input{ margin-top: .3rem; }
.setup-form .form-grid label{ min-width: 0; }
.setup-form input, .setup-form select{ width: 100%; font-size: 16px; }
.setup-form input[type=checkbox], .setup-form input[type=radio]{ width: auto; }
.setup-form .form-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .7rem; }
.setup-form .form-grid .span-2{ grid-column: span 2; }
.setup-form .form-grid label:has(input[name$="[work_address]"]), .setup-form .form-grid label:has(input[name$="[place_address]"]){ grid-column: span 2; }
.setup-form [hidden]{ display: none !important; }

/* Telefoni con notifiche: nome, ricezione confermata, prova su tutti */
.m-device{ display: flex; flex-direction: column; gap: .2rem; padding: .6rem 0; border-top: 1px solid var(--m-line); }
.m-device:first-of-type{ border-top: 0; }
.m-device-head{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .6rem; }
.m-device-edit{ margin-top: .3rem; }
.m-device-edit > summary{ font-size: .82rem; font-weight: 600; color: var(--m-sub); }
.m-device-edit form{ margin-top: .4rem; }
/* Oggi senza rete: copia di sola lettura */
.offline-today { display: flex; flex-direction: column; gap: .8rem; text-align: left; margin: 1rem 0; }
.offline-today a { pointer-events: none; color: inherit; }

/* ---- Oggi a riquadri (widget) ---- */
.w-strip{ margin-bottom: -.2rem; }
.w-grid{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; }
.w-span2{ grid-column: 1 / -1; }
.w-choice > .m-card{ margin: 0; }
.w-tile{ position: relative; display: flex; flex-direction: column; gap: .45rem; background: var(--m-card); border: 1px solid var(--m-line); border-radius: 22px; padding: .85rem .9rem .9rem; box-shadow: var(--m-shadow); color: var(--m-ink); text-decoration: none; min-width: 0; }
a.w-tile, a.w-tile:hover{ color: var(--m-ink) !important; text-decoration: none; }
a.w-tile:active{ transform: scale(.985); }
.w-tile-head{ display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; margin-bottom: .1rem; }
.w-ico{ flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.w-ico svg{ width: 18px; height: 18px; }
.w-grow{ flex: 1; min-width: 0; }
.w-line{ display: flex; align-items: center; gap: .5rem; font-size: .88rem; line-height: 1.3; min-width: 0; color: var(--m-ink) !important; text-decoration: none; }
.w-line .w-grow{ display: flex; flex-direction: column; }
.w-line b{ font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-line small, .w-muted{ color: var(--m-sub); font-size: .8rem; }
.w-time{ flex: none; font-variant-numeric: tabular-nums; min-width: 2.6rem; }
.w-clamp{ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w-dotline::before{ content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.w-emoji{ font-size: 1.2rem; line-height: 1; }
.w-count{ min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--c); color: #fff; font-size: .75rem; font-weight: 700; line-height: 22px; text-align: center; }
.w-chip{ flex: none; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; text-decoration: none; }
.w-chip.is-green{ background: var(--m-green-soft); color: var(--m-green) !important; }
.w-chip.is-amber{ background: var(--m-amber-soft); color: var(--m-amber) !important; }
.w-chip.is-red{ background: var(--m-red-soft); color: var(--m-red) !important; }
.w-empty{ margin: .2rem 0; color: var(--m-sub); }
.w-now{ background: var(--m-blue-soft); border-radius: 16px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.w-now.is-late{ background: var(--m-red-soft); }
.w-now .m-now-title{ font-size: 1.15rem; }
.w-now-actions{ margin-top: .4rem; }
.w-cal-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.w-cal-list li{ display: flex; align-items: center; gap: .65rem; padding: .55rem .2rem; border-top: 1px solid var(--m-line); }
.w-cal-list li:first-child{ border-top: 0; }
.w-cal-list time{ flex: none; width: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem; }
.w-cal-text{ flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 3px solid var(--c); padding-left: .6rem; }
.w-cal-text strong{ font-size: .95rem; font-weight: 600; }
.w-cal-text strong a{ color: var(--m-ink) !important; text-decoration: none; }
.w-cal-text span{ font-size: .8rem; color: var(--m-sub); }
.w-cal-list li.is-next{ background: var(--m-blue-soft); border-radius: 12px; border-top-color: transparent; }
.w-cal-list li.is-next + li{ border-top-color: transparent; }
.w-cal-list li.is-done .w-cal-text strong{ color: var(--m-sub); text-decoration: line-through; }
.w-deadline{ padding-top: .15rem; }
.w-why{ display: flex; flex-direction: column; gap: .3rem; padding: .4rem 0; border-top: 1px solid var(--m-line); }
.w-section{ font-size: 1rem; font-weight: 800; margin: .4rem 0 -.3rem; color: var(--m-sub); }
.w-tile.m-checklist .m-check-row{ padding: .15rem 0; }
@media (max-width: 360px){ .w-grid{ grid-template-columns: minmax(0, 1fr); } }
.m-top-home h1{ font-size: 1.45rem; }
.m-card.m-kid-more{ margin: 0; }
.w-gaps > summary{ cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.w-gaps > summary::after{ content: "›"; font-size: 1.4rem; transition: transform .15s; }
.w-gaps[open] > summary::after{ transform: rotate(90deg); }
.w-gaps > summary::-webkit-details-marker{ display: none; }

/* ---- Oggi, memorandum in stile iOS ---- */
.sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ios-head{ display: flex; align-items: center; gap: .6rem; margin-top: -.4rem; }
.ios-summary{ flex: 1; margin: 0; color: var(--m-sub); font-size: .95rem; line-height: 1.35; }
.ios-fam{ display: flex; flex: none; }
.ios-fam .av{ margin-left: -7px; box-shadow: 0 0 0 2px var(--m-bg); }
.ios-bar{ display: flex; justify-content: space-between; font-size: .92rem; font-weight: 600; margin: -.3rem 0 -.2rem; }
.ios-bar a{ text-decoration: none; color: #0A84FF !important; }
.ios-card{ display: block; background: var(--m-card); border-radius: 22px; padding: .85rem 1rem; color: var(--m-ink) !important; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ios-grow{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ios-grow b{ font-weight: 600; font-size: .98rem; }
.ios-grow small, .ios-card small{ color: var(--m-sub); font-size: .82rem; line-height: 1.3; }
.ios-ic{ flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.ios-ic svg{ width: 17px; height: 17px; stroke: #fff; }
.ios-chev{ color: var(--m-sub); font-size: 1.4rem; line-height: 1; }
.ios-note{ display: flex; align-items: center; gap: .7rem; background: color-mix(in srgb, var(--c) 12%, var(--m-card)); }
.ios-next{ display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; }
.ios-ring{ width: 46px; height: 46px; flex: none; transform: rotate(-90deg); }
.ios-ring circle{ fill: none; stroke-width: 5; stroke: color-mix(in srgb, var(--m-sub) 22%, transparent); stroke-linecap: round; }
.ios-weather{ background: color-mix(in srgb, #0A84FF 11%, var(--m-card)); }
.ios-w-top{ display: flex; align-items: center; gap: .8rem; }
.ios-temp{ font-size: 2.9rem; font-weight: 300; line-height: 1.05; letter-spacing: -.02em; }
.ios-w-icon{ font-size: 3.2rem; line-height: 1; }
.ios-hours{ display: flex; justify-content: space-between; margin-top: .6rem; text-align: center; font-size: .88rem; font-weight: 600; }
.ios-hours > span{ display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 2.6rem; }
.ios-hours > span > span{ font-size: 1.25rem; }
.ios-tip{ margin: .6rem 0 0; font-size: .86rem; padding: .45rem .7rem; border-radius: 12px; background: color-mix(in srgb, #0A84FF 10%, transparent); }
.ios-label{ display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; font-weight: 600; color: var(--m-sub); margin: .3rem .4rem .35rem; }
.ios-label a{ color: #0A84FF !important; text-decoration: none; font-size: .88rem; }
.ios-label > span:last-child:not(:first-child){ font-weight: 400; font-size: .76rem; }
.ios-list{ padding: .15rem 1rem; }
.ios-row{ display: flex; align-items: center; gap: .7rem; padding: .62rem 0; color: var(--m-ink) !important; text-decoration: none; }
.ios-row + .ios-row{ border-top: .5px solid var(--m-line); }
.ios-row time{ flex: none; width: 2.9rem; color: var(--m-sub); font-size: .86rem; font-variant-numeric: tabular-nums; }
.ios-dot{ flex: none; width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); }
.ios-row.is-past{ opacity: .5; }
.ios-ok{ color: #34C759; font-weight: 700; }
.ios-warn{ color: #FF9F0A; font-size: 1.1rem; }
.ios-empty{ margin: .6rem 0; color: var(--m-sub); }
.ios-roads.has-alert{ background: color-mix(in srgb, #FF9F0A 10%, var(--m-card)); }
.ios-roads{ padding: .3rem 1rem; }
.ios-leg + .ios-leg{ border-top: .5px solid var(--m-line); }
.ios-leg > summary{ display: flex; align-items: center; gap: .7rem; padding: .6rem 0; list-style: none; cursor: pointer; }
.ios-leg > summary::-webkit-details-marker{ display: none; }
.ios-leg[open] > summary .ios-chev{ transform: rotate(90deg); }
.ios-alert{ margin: 0 0 .4rem 2.4rem; display: flex; flex-direction: column; }
.ios-alert b{ font-weight: 600; }
.ios-leg .ios-tip{ margin: .2rem 0 .5rem 2.4rem; background: color-mix(in srgb, #FF9F0A 12%, transparent); }
.ios-btns{ display: flex; gap: .5rem; margin: 0 0 .7rem 2.4rem; }
.ios-pill{ flex: 1; text-align: center; padding: .5rem .6rem; border-radius: 99px; background: color-mix(in srgb, #0A84FF 13%, transparent); color: #0A84FF !important; font-weight: 600; font-size: .86rem; text-decoration: none; }
.ios-grid{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; }
.ios-grid.is-one{ grid-template-columns: minmax(0, 1fr); }
.ios-tile{ display: flex; flex-direction: column; gap: .35rem; }
.ios-tile-h{ display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .15rem; }
.ios-count{ margin-left: auto; color: var(--m-sub); font-weight: 500; font-size: .85rem; }
.ios-shift{ position: relative; display: block; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--m-sub) 18%, transparent); margin-bottom: .2rem; }
.ios-shift i{ position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--c); }
.ios-who{ display: flex; align-items: center; gap: .45rem; }
.ios-clamp{ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ios-chips{ display: flex; flex-wrap: wrap; gap: .3rem; }
.ios-chips span{ font-size: .8rem; padding: .12rem .55rem; border-radius: 99px; background: color-mix(in srgb, #34C759 15%, transparent); color: var(--m-ink); }
.ios-circle{ flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #FF2D55; background: transparent; color: #fff; font-size: .75rem; line-height: 18px; padding: 0; }
.m-check-row.is-done .ios-circle{ background: #FF2D55; }
.ios-circle.is-deadline{ border-color: #FF9F0A; }
.is-urgent{ color: #FF453A !important; font-weight: 600; }
.ios-more{ display: block; text-align: center; font-weight: 600; font-size: .9rem; color: var(--m-sub) !important; text-decoration: none; padding: .3rem; }
.ios-settings .ios-ic{ width: 12px; height: 12px; border-radius: 4px; }
.ios-move{ border: 0; background: color-mix(in srgb, var(--m-sub) 12%, transparent); color: var(--m-ink); width: 34px; height: 34px; border-radius: 10px; font-size: 1rem; }
.ios-move:disabled{ opacity: .3; }
.ios-switch{ position: relative; flex: none; width: 51px; height: 31px; }
.ios-switch input{ position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.ios-switch span[aria-hidden]{ position: absolute; inset: 0; border-radius: 99px; background: color-mix(in srgb, var(--m-sub) 30%, transparent); transition: background .2s; }
.ios-switch span[aria-hidden]::before{ content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.ios-switch input:checked + span{ background: #34C759; }
.ios-switch input:checked + span::before{ transform: translateX(20px); }
.ios-switch input:focus-visible + span{ outline: 2px solid #0A84FF; outline-offset: 2px; }
.ios-guide > summary{ display: flex; flex-direction: column; list-style: none; cursor: pointer; }
.ios-guide > summary::-webkit-details-marker{ display: none; }
.ios-guide ol{ margin: .6rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; }
.ios-urls{ display: flex; flex-direction: column; gap: .4rem; margin: 0 0 .7rem 2.4rem; }
.ios-urls label{ display: flex; flex-direction: column; font-size: .8rem; color: var(--m-sub); font-weight: 600; }
.ios-urls input{ font-size: .78rem; padding: .45rem .6rem; border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-ink); }
button.ios-pill{ border: 0; cursor: pointer; }

/* ---- Dove siamo: guida illustrata ---- */
.gd-status{ display: flex; flex-direction: column; gap: .15rem; background: color-mix(in srgb, #FF9F0A 11%, var(--m-card)); }
.gd-status.is-ok{ background: color-mix(in srgb, #34C759 13%, var(--m-card)); }
.gd-status small{ color: var(--m-sub); }
.gd-chips{ display: flex; flex-wrap: wrap; gap: .45rem; }
.gd-chip{ padding: .45rem .85rem; border-radius: 99px; background: var(--m-card); color: var(--m-ink) !important; text-decoration: none; font-weight: 600; font-size: .9rem; border: 1.5px solid transparent; }
.gd-chip.is-on{ border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--m-card)); }
.gd-steps{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.gd-steps > li{ display: flex; gap: .75rem; align-items: flex-start; }
.gd-n{ flex: none; width: 28px; height: 28px; border-radius: 50%; background: #0A84FF; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }
.gd-body{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.gd-body b{ font-weight: 600; line-height: 1.3; }
.gd-body small{ color: var(--m-sub); font-size: .84rem; line-height: 1.35; }
.gd-copy{ margin-top: .25rem; border: 0; border-radius: 12px; padding: .7rem 1rem; background: #0A84FF; color: #fff; font-weight: 700; font-size: .95rem; cursor: pointer; }
.gd-copy.is-soft{ background: color-mix(in srgb, #0A84FF 13%, transparent); color: #0A84FF; }
.gd-copy.is-copied{ background: #34C759; color: #fff; }
.gd-screen{ margin-top: .3rem; border-radius: 14px; background: color-mix(in srgb, var(--m-sub) 10%, var(--m-bg)); padding: .5rem; font-size: .84rem; }
.gd-tabs{ display: flex; justify-content: space-around; }
.gd-tabs span{ padding: .3rem .5rem; color: var(--m-sub); }
.gd-top{ display: flex; justify-content: space-between; align-items: center; padding: 0 .3rem; }
.gd-plus{ font-size: 1.3rem; line-height: 1; padding: 0 .5rem !important; }
.gd-list{ display: flex; flex-direction: column; }
.gd-list > span{ padding: .38rem .5rem; border-bottom: .5px solid var(--m-line); }
.gd-list > span:last-child{ border-bottom: 0; }
.gd-row{ display: flex; justify-content: space-between; }
.gd-row em{ font-style: normal; }
.gd-search{ color: var(--m-sub); }
.gd-action{ background: var(--m-card); border-radius: 10px; padding: .55rem .6rem; }
.gd-hi{ color: #0A84FF; font-weight: 700; border-radius: 8px; box-shadow: 0 0 0 2px #0A84FF; background: color-mix(in srgb, #0A84FF 10%, transparent); padding: .05rem .35rem; }
.gd-list > .gd-hi{ box-shadow: inset 0 0 0 2px #0A84FF; }
.gd-test{ display: flex; flex-direction: column; gap: .4rem; background: color-mix(in srgb, #34C759 10%, var(--m-card)); }
.gd-test small{ color: var(--m-sub); }
/* ==== Primo giro: stile iPhone su tutte le pagine (sovrascrive lo stile vecchio) ==== */
body.mobile{ --m-shadow: 0 1px 2px rgba(0,0,0,.04); --m-blue: #0A84FF; }
body.mobile .m-top h1{ font-weight: 700; letter-spacing: -.01em; }
body.mobile .m-card, body.mobile .m-tile{ border: 0; border-radius: 22px; box-shadow: var(--m-shadow); }
body.mobile .m-card-title, body.mobile .m-h2, body.mobile .m-fold > summary{ font-weight: 600; }
body.mobile .m-group-title{ font-weight: 600; font-size: .82rem; }
body.mobile .btn{ border-radius: 14px; font-weight: 600; border-color: transparent; background: color-mix(in srgb, var(--m-sub) 12%, var(--m-card)); color: var(--m-ink); min-height: 44px; justify-content: center; }
body.mobile .btn-primary{ background: #0A84FF; color: #fff; }
body.mobile .btn-ghost{ background: transparent; color: #0A84FF; }
body.mobile .btn-danger{ background: color-mix(in srgb, #FF453A 14%, var(--m-card)); color: #FF453A; }
body.mobile input:not([type=checkbox]):not([type=radio]):not([type=range]), body.mobile select, body.mobile textarea{ border-radius: 12px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); min-height: 44px; padding: .5rem .75rem; font-size: 16px; }
body.mobile .m-seg{ background: color-mix(in srgb, var(--m-sub) 14%, transparent); border-radius: 11px; padding: 2px; }
body.mobile .m-seg a{ font-weight: 600; font-size: .9rem; padding: .42rem .5rem; border-radius: 9px; }
body.mobile .m-seg a.is-on{ color: var(--m-ink) !important; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
body.mobile .flash{ border-radius: 14px; border: 0; }
.bottom-nav a{ position: relative; font-weight: 500; }
.bottom-nav a.active svg{ fill: color-mix(in srgb, currentColor 22%, transparent); }
.nav-badge{ position: absolute; top: -2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #FF453A; color: #fff; font-style: normal; font-size: .64rem; font-weight: 700; line-height: 17px; text-align: center; }
.cal-seg{ margin-bottom: -.2rem; }

/* Settimana: una riga per giorno */
.wk-days{ padding: .1rem .9rem; }
.wk-dayrow{ display: flex; gap: .7rem; padding: .6rem 0; align-items: flex-start; }
.wk-dayrow + .wk-dayrow{ border-top: .5px solid var(--m-line); }
.wk-dayrow.is-weekend{ opacity: .85; }
.wk-date{ flex: none; width: 2.6rem; display: flex; flex-direction: column; align-items: center; color: var(--m-ink) !important; text-decoration: none; padding: .15rem 0; border-radius: 12px; }
.wk-date span{ font-size: .72rem; color: var(--m-sub); font-weight: 600; }
.wk-date strong{ font-size: 1.15rem; font-weight: 600; }
.wk-dayrow.is-today .wk-date{ background: #0A84FF; }
.wk-dayrow.is-today .wk-date span, .wk-dayrow.is-today .wk-date strong{ color: #fff; }
.wk-date .dot-status{ margin-top: 2px; }
.wk-main{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.wk-chips{ display: flex; flex-wrap: wrap; gap: .35rem; }
.wk-chip{ display: inline-flex !important; align-items: center; gap: .35rem; width: auto !important; height: auto !important; min-height: 32px; padding: .2rem .65rem .2rem .25rem !important; border-radius: 99px !important; border: 0 !important; background: color-mix(in srgb, var(--pc) 14%, var(--m-card)) !important; color: var(--m-ink) !important; font-size: .86rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wk-chip b{ width: 24px; height: 24px; border-radius: 50%; background: var(--pc); color: #fff; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; }
.wk-chip span{ font-variant-numeric: tabular-nums; }
.wk-chip.wk-rest, .wk-chip.wk-off{ background: color-mix(in srgb, var(--m-sub) 10%, var(--m-card)) !important; color: var(--m-sub) !important; }
.wk-chip.wk-leave{ background: color-mix(in srgb, #34C759 15%, var(--m-card)) !important; }
.wk-chip.wk-missing{ background: color-mix(in srgb, #FF9F0A 16%, var(--m-card)) !important; }
.wk-chip.is-picking{ box-shadow: 0 0 0 2px #0A84FF; }
.wk-chip.is-saving{ opacity: .5; }
.wk-kids{ color: var(--m-sub); font-size: .8rem; }
.wk-ev{ display: flex; align-items: center; gap: .4rem; font-size: .86rem; color: var(--m-ink) !important; text-decoration: none; }
.wk-ev i{ width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }

/* Dove siamo: stato */
.ps-person .av{ width: 38px; height: 38px; font-size: .95rem; }
.ps-chip{ flex: none; font-size: .74rem; font-weight: 600; padding: .2rem .6rem; border-radius: 99px; }
.ps-chip.is-green{ background: color-mix(in srgb, #34C759 16%, transparent); color: #248A3D; }
.ps-chip.is-amber{ background: color-mix(in srgb, #FF9F0A 18%, transparent); color: #B26A00; }
.ps-chip.is-gray{ background: color-mix(in srgb, var(--m-sub) 14%, transparent); color: var(--m-sub); }
.ps-ico{ flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ps-ico.is-in{ background: color-mix(in srgb, #34C759 16%, transparent); color: #248A3D; }
.ps-ico.is-out{ background: color-mix(in srgb, #FF9F0A 18%, transparent); color: #B26A00; }

/* Altro */
.more-fam{ display: flex; gap: .9rem; overflow-x: auto; padding: .8rem 1rem; }
.more-p{ display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 64px; }
.more-p b{ font-weight: 600; font-size: .9rem; }
.more-p small{ color: var(--m-sub); font-size: .75rem; }
.more-search input{ width: 100%; border-radius: 12px !important; border: 0 !important; background: color-mix(in srgb, var(--m-sub) 13%, transparent) !important; }
.more-row .ios-ic{ width: 30px; height: 30px; }
.more-badge{ min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #FF453A; color: #fff; font-size: .75rem; font-weight: 700; line-height: 22px; text-align: center; }
.more-group[hidden], .more-row[hidden]{ display: none !important; }
@media (prefers-color-scheme: dark){
  .ps-chip.is-green, .ps-ico.is-in{ color: #4ADE80; }
  .ps-chip.is-amber, .ps-ico.is-out{ color: #FBBF24; }
}
/* Secondo giro */
.ps-share{ background: color-mix(in srgb, #34C759 8%, transparent); border-radius: 12px; padding-left: .4rem !important; padding-right: .4rem !important; }
.ios-alert-line b{ font-weight: 600; }
.ios-alert-line.is-meteo b{ color: #C77700; }
.ios-alert-line.is-sciopero b{ color: #C4302B; }
@media (prefers-color-scheme: dark){ .ios-alert-line.is-meteo b{ color: #FBBF24; } .ios-alert-line.is-sciopero b{ color: #F87171; } }

/* ---- Terzo giro: menu della settimana, vaccini e visite, offerte, FrigoBoard ---- */
.ios-grid > :last-child:nth-child(odd):not(:first-child){ grid-column: 1 / -1; }
.menu-weeknav{ display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.menu-weeknav a{ width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--m-card); box-shadow: var(--m-shadow); color: var(--m-blue) !important; font-size: 1.3rem; text-decoration: none; }
.menu-weeknav b{ font-size: 1.02rem; }
.menu-day + .menu-day{ border-top: .5px solid var(--m-line); }
.menu-day > summary{ list-style: none; cursor: pointer; }
.menu-day > summary::-webkit-details-marker{ display: none; }
.menu-day .ios-row small{ display: block; color: var(--m-sub); }
.menu-dow{ flex: none; width: 3.3rem; font-weight: 600; color: var(--m-sub); font-size: .88rem; }
.menu-day.is-today .menu-dow{ color: #FF9F0A; }
.menu-day.is-past{ opacity: .55; }
.menu-day[open] .ios-chev{ transform: rotate(90deg); }
.menu-form{ display: flex; flex-direction: column; gap: .55rem; padding: 0 0 .8rem 3.3rem; }
.menu-form label{ display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--m-sub); }
.menu-form input{ font: inherit; font-weight: 400; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .55rem .7rem; }
.menu-actions{ display: flex; gap: .5rem; }
.hl-row form{ margin: 0; display: flex; }
.hl-row small{ display: block; color: var(--m-sub); }
.hl-row.is-done b{ color: var(--m-sub); font-weight: 500; }
.hl-row.is-past .ios-circle{ border-color: #FF9F0A; }
.hl-row .ios-circle{ border-color: #30B0C7; }
.hl-row .ios-circle[aria-pressed="true"]{ background: #34C759; border-color: #34C759; }
.hl-kind{ display: inline-block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: .05rem .4rem; border-radius: 6px; vertical-align: .1em; margin-right: .15rem;
  background: color-mix(in srgb, #30B0C7 16%, transparent); color: #1C7C8C; }
.hl-kind.is-visita{ background: color-mix(in srgb, #AF52DE 14%, transparent); color: #8944AB; }
@media (prefers-color-scheme: dark){ .hl-kind{ color: #6AD4E4; } .hl-kind.is-visita{ color: #D29BF0; } }
.hl-add{ flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: color-mix(in srgb, #0A84FF 12%, transparent); color: #0A84FF; font-size: 1.05rem; cursor: pointer; }
.shop-src{ display: inline-block; font-size: .72rem; padding: .02rem .45rem; border-radius: 99px; background: color-mix(in srgb, #30B0C7 15%, transparent); color: var(--m-sub); vertical-align: .1em; }
.shop-offer{ display: block; margin-top: .15rem; font-size: .78rem; color: #248A3D; }
@media (prefers-color-scheme: dark){ .shop-offer{ color: #4ADE80; } }
.shop-more{ display: flex; align-items: center; gap: .7rem; margin-top: .7rem; color: var(--m-ink) !important; text-decoration: none; }
.shop-more small{ display: block; color: var(--m-sub); }
.shop-more form{ margin: 0; }
.ios-row.hl-row.is-past{ opacity: .85; }
.m-check-row .shop-src{ display: inline-block; width: fit-content; align-self: flex-start; margin-top: .15rem; }
.m-check-row .shop-offer{ color: #248A3D; }
@media (prefers-color-scheme: dark){ .m-check-row .shop-offer{ color: #4ADE80; } }
/* Menu e offerte */
.menu-chips{ display: flex; flex-wrap: wrap; gap: .35rem; }
.menu-chip{ font-size: .8rem; padding: .18rem .6rem; border-radius: 99px; background: var(--m-bg); color: var(--m-ink); }
.menu-chip.is-offer{ background: color-mix(in srgb, #34C759 16%, transparent); color: #1F7A36; font-weight: 600; }
.menu-offer{ display: block; margin-top: .5rem; padding: .55rem .7rem; border-radius: 12px; background: color-mix(in srgb, #34C759 9%, var(--m-card)); color: #1F7A36; font-size: .82rem; line-height: 1.4; }
.menu-offer b{ display: block; color: #16602A; }
.menu-day .ios-row small.menu-sale, .ios-tile small.menu-sale{ color: #248A3D; }
@media (prefers-color-scheme: dark){ .menu-chip.is-offer, .menu-offer, .menu-offer b, .menu-day .ios-row small.menu-sale, .ios-tile small.menu-sale{ color: #4ADE80; } }

/* La settimana in un messaggio */
.wd-link{ display: block; margin: .6rem 0 .2rem; padding: .65rem .9rem; border-radius: 12px; background: var(--m-card); color: var(--m-blue) !important; font-weight: 600; font-size: .9rem; text-decoration: none; box-shadow: var(--m-shadow); }
.wd-summary{ margin-bottom: .8rem; }
.wd-week{ padding-top: .2rem; padding-bottom: .2rem; }
.wd-day{ display: grid; grid-template-columns: 3.4rem 1fr; gap: .5rem; padding: .65rem 0; color: var(--m-ink) !important; text-decoration: none; }
.wd-day + .wd-day{ border-top: .5px solid var(--m-line); }
.wd-day.is-today .wd-dow{ color: #FF9F0A; }
.wd-day.is-past{ opacity: .55; }
.wd-dow{ color: var(--m-sub); font-size: .88rem; }
.wd-body{ display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.wd-shifts{ font-size: .9rem; }
.wd-hol{ font-size: .78rem; font-weight: 700; color: #C4302B; }
.wd-chips{ display: flex; flex-wrap: wrap; gap: .25rem; }
.wd-chip{ font-size: .75rem; padding: .08rem .5rem; border-radius: 99px; background: var(--m-bg); }
.wd-chip.is-green{ background: color-mix(in srgb, #34C759 15%, transparent); color: #1F7A36; }
.wd-chip.is-red{ background: color-mix(in srgb, #FF453A 14%, transparent); color: #C4302B; font-weight: 600; }
.wd-chip.is-blue{ background: color-mix(in srgb, #0A84FF 12%, transparent); color: #0A5BD7; }
.wd-chip.is-teal{ background: color-mix(in srgb, #30B0C7 15%, transparent); color: #1C7C8C; }
.wd-chip.is-orange{ background: color-mix(in srgb, #FF9F0A 15%, transparent); color: #A35C00; }
.wd-chip.is-grey{ color: var(--m-sub); }
@media (prefers-color-scheme: dark){ .wd-chip.is-green{ color: #4ADE80; } .wd-chip.is-red{ color: #F87171; } .wd-chip.is-blue{ color: #7DB4FF; } .wd-chip.is-teal{ color: #6AD4E4; } .wd-chip.is-orange{ color: #FBBF24; } }
.wd-set{ display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .8rem; }
.wd-toggle{ display: flex; gap: .6rem; align-items: flex-start; flex: 1 1 14rem; }
.wd-toggle input{ width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: #34C759; flex: none; }
.wd-toggle small{ display: block; color: var(--m-sub); font-weight: 400; }
.wd-hour select{ font: inherit; padding: .3rem .4rem; border-radius: 8px; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-ink); }
/* Bacheca */
.bd-add{ display: flex; gap: .5rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .9rem; }
.bd-add > input{ flex: 1 1 10rem; min-width: 0; font: inherit; padding: .65rem .8rem; border-radius: 12px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); }
.bd-more{ position: relative; }
.bd-more > summary{ list-style: none; cursor: pointer; padding: .55rem .7rem; border-radius: 12px; background: var(--m-card); border: 1px solid var(--m-line); font-weight: 700; }
.bd-more > summary::-webkit-details-marker{ display: none; }
.bd-more[open]{ flex-basis: 100%; order: 3; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.bd-more[open] > summary{ display: none; }
.bd-more label{ font-size: .85rem; color: var(--m-sub); display: flex; gap: .4rem; align-items: center; }
.bd-more input[type=date]{ font: inherit; padding: .3rem .4rem; border-radius: 8px; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-ink); }
.bd-colors{ display: flex; gap: .4rem; }
.bd-colors label{ position: relative; }
.bd-colors input{ position: absolute; opacity: 0; }
.bd-colors span{ display: block; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bd-colors input:checked + span{ border-color: var(--m-blue); }
.bd-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.bd-note{ position: relative; background: var(--bg); color: #1C1C1E; border-radius: 14px; padding: .75rem .75rem 2.4rem; min-height: 7rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.bd-note p{ margin: 0; font-size: .95rem; line-height: 1.35; overflow-wrap: anywhere; }
.bd-note small{ display: block; margin-top: .4rem; font-size: .75rem; color: #5b5b60; }
.bd-note small.is-urgent{ color: #C4302B; font-weight: 700; }
.bd-note.is-done{ opacity: .55; }
.bd-note.is-done p{ text-decoration: line-through; }
.bd-foot{ position: absolute; left: .6rem; right: .6rem; bottom: .5rem; display: flex; align-items: center; gap: .4rem; }
.bd-foot form{ margin: 0; }
.bd-tick{ width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); background: rgba(255,255,255,.6); color: #fff; font-size: .8rem; padding: 0; }
.bd-tick[aria-pressed="true"]{ background: #34C759; border-color: #34C759; }
.bd-del{ border: 0; background: transparent; color: #6E6E73; font-size: .9rem; padding: .2rem; }
.bd-who{ margin-left: auto; width: 1.45rem; height: 1.45rem; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
/* Biglietto per i nonni */
.dp-card .dp-row{ display: flex; align-items: center; gap: .6rem; padding: .55rem 0; color: var(--m-ink) !important; text-decoration: none; border-bottom: .5px solid var(--m-line); }
.dp-card .dp-row small{ display: block; color: var(--m-sub); }
.dp-new{ display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.dp-form{ display: flex; flex-direction: column; gap: .7rem; }
.dp-form > label{ display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--m-sub); }
.dp-form input:not([type=checkbox]):not([type=radio]), .dp-form select{ font: inherit; font-weight: 400; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .55rem .7rem; }
.dp-form > .wd-toggle{ flex-direction: row; }
.dp-seg label{ display: block; position: relative; }
.dp-seg input{ position: absolute; opacity: 0; }
.dp-seg span{ display: block; text-align: center; padding: .5rem; border-radius: 10px; font-weight: 600; color: var(--m-sub); }
.dp-seg input:checked + span{ background: var(--m-card); color: var(--m-blue); box-shadow: var(--m-shadow); }
.dp-done{ display: flex; flex-direction: column; gap: .2rem; margin-bottom: .8rem; }
.dp-done small{ color: var(--m-sub); }
.dp-state{ margin: .4rem 0 0; font-size: .9rem; color: var(--m-sub); }
.dp-state.is-ok{ color: #1F7A36; font-weight: 600; }
.dp-state.is-off{ color: #C4302B; }
.dp-wa{ background: #25D366 !important; color: #fff !important; border: 0; margin-bottom: .5rem; }
.dp-public .dp-ticket{ background: #FFF7EA; border: 1px solid #FFE1B0; }
.dp-public .dp-big{ font-size: 1.8rem; font-weight: 700; color: #A35C00; margin-bottom: .4rem; }
.dp-public .dp-kv{ display: grid; grid-template-columns: 6rem 1fr; gap: .4rem .7rem; margin: 0 0 .8rem; }
.dp-public .dp-kv dt{ color: #6E6E73; font-weight: 600; font-size: .9rem; }
.dp-public .dp-kv dd{ margin: 0; }
.dp-public .dp-alert{ color: #B3261E; font-weight: 700; }
.dp-public .dp-other{ background: #EEF4FF; color: #1D4ED8; border-radius: 10px; padding: .5rem .7rem; font-size: .92rem; }
.dp-public .btn{ margin-top: .5rem; }
.dp-public .dp-fatto{ background: #34C759; border-color: #34C759; font-size: 1.05rem; padding: .8rem; }
/* Vaccini e visite: data modificabile e in agenda */
.hl-item + .hl-item{ border-top: .5px solid var(--m-line); }
.hl-item > summary{ list-style: none; cursor: pointer; }
.hl-item > summary::-webkit-details-marker{ display: none; }
.hl-item.is-past{ opacity: .85; }
.hl-edit{ flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, #0A84FF 12%, transparent); color: #0A84FF; font-size: .95rem; }
.hl-item[open] .hl-edit{ background: #0A84FF; color: #fff; }
.hl-agenda{ display: inline-block; margin-left: .2rem; font-size: .72rem; font-weight: 600; padding: .02rem .45rem; border-radius: 99px; background: color-mix(in srgb, #34C759 15%, transparent); color: #1F7A36; }
.hl-form{ display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; padding: 0 0 .5rem 2.2rem; }
.hl-form label{ display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--m-sub); }
.hl-form input{ font: inherit; font-weight: 400; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .45rem .6rem; }
.hl-form-more{ padding: 0 0 .7rem 2.2rem; }
@media (prefers-color-scheme: dark){ .hl-agenda{ color: #4ADE80; } }
/* Pannello di controllo (Admin) */
.pn-head{ display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; justify-content: space-between; }
.pn-seg{ display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(120,120,128,.14); }
.pn-seg a{ padding: .3rem .8rem; border-radius: 8px; font-size: .85rem; font-weight: 600; color: inherit; opacity: .7; text-decoration: none; }
.pn-seg a.is-on{ background: #fff; color: #0A84FF; opacity: 1; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pn-label{ font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; opacity: .65; margin: 1.4rem .2rem .5rem; }
.pn-grid{ display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pn-two{ display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: .8rem; }
.pn-app-h{ display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.pn-ic{ width: 2rem; height: 2rem; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.pn-kpis{ display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pn-kpis small{ display: block; font-size: .75rem; opacity: .65; }
.pn-kpis b{ font-size: 1.25rem; }
.pn-kpis b.is-bad{ color: #C4302B; }
.pn-kpis i{ font-style: normal; font-size: .75rem; margin-left: .3rem; color: #1F7A36; }
.pn-kpis i.is-down{ color: #C4302B; }
.pn-wide{ grid-column: 1 / -1; }
.pn-chart{ width: 100%; height: auto; display: block; }
.pn-legend{ display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; opacity: .8; margin-top: .4rem; }
.pn-legend i{ display: inline-block; width: .65rem; height: .65rem; border-radius: 3px; margin-right: .3rem; }
.pn-table{ width: 100%; border-collapse: collapse; font-size: .88rem; }
.pn-table th{ text-align: left; font-size: .75rem; opacity: .65; font-weight: 600; padding: .35rem .25rem; border-bottom: 1px solid rgba(120,120,128,.25); }
.pn-table td{ padding: .4rem .25rem; border-bottom: .5px solid rgba(120,120,128,.18); vertical-align: top; overflow-wrap: anywhere; }
.pn-table .n{ text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pn-bar{ height: 6px; border-radius: 99px; background: rgba(10,132,255,.12); margin-top: .2rem; overflow: hidden; }
.pn-bar span{ display: block; height: 100%; background: #0A84FF; border-radius: 99px; }
.pn-flow{ display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; font-size: .85rem; margin: .35rem 0; }
.pn-flow span{ background: rgba(120,120,128,.12); border-radius: 7px; padding: .1rem .45rem; }
.pn-flow em{ font-style: normal; opacity: .6; }
.pn-alert{ display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-bottom: .5px solid rgba(120,120,128,.18); font-size: .9rem; }
.pn-alert:last-child{ border-bottom: 0; }
.pn-dot{ flex: none; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; }
.pn-dot.is-ok{ background: #E3F6E8; color: #1F7A36; } .pn-dot.is-warn{ background: #FFF1DC; color: #A35C00; } .pn-dot.is-bad{ background: #FFE3E0; color: #C4302B; }
.pn-privacy{ background: rgba(10,132,255,.07); }

/* Mensa e crescita */
.cn-set{ display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.cn-set label{ font-size: .9rem; display: flex; gap: .4rem; align-items: center; }
.cn-set select, .cn-day input{ font: inherit; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .45rem .6rem; }
.cn-week > summary{ list-style: none; cursor: pointer; display: flex; gap: .5rem; align-items: center; }
.cn-week > summary::-webkit-details-marker{ display: none; }
.cn-week > summary small{ margin-left: auto; color: var(--m-sub); }
.cn-day{ display: grid; grid-template-columns: 5.6rem 1fr; gap: .5rem; align-items: center; margin-top: .5rem; font-size: .88rem; color: var(--m-sub); font-weight: 600; }
.cn-day input{ min-width: 0; font-weight: 400; }
.cn-clash{ display: block; color: #A35C00 !important; }
@media (prefers-color-scheme: dark){ .cn-clash{ color: #FBBF24 !important; } }
.gr-sex{ display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .7rem; }
.gr-sex small{ display: block; color: var(--m-sub); }
.gr-tabs{ margin-bottom: .6rem; }
.gr-chart{ width: 100%; height: auto; display: block; color: var(--m-ink); }
.gr-note{ margin: .5rem 0 0; }
.gr-form{ padding: .8rem 1rem; margin-top: .7rem; }
.gr-chart polygon, .gr-chart text, .gr-chart circle, .pn-chart text{ stroke: none; }
.gr-chart text, .pn-chart text{ font-weight: 400; }

/* Pianifica i ponti */
.br-cal{ display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: .9rem; }
.br-h{ font-size: .72rem; font-weight: 600; color: var(--m-sub); padding-bottom: .2rem; }
.br-d{ padding: .45rem 0; border-radius: 9px; font-variant-numeric: tabular-nums; }
.br-d.is-we{ color: var(--m-sub); }
.br-d.is-hol{ background: #FFE3E0; color: #C4302B; font-weight: 700; }
.br-d.is-closed{ background: #FFF1DC; color: #A35C00; }
.br-d.is-need{ background: #FFE3E0; color: #C4302B; font-weight: 700; outline: 2px solid #FF453A; }
.br-d.is-prop{ background: #E3F6E8; color: #1F7A36; font-weight: 700; outline: 2px solid #34C759; }
.br-legend{ display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .75rem; color: var(--m-sub); margin-top: .6rem; }
.br-legend i{ display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.br-legend i.is-hol{ background: #FFE3E0; } .br-legend i.is-closed{ background: #FFF1DC; } .br-legend i.is-need{ background: #FFE3E0; outline: 1px solid #FF453A; } .br-legend i.is-prop{ background: #E3F6E8; outline: 1px solid #34C759; }
.br-total{ margin: .9rem 0 .6rem; }
.br-prop{ display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; margin-bottom: .6rem; }
.br-prop small{ color: var(--m-sub); }
.br-tag{ font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .5rem; border-radius: 6px; background: #E3F6E8; color: #1F7A36; }
.br-prop.is-serve .br-tag{ background: #FFE3E0; color: #C4302B; }
/* Collegamenti attivi */
.lk-panic{ background: #FF453A !important; color: #fff !important; border: 0; margin-top: .8rem; }

/* Prossimo autobus */
.bus-stop{ margin-bottom: .7rem; }
.bus-stop-h{ display: flex; align-items: center; gap: .5rem; }
.bus-stop-h small{ display: block; color: var(--m-sub); }
.bus-arrs{ display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.bus-arr{ display: inline-flex; flex-direction: column; align-items: center; min-width: 3.6rem; padding: .35rem .5rem; border-radius: 12px; background: var(--m-bg); font-size: .85rem; }
.bus-arr b{ font-size: 1rem; color: #C4302B; }
.bus-arr small{ color: var(--m-sub); font-size: .72rem; }
@media (prefers-color-scheme: dark){ .bus-arr b{ color: #F87171; } }
.bus-add{ display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.bus-add label{ display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--m-sub); }
.bus-add input, .bus-add select{ font: inherit; font-weight: 400; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .45rem .6rem; }

/* Compleanni */
.bday-row.is-soon b{ color: #C2185B; }
.bday-ic{ font-size: 1.2rem; }
.bday-more{ position: relative; }
.bday-more > summary{ list-style: none; cursor: pointer; padding: .2rem .5rem; border-radius: 8px; font-weight: 700; color: var(--m-sub); }
.bday-more > summary::-webkit-details-marker{ display: none; }
.bday-more[open]{ position: absolute; right: .8rem; z-index: 3; background: var(--m-card); box-shadow: 0 6px 24px rgba(0,0,0,.18); border-radius: 12px; padding: .5rem; display: flex; flex-direction: column; gap: .4rem; }
.bday-more input{ font: inherit; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 8px; padding: .35rem .5rem; }
.bday-date{ display: grid; grid-template-columns: 1fr 2fr 1.3fr; gap: .5rem; }
.bday-date label{ display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--m-sub); }
.bday-date input, .bday-date select{ font: inherit; font-weight: 400; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .5rem .55rem; min-width: 0; }

/* Spese di casa */
.hx-month{ margin-bottom: .7rem; }
.hx-head{ display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.hx-head b{ font-size: 1.15rem; }
.hx-cat{ display: grid; grid-template-columns: 7rem 1fr auto; gap: .5rem; align-items: center; font-size: .85rem; margin-top: .35rem; }
.hx-bar{ height: 7px; border-radius: 99px; background: color-mix(in srgb, #2F7D4F 14%, transparent); overflow: hidden; }
.hx-bar span{ display: block; height: 100%; background: #2F7D4F; border-radius: 99px; }

/* Terapie, auto, 730, busta paga, weekend, viaggi (6 ottobre 2026) */
.tp-card, .car-card, .ps-card, .tr-card, .we-day{ margin-bottom: .7rem; }
.tp-head{ display: flex; align-items: center; gap: .6rem; }
.tp-head small{ display: block; color: var(--m-sub); font-size: .8rem; }
.tp-ic, .we-ic{ font-size: 1.4rem; line-height: 1; }
.tp-count{ font-weight: 700; color: var(--m-sub); font-variant-numeric: tabular-nums; }
.tp-dose{ display: flex; align-items: center; gap: .5rem; }
.tp-dose.is-done b{ color: var(--m-sub); font-weight: 500; }
.tp-dose.is-done small{ color: var(--m-green); }
.tp-missed{ background: var(--m-red-soft); border-radius: 10px; padding: 0 .4rem .3rem; margin: .3rem 0; }
.tp-all{ margin-top: .5rem; }
.tp-all > summary{ cursor: pointer; color: var(--m-blue); font-size: .9rem; padding: .3rem 0; }
.tp-med.is-expired b{ color: var(--m-red); }
.tp-med.is-soon small{ color: var(--m-amber); }
.car-due.is-late small{ color: var(--m-red); font-weight: 600; }
.car-due.is-soon small{ color: var(--m-amber); }
.tx-total .hx-head b{ font-size: 1.25rem; }
.tx-actions{ display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.tx-cat > summary{ display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .45rem 0; list-style: none; }
.tx-cat > summary small{ display: block; color: var(--m-sub); font-size: .8rem; }
.tx-cat .ios-row small.text-danger{ display: block; }
.tx-nido-child{ display: flex; align-items: flex-end; gap: .5rem; margin: .5rem 0; }
.tx-nido-child label{ flex: 1; }
.tx-months{ display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: .4rem; }
.tx-month{ width: 100%; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-ink); border-radius: 10px; padding: .4rem .2rem; text-align: center; font: inherit; }
.tx-month b{ display: block; text-transform: capitalize; }
.tx-month small{ display: block; font-size: .7rem; color: var(--m-sub); }
.tx-month.is-done{ background: var(--m-green-soft); border-color: transparent; }
.tx-month.is-done small{ color: var(--m-green); }
.tx-month.is-future{ opacity: .45; }
.ps-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .6rem 0; }
.ps-grid div{ background: var(--m-bg); border-radius: 10px; padding: .45rem; text-align: center; }
.ps-grid b{ display: block; font-size: 1.05rem; }
.ps-grid small{ color: var(--m-sub); font-size: .72rem; }
.we-events{ margin: .3rem 0 0 1.1rem; padding: 0; font-size: .88rem; }
.we-museum{ background: var(--m-amber-soft); }
.tr-checks{ list-style: none; margin: .5rem 0; padding: 0; font-size: .88rem; }
.tr-checks li{ padding: .2rem 0; }
.tr-checks .is-ok{ color: var(--m-green); }
.tr-checks .is-warn{ color: var(--m-amber); }
.tr-checks .is-bad{ color: var(--m-red); font-weight: 600; }
.tr-item{ display: flex; align-items: center; gap: .5rem; }
.tr-item.is-done .ios-grow{ text-decoration: line-through; color: var(--m-sub); }
.tr-add{ display: flex; gap: .4rem; margin-top: .4rem; }
.tr-add input{ flex: 1; }
.bday-date.f2{ grid-template-columns: 1fr 1fr; }
.bday-date.f2 input, .bday-date.f2 select{ width: 100%; box-sizing: border-box; }

/* Avvisi della scuola, scambi di turno, numeri utili (7 ottobre 2026) */
.sn-item{ margin-bottom: .6rem; display: grid; gap: .45rem; }
.sn-item label{ display: grid; gap: .25rem; font-size: .85rem; color: var(--m-sub); font-weight: 600; }
.sn-item label.wd-toggle{ display: flex; color: var(--m-ink); }
.sn-item input, .sn-item textarea, .sn-child select{ font: inherit; font-weight: 400; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .5rem .55rem; width: 100%; box-sizing: border-box; }
.sn-child{ display: grid; gap: .25rem; font-weight: 600; color: var(--m-sub); }
.sw-suggest{ background: var(--m-amber-soft); border-radius: 10px; padding: .5rem .6rem; margin: .5rem 0; }
.sw-add{ display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.sw-add input[type=number]{ width: 6rem; }
.sw-add input, .sw-add select{ font: inherit; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .4rem .5rem; min-width: 0; }
.ct-row{ display: flex; align-items: center; gap: .4rem; }
.ct-btn{ display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--m-bg); font-size: 1.15rem; text-decoration: none; }
.ct-sos{ background: var(--m-red-soft); }
.sn-item .wd-toggle > span{ min-width: 0; flex: 1; }
.sn-item .wd-toggle small, .sn-item .wd-toggle b{ white-space: normal; overflow-wrap: anywhere; }

/* Allinea al portale (permessi e licenze) */
.lp-card > summary{ cursor: pointer; list-style: none; }
.lp-row{ border: 1px solid var(--m-line); border-radius: 12px; padding: .5rem .6rem; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .5rem; }
.lp-row legend{ font-weight: 700; font-size: .9rem; padding: 0 .3rem; }
.lp-row label{ display: grid; gap: .2rem; font-size: .8rem; color: var(--m-sub); font-weight: 600; }
.lp-row input{ font: inherit; color: var(--m-ink); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 10px; padding: .45rem .5rem; width: 100%; box-sizing: border-box; }
.lp-row small{ grid-column: 1 / -1; }

/* Dove conviene, bilancio, consumi, cosa cucino, serate (7 ottobre 2026) */
.sa-card > summary{ cursor: pointer; list-style: none; }
.sa-list{ margin: .2rem 0 .5rem 1.1rem; padding: 0; font-size: .85rem; }
.mi-card{ background: var(--m-amber-soft); margin-bottom: .7rem; }
.mi-card .ios-row{ display: flex; align-items: center; gap: .5rem; }
.bg-trend{ display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .35rem; align-items: end; height: 5.5rem; margin-top: .6rem; }
.bg-trend div{ display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .2rem; }
.bg-trend span{ display: block; width: 100%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--m-green) 35%, transparent); }
.bg-trend .is-on span{ background: var(--m-green); }
.bg-trend small{ font-size: .65rem; color: var(--m-sub); }
.mt-card{ margin-bottom: .7rem; }
.mt-new{ display: inline-flex; align-items: center; gap: .3rem; color: var(--m-sub); }
.ev-row{ display: flex; align-items: center; gap: .5rem; }
.ev-row.is-weekend b{ color: var(--m-green); }

/* Organizza la festa e lista regali (7 ottobre 2026) */
.bd-links{ margin-bottom: .6rem; }
.pt-head{ margin-bottom: .7rem; }
.pt-guest{ display: flex; align-items: center; gap: .5rem; }
.pt-guest.is-si b{ color: var(--m-green); }
.pt-guest.is-no b{ color: var(--m-sub); text-decoration: line-through; }
.pt-form{ display: grid; gap: .6rem; }
.pt-answers{ display: flex; gap: .5rem; }
.pt-answers label{ flex: 1; display: flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid var(--line, #d0d7e2); border-radius: 10px; padding: .55rem; font-weight: 600; }
.pt-two{ display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pt-trap{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gf-list{ display: grid; gap: .2rem; }
.gf-item{ display: flex; align-items: flex-start; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line, #e4e8ef); }
.gf-item:last-child{ border-bottom: 0; }
.gf-text{ flex: 1; min-width: 0; display: grid; gap: .15rem; }
.gf-text small{ color: #6b7a99; }
.gf-item.is-taken .gf-text b{ color: #8892a6; text-decoration: line-through; }
.gf-taken{ font-size: .8rem; color: #8892a6; white-space: nowrap; }
.gf-take > summary{ list-style: none; cursor: pointer; }
.gf-take form{ display: grid; gap: .35rem; margin-top: .4rem; }
.gf-row.is-done b{ color: var(--m-sub); }
.tr-add{ flex-wrap: wrap; }
.tr-add input[name=text]{ flex: 1 1 100%; min-width: 0; }
.tr-add input[type=date]{ flex: 1 1 8rem; min-width: 0; }
.gf-item{ flex-wrap: wrap; }
.gf-take{ min-width: 0; }
.gf-take[open]{ flex-basis: 100%; }
.gf-take form input{ width: 100%; box-sizing: border-box; min-width: 0; }

/* Schede reattive: striscia di caricamento in alto appena si tocca un link (7 ottobre 2026) */
body.is-navigating::before{ content: ""; position: fixed; z-index: 9999; top: env(safe-area-inset-top, 0); left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--m-blue, #0a84ff), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: fc-nav 0.9s ease-in-out infinite; pointer-events: none; }
@keyframes fc-nav{ from{ background-position: -50% 0; } to{ background-position: 150% 0; } }
body.is-navigating main, body.is-navigating .m-content{ opacity: .72; transition: opacity .15s ease .12s; }
.bottom-nav a{ -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.bottom-nav a:active{ transform: scale(.94); }
@media (prefers-reduced-motion: reduce){ body.is-navigating::before{ animation: none; background-size: 100% 100%; } }

/* Dove siamo: avviso del collegamento vecchio (12 ottobre 2026) */
.ps-stale{ display: grid; gap: .25rem; background: var(--m-amber-soft); color: inherit; text-decoration: none; margin-bottom: .7rem; }
.ps-stale small{ color: var(--m-sub); }

/* Altro su misura, "Cosa c'è di nuovo", prova del backup (15 ottobre 2026) */
.more-hidden > summary{ cursor: pointer; list-style: none; color: var(--m-sub); }
.more-hidden > summary::-webkit-details-marker{ display: none; }
.more-hidden > summary span::after{ content: ' ›'; }
.more-hidden[open] > summary span::after{ content: ' ⌄'; }
.mc-row, body.mobile fieldset.mc-row{ flex-wrap: wrap; border: 0; border-radius: 0; margin: 0; min-width: 0; }
.mc-row .ios-grow{ min-width: 0; }
.mc-row .ios-grow b{ overflow-wrap: anywhere; }
.mc-unused{ display: block; color: var(--m-amber) !important; }
.mc-seg{ flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 9px; background: var(--m-bg); }
.mc-seg label{ margin: 0; position: relative; }
.mc-seg input{ position: absolute; opacity: 0; inset: 0; margin: 0; }
.mc-seg span{ display: block; padding: .38rem .2rem; border-radius: 7px; text-align: center; font-size: .8rem; color: var(--m-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-seg input:checked + span{ background: var(--m-card); color: var(--m-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mc-seg input[value="hide"]:checked + span{ color: var(--m-red); }
.mc-seg input:focus-visible + span{ outline: 2px solid var(--m-blue); outline-offset: 1px; }
.mc-save{ display: grid; gap: .5rem; margin: 1rem 0 2rem; }
.nw-card{ display: grid; gap: .5rem; background: color-mix(in srgb, #FF2D55 8%, var(--m-card)); margin-bottom: .7rem; }
.nw-head{ display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.nw-head form{ margin: 0; }
.nw-x{ width: 32px; height: 32px; border: 0; border-radius: 99px; background: var(--m-bg); color: var(--m-sub); font-size: .9rem; cursor: pointer; }
.nw-item{ display: grid; gap: .1rem; color: var(--m-ink) !important; text-decoration: none; }
.nw-item b{ font-size: .95rem; }
.nw-item small{ font-size: .84rem; }
.nw-item small, .nw-row small{ color: var(--m-sub); line-height: 1.35; }
.nw-more, .nw-open{ font-size: .85rem; color: var(--m-blue) !important; text-decoration: none; }
.nw-row .ios-grow{ display: grid; gap: .15rem; }
.nw-new{ display: inline-block; padding: 0 .4rem; border-radius: 99px; background: #FF2D55; color: #fff; font-size: .7rem; font-weight: 700; vertical-align: middle; }
.bc-result{ margin-bottom: .8rem; }
.bc-result h2{ margin: 0 0 .3rem; font-size: 1.05rem; }
.bc-result.is-ok h2{ color: var(--m-green); }
.bc-result.is-bad h2{ color: var(--m-red); }
.bc-problem{ padding: .45rem .6rem; border-radius: 8px; background: var(--m-red-soft); }
.bc-warn{ padding: .45rem .6rem; border-radius: 8px; background: var(--m-amber-soft); }
.bc-table{ width: 100%; border-collapse: collapse; font-size: .88rem; margin: .4rem 0; }
.bc-table th{ text-align: right; font-weight: 600; color: var(--m-sub); font-size: .78rem; padding: .25rem 0 .25rem .4rem; }
.bc-table td{ padding: .3rem 0; border-top: 1px solid var(--m-line); }
.bc-table td + td{ text-align: right; padding-left: .4rem; white-space: nowrap; }
.bc-steps{ margin: 0 0 .8rem; padding: .7rem .9rem .7rem 2rem; display: grid; gap: .45rem; font-size: .92rem; }
.bc-link{ margin: .8rem 0; }

/* Face ID, scorte, taglie, ricerca, diario, giornata dei bambini, manutenzioni (19 ottobre 2026) */
.fid-card{ display: grid; gap: .5rem; margin-bottom: .8rem; }
.fid-msg:empty{ display: none; }
.fid-login{ margin: .6rem 0; display: grid; gap: .4rem; }
.btn-faceid{ background: #111; color: #fff !important; border-color: #111; }
.sp-row{ align-items: flex-start; }
.sp-row.is-due .sp-days{ background: var(--m-red-soft); color: var(--m-red); }
.sp-days{ flex: 0 0 auto; display: grid; place-items: center; width: 52px; padding: .35rem 0; border-radius: 10px; background: var(--m-green-soft); color: var(--m-green); line-height: 1.05; }
.sp-days b{ font-size: 1.25rem; }
.sp-days small{ font-size: .68rem; color: inherit; }
.sp-row .ios-grow{ display: grid; gap: .2rem; min-width: 0; }
.sp-actions{ display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; margin-top: .25rem; }
.sp-actions form{ margin: 0; }
.sp-more > summary{ list-style: none; cursor: pointer; }
.sp-more > summary::-webkit-details-marker{ display: none; }
.sp-more[open]{ flex-basis: 100%; display: grid; gap: .4rem; }
.sp-inline{ display: flex; gap: .4rem; align-items: flex-end; flex-wrap: wrap; }
.sp-inline label{ display: grid; gap: .15rem; font-size: .8rem; color: var(--m-sub); }
.sp-inline input{ width: 6rem; }
.sp-form .sp-field, .sz-field, .dy-field{ display: grid; gap: .25rem; align-items: stretch; }
.sp-form .sp-field b, .sz-field b, .dy-field b{ font-size: .85rem; }
.sp-two{ display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sp-two .sp-field{ min-width: 0; }
.sp-two input, .sp-two select{ width: 100%; min-width: 0; }
.sp-link, .hc-link{ display: grid; gap: .15rem; color: var(--m-ink) !important; text-decoration: none; }
.sp-link.is-due{ background: color-mix(in srgb, var(--m-red) 8%, var(--m-card)); }
.sz-hint{ margin: 0 .4rem .5rem; padding: .5rem .7rem; border-radius: 10px; background: var(--m-amber-soft); font-size: .9rem; }
.sz-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .6rem 0; }
.sz-grid input{ width: 100%; min-width: 0; }
.sz-note{ display: grid; gap: .25rem; }
.sz-share{ margin-top: .8rem; gap: .6rem; }
.sz-share form, .sz-share button{ flex: 0 0 auto; }
.gf-sizes{ margin: -.2rem 0 .5rem; font-size: .92rem; }
.sr-form{ margin-bottom: .8rem; }
.sr-ic{ flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--m-bg); font-size: 1.05rem; }
.sr-row .ios-grow{ min-width: 0; }
.sr-row .ios-grow b{ overflow-wrap: anywhere; }
.dy-tabs{ display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.dy-tabs a{ flex: 0 0 auto; padding: .45rem .75rem; border-radius: 99px; background: var(--m-card); color: var(--m-ink) !important; text-decoration: none; font-size: .88rem; border: 1px solid var(--m-line); }
.dy-tabs a.is-on{ background: var(--m-ink); color: var(--m-card) !important; border-color: var(--m-ink); }
.dy-field textarea{ width: 100%; min-width: 0; font: inherit; }
.dy-field small{ font-size: .78rem; }
.dy-dot{ flex: 0 0 auto; width: 24px; height: 24px; border-radius: 99px; border: 2px solid var(--m-line); display: grid; place-items: center; font-size: .8rem; color: #fff; }
.dy-dot.is-done{ background: var(--m-green); border-color: var(--m-green); }
.dy-entry{ align-items: flex-start; }
.dy-ic{ flex: 0 0 auto; font-size: 1.2rem; line-height: 1.4; }
.dy-entry .ios-grow{ display: grid; gap: .15rem; min-width: 0; }
.dy-entry .ios-grow b{ overflow-wrap: anywhere; }
.dy-letter{ display: block; padding: .6rem .7rem; border-radius: 10px; background: var(--m-amber-soft); font-family: Georgia, 'Times New Roman', serif; line-height: 1.45; overflow-wrap: anywhere; }
.dy-entry form{ margin: 0; }
.dy-del{ border: 0; background: none; color: var(--m-sub); font-size: .9rem; padding: .3rem; cursor: pointer; }
.kd-head{ display: grid; gap: .2rem; margin: 0 .2rem .4rem; }
.kd-day{ margin: 0; font-size: 1.5rem; }
.kd-day b{ text-transform: capitalize; }
.kd-weather{ margin: 0; font-size: 1.05rem; color: var(--m-sub); }
.kd-card{ border-top: 6px solid var(--c); margin-bottom: .9rem; }
.kd-name{ margin: 0 0 .3rem; font-size: 1.6rem; }
.kd-count{ margin: .2rem 0; font-size: 1.05rem; font-weight: 600; }
.kd-moons{ display: block; font-size: 1.2rem; letter-spacing: .1rem; overflow-wrap: anywhere; }
.kd-steps{ list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.kd-steps li{ display: flex; align-items: center; gap: .8rem; padding: .45rem .5rem; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, var(--m-card)); }
.kd-ic{ flex: 0 0 auto; font-size: 2.3rem; line-height: 1; width: 3rem; text-align: center; }
.kd-txt{ display: grid; font-size: 1.15rem; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.kd-txt small{ font-weight: 400; color: var(--m-sub); font-size: .9rem; }
.hc-row{ gap: .6rem; flex-wrap: wrap; }
.hc-row .ios-grow{ min-width: 0; flex: 1 1 60%; }
.hc-row.is-done{ opacity: .6; }
.hc-check{ flex: 0 0 auto; display: grid; place-items: center; width: 26px; }
.hc-check input{ width: 20px; height: 20px; }
.hc-date{ flex: 1 1 100%; margin-left: 32px; max-width: calc(100% - 32px); }

/* =====================================================================
   Family Control 2.0 (19 ottobre 2026): fondo caldo, titoli tondi, card piatte,
   un colore per persona, "Adesso" in cima, ＋ nella barra, tessere in Altro, spesa per reparti.
   Vale per tutta l'app su iPhone (body.mobile); i colori seguono la modalità chiara/scura dell'iPhone.
   ===================================================================== */
body.mobile{
  --m-bg: #F5F3EE; --m-card: #FFFFFF; --m-ink: #17181C; --m-sub: #5B5E66; --m-line: #E6E2D9;
  --m-blue: #2F5BD3; --m-blue-soft: #EEF2FD; --m-green: #1B7A43; --m-green-soft: #DDF1E4; --m-red: #C2410C; --m-red-soft: #FBE9E2;
  --m-amber: #9A5B00; --m-amber-soft: #FFF1D6; --m-shadow: none;
  --fc-hero: #17181C; --fc-hero-ink: #FFFFFF; --fc-hero-sub: #D3D5DC; --fc-hero-line: #33353D; --fc-hl: #FFE7B8; --fc-hl-ink: #4A2C00;
  --fc-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--m-bg); color: var(--m-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark){
  body.mobile{
    --m-bg: #101115; --m-card: #1B1C21; --m-ink: #F2F2F4; --m-sub: #A3A6B0; --m-line: #2C2E35;
    --m-blue: #7C9CF0; --m-blue-soft: #1E2740; --m-green: #5CC489; --m-green-soft: #14291D; --m-red: #FF8A65; --m-red-soft: #33190F;
    --m-amber: #F2B45A; --m-amber-soft: #33260F;
    --fc-hero: #FFE7B8; --fc-hero-ink: #2A1D00; --fc-hero-sub: #4D3600; --fc-hero-line: #E9CE97; --fc-hl: #17181C; --fc-hl-ink: #FFE7B8;
  }
}
/* Titoli: tondi e decisi */
body.mobile .m-top{ background: color-mix(in srgb, var(--m-bg) 90%, transparent); }
body.mobile .m-top h1{ font-family: var(--fc-display); font-weight: 800; letter-spacing: -.02em; }
body.mobile .m-top-home h1{ font-size: 1.85rem; }
body.mobile .m-sub{ text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
body.mobile .ios-label{ font-size: 1.02rem; font-weight: 700; color: var(--m-ink); margin: .55rem .25rem .45rem; }
body.mobile .ios-label > span:last-child:not(:first-child){ color: var(--m-sub); }
body.mobile .ios-label a{ color: var(--m-blue) !important; font-weight: 600; }
body.mobile .m-card-title{ font-family: var(--fc-display); font-weight: 700; }
/* Card piatte sul fondo caldo */
body.mobile .ios-card, body.mobile .m-card, body.mobile .m-tile{ border-radius: 20px; box-shadow: none; }
body.mobile .ios-row + .ios-row{ border-top-color: var(--m-line); }
/* Azioni: un solo blu, più profondo */
body.mobile a{ color: var(--m-blue); }
body.mobile .btn-primary{ background: var(--m-blue); color: #fff; }
body.mobile .btn-ghost{ color: var(--m-blue); }
body.mobile .btn{ border-radius: 14px; }
body.mobile .flash{ border-radius: 16px; }
@media (prefers-color-scheme: dark){ body.mobile .btn-primary{ color: #101115; } }

/* Barra in basso: Oggi, Calendario, Dove siamo, ＋, Spesa, Altro */
body.mobile .bottom-nav{ background: color-mix(in srgb, var(--m-card) 96%, transparent); border-top-color: var(--m-line); }
body.mobile .bottom-nav.has-plus{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
body.mobile .bottom-nav a{ color: var(--m-sub) !important; font-size: .68rem; }
body.mobile .bottom-nav a.active{ color: var(--m-blue) !important; font-weight: 700; }
body.mobile .bottom-nav a.active svg{ fill: none; stroke-width: 2.3; }
body.mobile .bottom-nav .nav-plus{ align-self: center; justify-self: center; width: 52px; height: 52px; min-height: 52px; border-radius: 17px; background: var(--m-blue); color: #fff !important; display: grid; place-items: center; margin-top: -6px; }
body.mobile .bottom-nav .nav-plus svg{ width: 26px; height: 26px; stroke-width: 2.4; fill: none !important; }
@media (prefers-color-scheme: dark){ body.mobile .bottom-nav .nav-plus{ color: #101115 !important; } }
/* Il pannello ＋ si apre dalla barra: niente più pulsante rotondo sopra il testo */
body.mobile .m-fab.is-nav > summary{ display: none; }
body.mobile .m-fab.is-nav[open] > summary{ display: grid; background: var(--m-ink); color: var(--m-bg); }
body.mobile .m-fab .m-sheet{ max-height: calc(100vh - 70px - env(safe-area-inset-top)); overflow-y: auto; border-radius: 28px 28px 0 0; gap: .8rem; }
.qa-title{ font-family: var(--fc-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.qa-form{ display: grid; gap: .35rem; }
.qa-label{ font-size: .82rem; font-weight: 600; color: var(--m-sub); }
.qa-field{ display: flex; align-items: center; gap: .4rem; border: 2px solid var(--m-blue); border-radius: 16px; padding: .2rem .25rem .2rem .8rem; background: var(--m-card); }
body.mobile .qa-field input{ flex: 1; min-width: 0; border: 0 !important; background: transparent !important; font-size: 1.05rem; padding: .55rem 0; min-height: 44px; }
body.mobile .qa-field input:focus{ outline: none; }
.qa-go{ flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--m-blue); color: #fff; display: grid; place-items: center; cursor: pointer; }
.qa-go svg{ width: 22px; height: 22px; stroke-width: 2.4; }
@media (prefers-color-scheme: dark){ .qa-go{ color: #101115; } }
.qa-hint{ color: var(--m-sub); font-size: .8rem; line-height: 1.35; }
.qa-tiles{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.qa-tile{ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 72px; padding: .5rem .2rem; border-radius: 16px; border: 1.5px solid var(--m-line); color: var(--m-ink) !important; text-decoration: none; font-size: .82rem; font-weight: 700; text-align: center; }
.qa-tile svg{ width: 24px; height: 24px; color: var(--m-blue); }
.qa-card{ display: grid; gap: .8rem; margin-bottom: .8rem; }
.qa-understood{ display: grid; gap: .6rem; margin-bottom: .8rem; border: 2px solid var(--m-blue); }
.qa-kicker{ font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--m-sub); }
.qa-said{ margin: 0; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.qa-chips{ display: flex; flex-wrap: wrap; gap: .4rem; }
.qa-chip{ padding: .35rem .7rem; border-radius: 99px; background: color-mix(in srgb, var(--m-sub) 12%, var(--m-card)); font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.qa-chip.is-kind{ background: var(--m-ink); color: var(--m-bg); }
.qa-chip.is-who{ background: var(--c, var(--m-blue)); color: #fff; }
.qa-chip.is-when{ background: var(--m-blue-soft); color: var(--m-blue); }
.qa-missing{ margin: 0; padding: .5rem .7rem; border-radius: 12px; background: var(--m-amber-soft); color: var(--m-amber); font-weight: 600; }
.qa-other{ display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .88rem; color: var(--m-sub); }
.qa-other form{ margin: 0; }

/* Oggi: "Adesso" (di sera "Stasera") */
.fc-now{ display: grid; gap: .55rem; margin-bottom: .9rem; padding: 1.1rem 1.15rem 1.15rem; border-radius: 24px; background: var(--fc-hero); color: var(--fc-hero-ink); }
.fc-now-top{ display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.fc-kicker{ font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--fc-hero-sub); }
.fc-pill{ padding: .2rem .65rem; border-radius: 99px; background: var(--fc-hl); color: var(--fc-hl-ink); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.fc-now-title{ font-family: var(--fc-display); font-size: 1.7rem; font-weight: 800; line-height: 1.08; letter-spacing: -.01em; overflow-wrap: anywhere; }
.fc-now-sub{ color: var(--fc-hero-sub); font-size: .92rem; line-height: 1.35; }
.fc-now-bar{ display: block; height: 6px; border-radius: 3px; background: var(--fc-hero-line); overflow: hidden; }
.fc-now-bar i{ display: block; height: 100%; background: var(--fc-hl); border-radius: 3px; }
.fc-now-btns{ display: flex; gap: .5rem; margin-top: .15rem; }
.fc-btn{ flex: 1; min-height: 46px; display: grid; place-items: center; border-radius: 14px; border: 1.5px solid var(--fc-hero-line); color: var(--fc-hero-ink) !important; text-decoration: none; font-weight: 700; font-size: .95rem; }
.fc-btn.is-light{ background: var(--fc-hero-ink); color: var(--fc-hero) !important; border-color: var(--fc-hero-ink); }
.fc-now.is-evening{ background: var(--fc-hl); color: var(--fc-hl-ink); }
.fc-now.is-evening .fc-kicker, .fc-now.is-evening .fc-now-sub{ color: color-mix(in srgb, var(--fc-hl-ink) 78%, transparent); }
.fc-now.is-evening .fc-btn{ border-color: color-mix(in srgb, var(--fc-hl-ink) 35%, transparent); color: var(--fc-hl-ink) !important; }
.fc-now.is-evening .fc-btn.is-light{ background: var(--fc-hl-ink); color: var(--fc-hl) !important; border-color: var(--fc-hl-ink); }
.fc-faces{ display: flex; }
.fc-faces .av{ border: 2px solid var(--fc-hl); }
.fc-faces .av + .av{ margin-left: -9px; }
/* Oggi: chi è dove (adulti e bambini) */
.fc-who{ display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: .5rem; margin-bottom: .9rem; }
.fc-who-p{ display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .75rem .3rem .65rem; border-radius: 18px; background: var(--m-card); color: var(--m-ink) !important; text-decoration: none; text-align: center; min-width: 0; }
.fc-who-p .av-lg{ width: 46px; height: 46px; font-size: 1.15rem; }
.fc-who-p b{ font-size: .88rem; }
.fc-who-p small{ font-size: .74rem; color: var(--m-sub); line-height: 1.25; overflow-wrap: anywhere; }
/* Oggi: la giornata con il segno dell'ora attuale */
.fc-timeline .ios-dot{ width: 10px; height: 10px; border-radius: 5px; align-self: center; }
.fc-nowline{ display: flex; align-items: center; gap: .55rem; padding: .15rem 0; }
.fc-nowline time{ width: 2.9rem; font-size: .78rem; font-weight: 800; color: var(--m-red); font-variant-numeric: tabular-nums; }
.fc-nowline i{ flex: 1; height: 2px; background: var(--m-red); border-radius: 1px; position: relative; }
.fc-nowline i::before{ content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 5px; background: var(--m-red); }
.fc-timeline .ios-row + .fc-nowline, .fc-timeline .fc-nowline + .ios-row{ border-top: 0; }

/* Settimana a strisce: una riga per persona, mattina chiara, pomeriggio più pieno, notte scura */
body.mobile .m-wkgrid .m-wk-row{ grid-template-columns: 3.4rem repeat(var(--days, 7), minmax(0, 1fr)); }
.m-wk-name{ font-size: .66rem; font-weight: 700; color: var(--pc, var(--m-sub)); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.mobile .m-wkgrid .wk-work{ background: color-mix(in srgb, var(--pc, var(--m-blue)) 16%, var(--m-card)); color: color-mix(in srgb, var(--pc, var(--m-blue)) 72%, #000) !important; }
body.mobile .m-wkgrid .wk-work.wk-pm{ background: color-mix(in srgb, var(--pc, var(--m-blue)) 40%, var(--m-card)); color: color-mix(in srgb, var(--pc, var(--m-blue)) 45%, #000) !important; }
body.mobile .m-wkgrid .wk-work.wk-night{ background: #23252D; color: #FFFFFF !important; }
body.mobile .m-wkgrid .wk-rest, body.mobile .m-wkgrid .wk-off{ background: transparent; border: 1.5px dashed var(--m-line); }
body.mobile .m-wkgrid .wk-school{ background: color-mix(in srgb, var(--pc, var(--m-blue)) 16%, var(--m-card)); color: color-mix(in srgb, var(--pc, var(--m-blue)) 72%, #000) !important; }
body.mobile .m-wkgrid .wk-event{ background: var(--pc, var(--c)); color: #FFFFFF !important; }
body.mobile .m-wk-day.is-today{ background: var(--m-ink); color: var(--m-bg) !important; }
body.mobile .m-wk-day.is-sel{ box-shadow: inset 0 0 0 2px var(--m-blue); }
@media (prefers-color-scheme: dark){
  body.mobile .m-wkgrid .wk-work, body.mobile .m-wkgrid .wk-school{ color: color-mix(in srgb, var(--pc, var(--m-blue)) 40%, #fff) !important; }
  body.mobile .m-wkgrid .wk-work.wk-pm{ color: #fff !important; }
  body.mobile .m-wkgrid .wk-work.wk-night{ background: #000; box-shadow: inset 0 0 0 1px #3A3D46; }
}
.fc-together{ display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.fc-tg{ display: flex; flex-direction: column; gap: .3rem; padding: .95rem 1rem; border-radius: 20px; background: var(--m-card); color: var(--m-ink) !important; text-decoration: none; }
.fc-tg small{ font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--m-sub); }
.fc-tg b{ line-height: 1.25; }
.fc-tg span{ margin-top: auto; color: var(--m-blue); font-weight: 600; font-size: .9rem; }
.fc-tg.is-dark{ background: var(--fc-hero); color: var(--fc-hero-ink) !important; }
.fc-tg.is-dark small{ color: var(--fc-hero-sub); }
.fc-tg.is-dark span{ color: var(--fc-hl); }
@media (prefers-color-scheme: dark){ .fc-tg.is-dark span{ color: var(--fc-hero-ink); } }

/* Spesa: per reparti, cerchi grandi da spuntare */
.sp-dept{ display: flex; justify-content: space-between; margin: .9rem 0 .2rem; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--m-sub); }
.sp-dept:first-of-type{ margin-top: .3rem; }
.sp-dept span{ font-weight: 600; letter-spacing: 0; }
body.mobile [data-shopping] .m-check-box, body.mobile .shop-sport .m-check-box{ width: 32px; height: 32px; border-radius: 16px; border-color: #C9C4B8; }
body.mobile [data-shopping] .is-done .m-check-box{ background: var(--m-green); border-color: var(--m-green); }
@media (prefers-color-scheme: dark){ body.mobile [data-shopping] .m-check-box{ border-color: #4A4D57; } }

/* Altro a tessere */
.more-favs{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.more-tiles{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.more-tile, .more-fav{ position: relative; display: flex; color: var(--m-ink) !important; text-decoration: none; background: var(--m-card); }
.more-tile{ flex-direction: column; align-items: center; gap: .4rem; min-height: 88px; padding: .7rem .2rem .55rem; border-radius: 18px; text-align: center; }
.more-fav{ flex-direction: column; justify-content: space-between; gap: .6rem; min-height: 92px; padding: .85rem .9rem; border-radius: 20px; background: color-mix(in srgb, var(--c) 16%, var(--m-card)); }
.more-ic{ flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--m-card)); color: color-mix(in srgb, var(--c) 75%, #000); }
.more-fav .more-ic{ background: var(--m-card); }
.more-ic svg{ width: 21px; height: 21px; }
.more-tl{ font-size: .74rem; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }
.more-fav .more-tl{ font-size: .95rem; font-weight: 700; }
.more-tile .more-badge, .more-fav .more-badge{ position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; line-height: 20px; font-size: .7rem; background: var(--m-red); }
.more-tile[hidden], .more-fav[hidden], .more-group[hidden]{ display: none !important; }
@media (prefers-color-scheme: dark){ .more-ic{ color: color-mix(in srgb, var(--c) 55%, #fff); } }
@media (max-width: 340px){ .more-tiles{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.mobile .bottom-nav a.nav-plus, body.mobile .bottom-nav a.nav-plus.active{ color: #fff !important; }
@media (prefers-color-scheme: dark){ body.mobile .bottom-nav a.nav-plus, body.mobile .bottom-nav a.nav-plus.active{ color: #101115 !important; } }

/* Scatola dei vestiti, codici di casa, chi è via, calendari esterni, vacanza (20 ottobre 2026) */
.bx-row{ align-items: flex-start; gap: .7rem; }
.bx-row .ios-grow{ display: grid; gap: .1rem; min-width: 0; }
.bx-row form{ margin: 0; }
.bx-size{ flex: 0 0 auto; min-width: 56px; padding: .35rem .4rem; border-radius: 10px; background: color-mix(in srgb, var(--m-sub) 12%, var(--m-card)); text-align: center; font-size: .78rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.bx-row.is-ready .bx-size{ background: var(--m-green-soft); color: var(--m-green); }
.bx-row.is-soon .bx-size{ background: var(--m-amber-soft); color: var(--m-amber); }
.bx-field, .hcd-field, .aw-field, .ics-field{ display: grid; gap: .25rem; align-items: stretch; }
.bx-field b, .hcd-field b, .aw-field b, .ics-field b{ font-size: .85rem; }
.bx-two, .aw-two{ display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.bx-two input, .bx-two select, .aw-two input{ width: 100%; min-width: 0; }
.hcd-card{ display: grid; gap: .6rem; margin-bottom: .7rem; }
.hcd-head{ display: flex; align-items: flex-start; gap: .5rem; }
.hcd-head .ios-grow{ display: grid; min-width: 0; }
.hcd-value{ display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.hcd-secret{ font-size: 1.05rem; font-weight: 700; padding: .3rem .55rem; border-radius: 8px; background: color-mix(in srgb, var(--m-sub) 12%, var(--m-card)); overflow-wrap: anywhere; user-select: all; }
.hcd-mask{ font-size: 1.1rem; letter-spacing: .1em; color: var(--m-sub); margin-right: auto; }
.hcd-secret:not([hidden]) + .hcd-mask{ display: none; }
.hcd-value .hcd-secret:not([hidden]){ margin-right: auto; }
.hcd-qr > summary{ list-style: none; cursor: pointer; display: inline-flex; }
.hcd-qr > summary::-webkit-details-marker{ display: none; }
.hcd-qrbox{ display: grid; justify-items: center; gap: .4rem; padding: .8rem 0 .2rem; }
.hcd-qrbox svg{ width: min(240px, 70vw); height: auto; border-radius: 12px; }
.hcd-qrbox small{ color: var(--m-sub); text-align: center; }
.aw-card{ display: grid; gap: .6rem; margin-bottom: .8rem; border-top: 4px solid var(--c); }
.aw-head{ display: flex; align-items: flex-start; gap: .5rem; }
.aw-head .ios-grow{ display: grid; min-width: 0; }
.aw-head form{ margin: 0; }
.aw-days{ list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.aw-days li{ display: grid; gap: .1rem; padding: .5rem .65rem; border-radius: 12px; background: color-mix(in srgb, var(--m-sub) 8%, var(--m-card)); }
.aw-days li small{ color: var(--m-sub); }
.aw-days li.has-gap{ background: var(--m-amber-soft); }
.aw-gap{ font-size: .86rem; font-weight: 700; color: var(--m-amber); }
body.mobile .m-wkgrid .wk-away{ background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--pc, var(--m-sub)) 22%, var(--m-card)) 0 6px, var(--m-card) 6px 12px); color: var(--m-ink) !important; font-weight: 800; }
.ics-row{ gap: .4rem; }
.ics-row .ios-grow{ display: grid; min-width: 0; }
.ics-row form{ margin: 0; }
.tr-place{ display: flex; align-items: flex-end; gap: .4rem; margin-top: .4rem; }
.tr-place label{ flex: 1; display: grid; gap: .2rem; font-size: .8rem; color: var(--m-sub); min-width: 0; }
.tr-place input{ width: 100%; min-width: 0; }
.fc-now.is-vacation{ background: #0E5E6F; color: #FFFFFF; }
.fc-now.is-vacation .fc-kicker, .fc-now.is-vacation .fc-now-sub, .fc-now.is-vacation .fc-now-note{ color: #CFEFF4; }
.fc-now.is-vacation .fc-btn{ border-color: #3F8C9A; color: #FFFFFF !important; }
.fc-now.is-vacation .fc-btn.is-light{ background: #FFFFFF; color: #0E5E6F !important; border-color: #FFFFFF; }
.fc-now-note{ font-size: .8rem; }
/* Il codice QR non deve prendere il contorno delle icone */
body.mobile .hcd-qrbox svg, body.mobile .hcd-qrbox svg *{ stroke: none !important; stroke-width: 0 !important; }
body.mobile .hcd-qrbox svg path{ fill: #000 !important; }
body.mobile .hcd-qrbox svg rect{ fill: #fff !important; }

/* Stelline, foto del diario, garanzie, cose prestate, seggiolino, avvisi raccolti (26 ottobre 2026) */
.st-card{ display: grid; gap: .7rem; margin-bottom: .8rem; }
.st-card.is-reached{ background: color-mix(in srgb, var(--fc-hl, #FFE7B8) 55%, var(--m-card)); }
.st-head{ display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.st-head h2{ margin: 0; font-size: 1.25rem; }
.st-count{ font-size: .95rem; color: var(--m-sub); white-space: nowrap; }
.st-count b{ font-size: 1.5rem; color: var(--m-ink); }
.st-sky{ display: flex; flex-wrap: wrap; gap: .15rem; font-size: 1.55rem; line-height: 1; }
.st-sky span{ color: color-mix(in srgb, var(--m-sub) 25%, var(--m-card)); }
.st-sky span.is-on{ color: #F5B700; text-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.st-prize{ margin: 0; overflow-wrap: anywhere; }
.st-prize.is-won{ padding: .6rem .75rem; border-radius: 14px; background: var(--m-card); font-size: 1.05rem; }
.st-habits{ display: grid; gap: .5rem; }
.st-habit{ margin: 0; }
.st-habit button{ width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l p" "t p"; align-items: center; gap: .1rem .6rem; padding: .7rem .85rem; border: 1px solid var(--m-line); border-radius: 16px; background: var(--m-card); color: var(--m-ink); font: inherit; text-align: left; cursor: pointer; }
.st-habit button:active{ transform: scale(.98); }
.st-habit button[disabled]{ opacity: .55; cursor: default; }
.st-hl{ grid-area: l; font-weight: 700; overflow-wrap: anywhere; }
.st-today{ grid-area: t; font-size: .8rem; color: #C99500; }
.st-plus{ grid-area: p; padding: .45rem .7rem; border-radius: 99px; background: var(--fc-hl, #FFE7B8); color: var(--fc-hl-ink, #4A2C00); font-weight: 800; font-size: .95rem; white-space: nowrap; }
.st-free button{ border-style: dashed; }
.st-free .st-hl{ font-weight: 600; color: var(--m-sub); }
.st-undo{ margin: 0; }
.st-setup > summary{ cursor: pointer; color: var(--m-blue); font-weight: 600; }
.st-setup[open] > summary{ margin-bottom: .5rem; }
.st-list{ list-style: none; padding: 0; margin: 0 0 .5rem; }
.st-list li{ display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--m-line); }
.st-list li span{ overflow-wrap: anywhere; min-width: 0; }
.st-list form{ margin: 0; }
.st-row{ display: flex; gap: .4rem; margin: 0 0 .6rem; }
.st-row input{ flex: 1; min-width: 0; }
.st-prizeform{ display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: .5rem; align-items: end; margin: 0; }
.st-prizeform label{ display: grid; gap: .2rem; min-width: 0; }
.st-prizeform label b{ font-size: .85rem; }
.st-prizeform input{ width: 100%; min-width: 0; }
.st-prizeform button{ grid-column: 1 / -1; }
.st-card > *, .cs-card > *{ min-width: 0; }
.dy-photo, .wr-form .bx-field{ min-width: 0; }
.dy-photo input[type=file], .wr-form input[type=file]{ width: 100%; min-width: 0; max-width: 100%; font-size: .85rem; }
.dy-photos{ display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.dy-photos a{ display: block; }
.dy-photos img{ display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--m-line); }
.dy-book{ display: flex; align-items: center; gap: .7rem; margin: .2rem 0 .8rem; padding: .8rem 1rem; text-decoration: none; color: var(--m-ink); }
.dy-book > span:first-child{ font-size: 1.5rem; }
.dy-book .ios-grow{ display: grid; gap: .1rem; min-width: 0; }
.dy-book small{ color: var(--m-sub); }
.wr-row, .ln-row{ align-items: flex-start; gap: .7rem; }
.wr-row .ios-grow, .ln-row .ios-grow{ display: grid; gap: .15rem; min-width: 0; }
.wr-row .ios-grow b, .ln-row .ios-grow b{ overflow-wrap: anywhere; }
.wr-row form, .ln-row form{ margin: 0; }
.wr-when{ flex: 0 0 auto; min-width: 58px; display: grid; justify-items: center; padding: .35rem .3rem; border-radius: 12px; background: var(--m-green-soft); color: var(--m-green); line-height: 1.1; text-align: center; }
.wr-when b{ font-size: .85rem; }
.wr-when small{ font-size: .68rem; }
.wr-row.is-soon .wr-when{ background: var(--m-amber-soft); color: var(--m-amber); }
.wr-row.is-over .wr-when{ background: color-mix(in srgb, var(--m-sub) 12%, var(--m-card)); color: var(--m-sub); }
.wr-receipt{ font-size: .85rem; font-weight: 600; }
.ln-ic{ flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 99px; background: color-mix(in srgb, var(--m-blue) 12%, var(--m-card)); color: var(--m-blue); font-weight: 800; }
.ln-row.is-long .ln-ic{ background: var(--m-amber-soft); color: var(--m-amber); }
.ln-dir{ display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.ln-dir label{ display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.ln-back{ margin-top: .8rem; }
.ln-back > summary{ cursor: pointer; font-weight: 600; }
.ln-back ul{ list-style: none; padding: 0; margin: .5rem 0 0; }
.ln-back li{ display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--m-line); font-size: .9rem; color: var(--m-sub); }
.ln-back li span{ min-width: 0; overflow-wrap: anywhere; }
.ln-back form{ margin: 0; }
.cs-card{ display: grid; gap: .6rem; margin-bottom: .8rem; }
.cs-head{ display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.cs-head h2{ margin: 0; font-size: 1.2rem; }
.cs-stage{ display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 14px; background: color-mix(in srgb, var(--m-blue) 9%, var(--m-card)); }
.cs-stage > span:last-child{ display: grid; gap: .1rem; min-width: 0; }
.cs-stage small{ color: var(--m-sub); }
.cs-ic{ font-size: 1.6rem; }
.cs-notes{ list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .92rem; }
.cs-rules .ios-grow{ display: grid; gap: .15rem; min-width: 0; }
.cs-rules small{ color: var(--m-sub); }
.cs-card p{ margin: 0; }
.nt-digest p{ margin: .3rem 0 .7rem; }
.nt-digest form{ margin: 0; }

/* Dopo la notte, feste di Natale, pediatra, ricette, abbonamenti, primi assaggi, cambio di stagione (28 ottobre 2026) */
.nt-rest p{ margin: .3rem 0 .7rem; }
.xm-days{ display: grid; gap: .6rem; margin-bottom: .8rem; }
.xm-day{ display: grid; gap: .45rem; min-width: 0; }
.xm-day > *{ min-width: 0; }
.xm-day.is-busy{ box-shadow: inset 4px 0 0 var(--m-amber); }
.xm-day header{ display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; }
.xm-day header b{ font-size: 1.1rem; }
.xm-day header span{ color: var(--m-sub); font-size: .9rem; }
.xm-shifts{ list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.xm-shifts li{ padding: .2rem .55rem; border-radius: 99px; background: var(--m-green-soft); color: var(--m-green); font-size: .85rem; overflow-wrap: anywhere; }
.xm-shifts li.is-work{ background: var(--m-amber-soft); color: var(--m-amber); }
.xm-warn{ margin: 0; color: var(--m-amber); font-size: .9rem; }
.xm-where{ margin: 0; }
.xm-plan{ display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; margin: 0; }
.xm-plan input[name=place]{ grid-column: 1 / -1; }
.xm-plan input{ width: 100%; min-width: 0; }
.xm-sum{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; text-align: center; margin-bottom: .6rem; }
.xm-sum div{ display: grid; gap: .1rem; }
.xm-sum small{ color: var(--m-sub); font-size: .8rem; }
.xm-sum b{ font-size: 1.05rem; overflow-wrap: anywhere; }
.xm-sum p{ grid-column: 1 / -1; margin: .2rem 0 0; color: var(--m-green); font-weight: 600; }
.xm-sum p.is-over{ color: var(--m-amber); }
.xm-gift{ align-items: center; gap: .6rem; }
.xm-gift .ios-grow{ display: grid; gap: .1rem; min-width: 0; }
.xm-gift .ios-grow b, .xm-gift .ios-grow small{ overflow-wrap: anywhere; }
.xm-gift .ios-grow small{ color: var(--m-sub); }
.xm-gift form{ margin: 0; }
.xm-gift.is-incartato .ios-grow b{ text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--m-sub) 60%, transparent); }
.xm-state{ width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid var(--m-line); background: var(--m-card); color: var(--m-green); font: inherit; font-weight: 800; cursor: pointer; }
.is-preso .xm-state, .is-incartato .xm-state{ border-color: var(--m-green); background: var(--m-green-soft); }
.xm-form{ margin-top: .6rem; }
.xm-form textarea{ width: 100%; min-width: 0; }
.xm-budget{ display: flex; align-items: end; gap: .5rem; margin: .6rem 0; }
.xm-budget label{ flex: 1; display: grid; gap: .2rem; min-width: 0; }
.xm-budget label b{ font-size: .85rem; }
.xm-budget input{ width: 100%; min-width: 0; }
.xm-letter{ margin: 0 0 .5rem; display: grid; gap: .2rem; border-left: 4px solid #C4302B; overflow-wrap: anywhere; }
.xm-letter small{ color: var(--m-sub); }
.pd-card{ display: grid; gap: .6rem; margin-bottom: .8rem; min-width: 0; }
.pd-card > *{ min-width: 0; }
.pd-head{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.pd-head h2{ margin: 0; font-size: 1.25rem; }
.pd-visit{ margin: 0; display: grid; gap: .1rem; padding: .55rem .7rem; border-radius: 14px; background: var(--m-green-soft); overflow-wrap: anywhere; }
.pd-visit small{ color: var(--m-sub); }
.pd-visit.is-guess{ background: color-mix(in srgb, var(--m-line) 45%, var(--m-card)); color: var(--m-sub); }
.pd-list{ margin: 0; padding-left: 1.3rem; display: grid; gap: .45rem; }
.pd-list li{ display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: .3rem; }
.pd-list li > span{ display: grid; gap: .1rem; overflow-wrap: anywhere; }
.pd-list small{ color: var(--m-sub); font-size: .78rem; }
.pd-list form{ margin: 0; }
.pd-answer > summary{ cursor: pointer; color: var(--m-blue); font-size: .85rem; font-weight: 600; padding: .3rem 0; }
.pd-answer[open]{ grid-column: 1 / -1; }
.pd-answer form{ display: flex; gap: .4rem; margin-top: .3rem; }
.pd-answer input{ flex: 1; min-width: 0; }
.pd-add{ display: flex; gap: .4rem; margin: 0; }
.pd-add input{ flex: 1; min-width: 0; }
.pd-done > summary{ cursor: pointer; color: var(--m-sub); font-size: .9rem; }
.pd-done ul{ list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .4rem; }
.pd-done li{ display: grid; gap: .1rem; overflow-wrap: anywhere; }
.pd-done li span{ color: var(--m-green); }
.pd-done li small{ color: var(--m-sub); }
.rc-search{ display: flex; gap: .4rem; margin: 0 0 .7rem; }
.rc-search input{ flex: 1; min-width: 0; }
.rc-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.rc-tile{ display: grid; gap: .25rem; align-content: start; padding: .5rem; text-decoration: none; color: var(--m-ink); min-width: 0; }
.rc-tile img, .rc-noimg{ width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--m-line); }
.rc-noimg{ display: grid; place-items: center; font-size: 2.2rem; }
.rc-tile b{ overflow-wrap: anywhere; line-height: 1.25; }
.rc-tile small{ color: var(--m-sub); font-size: .8rem; }
.rc-chips{ display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.rc-chip{ padding: .35rem .7rem; border-radius: 99px; border: 1px dashed var(--m-line); color: var(--m-blue); text-decoration: none; font-size: .9rem; overflow-wrap: anywhere; }
.rc-form textarea, .rc-edit textarea{ width: 100%; min-width: 0; }
.rc-form input[type=file], .rc-edit input[type=file]{ width: 100%; min-width: 0; max-width: 100%; font-size: .85rem; }
.rc-form .bx-field, .rc-edit .bx-field{ min-width: 0; }
.rc-one{ display: grid; gap: .3rem; min-width: 0; }
.rc-photo{ display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 18px; background: var(--m-line); }
.rc-meta{ margin: .2rem 0; color: var(--m-sub); }
.rc-lines label{ display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.rc-lines label span{ overflow-wrap: anywhere; min-width: 0; }
.rc-lines input[type=checkbox]{ width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.rc-steps{ line-height: 1.6; overflow-wrap: anywhere; }
.rc-menu{ display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; margin: .6rem 0; }
.rc-menu label{ flex: 1; display: grid; gap: .2rem; min-width: 10rem; }
.rc-menu label b{ font-size: .85rem; }
.rc-edit > summary{ cursor: pointer; color: var(--m-blue); font-weight: 600; }
.rc-edit[open] > summary{ margin-bottom: .5rem; }
.rc-del{ margin: .6rem 0 0; }
.sb-total{ display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; text-align: center; margin-bottom: .6rem; }
.sb-total div{ display: grid; gap: .1rem; }
.sb-total small{ color: var(--m-sub); font-size: .8rem; }
.sb-total b{ font-size: 1.35rem; }
.sb-by{ grid-column: 1 / -1; list-style: none; padding: 0; margin: .3rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .8rem; font-size: .85rem; color: var(--m-sub); }
.sb-by b{ color: var(--m-ink); }
.sb-row{ align-items: center; gap: .6rem; }
.sb-row .ios-grow{ display: grid; gap: .1rem; min-width: 0; }
.sb-row .ios-grow b, .sb-row .ios-grow small{ overflow-wrap: anywhere; }
.sb-row .ios-grow small{ color: var(--m-sub); }
.sb-row form{ margin: 0; }
.sb-row.is-soon .ios-grow small{ color: var(--m-amber); font-weight: 600; }
.sb-ic{ font-size: 1.4rem; flex: 0 0 auto; }
.sb-stopped > summary{ cursor: pointer; color: var(--m-green); font-weight: 600; }
.sb-stopped ul{ list-style: none; padding: 0; margin: .5rem 0 0; }
.sb-stopped li{ display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--m-line); }
.sb-stopped li span{ overflow-wrap: anywhere; min-width: 0; }
.sb-stopped form{ margin: 0; }
.fd-card{ display: grid; gap: .7rem; margin-bottom: .8rem; min-width: 0; }
.fd-card > *{ min-width: 0; }
.fd-head{ display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; }
.fd-head h2{ margin: 0; font-size: 1.25rem; }
.fd-head span{ color: var(--m-sub); font-size: .9rem; }
.fd-next{ margin: 0; display: grid; gap: .15rem; padding: .6rem .75rem; border-radius: 14px; background: var(--m-green-soft); overflow-wrap: anywhere; }
.fd-next small{ color: var(--m-sub); }
.fd-allergens{ list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .35rem; }
.fd-allergens li{ display: grid; justify-items: center; gap: .05rem; padding: .4rem .25rem; border-radius: 12px; border: 1px solid var(--m-line); text-align: center; min-width: 0; }
.fd-allergens li span{ font-size: 1.25rem; line-height: 1.1; }
.fd-allergens li b{ font-size: .78rem; overflow-wrap: anywhere; }
.fd-allergens li small{ font-size: .72rem; color: var(--m-sub); }
.fd-allergens li.is-todo{ opacity: .6; border-style: dashed; }
.fd-allergens li.is-ok{ background: var(--m-green-soft); border-color: transparent; }
.fd-allergens li.is-dubbio{ background: var(--m-amber-soft); border-color: transparent; }
.fd-allergens li.is-reazione{ background: color-mix(in srgb, #FF3B30 18%, var(--m-card)); border-color: #FF3B30; }
.fd-form{ display: grid; gap: .5rem; margin: 0; padding-top: .3rem; border-top: 1px solid var(--m-line); }
.fd-form .bx-field{ min-width: 0; }
.fd-form .bx-field input, .fd-form .bx-field select{ width: 100%; min-width: 0; }
.fd-liked{ display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .92rem; }
.fd-tries > summary{ cursor: pointer; color: var(--m-blue); font-weight: 600; }
.fd-tries ul{ list-style: none; padding: 0; margin: .4rem 0 0; }
.fd-tries li{ display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--m-line); }
.fd-tries li > span{ display: grid; gap: .05rem; overflow-wrap: anywhere; min-width: 0; }
.fd-tries li small{ color: var(--m-sub); font-size: .8rem; }
.fd-tries li.is-reazione small, .fd-tries li.is-dubbio small{ color: var(--m-amber); }
.fd-tries form{ margin: 0; }
.ss-week{ display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; text-align: center; margin-bottom: .6rem; }
.ss-week div{ display: grid; gap: .05rem; }
.ss-week small{ color: var(--m-sub); font-size: .75rem; }
.ss-week b{ font-size: 1.05rem; }
.ss-week span{ color: var(--m-sub); font-size: .8rem; }
.ss-wait{ color: var(--m-sub); }
.ss-item{ margin: 0; padding: 0; }
.ss-item button{ width: 100%; display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border: 0; background: none; color: var(--m-ink); font: inherit; text-align: left; cursor: pointer; }
.ss-item button[disabled]{ cursor: default; }
.ss-item button > span:last-child{ overflow-wrap: anywhere; min-width: 0; }
.ss-box{ flex: 0 0 auto; width: 1.45rem; height: 1.45rem; display: grid; place-items: center; border-radius: 7px; border: 2px solid var(--m-line); color: #fff; font-weight: 800; font-size: .85rem; }
.ss-item.is-on .ss-box{ background: var(--m-green); border-color: var(--m-green); }
.ss-item.is-on button > span:last-child{ color: var(--m-sub); text-decoration: line-through; }
.ss-kid{ display: grid; gap: .45rem; margin-bottom: .6rem; min-width: 0; }
.ss-kid > *{ min-width: 0; margin: 0; }
.ss-kid h3{ font-size: 1.1rem; }
.ss-sizes{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; }
.ss-sizes span{ display: grid; gap: .05rem; text-align: center; padding: .35rem .2rem; border-radius: 10px; background: color-mix(in srgb, var(--m-line) 40%, var(--m-card)); }
.ss-sizes small{ color: var(--m-sub); font-size: .72rem; }
.ss-sizes b{ font-size: .88rem; overflow-wrap: anywhere; }
.ss-hint{ color: var(--m-amber); font-size: .9rem; overflow-wrap: anywhere; }
.ss-box-title{ font-weight: 600; }
.ss-boxlist{ list-style: none; padding: 0; display: grid; gap: .25rem; }
.ss-boxlist li{ display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .5rem; overflow-wrap: anywhere; }
.ss-boxlist small{ color: var(--m-sub); }
.ss-done{ margin: .8rem 0; }
@media (max-width: 380px){
  .ss-sizes{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Prepara la settimana, faccende, come si fa, album per i nonni, istruzioni di casa, se succede qualcosa (6 novembre 2026) */
body.auth .auth-box:has(.al-public), body.auth .auth-box:has(.eg-page){ max-width: 560px; }
.eg-call{ display: grid; gap: .5rem; margin: .6rem 0 .8rem; }
body.auth:has(.eg-page), body.auth:has(.al-public){ padding: .5rem; }
body.auth .auth-box:has(.eg-page), body.auth .auth-box:has(.al-public){ padding: 1rem; }
.eg-btn{ display: grid; align-content: center; gap: .1rem; min-height: 3.8rem; padding: .55rem .7rem; border-radius: 16px; color: #fff !important; text-decoration: none; text-align: center; }
.eg-btn b{ font-size: 1.3rem; line-height: 1.2; }
.eg-btn small{ font-size: .75rem; opacity: .95; }
.eg-112{ background: #C81E1E; }
.eg-cav{ background: #6D28D9; }
.eg-list{ display: grid; gap: .45rem; }
.eg-item{ border-radius: 16px; background: var(--m-card, var(--surface)); border: 1px solid var(--m-line, var(--line)); color: var(--m-ink, var(--text)); }
.eg-item > summary{ display: flex; align-items: center; gap: .6rem; padding: .75rem .85rem; color: var(--m-ink, var(--text)); cursor: pointer; font-size: 1rem; list-style: none; }
.eg-item > summary::-webkit-details-marker{ display: none; }
.eg-item > summary::after{ content: '›'; margin-left: auto; color: var(--m-sub, var(--muted)); font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.eg-item[open] > summary::after{ transform: rotate(90deg); }
.eg-item > summary span{ font-size: 1.3rem; line-height: 1; }
.eg-body{ padding: 0 .85rem .85rem; overflow-wrap: anywhere; }
.eg-body h3{ margin: .7rem 0 .25rem; font-size: .92rem; }
.eg-body ul{ margin: 0; padding-left: 1.15rem; display: grid; gap: .3rem; line-height: 1.4; }
.eg-body p{ margin: 0 0 .5rem; }
.eg-now{ display: block; padding: .6rem .7rem; border-radius: 12px; background: #C81E1E; color: #fff !important; text-align: center; font-weight: 700; text-decoration: none; }
.eg-more{ margin-top: .45rem; }
.eg-cavs{ list-style: none; padding: 0 !important; }
.eg-cavs li{ display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .6rem; padding: .3rem 0; border-bottom: 1px solid var(--m-line, var(--line)); }
.eg-cavs a{ font-weight: 700; white-space: nowrap; }
.eg-child{ display: grid; gap: .3rem; justify-items: start; margin-bottom: .5rem; }
.eg-allergy{ color: var(--m-amber, #b45309); font-weight: 600; overflow-wrap: anywhere; }
.eg-page h1{ margin: .4rem 0 .2rem; }
.wp-heavy{ display: grid; gap: .35rem; margin-bottom: .6rem; box-shadow: inset 4px 0 0 var(--m-line); }
.wp-heavy.is-heavy{ box-shadow: inset 4px 0 0 var(--m-amber); }
.wp-heavy ul{ margin: 0; padding-left: 1.1rem; display: grid; gap: .15rem; }
.wp-heavy p{ margin: 0; color: var(--m-sub); font-size: .9rem; }
.wp-step{ display: grid; gap: .5rem; margin-bottom: .6rem; min-width: 0; }
.wp-step > *{ min-width: 0; }
.wp-step h2{ display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.05rem; }
.wp-step p{ margin: 0; }
.wp-n{ width: 1.55rem; height: 1.55rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--fc-hl, #FFE7B8); color: var(--fc-hl-ink, #4A2C00); font-size: .85rem; font-weight: 800; }
.wp-warn{ color: var(--m-amber); font-size: .92rem; }
.wp-ok{ color: var(--m-green); font-weight: 600; }
.wp-quick{ color: var(--m-sub); font-size: .88rem; }
.wp-shifts, .wp-conflicts, .wp-remember{ list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.wp-shifts li{ display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: .4rem; padding: .15rem .3rem; border-radius: 8px; font-size: .92rem; }
.wp-shifts li span{ overflow-wrap: anywhere; color: var(--m-sub); }
.wp-shifts li em{ font-style: normal; color: var(--m-amber); }
.wp-shifts li.is-heavy, .wp-dinner.is-heavy{ background: var(--m-amber-soft); }
.wp-conflicts a{ color: var(--m-ink) !important; text-decoration: none; overflow-wrap: anywhere; }
.wp-remember li{ font-size: .92rem; overflow-wrap: anywhere; }
.wp-chores{ font-size: .9rem; color: var(--m-sub); overflow-wrap: anywhere; }
.wp-dinners{ display: grid; gap: .3rem; }
.wp-dinner{ display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: center; gap: .4rem; padding: .15rem .3rem; border-radius: 8px; }
.wp-dinner > span{ overflow-wrap: anywhere; }
.wp-dinner form{ display: flex; gap: .3rem; margin: 0; min-width: 0; }
.wp-dinner input[name=title]{ flex: 1; width: 100%; min-width: 0; }
.wp-row{ display: flex; flex-wrap: wrap; gap: .4rem; }
.wp-row form{ margin: 0; }
.wp-done{ margin: .8rem 0; }
.ch-row{ align-items: flex-start; gap: .6rem; }
.ch-row .ios-grow{ display: grid; gap: .1rem; min-width: 0; }
.ch-row .ios-grow b, .ch-row .ios-grow small{ overflow-wrap: anywhere; }
.ch-row .ios-grow small{ color: var(--m-sub); }
.ch-when{ flex: 0 0 auto; width: 3.6rem; padding: .3rem .2rem; border-radius: 10px; background: color-mix(in srgb, var(--m-line) 45%, var(--m-card)); color: var(--m-sub); text-align: center; line-height: 1.1; }
.ch-when b{ font-size: .78rem; font-weight: 700; }
.ch-row.is-due .ch-when{ background: var(--m-green-soft); color: var(--m-green); }
.ch-row.is-late .ch-when{ background: var(--m-amber-soft); color: var(--m-amber); }
.ch-actions{ flex: 0 0 auto; display: grid; justify-items: end; gap: .25rem; }
.ch-actions form{ margin: 0; }
.ch-more > summary{ cursor: pointer; color: var(--m-sub); list-style: none; padding: 0 .4rem; font-size: 1.1rem; line-height: 1; text-align: right; }
.ch-more > summary::-webkit-details-marker{ display: none; }
.ch-more[open]{ display: grid; gap: .25rem; justify-items: end; }
.ch-stats{ margin: .5rem .4rem; color: var(--m-sub); font-size: .88rem; }
.rt-share{ display: grid; gap: .3rem; margin-bottom: .6rem; }
.rt-share p, .rt-share form{ margin: 0; }
.rt-card{ margin-bottom: .6rem; }
.rt-card > summary{ display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; cursor: pointer; font-size: 1.1rem; }
.rt-card > summary small{ color: var(--m-sub); font-size: .82rem; }
.rt-form{ display: grid; gap: .55rem; margin: .6rem 0 0; }
.rt-form textarea{ width: 100%; min-width: 0; }
.al-link{ display: grid; gap: .35rem; margin-bottom: .7rem; }
.al-link p, .al-link form{ margin: 0; }
.al-url{ font-size: .8rem; color: var(--m-sub); overflow-wrap: anywhere; }
.al-danger{ display: flex; flex-wrap: wrap; gap: .3rem; }
.al-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.al-photo{ display: grid; gap: .3rem; align-content: start; padding: .45rem; min-width: 0; }
.al-photo.is-on{ box-shadow: inset 0 0 0 2px var(--m-green); }
.al-photo img{ display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--m-line); }
.al-photo small{ color: var(--m-sub); font-size: .78rem; }
.al-photo form{ display: grid; gap: .3rem; margin: 0; }
.al-photo input[name=caption]{ width: 100%; min-width: 0; }
.al-cap{ margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
.al-public h1{ margin: .4rem 0; font-size: 1.4rem; }
.al-public h2{ margin: 1rem 0 .4rem; font-size: 1.05rem; }
.al-public figure{ margin: 0 0 .8rem; }
.al-public img{ display: block; width: 100%; height: auto; border-radius: 14px; background: var(--line); }
.al-public figcaption{ margin-top: .25rem; font-size: .9rem; overflow-wrap: anywhere; }
.hg-list{ display: grid; gap: .45rem; margin-bottom: .7rem; }
.hg-item > summary{ display: flex; align-items: center; gap: .55rem; cursor: pointer; list-style: none; }
.hg-item > summary::-webkit-details-marker{ display: none; }
.hg-item > summary b{ overflow-wrap: anywhere; min-width: 0; }
.hg-item.hg-urgent{ box-shadow: inset 4px 0 0 #FF3B30; }
.hg-body{ display: grid; gap: .5rem; margin-top: .6rem; min-width: 0; overflow-wrap: anywhere; }
.hg-body p{ margin: 0; }
.hg-body img{ display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; background: var(--m-line); }
.hg-edit > summary{ cursor: pointer; color: var(--m-blue); font-size: .9rem; font-weight: 600; }
.hg-form{ display: grid; gap: .5rem; margin: .5rem 0; }
.hg-form textarea, .hg-form input:not([type=checkbox]), .hg-new textarea, .hg-new input:not([type=checkbox]){ width: 100%; min-width: 0; max-width: 100%; }
.hg-new .bx-field, .hg-form .bx-field{ min-width: 0; }
.hg-check{ display: flex; align-items: center; gap: .45rem; font-size: .92rem; }
