/* ==========================================================================
   Voice Inbox — Premium Soft Design System
   Single source of truth. Mobile-first. Light + dark via prefers-color-scheme.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --brand: #6d3df2;
  --brand-strong: #5a28e3;
  --brand-soft: #eee8ff;
  --brand-tint: rgba(109, 61, 242, 0.08);
  --brand-accent: #1778e8;

  /* Ink + surface */
  --ink: #17151f;
  --ink-soft: #2c2932;
  --muted: #8a8794;
  --muted-strong: #6e6b78;
  --line: #ebe8f0;
  --line-soft: #f4f2f7;

  --surface: #fbfaff;
  --surface-elev: #ffffff;
  --surface-overlay: rgba(255, 255, 255, 0.92);
  --surface-wash:
    radial-gradient(140% 80% at 100% 0%, rgba(109, 61, 242, 0.06), transparent 55%),
    radial-gradient(120% 70% at 0% 100%, rgba(23, 120, 232, 0.05), transparent 60%),
    #fbfaff;

  /* Status */
  --success: #2fa974;
  --warning: #d49a24;
  --danger: #d83b54;
  --listening: #e23d54;

  /* Categories (load-bearing — JS adds .tag-X / .agenda-X / .capture-icon-X) */
  --cat-ideas: #d74784;
  --cat-ideas-soft: #fde6f0;
  --cat-family: #d3ad2f;
  --cat-family-soft: #fcf3d9;
  --cat-work: #3aa0f9;
  --cat-work-soft: #def0fc;
  --cat-personal: #2fa974;
  --cat-personal-soft: #d8f1e4;
  --cat-other: #6e6b78;
  --cat-other-soft: #ececf2;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Radius scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Shadow tiers */
  --shadow-1: 0 1px 2px rgba(20, 14, 38, 0.04), 0 2px 6px rgba(20, 14, 38, 0.04);
  --shadow-2: 0 4px 14px rgba(20, 14, 38, 0.06), 0 12px 28px rgba(20, 14, 38, 0.06);
  --shadow-3: 0 24px 60px rgba(20, 14, 38, 0.18), 0 6px 18px rgba(20, 14, 38, 0.08);
  --ring: 0 0 0 4px rgba(109, 61, 242, 0.18);
  --ring-danger: 0 0 0 4px rgba(216, 59, 84, 0.18);

  /* Motion */
  --ease-snap: cubic-bezier(0.2, 0.9, 0.2, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;

  /* Type scale */
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-17: 17px;
  --fs-22: 22px;
  --fs-28: 28px;

  /* Safe area */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Layout */
  --shell-max: 460px;
  --nav-height: 64px;
}

/* ---------- Dark mode (auto) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f1f8;
    --ink-soft: #d8d5e0;
    --muted: #8e8aa0;
    --muted-strong: #b8b4c6;
    --line: #2a2733;
    --line-soft: #1f1d28;

    --surface: #0e0c14;
    --surface-elev: #181621;
    --surface-overlay: rgba(24, 22, 33, 0.92);
    --surface-wash:
      radial-gradient(140% 80% at 100% 0%, rgba(109, 61, 242, 0.18), transparent 55%),
      radial-gradient(120% 70% at 0% 100%, rgba(23, 120, 232, 0.10), transparent 60%),
      #0e0c14;

    --brand-soft: #251d44;
    --brand-tint: rgba(109, 61, 242, 0.18);

    --cat-ideas-soft: #3a1c2c;
    --cat-family-soft: #3a3217;
    --cat-work-soft: #18324a;
    --cat-personal-soft: #163a2b;
    --cat-other-soft: #2a2733;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.5), 0 12px 28px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.7), 0 6px 18px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-size: var(--fs-15);
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface-wash);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}
body.sheet-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { background: none; border: 0; }
[hidden] { display: none !important; }

a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Boot flicker prevention: hide non-home views during boot */
.booting [data-view]:not(#homeView) { display: none; }

/* Focus rings */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
button:focus-visible, .filter:focus-visible, .chip:focus-visible,
.lang-pill:focus-visible, .nav-button:focus-visible,
.icon-button:focus-visible, .destination-option:focus-visible {
  outline-color: transparent;
  box-shadow: var(--ring);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
}

/* ==========================================================================
   App shell
   ========================================================================== */
.app {
  position: relative;
  display: block;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  min-height: 100dvh;
  padding:
    calc(var(--safe-top) + var(--space-3))
    calc(var(--safe-right) + var(--space-4))
    calc(var(--safe-bottom) + var(--nav-height) + var(--space-6))
    calc(var(--safe-left) + var(--space-4));
}

.app > section[data-view] {
  animation: viewIn var(--dur-base) var(--ease-snap);
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Topbar
   ========================================================================== */
.topbar {
  position: sticky;
  top: var(--safe-top);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 calc(var(--space-4) * -1) var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-overlay);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-soft);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  box-shadow: 0 6px 16px rgba(109, 61, 242, 0.32);
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(70% 70% at 30% 20%, rgba(255,255,255,0.45), transparent 60%);
}
.brand-bar {
  width: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  display: inline-block;
  margin: 0 1px;
  position: relative;
  z-index: 1;
}
.brand-bar:nth-child(1) { height: 10px; }
.brand-bar:nth-child(2) { height: 16px; }
.brand-bar:nth-child(3) { height: 8px; }

.brand-text { min-width: 0; }
.brand-text h1 {
  font-size: var(--fs-15);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-text p {
  font-size: var(--fs-12);
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.topbar-actions { display: flex; gap: var(--space-2); }

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--surface-elev);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  transition: transform var(--dur-fast) var(--ease-snap),
              background-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.icon-button:hover { color: var(--brand); }
.icon-button:active { transform: scale(0.96); }
.icon-button.mini { width: 32px; height: 32px; border-radius: var(--radius-sm); }

.count-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-elev);
  letter-spacing: 0;
}

/* ==========================================================================
   Capture form (homeView)
   ========================================================================== */
.capture-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4) var(--space-4);
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2);
}

.capture-hero { display: flex; flex-direction: column; gap: 2px; }
.kicker {
  font-size: var(--fs-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}
.capture-hero h2 {
  font-size: var(--fs-22);
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* Language quick switch */
.language-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}
.lang-pill {
  height: 38px;
  display: grid; place-items: center;
  font-size: 18px;
  border-radius: var(--radius-md);
  background: var(--line-soft);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-snap),
              background-color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.lang-pill:hover { background: var(--brand-soft); }
.lang-pill:active { transform: scale(0.95); }
.lang-pill.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  box-shadow: var(--ring);
}

/* Field primitive */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field-label-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2);
}
.field-label {
  font-size: var(--fs-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--space-3);
  font-size: var(--fs-15);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft);
}
.field textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--muted);
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  border-color: var(--brand);
  box-shadow: var(--ring);
  background: var(--surface-elev);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8794' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) center;
  padding-right: var(--space-6);
}

/* Dictation indicator pill */
.dictation-indicator {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 4px var(--space-3) 4px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--listening);
  color: #fff;
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(226, 61, 84, 0.34);
}
.dictation-mic {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  position: relative;
  animation: dictationPulse 900ms ease-in-out infinite;
}
.dictation-mic::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  animation: dictationHalo 1.15s ease-out infinite;
}

/* Destination button */
.destination-button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--brand-tint);
  border: 1px solid transparent;
  text-align: left;
  transition: transform var(--dur-fast) var(--ease-snap),
              background-color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.destination-button:hover { background: var(--brand-soft); }
.destination-button:active { transform: scale(0.99); }

.destination-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(109, 61, 242, 0.30);
}
.destination-body {
  min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.destination-body strong {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
}
.destination-body small {
  font-size: var(--fs-13);
  color: var(--muted-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.destination-edit {
  font-style: normal;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px var(--space-2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.7);
}
@media (prefers-color-scheme: dark) {
  .destination-edit { background: rgba(255,255,255,0.06); }
}

/* Description toggle */
.optional-toggle {
  display: inline-flex; align-items: center; gap: var(--space-2);
  align-self: flex-start;
  font-size: var(--fs-13);
  color: var(--muted-strong);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
  transition: color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft);
}
.optional-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
  border-style: solid;
  background: var(--brand-soft);
}
.optional-toggle span {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
}
.optional-toggle strong { font-weight: 600; }

/* Status message */
.status-message {
  font-size: var(--fs-13);
  color: var(--muted-strong);
  min-height: 16px;
}

/* Primary button */
.primary-button {
  position: relative;
  height: 52px;
  width: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
  font-size: var(--fs-15);
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 28px rgba(109, 61, 242, 0.28),
              inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform var(--dur-fast) var(--ease-snap),
              box-shadow var(--dur-fast) var(--ease-soft),
              opacity var(--dur-fast) var(--ease-soft);
}
.primary-button:hover { box-shadow: 0 18px 32px rgba(109, 61, 242, 0.34), inset 0 1px 0 rgba(255,255,255,0.22); }
.primary-button:active { transform: translateY(1px) scale(0.99); }
.primary-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   Destination sheet
   ========================================================================== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 12, 28, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: overlayFade var(--dur-base) var(--ease-soft);
}
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: var(--shell-max);
  max-height: calc(100dvh - var(--space-6));
  background: var(--surface-elev);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding:
    var(--space-3)
    var(--space-4)
    calc(var(--safe-bottom) + var(--space-5));
  box-shadow: var(--shadow-3);
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: var(--space-4);
  animation: sheetIn var(--dur-slow) var(--ease-snap);
}
@keyframes sheetIn {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  align-self: center;
  width: 36px; height: 4px;
  background: var(--line);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
}

.sheet-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-3);
}
.sheet-heading .kicker { color: var(--brand); }
.sheet-heading h2 { font-size: var(--fs-22); }

.sheet-section { display: flex; flex-direction: column; gap: var(--space-2); }
.sheet-label {
  font-size: var(--fs-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Destination type segmented control */
.destination-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}
.destination-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--line-soft);
  border: 1px solid transparent;
  text-align: left;
  transition: transform var(--dur-fast) var(--ease-snap),
              background-color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.destination-option .option-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-elev);
  color: var(--muted-strong);
  margin-bottom: var(--space-1);
  border: 1px solid var(--line);
  transition: color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft);
}
.destination-option strong { font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.destination-option small { font-size: var(--fs-12); color: var(--muted); }
.destination-option:active { transform: scale(0.98); }
.destination-option.active {
  background: var(--surface-elev);
  border-color: var(--brand);
  box-shadow: var(--ring), var(--shadow-1);
}
.destination-option.active .option-icon {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: transparent;
}

/* Folder chips */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  height: 34px;
  padding: 0 var(--space-3);
  display: inline-grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--line-soft);
  color: var(--ink-soft);
  font-size: var(--fs-13);
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              transform var(--dur-fast) var(--ease-snap);
}
.chip:hover { background: var(--brand-soft); color: var(--brand); }
.chip:active { transform: scale(0.97); }
.chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 14px rgba(109, 61, 242, 0.28);
}

/* Schedule grid */
.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.schedule-grid .time-presets {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: var(--space-2);
}
.time-presets button {
  height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-full);
  background: var(--line-soft);
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft);
}
.time-presets button:hover { background: var(--brand-soft); color: var(--brand); }
.time-presets button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(109, 61, 242, 0.28);
}
.time-preset-clear { margin-left: auto; color: var(--muted); }
.time-preset-clear:hover { color: var(--danger); background: rgba(216,59,84,0.08); }

@media (max-width: 360px) {
  .schedule-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Search row (inside listView)
   ========================================================================== */
.search-row { margin-bottom: var(--space-4); }
.search-box {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--space-3);
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--surface-elev);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: var(--ring);
  color: var(--brand);
}
.search-box input {
  flex: 1;
  height: 100%;
  font-size: var(--fs-15);
  color: var(--ink);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ==========================================================================
   Panel + section heading
   ========================================================================== */
.panel {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
}
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.section-title h2 {
  font-size: var(--fs-17);
  letter-spacing: -0.015em;
}
.section-title.compact { margin-bottom: 0; }

.filters {
  display: flex; gap: var(--space-1);
  background: var(--line-soft);
  padding: 4px;
  border-radius: var(--radius-full);
}
.filter {
  height: 30px;
  padding: 0 var(--space-3);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--muted-strong);
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  transition: background-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.filter:hover { color: var(--ink); }
.filter.active {
  background: var(--surface-elev);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.group { display: flex; flex-direction: column; gap: var(--space-2); }
.group h3 {
  font-size: var(--fs-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ==========================================================================
   Capture list rows (JS-rendered)
   ========================================================================== */
.capture-list { display: flex; flex-direction: column; gap: var(--space-2); }

.capture-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  padding-right: var(--space-5);
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--dur-fast) var(--ease-snap),
              border-color var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.capture-item::after {
  content: '';
  position: absolute;
  right: var(--space-3);
  top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted);
  border-top: 1.5px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.5;
  transition: border-color var(--dur-fast) var(--ease-soft);
}
.capture-item:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(109, 61, 242, 0.10);
}
.capture-item:hover::after { border-color: var(--brand); opacity: 1; }
.capture-item:active { transform: scale(0.99); }

.capture-type-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  background: var(--cat-other-soft);
  color: var(--cat-other);
}

.capture-icon-ideas    { background: var(--cat-ideas-soft);    color: var(--cat-ideas); }
.capture-icon-family   { background: var(--cat-family-soft);   color: var(--cat-family); }
.capture-icon-work     { background: var(--cat-work-soft);     color: var(--cat-work); }
.capture-icon-personal { background: var(--cat-personal-soft); color: var(--cat-personal); }
.capture-icon-other    { background: var(--cat-other-soft);    color: var(--cat-other); }
.capture-icon-note     { background: var(--brand-soft);        color: var(--brand); }
.capture-icon-todo     { background: var(--cat-personal-soft); color: var(--cat-personal); }
.capture-icon-calendar_event { background: var(--cat-work-soft); color: var(--cat-work); }

.capture-content {
  min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.capture-content > strong {
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.capture-content > p {
  font-size: var(--fs-13);
  color: var(--muted-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.capture-body {
  font-size: var(--fs-13);
  color: var(--muted);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tag pill (category badge) */
.tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--cat-other-soft);
  color: var(--cat-other);
  margin-top: var(--space-1);
}
.tag-ideas    { background: var(--cat-ideas-soft);    color: var(--cat-ideas); }
.tag-family   { background: var(--cat-family-soft);   color: var(--cat-family); }
.tag-work     { background: var(--cat-work-soft);     color: var(--cat-work); }
.tag-personal { background: var(--cat-personal-soft); color: var(--cat-personal); }
.tag-other    { background: var(--cat-other-soft);    color: var(--cat-other); }

/* Done button (mini) inside capture-item */
.done-button {
  height: 30px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-full);
  background: var(--cat-personal-soft);
  color: var(--cat-personal);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              transform var(--dur-fast) var(--ease-snap);
}
.done-button:hover { background: var(--cat-personal); color: #fff; }
.done-button:active { transform: scale(0.96); }
.capture-item:has(.done-button)::after { display: none; }
.capture-item:has(.done-button) { padding-right: var(--space-3); }

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  background: var(--line-soft);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
}
.empty-state-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 22px;
  border-radius: var(--radius-md);
  background: var(--surface-elev);
  border: 1px solid var(--line);
  color: var(--muted-strong);
}
.empty-state strong {
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--ink);
}
.empty-state p {
  font-size: var(--fs-13);
  color: var(--muted);
  max-width: 28ch;
}
.empty-state-cta {
  margin-top: var(--space-2);
  height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-13);
  font-weight: 600;
  transition: filter var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-snap);
}
.empty-state-cta:hover { filter: brightness(1.06); }
.empty-state-cta:active { transform: scale(0.97); }

.panel-empty {
  background: transparent;
  border: 1px dashed var(--line);
}

/* ==========================================================================
   Screen heading
   ========================================================================== */
.screen-heading {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.screen-heading h2 {
  font-size: var(--fs-22);
  letter-spacing: -0.02em;
  text-align: left;
}
.back-button {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--surface-elev);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  transition: background-color var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.back-button:hover { color: var(--brand); }
.text-danger {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--danger);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-soft);
}
.text-danger:hover { background: rgba(216,59,84,0.08); }
.screen-heading-spacer { width: 38px; }

.detail-form { gap: var(--space-3); }
.detail-form #detailRawTranscript {
  background: var(--line-soft);
  color: var(--muted-strong);
}

/* ==========================================================================
   Calendar
   ========================================================================== */
.calendar-panel {
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-1);
}
.calendar-month {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-2) var(--space-2) var(--space-3);
}
.calendar-month strong {
  font-size: var(--fs-15);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.month-nav {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  transition: background-color var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.month-nav:hover { background: var(--brand-soft); color: var(--brand); }

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 0 2px;
  margin-bottom: var(--space-2);
}
.weekday-row span {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-day {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft);
}
.calendar-day.blank { visibility: hidden; }
.calendar-day:hover { background: var(--brand-soft); color: var(--brand); }
.calendar-day.has-items::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateX(-50%);
}
.calendar-day.selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 14px rgba(109, 61, 242, 0.32);
}
.calendar-day.selected.has-items::after { background: rgba(255,255,255,0.85); }

/* Day agenda */
.day-agenda {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-3);
  align-items: flex-start;
}
.day-rail {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--space-3) 0;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 24px rgba(109, 61, 242, 0.24);
}
.day-rail span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
.day-rail strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.agenda-list { display: flex; flex-direction: column; gap: var(--space-2); }
.agenda-card {
  position: relative;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow-1);
}
.agenda-card::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: var(--radius-full);
  background: var(--cat-other);
}
.agenda-ideas::before    { background: var(--cat-ideas); }
.agenda-family::before   { background: var(--cat-family); }
.agenda-work::before     { background: var(--cat-work); }
.agenda-personal::before { background: var(--cat-personal); }
.agenda-other::before    { background: var(--cat-other); }

.agenda-card strong { font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.agenda-card span {
  font-size: var(--fs-12);
  color: var(--muted-strong);
}

/* ==========================================================================
   Settings
   ========================================================================== */
.profile-card {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-1);
}
.avatar.large {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-17);
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(109, 61, 242, 0.30);
}
.profile-card h3 { font-size: var(--fs-17); }
.profile-card p { font-size: var(--fs-13); color: var(--muted); margin-top: 2px; }

.settings-section { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.section-heading {
  font-size: var(--fs-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-left: var(--space-2);
}

.settings-card {
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.settings-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  min-height: 60px;
}
.settings-row:last-child { border-bottom: 0; }
.settings-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand);
}
.row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.row-text strong { font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.row-text small { font-size: var(--fs-12); color: var(--muted); }
.row-meta {
  font-style: normal;
  font-size: var(--fs-13);
  color: var(--muted-strong);
}
.settings-row select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 8px 32px 8px 12px;
  font-size: var(--fs-13);
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8794' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: calc(100% - 10px) center;
  min-width: 92px;
}
.settings-row select:focus-visible { border-color: var(--brand); box-shadow: var(--ring); }

/* Folder manager */
.folder-manager { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.folder-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-soft);
}
.folder-row:focus-within { background: var(--brand-soft); }
.folder-index {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--line-soft);
  color: var(--muted-strong);
  font-size: var(--fs-13);
  font-weight: 600;
}
.folder-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.folder-field small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.folder-input {
  width: 100%;
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-soft);
}
.folder-input:focus-visible { border-color: var(--brand); }
.folder-manager .primary-button { margin-top: var(--space-2); height: 44px; }

/* ==========================================================================
   Floating mic FAB
   ========================================================================== */
.floating-action {
  position: fixed;
  right: calc(var(--safe-right) + var(--space-4));
  bottom: calc(var(--safe-bottom) + var(--nav-height) + var(--space-3));
  z-index: 50;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
  box-shadow: 0 18px 36px rgba(109, 61, 242, 0.42),
              inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform var(--dur-fast) var(--ease-snap),
              box-shadow var(--dur-base) var(--ease-soft),
              background var(--dur-base) var(--ease-soft);
}
.floating-action:active { transform: scale(0.95); }
.floating-action.listening {
  background: linear-gradient(135deg, var(--listening) 0%, #b22a40 100%);
  animation: micPulse 900ms ease-in-out infinite;
  box-shadow: 0 18px 36px rgba(226, 61, 84, 0.55), 0 0 0 0 rgba(226, 61, 84, 0.4);
}

.mic-icon {
  position: relative;
  width: 22px; height: 28px;
  display: grid;
  grid-template-rows: 16px 6px 4px;
  justify-items: center;
}
.mic-capsule {
  width: 14px; height: 16px;
  border-radius: 999px;
  background: currentColor;
}
.mic-stem {
  width: 2px; height: 6px;
  background: currentColor;
  border-radius: 999px;
  align-self: end;
}
.mic-base {
  width: 14px; height: 2px;
  background: currentColor;
  border-radius: 999px;
}

/* ==========================================================================
   App notice toast
   ========================================================================== */
.app-notice {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--nav-height) + var(--space-6));
  transform: translateX(-50%);
  z-index: 70;
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-13);
  font-weight: 500;
  padding: 10px var(--space-4);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-3);
  animation: noticeIn var(--dur-base) var(--ease-snap);
  max-width: calc(var(--shell-max) - var(--space-6));
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  .app-notice { background: var(--surface-elev); color: var(--ink); border: 1px solid var(--line); }
}
@keyframes noticeIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Bottom nav
   ========================================================================== */
.bottom-nav {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
  padding:
    var(--space-2)
    var(--space-3)
    calc(var(--safe-bottom) + var(--space-2));
  background: var(--surface-overlay);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-top: 1px solid var(--line);
  max-width: var(--shell-max);
  margin: 0 auto;
}

.nav-button {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  height: 48px;
  padding-top: 6px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft);
}
.nav-button:hover { color: var(--ink); }
.nav-button.active { color: var(--brand); }
.nav-button.active::before {
  content: '';
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--brand);
  border-radius: var(--radius-full);
}
.nav-icon { display: grid; place-items: center; }

/* ==========================================================================
   Onboarding
   ========================================================================== */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(109,61,242,0.18), transparent 70%),
    rgba(15, 12, 28, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding:
    calc(var(--safe-top) + var(--space-4))
    var(--space-4)
    calc(var(--safe-bottom) + var(--space-4));
  animation: onboardingFade var(--dur-base) var(--ease-soft);
}
@keyframes onboardingFade { from { opacity: 0; } to { opacity: 1; } }

.onboarding-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface-elev);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; gap: var(--space-3);
  animation: onboardingCard var(--dur-slow) var(--ease-snap);
}
@keyframes onboardingCard {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.onboarding-icon {
  width: 56px; height: 56px;
  display: grid;
  grid-template-rows: 22px 8px 6px;
  justify-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 12px 0;
  box-shadow: 0 12px 24px rgba(109, 61, 242, 0.30);
}
.onboarding-icon .mic-capsule { width: 18px; height: 22px; }
.onboarding-icon .mic-stem    { width: 2px; height: 8px; }
.onboarding-icon .mic-base    { width: 18px; height: 2px; }

.onboarding-card h2 {
  font-size: var(--fs-22);
  letter-spacing: -0.02em;
}
.onboarding-lead {
  font-size: var(--fs-14);
  color: var(--muted-strong);
  line-height: 1.5;
}
.onboarding-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: var(--space-2) 0;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.onboarding-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 36px;
  display: flex; flex-direction: column; gap: 2px;
}
.onboarding-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: var(--fs-12);
  font-weight: 700;
}
.onboarding-steps strong { font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.onboarding-steps span { font-size: var(--fs-13); color: var(--muted-strong); line-height: 1.45; }

/* ==========================================================================
   Keyframes (preserved names)
   ========================================================================== */
@keyframes dictationPulse {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.18); opacity: 1; }
}
@keyframes dictationHalo {
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 18px 36px rgba(226, 61, 84, 0.45), 0 0 0 0 rgba(226, 61, 84, 0.5); }
  50%      { box-shadow: 0 22px 42px rgba(226, 61, 84, 0.55), 0 0 0 16px rgba(226, 61, 84, 0); }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .floating-action.listening { animation: none; }
  .dictation-mic, .dictation-mic::after { animation: none; }
}

/* ==========================================================================
   Small phone tweaks
   ========================================================================== */
@media (max-width: 360px) {
  .topbar-actions { gap: var(--space-1); }
  .icon-button { width: 36px; height: 36px; }
  .destination-options { grid-template-columns: 1fr; }
  .destination-option { flex-direction: row; align-items: center; gap: var(--space-3); }
  .destination-option .option-icon { margin-bottom: 0; }
  .lang-pill { font-size: 16px; }
  .nav-button { font-size: 10.5px; }
}
