/* =========================================================================
   VIRASAT — Sponsor PWA
   app.css — built entirely on tokens.css custom properties.
   No hard-coded colors, font sizes, radii, or shadows here — if a value
   isn't a token, it's a bug. See ../../design-system/STYLE_GUIDE.md.
   ========================================================================= */

* {
  box-sizing: border-box;
}

html {
  /* wired to the Sponsor text-size control, see js/app.js setTextScale() */
  font-size: calc(16px * var(--font-scale-sponsor-current, var(--font-scale-sponsor-default)));
}

body {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  font-size: var(--font-size-sponsor-body);
  line-height: var(--line-height-relaxed);
  -webkit-font-smoothing: antialiased;
  /* Layered background instead of a flat fill — same intent as the
     Narrator surface's body rule (virasat-narrator-web/styles.css): a
     couple of soft radial washes over the canvas color so a dashboard
     with lots of white cards doesn't read as a bare grey/white page.
     Kept subtle since this is a denser, scroll-heavy UI, not a single
     hero screen — entirely token colors, no new values. */
  background:
    radial-gradient(1100px 700px at 8% -8%, var(--color-primary-tint-bg) 0%, transparent 55%),
    radial-gradient(900px 650px at 100% 0%, var(--color-warm-accent-tint-bg) 0%, transparent 50%),
    var(--color-bg-canvas);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3) 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--font-size-sponsor-h1); }
h2 { font-size: var(--font-size-sponsor-h2); }
h3 { font-size: var(--font-size-sponsor-h3); }

p { margin: 0 0 var(--space-3) 0; }

a { color: var(--color-warm-accent-dark); }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

img { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Focus visibility, both surfaces share this rule */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* =========================================================================
   APP SHELL
   ========================================================================= */

#app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-nav);
  /* Sticky chrome sitting above scrolling content — a faint shadow reads
     as "elevated bar," not just a flat strip with a hairline. */
  box-shadow: var(--shadow-xs);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sponsor-h2);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  /* Small gradient + inset shade rather than a flat disc, consistent with
     the same treatment applied to .btn-primary/.play-btn elsewhere. */
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-on-primary);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.top-bar-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: var(--color-dusk);
  cursor: pointer;
}

.icon-btn:hover { background: var(--color-bg-muted); }

.lang-toggle,
.text-size-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-1);
  background: var(--color-bg-surface);
}

.lang-toggle button,
.text-size-toggle button {
  border: none;
  background: transparent;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--color-text-secondary);
  min-height: var(--touch-target-min);
  font-size: var(--font-size-sponsor-body-small);
}

.lang-toggle button[aria-pressed="true"],
.text-size-toggle button[aria-pressed="true"] {
  background: var(--color-primary-tint-bg);
  color: var(--color-primary-dark);
  font-weight: var(--font-weight-semibold);
}

main#view {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-9);
}

/* Bottom nav (mobile-first primary nav) */
.bottom-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  z-index: var(--z-sticky-nav);
  padding-bottom: env(safe-area-inset-bottom, 0);
  /* Matches .top-bar's faint elevation shadow — but cast upward since
     this bar sits at the bottom of the viewport. */
  box-shadow: 0 -2px 6px rgba(var(--shadow-color), 0.08);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-1);
  min-height: var(--touch-target-comfortable);
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sponsor-caption);
  border-top: 3px solid transparent;
}

.bottom-nav a .nav-icon {
  font-size: 22px;
  line-height: 1;
}

.bottom-nav a[aria-current="page"] {
  color: var(--color-primary-dark);
  border-top-color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

/* =========================================================================
   CARDS / COMMON COMPONENTS
   ========================================================================= */

.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  /* Outer shadow plus a faint inset top highlight — gives ordinary cards
     a touch of real depth (a raised surface) instead of a flat rectangle
     with a hairline border, matching the layered-shadow approach used on
     Narrator's .login-step / .history-card. */
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.card-hero {
  border-radius: var(--radius-xl);
  /* Hero/featured card (e.g. Home dashboard's top card, onboarding
     confirmation) — a subtle gradient fill instead of the flat surface
     color, plus a stronger layered shadow so it visually leads the
     screen the way the Narrator button leads its screen. */
  background: linear-gradient(165deg, var(--color-bg-surface) 0%, var(--color-primary-tint-bg) 130%);
  border-color: var(--color-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.section-heading a {
  font-size: var(--font-size-sponsor-body-small);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-target-comfortable);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sponsor-body);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-fast) var(--easing-standard);
}

.btn-primary {
  /* Gradient fill + soft outer shadow + inset lower shade, same technique
     as Narrator's .talk-button/.history-play-button — gives the primary
     CTA real dimensionality instead of a flat color rectangle. */
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-on-primary);
  box-shadow: var(--shadow-sm), inset 0 -3px 6px rgba(0, 0, 0, 0.10);
  border-color: transparent;
}
.btn-primary:hover {
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, var(--color-primary-dark) 100%);
  box-shadow: var(--shadow-md), inset 0 -3px 6px rgba(0, 0, 0, 0.12);
}
.btn-primary:active {
  box-shadow: var(--shadow-xs), inset 0 2px 4px rgba(0, 0, 0, 0.14);
}

.btn-secondary {
  background: var(--color-bg-surface);
  color: var(--color-primary-dark);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover { background: var(--color-bg-muted); }

.btn-text {
  background: transparent;
  color: var(--color-warm-accent-dark);
  min-height: var(--touch-target-min);
  padding: var(--space-2) var(--space-3);
}

.btn-block { width: 100%; }

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Gentle status chips — never red/amber/green, see STYLE_GUIDE Section 3-4 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sponsor-body-small);
  font-weight: var(--font-weight-medium);
}

.status-chip.status-warm {
  color: var(--color-status-warm);
  background: var(--color-status-warm-bg);
}
.status-chip.status-quiet {
  color: var(--color-status-quiet);
  background: var(--color-status-quiet-bg);
}
.status-chip.status-gentle-note {
  color: var(--color-status-gentle-note);
  background: var(--color-status-gentle-note-bg);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}

/* Forms */
.field {
  margin-bottom: var(--space-5);
}

.field label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  font-size: var(--font-size-sponsor-body);
}

.field .hint {
  font-size: var(--font-size-sponsor-body-small);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  min-height: var(--touch-target-comfortable);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-muted);
  color: var(--color-text-primary);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field.has-error input {
  border-color: var(--color-feedback-error);
  background: var(--color-feedback-error-bg);
}

.field-error {
  color: var(--color-feedback-error);
  font-size: var(--font-size-sponsor-body-small);
  margin-top: var(--space-2);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.checkbox-row input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

/* Chips (seed topics) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.chip {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  min-height: var(--touch-target-min);
  font-size: var(--font-size-sponsor-body-small);
}

.chip[aria-pressed="true"] {
  background: var(--color-warm-accent-tint-bg);
  border-color: var(--color-warm-accent);
  color: var(--color-warm-accent-dark);
  font-weight: var(--font-weight-semibold);
}

/* =========================================================================
   ONBOARDING
   ========================================================================= */

.onboarding-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-canvas);
}

.onboarding-header {
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.progress-track {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg-muted);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--easing-gentle);
}

.step-label {
  font-size: var(--font-size-sponsor-caption);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.onboarding-body {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5) var(--space-9);
}

.onboarding-footer {
  position: sticky;
  bottom: 0;
  background: var(--color-bg-canvas);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.warm-handoff-box {
  background: var(--color-warm-accent-tint-bg);
  border: 1px solid var(--color-warm-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-4) 0;
}

.warm-handoff-message {
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-style: italic;
  color: var(--color-text-primary);
  margin: var(--space-3) 0;
  border: 1px solid var(--color-border);
}

.confirmation-hero {
  text-align: center;
  padding: var(--space-6) var(--space-5);
}

.confirmation-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-status-warm-bg);
  color: var(--color-status-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto var(--space-5);
  /* The visual centerpiece of the onboarding completion screen — give it
     a soft ambient glow (radial wash, same idea as Narrator's
     .narrator-stage::before glow) plus a hairline inset ring instead of
     sitting perfectly flat. */
  box-shadow: 0 0 0 8px rgba(156, 90, 38, 0.08), var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.summary-list li {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sponsor-body);
}

.summary-list li:last-child { border-bottom: none; }

.summary-list .summary-label {
  color: var(--color-text-secondary);
  min-width: 140px;
  flex-shrink: 0;
}

/* =========================================================================
   HOME DASHBOARD
   ========================================================================= */

.home-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.narrator-identity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-primary-tint-bg);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}

.last-contact-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sponsor-body-small);
  margin-top: var(--space-1);
}

.excerpt-quote {
  background: var(--color-bg-muted);
  border-left: 4px solid var(--color-warm-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-style: italic;
  color: var(--color-text-primary);
  margin: var(--space-4) 0;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 560px) {
  .quick-links-grid { grid-template-columns: repeat(4, 1fr); }
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  text-decoration: none;
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  min-height: var(--touch-target-comfortable);
  /* These sit directly on the page background with no other container —
     give them the same soft-card presence as .card rather than leaving
     them borderline-flat. */
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-fast) var(--easing-standard),
              transform var(--duration-fast) var(--easing-standard);
}

.quick-link-card:hover {
  box-shadow: var(--shadow-sm);
}

.quick-link-card:active {
  transform: scale(0.98);
}

.quick-link-card .nav-icon { font-size: 26px; }
.quick-link-card span:last-child { font-size: var(--font-size-sponsor-body-small); }

/* =========================================================================
   DIGEST
   ========================================================================= */

.digest-entry {
  margin-bottom: var(--space-6);
}

.digest-date {
  font-size: var(--font-size-sponsor-body-small);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.digest-summary {
  font-size: var(--font-size-sponsor-body);
  line-height: var(--line-height-relaxed);
}

.audio-clip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0;
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  /* Same gradient + inset-shade treatment as .btn-primary and Narrator's
     .history-play-button, scaled down for this small circular control. */
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-on-primary);
  border: none;
  box-shadow: var(--shadow-xs), inset 0 -2px 4px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.play-btn:hover {
  box-shadow: var(--shadow-sm), inset 0 -2px 4px rgba(0, 0, 0, 0.14);
}

.audio-meta {
  flex: 1;
  font-size: var(--font-size-sponsor-body-small);
  color: var(--color-text-secondary);
}

.content-note {
  display: flex;
  gap: var(--space-3);
  background: var(--color-status-gentle-note-bg);
  color: var(--color-status-gentle-note);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sponsor-body-small);
  margin: var(--space-3) 0;
}

.gap-note {
  background: var(--color-status-gentle-note-bg);
  color: var(--color-status-gentle-note);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--font-size-sponsor-body-small);
  margin-top: var(--space-4);
}

/* =========================================================================
   ARCHIVE
   ========================================================================= */

.filter-bar {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.filter-bar input[type="search"] {
  flex: 1;
  min-width: 180px;
  min-height: var(--touch-target-comfortable);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-muted);
}

.theme-chip-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.archive-entry {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.archive-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.archive-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.tag {
  font-size: var(--font-size-sponsor-caption);
  background: var(--color-dusk-tint-bg);
  color: var(--color-dusk);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
}

.transcript-toggle {
  margin-top: var(--space-3);
}

.transcript-text {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-muted);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sponsor-body-small);
  color: var(--color-text-secondary);
  display: none;
}

.transcript-text.open { display: block; }

.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--color-text-secondary);
}

.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: var(--space-4);
}

/* =========================================================================
   BOOK
   ========================================================================= */

.book-step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-5);
}

.book-step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-tint-bg);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}

.occasion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.occasion-card {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  cursor: pointer;
  background: var(--color-bg-surface);
}

.occasion-card[aria-pressed="true"] {
  border-color: var(--color-warm-accent);
  background: var(--color-warm-accent-tint-bg);
}

.book-preview {
  aspect-ratio: 3 / 4;
  max-width: 260px;
  margin: var(--space-4) auto;
  background: linear-gradient(160deg, var(--color-primary-tint-bg), var(--color-bg-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-md);
  color: var(--color-primary-dark);
  text-align: center;
  padding: var(--space-4);
}

/* =========================================================================
   FAMILY & SETTINGS
   ========================================================================= */

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.settings-row:last-child { border-bottom: none; }

.settings-row-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-row-label .hint {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sponsor-body-small);
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast) var(--easing-standard);
  cursor: pointer;
}

.switch-track::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background: var(--color-bg-surface);
  border-radius: var(--radius-full);
  transition: transform var(--duration-fast) var(--easing-standard);
  box-shadow: var(--shadow-xs);
}

.switch input:checked + .switch-track {
  background: var(--color-primary);
}
.switch input:checked + .switch-track::before {
  transform: translateX(22px);
}

.family-member-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.family-member-row:last-child { border-bottom: none; }

.role-pill {
  font-size: var(--font-size-sponsor-caption);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-dusk-tint-bg);
  color: var(--color-dusk);
}

.danger-zone {
  border: 1px solid var(--color-feedback-error);
  background: var(--color-feedback-error-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.danger-zone h3 { color: var(--color-feedback-error); }

/* =========================================================================
   TOASTS
   ========================================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-6) + 64px);
  transform: translateX(-50%);
  background: var(--color-text-primary);
  color: var(--color-bg-canvas);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  font-size: var(--font-size-sponsor-body-small);
  max-width: 90vw;
}

/* Utility */
.mt-0 { margin-top: 0; }
.text-secondary { color: var(--color-text-secondary); }
.text-center { text-align: center; }
.flex-row { display: flex; align-items: center; gap: var(--space-3); }
.gap-2 { gap: var(--space-2); }
.mb-0 { margin-bottom: 0; }
