:root {
  --bg: #f8f4ee;
  --surface: #ffffff;
  --surface-2: #f2ece3;
  --line: #e4dcd0;
  --text: #2a2826;
  --muted: #625c55;
  --primary: #2d6e69;
  --primary-ink: #ffffff;
  --primary-soft: #dcece9;
  --accent: #a8562f;
  --accent-soft: #f6e3d6;
  --set-a: #2d6e69;
  --set-a-soft: #e1efec;
  --set-b: #6b4a7c;
  --set-b-soft: #eee6f2;
  --m1: #2d6e69;
  --m1-soft: #d9ebe8;
  --m2: #9a4f2c;
  --m2-soft: #f5e1d5;
  --ok: #3f7a3a;
  --warn: #9a6a00;
  --warn-soft: #fbf0d4;
  --danger: #a8352b;
  --danger-soft: #f8e0dc;
  --focus: #1f5fbf;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60, 45, 30, .06), 0 4px 14px rgba(60, 45, 30, .06);
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font);
  min-height: 100vh;
}
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
.h1 { font-size: 1.55rem; font-weight: 700; }
.h2 { font-size: 1.15rem; font-weight: 700; }
.h3 { font-size: 1rem; font-weight: 700; margin: 1.2em 0 .5em; }
.h-small { font-size: .9rem; font-weight: 700; margin: 1em 0 .35em; color: var(--muted); text-transform: none; }
.h-small.is-today { color: var(--primary); }
.inline { display: inline; }
p { margin: .35em 0 .7em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5em 1em; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: rgba(248, 244, 238, .94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; flex: 1; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { font-size: 1.3rem; }
main#view { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; outline: none; }
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px; text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 600;
}
.tab-icon { font-size: 1.3rem; line-height: 1; filter: grayscale(.4); }
.tab.active { color: var(--primary); }
.tab.active .tab-icon { filter: none; }
.tab.active::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.badge {
  position: absolute; top: 6px; right: calc(50% - 22px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: .72rem; display: grid; place-items: center;
}
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 220px 1fr; max-width: 1180px; margin: 0 auto; }
  .tabbar { position: sticky; top: 64px; align-self: start; display: flex; flex-direction: column; border: 0; background: transparent; padding: 16px 8px; gap: 4px; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 16px; min-height: 48px; border-radius: 12px; font-size: .95rem; }
  .tab.active { background: var(--primary-soft); }
  .tab.active::before { display: none; }
  .badge { position: static; margin-left: auto; }
  main#view { padding-bottom: 48px; max-width: 860px; margin: 0; }
}

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card.attention { border-color: #e2b98f; background: #fffaf3; }
.note-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--primary-soft); border-color: #bfd9d4; }
.hero { background: linear-gradient(135deg, #e3f0ed, #f7efe4); border-color: #d6e3dd; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; color: var(--primary); margin: 0 0 .3em; }
.hero-sets { display: flex; flex-direction: column; gap: 2px; }
.page-head { margin: 4px 0 14px; }
.back { display: inline-block; margin-bottom: 8px; text-decoration: none; font-weight: 600; min-height: 32px; }
.note { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.note-warn { background: var(--warn-soft); }
.note-warn-text { color: var(--warn); }
.error-text { color: var(--danger); }
.form-error { color: var(--danger); font-weight: 600; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.empty { text-align: center; padding: 22px 10px; color: var(--muted); }
.empty-icon { font-size: 2rem; }
.empty-title { font-weight: 700; color: var(--text); margin: .2em 0; }
.splash { display: grid; place-items: center; min-height: 100vh; font-weight: 700; color: var(--primary); }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 8px; }
.row.end { align-items: flex-end; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 6px 0; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #245c58; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--primary); }
.btn-danger { color: var(--danger); border-color: #e7c2bd; }
.btn-small { min-height: 40px; padding: 0 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; min-width: var(--tap); min-height: var(--tap); border: 0; background: transparent;
  border-radius: 12px; font-size: 1.15rem; cursor: pointer; color: var(--text); text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); }
.kid-btn { width: auto; padding: 0 10px; gap: 4px; display: inline-flex; align-items: center; font-size: .9rem; font-weight: 600; }
@media (max-width: 380px) { .kid-name { display: none; } }
.link-btn { border: 0; background: none; color: var(--primary); font-size: 1rem; cursor: pointer; min-width: 36px; min-height: 36px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid #cfc5b7; border-radius: 10px;
  min-height: var(--tap); padding: 8px 12px; width: 100%;
}
textarea { min-height: 72px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--primary); margin: 0; }
.check-label { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; min-height: 40px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
legend { font-weight: 700; padding: 0 4px; }
.pills, .weekdays { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { flex-direction: row; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 40px; font-weight: 500; background: var(--surface); }
.pill:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
details.more { margin-top: 8px; }
details.more > summary, details > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 600; color: var(--primary); }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.segmented button {
  min-height: 40px; border: 0; background: transparent; border-radius: 9px; padding: 0 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
}
.segmented [aria-checked=true], .segmented [aria-selected=true] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.filterbar { margin: 4px 0 6px; }

/* ---------- Chips & tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 1px 9px 1px 2px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
.chip .avatar { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; color: #fff; }
.chip-m1 { background: var(--m1-soft); color: #1e4d49; }
.chip-m1 .avatar { background: var(--m1); }
.chip-m2 { background: var(--m2-soft); color: #6d3519; }
.chip-m2 .avatar { background: var(--m2); }
.chip-none { background: var(--surface-2); color: var(--muted); padding: 1px 9px; }
.chip .you { font-weight: 500; opacity: .85; }
.set-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; border-radius: 6px; padding: 1px 7px; }
.set-a { background: var(--set-a-soft); color: var(--set-a); }
.set-b { background: var(--set-b-soft); color: var(--set-b); }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.tag-soft { background: var(--surface-2); }
.tag-in_progress { background: #e1ecfa; color: #24508f; }
.tag-needs_help, .tag-swap, .tag-pending { background: var(--warn-soft); color: #7a5300; }
.tag-rescheduled { background: #ece6f6; color: #5a3c87; }
.tag-skipped, .tag-cancelled { background: var(--surface-2); color: var(--muted); }
.tag-done, .tag-accepted { background: #e2f0de; color: #2f5f2a; }
.tag-declined { background: var(--danger-soft); color: var(--danger); }

/* ---------- Tasks ---------- */
.tasks, .shop-list, .templates { list-style: none; margin: 0; padding: 0; }
ul.tasks.card { padding: 4px 12px; }
.task, .shop-item, .template { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task:last-child, .shop-item:last-child, .template:last-child { border-bottom: 0; }
.task-main, .template-main { flex: 1; min-width: 0; }
.task-name { font-weight: 600; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .84rem; color: var(--muted); margin-top: 2px; align-items: center; }
.is-closed .task-name { color: var(--muted); }
.is-done .task-name { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.check {
  flex: none; width: var(--tap); height: var(--tap); border-radius: 50%; border: 2px solid #b7ab9b; background: var(--surface);
  display: grid; place-items: center; font-size: 1.25rem; font-weight: 800; color: #fff; cursor: pointer;
}
.check:hover { border-color: var(--primary); }
.check[aria-pressed=true] { background: var(--primary); border-color: var(--primary); }
.due-overdue { color: var(--danger); font-weight: 700; }
.due-due { color: var(--warn); font-weight: 700; }
.duebar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; max-width: 220px; }
.duebar span { display: block; height: 100%; border-radius: 3px; }
.duebar-later span { background: #6aa86b; }
.duebar-due span { background: #e3a21a; }
.duebar-overdue span { background: #d4553f; }
.resp-group { padding: 12px 14px; }
.resp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.resp-icon { font-size: 1.4rem; }
.resp-name { font-weight: 700; color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.resp-name:hover { text-decoration: underline; }
.done-means { margin: 0 0 10px; padding-left: 1.2em; }
.done-means li::marker { content: "✓  "; color: var(--primary); }

/* ---------- Plan tiles (room cards) ---------- */
.set-section { margin-bottom: 20px; }
.set-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.owners { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 12px; border-radius: var(--radius);
  text-decoration: none; color: #fff; border: 0; font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow);
}
.tile-a { background: linear-gradient(160deg, #3c857f, #2a645f); }
.tile-b { background: linear-gradient(160deg, #7d5a8f, #5e3f6f); }
.tile.off-season { filter: saturate(.25); opacity: .85; }
.tile-add { background: var(--surface); color: var(--primary); border: 2px dashed #c9bfb1; box-shadow: none; align-items: center; justify-content: center; }
.tile-top { display: flex; justify-content: space-between; gap: 6px; }
.tile-name { font-weight: 700; line-height: 1.2; }
.tile-icon { font-size: 2.2rem; line-height: 1; }
.tile-icon.big { font-size: 3rem; }
.tile-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.tile-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; flex: none; }
.dot-fine { background: #8fd18f; }
.dot-due { background: #ffc23d; }
.dot-overdue { background: #ff7a5c; }
.tile-progress .bar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.tile-progress .bar span { display: block; height: 100%; background: #fff; }
.tile .chip { background: rgba(255, 255, 255, .92); }
.detail-hero { display: flex; gap: 14px; align-items: center; color: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.detail-hero .set-badge { background: rgba(255, 255, 255, .9); }

/* ---------- Proposals ---------- */
.proposal { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; background: var(--surface); }
.proposal.for-me { border-color: #e2b98f; }
.proposal-summary { font-weight: 600; margin: 0 0 4px; }
.proposal-meta { font-size: .84rem; color: var(--muted); margin: 0 0 8px; }

/* ---------- Meals ---------- */
.weeknav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.weeklabel { font-weight: 700; min-width: 110px; text-align: center; }
.meal-days { display: grid; gap: 10px; }
@media (min-width: 900px) { .meal-days { grid-template-columns: 1fr 1fr; } }
.meal-day { margin: 0; padding: 12px; }
.meal-day.is-today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.meal-slot {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); padding: 10px 12px; min-height: 60px; font: inherit; color: inherit; cursor: pointer; margin-bottom: 6px;
}
.meal-slot.lunch { background: #f6f1e8; }
.meal-slot:hover { border-color: var(--primary); }
.meal-icon { font-size: 1.5rem; width: 32px; text-align: center; }
.meal-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.meal-title { font-weight: 700; }
.meal-today { display: grid; gap: 10px; margin-bottom: 8px; }
.meal-line { display: flex; gap: 10px; align-items: center; }
.ing-row { display: grid; grid-template-columns: 1fr 70px 70px 44px; gap: 6px; margin-bottom: 6px; }
.ings input { min-height: 44px; }
.review-row { border-bottom: 1px solid var(--line); padding: 10px 0; }
.merge { margin-top: 8px; }

/* ---------- Shopping ---------- */
.add-row { display: grid; grid-template-columns: 1fr 64px 76px auto; gap: 8px; align-items: end; }
@media (max-width: 420px) { .add-row { grid-template-columns: 1fr 1fr; } .add-row .grow { grid-column: 1 / -1; } .add-row .btn { grid-column: 1 / -1; } }
.qty-label { color: var(--muted); font-weight: 500; }
.shop-group { padding: 6px 14px; }
.shop-group .h3 { margin-top: .6em; }
.bought > summary { margin: 0; }

/* ---------- Rotation ---------- */
.owner-pair { display: grid; gap: 8px; margin: 8px 0; }
.owner-pair > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 8px 10px; }
.set-name { font-weight: 600; flex: 1; min-width: 120px; }
.next-rot { border-top: 1px dashed #c9bfb1; margin-top: 10px; padding-top: 8px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .timeline li { grid-template-columns: 150px 1fr auto; align-items: center; } }
.timeline li.is-current { background: var(--primary-soft); border-radius: 10px; padding: 10px; }
.tl-date { font-weight: 700; }
.tl-owners { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.timeline.past li { opacity: .85; grid-template-columns: 150px 1fr; }

/* ---------- Child ---------- */
.kid { background: linear-gradient(180deg, #fff6e0, #fdeee6); border-radius: 22px; padding: 18px 14px; margin-bottom: 14px; text-align: center; }
.kid-title { font-size: 1.7rem; margin: 0; }
.kid-sub { font-size: 1.1rem; margin: .2em 0 1em; }
.kid-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .kid-grid { grid-template-columns: repeat(3, 1fr); } }
.kid-tile {
  width: 100%; min-height: 150px; border: 3px solid #f0d9a8; background: #fff; border-radius: 22px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; font: inherit; cursor: pointer; padding: 10px; color: var(--text);
}
.kid-tile.is-done { border-color: #e7b416; background: #fff8d6; }
.kid-icon { font-size: 3rem; line-height: 1; }
.kid-label { font-weight: 700; font-size: 1rem; }
.kid-star { font-size: 1.6rem; color: #d9a400; }
.kid-week { font-size: 1.15rem; margin: 14px 0 0; }

/* ---------- Settings ---------- */
.link-list a { display: flex; align-items: center; gap: 8px; min-height: var(--tap); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.link-list a:last-child { border-bottom: 0; }
.invite-box { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-box input { flex: 1 1 220px; }
.answers dt { font-weight: 700; margin-top: 8px; }
.answers dd { margin: 2px 0 0; white-space: pre-wrap; }
.history { list-style: none; padding: 8px 14px; }
.history li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }

/* ---------- Sync status ---------- */
.sync { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; min-height: 36px; padding: 0 12px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sync .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.sync-saving .dot { background: #e3a21a; animation: pulse 1s infinite; }
.sync-offline { background: #efeae2; }
.sync-offline .dot { background: #8a8178; }
.sync-error { border-color: #e7c2bd; background: var(--danger-soft); color: var(--danger); }
.sync-error .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .sync-saving .dot { animation: none; } }
.outbox { list-style: none; padding: 0; }
.outbox li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }

/* ---------- Dialog sheet ---------- */
dialog.sheet {
  border: 0; padding: 0; width: min(560px, 100%); max-width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0;
  margin: auto auto 0; background: var(--surface); color: var(--text); box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
}
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: 20px; } }
dialog.sheet::backdrop { background: rgba(40, 30, 20, .42); }
.sheet-inner { display: flex; flex-direction: column; max-height: 92vh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 4px 18px; }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sheet-body { padding: 4px 18px 18px; overflow: auto; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 50; pointer-events: none; padding: 0 16px; }
.toast { background: #2f2b27; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; max-width: 520px; box-shadow: var(--shadow); }
.toast-error { background: var(--danger); }

/* ---------- Auth ---------- */
.auth { display: grid; place-items: start center; min-height: 100vh; padding: 24px 16px; }
.auth-card { width: min(440px, 100%); background: var(--surface); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.auth-card.wide { width: min(680px, 100%); }
.auth-brand { text-align: center; }
.logo-lg { font-size: 2.6rem; }
.tagline { color: var(--primary); font-weight: 600; }
