:root {
  --bg: #08080f;
  --surface: #12121c;
  --surface-2: #1c1c2a;
  --surface-3: #242436;
  --border: #34344a;
  --border-soft: rgba(255, 255, 255, 0.1);
  --text: #f6f6ff;
  --muted: #c4c4dc;
  --accent: #7c5cff;
  --accent-2: #ff6b9d;
  --accent-glow: rgba(124, 92, 255, 0.45);
  --success: #4ade80;
  --warning: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Syne", "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 60px rgba(124, 92, 255, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 92, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 107, 157, 0.08), transparent);
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-settings {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(124, 92, 255, 0.15);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn-settings:hover {
  background: rgba(124, 92, 255, 0.28);
  transform: translateY(-1px);
}

.api-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 0.9rem;
}

.btn-banner {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 8px;
  background: var(--warning);
  color: #1a1a26;
  font-weight: 600;
  cursor: pointer;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.settings-modal.hidden { display: none !important; }

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.settings-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  margin: 0;
}

.btn-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.settings-status-line {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 16px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo p {
  color: var(--muted);
  font-size: 0.875rem;
}

.status-badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.status-badge.online { color: var(--success); border-color: rgba(74, 222, 128, 0.3); }
.status-badge.offline { color: var(--warning); border-color: rgba(251, 191, 36, 0.3); }

.upload-section { margin-bottom: 2rem; }

.input-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.input-mode-tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.input-mode-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
}
.url-input-row {
  padding: 1.25rem;
}
.url-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
}
.url-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
}
.url-hint { margin-top: 0.5rem; font-size: 0.8rem; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--surface);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.05);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.dropzone h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.dropzone p { color: var(--muted); font-size: 0.9rem; }
.dropzone .hint { font-size: 0.8rem; margin-top: 0.75rem; opacity: 0.7; }

.selected-file {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.btn-primary {
  margin-top: 1rem;
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  color: white;
  background: linear-gradient(135deg, var(--accent), #5a3fd4);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) { opacity: 0.92; }
.btn-primary:active:not(:disabled) { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .action-row { grid-template-columns: 1fr; }
}

.btn-secondary {
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover:not(:disabled) { background: rgba(124, 92, 255, 0.12); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

.studio { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }

.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.live-status {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.live-status.online { color: var(--success); border-color: rgba(74, 222, 128, 0.35); }
.live-status.offline { color: var(--warning); border-color: rgba(251, 191, 36, 0.35); }

.track-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-family: var(--font);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}

.btn-sm:hover { border-color: var(--accent); color: var(--accent); }

.vst-preview-player { margin-top: 0.5rem; }

.layer-tracks { display: flex; flex-direction: column; gap: 1rem; }

.layer-group h3 {
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 1rem;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.track-card {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.track-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.track-card h4 { font-size: 1rem; }

.track-group-tag {
  font-size: 0.7rem;
  color: var(--accent-2);
  background: rgba(255, 107, 157, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.timbre-suggest {
  font-size: 0.88rem;
  color: #c4b5fd;
  margin-bottom: 0.35rem;
}

.preview-note { font-size: 0.78rem; margin-bottom: 0.5rem; }

.stem-player {
  width: 100%;
  margin: 0.75rem 0;
  height: 36px;
}

.vst-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.vst-select {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
}

.settings-card { margin-bottom: 1.5rem; }

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.settings-header h3 {
  margin: 0;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.field input, .field select {
  padding: 0.55rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
}

.settings-hint { font-size: 0.78rem; margin: 0.75rem 0; }

.settings-save { margin-top: 0.5rem; width: auto; padding: 0.65rem 1.2rem; }

.btn-ghost {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.loading {
  text-align: center;
  padding: 2rem 1rem;
}

.progress-wrap {
  max-width: 420px;
  margin: 0 auto 1rem;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.45s ease;
}

.progress-stage {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.progress-pct {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: #1f1f1f;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}

.btn-google:hover {
  background: #f4f4f4;
}

.btn-google.hidden {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading-sub { font-size: 0.85rem; margin-top: 0.5rem; opacity: 0.7; }

.warnings {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  color: var(--warning);
  font-size: 0.9rem;
}

.results { display: flex; flex-direction: column; gap: 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-card {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(255, 107, 157, 0.08));
  border-color: rgba(124, 92, 255, 0.25);
}

.hero-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(124, 92, 255, 0.3);
}

.muted { color: var(--muted); font-size: 0.9rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.metric {
  background: var(--surface-2);
  padding: 0.85rem;
  border-radius: 10px;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--mono);
  margin-top: 0.25rem;
}

.detail-list { display: flex; flex-direction: column; gap: 0.65rem; }

.detail-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.detail-row .label {
  min-width: 110px;
  color: var(--muted);
  flex-shrink: 0;
}

.detail-row .value { color: var(--text); }

.timbre-grid, .synth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.timbre-item, .synth-item {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1rem;
  border-left: 3px solid var(--accent);
}

.timbre-item h4, .synth-item h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.timbre-item .role, .synth-item .type {
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-bottom: 0.5rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: var(--bg);
  border-radius: 4px;
  color: var(--muted);
}

.auto-vst-badge {
  display: inline-block;
  margin: 0.4rem 0;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  border-radius: 999px;
  background: rgba(56, 189, 120, 0.15);
  color: #6ee7a8;
}

.midi-row {
  margin: 0.5rem 0;
  font-size: 0.82rem;
}

.midi-link {
  color: var(--accent-2);
  text-decoration: none;
}

.midi-link:hover {
  text-decoration: underline;
}

.synth-param {
  font-size: 0.82rem;
  margin-top: 0.35rem;
  color: var(--muted);
}

.synth-param strong { color: var(--text); font-weight: 500; }

.notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notes-list li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.9rem;
}

.notes-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.suno-card { border-color: rgba(255, 107, 157, 0.25); }

.suno-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.suno-actions { display: flex; gap: 0.5rem; }

.suno-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-family: var(--font);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.suno-prompt {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  max-height: 320px;
  overflow-y: auto;
}

.hidden { display: none !important; }

.chord-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.chord-block {
  font-family: var(--mono);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.chord-arrow { color: var(--muted); }

/* ---------- Lingzo Web (legacy — 仅 .legal-page 等页内 header) ---------- */
.legal-page .site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* 全站顶栏在 body > .site-header，由 lingzo-brand.css 控制，勿用下方旧 flex */
body > .site-header {
  display: block;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.lingzo-app { max-width: 1160px; }

.legal-page .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

img.brand-mark {
  display: block;
  object-fit: contain;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  padding: 0;
  font-size: 0;
}

.legal-page .brand-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}

.legal-page .site-nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

.legal-page .site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.legal-page .site-nav a:hover { color: var(--text); }

.legal-page .header-auth, .legal-page .header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.plan-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.2);
  color: #c4b5fd;
}

.usage-text { font-size: 0.78rem; color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(90deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead { color: var(--muted); margin-bottom: 1.25rem; max-width: 36rem; }

.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }

.hero-note { font-size: 0.82rem; color: var(--muted); }

.flow-list {
  margin: 1rem 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.flow-list li { margin-bottom: 0.45rem; }

.features-section, .pricing-section, .workspace-section {
  margin-bottom: 3rem;
}

.features-section h2, .pricing-section h2, .workspace-section h2 {
  margin-bottom: 1rem;
}

.section-lead { color: var(--muted); margin-bottom: 1.25rem; }

.features-grid, .pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.feature-card h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }

.pricing-card { display: flex; flex-direction: column; gap: 0.75rem; }
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35); }
.pricing-feats { list-style: none; color: var(--muted); font-size: 0.84rem; }
.pricing-feats li { margin-bottom: 0.4rem; padding-left: 1.05rem; position: relative; }
.pricing-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--success); }

.workspace-header { margin-bottom: 1rem; }

.auth-gate {
  text-align: center;
  padding: 2rem;
  margin-bottom: 1rem;
}

.web-note { margin-top: 0.75rem; font-size: 0.85rem; }

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a { color: var(--accent-2); text-decoration: none; }

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.auth-tab.active {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.15);
}

.auth-error {
  color: #fca5a5;
  font-size: 0.88rem;
  margin: 0.5rem 0;
}

.legal-page { max-width: 720px; }
.legal-card { padding: 2rem; }
.legal-card h1 { margin-bottom: 0.5rem; }
.legal-card h2 { margin: 1.5rem 0 0.5rem; font-size: 1.1rem; }
.legal-card ul { margin-left: 1.25rem; color: var(--muted); }
.legal-card li { margin-bottom: 0.35rem; }

.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }

.contact-section { margin-bottom: 3rem; }
.contact-section h2 { margin-bottom: 0.5rem; }
.desktop-section { margin-bottom: 3rem; }
.desktop-section h2 { margin-bottom: 0.5rem; }
.desktop-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
  margin: 1rem 0;
}
.contact-value { font-size: 1.1rem; font-weight: 600; margin-top: 0.35rem; word-break: break-all; }
.contact-hint { font-size: 0.85rem; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  max-width: 320px;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}
.account-dialog h4 { margin: 1.25rem 0 0.5rem; font-size: 0.95rem; }
.account-summary { font-size: 0.9rem; line-height: 1.7; }
.credit-history {
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
.credit-row { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.25rem 0; border-bottom: 1px solid var(--border); }
.credit-row:last-child { border-bottom: none; }
.field textarea, .field select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
}
.api-banner.offline { border-color: rgba(248,113,113,0.5); background: rgba(248,113,113,0.12); color: #fecaca; }
.api-banner.online { border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.1); color: #bbf7d0; }
.timbre-item .role { color: var(--accent-2); font-size: 0.85rem; margin-bottom: 0.25rem; }
.synth-item { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.synth-item h4 { margin-bottom: 0.25rem; }
.synth-item .type { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.35rem; }
.synth-param { font-size: 0.85rem; margin-top: 0.2rem; }
