@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #FBF7F2;
  --bg-2: #F4EEE6;
  --card: #FFFFFF;
  --ink: #231F1C;
  --ink-2: #6B625A;
  --ink-3: #A69C92;
  --line: #EFE8DF;
  --chip: #F5F0E9;
  --accent: #F26B3A;
  --accent-2: #FF9F5A;
  --accent-soft: #FFE9DE;
  --good: #1F9D63;
  --good-bg: #E2F5EA;
  --warn: #B7790B;
  --warn-bg: #FFF1D6;
  --bad: #D63A3A;
  --bad-bg: #FDE6E4;
  --shadow: 0 1px 2px rgba(35, 31, 28, .04), 0 8px 24px rgba(35, 31, 28, .07);
  --shadow-lg: 0 10px 30px rgba(35, 31, 28, .14);
  --r: 24px;
  --tabs-h: 76px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #13110F;
  --bg-2: #1B1815;
  --card: #1F1B18;
  --ink: #F5F0EA;
  --ink-2: #BDB2A7;
  --ink-3: #7F756B;
  --line: #2D2823;
  --chip: #2A2521;
  --accent-soft: #3A2419;
  --good: #5ACB90;
  --good-bg: #173226;
  --warn: #EDB54A;
  --warn-bg: #362A12;
  --bad: #F27B7B;
  --bad-bg: #3A1D1D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15.5px/1.45 "Nunito", system-ui, sans-serif;
  font-weight: 500;
  padding-bottom: calc(var(--tabs-h) + 18px);
  min-height: 100vh;
  overscroll-behavior-y: contain;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:active { transform: scale(.97); }
input, textarea, select { font: inherit; color: var(--ink); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 17px; height: 17px; }
svg.i.lg { width: 26px; height: 26px; }

/* ---------- header */
.top { padding: 14px 18px 4px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hello { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.top h1 { font-size: 25px; font-weight: 900; line-height: 1.15; }
.top h1::first-letter, .day-head h3::first-letter, .note .what::first-letter, .cap::first-letter { text-transform: uppercase; }
.top-actions { display: flex; gap: 8px; margin-top: 4px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 15px; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink);
}
.icon-btn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.status {
  margin: 8px 18px 0; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 36px);
  padding: 6px 12px 6px 10px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2);
  font-size: 12.5px; font-weight: 700;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.status.busy .dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.status.err { background: var(--bad-bg); color: var(--bad); }
.status.err .dot { background: var(--bad); }
.status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pulse { 50% { opacity: .3; } }

.ptr { height: 0; overflow: hidden; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; font-weight: 700; transition: height .2s; }
.ptr svg { transition: transform .1s; }

main { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- tab bar */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: 10px; z-index: 6; height: 64px;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px;
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow-lg);
}
.tabs button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 16px; font-size: 11px; font-weight: 800; color: var(--ink-3); transition: color .15s, background .15s;
}
.tabs button.on { color: var(--accent); background: var(--accent-soft); }
.tabs .pip { position: absolute; top: 6px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); }

/* ---------- cards */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.card h2 { font-size: 17px; font-weight: 850; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.tiny { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.sec { margin-top: 16px; }
.sec-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 850; color: var(--ink-2); margin-bottom: 8px; }
.empty { text-align: center; padding: 30px 14px; color: var(--ink-2); }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.empty b { color: var(--ink); display: block; font-size: 17px; margin-bottom: 4px; }

/* ---------- quick actions */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 4px 12px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow);
  font-size: 12px; font-weight: 800; color: var(--ink-2); text-align: center; line-height: 1.15;
}
.qa .ic { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.qa .n { position: absolute; top: 8px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.g-orange { background: linear-gradient(135deg, #FFA35C, #F26B3A); }
.g-green { background: linear-gradient(135deg, #53D69A, #1F9D63); }
.g-blue { background: linear-gradient(135deg, #6FA8FF, #3D7BF2); }
.g-violet { background: linear-gradient(135deg, #B28CFF, #7B55E0); }
.g-pink { background: linear-gradient(135deg, #FF8FB1, #E5487A); }

/* ---------- saldo */
.money { position: relative; overflow: hidden; color: #fff; }
.money.ok { background: linear-gradient(135deg, #3CC486, #188A57); }
.money.low { background: linear-gradient(135deg, #FFB84D, #E08A12); }
.money.neg { background: linear-gradient(135deg, #FF7A6B, #D63A3A); }
.money.none { background: linear-gradient(135deg, #8E8378, #5E554D); }
.money::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.money .lbl { font-size: 13px; font-weight: 800; opacity: .9; display: flex; align-items: center; gap: 6px; }
.money .eur { font-size: 42px; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; }
.money .meta { font-size: 13px; font-weight: 700; opacity: .92; margin-top: 4px; }
.money .bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .25); margin-top: 14px; overflow: hidden; }
.money .bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.money .btns { position: relative; z-index: 1; }
.money .btn { background: rgba(255, 255, 255, .22); color: #fff; }
.money .btn.white { background: #fff; color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); box-shadow: var(--shadow); border-radius: 20px; padding: 14px; }
.stat b { display: block; font-size: 20px; font-weight: 900; margin-top: 2px; }

/* ---------- kid */
.kid { padding: 0; overflow: hidden; }
.kid-top {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--kid) 16%, var(--card)), var(--card));
}
.kid-body { padding: 0 18px 18px; }
.avatar {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; flex: none;
  font-weight: 900; color: #fff; font-size: 20px; background: var(--kid, var(--accent));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--kid) 40%, transparent);
}
.kid-top h2 { font-size: 19px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* materie */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.subj {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 12px; white-space: nowrap;
  font-size: 13.5px; font-weight: 800; background: hsl(var(--h) 75% 94%); color: hsl(var(--h) 50% 30%);
}
:root[data-theme="dark"] .subj { background: hsl(var(--h) 30% 21%); color: hsl(var(--h) 65% 82%); }
.subj .n { font-size: 11px; opacity: .6; }
.subj.done { opacity: .45; text-decoration: line-through; }
.subj .x { margin-left: 2px; opacity: .6; }
.hour { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hour .h { font-size: 11px; font-weight: 800; color: var(--ink-3); }

/* checklist */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); text-align: left; width: 100%; }
.check:first-child { border-top: 0; padding-top: 4px; }
.box { width: 24px; height: 24px; border-radius: 8px; border: 2.5px solid var(--line); display: grid; place-items: center; flex: none; margin-top: 1px; color: #fff; transition: .15s; }
.check.on .box { background: var(--good); border-color: var(--good); }
.check.on .txt { color: var(--ink-3); text-decoration: line-through; }
.txt { white-space: pre-wrap; font-size: 14.5px; }
.note { border-radius: 16px; padding: 12px 14px; margin-top: 10px; background: var(--warn-bg); }
.note.bad { background: var(--bad-bg); }
.note .what { font-size: 12.5px; font-weight: 850; color: var(--warn); margin-bottom: 3px; }
.note.bad .what { color: var(--bad); }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 16px; border-radius: 16px; font-weight: 850; font-size: 15px;
  background: var(--chip); color: var(--ink);
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.accent { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 6px 16px rgba(242, 107, 58, .35); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btns .btn { flex: 1; }
.link { color: var(--accent); font-weight: 850; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }

/* segmented / kid switch */
.kids { display: flex; gap: 8px; }
.kids button {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; font-weight: 850; text-align: left;
}
.kids button .avatar { width: 34px; height: 34px; border-radius: 12px; font-size: 15px; box-shadow: none; }
.kids button.on { border-color: var(--kid); }
.kids button:not(.on) { opacity: .6; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 9px 14px; border-radius: 99px; font-weight: 800; font-size: 13.5px; color: var(--ink-2); background: var(--chip); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--ink); color: var(--bg); }

/* banner */
.banner { border-radius: 18px; padding: 13px 14px; display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 650; }
.banner.warn { background: var(--warn-bg); }
.banner.bad { background: var(--bad-bg); }
.banner.info { background: var(--bg-2); }
.banner .ic { font-size: 22px; }

/* onboarding */
.welcome { text-align: center; padding: 26px 20px 20px; }
.welcome .logo { width: 76px; height: 76px; border-radius: 26px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 40px; background: linear-gradient(135deg, #FFB36B, #E8743B); box-shadow: 0 10px 24px rgba(232, 116, 59, .35); }
.welcome h2 { font-size: 23px; font-weight: 900; }
.step { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-align: left; width: 100%; }
.step .num { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-weight: 900; background: var(--chip); flex: none; }
.step.ok .num { background: var(--good); color: #fff; }
.step b { display: block; font-size: 15.5px; }

/* registro */
.day { padding: 16px 18px; }
.day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.day-head h3 { font-size: 16px; font-weight: 900; }
.entry { padding: 10px 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; }
.entry .k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 850; color: var(--ink-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.entry .m { margin-top: 6px; }
.lesson { padding: 8px 0; border-top: 1px solid var(--line); }
.lesson:first-of-type { border-top: 0; padding-top: 2px; }
.search { position: relative; }
.search input { width: 100%; padding: 13px 14px 13px 44px; border-radius: 16px; border: 0; background: var(--card); box-shadow: var(--shadow); }
.search svg { position: absolute; left: 14px; top: 13px; color: var(--ink-3); }

/* orario */
.oday { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.oday:first-of-type { border-top: 0; padding-top: 2px; }
.oday .dn { width: 44px; flex: none; font-weight: 900; font-size: 13px; text-transform: uppercase; color: var(--ink-2); padding-top: 7px; }
.oday.today .dn { color: var(--accent); }
.oday .edit { color: var(--ink-3); padding-top: 6px; }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; }
.sheet-wrap[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(20, 16, 12, .5); animation: fade .15s; }
.sheet {
  position: relative; width: 100%; max-height: 92vh; overflow: auto; background: var(--bg);
  border-radius: 28px 28px 0 0; padding: 10px 18px 24px; animation: up .22s cubic-bezier(.2, .9, .3, 1);
}
.sheet::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font-size: 21px; font-weight: 900; margin-bottom: 4px; }
@keyframes up { from { transform: translateY(60px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; }
.pick { display: flex; gap: 8px; flex-wrap: wrap; }
.pick button { padding: 10px 16px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); font-weight: 850; display: inline-flex; align-items: center; gap: 8px; }
.pick button.on { border-color: var(--kid, var(--ink)); background: color-mix(in srgb, var(--kid, var(--ink)) 10%, var(--card)); }
.err-box { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bad-bg); color: var(--bad); font-weight: 700; font-size: 14px; }
.ok-box { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--good-bg); color: var(--good); font-weight: 800; font-size: 14px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); width: 100%; text-align: left; margin-top: 10px; }
.list-row .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; }

/* toast */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabs-h) + 14px); z-index: 30;
  background: var(--ink); color: var(--bg); padding: 14px 16px; border-radius: 16px; font-weight: 750;
  box-shadow: var(--shadow-lg); animation: up .2s;
}
.toast[hidden] { display: none; }

/* archivio */
.com { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.com:first-child { border-top: 0; padding-top: 2px; }
.cal { text-align: center; background: var(--chip); border-radius: 14px; padding: 6px 0; line-height: 1.05; }
.cal b { display: block; font-size: 19px; font-weight: 900; }
.cal span { font-size: 10.5px; text-transform: uppercase; font-weight: 850; color: var(--ink-2); }
.com.unread .cal { background: var(--accent-soft); color: var(--accent); }
.com .t { font-weight: 800; line-height: 1.3; }
/* pediatra: visite in programma */
.visita { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.ped .card-head + .visita { border-top: 0; padding-top: 2px; }
.visita .cal { background: color-mix(in srgb, var(--kid) 14%, var(--card)); color: var(--kid); }
.visita .cal span { color: inherit; opacity: .85; }
.visita .t { font-weight: 800; line-height: 1.3; }
.field > input#vMot { width: 100%; }
.kv { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.kv b { color: var(--ink); font-weight: 750; }
.voto { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 20px; font-weight: 900; background: var(--chip); flex: none; }
.voto.word { width: auto; min-width: 54px; height: auto; min-height: 34px; padding: 6px 10px; border-radius: 12px; font-size: 13px; line-height: 1.2; text-align: center; max-width: 118px; }
.voto.good { background: var(--good-bg); color: var(--good); }
.voto.bad { background: var(--bad-bg); color: var(--bad); }
.voto-row { align-items: center; gap: 12px; padding: 8px 0; }
.voto-row .voto { width: 44px; height: 44px; border-radius: 13px; font-size: 17px; }
.voto-row .voto.word { width: 84px; min-width: 0; padding: 6px 4px; height: auto; min-height: 30px; font-size: 12px; }

/* griglia orario */
.ogrid { display: grid; grid-template-columns: 44px repeat(5, 1fr); gap: 4px; }
.ogrid .oh { font-size: 12px; font-weight: 900; color: var(--ink-2); text-align: center; padding: 4px 0 6px; text-transform: uppercase; border-radius: 10px; }
.ogrid .oh.today { background: var(--accent); color: #fff; }
.ogrid .ot { font-size: 10.5px; line-height: 1.15; color: var(--ink-3); font-weight: 700; display: flex; flex-direction: column; justify-content: center; }
.ogrid .ot b { color: var(--ink-2); font-size: 12px; }
.ogrid .oc { min-height: 40px; border-radius: 10px; font-size: 12px; font-weight: 850; padding: 2px; line-height: 1.1;
  background: hsl(var(--h) 75% 92%); color: hsl(var(--h) 50% 28%); overflow: hidden; }
:root[data-theme="dark"] .ogrid .oc { background: hsl(var(--h) 30% 22%); color: hsl(var(--h) 65% 82%); }
.ogrid .oc.mensa { background: repeating-linear-gradient(-45deg, var(--warn-bg), var(--warn-bg) 6px, transparent 6px, transparent 12px); font-size: 17px; }
.ogrid .oc.empty { background: transparent; border: 1.5px dashed var(--line); }
.qa-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none; }
.card.update { border: 2px solid color-mix(in srgb, #7B55E0 35%, transparent); }

/* interruttori (notifiche) */
.sw { position: relative; width: 50px; height: 30px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw i { position: absolute; inset: 0; border-radius: 99px; background: var(--chip); transition: background .2s; pointer-events: none; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
.sw input:checked + i { background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.sw input:checked + i::after { transform: translateX(20px); }
.sw input:disabled + i { opacity: .45; }
.nrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.nrow:first-child { border-top: 0; }
.nrow .em { font-size: 20px; width: 28px; text-align: center; flex: none; }
.nbox { background: var(--card); box-shadow: var(--shadow); border-radius: 18px; padding: 6px 14px; margin-top: 10px; }
.nbox.off .nrow.sub { opacity: .45; }
.due { font-weight: 850; color: var(--accent); }
.due.soon { color: var(--bad); }
.nrow .btn { flex: none; padding: 9px 16px; min-height: 0; font-size: 14px; }

/* menù mensa */
.menu-mini { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; }
.menu-mini .emo { font-size: 30px; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; flex: none; background: var(--accent-soft); }
.menu-mini .dish { font-size: 16px; font-weight: 850; margin: 1px 0 2px; }
.menu-week .seg { margin-bottom: 4px; }
.mday { padding: 14px 0 12px; border-top: 1px solid var(--line); }
.mday:nth-of-type(1) { border-top: 0; }
.mday.today { margin: 6px -10px 0; padding: 12px 10px; border: 0; border-radius: 18px; background: var(--accent-soft); }
.mday.today + .mday { border-top: 0; }
.mday.off .mrow { opacity: .55; }
.mhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mhead b { display: inline-block; font-weight: 850; font-size: 15px; }
.mrow { display: flex; gap: 12px; }
.mrow .emo { font-size: 24px; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--chip); }
.mday .dish { font-weight: 850; font-size: 15px; }
.mday .side { font-size: 14px; color: var(--ink-2); font-weight: 650; margin-top: 2px; }
.all { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; vertical-align: 2px; background: var(--warn-bg); color: var(--warn); }
.kdots { display: inline-flex; gap: 4px; }
.kdots i { font-style: normal; width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; background: var(--kid); }
.menu-thumb { display: block; width: 100%; border-radius: 16px; border: 1px solid var(--line); margin-top: 6px; }
.menu-thumb.sm { width: 84px; height: 60px; object-fit: cover; margin: 0; flex: none; border-radius: 12px; }
.menu-zoom { margin: 12px -18px 0; overflow: auto; max-height: 65vh; background: var(--bg-2); }
.menu-zoom img { display: block; width: 100%; }
.menu-zoom.big img { width: 260%; max-width: none; }
.mweek textarea { min-height: 112px; font-size: 14px; line-height: 1.45; }

/* ---------------- versione web (iPhone/Android dal browser) */
body { padding-top: env(safe-area-inset-top); }
.tabs { bottom: calc(10px + env(safe-area-inset-bottom)); }
.sheet { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.tabs[hidden], .top-actions[hidden] { display: none !important; }
a { color: var(--accent); }
a.list-row { color: inherit; text-decoration: none; }
.list-row .ic { font-size: 20px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.guide { margin: 14px 0 10px; padding-left: 22px; }
.guide li { margin: 8px 0; line-height: 1.4; }
.card.install { border: 2px dashed var(--accent-soft); }
.btn[disabled] { opacity: .45; }
.status[hidden] { display: none; }
