/* Portrait r1 (Vince 2026-10-09): Creating = progress up top, quiet ad below; Proof = tap-to-flip. */

/* ——— Creating (r2): progress centered in a portrait-shaped placeholder ~1/4 down;
   sponsor carousel at its ORIGINAL size/rotation in the lower half ——— */
#s-creating .creating-stack {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; padding: 0 24px 16px; box-sizing: border-box;
}
#s-creating .creating-hero {
  width: min(260px, 70%); aspect-ratio: 4 / 5; margin: 8px auto 0; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 20px 18px; box-sizing: border-box;
  background: rgba(43,42,40,0.04); border: 1.5px solid var(--line); border-radius: 14px;
}
#s-creating .creating-title { font-size: 1.3rem; margin: 0 0 18px; }
#s-creating .create-track { width: 100%; height: 12px; margin: 0 auto; }
#s-creating .creating-status {
  display: flex; flex-direction: column-reverse; align-items: center; justify-content: center; gap: 12px;
  margin: 14px 0 0; font-size: 18px; line-height: 1.35; color: var(--soft);
}
#s-creating .creating-status .spinner { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
#s-creating .creating-ad {
  width: 100%; margin-top: auto; padding-top: 24px;
  display: flex; flex-direction: column; align-items: center;
}
#s-creating.almost-ready .creating-status,
#s-creating.almost-ready .creating-ad { display: none !important; }
#s-creating.almost-ready .creating-hero { background: none; border: 0; aspect-ratio: auto; }

/* ——— Proof: tap-to-flip, full width, natural aspect ——— */
#s-proof .proof-flip-card { width: calc(100% + 24px); margin: 0 -12px 4px; }
#s-proof .pf-flip {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  border-radius: 12px; overflow: hidden; background: #e8e0d4;
  -webkit-tap-highlight-color: transparent; cursor: pointer;
}
#s-proof .pf-flip img { display: block; width: 100%; transition: opacity .45s ease; }
#s-proof .pf-flip .pf-after { position: relative; height: auto; }           /* sets the box: painting's own aspect */
#s-proof .pf-flip .pf-before {
  position: absolute; inset: 0; height: 100%; object-fit: contain; opacity: 0; /* whole photo, never cropped */
}
#s-proof .pf-flip[aria-pressed="false"] .pf-before { opacity: 1; }
#s-proof .pf-flip[aria-pressed="false"] .pf-after { opacity: 0; }
#s-proof .pf-pill {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  background: rgba(243,238,230,.94); color: var(--ink); font-size: 15px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.15); pointer-events: none;
}
#s-proof .pf-seg { display: flex; margin: 12px 0 4px; background: rgba(43,42,40,.07); border-radius: 12px; padding: 4px; }
#s-proof .pf-seg button {
  flex: 1; min-height: 48px; border: 0; background: transparent; font: inherit;
  font-size: 17px; font-weight: 600; color: var(--soft); border-radius: 9px;
}
#s-proof .pf-seg button.on { background: #FFFCFA; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
@media (prefers-reduced-motion: reduce) { #s-proof .pf-flip img { transition: none; } }

/* ——— Creating r3 (Vince 2026-10-10) ———
   1. No frame/box: same invisible 4:5 placeholder geometry (title/bar/status stay ~1/4 down),
      sitting directly on the cream background.
   2. Sponsor cards = FIRST iteration (v1/app-flow, booth-e2e, live pre-portrait-r1): the card
      list was a shrink-to-fit flex item, so .wait-card (calc(100% - 48px), max 300, min-h 240,
      padding 28/22/24, 72px logo, 16.8/14.4px type) sized to its content. Reproduce that context. */
#s-creating .creating-hero { background: none; border-color: transparent; }
#s-creating .creating-ad #wait-cards { width: fit-content; max-width: 100%; }

/* ——— Creating r4 (Vince 2026-10-10) ———
   1. Status words removed; the status box keeps its old height so title, bar and spinner don't move.
   2. Sponsor card fills 77% of the bottom half by area: 87.7% × 87.7% of the region below the
      screen midpoint (full screen height, nav area included), centered. Fixed size for every card;
      logo and type scale with the card (container units). "Partner offers" label sits in the gap
      above the card, dots in the gap below. */
/* .creating-ad is positioned against #phone (the full-height screen shell). Type and logo scale
   with the card height (43.85dvh = 87.7% of half the screen); side padding scales with its width. */
#s-creating .creating-status { height: 80.6px; flex-direction: column-reverse; justify-content: flex-start; }
#s-creating .creating-ad {
  position: absolute; left: 0; right: 0; top: 50%; height: 50%;
  margin: 0; padding: 0; z-index: 1; pointer-events: none;
}
#s-creating .creating-ad #wait-cards {
  position: absolute; left: 6.15%; top: 6.15%; width: 87.7%; height: 87.7%; max-width: none;
}
#s-creating .creating-ad .wait-card {
  width: 100%; height: 100%; max-width: none; min-height: 0; margin: 0; box-sizing: border-box;
  border-radius: 22px; padding: 3.5dvh 7% 3.07dvh; gap: 1.93dvh;
}
#s-creating .creating-ad .wait-card .logo-circle {
  width: 13.16dvh; height: 13.16dvh; font-size: 3.25dvh; flex-shrink: 0;
}
#s-creating .creating-ad .wait-card .sp-name { font-size: max(18px, 3.07dvh); line-height: 1.2; }
#s-creating .creating-ad .wait-card .sp-offer { font-size: max(18px, 2.46dvh); line-height: 1.35; max-width: 86%; }
#s-creating .creating-ad .wait-card--house .logo-circle { font-size: 5.2dvh; }
#s-creating .creating-ad .wait-note {
  position: absolute; left: 0; right: 0; top: 0; height: 6.15%; margin: 0;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
#s-creating .creating-ad .wait-dots {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6.15%; margin: 0; align-items: center;
}
#s-creating .creating-ad .wait-dots span { width: 8px; height: 8px; }

/* Flow rev v2 (Vince 2026-10-12): originals kept; only change — title on one line at 390 and 320. */
#s-creating .creating-title { white-space: nowrap; font-size: min(1.3rem, 6.2vw); }

/* Flow rev v4 (Vince 2026-10-12): narrow screens — title + progress bar sit at the same height as 390
   (hero height locked to the 390 value: 70% of 342px × 5/4 = 299px), and the framed ad has no card
   outline under the frame (card shrinks to the frame's 342:370 shape, cream only inside the frame). */
#s-creating .creating-hero { height: 299px; aspect-ratio: auto; }
#s-creating .creating-ad #wait-cards { display: flex; align-items: center; justify-content: center; }
#s-creating .creating-ad .wait-card--framed.visible {
  width: auto; height: auto; max-width: 100%; max-height: 100%; aspect-ratio: 342 / 370;
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
@supports (width: 1cqw) { #s-creating .creating-ad #wait-cards { container-type: size; }
  #s-creating .creating-ad .wait-card--framed.visible { width: min(100cqw, calc(100cqh * 342 / 370)); } }

/* 2026-10-15 deploy candidate: very short phones (≤640px tall, e.g. 320×568) — the half-screen ad region
   starts above the spinner, so drop the spinner there (the progress bar still shows progress). */
@media (max-height: 640px) { #s-creating .creating-status .spinner { visibility: hidden; } }

/* 2026-10-16 launch (Trace Creek live card): on short phones (≤640px tall, e.g. 320×568) a two-line sponsor name
   plus a three-line offer spilled out of the frame. ONE rule for EVERY card (real and "Partner with Us" alike, same
   form): smaller circle, tighter gaps, lines use the frame's full inner width. Type stays at 18px. */
@media (max-height: 640px) {
  #s-creating .creating-ad .wait-card { padding: 2.6dvh 5% 2.2dvh; gap: 1dvh; }
  #s-creating .creating-ad .wait-card .logo-circle { width: 9.5dvh; height: 9.5dvh; font-size: 2.6dvh; }
  #s-creating .creating-ad .wait-card--house .logo-circle { font-size: 4dvh; }
  #s-creating .creating-ad .wait-card .sp-name, #s-creating .creating-ad .wait-card .sp-offer { max-width: 100%; line-height: 1.18; }
}
