/* ============================================================
   Elvora by Le Rosie Switzerland — base system
   ============================================================ */

/* Local Devanagari face — bundled so Hindi stays offline.
   Static file: declare a single weight so bold/semibold requests
   synthesise from it instead of falling back to a missing glyph face. */
@font-face {
  font-family: "Noto Sans Devanagari Local";
  src: url("../assets/fonts/noto-sans-devanagari.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--desk);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

:root {
  --navy-900: #071528;
  --navy-800: #0b1f3b;
  --navy-700: #0d2444;
  --navy-600: #173c69;
  --navy-500: #23558f;
  --gold-600: #a9861c;
  --gold-500: #c9a227;
  --gold-400: #dfbd5b;
  --gold-200: #f3e3b0;
  --gold-100: #f8f0d6;

  --cream: #f7f3ea;
  --paper: #fffdf9;
  --paper-2: #fbf8f1;
  --desk: #e9e3d6;

  --ink: #0d1a2b;
  --ink-soft: #4a5a70;
  --ink-mute: #7d8899;

  --line: rgba(13, 36, 68, .10);
  --line-strong: rgba(13, 36, 68, .18);

  --ok: #1c7a58;
  --ok-bg: #e3f4ec;
  --warn: #9a6208;
  --warn-bg: #fdf1d8;
  --danger: #b3261e;
  --danger-bg: #fdeae7;
  --info: #1c5aa0;
  --info-bg: #e8f1fb;
  --violet: #6446a8;
  --violet-bg: #efeafc;
  --teal: #0f6f73;
  --teal-bg: #e2f4f3;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --shadow-xs: 0 1px 2px rgba(9, 24, 47, .05);
  --shadow-sm: 0 1px 2px rgba(9, 24, 47, .04), 0 6px 18px -12px rgba(9, 24, 47, .22);
  --shadow-md: 0 14px 40px -20px rgba(9, 24, 47, .38);
  --shadow-gold: 0 10px 26px -14px rgba(169, 134, 28, .65);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Sans Devanagari Local", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nirmala UI", "Noto Sans Devanagari Local", "Noto Sans Devanagari", Mangal, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --tabbar-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

[data-theme="dark"] {
  --cream: #0a1019;
  --paper: #111a28;
  --paper-2: #0d1520;
  --desk: #060b12;

  --ink: #e9eef7;
  --ink-soft: #a8b5c7;
  --ink-mute: #7b889c;

  --line: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .16);

  --gold-600: #e5c463;
  --gold-500: #d3ac3a;
  --gold-400: #e2c471;
  --gold-200: #463a1c;
  --gold-100: #2b2413;

  --ok: #57c99b;
  --ok-bg: #102a22;
  --warn: #eab45c;
  --warn-bg: #2b2213;
  --danger: #ff8b80;
  --danger-bg: #2e1614;
  --info: #7db6f5;
  --info-bg: #102338;
  --violet: #b8a2f0;
  --violet-bg: #1e1a30;
  --teal: #67d0ce;
  --teal-bg: #0e2628;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 24px -16px rgba(0, 0, 0, .8);
  --shadow-md: 0 18px 46px -22px rgba(0, 0, 0, .9);
}

/* ---------- shell ---------- */
#shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  isolation: isolate;
}
@media (min-width: 700px) {
  body {
    display: grid;
    place-items: center;
    padding: 20px;
    background:
      radial-gradient(1100px 600px at 15% -10%, rgba(201, 162, 39, .16), transparent 60%),
      radial-gradient(900px 700px at 95% 110%, rgba(23, 60, 105, .22), transparent 60%),
      var(--desk);
  }
  #shell {
    height: min(940px, calc(100dvh - 40px));
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 50px 90px -30px rgba(8, 20, 38, .55), 0 0 0 8px rgba(12, 30, 55, .92);
  }
  [data-theme="dark"] #shell { border-color: rgba(255, 255, 255, .08); }
}
#app { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
#fx {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 400;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0; }
a { color: var(--info); text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
svg { display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: middle; overflow: visible; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-200); color: var(--navy-800); }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
}
.muted { color: var(--ink-soft); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.semibold { font-weight: 600; }
.bold { font-weight: 700; }
.serif { font-family: var(--font-display); }
.gold-text { color: var(--gold-600); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- layout ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--cream);
  animation: screenIn .32s var(--ease) both;
}
.screen.is-overlay { z-index: 60; box-shadow: -18px 0 50px -30px rgba(0, 0, 0, .5); }
.screen-body {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px calc(var(--tabbar-h) + var(--safe-b) + 26px);
  scrollbar-width: none;
}
.screen-body::-webkit-scrollbar { display: none; }
.screen.has-tabs .screen-body { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 30px); }
.screen.no-tabs .screen-body { padding-bottom: calc(var(--safe-b) + 26px); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spacer { flex: 1; }
.section { margin-top: 24px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 19px; }
.section-head .link { font-size: 12.5px; font-weight: 600; color: var(--gold-600); display: inline-flex; align-items: center; gap: 2px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar .crest { width: 30px; height: 34px; flex: none; filter: drop-shadow(0 2px 4px rgba(7, 21, 40, .18)); }
.topbar .wordmark { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.topbar .wordmark b { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; letter-spacing: .01em; }
.topbar .wordmark span { font-size: 9.5px; letter-spacing: .17em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; color: var(--ink-soft);
  transition: background .18s, color .18s, transform .18s var(--ease);
}
.icon-btn:active { transform: scale(.93); background: var(--line); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--cream);
  animation: pop .3s var(--ease-spring) both;
}
.header-back { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.header-back span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.card.flat { box-shadow: none; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card.tap { transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.card.tap:active { transform: scale(.985); box-shadow: var(--shadow-xs); }
.card-title { display: flex; align-items: center; gap: 8px; }
.card-title h3 { font-size: 16px; }
.card-sub { font-size: 12.5px; color: var(--ink-mute); }

.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(201, 162, 39, .34), transparent 55%),
    linear-gradient(150deg, var(--navy-600) 0%, var(--navy-800) 55%, #071528 100%);
  box-shadow: 0 22px 40px -28px rgba(7, 21, 40, .9);
}
.hero::after {
  content: ""; position: absolute; right: -28px; top: -20px; width: 150px; height: 170px;
  background: url("../assets/crest-light.svg") no-repeat center/contain; opacity: .14;
  pointer-events: none;
}
.hero .eyebrow { color: rgba(255, 255, 255, .62); }
.hero h1 { color: #fff; margin-top: 4px; }
.hero p { color: rgba(255, 255, 255, .74); font-size: 13px; }

/* ---------- badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.badge svg { width: 11px; height: 11px; }
.badge.new { background: var(--gold-100); color: var(--gold-600); border-color: rgba(201, 162, 39, .3); }
.badge.due { background: var(--warn-bg); color: var(--warn); border-color: rgba(154, 98, 8, .18); }
.badge.urgent { background: var(--danger-bg); color: var(--danger); border-color: rgba(179, 38, 30, .2); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(28, 122, 88, .2); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: rgba(28, 90, 160, .2); }
.badge.navy { background: var(--navy-700); color: #fff; border-color: transparent; }
.badge.live { background: var(--danger); color: #fff; border-color: transparent; }
.badge .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: pulseDot 1.6s ease-in-out infinite;
}
[data-theme="dark"] .badge.due { border-color: rgba(234, 180, 92, .24); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; margin: 0 -18px; padding-inline: 18px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 13px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.chip svg { width: 14px; height: 14px; }
.chip[aria-pressed="true"], .chip.active {
  background: var(--navy-700); border-color: var(--navy-700); color: #fff;
  box-shadow: 0 8px 16px -10px rgba(13, 36, 68, .8);
}
[data-theme="dark"] .chip.active { background: var(--gold-500); border-color: var(--gold-500); color: #17130a; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 14px;
  font-size: 14px; font-weight: 650; letter-spacing: -.01em;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-strong);
  transition: transform .18s var(--ease), filter .18s, background .18s;
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: linear-gradient(160deg, var(--navy-600), var(--navy-800)); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -14px rgba(13, 36, 68, .9); }
.btn.gold { background: linear-gradient(160deg, var(--gold-400), var(--gold-600)); color: #211905; border-color: transparent; box-shadow: var(--shadow-gold); }
.btn.danger { background: linear-gradient(160deg, #d8433a, #a11d17); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -14px rgba(179, 38, 30, .9); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn.soft { background: var(--gold-100); color: var(--gold-600); border-color: transparent; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 13px; font-size: 12.5px; border-radius: 11px; }
.btn.lg { height: 50px; border-radius: 16px; font-size: 15px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 650; color: var(--ink-soft); letter-spacing: .01em; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 11px 13px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 13px;
  font-size: 14px; color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8899' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 36px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .16);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-mute); }
.field .hint { font-size: 11.5px; color: var(--ink-mute); }
.option-row { display: flex; gap: 8px; flex-wrap: wrap; }
.option {
  flex: 1 1 auto; min-width: 92px; height: 42px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--paper); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-soft);
  transition: all .18s var(--ease);
}
.option svg { width: 15px; height: 15px; }
.option[aria-pressed="true"] { border-color: var(--gold-500); background: var(--gold-100); color: var(--gold-600); box-shadow: 0 0 0 3px rgba(201, 162, 39, .12); }

.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--line-strong); transition: background .22s var(--ease); flex: none; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .26s var(--ease-spring);
}
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-row .label { flex: 1; min-width: 0; }
.setting-row .label b { display: block; font-size: 14px; font-weight: 600; }
.setting-row .label span { font-size: 12px; color: var(--ink-mute); }
.setting-row .lead-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--gold-100); color: var(--gold-600); flex: none;
}
.setting-row .lead-icon svg { width: 17px; height: 17px; }

/* ---------- avatar ---------- */
.avatar {
  position: relative; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(145deg, var(--navy-600), var(--navy-800));
  border: 2px solid rgba(255, 255, 255, .5);
  box-shadow: var(--shadow-xs);
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; border-width: 1.5px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xl { width: 76px; height: 76px; font-size: 27px; }
.avatar.ring { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold-500); }
.avatar .status {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--paper);
}

/* ---------- hero child switcher ---------- */
.child-switch { display: flex; gap: 8px; margin-top: 14px; position: relative; z-index: 2; }
.child-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .82); font-size: 12px; font-weight: 600;
  transition: all .22s var(--ease);
}
.child-pill .avatar { width: 26px; height: 26px; font-size: 11px; border-width: 1.5px; }
.child-pill[aria-pressed="true"] {
  background: rgba(255, 255, 255, .95); color: var(--navy-800);
  border-color: transparent; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5);
}
.child-pill[aria-pressed="true"] .avatar { box-shadow: none; }

/* ---------- tabbar ---------- */
#tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: stretch;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 6px 10px calc(var(--safe-b) + 2px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-top: 1px solid var(--line);
  transition: transform .3s var(--ease), opacity .25s;
}
#tabbar[hidden] { display: none; }
.tab {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 14px; color: var(--ink-mute);
  transition: color .2s;
}
.tab svg { width: 22px; height: 22px; transition: transform .3s var(--ease-spring); }
.tab span { font-size: 10px; font-weight: 650; letter-spacing: .015em; }
.tab[aria-selected="true"] { color: var(--gold-600); }
.tab[aria-selected="true"] svg { transform: translateY(-1px) scale(1.04); }
.tab[aria-selected="true"]::before {
  content: ""; position: absolute; top: -6px; width: 22px; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}
.tab .tab-badge {
  position: absolute; top: 2px; right: calc(50% - 18px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--paper);
}

/* ---------- sheets ---------- */
#overlay-root { position: absolute; inset: 0; z-index: 100; pointer-events: none; }
#overlay-root > * { pointer-events: auto; }
.scrim {
  position: absolute; inset: 0; background: rgba(6, 14, 26, .48);
  backdrop-filter: blur(3px); animation: fadeIn .22s ease both;
}
.sheet-wrap { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.sheet {
  position: relative; width: 100%; max-height: 90%;
  display: flex; flex-direction: column;
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  padding: 6px 18px calc(18px + var(--safe-b));
  box-shadow: 0 -20px 60px -30px rgba(0, 0, 0, .6);
  animation: sheetUp .36s var(--ease-out) both;
}
.sheet::before {
  content: ""; display: block; width: 38px; height: 4px; border-radius: 99px;
  background: var(--line-strong); margin: 4px auto 14px;
}
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-head h3 { font-size: 18px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }
.sheet.closing { animation: sheetDown .24s var(--ease) both; }
.scrim.closing { animation: fadeOut .24s ease both; }

/* ---------- toast ---------- */
#toast-root {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 14px;
  background: var(--navy-800); color: #fff;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, .6);
  animation: toastIn .34s var(--ease-out) both;
  pointer-events: auto;
}
.toast.out { animation: toastOut .26s ease both; }
.toast .toast-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--gold-400); }
.toast .toast-icon svg { width: 18px; height: 18px; }
.toast.success .toast-icon { color: #7fe3bd; }
.toast.danger .toast-icon { color: #ff9c93; }
.toast .toast-action { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--gold-400); padding: 4px 2px; flex: none; }
.toast .toast-close { color: rgba(255, 255, 255, .5); display: grid; place-items: center; flex: none; }
.toast .toast-close svg { width: 15px; height: 15px; }

/* ---------- empty / misc ---------- */
.empty { text-align: center; padding: 34px 20px; color: var(--ink-mute); }
.empty svg { width: 34px; height: 34px; opacity: .5; margin-bottom: 10px; }
.empty p { font-size: 13px; }
.empty b { display: block; color: var(--ink-soft); font-size: 14px; margin-bottom: 3px; }

.skeleton { background: linear-gradient(100deg, var(--line) 30%, var(--paper-2) 50%, var(--line) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }

.progress-track { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); transition: width .5s var(--ease); }

.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); flex: none; }

.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--paper); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- animations ---------- */
@keyframes screenIn { from { opacity: 0; transform: translateY(6px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(28px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { from { transform: none; } to { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -100% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drawCheck { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .35); } 50% { box-shadow: 0 0 0 8px rgba(179, 38, 30, 0); } }
.rise { animation: rise .4s var(--ease) both; }
.stagger > * { animation: rise .42s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .11s; }
.stagger > *:nth-child(5) { animation-delay: .14s; }
.stagger > *:nth-child(6) { animation-delay: .17s; }
.stagger > *:nth-child(7) { animation-delay: .2s; }
.stagger > *:nth-child(n+8) { animation-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
