/* Design tokens from the approved design (HANDOFF.md section 8). */
:root {
  --accent: #E9A15A;      /* amber: buttons, highlights */
  --ground: #15110E;      /* page background */
  --surface: #1D1814;     /* raised cards / upload band */
  --text: #F2E8D8;        /* primary text */
  --text-2: #C9BBA6;      /* secondary text */
  --text-3: #A8998A;      /* labels, captions */
  --line: #3A3029;        /* card borders */
  --line-soft: #2B231E;   /* section dividers */
  --line-strong: #5A4B3F; /* drop zone and input borders */

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: Inter, system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-typewriter: 'Courier Prime', 'Courier New', monospace; /* memories */
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  /* Hidden until copy.json text is filled in, so there's no flash of empty boxes. */
  opacity: 0;
}
body.ready { opacity: 1; }
a { color: var(--text); }
a:hover { color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
em { font-style: italic; }
.mono-inline { font-family: var(--font-mono); font-size: 15px; color: var(--text); }
.underline { text-decoration: underline; text-underline-offset: 4px; }
strong { font-weight: 600; }

/* Anything marked hidden stays hidden, whatever layout style it has. */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--ground);
  padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 16px; }

.container { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.band { border-top: 1px solid var(--line-soft); }
.section-inner { padding-top: 112px; padding-bottom: 112px; }
.secondary { margin: 0; color: var(--text-2); }

/* ---------- Shared type ---------- */
.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.section-title {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 1.08;
}
.label-mono {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-3);
}

/* ---------- Buttons ---------- */
.button-pill {
  text-decoration: none;
  color: var(--ground);
  background: var(--accent);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.button-primary {
  text-decoration: none;
  background: var(--accent);
  color: var(--ground);
  font-weight: 600;
  font-size: 17px;
  padding: 18px 30px;
  border-radius: 999px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.button-pill:hover, .button-primary:hover { color: var(--ground); filter: brightness(1.06); }
.button-outline {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button-outline:disabled { cursor: not-allowed; opacity: 0.55; }
.text-link {
  font-size: 16px;
  color: var(--text-2);
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---------- Header ---------- */
.site-header {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { text-decoration: none; display: flex; align-items: center; gap: 12px; color: var(--accent); }
.logo-text { font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.22em; color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; }
.nav-text { text-decoration: none; color: var(--text-2); }

/* Phones: logo and button on one row; the two text links are dropped
   (both sections are reachable by scrolling and from the footer). */
@media (max-width: 640px) {
  .site-header { flex-wrap: nowrap; gap: 12px; }
  .nav-text { display: none; }
  .logo { gap: 10px; }
  .logo-text { font-size: 14px; letter-spacing: 0.16em; }
  .button-pill { padding: 10px 16px; font-size: 14px; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 72px;
  padding-bottom: 112px;
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: center;
}
.hero-text { flex: 1 1 520px; min-width: 0; }
.hero-eyebrow { margin-bottom: 28px; text-transform: uppercase; }
.display {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(48px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
.display em, .closing-title em { color: var(--accent); }
.lede { margin: 32px 0 0; max-width: 34rem; font-size: 19px; color: var(--text-2); }
.lede-2 { margin-top: 16px; }
.hero-actions { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.hero-visual { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.eras-card { padding: 28px; }
.eras { list-style: none; margin: 16px 0 0; padding: 0; }
.eras li {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.eras li:last-child { border-bottom: 1px solid var(--line); }
.era-years { flex: 0 0 104px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.era-track { min-width: 0; }
.era-song { display: block; font-family: var(--font-serif); font-size: 26px; line-height: 1.15; }
.era-artist { display: block; font-size: 15px; color: var(--text-2); }
.eras .is-highlight .era-years,
.eras .is-highlight .era-song { color: var(--accent); }
.card-footnote { margin: 14px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

.samples-label { margin: 12px 4px 0; }
.memory { margin: 0; border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.memory-offset { margin-left: 32px; }
.memory blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
}
.memory figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

/* ---------- How it works ---------- */
.how-title { margin-bottom: 64px; max-width: 18ch; }
.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
}
.step-number { margin: 0; font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.step-title {
  margin: 16px 0 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
}
.how-footnote {
  margin: 72px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 16px;
  max-width: 46rem;
}

/* ---------- Upload ---------- */
.upload-band { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.upload-layout { display: flex; flex-wrap: wrap; gap: 64px; }
.upload-column { flex: 1 1 420px; min-width: 0; }
.upload-title { margin-bottom: 24px; }
.upload-intro { max-width: 32rem; }
.upload-form { margin-top: 40px; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  min-height: 240px;
  padding: 32px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--ground);
  cursor: pointer;
  color: var(--accent);
}
/* The real file input is visually hidden; show its keyboard focus on the drop zone. */
.file-input:focus-visible + .dropzone { outline: 2px solid var(--accent); outline-offset: 3px; }
.dropzone.is-dragover { border-color: var(--accent); border-style: solid; }
.dropzone-title { font-size: 19px; font-weight: 500; color: var(--text); }
.dropzone-hint { font-size: 14px; color: var(--text-3); }
.consent { margin: 20px 0 0; font-size: 15px; color: var(--text-3); }
.consent a { color: var(--text-2); }

.status-message {
  margin: 16px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ground);
  color: var(--text);
  font-size: 16px;
}
.status-message.is-error { border-color: var(--accent); }
.dropzone.is-busy { cursor: progress; opacity: 0.7; }

/* Results (top 10), styled like the eras list above */
.results-card { margin-top: 32px; padding: 28px; }
.results-card .card-title:focus { outline: none; }
.results-summary { margin-top: 10px; font-size: 15px; }
/* Timeline: month | dot on a vertical line | song, grouped by year */
.timeline {
  --date-w: 92px;
  --gap: 16px;
  --dot: 11px;
  --line-x: calc(var(--date-w) + var(--gap) + var(--dot) / 2);
  position: relative;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  bottom: 12px;
  left: var(--line-x);
  width: 1px;
  background: var(--line-strong);
}
.timeline-year-group + .timeline-year-group { margin-top: 20px; }
.timeline-year {
  position: relative;
  margin: 0;
  padding: 2px 0 6px calc(var(--date-w) + var(--gap) * 2 + var(--dot));
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  color: var(--text);
}
.timeline-year-marker {
  position: absolute;
  left: calc(var(--line-x) - 8px);
  top: 12px;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  background: var(--surface);
  box-sizing: border-box;
}
.timeline-months { list-style: none; margin: 0; padding: 0; }
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--date-w) var(--dot) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: start;
}
.timeline-date {
  padding-top: 13px;
  text-align: right;
  font-family: var(--font-sans); /* readable dates (owner's request, 6 Nov 2026) */
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.timeline-marker {
  position: relative;
  z-index: 1;
  width: var(--dot);
  height: var(--dot);
  margin-top: 14px;
  border: 1.5px solid var(--text-3);
  border-radius: 50%;
  background: var(--surface);
  box-sizing: border-box;
}
.timeline-body { min-width: 0; padding: 4px 0; }
.timeline-rank { display: block; padding-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.timeline-song {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.timeline-rank + .timeline-song { padding-top: 0; }
.timeline-song:hover .timeline-name { text-decoration-color: var(--accent); }
.timeline-song:hover .timeline-action { color: var(--accent); }
.timeline-name {
  display: block;
  font-family: var(--font-sans); /* readable song titles (owner's request, 6 Nov 2026) */
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.timeline-meta { display: block; margin-top: 2px; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.timeline-action { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.timeline-memory {
  margin: 4px 0 8px;
  padding: 12px 16px;
  border-left: 0;
  border-radius: 12px;
  background: var(--ground);
  border: 1px solid var(--line);
}
.timeline-memory p {
  margin: 0;
  font-family: var(--font-typewriter);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.timeline-private { display: inline-block; margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.timeline-item.has-memory .timeline-marker { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-strong); }
.timeline-item.is-favourite .timeline-marker { border-color: var(--accent); }
.timeline-item.is-favourite .timeline-date { color: var(--accent); }
.timeline-item.is-top .timeline-marker { background: var(--accent); }
.timeline-item.is-top .timeline-name { color: var(--accent); }
@media (max-width: 640px) {
  .results-card { padding: 20px; }
  .timeline { --date-w: 64px; --gap: 12px; }
  .timeline-date { font-size: 11px; }
  .timeline-year { font-size: 26px; }
  .timeline-name { font-size: 18px; }
}

.get-file { flex: 1 1 420px; min-width: 0; padding: 36px; background: transparent; }
.card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
}
.get-file-intro { margin: 12px 0 28px; }
.get-file-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.get-file-steps li { display: flex; gap: 16px; }
.get-file-steps a { text-underline-offset: 3px; }
.step-mark { flex: 0 0 auto; font-family: var(--font-mono); font-size: 14px; color: var(--accent); padding-top: 3px; }

.panel-form { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.panel-label { display: block; font-size: 15px; color: var(--text-2); }
.panel-help { margin: 8px 0 0; font-size: 14px; color: var(--text-3); }
.panel-help a { color: var(--text-2); }
.field-row { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.text-input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--ground);
  color: var(--text);
  font: inherit;
}
.text-input::placeholder { color: var(--text-3); }
.text-input:disabled { cursor: not-allowed; }

/* ---------- Privacy ---------- */
.privacy-title { margin-bottom: 20px; max-width: 20ch; }
.privacy-intro { margin-bottom: 56px; max-width: 44rem; }
.privacy-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.privacy-card { border: 1px solid var(--line); border-radius: 16px; padding: 28px; color: var(--accent); }
.privacy-card h3 { margin: 16px 0 8px; font-size: 18px; font-weight: 600; color: var(--text); }
.privacy-card p { margin: 0; color: var(--text-2); font-size: 16px; }

/* ---------- Closing ---------- */
.closing-inner { padding-top: 128px; padding-bottom: 128px; text-align: center; }
.closing-title {
  margin: 0 auto;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 1.05;
  max-width: 16ch;
}
.closing-body { margin: 24px auto 44px; max-width: 32rem; }

/* ---------- Footer ---------- */
.footer-inner {
  padding-top: 36px;
  padding-bottom: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--text-3);
}
.footer-brand { font-family: var(--font-mono); letter-spacing: 0.18em; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-2); }

.noscript { padding-top: 24px; padding-bottom: 24px; }

/* ---------- Minimal landing page ---------- */
.landing { max-width: 760px; padding-top: 48px; padding-bottom: 96px; text-align: center; }
.landing-title { font-size: clamp(44px, 6vw, 80px); }
.landing-lede { margin: 24px auto 0; }
.landing-upload { margin-top: 48px; text-align: left; }
.landing-upload .upload-form { margin-top: 0; }
.landing-upload .dropzone { min-height: 280px; }
.landing-privacy { margin: 16px 0 0; text-align: center; font-size: 15px; color: var(--text-3); }
.get-file-details { margin-top: 32px; border-top: 1px solid var(--line-soft); padding-top: 20px; }
.get-file-details summary {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.get-file-details[open] summary { margin-bottom: 20px; }
.get-file-details .get-file-steps { max-width: 34rem; margin: 0 auto; }
.site-footer { border-top: 1px solid var(--line-soft); }

/* ---------- Timeline page ---------- */
.timeline-page { max-width: 760px; padding-top: 24px; padding-bottom: 96px; }
.timeline-title {
  margin: 12px 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.05;
}
.timeline-title:focus { outline: none; }
.timeline-summary { margin-top: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }
.timeline-hint { margin: 28px 0 0; color: var(--text-2); }
.timeline-page .timeline { margin-top: 40px; }
.playlist-box { margin-top: 20px; }
.how-chosen { margin-top: 12px; }
.how-chosen summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.how-chosen-list {
  margin: 8px 0 0;
  padding: 20px 24px 20px 40px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}
.how-chosen-list strong { color: var(--text); }
.timeline-empty { padding: 64px 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.timeline-footnote { margin-top: 32px; }
.text-button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
button.button-pill, button.button-primary { border: 0; font-family: inherit; cursor: pointer; }

.invite-card {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.invite-text { flex: 1 1 280px; min-width: 0; }
.invite-title { margin: 0 0 4px; font-family: var(--font-serif); font-weight: 400; font-size: 24px; line-height: 1.15; }
.invite-card .secondary { font-size: 15px; }
.invite-card .button-primary { flex: 0 0 auto; font-size: 16px; padding: 14px 24px; min-height: 48px; }

/* Memory window */
.memory-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
}
.memory-dialog::backdrop { background: rgba(10, 8, 6, 0.72); }
.memory-form { padding: 32px; }
.memory-when { margin: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--accent); }
.memory-song { margin: 8px 0 0; font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1.1; overflow-wrap: anywhere; }
.memory-artist { margin: 4px 0 0; color: var(--text-2); }
.memory-label { display: block; margin-top: 24px; font-size: 15px; color: var(--text-2); }
.memory-text {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-typewriter);
  font-size: 17px;
  line-height: 1.55;
  resize: vertical;
}
.memory-text::placeholder { color: var(--text-3); }
.memory-text[aria-invalid="true"] { border-color: var(--accent); }
.memory-count { margin: 6px 0 0; text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.memory-share { display: flex; gap: 10px; align-items: center; min-height: 44px; margin-top: 8px; cursor: pointer; }
.memory-share input { width: 20px; height: 20px; accent-color: var(--accent); }
.memory-help { margin: 0; font-size: 14px; color: var(--text-3); }
.memory-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.memory-actions .button-primary { font-size: 16px; padding: 14px 24px; min-height: 48px; }
.memory-footer {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--text-3);
}
.memory-footer a { color: var(--text-2); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  margin: 0;
  padding: 14px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--ground);
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .landing { padding-top: 24px; }
  .landing-upload .dropzone { min-height: 220px; }
  .timeline-page { padding-top: 8px; }
  .invite-card { padding: 20px; }
  .invite-card .button-primary { flex: 1 1 100%; justify-content: center; }
  .memory-form { padding: 24px 20px; }
  .memory-song { font-size: 28px; }
  .site-header .button-pill { padding: 10px 16px; font-size: 14px; }
}

/* Timeline page: the header (logo + Invite friends) stays at the top while scrolling. */
body[data-page="timeline"] .site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  padding-top: 14px;
  padding-bottom: 14px;
  background: var(--ground);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- Accounts ---------- */
.header-link { font-size: 15px; }
.account-bar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 15px;
  color: var(--text-2);
}
.account-name { margin: 0; }
.account-name strong { color: var(--text); }
.name-form { flex: 1 1 100%; margin-top: 8px; }
.name-form .memory-label { margin-top: 0; }
.signin-card {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
}
.signin-card .field-row { margin-top: 16px; }
.signin-card .button-primary, .signin-page .button-primary { font-size: 16px; padding: 14px 24px; min-height: 48px; }
.signin-page { max-width: 560px; padding-top: 48px; padding-bottom: 96px; }
.signin-body { margin: 16px 0 28px; }
.signin-page .memory-label { margin-top: 0; }
.dev-link { color: var(--accent); }

/* ---------- Playing songs: ▶ on each song, player docked at the bottom ---------- */
.timeline-row { display: flex; align-items: flex-start; gap: 12px; }
.timeline-row .timeline-song { flex: 1 1 auto; min-width: 0; }
.timeline-play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  padding: 0 0 0 2px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.timeline-play:hover { border-color: var(--accent); }
.timeline-play[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ground); }

.player-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 16;
  border-top: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}
.player-dock-inner { max-width: 760px; padding-top: 10px; padding-bottom: 12px; }
.player-dock-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.player-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 15px; font-weight: 400; color: var(--text-2); overflow-wrap: anywhere; }
.player-title strong { color: var(--text); }
.player-note { order: 3; flex: 1 1 100%; margin: 0; font-size: 12px; color: var(--text-3); }
.player-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.player-close:hover { color: var(--text); }
.player-frame { margin-top: 8px; }
.player-iframe { display: block; width: 100%; height: 80px; border: 0; border-radius: 12px; background: var(--ground); }
/* Keep the end of the page and pop-up messages clear of the player. */
body.has-player { padding-bottom: 170px; }
body.has-player .toast { bottom: 184px; }

/* ---------- Friends ---------- */
.invite-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.invite-reset { font-size: 13px; }
.friends { margin-top: 14px; }
.friends-label { margin: 0 0 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--text-3); }
.friend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.friend-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}
.friend-chip:hover { border-color: var(--accent); }
.invite-banner {
  margin: 0 auto 28px;
  max-width: 34rem;
  padding: 14px 20px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-2);
}
.invite-banner strong { color: var(--text); }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 4px; }
.timeline-tags .timeline-rank { padding-top: 0; }
.timeline-shared { font-family: var(--font-mono); font-size: 11px; color: var(--text); }
.timeline-shared::before { content: "◆ "; color: var(--accent); }
.timeline-song.is-static { cursor: default; }
.timeline-song.is-static .timeline-name { text-decoration: none; }
.friend-remove { margin: 40px 0 0; }

/* ---------- Delete my account ---------- */
.delete-intro { margin-top: 12px; }
.delete-list { margin: 12px 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.delete-list strong { color: var(--text); }
.button-danger {
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid #E07A6A;
  border-radius: 999px;
  background: #E07A6A;
  color: var(--ground);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button-danger:hover { filter: brightness(1.06); }

/* ---------- Consent line and legal pages (Stage 4) ---------- */
.fine-print { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.fine-print a { color: var(--text-2); }
.legal { max-width: 720px; padding-top: 32px; padding-bottom: 64px; line-height: 1.65; }
.legal h2 { font-family: var(--font-serif); font-weight: 400; font-size: 28px; margin: 40px 0 12px; }
.legal h3 { font-size: 16px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); }
.legal-updated { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }
.draft-banner {
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 28px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.legal-links { margin-top: 48px; }

/* Phones: keep the invite banner on the first screen under the two-line headline.
   (Placed last so it overrides the sign-in card's normal spacing.) */
@media (max-width: 640px) {
  .signin-card { margin-top: 20px; padding: 20px; }
  .signin-card + .invite-card { margin-top: 16px; }
}

/* ---------- Someone's shared soundtrack (opened from their link) ---------- */
.shared-intro { margin-top: 24px; border-color: var(--accent); }
.shared-intro .invite-text { margin: 0; color: var(--text-2); line-height: 1.55; }
.shared-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0; }
#shared-status { margin-top: 20px; }
@media (max-width: 640px) {
  .shared-actions { width: 100%; }
  .shared-actions .button-primary { flex: 1 1 100%; justify-content: center; }
}
