/* ================================================================
   Familieagenda – mobiele web-app
   ================================================================ */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --line: #e4e2dc;
  --line-soft: #eeede8;
  --text: #1d1c1a;
  --text-2: #5f5d58;
  --text-3: #8f8c85;
  --accent: #2f5bd3;
  --accent-rgb: 47, 91, 211;
  --accent-ink: #ffffff;
  --danger: #c2372e;
  --now: #e0452f;
  --shadow: 0 1px 2px rgba(20, 18, 12, .06), 0 6px 24px rgba(20, 18, 12, .08);
  --radius: 14px;
  --hour: 52px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --surface: #1f1f24;
    --surface-2: #2a2a30;
    --line: #34343b;
    --line-soft: #2a2a30;
    --text: #f1f0ec;
    --text-2: #b4b2ab;
    --text-3: #807e78;
    --accent: #7c9cff;
    --accent-rgb: 124, 156, 255;
    --accent-ink: #0d1430;
    --danger: #ff6b5e;
    --now: #ff6a52;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.35;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 18px; height: 18px; }

/* ---------- boot ---------- */
.boot { height: 100vh; display: grid; place-items: center; }
.boot-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); opacity: .85; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .5; } }

/* ---------- app shell ---------- */
.shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar {
  padding: calc(var(--safe-top) + 8px) 12px 0;
  background: var(--bg);
  position: relative; z-index: 5;
}
.topbar-row { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.title-btn { font-size: 21px; font-weight: 700; letter-spacing: -.02em; padding: 4px 4px; text-align: left; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-btn small { font-weight: 500; color: var(--text-3); font-size: 15px; margin-left: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); }
.icon-btn.nav { width: 34px; }
.icon-btn[hidden] { display: none; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.today-btn { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff; flex: none; margin-left: 4px;
}

.seg { display: flex; background: var(--surface-2); border-radius: 11px; padding: 3px; margin: 8px 0 0; }
.seg button { flex: 1; height: 32px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 10px; margin: 0 -12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; white-space: nowrap; flex: none;
}
.chip .dot { width: 12px; height: 12px; border-radius: 50%; }
.chip[aria-pressed="false"] { opacity: .45; background: transparent; }
.chip.all { padding: 0 12px; }
.chip.all[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.main { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.view.pad-bottom { padding-bottom: calc(96px + var(--safe-bottom)); }

.fab {
  position: fixed; right: 18px; bottom: calc(18px + var(--safe-bottom)); z-index: 20;
  width: 58px; height: 58px; border-radius: 18px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(47, 91, 211, .35);
}
.fab svg { width: 28px; height: 28px; stroke-width: 2.4; }
.fab:active { transform: scale(.95); }

.offline-bar { background: #b45309; color: #fff; font-size: 13px; text-align: center; padding: 4px; }

/* ---------- event colours ---------- */
.ev {
  --c: #888; --tint: rgba(136,136,136,.18);
  position: relative; background: var(--tint); border-radius: 8px; overflow: hidden;
  color: var(--text); text-align: left; display: block; width: 100%;
}
.ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--strip, var(--c)); }
.ev.busy { background: repeating-linear-gradient(135deg, var(--tint) 0 6px, transparent 6px 12px); color: var(--text-2); }
.ev .t { font-weight: 600; }

/* ---------- list view ---------- */
.day-group { padding: 0 12px; }
.day-head {
  position: sticky; top: 0; z-index: 2; background: var(--bg);
  padding: 14px 4px 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3);
  display: flex; gap: 8px; align-items: baseline;
}
.day-head.today { color: var(--accent); }
.day-head .rel { text-transform: none; letter-spacing: 0; font-weight: 600; }
.list-item { display: flex; gap: 12px; padding: 12px 12px 12px 16px; margin-bottom: 6px; border-radius: 12px; align-items: flex-start; }
.list-item .time { width: 54px; flex: none; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text-2); line-height: 1.3; }
.list-item .time b { color: var(--text); font-weight: 600; display: block; }
.list-item .body { min-width: 0; flex: 1; }
.list-item .t { font-size: 16px; display: block; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { font-size: 13px; color: var(--text-2); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.who { display: inline-flex; gap: 3px; align-items: center; }
.who i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.list-empty { text-align: center; padding: 48px 24px; color: var(--text-3); }
.list-empty b { display: block; color: var(--text-2); font-size: 17px; margin-bottom: 4px; }
.more-btn { display: block; margin: 16px auto; padding: 10px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }

/* ---------- lijst: selecteren voor bulk-toewijzing ---------- */
.list-toolbar { display: flex; justify-content: flex-end; padding: 2px 16px 4px; }
.list-item.selecting { padding-left: 16px; }
.sel-box {
  flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface);
}
.sel-box.on { background: var(--accent); border-color: var(--accent); }
.sel-box.on::after { content: "✓"; display: block; color: var(--accent-ink); font-size: 13px; font-weight: 700; text-align: center; line-height: 18px; }
.ev.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.select-bar {
  position: fixed; left: 16px; right: 16px; bottom: calc(18px + var(--safe-bottom)); z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border-radius: 14px; padding: 10px 10px 10px 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 14px; font-weight: 600;
}

/* ---------- time grid (day / week) ---------- */
.tg { display: flex; flex-direction: column; height: 100%; }
.tg-head { display: flex; background: var(--bg); border-bottom: 1px solid var(--line); flex: none; }
.tg-gutter { width: 44px; flex: none; }
.tg-days { display: flex; flex: 1; min-width: 0; }
.tg-dayhead { flex: 1; min-width: 0; text-align: center; padding: 4px 0 6px; }
.tg-dayhead .dn { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-3); letter-spacing: .03em; }
.tg-dayhead .dd { font-size: 18px; font-weight: 600; width: 32px; height: 32px; line-height: 32px; margin: 2px auto 0; border-radius: 50%; }
.tg-dayhead.today .dd { background: var(--accent); color: var(--accent-ink); }
.tg-dayhead.today .dn { color: var(--accent); }
.tg-allday { display: flex; border-bottom: 1px solid var(--line); flex: none; max-height: 30%; overflow-y: auto; }
.tg-allday .tg-gutter { font-size: 10px; color: var(--text-3); text-align: right; padding: 6px 6px 0 0; }
.tg-allday-cols { flex: 1; display: flex; min-width: 0; }
.tg-allday-col { flex: 1; min-width: 0; padding: 3px 1px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-soft); }
.tg-allday-col .ev { font-size: 12px; padding: 3px 4px 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-scroll { flex: 1; overflow-y: auto; position: relative; -webkit-overflow-scrolling: touch; }
.tg-body { display: flex; position: relative; height: calc(var(--hour) * 24); }
.tg-hours { width: 44px; flex: none; position: relative; }
.tg-hours span { position: absolute; right: 6px; font-size: 11px; color: var(--text-3); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.tg-cols { flex: 1; display: flex; position: relative; min-width: 0;
  background-image: linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 100% var(--hour);
}
.tg-col { flex: 1; position: relative; border-left: 1px solid var(--line-soft); min-width: 0; }
.tg-col.today { background: rgba(47, 91, 211, .04); }
.tg-col .ev { position: absolute; padding: 3px 4px 3px 8px; font-size: 12px; line-height: 1.25; border: 1px solid var(--bg); }
.tg-col .ev .t { display: block; overflow: hidden; text-overflow: ellipsis; }
.tg-col .ev .tm { font-size: 11px; color: var(--text-2); }
.week .tg-col .ev { padding: 2px 2px 2px 6px; font-size: 11px; }
.week .tg-col .ev .tm { display: none; }
.week .tg-col .ev::before { width: 3px; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--now); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--now); }

/* ---------- month ---------- */
.month { display: flex; flex-direction: column; min-height: 100%; }
.m-dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 4px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; text-align: center; letter-spacing: .03em; }
.m-dow div { padding: 4px 0; }
.m-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(64px, 1fr); padding: 0 4px; gap: 1px; background: var(--line-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.m-cell { background: var(--bg); padding: 3px 2px; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.m-cell.other { opacity: .4; }
.m-cell .n { font-size: 13px; font-weight: 600; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; margin: 0 auto 1px; flex: none; }
.m-cell.today .n { background: var(--accent); color: var(--accent-ink); }
.m-cell.picked { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); border-radius: 6px; }
.m-cell .ev { font-size: 10px; line-height: 1.3; padding: 1px 2px 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.m-cell .ev::before { width: 3px; }
.m-cell .more { font-size: 10px; color: var(--text-3); padding-left: 3px; }
.m-daylist { padding: 4px 0 0; }

/* ---------- sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 10, 12, .38); z-index: 40; opacity: 0; transition: opacity .22s ease; }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; max-height: 92dvh;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  max-width: 640px; margin: 0 auto;
}
.sheet.open { transform: none; }
.sheet.full { height: 92vh; height: 92dvh; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 18px; flex: none; }
.sheet-head h2 { flex: 1; font-size: 18px; margin: 0; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 4px 18px calc(20px + var(--safe-bottom)); -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 10px; padding: 10px 18px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line-soft); flex: none; }

/* ---------- forms ---------- */
.field { margin: 14px 0; }
.field > label, .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.inp, .sel, textarea.inp {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 16px; outline: none;
  appearance: none; -webkit-appearance: none; min-height: 46px;
}
.inp:focus, .sel:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 211, .18); }
.inp.big { font-size: 20px; font-weight: 600; border: 0; background: transparent; padding: 8px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.inp.big:focus { box-shadow: none; }
textarea.inp { min-height: 80px; resize: vertical; }
.sel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f8c85' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
.row .time-inp { flex: 0 0 124px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.switch-row span { font-size: 15px; }
.switch-row small { display: block; font-size: 12px; color: var(--text-3); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 15px; transition: background .2s; }
.switch i::after { content: ""; position: absolute; width: 26px; height: 26px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: #34c759; }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(47, 91, 211, .35); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick .chip { height: 36px; }
.pick .chip[aria-pressed="true"] { background: var(--tint); border-color: var(--c); opacity: 1; }
.pick .chip[aria-pressed="false"] { opacity: .6; }
.seg.form { margin: 0; }
.seg.form button { font-size: 13px; height: 34px; }
.hint { font-size: 13px; color: var(--text-3); margin-top: 6px; line-height: 1.4; }
.note { font-size: 13px; background: var(--surface-2); color: var(--text-2); padding: 10px 12px; border-radius: 10px; margin: 10px 0; line-height: 1.4; }

.btn { height: 48px; border-radius: 13px; font-weight: 700; font-size: 16px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.sheet-foot .btn.primary { flex: 1; }
.btn.ghost { background: var(--surface-2); }
.btn.danger { color: var(--danger); background: var(--surface-2); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.link-btn { color: var(--accent); font-weight: 600; font-size: 14px; padding: 6px 0; }

/* ---------- detail ---------- */
.detail-band { height: 6px; border-radius: 3px; margin: 2px 0 12px; }
.detail h3 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.detail .when { color: var(--text-2); font-size: 15px; }
.d-row { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 15px; align-items: flex-start; }
.d-row:first-of-type { border-top: 0; }
.d-row svg { color: var(--text-3); margin-top: 1px; }
.d-row .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.d-desc { white-space: pre-wrap; }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 3px 10px 3px 4px; background: var(--surface-2); border-radius: 14px; }
.person .avatar { width: 22px; height: 22px; font-size: 11px; margin: 0; }

/* ---------- settings ---------- */
.set-section { margin: 18px 0 8px; }
.set-section h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 0 0 8px; }
.card { background: var(--bg); border-radius: 14px; overflow: hidden; }
.card-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-soft); width: 100%; text-align: left; min-height: 52px; }
.card-row:first-child { border-top: 0; }
.card-row .grow { flex: 1; min-width: 0; }
.card-row .grow small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.card-row .chev { color: var(--text-3); }
.cal-item { padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.cal-item:first-child { border-top: 0; }
.cal-top { display: flex; align-items: center; gap: 10px; }
.cal-top .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.cal-top .grow { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.cal-top .grow small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; }
.cal-opts { margin-top: 10px; display: grid; gap: 10px; }
.cal-opts .sel { min-height: 40px; padding: 8px 32px 8px 10px; font-size: 14px; }
.err-text { color: var(--danger); font-size: 12px; margin-top: 4px; }
.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.colors button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; }
.colors button[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 2px var(--surface); }
.colors label { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; position: relative; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.colors label input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- login ---------- */
.login {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px); max-width: 420px; margin: 0 auto;
  position: relative; isolation: isolate;
}
.login::before {
  content: ""; position: fixed; inset: 0; z-index: -1; background: var(--bg);
  background-image:
    radial-gradient(55% 45% at 18% 12%, rgba(var(--accent-rgb), .22), transparent 60%),
    radial-gradient(50% 42% at 88% 88%, rgba(var(--accent-rgb), .16), transparent 65%);
  background-size: 160% 160%, 160% 160%;
  background-repeat: no-repeat;
  animation: loginDrift 16s ease-in-out infinite alternate;
}
@keyframes loginDrift {
  0%   { background-position: 0% 0%, 100% 100%; }
  100% { background-position: 25% 18%, 75% 82%; }
}
@media (prefers-reduced-motion: reduce) {
  .login::before { animation: none; }
  .login > * { animation: none !important; }
}
.login > * { animation: loginRise .5s cubic-bezier(.22, 1, .36, 1) both; }
.login h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 4px; animation-delay: .02s; }
.login p.lead { color: var(--text-2); margin: 0 0 24px; animation-delay: .07s; }
.login > form { animation-delay: .12s; }
.login > .link-btn { animation-delay: .22s; }
.login > .profiles { animation-delay: .07s; }
.login > .login-who { animation-delay: .02s; }
@keyframes loginRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 16px; margin-bottom: 20px; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.profile .avatar { width: 72px; height: 72px; font-size: 28px; margin: 0; box-shadow: var(--shadow); transition: transform .15s ease; }
.profile:active .avatar { transform: scale(.92); }
.pin-wrap { position: relative; }
.pin-wrap .icon-btn { position: absolute; right: 4px; top: 3px; font-size: 13px; font-weight: 700; width: auto; padding: 0 10px; }
.login .err { background: rgba(194, 55, 46, .12); color: var(--danger); padding: 10px 12px; border-radius: 10px; margin-top: 12px; font-size: 14px; }
.login-who { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-who .avatar { width: 52px; height: 52px; font-size: 22px; margin: 0; }
.login-who b { font-size: 20px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translate(-50%, 20px); z-index: 60;
  background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--danger); color: #fff; }

@media (min-width: 720px) {
  .shell { max-width: 1100px; margin: 0 auto; }
  .m-grid { grid-auto-rows: minmax(96px, 1fr); }
  .m-cell .ev { font-size: 12px; }
  .week .tg-col .ev { font-size: 12px; }
  .week .tg-col .ev .tm { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
