/* ============================================================
   PICZZLE — style.css  (clean rebuild, no legacy)
   Canva editorial design system
   ============================================================ */

/* ── 1. TOKENS ── */
:root {
  --bg:      #F2EDE8;
  --surface: #FFFFFF;
  --text:    #1A1A1A;
  --red:     #8894b7;
  --red-h:   #6b7a9e;
  --muted:   #8A8478;
  --border:  #E0DAD2;
  --overlay: rgba(26,26,26,0.05);

  --f-display: 'Bebas Neue', sans-serif;
  --f-serif:   'Playfair Display', serif;
  --f-body:    'Montserrat', sans-serif;
}

/* ── 2. RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #D8D2CC;
  font-family: var(--f-body);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── 3. APP SHELL ── */
#app {
  width: 390px;
  height: 853px;
  margin: 0 auto;
  background: var(--bg);
  background-image:
    linear-gradient(var(--overlay) 1px, transparent 1px),
    linear-gradient(90deg, var(--overlay) 1px, transparent 1px);
  background-size: 28px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
}
@media (max-width: 420px) { #app { width: 100%; height: 100dvh; } }

.app-bar-bottom {
  width: 100%; height: 44px;
  background: var(--red);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.bar-label {
  font-size: 0.52rem; font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 3px; text-transform: uppercase;
}

/* ── 4. SCREENS ── */
.screen {
  display: none; flex-direction: column;
  flex: 1; overflow-y: auto; overflow-x: hidden;
  background: transparent;
  position: relative; z-index: 1;
  animation: screenIn 0.28s ease both;
}
.screen.active { display: flex; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 5. PAGE CONTAINER — the new layout system ── */
.page-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
  gap: 16px;
}

/* Vertically centered (event code, guestbook, pricing) */
.page-container-center {
  justify-content: center;
}

/* Landing: centered with balanced spacing */
.page-container-landing {
  justify-content: center;
  gap: 32px;
}
.page-container-landing .content-block {
  gap: 10px;
}

/* ── 6. CONTENT BLOCK — text + preview, max 260px, centred ── */
.content-block {
  max-width: 260px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* ── 7. TYPOGRAPHY ── */
.eyebrow {
  font-size: 0.55rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--red);
}

.title {
  font-family: var(--f-serif);
  font-style: normal; font-weight: 700;
  font-size: 22px; line-height: 1.1;
  letter-spacing: -0.3px;
  color: var(--text);
}

.subtitle {
  font-size: 13px; line-height: 1.5;
  color: var(--muted); opacity: 0.85;
}

.rule {
  width: 40px; height: 2px;
  background: var(--red);
  margin: 2px auto;
}

.caption {
  font-size: 0.6rem; color: var(--muted);
  letter-spacing: 0.5px; text-align: center;
  margin-top: 4px;
}

.powered-by-line {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 400;
  color: #999;
  opacity: 0.7;
  letter-spacing: 0.08em;
  text-align: center;
  margin-top: 6px;
}

.logo-bounce { animation: logoBounce 0.65s cubic-bezier(0.175,0.885,0.32,1.275) both; }
@keyframes logoBounce {
  0%  { opacity:0; transform:scale(0.78); }
  70% { transform:scale(1.06); }
  100%{ opacity:1; transform:scale(1); }
}

/* ── 8. BUTTONS ── */
.btn-primary {
  display: block; width: 100%;
  padding: 15px 20px;
  background: var(--red); color: #fff;
  font-family: var(--f-body); font-size: 0.7rem;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  border: none; cursor: pointer; text-align: center;
  transition: background 0.18s, transform 0.15s;
}
.btn-primary:hover  { background: var(--red-h); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  display: block; width: 100%;
  padding: 14px 20px;
  background: transparent; color: var(--text);
  font-family: var(--f-body); font-size: 0.7rem;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  border: 1.5px solid var(--text); cursor: pointer; text-align: center;
  transition: all 0.18s;
}
.btn-secondary:hover { background: var(--text); color: #fff; }
.btn-secondary:active { transform: scale(0.97); }

.btn-ghost {
  display: block; width: 100%;
  padding: 10px 20px;
  background: transparent; color: var(--muted);
  font-family: var(--f-body); font-size: 0.62rem;
  font-weight: 600; letter-spacing: 0.5px;
  border: none; cursor: pointer; text-align: center;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }

.btn-anim { animation: btnIn 0.38s ease both; }
.btn-anim:nth-child(2) { animation-delay: 0.07s; }
@keyframes btnIn {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Landing page animations ── */
.landing-fadein {
  opacity: 0;
  animation: landingFade 0.55s ease both;
}
@keyframes landingFade {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Rule expands from centre on load */
.landing-rule {
  transform-origin: center;
  animation: ruleExpand 0.5s cubic-bezier(0.25,0.46,0.45,0.94) 0.15s both;
}
@keyframes ruleExpand {
  from { transform:scaleX(0); opacity:0; }
  to   { transform:scaleX(1); opacity:1; }
}

/* Subtle button hover lift — landing page only */
#step1 .btn-primary:hover  { transform:translateY(-2px); box-shadow:0 6px 18px rgba(200,16,46,0.25); }
#step1 .btn-secondary:hover { transform:translateY(-2px); }
#step1 .btn-primary,
#step1 .btn-secondary { transition: transform 0.18s ease, box-shadow 0.18s ease; }

/* ── 9. CTA GROUP ── */
.cta-group {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  width: 100%; margin-top: 16px;
}

/* ── 10. FIELDS ── */
.field {
  display: block; width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--f-body); font-size: 0.88rem;
  color: var(--text); outline: none;
  transition: border-color 0.2s;
  margin-top: 4px;
}
.field:focus { border-color: var(--text); }
.field-center { text-align: center; }
.field-upper  { text-transform: uppercase; letter-spacing: 2px; }
.field-area   { resize: vertical; min-height: 90px; }

.field-error {
  padding: 10px 14px;
  background: #fff0f0; border: 1px solid var(--red);
  font-size: 0.72rem; font-weight: 700; color: var(--red);
  text-align: center; margin-top: 4px;
}
.field-error.hidden { display: none; }

/* ── 11. CAMERA SCREEN ── */
.screen-cam { padding: 0; overflow: hidden; gap: 0; }

.cam-topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--text); flex-shrink: 0;
}
.cam-brand {
  font-family: var(--f-display);
  font-size: 1.3rem; color: #fff; letter-spacing: 2px;
}
.cam-controls-top { display: flex; align-items: center; gap: 10px; }

.cam-dots {
  display: flex; align-items: center; gap: 7px;
}
.cam-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.55);
  transition: all 0.25s ease;
  position: relative;
}
.cam-dot.taken {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.2);
  box-shadow: 0 0 6px rgba(200,16,46,0.6);
}
.cam-dot.pulse {
  animation: dotPulse 0.35s ease;
}
@keyframes dotPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.7); }
  100% { transform: scale(1.2); }
}

/* ── Shot Select Screen ─────────────────────────── */
.shot-select-grid {
  display: flex; gap: 16px; justify-content: center;
  width: 100%; padding: 0 4px;
}
.shot-select-card {
  flex: 1; max-width: 160px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.shot-select-card.selected {
  border-color: var(--red);
  box-shadow: 0 4px 18px rgba(200,16,46,0.14);
}
.shot-visual {
  display: flex; justify-content: center;
  margin-bottom: 12px;
}
.shot-frame-single {
  width: 52px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 4px;
  display: flex; flex-direction: column; gap: 3px;
}
.shot-frame-single .shot-frame-img {
  width: 100%; aspect-ratio: 3/4;
  background: var(--muted);
  border-radius: 2px;
  opacity: 0.3;
}
.shot-frame-strip {
  width: 52px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.shot-frame-strip .shot-frame-img {
  width: 100%; aspect-ratio: 4/3;
  background: var(--muted);
  border-radius: 2px;
  opacity: 0.3;
}
.shot-select-card.selected .shot-frame-img {
  background: var(--red);
  opacity: 0.5;
}
.shot-select-name {
  font-size: 0.78rem; font-weight: 800;
  color: var(--text); margin-bottom: 3px;
  letter-spacing: 0.3px;
}
.shot-select-desc {
  font-size: 0.60rem; color: var(--muted);
  line-height: 1.4;
}

.shot-toggle { display: flex; gap: 4px; }
.shot-btn {
  padding: 4px 10px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.65);
  font-family: var(--f-body); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer; transition: all 0.15s;
}
.shot-btn.active { background: #f5c74d; border-color: #f5c74d; color: #7a5e0a; }

.cam-skip-btn {
  display: block; width: 100%;
  flex-shrink: 0;
  padding: 4px 0 10px;
  margin-top: 6px;
  background: none; border: none;
  font-family: var(--f-body); font-size: 0.58rem; font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted); text-align: center;
  cursor: pointer;
  transition: color 0.15s;
}
.cam-skip-btn:hover { color: var(--text); }

.prompt-box {
  background: var(--surface);
  border-left: 3px solid var(--red);
  margin: 8px 14px 2px;
  padding: 10px 14px;
  font-family: var(--f-body);
  font-size: 0.82rem; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
  line-height: 1.4;
  flex-shrink: 0;
}
.prompt-box.hidden { display: none; }

.cam-loader {
  position: absolute; inset: 0;
  background: rgba(242,237,232,0.93);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; z-index: 40;
}
.cam-loader.hidden { display: none; }
.loader-ring {
  width: 30px; height: 30px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-label {
  font-size: 0.68rem; font-weight: 700;
  color: var(--muted); letter-spacing: 1px; text-transform: uppercase;
}

/* ── 12. CAMERA VIEWPORT — mode-driven aspect ratio ── */
.camera-wrap {
  position: relative;
  background: #111;
  flex-shrink: 0;
  overflow: hidden;
  align-self: center;
  border-top: 4px solid var(--surface);
  border-bottom: 4px solid var(--surface);
}

/* Viewfinder corner marks — editorial / SLR feel */
/* Viewfinder: all 4 corners via CSS gradients — no extra HTML */
.camera-wrap::before,
.camera-wrap::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none; z-index: 10;
}
.camera-wrap::before {
  background:
    linear-gradient(to right,  rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) 10px 10px / 18px 18px no-repeat,
    linear-gradient(to bottom, rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) 10px 10px / 18px 18px no-repeat,
    linear-gradient(to left,   rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) right 10px top 10px / 18px 18px no-repeat,
    linear-gradient(to bottom, rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) right 10px top 10px / 18px 18px no-repeat;
}
.camera-wrap::after {
  background:
    linear-gradient(to right,  rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) 10px bottom 10px / 18px 18px no-repeat,
    linear-gradient(to top,    rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) 10px bottom 10px / 18px 18px no-repeat,
    linear-gradient(to left,   rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) right 10px bottom 10px / 18px 18px no-repeat,
    linear-gradient(to top,    rgba(255,255,255,0.45) 0, rgba(255,255,255,0.45) 1.5px, transparent 1.5px) right 10px bottom 10px / 18px 18px no-repeat;
}

/* 1-shot: portrait 3:4 */
.camera-wrap.single {
  aspect-ratio: 3 / 4;
  /* portrait: width limited, height fills available space */
  width: 75%;        /* narrower so 3:4 shows cleanly */
  align-self: center;
  flex-shrink: 1;
}

/* 4-shot: landscape 4:3 */
.camera-wrap.four {
  aspect-ratio: 4 / 3;
  width: 84%;
  align-self: center;
}

#video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; pointer-events: none; /* hidden — liveCanvas renders on top */
}

.live-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

.countdown-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.58);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 20;
}
.countdown-overlay.hidden { display: none; }

.countdown-num {
  font-family: var(--f-display);
  font-size: 8rem; color: #fff; line-height: 1;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
  animation: countPop 0.3s ease both;
}
@keyframes countPop {
  from { transform: scale(1.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}



.flash-reaction {
  position: absolute; bottom: 68px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.72); color: #fff;
  padding: 6px 16px;
  font-size: 0.7rem; font-weight: 700;
  white-space: nowrap; z-index: 25;
  animation: reactionPop 2s ease forwards;
}
.flash-reaction.hidden { display: none; }
@keyframes reactionPop {
  0%  { opacity:0; transform:translateX(-50%) translateY(8px); }
  15% { opacity:1; transform:translateX(-50%) translateY(0); }
  75% { opacity:1; }
  100%{ opacity:0; transform:translateX(-50%) translateY(-6px); }
}

/* ── Screen flash — Korean photobooth lighting effect ── */
.screen-flash {
  position: absolute; inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 30; pointer-events: none;
  transition: opacity 0s;
}
.screen-flash-peak {
  opacity: 0.72;
  transition: opacity 0.04s ease-in;
}
.screen-flash-fade {
  opacity: 0;
  transition: opacity 0.38s ease-out;
}

/* Legacy — still works if called directly */
.shutter-flash {
  position: absolute; inset: 0;
  background: #fff; z-index: 30; pointer-events: none;
  animation: flashOut 0.35s ease forwards;
}
@keyframes flashOut { 0% { opacity:0.85; } 100% { opacity:0; } }

.flip-btn {
  position: absolute; right: 12px; bottom: 12px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%; color: #fff; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.flip-btn.spinning { animation: flipSpin 0.4s ease; }
@keyframes flipSpin { from { transform:rotateY(0); } to { transform:rotateY(360deg); } }

.flash-btn {
  position: absolute; right: 56px; bottom: 12px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%; color: #fff; font-size: 0.95rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 5; transition: background 0.2s;
}
.flash-btn.hidden { display: none; }
.flash-btn.on {
  background: rgba(255, 220, 50, 0.85);
  border-color: rgba(255,220,50,0.9);
  color: #1a1a1a;
}

.shutter-btn {
  position: absolute; bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 58px; height: 58px;
  background: #fff; border-radius: 50%;
  border: 3px solid rgba(200,16,46,0.22);
  box-shadow: 0 2px 12px rgba(0,0,0,0.28);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 5; transition: transform 0.1s;
}
.shutter-btn:active { transform: translateX(-50%) scale(0.91); }
.shutter-inner {
  width: 40px; height: 40px;
  background: var(--red); border-radius: 50%;
}
.shutter-btn.ready-pulse { animation: shutterPulse 2s ease-in-out infinite; }
@keyframes shutterPulse {
  0%,100% { box-shadow: 0 2px 12px rgba(0,0,0,0.28); }
  50%      { box-shadow: 0 0 0 8px rgba(200,16,46,0.16), 0 2px 12px rgba(0,0,0,0.28); }
}

/* ── 13. FILTER BAR ── */
.filter-bar {
  display: flex; overflow-x: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  flex: 0 0 auto;
  padding: 9px 18px;
  background: transparent;
  border: none; border-right: 1px solid var(--border);
  font-family: var(--f-body); font-size: 0.65rem; font-weight: 600;
  color: var(--muted); letter-spacing: 0.5px; cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:last-child { border-right: none; }
.filter-btn.active, .filter-btn:hover {
  color: var(--red); border-bottom: 2px solid var(--red);
}

/* ── 14. CONSENT OVERLAY ── */
.consent-overlay {
  position: absolute; inset: 0;
  background: rgba(26,26,26,0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
  animation: fadeIn 0.28s ease both;
}
.consent-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.consent-card {
  background: var(--surface);
  padding: 28px 22px;
  max-width: 300px; width: 100%;
  text-align: center; display: flex;
  flex-direction: column; gap: 12px;
  animation: cardRise 0.32s cubic-bezier(0.175,0.885,0.32,1.275) both;
}
@keyframes cardRise {
  from { opacity:0; transform:translateY(14px) scale(0.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.consent-title {
  font-family: var(--f-serif); font-style: normal;
  font-size: 1.35rem; font-weight: 900; color: var(--text);
}
.consent-body {
  font-size: 0.76rem; color: var(--muted); line-height: 1.6;
}
.consent-privacy {
  font-size: 0.58rem; color: var(--muted); line-height: 1.5;
}
.consent-link { color: var(--red); font-weight: 700; text-decoration: none; }

/* ── 15. PREVIEW CONTAINER ── */
.preview-container {
  position: relative;
  width: 100%;
  display: flex; justify-content: center;
}

/* ── 16. FINAL SCREEN ── */
.screen-final {
  overflow-y: auto;
}

.screen-final .page-container {
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 22px 14px;
}

.screen-final .content-block {
  max-width: 100%;
  gap: 5px;
  padding: 0;
}

/* More breathing room between heading and photo */
.screen-final #finalPhotoWrap {
  margin-top: 12px;
}
/* Title on final page — balanced line breaks, tighter and more elegant */
.screen-final .title {
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -0.4px;
  text-wrap: balance;       /* browser balances break points naturally */
  max-width: 320px;
  margin: 0 auto;
}
/* Subtitle — centered, breathable */
.screen-final .subtitle {
  font-size: 12px;
  line-height: 1.62;
  max-width: 280px;
  margin: 0 auto;
  opacity: 0.80;
}

.screen-final .cta-group {
  margin-top: 8px;
}

/* floating heart deco */
.deco-heart {
  position: absolute; top: -6px; right: -8px;
  font-size: 0.95rem; color: var(--red);
  opacity: 0.7; pointer-events: none;
  animation: floatHeart 3s ease-in-out infinite;
}
@keyframes floatHeart {
  0%,100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-5px) rotate(-8deg); }
}

/* ── 17. POLAROID LAYOUT (1-shot preview) ── */
/* ── FRAME WRAPPER — photo + frame overlay system ── */
/* Used by both 1-shot and 4-shot previews */
.frame-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* photo element inside frame-wrapper */
.frame-wrapper .photo {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* frame PNG — always last, covers entire wrapper */
.frame-wrapper .frame {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
}

/* ── 1-SHOT PREVIEW (portrait 3:4) ── */
.preview-1shot {
  max-width: 200px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  background: var(--surface);
}
.preview-1shot .photo {
  aspect-ratio: 3 / 4;
}

/* ── Frame overlay — 4-shot: contain so 1-shot frames don't stretch ── */
.preview-4shot .frame {
  object-fit: contain;
  object-position: bottom;
}

/* ── 4-SHOT PREVIEW (landscape 4:3, stacked flush) ── */
.preview-4shot {
  max-width: 260px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  background: var(--surface);
}

/* 4 photos stacked with no gaps — frame PNG controls visual design */
.strip-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
}
.strip-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* ── 19. FINAL CTAs ── */
.cta-primary-wrap, .cta-secondary-wrap {
  position: relative; width: 100%;
}

.sparkle {
  position: absolute; color: var(--red);
  font-size: 0.6rem; opacity: 0.65; pointer-events: none;
  animation: sparklePop 2.4s ease-in-out infinite;
}
.sp-tl { top:50%; left:-16px;  transform:translateY(-50%); animation-delay:0s; }
.sp-tr { top:50%; right:-16px; transform:translateY(-50%); animation-delay:0.4s; }
.sp-bl { top:50%; left:-16px;  transform:translateY(-50%); animation-delay:0.2s; }
.sp-br { top:50%; right:-16px; transform:translateY(-50%); animation-delay:0.6s; }
@keyframes sparklePop {
  0%,100% { opacity:0.4; transform:translateY(-50%) scale(0.85); }
  50%     { opacity:0.85; transform:translateY(-50%) scale(1.15); }
}

.cta-arrow { font-size: 0.58rem; color: var(--red); opacity: 0.6; margin: 4px 0; display: block; }

.btn-final-primary {
  display: block; width: 100%;
  padding: 15px 20px;
  background: var(--red); color: #fff;
  font-family: var(--f-body); font-size: 0.68rem; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  white-space: nowrap;
  border: none; cursor: pointer; text-align: center;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(200,16,46,0.26);
  transition: background 0.18s, transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s;
}
.btn-final-primary:hover {
  background: var(--red-h); transform: scale(1.03);
  box-shadow: 0 8px 26px rgba(200,16,46,0.36);
}
.btn-final-primary:active { transform: scale(0.97); }

.btn-final-secondary {
  display: block; width: 100%;
  padding: 14px 20px; margin-top: 7px;
  background: var(--surface); color: var(--muted);
  font-family: var(--f-body); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.5px; text-transform: none;
  border: 1.5px solid var(--border);
  border-radius: 50px; cursor: pointer; text-align: center;
  transition: all 0.15s ease;
}
.btn-final-secondary:hover  { border-color: var(--text); color: var(--text); }
.btn-final-secondary:active { background: var(--border); transform: scale(0.98); }

.event-thank-you {
  font-size: 0.78rem; color: var(--muted);
  text-align: center; font-style: italic;
  padding: 6px 20px; line-height: 1.5;
}

/* ── Trust row on landing ── */
.trust-row {
  display: flex; align-items: center; gap: 8px;
  justify-content: center; margin-top: 6px;
}
.trust-link {
  font-size: 0.68rem; color: var(--muted);
  text-decoration: none; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  transition: color 0.15s;
}
.trust-link:hover { color: var(--text); }
.trust-icon { font-size: 0.72rem; }
.trust-sep { color: var(--border); font-size: 0.65rem; }

.browser-hint {
  font-size: 0.62rem; color: var(--muted);
  text-align: center; margin-top: -8px; margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.save-hint {
  font-size: 0.72rem; font-weight: 700;
  color: var(--muted); text-align: center;
  letter-spacing: 0.2px; margin-bottom: 6px;
  animation: saveHintPulse 2.5s ease-in-out infinite;
}
@keyframes saveHintPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

.growth-copy {
  font-size: 0.58rem; color: var(--muted);
  text-align: center; line-height: 1.65;
  max-width: 260px; margin: 7px auto 0;
  opacity: 0.72;
  letter-spacing: 0.2px;
}
.growth-tag { color: var(--red); font-weight: 700; }

/* ── 20. SAVING ROW ── */
.saving-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.65rem; font-weight: 700; color: var(--muted);
}
.saving-row.hidden { display: none; }
.saving-dot {
  width: 6px; height: 6px; background: var(--red);
  border-radius: 50%; animation: savePulse 1s ease-in-out infinite;
}
@keyframes savePulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:0.35; transform:scale(0.75); }
}

/* ── 21. PRICING ── */
.plan-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 18px; margin-bottom: 12px; position: relative;
  text-align: left;
}
.plan-card-featured { border-color: var(--red); border-width: 2px; }
.plan-badge {
  position: absolute; top: -11px; right: 16px;
  background: var(--red); color: #fff;
  font-size: 0.55rem; font-weight: 900;
  letter-spacing: 2px; text-transform: uppercase; padding: 3px 10px;
}
.plan-name { font-family: var(--f-serif); font-style: normal; font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.plan-desc { font-size: 0.7rem; color: var(--muted); margin-bottom: 8px; }
.plan-features {
  list-style: none; text-align: left;
  margin: 10px 0 14px; display: flex; flex-direction: column; gap: 6px;
}
.plan-features li {
  font-size: 0.72rem; color: var(--muted); padding-left: 14px; position: relative;
}
.plan-features li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--red); font-weight: 700;
}
.plan-price { font-family: var(--f-serif); font-size: 1.6rem; font-weight: 900; margin-bottom: 10px; }

/* ── 22. CONFETTI ── */
.confetti-host {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden; z-index: 50;
}
.confetti-piece {
  position: absolute; width: 7px; height: 7px; border-radius: 1px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform:translateY(-20px) rotate(0deg); opacity:1; }
  100% { transform:translateY(900px) rotate(720deg); opacity:0; }
}

/* ── 23. TOAST ── */
.toast {
  position: fixed; bottom: 56px; left: 50%;
  transform: translateX(-50%);
  background: var(--text); color: #fff;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px;
  padding: 9px 18px; opacity: 0; z-index: 1000; white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(-4px); }

/* ── 24. EVENT BG LAYER ── */
#eventBgLayer {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  pointer-events: none; opacity: 0;
  transition: opacity 0.6s ease;
}

/* ── 25. UTILITY ── */
/* ── Final page message card ── */
.final-msg-card {
  background: var(--surface);
  border-left: 3px solid var(--red);
  padding: 13px 15px;
  margin: 3px 0;
  text-align: left;
  width: 100%;
}
.final-msg-name {
  font-family: var(--f-serif);
  font-size: 0.80rem; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
  letter-spacing: -0.2px;
}
.final-msg-text {
  font-size: 0.73rem; color: var(--muted);
  line-height: 1.62; font-style: italic;
}

/* ── Guestbook notice ── */
.guestbook-notice {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1.5px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 10px; padding: 11px 14px;
  margin: 2px 0 6px;
  text-align: left;
}
.guestbook-notice-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.guestbook-notice p {
  font-size: 0.72rem; color: var(--muted);
  line-height: 1.5; margin: 0;
}
.guestbook-notice strong { color: var(--text); font-weight: 700; }

/* ── Pricing ── */
.plan-price-row {
  display: flex; align-items: baseline; gap: 10px;
  margin: 12px 0;
}
.book-btns {
  display: flex; flex-direction: column; gap: 12px; margin-top: 8px;
}
.book-btns .btn-primary,
.book-btns .btn-secondary { width: 100%; }

.promo-note {
  font-size: 0.72rem; font-weight: 700;
  color: var(--red); text-align: left;
  margin: -4px 0 8px; letter-spacing: 0.2px;
}
.promo-note.hidden { display: none; }

.plan-price-orig {
  font-size: 1.1rem; color: var(--muted);
  text-decoration: line-through;
}
.plan-price-orig.hidden { display: none; }

/* ── Take another — step 7 ── */
.btn-take-another {
  width: 100%;
  font-size: 0.78rem; font-weight: 700;
  color: var(--muted); letter-spacing: 0.5px;
  padding: 14px 20px; border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: all 0.15s ease; cursor: pointer;
}
.btn-take-another:hover  { border-color: var(--text); color: var(--text); }
.btn-take-another:active { background: var(--border); transform: scale(0.98); }

.hidden { display: none !important; }

/* ── FRAME WRAPPER — base for both 1-shot and 4-shot ── */
/* Photo underneath, frame PNG on top, perfectly aligned */
.frame-wrapper {
  position: relative;
  width: 100%;
}

/* photo inside frame-wrapper (1-shot) */
.frame-wrapper .photo {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* frame PNG — always on top, same size as content */
.frame-wrapper .frame {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
}

/* ── 1-SHOT PREVIEW ── */
.preview-1shot {
  max-width: 200px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
}
.preview-1shot .photo {
  aspect-ratio: 3 / 4;   /* portrait */
  object-fit: cover;
}

/* ── 4-SHOT PREVIEW ── */
.preview-4shot {
  max-width: 260px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
}

/* Strip of 4 photos stacked flush, no gaps, no card padding */
.strip-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
}

/* Each photo in the 4-shot strip */
.strip-photo {
  width: 100%;
  aspect-ratio: 4 / 3;   /* landscape — matches camera capture */
  object-fit: cover;
  display: block;
}
/* ── Soft screen flash — Korean photobooth lighting effect ── */
.screen-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 30;
  pointer-events: none;
  /* Instant rise, slow fade — feels like a real flash unit */
  transition: opacity 0s;
}

/* Peak: full brightness burst */
.screen-flash-peak {
  opacity: 0.72;
  transition: opacity 0.04s ease-in;
}

/* Fade out after capture */
.screen-flash-fade {
  opacity: 0;
  transition: opacity 0.38s ease-out;
}

/* Legacy shutter-flash kept for compatibility */
.shutter-flash {
  position: absolute; inset: 0;
  background: #fff; z-index: 30; pointer-events: none;
  animation: flashOut 0.35s ease forwards;
}
@keyframes flashOut { 0% { opacity:0.85; } 100% { opacity:0; } }