.create-page { min-height: 100dvh; background: var(--paper); }
.builder-top { position: sticky; top: 0; z-index: 10; background: var(--paper); }
.back-link { display: inline-flex; align-items: center; justify-content: center; width: 52px; min-height: 52px; margin-left: 4px; color: var(--ink); }
.back-link:hover { color: var(--violet); }
.progress-track { height: 4px; overflow: hidden; background: #ece7f1; }
.progress-track span { display: block; width: 16.67%; height: 100%; background: var(--violet); transition: width 240ms ease; }
.builder-shell { width: min(520px, calc(100% - 40px)); margin: 40px auto 80px; }
.builder-step h1 { max-width: 14ch; font-size: clamp(1.9rem, 7vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.1; }
.step-lead { max-width: 30rem; margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field-stack { display: grid; gap: 14px; margin-top: 28px; }
.field-label { display: block; margin: 28px 0 8px; color: var(--ink); font-size: 0.87rem; font-weight: 700; }
.field-stack .field-label { margin-top: 0; }
.field-input { width: 100%; min-height: 54px; border: 1px solid #d5ccdc; border-radius: 12px; padding: 14px; background: #fff; color: var(--ink); font: inherit; }
.builder-step > .field-input { margin-top: 28px; }
.field-input:focus { border-color: var(--violet); outline: 3px solid rgb(99 70 199 / 20%); }
.field-textarea { min-height: 120px; resize: vertical; }
.field-note, .field-hint, .auth-status { margin: 12px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.field-note a, .field-hint a { text-decoration: underline; color: var(--violet); }
.auth-status:empty { margin: 0; }

.turnstile-box { margin-top: 0; }
.otp-input { text-align: center; font-size: 1.4rem; font-weight: 700; letter-spacing: 0.5em; }
.otp-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.link-button { padding: 0; border: 0; background: none; color: var(--violet); font: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.link-button:disabled { opacity: 0.55; cursor: wait; }

.movie-card { margin-top: 28px; overflow: hidden; border: 1px solid #e6dfe9; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.movie-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.movie-card__copy { display: grid; gap: 8px; padding: 18px; }
.movie-card__copy strong { font-family: var(--display); font-size: 1.25rem; letter-spacing: -0.02em; }
.movie-card__copy span { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

.upload-grid { display: grid; gap: 12px; margin-top: 28px; }
.upload-card { display: grid; grid-template-columns: 58px 1fr; grid-template-rows: auto auto; column-gap: 13px; align-items: center; min-height: 86px; padding: 12px; border: 1px dashed #b9a8e5; border-radius: 14px; background: #fbfaff; cursor: pointer; }
.upload-card:focus-within { outline: 3px solid var(--violet); outline-offset: 3px; }
.upload-card { position: relative; }
.remove-photo { position: absolute; top: 8px; right: 8px; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #d7cce4; border-radius: 50%; background: #fff; color: var(--ink); font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgb(42 30 74 / 12%); }
.remove-photo:hover { border-color: #a12424; color: #a12424; }
.prep-state { display: grid; justify-items: center; gap: 8px; padding: 6px; text-align: center; }
.upload-preview .spinner { width: 24px; height: 24px; border: 3px solid #fff; border-top-color: var(--violet); }
.prep-label { color: var(--violet); font-size: 0.72rem; font-weight: 700; line-height: 1.3; }
/* The phone thumbnail is too small for words: spinner only, the label stays for screen readers. */
@media (max-width: 599px) { .prep-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.upload-card.is-dragover, .field-input.is-dragover { border-style: solid; border-color: var(--violet); background: var(--lavender); }
/* The drag-and-drop hint only shows where a mouse can drag files (not on phones). */
.drop-hint { display: none; }
@media (hover: hover) and (pointer: fine) { .drop-hint { display: block; } }
.upload-card input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.upload-preview { position: relative; display: grid; grid-row: 1 / span 2; width: 58px; height: 58px; place-items: center; overflow: hidden; border-radius: 10px; background: var(--lavender); color: var(--violet); font-size: 1.5rem; font-weight: 400; }
/* The whole photo always shows (never cropped), so the visitor sees exactly what will be used. */
.upload-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.upload-card strong { font-size: 0.88rem; overflow-wrap: anywhere; }
.upload-card small { color: var(--muted); font-size: 0.73rem; }

.movie-summary { display: grid; gap: 0; margin-top: 28px; overflow: hidden; border: 1px solid #dfd5ed; border-radius: 14px; background: #faf8ff; }
.movie-summary > div { display: grid; gap: 4px; padding: 15px; border-bottom: 1px solid #e4dceb; }
.movie-summary > div:last-child { border-bottom: 0; }
.movie-summary span { color: var(--muted); font-size: 0.72rem; }
.movie-summary strong { font-family: var(--display); font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.movie-summary .summary-price { display: flex; justify-content: space-between; align-items: center; background: var(--lavender); }
.summary-price strong { color: var(--violet); font-size: 1.4rem; }

.consent-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.consent-check input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--violet); }
.consent-check a { text-decoration: underline; color: var(--violet); }
.bar-consents { display: grid; gap: 8px; margin-bottom: 12px; }
.bar-consents .consent-check { margin-top: 0; font-size: 0.78rem; line-height: 1.45; }
.bar-consents.is-accepted .consent-check span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
@media (max-width: 480px) { .bar-consents .consent-check { font-size: 0.74rem; line-height: 1.4; } }
.bar-legal { margin: 10px 0 0; color: var(--muted); font-size: 0.75rem; text-align: center; }
.bar-legal a { text-decoration: underline; color: var(--violet); }
.consent-check.is-missing { color: #a12424; }
.consent-check.is-missing input { outline: 2px solid #a12424; outline-offset: 2px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* The continue button never scrolls out of view: the bar sticks to the bottom of the screen while
   the step is taller than the screen, and sits in its normal place once the step's end is visible. */
.builder-actions { position: sticky; bottom: 0; z-index: 5; margin-top: 28px; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: var(--paper); }
.builder-actions::before { content: ""; position: absolute; right: 0; bottom: 100%; left: 0; height: 24px; background: linear-gradient(rgb(255 253 252 / 0), var(--paper)); pointer-events: none; }
.builder-actions:not(:has(> :not([hidden]))) { display: none; }
.builder-actions .form-error { margin: 0 0 10px; }
.builder-actions .button { width: 100%; min-height: 54px; font-size: 1rem; }
.form-error { margin: 18px 0 0; color: #a12424; font-size: 0.88rem; font-weight: 700; }

.builder-loading { display: grid; justify-items: center; gap: 16px; padding: 80px 0; color: var(--muted); text-align: center; }
.builder-loading p { margin: 0; font-weight: 600; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--lavender); border-top-color: var(--violet); border-radius: 50%; animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.builder-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; padding: 24px; font-size: .85rem; color: var(--muted); }
.builder-footer a { text-decoration: underline; }

[hidden] { display: none !important; }
.text-button { margin-top: 14px; padding: 0; border: 0; background: none; color: var(--violet); font: inherit; font-size: .88rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.text-button:disabled { opacity: .55; cursor: wait; }
.movie-card__copy small { color: var(--muted); font-size: .75rem; }
.preview-step h1 { max-width: 17ch; }
.preview-pending { display: grid; gap: 18px; justify-items: center; padding: 48px 20px; margin-top: 26px; border: 1px solid #e4dceb; border-radius: 16px; background: #faf8ff; text-align: center; }
.preview-pending p { margin: 0; max-width: 30ch; color: var(--muted); }
.cover-tabs { display: flex; gap: 8px; margin: 28px 0 12px; }
.cover-tab { flex: 1; min-height: 42px; border: 1px solid #d7cce4; border-radius: 11px; background: white; color: var(--muted); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.cover-tab.is-current { border-color: var(--violet); background: var(--lavender); color: var(--violet); }
.case-frame { container-type: inline-size; width: min(100%, 420px); margin: 0 auto; padding: 6px; border-radius: 8px; background: #01091a; box-shadow: 0 20px 55px rgb(1 9 26 / 25%); }
.cover-front, .cover-back { position: relative; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 3px; background: #01091a; color: #f7f4eb; }
.cover-front[hidden], .cover-back[hidden] { display: none; }
.cover-front > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-top, .cover-bottom { position: absolute; left: 0; right: 0; z-index: 1; }
.cover-top { top: 0; display: grid; justify-items: center; gap: 2px; padding: 12px 12px 35px; text-align: center; background: linear-gradient(180deg, rgb(1 9 26 / 84%), rgb(1 9 26 / 0%)); }
.cover-top span, .cover-back__brand span { font-family: Georgia, serif; font-size: clamp(.7rem, 2.8cqw, 1rem); letter-spacing: .18em; }
.cover-top small, .cover-back__brand strong { color: #dcfb40; font-size: clamp(.52rem, 1.6cqw, .7rem); font-weight: 800; letter-spacing: .24em; }
.cover-top strong { max-width: 100%; margin-top: 5px; color: #dcfb40; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(1.8rem, 10cqw, 2.75rem); font-style: italic; font-weight: 900; line-height: .92; letter-spacing: -.015em; text-shadow: 4px 4px 0 #01091a; white-space: nowrap; }
.cover-top strong.is-long { font-size: clamp(1.2rem, 6cqw, 2rem); white-space: normal; }
.cover-bottom { bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; align-items: end; padding: 48px 16px 12px; background: linear-gradient(0deg, #01091a 0%, rgb(1 9 26 / 95%) 28%, rgb(1 9 26 / 0%) 100%); }
.cover-bottom__left, .cover-bottom__right { display: grid; gap: 1px; font-family: Impact, 'Arial Narrow', sans-serif; font-style: italic; font-size: clamp(.55rem, 2.2cqw, .8rem); line-height: 1.1; }
.cover-bottom__right { text-align: right; }
.cover-marks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr) 1.2fr; gap: 3px; align-items: end; color: #f7f4eb; }
.cover-marks > span { display: grid; justify-items: center; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(.6rem, 2.3cqw, .85rem); line-height: 1; white-space: nowrap; }
.cover-marks small { margin-top: 2px; color: inherit; font-family: Arial, sans-serif; font-size: clamp(.36rem, 1.2cqw, .48rem); }
.preview-barcode { display: block; width: 100%; max-width: 70px; height: 24px; justify-self: end; background: repeating-linear-gradient(90deg, #f7f4eb 0 2px, transparent 2px 4px, #f7f4eb 4px 5px, transparent 5px 8px); }
.cover-back { display: flex; flex-direction: column; gap: 0; padding: 18px 8% 12px; background: radial-gradient(circle at 0 28%, rgb(85 36 42 / 30%), transparent 55%), #01091a; }
.cover-back__brand { display: grid; justify-items: center; gap: 9px; margin-bottom: 22px; }
.cover-back__brand strong { font-size: clamp(.55rem, 2cqw, .75rem); }
.cover-back__eyebrow { align-self: center; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(.85rem, 2.8cqw, 1.1rem); font-style: italic; }
.cover-back h2 { margin: 13px 0 8px; color: #dcfb40; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(2.3rem, 11cqw, 3.3rem); font-style: italic; line-height: .93; letter-spacing: -.02em; text-shadow: 3px 3px 0 #000; }
.cover-back__tagline { margin: 5px 0 22px; color: #dcfb40; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(.76rem, 2.8cqw, 1rem); font-style: italic; }
.cover-back #cover-back-story { margin: 0; font-size: clamp(.73rem, 3cqw, .9rem); line-height: 1.45; }
.cover-back__ending { margin: 18px 0 12px; font-size: clamp(.72rem, 2.8cqw, .9rem); font-style: italic; line-height: 1.4; }
.cover-back__rating { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cover-back__rating > span { color: #dcfb40; font-size: clamp(1rem, 4cqw, 1.4rem); letter-spacing: -.12em; }
.cover-back__rating strong { font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(1.5rem, 5cqw, 2rem); }
.cover-back__rating strong small { font-size: .45em; }
.cover-back__rating em { margin-left: auto; color: #dcfb40; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(.48rem, 1.7cqw, .65rem); }
.back-details { margin: 12px 0 0; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(.75rem, 2.7cqw, .95rem); font-style: italic; line-height: 1.45; }
.back-details small { font-family: Arial, sans-serif; font-size: clamp(.5rem, 1.8cqw, .65rem); font-style: normal; font-weight: 700; }
.cover-marks--back { margin-top: auto; padding-top: 14px; }
.cover-back__code { align-self: end; margin-top: 4px; color: #9da7bd; font-size: .45rem; }
.cover-back.is-dense .cover-back__brand { margin-bottom: 8px; }
.cover-back.is-dense .cover-back__tagline { margin-bottom: 8px; }
.cover-back.is-dense #cover-back-story { font-size: clamp(.69rem, 2.7cqw, .82rem); line-height: 1.35; }
.cover-back.is-dense .cover-back__ending { display: none; }
.cover-back.is-dense .cover-marks--back { padding-top: 8px; }
.story-below > span { color: var(--violet); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.cover-location { margin: 15px 0 0; text-align: center; color: var(--muted); font-size: .82rem; font-weight: 700; }
.cover-disclosure { margin: 5px 0 0; text-align: center; color: var(--muted); font-size: .73rem; }
.cover-versions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.version-tile { width: 82px; padding: 5px; border: 2px solid transparent; border-radius: 9px; background: #f7f3fa; color: var(--ink); cursor: pointer; }
.version-tile.is-selected { border-color: var(--violet); }
.version-tile img { display: block; width: 100%; height: 85px; object-fit: cover; border-radius: 4px; }
.version-tile span { display: block; margin-top: 5px; font-size: .62rem; line-height: 1.2; }
.story-below { margin-top: 25px; padding: 20px; border: 1px solid #e5ddeb; border-radius: 14px; background: #fbf9ff; }
.story-below p { margin: 10px 0; line-height: 1.6; font-size: .95rem; }
.story-below small { color: var(--muted); line-height: 1.4; }
.preview-choices { margin-top: 26px; }
.preview-choices .field-label { margin-top: 0; }
.preview-choices .button { width: 100%; margin-top: 12px; }
.preview-choices .button:disabled { opacity: .5; cursor: not-allowed; }
.button--secondary { background: #f7f3ff; color: var(--violet); border: 1px solid #cfc0ef; }
.preview-editor { margin-top: 22px; padding: 17px 18px; border: 1px solid #e5ddeb; border-radius: 14px; background: #fff; }
.preview-editor summary { color: var(--violet); font-weight: 700; cursor: pointer; }
.preview-editor__fields { display: grid; gap: 14px; margin-top: 18px; }
.preview-editor__fields label { display: grid; gap: 6px; color: var(--ink); font-size: .85rem; font-weight: 700; }
.preview-editor__fields label small { color: var(--muted); font-weight: 400; }
.preview-editor__fields textarea { min-height: 82px; resize: vertical; }
.preview-editor__fields .button { margin-top: 4px; }
.replace-photo-panel { margin-top: 18px; padding: 16px; border: 1px solid #e5ddeb; border-radius: 12px; background: #fbf9ff; }
.replace-photo-panel .field-label { margin-top: 0; }
.replace-photo-panel input[type=file] { padding: 13px; }
.preview-recovery { margin-top: 24px; padding: 22px; border: 1px solid #e5ddeb; border-radius: 14px; background: #fbf9ff; }
.preview-recovery p { margin: 0 0 16px; line-height: 1.5; }
.preview-recovery .button { width: 100%; }

@media (max-width: 480px) {
  .cover-back { overflow-y: auto; scrollbar-width: thin; }
  .cover-back__brand { margin-bottom: 14px; }
  .cover-back__tagline { margin-bottom: 13px; }
  .cover-back__ending { margin: 12px 0 9px; }
  .back-details { margin-top: 8px; }
}
@media (max-width: 360px) {
  .cover-back { min-height: 500px; }
}

@media (min-width: 600px) {
  .builder-shell { margin-top: 56px; }
  .upload-grid { grid-template-columns: repeat(3, 1fr); }
  .upload-card { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 8px; text-align: center; }
  .upload-preview { grid-row: auto; width: 100%; height: 170px; }
}
