/* NoteFusion Web app — one stylesheet for /app and /app/sheet.
 *
 * Built on the brand tokens in theme.css (--color-*). The signed-in app is a shell: a
 * sidebar on wide screens that becomes a top bar with a slide-in drawer on phones. The
 * sign-in page and the guest preview use the same shell in "guest" mode (top bar only). */

:root {
  --ink: var(--color-ink-950);
  --copy: var(--color-ink-700);
  --muted: var(--color-ink-500);
  --faint: var(--color-ink-300);
  --line: var(--color-border-default);
  --line-strong: var(--color-border-strong);
  --bg: var(--color-surface-canvas);
  --surface: var(--color-surface-base);
  --wash: var(--color-surface-subtle);
  --blue: var(--color-brand-500);
  --blue-dark: var(--color-brand-600);
  --blue-deep: #1e3a8a;
  --blue-soft: var(--color-brand-100);
  --blue-tint: var(--color-brand-050);
  --brand-gradient: linear-gradient(115deg, #1d4ed8 0%, #3b82f6 100%);
  --studio-gradient: linear-gradient(160deg, #1e40af 0%, #2563eb 55%, #3b82f6 100%);
  --gold: #f2c14e;
  --gold-ink: #1f1600;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --danger: var(--color-danger-600);
  --danger-soft: var(--color-danger-100);
  --success: var(--color-success-600);
  --success-soft: var(--color-success-100);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: var(--shadow-card);
  --shadow-pop: var(--shadow-elevated);
  --side-w: 272px;
  --topbar-h: 60px;
  --ring: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

html { scroll-padding-top: 80px; }
body { color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--blue-dark); }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 1.85rem; font-weight: 800; margin: 0 0 6px; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 9px; }
h2 .ic { width: 20px; height: 20px; color: var(--blue); flex: none; }
h3 { font-size: 0.95rem; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Brand mark, and its heartbeat while the microphone is open ─────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; flex: none; background: var(--brand-gradient); -webkit-mask: url(/assets/mark.png) center / contain no-repeat; mask: url(/assets/mark.png) center / contain no-repeat; }
.brand small { font-weight: 600; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 2px; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.12); }
  70% { transform: scale(1); }
}
body.is-recording .brand-mark, body.is-recording .home-mark { animation: heartbeat 1.05s ease-in-out infinite; transform-origin: 50% 55%; }

/* ── Shell ───────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.topbar { display: none; }
.side {
  position: sticky; top: 0; height: 100vh; z-index: 20;
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 14px 16px; background: var(--surface); border-right: 1px solid var(--line);
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; }
/* Scoped past .btn's own display, which comes later: the drawer's buttons exist only on phones. */
.side .drawer-close, .topbar .drawer-toggle { display: none; }
.topbar .drawer-toggle, .side .drawer-close, :root[data-theme="dark"] .topbar .drawer-toggle, :root[data-theme="dark"] .side .drawer-close { background: none; border-color: transparent; }
.topbar .drawer-toggle:hover, .side .drawer-close:hover { background: var(--wash); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-radius: var(--radius-sm); background: none;
  color: var(--copy); font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item .ic { width: 20px; height: 20px; color: var(--muted); }
.nav-item:hover { background: var(--wash); color: var(--ink); }
.nav-item.on { background: var(--blue-tint); color: var(--blue-dark); }
.nav-item.on .ic { color: var(--blue); }
.nav-new, .nav-new.on { background: var(--brand-gradient); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22); margin-bottom: 8px; }
.nav-new .ic, .nav-new.on .ic { color: #fff; }
.nav-new:hover { color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }
.recents { padding: 10px 6px 0; min-height: 0; overflow: auto; }
.recents-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 6px 6px; }
.recent-item { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 0.875rem; font-weight: 500; color: var(--copy); padding: 7px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item:hover { background: var(--wash); color: var(--ink); }
.recents-all { display: inline-block; margin: 6px 8px 0; font-size: 0.8rem; color: var(--muted); }
.side-spacer { flex: 1; }
.side-help { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 0.875rem; text-decoration: none; padding: 8px 12px; border-radius: var(--radius-sm); white-space: nowrap; }
.side-help:hover { background: var(--wash); color: var(--ink); }

/* The sidebar's foot: this month's usage as one line and a bar, and the theme switch. */
.side-foot { display: grid; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.usage-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 0.8rem; color: var(--muted); }
.usage-row > :first-child { font-weight: 600; color: var(--ink); }
.usage-bar { height: 6px; border-radius: 999px; background: var(--wash); margin-top: 8px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--blue); transition: width 0.4s ease; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.8rem; color: var(--muted); }
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wash); }
.theme-switch button { width: 32px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.theme-switch button .ic { width: 16px; height: 16px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }

/* The way into the account: the photo in the phone's top bar, a chip at the top right on a desk. */
.avatar-btn { margin-left: 4px; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.avatar-btn .who-avatar { width: 34px; height: 34px; font-size: 0.85rem; }
.avatar-btn[aria-expanded="true"] .who-avatar, .avatar-btn:focus-visible .who-avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.app-head { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 28px 0; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 0.875rem; cursor: pointer; }
.acct-chip:hover, .acct-chip[aria-expanded="true"] { border-color: var(--line-strong); }
.acct-chip .who-avatar { width: 30px; height: 30px; font-size: 0.78rem; }
.acct-chip .ic { width: 16px; height: 16px; color: var(--muted); }
.acct-chip-name { max-width: 14ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }

.user-menu { position: fixed; top: 64px; right: 28px; z-index: 40; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12); padding: 6px; }
.user-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu-head .who-avatar { width: 40px; height: 40px; }
.user-menu-id { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.user-menu-id strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-id span { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-item, .user-menu-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font: inherit; font-weight: 500; font-size: 0.9rem; color: var(--copy); text-decoration: none; }
.user-menu-item { cursor: pointer; }
.user-menu-item .ic, .user-menu-row > .ic { width: 18px; height: 18px; color: var(--muted); }
.user-menu-item:hover { background: var(--wash); color: var(--ink); }
.user-menu-item.danger, .user-menu-item.danger .ic { color: var(--danger); }
.user-menu-row .theme-switch, .user-menu-item .switch { margin-left: auto; }
.user-menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* A plain on/off switch. */
.switch { position: relative; flex: none; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background 0.15s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2); transition: transform 0.15s ease; }
.switch[aria-checked="true"], [aria-checked="true"] > .switch { background: var(--blue); }
.switch[aria-checked="true"]::after, [aria-checked="true"] > .switch::after { transform: translateX(16px); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.5; }
.pill-pro { background: none; color: var(--blue-dark); box-shadow: inset 0 0 0 1px var(--blue-soft); }
.pill-free { background: var(--blue-tint); color: var(--blue-dark); }
.pill-credits { background: none; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; padding: 0; font-size: 0.75rem; }

.content { min-width: 0; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1000px; margin: 0 auto; padding: 32px 28px 72px; }
.page-head { margin: 0 0 20px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { color: var(--muted); margin: 0; max-width: 60ch; }

/* Guest / signed-out: a single column under a top bar, no sidebar. */
body.guest .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
body.guest .side { display: none; }
body.guest .topbar { display: flex; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); align-items: center; gap: 12px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }

/* ── Home: the greeting and the studio card ──────────────────────────────── */
.home { text-align: center; padding: clamp(12px, 5vh, 48px) 0 22px; }
.home-mark { display: block; width: 64px; height: 64px; margin: 0 auto 16px; background: var(--brand-gradient); -webkit-mask: url(/assets/mark.png) center / contain no-repeat; mask: url(/assets/mark.png) center / contain no-repeat; }
.greeting { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 4px; }
.home-sub { margin: 0; }
.studio { position: relative; background: var(--studio-gradient); color: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 18px 48px rgba(29, 78, 216, 0.28); margin-bottom: 24px; overflow: hidden; }
.studio::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%); pointer-events: none; }
.studio > * { position: relative; }
.studio .drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  min-height: 210px; padding: 26px 20px; margin: 0; border: 2px dashed rgba(255, 255, 255, 0.55); border-radius: 16px;
  background: rgba(255, 255, 255, 0.06); cursor: pointer; color: #fff; transition: border-color 0.15s ease, background 0.15s ease;
}
.studio .drop:hover, .studio .drop.is-over { border-color: #fff; background: rgba(255, 255, 255, 0.14); }
.studio .drop input { display: none; }
.studio .drop-ic { width: 36px; height: 36px; color: rgba(255, 255, 255, 0.9); }
.studio .drop-hint { font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); font-weight: 500; }
.btn.btn-light { background: #fff; color: var(--blue-dark); font-weight: 700; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18); }
.btn.btn-light:hover:not(:disabled) { background: #eff6ff; transform: translateY(-1px); }
.btn.btn-dark { background: var(--blue-deep); color: #fff; border-color: rgba(255, 255, 255, 0.15); }
.btn.btn-dark:hover:not(:disabled) { background: #172554; }
.studio .studio-kind { display: flex; margin: 12px 0 0; background: rgba(15, 23, 42, 0.18); }
.studio .studio-kind label { flex: 1; justify-content: center; color: rgba(255, 255, 255, 0.85); }
.studio-kind label .ic { width: 16px; height: 16px; }
.studio .studio-kind label:has(input:checked) { background: #fff; color: var(--blue-dark); }
.studio-opts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 2px 0; }
.studio-opt { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.85rem; font-weight: 600; color: rgba(255, 255, 255, 0.9); cursor: pointer; }
.studio-opt input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: #fff; }
.studio-opt select { width: auto; min-height: 32px; padding: 4px 28px 4px 10px; font-size: 0.85rem; font-weight: 600; border-radius: 8px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); appearance: none; -webkit-appearance: none; background: rgba(255, 255, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 8px center no-repeat; }
.studio-opt select:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18); }
.studio-opt select option { color: #0f172a; background: #fff; }
.btn.btn-glass { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.btn.btn-glass:hover:not(:disabled) { background: rgba(255, 255, 255, 0.24); }
.studio-status.link-hint { margin-top: 8px; font-weight: 500; }
.studio-status.link-hint:empty { display: none; }
/* The song card under the link box sits on the blue studio block: glass, white ink, white handles. */
.studio .link-looking { text-align: left; margin-top: 10px; }
.studio .link-section {
  --ls-bg: rgba(255, 255, 255, 0.12); --ls-line: rgba(255, 255, 255, 0.35); --ls-ink: #fff; --ls-muted: rgba(255, 255, 255, 0.8);
  --ls-track: rgba(255, 255, 255, 0.3); --ls-fill: rgba(255, 255, 255, 0.92); --ls-handle: #fff; --ls-handle-ring: var(--blue-dark); --ls-focus: rgba(255, 255, 255, 0.3);
}
.studio .link-section .btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.studio .link-section .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.24); }
.studio-or { color: rgba(255, 255, 255, 0.75); margin: 16px 0 12px; }
.studio-or::before, .studio-or::after { background: rgba(255, 255, 255, 0.3); }
.studio-link .input-wrap input { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.45); color: #fff; padding-left: 104px; }
.studio-link .input-wrap input::placeholder { color: rgba(255, 255, 255, 0.78); }
.studio-link .input-wrap input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.16); }
.provider-marks { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 8px; color: #fff; pointer-events: none; }
.provider-marks .ic { width: 20px; height: 20px; stroke: none; }
.studio-rec { width: 100%; min-height: 50px; font-size: 1rem; }
.studio-status { margin: 10px 0 0; min-height: 1.3em; text-align: center; color: rgba(255, 255, 255, 0.85); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-lead { color: var(--muted); font-size: 0.925rem; margin: -4px 0 18px; max-width: 70ch; }
.card-upsell { background: linear-gradient(135deg, #eff6ff, #ffffff); border-color: #dbe6fb; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.section { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 18px 16px; background: var(--surface); min-width: 0; }
.section.wide { grid-column: 1 / -1; }
.section .card-lead { margin-bottom: 14px; }
.perks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.925rem; color: var(--copy); }
.perks .ic { color: var(--success); width: 18px; height: 18px; margin-top: 2px; }

/* ── Forms & buttons ─────────────────────────────────────────────────────── */
label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0 0 6px; color: var(--copy); }
input[type=text], input[type=url], input[type=email], input[type=password], textarea, select {
  width: 100%; font: inherit; color: var(--ink); padding: 11px 14px; min-height: 46px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: var(--ring); }
textarea { resize: vertical; line-height: 1.5; }
.field { margin-bottom: 14px; }
.input-wrap { position: relative; flex: 1; min-width: 0; display: block; }
.input-wrap > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-wrap input { padding-left: 42px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.925rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: var(--surface);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn .ic { width: 18px; height: 18px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--faint); background: var(--wash); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover:not(:disabled) { background: #eab63a; }
.btn-danger { color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); border-color: transparent; }
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: 0.85rem; border-radius: 10px; }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; border-radius: 10px; }
.btn-icon .ic { width: 17px; height: 17px; }
.btn.on { background: var(--blue-fill, var(--blue)); color: #fff; border-color: var(--blue-fill, var(--blue)); }
.btn-link { background: none; border: none; color: var(--blue-dark); padding: 0; font: inherit; font-weight: 600; cursor: pointer; min-height: 0; }
.btn .lock { width: 14px; height: 14px; opacity: 0.75; }
.btn-rec { color: var(--danger); }
.btn-rec .ic { color: var(--danger); }
.studio .btn-rec, .btn-primary.btn-rec, .btn-primary.btn-rec .ic { color: #fff; }
.studio .btn-rec .ic { color: #fff; }

.link-form { display: flex; gap: 10px; }
.link-form input { flex: 1; min-width: 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 18px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.9rem; margin: 0 0 14px; line-height: 1.5; }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--blue-tint); color: var(--blue-dark); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert .btn { margin-left: auto; }
.doh-ask { flex-wrap: wrap; align-items: center; }
.doh-ask .doh-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.doh-ask .doh-choices .btn { margin-left: 0; }

/* ── Segmented tabs ──────────────────────────────────────────────────────── */
.tabs { display: inline-flex; gap: 3px; background: var(--wash); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.tabs.fill { display: flex; }
.tab { flex: 1; text-align: center; padding: 8px 14px; border-radius: 9px; border: none; background: none; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background 0.15s ease, color 0.15s ease; }
.tab:hover { color: var(--ink); }
.tab[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1); }
.upload-kind { display: inline-flex; gap: 3px; background: var(--wash); padding: 4px; border-radius: 12px; max-width: 100%; }
.upload-kind label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 0.875rem; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background 0.15s ease, color 0.15s ease; }
.upload-kind label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1); }
.upload-kind input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ── Progress: a stepper ─────────────────────────────────────────────────── */
.song { display: flex; gap: 14px; align-items: center; min-width: 0; }
.song img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: var(--bg); flex: none; }
.song .title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--ink); }
.song .artist { color: var(--muted); font-size: 0.9rem; }
.credit { font-size: 0.825rem; color: var(--muted); margin-top: 2px; }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 18px 0 14px; counter-reset: stage; }
.stage { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); color: var(--muted); font-size: 0.85rem; font-weight: 600; min-width: 0; }
.stage .dot { counter-increment: stage; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }
.stage .dot::before { content: counter(stage); }
.stage.on { background: var(--blue-tint); color: var(--blue-dark); }
.stage.on .dot { border-color: var(--blue-fill, var(--blue)); background: var(--blue-fill, var(--blue)); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
.stage.done { background: var(--success-soft); color: var(--success); }
.stage.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.stage.done .dot::before { content: "✓"; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); } 50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); } }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar { height: 8px; border-radius: 999px; background: var(--wash); overflow: hidden; flex: 1; min-width: 0; }
.bar > div { height: 100%; width: 0; background: var(--brand-gradient); border-radius: 999px; transition: width 0.6s ease; }
.bar-pct { flex: none; min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9rem; color: var(--blue-dark); }
.p-status { margin: 10px 0 0; color: var(--copy); font-weight: 600; }
.p-slow { margin: 8px 0 0; color: var(--color-warning-600); }
.p-offline { margin: 8px 0 0; color: var(--danger); }
.p-retry { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--wash); color: var(--copy); }

/* ── Result ──────────────────────────────────────────────────────────────── */
.result-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.result-head .song { flex: 1; min-width: 240px; }
.result-tabs { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--wash); font-size: 0.78rem; font-weight: 600; color: var(--copy); }
.sheet-wrap { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: auto; min-height: 240px; }
#sheet, #staff, #staff-parts, #sheet-parts { padding: 12px; }
.watermark { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* The faint mark on a free account's sheet is the logo itself, tinted brand blue, turned like a stamp. */
.watermark::before { content: ""; display: block; width: clamp(120px, 28%, 260px); aspect-ratio: 331 / 438; background: var(--blue); opacity: 0.08; transform: rotate(-24deg); -webkit-mask: url(/assets/mark.png) center / contain no-repeat; mask: url(/assets/mark.png) center / contain no-repeat; }
.solfa { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem; line-height: 1.9; white-space: pre-wrap; background: var(--blue-tint); border: 1px solid #dbe6fb; border-radius: var(--radius-sm); padding: 16px 18px; color: var(--ink); }
.solfa .doh { color: var(--blue-dark); font-weight: 700; }
.part { margin-top: 14px; }
.part h3 { font-size: 0.75rem; margin: 0 0 6px; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
#hymn, #r-hymn { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.hymn { border-collapse: collapse; margin: 8px 0 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
table.hymn td { border-left: 2px solid var(--ink); padding: 2px 8px; vertical-align: top; white-space: nowrap; }
table.hymn td:last-child { border-right: 2px solid var(--ink); }
.cell { display: inline-block; min-width: 2.6em; text-align: center; margin-right: 2px; }
.cell b { display: block; font-size: 1rem; }
.cell b.now { color: var(--blue); }
.cell i { display: block; font-style: normal; font-family: Inter, sans-serif; font-size: 0.72rem; color: var(--muted); min-height: 1em; }
/* Chords over the grid: the letter name with its root in solfa under it, greyed when a bar opens on a chord still sounding. */
.chord-grid .ch { display: block; min-height: 2.15em; line-height: 1.1; padding-bottom: 3px; }
.chord-grid .ch strong { display: block; font-family: Inter, sans-serif; font-size: 0.82rem; color: var(--blue-dark); white-space: pre; }
.chord-grid .ch small { display: block; font-size: 0.72rem; color: var(--muted); white-space: pre; }
.chord-grid .ch.held { opacity: 0.55; }
.chord-grid .ch.held strong::before { content: "("; }
.chord-grid .ch.held strong::after { content: ")"; }
.chord-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chord-chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 60px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); line-height: 1.25; }
.chord-chip small { font-size: 0.68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chord-chip strong { font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.chord-chip em { font-style: normal; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; color: var(--blue-dark); }

/* Player toolbar */
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.player .group { display: inline-flex; align-items: center; gap: 8px; background: var(--wash); border-radius: 10px; padding: 5px 10px; min-height: 36px; }
.player .group label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0; white-space: nowrap; }
.player input[type=number] { width: 54px; min-height: 30px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.875rem; }
.player select { width: auto; min-height: 30px; padding: 3px 26px 3px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.875rem; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 8px center no-repeat; appearance: none; -webkit-appearance: none; }
.player input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--blue); margin: 0; }

/* Sing it */
.sing-live { font-size: 2.6rem; font-weight: 800; color: var(--blue); text-align: center; padding: 12px 0 6px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: -0.02em; }
.sing-live small { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); font-family: Inter, sans-serif; letter-spacing: 0; }
.sing-score { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.sing-score strong { font-size: 2.2rem; letter-spacing: -0.02em; min-width: 2.2ch; text-align: center; color: var(--ink); }
.marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mark { min-width: 42px; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; background: #fff; }
.mark small { display: block; font-weight: 500; color: var(--muted); font-size: 0.7rem; font-family: Inter, sans-serif; }
.mark.hit { border-color: var(--success); color: var(--success); }
.mark.near { border-color: var(--amber); color: var(--amber); }
.mark.wrong { border-color: var(--danger); color: var(--danger); }
.mark.missed { color: var(--faint); }
.tr-readout { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 4px; }
.tr-readout strong { font-size: 1.35rem; min-width: 2ch; display: inline-block; text-align: center; }
table.ranges { border-collapse: collapse; margin-top: 12px; font-size: 0.875rem; width: 100%; }
table.ranges td { padding: 6px 12px 6px 0; border-top: 1px solid var(--line); }
table.ranges td:first-child { text-transform: capitalize; color: var(--muted); }
table.ranges .ok { color: var(--success); font-weight: 600; }
table.ranges .warn { color: var(--amber); font-weight: 600; }
table.ranges .bad { color: var(--danger); font-weight: 600; }

.share-row { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-row input { width: min(380px, 70vw); min-height: 36px; padding: 6px 10px; font-size: 0.875rem; }
.downloads { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.upgrade-note { background: linear-gradient(135deg, #fff7e0, #fffbef); border: 1px solid #f6e3a1; border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 16px; color: var(--copy); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: #fff; }
.plan .price { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.plan .per { color: var(--muted); font-size: 0.85rem; }
.plan .save { color: var(--success); font-size: 0.8rem; font-weight: 700; }
.plan .btn { width: 100%; margin-top: 12px; }
.foot { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 36px; }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.foot a.cta { display: inline-block; margin-top: 8px; font-weight: 600; }

/* ── Library ─────────────────────────────────────────────────────────────── */
.lib-search { margin-bottom: 16px; }
.lib-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lib-item { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.lib-item:hover { border-color: rgba(37, 99, 235, 0.35); box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
.lib-key { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-tint); color: var(--blue-dark); font-weight: 800; font-size: 1rem; display: flex; align-items: center; justify-content: center; letter-spacing: -0.02em; margin-bottom: 6px; }
.lib-item h3 { margin: 0; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.lib-item .meta { color: var(--muted); font-size: 0.825rem; }
.lib-item .actions { display: flex; gap: 8px; margin-top: 8px; }
.empty { text-align: center; padding: 28px 16px 20px; color: var(--muted); }
.empty > .ic { width: 44px; height: 44px; color: var(--blue); margin: 0 auto 10px; stroke-width: 1.6; }
.empty p { max-width: 42ch; margin: 0 auto 14px; }

/* ── Account & settings: the profile beside grouped lists ─────────────────── */
.acct-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.acct-profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 26px 20px 22px; margin: 0; }
.acct-profile .avatar-edit { margin-bottom: 10px; }
.acct-profile .who-avatar { width: 88px; height: 88px; font-size: 1.9rem; }
.acct-profile .name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); }
.acct-profile .email { color: var(--muted); font-size: 0.9rem; word-break: break-all; }
.acct-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 14px; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--wash); color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.acct-photo-btn { margin: 0 0 4px; cursor: pointer; }
.acct-groups { display: grid; gap: 20px; min-width: 0; }
.group-title { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 0.925rem; color: var(--ink); text-align: left; text-decoration: none; }
.lrow:first-child { border-top: 0; }
.lrow .k { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 500; line-height: 1.45; }
.lrow .k > .ic { color: var(--muted); }
.lrow .v { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); flex: none; }
.lrow .v > .ic { width: 16px; height: 16px; }
.lrow .link { color: var(--blue-dark); font-weight: 600; }
.lrow-block { display: block; }
.lrow-block .usage-row { font-size: 0.9rem; }
.lrow-note { margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; }
.lrow-btn { cursor: pointer; }
.lrow-btn:hover { background: var(--wash); }
.lrow-btn.danger, .lrow-btn.danger .k > .ic { color: var(--danger); }
.pill-active { background: var(--success-soft); color: var(--success); }
.theme-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wash); }
.theme-seg button { min-width: 64px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.theme-seg button:hover { color: var(--ink); }
.theme-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }

/* ── Signed out: the pitch, the try box and the sign-in card side by side ── */
.auth-split { max-width: 1000px; margin: 12px auto 0; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: start; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-dark); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }
.auth-split h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.035em; }
.auth-split .lead { color: var(--muted); font-size: 1.02rem; max-width: 52ch; }
.auth-split .auth { margin: 0; max-width: none; }
.auth-points { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--copy); }
.auth-points .ic { width: 20px; height: 20px; color: var(--blue); margin-top: 1px; }
.try-free { margin-top: 22px; }
.try-free .try-status-error { color: var(--danger); }
.try-free .try-status-info { color: var(--blue-dark); }
.try-free .try-status a { font-weight: 600; }
.try-file input { display: none; }
#try-status { min-height: 1.3em; margin-top: 10px; }

/* ── Skeletons ───────────────────────────────────────────────────────────── */
.skel { position: relative; overflow: hidden; background: #e9eef6; border-radius: 8px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent); animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-line { height: 12px; margin: 10px 0; }
.skel-line.w40 { width: 40%; } .skel-line.w60 { width: 60%; } .skel-line.w80 { width: 80%; }
.skel-title { height: 22px; width: 50%; margin: 4px 0 14px; }
.skel-input { height: 46px; border-radius: var(--radius-sm); }
.skel-staff { height: 220px; margin: 12px; border-radius: 6px; background: repeating-linear-gradient(180deg, #e9eef6 0 3px, transparent 3px 14px) 0 30px / 100% 70px no-repeat, #f6f8fc; }
.skel-plan { height: 150px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { .skel::after, .stage.on .dot, body.is-recording .brand-mark, body.is-recording .home-mark { animation: none; } }

/* ── Dialogs: onboarding and upgrade ─────────────────────────────────────── */
.onb, .modal { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.onb-card, .modal-card { position: relative; width: min(460px, 100%); background: #fff; border-radius: 24px; padding: 30px 28px 26px; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3); animation: onb-in 0.25s ease-out; max-height: calc(100vh - 40px); overflow: auto; }
.onb-card { text-align: center; }
.modal-card { width: min(560px, 100%); }
.modal-card h2 { font-size: 1.3rem; margin-bottom: 8px; padding-right: 36px; }
.modal-close { position: absolute; top: 16px; right: 16px; }
@keyframes onb-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.onb-skip { position: absolute; top: 16px; right: 18px; background: none; border: none; color: var(--muted); font-weight: 600; cursor: pointer; font-size: 0.875rem; }
.onb-skip:hover { color: var(--ink); }
.onb-art { width: 140px; height: 140px; margin: 8px auto 20px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #dbeafe, #f4f7fc 72%); display: flex; align-items: center; justify-content: center; color: var(--blue); }
.onb-art svg { width: 68px; height: 68px; }
.onb-card h2 { font-size: 1.4rem; letter-spacing: -0.025em; margin: 0 0 8px; justify-content: center; }
.onb-card p { color: var(--muted); margin: 0 0 18px; min-height: 3.2em; }
.onb-dots { display: flex; justify-content: center; gap: 8px; margin: 0 0 20px; }
.onb-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: width 0.2s ease, background 0.2s ease; }
.onb-dots span.on { background: var(--blue); width: 22px; border-radius: 999px; }
.onb-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.onb-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.onb-brand .brand-mark { width: 24px; height: 24px; }

/* ── Print (shared sheet) ────────────────────────────────────────────────── */
@media print {
  .side, .topbar, .player, .tabs, .no-print, .foot .cta { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: none; padding: 0; }
  .hidden-print-show { display: block !important; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .topbar { display: flex; padding: 0 14px; }
  .topbar .drawer-toggle { display: inline-flex; }
  body.guest .topbar .drawer-toggle { display: none; }
  .topbar .side-help { display: none; }
  body.guest .topbar .side-help { display: inline-flex; }
  /* The sidebar becomes a drawer that slides in over the page. */
  .side { position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: min(300px, 86vw); transform: translateX(-104%); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1); box-shadow: none; }
  body.drawer-open .side { transform: none; box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3); }
  .side .drawer-close { display: inline-flex; }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(15, 23, 42, 0.45); }
  .user-menu { top: calc(var(--topbar-h) + 6px); right: 12px; width: min(320px, calc(100vw - 24px)); }
  .app-head { display: none !important; }
  .acct-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  main { padding: 22px 18px 72px; }
  .auth-split { grid-template-columns: 1fr; gap: 20px; }
  .tool-grid { grid-template-columns: 1fr; }
  .section.wide { grid-column: auto; }
}
@media (max-width: 640px) {
  main { padding: 16px 14px 72px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .studio { padding: 16px; border-radius: 18px; }
  .studio .drop { min-height: 180px; padding: 22px 14px; }
  .brand small { display: none; }
  .link-form { flex-direction: column; }
  .stages { grid-template-columns: 1fr; gap: 6px; }
  .result-head { flex-direction: column; }
  .result-tabs { width: 100%; display: flex; }
  .tabs { width: 100%; display: flex; }
  .upload-kind label { flex: 1; justify-content: center; white-space: normal; text-align: center; font-size: 0.8rem; padding: 7px 8px; }
  .studio .studio-kind { flex-wrap: wrap; }
  .studio .studio-kind label { flex: 1 1 45%; }
  .studio-opts { gap: 8px 14px; }
  .alert { flex-wrap: wrap; }
  .alert .btn { margin-left: 0; }
  .share-row input { width: 100%; }
  .lrow { padding: 13px 14px; }
  .theme-seg button { min-width: 0; padding: 6px 9px; }
  .onb-card, .modal-card { padding: 24px 18px 20px; }
}

/* ── Sign in / create account ───────────────────────────────────────────────
 * One column on a phone; on a wide screen a quiet navy panel says what NoteFusion does beside it. */
.auth-page { width: 100%; }
.auth-aside { display: none; }
.auth-main { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 28px; }
.auth-top .brand-mark { width: 28px; height: 28px; }
.auth-card { text-align: left; }
.auth-title { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; }
.auth-tabs { margin: 0 0 20px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .field { margin: 0; }
.auth-form .alert { margin: 0; }
.auth-form .input-wrap input { padding-left: 44px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.label-row label { margin: 0; }
.label-row .btn-link { font-size: 0.85rem; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pw-eye:hover { background: var(--wash); color: var(--ink); }
.pw-eye .ic { width: 19px; height: 19px; }
.pw-hint { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 0.82rem; color: var(--muted); }
.pw-hint .ic { width: 15px; height: 15px; }
.pw-hint.ok { color: var(--success); }
.code-input { text-align: center; letter-spacing: 0.3em; font-weight: 700; font-size: 1.2rem; }
.auth-note { color: var(--muted); margin: 0; }
.btn-block { width: 100%; min-height: 48px; }
.auth-form .or { margin: 0; display: none; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.82rem; }
.google-slot { display: none; justify-content: center; min-height: 44px; }
.google-slot > div { max-width: 100%; }
.auth-form.has-google .or, .auth-form.has-google .google-slot { display: flex; }
.auth-switch { text-align: center; color: var(--muted); margin: 0; font-size: 0.9rem; }
.auth-switch .btn-link { font-size: inherit; }
.try-row { display: flex; align-items: center; gap: 12px; width: 100%; margin: 28px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.try-row:hover { border-color: var(--line-strong); background: var(--surface); }
.try-row-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--blue-tint); color: var(--blue); }
.try-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.try-row-text b { font-weight: 600; font-size: 0.95rem; }
.try-row-text small { color: var(--muted); font-size: 0.85rem; }
.try-row-chev { color: var(--faint); }
.auth-page .try-free { margin: 24px 0 0; }
.auth-page .try-free h2 { font-size: 1rem; }
.auth-fine { margin: 24px 0 0; text-align: center; font-size: 0.78rem; color: var(--muted); }
.auth-fine a { font-weight: 600; }

@media (min-width: 961px) {
  .auth-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
  .auth-aside { display: flex; flex-direction: column; padding: 40px 56px; color: #fff; background: linear-gradient(160deg, #16306E 0%, #0F1F4A 55%, #0B1736 100%); }
  .auth-aside .brand { color: #fff; }
  .auth-aside .brand-mark { background: #fff; }
  .auth-pitch { margin: auto 0; }
  .auth-pitch-title { font-size: clamp(2.2rem, 3.4vw, 2.9rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 16px; }
  .auth-pitch-sub { font-size: 1.05rem; color: rgba(255, 255, 255, 0.78); max-width: 46ch; margin: 0 0 32px; }
  .auth-sample { max-width: 440px; padding: 20px 22px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); }
  .auth-sample-head { display: flex; justify-content: space-between; font-size: 0.82rem; color: rgba(255, 255, 255, 0.72); }
  .auth-sample-solfa { font-family: var(--font-mono, ui-monospace, monospace); font-size: 1rem; white-space: nowrap; margin: 14px 0 12px; }
  .auth-sample-staff { display: block; width: 100%; color: #fff; }
  .auth-aside-foot { margin: 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
  .auth-main { max-width: none; display: flex; flex-direction: column; align-items: center; padding: 28px 40px 32px; }
  .auth-main > * { width: 100%; max-width: 400px; }
  .auth-top { max-width: none; margin-bottom: auto; }
  .auth-top-brand { visibility: hidden; }
  .auth-card { margin-top: 32px; }
  .auth-fine { margin-top: auto; padding-top: 24px; }
}

/* ── Avatars with a real photo ───────────────────────────────────────────── */
.who-avatar.has-img { background-size: cover; background-position: center; color: transparent; }
.avatar-edit { position: relative; display: inline-block; cursor: pointer; margin: 0; }
.avatar-badge { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--blue); box-shadow: var(--shadow); }
.avatar-badge .ic { width: 12px; height: 12px; }
.btn-link.small { font-size: 0.85rem; }



/* ── Pro: the membership shows, quietly, wherever the account does ──────── */
body.is-pro .pill-pro.gate { display: none; }
.greeting-pro { vertical-align: middle; margin-left: 10px; font-size: 0.65rem; }
.membership { display: grid; gap: 16px; }
.membership-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm); background: linear-gradient(135deg, #fff7dc, #fffdf5); border: 1px solid #f3dd96; }
.membership-head .crown { width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fbe39a, #e9b949); color: #3b2a00; }
.membership-head .crown .ic { width: 22px; height: 22px; }
.membership-head strong { display: block; font-size: 1.05rem; letter-spacing: -0.01em; }
.membership-head span { color: var(--muted); font-size: 0.875rem; }

/* ── Sign in / sign up: a screen of its own, the card and nothing else ───── */
body.auth-only .topbar, body.auth-only .side, body.auth-only .drawer-backdrop { display: none !important; }
body.auth-only .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body.auth-only main > :not(#view-auth) { display: none !important; }
body.auth-only main { max-width: none; min-height: 100vh; min-height: 100dvh; padding: 24px 20px 32px; }
body.auth-only .foot { display: none; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 0.875rem; }
@media (min-width: 961px) { body.auth-only main { padding: 0; } }
.auth-back .ic { width: 16px; height: 16px; }

/* ── Payment card: plan picker ─────────────────────────────────────────── */
.pay-head { display: flex; align-items: center; gap: 12px; margin: 0 40px 6px 0; }
.pay-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; }
.pay-badge { width: 40px; height: 40px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fbe39a, #e9b949); color: #3b2a00; box-shadow: 0 6px 16px rgba(233, 185, 73, 0.35); }
.pay-badge .ic { width: 22px; height: 22px; }
.pay-lead { color: var(--muted); font-size: 0.925rem; margin: 6px 0 14px; }
.pay-perks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.pay-perks li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; color: var(--copy); line-height: 1.35; }
.pay-perks .ic { color: var(--success); width: 16px; height: 16px; flex: none; margin-top: 2px; }
@media (max-width: 520px) { .pay-perks { grid-template-columns: minmax(0, 1fr); } }
.plans.plan-picker { display: block; margin-top: 4px; }
.plan-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.plan-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px 14px 14px 40px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.plan-opt:hover { border-color: var(--line-strong); }
.plan-opt.on { border-color: var(--blue); background: var(--blue-tint); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.plan-opt-dot { position: absolute; left: 14px; top: 16px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.plan-opt.on .plan-opt-dot { border-color: var(--blue); box-shadow: inset 0 0 0 4px var(--surface); background: var(--blue); }
.plan-opt-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.plan-opt-name { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.plan-opt-tag { margin-left: auto; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: #065f46; background: #d1fae5; border-radius: 999px; padding: 2px 8px; }
.plan-opt-price { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2; margin-top: 2px; }
.plan-opt-price small { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan-opt-note { font-size: 0.78rem; color: var(--muted); }
.btn-pay { width: 100%; margin-top: 14px; min-height: 48px; font-size: 1rem; gap: 8px; }
.btn-pay .ic { width: 18px; height: 18px; }
.pay-fine { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 0.78rem; color: var(--muted); text-align: center; }
.pay-fine .ic { width: 14px; height: 14px; flex: none; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#plans-extend { margin-top: 4px; }

.studio-credits { margin: 10px 2px 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); text-align: center; }

/* ── Back from checkout: a quiet note while the payment confirms, then the welcome ── */
.pay-toast { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: flex; align-items: center; gap: 12px; width: min(380px, calc(100vw - 32px)); padding: 12px 12px 12px 14px; background: var(--surface); border: 1px solid #f3dd96; border-radius: 16px; box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16); animation: pay-toast-in 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.pay-toast-mark { width: 38px; height: 38px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff7dc; color: #a16207; }
.pay-toast-mark .ic { display: none; width: 20px; height: 20px; }
.pay-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(233, 185, 73, 0.3); border-top-color: #e9b949; animation: pay-spin 0.9s linear infinite; }
.pay-toast.is-slow .pay-spin { display: none; }
.pay-toast.is-slow .pay-toast-mark .ic { display: block; }
.pay-toast-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.pay-toast-text strong { font-size: 0.9rem; color: var(--ink); }
.pay-toast-text span { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.pay-toast-close { align-self: flex-start; border-color: transparent; }
.pay-toast:not(.is-slow) .pay-toast-close { display: none; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@keyframes pay-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .pay-toast { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; } }

.pro-welcome { animation: pro-fade 0.25s ease-out; }
.pro-welcome-card { width: min(440px, 100%); text-align: center; padding-top: 34px; animation: pro-in 0.5s cubic-bezier(0.34, 1.36, 0.64, 1); }
.pro-welcome-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; border-radius: inherit; background: radial-gradient(120% 100% at 50% 0%, rgba(242, 193, 78, 0.3), transparent 70%); pointer-events: none; }
.pro-welcome-card > * { position: relative; }
.pro-welcome-mark { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fbe39a, #e9b949); color: #3b2a00; box-shadow: 0 0 0 6px rgba(242, 193, 78, 0.18), 0 14px 30px rgba(233, 185, 73, 0.4); animation: pro-mark-in 0.6s cubic-bezier(0.34, 1.36, 0.64, 1) 0.12s both; }
.pro-welcome-mark .ic { width: 36px; height: 36px; }
.pro-welcome-mark::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(242, 193, 78, 0.7); opacity: 0; animation: pro-ring 1.4s ease-out 0.55s 2 forwards; }
.modal-card.pro-welcome-card h2 { justify-content: center; font-size: 1.45rem; padding: 0; margin: 0 0 6px; }
.pro-welcome-plan { color: var(--muted); font-size: 0.925rem; margin: 0 0 18px; }
.pro-welcome-perks { text-align: left; margin: 0 0 22px; padding: 16px 18px; border-radius: var(--radius-sm); background: linear-gradient(135deg, #fff7dc, #fffdf5); border: 1px solid #f3dd96; }
.pro-welcome-perks .ic { color: #b7791f; }
.btn-pro { background: linear-gradient(135deg, #fbe39a, #e9b949); color: #3b2a00; font-weight: 700; box-shadow: 0 8px 20px rgba(233, 185, 73, 0.35); }
.btn-pro:hover:not(:disabled) { box-shadow: 0 12px 26px rgba(233, 185, 73, 0.45); transform: translateY(-1px); }
.btn-pro:focus-visible { outline: 3px solid rgba(233, 185, 73, 0.55); outline-offset: 3px; }
@keyframes pro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pro-in { from { opacity: 0; transform: translateY(14px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes pro-mark-in { from { opacity: 0; transform: scale(0.4) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes pro-ring { from { opacity: 0.9; transform: scale(0.92); } to { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) {
  .pay-toast, .pro-welcome, .pro-welcome-card, .pro-welcome-mark, .pro-welcome-mark::after { animation: none; }
  .pay-spin { animation-duration: 2.4s; }
}

/* ── Dark mode ───────────────────────────────────────────────────────────────
 * theme.css darkens the brand tokens; these are the app's own light-only colours. The engraved
 * sheet stays on white paper, as printed music does, so the notation reads the same either way. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --blue-deep: #0c4a6e;
  --amber-soft: rgba(233, 185, 73, 0.16);
  --danger-soft: rgba(239, 68, 68, 0.16);
  --success-soft: rgba(16, 185, 129, 0.16);
  --ring: 0 0 0 4px rgba(56, 189, 248, 0.2);
}
[data-theme="dark"] .card-upsell { background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), var(--surface)); border-color: var(--line-strong); }
[data-theme="dark"] .solfa { border-color: var(--line); }
[data-theme="dark"] .mark, [data-theme="dark"] .plan { background: var(--surface); }
[data-theme="dark"] .upgrade-note { background: rgba(233, 185, 73, 0.08); border-color: rgba(233, 185, 73, 0.3); }
[data-theme="dark"] .skel { background: #1d1f27; }
[data-theme="dark"] .skel-staff { background: repeating-linear-gradient(180deg, #262833 0 3px, transparent 3px 14px) 0 30px / 100% 70px no-repeat, #181920; }
[data-theme="dark"] .onb-card, [data-theme="dark"] .modal-card { background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); border: 1px solid var(--line); }
[data-theme="dark"] .onb-art { background: radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.22), var(--surface) 72%); }
[data-theme="dark"] .membership-head { background: rgba(233, 185, 73, 0.1); border-color: rgba(233, 185, 73, 0.35); }
[data-theme="dark"] .plan-opt-tag { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
[data-theme="dark"] .plan-opt.on { box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
[data-theme="dark"] .pill-free { color: var(--color-brand-500); }
[data-theme="dark"] .chord-grid .ch strong, [data-theme="dark"] .chord-chip em { color: var(--color-brand-500); }
[data-theme="dark"] .pay-toast { border-color: rgba(233, 185, 73, 0.35); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .pay-toast-mark { background: rgba(233, 185, 73, 0.14); color: var(--gold); }
[data-theme="dark"] .pro-welcome-card::before { background: radial-gradient(120% 100% at 50% 0%, rgba(242, 193, 78, 0.16), transparent 70%); }
[data-theme="dark"] .pro-welcome-perks { background: rgba(233, 185, 73, 0.08); border-color: rgba(233, 185, 73, 0.3); }
[data-theme="dark"] .pro-welcome-perks .ic { color: var(--gold); }

/* ── Library folders ─────────────────────────────────────────────────────── */
.lib-folders { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.lib-chip { border: 1px solid var(--line); background: var(--surface); color: var(--copy); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.lib-chip:hover { border-color: var(--line-strong); }
.lib-chip.on { background: var(--blue-fill, var(--blue)); border-color: var(--blue-fill, var(--blue)); color: #fff; }
.lib-folder-bar { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; background: var(--wash); }
.lib-folder-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lib-folder-actions { display: inline-flex; gap: 8px; }
.lib-folder-bar .share-row { margin-top: 10px; }
.lib-folder-tag { align-self: flex-start; font-size: 0.72rem; font-weight: 700; color: var(--blue-dark); background: var(--blue-tint); border-radius: 999px; padding: 2px 9px; }
.lib-item .actions { flex-wrap: wrap; align-items: center; }
.lib-file { width: auto; max-width: 100%; min-width: 0; min-height: 32px; padding: 4px 8px; font-size: 0.8rem; border-radius: 8px; }
.folder-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.folder-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); background: var(--surface); font-weight: 600; }
.folder-list a:hover { border-color: var(--blue); }
.folder-list .key { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.folder-back { display: inline-block; margin-bottom: 10px; font-size: 0.875rem; }

/* Official Play badge. The PNG's transparent margin is the clear space Google's guidelines
   require, so it takes no padding of its own; height follows the 646 x 250 artwork. */
.store-badge { display: inline-block; line-height: 0; transition: transform .18s ease; }
.store-badge img { width: 182px; height: auto; }
.store-badge:hover { transform: translateY(-2px); text-decoration: none; }

/* Links come last and say up front that they do not always work (YouTube blocks server downloads). */
.link-more { margin-top: 14px; }
.link-more summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--blue); list-style: none; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; }
.link-more summary::-webkit-details-marker { display: none; }
.link-more summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -2px; transition: rotate 150ms ease-out; }
.link-more[open] summary::after { rotate: -135deg; translate: 0 2px; }
.link-more summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.link-more .link-form { margin-top: 10px; }
.link-more #try-paste { margin-top: 8px; }
.link-note { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .link-more summary::after { transition: none; } }

/* ── The choir plan: the join and rename forms, the director's singers, the choir library ── */
.choir-join { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.choir-join input { flex: 1 1 160px; min-width: 0; min-height: 36px; padding: 6px 10px; font-size: 0.9rem; }
.choir-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.choir-members li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.choir-members li span { min-width: 0; overflow-wrap: anywhere; }
.choir-lib { margin-top: 16px; }
.choir-lib .group-title { display: flex; align-items: center; gap: 8px; }
.pill-ended { background: var(--danger-soft); color: var(--danger); }
