/* After All v2 — theme tokens + component styles.
   Light tokens on :root, dark under prefers-color-scheme (guarded) and [data-theme="dark"]. */

:root {
  /* brand */
  --cream: #FFFBF7;
  --ink: #1E1433;
  --ink-soft: #4A3D5C;
  --pink: #E0246A;
  --pink-deep: #C81E5B;
  --pink-text: #9E1747;
  --danger: #C4213C;
  --success: #2E7D32;
  --warning: #C2551B;
  --success-text: #276B2B; --warning-text: #94400F; --danger-text: #B01C35; /* status text on its own 12 % tint: one shade darker so 12 px badge text reaches 4.5:1 */
  /* tints (people + kinds, never status) */
  --lime: #E3F79A; --sky: #CDEBFF; --peach: #FFD9C4; --lilac: #E3D9FF; --blush: #FFE3EC;
  --lime-ink: #3E5A0A; --sky-ink: #0F3F66; --peach-ink: #7A3A15; --lilac-ink: #3F2E7A; --blush-ink: #8A1A44;
  /* roles */
  --bg: var(--cream);
  --bg-elev: #FFFDFB;
  --surface: #FFFFFF;
  --surface-2: #FCF8F4;
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --muted: #6B5C7B;
  --faint: #7B6957; /* 4.9:1 on cream: captions, footers and "optional" labels use it as text */
  --hairline: #F2E9E1;
  --hairline-strong: #EBE0D6;
  --sand: #F5EEE7;
  --primary-bg: var(--ink);
  --primary-fg: #FFF6EE; /* AAColor.primaryFg */
  --accent: var(--pink);
  --accent-fg: #FFFFFF;
  --link: var(--pink-deep);
  --focus: rgba(224, 36, 106, 0.35);
  --scrim: rgba(30, 20, 51, 0.45);
  --tabbar-bg: rgba(255, 253, 251, 0.86); /* AAColor.tabbarBg: bgElev at 86 % */
  --ios-blue: #007AFF; --ios-red: #FF3B30; --ios-sheet: #F2F2F7; --ios-sep: #C6C6C8;
  /* shadows */
  --shadow-card: 0 8px 24px rgba(30, 20, 51, 0.08);
  --shadow-float: 0 10px 30px rgba(30, 20, 51, 0.12);
  --shadow-pop: 0 18px 50px rgba(30, 20, 51, 0.22);
  --shadow-phone: 0 30px 60px rgba(30, 20, 51, 0.25);
  --glow-pink: 0 0 0 6px rgba(224, 36, 106, 0.14), 0 10px 30px rgba(224, 36, 106, 0.28);
  /* radii */
  --r-phone: 44px; --r-sheet: 24px; --r-card: 20px; --r-card-lg: 22px; --r-image: 14px; --r-field: 14px;
  --r-row: 16px; --r-pill: 18px; --r-button: 28px; --r-badge: 8px;
  /* type */
  --font-display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --font-ui: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;
  --font-script: 'Yellowtail', cursive;
  --fs-hero: 38px; --fs-h1: 30px; --fs-h1s: 28px; --fs-h2: 20px; --fs-card: 17px; /* AATextStyle after the density pass */ --fs-body-lg: 16px; --fs-body: 15px;
  --fs-secondary: 14px; --fs-caption: 13px; --fs-tiny: 12px; --fs-tab: 11px;
  /* sizes */
  --safe-top: 56px; --safe-bottom: 34px; --gutter: 20px; --gutter-list: 20px;
  --tabbar-h: 66px; --tabbar-pill: 56px; /* AASize.tabbar: room above the home indicator for the floating pill; AASize.tabbarPill: the pill */
  --btn-h: 50px; --btn-h-sm: 44px; --btn-h-xs: 36px; --field-h: 48px; --touch: 44px; --avatar: 42px;
  --pill-h: 32px; --pill-h-sm: 28px; --list-row-min: 52px; --list-icon: 32px;
  --card-pad: 16px; --card-pad-tight: 12px;
  --gap-list: 10px; --gap-pills: 8px; --gap-form: 12px; --section: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150E24; --bg-elev: #1A1230; --surface: #221839; --surface-2: #2A1F44;
    --text: #FFF6EE; --text-soft: #E8DDEF; --muted: #B9ABCB; --faint: #9B91AD;
    --hairline: #2F2449; --hairline-strong: #3B2D5A; --sand: #261C3E;
    --primary-bg: #FFF6EE; --primary-fg: #1E1433;
    --link: #FF6FA1; --pink-text: #FF8DB6; --success: #7BD389; --warning: #FFA36B; --danger: #FF6B7A; --success-text: #7BD389; --warning-text: #FFA36B; --danger-text: #FF6B7A;
    --lime: #3E4F12; --sky: #163A57; --peach: #4E2C1C; --lilac: #34285E; --blush: #4B1F33;
    --lime-ink: #DDF29A; --sky-ink: #B8E1FF; --peach-ink: #FFD1B8; --lilac-ink: #DCD0FF; --blush-ink: #FFC2D6;
    --scrim: rgba(0, 0, 0, 0.6); --tabbar-bg: rgba(26, 18, 48, 0.86);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35); --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.6); --shadow-phone: 0 30px 60px rgba(0, 0, 0, 0.6);
    --ios-sheet: #1C1C1E; --ios-sep: #3A3A3C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #150E24; --bg-elev: #1A1230; --surface: #221839; --surface-2: #2A1F44;
  --text: #FFF6EE; --text-soft: #E8DDEF; --muted: #B9ABCB; --faint: #9B91AD;
  --hairline: #2F2449; --hairline-strong: #3B2D5A; --sand: #261C3E;
  --primary-bg: #FFF6EE; --primary-fg: #1E1433;
  --link: #FF6FA1; --pink-text: #FF8DB6; --success: #7BD389; --warning: #FFA36B; --danger: #FF6B7A; --success-text: #7BD389; --warning-text: #FFA36B; --danger-text: #FF6B7A;
  --lime: #3E4F12; --sky: #163A57; --peach: #4E2C1C; --lilac: #34285E; --blush: #4B1F33;
  --lime-ink: #DDF29A; --sky-ink: #B8E1FF; --peach-ink: #FFD1B8; --lilac-ink: #DCD0FF; --blush-ink: #FFC2D6;
  --scrim: rgba(0, 0, 0, 0.6); --tabbar-bg: rgba(26, 18, 48, 0.86);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35); --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.6); --shadow-phone: 0 30px 60px rgba(0, 0, 0, 0.6);
  --ios-sheet: #1C1C1E; --ios-sep: #3A3A3C;
  color-scheme: dark;
}

/* ---------- resets ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: var(--fs-body); line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, h4 { margin: 0; }
a { color: var(--link); text-decoration: none; }
::selection { background: rgba(224, 36, 106, 0.25); }

/* ---------- type ---------- */
.t-hero { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -1.6px; }
.t-h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -1px; }
.t-h1s { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h1s); line-height: 1.08; letter-spacing: -0.9px; }
.t-h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.4px; }
.t-card { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-card); line-height: 1.2; letter-spacing: -0.3px; }
.t-body-lg { font-size: var(--fs-body-lg); line-height: 1.5; }
.t-body { font-size: var(--fs-body); line-height: 1.5; }
.t-secondary { font-size: var(--fs-secondary); line-height: 1.45; }
.t-caption { font-size: var(--fs-caption); line-height: 1.4; }
.t-tiny { font-size: var(--fs-tiny); line-height: 1.4; }
.t-muted { color: var(--muted); }
.t-faint { color: var(--faint); }
.t-soft { color: var(--text-soft); }
.t-pink { color: var(--pink-text); }
.t-link { color: var(--link); font-weight: 600; }
button.t-link, a.t-link { position: relative; }
button.t-link::before, a.t-link::before { content: ""; position: absolute; left: min(0px, calc(50% - 22px)); right: min(0px, calc(50% - 22px)); top: calc(50% - 22px); bottom: calc(50% - 22px); } /* a text link keeps its line box; the tap area is 44 px tall */
.t-danger { color: var(--danger); }
.t-success { color: var(--success); }
.t-warning { color: var(--warning); }
.t-500 { font-weight: 500; } .t-600 { font-weight: 600; } .t-700 { font-weight: 700; }
.t-center { text-align: center; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0; }
.serif.accent { color: var(--pink); }
.t-h2 .serif.accent, .sh-title .serif.accent { color: var(--link); } /* at 20 px the accent is not large text: the deeper pink keeps 4.5:1 */
.eyebrow { font-size: var(--fs-caption); font-weight: 600; color: var(--pink-text); letter-spacing: 0.1px; }
.section-label { font-size: var(--fs-caption); font-weight: 600; color: var(--muted); }
.group-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.8px; color: var(--text); display: inline-flex; align-items: baseline; line-height: 1; }
.wordmark .all { font-family: var(--font-script); font-weight: 400; color: var(--pink); letter-spacing: 0; margin-left: 1px; font-size: 1.22em; position: relative; top: 0.04em; }
.wordmark .ops { font-family: var(--font-ui); font-size: max(11px, 0.42em); font-weight: 700; letter-spacing: 0.6px; background: rgba(255, 255, 255, 0.16); color: currentColor; padding: 3px 7px; border-radius: 6px; margin-left: 8px; position: relative; top: -0.22em; }

/* ---------- layout utilities ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.px { padding-left: var(--gutter); padding-right: var(--gutter); }
.px-list { padding-left: var(--gutter-list); padding-right: var(--gutter-list); }
.stack > * + * { margin-top: var(--gap-list); }
.hide { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hairline { height: 1px; background: var(--hairline); }
.no-scrollbar { scrollbar-width: none; } .no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- screen scaffold ---------- */
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; background: var(--bg); color: var(--text); display: flex; flex-direction: column; scrollbar-width: none; will-change: transform; }
.screen::-webkit-scrollbar { display: none; }
.screen > .content { flex: 1 0 auto; padding: var(--safe-top) var(--gutter) 40px; }
.screen > .content.flush { padding-left: 0; padding-right: 0; }
.screen > .content.no-safe { padding-top: 0; }
.screen.has-tabbar > .content { padding-bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 16px); } /* the last line ends above the floating pill */
.screen.has-footer > .content { padding-bottom: 24px; } /* the footer is sticky and in flow, so the content needs no tall bottom padding */
.screen.has-tabbar.has-footer > .screen-footer { padding-bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 8px); } /* sticky buttons sit above the pill; the solid footer runs on under it */
.screen[data-tint] > .content { background: var(--tint-bg); }
.screen-footer { position: sticky; bottom: 0; margin-top: auto; padding: 12px var(--gutter) calc(var(--safe-bottom) + 8px); background: var(--bg); z-index: 5; } /* Footer: solid behind its own content, so scrolling text never shows through */
.screen-footer::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 20px; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg)); pointer-events: none; } /* a short fade above it softens the edge */
.screen-footer.solid { border-top: 1px solid var(--hairline); }
.screen-footer.solid::before { display: none; }
.screen-footer > * + * { margin-top: 10px; }
.stack-note { font-size: 12px; color: var(--faint); text-align: center; }

/* ---------- TopBar ---------- */
.topbar { position: sticky; top: 0; z-index: 6; flex: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: calc(var(--safe-top) - 8px) 16px 6px; background: linear-gradient(var(--bg) 60%, transparent); }
.topbar.solid { background: var(--bg); }
/* once the screen scrolls, the bar turns into iOS bar material, so content slides under a clean edge instead of showing through the fade */
.topbar:not(.transparent) { transition: background-color .25s, box-shadow .25s; }
.phone[data-scrolled="true"] .screen-host > .screen > .topbar:not(.transparent) { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 1px 0 var(--hairline); }
.topbar.transparent { background: transparent; position: absolute; left: 0; right: 0; }
.topbar .title { flex: 1; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }
.topbar .title.left { text-align: left; font-size: 28px; letter-spacing: -0.8px; padding-left: 8px; }
.topbar .slot { min-width: 40px; display: flex; justify-content: flex-end; gap: 6px; }
.topbar .slot.left { justify-content: flex-start; }
.icon-btn { position: relative; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--hairline); color: var(--text); transition: transform .18s var(--ease-spring), background .2s; }
.icon-btn:active { transform: scale(0.9); }
.icon-btn::before { content: ""; position: absolute; inset: calc(50% - 22px); border-radius: 50%; } /* 44 × 44 hit area around the 40 px circle (and the 32 px ones) */
.icon-btn.plain { background: transparent; border-color: transparent; }
.icon-btn.ink { background: var(--primary-bg); color: var(--primary-fg); border-color: transparent; }
.icon-btn.pink { background: var(--pink); color: #fff; border-color: transparent; }
.icon-btn.on-image { background: rgba(255, 255, 255, 0.85); color: var(--ink); border-color: transparent; backdrop-filter: blur(8px); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- TabBar: AATabBar, a floating glass pill above the home indicator ----------
   56 px pill, 22 px from each side (520 max), sitting 8 px into the home-indicator zone; solid ink icons and labels so nothing
   that scrolls beneath blends in; the selected tab sits in a soft pink capsule. It floats over the screen (sticky, out of flow),
   and every tab screen keeps --tabbar-h of room above the safe area so content and sticky footers end above it. */
.tabbar { position: sticky; bottom: max(0px, calc(var(--safe-bottom) - 8px)); flex: none; align-self: center; z-index: 8;
  width: min(520px - 44px, calc(100% - 44px)); height: var(--tabbar-pill); margin: calc(-1 * var(--tabbar-pill) - max(0px, calc(var(--safe-bottom) - 8px))) 0 max(0px, calc(var(--safe-bottom) - 8px));
  display: flex; align-items: stretch; gap: 2px; padding: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 62%, transparent); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 0.8px solid rgba(255, 255, 255, 0.7); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(30, 20, 51, 0.06); }
.tabbar .tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 999px; color: var(--text); font-size: 11px; font-weight: 500; line-height: 1.15; position: relative; transition: background-color .25s var(--ease-out); }
.tabbar .tab .tab-icon { position: relative; width: 26px; height: 22px; display: flex; align-items: center; justify-content: center; }
.tabbar .tab svg { width: 22px; height: 22px; transition: transform .35s var(--ease-spring); }
.tabbar .tab .tab-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabbar .tab.active { background: rgba(224, 36, 106, 0.16); font-weight: 600; animation: tab-capsule .35s var(--ease-spring) both; }
.tabbar .tab:active svg { transform: scale(0.88); }
.tabbar .tab .dot { position: absolute; top: -1px; right: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
@keyframes tab-capsule { from { background-color: rgba(224, 36, 106, 0); transform: scale(0.94); } to { background-color: rgba(224, 36, 106, 0.16); transform: scale(1); } }
:root[data-theme="dark"] .tabbar { border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar { border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45); } }
.tabbar.ink { background: rgba(30, 20, 51, 0.72); border-color: rgba(255, 255, 255, 0.12); }
.tabbar.ink .tab { color: #B9AFC2; } .tabbar.ink .tab.active { color: #FFF6EE; background: rgba(255, 255, 255, 0.14); animation: none; }
@media (prefers-reduced-motion: reduce) { .tabbar .tab.active { animation: none; } }

/* ---------- Buttons ---------- */
.btn { --h: var(--btn-h); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 20px; letter-spacing: -0.1px; border-radius: var(--r-button); font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap; flex-shrink: 0; user-select: none; transition: transform .16s var(--ease-spring), background .2s, box-shadow .25s, opacity .2s, filter .2s; } /* flex-shrink 0: beside a .grow column the text wraps, never the button. The ripple is clipped by its own host, so the button needs no overflow:hidden and the .xs hit area can reach outside */
.btn.full { width: 100%; display: flex; }
.btn.sm { --h: var(--btn-h-sm); font-size: 14px; font-weight: 500; padding: 0 14px; gap: 6px; } /* AAButtonSize.sm: 44 pt, 14 pt medium */
.btn.xs { --h: var(--btn-h-xs); font-size: 13px; padding: 0 12px; gap: 6px; } /* AAButtonSize.xs: 36 pt, 13 pt semibold */
.btn.xs::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 22px); bottom: calc(50% - 22px); } /* 44 px tall hit area for the 36 px button */
.btn.primary { background: var(--primary-bg); color: var(--primary-fg); box-shadow: 0 8px 22px rgba(30, 20, 51, 0.18); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.accent { background: var(--pink); color: #fff; box-shadow: 0 10px 26px rgba(224, 36, 106, 0.32); }
.btn.secondary { background: var(--surface); color: var(--text); border: 1.5px solid var(--hairline-strong); }
.btn.ghost { background: transparent; color: var(--link); height: var(--btn-h-sm); }
.btn.ghost.muted { color: var(--muted); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger.soft { background: rgba(196, 33, 60, 0.1); color: var(--danger); }
.btn.tint { background: var(--tint, var(--sand)); color: var(--text); }
.btn.on-ink { background: rgba(255, 255, 255, 0.14); color: #FFF6EE; }
.btn.on-ink.solid { background: #FFF6EE; color: #1E1433; }
.btn:active:not(:disabled) { transform: scale(0.965); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; color: var(--primary-fg); animation: spin .8s linear infinite; }
.btn.secondary.loading::after, .btn.ghost.loading::after { color: var(--text); }
.btn.accent.loading::after, .btn.danger.loading::after { color: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; } .btn.sm svg { width: 16px; height: 16px; } .btn.xs svg { width: 14px; height: 14px; } /* icons 18 / 16 / 14 */
.btn .ripple-host { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.35); transform: scale(0); animation: ripple .55s var(--ease-out) forwards; pointer-events: none; }
.btn.secondary .ripple, .btn.ghost .ripple { background: rgba(30, 20, 51, 0.08); }
.btn.glow { animation: glow-pulse 2.2s ease-in-out infinite; }

/* ---------- Pills ---------- */
.pill { position: relative; display: inline-flex; align-items: center; gap: 6px; height: var(--pill-h); padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); border: 1.5px solid var(--hairline); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; user-select: none; transition: transform .16s var(--ease-spring), background .2s, border-color .2s, color .2s; }
.pill svg { width: 16px; height: 16px; }
.pill::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 22px); bottom: calc(50% - 22px); } /* 44 px tall hit area; the pill stays 32 px (28 for .sm) */
.pill.selected { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.pill.selected.pink { background: var(--pink); border-color: var(--pink); color: #fff; }
.pill.tinted { background: var(--tint); border-color: transparent; color: var(--tint-ink, var(--text)); }
.pill:active { transform: scale(0.94); }
.pill.disabled { opacity: 0.45; }
.pill.sm { height: var(--pill-h-sm); padding: 0 11px; font-size: 12.5px; font-weight: 600; }
.pill-group { display: flex; flex-wrap: wrap; gap: var(--gap-pills); }
.pill-group.scroll { flex-wrap: nowrap; overflow-x: auto; padding: 7px var(--gutter); margin: -3px calc(var(--gutter) * -1); /* 7 px of vertical padding (pulled back by the margin, so nothing moves) keeps the pills' hit areas inside the scroller */ scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.pill-group.scroll::-webkit-scrollbar { display: none; }
.pill-group.scroll .pill { scroll-snap-align: start; flex: none; }
.pill-group-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.segmented { display: inline-flex; padding: 3px; border-radius: 14px; background: var(--sand); position: relative; gap: 2px; }
.segmented .seg { position: relative; z-index: 1; min-width: 44px; padding: 7px 12px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--muted); transition: color .2s; white-space: nowrap; }
.segmented .seg.active { color: var(--text); }
.segmented .seg::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 22px); bottom: calc(50% - 22px); } /* 44 px tall hit area for the 33 px tab; min-width 44 is for natural-width tabs, a stretched one (Segmented full) carries min-width: max-content inline so it never shrinks into its label */
.segmented .thumb { position: absolute; top: 3px; bottom: 3px; border-radius: 11px; background: var(--surface); box-shadow: 0 2px 8px rgba(30, 20, 51, 0.12); transition: left .3s var(--ease-spring), width .3s var(--ease-spring); z-index: 0; }
.segmented.ink { background: rgba(255, 255, 255, 0.12); } .segmented.ink .seg { color: #B9ABCB; } .segmented.ink .seg.active { color: #1E1433; } .segmented.ink .thumb { background: #FFF6EE; }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: var(--card-pad); color: var(--text); }
.card.tight { padding: var(--card-pad-tight); }
.card.flush { padding: 0; overflow: hidden; }
.card.tinted { background: var(--tint); border-color: transparent; color: var(--tint-ink, var(--text)); }
.card.ink { background: var(--ink); border-color: transparent; color: #FFF6EE; }
.card.float { border-color: transparent; box-shadow: var(--shadow-card); }
.card.clickable { cursor: pointer; transition: transform .2s var(--ease-spring), box-shadow .25s, border-color .2s; }
.card.clickable:active { transform: scale(0.98); }
.card.selected { border: 2px solid var(--text); }
.card.dashed { border-style: dashed; background: transparent; }
.card.glass { background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: rgba(255, 255, 255, 0.5); }
:root[data-theme="dark"] .card.glass { background: rgba(34, 24, 57, 0.72); border-color: rgba(255, 255, 255, 0.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card.glass { background: rgba(34, 24, 57, 0.72); border-color: rgba(255, 255, 255, 0.08); } }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-card); letter-spacing: -0.3px; line-height: 1.2; }

/* PromoCard */
.promo-row { display: flex; align-items: flex-start; gap: 12px; }
.promo-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.promo-ic svg { width: 18px; height: 18px; }
.promo-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.promo-eyebrow { font-size: 12px; font-weight: 600; line-height: 1.4; opacity: 0.9; }
.promo-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-card); letter-spacing: -0.3px; line-height: 1.2; }
.promo-text { font-size: 13px; line-height: 1.4; opacity: 0.85; }
.promo-cta { margin-top: 8px; }

/* ImageCard */
.image-card { position: relative; border-radius: var(--r-card-lg); overflow: hidden; background: var(--tint, var(--sand)); color: var(--ink); cursor: pointer; isolation: isolate; transition: transform .25s var(--ease-spring), box-shadow .3s; box-shadow: 0 1px 0 var(--hairline); }
.image-card:active { transform: scale(0.98); }
.image-card .art { position: absolute; inset: 0; z-index: 0; }
.image-card .art svg { width: 100%; height: 100%; }
.image-card .art > * { transition: transform 6s ease-out; }
.image-card:hover .art > * { transform: scale(1.05); }
.image-card .scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(30, 20, 51, 0) 0%, rgba(30, 20, 51, 0.25) 40%, rgba(30, 20, 51, 0.85) 100%); } /* ImageCard's scrim: dark enough under the text on any picture */
.image-card .scrim.light { background: linear-gradient(to top, rgba(255, 246, 238, 0.95) 0%, rgba(255, 246, 238, 0.6) 45%, rgba(255, 246, 238, 0) 75%); }
.image-card .body { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding: 16px; color: #FFF6EE; }
.image-card .scrim.light + .body { color: var(--ink); }
.image-card .body .eyebrow { color: #FFC2D6; }
.image-card .scrim.light + .body .eyebrow { color: var(--pink-deep); }
.image-card .body .title { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.5px; line-height: 1.1; }
.image-card .body .meta { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.image-card .corner { position: absolute; top: 12px; right: 12px; z-index: 3; }
.image-card .corner-left { position: absolute; top: 12px; left: 12px; z-index: 3; }
.image-card.tall { height: 240px; } .image-card.md { height: 190px; } .image-card.sm { height: 140px; }
.image-card.row-card { display: flex; height: auto; }
.image-card.hover-lift:hover { box-shadow: var(--shadow-float); }
.event-thumb { width: 108px; height: 90px; border-radius: var(--r-image); overflow: hidden; flex: none; background: var(--tint, var(--sand)); }
.event-thumb svg { width: 100%; height: 100%; }

/* Carousel */
.carousel { position: relative; overflow: hidden; border-radius: inherit; touch-action: pan-y; }
.carousel .track { display: flex; transition: transform .5s var(--ease-out-expo); will-change: transform; }
.carousel.dragging .track { transition: none; }
.carousel .slide { flex: 0 0 100%; min-width: 0; }
.carousel .dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.carousel .dots.outside { position: static; margin-top: 10px; }
.carousel .dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(30, 20, 51, 0.25); transition: width .3s var(--ease-spring), background .3s; }
.carousel .dot.active { width: 18px; background: var(--ink); }
.carousel.on-dark .dot { background: rgba(255, 255, 255, 0.45); } .carousel.on-dark .dot.active { background: #fff; }
.carousel .arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
.carousel .arrow.prev { left: 10px; } .carousel .arrow.next { right: 10px; }

/* ---------- Sheet / Dialog / Toast overlays ---------- */
.overlay-host { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.overlay-host > * { pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: var(--scrim); animation: fade-in .25s var(--ease-out) both; }
.backdrop.closing { animation: fade-out .22s var(--ease-out) both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; display: flex; flex-direction: column; background: var(--bg-elev); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--shadow-pop); animation: sheet-up .5s var(--ease-spring) both; will-change: transform; }
.sheet.closing { animation: sheet-down .28s var(--ease-in) both; }
.sheet .handle { width: 36px; height: 5px; border-radius: 3px; background: var(--hairline-strong); margin: 8px auto 4px; flex: none; cursor: grab; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 4px; flex: none; }
.sheet .sheet-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); letter-spacing: -0.4px; }
.sheet .sheet-body { padding: 8px 20px 12px; overflow-y: auto; flex: 1 1 auto; scrollbar-width: none; }
.sheet .sheet-body::-webkit-scrollbar { display: none; }
.sheet .sheet-actions { padding: 8px 20px calc(var(--safe-bottom) + 4px); display: flex; flex-direction: column; gap: 10px; flex: none; }
.sheet.ios { background: var(--ios-sheet); }
.sheet .drag-area { flex: none; }
.dialog-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 32px; }
.dialog { width: 270px; background: var(--surface); border-radius: 14px; overflow: hidden; text-align: center; box-shadow: var(--shadow-pop); animation: pop .35s var(--ease-spring) both; }
.dialog.closing { animation: pop-out .18s var(--ease-in) both; }
.dialog .dialog-body { padding: 20px 16px 16px; }
.dialog .dialog-title { font-weight: 600; font-size: 17px; line-height: 1.25; }
.dialog .dialog-msg { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.dialog .dialog-actions { display: flex; border-top: 1px solid var(--hairline); }
.dialog .dialog-actions.stacked { flex-direction: column; }
.dialog .dialog-actions button { flex: 1; height: 44px; font-size: 17px; color: var(--ios-blue); font-weight: 400; }
.dialog .dialog-actions button + button { border-left: 1px solid var(--hairline); }
.dialog .dialog-actions.stacked button + button { border-left: 0; border-top: 1px solid var(--hairline); }
.dialog .dialog-actions button.bold { font-weight: 600; }
.dialog .dialog-actions button.danger { color: var(--ios-red); }
.dialog .dialog-actions button:active { background: var(--surface-2); }
.dialog.brand { border-radius: 22px; width: 300px; }
.dialog.brand .dialog-body { padding: 24px 20px 8px; }
.dialog.brand .dialog-title { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.4px; }
.dialog.brand .dialog-msg { font-size: 14px; }
.dialog.brand .dialog-actions { flex-direction: column; border: 0; padding: 12px 16px 16px; gap: 8px; }
.dialog.brand .dialog-actions button { border: 0 !important; }
.dialog.brand .dialog-actions .btn { flex: none; height: var(--btn-h); font-size: 16px; font-weight: 600; color: var(--primary-fg); border-radius: var(--r-button); }
.dialog.brand .dialog-actions .btn.ghost { height: 44px; color: var(--link); }
.dialog.brand .dialog-actions .btn.ghost.muted { color: var(--muted); }
.dialog.brand .dialog-actions .btn.danger { color: #fff; }
.dialog.brand .dialog-actions .btn:active { background: var(--primary-bg); }
.dialog.brand .dialog-actions .btn.ghost:active { background: var(--surface-2); }
.toast-host { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 12px); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 30; pointer-events: none; transition: bottom .3s var(--ease-out); }
.toast-host.top { bottom: auto; top: 60px; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 11px 16px; border-radius: 999px; background: var(--ink); color: #FFF6EE; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-float); animation: toast-in .45s var(--ease-spring) both; pointer-events: auto; }
.toast.closing { animation: toast-out .25s var(--ease-in) both; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.success svg { color: #B9F27A; } .toast.danger { background: var(--danger); } .toast.pink { background: var(--pink); }
.toast .toast-action { color: #FFC2D6; font-weight: 700; margin-left: 4px; }
:root[data-theme="dark"] .toast { background: #FFF6EE; color: #1E1433; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #FFF6EE; color: #1E1433; } }
.notif-banner { position: absolute; left: 10px; right: 10px; top: 54px; z-index: 40; display: flex; gap: 12px; padding: 12px 14px; border-radius: 22px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); color: var(--ink); box-shadow: 0 10px 30px rgba(30, 20, 51, 0.2); animation: banner-in .6s var(--ease-spring) both; cursor: pointer; }
.notif-banner.closing { animation: banner-out .3s var(--ease-in) both; }
.notif-banner .app-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-script); font-size: 24px; flex: none; }
.notif-banner .app-icon.pink { background: #E0246A; }
.notif-banner .nb-title { font-weight: 600; font-size: 14px; }
.notif-banner .nb-body { font-size: 13px; color: #4A3D5C; line-height: 1.35; margin-top: 1px; }
.notif-banner .nb-when { font-size: 11px; color: #6B5C7B; margin-left: auto; flex: none; }
:root[data-theme="dark"] .notif-banner { background: rgba(40, 30, 64, 0.85); color: #FFF6EE; } :root[data-theme="dark"] .notif-banner .nb-body { color: #E8DDEF; } :root[data-theme="dark"] .notif-banner .nb-when { color: #B9ABCB; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notif-banner { background: rgba(40, 30, 64, 0.85); color: #FFF6EE; } :root:not([data-theme="light"]) .notif-banner .nb-body { color: #E8DDEF; } :root:not([data-theme="light"]) .notif-banner .nb-when { color: #B9ABCB; } }

/* ---------- Avatars ---------- */
.avatar { position: relative; width: var(--size, 42px); height: var(--size, 42px); border-radius: 50%; background: var(--tint, var(--sand)); color: var(--tint-ink, var(--text)); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: calc(var(--size, 42px) * 0.4); overflow: hidden; flex: none; user-select: none; }
.avatar svg { width: 100%; height: 100%; }
.avatar.hidden-face svg { filter: blur(3px); opacity: 0.85; }
.avatar.hidden-face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(30, 20, 51, 0.1)); }
.avatar.ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pink); }
.avatar.ring-lime { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #9ED12F; }
.avatar.bordered { box-shadow: 0 0 0 2px var(--surface); }
.avatar .status { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { margin-left: calc(var(--size, 42px) * -0.28); box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .more { margin-left: calc(var(--size, 42px) * -0.28); width: var(--size, 42px); height: var(--size, 42px); border-radius: 50%; background: var(--sand); color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--surface); }
.avatar.animate-in { animation: pop .45s var(--ease-spring) both; }

/* ---------- Countdown ring ---------- */
.ring { position: relative; width: var(--size, 164px); height: var(--size, 164px); display: inline-flex; align-items: center; justify-content: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--hairline); }
.ring .bar { stroke: var(--pink); stroke-linecap: round; transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 6px rgba(224, 36, 106, 0.45)); }
.ring .center { position: relative; text-align: center; }
.ring .big { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--size, 160px) * 0.2); letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.ring .small { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; white-space: nowrap; } /* AAType.tinyS */
.ring.ink .track { stroke: rgba(255, 255, 255, 0.14); } .ring.ink .big { color: #FFF6EE; } .ring.ink .small { color: #B9AFC2; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; }
.timeline .tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.timeline .tl-item:last-child { padding-bottom: 0; }
.timeline .tl-item::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--hairline-strong); }
.timeline .tl-item:last-child::before { display: none; }
.timeline .tl-item.done::before { background: var(--text); }
.timeline .tl-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--surface); border: 2px solid var(--hairline-strong); color: var(--muted); z-index: 1; }
.timeline .tl-dot svg { width: 16px; height: 16px; }
.timeline .done .tl-dot { background: var(--text); border-color: var(--text); color: var(--bg); }
.timeline .now .tl-dot { background: var(--pink); border-color: var(--pink); color: #fff; animation: pulse-ring 1.8s ease-out infinite; }
.timeline .tl-body { padding-top: 5px; min-width: 0; }
.timeline .tl-title { font-weight: 600; font-size: 15px; }
.timeline .now .tl-title { color: var(--pink-text); }
.timeline .tl-meta { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.timeline .next .tl-dot, .timeline .next .tl-title { opacity: 0.7; } /* the meta line keeps its full colour: at 70 % muted text falls under 4.5:1 */
.timeline.horizontal { flex-direction: row; align-items: flex-start; }
.timeline.horizontal .tl-item { flex: 1; flex-direction: column; align-items: center; text-align: center; padding: 0; gap: 8px; }
.timeline.horizontal .tl-item::before { left: 50%; right: -50%; top: 15px; bottom: auto; width: auto; height: 2px; }
.timeline.horizontal .tl-body { padding: 0 4px; }

/* ---------- Skeleton ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--sand); border-radius: 10px; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: translateX(-100%); animation: shimmer 1.4s ease-in-out infinite; }
.skeleton.line { height: 14px; } .skeleton.line.short { width: 55%; } .skeleton.avatar { width: 42px; height: 42px; border-radius: 50%; } .skeleton.card { height: 120px; border-radius: var(--r-card); }

/* ---------- Progress / Meter / Switch / Stepper ---------- */
.progress { height: 6px; border-radius: 3px; background: var(--sand); overflow: hidden; }
.progress .fill { height: 100%; border-radius: 3px; background: var(--pink); transition: width .6s var(--ease-out-expo); }
.progress.ink .fill { background: var(--text); }
.progress.lg { height: 10px; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .meter-row { display: flex; justify-content: space-between; font-size: 13px; }
.meter .meter-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.meter .meter-track { display: flex; gap: 3px; height: 8px; }
.meter .meter-seg { flex: 1; border-radius: 3px; background: var(--sand); transition: background .3s; }
.meter .meter-seg.on { background: var(--tone, var(--pink)); }
.meter.success { --tone: var(--success); } .meter.warning { --tone: var(--warning); } .meter.danger { --tone: var(--danger); } .meter.ink { --tone: var(--text); }
.switch { position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--hairline-strong); transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); transition: transform .3s var(--ease-spring); }
.switch.on { background: var(--success); }
.switch.on.pink { background: var(--pink); } .switch.on.ink { background: var(--text); } .switch.on.ink::after { background: var(--surface); } /* dark mode: cream track, dark knob */
.switch.on::after { transform: translateX(20px); }
.switch:active::after { width: 32px; }
.switch.on:active::after { transform: translateX(15px); }
.stepper { display: flex; gap: 6px; }
.stepper .step { flex: 1; height: 4px; border-radius: 2px; background: var(--sand); overflow: hidden; }
.stepper .step .fill { height: 100%; width: 0; background: var(--text); transition: width .45s var(--ease-out-expo); }
.stepper .step.done .fill { width: 100%; } .stepper .step.current .fill { width: 100%; background: var(--pink); }
.number-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--hairline-strong); border-radius: 999px; background: var(--surface); }
.number-stepper button { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--text); border-radius: 50%; }
.number-stepper button:disabled { opacity: 0.3; }
.number-stepper .val { min-width: 32px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field label .req { color: var(--pink); }
.field .control { position: relative; display: flex; align-items: center; height: var(--field-h); border-radius: var(--r-field); border: 1.5px solid var(--hairline-strong); background: var(--surface); padding: 0 14px; gap: 8px; transition: border-color .2s, box-shadow .2s; }
.field .control:focus-within { border-color: var(--text); box-shadow: 0 0 0 4px rgba(30, 20, 51, 0.06); }
.field.error .control { border-color: var(--danger); }
.field .control input, .field .control textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--text); height: 100%; }
.field .control input::placeholder { color: var(--faint); }
.field .control .prefix { color: var(--muted); font-weight: 500; }
.field .control svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.field textarea { padding: 12px 0; resize: none; line-height: 1.4; }
.field .control.multiline { height: auto; min-height: 96px; align-items: flex-start; }
.field .helper { font-size: 12px; color: var(--muted); }
.field.error .helper { color: var(--danger); }
.otp { display: flex; gap: 10px; justify-content: center; }
.otp .box { width: 46px; height: 54px; border-radius: 14px; border: 1.5px solid var(--hairline-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 26px; font-weight: 700; transition: border-color .2s, transform .2s var(--ease-spring), box-shadow .2s; }
.otp .box.active { border-color: var(--text); box-shadow: 0 0 0 4px rgba(30, 20, 51, 0.06); }
.otp .box.filled { border-color: var(--text); animation: pop .3s var(--ease-spring); }
.otp.error .box { border-color: var(--danger); animation: shake .4s ease; }
.otp.success .box { border-color: var(--success); color: var(--success); }
.otp input.sr { position: absolute; opacity: 0; width: 1px; height: 1px; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--sand); }
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; align-self: stretch; background: transparent; border: 0; outline: 0; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

/* ---------- InlineNotice: a soft tinted glass card, the icon in a solid badge; errors shake once ---------- */
.notice { --acc: var(--sky-ink); position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 18px;
  background: linear-gradient(to right, color-mix(in srgb, var(--acc) 10%, transparent), color-mix(in srgb, var(--acc) 3%, transparent)), var(--surface);
  border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent); box-shadow: 0 4px 24px color-mix(in srgb, var(--acc) 10%, transparent);
  color: var(--text); font-size: 14px; line-height: 1.45; text-align: left; animation: notice-in .45s var(--ease-spring) both; }
.notice.info { --acc: var(--sky-ink); color: var(--text-soft); box-shadow: none; }
.notice.success { --acc: var(--success); } .notice.warning { --acc: var(--warning); } .notice.danger { --acc: var(--danger); font-weight: 500; }
.notice-badge { width: 28px; height: 28px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--acc); color: #fff; box-shadow: 0 2px 12px color-mix(in srgb, var(--acc) 35%, transparent); }
.notice-badge svg { width: 15px; height: 15px; }
.notice-text { flex: 1; min-width: 0; }
.notice-title { font-weight: 600; color: var(--text); }
.notice-action { flex: none; }
.notice.shake { animation: notice-in .45s var(--ease-spring) both, notice-shake .38s linear .05s; }
@keyframes notice-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes notice-shake { 0%, 25%, 50%, 75%, 100% { translate: 0; } 12.5%, 62.5% { translate: 6px; } 37.5%, 87.5% { translate: -6px; } }
@media (prefers-reduced-motion: reduce) { .notice, .notice.shake { animation: notice-fade .2s ease-out both; } @keyframes notice-fade { from { opacity: 0; } to { opacity: 1; } } }

/* ---------- Rows / sections / badges / empty ---------- */
.list-row { display: flex; align-items: center; gap: 12px; min-height: var(--list-row-min); padding: 10px 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-row); color: var(--text); text-align: left; width: 100%; transition: transform .18s var(--ease-spring), background .2s; }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:active { transform: scale(0.985); background: var(--surface-2); }
.list-row .lr-icon { width: var(--list-icon); height: var(--list-icon); border-radius: 10px; background: var(--tint, var(--sand)); color: var(--tint-ink, var(--text)); display: flex; align-items: center; justify-content: center; flex: none; }
.list-row .lr-icon svg { width: 18px; height: 18px; }
.list-row .lr-body { flex: 1; min-width: 0; }
.list-row .lr-title { font-weight: 500; font-size: 15px; } /* AAType.bodyM */
.list-row .lr-sub { font-size: 13px; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.list-row .lr-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 14px; flex: 0 1 auto; min-width: 0; max-width: 62%; text-align: right; } /* a long value wraps on the right instead of running over the title */
.list-row .lr-right svg.chev { width: 20px; height: 20px; color: var(--faint); }
.list-row.danger .lr-title { color: var(--danger); }
.list-row.flat { border: 0; border-radius: 0; background: transparent; padding-left: 0; padding-right: 0; border-bottom: 1px solid var(--hairline); }
.list-row.flat:last-child { border-bottom: 0; }
.list-row.selected { border-color: var(--text); border-width: 2px; }
.list-group { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); overflow: hidden; }
.list-group .list-row { border: 0; border-radius: 0; border-bottom: 1px solid var(--hairline); }
.list-group .list-row:last-child { border-bottom: 0; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: var(--section) 0 10px; }
.section-header .sh-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); letter-spacing: -0.4px; }
.section-header .sh-title.sm { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.section-header .sh-meta { font-size: 13px; color: var(--muted); }
.section-header .sh-action { position: relative; font-size: 14px; font-weight: 600; color: var(--link); white-space: nowrap; }
.section-header .sh-action::before { content: ""; position: absolute; left: min(0px, calc(50% - 22px)); right: min(0px, calc(50% - 22px)); top: calc(50% - 22px); bottom: calc(50% - 22px); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-badge); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--sand); color: var(--text); }
.badge svg { width: 13px; height: 13px; }
.badge.lg { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.badge.pink { background: var(--blush); color: var(--blush-ink); } .badge.solid-pink { background: var(--pink); color: #fff; }
.badge.ink { background: var(--text); color: var(--bg); } .badge.lime { background: var(--lime); color: var(--lime-ink); } .badge.sky { background: var(--sky); color: var(--sky-ink); }
.badge.peach { background: var(--peach); color: var(--peach-ink); } .badge.lilac { background: var(--lilac); color: var(--lilac-ink); }
.badge.success { background: rgba(46, 125, 50, 0.12); color: var(--success-text); } .badge.warning { background: rgba(194, 85, 27, 0.12); color: var(--warning-text); } .badge.danger { background: rgba(196, 33, 60, 0.12); color: var(--danger-text); }
.badge.outline { background: transparent; border: 1px solid var(--hairline-strong); color: var(--muted); }
.badge.on-ink { background: rgba(255, 255, 255, 0.14); color: #FFF6EE; }
.badge.pulse { animation: badge-pulse 1.6s ease-in-out infinite; }
.fomo { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--blush); color: var(--blush-ink); font-size: 13px; font-weight: 700; }
.fomo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(224, 36, 106, 0.5); animation: fomo-dot 1.4s ease-out infinite; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px; gap: 8px; }
.empty .empty-art { width: 120px; height: 120px; border-radius: 30px; background: var(--tint, var(--sand)); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; animation: float 4s ease-in-out infinite; overflow: hidden; }
.empty .empty-art svg { width: 48px; height: 48px; color: var(--text); }
.empty .empty-art.illus svg { width: 100%; height: 100%; }
.empty .empty-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); letter-spacing: -0.4px; }
.empty .empty-body { font-size: 14px; color: var(--muted); max-width: 280px; line-height: 1.5; }
.empty .btn { margin-top: 12px; }
.stat-tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.stat-tile .st-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat-tile .st-value { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.6px; margin-top: 2px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-tile .st-value small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat-tile .st-delta { font-size: 12px; margin-top: 4px; font-weight: 600; }
.stat-tile.clickable { cursor: pointer; transition: transform .18s var(--ease-spring); } .stat-tile.clickable:active { transform: scale(0.97); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 10px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--sand); transition: fill .2s; } .chart .bar.on { fill: var(--pink); } .chart .bar.ink { fill: var(--text); }
.chart .spark { fill: none; stroke: var(--pink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .spark-fill { fill: url(#sparkFill); opacity: 0.5; }
.chart .spark-dot { fill: var(--pink); }
.chart .axis { font-size: 10px; fill: var(--muted); font-family: var(--font-ui); }

/* ---------- Map reveal ---------- */
.map { position: relative; border-radius: var(--r-card); overflow: hidden; background: #F3E8DC; height: var(--h, 220px); isolation: isolate; }
:root[data-theme="dark"] .map { background: #241A3B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map { background: #241A3B; } }
.map svg.streets { position: absolute; inset: 0; width: 100%; height: 100%; transition: filter 1.4s var(--ease-out), transform 1.6s var(--ease-out-expo); }
.map.blurred svg.streets { filter: blur(6px) saturate(0.7); transform: scale(1.06); }
/* the street drawing is light; in dark mode dim it so labels, chips and a light status bar stay readable on every map */
:root[data-theme="dark"] .map svg.streets { filter: brightness(0.62) saturate(0.85); }
:root[data-theme="dark"] .map.blurred svg.streets { filter: blur(6px) brightness(0.55) saturate(0.7); }
:root[data-theme="dark"] .map .label { color: rgba(255, 246, 238, 0.72); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map svg.streets { filter: brightness(0.62) saturate(0.85); }
  :root:not([data-theme="light"]) .map.blurred svg.streets { filter: blur(6px) brightness(0.55) saturate(0.7); }
  :root:not([data-theme="light"]) .map .label { color: rgba(255, 246, 238, 0.72); }
}
.map .pin { position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, -100%); z-index: 3; transform-origin: bottom center; }
.map .pin.drop { animation: pin-drop .8s var(--ease-spring) both; }
.map .pin svg { width: 40px; height: 48px; filter: drop-shadow(0 6px 10px rgba(30, 20, 51, 0.35)); }
.map .ripple-ring { position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 2px solid var(--pink); z-index: 2; animation: map-ripple 2.2s ease-out infinite; }
.map .ripple-ring.two { animation-delay: .7s; }
.map .veil { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; background: rgba(255, 246, 238, 0.35); backdrop-filter: blur(2px); transition: opacity .8s var(--ease-out); }
.map .veil.gone { opacity: 0; pointer-events: none; }
.map .veil .lock { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.85); color: var(--ink); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-card); backdrop-filter: blur(10px); }
.map .veil .lock svg { width: 22px; height: 22px; }
.map .label { position: absolute; left: 12px; bottom: 10px; z-index: 3; font-size: 11px; color: rgba(30, 20, 51, 0.6); font-weight: 500; }
.map .venue-tag { position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, 10px); z-index: 3; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #FFF6EE; font-size: 12px; font-weight: 600; white-space: nowrap; animation: venue-tag-in .5s var(--ease-out) .6s both; }
@keyframes venue-tag-in { from { opacity: 0; transform: translate(-50%, 22px); } to { opacity: 1; transform: translate(-50%, 10px); } }

/* ---------- Confetti / pulse / glow ---------- */
.confetti-host { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 25; }
.confetti-piece { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: confetti-fall var(--dur, 2.6s) var(--delay, 0s) cubic-bezier(.2, .6, .4, 1) forwards; opacity: 0; }
.pulse-wrap { position: relative; display: inline-flex; }
.pulse-wrap::before, .pulse-wrap::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--pulse-color, var(--pink)); animation: pulse-ring-out 2s ease-out infinite; pointer-events: none; }
.pulse-wrap::after { animation-delay: 1s; }
.glow-wrap { box-shadow: var(--glow-pink); border-radius: inherit; animation: glow-pulse 2.4s ease-in-out infinite; }
.floaty { animation: float 4s ease-in-out infinite; }
.mesh { background: radial-gradient(at 10% 10%, var(--blush) 0, transparent 45%), radial-gradient(at 90% 15%, var(--lilac) 0, transparent 45%), radial-gradient(at 50% 100%, var(--lime) 0, transparent 50%), radial-gradient(at 100% 80%, var(--sky) 0, transparent 45%), var(--bg); }
.mesh-ink { background: radial-gradient(at 15% 0%, rgba(224, 36, 106, 0.45) 0, transparent 50%), radial-gradient(at 85% 20%, rgba(96, 60, 200, 0.5) 0, transparent 45%), radial-gradient(at 50% 110%, rgba(227, 247, 154, 0.25) 0, transparent 50%), #1E1433; color: #FFF6EE; }
.mesh-animated { background-size: 200% 200%; animation: mesh-move 14s ease-in-out infinite alternate; }
.dots-bg { background-image: radial-gradient(rgba(30, 20, 51, 0.07) 1.1px, transparent 1.2px); background-size: 14px 14px; }
.hero-illus { border-radius: var(--r-card-lg); overflow: hidden; }
.hero-illus svg { width: 100%; height: auto; }
.ink-header { background: var(--ink); color: #FFF6EE; border-radius: 0 0 28px 28px; padding: var(--safe-top) var(--gutter) 20px; margin: 0 0 16px; }
.ink-header .t-muted { color: #B9ABCB; }
.staff-root > .content { padding-top: 0; }
