/* ============================================================
   Memory Reel — styles
   Recreates the Claude Design handoff ("Memory Reel - UI Mockups").
   Tokens are the handoff's; below 900px every screen switches to the
   mobile treatment (single column, four-step form, dark render screen).
   ============================================================ */

:root {
  --brand: #1B9DD9;
  --brand-dark: #1478A8;
  --brand-darker: #0F5C82;
  --brand-tint: #EAF6FC;
  --ink: #14212B;
  --body: #5C6873;
  --muted: #8B96A0;
  --paper: #FAF6F0;
  --surface: #FFFFFF;
  --line-09: rgba(20, 33, 43, .09);
  --line-10: rgba(20, 33, 43, .10);
  --line-12: rgba(20, 33, 43, .12);
  --line-15: rgba(20, 33, 43, .15);
  --line-18: rgba(20, 33, 43, .18);
  --track: #E4E8EB;
  --celebrate-bg: #FBEEE2;
  --celebrate-fg: #A85A18;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Figtree, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-card: 0 2px 10px rgba(20, 33, 43, .07);
  --shadow-lift: 0 4px 14px rgba(20, 33, 43, .10);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand-darker); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

.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;
}

/* ── type ─────────────────────────────────────────────────── */
.display-52 { font: 400 52px/1.06 var(--serif); margin: 0 0 14px; }
.display-42 { font: 400 42px/1.1 var(--serif); margin: 0 0 6px; }
.display-40 { font: 400 40px/1.1 var(--serif); margin: 0 0 34px; }
.display-36 { font: 400 36px/1.12 var(--serif); margin: 0 0 12px; }
.body-17 { font: 400 17px/1.6 var(--sans); color: var(--body); margin: 0; }
.fine { font: 400 13px/1.6 var(--sans); color: var(--muted); margin: 18px 0 0; }
.error-text { font: 500 14px/1.5 var(--sans); color: var(--celebrate-fg); margin: 10px 0 0; }
.error-text:empty { display: none; }

/* ── buttons & inputs ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 28px; border-radius: 11px; border: none;
  font: 600 17px var(--sans); cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
@media (hover: hover) { .btn-primary:hover { background: var(--brand-dark); color: #fff; } }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; background: var(--brand); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-18); }
@media (hover: hover) { .btn-secondary:hover { border-color: rgba(20, 33, 43, .35); color: var(--ink); } }
.btn-block { width: 100%; }
.btn-lg { height: 60px; padding: 0 34px; font-size: 18px; }
.btn-md { height: 56px; padding: 0 26px; font-size: 16px; }
.btn-sm { height: 54px; padding: 0 28px; font-size: 16px; }
.btn .plus { font-size: 22px; line-height: 1; }

.text-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font: 500 15px var(--sans); color: var(--muted); min-height: 44px;
  transition: color .15s ease;
}
@media (hover: hover) { .text-btn:hover { color: var(--ink); } }
.text-btn.link { color: var(--brand-dark); font-weight: 600; }
@media (hover: hover) { .text-btn.link:hover { color: var(--brand-darker); } }
.text-btn:disabled { color: var(--muted); cursor: default; }

.field-label { display: block; font: 600 14px var(--sans); color: var(--ink); margin-bottom: 8px; }
.input {
  width: 100%; height: 58px; padding: 0 18px;
  font: 400 17px var(--sans); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-15); border-radius: 11px;
  outline: none; transition: border-color .15s ease;
}
.input:focus { border-color: var(--brand); }
.input::placeholder { color: #A9B2BA; }

/* ── app header ───────────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 32px; background: var(--surface); border-bottom: 1px solid var(--line-09);
}
.app-header .left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.logo { height: 46px; width: auto; }
.logo-link { display: block; }
.header-context { font: 500 15px var(--sans); color: var(--body); }
.account { position: relative; display: flex; align-items: center; gap: 14px; }
.account-email { font: 500 14px var(--sans); color: var(--body); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font: 600 15px var(--sans);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.avatar-hit { padding: 3px; margin: -3px; background: none; border: none; border-radius: 50%; cursor: pointer; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line-10); border-radius: 13px;
  box-shadow: var(--shadow-lift); padding: 8px;
}
.account-menu .who { font: 500 13px var(--sans); color: var(--muted); padding: 8px 10px; word-break: break-all; }
.account-menu button {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font: 600 15px var(--sans); color: var(--ink); padding: 12px 10px; border-radius: 9px; min-height: 44px;
}
.account-menu button:hover { background: var(--brand-tint); }

.page { max-width: 1120px; margin: 0 auto; }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(27, 157, 217, .35); border-top-color: var(--brand);
  animation: spin 1.1s linear infinite;
}

/* ── 01 sign in ───────────────────────────────────────────── */
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-main {
  padding: 64px 72px; display: flex; flex-direction: column; justify-content: center;
  max-width: 620px; width: 100%; margin-left: auto;
}
.login-main .logo { height: 52px; margin-bottom: 46px; align-self: flex-start; }
.login-main .intro { max-width: 420px; margin-bottom: 34px; }
.login-main form .input { margin-bottom: 16px; }
.login-aside {
  background: var(--ink); padding: 64px 60px; display: flex; flex-direction: column;
  justify-content: center; gap: 26px;
}
.login-aside-inner { max-width: 460px; display: flex; flex-direction: column; gap: 26px; }
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile-grid > div { aspect-ratio: 1; border-radius: 10px; }
.tile-grid .t1 { background: linear-gradient(140deg, #3C4A57, #26333F); }
.tile-grid .t2 { background: linear-gradient(140deg, #4A5561, #2E3A46); }
.tile-grid .t3 { background: linear-gradient(140deg, #33404C, #222E39); }
.tile-grid .t4 { background: linear-gradient(140deg, #2E3A46, #3F4C58); }
.tile-grid .t5 {
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  color: #fff; font: 400 34px var(--serif);
}
.tile-grid .t6 { background: linear-gradient(140deg, #404D59, #293540); }
.aside-quote { font: 400 22px/1.45 var(--serif); color: var(--paper); margin: 0; }
.aside-caption { font: 500 13px var(--sans); color: #8FA3B3; margin: 0; }

.back-btn { align-self: flex-start; color: var(--body); margin-bottom: 26px; }
.code-boxes { display: flex; gap: 9px; margin-bottom: 26px; }
.code-box {
  flex: 1; min-width: 0; width: 100%; height: 64px; border-radius: 11px; background: var(--surface);
  border: 1.5px solid var(--line-15); text-align: center; outline: none;
  font: 600 24px var(--sans); color: var(--ink); padding: 0; caret-color: var(--brand);
}
.code-box:focus { border: 2px solid var(--brand); }
.code-box:focus-visible { outline: none; }
.code-boxes.has-error .code-box { border-color: var(--celebrate-fg); }
.resend { font: 400 14px/1.6 var(--sans); color: var(--muted); margin: 18px 0 0; text-align: center; }
.resend .text-btn { min-height: 0; font-size: 14px; }

/* ── 02 library ───────────────────────────────────────────── */
.library { padding: 44px 32px 52px; }
.library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.library-head p { font: 400 16px var(--sans); color: var(--body); margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line-10); border-radius: 13px;
  overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .15s ease;
}
@media (hover: hover) { .card:hover { box-shadow: var(--shadow-lift); color: var(--ink); } }
.card-poster {
  aspect-ratio: 16 / 10; position: relative; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #C9CDD2, #A8AEB5) center / cover no-repeat;
}
.play-dot {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.play-dot svg { width: 18px; height: 18px; margin-left: 3px; }
.duration-pill {
  position: absolute; right: 10px; bottom: 10px; background: rgba(20, 33, 43, .78); color: #fff;
  font: 600 12px var(--sans); padding: 4px 8px; border-radius: 6px;
}
.card-meta { padding: 16px 18px 18px; }
.card-title { font: 600 17px/1.35 var(--sans); margin-bottom: 5px; overflow-wrap: anywhere; }
.card-sub { font: 400 14px var(--sans); color: var(--muted); }
.card.is-rendering { border: 1px dashed rgba(27, 157, 217, .5); }
.card.is-rendering .card-poster { background: var(--brand-tint); flex-direction: column; gap: 10px; }
.card.is-rendering .card-poster span { font: 600 14px var(--sans); color: var(--brand-dark); }
.card.is-failed .card-poster { background: var(--celebrate-bg); flex-direction: column; gap: 8px; }
.card.is-failed .card-poster span { font: 600 14px var(--sans); color: var(--celebrate-fg); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 24px 90px; }
.empty-mark {
  width: 110px; height: 110px; border-radius: 26px; background: var(--brand-tint);
  border: 1.5px dashed rgba(27, 157, 217, .45); display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--brand); margin-bottom: 26px;
}
.empty h2 { font: 400 34px/1.15 var(--serif); margin: 0 0 12px; }
.empty p { font: 400 16px/1.6 var(--sans); color: var(--body); margin: 0 0 30px; max-width: 280px; }
.empty .btn { min-width: 320px; }

/* ── 03 new video form ────────────────────────────────────── */
.form-wrap { padding: 40px 56px 48px; max-width: 840px; margin: 0 auto; }
.step { margin-bottom: 34px; }
.step-label { display: block; font: 600 16px var(--sans); color: var(--ink); margin-bottom: 4px; }
.step-title { display: none; }
.step-help { font: 400 14px var(--sans); color: var(--muted); margin: 0 0 12px; }
.step-help.mobile { display: none; }
.step-chrome, .step-next, .step-spacer { display: none; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 13px 20px; border-radius: 30px; min-height: 44px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-15); color: var(--ink);
  font: 500 15px var(--sans); transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
@media (hover: hover) { .pill:hover { border-color: var(--brand); } }
.pill[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.panel { background: var(--surface); border: 1.5px solid var(--line-12); border-radius: 13px; padding: 18px; }
.panel.drop-hover { border-color: var(--brand); background: var(--brand-tint); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head .count { font: 600 14px var(--sans); }
.panel-head .estimate { font: 500 14px var(--sans); color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 9px; }
.ptile {
  aspect-ratio: 1; border-radius: 9px; position: relative; overflow: hidden;
  background: linear-gradient(140deg, #D2D6DA, #B4BAC0) center / cover no-repeat;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: pan-y; cursor: grab;
}
.ptile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ptile .idx {
  position: absolute; left: 5px; top: 4px; background: rgba(20, 33, 43, .72); color: #fff;
  font: 600 10px var(--sans); padding: 2px 5px; border-radius: 4px;
}
.ptile .remove {
  position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(20, 33, 43, .78); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; opacity: 0; transition: opacity .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.ptile:hover .remove, .ptile:focus-within .remove, .ptile .remove:focus-visible { opacity: 1; }
.ptile.dragging {
  transform: rotate(-2deg); box-shadow: 0 4px 12px rgba(20, 33, 43, .18); z-index: 2; cursor: grabbing;
}
.ptile.dragging .idx { background: var(--ink); }
.ptile.uploading, .ptile.failed {
  background: var(--brand-tint); border: 1.5px dashed var(--brand); cursor: default;
  display: flex; align-items: center; justify-content: center;
}
.ptile.uploading img, .ptile.failed img { position: absolute; inset: 0; opacity: .35; }
.ptile .up-label { position: relative; font: 600 12px var(--sans); color: var(--brand-dark); }
.ptile.failed { background: var(--celebrate-bg); border-color: var(--celebrate-fg); }
.ptile.failed .retry {
  position: relative; background: none; border: none; cursor: pointer; padding: 4px;
  font: 600 11px/1.3 var(--sans); color: var(--celebrate-fg); text-align: center;
}
.ptile.overflow { cursor: pointer; border: none; padding: 0; }
.ptile.overflow .scrim {
  position: absolute; inset: 0; background: rgba(20, 33, 43, .55); display: flex; align-items: center;
  justify-content: center; color: #fff; font: 600 13px var(--sans);
}
.ptile.add {
  background: var(--surface); border: 1.5px dashed rgba(20, 33, 43, .25); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--brand-dark); font: 600 11px var(--sans); padding: 0;
}
@media (hover: hover) { .ptile.add:hover { border-color: var(--brand); } }
.ptile.add .glyph { font-size: 20px; line-height: 1; }
.panel-foot { font: 400 13px var(--sans); color: var(--muted); margin: 14px 0 0; }
.panel-foot .text-btn { min-height: 0; font-size: 13px; }

.song-card {
  display: flex; align-items: center; gap: 16px; background: var(--surface);
  border: 1.5px solid var(--line-12); border-radius: 13px; padding: 16px 18px;
}
.song-art {
  width: 56px; height: 56px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, #C4C9CF, #9AA1A9); display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .9);
}
.song-art svg { width: 24px; height: 24px; }
.song-info { flex: 1; min-width: 0; }
.song-name { font: 600 16px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-meta { font: 400 14px var(--sans); color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--track); margin-top: 10px; position: relative; overflow: hidden; }
.bar > div { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand); border-radius: 3px; }
.round-play {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--ink); color: #fff;
  cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center;
}
.round-play svg { width: 16px; height: 16px; }
.song-pick {
  width: 100%; display: flex; align-items: center; gap: 16px; cursor: pointer; text-align: left;
  background: var(--surface); border: 1.5px dashed rgba(20, 33, 43, .25); border-radius: 13px; padding: 16px 18px;
}
@media (hover: hover) { .song-pick:hover { border-color: var(--brand); } }
.song-pick .song-art { background: var(--brand-tint); color: var(--brand); }

.submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 38px; }
.submit-row .note { font: 400 14px var(--sans); color: var(--muted); }
.missing { font: 500 14px var(--sans); color: var(--body); margin: 12px 0 0; }

/* ── 04 rendering ─────────────────────────────────────────── */
.progress-screen { padding: 70px 56px 78px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ring { position: relative; width: 132px; height: 132px; margin-bottom: 30px; }
.ring .spin {
  position: absolute; inset: 0; border-radius: 50%;
  border: 8px solid rgba(27, 157, 217, .22); border-top-color: var(--brand);
  animation: spin 1.3s linear infinite;
}
.ring .pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 600 26px var(--sans); color: var(--ink);
}
.ring.failed .spin { animation: none; border-color: var(--celebrate-bg); }
.ring.failed .pct { color: var(--celebrate-fg); font-size: 44px; }
.progress-screen h2 { font: 400 40px/1.12 var(--serif); margin: 0 0 12px; overflow-wrap: anywhere; }
.progress-screen .body-17 { max-width: 520px; margin-bottom: 28px; }
.checklist { display: flex; gap: 26px; margin-bottom: 34px; flex-wrap: wrap; justify-content: center; }
.check { display: flex; align-items: center; gap: 9px; font: 500 15px var(--sans); color: var(--ink); }
.check .dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none;
}
.check.pending { color: var(--muted); }
.check.pending .dot { background: none; border: 2px solid rgba(20, 33, 43, .2); }
.progress-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── 05 ready ─────────────────────────────────────────────── */
.ready { padding: 44px 56px 52px; }
.pill-ready {
  display: inline-flex; align-items: center; gap: 9px; background: var(--celebrate-bg); color: var(--celebrate-fg);
  font: 600 14px var(--sans); padding: 8px 14px; border-radius: 30px; margin-bottom: 18px;
}
.ready h2 { font: 400 42px/1.1 var(--serif); margin: 0 0 26px; overflow-wrap: anywhere; }
.ready-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.player-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: 13px; overflow: hidden; background: #0B1319; }
.player-wrap video, .player { width: 100%; height: 100%; display: block; background: #0B1319; }
.player { border-radius: 13px; aspect-ratio: 16 / 9; height: auto; }
.player-cover {
  position: absolute; inset: 0; border: none; padding: 0; cursor: pointer;
  background: center / cover no-repeat; display: flex; align-items: center; justify-content: center;
}
.player-cover .big-play {
  width: 74px; height: 74px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--ink);
  display: flex; align-items: center; justify-content: center; transition: transform .15s ease;
}
.player-cover:hover .big-play { transform: scale(1.05); }
.player-cover .big-play svg { width: 26px; height: 26px; margin-left: 4px; }
.player-cover .transport {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px;
  background: linear-gradient(transparent, rgba(20, 33, 43, .75));
  display: flex; align-items: center; gap: 12px; font: 600 13px var(--sans); color: #fff;
}
.player-cover .track { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.button-row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.detail-card { background: var(--surface); border: 1px solid var(--line-10); border-radius: 13px; padding: 24px; }
.detail-card .title { font: 600 16px var(--sans); margin-bottom: 16px; }
.share-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.share-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 44px;
  border: 1.5px solid var(--line-12); border-radius: 10px; background: var(--surface);
  font: 500 15px var(--sans); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; width: 100%;
  transition: border-color .15s ease;
}
@media (hover: hover) { .share-row:hover { border-color: var(--brand); color: var(--ink); } }
.share-row .icon {
  width: 30px; height: 30px; border-radius: 7px; background: var(--brand-tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.share-row .icon svg { width: 17px; height: 17px; }
.detail-meta { border-top: 1px solid var(--line-09); padding-top: 18px; font: 400 14px/1.7 var(--sans); color: var(--muted); overflow-wrap: anywhere; }
.rebuild { width: 100%; height: 48px; margin-top: 18px; text-align: left; font-weight: 600; }
.mobile-only { display: none !important; }
.m-inline { display: none; }

/* ── public share page ────────────────────────────────────── */
.share-body { max-width: 960px; margin: 0 auto; padding: 44px 32px 60px; }
.share-body .display-42 { margin-bottom: 22px; }

/* ── toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: #fff; font: 600 15px var(--sans); padding: 14px 20px; border-radius: 11px;
  box-shadow: var(--shadow-lift); max-width: calc(100% - 32px);
}

/* ============================================================
   Below 900px — the mobile treatment
   ============================================================ */
@media (max-width: 899px) {
  .app-header { padding: 14px 16px; }
  .logo { height: 40px; }
  .account-email { display: none; }

  /* sign in */
  .login { grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
  .login-aside { display: none; }
  .login-main { padding: 34px 22px 40px; margin: 0; max-width: none; justify-content: flex-start; }
  .login-main .logo { height: 44px; margin-bottom: 40px; }
  .display-52 { font-size: 40px; }
  .display-36 { font-size: 36px; }
  .code-box { height: 60px; font-size: 22px; }

  /* library */
  .library { padding: 30px 16px 40px; }
  .library-head { flex-direction: column; align-items: stretch; gap: 18px; }
  .display-42 { font-size: 36px; }
  .library-head .btn { width: 100%; }
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .empty { padding: 60px 8px; }
  .empty .btn { min-width: 0; width: 100%; }

  /* form → four steps, one question per screen */
  .form-screen .app-header { display: none; }
  .step-chrome { display: block; padding: 18px 22px 0; }
  .step-chrome .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .step-chrome .row .where { font: 500 15px var(--sans); color: var(--body); display: flex; align-items: center; gap: 8px; }
  .step-chrome .track { height: 5px; background: var(--track); border-radius: 3px; overflow: hidden; }
  .step-chrome .track > div { height: 100%; background: var(--brand); border-radius: 3px; transition: width .2s ease; }
  .form-wrap { padding: 24px 22px 28px; min-height: calc(100vh - 80px); min-height: calc(100dvh - 80px); display: flex; flex-direction: column; }
  .form-wrap > .display-40 { display: none; }
  .form-wrap .step { display: none; margin: 0; flex-direction: column; flex: 1; }
  .form-wrap[data-step="1"] .step[data-step="1"],
  .form-wrap[data-step="2"] .step[data-step="2"],
  .form-wrap[data-step="3"] .step[data-step="3"],
  .form-wrap[data-step="4"] .step[data-step="4"] { display: flex; }
  .step-label { display: none; }
  .step-title { display: block; font: 400 32px/1.15 var(--serif); margin: 0 0 8px; }
  .step-help { font-size: 15px; line-height: 1.55; color: var(--body); margin-bottom: 18px; }
  .step-help.desktop { display: none; }
  .step-help.mobile { display: block; }
  .step-spacer { display: block; flex: 1; min-height: 20px; }
  .step-next { display: flex; width: 100%; margin-top: 20px; }
  .step[data-step="4"] .submit-row { display: flex; margin-top: 20px; }
  .step[data-step="4"] .submit-row .btn { width: 100%; }
  .step[data-step="4"] .submit-row .note { text-align: center; width: 100%; }
  .panel { padding: 0; border: none; background: none; }
  .panel-head { margin-bottom: 12px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .ptile { border-radius: 11px; }
  .ptile .idx { left: 6px; top: 6px; font-size: 11px; padding: 2px 6px; border-radius: 5px; }
  .ptile .remove { opacity: 1; width: 28px; height: 28px; }
  .ptile.dragging { transform: scale(1.04) rotate(2deg); box-shadow: 0 8px 18px rgba(20, 33, 43, .25); }
  .ptile.dragging .idx { background: var(--brand); }
  .ptile.add { font-size: 12px; }
  .ptile.add .glyph { font-size: 22px; }
  .song-card { padding: 14px; gap: 12px; }
  .song-card .text-btn.link { font-size: 14px; }

  /* rendering → dark screen */
  .progress-page.is-working { background: var(--ink); min-height: 100vh; }
  .progress-page.is-working .app-header { background: var(--ink); border-color: rgba(255, 255, 255, .08); }
  .progress-page.is-working .app-header .logo { filter: brightness(0) invert(1); opacity: .9; }
  .progress-page.is-working .progress-screen { color: var(--paper); padding: 60px 26px; min-height: calc(100vh - 70px); justify-content: center; }
  .progress-page.is-working .ring { width: 120px; height: 120px; margin-bottom: 28px; }
  .progress-page.is-working .ring .spin { border-width: 7px; border-color: rgba(255, 255, 255, .16); border-top-color: var(--brand); }
  .progress-page.is-working .ring .pct { color: var(--paper); font-size: 24px; }
  .progress-page.is-working h2 { color: var(--paper); font-size: 30px; line-height: 1.18; }
  .progress-page.is-working .body-17 { color: #9FB0BE; font-size: 15px; max-width: 270px; margin-bottom: 30px; }
  .progress-page.is-working .checklist { display: none; }
  .progress-page.is-working .progress-actions { width: 100%; }
  .progress-page.is-working .progress-actions .btn { width: 100%; height: 56px; background: rgba(255, 255, 255, .12); color: var(--paper); border: none; }
  .progress-screen { padding: 50px 22px; }
  .progress-screen h2 { font-size: 32px; }

  /* ready */
  .ready { padding: 22px 22px 26px; min-height: calc(100vh - 70px); display: flex; flex-direction: column; }
  .pill-ready { font-size: 13px; padding: 7px 12px; margin-bottom: 14px; align-self: flex-start; }
  .ready h2 { font-size: 30px; line-height: 1.15; margin-bottom: 18px; }
  .ready-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .player-wrap { border-radius: 14px; }
  .player-cover .big-play { width: 66px; height: 66px; }
  .player-cover .transport { display: none; }
  .desktop-only { display: none !important; }
  .d-inline { display: none; }
  .m-inline { display: inline; }
  .mobile-only { display: flex !important; }
  .mobile-actions { flex-direction: column; gap: 10px; }
  .mobile-actions .btn { width: 100%; }
  .detail-card { display: none; }
  .share-body { padding: 26px 16px 40px; }
}
