/* Per-screen styles (§5). Mobile-first; desktop tweaks live in dialog.css. */

/* ====================== Onboarding ======================================== */
.onboarding { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 28px calc(40px + env(safe-area-inset-bottom)); }
.onb-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; max-width: 360px; }
@keyframes onb-breathe { from { opacity: 0.45; } to { opacity: 0.75; } }
.onb-h1 { font-size: 44px; color: #fff; line-height: 1.04; margin-bottom: 16px; }
.onb-sub { color: var(--white-75); font-size: 14px; margin-bottom: 28px; }
.onb-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.onb-skip { background: none; border: none; color: var(--white-60); font-size: 13px; font-weight: 500; cursor: pointer; }

/* ====================== Upload =========================================== */
.upload { background: var(--cream); min-height: 100vh; }
.up-title { font-size: 17px; }
.upload-body { padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 20px; }
.dropzone { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: var(--paper); border: 2px dashed var(--ink-15); border-radius: var(--r-28); padding: 32px 24px; box-shadow: var(--shadow-card); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.dropzone.over { border-color: var(--violet); background: rgba(138,92,246,0.06); }
.dz-iconcluster { position: relative; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.dz-halo { position: absolute; width: 84px; height: 84px; border-radius: 50%; background: var(--grad-aura-ribbon); filter: blur(14px); opacity: 0.6; }
.dz-circle { position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--lemon); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.dz-title { font-size: 28px; font-family: var(--font-display); font-style: italic; }
.dz-sub { color: var(--text-muted); font-size: 13px; }
.dz-browse { margin-top: 8px; }
.import-error { color: var(--coral); font-size: 13px; font-weight: 600; }
.up-or { text-align: center; }
.paste-row { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-16); padding: 16px; cursor: pointer; box-shadow: var(--shadow-card); }
.paste-tile { width: 36px; height: 36px; border-radius: var(--r-10); background: var(--magenta); color: #fff; display: flex; align-items: center; justify-content: center; }
.paste-label { flex: 1; text-align: left; font-weight: 700; font-size: 14px; }
.paste-chev { color: var(--text-muted); }
.up-recent-h { margin-top: 4px; }
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.recent-row { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-14); padding: 12px; cursor: pointer; }
.recent-badge { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-aura-ribbon); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.recent-meta { flex: 1; display: flex; flex-direction: column; text-align: left; }
.recent-name { font-weight: 600; font-size: 14px; }
.recent-date { color: var(--text-muted); font-size: 10px; }
.recent-chev { color: var(--text-muted); }

/* Confirm sheet */
.confirm-meta { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-14); padding: 12px; margin-bottom: 14px; }
.confirm-tile { width: 40px; height: 40px; border-radius: var(--r-10); background: var(--field-bg); display: flex; align-items: center; justify-content: center; }
.confirm-metatext { display: flex; flex-direction: column; }
.confirm-fname { font-weight: 700; font-size: 15px; }
.confirm-fsub { color: var(--text-muted); font-size: 10px; }
.confirm-preview { border-radius: var(--r-14); overflow: hidden; }
.preview-pdf { position: relative; overflow: hidden; width: 100%; height: 380px; border-radius: var(--r-14); background: #fff; }
.preview-pdf iframe { position: absolute; top: 0; left: 0; border: none; }
.preview-pasted { height: 320px; overflow: auto; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-14); padding: 14px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.preview-docx { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 40px 20px; color: var(--text-muted); }
.preview-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 380px; color: var(--text-muted); font-size: 13px; }
/* mammoth-rendered DOCX content — styled to read like a document page. */
.preview-docx-doc { height: 380px; overflow: auto; background: #fff; padding: 22px 24px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.preview-docx-doc > :first-child { margin-top: 0; }
.preview-docx-doc h1 { font-size: 20px; margin: 14px 0 6px; }
.preview-docx-doc h2 { font-size: 15px; margin: 12px 0 4px; }
.preview-docx-doc h3 { font-size: 13.5px; margin: 10px 0 4px; }
.preview-docx-doc p { margin: 0 0 6px; }
.preview-docx-doc ul, .preview-docx-doc ol { margin: 0 0 8px; padding-left: 20px; }
.preview-docx-doc li { margin: 2px 0; }
.preview-docx-doc a { color: var(--violet); }
.preview-docx-doc img { max-width: 100%; height: auto; }
.preview-docx-doc table { width: 100%; border-collapse: collapse; font-size: 12px; }
.preview-docx-doc td, .preview-docx-doc th { border: 1px solid var(--divider); padding: 4px 6px; text-align: left; }
.pd-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.pd-sub { font-size: 12px; }
.confirm-actions .pill { flex: 1; }
.paste-form { display: flex; flex-direction: column; }

/* ====================== Scanning ========================================= */
.scanning { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 28px; }
.scan-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; max-width: 360px; }
.scan-orbcluster { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.scan-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(138,92,246,0.5), transparent 70%); filter: blur(20px); animation: onb-breathe 2.2s ease-in-out infinite alternate; }
.scan-ring { position: absolute; }
.scan-orb { position: relative; animation: orb-float 2.2s ease-in-out infinite alternate; }
.scan-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 48px; color: var(--ink); line-height: 1; letter-spacing: -0.02em; pointer-events: none; font-variant-numeric: tabular-nums; }
.scan-h1 { font-size: 32px; color: #fff; }
.scan-step { color: var(--white-70); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; min-height: 16px; transition: opacity 0.25s; opacity: 1; }
.scan-step:not(.show) { opacity: 0; }
.scan-pips { list-style: none; display: flex; gap: 8px; align-items: center; padding: 0; }
.pip { width: 8px; height: 8px; border-radius: 999px; background: var(--white-15); transition: width 0.4s var(--ease-pop), background 0.3s; }
.pip.active { width: 24px; background: var(--lemon); }
.scan-minimize { margin-top: 8px; }
.minimize-pill { background: transparent; border: 1px solid var(--white-35); color: #fff; padding: 12px 22px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; cursor: pointer; }
.scan-error { gap: 8px; }
.scan-erorb { margin-bottom: 8px; }

/* Notification offer */
.notif-offer { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 12px 8px; }
.notif-hero { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.notif-halo { position: absolute; width: 96px; height: 96px; border-radius: 50%; background: var(--grad-conic); filter: blur(16px); opacity: 0.5; }
.notif-bell { position: relative; width: 76px; height: 76px; border-radius: 50%; background: var(--lemon); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.notif-title { font-size: 28px; }
.notif-sub { color: var(--text-muted); font-size: 14px; max-width: 30ch; }
.notif-actions { flex-direction: column; align-items: stretch; }
.notif-no { background: none; border: none; color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px; }

/* ====================== Score ============================================ */
.score { color: #fff; }
.score-scroll { padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 24px; }
.score-scroll.center-col { gap: 16px; }
/* Left-aligned header: title + resume switcher on the left, action icons pinned
   right (#8). The switcher truncates rather than shoving icons off-screen. */
.score-header .hdr-right { gap: 6px; }
.score-header .resume-switch { margin-top: 2px; }
/* extra breathing room above the title + action icons on the Aura tab */

/* history switcher in the Aura Score header — a native <select> styled to look
   like the old filename sub, with a chevron affordance. */
.resume-switch { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.resume-switch select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: none; cursor: pointer;
  color: var(--white-70); font-family: var(--font-mono); font-size: 11px;
  max-width: 180px; min-width: 0;
  /* Right padding reserves space for the absolutely-positioned chevron
     so it sits OVER the select. Clicks on the chevron (pointer-events:
     none below) fall through to the select underneath and open it. */
  padding: 2px 22px 2px 4px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  border-radius: 6px;
}
.resume-switch select:hover { color: #fff; }
.resume-switch select:focus-visible { outline: 2px solid var(--lemon); outline-offset: 1px; }
.resume-switch svg {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--white-60); pointer-events: none;
}
/* the OS-rendered option list is light, so force readable option text */
.resume-switch select option { color: var(--ink); background: var(--paper); }
.score-hero { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.verdict { text-align: center; }
.verdict-adj { font-size: 36px; }
.verdict-sub { color: var(--white-70); font-size: 14px; margin-top: 6px; max-width: 34ch; }
.breakdown-card { background: var(--white-06); border: 1px solid var(--white-10); border-radius: var(--r-20); padding: 18px; }

/* ---- Aura tab uses the EXACT classes from the public share page --------
   These rules are copied verbatim from `_BASE_CSS` in utils/landing.py so
   the in-app aura tab and /s/{id} render against the same selectors. Font
   variable names differ (--font-display vs --serif, etc.) so only those
   are substituted. */

/* Header chrome on the light backdrop. */
.screen.score .hdr-title { color: var(--ink); }
.screen.score .hdr-sub { color: var(--text-muted); }
.screen.score .resume-switch { background: transparent; }
.screen.score .resume-switch select { color: var(--ink); }
.screen.score .resume-switch svg { color: var(--text-muted); }
/* When the dropdown stands in for the header title (the "aura score" h1
   is gone — the card below is the title), it gets the same .hdr-title
   weight + size + sans-serif treatment so the header reads as a title. */
.screen.score .resume-switch-title select {
  font-family: var(--font-body);
  font-size: 17px; font-weight: 700;
  color: var(--ink);
  padding: 4px 22px 4px 2px;
  background: transparent;
  border: none;
  text-overflow: ellipsis;
  max-width: 100%;
}
.screen.score .resume-switch-title svg { color: var(--ink); }
.screen.score .icon-btn.circle { background: var(--paper); color: var(--ink); border: 1px solid rgba(26,13,46,0.06); box-shadow: 0 2px 8px rgba(26,13,46,0.06); }
.screen.score .icon-btn.circle.lemon { background: var(--lemon); color: var(--ink); }

/* .wrap + .card.share-card — same paper card chrome, max-width, AND padding
   values as landing.py `_BASE_CSS`. The aura tab's `.score-scroll` already
   handles horizontal screen padding + bottom space, so `.wrap` only needs
   centering + max-width (no extra padding). `.card` padding matches the
   share page exactly. */
.screen.score .wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
}
.screen.score .card {
  background: var(--paper);
  border-radius: 28px;
  padding: 36px 28px 32px;
  box-shadow: 0 30px 60px -30px rgba(26, 13, 46, 0.25),
              0 0 0 1px rgba(26, 13, 46, 0.06);
}
.screen.score .share-card {
  text-align: center;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(138, 92, 246, 0.18), transparent 55%),
    var(--paper);
}

/* Orb — verbatim port of `.share-orb-*` from landing.py. */
.screen.score .share-orb-wrap {
  position: relative;
  width: 260px; height: 260px;
  margin: 6px auto 8px;
}
.screen.score .share-orb-halo {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg at 50% 50%,
    var(--magenta) 0deg, var(--violet) 90deg,
    var(--cyan) 180deg, var(--lemon) 270deg, var(--magenta) 360deg);
  filter: blur(16px);
  animation: share-orb-spin 18s linear infinite;
}
.screen.score .share-orb-disc {
  position: absolute; top: 12%; left: 12%; width: 76%; height: 76%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    #ffffff 0%, #F6EDFF 45%, #E8D5FF 100%);
  box-shadow: 0 20px 40px -10px rgba(138, 92, 246, 0.35),
              inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.screen.score .share-orb-score {
  font-family: var(--font-display); font-weight: 400; font-style: normal;
  font-size: 98px; line-height: 1; color: var(--ink);
  letter-spacing: -0.03em;
}
.screen.score .share-orb-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}
.screen.score .share-orb-stars {
  position: absolute; inset: 0;
  animation: share-orb-spin-reverse 18s linear infinite;
  pointer-events: none;
}
.screen.score .share-orb-stars svg {
  position: absolute;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  filter: drop-shadow(0 0 6px rgba(250, 225, 75, 0.45));
}
.screen.score .share-orb-stars svg.sm { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
@keyframes share-orb-spin         { from { transform: rotate(0deg); }  to { transform: rotate(360deg); } }
@keyframes share-orb-spin-reverse { from { transform: rotate(0deg); }  to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .screen.score .share-orb-halo,
  .screen.score .share-orb-stars { animation: none; }
}

/* Adjective + hook — verbatim port. */
.screen.score .share-adjective {
  font-family: var(--font-display); font-weight: 400; font-style: italic;
  font-size: 40px; line-height: 1.05; letter-spacing: -0.02em;
  margin: 14px 0 4px;
  background: linear-gradient(90deg, var(--magenta), var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.screen.score .share-hook {
  font-size: 15px; line-height: 1.55; color: var(--text-muted);
  margin: 0 0 18px;
}

/* The breakdown sub-card keeps its structure but loses its own card chrome
   inside .share-card so it reads as a sub-section of the single paper card,
   separated by a hairline. */
.screen.score .share-card .breakdown-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 22px 0 0;
  text-align: left;
  border-top: 1px solid rgba(26, 13, 46, 0.06);
  margin-top: 22px;
}

/* .share-distribution and friends — verbatim port of the rules in landing.py
   `_BASE_CSS`. Used by the new shareDistributionChart() in charts.js so the
   chart on the score screen IS the chart on /s/{id}. */
.screen.score .share-distribution {
  margin: 14px 0 22px;
  padding: 18px 16px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.9), rgba(254, 249, 240, 0.9));
  border: 1px solid rgba(26, 13, 46, 0.06);
}
.screen.score .share-distribution-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px;
  margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.screen.score .share-dist-chip { display: inline-flex; align-items: center; gap: 6px; }
.screen.score .share-dist-chip .dot {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block;
}
.screen.score .share-dist-chip .dot-coral { background: #ff8a7a; }
.screen.score .share-dist-chip .dot-lemon { background: #fae14b; }
.screen.score .share-dist-chip .dot-cream { background: #ddd6c2; }
.screen.score .share-dist-chip .dot-mint  { background: #5ac77f; }
.screen.score .share-distribution-svg { display: block; width: 100%; height: 140px; }
.screen.score .share-distribution-axis {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
}
.screen.score .share-distribution-axis > span:nth-child(2) {
  font-style: normal; letter-spacing: 0.2em;
}
.screen.score .share-distribution-caption {
  margin-top: 10px;
  font-family: var(--font-display); font-style: italic;
  font-size: 17px; color: var(--ink);
  text-align: center;
}

/* Issues card BELOW the .share-card keeps its own paper-card chrome. */
.screen.score .issues-card {
  background: var(--paper);
  border: 1px solid rgba(26, 13, 46, 0.06);
  box-shadow: 0 20px 50px -28px rgba(26, 13, 46, 0.22);
  color: var(--ink);
  margin-top: 16px;
}
.screen.score .issues-card * { color: var(--ink); }
.screen.score .issues-card .eyebrow { color: var(--text-muted); }

/* Light-theme tweaks for content surfaces inside the card. */
.screen.score .eyebrow,
.screen.score .eyebrow.light { color: var(--text-muted); }
.screen.score .bd-label,
.screen.score .bd-val { color: var(--ink); }
.screen.score .bar { background: rgba(26, 13, 46, 0.08); }
.screen.score .bar::-webkit-progress-bar { background: rgba(26, 13, 46, 0.08); }
.screen.score .dist-bignum .display { color: var(--ink); }
.screen.score .dist-out { color: var(--text-muted); }
.screen.score .dist-legrow { color: var(--ink); }
.screen.score .dist-axis { color: var(--text-muted); }
.screen.score .dist-about { color: var(--text-muted); background: transparent; }
.breakdown { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.bd-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.bd-label { color: var(--white-80); font-size: 13px; }
.bd-val { color: var(--white-80); font-size: 12px; font-weight: 700; }
.bar { grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: none; border-radius: 999px; background: var(--white-08); overflow: hidden; }
.bar::-webkit-progress-bar { background: var(--white-08); border-radius: 999px; }
.bar::-webkit-progress-value { border-radius: 999px; }
.bar-good::-webkit-progress-value { background: var(--bar-good); }
.bar-ok::-webkit-progress-value { background: var(--bar-ok); }
.bar-bad::-webkit-progress-value { background: var(--bar-bad); }
.bar-good::-moz-progress-bar { background: var(--bar-good); }
.bar-ok::-moz-progress-bar { background: var(--bar-ok); }
.bar-bad::-moz-progress-bar { background: var(--bar-bad); }
/* Issues summary card — same surface as the breakdown card. The "fix my
   aura" pill at the bottom of the section is the explicit CTA (previously
   a fixed-position .score-bottom). The card is a <section>, not a button. */
.issues-card { display: block; width: 100%; text-align: left; background: var(--white-06); border: 1px solid var(--white-10); border-radius: var(--r-20); padding: 18px; color: #fff; }
.issues-card-actions { margin: 16px 0 0; padding: 0; list-style: none; }
.issues-card-actions .pill { width: 100%; }
.issues-card-count { font-size: 16px; font-weight: 700; color: #fff; margin: 6px 0 14px; }
.issue-sum-list { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 0; margin: 0; }
.issue-sum-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.issue-sum-label { color: var(--white-80); font-size: 13px; }
.issue-sum-ct { color: var(--white-80); font-size: 12px; font-weight: 700; }

/* ====================== Editor =========================================== */
.editor { background: var(--cream); min-height: 100vh; }
.ed-title { font-size: 17px; }
.ed-toggle { display: flex; gap: 4px; margin: 0 16px 8px; padding: 4px; background: var(--field-bg); border-radius: var(--r-pill); }
.ed-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border: none; background: none; border-radius: var(--r-pill); color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.ed-tab.active { background: var(--ink); color: var(--lemon); }
.tab-badge { background: var(--coral); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; padding: 0 4px; }
.editor-content { padding: 8px 16px 120px; }

.paper-sheet { background: #fff; border-radius: var(--r-14); padding: 24px; box-shadow: var(--shadow-paper); }
.rp-name { font-size: 28px; color: var(--ink); }
.rp-title { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.rp-contact { color: var(--text-muted); font-size: 10px; margin-top: 6px; }
.rp-divider { border: none; border-top: 1px solid var(--divider); margin: 16px 0 10px; }
.rp-section { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
/* Structured preview inside the section-rewrite sheet (reuses .rp-* + paper). */
.secrw-preview { max-height: 30vh; overflow: auto; margin: 4px 0 12px; }
/* Tap any editable resume_data field to rewrite it. */
.rp-editable { cursor: pointer; border-radius: 6px; transition: background 0.12s; }
.rp-editable:hover { background: rgba(138,92,246,0.08); }
.rp-job { margin-top: 10px; }
.rp-role { font-weight: 700; font-size: 13px; }
.rp-company { font-size: 13px; }
.rp-dates { color: var(--text-muted); font-size: 10px; margin-bottom: 4px; }
.rp-bullets { margin: 0 0 0 18px; }
.rp-bullets li { font-size: 13px; line-height: 1.5; margin: 3px 0; }
.rp-para { font-size: 13px; line-height: 1.55; margin-top: 6px; }
.rp-edu { font-size: 13px; margin-top: 6px; }
mark.hl { border-radius: 3px; padding: 0 1px; color: inherit; cursor: pointer; }
/* The callout is now a flex row: the tappable hint + a small dismiss ✕.
   .missing-callout itself stays full-width clickable for "tap to add"; the
   ✕ stops propagation so it dismisses without triggering the generate sheet. */
.missing-callout-row { display: flex; align-items: stretch; gap: 8px; margin-top: 14px; }
.missing-callout { flex: 1 1 auto; padding: 14px; border: 1.5px dashed var(--magenta); border-radius: var(--r-14); background: rgba(255,77,184,0.06); color: var(--magenta); font-weight: 600; font-size: 13px; cursor: pointer; text-align: left; }
.missing-callout-dismiss { flex: 0 0 auto; width: 38px; align-self: center; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,77,184,0.10); border: 1px solid rgba(255,77,184,0.30); color: var(--magenta); cursor: pointer; padding: 0; }
.missing-callout-dismiss:hover { background: rgba(255,77,184,0.18); }
.missing-callout-dismiss:active { transform: scale(0.95); }
.sel-toolbar { position: absolute; transform: translateX(-50%); display: flex; gap: 4px; background: var(--ink); border-radius: var(--r-10); padding: 4px; box-shadow: var(--shadow-toast); z-index: 50; }
/* `display: flex` above would otherwise override the `hidden` attribute's
   UA `display: none`, leaving the Fix/Rewrite bar floating on screen with no
   selection. Keep it hidden until a selection positions and reveals it. */
.sel-toolbar[hidden] { display: none; }
.sel-toolbar button { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: var(--r-8); cursor: pointer; }
.sel-toolbar button:active { background: var(--white-15); }

.issues-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.issue-row { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-14); padding: 12px; cursor: pointer; text-align: left; }
.issue-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.issue-meta { color: var(--text-muted); font-size: 10px; text-transform: uppercase; }
.issue-text { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-chev { color: var(--text-muted); }
.issues-empty { gap: 10px; }
.ed-caption { color: var(--text-muted); font-size: 12px; margin-top: -6px; }

.freeform-card { position: relative; background: #fff; border-radius: var(--r-14); padding: 16px; box-shadow: var(--shadow-paper); }
.md-badge { position: absolute; top: 12px; right: 12px; background: var(--magenta); color: #fff; font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; }
.ff-toolbar { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--divider); }
.ff-toolbar button { background: var(--field-bg); border: none; min-width: 36px; height: 32px; border-radius: var(--r-8); font-size: 13px; cursor: pointer; flex: 0 0 auto; }
.ff-div { width: 1px; height: 20px; background: var(--divider); flex: 0 0 auto; }
.ff-textarea { border: none; background: transparent; padding: 0; font-size: 14px; min-height: 400px; resize: none; }

.editor-bottom { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; z-index: 800; }
.bottom-read, .bottom-edit { pointer-events: auto; width: min(520px, 100%); display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: linear-gradient(to top, var(--cream) 60%, transparent); }
.bottom-read .pill { flex: 1; }
.bottom-read.clear .pill { flex: 1; }
.icon-btn.circle.compact { background: var(--paper); border: 1px solid var(--ink-10); }
.chat-fab { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--lemon); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 16px rgba(26,13,46,0.25); flex: 0 0 auto; }
.bottom-edit .pill { flex: 1; }
.editor-empty { gap: 14px; }

/* Editor sheets */
.fix-head { align-items: center; }
.fix-headtext { flex: 1; }
.fix-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.fix-body { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fix-before { width: 100%; background: rgba(255,138,122,0.06); border-radius: var(--r-12); padding: 14px; }
.before-eyebrow { color: var(--coral); }
.fix-orig { text-decoration: line-through; color: var(--text-muted); margin-top: 4px; font-size: 15px; }
.fix-arrow { color: var(--violet); }
.fix-after { width: 100%; background: var(--grad-mint-cyan); border: 1px solid var(--mint-dark); border-radius: var(--r-12); padding: 14px; }
.fix-after-head { display: flex; align-items: center; justify-content: space-between; }
.after-eyebrow { color: var(--mint-dark); }
.rewrite-sugg-head { display: flex; align-items: center; justify-content: space-between; }
.rewrite-progress { font-size: 11px; color: var(--text-muted); margin-left: 6px; }
.refresh-btn { background: none; border: none; color: var(--mint-dark); cursor: pointer; padding: 4px; line-height: 0; }
/* The refresh icon is swapped for this while a new rewrite loads — a solid
   mint ring the same 16px as the icon, so the spin is clearly visible. */
.refresh-spin { display: inline-block; vertical-align: middle; }
.fix-rewrite { font-size: 14px; font-weight: 600; margin-top: 4px; transition: opacity 0.15s; }
.fix-rewrite.loading { opacity: 0.35; }
.fixall-progress { text-align: center; color: var(--text-muted); font-size: 11px; margin-top: 10px; }

.rewrite-orig { padding: 16px; margin: 6px 0 8px; max-height: 28vh; overflow: auto; }
.rewrite-issues { font-size: 11px; color: var(--text-muted); margin: 0 0 14px; }
.rewrite-loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); padding: 12px 0; }
.rewrite-opt { display: block; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--ink-10); border-radius: var(--r-12); padding: 12px; margin-bottom: 8px; font-size: 14px; cursor: pointer; }
.rewrite-opt.selected { background: rgba(250,225,75,0.4); border-color: var(--ink); }
.rewrite-custom { min-height: 80px; margin: 6px 0 0; }
.rewrite-none { color: var(--text-muted); font-size: 13px; }

.chat-card { background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-14); padding: 14px; margin-bottom: 12px; }
.chat-input { min-height: 120px; border: none; background: transparent; padding: 6px 0 0; }
.missing-card { background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-14); padding: 16px; font-size: 14px; line-height: 1.5; }
/* Subtle text link below the missing-section sheet's action row — a
   permanent dismiss path that reads as a tertiary action, not competing
   visually with "not now" / "yes, generate". */
.missing-delete-link { display: block; margin: 14px auto 0; background: none; border: none; color: var(--magenta); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; text-decoration: underline; text-underline-offset: 3px; }
.missing-delete-link:hover { opacity: 0.78; }
.missing-delete-link:active { transform: scale(0.98); }
.rescan-body { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rescan-chip { display: inline-block; background: var(--field-bg); padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.rescan-note { color: var(--text-muted); font-size: 12px; }
.rename-form { display: flex; flex-direction: column; gap: 6px; }

/* ====================== History ========================================== */
.history { background: var(--cream); min-height: 100vh; }
.history-body { padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.trend-card { background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-20); padding: 18px; box-shadow: var(--shadow-card); }
.trend-top { display: flex; align-items: center; justify-content: space-between; }
.trend-num { display: flex; align-items: baseline; gap: 8px; }
.trend-num .display { font-size: 42px; }
.delta-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.delta-chip.up { color: var(--mint-dark); background: rgba(90,199,127,0.15); }
.delta-chip.down { color: var(--coral); background: rgba(255,138,122,0.15); }
.history-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.history-row-wrap { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-16); padding: 10px 12px; }
.history-row { flex: 1; display: flex; align-items: center; gap: 12px; background: none; border: none; cursor: pointer; text-align: left; min-width: 0; }
.row-badge { width: 52px; height: 52px; border-radius: 50%; background: var(--grad-aura-ribbon); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex: 0 0 auto; }
.row-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.current-pill { background: var(--lemon); color: var(--ink); font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.row-date { color: var(--text-muted); font-size: 10px; }
.row-export-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--lemon); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.row-more-btn { width: 36px; height: 36px; border-radius: 50%; background: none; border: none; color: var(--text-muted); cursor: pointer; flex: 0 0 auto; }

/* ====================== Profile ========================================== */
.profile { background: var(--cream); min-height: 100vh; }
.profile-body { padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.stats-card { display: flex; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-20); padding: 20px; box-shadow: var(--shadow-card); }
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat + .stat { border-left: 1px solid var(--divider); }
.stat-num { font-size: 30px; }
.empty-stats { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-20); padding: 28px; }
.empty-stats h2 { font-size: 22px; }
.empty-stats p { color: var(--text-muted); font-size: 14px; }
.invite-card { background: var(--paper); border: 1px solid rgba(138,92,246,0.25); border-radius: var(--r-22); padding: 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-card); }
.invite-eyebrow { display: inline-flex; align-items: center; gap: 4px; color: var(--violet); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.invite-title { font-size: 28px; }
.invite-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }

/* Membership / payment-status card on the Me tab. Lemon accent when locked,
   mint accent when paid; structurally mirrors .invite-card. */
.member-card { background: var(--paper); border: 1px solid rgba(244,196,48,0.30); border-radius: var(--r-22); padding: 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-card); }
.member-card.paid { border-color: rgba(80,200,140,0.40); }
.member-eyebrow { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.member-title { font-size: 28px; }
.member-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.member-sub strong { color: var(--ink); font-size: 16px; }
.member-acct { display: flex; align-items: center; gap: 8px; min-width: 0; }
.member-email { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-restore { align-self: flex-start; padding-left: 0; }
.link-card { background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-16); padding: 4px 16px; box-shadow: var(--shadow-card); }
.link-card-h { padding: 12px 0 4px; }
.link-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--divider); color: var(--ink); cursor: pointer; }
.link-card-h + .link-row, .link-card .link-row:first-of-type { border-top: none; }
.lr-chip { width: 28px; height: 28px; border-radius: var(--r-8); background: var(--field-bg); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.lr-label { flex: 1; font-size: 14px; font-weight: 500; }
.lr-ext { color: var(--text-muted); }
.lr-chev { color: var(--text-muted); }
.settings-list { background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-16); box-shadow: var(--shadow-card); }
/* This row is a <button>, so reset ALL borders — leaving the UA border-bottom
   in place rendered a stray dark line under the settings card. */
.settings-list .link-row { padding: 16px; width: 100%; background: none; border: none; }

/* ====================== Settings ========================================= */
.set-card { background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-16); padding: 4px 16px 12px; margin-bottom: 14px; box-shadow: var(--shadow-card); }
.set-card-h { padding: 12px 0 6px; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border-top: 1px solid var(--divider); background: none; border-left: none; border-right: none; border-bottom: none; text-align: left; }
.set-card-h + .set-row { border-top: none; }
.set-row.tappable { cursor: pointer; }
.set-rowtext { flex: 1; display: flex; flex-direction: column; }
.set-rowtext strong { font-size: 14px; font-weight: 700; }
.set-rowtext span { color: var(--text-muted); font-size: 12px; }
.toggle-row { cursor: pointer; }
.danger-card .danger { color: var(--coral); }
.danger-chip { background: rgba(255,138,122,0.15); color: var(--coral); }
.set-row.danger .set-rowtext strong { color: var(--coral); }
.set-version { text-align: center; color: var(--text-muted); font-size: 10px; margin-top: 8px; }
.username-form { display: flex; flex-direction: column; gap: 10px; }

/* ====================== Paywall / login sheet ============================ */
.paywall-form { display: flex; flex-direction: column; gap: 10px; }
.paywall-lead { color: var(--text-muted); font-size: 14px; line-height: 1.4; margin: 2px 0 14px; }
.paywall-perks { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 0 0 16px; padding: 0; }
.paywall-perks li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.35; color: var(--ink); }
.paywall-perks li svg { color: var(--mint, var(--violet)); flex-shrink: 0; margin-top: 1px; }
.paywall-perks strong { font-weight: 700; }
.paywall-sub { color: var(--text-muted); font-size: 13px; text-align: center; margin: 2px 0 0; }
.paywall-code { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 8px; }
.paywall-alt { align-self: center; background: none; border: none; color: var(--violet); font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px 8px; }
.paywall-alt:disabled { opacity: 0.5; cursor: default; }
.member-badge { color: var(--mint, var(--violet)); font-weight: 700; font-size: 12px; }
.shared-list { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; }
.shared-row { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--border-soft); border-radius: var(--r-12); padding: 12px; transition: background 0.15s ease, border-color 0.15s ease; }
.shared-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.shared-id { font-size: 14px; font-weight: 700; }
.shared-url { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shared-date { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.shared-empty { color: var(--text-muted); text-align: center; padding: 24px; }

/* Header right-side action cluster (3-dot + close, etc.) */
.sheet-head-actions { display: flex; align-items: center; gap: 8px; }

/* iOS-style select mode for the shared results sheet — the entire row is
   one button so a tap anywhere toggles selection (not just the circle). */
.shared-row.selectable { padding: 0; overflow: hidden; cursor: pointer; }
.shared-row.selected { background: rgba(138, 92, 246, 0.08); border-color: var(--violet); }
.shared-row-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 12px;
  background: none; border: none;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
}
.shared-row-toggle:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.shared-row-toggle:active { background: rgba(138, 92, 246, 0.04); }
.shared-row-toggle .shared-meta {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
}
.shared-row .select-circle {
  flex: 0 0 24px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--ink-15);
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.shared-row .select-circle.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.shared-row .select-circle svg { display: block; }

/* Sticky bottom action bar in select mode */
.shared-selectbar {
  position: sticky; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding: 12px 4px;
  background: linear-gradient(180deg, transparent, var(--paper) 30%);
}
.shared-selectbar .select-count {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.shared-selectbar .select-delete { padding: 10px 16px; }
.shared-selectbar .select-delete[disabled] { opacity: 0.5; cursor: not-allowed; }
.shared-selectbar .select-delete svg { margin-right: 4px; }

/* Cancel link in the select-mode header */
.shared-list.select-mode + * { }
.select-cancel {
  background: none; border: none; cursor: pointer;
  color: var(--violet); font-family: var(--font-sans); font-weight: 700; font-size: 14px;
  padding: 6px 10px;
}
.select-cancel:hover { color: var(--magenta); }

/* ====================== Export =========================================== */
.export-head { align-items: center; margin-bottom: 12px; }
.export-title { font-size: 17px; font-weight: 700; }
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: none; margin: 14px 0 0; padding: 0; }
.tpl-card { display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--ink-08); border-radius: var(--r-16); padding: 10px; cursor: pointer; }
.tpl-card.selected { background: rgba(250,225,75,0.25); border: 2px solid var(--ink); }
.tpl-preview { display: flex; align-items: center; justify-content: center; height: 140px; background: #fff; border: 1px solid var(--ink-08); border-radius: var(--r-10); overflow: hidden; }
/* Real document render sits centered in the white frame, like a page on a desk. */
.tpl-thumb-img { max-width: 86%; max-height: 92%; object-fit: contain; border: 1px solid rgba(26,13,46,0.06); box-shadow: 0 1px 5px rgba(26,13,46,0.16); background: #fff; }
.tpl-name { font-size: 14px; font-weight: 700; }
.tpl-sub { font-size: 11px; color: var(--text-muted); }
.export-bar { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; margin-top: 14px; background: linear-gradient(to top, var(--cream) 70%, transparent); }
.export-bar-actions { display: flex; gap: 10px; }
.export-bar-actions .pill { flex: 1; }
.status-capsule { display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-capsule[hidden] { display: none; }
.cap-violet { background: rgba(138,92,246,0.15); color: var(--violet); }
.cap-cyan { background: rgba(77,214,255,0.18); color: #2293b8; }
.cap-mint { background: rgba(90,199,127,0.18); color: var(--mint-dark); }
.cap-coral { background: rgba(255,138,122,0.18); color: var(--coral); }
.cap-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.cap-retry { background: none; border: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.export-preview { position: relative; overflow: hidden; width: 100%; height: 60vh; border-radius: var(--r-12); background: #fff; }
.export-preview iframe { position: absolute; top: 0; left: 0; border: none; }

/* ---- Download fullscreen overlay (mobile) -------------------------------
   `openExportFullscreen()` in screens/export.js renders the download flow
   into this overlay on phones instead of a `<dialog>`. The container is a
   flex column where the header + bar are fixed-height children and the
   middle `.export-body` is the only scroller. iOS-safe scroll lock for the
   page underneath is `body.fs-locked { position: fixed }` (overflow:hidden
   alone leaks touch scrolls through on Safari). */
.export-fs { position: fixed; inset: 0; z-index: 9000; background: var(--cream); display: flex; flex-direction: column; overscroll-behavior: contain; }
.export-fs-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.export-fs .sheet-head,
.export-fs .export-head { flex: 0 0 auto; position: static; margin: 0; padding: calc(8px + env(safe-area-inset-top)) 20px 8px; background: var(--cream); }
.export-fs .export-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 20px; display: flex; flex-direction: column; gap: 14px; }
.export-fs .export-body-preview { overflow: hidden; padding: 8px 12px; gap: 0; }
.export-fs .export-body-preview .export-preview { flex: 1; min-height: 0; height: auto; }
.export-fs .export-bar { position: static; margin: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--cream); border-top: 1px solid var(--ink-08); }

/* iOS-safe page scroll lock for the export overlay. `position: fixed` on
   body (with the saved `top: -scrollY` set inline) is the only reliable
   way to stop iOS Safari from scrolling the underlying page on touch. */
body.fs-locked { position: fixed; width: 100%; overflow: hidden; }
.export-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 24px; }
.export-empty h2 { font-size: 24px; }
.export-empty p { color: var(--text-muted); }

/* ====================== Share / About ==================================== */
.sharelink-loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); padding: 16px 0; }
/* Aura-card thumbnail above the share URL. Same 1200×630 PNG that's also the
   og:image, so this preview is byte-identical to what unfurls on socials.
   `aspect-ratio` reserves space so the layout doesn't jump while the lazy
   image streams; `onerror=remove` in share.js hides it on any failure. */
/* Wrap shrinks to the image's actual rendered width (NOT 100% of the column)
   so the absolutely-positioned download button anchors to the image's right
   edge no matter how the height cap shrinks it. Auto margin keeps it centered. */
.share-thumb-wrap { position: relative; display: block; width: fit-content; max-width: 100%; margin: 4px auto 12px; }
.share-thumb-wrap .share-thumb { margin: 0; }
/* Cap the thumb by HEIGHT not width so it never eats the whole short-phone
   viewport — the 1.9:1 OG ratio at width:100% was 200+px tall on most phones
   and forced the sheet to scroll. The img's intrinsic 1200×630 aspect handles
   width-from-height automatically, so we just bound the height with a vh value
   plus a hard pixel ceiling for very tall screens. */
.share-thumb { display: block; max-width: 100%; max-height: min(34vh, 240px); object-fit: cover; border-radius: var(--r-12); background: var(--ink); border: 1px solid var(--ink-10); margin: 4px 0 12px; }
/* Floating download button overlaid on the thumbnail's bottom-right corner.
   Saves the same /s/{id}/og.png bytes — `<a download>` works everywhere
   except iOS Safari, which falls back to navigator.share({files}) — see
   the wireShareLink handler. */
.share-thumb-download { position: absolute; bottom: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(26, 13, 46, 0.78); border: 1px solid rgba(255, 255, 255, 0.18); color: var(--cream); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background 0.15s ease, transform 0.1s ease; }
.share-thumb-download:hover { background: rgba(26, 13, 46, 0.92); }
.share-thumb-download:active,
.share-thumb-download.busy { transform: scale(0.94); }
.share-thumb-download .btn-spinner { width: 16px; height: 16px; }
.url-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
/* Row of brand-tinted share buttons. Each button is a circular tap target;
   the SVG inherits `color`, so per-platform `--brand` colors the glyph and
   tints the hover background. */
.share-socials { display: flex; justify-content: space-between; gap: 10px; padding: 14px 4px 6px; }
.social-btn { flex: 1 1 0; aspect-ratio: 1; max-width: 60px; display: flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: 50%; background: var(--field-bg); cursor: pointer; transition: background 0.15s ease, transform 0.1s ease; color: var(--brand, var(--text-muted)); }
.social-btn:hover { background: color-mix(in srgb, var(--brand, var(--text-muted)) 14%, var(--field-bg)); }
.social-btn:active,
.social-btn.shared { transform: scale(0.94); }
.social-facebook  { --brand: #1877F2; }
.social-whatsapp  { --brand: #25D366; }
.social-instagram { --brand: #E1306C; }
.social-linkedin  { --brand: #0A66C2; }
.social-tiktok    { --brand: #111111; }
@media (prefers-color-scheme: dark) {
  .social-tiktok { --brand: #ECECEC; }
}
.url-field { flex: 1; background: var(--paper); border: 1px solid rgba(138,92,246,0.2); border-radius: var(--r-12); padding: 12px 14px; color: var(--violet); font-size: 13px; word-break: break-all; }
.copy-btn { width: 44px; height: 44px; border-radius: var(--r-12); background: var(--field-bg); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.copy-btn.copied { color: var(--mint-dark); }
.about-body { display: flex; flex-direction: column; gap: 22px; }
.about-sec p { font-size: 14px; line-height: 1.55; margin-bottom: 8px; }
.about-label { color: var(--violet); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; font-family: var(--font-mono); }
.about-dl dt { font-weight: 700; font-size: 14px; margin-top: 10px; }
.about-dl dd { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }
.about-bands { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.about-bandrow { display: flex; align-items: flex-start; gap: 10px; }
.about-bandrow > div { display: flex; flex-direction: column; }
.about-bandrow strong { font-size: 14px; }
.about-bandrow span { color: var(--text-muted); font-size: 13px; }
