:root {
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-soft: rgba(56, 189, 248, .14);
  --bg: #0b0e14;
  --surface: rgba(19, 24, 38, .82);
  --surface-2: #1a2133;
  --surface-3: #222b42;
  --border: #283146;
  --text: #e7ecf5;
  --text-dim: #94a3b8;
  --danger: #f43f5e;
  --danger-text: #fb7185;
  --success: #34d399;
  --warning: #fbbf24;
  --support-coral: #ff5f5f;
  --support-gold: #ffb44a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --glow-a: rgba(56, 189, 248, .16);
  --glow-b: rgba(129, 140, 248, .12);
}

:root[data-theme="light"] {
  --bg: #f2f5fb;
  --surface: rgba(255, 255, 255, .85);
  --surface-2: #eef2f9;
  --surface-3: #e3e9f4;
  --border: #d6deeb;
  --text: #16203a;
  --text-dim: #5b6b87;
  --danger-text: #be123c;
  --shadow: 0 18px 50px rgba(40, 60, 110, .12);
  --glow-a: rgba(56, 189, 248, .18);
  --glow-b: rgba(129, 140, 248, .14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon {
  width: 1.1em; height: 1.1em; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.heading-icon { width: 1.05em; height: 1.05em; vertical-align: -.14em; color: var(--accent); }

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
}

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 480px at 85% -10%, var(--glow-a) 0%, transparent 60%),
    radial-gradient(700px 420px at -10% 30%, var(--glow-b) 0%, transparent 60%);
}

/* ---------- Welcome screen ---------- */
body.locked { overflow: hidden; }

.welcome {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 28px 18px;
  transition: opacity .55s ease, visibility .55s;
}
.welcome.dismissed { opacity: 0; visibility: hidden; pointer-events: none; }

.welcome-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
  animation: drift 14s ease-in-out infinite alternate;
}
.o1 { width: 520px; height: 520px; top: -190px; left: 4%; background: var(--accent); opacity: .32; }
.o2 { width: 480px; height: 480px; bottom: -160px; right: 3%; background: var(--accent-2); opacity: .28; animation-delay: -5s; }
.o3 { width: 300px; height: 300px; top: 28%; left: 45%; background: #2563eb; opacity: .2; animation-delay: -9s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}

.welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(56,189,248,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 36%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 36%, #000 0%, transparent 72%);
}

.welcome-inner {
  position: relative; width: min(1260px, 100%); margin: auto;
}
.welcome-panel {
  --text: #e7ecf5;
  --text-dim: #94a3b8;
  position: relative;
  overflow: hidden;
  min-height: min(82vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  border: 1px solid rgba(148, 197, 255, .34);
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 8%, rgba(56,189,248,.2), transparent 28%),
    linear-gradient(135deg, rgba(17, 26, 44, .92), rgba(8, 12, 23, .96) 54%, rgba(11, 18, 33, .98));
  color: var(--text);
  color-scheme: dark;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .64), 0 0 0 1px rgba(255,255,255,.035) inset;
  opacity: 0;
  animation: wUp .75s cubic-bezier(.2,.7,.3,1) forwards;
}
.welcome-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 240px at 30% 100%, rgba(56,189,248,.22), transparent 70%);
}
@keyframes wUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.welcome-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 42px 56px 72px;
}
.welcome-mark {
  width: 102px;
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  animation: logoFloat 5s ease-in-out 1s infinite;
}
.welcome-mark img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 22px 52px rgba(56,189,248,.28));
}
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.welcome-title {
  font-size: clamp(3.2rem, 7vw, 5.25rem); font-weight: 850; letter-spacing: -3px; line-height: .98;
  text-shadow: 0 14px 48px rgba(0,0,0,.5);
}
.welcome-title span {
  background: linear-gradient(110deg, var(--accent) 20%, var(--accent-2) 40%, var(--accent) 60%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% center; } }

.welcome-sub { color: rgba(226,232,240,.78); font-size: clamp(1.08rem, 2vw, 1.35rem); max-width: 520px; line-height: 1.45; margin: 14px 0 26px; }

.welcome-cta {
  position: relative;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  min-width: min(520px, 100%);
  background: linear-gradient(100deg, #22d3ee, #2563eb 58%, #4f46e5);
  color: #08101e; font: 700 1.05rem 'Inter', sans-serif;
  border: 1px solid rgba(186,230,253,.72); border-radius: 20px; padding: 18px 26px; cursor: pointer;
  box-shadow: 0 18px 52px rgba(37,99,235,.36), 0 0 0 4px rgba(56,189,248,.1);
  transition: transform .18s, box-shadow .18s;
  animation: wUp .7s cubic-bezier(.2,.7,.3,1) .62s forwards, ctaGlow 2.4s ease-in-out 1.6s infinite;
}
.welcome-cta:hover { transform: translateY(-2px) scale(1.02); }
.cta-spark {
  width: 22px;
  height: 22px;
  display: inline-block;
  background: currentColor;
  clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%);
}
.cta-arrow { transition: transform .2s; }
.welcome-cta:hover .cta-arrow { transform: translateX(4px); }
@keyframes ctaGlow {
  0%,100% { box-shadow: 0 12px 36px var(--accent-soft); }
  50% { box-shadow: 0 12px 52px var(--accent-soft), 0 0 0 6px var(--accent-soft); }
}

.welcome-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
  color: rgba(226,232,240,.8);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.welcome-trust span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.welcome-trust i {
  width: 24px; height: 24px;
  display: inline-grid; place-items: center;
  border-radius: 8px; font-style: normal;
  flex-shrink: 0;
}
.ti-account {
  color: #38bdf8;
  background: rgba(56,189,248,.12);
  border: 1px solid rgba(56,189,248,.25);
  box-shadow: 0 0 10px rgba(56,189,248,.15);
}
.ti-free {
  color: #a78bfa;
  background: rgba(167,139,250,.12);
  border: 1px solid rgba(167,139,250,.25);
  box-shadow: 0 0 10px rgba(167,139,250,.15);
}
.ti-shield {
  color: #34d399;
  background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.25);
  box-shadow: 0 0 10px rgba(52,211,153,.15);
}
.welcome-privacy {
  width: min(560px, 100%);
  margin-top: 14px;
  padding: 11px;
  border: 1px solid rgba(148, 197, 255, .24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .68), rgba(15, 23, 42, .34)),
    radial-gradient(circle at 12% 0%, rgba(56,189,248,.16), transparent 38%);
  box-shadow: 0 18px 52px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.025) inset;
  backdrop-filter: blur(16px);
  text-align: left;
}
.privacy-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.privacy-kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(52,211,153,.12);
}
.welcome-privacy p {
  color: rgba(226,232,240,.82);
  font-size: .8rem;
  line-height: 1.42;
  margin-bottom: 8px;
}
.privacy-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.privacy-points span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 13px;
  background: rgba(2,6,23,.24);
}
.privacy-points strong,
.privacy-points small {
  display: block;
}
.privacy-points strong {
  color: var(--text);
  font-size: .74rem;
  margin-bottom: 2px;
}
.privacy-points small {
  color: rgba(203,213,225,.68);
  font-size: .66rem;
  line-height: 1.2;
}

.welcome-preview {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 40px 38px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(2,6,23,.18), rgba(2,6,23,.52));
}
.preview-label {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(56,189,248,.24);
  border-radius: 999px;
  color: rgba(226,232,240,.86);
  background: rgba(2,6,23,.48);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  animation: previewBreath 5s ease-in-out 1.2s infinite;
}
.preview-label-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(244,63,94,.1);
  animation: recordingPulse 1.45s ease-in-out infinite;
}
.recording-sample {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(125,211,252,.24);
  border-radius: 26px;
  background: radial-gradient(circle at 20% 0%, rgba(56,189,248,.24), transparent 34%), rgba(10, 16, 29, .82);
  box-shadow: 0 26px 80px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.055) inset, 0 0 58px rgba(56,189,248,.14);
  backdrop-filter: blur(18px);
  animation: previewBreath 5.6s ease-in-out 1.2s infinite;
}
.recording-sample::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(2,6,23,.58) 100%), linear-gradient(110deg, transparent 0%, rgba(125,211,252,.08) 48%, transparent 70%);
  transform: translateX(-130%);
  animation: previewSheen 6.8s ease-in-out infinite;
}
.sample-window-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 2px 4px 0;
  color: rgba(226,232,240,.82);
  font-size: .72rem;
  font-weight: 800;
}
.sample-window-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sample-window-bar small {
  color: rgba(52,211,153,.9);
  font-size: .66rem;
  font-weight: 800;
}
.sample-video-stage {
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  background: #020617;
  box-shadow: 0 16px 44px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.sample-video-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(2,6,23,.34) 100%);
}
.sample-video-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.18) saturate(1.12) contrast(1.03);
}
.sample-rec-overlay {
  position: absolute;
  inset: 12px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 10px;
  pointer-events: none;
}
.sample-rec-pill,
.sample-mode-pill {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2,6,23,.66);
  box-shadow: 0 14px 34px rgba(0,0,0,.26);
  backdrop-filter: blur(14px);
  font-size: .76rem;
  font-weight: 800;
}
.sample-rec-pill i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(244,63,94,.1);
  animation: recordingPulse 1.45s ease-in-out infinite;
}
.sample-mode-pill {
  justify-self: end;
  color: rgba(203,213,225,.86);
}
.sample-wave {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(56,189,248,.2);
  border-radius: 999px;
  background: rgba(2,6,23,.5);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
}
.sample-wave i {
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7dd3fc, var(--accent-2));
  opacity: .92;
  transform-origin: 50% 50%;
  animation: waveDance 1.25s ease-in-out infinite;
}
.sample-wave i:nth-child(1) { height: 14px; animation-delay: -.52s; }
.sample-wave i:nth-child(2) { height: 26px; animation-delay: -.18s; }
.sample-wave i:nth-child(3) { height: 18px; animation-delay: -.44s; }
.sample-wave i:nth-child(4) { height: 34px; animation-delay: -.08s; }
.sample-wave i:nth-child(5) { height: 22px; animation-delay: -.34s; }
.sample-wave i:nth-child(6) { height: 30px; animation-delay: -.68s; }
.sample-wave i:nth-child(7) { height: 16px; animation-delay: -.26s; }
.sample-wave i:nth-child(8) { height: 28px; animation-delay: -.58s; }
.sample-wave i:nth-child(9) { height: 12px; animation-delay: -.12s; }
.sample-wave i:nth-child(10) { height: 24px; animation-delay: -.4s; }
.sample-caption {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  transform: translateX(-50%);
  max-width: calc(100% - 36px);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226,232,240,.14);
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(12px);
  color: rgba(226,232,240,.9);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
  animation: liveTextPulse 1.9s ease-in-out .25s infinite;
}
.sample-transcript {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 16px;
  background: rgba(2,6,23,.42);
}
.sample-transcript-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1px;
}
.sample-transcript-head strong {
  color: rgba(226,232,240,.92);
  font-size: .74rem;
}
.sample-transcript-head span {
  color: rgba(148,163,184,.78);
  font-size: .66rem;
}
.sample-transcript p {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  margin: 0;
  color: rgba(226,232,240,.74);
  font-size: .68rem;
  line-height: 1.35;
}
.sample-transcript time {
  color: rgba(148,163,184,.76);
}
.sample-transcript p:nth-of-type(2) span {
  color: #7dd3fc;
  font-weight: 800;
}
.sample-transcript small {
  margin-top: 1px;
  color: var(--success);
  font-size: .68rem;
  font-weight: 700;
  animation: liveTextPulse 1.7s ease-in-out infinite;
}
.preview-recording,
.preview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.14);
  background: rgba(10, 16, 29, .72);
  box-shadow: 0 18px 50px rgba(0,0,0,.22), 0 0 0 1px rgba(255,255,255,.025) inset;
  backdrop-filter: blur(18px);
}
.preview-recording::after,
.preview-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(125,211,252,.08) 48%, transparent 70%);
  transform: translateX(-130%);
  animation: previewSheen 6.8s ease-in-out infinite;
}
.preview-recording {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 14px 16px;
  animation: previewCardRise .72s cubic-bezier(.2,.7,.3,1) .55s both, previewBreath 5s ease-in-out 1.2s infinite;
}
.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(244,63,94,.1);
  animation: recordingPulse 1.45s ease-in-out infinite;
}
.preview-recording strong,
.preview-recording span { font-size: .84rem; }
.preview-wave,
.audio-bars {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.preview-wave i,
.audio-bars i {
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: .92;
  transform-origin: 50% 50%;
  animation: waveDance 1.25s ease-in-out infinite;
}
.preview-wave i:nth-child(1), .audio-bars i:nth-child(2) { height: 14px; }
.preview-wave i:nth-child(2), .audio-bars i:nth-child(5) { height: 26px; }
.preview-wave i:nth-child(3), .audio-bars i:nth-child(8) { height: 18px; }
.preview-wave i:nth-child(4), .audio-bars i:nth-child(3) { height: 34px; }
.preview-wave i:nth-child(5), .audio-bars i:nth-child(10) { height: 22px; }
.preview-wave i:nth-child(6), .audio-bars i:nth-child(1) { height: 30px; }
.preview-wave i:nth-child(7), .audio-bars i:nth-child(7) { height: 16px; }
.preview-wave i:nth-child(8), .audio-bars i:nth-child(11) { height: 28px; }
.preview-wave i:nth-child(9), .audio-bars i:nth-child(4) { height: 12px; }
.preview-wave i:nth-child(10), .audio-bars i:nth-child(6) { height: 24px; }
.audio-bars i:nth-child(9), .audio-bars i:nth-child(12) { height: 18px; }
.preview-wave i:nth-child(1), .audio-bars i:nth-child(1) { animation-delay: -.52s; }
.preview-wave i:nth-child(2), .audio-bars i:nth-child(2) { animation-delay: -.18s; }
.preview-wave i:nth-child(3), .audio-bars i:nth-child(3) { animation-delay: -.44s; }
.preview-wave i:nth-child(4), .audio-bars i:nth-child(4) { animation-delay: -.08s; }
.preview-wave i:nth-child(5), .audio-bars i:nth-child(5) { animation-delay: -.34s; }
.preview-wave i:nth-child(6), .audio-bars i:nth-child(6) { animation-delay: -.68s; }
.preview-wave i:nth-child(7), .audio-bars i:nth-child(7) { animation-delay: -.26s; }
.preview-wave i:nth-child(8), .audio-bars i:nth-child(8) { animation-delay: -.58s; }
.preview-wave i:nth-child(9), .audio-bars i:nth-child(9) { animation-delay: -.12s; }
.preview-wave i:nth-child(10), .audio-bars i:nth-child(10) { animation-delay: -.4s; }
.audio-bars i:nth-child(11) { animation-delay: -.22s; }
.audio-bars i:nth-child(12) { animation-delay: -.62s; }
.preview-card {
  border-radius: 18px;
  padding: 18px;
  animation: previewCardRise .72s cubic-bezier(.2,.7,.3,1) both;
}
.transcript-preview { animation-delay: .72s; }
.summary-preview { animation-delay: .9s; }
.audio-preview { animation-delay: 1.08s; }
.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  margin-bottom: 14px;
}
.preview-head strong { font-size: .9rem; }
.preview-head span { color: var(--text-dim); font-size: .74rem; }
.transcript-preview p {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  color: rgba(226,232,240,.78);
  font-size: .82rem;
  line-height: 1.55;
  margin-bottom: 7px;
  animation: transcriptLineIn .55s cubic-bezier(.2,.7,.3,1) both;
}
.transcript-preview p:nth-of-type(1) { animation-delay: 1.04s; }
.transcript-preview p:nth-of-type(2) { animation-delay: 1.28s; }
.transcript-preview p:nth-of-type(3) { animation-delay: 1.52s; }
.transcript-preview p:nth-of-type(4) { animation-delay: 1.76s; }
.transcript-preview time { color: var(--text-dim); font-size: .75rem; }
.transcript-preview b {
  color: #7dd3fc;
  font-weight: 700;
  animation: transcriptFocus 2.8s ease-in-out 1.75s infinite;
}
.transcript-preview small {
  color: var(--success);
  font-size: .78rem;
  animation: liveTextPulse 1.7s ease-in-out infinite;
}
.summary-preview ul {
  display: grid;
  gap: 10px;
  list-style: none;
}
.summary-preview li {
  border: 1px solid rgba(148,163,184,.13);
  border-radius: 11px;
  padding: 9px 12px;
  color: rgba(226,232,240,.78);
  background: rgba(30,41,59,.42);
  font-size: .8rem;
  animation: summaryLineIn .58s cubic-bezier(.2,.7,.3,1) both;
}
.summary-preview li:nth-child(1) { animation-delay: 1.36s; }
.summary-preview li:nth-child(2) { animation-delay: 1.56s; }
.summary-preview li:nth-child(3) { animation-delay: 1.76s; }
.audio-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}
.audio-play {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(148,163,184,.14);
  color: var(--text);
  animation: playButtonPulse 2.4s ease-in-out infinite;
}
.audio-preview span {
  grid-column: 2;
  justify-self: end;
  color: var(--success);
  font-size: .76rem;
  animation: liveTextPulse 1.9s ease-in-out .25s infinite;
}
@keyframes previewCardRise {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes previewBreath {
  0%, 100% { box-shadow: 0 18px 50px rgba(0,0,0,.22), 0 0 0 1px rgba(255,255,255,.025) inset; }
  50% { box-shadow: 0 22px 58px rgba(37,99,235,.2), 0 0 0 1px rgba(125,211,252,.09) inset; }
}
@keyframes previewSheen {
  0%, 34% { transform: translateX(-130%); opacity: 0; }
  46% { opacity: 1; }
  64%, 100% { transform: translateX(130%); opacity: 0; }
}
@keyframes recordingPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(244,63,94,.1); }
  50% { transform: scale(1.18); box-shadow: 0 0 0 9px rgba(244,63,94,.04), 0 0 20px rgba(244,63,94,.44); }
}
@keyframes waveDance {
  0%, 100% { transform: scaleY(.78); opacity: .76; }
  45% { transform: scaleY(1.22); opacity: 1; }
}
@keyframes transcriptLineIn {
  from { opacity: 0; transform: translateX(10px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes transcriptFocus {
  0%, 100% { color: #7dd3fc; text-shadow: 0 0 0 rgba(125,211,252,0); }
  50% { color: #bae6fd; text-shadow: 0 0 16px rgba(125,211,252,.32); }
}
@keyframes liveTextPulse {
  0%, 100% { opacity: .82; }
  50% { opacity: 1; text-shadow: 0 0 14px rgba(52,211,153,.24); }
}
@keyframes summaryLineIn {
  from { opacity: 0; transform: translateY(8px); border-color: rgba(56,189,248,.28); }
  to { opacity: 1; transform: none; }
}
@keyframes playButtonPulse {
  0%, 100% { transform: scale(1); background: rgba(148,163,184,.14); }
  50% { transform: scale(1.08); background: rgba(56,189,248,.16); box-shadow: 0 0 0 8px rgba(56,189,248,.05); }
}
@media (prefers-reduced-motion: reduce) {
  .preview-recording,
  .preview-card,
  .preview-label,
  .preview-label-dot,
  .recording-sample,
  .sample-rec-pill i,
  .sample-wave i,
  .sample-caption,
  .sample-transcript small,
  .preview-dot,
  .preview-wave i,
  .audio-bars i,
  .transcript-preview p,
  .transcript-preview b,
  .transcript-preview small,
  .summary-preview li,
  .audio-play,
  .audio-preview span,
  .support-header-link::before {
    animation: none !important;
  }
  .preview-recording::after,
  .preview-card::after,
  .recording-sample::after {
    display: none;
  }
}
.welcome-foot {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px;
  border-top: 1px solid rgba(148,163,184,.12);
  color: rgba(226,232,240,.66);
  background: rgba(2,6,23,.28);
  font-size: .9rem;
}
.welcome-foot span { color: var(--accent); }

.api-setup-notice {
  position: relative;
  z-index: 6;
  width: min(880px, calc(100vw - 28px));
  margin: 4px auto 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  background: rgba(12, 17, 30, .92);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: api-setup-in .35s cubic-bezier(.2,.7,.3,1) both;
}
.api-setup-notice[hidden] { display: none; }
@keyframes api-setup-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.api-setup-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #08101e;
  font-weight: 900;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px var(--accent-soft);
}
.api-setup-copy { min-width: 0; }
.api-setup-copy strong { display: block; font-size: .95rem; margin-bottom: 3px; }
.api-setup-copy span { color: var(--text-dim); font-size: .84rem; line-height: 1.45; }
.api-setup-actions { display: flex; align-items: center; gap: 8px; }
.api-setup-actions .ghost-btn {
  text-decoration: none;
  white-space: nowrap;
}
.api-setup-actions .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

@media (max-height: 760px) and (min-width: 760px) {
  .welcome { padding: 14px 18px; }
  .welcome-panel { min-height: calc(100vh - 28px); }
  .welcome-copy { padding: 28px 50px 58px; }
  .welcome-mark { width: 86px; height: 86px; margin-bottom: 14px; }
  .welcome-title { font-size: clamp(3rem, 6vw, 4.6rem); }
  .welcome-sub { margin: 10px 0 20px; font-size: clamp(1rem, 1.6vw, 1.18rem); }
  .welcome-cta { padding: 15px 24px; }
  .welcome-trust { margin-top: 14px; gap: 10px 16px; font-size: .82rem; }
  .welcome-privacy { margin-top: 12px; padding: 10px; }
  .welcome-privacy p { font-size: .76rem; margin-bottom: 7px; }
  .privacy-points span { padding: 6px 7px; }
  .welcome-preview { padding: 32px 38px 58px; }
  .recording-sample { padding: 10px; gap: 8px; }
  .sample-transcript { padding: 10px; gap: 5px; }
  .welcome-foot { padding: 16px; }
}

@media (max-width: 560px) {
  .welcome { align-items: flex-start; padding: 12px; }
  .welcome-panel {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }
  .welcome-panel::before { background: radial-gradient(440px 240px at 50% 0%, rgba(56,189,248,.18), transparent 72%); }
  .welcome-copy { padding: 34px 22px 24px; }
  .welcome-mark { width: 82px; height: 82px; margin-bottom: 18px; }
  .welcome-title { font-size: clamp(2.45rem, 14vw, 3.6rem); letter-spacing: -1.8px; }
  .welcome-sub { margin: 14px 0 24px; font-size: 1rem; }
  .welcome-cta { min-width: 0; width: 100%; padding: 15px 18px; }
  .welcome-trust { gap: 10px; margin-top: 18px; font-size: .78rem; }
  .welcome-privacy { margin-top: 16px; padding: 12px; }
  .welcome-privacy p { font-size: .78rem; }
  .privacy-points { grid-template-columns: 1fr; }
  .welcome-preview { display: none; }
  .preview-label { font-size: .72rem; padding: 8px 11px; }
  .recording-sample { border-radius: 19px; }
  .sample-window-bar { font-size: .68rem; }
  .sample-window-bar small { display: none; }
  .sample-video-stage { aspect-ratio: 4 / 3; border-radius: 14px; }
  .sample-rec-overlay { inset: 10px; grid-template-columns: 1fr; }
  .sample-rec-pill,
  .sample-mode-pill { justify-self: start; font-size: .68rem; padding: 8px 10px; }
  .sample-mode-pill { display: none; }
  .sample-wave { grid-column: 1; justify-self: end; padding: 8px 10px; gap: 4px; }
  .sample-caption { bottom: 10px; max-width: calc(100% - 24px); font-size: .66rem; padding: 6px 10px; }
  .sample-transcript { padding: 10px; border-radius: 14px; }
  .sample-transcript p { grid-template-columns: 36px 1fr; font-size: .64rem; }
  .preview-recording { grid-template-columns: auto auto auto; }
  .preview-wave { grid-column: 1 / -1; justify-content: flex-start; margin-top: 4px; }
  .preview-card { padding: 14px; border-radius: 15px; }
  .summary-preview { display: none; }
  .audio-preview { grid-template-columns: auto 1fr; }
  .welcome-foot { position: relative; padding: 16px 18px; text-align: center; font-size: .78rem; }
  .api-setup-notice { grid-template-columns: auto 1fr; align-items: flex-start; }
  .api-setup-actions { grid-column: 1 / -1; width: 100%; }
  .api-setup-actions .ghost-btn,
  .api-setup-actions .primary-btn { flex: 1; justify-content: center; }
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 14px; max-width: 920px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 46px; height: 46px; filter: drop-shadow(0 4px 14px var(--accent-soft)); }
.brand h1 { font-size: 1.4rem; letter-spacing: .2px; font-weight: 800; }
.brand h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { font-size: .68rem; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.topbar-actions { display: flex; gap: 10px; }

.support-header-link {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px 0 9px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 15%, rgba(255,255,255,.3), transparent 24%),
    linear-gradient(135deg, var(--support-coral), #ff7660 48%, var(--support-gold));
  box-shadow: 0 8px 24px rgba(255,95,95,.22), 0 1px 0 rgba(255,255,255,.28) inset;
  text-decoration: none;
  font: 800 .78rem 'Inter', sans-serif;
  letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.support-header-link::before {
  content: '';
  position: absolute;
  inset: -70% auto -70% -45%;
  z-index: -1;
  width: 44%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  transform: rotate(18deg);
  animation: support-sheen 5.5s ease-in-out infinite;
}
.support-header-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 13px 32px rgba(255,95,95,.32), 0 1px 0 rgba(255,255,255,.34) inset;
}
.support-header-link:focus-visible,
.about-support:focus-visible,
.support-foot-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--support-gold) 72%, white);
  outline-offset: 3px;
}
.support-cup {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--support-coral);
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 12px rgba(99,24,34,.2);
}
.support-cup svg { width: 18px; height: 18px; }
@keyframes support-sheen {
  0%, 64% { transform: translateX(0) rotate(18deg); opacity: 0; }
  72% { opacity: 1; }
  88%, 100% { transform: translateX(430%) rotate(18deg); opacity: 0; }
}

.icon-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  width: 42px; height: 42px; border-radius: 13px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
  transition: .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }
.guide-launch-btn {
  height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 13px; border-radius: 13px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  font: 700 .78rem 'Inter', sans-serif; transition: .2s; white-space: nowrap;
}
.guide-launch-btn:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.guide-launch-btn .ui-icon { width: 19px; height: 19px; }

/* ---------- Layout ---------- */
main { max-width: 920px; margin: 0 auto; padding: 0 18px 40px; display: grid; gap: 18px; }
#appMain:focus { outline: none; }

.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  animation: rise .4s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card h2 { font-size: 1.12rem; font-weight: 700; }

/* ---------- Stats ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card {
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
  animation: rise .4s ease both;
}
.stat-num {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }

/* ---------- Mode tabs ---------- */
.mode-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 6px; margin-bottom: 18px;
}
.mode-tab {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; border: none; border-radius: 10px;
  color: var(--text-dim); font: 600 .85rem 'Inter', sans-serif;
  padding: 11px 8px; cursor: pointer; transition: .2s;
}
.mode-tab svg { width: 17px; height: 17px; flex-shrink: 0; }
.mode-tab:hover { color: var(--text); }
.mode-tab:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.mode-tab:disabled:hover {
  color: var(--text-dim);
  transform: none;
}
.mode-tab.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #08101e; box-shadow: 0 6px 18px var(--accent-soft);
}

.mode-guide { min-height: 0; }
.mobile-guide {
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(56,189,248,.35);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: .86rem;
  line-height: 1.5;
}
.hint { color: var(--text-dim); font-size: .9rem; line-height: 1.55; }
.guide { margin: 10px 0 6px 18px; color: var(--text-dim); font-size: .88rem; line-height: 1.7; }
.guide strong { color: var(--text); }
.recording-help { margin-top: 10px; }
.recording-help summary {
  width: fit-content; color: var(--accent); font-size: .82rem; font-weight: 750;
  cursor: pointer; list-style: none; padding: 5px 0;
}
.recording-help summary::-webkit-details-marker { display: none; }
.recording-help summary::after { content: ' +'; }
.recording-help[open] summary::after { content: ' −'; }
.recording-help .guide { margin-top: 5px; }

/* ---------- Toggles ---------- */
.toggle {
  display: flex; align-items: center; gap: 10px; font-size: .9rem;
  margin: 16px 0 18px; cursor: pointer; user-select: none;
}
.toggle.small-toggle { margin: 12px 0 0; font-size: .85rem; }
.toggle input { display: none; }
.toggle .track {
  width: 42px; height: 24px; border-radius: 12px; background: var(--surface-3);
  border: 1px solid var(--border); position: relative; transition: .2s; flex-shrink: 0;
}
.toggle .thumb {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--text-dim); transition: .2s;
}
.toggle input:checked + .track { background: var(--accent-soft); border-color: var(--accent); }
.toggle input:checked + .track .thumb { left: 21px; background: var(--accent); }

/* ---------- Buttons ---------- */
.primary-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #08101e; font-weight: 700; font-size: 1rem; font-family: inherit;
  border: none; border-radius: 14px; padding: 14px 28px; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px var(--accent-soft); }
.primary-btn.small { padding: 10px 20px; font-size: .88rem; }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.record-btn { position: relative; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(244,63,94,.5); animation: ring 2s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(244,63,94,.45); } 70% { box-shadow: 0 0 0 9px rgba(244,63,94,0); } 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0); } }

.ghost-btn {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 18px; font: 500 .88rem 'Inter', sans-serif;
  cursor: pointer; transition: .2s; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.ghost-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.ghost-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.danger-ghost { color: var(--danger-text); }
.danger-ghost:hover { border-color: var(--danger); }

.danger-btn {
  background: var(--danger); color: #fff; border: none;
  border-radius: 12px; padding: 11px 22px; font: 700 .9rem 'Inter', sans-serif; cursor: pointer;
}
.danger-btn:hover { filter: brightness(1.1); }

.consent-note {
  margin-top: 16px; font-size: .8rem; color: var(--warning);
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25);
  border-radius: 10px; padding: 10px 14px; line-height: 1.5;
}

.privacy-consent {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, .28);
  border-radius: 12px;
  background: rgba(251, 191, 36, .07);
}
.privacy-consent .toggle.small-toggle { margin-top: 0; font-weight: 700; }
.privacy-consent .hint { margin: 8px 0 0; }

/* ---------- Live view ---------- */
.live-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--danger); font-weight: 800; letter-spacing: 2.5px; font-size: .78rem;
}
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.timer { font-variant-numeric: tabular-nums; font-size: 1.45rem; font-weight: 700; }

.live-caption-bar {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 45;
  transform: translateX(-50%);
  width: min(860px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(9, 13, 23, .9);
  color: #f8fafc;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.live-caption-badge {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(52,211,153,.16);
  border: 1px solid rgba(52,211,153,.42);
  color: var(--success);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.live-caption-badge.waiting { color: var(--warning); border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.14); }
.live-caption-badge.off { color: var(--text-dim); border-color: var(--border); background: var(--surface-3); }
.live-caption-badge.error { color: #fda4af; border-color: var(--danger); background: rgba(244,63,94,.16); }
.live-caption-text {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.live-caption-text.is-placeholder { color: rgba(248,250,252,.68); font-style: italic; font-weight: 500; }

.recording-health {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.health-card {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
}
.health-card span {
  display: block;
  color: var(--text-dim);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.health-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: .88rem;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.health-card.good { border-color: rgba(52,211,153,.42); background: rgba(52,211,153,.09); }
.health-card.warn { border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.1); }
.health-card.bad { border-color: rgba(244,63,94,.55); background: rgba(244,63,94,.12); }
.health-card.good strong { color: var(--success); }
.health-card.warn strong { color: var(--warning); }
.health-card.bad strong { color: #fda4af; }

.live-preview-wrap {
  position: relative;
  min-height: 220px;
  background: #000;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.live-preview-wrap.audio-only {
  min-height: 0;
  background: var(--surface-2);
}
#livePreview {
  width: 100%; max-height: 360px; background: #000; display: block;
}
.live-preview-wrap.audio-only #livePreview { display: none; }
#levelCanvas { width: 100%; height: 64px; display: block; margin-top: 12px; border-radius: 10px; }

.audio-status { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.a-chip {
  font-size: .78rem; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-dim); background: var(--surface-2);
  line-height: 1.4;
}
.a-chip.good { color: var(--success); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.a-chip.bad {
  color: #fda4af; border-color: var(--danger); background: rgba(244,63,94,.12);
  animation: pulse 1.2s infinite;
}

.live-transcript {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
}
.live-transcript-overlay {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  margin-top: 0;
  background: rgba(10, 14, 24, .82);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.live-preview-wrap.audio-only .live-transcript-overlay {
  position: static;
  background: var(--surface-2);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.live-transcript-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 13px 15px; border-bottom: 1px solid var(--border);
}
.live-transcript-head h3 { font-size: .94rem; font-weight: 700; margin-bottom: 3px; }
.live-transcript-head p { color: var(--text-dim); font-size: .78rem; line-height: 1.45; }
.lt-badge {
  flex-shrink: 0; border: 1px solid rgba(52,211,153,.4); color: var(--success);
  background: rgba(52,211,153,.1); border-radius: 999px; padding: 4px 10px;
  font-size: .72rem; font-weight: 700;
}
.lt-badge.waiting { color: var(--warning); border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.1); }
.lt-badge.off { color: var(--text-dim); border-color: var(--border); background: var(--surface-3); }
.lt-badge.error { color: #fda4af; border-color: var(--danger); background: rgba(244,63,94,.12); }
.live-transcript-text {
  min-height: 76px; max-height: 150px; overflow-y: auto; padding: 15px;
  color: var(--text); font-size: .94rem; line-height: 1.65; white-space: pre-wrap;
}
.live-preview-wrap.audio-only .live-transcript-text { min-height: 110px; max-height: 190px; }
.live-transcript-text.is-placeholder { color: var(--text-dim); font-style: italic; }
.live-transcript-text .interim { color: var(--text-dim); }
.live-controls { display: flex; gap: 12px; margin-top: 16px; }

/* ---------- Recordings list ---------- */
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.count-badge {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 11px; font-size: .76rem; color: var(--text-dim); font-weight: 600;
}
.search-wrap {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 13px; min-width: 250px;
}
.search-wrap svg { width: 16px; height: 16px; color: var(--text-dim); flex: 0 0 16px; }
.search-wrap input {
  background: none; border: none; outline: none; color: var(--text);
  font: 400 .86rem 'Inter', sans-serif; width: 100%; min-width: 0; padding: 0;
}
.search-wrap:focus-within { border-color: var(--accent); }
.library-filters {
  display: flex; align-items: end; gap: 10px; flex-wrap: wrap;
  margin: -4px 0 16px; padding: 10px;
  border: 1px solid var(--border); border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 74%, transparent);
}
.library-filters[hidden] { display: none; }
.library-filters label { display: grid; gap: 5px; min-width: 170px; }
.library-filters label > span {
  color: var(--text-dim); font-size: .68rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
}
.library-filters select {
  min-height: 40px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-3); color: var(--text); padding: 7px 34px 7px 10px;
  font: 700 .8rem 'Inter', sans-serif;
}
.library-filters .ghost-btn { min-height: 40px; }

.empty-msg { color: var(--text-dim); font-size: .9rem; line-height: 1.6; }

.rec-list { display: grid; gap: 14px; }
.rec-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
  display: grid; grid-template-columns: 168px 1fr; gap: 18px;
  align-items: start;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  animation: rise .3s ease both;
}
.rec-item:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.rec-item:hover .rec-thumb-play { opacity: 1; }

/* --- Thumbnail --- */
.rec-thumb {
  position: relative;
  width: 168px; height: 96px;
  border-radius: 12px; overflow: hidden;
  background: var(--surface-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  transition: transform .2s;
}
.rec-thumb:hover { transform: scale(1.02); }
.rec-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.rec-thumb.audio {
  background: linear-gradient(135deg, var(--surface-3) 0%, var(--accent-soft) 100%);
}
.thumb-glyph {
  font-size: 1.9rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}
.rec-thumb.audio .thumb-glyph { color: var(--accent); }
.thumb-wave { display: flex; gap: 3px; height: 18px; align-items: center; }
.thumb-wave i {
  display: block; width: 3px; background: var(--accent);
  border-radius: 1px;
  animation: thumbWave 1.4s ease-in-out infinite;
}
.thumb-wave i:nth-child(1) { height: 40%; animation-delay: 0s; }
.thumb-wave i:nth-child(2) { height: 70%; animation-delay: .15s; }
.thumb-wave i:nth-child(3) { height: 100%; animation-delay: .3s; }
.thumb-wave i:nth-child(4) { height: 80%; animation-delay: .45s; }
.thumb-wave i:nth-child(5) { height: 55%; animation-delay: .6s; }
.thumb-wave i:nth-child(6) { height: 35%; animation-delay: .75s; }
@keyframes thumbWave {
  0%, 100% { transform: scaleY(.5); opacity: .6; }
  50% { transform: scaleY(1); opacity: 1; }
}
.rec-thumb-duration {
  position: absolute; bottom: 7px; right: 7px;
  background: rgba(0,0,0,.78); color: #fff;
  font-size: .7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}
.rec-thumb-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.4);
  opacity: 0; transition: opacity .2s; z-index: 2;
}
.play-glyph {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.96); color: #08101e;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; padding-left: 3px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.rec-item.expanded .rec-thumb-play { opacity: 1; background: rgba(0,0,0,.55); }
.rec-item.expanded .play-glyph { padding-left: 0; font-size: 1.1rem; }
.rec-item.expanded .play-glyph::after { content: '⏸'; }
.rec-item.expanded .play-glyph::before { display: none; }
.rec-item.expanded .play-glyph > * { display: none; }

/* --- Body --- */
.rec-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rec-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.rec-header-text { min-width: 0; }
.rec-name { font-weight: 600; font-size: .96rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.rec-meta { color: var(--text-dim); font-size: .78rem; margin-top: 3px; }
.rec-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip {
  font-size: .72rem; padding: 3px 10px; border-radius: 999px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-dim); background: var(--surface);
}
.chip.ok { color: var(--success); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.folder-chip { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); }
.folder-chip::before { content: '▰'; margin-right: 5px; font-size: .62rem; }
.tag-chip { color: var(--text); }
.insight-chip { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 35%, var(--border)); }
.rec-media-shell {
  position: relative; grid-column: 1 / -1;
  background: #000; border-radius: 12px; overflow: hidden;
  margin-top: 4px;
  animation: rise .25s ease both;
}
.rec-media-shell[hidden] { display: none; }
.rec-media { width: 100%; border-radius: 12px; background: #000; max-height: 320px; display: block; }
.rec-media-shell .rec-media { border-radius: 0; }
.rec-caption-overlay {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  z-index: 3;
  width: min(86%, 760px);
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(4, 8, 16, .78);
  color: #fff;
  font-size: clamp(.82rem, 2vw, 1.02rem);
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.rec-caption-overlay[hidden] { display: none; }
audio.rec-media { background: var(--surface-3); height: 44px; }
.rec-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rec-actions button { padding: 8px 14px; font-size: .8rem; }
.rec-actions .icon-only { padding: 8px 12px; min-width: 36px; }
.rec-actions .primary-action {
  background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
  color: var(--accent); border-color: var(--accent); font-weight: 600;
}
.rec-actions .primary-action:hover {
  background: var(--accent-soft);
  box-shadow: 0 6px 16px var(--accent-soft);
}
.rec-actions .danger-ghost { margin-left: auto; }

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(4,7,12,.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 18px;
}
.modal[hidden],
.modal-body[hidden],
.chat-body[hidden] { display: none !important; }
.modal-box {
  background: var(--surface); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 580px; max-height: 88vh; display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow); animation: rise .25s ease both;
}
.modal-box.wide { max-width: 900px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 1.05rem; font-weight: 700; }
.modal-tabs { display: flex; gap: 6px; padding: 12px 24px 0; flex-wrap: wrap; }
.tab {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 999px; padding: 6px 16px; font: 600 .8rem 'Inter', sans-serif; cursor: pointer; transition: .2s;
}
.tab.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.modal-body {
  padding: 18px 24px; overflow-y: auto; flex: 1 1 auto;
  min-height: 0; font-size: .9rem; line-height: 1.6;
  overscroll-behavior: contain;
}
.modal-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 24px; border-top: 1px solid var(--border); flex-shrink: 0;
  overflow: visible; flex-wrap: wrap;
}
.modal-actions button { font-size: .8rem; padding: 7px 12px; flex-shrink: 0; }
.modal-actions-primary,
.modal-actions-secondary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-actions-secondary { margin-left: auto; flex-wrap: nowrap; }
.export-menu { position: relative; }
.export-menu > summary { list-style: none; font-size: .8rem; padding: 7px 12px; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu[open] > summary { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.export-popover {
  position: absolute; z-index: 12; right: 0; bottom: calc(100% + 9px); width: 240px;
  display: grid; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 96%, transparent); box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.export-option {
  width: 100%; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 9px;
  padding: 9px 10px !important; border: 0; border-radius: 9px; color: var(--text);
  background: transparent; text-align: left; cursor: pointer;
}
.export-option:hover { background: var(--accent-soft); }
.export-option .ui-icon { color: var(--accent); width: 18px; height: 18px; }
.export-option span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.export-option strong { font-size: .78rem; }
.export-option small { color: var(--text-dim); font-size: .7rem; }
.modal-playback {
  display: grid;
  gap: 10px;
  padding: 14px 24px 0;
}
.modal-playback[hidden] { display: none; }
.modal-playback-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-dim);
  font-size: .78rem;
}
.modal-playback-meta strong { color: var(--text); font-size: .86rem; }
.modal-playback.collapsed .modal-media { display: none; }
.modal-playback.collapsed { padding-bottom: 12px; gap: 0; }

.playback-toggle {
  margin-left: auto; flex-shrink: 0;
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-dim); width: 26px; height: 22px; font-size: .65rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.playback-toggle:hover { background: var(--surface-2); color: var(--text); }

.modal-media {
  width: 100%;
  max-height: min(190px, 23vh);
  border-radius: 14px;
  background: #020617;
  border: 1px solid var(--border);
  object-fit: contain;
}
audio.modal-media { height: 46px; }
.transcript-tools {
  position: sticky;
  top: -18px;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: -18px -24px 16px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.transcript-search {
  flex: 1;
  display: grid;
  gap: 6px;
  color: var(--text-dim);
  font-size: .76rem;
  font-weight: 700;
}
.transcript-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  padding: 10px 13px;
  outline: none;
  font: 600 .86rem 'Inter', sans-serif;
}
.transcript-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.transcript-search-count {
  color: var(--text-dim);
  font-size: .78rem;
  white-space: nowrap;
  padding-bottom: 10px;
}
.speaker-overview {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2);
}
.speaker-overview > strong { margin-right: 2px; font-size: .8rem; color: var(--text-dim); }
.speaker-pill {
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 999px; background: var(--accent-soft); color: var(--text);
  padding: 6px 10px; font: 800 .75rem 'Inter', sans-serif; cursor: pointer;
}
.speaker-pill:hover { border-color: var(--accent); color: var(--accent); }
.speaker-manager {
  display: grid; gap: 12px; margin-bottom: 16px; padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 15px; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2) 55%);
}
.speaker-manager-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.speaker-manager-head div { display: grid; gap: 3px; }
.speaker-manager-head strong { font-size: .9rem; }
.speaker-manager-head span:not(.chip) { color: var(--text-dim); font-size: .76rem; }
.speaker-manager-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.speaker-manager-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 11px; padding: 8px; background: var(--surface-3);
}
.speaker-manager-row input {
  min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
  font: 800 .82rem 'Inter', sans-serif;
}
.speaker-manager-row span { color: var(--text-dim); font-size: .7rem; white-space: nowrap; }

.seg { display: flex; gap: 12px; margin-bottom: 10px; }
.seg-time {
  color: var(--accent); font-variant-numeric: tabular-nums; font-size: .76rem; font-weight: 600;
  flex-shrink: 0; padding-top: 2px; width: 54px;
}
.seg-jump {
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 4px;
  margin-left: -4px;
}
.seg-jump:hover,
.seg-jump:focus-visible {
  background: var(--accent-soft);
  outline: none;
}
.transcript-full-text {
  white-space: pre-wrap;
  color: var(--text);
}
.seg-speaker {
  color: var(--accent);
  font-weight: 800;
  margin-right: 6px;
}
.seg.editing { align-items: flex-start; margin-bottom: 12px; }
.seg-edit-stack { flex: 1; display: grid; gap: 8px; }
.speaker-edit-input {
  width: min(220px, 100%);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  padding: 7px 11px;
  font: 700 .78rem 'Inter', sans-serif;
  outline: none;
}
.transcript-edit-note {
  margin-bottom: 14px;
  color: var(--text-dim);
  font-size: .82rem;
  line-height: 1.55;
}
.transcript-edit-area {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
  padding: 10px 12px;
  font: 500 .9rem/1.55 'Inter', sans-serif;
  outline: none;
}
.transcript-edit-area:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.transcript-edit-area.full { min-height: 280px; }
.summary-content h4 { margin: 14px 0 6px; color: var(--accent); font-size: .92rem; }
.summary-content ul { margin: 0 0 0 18px; }
.summary-content li { margin-bottom: 4px; }
.intelligence-panel {
  display: grid;
  gap: 14px;
}
.intel-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 15px 16px;
}
.intel-card h4 { color: var(--accent); font-size: .92rem; margin-bottom: 8px; }
.intel-card p, .intel-card li { color: var(--text); line-height: 1.65; }
.intel-card ul { margin-left: 18px; }
.insights-hero {
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--border));
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 15%, var(--accent-soft), transparent 34%),
    var(--surface-2);
  padding: 16px;
  margin-bottom: 14px;
}
.insights-hero div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.insights-hero strong { color: var(--text); font-size: 1rem; }
.insights-hero span,
.insights-hero p { color: var(--text-dim); font-size: .82rem; margin: 0; }
.chapter-list,
.action-list {
  display: grid;
  gap: 10px;
}
.chapter-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 4px 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-3);
  color: var(--text);
  padding: 12px;
  cursor: pointer;
}
.chapter-row span {
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.chapter-row strong { font-size: .9rem; }
.chapter-row small {
  grid-column: 2;
  color: var(--text-dim);
  line-height: 1.45;
}
.chapter-row:hover,
.chapter-row:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.action-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-3);
  padding: 12px;
}
.action-item input { margin-top: 4px; accent-color: var(--accent); }
.action-item strong { display: block; color: var(--text); font-size: .88rem; }
.action-item small { display: block; color: var(--text-dim); margin-top: 4px; }
.tracking-card { display: grid; gap: 12px; }
.tracking-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.tracking-card-head h4 { margin: 0 0 3px; }
.tracking-card-head p { margin: 0; color: var(--text-dim); font-size: .78rem; }
.tracking-list { display: grid; gap: 10px; }
.tracking-item {
  display: grid; gap: 9px; padding: 11px;
  border: 1px solid var(--border); border-radius: 13px; background: var(--surface-3);
}
.tracking-main { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 9px; }
.tracking-main.decision-main { grid-template-columns: 1fr; }
.tracking-check { margin: 11px 0 0; accent-color: var(--accent); width: 17px; height: 17px; }
.tracking-text {
  width: 100%; min-height: 48px; resize: vertical; border: 0; outline: 0;
  border-radius: 9px; background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  color: var(--text); padding: 9px 10px; font: 700 .84rem/1.45 'Inter', sans-serif;
}
.tracking-text:focus { box-shadow: 0 0 0 2px var(--accent); }
.tracking-meta { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) auto auto; gap: 7px; }
.tracking-meta input {
  min-width: 0; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text); padding: 7px 9px;
  font: 600 .75rem 'Inter', sans-serif;
}
.timestamp-citation,
.tracking-remove {
  border: 1px solid var(--border); border-radius: 9px; background: transparent;
  padding: 7px 9px; color: var(--text-dim); font: 800 .72rem 'Inter', sans-serif; cursor: pointer;
  white-space: nowrap;
}
.timestamp-citation { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.timestamp-citation:hover { background: var(--accent-soft); }
.tracking-remove:hover { border-color: var(--danger); color: var(--danger); }
.summary-template-toolbar {
  margin: -4px 0 16px; padding: 13px 14px; border: 1px solid var(--border);
  border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2) 62%);
}
.summary-template-toolbar label { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 6px 14px; align-items: center; }
.summary-template-toolbar label > span { color: var(--text); font-size: .8rem; font-weight: 800; }
.summary-template-toolbar select {
  grid-row: 2; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-3); color: var(--text); padding: 8px 10px; font: 700 .8rem 'Inter', sans-serif;
}
.summary-template-toolbar p { grid-column: 2; grid-row: 1 / span 2; margin: 0; color: var(--text-dim); font-size: .76rem; }
.summary-empty { padding: 18px 2px; text-align: center; }
.template-builder {
  display: grid; gap: 12px; margin-top: 14px; padding: 15px;
  border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2);
}
.template-builder-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.template-builder-head strong { font-size: .9rem; }
.template-builder-head p { margin: 3px 0 0; }
.template-builder-head select { min-width: 180px; }
.template-builder textarea { min-height: 104px; resize: vertical; }
.template-builder-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.quick-prompts button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  padding: 7px 11px;
  font: 700 .78rem 'Inter', sans-serif;
  cursor: pointer;
}
.quick-prompts button:hover,
.quick-prompts button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.details-grid .full { grid-column: 1 / -1; }
.set-field input,
.set-field textarea {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: 500 .85rem 'Inter', sans-serif;
  outline: none;
}
.set-field textarea { min-height: 110px; resize: vertical; }
.set-field input:focus,
.set-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Ask AI chat ---------- */
.chat-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.55;
  white-space: pre-wrap; word-wrap: break-word;
}
.bubble.user {
  align-self: flex-end; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #08101e; border-bottom-right-radius: 4px; font-weight: 500;
}
.bubble.ai {
  align-self: flex-start; background: var(--surface-3); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-input-row { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.chat-input-row input {
  flex: 1; background: var(--surface-3); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 11px 14px; font: 400 .88rem 'Inter', sans-serif; outline: none;
}
.chat-input-row input:focus { border-color: var(--accent); }

/* ============ EMPTY STATE ============ */
.empty-state, .empty-search {
  display: flex; flex-direction: column; align-items: center;
  padding: 56px 24px 48px; text-align: center;
}
.empty-state[hidden], .empty-search[hidden] { display: none !important; }

.es-bars {
  display: flex; align-items: flex-end; gap: 7px;
  height: 52px; margin-bottom: 28px;
}
.es-bars span {
  width: 10px; border-radius: 5px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: .7;
  animation: esPulse 1.6s ease-in-out infinite;
}
.es-bars span:nth-child(1) { height: 24px; animation-delay: 0s; }
.es-bars span:nth-child(2) { height: 38px; animation-delay: .15s; }
.es-bars span:nth-child(3) { height: 52px; animation-delay: .3s; }
.es-bars span:nth-child(4) { height: 38px; animation-delay: .45s; }
.es-bars span:nth-child(5) { height: 24px; animation-delay: .6s; }
@keyframes esPulse {
  0%, 100% { transform: scaleY(1); opacity: .6; }
  50% { transform: scaleY(1.18); opacity: 1; }
}
.es-title {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 10px;
}
.es-sub {
  color: var(--text-dim); font-size: .9rem; line-height: 1.6;
  max-width: 380px; margin-bottom: 22px;
}
.es-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.es-chip {
  font-size: .76rem; font-weight: 600;
  padding: 5px 13px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim);
}
.empty-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.empty-search { padding: 32px 24px; }
.es-search-icon { font-size: 1.8rem; margin-bottom: 10px; opacity: .5; }
.empty-search p { color: var(--text-dim); font-size: .9rem; }

/* ============ INSTALL BUTTON ============ */
.install-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; border-radius: 12px;
  color: #08101e; font: 700 .82rem 'Inter', sans-serif;
  padding: 0 14px; height: 42px; cursor: pointer;
  box-shadow: 0 6px 18px var(--accent-soft);
  transition: .2s; white-space: nowrap;
}
.install-btn svg { width: 15px; height: 15px; }
.install-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px var(--accent-soft); }
.install-btn[hidden] { display: none !important; }

/* ============ COUNTDOWN OVERLAY ============ */
.countdown-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,23,.82); backdrop-filter: blur(16px);
  animation: fadeIn .25s ease;
}
.countdown-overlay[hidden] { display: none !important; }

.countdown-card {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  animation: rise .3s cubic-bezier(.2,.7,.3,1) both;
}
.countdown-ring {
  position: relative; width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
}
.cd-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.cd-track {
  fill: none; stroke: rgba(255,255,255,.08); stroke-width: 7;
}
.cd-progress {
  fill: none; stroke: url(#cdGrad); stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 276.5;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.cd-num {
  font-size: 3.2rem; font-weight: 900; letter-spacing: -2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: cdPop .35s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes cdPop {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cd-label {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  letter-spacing: -.2px;
}
.cd-sub {
  font-size: .82rem; color: var(--text-dim); text-align: center;
  max-width: 260px; line-height: 1.5;
}

/* ============ GUIDE BUTTON ============ */
.guide-btn {
  position: relative;
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}
.guide-btn:hover { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 18px var(--accent-soft); }
.guide-btn-pulse { animation: guidePulse 2.8s ease-in-out 3; }
@keyframes guidePulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 18px var(--accent-soft); }
}

/* ============ GUIDE MODAL ============ */
.guide-dialog {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(2,6,23,.72); backdrop-filter: blur(14px);
  animation: fadeIn .2s ease;
}
.guide-dialog[hidden] { display: none !important; }

.guide-card {
  position: relative;
  width: 100%; max-width: 760px;
  height: min(88vh, 640px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
  animation: rise .3s cubic-bezier(.2,.7,.3,1) both;
}

.guide-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  background: rgba(15,22,40,.65); border: 1px solid rgba(255,255,255,.12);
  color: var(--text); width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .2s; backdrop-filter: blur(8px);
}
.guide-close svg { width: 16px; height: 16px; }
.guide-close:hover { background: rgba(244,63,94,.22); border-color: var(--danger); transform: rotate(90deg); }

/* Hero */
.guide-hero {
  position: relative; overflow: hidden;
  padding: 24px 28px 20px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.guide-hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.gho1, .gho2 { position: absolute; border-radius: 50%; filter: blur(60px); }
.gho1 { width: 260px; height: 260px; top: -120px; left: -60px; background: var(--accent); opacity: .3; animation: drift 14s ease-in-out infinite alternate; }
.gho2 { width: 220px; height: 220px; bottom: -120px; right: -40px; background: var(--accent-2); opacity: .25; animation: drift 14s ease-in-out infinite alternate-reverse; }
.guide-hero-inner {
  position: relative; display: flex; align-items: center; gap: 16px;
}
.guide-hero-icon {
  width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #08101e;
  box-shadow: 0 10px 28px var(--accent-soft);
}
.guide-hero-inner h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.4px; }
.guide-hero-inner p { color: var(--text-dim); font-size: .86rem; margin-top: 3px; }

/* Layout */
.guide-layout {
  display: grid; grid-template-columns: 180px 1fr;
  flex: 1; min-height: 0; overflow: hidden;
}

/* Sidebar nav */
.guide-nav {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px 10px;
  background: rgba(0,0,0,.18);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
:root[data-theme="light"] .guide-nav { background: rgba(0,0,0,.03); }
.gnav {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 1px solid transparent; border-radius: 10px;
  color: var(--text-dim); font: 600 .84rem 'Inter', sans-serif;
  padding: 9px 11px; cursor: pointer; transition: .2s; text-align: left;
}
.gnav:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.gnav.active {
  color: var(--accent); background: var(--accent-soft);
  border-color: rgba(56,189,248,.35);
}
.gnav-ic { font-size: 1rem; flex-shrink: 0; }

/* Content pane */
.guide-content { overflow-y: auto; padding: 22px 24px; }

.gsec[hidden] { display: none !important; }

.gsec-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 20px;
}
.gsec-eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 5px;
}
.gsec-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.3px; }
.gsec-sub { color: var(--text-dim); font-size: .86rem; margin-top: 4px; line-height: 1.5; }

/* Badges */
.guide-badge {
  flex-shrink: 0; font-size: .7rem; font-weight: 700;
  padding: 4px 11px; border-radius: 999px; letter-spacing: .5px; text-transform: uppercase;
  margin-top: 4px;
}
.guide-badge.essential { background: rgba(251,191,36,.12); color: var(--warning); border: 1px solid rgba(251,191,36,.35); }
.guide-badge.free { background: rgba(52,211,153,.1); color: var(--success); border: 1px solid rgba(52,211,153,.35); }
.guide-badge.paid { background: rgba(139,92,246,.12); color: #a78bfa; border: 1px solid rgba(139,92,246,.35); }
.guide-badge.private { background: rgba(56,189,248,.1); color: var(--accent); border: 1px solid rgba(56,189,248,.35); }
.guide-badge.custom { background: rgba(244,63,94,.08); color: #fb7185; border: 1px solid rgba(244,63,94,.28); }

/* Steps */
.guide-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.guide-step {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 13px; padding: 14px 16px;
  transition: border-color .2s;
}
.guide-step:hover { border-color: rgba(56,189,248,.3); }
.gstep-num {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08101e; font: 700 .8rem 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px var(--accent-soft);
}
.gstep-body strong { display: block; font-size: .92rem; font-weight: 700; margin-bottom: 5px; }
.gstep-body p { color: var(--text-dim); font-size: .84rem; line-height: 1.55; margin: 0; }

/* Tips inside steps */
.guide-tip {
  margin-top: 9px; font-size: .8rem; padding: 7px 11px;
  border-radius: 8px; line-height: 1.4;
}
.tip-info { background: rgba(56,189,248,.08); color: var(--accent); border: 1px solid rgba(56,189,248,.2); }
.tip-warn { background: rgba(251,191,36,.08); color: var(--warning); border: 1px solid rgba(251,191,36,.2); }
.tip-edge { background: rgba(52,130,246,.08); color: #60a5fa; border: 1px solid rgba(52,130,246,.2); }

/* Bottom note */
.guide-note {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 12px 16px;
  font-size: .83rem; color: var(--text-dim); line-height: 1.5;
}
.guide-note strong { color: var(--text); }

/* Model table */
.guide-model-table { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.gmt-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 11px; font-size: .8rem;
}
.gmt-recommended { border-color: var(--accent); background: var(--accent-soft); }
.gmt-name { font-weight: 700; min-width: 60px; flex-shrink: 0; }
.gmt-size { color: var(--accent); font-weight: 600; min-width: 52px; flex-shrink: 0; }
.gmt-desc { color: var(--text-dim); }
.gmt-row code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 4px; font-size: .78rem; }
.gstep-body code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 4px; font-size: .78rem; }

/* Mobile */
@media (max-width: 620px) {
  .guide-card { height: auto; max-height: 92vh; border-radius: 20px 20px 12px 12px; }
  .guide-hero { padding: 14px 56px 12px 16px; }
  .guide-hero-icon { width: 42px; height: 42px; font-size: 1.1rem; }
  .guide-hero-inner h2 { font-size: 1.05rem; }
  .guide-hero-inner p { font-size: .78rem; }
  .guide-close { top: 12px; right: 14px; }
  .guide-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .guide-nav {
    flex-direction: row; align-items: flex-start; overflow-x: auto; gap: 4px;
    padding: 8px 10px; border-right: none; border-bottom: 1px solid var(--border);
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
  }
  .guide-nav::-webkit-scrollbar { display: none; }
  .gnav { flex-direction: column; align-items: center; gap: 3px; padding: 7px 10px; font-size: .72rem; min-width: 58px; flex-shrink: 0; white-space: nowrap; }
  .guide-content { padding: 14px 14px 20px; }
  .gsec-head { flex-direction: column; gap: 8px; }
}

/* ---------- Settings ---------- */
.settings-box .modal-body { display: grid; gap: 22px; }

/* ============ HYPER-PREMIUM SETTINGS ============ */

.settings-pro {
  max-width: 880px; width: 100%;
  height: min(86vh, 760px); min-height: min(640px, calc(100vh - 36px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); position: relative;
  animation: rise .35s cubic-bezier(.2,.7,.3,1) both;
}
.settings-close {
  position: absolute; top: 18px; right: 18px; z-index: 5;
  background: rgba(15, 22, 40, .65); border: 1px solid rgba(255,255,255,.12);
  color: var(--text); width: 36px; height: 36px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .2s; backdrop-filter: blur(8px);
}
.settings-close:hover { background: rgba(244, 63, 94, .25); border-color: var(--danger); transform: rotate(90deg); }

/* --- Hero --- */
.settings-hero {
  position: relative; overflow: hidden;
  padding: 26px 32px 22px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}
.settings-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .18; mask-image: radial-gradient(800px 240px at 20% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(800px 240px at 20% 0%, #000, transparent 70%);
}
.settings-hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sh-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .42; animation: drift 14s ease-in-out infinite alternate; }
.sho1 { width: 280px; height: 280px; top: -120px; left: -60px; background: var(--accent); }
.sho2 { width: 240px; height: 240px; bottom: -120px; right: -40px; background: var(--accent-2); animation-delay: -5s; }
.settings-hero-inner {
  position: relative; display: flex; align-items: center; gap: 18px; margin-bottom: 16px;
}
.settings-hero-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #08101e;
  box-shadow: 0 12px 28px var(--accent-soft);
  animation: gentlePulse 2.6s ease-in-out infinite;
}
.settings-hero-icon .ui-icon { width: 25px; height: 25px; stroke-width: 2.15; }
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.settings-hero-text h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.4px; }
.settings-hero-text p { color: var(--text-dim); font-size: .88rem; margin-top: 2px; }

.settings-status-row {
  position: relative;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text-dim);
  transition: .2s;
}
.status-pill.ok { color: var(--success); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.status-pill.warn { color: var(--warning); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.status-pill.info { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.status-pill .ui-icon { width: 15px; height: 15px; }
.brand-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  object-fit: contain;
  flex: 0 0 auto;
  vertical-align: -4px;
}
.brand-icon-groq {
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 6px 16px rgba(255,59,0,.24);
}
.brand-icon-openai {
  padding: 2px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 8px 18px rgba(2,6,23,.25);
}
.status-pill .brand-icon {
  width: 15px;
  height: 15px;
  margin-left: -3px;
  vertical-align: -3px;
}
.welcome-trust .brand-icon,
.about-links .brand-icon {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}
.set-title .brand-icon {
  width: 18px;
  height: 18px;
  margin-right: 2px;
  vertical-align: -4px;
}

/* --- Layout: sidebar + content --- */
.settings-layout {
  display: grid; grid-template-columns: 200px 1fr;
  flex: 1; min-height: 0; overflow: hidden;
}

.settings-nav {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px;
  background: rgba(0,0,0,.18);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
:root[data-theme="light"] .settings-nav { background: rgba(0,0,0,.03); }

.snav {
  display: flex; align-items: center; gap: 11px;
  background: none; border: 1px solid transparent; border-radius: 11px;
  color: var(--text-dim); font: 600 .88rem 'Inter', sans-serif;
  padding: 10px 12px; cursor: pointer; transition: .2s;
  text-align: left;
}
.snav:hover { color: var(--text); background: var(--surface-2); }
.snav.active {
  color: #08101e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: var(--accent);
  box-shadow: 0 6px 18px var(--accent-soft);
}
.snav.active .snav-ic { filter: drop-shadow(0 0 4px rgba(0,0,0,.2)); }
.snav-ic { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.snav-ic .ui-icon { width: 18px; height: 18px; }

.settings-content {
  overflow-y: auto; padding: 24px 28px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.spane {
  animation: paneIn .3s cubic-bezier(.2,.7,.3,1) both;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.spane[hidden] { display: none !important; }
@keyframes paneIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stylize all set-sections inside the pro layout */
.settings-pro .set-section {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  transition: border-color .2s;
  width: 100%;
}
.settings-pro .spane > .set-section:only-child { flex: 0 0 auto; }
.settings-pro .set-section:hover { border-color: rgba(56,189,248,.35); }
.settings-pro .set-section + .set-section { margin-top: 16px; }
.settings-pro .set-title {
  font-size: .98rem; font-weight: 700; margin-bottom: 14px;
  letter-spacing: -.2px;
  display: flex; align-items: center; gap: 8px;
}
.settings-pro .set-title .ui-icon { color: var(--accent); width: 18px; height: 18px; }
.ec-head .ui-icon,
.provider-card .ui-icon { width: 17px; height: 17px; color: var(--accent); vertical-align: -3px; }

/* "Saved" floating indicator */
.settings-saved {
  position: absolute; bottom: 20px; right: 24px; z-index: 4;
  background: var(--success); color: #08101e;
  padding: 8px 16px; border-radius: 999px;
  font: 700 .82rem 'Inter', sans-serif;
  opacity: 0; transform: translateY(8px) scale(.9);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  box-shadow: 0 8px 22px rgba(52,211,153,.4);
}
.settings-saved.show { opacity: 1; transform: translateY(0) scale(1); }

/* --- About card --- */
.about-card { padding: 28px !important; text-align: center; }
.about-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; }
.about-logo { width: 64px; height: 64px; margin-bottom: 4px; filter: drop-shadow(0 8px 22px var(--accent-soft)); }
.about-hero h4 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.3px; }
.about-hero h4 span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.about-tag { color: var(--text-dim); font-size: .88rem; }
.about-version {
  font-size: .72rem; color: var(--text-dim);
  background: var(--surface-3); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  margin-top: 6px; letter-spacing: .3px;
}
.about-bullets { display: grid; gap: 10px; text-align: left; margin: 12px 0 20px; }
.ab-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 11px;
  background: var(--surface-3); border: 1px solid var(--border);
  font-size: .85rem; line-height: 1.5;
}
.ab-row strong { color: var(--text); }
.ab-row > span { font-size: 1.15rem; flex-shrink: 0; }
.brand-pair {
  display: inline-flex;
  align-items: center;
}
.brand-pair .brand-icon {
  width: 18px;
  height: 18px;
}
.brand-pair .brand-icon + .brand-icon { margin-left: -5px; }
.about-support {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 17px 18px;
  border: 1px solid rgba(255,180,74,.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(255,95,95,.2), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(255,180,74,.16), transparent 38%),
    linear-gradient(135deg, #201624, #141928 62%, #201b25);
  color: #f8fafc;
  text-decoration: none;
  text-align: left;
  box-shadow: 0 16px 38px rgba(5,8,18,.25), 0 1px 0 rgba(255,255,255,.05) inset;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.about-support::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.07) 48%, transparent 66%);
}
.about-support:hover {
  transform: translateY(-2px);
  border-color: rgba(255,180,74,.55);
  box-shadow: 0 20px 48px rgba(255,95,95,.14), 0 1px 0 rgba(255,255,255,.08) inset;
}
.about-support-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--support-coral), #ff765f 54%, var(--support-gold));
  box-shadow: 0 10px 24px rgba(255,95,95,.26), 0 1px 0 rgba(255,255,255,.25) inset;
}
.about-support-mark svg { width: 29px; height: 29px; }
.about-support-copy { display: grid; gap: 4px; min-width: 0; }
.about-support-copy strong { color: #fff; font-size: .93rem; letter-spacing: -.01em; }
.about-support-copy > span { color: #b8c2d3; font-size: .82rem; line-height: 1.5; }
.about-support-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 11px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}
.about-support-cta svg { width: 16px; height: 16px; transition: transform .2s ease; }
.about-support:hover .about-support-cta svg { transform: translateX(2px); }
.about-links {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 16px;
}
.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: .2s;
}
.about-links a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.about-foot { font-size: .8rem; color: var(--text-dim); line-height: 1.6; }
.set-section { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; background: var(--surface-2); }
.set-title { font-size: .9rem; font-weight: 700; margin-bottom: 12px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.set-field { display: flex; flex-direction: column; gap: 6px; font-size: .78rem; color: var(--text-dim); font-weight: 600; }
.set-field select {
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font: 500 .85rem 'Inter', sans-serif; outline: none; cursor: pointer;
}
.set-field select:focus { border-color: var(--accent); }
.key-row { display: flex; gap: 8px; margin-bottom: 8px; }
.key-row input { min-width: 0; }
#apiKeyInput {
  flex: 1; background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; font-size: .88rem; outline: none;
}
#apiKeyInput:focus { border-color: var(--accent); }
.modal-body a { color: var(--accent); }
.key-status { margin-top: 8px; font-size: .8rem; color: var(--success); }
.key-memory-row { margin-top: 12px; }
.key-provider-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.key-provider-actions .key-status { margin: 0 0 0 4px; }

/* ---------- Import card & drop overlay ---------- */
.import-card {
  border-style: dashed; padding: 22px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  position: relative; overflow: hidden;
}
.import-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent, var(--accent-soft) 50%, transparent);
  opacity: 0; transition: opacity .25s ease;
}
.import-card:hover::before { opacity: 1; }
.import-inner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.import-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.import-text h2 { font-size: 1.05rem; font-weight: 700; }
.import-card .hint.mini { color: var(--text-dim); font-size: .8rem; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(4, 8, 16, .82); backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  animation: dropFade .2s ease both; pointer-events: none;
}
.drop-overlay[hidden] { display: none; }
@keyframes dropFade { from { opacity: 0; } to { opacity: 1; } }
.drop-card {
  background: var(--surface); border: 2px dashed var(--accent);
  border-radius: 24px; padding: 48px 60px; text-align: center;
  box-shadow: 0 24px 60px var(--accent-soft);
  animation: dropPulse 1.6s ease-in-out infinite;
}
@keyframes dropPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 24px 60px var(--accent-soft); }
  50% { transform: scale(1.03); box-shadow: 0 30px 80px var(--accent-soft), 0 0 0 8px var(--accent-soft); }
}
.drop-icon { font-size: 3.4rem; margin-bottom: 8px; animation: dropBounce 1.6s ease-in-out infinite; }
@keyframes dropBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.drop-card h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -.3px; }
.drop-card p { color: var(--text-dim); line-height: 1.55; font-size: .92rem; }

/* ---------- AI provider picker ---------- */
.provider-pick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.provider-card {
  background: var(--surface-3); border: 2px solid var(--border);
  border-radius: 13px; padding: 12px 14px; text-align: left;
  cursor: pointer; color: var(--text); font-family: inherit; transition: .2s;
  display: flex; flex-direction: column; gap: 4px;
}
.provider-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.provider-card.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%);
  box-shadow: 0 8px 22px var(--accent-soft);
}
.provider-card strong { font-size: .88rem; }
.provider-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.provider-title .brand-icon {
  width: 21px;
  height: 21px;
}
.provider-card small { color: var(--text-dim); font-size: .73rem; line-height: 1.45; }
.provider-panel { animation: fadeIn .25s ease both; }
.provider-panel input[type="text"], .provider-panel input[type="password"] {
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font: 500 .85rem 'Inter', sans-serif; outline: none;
}
.provider-panel input:focus { border-color: var(--accent); }
.provider-panel code { background: var(--surface-3); padding: 1px 6px; border-radius: 4px; font-size: .76rem; }

/* ---------- Active transcript segment ---------- */
.seg { transition: background .2s ease, border-color .2s ease; padding: 6px 8px; border-radius: 8px; border-left: 3px solid transparent; cursor: pointer; }
.seg:hover { background: var(--surface-2); }
.seg.active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.seg.active .seg-time { color: var(--accent); }

/* ---------- Transcription engine picker ---------- */
.engine-pick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px;
}
.engine-card {
  background: var(--surface-3); border: 2px solid var(--border);
  border-radius: 14px; padding: 14px; text-align: left; cursor: pointer;
  color: var(--text); font-family: inherit; transition: .2s;
  display: flex; flex-direction: column; gap: 6px;
}
.engine-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.engine-card.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%);
  box-shadow: 0 10px 28px var(--accent-soft);
}
.engine-card .ec-head { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.engine-card .brand-icon { width: 20px; height: 20px; }
.engine-card small { color: var(--text-dim); font-size: .78rem; line-height: 1.5; }
.ec-badge { font-size: .66rem; padding: 2px 8px; border-radius: 999px; font-weight: 800; letter-spacing: .5px; margin-left: auto; }
.ec-badge.fast { background: rgba(56,189,248,.18); color: var(--accent); }
.ec-badge.private {
  background: rgba(52,211,153,.18); color: var(--success);
  animation: privacy-glow 2.4s ease-in-out infinite;
}
@keyframes privacy-glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
  50% { box-shadow: 0 0 0 4px rgba(52,211,153,.18); }
}

.engine-panel { animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.model-card {
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 10px; text-align: center;
  cursor: pointer; color: var(--text); font-family: inherit; transition: .2s;
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.model-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.model-card.active {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 22px var(--accent-soft);
}
.model-card.active::after {
  content: '✓'; position: absolute; top: 6px; right: 8px;
  color: var(--accent); font-weight: 800; font-size: .8rem;
}
.model-card strong { font-size: .9rem; }
.m-meta { font-size: .72rem; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.model-card small { font-size: .7rem; color: var(--text-dim); line-height: 1.35; }

.model-status {
  padding: 10px 14px; border-radius: 11px;
  background: var(--surface-3); border: 1px solid var(--border);
  font-size: .82rem; margin: 10px 0; display: flex; align-items: center; gap: 12px;
}
.model-status.ready { color: var(--success); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.07); }
.model-status.downloading { color: var(--warning); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.06); }
.model-status .bar { flex: 1; height: 7px; background: var(--surface); border-radius: 4px; overflow: hidden; min-width: 100px; }
.model-status .bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease; box-shadow: 0 0 12px var(--accent-soft);
}
.model-status .pct { font-variant-numeric: tabular-nums; font-weight: 700; }

.hint.mini { font-size: .8rem; line-height: 1.55; margin-top: 10px; }
.hint.mini strong { color: var(--success); }

/* In-progress transcription badge inside recording cards */
.rec-progress {
  margin-top: 10px; padding: 10px 14px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--accent);
  font-size: .82rem; display: flex; align-items: center; gap: 12px;
  animation: privacy-glow 2.4s ease-in-out infinite;
}
.rec-progress .bar { flex: 1; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; min-width: 80px; }
.rec-progress .bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}

.appearance-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.seg-control {
  display: flex; background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; gap: 4px;
}
.seg-control button {
  background: none; border: none; border-radius: 9px; padding: 8px 16px;
  color: var(--text-dim); font: 600 .82rem 'Inter', sans-serif; cursor: pointer; transition: .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg-control button.active { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #08101e; }
.accent-swatches { display: flex; gap: 10px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 2px solid transparent; transition: .2s;
}
.swatch[data-accent="sky"] { --sw: #38bdf8; }
.swatch[data-accent="violet"] { --sw: #a78bfa; }
.swatch[data-accent="emerald"] { --sw: #34d399; }
.swatch[data-accent="amber"] { --sw: #fbbf24; }
.swatch:hover { transform: scale(1.12); }
.swatch.active { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Toast & footer ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 22px; border-radius: 13px; font-size: .88rem; z-index: 100;
  box-shadow: var(--shadow); max-width: 90vw; text-align: center;
  animation: toast-in .25s ease both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.error { border-color: var(--danger); color: #fda4af; }
.toast.has-undo { display: inline-flex; align-items: center; gap: 14px; padding-right: 8px; }
.undo-btn {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #08101e; border: none; border-radius: 999px;
  padding: 6px 14px; font: 700 .82rem 'Inter', sans-serif;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.undo-btn:hover { transform: scale(1.04); box-shadow: 0 4px 14px var(--accent-soft); }

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 40%, rgba(56, 189, 248, .16), transparent 34%),
    rgba(4, 7, 12, .68);
  backdrop-filter: blur(12px);
}
.confirm-card {
  width: min(500px, 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--border));
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(26, 33, 51, .96), rgba(13, 18, 31, .98)),
    var(--surface);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .58), 0 0 0 1px rgba(255,255,255,.03) inset;
  padding: 22px;
  animation: confirm-in .2s ease both;
}
.confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--danger), #fb7185);
  box-shadow: 0 14px 36px rgba(244, 63, 94, .28);
}
.confirm-copy { min-width: 0; }
.confirm-eyebrow {
  color: #fda4af;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.confirm-card h3 {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 8px;
}
.confirm-card p {
  color: var(--text-dim);
  font-size: .88rem;
  line-height: 1.55;
}
.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}
.confirm-actions button {
  min-width: 118px;
  justify-content: center;
}
.confirm-actions .danger-btn {
  border-radius: 999px;
  padding: 10px 16px;
  font: 800 .86rem 'Inter', sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(244, 63, 94, .22);
}
@keyframes confirm-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.share-setup-dialog {
  position: fixed;
  inset: 0;
  z-index: 185;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(620px 360px at 52% 28%, rgba(56,189,248,.2), transparent 70%),
    radial-gradient(520px 420px at 78% 74%, rgba(99,102,241,.16), transparent 70%),
    rgba(4, 7, 12, .74);
  backdrop-filter: blur(16px);
}
.share-setup-dialog[hidden] { display: none !important; }
.share-setup-card {
  position: relative;
  overflow: hidden;
  width: min(780px, 100%);
  border: 1px solid rgba(125,211,252,.28);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(28, 39, 61, .98), rgba(12, 18, 33, .99)),
    var(--surface);
  box-shadow: 0 34px 100px rgba(0,0,0,.62), 0 0 0 1px rgba(255,255,255,.04) inset;
  padding: 24px;
  animation: confirm-in .22s ease both;
}
.share-setup-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(56,189,248,.08), transparent 34%),
    linear-gradient(rgba(56,189,248,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.04) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  mask-image: radial-gradient(circle at 30% 0%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle at 30% 0%, #000 0%, transparent 68%);
}
.share-setup-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 999px;
  background: rgba(56,189,248,.18);
  filter: blur(30px);
  pointer-events: none;
}
.share-setup-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}
.share-setup-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #08101e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 42px rgba(56,189,248,.28);
}
.share-setup-icon svg { width: 26px; height: 26px; }
.share-setup-eyebrow {
  color: var(--accent);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.share-setup-head h3 {
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
  margin-bottom: 8px;
}
.share-setup-head p {
  max-width: 620px;
  color: rgba(226,232,240,.82);
  font-size: .92rem;
  line-height: 1.55;
}
.share-choice-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.share-choice-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, .72);
  box-shadow: 0 16px 42px rgba(0,0,0,.18), 0 0 0 1px rgba(255,255,255,.025) inset;
}
.share-choice-card.recommended {
  border-color: rgba(56,189,248,.48);
  background:
    radial-gradient(circle at 20% 0%, rgba(56,189,248,.18), transparent 48%),
    rgba(15, 23, 42, .72);
}
.share-choice-card.selected {
  box-shadow: 0 18px 46px rgba(56,189,248,.14), 0 0 0 1px rgba(56,189,248,.18) inset;
}
.share-choice-card.selected::after {
  content: 'Selected';
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #08101e;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .03em;
  box-shadow: 0 10px 24px rgba(56,189,248,.2);
}
.share-choice-tag {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(56,189,248,.1);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.share-choice-card strong {
  color: var(--text);
  font-size: 1rem;
}
.share-choice-card p {
  color: rgba(226,232,240,.78);
  font-size: .8rem;
  line-height: 1.45;
}
.share-choice-card small {
  color: rgba(52,211,153,.92);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.35;
}
.share-setup-note {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(251,191,36,.24);
  border-radius: 16px;
  background: rgba(251,191,36,.1);
  color: rgba(226,232,240,.82);
  font-size: .82rem;
  line-height: 1.45;
}
.share-setup-note span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #08101e;
  background: var(--warning);
  font-weight: 900;
}
.share-setup-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
}
.share-setup-actions button {
  justify-content: center;
}

/* ---------- Capture preflight ---------- */
.capture-preflight {
  position: fixed; inset: 0; z-index: 1900;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(2,6,23,.82); backdrop-filter: blur(16px);
}
.capture-preflight[hidden] { display: none !important; }
.capture-preflight-card {
  position: relative; width: min(620px, 100%); max-height: calc(100vh - 36px); overflow-y: auto;
  padding: 26px; border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  border-radius: 22px; background: var(--surface); box-shadow: var(--shadow);
  animation: rise .28s cubic-bezier(.2,.7,.3,1) both;
}
.preflight-head { display: flex; align-items: flex-start; gap: 15px; }
.preflight-mark {
  width: 46px; height: 46px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; color: #08101e; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px var(--accent-soft);
}
.preflight-mark .ui-icon { width: 24px; height: 24px; stroke-width: 2.1; }
.preflight-eyebrow { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.preflight-head h3 { margin-top: 3px; font-size: 1.35rem; letter-spacing: -.35px; }
.preflight-head p:last-child { margin-top: 5px; color: var(--text-dim); font-size: .86rem; line-height: 1.5; }
.preflight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
.preflight-status {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 55px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2);
}
.preflight-status span { color: var(--text-dim); font-size: .78rem; }
.preflight-status strong { font-size: .82rem; text-align: right; }
.preflight-status.good { border-color: rgba(52,211,153,.38); }
.preflight-status.good strong { color: var(--success); }
.preflight-status.warn { border-color: rgba(251,191,36,.42); background: rgba(251,191,36,.07); }
.preflight-status.warn strong { color: var(--warning); }
.preflight-meter-wrap { margin-top: 15px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.preflight-meter-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; font-size: .78rem; }
.preflight-meter-copy span { color: var(--text-dim); }
.preflight-meter { height: 8px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.preflight-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--success), var(--accent), var(--accent-2)); transition: width .12s linear; }
.preflight-warning {
  margin-top: 14px; padding: 11px 13px; border: 1px solid rgba(251,191,36,.34); border-radius: 11px;
  color: var(--warning); background: rgba(251,191,36,.07); font-size: .82rem; line-height: 1.5;
}
.preflight-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.footnote {
  display: grid; justify-items: center; gap: 14px;
  text-align: center; color: var(--text-dim); font-size: .8rem;
  padding: 4px 20px 30px; max-width: 920px; margin: 0 auto;
}
.footnote-privacy { margin: 0; max-width: 840px; line-height: 1.55; }
.footnote-meta {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  width: 100%; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
}
.footnote-copyright { color: color-mix(in srgb, var(--text) 76%, var(--text-dim)); }
.footnote-copyright strong { color: var(--text); font-weight: 800; }
.footnote-divider { color: color-mix(in srgb, var(--text-dim) 52%, transparent); }
.privacy-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.privacy-link:hover { text-decoration: underline; }
.support-foot-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: color-mix(in srgb, var(--support-gold) 82%, white);
  font-weight: 800;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}
.support-foot-link:hover { color: var(--support-coral); transform: translateY(-1px); }

@media (max-width: 560px) {
  .footnote { gap: 12px; padding-inline: 18px; }
  .footnote-copyright { flex-basis: 100%; }
  .footnote-meta .footnote-divider:first-of-type { display: none; }
}

.spin {
  display: inline-block; width: 14px; height: 14px; border: 2px solid var(--text-dim);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite;
  vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Privacy document ---------- */
.policy-page {
  min-height: 100vh;
  padding: 36px 18px 64px;
  background: var(--bg);
  color: var(--text);
}
.policy-shell { width: min(860px, 100%); margin: 0 auto; }
.policy-back { display: inline-flex; margin-bottom: 18px; color: var(--accent); font-weight: 700; text-decoration: none; }
.policy-card { padding: clamp(22px, 5vw, 42px); border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.policy-card h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: -.045em; }
.policy-card h2 { margin: 28px 0 10px; font-size: 1.15rem; color: var(--accent); }
.policy-card p, .policy-card li { color: var(--text-dim); line-height: 1.7; }
.policy-card strong { color: var(--text); }
.policy-card ul { padding-left: 22px; }
.policy-updated { margin: 0 0 24px; font-size: .86rem; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .engine-pick { grid-template-columns: 1fr; }
  .model-grid { grid-template-columns: 1fr; }
  .provider-pick { grid-template-columns: 1fr; }
  .import-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .drop-card { padding: 32px 28px; }
  .settings-pro {
    min-height: unset;
    height: min(90vh, 740px);   /* fixed height so inner scroll works */
    max-height: 90vh;
    border-radius: 20px 20px 12px 12px;
  }
  .settings-hero { padding: 14px 62px 12px 16px; } /* right gap clears the abs-pos close button */
  .settings-hero-inner { margin-bottom: 0; }
  .settings-hero-icon { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 12px; }
  .settings-hero-text h2 { font-size: 1.05rem; }
  .settings-hero-text p { font-size: .78rem; }
  .settings-status-row { display: none; }
  .sh-orb { display: none; }
  .settings-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .settings-nav {
    flex-direction: row; align-items: flex-start; overflow-x: auto;
    padding: 8px 10px; border-right: none; border-bottom: 1px solid var(--border);
    gap: 4px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 38%;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    position: relative;
  }
  .settings-nav.has-scrolled {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 88%, transparent 100%);
  }
  .settings-nav.at-end {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%);
    mask-image: linear-gradient(to right, transparent, #000 12%);
  }
  .settings-nav::-webkit-scrollbar { display: none; }
  .snav {
    padding: 7px 12px; white-space: nowrap; flex-shrink: 0;
    font-size: .74rem; gap: 4px;
    flex-direction: column; align-items: center; justify-content: center;
    min-width: 92px; min-height: 55px; border-radius: 10px; scroll-snap-align: center;
  }
  .snav-ic { display: flex; }
  .settings-content { padding: 14px 14px 20px; overflow-y: auto; }
  .about-card { padding: 20px !important; }
  .about-support { grid-template-columns: auto 1fr; gap: 12px; padding: 15px; }
  .about-support-cta { grid-column: 1 / -1; justify-content: center; }
  .topbar { padding: 14px 14px 10px; gap: 10px; }
  .topbar .brand { min-width: 0; gap: 9px; }
  .topbar .brand > div { min-width: 0; }
  .topbar .logo { width: 38px; height: 38px; flex-shrink: 0; }
  .topbar-actions { gap: 6px; flex-shrink: 0; }
  .support-header-link { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 11px; }
  .support-header-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .support-cup { width: 26px; height: 26px; }
  .topbar .icon-btn { width: 38px; height: 38px; border-radius: 11px; }
  .guide-launch-btn { width: 38px; height: 38px; padding: 0; border-radius: 11px; }
  .guide-launch-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar .install-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .topbar .install-btn span { display: none; }
  main { padding-inline: 12px; }
  .card { padding: 18px; }
  .rec-item { grid-template-columns: 116px 1fr; gap: 12px; padding: 12px; }
  .rec-thumb { width: 116px; height: 70px; }
  .thumb-glyph { font-size: 1.4rem; }
  .play-glyph { width: 30px; height: 30px; font-size: .85rem; }
  .rec-actions .danger-ghost { margin-left: 0; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-num { font-size: 1.15rem; }
  .mode-tab { font-size: .72rem; flex-direction: column; gap: 4px; padding: 9px 4px; }
  .primary-btn { width: 100%; justify-content: center; }
  .search-wrap { width: 100%; margin-left: 0; }
  .library-filters { align-items: stretch; }
  .library-filters label { flex: 1 1 130px; min-width: 0; }
  .library-filters .ghost-btn { width: 100%; }
  .set-grid { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .recording-health { grid-template-columns: 1fr 1fr; }
  .live-controls, .rec-actions { flex-wrap: wrap; }
  .modal { padding: 8px; align-items: stretch; }
  .modal-box { max-height: 94vh; }
  .modal-head,
  .modal-tabs,
  .modal-playback,
  .modal-actions { padding-inline: 14px; }
  .modal-body { padding: 16px 14px; min-height: 0; }
  .modal-actions { padding-inline: 14px; align-items: flex-start; }
  .modal-actions-primary { min-width: 0; }
  .export-popover { position: fixed; left: 14px; right: 14px; bottom: 74px; width: auto; }
  .modal-media { max-height: 24vh; }
  .share-setup-dialog { align-items: stretch; padding: 10px; }
  .share-setup-card {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border-radius: 20px;
    padding: 18px;
  }
  .share-setup-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .share-setup-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
  .share-choice-grid { grid-template-columns: 1fr; }
  .share-choice-card.selected::after {
    position: static;
    justify-self: start;
    grid-row: 1;
    margin-left: 0;
  }
  .share-setup-actions {
    position: sticky;
    bottom: -18px;
    margin-inline: -18px;
    padding: 14px 18px 18px;
    background: linear-gradient(180deg, transparent, rgba(8,13,25,.98) 28%);
  }
  .share-setup-actions button { flex: 1; }
  .capture-preflight { align-items: stretch; padding: 10px; }
  .capture-preflight-card { max-height: calc(100vh - 20px); padding: 20px 18px; border-radius: 20px; }
  .preflight-grid { grid-template-columns: 1fr; }
  .preflight-actions { flex-direction: column-reverse; }
  .preflight-actions button { width: 100%; }
  .transcript-tools {
    margin: -16px -14px 14px;
    padding: 12px 14px;
    align-items: stretch;
    flex-direction: column;
  }
  .transcript-search-count { padding-bottom: 0; }
  .modal-playback-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .chapter-row { grid-template-columns: 1fr; }
  .chapter-row small { grid-column: 1; }
  .insights-hero div { flex-direction: column; gap: 2px; }
  .speaker-manager-rows { grid-template-columns: 1fr; }
  .tracking-card-head { align-items: stretch; flex-direction: column; }
  .tracking-card-head .ghost-btn { width: 100%; }
  .tracking-meta { grid-template-columns: 1fr 1fr; }
  .summary-template-toolbar label { grid-template-columns: 1fr; }
  .summary-template-toolbar select,
  .summary-template-toolbar p { grid-column: 1; grid-row: auto; }
  .template-builder-head { flex-direction: column; }
  .template-builder-head select { width: 100%; min-width: 0; }
  .confirm-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .confirm-actions {
    flex-direction: column-reverse;
  }
  .confirm-actions button {
    width: 100%;
  }
  .key-row { flex-wrap: wrap; }
  .key-row input { flex-basis: 100%; }
}

@media (max-width: 420px) {
  .topbar .brand h1 { font-size: 1.05rem; line-height: 1.05; }
  .topbar .tagline { display: none; }
  .topbar-actions { gap: 5px; }
  .onboard-toggle-btn { padding-inline: 2px; }
}

/* ============ ONBOARD TOGGLE BUTTON ============ */
.onboard-toggle-btn {
  display: inline-flex; align-items: center;
  gap: 0; background: none; border: none; cursor: pointer;
  padding: 6px 4px; border-radius: 8px;
  transition: opacity .2s;
}
.onboard-toggle-btn:hover { opacity: .85; }
.otoggle-track {
  position: relative;
  width: 34px; height: 20px; border-radius: 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.otoggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: transform .25s cubic-bezier(.4,0,.2,1), background .25s;
}
/* ON state */
.onboard-toggle-btn[aria-pressed="true"] .otoggle-track {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-soft);
}
.onboard-toggle-btn[aria-pressed="true"] .otoggle-thumb {
  transform: translateX(14px);
  background: #fff;
}

/* ============ ONBOARDING NOTIFICATION ============ */
@keyframes onboardIn {
  0%   { opacity: 0; transform: translateY(36px) scale(.93); }
  65%  { opacity: 1; transform: translateY(-5px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes onboardOut {
  to { opacity: 0; transform: translateY(18px) scale(.95); }
}
@keyframes onboardGlow {
  0%, 100% { opacity: .3; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.1); }
}
@keyframes ctaShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56,189,248,.5); }
  50%       { box-shadow: 0 0 0 5px rgba(56,189,248,0); }
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56,189,248,.6), 0 6px 18px var(--accent-soft); }
  50%       { box-shadow: 0 0 0 6px rgba(56,189,248,0), 0 6px 18px var(--accent-soft); }
}

.onboard-notif {
  position: fixed;
  bottom: 28px; right: 24px;
  z-index: 950;
  width: 340px;
  border-radius: 20px;
  background: rgba(8, 13, 28, 0.9);
  backdrop-filter: blur(28px) saturate(1.5);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  animation: onboardIn .6s cubic-bezier(.18,.89,.32,1.28) both;
  box-shadow:
    0 0 0 1px rgba(56,189,248,.18),
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 28px 64px rgba(2,6,23,.75),
    0 0 100px rgba(56,189,248,.07);
}
.onboard-notif[hidden] { display: none !important; }
.onboard-notif.leaving { animation: onboardOut .26s ease forwards; }

/* gradient border via pseudo-element */
.onboard-notif::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 20px;
  border: 1px solid transparent;
  background: linear-gradient(135deg,
    rgba(56,189,248,.5) 0%,
    rgba(139,92,246,.35) 50%,
    rgba(56,189,248,.08) 100%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

.onboard-orb {
  position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.16) 0%, transparent 68%);
  top: -120px; right: -80px;
  pointer-events: none;
  animation: onboardGlow 5s ease-in-out infinite;
}

.onboard-x {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .2s; z-index: 2;
}
.onboard-x svg { width: 13px; height: 13px; }
.onboard-x:hover { background: rgba(244,63,94,.2); border-color: var(--danger); color: var(--danger); transform: rotate(90deg); }

.onboard-top { display: flex; align-items: flex-start; gap: 13px; padding-right: 24px; }
.onboard-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: #08101e;
  box-shadow: 0 10px 28px var(--accent-soft);
}
.onboard-badge {
  display: inline-block;
  font: 700 .67rem 'Inter', sans-serif;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(56,189,248,.1);
  border: 1px solid rgba(56,189,248,.28);
  border-radius: 999px;
  padding: 2px 9px; margin-bottom: 5px;
  animation: badgePulse 2.5s ease-in-out infinite;
}
.onboard-title { font: 700 .96rem 'Inter', sans-serif; color: var(--text); margin-bottom: 4px; }
.onboard-sub { font: 400 .79rem 'Inter', sans-serif; color: var(--text-dim); line-height: 1.55; }

/* Step tracker */
.onboard-steps {
  padding: 13px 16px 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 13px;
}
.ostep-track {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 8px;
}
.ostep {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 700 .78rem 'Inter', sans-serif;
}
.ostep.done {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(52,211,153,.4);
}
.ostep.done svg { width: 14px; height: 14px; stroke-width: 3; }
.ostep.current {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08101e;
  animation: stepPulse 2.2s ease-in-out infinite;
}
.ostep.dim {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.3);
}
.ostep-line {
  flex: 1; height: 2px; margin: 0 4px;
  background: linear-gradient(90deg, #34d399, var(--accent));
  border-radius: 1px;
}
.ostep-line.dim { background: rgba(255,255,255,.1); }
.ostep-labels {
  display: flex; justify-content: space-between;
  padding: 0 2px;
}
.ostep-labels span {
  font: 500 .67rem 'Inter', sans-serif;
  color: var(--text-dim);
  text-align: center;
  width: 30px;
}
.ostep-labels span:nth-child(2) { color: var(--accent); font-weight: 700; }

/* CTA */
.onboard-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 20px; border-radius: 13px;
  font: 700 .88rem 'Inter', sans-serif; color: #08101e;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent) 100%);
  background-size: 200% auto;
  border: none; cursor: pointer;
  animation: ctaShimmer 3s linear infinite;
  box-shadow: 0 8px 28px var(--accent-soft);
  transition: transform .2s, box-shadow .2s;
}
.onboard-cta svg { width: 17px; height: 17px; }
.onboard-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px var(--accent-soft); }
.onboard-cta:active { transform: translateY(0); }

.onboard-skip {
  background: none; border: none;
  color: var(--text-dim); font: 400 .77rem 'Inter', sans-serif;
  cursor: pointer; text-align: center; padding: 2px;
  transition: color .2s;
}
.onboard-skip:hover { color: var(--text); }

@media (max-width: 620px) {
  .onboard-notif { left: 12px; right: 12px; bottom: 16px; width: auto; }
}

/* ---------- Keyboard and motion accessibility ---------- */
:where(button, a, summary, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 78%, white);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .welcome-panel { opacity: 1 !important; transform: none !important; }
  .orb, .welcome-mark, .settings-hero-icon, .sh-orb, .es-bars span,
  .rec-dot, .pulse, .support-header-link::before { transform: none !important; }
}
