/* Order and download pages. Tokens, type and buttons come from /styles.css. */

html:has(body.order-page) { scroll-padding-bottom: 88px; }
.order-header { max-width: 880px; }
.order-help { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 550; }
.order-main { max-width: 880px; margin: 0 auto; padding: 8px var(--gutter) 96px; }
.order-main:focus { outline: none; }
.order-main h1 { font-size: clamp(36px, 6.4vw, 56px); line-height: 1; letter-spacing: -.02em; }
.order-main h2 { font-size: clamp(27px, 4vw, 36px); }
/* Headings and summaries take focus only to move the screen reader; they are not controls, so no ring. */
.order-main [tabindex="-1"]:focus, .order-main [tabindex="-1"]:focus-visible { outline: none; }
.order-loading { padding: 64px 0; color: var(--ink-soft); }
.order-problem { display: grid; gap: 18px; padding: 32px 0; }
.order-problem p { max-width: 34em; font-size: 18px; }
#start-form { display: grid; gap: 18px; max-width: 34em; }
#start-form .button { justify-self: start; }

.button-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1.5px solid oklch(28.6% .031 38 / .35); border-radius: 999px; background: var(--page); color: var(--ink); font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer; }
.button-quiet:disabled { color: var(--ink-soft); border-color: var(--line); cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .button-quiet:hover:not(:disabled) { border-color: var(--ink); } }
.button-small { min-height: 44px; padding: 6px 14px; font-size: 15px; }
.button[disabled], .button[aria-disabled="true"] { background: oklch(55% .02 40); cursor: progress; }

.intake-form { display: grid; gap: 0; }
.order-intro { display: grid; gap: 18px; padding: 16px 0 40px; }
.order-intro > p { max-width: 36em; font-size: 18px; color: var(--ink-soft); }
.order-section { display: grid; gap: 14px; padding: 40px 0; border-top: 1px solid var(--line); }
.section-note { max-width: 36em; color: var(--ink-soft); font-size: 16px; }
.sheet-panel { margin: 0; border: 0; border-radius: var(--sheet-radius); padding: clamp(16px, 3vw, 28px); min-width: 0; }

.field { display: grid; gap: 8px; }
.field label, .field-label, .brand-colors legend { font-weight: 650; font-size: 16px; }
.field-hint { color: var(--ink-soft); font-weight: 400; font-size: 15px; }
.name-field { max-width: 22em; }
input[type="text"], input[type="email"], textarea { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid oklch(28.6% .031 38 / .32); border-radius: 12px; background: var(--page); color: var(--ink); font: 400 17px/1.4 var(--font); }
textarea { resize: vertical; }
input[type="text"]:focus-visible, input[type="email"]:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-status { font-size: 15px; color: var(--ink-soft); }
.field-status:empty { display: none; }
.field-error { color: var(--danger); font-size: 15px; }

/* Visually hidden file inputs keep native keyboard and screen reader behavior; the label is the control. */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 4px; }
.file-input:disabled + label { opacity: .5; cursor: not-allowed; }

.photo-panel { display: grid; gap: 18px; background: var(--blush); }
.guidance { display: grid; gap: 6px; font-size: 16px; }
.guidance li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.guidance li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: translateY(-1px); }
.photo-list { display: grid; gap: 10px; }
.photo-list:empty { display: none; }
.photo-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: start; padding: 10px; border-radius: 16px; background: oklch(99.3% .003 40 / .78); }
.photo-thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: oklch(93% .02 29); }
.photo-thumb:not([src]) { visibility: hidden; }
.photo-body { display: grid; gap: 4px; min-width: 0; }
.photo-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.photo-title strong { font-size: 16px; }
.photo-state { font-size: 15px; color: var(--ink-soft); }
.photo-state.is-error { color: var(--danger); }
.photo-checks { display: grid; gap: 2px; font-size: 15px; line-height: 1.4; }
.photo-checks .warn { color: oklch(42% .1 60); }
.photo-checks .bad { color: var(--danger); }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.progress { height: 6px; border-radius: 3px; background: oklch(28.6% .031 38 / .14); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 200ms linear; }
.photo-framing { padding: 12px 14px; border-radius: 12px; background: oklch(99.3% .003 40 / .78); color: oklch(42% .1 60); font-size: 15px; font-weight: 550; line-height: 1.45; }
.photo-add { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.photo-count { color: oklch(36% .045 30); font-size: 15px; font-weight: 550; }

.style-options { --ink-soft: var(--ink); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 20px); margin: 0; padding: clamp(14px, 2.6vw, 24px); border: 0; border-radius: var(--sheet-radius); background: var(--sage); min-width: 0; }
.style-option { position: relative; display: grid; gap: 6px; padding: 10px 8px 14px; border-radius: 18px; cursor: pointer; }
.style-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.style-option:has(input:checked) { background: oklch(99.3% .003 40 / .7); box-shadow: inset 0 0 0 3px var(--ink); }
.style-option:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.style-art { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.style-art img { width: 100%; height: auto; filter: var(--sticker-shadow); }
.style-text { color: var(--ink-soft); font-size: 15px; line-height: 1.4; text-align: center; }
.style-text strong { display: block; color: var(--ink); font-size: 17px; }
.style-text strong::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid var(--ink); border-radius: 50%; vertical-align: -1px; }
.style-option:has(input:checked) .style-text strong::before { background: var(--ink); box-shadow: inset 0 0 0 2.5px var(--page); }

.pose-panel { --ink-soft: var(--ink); background: var(--butter); }
.pose-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 6px; }
.pose-grid > li { display: grid; }
.pose { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 4px; justify-items: center; padding: 6px 4px 8px; border-radius: 16px; cursor: pointer; text-align: center; }
.pose input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pose-art { position: relative; grid-area: 1 / 1; display: grid; place-items: center; width: 100%; aspect-ratio: 1; }
.pose-art img { width: 100%; height: auto; filter: var(--sticker-shadow); }
.pose-art picture { display: contents; }
.pose-label { grid-area: 2 / 1; min-width: 0; max-width: 100%; font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
/* No preview: the label sits low on a soft tile in the art’s place, clear of the check, so the tile is never blank and the name is not repeated. */
.pose.is-placeholder .pose-art::before { content: ""; position: absolute; inset: 5%; border-radius: 22%; background: oklch(99.3% .003 40 / .78); box-shadow: inset 0 0 0 1.5px oklch(28.6% .031 38 / .1); }
.pose.is-placeholder .pose-label { grid-area: 1 / 1; z-index: 1; align-self: end; margin-bottom: 13%; max-width: 88%; font-size: 15px; font-stretch: 85%; line-height: 1.15; text-wrap: balance; }
.pose.is-placeholder:not(:has(input:checked)) .pose-label { color: var(--ink-soft); }
.pose-check { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%; background: var(--page); }
.pose input:checked ~ .pose-art .pose-check { background: var(--ink); }
.pose input:checked ~ .pose-art .pose-check::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid var(--on-ink); border-bottom: 2.5px solid var(--on-ink); transform: translateY(-1px) rotate(-45deg); }
.pose:has(input:checked) { background: oklch(99.3% .003 40 / .66); }
.pose:not(:has(input:checked)) .pose-art img { opacity: .5; }
.pose:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

.ideas { display: grid; gap: 10px; padding-top: 12px; }
.ideas h3 { font-size: 20px; }
.idea-list { display: grid; gap: 12px; padding: 0; list-style: none; }
.idea-list:empty { display: none; }
.idea { display: grid; gap: 6px; }
.idea-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.idea-head label { font-weight: 650; }
.idea-meta { color: var(--ink-soft); font-size: 14px; }
.ideas .button-quiet { justify-self: start; }

.pose-bar { position: sticky; bottom: 0; z-index: 5; margin: 6px calc(var(--gutter) * -1) -40px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: oklch(99.3% .003 40 / .96); border-top: 1px solid var(--line); }
.pose-count { font-size: 17px; font-weight: 650; }
.pose-count.is-off { color: var(--danger); }
.pose-count .count-ok::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: oklch(55% .12 145); }

.brand-colors { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.brand-colors legend { padding: 0; margin-bottom: 8px; }
.color-list { display: grid; gap: 10px; }
.color-list:empty { display: none; }
.color-row { display: grid; grid-template-columns: 52px minmax(0, 11em) auto; align-items: center; gap: 10px; }
.color-row input[type="color"] { width: 52px; height: 48px; padding: 3px; border: 1.5px solid oklch(28.6% .031 38 / .32); border-radius: 12px; background: var(--page); cursor: pointer; }
.color-row input[type="color"]:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.brand-colors .button-quiet { justify-self: start; }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.logo-preview { width: 96px; height: 96px; padding: 8px; border-radius: 12px; object-fit: contain; background: repeating-conic-gradient(oklch(94% .006 40) 0 25%, var(--page) 0 50%) 50% / 16px 16px; border: 1px solid var(--line); }

.consent-section { padding-block: 28px; }
.consent { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 17px; cursor: pointer; }
.consent input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); }

.error-summary { display: grid; gap: 8px; margin: 8px 0 20px; padding: 16px 18px; border: 2px solid var(--danger); border-radius: 16px; color: var(--ink); }
.error-summary h2 { font-size: 19px; line-height: 1.3; }
.error-summary ul { display: grid; gap: 4px; }
.error-summary button { min-height: 44px; padding: 0; border: 0; background: none; color: var(--danger); font: 600 16px/1.35 var(--font); text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 8px; }

.review { display: grid; gap: 18px; padding: 16px 0; }
.review > p { color: var(--ink-soft); font-size: 18px; max-width: 34em; }
.review-list { display: grid; gap: 0; margin: 8px 0; }
.review-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; padding: 18px 0; border-top: 1px solid var(--line); }
.review-item dt { grid-column: 1; font-weight: 700; }
.review-item dd { grid-column: 1; margin: 0; color: var(--ink); min-width: 0; }
.review-item .button-quiet { grid-column: 2; grid-row: 1 / span 2; }
.review-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.review-thumbs img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.review-poses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.review-poses li { padding: 3px 10px; border-radius: 999px; background: var(--butter); font-size: 14px; font-weight: 550; }
.review-poses li.is-idea { background: var(--blush); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.swatch span { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); }

.order-status { display: grid; gap: 18px; padding: 16px 0; }
.status-line { max-width: 26em; font-size: clamp(21px, 3vw, 26px); font-weight: 650; line-height: 1.3; }
.order-status > p { max-width: 34em; font-size: 18px; }
.status-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 8px 0; padding: 20px; border-radius: var(--sheet-radius); background: var(--blush); }
.status-facts dt { font-weight: 650; }
.status-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.status-help { color: var(--ink-soft); }
.resend { display: grid; justify-items: start; gap: 10px; }
.resend-status { max-width: 34em; font-size: 16px; font-weight: 550; }
.resend-status:empty { display: none; }
.resend-status:focus { outline: none; }

/* Privacy notice in orders builds (order/privacy.html, staged as /privacy). Base styles are in /styles.css. */
.privacy-page h2 { margin-top: 36px; font-size: clamp(22px, 2.4vw, 26px); line-height: 1.2; }
.privacy-page ul { display: grid; gap: 8px; margin-top: 14px; padding-left: 22px; list-style: disc; }
.privacy-page li { font-size: 17px; line-height: 1.6; }
.privacy-page li::marker { color: var(--ink-soft); }

/* Likeness proof */
.proof { display: grid; gap: 18px; padding: 16px 0; }
.proof > p { max-width: 34em; font-size: 18px; }
.proof-sheet { display: grid; gap: 8px; margin: 4px 0; padding: clamp(10px, 2vw, 18px); border-radius: var(--sheet-radius); background: var(--blush); }
.proof-sheet img { width: 100%; height: auto; border-radius: 12px; background: var(--page); }
.proof-sheet img:not([src]) { aspect-ratio: 3 / 2; }
.proof-sheet figcaption { color: oklch(36% .045 30); font-size: 15px; font-weight: 550; }
.proof .proof-consequence { color: var(--ink-soft); font-size: 16px; }
.proof-changes { display: grid; gap: 14px; max-width: 36em; }
.proof-changes .field-hint { margin-top: -2px; }
.status-quote { max-width: 34em; padding-left: 16px; border-left: 3px solid var(--blush); color: var(--ink-soft); }

/* Download page */
.download-head { display: grid; gap: 14px; padding: 16px 0 28px; }
.thanks-main { max-width: 760px; padding-block: clamp(48px, 9vw, 110px); }
.thanks-main h1 { margin-bottom: 22px; }
.thanks-main p { max-width: 36em; margin-bottom: 18px; font-size: clamp(17px, 2vw, 20px); }
.download-head p { max-width: 34em; font-size: 18px; }
.download-expiry { color: var(--ink-soft); }
.download-all { display: grid; justify-items: start; gap: 10px; padding-bottom: 32px; }
.download-all .note { color: var(--ink-soft); font-size: 15px; max-width: 34em; }
.download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.download-progress { font-size: 15px; font-weight: 600; }
.download-progress:empty { display: none; }
.download-guide { margin-bottom: 32px; }
.download-guide h2 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 12px; }
.download-guide > p { max-width: 40em; margin-bottom: 20px; }
.download-guide details { border-top: 1px solid var(--line); }
.download-guide details:last-child { border-bottom: 1px solid var(--line); }
.download-guide summary { padding: 16px 0; font-weight: 650; cursor: pointer; }
.download-guide summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.download-guide-body { display: grid; gap: 12px; max-width: 40em; padding: 0 0 20px; }
.sticker-sheet { --ink-soft: var(--ink); padding: clamp(14px, 2.6vw, 24px); border-radius: var(--sheet-radius); background: var(--butter); }
.sticker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 10px; }
.sticker { display: grid; gap: 6px; justify-items: center; text-align: center; }
.sticker-art { display: grid; place-items: center; width: 100%; aspect-ratio: 1; }
.sticker-art img { width: 100%; height: auto; filter: var(--sticker-shadow); }
.sticker-art.is-loading::before { content: ""; width: 60%; aspect-ratio: 1; border-radius: 24%; background: oklch(99.3% .003 40 / .55); }
.sticker-name { font-size: 15px; font-weight: 650; line-height: 1.25; }
.sticker-files { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sticker-files .button-quiet { min-height: 44px; padding: 4px 12px; font-size: 14px; background: oklch(99.3% .003 40 / .8); }
.extra-files { display: grid; gap: 10px; padding-top: 28px; }
.extra-files h2 { font-size: 22px; }
.extra-list { display: grid; gap: 4px; }
.extra-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 0; border-top: 1px solid var(--line); }
.extra-list .meta { color: var(--ink-soft); font-size: 15px; }

@media (max-width: 760px) {
  .pose-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sticker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .order-main { padding-top: 0; }
  .proof > p { font-size: 16px; }
  .order-intro { padding-bottom: 28px; }
  .order-intro > p, .review > p, .order-status > p, .download-head p { font-size: 16px; }
  .order-section { padding: 30px 0; }
  .style-options { grid-template-columns: minmax(0, 1fr); }
  .style-option { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; column-gap: 14px; }
  .style-text { text-align: left; }
  .pose-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 4px; }
  .pose-label { font-size: 13px; }
  .pose.is-placeholder .pose-label { font-size: 13px; font-stretch: 78%; }
  .resend .button { width: 100%; min-inline-size: 0; }
  .pose-bar { margin-bottom: -30px; }
  .photo-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .photo-thumb { width: 64px; height: 64px; }
  .color-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .review-item { grid-template-columns: minmax(0, 1fr); }
  .review-item .button-quiet { grid-column: 1; grid-row: auto; justify-self: start; }
  .form-actions .button { width: 100%; min-inline-size: 0; }
  .status-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .status-facts dd + dt { margin-top: 10px; }
  .download-all .button { width: 100%; min-inline-size: 0; }
  .sticker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .style-option { grid-template-columns: minmax(0, 1fr); }
  .style-text { text-align: center; }
  .photo-card { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .progress span { transition: none; }
}
.download-help { padding-top: 28px; }
