/* Nous Quatre : palette froide, une couleur par personne, orange réservé à « à garder ». */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface2: #eaeef6;
  --ink: #16213a;
  --muted: #5d6a85;
  --line: #dde3ee;
  --accent: #3357ff;
  --open: #e8890c;
  --open-bg: #fff3df;
  --mapi: #7c3aed;
  --lou: #0e8f8f;
  --ok: #1f7a4d;
  --danger: #c62f3b;
  --on-ink: #f3f5f9;
  --on-accent: #ffffff;
  --shadow: 0 8px 28px rgba(22, 33, 58, 0.12);
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  --display: 'Bricolage Grotesque', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --tab-h: 64px;
  --r: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1526; --surface: #1a2238; --surface2: #232d49; --ink: #eef1f8; --muted: #a3aec7;
    --line: #2c3654; --accent: #7d97ff; --open: #f5a43a; --open-bg: #3a2a10; --mapi: #b592f5;
    --lou: #4fcfcf; --ok: #56c98b; --danger: #ff7a85; --on-ink: #0f1526; --on-accent: #0f1526; --shadow: 0 8px 28px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
h2 { font-size: 1.25rem; font-weight: 800; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.nomargin { margin: 0; }
.center-text { text-align: center; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.error { color: var(--danger); font-weight: 700; margin: 0; }
.grow { flex: 1; }

.screen { min-height: 100vh; min-height: 100dvh; }
.screen.center { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.hello { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.hello h1 { font-size: 2.2rem; }
.hello .muted { margin: 0 0 16px; }
.brand-dots { display: grid; grid-template-columns: repeat(2, 20px); gap: 6px; justify-content: center; margin-bottom: 10px; }
.brand-dots i { width: 20px; height: 20px; border-radius: 7px; background: var(--mapi); }
.brand-dots i:nth-child(2) { background: var(--lou); }
.brand-dots i:nth-child(3) { background: var(--open); }
.brand-dots i:nth-child(4) { background: var(--accent); }
.person-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.person-btn { border-radius: 20px; padding: 26px 8px; color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.2rem; box-shadow: var(--shadow); }
.person-btn:active { transform: scale(.97); }

/* Champs et boutons */
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { width: 100%; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 13px 14px; min-height: 50px; }
textarea.field { resize: none; }
.field:focus { border-color: var(--accent); outline: none; }
.field.code { text-align: center; font-size: 1.4rem; letter-spacing: .3em; }
.lab { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; padding: 14px 18px; font-weight: 700; min-height: 50px; transition: transform .08s; }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.go { background: var(--ok); color: #fff; font-size: 1.1rem; }
.btn.soft { background: var(--surface); border: 2px solid var(--line); }
.btn.ghost { color: var(--muted); }
.btn.danger { background: transparent; border: 2px solid var(--line); color: var(--danger); }
.btn.small-btn { padding: 8px 14px; min-height: 40px; font-size: 0.9rem; }
.btn:disabled { opacity: .4; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:active { background: var(--surface2); }
.icon-btn.filled { background: var(--ink); color: var(--on-ink); width: 40px; height: 40px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); font-weight: 700; font-size: 0.92rem; transition: background .15s, color .15s; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface2); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg button { padding: 10px; border-radius: 11px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(22,33,58,.15); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; min-height: 44px; }
input[type="checkbox"][role="switch"] { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
input[type="checkbox"][role="switch"]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
input[type="checkbox"][role="switch"]:checked { background: var(--ok); }
input[type="checkbox"][role="switch"]:checked::after { transform: translateX(20px); }

/* Vues */
.view, .page { max-width: 640px; margin: 0 auto; padding: 0 16px calc(var(--tab-h) + 110px + env(safe-area-inset-bottom)); animation: fade .25s ease; }
.page { padding-bottom: 130px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: calc(20px + env(safe-area-inset-top)) 0 14px; }
.head .eyebrow, .eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.head-actions { display: flex; align-items: center; gap: 2px; }
.lead { margin: 0 0 14px; }
.sec { font-size: 1.1rem; margin: 26px 0 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card.pad { padding: 16px; margin-bottom: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.label { font-weight: 700; margin-bottom: 4px; }
.big-name { font-family: var(--display); font-size: 1.3rem; }

/* Calendrier */
.month-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.month-name { font-family: var(--display); font-weight: 800; font-size: 1.35rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px 8px 12px; }
.cal-dow { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-day { position: relative; aspect-ratio: 1 / 1.05; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; border: 2px solid transparent; transition: background .12s, transform .08s; }
.cal-day:active { transform: scale(.93); }
.cal-day.outside { opacity: .35; }
.cal-day .n { font-size: 1rem; line-height: 1; }
.cal-day.today .n { color: var(--accent); }
.cal-day.today::after { content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.cal-day.selected { background: var(--ink); color: var(--on-ink); }
.cal-day.selected.today .n { color: var(--on-ink); }
.dots { display: flex; gap: 3px; height: 7px; align-items: center; }
.dots i { width: 6px; height: 6px; border-radius: 50%; }
.cal-day.open { border: 2px dashed var(--open); background: var(--open-bg); }
.cal-day.mapi { background: var(--mapi); color: #fff; }
.cal-day.lou { background: var(--lou); color: #fff; }
.cal-day.care-mapi::before, .cal-day.care-lou::before { content: ''; position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 3px; }
.cal-day.care-mapi::before { background: var(--mapi); }
.cal-day.care-lou::before { background: var(--lou); }
.cal-day.pick { background: var(--ok); border-color: var(--ok); color: #fff; }
.cal-day.prop { border: 2px dotted var(--ink); }
.cal-day .tiny { font-size: 0.65rem; opacity: .9; line-height: 1; }
.cal.big { padding: 12px 8px 14px; gap: 5px; }
.cal.big .cal-day { aspect-ratio: 1 / 1; border-radius: 16px; }
.cal.big .n { font-size: 1.25rem; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 2px 0; font-size: 0.9rem; color: var(--muted); }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 5px; margin-right: 6px; vertical-align: -2px; }
.lg.open { background: var(--open-bg); border: 2px dashed var(--open); }
.lg.pick { background: var(--ok); }
.lg.mapi { background: var(--mapi); }
.lg.lou { background: var(--lou); }

/* Planning */
.banner { width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin: 0 0 12px; border-radius: 16px; background: var(--open-bg); border: 2px solid var(--open); font-weight: 700; }
.day-panel { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.day-title { font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.day-title::first-letter { text-transform: uppercase; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rows.tight { gap: 0; margin-top: 8px; }
.rows > li.empty { color: var(--muted); padding: 6px 2px; }
.ev { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-align: left; width: 100%; }
button.ev:active { background: var(--surface2); }
.ev .t { font-family: var(--display); font-weight: 800; font-size: 1.1rem; line-height: 1.1; text-align: center; }
.ev .t small { display: block; font-family: var(--font); font-weight: 700; font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.ev .b { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev .b strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.ev .who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.ev .who .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.ev.care { border-color: var(--mapi); }
.ev.care.lou { border-color: var(--lou); }
.ev.care.open { border-color: var(--open); border-style: dashed; background: var(--open-bg); }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: #fff; background: var(--muted); }
.pill.mapi { background: var(--mapi); }
.pill.lou { background: var(--lou); }
.pill.open { background: var(--open); }
.pill.wait { background: var(--ink); color: var(--on-ink); }
.empty-card { text-align: center; padding: 20px 12px; color: var(--muted); }

/* Lignes génériques */
.row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.row .grow { min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.row strong { overflow-wrap: anywhere; }
.row .sub { font-size: 0.88rem; color: var(--muted); }
.row.tap { width: 100%; }
.row.tap:active { background: var(--surface2); }
.row-actions { display: flex; gap: 8px; flex: none; }
.row-actions .btn { min-height: 42px; padding: 8px 14px; font-size: 0.95rem; }
.rows.tight .row { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 12px 0; }
.rows.tight .row:last-child { border-bottom: 0; }
.check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.check .i { width: 16px; height: 16px; stroke-width: 3; opacity: 0; }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on .i { opacity: 1; }
.row.done strong { text-decoration: line-through; opacity: .55; }
.avatar { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; font-family: var(--display); }
.x { color: var(--muted); width: 36px; height: 36px; border-radius: 50%; }

/* Barre d'onglets et bouton + */
.tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: 4px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tab-btn { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 14px; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.tab-btn.active { color: var(--ink); }
.tab-btn.active .i { stroke-width: 2.4; }
.tab-btn span { position: relative; }
.dot-badge { position: absolute; top: -26px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--open); color: #fff; font-size: 0.7rem; display: inline-flex; align-items: center; justify-content: center; }
.fab { position: fixed; right: 18px; bottom: calc(var(--tab-h) + 22px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); z-index: 9; transition: transform .1s; }
.fab .i { width: 26px; height: 26px; stroke-width: 2.4; }
.fab:active { transform: scale(.92); }

/* Feuilles */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(10, 15, 30, 0.5); opacity: 0; pointer-events: none; transition: opacity .25s; display: flex; align-items: flex-end; justify-content: center; }
.overlay.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; bottom: 0; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 0 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; transform: translateY(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .85, .25, 1), visibility 0s .3s; }
.sheet.open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .85, .25, 1), visibility 0s; }
.grab { position: sticky; top: 0; z-index: 3; flex: none; display: flex; justify-content: center; align-items: center; height: 40px; margin: 0 -18px -6px; background: var(--bg); touch-action: none; }
.grab::before { content: ''; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-x { position: absolute; right: 8px; top: 0; width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.sheet.dragging { transition: none; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); font-weight: 700; font-size: 1.05rem; }
.choice small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.choice .ci { font-size: 1.7rem; width: 40px; text-align: center; }
.choice:active { background: var(--surface2); }
.choice[aria-pressed="true"] { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.actions { display: flex; gap: 10px; }
.sheet h2 { font-size: 1.4rem; }

/* Barre de confirmation grands-parents */
.confirm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 28px rgba(22,33,58,.14); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; animation: rise .25s ease; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.bar-list { max-height: 96px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.bar-list span { color: var(--muted); font-weight: 400; }
.bar-actions { display: flex; gap: 10px; max-width: 560px; width: 100%; margin: 0 auto; }
.confirm-bar .bar-list { max-width: 560px; width: 100%; margin: 0 auto; }

/* Espace grands-parents : tout en plus grand */
.screen.gp { font-size: 18px; }
.gp .btn { min-height: 56px; font-size: 1.05rem; }
.gp .row { padding: 16px; }
.gp .cal-day .n { font-size: 1.3rem; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 90px); transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
.screen.gp ~ .toast { bottom: 170px; }
.foot { margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.today-link { margin-left: 12px; color: var(--accent); font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 0.9rem; padding: 4px 0; }
.two > * { min-width: 0; }
input[type="date"].field, input[type="time"].field { min-width: 0; -webkit-appearance: none; appearance: none; text-align: left; }
.pill { white-space: nowrap; align-self: flex-start; }
.row.wrap { flex-wrap: wrap; }
.row.wrap .grow { flex: 1 1 100%; }
.row.wrap .row-actions { flex: 1 1 100%; }
.row.wrap .row-actions .btn { flex: 1; }

.fab.wide { width: auto; padding: 0 20px 0 16px; gap: 8px; font-weight: 700; font-size: 1.05rem; height: 56px; }
.fab.wide .i { width: 22px; height: 22px; }
.screen.gp .confirm-bar { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px); }
.screen.gp .fab { bottom: calc(var(--tab-h) + 22px + env(safe-area-inset-bottom)); }
.screen.gp.has-bar .fab { display: none; }
.day-add { margin-top: 4px; }

/* Semaine */
.week-days { display: flex; flex-direction: column; gap: 6px; touch-action: pan-y; }
.wd { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.wd:first-child { border-top: 0; }
.wd-date { text-align: center; line-height: 1.1; padding-top: 2px; }
.wd-date small { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.wd-date b { display: block; font-family: var(--display); font-size: 1.6rem; margin-top: 2px; }
.wd.today .wd-date b { background: var(--accent); color: #fff; border-radius: 12px; padding: 2px 0; }
.wd.today .wd-date small { color: var(--accent); }
.wd.past { opacity: .6; }
.wd-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wd-empty { color: var(--muted); padding: 10px 0 4px; font-size: 0.95rem; }
.wd-add { align-self: flex-start; color: var(--accent); font-weight: 700; font-size: 0.9rem; padding: 4px 0; }
#week-label { font-size: 1.5rem; }

/* Sélecteur de plusieurs jours */
.picker { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px 8px 12px; }
.picker-nav { display: flex; align-items: center; justify-content: space-between; }
.picker-nav .month-name { font-size: 1.1rem; }
.picker .cal { border: 0; padding: 0; background: transparent; gap: 3px; }
.picker .cal-day { aspect-ratio: 1 / 0.85; }
.picker .cal-day .n { font-size: 0.98rem; }
.picker-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 6px 0; font-size: 0.9rem; color: var(--muted); }
.picker-sum button { color: var(--accent); font-weight: 700; }

input::-webkit-date-and-time-value { text-align: left; }
input[type="date"].field, input[type="time"].field { display: block; min-height: 50px; }

/* ---- Passe de finition ---- */
body { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--bg)) 0, var(--bg) 300px) no-repeat, var(--bg); }
.head { padding-top: calc(28px + env(safe-area-inset-top)); padding-bottom: 18px; }
h1 { font-size: 2rem; }
.eyebrow { color: var(--accent); }
.nav-pill { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: 0 2px 8px rgba(22,33,58,.06); }
.np-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.np-btn:active { background: var(--surface2); }
.np-btn.round { background: var(--surface); border: 1px solid var(--line); }
.np-today { padding: 0 12px; height: 40px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: var(--accent); }
.np-today:active { background: var(--surface2); }
.chips.scroll { margin-bottom: 16px; padding-bottom: 2px; }
.banner { margin-bottom: 16px; }
.cal { border-radius: 24px; box-shadow: 0 6px 22px rgba(22,33,58,.07); padding: 14px 10px 16px; gap: 5px; }
.cal-dow { padding: 2px 0 6px; }
.cal-day { border-radius: 15px; aspect-ratio: 1 / 1.08; }
.cal-day .n { font-size: 1.05rem; }
.cal-day.selected { background: var(--accent); color: var(--on-accent); }
.cal-day.selected.today .n { color: var(--on-accent); }
.cal-day.selected.today::after { background: var(--on-accent); }
.cal-day.selected .dots i { box-shadow: 0 0 0 1.5px var(--accent); }
.dots { height: 8px; gap: 3px; }
.dots i { width: 7px; height: 7px; }
.cal-day.today:not(.selected) { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.day-panel { margin-top: 24px; gap: 12px; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.day-title { font-size: 1.3rem; }
.day-count { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.empty-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 12px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 20px; }
.empty-ico { font-size: 1.8rem; }
.day-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; background: var(--open-bg); border: 2px dashed var(--open); font-weight: 700; font-size: 0.95rem; }
.day-add .i { width: 18px; height: 18px; color: var(--open); }
.ev { border-radius: 20px; box-shadow: 0 2px 10px rgba(22,33,58,.05); padding: 15px; }
.ev .t { font-size: 1.15rem; }
.row { border-radius: 18px; box-shadow: 0 2px 10px rgba(22,33,58,.04); }
.tab-btn { position: relative; padding-top: 10px; }
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after { content: ''; position: absolute; top: -9px; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); }
.fab { background: var(--accent); color: var(--on-accent); border-radius: 22px; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 45%, transparent); }
.fab.wide { border-radius: 999px; }
.sec { margin-top: 30px; }
.wd.today .wd-date b { background: var(--accent); color: var(--on-accent); }
.wd { padding: 14px 0; }
.wd-date b { font-size: 1.7rem; }
.month-bar { margin: 4px 0 12px; }
.month-name { font-size: 1.5rem; }

.day-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.today-link { color: var(--accent); }
