/* LaunchReel · the create flow (create.html).
   Tokens follow lite/BUILD-PLAN.md; the visual language is
   lite/mockups/drop.html and preview.html. v2 (BUILD-PLAN-V2.md) adds the
   reading state and the understood card on step 1, the format selector,
   screenshot tips and phone + desktop pairs on step 2, and the format
   switch on step 4. */

:root {
  --paper: #faf9f6;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #4a4a48;
  --muted: #6b6b68;
  --muted-2: #8a8a86;
  --rule: #e7e4dc;
  --rule-soft: #f0ede6;
  --wash: #f4f2ed;
  --amber: #f5a623;
  --amber-2: #f7c948;
  --amber-deep: #c98a0e;
  --amber-tint: #fff6e6;
  --accent: linear-gradient(135deg, var(--amber), var(--amber-2));
  --error: #b42318;
  --error-tint: #fef3f2;
  --error-rule: #f1b8b1;
  --shadow-card: 0 30px 80px rgba(29, 29, 31, 0.1), 0 2px 6px rgba(29, 29, 31, 0.04);
  --shadow-cta: 0 12px 26px rgba(245, 166, 35, 0.36);
  --ring: 0 0 0 4px rgba(245, 166, 35, 0.2);
  --focus: 3px solid rgba(245, 166, 35, 0.65);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* The film's serif (the tagline and the wordmark), for its previews. */
  --serif: Fraunces, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, fieldset, figure { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img, video, svg { display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff;
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: var(--focus); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Top bar and stepper ---------- */

.top {
  height: 78px;
  padding: 0 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.logo {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 700; font-size: 21px; letter-spacing: -0.015em;
  color: var(--ink); text-decoration: none; border-radius: 10px;
}
.logo i {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35);
}
.top-note { justify-self: end; font-size: 14px; color: var(--muted); white-space: nowrap; }
.top-note strong { color: var(--ink-2); font-weight: 600; }

.stepper ol { display: flex; align-items: center; }
.stepper li { display: flex; align-items: center; }
.stepper li + li::before {
  content: "·"; margin: 0 4px; color: #c7c2b6; font-weight: 700; font-size: 16px;
}
.stepper button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: none;
  font-size: 14px; font-weight: 500; color: var(--muted-2); white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.stepper button:disabled { cursor: default; }
.stepper button:not(:disabled):hover { background: rgba(29, 29, 31, 0.045); color: var(--ink); }
.stepper .n {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--muted-2); background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule);
}
.stepper .n svg { width: 12px; height: 12px; }
.stepper .is-current button { color: var(--ink); font-weight: 600; }
.stepper .is-current .n {
  color: var(--ink); background: var(--accent); box-shadow: 0 3px 8px rgba(245, 166, 35, 0.35);
}
.stepper .is-done button { color: var(--ink-2); }
.stepper .is-done .n { color: var(--amber-deep); background: var(--amber-tint); box-shadow: inset 0 0 0 1.5px #f6dfb0; }

/* ---------- Page and cards ---------- */

main { display: flex; justify-content: center; padding: 14px 24px 72px; }
.step { width: 100%; display: flex; justify-content: center; }
.step > * { animation: rise 0.42s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card {
  width: 100%;
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  padding: 44px 50px 38px;
}
.card-narrow { max-width: 760px; }
.card-wide { max-width: 1040px; }

h1 {
  font-size: 40px; line-height: 1.08; font-weight: 800; letter-spacing: -0.035em;
  outline: none;
}
.sub { margin-top: 12px; font-size: 17.5px; line-height: 1.5; color: var(--ink-2); max-width: 660px; text-wrap: pretty; }
kbd {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 1px 7px; border-radius: 7px; background: #fff; border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 28px; border: 0; border-radius: 16px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.2s, background 0.2s, color 0.2s, opacity 0.2s;
}
.btn .arrow { font-weight: 600; transition: transform 0.2s var(--ease); }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: var(--shadow-cta); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(245, 166, 35, 0.42); }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 8px 18px rgba(245, 166, 35, 0.34); }
.btn:disabled, .btn.is-busy { cursor: default; }
.btn-primary:disabled { opacity: 0.55; transform: none; box-shadow: none; }
.btn-primary.is-busy { opacity: 1; transform: none; box-shadow: var(--shadow-cta); }
.btn-lg { height: 62px; padding: 0 34px; border-radius: 17px; font-size: 18.5px; }
.btn-ghost {
  height: 48px; padding: 0 16px; border-radius: 12px; background: transparent;
  color: var(--ink-2); font-size: 15.5px; font-weight: 600;
}
.btn-ghost:hover { background: var(--wash); color: var(--ink); }
.btn-soft { height: 50px; background: var(--wash); color: var(--ink); font-size: 16px; font-weight: 600; }
.btn-soft:hover { background: #ebe8e1; }
.btn .spin {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2.5px solid rgba(29, 29, 31, 0.22); border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
.link-btn {
  border: 0; background: none; padding: 4px 6px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--amber-deep); text-decoration: none;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.actions {
  margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--rule-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.actions [data-back] { margin-left: -12px; }

/* ---------- Errors ---------- */

.error {
  margin-top: 14px;
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 14px; border-radius: 12px;
  background: var(--error-tint); color: var(--error);
  font-size: 14.5px; font-weight: 500; line-height: 1.45;
}
.error svg { flex: none; margin-top: 1px; }
.error .error-lines { display: grid; gap: 2px; }
.error .error-act { margin-top: 6px; }
.error .error-act button {
  border: 0; background: none; padding: 0; font-weight: 700; color: var(--error);
  text-decoration: underline; text-underline-offset: 3px;
}
.error.is-soft { background: var(--amber-tint); color: #8a5a05; }
.error-sm { margin-top: 8px; padding: 8px 11px; font-size: 13.5px; }

/* ---------- 1 · Your app ---------- */

.card-app { max-width: 820px; }
.pane { animation: rise 0.4s var(--ease) both; }

.url-row { margin-top: 30px; display: flex; gap: 12px; }
.field-url {
  flex: 1; min-width: 0; height: 62px; padding: 0 18px 0 20px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 17px; border: 1.5px solid var(--rule); background: #fff;
  cursor: text; transition: border-color 0.2s, box-shadow 0.2s;
}
.field-url:hover { border-color: #dcd7cb; }
.field-url:focus-within { border-color: var(--amber); box-shadow: var(--ring); }
.field-url > svg { flex: none; color: var(--muted-2); }
.field-url input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font-size: 18px; color: var(--ink);
}
.field-url input::placeholder { color: #aaa79f; }
.field-url.is-invalid { border-color: var(--error-rule); }
.url-back { margin-top: 16px; }
.url-back .link-btn { margin-left: -6px; font-size: 14.5px; }

/* Reading the page: the address, the three things we do, a skeleton of the card to come. */
.read-site {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 5px 14px 5px 5px; border-radius: 999px; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--rule), 0 6px 16px rgba(29, 29, 31, 0.05);
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.read-icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--ink); font-size: 14px; font-weight: 800;
}
.read-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.read-host { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-live { display: inline-flex; gap: 3px; margin-left: 2px; }
.read-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); animation: blink 1.2s ease-in-out infinite; }
.read-live i:nth-child(2) { animation-delay: 0.2s; }
.read-live i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: none; } }
.reading h1 { margin-top: 22px; transition: opacity 0.2s; }
.reading h1.is-swap { opacity: 0; }
.read-bar {
  position: relative; margin-top: 26px; height: 6px; border-radius: 999px;
  background: #efebe3; overflow: hidden;
}
.read-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit;
  background: var(--accent); box-shadow: 0 0 10px rgba(245, 166, 35, 0.45);
  transition: width 0.5s var(--ease);
}
.read-bar i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: translateX(-100%); animation: sheen 1.6s ease-in-out infinite;
}
.read-steps { margin-top: 20px; display: grid; gap: 11px; }
.read-steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--muted-2); transition: color 0.3s; }
.read-steps .dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--rule); color: var(--amber-deep);
  transition: background 0.3s, box-shadow 0.3s;
}
.read-steps .is-done { color: var(--ink-2); }
.read-steps .is-done .dot { background: var(--amber-tint); box-shadow: inset 0 0 0 1.5px #f6dfb0; }
.read-steps .is-done .dot svg { animation: pop 0.3s var(--ease) both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.read-steps .is-active { color: var(--ink); font-weight: 600; }
.read-steps .is-active .dot { box-shadow: inset 0 0 0 1.5px #f6dfb0; }
.read-steps .is-active .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--amber); border-right-color: var(--amber);
  animation: spin 0.9s linear infinite;
}
.read-steps .is-active .dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.read-ghost {
  margin-top: 26px; padding: 20px 22px; border-radius: 20px;
  border: 1.5px dashed var(--rule); display: grid; gap: 12px;
}
.rg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.rg-head > div { flex: 1; display: grid; gap: 8px; }
.rg-icon, .rg-line, .rg-dot {
  display: block; border-radius: 8px;
  background: linear-gradient(100deg, #f4f1eb 30%, #ebe7df 50%, #f4f1eb 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.rg-icon { width: 52px; height: 52px; border-radius: 15px; flex: none; }
.rg-line { height: 12px; }
.rg-thin { height: 9px; }
.rg-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.rg-row { display: flex; align-items: center; gap: 10px; }
.rg-row .rg-line { flex: none; }
.rg-w25 { width: 25%; } .rg-w40 { width: 40%; } .rg-w45 { width: 45%; } .rg-w50 { width: 50%; }
.rg-w60 { width: 60%; } .rg-w70 { width: 70%; } .rg-w90 { width: 90%; }
.read-foot { margin-top: 18px; font-size: 14px; color: var(--muted); }
.read-foot .link-btn { font-size: 14px; }
.reading.is-failed .read-bar, .reading.is-failed .read-steps,
.reading.is-failed .read-ghost, .reading.is-failed .read-foot, .reading.is-failed .read-live { display: none; }
.read-fail { margin-top: 22px; }
.read-fail .error { margin-top: 0; }
.read-actions { margin-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* What we understood: confident text, every line editable in place. */
.u-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.u-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; line-height: 1.3; font-weight: 700; letter-spacing: 0; color: var(--amber-deep);
}
.u-edit { font-size: 13.5px; color: var(--muted-2); white-space: nowrap; }
.u-notice {
  margin-top: 14px; padding: 11px 14px; border-radius: 12px;
  background: var(--amber-tint); color: #7a5206; font-size: 14.5px; font-weight: 500; line-height: 1.45;
}
.u-head { margin-top: 16px; display: flex; align-items: center; gap: 18px; }
/* The logo opens the film, so it sits on the film's paper: a white logo shows up here as it would there. */
.u-logo {
  flex: none; height: 84px; min-width: 84px; max-width: 200px; padding: 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 20px; background: #f4f1ec;
  box-shadow: inset 0 0 0 1px rgba(29, 29, 31, 0.07), 0 8px 20px rgba(29, 29, 31, 0.08);
}
.u-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.u-logo.is-mark { width: 84px; }
.u-logo.is-wordmark { padding: 14px 18px; }
.u-logo.is-text { padding: 0 18px; }
.u-logo-word {
  font-size: 21px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; color: #1a1a1a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.u-id { flex: 1; min-width: 0; }
.u-host { margin-top: 1px; font-size: 14.5px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px; }
.u-host .link-btn, .u-logo-row .link-btn { font-size: 14px; padding: 2px 4px; }
.u-host .sep { margin: 0 3px 0 5px; }
.u-logo-row { margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-size: 13.5px; color: var(--muted); }
.u-logo-note { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.u-logo-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: none; }
.u-logo-row.is-soft .u-logo-note::before { background: var(--muted-2); }

/* A field that reads as text: a wash on hover, a white field with the amber ring on focus. */
.tf {
  display: block; width: calc(100% + 20px); margin: 3px -10px 0; padding: 5px 10px;
  border: 0; border-radius: 10px; background: transparent; outline: 0; resize: none;
  font-size: 16.5px; line-height: 1.5; color: var(--ink);
  transition: background 0.15s, box-shadow 0.15s;
}
.tf:hover { background: var(--wash); }
.tf:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--amber), var(--ring); }
.tf::placeholder { color: #aaa79f; }
textarea.tf { overflow: hidden; min-height: calc(1.5em + 10px); }
.tf.is-invalid { background: var(--error-tint); box-shadow: inset 0 0 0 1.5px var(--error-rule); }
.tf.u-name {
  margin-top: 0; padding: 1px 10px;
  font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -0.035em;
}
.tf-lead { font-size: 18.5px; line-height: 1.5; }

.u-facts { margin-top: 20px; display: grid; gap: 14px; }
.fld { position: relative; min-width: 0; }
.fld-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fld label, .fld-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2);
}
.fld-count {
  font-size: 12px; font-weight: 500; color: var(--muted-2); font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 0.15s;
}
.fld:focus-within .fld-count, .fld-count.is-near { opacity: 1; }
.fld-count.is-near { color: var(--amber-deep); font-weight: 600; }
.fld-hint { margin-top: 2px; font-size: 12.5px; color: var(--muted-2); }

.offers { margin-top: 3px; display: grid; gap: 1px; }
.offer { position: relative; display: flex; align-items: flex-start; gap: 9px; }
.offer-mark {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber-tint); color: var(--amber-deep); box-shadow: inset 0 0 0 1.5px #f6dfb0;
  margin-top: 8px;
}
.offer .tf { flex: 1; width: auto; min-width: 0; margin: 0 0 0 -8px; padding-right: 38px; }
.offer-x {
  position: absolute; right: 4px; top: 5px;
  width: 28px; height: 28px; border: 0; padding: 0; border-radius: 8px; background: transparent;
  display: flex; align-items: center; justify-content: center; color: var(--muted-2);
  opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.offer:hover .offer-x, .offer:focus-within .offer-x { opacity: 1; }
.offer-x:hover { background: #ebe8e1; color: var(--ink); }
@media (hover: none) { .offer-x { opacity: 1; } }
.add-point {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; padding: 5px 8px 5px 6px; margin-left: -6px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--amber-deep);
}
.add-point:hover { background: var(--amber-tint); }

.u-video {
  margin-top: 24px; padding: 20px 22px 20px; border-radius: 22px;
  background: linear-gradient(180deg, #fffaf0, #fffdf9);
  box-shadow: inset 0 0 0 1.5px #f3e5c4;
}
.u-video-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.u-video-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.u-video-head p { font-size: 14px; color: var(--muted); }
.u-video-grid { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }
.u-copy { display: grid; gap: 14px; }
.u-copy .tf:hover { background: rgba(255, 255, 255, 0.85); }
.tf-hook { text-transform: lowercase; }
.tf-hook::placeholder { text-transform: none; }
.tf-tag { font-family: var(--serif); font-size: 21px; line-height: 1.22; letter-spacing: -0.015em; padding-top: 2px; padding-bottom: 2px; }
.tf-tag + .sr-only + .tf-tag { margin-top: 0; }
.tf-tag::placeholder { font-family: var(--font); font-size: 16.5px; letter-spacing: 0; }

/* The live preview: a small frame of the film (the opening pill, the
   closing line, the end card), sized in container units so it scales. */
.pv { min-width: 0; }
.pv-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; background: #f4f1ec; container-type: inline-size;
  box-shadow: 0 16px 36px rgba(29, 29, 31, 0.13), inset 0 0 0 1px rgba(29, 29, 31, 0.06);
  --pv-accent: #f5a623; --pv-on: #141414;
}
.pv-scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.97);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.pv-frame[data-scene="open"] .pv-open,
.pv-frame[data-scene="close"] .pv-close,
.pv-frame[data-scene="end"] .pv-end { opacity: 1; transform: none; }
.pv-open { gap: 4.2cqw; }
.pv-brand { display: flex; align-items: center; justify-content: center; height: 10cqw; max-width: 40cqw; }
.pv-brand img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-brand.is-mark { width: 10cqw; }
.pv-brand-word { font-size: 5.4cqw; font-weight: 800; letter-spacing: -0.035em; color: #1a1a1a; white-space: nowrap; }
.pv-glass { width: 3.6cqw; height: 3.6cqw; flex: none; margin-right: 2cqw; color: #8a8680; }
.pv-pill {
  display: flex; align-items: center; width: 82%; height: 13cqw; padding: 0 1.7cqw 0 3.8cqw;
  border-radius: 999px; background: #fdfdfb;
  box-shadow: 0 2.6cqw 6.2cqw rgba(26, 26, 26, 0.08), inset 0 0 0 1px rgba(26, 26, 26, 0.05);
}
.pv-typed {
  min-width: 0; overflow: hidden; white-space: pre;
  font-size: var(--hook-size, 3.6cqw); letter-spacing: -0.01em; color: #1a1a1a;
}
.pv-caret {
  width: max(1.5px, 0.35cqw); height: calc(var(--hook-size, 3.6cqw) * 1.2); flex: none;
  margin-left: 0.6cqw; background: #1a1a1a; animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.pv-frame.is-typing .pv-caret { animation: none; }
.pv-send {
  margin-left: auto; width: 9cqw; height: 9cqw; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #f4f1ec; color: #8a8680; font-size: 4.4cqw; font-weight: 400;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.pv-frame.is-typed .pv-send { background: var(--pv-accent); color: var(--pv-on); transform: scale(1.06); }
.pv-tag {
  display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; padding: 0 6cqw;
  font-family: var(--serif); font-weight: 400; font-size: var(--tag-size, 8cqw);
  line-height: 1.1; letter-spacing: -0.02em; text-align: center; color: #1a1a1a;
}
.pv-tag > span { white-space: nowrap; }
.pv-frame[data-scene="close"] .pv-l1 { animation: pv-rise 0.6s var(--ease) 0.08s both; }
.pv-frame[data-scene="close"] .pv-l2 { animation: pv-rise 0.6s var(--ease) 0.36s both; }
@keyframes pv-rise { from { opacity: 0; transform: translateY(3cqw); } to { opacity: 1; transform: none; } }
.pv-stop { color: var(--pv-accent); }
.pv-end-logo { display: flex; align-items: center; justify-content: center; height: 8cqw; max-width: 30cqw; margin-bottom: 3cqw; }
.pv-end-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-end-logo.is-mark { width: 8cqw; }
.pv-frame[data-scene="end"] .pv-end-logo { animation: pv-rise 0.6s var(--ease) both; }
.pv-mark {
  font-family: var(--serif); font-weight: 400; font-size: var(--mark-size, 10cqw);
  line-height: 1; letter-spacing: -0.045em; color: #1a1a1a; white-space: nowrap;
}
.pv-frame[data-scene="end"] .pv-mark { animation: pv-rise 0.6s var(--ease) 0.05s both; }
.pv-cta {
  margin-top: 4cqw; max-width: 86%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 3.4cqw; line-height: 1.2; letter-spacing: 0.01em; color: #6b6862;
}
.pv-frame[data-scene="end"] .pv-cta { animation: pv-rise 0.6s var(--ease) 0.3s both; }
.pv-url {
  margin-top: 3cqw; display: flex; align-items: center; gap: 1.8cqw;
  height: 7cqw; padding: 0 1.1cqw 0 3.4cqw; border-radius: 999px;
  background: #fdfdfb; box-shadow: inset 0 0 0 1px #d8d3c8;
  font-size: 3cqw; font-weight: 500; color: #1a1a1a; white-space: nowrap;
}
.pv-url b {
  width: 4.8cqw; height: 4.8cqw; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--pv-accent); color: var(--pv-on); font-size: 2.6cqw; font-weight: 400;
}
.pv-frame[data-scene="end"] .pv-url { animation: pv-rise 0.6s var(--ease) 0.5s both; }
.pv-frame .is-ph { color: #aaa59c; font-style: italic; }
.pv-mark.is-ph { font-style: normal; }
.pv-badge {
  position: absolute; left: 2.6cqw; top: 2.6cqw;
  padding: 0.5cqw 1.8cqw; border-radius: 999px; background: rgba(255, 255, 255, 0.75);
  font-size: max(9px, 2.4cqw); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8680;
}
.pv-tabs { margin-top: 10px; display: flex; justify-content: center; gap: 4px; }
.pv-tabs button {
  height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--muted); transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.pv-tabs button:hover { color: var(--ink); }
.pv-tabs button[aria-pressed="true"] {
  background: #fff; color: var(--ink);
  box-shadow: 0 2px 8px rgba(29, 29, 31, 0.08), inset 0 0 0 1px var(--rule);
}

.card-app .actions { margin-top: 26px; }
.u-note { font-size: 14px; color: var(--muted); }

/* ---------- 2 · Screens ---------- */

.card-screens { max-width: 1120px; }

/* The format comes first; Vertical is the default. */
.formats { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fmt {
  position: relative; display: flex; align-items: flex-start; gap: 14px; min-width: 0;
  padding: 15px 44px 15px 15px;
  border-radius: 18px; border: 1.5px solid var(--rule); background: #fff; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.fmt:hover { border-color: #d9d4c8; }
.fmt:has(input:checked) { border-color: var(--amber); background: #fffbf2; box-shadow: var(--ring); }
.fmt:has(input:focus-visible) { outline: var(--focus); outline-offset: 3px; }
.fmt-glyph { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; }
.g-v, .g-h {
  display: block; flex: none; border-radius: 4px; border: 2px solid var(--muted-2); background: #fff;
  transition: border-color 0.2s, background 0.2s;
}
.g-v { width: 17px; height: 29px; }
.g-h { width: 32px; height: 19px; }
.fmt-glyph-both { position: relative; }
.fmt-glyph-both .g-h { position: absolute; left: 0; top: 6px; width: 28px; height: 17px; }
.fmt-glyph-both .g-v { position: absolute; right: 1px; top: 11px; width: 13px; height: 22px; border-radius: 3px; }
.fmt:has(input:checked) .g-v, .fmt:has(input:checked) .g-h { border-color: var(--amber-deep); background: #fdecc8; }
.fmt-text { min-width: 0; }
.fmt-text b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.fmt-text small { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.fmt-text em { display: block; margin-top: 7px; font-style: normal; font-size: 13.5px; line-height: 1.35; font-weight: 600; color: var(--ink-2); }
.fmt-check {
  position: absolute; right: 14px; top: 15px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--rule); color: transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.fmt:has(input:checked) .fmt-check { background: var(--accent); color: var(--ink); box-shadow: none; }

/* How to take great screenshots: compact, and it follows the format. */
.guide { margin-top: 16px; border-radius: 20px; background: #fbfaf7; box-shadow: inset 0 0 0 1.5px var(--rule-soft); }
.guide summary {
  list-style: none; display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: 20px; cursor: pointer;
  font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em;
}
.guide summary::-webkit-details-marker { display: none; }
.guide summary:hover .guide-chev { color: var(--ink); }
.guide-icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber-tint); color: var(--amber-deep);
}
.guide-for { font-size: 14px; font-weight: 500; color: var(--muted); }
.guide-chev { margin-left: auto; flex: none; color: var(--muted-2); transition: transform 0.2s var(--ease), color 0.2s; }
.guide[open] .guide-chev { transform: rotate(180deg); }
.guide-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 30px; padding: 0 20px 16px 56px; }
.guide-tips { display: grid; gap: 12px; align-content: start; }
.tips-cols { display: grid; gap: 14px; }
.tips-cols.is-two { grid-template-columns: 1fr 1fr; gap: 18px; }
.tips-block h3 {
  display: flex; align-items: center; gap: 7px; margin-bottom: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2);
}
.tips-block h3 svg { color: var(--muted-2); }
.tip { padding: 4px 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.tip + .tip { border-top: 1px solid var(--rule-soft); }
.tip b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.tip kbd { font-size: 12px; padding: 0 6px; }
.always { display: grid; gap: 3px; padding-top: 10px; border-top: 1px solid var(--rule); }
.always li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.always svg { flex: none; margin-top: 3px; color: var(--amber-deep); }

.ex-title {
  margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted-2);
}
.ex-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ex-strip.is-vertical { grid-template-columns: repeat(3, minmax(0, 104px)); }
.ex figure { min-width: 0; }
.ex-img {
  position: relative; aspect-ratio: var(--ex-a, 1.6); border-radius: 10px; overflow: hidden;
  background: #efece5; box-shadow: 0 6px 16px rgba(29, 29, 31, 0.1), inset 0 0 0 1px rgba(29, 29, 31, 0.05);
}
.ex-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.ex-num {
  position: absolute; left: 5px; top: 5px; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber); color: var(--ink); font-size: 10.5px; font-weight: 800;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.ex figcaption { margin-top: 7px; font-size: 12.5px; line-height: 1.35; font-weight: 500; color: var(--ink-2); text-wrap: pretty; }
.ex-pair { position: relative; }
.ex-pair .ex-img + .ex-img {
  position: absolute; right: -4px; bottom: -8px; width: 34%;
  box-shadow: 0 6px 16px rgba(29, 29, 31, 0.18), 0 0 0 2px #fbfaf7;
}
.ex-strip.is-pairs figcaption { margin-top: 14px; }
.ex-film { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; margin-left: -6px; font-size: 14px; }
.ex-film + .ex-film { margin-left: 4px; }
/* Placeholder art until the real examples load: a quiet sketch of a screen. */
.ex-ph { position: absolute; inset: 0; padding: 9%; display: flex; flex-direction: column; gap: 7%; background: linear-gradient(180deg, #fbf8f1, #f3efe6); }
.ex-ph i { display: block; border-radius: 4px; background: #e9e4d9; }
.ex-ph .p-bar { height: 7%; width: 55%; background: #e3ddd0; }
.ex-ph .p-hero { flex: 1.3; border-radius: 6px; background: linear-gradient(135deg, #fbe3b1, #f8d88d); }
.ex-ph .p-row { height: 8%; }
.ex-ph .p-row:nth-of-type(3) { width: 85%; }
.ex-ph .p-row:nth-of-type(4) { width: 65%; }
.ex-ph .p-btn { height: 11%; width: 50%; border-radius: 999px; background: var(--amber); opacity: 0.85; }
.ex-img.is-wide .ex-ph { padding: 7% 8%; gap: 9%; }
.ex-img.is-wide .ex-ph .p-hero { flex: 2; }

.drop {
  position: relative; margin-top: 18px; padding: 18px;
  border-radius: 24px; border: 2px dashed #ebc97f;
  background: linear-gradient(180deg, #fffcf5, #fff7e6);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.drop.is-over {
  border-color: var(--amber);
  background: linear-gradient(180deg, #fff8ea, #ffefcf);
  box-shadow: inset 0 0 0 4px rgba(245, 166, 35, 0.12);
}
.drop-empty {
  width: 100%; min-height: 196px; border: 0; border-radius: 16px; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; color: var(--ink); text-align: center;
}
.drop-empty:hover .drop-icon { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(245, 166, 35, 0.4); }
.drop-icon {
  width: 60px; height: 60px; border-radius: 18px; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--ink);
  box-shadow: 0 10px 22px rgba(245, 166, 35, 0.34);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.drop-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.drop-meta { font-size: 14px; color: var(--muted); }
.drop-meta kbd { font-size: 12.5px; }

.grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px;
  --frame-ar: 1.6;
}
.grid.is-pairs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles { display: contents; }
.tile {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px; border-radius: 17px; background: #fff;
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.08), 0 1px 3px rgba(29, 29, 31, 0.06);
  transition: box-shadow 0.2s, opacity 0.2s, transform 0.2s var(--ease);
}
.tile.is-new { animation: tile-in 0.32s var(--ease) both; }
@keyframes tile-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.tile.is-dragging { opacity: 0.4; }
.tile.drop-before::before, .tile.drop-after::after {
  content: ""; position: absolute; top: 10px; bottom: 10px; width: 3px; border-radius: 2px;
  background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}
.tile.drop-before::before { left: -9px; }
.tile.drop-after::after { right: -9px; }

.shot {
  position: relative; aspect-ratio: var(--frame-ar);
  border-radius: 11px; background: #f1eee7; overflow: hidden;
  cursor: grab;
}
.shot:active { cursor: grabbing; }
.shot-box {
  position: absolute; border-radius: 5px; cursor: crosshair;
  box-shadow: 0 2px 8px rgba(29, 29, 31, 0.2), 0 0 0 1px rgba(29, 29, 31, 0.05);
}
.shot-box img {
  width: 100%; height: 100%; border-radius: 5px; object-fit: fill;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.shot-box:focus-visible { outline: var(--focus); outline-offset: 2px; }
.shot-hint {
  position: absolute; left: 50%; bottom: 8px; transform: translate(-50%, 4px);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
  background: rgba(29, 29, 31, 0.78); color: #fff; font-size: 11px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s var(--ease);
}
.shot:hover .shot-hint, .shot-box:focus-visible ~ .shot-hint { opacity: 1; transform: translate(-50%, 0); }
.shot.has-dot .shot-hint { display: none; }
.badge {
  position: absolute; left: 7px; top: 7px; z-index: 1; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber); color: var(--ink); font-size: 12.5px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22); pointer-events: none;
}
.tile-remove {
  position: absolute; right: 7px; top: 7px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; padding: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.94); color: var(--ink-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.tile-remove:hover { background: #fff; color: var(--ink); transform: scale(1.06); }

/* Both: a phone slot and a desktop slot per screen. flex-grow and
   aspect-ratio share one number per slot, so the two stand the same height. */
.pair-slots { position: relative; display: flex; gap: 8px; cursor: grab; }
.pair-slots:active { cursor: grabbing; }
.slot {
  position: relative; flex: var(--a) 1 0; min-width: 0; aspect-ratio: var(--a);
  border-radius: 11px; background: #f1eee7; overflow: hidden;
  transition: box-shadow 0.2s;
}
.slot.is-over { box-shadow: inset 0 0 0 3px var(--amber); }
.slot .shot-box { border-radius: 4px; }
.slot .shot-box img { border-radius: 4px; }
.slot-empty {
  position: absolute; inset: 0; width: 100%; padding: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px dashed #e3c47f; border-radius: 11px; background: rgba(255, 255, 255, 0.7);
  color: var(--amber-deep); font-size: 12.5px; font-weight: 700; line-height: 1.2; text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.slot-empty:hover { background: #fff; border-color: var(--amber); }
.slot-empty svg { width: 20px; height: 20px; flex: none; }
.slot-empty small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.slot-tools { position: absolute; right: 5px; top: 5px; z-index: 1; display: flex; gap: 4px; }
.slot[data-slot="9x16"] .slot-tools { flex-direction: column; }
.pair .badge { left: -12px; top: -12px; }
.slot-btn {
  width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.94); color: var(--ink-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.slot-btn:hover { background: #fff; color: var(--ink); transform: scale(1.06); }
/* With a mouse, a slot's buttons show on hover (and on keyboard focus), so a narrow phone slot stays readable. */
@media (hover: hover) {
  .slot-tools { opacity: 0; transition: opacity 0.15s; }
  .slot:hover .slot-tools, .slot:focus-within .slot-tools { opacity: 1; }
}
.slot-kind {
  position: absolute; left: 5px; bottom: 5px; z-index: 1;
  width: 22px; height: 22px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.9); color: var(--ink-2); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
  pointer-events: none;
}
.slot.is-odd .slot-kind { background: var(--amber); color: var(--ink); }

.tap-dot {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--amber); border: 3px solid #fff; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.32), 0 2px 8px rgba(0, 0, 0, 0.35);
  animation: dot-in 0.28s var(--ease) both;
}
.tap-dot::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 2px solid rgba(247, 201, 72, 0.9);
  animation: dot-pulse 1.8s ease-out infinite;
}
.tap-dot:hover { transform: scale(1.12); }
.slot .tap-dot { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-width: 2.5px; }
@keyframes dot-in { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes dot-pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }

.caption {
  display: block; width: 100%; height: 74px; resize: none; outline: 0;
  padding: 8px 10px; border-radius: 11px; border: 1.5px solid var(--rule); background: #fff;
  font-size: 13.5px; line-height: 1.36; font-weight: 500; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.pair .caption { height: 58px; }
.caption::placeholder { color: #a8a59d; font-weight: 400; }
.caption:hover { border-color: #dcd7cb; }
.caption:focus { border-color: var(--amber); box-shadow: var(--ring); }
.tile.is-invalid .caption { border-color: var(--error-rule); background: var(--error-tint); }
.tile.is-invalid .caption::placeholder { color: #c2776d; }
.tile.is-incomplete .slot-empty { border-color: var(--error-rule); color: var(--error); background: var(--error-tint); }

.tile-foot { display: flex; align-items: center; gap: 2px; margin: -2px 0 -2px; }
.mv {
  width: 28px; height: 28px; border-radius: 8px; border: 0; padding: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted-2);
}
.mv:hover:not(:disabled) { background: var(--wash); color: var(--ink); }
.mv:disabled { opacity: 0.3; cursor: default; }
.pair-remove {
  margin-left: 4px; height: 28px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent;
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.pair-remove:hover { background: var(--wash); color: var(--ink); }
.count { margin-left: auto; padding-right: 4px; font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.count.is-near { color: var(--amber-deep); font-weight: 600; }

.add-tile {
  min-height: 160px; border-radius: 17px; border: 2px dashed #e3c47f;
  background: rgba(255, 255, 255, 0.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 10px; color: var(--amber-deep); font-size: 14px; font-weight: 600; text-align: center;
  transition: background 0.2s, border-color 0.2s;
}
.add-tile:hover { background: #fff; border-color: var(--amber); }
.add-tile svg { width: 28px; height: 28px; margin-bottom: 2px; flex: none; }

/* A gentle nudge when most screenshots don't match the chosen shape. */
.fit-hint {
  margin-top: 12px; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 11px 12px 11px 14px; border-radius: 14px;
  background: var(--amber-tint); box-shadow: inset 0 0 0 1px #f6dfb0;
  color: #7a5206; font-size: 14.5px; font-weight: 500; line-height: 1.4;
  animation: rise 0.3s var(--ease) both;
}
.fit-hint > svg { flex: none; color: var(--amber-deep); }
.fit-hint p { flex: 1 1 260px; min-width: 0; }
.fit-hint .fit-acts { display: flex; align-items: center; gap: 6px; }
.btn-fit {
  height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: #fff;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--ink);
  box-shadow: 0 2px 6px rgba(201, 138, 14, 0.14), inset 0 0 0 1.5px #f1d9a6;
}
.btn-fit:hover { box-shadow: 0 4px 10px rgba(201, 138, 14, 0.2), inset 0 0 0 1.5px var(--amber); }
.btn-fit .g-v, .btn-fit .g-h { border-color: var(--amber-deep); }
.btn-fit .g-v { width: 10px; height: 16px; border-radius: 2px; border-width: 1.8px; }
.btn-fit .g-h { width: 18px; height: 11px; border-radius: 2px; border-width: 1.8px; }
.fit-hint .link-btn { color: #8a5a05; font-weight: 600; }

.hint-row {
  margin-top: 12px; display: flex; justify-content: space-between; gap: 16px;
  font-size: 14px; color: var(--muted);
}
.hint-row .is-missing { color: var(--amber-deep); font-weight: 600; }
.hint-count { flex: none; font-variant-numeric: tabular-nums; }

/* ---------- 2 · The tap review ---------- */

.taps-pane h1 { transition: opacity 0.2s; }
.taps-status {
  margin-top: 18px; display: none; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--amber-deep);
}
.taps-pane.is-finding .taps-status { display: flex; }
.taps-spin {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2.5px solid rgba(245, 166, 35, 0.25); border-top-color: var(--amber);
  animation: spin 0.8s linear infinite;
}
.taps-grid {
  margin-top: 24px; display: grid; gap: 16px; align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* Phone screenshots: cards wide enough to place a dot, centred as one row. */
.taps-grid.is-tall { grid-template-columns: repeat(auto-fit, minmax(170px, 212px)); justify-content: center; }
.taps-grid.is-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tap-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 10px;
  padding: 10px 10px 12px; border-radius: 18px; background: #fff;
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.08), 0 1px 3px rgba(29, 29, 31, 0.06);
  animation: tile-in 0.32s var(--ease) both;
}
.tap-shots { display: flex; gap: 8px; }
.tap-card > .badge { left: -9px; top: -9px; }
/* One image per screen: it fills the card (flex-grow only shares space between a pair). */
.taps-grid:not(.is-pairs) .tap-shot { flex: 1 1 auto; }
.tap-shot {
  position: relative; flex: var(--a) 1 0; min-width: 0; aspect-ratio: var(--a);
  border-radius: 12px; background: #f1eee7; overflow: hidden;
}
.tap-img {
  position: absolute; border-radius: 6px; cursor: crosshair;
  box-shadow: 0 2px 8px rgba(29, 29, 31, 0.18), 0 0 0 1px rgba(29, 29, 31, 0.05);
}
.tap-img img { width: 100%; height: 100%; border-radius: 6px; object-fit: fill; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.tap-img.is-none img { opacity: 0.92; }
/* The control we found, faintly outlined while the dot is on it. */
.tap-area {
  position: absolute; border-radius: 6px; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.9), 0 0 0 6px rgba(245, 166, 35, 0.18);
  background: rgba(247, 201, 72, 0.12);
  animation: fade 0.3s var(--ease) both;
}
.tap-pin {
  position: absolute; z-index: 1; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0;
  border-radius: 50%; border: 3px solid #fff; background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.32), 0 3px 10px rgba(0, 0, 0, 0.35);
  cursor: grab; touch-action: none; animation: dot-in 0.3s var(--ease) both;
}
.tap-pin::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
.tap-pin::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(247, 201, 72, 0.9); animation: dot-pulse 1.8s ease-out infinite;
}
.tap-pin:active, .tap-pin.is-dragging { cursor: grabbing; }
.tap-pin.is-dragging::after { animation: none; opacity: 0; }
.tap-pin:focus-visible { outline: var(--focus); outline-offset: 4px; }
/* While we look: a sweep down each screen in turn. */
.taps-pane.is-finding .tap-img::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; border-radius: 6px;
  background: linear-gradient(180deg, transparent, rgba(247, 201, 72, 0.45), transparent);
  animation: scan 1.6s ease-in-out infinite;
}
.taps-pane.is-finding .tap-card:nth-child(2) .tap-img::after { animation-delay: 0.25s; }
.taps-pane.is-finding .tap-card:nth-child(3) .tap-img::after { animation-delay: 0.5s; }
.taps-pane.is-finding .tap-card:nth-child(4) .tap-img::after { animation-delay: 0.75s; }
.taps-pane.is-finding .tap-card:nth-child(5) .tap-img::after { animation-delay: 1s; }
@keyframes scan { 0% { transform: translateY(-40%); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(270%); opacity: 0; } }
.taps-pane.is-finding .tap-img { cursor: progress; }
.tap-cap { padding: 0 4px; font-size: 14.5px; line-height: 1.35; font-weight: 600; color: var(--ink); text-wrap: pretty; }
.tap-lines { display: grid; gap: 6px; padding: 0 2px; }
.tap-line {
  min-height: 36px; display: flex; align-items: center; gap: 6px 8px;
  padding: 5px 5px 5px 10px; border-radius: 11px; background: var(--amber-tint);
  font-size: 13.5px; line-height: 1.3; color: #7a5206;
}
.tap-line > svg { flex: none; color: var(--amber-deep); }
.tap-line b { font-weight: 700; color: var(--ink); }
.tap-line .tap-text { flex: 1 1 0; min-width: 0; overflow-wrap: break-word; }
/* "No tap here": in a narrow card, "Add a tap" goes under the words. */
.tap-line.is-none { flex-wrap: wrap; }
.tap-line.is-none .tap-text { flex-basis: 80px; }
.tap-line.is-none { background: var(--wash); color: var(--ink-2); }
.tap-line.is-none > svg { color: var(--muted); }
.tap-line.is-wait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule-soft); color: var(--muted-2); }
.tap-kind { width: 16px; height: 16px; flex: none; color: var(--muted); }
.tap-x {
  width: 28px; height: 28px; flex: none; border: 0; padding: 0; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; background: transparent; color: var(--amber-deep);
}
.tap-x:hover { background: rgba(245, 166, 35, 0.18); color: var(--ink); }
.tap-add {
  flex: none; height: 28px; padding: 0 9px 0 7px; border: 0; border-radius: 8px; background: #fff;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--amber-deep); box-shadow: inset 0 0 0 1.5px #f1d9a6;
}
.tap-add:hover { box-shadow: inset 0 0 0 1.5px var(--amber); }
.taps-pane .actions .btn-primary:disabled { opacity: 0.55; }

/* ---------- 3 · Music ---------- */

.moods { margin-top: 28px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.mood { position: relative; min-width: 0; }
.mood > label {
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  padding: 72px 18px 18px;
  border-radius: 20px; border: 1.5px solid var(--rule); background: #fff; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.mood > label:hover { border-color: #d9d4c8; box-shadow: 0 10px 24px rgba(29, 29, 31, 0.06); }
.mood > input:checked + label { border-color: var(--amber); background: #fffbf2; box-shadow: var(--ring); }
.mood > input:focus-visible + label { outline: var(--focus); outline-offset: 3px; }
.mood-check {
  position: absolute; right: 16px; top: 18px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--rule); color: transparent; background: #fff;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.mood > input:checked + label .mood-check { background: var(--accent); color: var(--ink); box-shadow: none; }
.mood-name { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.mood-desc { margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.mood-meta {
  margin-top: auto; padding-top: 16px;
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 35%; border-radius: 1.5px; background: #d9d4c8; }
.eq i:nth-child(2) { height: 70%; }
.eq i:nth-child(3) { height: 50%; }
.eq i:nth-child(4) { height: 85%; }
.eq i:nth-child(5) { height: 45%; }
.mood.is-playing .eq i { background: var(--amber-deep); animation: eq 0.9s ease-in-out infinite; }
.mood.is-playing .eq i:nth-child(2) { animation-delay: -0.55s; }
.mood.is-playing .eq i:nth-child(3) { animation-delay: -0.3s; }
.mood.is-playing .eq i:nth-child(4) { animation-delay: -0.75s; }
.mood.is-playing .eq i:nth-child(5) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.play {
  position: absolute; left: 18px; top: 18px; z-index: 1;
  width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber-tint); color: var(--amber-deep);
  box-shadow: inset 0 0 0 1.5px #f6dfb0;
  transition: background 0.2s, box-shadow 0.2s, transform 0.18s var(--ease), color 0.2s;
}
.play:hover { background: #ffedcc; transform: scale(1.05); }
.play .ic-play { margin-left: 2px; }
.play .ic-stop { display: none; }
.play[aria-pressed="true"] { background: var(--accent); color: var(--ink); box-shadow: 0 6px 14px rgba(245, 166, 35, 0.38); }
.play[aria-pressed="true"] .ic-play { display: none; }
.play[aria-pressed="true"] .ic-stop { display: block; }
.play:disabled { opacity: 0.4; cursor: default; transform: none; }

.mood.is-skeleton > label {
  min-height: 178px; cursor: default; border-color: var(--rule-soft);
  background: linear-gradient(100deg, #faf8f4 30%, #f3f0ea 50%, #faf8f4 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.music-alt { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.alt > label { flex-direction: row; align-items: center; gap: 14px; padding: 16px 52px 16px 16px; min-height: 76px; }
.alt .mood-check { top: 50%; margin-top: -11px; }
.alt-icon {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--wash); color: var(--ink-2);
}
.alt > input:checked + label .alt-icon { background: var(--amber-tint); color: var(--amber-deep); }
.alt-text { min-width: 0; }
.alt-text b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt-text small { display: block; font-size: 13px; color: var(--muted); }
.alt-tools {
  position: absolute; right: 50px; top: 50%; transform: translateY(-50%); z-index: 1;
  display: flex; align-items: center; gap: 6px;
}
.play-sm { position: static; width: 36px; height: 36px; }
#altCustom.has-file > label { padding-right: 190px; }

.actions-final {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; row-gap: 10px;
}
.actions-final [data-back] { grid-column: 1; grid-row: 2; }
.final { display: contents; }
.final > * { grid-column: 2; justify-self: end; }
.final .summary { grid-row: 1; }
.final .btn { grid-row: 2; }
.final .fine { grid-row: 3; }
.summary { font-size: 14px; color: var(--muted); text-align: right; }
.summary b { color: var(--ink-2); font-weight: 600; }
.fine { font-size: 13.5px; color: var(--muted); }
.fine strong { color: var(--ink-2); font-weight: 600; }
.final .fine { margin-top: 0; }

/* ---------- 4 · Producing ---------- */

.producing { padding: 40px 46px 32px; }
.prod-head { display: flex; align-items: center; gap: 20px; }
.prod-head h1 { font-size: 34px; }
.prod-meta { margin-top: 6px; font-size: 15px; color: var(--muted); }
.spinner {
  width: 52px; height: 52px; flex: none; border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(245, 166, 35, 0) 0deg, rgba(245, 166, 35, 0.15) 90deg, var(--amber) 300deg, var(--amber-2) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5.5px));
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.strip { margin-top: 26px; display: flex; gap: 10px; }
.strip figure {
  position: relative; margin: 0; flex: 1 1 0; min-width: 0; aspect-ratio: 16 / 10;
  border-radius: 10px; overflow: hidden; background: #f1eee7;
  box-shadow: 0 6px 16px rgba(29, 29, 31, 0.1);
}
.strip.is-tall { justify-content: center; }
.strip.is-tall figure { flex: 0 1 108px; aspect-ratio: 3 / 4; }
.strip img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.strip figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-100%); animation: sweep 2.6s ease-in-out infinite;
}
.strip figure:nth-child(2)::after { animation-delay: 0.18s; }
.strip figure:nth-child(3)::after { animation-delay: 0.36s; }
.strip figure:nth-child(4)::after { animation-delay: 0.54s; }
.strip figure:nth-child(5)::after { animation-delay: 0.72s; }
@keyframes sweep { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.strip b {
  position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber); color: var(--ink); font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}

.prod-bar { margin-top: 28px; }
.prod-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.prod-stage { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.prod-pct { font-size: 15px; font-weight: 700; color: var(--amber-deep); font-variant-numeric: tabular-nums; }
.progress {
  position: relative; margin-top: 12px; height: 12px; border-radius: 999px;
  background: #efebe3; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(29, 29, 31, 0.06);
}
.progress i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit;
  background: var(--accent); overflow: hidden;
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.45);
}
.progress i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: translateX(-100%); animation: sheen 1.8s ease-in-out infinite;
}
@keyframes sheen { 0% { transform: translateX(-100%); } 70%, 100% { transform: translateX(100%); } }
.prod-times { margin-top: 10px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.stages {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule-soft);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
}
.stages li { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--muted-2); }
.stages .dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--rule); color: var(--amber-deep);
}
.stages .is-done { color: var(--ink-2); }
.stages .is-done .dot { background: var(--amber-tint); box-shadow: inset 0 0 0 1.5px #f6dfb0; }
.stages .is-active { color: var(--ink); font-weight: 600; }
.stages .is-active .dot { box-shadow: inset 0 0 0 1.5px #f6dfb0; }
.stages .is-active .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--amber); border-right-color: var(--amber);
  animation: spin 0.9s linear infinite;
}
.stages .is-active .dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
}
.prod-foot { margin-top: 24px; font-size: 13.5px; color: var(--muted); }

/* ---------- 4 · Loading (resuming a job) ---------- */

.loading {
  min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  font-size: 15px; font-weight: 500; color: var(--muted);
}
.loading .spinner { width: 40px; height: 40px; }

/* ---------- 4 · Notice (error, missing) ---------- */

.notice { text-align: left; }
.notice-icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber-tint); color: var(--amber-deep);
}
.notice h1 { font-size: 32px; }
.notice-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 4 · Preview and paid ---------- */

.ready {
  width: 100%; max-width: 1336px;
  display: flex; align-items: stretch; justify-content: center; gap: 28px;
  animation: rise 0.45s var(--ease) both;
}
.stage-col { flex: 0 1 880px; min-width: 0; display: flex; flex-direction: column; }
.ready.is-vertical .stage-col { flex: 0 0 auto; width: 360px; }

/* A job with both formats: Vertical | Horizontal over the player. */
.view-switch {
  align-self: center; display: inline-flex; gap: 2px; padding: 4px; margin-bottom: 14px;
  border-radius: 14px; background: #fff;
  box-shadow: 0 6px 18px rgba(29, 29, 31, 0.07), inset 0 0 0 1px var(--rule);
}
.view-switch button {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px;
  border: 0; border-radius: 10px; background: transparent;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-pressed="true"] { background: var(--accent); color: var(--ink); box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3); }
.view-switch .g-v { width: 11px; height: 18px; border-radius: 3px; border-color: currentColor; background: transparent; }
.view-switch .g-h { width: 20px; height: 12px; border-radius: 3px; border-color: currentColor; background: transparent; }

.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 20px; overflow: hidden; background: #efece5;
  box-shadow: 0 26px 70px rgba(29, 29, 31, 0.18);
}
.ready.is-vertical .player { aspect-ratio: 9 / 16; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #efece5; cursor: pointer; }
.chip {
  position: absolute; left: 16px; top: 16px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  box-shadow: 0 4px 14px rgba(29, 29, 31, 0.12); pointer-events: none;
}
.sound-chip {
  position: absolute; left: 16px; bottom: 16px; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px 0 11px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  box-shadow: 0 6px 18px rgba(29, 29, 31, 0.16);
  animation: fade 0.3s var(--ease) both;
}
.sound-chip:hover { background: #fff; }
.big-play {
  position: absolute; left: 50%; bottom: 8%; width: 72px; height: 72px; margin-left: -36px;
  border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--ink);
  box-shadow: 0 16px 36px rgba(245, 166, 35, 0.45), 0 0 0 10px rgba(255, 255, 255, 0.35);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.big-play svg { margin-left: 3px; }
.big-play:hover { transform: scale(1.06); }
.unlock {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center; color: #fff;
  background: radial-gradient(ellipse at 50% 45%, rgba(24, 22, 18, 0.42), rgba(24, 22, 18, 0.66));
  backdrop-filter: blur(18px) saturate(1.05); -webkit-backdrop-filter: blur(18px) saturate(1.05);
  animation: fade 0.45s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.unlock-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.unlock-title { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 10px; text-wrap: balance; }
.ready.is-vertical .unlock-title { font-size: 24px; }
.ready.is-vertical .unlock .btn-lg { height: 54px; padding: 0 22px; font-size: 16.5px; }
.replay {
  margin-top: 4px; display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; padding: 8px 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: rgba(255, 255, 255, 0.86);
}
.replay:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.controls { margin-top: 16px; display: flex; align-items: center; gap: 14px; }
.ctl-play {
  width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--ink);
  box-shadow: 0 8px 18px rgba(245, 166, 35, 0.35);
  transition: transform 0.18s var(--ease);
}
.ctl-play:hover { transform: scale(1.05); }
.ctl-play .ic-play { margin-left: 2px; }
.ctl-play .ic-pause, .controls.is-playing .ctl-play .ic-play { display: none; }
.controls.is-playing .ctl-play .ic-pause { display: block; }
.seek {
  flex: 1; min-width: 60px; height: 22px; margin: 0; background: transparent;
  -webkit-appearance: none; appearance: none; cursor: pointer; --p: 0%;
}
.seek:focus-visible { outline: none; }
.seek::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--amber) var(--p), #e9e5dc var(--p));
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -5px;
  border-radius: 50%; background: #fff; border: 3px solid var(--amber); box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.seek:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(245, 166, 35, 0.3); }
.seek::-moz-range-track { height: 6px; border-radius: 3px; background: #e9e5dc; }
.seek::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--amber); }
.seek::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--amber); box-sizing: border-box;
}
.time { flex: none; min-width: 84px; text-align: right; font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ctl-icon {
  width: 38px; height: 38px; border-radius: 11px; border: 0; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink-2);
}
.ctl-icon:hover { background: var(--wash); color: var(--ink); }
.ctl-icon .ic-mute, .controls.is-muted .ctl-icon .ic-sound { display: none; }
.controls.is-muted .ctl-icon .ic-mute { display: block; }

.panel {
  flex: 0 0 428px; min-width: 0;
  display: flex; flex-direction: column;
  padding: 26px 26px 24px; border-radius: 24px; background: #fff;
  box-shadow: 0 20px 60px rgba(29, 29, 31, 0.08), 0 2px 6px rgba(29, 29, 31, 0.04);
}
.ready.is-vertical .panel { flex-basis: 440px; }
.panel h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; outline: none; }
.panel .meta { margin-top: 4px; font-size: 14px; color: var(--muted); }
.paid-pill {
  align-self: flex-start; margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px;
  border-radius: 999px; background: var(--amber-tint); color: var(--amber-deep);
  font-size: 12.5px; font-weight: 700; box-shadow: inset 0 0 0 1px #f6dfb0;
}
.scenes { margin-top: 16px; display: grid; gap: 8px; }
.scenes li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.scenes .thumb {
  position: relative; width: 62px; height: 40px; flex: none; border-radius: 8px; overflow: hidden;
  background: #f1eee7;
}
.scenes .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.scenes.is-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.scenes.is-thumbs .thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; }
.scenes .thumb b {
  position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber); color: var(--ink); font-size: 9.5px; font-weight: 800;
}
.scenes .cap {
  flex: 1; min-width: 0; height: 40px; padding: 0 13px;
  display: flex; align-items: center; border-radius: 12px; border: 1.5px solid var(--rule);
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.scenes .cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facts { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact {
  min-height: 48px; padding: 6px 13px; border-radius: 12px; border: 1.5px solid var(--rule);
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.fact small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.fact span { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1; min-height: 18px; }
.panel-cta { display: flex; flex-direction: column; gap: 8px; }
.panel-cta .btn-ghost { height: 42px; }
.panel-cta .btn { width: 100%; }
.panel-cta .note { text-align: center; font-size: 14px; color: var(--ink-2); }
.panel-cta .fine { text-align: center; font-size: 13px; }
.panel-cta .fine.legal { font-size: 12px; }
.fine.legal a { text-decoration: underline; text-underline-offset: 2px; }
.downloads { display: grid; gap: 8px; }
.downloads .btn-lg { height: 58px; font-size: 17.5px; }
.panel .error { margin-top: 12px; }

/* ---------- The example film ---------- */

.film {
  width: min(calc(100vw - 32px), 880px); max-height: calc(100vh - 32px); padding: 0;
  border: 0; border-radius: 22px; background: #fff; color: var(--ink);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.film.is-vertical { width: min(calc(100vw - 32px), 400px); }
.film::backdrop { background: rgba(29, 29, 31, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.film[open] { animation: rise 0.3s var(--ease) both; }
.film-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; }
.film-head h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.film-close {
  width: 36px; height: 36px; border-radius: 11px; border: 0; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center; background: var(--wash); color: var(--ink-2);
}
.film-close:hover { background: #ebe8e1; color: var(--ink); }
.film-body video { width: 100%; max-height: calc(100vh - 110px); background: #111; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .top { padding: 0 28px; }
  .ready { flex-direction: column; align-items: center; max-width: 880px; }
  .stage-col { flex: none; width: 100%; }
  .ready.is-vertical .stage-col { width: min(360px, 100%); }
  .panel, .ready.is-vertical .panel { flex: none; width: 100%; }
}

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.is-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taps-grid.is-pairs { grid-template-columns: 1fr; }
  .moods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-body { grid-template-columns: 1fr; gap: 20px; padding-left: 20px; }
  .ex-strip.is-vertical { grid-template-columns: repeat(3, minmax(0, 110px)); }
}

@media (max-width: 800px) {
  .top {
    height: auto; padding: 14px 16px 4px;
    grid-template-columns: 1fr auto; row-gap: 10px;
  }
  .logo { font-size: 19px; gap: 10px; }
  .logo i { width: 26px; height: 26px; border-radius: 8px; }
  .top-note { font-size: 13px; }
  .stepper { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .stepper ol { justify-content: center; }
  .stepper li + li::before { margin: 0 1px; }
  .stepper button { padding: 0 7px; gap: 7px; }
  .stepper li:not(.is-current) .label { display: none; }

  main { padding: 8px 16px 48px; }
  .card { padding: 26px 20px 22px; border-radius: 24px; }
  h1 { font-size: 30px; }
  .sub { font-size: 16px; }

  .url-row { flex-direction: column; }
  .url-row .btn { width: 100%; }
  .url-row .field-url { flex: none; height: 58px; }

  .reading h1 { margin-top: 18px; font-size: 27px; }
  .read-ghost { padding: 16px; }
  .read-actions .btn { flex: 1 1 auto; }
  .read-actions .btn-primary { flex-basis: 100%; }

  .u-top { flex-direction: column; align-items: flex-start; gap: 2px; }
  .u-head { gap: 14px; }
  .u-logo { height: 68px; min-width: 68px; max-width: 132px; padding: 10px; border-radius: 17px; }
  .u-logo.is-mark { width: 68px; }
  .u-logo.is-text { padding: 0 12px; }
  .u-logo-word { font-size: 17px; }
  .tf.u-name { font-size: 26px; }
  .tf-lead { font-size: 17px; }
  .u-video { margin-left: -8px; margin-right: -8px; padding: 16px 16px 16px; border-radius: 20px; }
  .u-video-grid { grid-template-columns: 1fr; gap: 16px; }
  .pv { order: -1; }
  .card-app .actions .u-note { text-align: center; }

  .formats { grid-template-columns: 1fr; gap: 8px; margin-top: 20px; }
  .fmt { padding: 10px 44px 10px 12px; gap: 12px; }
  .fmt-text small { font-size: 12.5px; }
  .fmt-text em { margin-top: 2px; font-size: 13px; }
  .fmt-check { top: 50%; margin-top: -11px; }
  .guide summary { padding: 12px 12px; gap: 9px; font-size: 15px; }
  .guide-for { display: none; }
  .guide-body { padding: 0 14px 16px; }
  .tips-cols.is-two { grid-template-columns: 1fr; }
  .ex-strip, .ex-strip.is-vertical { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .ex figcaption { font-size: 12px; }

  .drop { padding: 12px; border-radius: 20px; margin-top: 16px; }
  .drop-empty { min-height: 176px; }
  .grid, .grid.is-pairs { grid-template-columns: 1fr; gap: 12px; }
  .taps-grid, .taps-grid.is-pairs { grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
  .taps-grid.is-tall { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: 10px; }
  .tap-line { font-size: 13px; }
  /* Two narrow cards a row: the words get the width. */
  .taps-grid.is-tall .tap-card { padding: 8px 8px 10px; gap: 8px; }
  .taps-grid.is-tall .tap-cap { font-size: 14px; padding: 0 2px; }
  .taps-grid.is-tall .tap-line { padding: 5px 2px 5px 9px; gap: 4px 2px; font-size: 12.5px; }
  .taps-grid.is-tall .tap-line > svg:first-child { display: none; }
  .tile { padding: 8px; gap: 8px; }
  .tile > .caption { height: 64px; min-height: 64px; padding: 9px 12px; font-size: 16px; line-height: 1.3; }
  .tile-remove { width: 32px; height: 32px; right: 8px; top: 8px; }
  .badge { width: 28px; height: 28px; font-size: 14px; left: 8px; top: 8px; }
  .slot-btn { width: 30px; height: 30px; }
  .mv { width: 38px; height: 36px; }
  .mv svg { transform: rotate(90deg); }
  .pair-remove { height: 36px; }
  .add-tile { min-height: 64px; flex-direction: row; gap: 8px; }
  .add-tile svg { width: 22px; height: 22px; margin: 0; }
  .hint-row { flex-direction: column; gap: 4px; font-size: 13.5px; }
  .fit-hint .fit-acts { flex-wrap: wrap; }

  .moods { grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
  .mood > label { padding: 16px 50px 16px 72px; min-height: 76px; }
  .mood:not(.alt) .play { top: 50%; margin-top: -21px; left: 16px; }
  .mood:not(.alt) .mood-check { top: 50%; margin-top: -11px; }
  .mood-meta { padding-top: 6px; }
  .music-alt { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
  .alt > label { padding: 14px 52px 14px 14px; }
  #altCustom.has-file > label { padding-right: 160px; }

  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions-final { display: flex; }
  .final { display: flex; flex-direction: column; gap: 10px; }
  .final > * { justify-self: auto; }
  .actions > span:empty { display: none; }
  .actions .btn-primary { width: 100%; }
  .actions [data-back] { margin: 0; align-self: center; }
  .final { align-items: stretch; }
  .summary, .final .fine { text-align: center; }

  .producing { padding: 26px 20px 22px; }
  .prod-head { gap: 14px; }
  .prod-head h1 { font-size: 26px; }
  .spinner { width: 42px; height: 42px; }
  .stages { grid-template-columns: 1fr; }

  .ready { gap: 18px; }
  .view-switch { align-self: stretch; }
  .view-switch button { flex: 1; justify-content: center; }
  .player { border-radius: 16px; }
  .controls { gap: 8px; }
  .ctl-full-hide { display: none; }
  .unlock { gap: 8px; padding: 14px; }
  .unlock-kicker { display: none; }
  .unlock-title, .ready.is-vertical .unlock-title { font-size: 18px; margin-bottom: 2px; }
  .unlock .btn-lg, .ready.is-vertical .unlock .btn-lg { height: 46px; padding: 0 20px; font-size: 15.5px; border-radius: 14px; flex-shrink: 0; }
  .replay { margin-top: 0; padding: 4px 8px; font-size: 13.5px; }
  .big-play {
    width: 52px; height: 52px; left: auto; right: 12px; bottom: 12px; margin: 0;
    box-shadow: 0 10px 22px rgba(245, 166, 35, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.35);
  }
  .big-play svg { width: 22px; height: 22px; }
  .panel { padding: 22px 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .spinner, .btn .spin, .stages .is-active .dot::after, .read-steps .is-active .dot::after, .taps-spin {
    animation-duration: 2.4s !important; animation-iteration-count: infinite !important;
  }
}
