/* ==========================================================================
   COURTYARD MARRIOTT 1ST BIRTHDAY PHOTO BOOTH
   Luxury Hotel Theme Style Sheet
   Targeting Safari on iPad Fullscreen (100dvh, Touch-optimized, 4x6 Print)
   ========================================================================== */

:root {
  /* Color Palette: Luxury Hotel Warm Cream & Muted Gold */
  --bg-cream: #F9F6F0;
  --bg-cream-dark: #F2ECE1;
  --bg-sand: #EFE9DC;
  --text-charcoal: #2A2A2A;
  --text-muted: #666056;
  --accent-gold: #C5A880;
  --accent-gold-dark: #A3845B;
  --accent-gold-light: #E8DAC6;
  --gold-glow: rgba(197, 168, 128, 0.35);
  --card-white: #FFFFFF;
  --border-gold: rgba(197, 168, 128, 0.4);
  
  /* Fonts */
  --font-serif: 'Cormorant Garamond', 'Cinzel', 'Times New Roman', serif;
  --font-sans: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Animation Timings */
  --ease-lux: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-cream);
  color: var(--text-charcoal);
  font-family: var(--font-sans);
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}

/* Main Container */
#app {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: radial-gradient(circle at 50% 30%, #FFFFFF 0%, var(--bg-cream) 70%, var(--bg-cream-dark) 100%);
}

/* Header */
.app-header {
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid rgba(197, 168, 128, 0.25);
  background: rgba(249, 246, 240, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  color: var(--accent-gold-dark);
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 600;
}

.brand-by {
  font-size: 13.2px;
  letter-spacing: 1.5px;
  opacity: 0.6;
}

.marriott-symbol {
  font-size: 16px;
  color: var(--accent-gold);
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold-dark);
  cursor: pointer;
  transition: all 0.3s var(--ease-lux);
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--accent-gold-light);
}

/* Screens Layout Engine */
.screen {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  height: calc(100dvh - 60px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-lux), transform 0.5s var(--ease-lux);
  transform: scale(0.98);
  display: flex;
  flex-direction: column;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

/* ==========================================================================
   SCREEN 1: STANDBY (대기 화면)
   ========================================================================== */
#screen-standby {
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.standby-content {
  max-width: 680px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInStandby 1.2s var(--ease-lux);
}

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

.decorative-crest {
  margin-bottom: 20px;
  animation: floatCrest 4s ease-in-out infinite alternate;
}

@keyframes floatCrest {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.event-subtitle {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--accent-gold-dark);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.event-title {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--text-charcoal);
  letter-spacing: 1px;
  margin-bottom: 12px;
  line-height: 1.15;
}

.baby-name-banner {
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 50px;
  font-weight: 500;
}

/* COLLABO PARTY lockup (vendor brand) — big on standby, .sm elsewhere */
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--accent-gold-dark);
  font-family: var(--font-serif);
}

.brand-lockup-by {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 4px;
  opacity: 0.75;
}

.brand-lockup-by::before,
.brand-lockup-by::after {
  content: '';
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.brand-lockup-name {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 8px;
  line-height: 1.1;
}

.brand-lockup.sm {
  gap: 2px;
  margin: 6px 0 14px;
}

.brand-lockup.sm .brand-lockup-by {
  font-size: 10px;
  letter-spacing: 3px;
}

.brand-lockup.sm .brand-lockup-by::before,
.brand-lockup.sm .brand-lockup-by::after {
  width: 20px;
}

.brand-lockup.sm .brand-lockup-name {
  font-size: 22px;
  letter-spacing: 5px;
}

/* Luxury Touch Button */
.touch-trigger-container {
  width: 100%;
  margin-bottom: 40px;
}

.print-time-notice {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-charcoal);
  opacity: 0.6;
}

/* Wide start button */
.luxury-touch-btn {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #FAF7F2 0%, #EFE5D5 100%);
  border: 1px solid var(--accent-gold);
  border-radius: 60px;
  padding: 28px 48px;
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(197, 168, 128, 0.25), 0 5px 15px rgba(0, 0, 0, 0.04);
  transition: all 0.4s var(--ease-lux);
  overflow: hidden;
}

.test-mode-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.test-mode-btn {
  background: rgba(197, 168, 128, 0.15);
  border: 1px dashed var(--accent-gold);
  border-radius: 30px;
  padding: 10px 20px;
  color: var(--accent-gold-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.test-mode-btn.direct-print-btn {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(170, 130, 42, 0.3));
  border: 1px solid var(--accent-gold-dark);
  color: #5C4610;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(197, 168, 128, 0.25);
}

.test-mode-btn:active {
  background: var(--accent-gold-light);
  transform: scale(0.96);
}

.luxury-touch-btn:active {
  transform: scale(0.96);
  box-shadow: 0 8px 20px rgba(197, 168, 128, 0.3);
}

.btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-charcoal);
}

.btn-inner svg {
  color: var(--accent-gold-dark);
  margin-bottom: 4px;
}

.btn-text-kr {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.btn-text-en {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--accent-gold-dark);
  text-transform: uppercase;
}

.btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(197, 168, 128, 0.2);
  transform: translate(-50%, -50%) scale(0.8);
  animation: pulseRipple 2.5s infinite var(--ease-lux);
  pointer-events: none;
}

@keyframes pulseRipple {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

.standby-footer-info {
  font-size: 14px;
  color: var(--accent-gold-dark);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   SCREEN 2: LIVE CAPTURE (촬영 화면)
   ========================================================================== */
#screen-capture {
  padding: 20px 30px;
  gap: 20px;
  align-items: center;
}

.viewfinder-container {
  position: relative;
  width: 100%;
  max-width: 820px;
  flex: 1;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--accent-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
}

/* Same shape as a photo cell on the print (app.js cellW 375 x cellH 417),
   so the live view shows exactly what gets printed. */
/* Live white-balance layer: multiply by per-channel gains (set from app.js) */
.wb-tint {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: background-color 0.4s;
}

.viewfinder-crop {
  position: relative;
  width: min(100cqw, 100cqh * 375 / 417);
  aspect-ratio: 375 / 417;
  overflow: hidden;
}

#camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror view for natural front selfie feel */
}

/* Viewfinder Overlay Grid */
.viewfinder-grid-overlay {
  position: absolute;
  inset: 20px;
  pointer-events: none;
}

.corner-bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(255, 255, 255, 0.7);
  border-style: solid;
}

.corner-bracket.top-left { top: 0; left: 0; border-width: 2px 0 0 2px; }
.corner-bracket.top-right { top: 0; right: 0; border-width: 2px 2px 0 0; }
.corner-bracket.bottom-left { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.corner-bracket.bottom-right { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* Shot Counter Badge */
.shot-counter-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  color: #FFF;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.shot-counter-badge .divider { opacity: 0.5; margin: 0 2px; }

/* Countdown Overlay */
.countdown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.3s;
}

.countdown-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: 130px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: countPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
}

@keyframes countPop {
  0% { transform: scale(0.6); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.countdown-hint {
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  letter-spacing: 1px;
  margin-top: 10px;
}

/* Flash Animation */
.flash-overlay {
  position: absolute;
  inset: 0;
  background: #FFF;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.flash-overlay.active {
  animation: triggerFlash 0.4s ease-out;
}

@keyframes triggerFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Capture Bottom Bar */
.capture-bottom-bar {
  width: 100%;
  max-width: 820px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-white);
  padding: 14px 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-gold);
}

.thumbnails-track {
  display: flex;
  gap: 12px;
}

.thumb-box {
  width: 54px; /* photo cell shape (375 x 417) */
  height: 60px;
  border-radius: 8px;
  background: var(--bg-cream-dark);
  border: 1.5px dashed var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-box.filled {
  border-style: solid;
  border-color: var(--accent-gold);
}

.thumb-num {
  font-size: 14px;
  color: var(--accent-gold-dark);
  font-weight: 600;
}

.capture-status-text {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   SCREEN 3: PREVIEW & CUSTOMIZE (결과 합성)
   ========================================================================== */
#screen-preview {
  padding: 20px 30px;
}

.preview-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: center;
}

/* Canvas Stage */
.canvas-stage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.canvas-wrapper {
  max-height: calc(100dvh - 120px);
  aspect-ratio: 2 / 3; /* 4x6 ratio */
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: #FFF;
  position: relative;
}

#composite-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Customize Panel */
.customize-panel {
  background: var(--card-white);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--border-gold);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
}

.panel-header h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--text-charcoal);
  margin-bottom: 4px;
}

.panel-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Button Grids */
.filter-options, .layout-options, .theme-options, .frame-select-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.frame-thumb-icon {
  font-size: 16px;
}

.fixed-format-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-cream);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
}

.badge-icon {
  font-size: 24px;
}

.badge-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-info strong {
  font-size: 14px;
  color: var(--text-charcoal);
  font-weight: 600;
}

.badge-info span {
  font-size: 12px;
  color: var(--accent-gold-dark);
}

.style-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-cream);
  border: 1px solid transparent;
  color: var(--text-charcoal);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease-lux);
}

.style-btn:active, .style-btn.active {
  background: var(--card-white);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 15px var(--gold-glow);
  color: var(--accent-gold-dark);
  font-weight: 600;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.natural-swatch { background: linear-gradient(135deg, #ffeedd, #d4a574); }
.bw-swatch { background: linear-gradient(135deg, #ffffff, #222222); }
.warm-swatch { background: linear-gradient(135deg, #fff3e0, #c89650); }

.color-options {
  display: flex;
  gap: 12px;
}

.color-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.color-btn.active {
  transform: scale(1.15);
  border-color: var(--accent-gold-dark);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Actions */
.preview-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 10px;
}

.primary-action-btn {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  color: #FFF;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 25px var(--gold-glow);
  transition: all 0.3s var(--ease-lux);
}

.primary-action-btn:active {
  transform: scale(0.98);
}

.secondary-action-btn {
  background: var(--bg-cream);
  color: var(--text-muted);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.secondary-action-btn:active {
  background: var(--bg-sand);
}

/* ==========================================================================
   SCREEN 4: PRINT & HANDOVER (인쇄 및 완료)
   ========================================================================== */
#screen-print {
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.print-handover-card {
  background: var(--card-white);
  border-radius: 24px;
  border: 1px solid var(--border-gold);
  padding: 36px 40px;
  max-width: 620px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

.seal-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.handover-header h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--text-charcoal);
  margin-bottom: 8px;
}

.guest-message {
  font-size: 15px;
  color: var(--accent-gold-dark);
  line-height: 1.6;
  margin-bottom: 24px;
  background: var(--bg-cream);
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid var(--border-gold);
}

.handover-media {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.handover-media .printed-preview-wrapper {
  margin-bottom: 0;
}

.qr-box {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-code {
  width: 210px;
  height: 210px;
  padding: 8px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-text {
  display: none;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-charcoal);
}

.qr-box[data-state="ready"] .qr-ready,
.qr-box[data-state="loading"] .qr-loading,
.qr-box[data-state="error"] .qr-error {
  display: block;
}

.printed-preview-wrapper {
  width: 280px;
  height: 420px;
  max-width: 80vw;
  max-height: 45vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  margin-bottom: 24px;
  border: 1px solid var(--accent-gold);
}

.printed-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.handover-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.gold-lux-btn {
  background: linear-gradient(135deg, #D4AF37 0%, #AA822A 100%);
  color: #FFF;
  border: none;
  border-radius: 14px;
  padding: 18px;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.35);
  transition: all 0.3s;
}

.gold-lux-btn:active {
  transform: scale(0.97);
}

.gold-lux-btn.sm {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 10px;
}

.outline-lux-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.auto-reset-bar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auto-reset-info {
  font-size: 13px;
  color: var(--text-muted);
}

.auto-reset-info strong {
  color: var(--accent-gold-dark);
}

.reset-progress-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-cream-dark);
  border-radius: 3px;
  overflow: hidden;
}

.reset-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--accent-gold);
  transition: width 1s linear;
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 1;
  transition: opacity 0.3s;
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-dialog {
  background: var(--card-white);
  border-radius: 20px;
  width: 480px;
  max-width: 90vw;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-gold);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--bg-cream-dark);
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--text-charcoal);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input, .form-group select {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-gold);
  background: var(--bg-cream);
  font-size: 15px;
  color: var(--text-charcoal);
  outline: none;
}

.modal-footer {
  padding: 16px 24px;
  background: var(--bg-cream);
  display: flex;
  justify-content: flex-end;
}

/* Quantity Selector */
.qty-select-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.qty-btn {
  padding: 12px 8px;
  border-radius: 12px;
  background: var(--bg-cream);
  border: 1px solid var(--border-gold);
  color: var(--text-charcoal);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s var(--ease-lux);
}

.qty-btn:active, .qty-btn.active {
  background: var(--card-white);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 15px var(--gold-glow);
  color: var(--accent-gold-dark);
}

.qty-hint-text {
  font-size: 12px;
  color: var(--accent-gold-dark);
  margin-top: 4px;
}

.handover-options-box {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-cream);
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--border-gold);
}

.option-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.frame-select-options.horizontal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.style-btn.sm {
  padding: 8px 12px;
  font-size: 13px;
  justify-content: center;
}

.qty-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  letter-spacing: 0.5px;
}

/* Responsive tweaks for Mobile & Laptop Testing */
@media (max-width: 840px) {
  .preview-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    overflow-y: auto;
    gap: 20px;
  }

  .canvas-wrapper {
    max-height: 480px;
  }

  .customize-panel {
    max-height: none;
    overflow-y: visible;
  }

  .event-title {
    font-size: 32px;
  }

  .luxury-touch-btn {
    padding: 18px 36px;
  }

  .btn-text-kr {
    font-size: 18px;
  }
}

/* ==========================================================================
   PRINT SPECIFIC CSS (@media print)
   Canon SELPHY CP1200 / CP1300 / AirPrint 4x6 Inch (100mm x 148mm) Borderless Setup
   Strict Physical 4in x 6in Page Box (Zero Viewport Unit Scaling)
   ========================================================================== */
#print-container {
  display: none;
}

@page {
  size: 4in 6in portrait;
  margin: 0mm !important;
}

@media print {
  @page {
    size: 4in 6in portrait;
    margin: 0mm !important;
  }

  *, html, body {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  html, body {
    width: 100% !important;
    height: 100% !important;
    background: #FFFFFF !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Force hide all non-print screen elements */
  body * {
    visibility: hidden !important;
  }

  .screen, header, .modal-backdrop {
    display: none !important;
  }

  #print-container, #print-container * {
    visibility: visible !important;
  }

  #print-container {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    background: #FFFFFF !important;
    z-index: 999999 !important;
    overflow: hidden !important;
  }

  .print-page {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  .print-page img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Short (landscape) screens: drop the decorative heart so the print screen fits */
@media (max-height: 900px) {
  .handover-header .seal-icon {
    display: none;
  }

  .print-handover-card {
    padding: 20px 40px;
  }

  .handover-media .printed-preview-wrapper {
    max-height: 30vh;
    width: calc(30vh * 2 / 3);
  }

  .qr-box {
    width: 180px;
  }

  .qr-code {
    width: 170px;
    height: 170px;
  }
}
