/* Saudade Unified Local Music Vault v2 (saudade.now/open) */
/* Dark-Editorial Obsidian Shell · Loaded after ../shared/saudade-theme.css */

:root {
  --v-bg: #0C1116;
  --v-bg-elev: #10181F;
  --v-surface: #131C22;
  --v-surface-hi: #18242C;
  --v-surface-lo: #0E151B;
  --v-facts-bg: #0F171D;
  --v-words-bg: #171E24;
  --v-inset: #0B1116;

  --v-text: #F5EFE6;
  --v-text-bright: #FAF5EC;
  --v-text-soft: #D9D2C7;
  --v-muted: #9FB0BC;

  --v-gold: #D8B46C;
  --v-gold-soft: rgba(216, 180, 108, 0.13);
  --v-gold-border: rgba(216, 180, 108, 0.42);

  --v-crimson: #C94A4A;
  --v-crimson-soft: rgba(201, 74, 74, 0.14);
  --v-crimson-border: rgba(201, 74, 74, 0.44);

  --v-emerald: #52C49B;
  --v-emerald-soft: rgba(82, 196, 155, 0.13);
  --v-emerald-border: rgba(82, 196, 155, 0.40);

  --v-cyan: #67B7D1;
  --v-cyan-soft: rgba(103, 183, 209, 0.13);
  --v-cyan-border: rgba(103, 183, 209, 0.40);

  --v-border: rgba(245, 239, 230, 0.11);
  --v-border-strong: rgba(245, 239, 230, 0.22);
  --v-shadow: 0 18px 46px rgba(0, 0, 0, 0.40), 0 2px 8px rgba(0, 0, 0, 0.28);
}

html,
body.vault-body {
  background: radial-gradient(ellipse 86% 52% at 24% -6%, #16242E 0%, var(--v-bg) 54%, #090D11 100%);
  color: var(--v-text);
  max-width: 100%;
  overflow-x: clip;
}

/* Subtle dark archival hairline grid overriding paper grid */
body.vault-body::before {
  background-image:
    linear-gradient(to right, rgba(245, 239, 230, 0.026) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 239, 230, 0.026) 1px, transparent 1px);
  background-size: 40px 40px;
}

body.vault-body h1,
body.vault-body h2,
body.vault-body h3 {
  color: var(--v-text-bright);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

body.vault-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--v-gold);
  background: rgba(216, 180, 108, 0.10);
  padding: 1px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.vault-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 68px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vault-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ---------- Dark-Editorial Override for Unified mountStudioNav('open') ---------- */
body.vault-body .studio-nav {
  margin-bottom: 0;
  background: rgba(19, 28, 34, 0.90);
  backdrop-filter: blur(12px);
  border: 1px solid var(--v-border-strong);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.30);
}

body.vault-body .studio-brand {
  color: var(--v-text-bright);
}

body.vault-body .studio-back-arrow {
  color: var(--v-muted);
}

body.vault-body .studio-brand:hover .studio-back-arrow {
  color: var(--v-text-bright);
}

body.vault-body .studio-dot {
  background: var(--v-crimson);
  box-shadow: 0 0 0 4px rgba(201, 74, 74, 0.24);
}

body.vault-body .studio-tab {
  color: var(--v-muted);
  border-color: transparent;
}

body.vault-body .studio-tab-langs {
  color: var(--v-text-bright);
}

body.vault-body .studio-tab:hover {
  color: var(--v-text-bright);
  background: rgba(245, 239, 230, 0.08);
}

body.vault-body .studio-tab.active {
  color: var(--v-gold);
  background: var(--v-gold-soft);
  border-color: var(--v-gold-border);
  box-shadow: none;
}

body.vault-body .studio-tools .btn-soft {
  background: rgba(245, 239, 230, 0.06);
  color: var(--v-text-soft);
  border-color: var(--v-border);
  font-family: var(--font-mono);
  font-size: 12px;
}

body.vault-body .studio-tools .btn-soft:hover {
  background: rgba(245, 239, 230, 0.12);
  color: var(--v-text-bright);
  border-color: var(--v-border-strong);
}

body.vault-body .webview-pill-bar {
  background: rgba(216, 180, 108, 0.12);
  border-color: var(--v-gold-border);
  color: var(--v-text);
  margin-bottom: 0;
}

/* ---------- WebView Helper Banner ---------- */
.vault-webview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(103, 183, 209, 0.11);
  border: 1px solid var(--v-cyan-border);
  color: var(--v-text);
  font-size: 13.5px;
}

/* ---------- Reusable Editorial Cards, Kickers, Badges & Chips ---------- */
.v-card {
  background: linear-gradient(160deg, #162129 0%, var(--v-surface) 58%, #10181E 100%);
  border: 1px solid var(--v-border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--v-shadow);
  min-width: 0;
}

.v-kicker,
.v-kicker-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--v-gold);
}

.v-kicker { font-size: 11.5px; }
.v-kicker-sm { font-size: 11px; }
.v-kicker-emerald { color: var(--v-emerald); }
.v-kicker-cyan { color: var(--v-cyan); }
.v-kicker-crimson { color: #F28F8F; }
.v-kicker-gold { color: var(--v-gold); }

.v-section-title {
  margin: 6px 0 0;
  font-size: clamp(21px, 2.8vw, 27px);
  line-height: 1.18;
}

.v-section-sub {
  margin: 6px 0 0;
  color: var(--v-muted);
  font-size: 14.5px;
  line-height: 1.54;
  max-width: 72ch;
}

.v-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.v-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--v-border);
  background: rgba(245, 239, 230, 0.06);
  color: var(--v-text);
}

.v-badge-gold {
  color: var(--v-gold);
  background: var(--v-gold-soft);
  border-color: var(--v-gold-border);
}

.v-badge-emerald {
  color: var(--v-emerald);
  background: var(--v-emerald-soft);
  border-color: var(--v-emerald-border);
}

.v-badge-cyan {
  color: var(--v-cyan);
  background: var(--v-cyan-soft);
  border-color: var(--v-cyan-border);
}

.v-badge-crimson {
  color: #F49696;
  background: var(--v-crimson-soft);
  border-color: var(--v-crimson-border);
}

.v-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(245, 239, 230, 0.06);
  border: 1px solid var(--v-border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #C7D4DD;
}

.v-chip-gold {
  color: var(--v-gold);
  border-color: var(--v-gold-border);
  background: var(--v-gold-soft);
}

.zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
}

.zone-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.zone-badge-facts {
  color: var(--v-muted);
  background: rgba(159, 176, 188, 0.10);
  border: 1px solid rgba(159, 176, 188, 0.28);
}
.zone-badge-facts::before { background: var(--v-emerald); }

.zone-badge-words {
  color: var(--v-gold);
  background: var(--v-gold-soft);
  border: 1px solid var(--v-gold-border);
}
.zone-badge-words::before { background: var(--v-gold); }

.zone-badge-crossing {
  color: var(--v-cyan);
  background: var(--v-cyan-soft);
  border: 1px solid var(--v-cyan-border);
}
.zone-badge-crossing::before { background: var(--v-cyan); }

/* ---------- Tactile Buttons (>=44px mobile touch targets) ---------- */
.v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--v-border-strong);
  background: rgba(245, 239, 230, 0.06);
  color: var(--v-text-bright);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.v-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
  background: rgba(245, 239, 230, 0.12);
}

.v-btn:active:not(:disabled) { transform: translateY(0); }
.v-btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }

.v-btn:focus-visible,
.vault-dropzone:focus-visible,
.vault-tab:focus-visible,
.motif-tab:focus-visible,
.year-pill:focus-visible,
.tm-option-btn:focus-visible,
.tm-track-chip:focus-visible,
.tm-slot-well:focus-visible,
.crossing-summary:focus-visible,
.momento-action-btn:focus-visible,
.v-inline-link:focus-visible,
.crossing-wiki-link:focus-visible,
.tm-listen-pill:focus-visible,
.vault-footer a:focus-visible {
  outline: 2px solid var(--v-gold);
  outline-offset: 2px;
}

.v-btn-lg {
  min-height: 50px;
  padding: 13px 22px;
  font-size: 15px;
  border-radius: 14px;
}

.v-btn-sm {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.v-btn-xs {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 9px;
}

.v-btn-emerald {
  background: var(--v-emerald);
  border-color: var(--v-emerald);
  color: #081511;
  box-shadow: 0 8px 24px rgba(82, 196, 155, 0.22);
}
.v-btn-emerald:hover:not(:disabled) {
  background: #67D4AD;
  border-color: #67D4AD;
}

.v-btn-gold {
  background: var(--v-gold);
  border-color: var(--v-gold);
  color: #100E09;
  box-shadow: 0 8px 22px rgba(216, 180, 108, 0.20);
}
.v-btn-gold:hover:not(:disabled) {
  background: #E5C581;
  border-color: #E5C581;
}

.v-btn-cyan {
  background: var(--v-cyan);
  border-color: var(--v-cyan);
  color: #071419;
  box-shadow: 0 8px 22px rgba(103, 183, 209, 0.22);
}
.v-btn-cyan:hover:not(:disabled) {
  background: #7EC7DF;
  border-color: #7EC7DF;
}

.v-btn-ghost {
  background: rgba(245, 239, 230, 0.06);
  color: var(--v-text);
  border-color: var(--v-border-strong);
}

.v-btn-quiet {
  background: transparent;
  color: var(--v-muted);
  border-color: var(--v-border);
}
.v-btn-quiet:hover:not(:disabled) {
  color: var(--v-text);
  background: rgba(245, 239, 230, 0.06);
}

.v-btn-saved {
  background: var(--v-emerald-soft);
  color: var(--v-emerald);
  border-color: var(--v-emerald-border);
}
.v-btn-saved:hover:not(:disabled) {
  background: rgba(82, 196, 155, 0.22);
  border-color: var(--v-emerald);
}

/* ---------- Dark Form Controls (16px prevents iOS Safari auto-zoom) ---------- */
body.vault-body input[type="text"],
body.vault-body textarea,
body.vault-body select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--v-text-bright);
  background: var(--v-inset);
  border: 1.5px solid var(--v-border-strong);
  border-radius: 12px;
  padding: 10px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.vault-body input[type="text"]::placeholder,
body.vault-body textarea::placeholder {
  color: #9FB3B8;
  opacity: 1;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 400;
}

body.vault-body input[type="text"]:focus,
body.vault-body textarea:focus,
body.vault-body select:focus {
  outline: none;
  border-color: var(--v-gold);
  box-shadow: 0 0 0 3px rgba(216, 180, 108, 0.22);
}

body.vault-body input[type="text"]:focus-visible,
body.vault-body textarea:focus-visible,
body.vault-body select:focus-visible {
  outline: 2px solid var(--v-gold);
  outline-offset: 2px;
  border-color: var(--v-gold);
  box-shadow: 0 0 0 3px rgba(216, 180, 108, 0.22);
}

body.vault-body textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.45;
}

body.vault-body select {
  appearance: auto;
  cursor: pointer;
  text-overflow: ellipsis;
}

body.vault-body select option {
  background: #131C22;
  color: #F5EFE6;
}

.v-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.v-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v-label {
  font-size: 13px;
  font-weight: 650;
  color: #D4DEE6;
}

.v-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--v-muted);
  white-space: nowrap;
}

.v-counter.near-limit {
  color: var(--v-gold);
  font-weight: 700;
}

/* ---------- Intake Section ---------- */
.intake-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intake-hero {
  background: linear-gradient(155deg, #16222B 0%, #10181F 100%);
  border: 1px solid var(--v-border-strong);
  border-radius: 24px;
  padding: 30px 30px 26px;
  box-shadow: var(--v-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intake-hero h1 {
  font-size: clamp(29px, 4.5vw, 46px);
  line-height: 1.07;
  margin: 2px 0 0;
}

.intake-hero h1 em {
  color: var(--v-gold);
  font-style: italic;
}

.intake-lead {
  margin: 0;
  color: var(--v-muted);
  font-size: 15.5px;
  line-height: 1.56;
  max-width: 70ch;
}

.intake-lead strong { color: var(--v-text); }

.intake-collapsed-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--v-surface);
  border: 1px solid var(--v-border);
}

.intake-collapsed-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.intake-collapsed-meta {
  font-size: 13.5px;
  color: var(--v-muted);
}

.intake-collapsed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intake-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vault-dropzone {
  background: linear-gradient(160deg, rgba(19, 28, 34, 0.96) 0%, rgba(12, 17, 22, 0.98) 100%);
  border: 1.5px dashed rgba(216, 180, 108, 0.42);
  border-radius: 22px;
  padding: 30px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.14s ease;
}

.vault-dropzone.is-dragover {
  border-color: var(--v-emerald);
  background: linear-gradient(160deg, rgba(82, 196, 155, 0.12) 0%, rgba(19, 28, 34, 0.98) 100%);
  transform: scale(1.005);
}

.vault-dropzone.is-disabled {
  opacity: 0.52;
  pointer-events: none;
}

.dropzone-emblem {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(201, 74, 74, 0.14);
  border: 1px solid var(--v-crimson-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-seal {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--v-crimson);
  box-shadow: inset 0 0 0 3px rgba(245, 239, 230, 0.25);
}

.dropzone-title {
  font-size: clamp(21px, 3vw, 27px);
  margin: 0;
}

.dropzone-sub {
  margin: 0;
  color: var(--v-muted);
  font-size: 14.5px;
  max-width: 58ch;
  line-height: 1.5;
}

.dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
}

.intake-coach-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  font-size: 13.5px;
  color: var(--v-muted);
}

.v-inline-link {
  color: var(--v-gold);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v-inline-link:hover { color: #F2D391; }

.dropzone-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  max-width: 780px;
}

.format-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--v-text-soft);
  background: rgba(245, 239, 230, 0.05);
  border: 1px solid var(--v-border);
  border-radius: 999px;
  padding: 4px 10px;
}

.dropzone-privacy-note {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--v-emerald);
  line-height: 1.5;
}

/* Worker Progress & Error */
.worker-progress {
  background: var(--v-surface);
  border: 1px solid var(--v-emerald-border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.worker-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--v-emerald);
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 239, 230, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--v-emerald) 0%, var(--v-cyan) 100%);
  transition: width 0.18s ease;
}

.intake-error {
  background: var(--v-crimson-soft);
  border: 1px solid var(--v-crimson-border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.intake-error-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 260px;
}

.intake-error-copy strong {
  color: #FCA5A5;
  font-size: 15px;
}

.intake-error-copy p {
  margin: 0;
  color: var(--v-text);
  font-size: 13.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.intake-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Unified Workspace & Top Status Bars ---------- */
.vault-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.privacy-proof-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 13px 18px;
  border-radius: 16px;
  background: linear-gradient(125deg, rgba(82, 196, 155, 0.12) 0%, rgba(19, 28, 34, 0.96) 65%);
  border: 1px solid var(--v-emerald-border);
}

.privacy-proof-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 260px;
}

.emerald-pulse {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--v-emerald);
  box-shadow: 0 0 0 4px rgba(82, 196, 155, 0.22);
}

.privacy-proof-text {
  margin: 0;
  background: transparent !important;
  padding: 0 !important;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: #B7F0D9 !important;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.privacy-proof-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.source-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--v-gold);
  background: var(--v-gold-soft);
  border: 1px solid var(--v-gold-border);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

/* 1-Year Account Data Amber Notice */
.banner-1yr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(216, 180, 108, 0.14) 0%, rgba(19, 28, 34, 0.96) 100%);
  border: 1.5px solid var(--v-gold-border);
}

.banner-1yr-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 320px;
  min-width: 0;
}

.banner-1yr-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v-gold);
}

.banner-1yr-copy h3 { font-size: 19px; margin: 0; }
.banner-1yr-copy p {
  margin: 0;
  color: var(--v-text-soft);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- 2-Tab Unified Switcher (Door + House) ---------- */
.vault-tabs-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border-radius: 20px;
  background: var(--v-surface-lo);
  border: 1px solid var(--v-border-strong);
}

.vault-tab {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--v-muted);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
}

.vault-tab:hover {
  background: rgba(245, 239, 230, 0.05);
  color: var(--v-text);
}

.vault-tab-eyebrow {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v-muted);
}

.vault-tab-title {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.3vw, 21px);
  font-weight: 700;
  color: var(--v-text-soft);
  line-height: 1.2;
}

.vault-tab-badge {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 239, 230, 0.06);
  border: 1px solid var(--v-border);
  color: var(--v-muted);
  white-space: nowrap;
}

.vault-tab.is-active[data-vault-tab="door"] {
  background: linear-gradient(145deg, rgba(82, 196, 155, 0.14) 0%, rgba(19, 28, 34, 0.96) 100%);
  border-color: var(--v-emerald-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.vault-tab.is-active[data-vault-tab="door"] .vault-tab-eyebrow { color: var(--v-emerald); }
.vault-tab.is-active[data-vault-tab="door"] .vault-tab-title { color: var(--v-text-bright); }
.vault-tab.is-active[data-vault-tab="door"] .vault-tab-badge {
  color: var(--v-emerald);
  background: var(--v-emerald-soft);
  border-color: var(--v-emerald-border);
}

.vault-tab.is-active[data-vault-tab="house"] {
  background: linear-gradient(145deg, rgba(216, 180, 108, 0.15) 0%, rgba(19, 28, 34, 0.96) 100%);
  border-color: var(--v-gold-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.vault-tab.is-active[data-vault-tab="house"] .vault-tab-eyebrow { color: var(--v-gold); }
.vault-tab.is-active[data-vault-tab="house"] .vault-tab-title { color: var(--v-text-bright); }
.vault-tab.is-active[data-vault-tab="house"] .vault-tab-badge {
  color: var(--v-gold);
  background: var(--v-gold-soft);
  border-color: var(--v-gold-border);
}

.vault-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  animation: v-fade-up 0.2s ease;
}

/* =========================================================
   TAB 1: 60s TIME-MACHINE (THE VIRAL DOOR)
   ========================================================= */
.door-unavailable {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-color: var(--v-gold-border);
}

.tm-quiz-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-color: rgba(216, 180, 108, 0.30);
}

.tm-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tm-step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--v-surface-lo);
  border: 1px solid var(--v-border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--v-muted);
  min-width: 0;
}

.tm-step-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: rgba(159, 176, 188, 0.4);
}

.tm-step-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-step-pill.is-active {
  color: var(--v-text);
  border-color: var(--v-gold);
  background: rgba(216, 180, 108, 0.11);
}
.tm-step-pill.is-active .tm-step-dot {
  background: var(--v-gold);
  box-shadow: 0 0 0 3px rgba(216, 180, 108, 0.25);
}

.tm-step-pill.is-hit {
  color: var(--v-emerald);
  border-color: var(--v-emerald-border);
  background: rgba(82, 196, 155, 0.09);
}
.tm-step-pill.is-hit .tm-step-dot { background: var(--v-emerald); }

.tm-step-pill.is-miss {
  color: #F49696;
  border-color: var(--v-crimson-border);
  background: rgba(201, 74, 74, 0.09);
}
.tm-step-pill.is-miss .tm-step-dot { background: var(--v-crimson); }

.tm-quiz-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tm-quiz-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-motif-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.tm-motif-pill[data-tone="gold"] {
  color: var(--v-gold);
  background: var(--v-gold-soft);
  border-color: var(--v-gold-border);
}

.tm-motif-pill[data-tone="cyan"] {
  color: var(--v-cyan);
  background: var(--v-cyan-soft);
  border-color: var(--v-cyan-border);
}

.tm-motif-pill[data-tone="crimson"] {
  color: #F28F8F;
  background: var(--v-crimson-soft);
  border-color: var(--v-crimson-border);
}

.tm-period-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--v-text);
  background: rgba(245, 239, 230, 0.07);
  border: 1px solid var(--v-border-strong);
}

.tm-quiz-question {
  font-size: clamp(23px, 3.4vw, 33px);
  line-height: 1.18;
  margin: 0;
}

.tm-quiz-hint {
  margin: -8px 0 0;
  font-size: 14px;
  color: var(--v-muted);
}

.tm-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tm-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--v-border-strong);
  background: var(--v-surface-lo);
  color: var(--v-text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
}

.tm-option-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--v-gold);
  background: #17232C;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
}

.tm-option-btn:disabled { cursor: default; }

.tm-option-key {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--v-gold);
  background: rgba(216, 180, 108, 0.12);
  border: 1px solid rgba(216, 180, 108, 0.32);
}

.tm-option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.tm-option-track {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--v-text-bright);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tm-option-artist {
  font-size: 13.5px;
  color: var(--v-muted);
  overflow-wrap: anywhere;
}

.tm-option-mark {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.tm-option-btn.is-correct {
  border-color: var(--v-emerald);
  background: rgba(82, 196, 155, 0.16);
}
.tm-option-btn.is-correct .tm-option-key {
  background: var(--v-emerald);
  border-color: var(--v-emerald);
  color: #071611;
}
.tm-option-btn.is-correct .tm-option-mark { color: var(--v-emerald); }

.tm-option-btn.is-wrong {
  border-color: var(--v-crimson);
  background: rgba(201, 74, 74, 0.17);
}
.tm-option-btn.is-wrong .tm-option-key {
  background: var(--v-crimson);
  border-color: var(--v-crimson);
  color: #FFF5F5;
}
.tm-option-btn.is-wrong .tm-option-mark { color: #F59E9E; }

.tm-option-btn.is-dimmed { opacity: 0.45; }

.tm-reveal-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(12, 17, 22, 0.85);
  border: 1.5px solid var(--v-border-strong);
  animation: v-fade-up 0.2s ease;
}

.tm-reveal-strip.is-hit {
  border-color: rgba(82, 196, 155, 0.55);
  background: linear-gradient(135deg, rgba(82, 196, 155, 0.14) 0%, rgba(12, 17, 22, 0.90) 100%);
}

.tm-reveal-strip.is-miss {
  border-color: rgba(201, 74, 74, 0.55);
  background: linear-gradient(135deg, rgba(201, 74, 74, 0.14) 0%, rgba(12, 17, 22, 0.90) 100%);
}

.tm-reveal-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 260px;
}

.tm-verdict-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tm-reveal-strip.is-hit .tm-verdict-tag { color: var(--v-emerald); }
.tm-reveal-strip.is-miss .tm-verdict-tag { color: #F29494; }

.tm-answer-line {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--v-text-bright);
}

.tm-fact-line {
  display: inline-block;
  font-size: 12.5px;
  width: fit-content;
}

/* Post-Reveal Builder & Artifacts */
.tm-builder {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: v-fade-up 0.24s ease;
}

.tm-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-color: rgba(216, 180, 108, 0.36);
}

.tm-score-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tm-score-headline-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tm-score-title {
  font-size: clamp(27px, 4vw, 37px);
  line-height: 1.1;
}

.tm-score-caption {
  margin: 0;
  color: var(--v-muted);
  font-size: 15px;
  line-height: 1.5;
}

.tm-artifacts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tm-artifact-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  background: var(--v-surface);
  border: 1px solid var(--v-border-strong);
  border-top-width: 3px;
  min-width: 0;
}

.tm-artifact-card[data-tone="gold"] { border-top-color: var(--v-gold); }
.tm-artifact-card[data-tone="cyan"] { border-top-color: var(--v-cyan); }
.tm-artifact-card[data-tone="crimson"] { border-top-color: var(--v-crimson); }

.tm-artifact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.tm-artifact-track {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--v-text-bright);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tm-artifact-artist {
  font-size: 14px;
  color: var(--v-muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.tm-artifact-fact {
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--v-surface-lo);
  border: 1px solid var(--v-border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #CBD7E0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tm-artifact-input-wrap {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tm-artifact-input-wrap.is-hidden-words textarea {
  opacity: 0.6;
}

.tm-artifact-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--v-border);
}

.tm-artifact-foot .v-btn {
  width: 100%;
}

/* Door -> House Bridge Banner */
.door-house-bridge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: var(--v-gold-border);
  background: linear-gradient(145deg, rgba(216, 180, 108, 0.13) 0%, #131C22 65%);
}

.door-house-bridge-copy {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.door-house-bridge-copy h3 {
  font-size: clamp(20px, 2.6vw, 25px);
  line-height: 1.2;
}

.door-house-bridge-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--v-text-soft);
  line-height: 1.5;
}

/* Client-Only Duel Desk */
.tm-duel-desk {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-color: var(--v-emerald-border);
}

.tm-identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: stretch;
}

.tm-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--v-surface-lo);
  border: 1.5px solid var(--v-border-strong);
  cursor: pointer;
}

.tm-checkbox-card:hover { border-color: var(--v-gold-border); }

.tm-checkbox-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--v-emerald);
  flex: 0 0 20px;
  cursor: pointer;
}

.tm-checkbox-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tm-checkbox-copy strong { font-size: 14.5px; color: var(--v-text); }
.tm-checkbox-copy small { font-size: 12.5px; color: var(--v-muted); line-height: 1.4; }

.tm-privacy-invariant {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(82, 196, 155, 0.08);
  border: 1px dashed var(--v-emerald-border);
  font-size: 13px;
  color: #D2E8DF;
}

.tm-invariant-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(82, 196, 155, 0.18);
  color: var(--v-emerald);
}

.tm-duel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tm-duel-link-box {
  padding: 18px;
  border-radius: 16px;
  background: var(--v-surface-lo);
  border: 1.5px solid var(--v-cyan-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: v-fade-up 0.2s ease;
}

.tm-duel-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-duel-link-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-duel-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--v-muted);
}

.tm-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.tm-link-row input[type="text"] {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--v-cyan);
  min-width: 0;
  flex: 1;
}

.tm-duel-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tm-duel-tip {
  font-size: 13px;
  color: var(--v-muted);
}

/* =========================================================
   TAB 2: LIFETIME CHAPTERS DESK (THE PERMANENT HOUSE)
   ========================================================= */
.desk-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-tile {
  background: var(--v-surface);
  border: 1px solid var(--v-border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.kpi-tile-words {
  border-color: var(--v-gold-border);
  background: linear-gradient(155deg, rgba(216, 180, 108, 0.09) 0%, var(--v-surface) 100%);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v-muted);
}

.kpi-tile-words .kpi-label { color: var(--v-gold); }

.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 31px);
  font-weight: 700;
  color: var(--v-text-bright);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.kpi-sub {
  font-size: 12.5px;
  color: var(--v-muted);
  overflow-wrap: anywhere;
}

/* Export Dock */
.export-dock {
  background: linear-gradient(145deg, #162229 0%, #10181E 100%);
  border: 1px solid var(--v-gold-border);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--v-shadow);
}

.export-dock-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 320px;
  min-width: 0;
}

.export-dock-copy h2 { font-size: 22px; }
.export-dock-copy p {
  margin: 0;
  font-size: 13.5px;
  color: var(--v-muted);
  line-height: 1.5;
}

.export-dock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Desk Sections */
.desk-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-head-split {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.section-head-copy {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  flex: 1 1 320px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.12;
}

.dual-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dual-legend-sep {
  color: var(--v-border-strong);
  font-family: var(--font-mono);
}

/* Behavioral Motif Shelf */
.motif-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.motif-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 15px;
  border-radius: 14px;
  background: var(--v-surface);
  border: 1.5px solid var(--v-border);
  color: var(--v-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.motif-tab:hover {
  color: var(--v-text);
  background: var(--v-surface-hi);
  border-color: var(--v-border-strong);
}

.motif-tab.is-active {
  color: var(--v-text-bright);
  background: var(--v-gold-soft);
  border-color: var(--v-gold);
}

.motif-tab[data-motif="ghosts"].is-active {
  background: var(--v-crimson-soft);
  border-color: var(--v-crimson);
}

.motif-tab[data-motif="nocturnes"].is-active {
  background: var(--v-emerald-soft);
  border-color: var(--v-emerald);
}

.motif-tab-label { min-width: 0; overflow-wrap: anywhere; }

.motif-tab-count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 239, 230, 0.08);
  color: var(--v-text-soft);
  flex: 0 0 auto;
}

.motif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.motif-card {
  background: var(--v-surface);
  border: 1px solid var(--v-border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  border-top: 3px solid var(--v-gold);
}

.motif-card.motif-ghosts { border-top-color: var(--v-crimson); }
.motif-card.motif-nocturnes { border-top-color: var(--v-emerald); }

.motif-card-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.motif-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.motif-kind-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--v-gold);
}

.motif-card.motif-ghosts .motif-kind-tag { color: #E58080; }
.motif-card.motif-nocturnes .motif-kind-tag { color: var(--v-emerald); }

.motif-year-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--v-muted);
}

.motif-track {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--v-text-bright);
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}

.motif-artist {
  font-size: 14px;
  color: var(--v-muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.motif-fact-line {
  margin: 4px 0 0;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--v-inset);
  border: 1px solid var(--v-border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--v-text-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.motif-years-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.motif-year-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(216, 180, 108, 0.10);
  border: 1px solid rgba(216, 180, 108, 0.25);
  color: var(--v-gold);
}

.motif-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--v-border);
}

.motif-empty {
  grid-column: 1 / -1;
  background: var(--v-surface);
  border: 1px dashed var(--v-border-strong);
  border-radius: 16px;
  padding: 22px 20px;
  color: var(--v-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Year Jump Rail */
.year-jump-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--v-surface);
  border: 1px solid var(--v-border);
  color: var(--v-text-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.year-pill:hover {
  background: var(--v-surface-hi);
  border-color: var(--v-gold-border);
  color: var(--v-text-bright);
}

.year-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v-gold);
}

/* Lifetime Chapters Timeline */
.chapters-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chapter-card {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.16fr);
  border-radius: 22px;
  border: 1px solid var(--v-border-strong);
  overflow: hidden;
  box-shadow: var(--v-shadow);
  background: var(--v-surface);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.chapter-card.is-highlighted {
  border-color: var(--v-gold);
  box-shadow: 0 0 0 3px rgba(216, 180, 108, 0.34), var(--v-shadow);
}

/* Left Zone: FACTS · IMMUTABLE */
.chapter-facts {
  background: var(--v-facts-bg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.chapter-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.chapter-index-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--v-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chapter-year-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chapter-year-badge {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.8vw, 44px);
  font-weight: 700;
  color: var(--v-text-bright);
  line-height: 1;
}

.chapter-year-stats {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--v-emerald);
  background: var(--v-emerald-soft);
  border: 1px solid var(--v-emerald-border);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}

.chapter-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chapter-fact-box {
  background: rgba(245, 239, 230, 0.035);
  border: 1px solid var(--v-border);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.chapter-fact-box-peak {
  grid-column: 1 / -1;
  border-left: 3px solid var(--v-crimson);
}

.fact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v-muted);
}

.fact-primary {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--v-text-bright);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fact-secondary {
  font-size: 12.5px;
  color: var(--v-muted);
  overflow-wrap: anywhere;
}

.chapter-top-songs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-songs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.top-song-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(245, 239, 230, 0.03);
  border: 1px solid rgba(245, 239, 230, 0.07);
}

.top-song-rank {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--v-gold);
}

.top-song-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-song-title {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--v-text);
  overflow-wrap: anywhere;
}

.top-song-artist {
  font-size: 12px;
  color: var(--v-muted);
  overflow-wrap: anywhere;
}

.top-song-plays {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--v-muted);
  white-space: nowrap;
}

/* Right Zone: YOUR WORDS · LOCAL */
.chapter-words {
  background: var(--v-words-bg);
  border-left: 2px solid var(--v-gold-border);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.chapter-saved-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--v-emerald);
}

.chapter-title-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--v-text-soft);
}

body.vault-body input[type="text"].desk-input-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  padding: 11px 14px;
}

/* Momentos & Two Stories Crossing Cards */
.chapter-momentos-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-momentos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.momento-empty-hint {
  margin: 0;
  font-size: 13.5px;
  color: var(--v-muted);
  font-style: italic;
}

.momento-card {
  background: rgba(216, 180, 108, 0.06);
  border: 1px solid rgba(216, 180, 108, 0.25);
  border-left: 3px solid var(--v-gold);
  border-radius: 13px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Dignified Two Stories Crossing card */
.momento-card.is-crossing {
  background: linear-gradient(155deg, rgba(216, 180, 108, 0.08) 0%, rgba(15, 23, 29, 0.92) 55%, rgba(103, 183, 209, 0.09) 100%);
  border: 1px solid rgba(103, 183, 209, 0.32);
  border-left: 3px solid var(--v-gold);
  gap: 10px;
}

.crossing-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--v-cyan);
}

.crossing-pair {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crossing-pane {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 11px;
}

.crossing-pane-yours {
  border-left: 2px solid var(--v-gold);
}

.crossing-pane-song {
  border-left: 2px solid var(--v-cyan);
}

.crossing-pane-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.crossing-pane-yours .crossing-pane-label { color: var(--v-gold); }
.crossing-pane-song .crossing-pane-label { color: var(--v-cyan); }

.crossing-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(216, 180, 108, 0.55);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.crossing-divider::before,
.crossing-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(216, 180, 108, 0.25), rgba(103, 183, 209, 0.28));
}

.momento-quote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  line-height: 1.45;
  color: var(--v-text-bright);
  overflow-wrap: anywhere;
}

.momento-song-story {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: #C7DEE8;
  overflow-wrap: anywhere;
}

.momento-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.momento-song-attrib {
  font-size: 12.5px;
  color: var(--v-gold);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
}

.momento-card-actions {
  display: inline-flex;
  gap: 6px;
}

.momento-action-btn {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--v-border);
  background: rgba(245, 239, 230, 0.05);
  color: var(--v-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.momento-action-btn:hover {
  color: var(--v-text-bright);
  border-color: var(--v-border-strong);
}

.momento-action-btn-del:hover {
  color: #FCA5A5;
  border-color: var(--v-crimson-border);
  background: var(--v-crimson-soft);
}

/* Inline + Add Momento Composer + Collapsible Two Stories Crossing */
.momento-form {
  background: rgba(11, 17, 22, 0.75);
  border: 1px solid var(--v-border);
  border-radius: 14px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.momento-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.momento-form-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--v-gold);
}

.crossing-details {
  border-radius: 12px;
  background: rgba(103, 183, 209, 0.06);
  border: 1px dashed rgba(103, 183, 209, 0.34);
  padding: 10px 12px;
}

.crossing-details[open] {
  border-style: solid;
  border-color: var(--v-cyan-border);
  background: rgba(103, 183, 209, 0.09);
}

.crossing-summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--v-cyan);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}

.crossing-summary::-webkit-details-marker { display: none; }

.crossing-summary::after {
  content: "Optional";
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v-muted);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--v-border);
}

.crossing-details[open] .crossing-summary::after {
  content: "Open";
  color: var(--v-cyan);
  border-color: var(--v-cyan-border);
}

html[lang="es"] .crossing-summary::after {
  content: "Opcional";
}

html[lang="es"] .crossing-details[open] .crossing-summary::after {
  content: "Abierto";
}

.crossing-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crossing-wiki-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crossing-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(103, 183, 209, 0.12);
  border: 1px solid var(--v-cyan-border);
  color: #BCE5F3;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: background 0.14s ease, color 0.14s ease;
}

.crossing-wiki-link:hover {
  background: rgba(103, 183, 209, 0.22);
  color: #FAF5EC;
}

.momento-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.momento-form-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================================================
   FRIEND CHALLENGE MODE (#vd=...)
   ========================================================= */
.tm-error-card {
  border-color: var(--v-crimson-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tm-friend-title {
  margin: 4px 0 0;
  font-size: clamp(27px, 4.3vw, 42px);
  line-height: 1.08;
}

.tm-friend-desk {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: v-fade-up 0.24s ease;
}

.tm-friend-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-color: var(--v-cyan-border);
}

.tm-friend-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tm-proof-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-friend-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-color: rgba(82, 196, 155, 0.52);
  background: linear-gradient(145deg, rgba(82, 196, 155, 0.14) 0%, var(--v-surface) 60%);
}

.tm-friend-score-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 280px;
}

.tm-friend-score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tm-tray-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-color: var(--v-gold-border);
}

.tm-tray-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tm-tray-title {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

.tm-track-tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tm-track-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--v-gold-border);
  background: linear-gradient(145deg, #1B2730 0%, #111A20 100%);
  color: var(--v-text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  min-width: 0;
}

.tm-track-chip:hover {
  transform: translateY(-1px);
  border-color: var(--v-gold);
  background: #202F3A;
}

.tm-track-chip.is-placed {
  border-style: dashed;
  border-color: var(--v-cyan-border);
  background: rgba(103, 183, 209, 0.08);
  opacity: 0.72;
}

.tm-track-chip-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.tm-track-chip-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--v-text-bright);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.tm-track-chip-artist {
  font-size: 12.5px;
  color: var(--v-muted);
  overflow-wrap: anywhere;
}

.tm-track-chip-tag {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--v-gold-soft);
  color: var(--v-gold);
}

.tm-track-chip.is-placed .tm-track-chip-tag {
  background: var(--v-cyan-soft);
  color: var(--v-cyan);
}

.tm-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tm-slot-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  background: var(--v-surface);
  border: 1.5px solid var(--v-border-strong);
  border-top-width: 3px;
  min-width: 0;
}

.tm-slot-card[data-tone="gold"] { border-top-color: var(--v-gold); }
.tm-slot-card[data-tone="cyan"] { border-top-color: var(--v-cyan); }
.tm-slot-card[data-tone="crimson"] { border-top-color: var(--v-crimson); }

.tm-slot-card.is-active-slot {
  border-color: var(--v-gold);
  box-shadow: 0 0 0 2px rgba(216, 180, 108, 0.24), var(--v-shadow);
}

.tm-slot-card.is-reveal-hit {
  border-color: var(--v-emerald);
  background: linear-gradient(165deg, rgba(82, 196, 155, 0.12) 0%, var(--v-surface) 60%);
}

.tm-slot-card.is-reveal-miss {
  border-color: var(--v-crimson);
  background: linear-gradient(165deg, rgba(201, 74, 74, 0.12) 0%, var(--v-surface) 60%);
}

.tm-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.tm-slot-period {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--v-text-bright);
  line-height: 1.15;
}

.tm-slot-clue {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--v-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tm-slot-well {
  width: 100%;
  min-height: 70px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px dashed rgba(245, 239, 230, 0.24);
  background: var(--v-surface-lo);
  color: var(--v-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.tm-slot-well:hover { border-color: var(--v-gold); background: #141F27; }

.tm-slot-well.is-filled {
  border-style: solid;
  border-color: var(--v-cyan-border);
  background: rgba(103, 183, 209, 0.11);
  color: var(--v-text);
}

.tm-slot-well-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.tm-slot-well-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--v-text-bright);
  overflow-wrap: anywhere;
}

.tm-slot-well-sub {
  font-size: 12.5px;
  color: var(--v-muted);
  overflow-wrap: anywhere;
}

.tm-slot-clear-x {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--v-cyan);
}

.tm-slot-truth {
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--v-surface-lo);
  border: 1px solid var(--v-border-strong);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tm-slot-truth-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v-emerald);
}

.tm-slot-truth-track {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--v-text-bright);
  overflow-wrap: anywhere;
}

.tm-slot-truth-artist { font-size: 13px; color: var(--v-muted); }
.tm-slot-guess-miss { font-size: 12.5px; color: #F3A2A2; margin-top: 2px; }

.tm-listen-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tm-listen-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--v-muted);
  background: rgba(245, 239, 230, 0.05);
  border: 1px solid var(--v-border);
  text-decoration: none;
}

.tm-listen-pill:hover {
  color: var(--v-text-bright);
  border-color: var(--v-border-strong);
}

.tm-words-box {
  margin-top: auto;
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(12, 17, 22, 0.72);
  border: 1px solid var(--v-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-words-box.is-locked {
  border-style: dashed;
  border-color: rgba(216, 180, 108, 0.30);
}

.tm-words-box.is-unlocked {
  border-color: var(--v-gold-border);
  background: rgba(216, 180, 108, 0.08);
}

.tm-words-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--v-gold);
}

.tm-words-blurred {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14.5px;
  color: var(--v-muted);
  filter: blur(5.5px);
  user-select: none;
  pointer-events: none;
}

.tm-words-quote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  line-height: 1.42;
  color: var(--v-text-bright);
  overflow-wrap: anywhere;
}

.tm-words-empty {
  margin: 0;
  font-size: 12.5px;
  color: var(--v-muted);
}

.tm-commit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 22px;
  border-color: var(--v-emerald-border);
}

.tm-commit-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tm-commit-status strong { font-size: 15.5px; color: var(--v-text-bright); }
.tm-commit-status span { font-size: 13px; color: var(--v-muted); }

.tm-playback-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-color: var(--v-gold-border);
  background: linear-gradient(140deg, rgba(216, 180, 108, 0.11) 0%, var(--v-surface) 58%);
}

.tm-playback-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.tm-playback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---------- Footer ---------- */
.vault-footer {
  margin-top: 6px;
  padding: 15px 18px;
  border-radius: 16px;
  background: rgba(19, 28, 34, 0.68);
  border: 1px dashed var(--v-border-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--v-muted);
}

.vault-footer strong { color: var(--v-text); }

.vault-footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vault-footer a {
  color: var(--v-gold);
  text-decoration: none;
  font-weight: 600;
}

.vault-footer a:hover { text-decoration: underline; }

/* ---------- WebView Manual Backup Copy Sheet ---------- */
.vault-backup-sheet {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(7, 10, 14, 0.86);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.vault-backup-card {
  width: 100%;
  max-width: 540px;
  background: var(--v-surface);
  border: 1px solid var(--v-gold-border);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.vault-backup-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.vault-backup-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  color: var(--v-text-bright);
}

.vault-backup-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--v-muted);
}

.vault-backup-textarea {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  color: var(--v-text-soft) !important;
}

.vault-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Dark Overrides for Shared Toast & Save Sheet ---------- */
body.vault-body .saudade-toast {
  background: #1B2830;
  color: var(--v-text-bright);
  border: 1px solid var(--v-gold-border);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

body.vault-body .saudade-save-card {
  background: var(--v-surface);
  color: var(--v-text);
  border-color: var(--v-gold-border);
}

body.vault-body .saudade-save-head h3 { color: var(--v-text-bright); }

body.vault-body .saudade-save-hint {
  background: var(--v-gold-soft);
  border-color: var(--v-gold-border);
  color: var(--v-text);
}

body.vault-body .saudade-save-card .btn-soft {
  background: rgba(245, 239, 230, 0.08);
  color: var(--v-text);
  border-color: var(--v-border-strong);
}

body.vault-body .saudade-save-card .btn-primary {
  background: var(--v-gold);
  color: #0E1419;
  border-color: var(--v-gold);
}

body.vault-body .saudade-save-card .btn-accent {
  background: var(--v-emerald-soft);
  color: var(--v-emerald);
  border-color: var(--v-emerald-border);
}

/* ---------- Motion ---------- */
@keyframes v-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive Breakpoints (Tablet & Mobile 390px) ---------- */
@media (max-width: 960px) {
  .desk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-card { grid-template-columns: 1fr; }
  .chapter-words {
    border-left: none;
    border-top: 2px solid var(--v-gold-border);
  }
  .tm-artifacts-grid,
  .tm-slots-grid,
  .tm-track-tray,
  .tm-identity-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .vault-shell {
    padding: 12px 12px 56px;
    gap: 14px;
  }

  .intake-hero {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .vault-dropzone {
    padding: 22px 14px;
    border-radius: 18px;
  }

  .dropzone-actions .v-btn { width: 100%; }

  .v-card {
    padding: 18px 15px;
    border-radius: 18px;
  }

  .vault-tabs-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 6px;
    border-radius: 16px;
  }

  .vault-tab { padding: 11px 14px; }

  .tm-stepper,
  .tm-options-grid,
  .motif-tabs,
  .motif-grid,
  .chapter-meta-grid {
    grid-template-columns: 1fr;
  }

  .tm-duel-actions,
  .tm-friend-score-actions,
  .tm-playback-actions,
  .export-dock-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .tm-duel-actions .v-btn,
  .tm-friend-score-actions .v-btn,
  .tm-playback-actions .v-btn,
  .export-dock-actions .v-btn,
  .door-house-bridge .v-btn,
  .tm-commit-bar .v-btn,
  .tm-reveal-strip .v-btn {
    width: 100%;
  }

  .tm-link-row { flex-direction: column; }
  .tm-link-row .v-btn { width: 100%; }

  .chapter-facts,
  .chapter-words { padding: 16px 14px; }

  .export-dock { padding: 16px 15px; }

  .desk-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi-tile { padding: 13px; }
}

@media (max-width: 400px) {
  .desk-kpis { grid-template-columns: 1fr; }
  .source-pill { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
