/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ───────────────────────── */
:root {
  --bg:           #F1EFE8;
  --surface:      #FCFBF8;
  --ink:          #2B2A26;
  --ink-body:     #3A3933;
  --ink-secondary:#908C82;
  --ink-tertiary: #A8A498;
  --border:       #E4E1D8;
  --olive:        #5E6B3B;
  --olive-soft:   #E8E9DA;
  --olive-wave:   #D8D9C4;
  --red:          #CC3B30;
  --red-soft:     #F4E6E4;
  --font-sans:    'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'Geist Mono', 'SF Mono', monospace;
  --nav-h:        84px;
  --frame:        390px;
  --px:           24px;
  --r-card:       18px;
  --r-input:      13px;
  --r-chip:       20px;
}

body {
  font-family: var(--font-sans);
  background: #ffffff;
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 390px) {
  body { background: var(--bg); }
}
a { color: inherit; text-decoration: none; }

/* ── App shell ─────────────────────────────*/
.app-shell {
  max-width: var(--frame);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}
.page {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-h) + 1rem);
}

/* ── Bottom nav ─────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--frame);
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-tab.active { color: var(--olive); }
.nav-tab-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.nav-record-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.nav-library-lines { display: flex; flex-direction: column; gap: 4px; }
.nav-library-lines span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ── Auth ───────────────────────────────── */
/* ── Auth screen ─────────────────────────── */
.auth-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem var(--px) 3rem;
  gap: 2rem;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.auth-logo-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}
.auth-wordmark {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--ink);
}
.auth-tagline {
  font-size: 14px;
  color: var(--ink-secondary);
  letter-spacing: .01em;
}
.auth-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem var(--px);
}
.auth-card-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}
.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}
.auth-wrap { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 2rem var(--px); }
.auth-title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 1.75rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-secondary); margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: .85rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-input); font-family: var(--font-sans);
  font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s;
}
.form-group input:focus { border-color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.5rem; border: none; border-radius: var(--r-input);
  font-family: var(--font-sans); font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn-primary { background: var(--ink); color: var(--surface); width: 100%; }
.form-link { text-align: center; margin-top: 1.25rem; font-size: 14px; color: var(--ink-secondary); }
.form-link a { color: var(--ink); font-weight: 600; }
.alert { padding: .85rem 1rem; border-radius: var(--r-input); margin-bottom: 1.25rem; font-size: 14px; }
.alert-error { background: var(--red-soft); color: var(--red); }

/* ── Email verification screens ─────────── */
.verify-icon {
  font-size: 32px; text-align: center; margin-bottom: .75rem; color: var(--olive);
}
.verify-heading {
  font-size: 20px; font-weight: 600; letter-spacing: -.02em;
  text-align: center; margin-bottom: .5rem; color: var(--ink);
}
.verify-body {
  font-size: 15px; line-height: 1.55; color: var(--ink-secondary);
  text-align: center; margin-bottom: .25rem;
}
.verify-sub {
  font-size: 13px; color: var(--ink-tertiary); text-align: center; margin-bottom: 1rem;
}
.verify-resend {
  margin-top: 1.25rem; text-align: center;
  font-size: 14px; color: var(--ink-secondary);
}
.verify-resend a { color: var(--olive); font-weight: 500; }

/* ── Library ─────────────────────────────── */
.library-header { padding: 3rem var(--px) 1rem; display: flex; justify-content: space-between; align-items: flex-start; }
.library-title { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.library-meta { font-size: 14px; color: var(--ink-secondary); margin-top: 2px; }
.signout-link { font-size: 13px; color: var(--ink-tertiary); padding-top: 6px; }
.search-wrap { padding: 0 var(--px) .75rem; position: relative; }
.search-wrap input {
  width: 100%; padding: .7rem 1rem .7rem 2.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-input); font-family: var(--font-sans); font-size: 15px; color: var(--ink); outline: none;
}
.search-wrap input::placeholder { color: var(--ink-tertiary); }
.search-icon { position: absolute; left: calc(var(--px) + 12px); top: 50%; transform: translateY(-50%); color: var(--ink-tertiary); font-size: 14px; pointer-events: none; }
.filter-chips { display: flex; gap: 8px; padding: 0 var(--px) 1.25rem; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.chip { padding: 6px 14px; border-radius: var(--r-chip); font-size: 14px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--ink-secondary); white-space: nowrap; cursor: pointer; }
.chip.active { background: var(--olive); color: white; border-color: var(--olive); }
.recording-card { display: block; padding: 1rem var(--px); border-bottom: 1px solid var(--border); color: var(--ink); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.card-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 65%; }
.card-top-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.card-delete-btn {
  background: none; border: none; cursor: pointer;
  color: var(--red); -webkit-text-fill-color: var(--red);
  font-size: 14px; padding: 2px 4px;
  border-radius: 6px; line-height: 1; flex-shrink: 0; transition: opacity .15s;
}
.card-delete-btn:active { opacity: .6; }
.card-meta { font-size: 13px; color: var(--ink-secondary); margin-bottom: 10px; }
.card-failed-label { color: var(--red); font-weight: 500; }
.card-retry-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-chip);
  background: var(--olive-soft); color: var(--olive);
  border: 1px solid var(--olive); font-family: var(--font-sans);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: opacity .15s;
}
.card-retry-btn:active { opacity: .7; }
.card-retry-btn:disabled { opacity: .5; cursor: default; }
.card-bottom { display: flex; align-items: center; gap: 10px; }
.card-play { width: 32px; height: 32px; border-radius: 50%; background: var(--olive-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.play-tri-sm { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 9px; border-color: transparent transparent transparent var(--olive); margin-left: 2px; }
.mini-waveform { display: flex; align-items: center; gap: 2px; flex: 1; height: 28px; }
.mini-bar { width: 3px; border-radius: 2px; background: var(--olive-wave); }
.card-duration { font-family: var(--font-mono); font-size: 13px; color: var(--ink-secondary); flex-shrink: 0; }
.tag-pill { padding: 3px 10px; border-radius: var(--r-chip); font-size: 12px; font-weight: 500; }
.tag-meeting { background: var(--olive-soft); color: var(--olive); }
.tag-interview { background: var(--red-soft); color: var(--red); }
.tag-memo { background: #ECEAE2; color: var(--ink-secondary); }
.empty-state { text-align: center; padding: 4rem var(--px); color: var(--ink-secondary); font-size: 15px; }

/* ── Record screen ───────────────────────── */
.record-screen { position: relative; display: flex; flex-direction: column; align-items: center; padding: 3rem var(--px) 0; min-height: calc(100dvh - var(--nav-h)); }
.rec-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.rec-indicator { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--red); letter-spacing: .14em; text-transform: uppercase; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: recpulse 1.6s ease-in-out infinite; }
@keyframes recpulse { 0%,100%{opacity:1} 50%{opacity:.25} }
.rec-title-label { font-size: 15px; color: var(--ink-secondary); }
.timer-block { text-align: center; margin-bottom: 1.5rem; }
.timer { font-family: var(--font-mono); font-size: 76px; font-weight: 300; letter-spacing: -.02em; color: var(--ink); }
.timer-sub { font-size: 13px; font-weight: 500; color: var(--ink-tertiary); margin-top: 4px; }
.waveform { display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%; height: 88px; margin-bottom: 1.5rem; }
.wave-bar { width: 3px; border-radius: 3px; background: var(--olive); height: 10px; transition: height .08s ease; }
.marker-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; min-height: 32px; }
.marker-chip { padding: 5px 12px; border-radius: var(--r-chip); background: var(--olive-soft); color: var(--olive); font-family: var(--font-mono); font-size: 12px; }
.rec-controls { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 1rem; }
.ctrl-btn { width: 60px; height: 60px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .15s; }
.ctrl-btn:active { opacity: .7; }
.ctrl-btn:disabled { opacity: .3; cursor: default; }
.stop-btn { width: 84px; height: 84px; border-radius: 50%; background: var(--red); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 24px rgba(204,59,48,.34); transition: transform .1s; }
.stop-btn:active { transform: scale(.95); }
.stop-inner { width: 28px; height: 28px; border-radius: 6px; background: white; }
.pause-bars { display: flex; gap: 4px; }
.pause-bar { width: 3px; height: 16px; border-radius: 2px; background: var(--olive); }
.marker-icon { font-size: 18px; color: var(--olive); }
.rec-error { max-width: 280px; text-align: center; margin-bottom: 1rem; display: none; }

/* ── Processing screen ───────────────────── */
.processing-screen { display: flex; flex-direction: column; align-items: center; padding: 2rem var(--px); min-height: calc(100dvh - var(--nav-h)); }
.back-link { align-self: flex-start; font-size: 15px; color: var(--ink-secondary); margin-bottom: 3rem; display: flex; align-items: center; gap: 4px; }
.proc-ring-wrap { position: relative; width: 120px; height: 120px; margin-bottom: 2rem; }
.proc-ring-wrap svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--border); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--olive); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 254; animation: ring-spin 1.1s linear infinite; }
@keyframes ring-spin { to { stroke-dashoffset: 0; } }
.ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 21px; color: var(--ink); }
.proc-title { font-size: 21px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.proc-sub { font-size: 15px; color: var(--ink-secondary); text-align: center; margin-bottom: 2.5rem; }
.checklist { width: 100%; }
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.checklist-item:last-child { border-bottom: none; }
.check-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.check-done { background: var(--olive); }
.check-done::after { content: '✓'; color: white; font-size: 12px; font-weight: 600; }
.check-active { border: 2px solid var(--olive); }
.check-pending { border: 2px solid var(--border); }
.check-text-done { color: var(--ink); }
.check-text-active { color: var(--ink); font-weight: 500; }
.check-text-pending { color: var(--ink-tertiary); }
.proc-footer { margin-top: 2rem; font-size: 14px; color: var(--ink-tertiary); text-align: center; }

/* ── Detail screen ───────────────────────── */
.detail-back { display: flex; align-items: center; gap: 4px; font-size: 15px; color: var(--ink-secondary); padding: 1.5rem var(--px) .5rem; }
.detail-header { padding: 0 var(--px) .5rem; display: flex; justify-content: space-between; align-items: flex-start; }
.detail-title-wrap { flex: 1; margin-right: 1rem; }
.detail-title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); outline: none; border-bottom: 1.5px solid transparent; transition: border-color .15s; }
.detail-title:focus { border-bottom-color: var(--ink); }
.detail-meta { font-size: 14px; color: var(--ink-secondary); margin-top: 4px; }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-input); border: 1px solid var(--border); background: var(--surface); font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--olive); cursor: pointer; white-space: nowrap; }
.audio-card { margin: 1rem var(--px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 1rem; display: flex; align-items: center; gap: 12px; }
.play-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--red); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.play-btn.playing .play-tri { display: none; }
.play-btn.playing::after { content: ''; display: block; width: 14px; height: 14px; background: white; border-radius: 2px; }
.play-tri { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent white; margin-left: 3px; }
.scrubber-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.scrubber { width: 100%; height: 3px; border-radius: 2px; background: var(--border); accent-color: var(--olive); cursor: pointer; -webkit-appearance: none; }
.scrubber::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--olive); }
.audio-waveform { display: flex; align-items: center; gap: 2px; height: 32px; overflow: hidden; }
.audio-bar { width: 3px; border-radius: 2px; background: var(--olive-wave); flex-shrink: 0; }
.audio-time { font-family: var(--font-mono); font-size: 13px; color: var(--ink-secondary); flex-shrink: 0; }
.seg-toggle { margin: 1rem var(--px); background: #E7E4DB; border-radius: 13px; padding: 3px; display: flex; }
.seg-tab { flex: 1; padding: 8px; border-radius: 10px; font-size: 15px; font-weight: 500; text-align: center; cursor: pointer; color: var(--ink-secondary); border: none; background: none; font-family: var(--font-sans); transition: all .2s; }
.seg-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.tab-panel { display: none; padding: 0 var(--px) 2rem; }
.tab-panel.active { display: block; }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); margin-bottom: 1rem; }
.summary-bullets { list-style: none; margin-bottom: 1.5rem; }
.summary-bullet { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 15px; line-height: 1.55; color: var(--ink-body); }
.bullet-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--olive); flex-shrink: 0; margin-top: 9px; }
.utterance { margin-bottom: 1.5rem; }
.utterance-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.speaker-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.utterance-speaker { font-size: 14px; font-weight: 600; }
.utterance-time { font-family: var(--font-mono); font-size: 12px; color: var(--ink-tertiary); }
.utterance-text { font-size: 15px; line-height: 1.55; color: var(--ink-body); margin-left: 18px; }
.failed-msg { padding: var(--px); display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
/* Share sheet */
.share-sheet { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
.share-sheet[hidden] { display: none; }
.share-panel { position: relative; background: var(--bg); border-radius: var(--r-card) var(--r-card) 0 0; padding: 1.25rem 1.25rem max(2rem, env(safe-area-inset-bottom)); width: min(100vw, 390px); max-height: 80svh; overflow-y: auto; }
.share-panel-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-tertiary); margin-bottom: 1rem; }
.share-option { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: none; border-radius: var(--r-card); padding: .75rem; cursor: pointer; font-family: var(--font-sans); text-align: left; transition: background .12s; }
.share-option:active { background: var(--border); }
.share-option-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; color: var(--ink); font-weight: 700; }
.share-option-label { font-size: 15px; font-weight: 500; color: var(--ink); }
.share-option-sub { font-size: 12px; color: var(--ink-tertiary); margin-top: 2px; }

.retry-transcription-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--r-input);
  background: var(--ink); color: var(--surface);
  border: none; font-family: var(--font-sans); font-size: 15px;
  font-weight: 500; cursor: pointer; transition: opacity .15s;
}
.retry-transcription-btn:active { opacity: .8; }
.retry-transcription-btn:disabled { opacity: .5; cursor: default; }
.retry-note { font-size: 13px; color: var(--ink-tertiary); }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--olive); animation: spin .8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Word correction modal ───────────────── */
.correct-modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.correct-modal[hidden] { display: none; }
.correct-backdrop {
  position: absolute; inset: 0;
  background: rgba(43,42,38,.45);
}
.correct-card {
  position: relative; z-index: 1;
  background: var(--bg); border-radius: var(--r-card);
  padding: 1.25rem; width: calc(min(100vw, 390px) - 48px);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.correct-row {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 1rem;
}
.correct-input {
  width: 118px; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-input); font-family: var(--font-sans);
  font-size: 15px; color: var(--ink); outline: none; text-align: center;
}
.correct-input:focus { border-color: var(--ink); }
.correct-arrow { flex-shrink: 0; color: var(--ink-tertiary); font-size: 16px; }
.correct-actions { display: flex; gap: 8px; justify-content: center; }
.correct-cancel {
  width: 110px; padding: 10px;
  background: var(--red); border: none;
  border-radius: var(--r-input); font-family: var(--font-sans);
  font-size: 15px; font-weight: 500; color: white;
  cursor: pointer; transition: opacity .15s;
}
.correct-cancel:active { opacity: .7; }
.correct-apply {
  width: 110px; padding: 10px;
  background: var(--olive); color: white;
  border: none; border-radius: var(--r-input);
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  cursor: pointer; transition: opacity .15s;
}
.correct-apply:active { opacity: .8; }
.correct-apply:disabled { opacity: .5; cursor: default; }
.delete-msg {
  font-size: 15px; color: var(--ink);
}

.utterance-speaker { cursor: pointer; }
.utterance-speaker:hover { text-decoration: underline; text-decoration-color: var(--olive); }
.speaker-rename-input {
  font-size: 14px; font-weight: 600; font-family: var(--font-sans);
  color: var(--olive); border: none; border-bottom: 1.5px solid var(--olive);
  background: transparent; outline: none; width: 120px; padding: 0;
}

.key-moments { display: flex; flex-direction: column; gap: 8px; }
.key-moment-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card);
}
.km-time {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--olive); flex-shrink: 0; min-width: 36px;
}
.km-label { font-size: 14px; color: var(--ink-body); }

/* ── Tag picker ─────────────────────────── */
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 var(--px) 1rem; }
.tag-pick-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-chip);
  font-size: 13px; font-weight: 500;
  border: 1px dashed var(--border); background: transparent;
  color: var(--ink-secondary); cursor: pointer; transition: all .15s;
}
.tag-pick-chip.selected {
  border-style: solid; border-color: var(--olive);
  background: var(--olive-soft); color: var(--olive);
}
.tag-pick-chip:active { opacity: .7; }

/* ── Stealth recording decoy ───────────────────────────── */
.rec-stealth-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  right: calc(env(safe-area-inset-right) + 12px);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-secondary);
  opacity: 0.45;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 5;
}
.rec-stealth-btn:active { opacity: 0.85; }

.dnd-tip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 14px);
  max-width: min(420px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  z-index: 50;
}
.dnd-tip[hidden] { display: none; }
.dnd-tip-close {
  flex: none;
  background: transparent;
  border: none;
  color: var(--surface);
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-success { background: #E4F0E4; color: #3E8E4F; width: 100%; }
.btn-info    { background: #E3ECF4; color: #3D7CA6; width: 100%; }
.btn-danger  { background: var(--red-soft); color: var(--red); width: 100%; }

.end-dialog {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 24px;
}
.end-dialog[hidden] { display: none; }
.end-dialog-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border-radius: 16px;
  padding: 22px 20px;
}
.end-dialog-title {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.35;
}
.end-dialog-actions { display: flex; flex-direction: column; gap: 10px; }

.stealth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  color: #fff;
  display: none;
  opacity: 0;
  transition: opacity 240ms ease;
  /* respect notches / safe areas */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.stealth-overlay.is-open { display: block; opacity: 1; }

.stealth-clock {
  position: absolute;
  top: 18vh;
  left: 0;
  right: 0;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none; /* clock never reacts to taps */
}
.stealth-date {
  font-size: 19px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.2px;
}
.stealth-time {
  font-size: 82px;
  font-weight: 200;
  line-height: 1.05;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.stealth-close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 6px);
  right: calc(env(safe-area-inset-right) + 6px);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.16); /* very faint */
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1;
}
.stealth-close:active { color: rgba(255, 255, 255, 0.4); }

.stealth-consent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 24px;
}
.stealth-consent[hidden] { display: none; }
.stealth-consent-card {
  max-width: 320px;
  text-align: center;
  background: #1c1b19;
  border-radius: 14px;
  padding: 22px 20px;
}
.stealth-consent-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 16px;
}
/* legible override: app .btn-primary is dark-on-light, invisible on the dark card */
.stealth-consent-card .btn-primary {
  background: #fff;
  color: #1c1b19;
}

