:root {
  --bg: #f5f3ec;
  --surface: #ffffff;
  --surface-2: #efece3;
  --text: #1d2721;
  --muted: #69736d;
  --line: #e2ddd0;
  --brand: #1f7a4d;
  --brand-strong: #17603c;
  --brand-ink: #ffffff;
  --brand-soft: #e2f0e7;
  --accent: #e2702a;
  --danger: #c23b30;
  --danger-soft: #fbe6e3;
  --warn: #a8690f;
  --warn-soft: #fdf0d6;
  --up: #c23b30;
  --down: #1f7a4d;
  --wa: #1fa855;
  --shadow: 0 1px 2px rgba(30, 40, 30, .05), 0 6px 18px rgba(30, 40, 30, .06);
  --radius: 18px;
  --font: 'Hind Siliguri', 'Noto Sans Bengali', 'Nirmala UI', 'Vrinda', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613;
    --surface: #1a211d;
    --surface-2: #232b26;
    --text: #e8ede9;
    --muted: #98a39c;
    --line: #2d3731;
    --brand: #43b27a;
    --brand-strong: #5cc38f;
    --brand-ink: #0b1a11;
    --brand-soft: #1c3427;
    --accent: #f0904f;
    --danger: #ef6f63;
    --danger-soft: #3a1f1c;
    --warn: #e6ac4a;
    --warn-soft: #3a2e17;
    --up: #ef6f63;
    --down: #43b27a;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111613;
  --surface: #1a211d;
  --surface-2: #232b26;
  --text: #e8ede9;
  --muted: #98a39c;
  --line: #2d3731;
  --brand: #43b27a;
  --brand-strong: #5cc38f;
  --brand-ink: #0b1a11;
  --brand-soft: #1c3427;
  --accent: #f0904f;
  --danger: #ef6f63;
  --danger-soft: #3a1f1c;
  --warn: #e6ac4a;
  --warn-soft: #3a2e17;
  --up: #ef6f63;
  --down: #43b27a;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { border-radius: 9px; flex: none; }
.brand-name { font-weight: 700; font-size: 18px; line-height: 1.1; }
.brand-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.top-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--text); text-decoration: none;
}
.icon-btn:active { background: var(--surface-2); }

.sync {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.sync::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.sync.busy::before { background: var(--accent); animation: pulse 1s infinite alternate; }
.sync.off::before { background: var(--muted); }
@keyframes pulse { to { opacity: .3; } }

.view {
  max-width: 600px; margin: 0 auto;
  padding: 14px 16px calc(110px + env(safe-area-inset-bottom));
}

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0; font-size: 12px; color: var(--muted); text-decoration: none;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--brand); font-weight: 600; }
.add-dot {
  display: grid; place-items: center; width: 44px; height: 44px; margin-top: -20px;
  border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
}
.add-dot svg { width: 22px !important; height: 22px !important; }
body.guest .tabs, body.guest .top-right a { display: none; }

/* ---------- building blocks ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 14px;
}
.card h3 { font-size: 16px; margin-bottom: 10px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .btn { flex: 1; }
.stack > * + * { margin-top: 10px; }
.section-title {
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  margin: 20px 4px 8px; display: flex; justify-content: space-between; gap: 8px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 14px; border-radius: 14px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: none; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input, .field input, .field select {
  width: 100%; min-height: 50px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--surface); outline: none;
}
.input:focus, .field input:focus, .field select:focus { border-color: var(--brand); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; cursor: pointer; white-space: nowrap;
}
.chip:active { background: var(--surface-2); }
.chip.in { background: var(--brand-soft); border-color: transparent; color: var(--brand-strong); font-weight: 600; }
.chip.in::before { content: '✓'; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .big { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.empty p { margin: 0 0 16px; }

/* ---------- welcome ---------- */
.hero { text-align: center; padding: 26px 8px 8px; }
.hero img { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); }
.hero h1 { font-size: 30px; margin: 14px 0 6px; }
.hero p { color: var(--muted); margin: 0 auto 22px; max-width: 26em; }
.features { list-style: none; padding: 0; margin: 22px 0 0; }
.features li { display: flex; gap: 12px; padding: 10px 2px; align-items: flex-start; }
.features li b { display: block; }
.features .fi {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); font-size: 19px;
}
.back { margin-bottom: 12px; }
.peek { min-height: 22px; font-size: 14px; margin: -6px 0 12px; }
.peek.ok { color: var(--brand-strong); font-weight: 600; }
.peek.bad { color: var(--danger); }

/* ---------- home ---------- */
.total-card {
  background: var(--brand); color: var(--brand-ink); border: 0;
  background-image: radial-gradient(circle at 100% 0, rgba(255,255,255,.16), transparent 55%);
}
.total-card .label { opacity: .85; font-size: 14.5px; }
.total-card .amount { font-size: 40px; font-weight: 700; line-height: 1.15; margin: 4px 0 6px; letter-spacing: -.5px; }
.total-card .cmp { font-size: 14px; opacity: .92; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.18); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.grid2 .card { margin: 0; }
.stat .k { font-size: 13.5px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; line-height: 1.3; }
a.stat { text-decoration: none; color: inherit; display: block; }

.banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 14px;
  background: var(--warn-soft); color: var(--warn); font-size: 14.5px; font-weight: 500;
}
.banner.over { background: var(--danger-soft); color: var(--danger); }

.meter { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.meter > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter.warn > i { background: var(--warn); }
.meter.over > i { background: var(--danger); }

.bars { display: grid; gap: 12px; }
.bar-row .top-line { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.bar-row .top-line b { font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); margin-top: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; }

.day-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.day-row:first-of-type { border-top: 0; }

/* ---------- list ---------- */
.summary {
  position: sticky; top: calc(61px + env(safe-area-inset-top)); z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 16px; margin: -2px 0 6px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.summary .k { font-size: 13px; color: var(--muted); }
.summary .v { font-size: 21px; font-weight: 700; line-height: 1.2; }

.items { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.item { display: flex; align-items: center; gap: 4px; padding: 4px 12px 4px 4px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.tick {
  flex: none; width: 52px; height: 52px; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.tick::before {
  content: ''; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--muted); box-sizing: border-box;
}
.tick.on::before {
  border-color: var(--brand); background: var(--brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.info { flex: 1; min-width: 0; padding: 9px 0; cursor: pointer; }
.info .name { font-weight: 600; font-size: 16.5px; }
.info .meta { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .right { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.item .right b { display: block; font-size: 16px; color: var(--text); }
.item.done .name { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.qty-badge { display: inline-block; font-weight: 600; color: var(--brand-strong); }

/* ---------- add ---------- */
.search { display: flex; gap: 8px; margin-bottom: 8px; }
.search .input { flex: 1; min-height: 52px; font-size: 17px; }
.search .btn { min-height: 52px; }
.sugg { margin-bottom: 6px; }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 600px;
  max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .22s ease-out;
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 2px auto 14px; }
.sheet h3 { font-size: 20px; margin-bottom: 14px; }
.sheet h3 small { font-size: 15px; font-weight: 500; color: var(--muted); }

.money { display: flex; align-items: center; gap: 8px; border: 2px solid var(--brand); border-radius: 16px; padding: 4px 14px; margin-bottom: 12px; }
.money span { font-size: 28px; font-weight: 700; color: var(--muted); }
.money input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 32px; font-weight: 700; padding: 6px 0; }

.qty { display: flex; gap: 8px; margin-bottom: 12px; }
.qty button { width: 54px; min-height: 52px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 24px; font-weight: 600; cursor: pointer; }
.qty input { flex: 1; min-width: 0; text-align: center; font-size: 22px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface); outline: none; }
.qty input:focus { border-color: var(--brand); }
.units { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.unit input { position: absolute; opacity: 0; pointer-events: none; }
.unit span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 14.5px; cursor: pointer; }
.unit input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.unit input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- reports ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.month-nav h2 { font-size: 19px; }
.month-nav button { width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; }
.month-nav button[disabled] { opacity: .35; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kpis div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.kpis .k { font-size: 12.5px; color: var(--muted); }
.kpis .v { font-size: 16px; font-weight: 700; }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
details.day { border-top: 1px solid var(--line); }
details.day:first-of-type { border-top: 0; }
details.day summary { list-style: none; display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; cursor: pointer; }
details.day summary::-webkit-details-marker { display: none; }
details.day summary::after { content: '›'; color: var(--muted); transition: transform .15s; margin-left: 6px; }
details.day[open] summary::after { transform: rotate(90deg); }
.day-items { padding: 0 0 12px; }
.day-items div { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; padding: 3px 0; }

/* ---------- family ---------- */
.code { font-size: 40px; font-weight: 700; letter-spacing: 6px; margin: 2px 0 14px; font-variant-numeric: tabular-nums; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.member:first-of-type { border-top: 0; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--brand-soft); color: var(--brand-strong); }
.member .who { flex: 1; min-width: 0; }
.badge { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-left: 4px; font-weight: 600; }
.badge.owner { background: var(--warn-soft); color: var(--warn); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); padding: 4px; border-radius: 13px; gap: 4px; }
.seg button { border: 0; background: none; min-height: 40px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); font-weight: 700; }

/* ---------- badges & status pills ---------- */
.nbadge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
}
.has-badge { position: relative; }
.has-badge > .nbadge { position: absolute; top: 0; right: calc(50% - 26px); }
.icon-btn.has-badge > .nbadge { top: 6px; right: 6px; }
.nbadge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; font-size: 0; border: 2px solid var(--bg); box-sizing: content-box; }
.nbadge.inline { display: inline-block; vertical-align: middle; margin-left: 4px; }
.st { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.st.ok { background: var(--brand-soft); color: var(--brand-strong); }
.st.bad { background: var(--danger-soft); color: var(--danger); }
.st.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- messenger (family chat, support) ---------- */
body.chat-mode .view { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.chat-list { display: flex; flex-direction: column; gap: 3px; }
.day-sep { text-align: center; margin: 14px 0 8px; }
.day-sep span { font-size: 12.5px; color: var(--muted); background: var(--surface-2); padding: 3px 12px; border-radius: 99px; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble {
  max-width: 80%; padding: 7px 12px 5px; border-radius: 18px 18px 18px 6px;
  background: var(--surface); border: 1px solid var(--line); font-size: 15.5px; line-height: 1.45;
  overflow-wrap: anywhere; box-shadow: var(--shadow);
}
.msg.mine .bubble { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); border-radius: 18px 18px 6px 18px; }
.msg.mine .bubble a { color: inherit; }
.msg.pending .bubble { opacity: .7; }
.bubble .who { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 1px; }
.bubble .time { font-size: 11px; opacity: .65; text-align: right; margin-top: 1px; }
.msg + .msg:not(.mine) .bubble, .msg.mine + .msg.mine .bubble { margin-top: 0; }

.composer {
  position: fixed; left: 0; right: 0; z-index: 15;
  bottom: calc(64px + env(safe-area-inset-bottom));
  max-width: 600px; margin: 0 auto; padding: 8px 12px;
  display: flex; align-items: flex-end; gap: 8px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.composer textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: 140px; resize: none;
  padding: 11px 16px; border-radius: 23px; border: 1.5px solid var(--line); background: var(--surface);
  outline: none; line-height: 1.4;
}
.composer textarea:focus { border-color: var(--brand); }
.composer-send, .composer-extra {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
}
.composer-send { background: var(--brand); color: var(--brand-ink); }
.composer-extra { background: var(--surface-2); font-size: 20px; }
.support-intro b { display: block; margin-bottom: 2px; }

/* ---------- menu & link cards ---------- */
.menu { padding: 4px 16px; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 13px 0; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.menu a:first-child { border-top: 0; }
.menu a > span:first-child { font-size: 20px; width: 26px; text-align: center; }
.menu a b { font-weight: 600; }
.menu a i { margin-left: auto; font-style: normal; color: var(--muted); font-size: 20px; }
.link-card { display: flex !important; gap: 12px; align-items: center; }
.link-card .lc-icon { font-size: 26px; }
.link-card .lc-arrow { margin-left: auto; color: var(--muted); font-size: 22px; }

/* ---------- newsletter ---------- */
.news-hero { text-align: center; }
.news-hero .news-icon { font-size: 40px; line-height: 1; }
.news-hero h2 { font-size: 22px; margin: 6px 0 4px; }
.news-hero p { margin: 0 0 14px; }
.news-hero form { text-align: left; }
.sub-ok { background: var(--brand-soft); color: var(--brand-strong); padding: 10px 14px; border-radius: 12px; font-weight: 600; margin-bottom: 12px; font-size: 14.5px; }
details.news-item summary { list-style: none; cursor: pointer; display: grid; gap: 4px; }
details.news-item summary::-webkit-details-marker { display: none; }
details.news-item summary b { font-size: 17px; }
details.news-item[open] summary { margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.news-body { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.news-body h3 { font-size: 17px; margin: 16px 0 6px; color: var(--brand-strong); }
.news-body p { margin: 8px 0; }
.news-body ul { margin: 6px 0; padding-left: 22px; }
.news-body li { margin: 3px 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 14px;
  background: #1d2721; color: #fff; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: opacity .18s, transform .18s;
}
:root[data-theme="dark"] .toast { background: #e8ede9; color: #111613; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #e8ede9; color: #111613; } }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { background: none; border: 0; color: #7fdcaa; font-weight: 700; cursor: pointer; padding: 0; }
:root[data-theme="dark"] .toast button { color: #17603c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast button { color: #17603c; } }
body.guest .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

@media (min-width: 640px) {
  .view { padding-top: 22px; }
}

@media print {
  .top, .tabs, .no-print, .toast, .sheet-wrap { display: none !important; }
  body { background: #fff; color: #000; }
  .view { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  details.day > :not(summary) { display: block !important; }
}
