:root {
  --gold-bright: #fff4d6;
  --gold-champagne: #f3d28d;
  --gold-deep: #c9923b;
  --gold-border: rgba(246, 214, 150, 0.22);
  --gold-border-strong: rgba(248, 220, 162, 0.48);
  --glass-bg: rgba(7, 14, 24, 0.52);
  --glass-bg-deep: rgba(6, 12, 22, 0.84);
  --text-primary: #fcf8ef;
  --text-secondary: rgba(245, 236, 220, 0.78);
  --text-muted: rgba(226, 214, 192, 0.54);
  --accent-glow: rgba(245, 198, 105, 0.32);
  --serif-display: 'Cinzel', 'Cormorant Garamond', 'Didot', 'Bodoni 72', 'Baskerville', 'Noto Serif SC', 'Songti SC', serif;
  --serif-poetic: 'Noto Serif SC', 'Songti SC', 'STSong', 'Cormorant Garamond', Georgia, serif;
  --sans-ui: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: #03070e;
  color: var(--text-primary);
  font-family: var(--sans-ui);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  overscroll-behavior: none;
}

button, input, textarea {
  font-family: inherit;
}

#glCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  cursor: grab;
  touch-action: none;
}

#glCanvas:active {
  cursor: grabbing;
}

/* Desktop vs Mobile utility visibility defaults */
.brand-compact,
.mobile-only-btn,
.mobile-cam-btn,
.sheet-grabber,
.theme-name-short {
  display: none;
}

.brand-full,
.theme-name-full {
  display: inline;
}

/* Subtle luxury cinema frame */
.cinema-frame {
  position: fixed;
  inset: 14px;
  border: 1px solid rgba(246, 214, 150, 0.09);
  border-radius: 18px;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.6s ease;
}

/* =========================================================================
   3D ORBITING WISH STARS LAYER
   ========================================================================= */
#wishPinsLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.6s ease;
}

.wish-star-pin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  padding: 6px;
  transition: opacity 0.35s ease;
}

.wish-star-diamond {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wish-star-diamond::before {
  content: '✦';
  font-size: 14px;
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(255, 222, 145, 0.95), 0 0 22px rgba(255, 190, 88, 0.65);
  animation: starPinPulse 2.8s ease-in-out infinite;
  display: block;
}

.wish-star-diamond::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(255, 226, 165, 0.35);
  transform: scale(0.85);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.wish-star-pin:hover .wish-star-diamond::after,
.wish-star-pin.expanded .wish-star-diamond::after {
  transform: scale(1.45);
  border-color: rgba(255, 236, 190, 0.85);
}

.wish-star-card {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(calc(-50% + var(--card-shift-x, 0px))) translateY(6px) scale(0.95);
  width: max-content;
  min-width: 190px;
  max-width: min(260px, calc(100vw - 28px));
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(8, 16, 28, 0.88);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--gold-border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.58), 0 0 24px rgba(245, 200, 110, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
}

.wish-star-pin:hover .wish-star-card,
.wish-star-pin.expanded .wish-star-card {
  opacity: 1;
  visibility: visible;
  transform: translateX(calc(-50% + var(--card-shift-x, 0px))) translateY(0) scale(1);
}

.wish-star-text {
  font-family: var(--serif-poetic);
  font-size: 13px;
  line-height: 1.62;
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.wish-star-author {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

@keyframes starPinPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.82; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* =========================================================================
   TOP LUXURY HEADER BAR
   ========================================================================= */
.top-header {
  position: fixed;
  top: 26px;
  left: clamp(24px, 4vw, 56px);
  right: clamp(24px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 15;
  pointer-events: none;
}

.brand-crest {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  min-width: 0;
  transition: opacity 0.5s ease;
}

.crest-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-border-strong);
  background: radial-gradient(circle at 35% 35%, rgba(255, 232, 175, 0.22), rgba(10, 18, 30, 0.65));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-champagne);
  font-size: 16px;
  box-shadow: 0 0 20px rgba(243, 210, 141, 0.18);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-eyebrow {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-champagne);
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  flex-shrink: 0;
}

.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border: 1px solid var(--gold-border);
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.12), 0 8px 24px rgba(0, 0, 0, 0.32);
  color: var(--text-secondary);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.28s ease;
}

.glass-pill:hover {
  border-color: var(--gold-border-strong);
  color: var(--gold-bright);
  background: rgba(16, 26, 42, 0.68);
  transform: translateY(-1px);
}

.glass-pill.active {
  border-color: rgba(255, 224, 152, 0.65);
  color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.22), 0 0 22px rgba(243, 200, 110, 0.22);
}

.glass-icon-btn {
  padding: 0 12px;
}

/* Equalizer bars for Swiss Music Box */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq-bars span {
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: var(--gold-champagne);
  transition: height 0.2s ease;
}

.glass-pill.playing .eq-bars span:nth-child(1) { animation: eqBounce 0.85s ease-in-out infinite; }
.glass-pill.playing .eq-bars span:nth-child(2) { animation: eqBounce 0.65s ease-in-out 0.15s infinite; }
.glass-pill.playing .eq-bars span:nth-child(3) { animation: eqBounce 0.95s ease-in-out 0.30s infinite; }
.glass-pill.playing .eq-bars span:nth-child(4) { animation: eqBounce 0.75s ease-in-out 0.08s infinite; }

@keyframes eqBounce {
  0%, 100% { height: 3px; opacity: 0.65; }
  50% { height: 12px; opacity: 1; }
}

/* =========================================================================
   EDITORIAL HERO BLESSING PANEL
   ========================================================================= */
.editorial-hero {
  position: fixed;
  left: clamp(24px, 3.8vw, 64px);
  top: 50%;
  transform: translateY(-52%);
  width: min(395px, 37vw);
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.season-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-champagne);
  margin-bottom: 14px;
  opacity: 0.92;
}

.season-kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-champagne));
}

.hero-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(44px, 5.4vw, 74px);
  line-height: 0.98;
  letter-spacing: 0.02em;
  background: linear-gradient(
    125deg,
    #fffdf7 0%,
    #f7dda0 26%,
    #fff6df 48%,
    #d49b3d 74%,
    #fbe6b7 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.65));
  animation: goldSheen 9s linear infinite;
}

.hero-title span {
  display: block;
}

.hero-title .italic-script {
  font-style: italic;
  font-weight: 400;
  padding-left: 4px;
}

@keyframes goldSheen {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-cn-subtitle {
  margin-top: 14px;
  font-family: var(--serif-poetic);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--gold-bright);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}

/* Poetic Blessing Card */
.blessing-card-glass {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(10, 20, 34, 0.58) 0%, rgba(5, 11, 20, 0.42) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--gold-border);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 245, 218, 0.10);
  pointer-events: auto;
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.blessing-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
  transition: margin 0.25s ease;
}

.blessing-header-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.blessing-to {
  font-family: var(--serif-poetic);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--gold-champagne);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cycle-verse-btn {
  background: transparent;
  border: 1px solid rgba(243, 210, 141, 0.24);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.22s ease;
}

.cycle-verse-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold-border-strong);
  background: rgba(243, 210, 141, 0.08);
}

.blessing-body-wrap {
  overflow: hidden;
  max-height: 320px;
  opacity: 1;
  transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
}

.blessing-verse-zh {
  font-family: var(--serif-poetic);
  font-size: 15px;
  line-height: 1.92;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  white-space: pre-line;
  transition: opacity 0.28s ease;
}

.blessing-verse-en {
  margin-top: 10px;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.blessing-from {
  margin-top: 12px;
  text-align: right;
  font-family: var(--serif-poetic);
  font-size: 12.5px;
  letter-spacing: 0.10em;
  color: var(--gold-champagne);
}

/* Primary Action Buttons */
.hero-cta-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  pointer-events: auto;
}

.btn-luxury-gold {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 238, 195, 0.72);
  background: linear-gradient(135deg, #f8de9c 0%, #d89f40 52%, #ecc673 100%);
  color: #160f04;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(216, 159, 64, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-luxury-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(243, 200, 108, 0.50), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-luxury-gold:active {
  transform: scale(0.98);
}

.btn-luxury-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-24deg);
  animation: btnShimmer 4.5s ease-in-out infinite;
}

@keyframes btnShimmer {
  0%, 65% { left: -120%; }
  100% { left: 160%; }
}

.btn-luxury-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(10, 19, 32, 0.66);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--gold-border-strong);
  color: var(--gold-bright);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.28s ease;
}

.btn-luxury-glass:hover {
  background: rgba(243, 210, 141, 0.14);
  border-color: var(--gold-bright);
  transform: translateY(-2px);
}

.btn-luxury-glass:active {
  transform: scale(0.98);
}

/* =========================================================================
   BOTTOM FLOATING INTERACTIVE DOCK
   ========================================================================= */
.bottom-dock-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 14;
  pointer-events: none;
  max-width: calc(100vw - 24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.gesture-hint {
  padding: 5px 15px;
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(246, 214, 150, 0.14);
  font-size: 11.5px;
  letter-spacing: 0.10em;
  color: rgba(245, 234, 212, 0.78);
  white-space: nowrap;
  transition: opacity 0.6s ease;
}

.gesture-hint.hidden {
  opacity: 0;
}

.bottom-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(7, 14, 24, 0.68);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  border: 1px solid var(--gold-border);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 244, 218, 0.14);
  pointer-events: auto;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.bottom-dock::-webkit-scrollbar {
  display: none;
}

.dock-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dock-divider {
  width: 1px;
  height: 22px;
  background: rgba(246, 214, 150, 0.18);
  margin: 0 6px;
  flex-shrink: 0;
}

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.theme-chip:hover {
  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.05);
}

.theme-chip.active {
  background: rgba(243, 210, 141, 0.16);
  border-color: var(--gold-border-strong);
  color: var(--gold-bright);
}

.theme-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 8px rgba(255, 220, 150, 0.45);
  flex-shrink: 0;
}

.cam-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
}

.cam-btn:hover {
  color: var(--text-primary);
}

.cam-btn.active {
  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(246, 214, 150, 0.28);
}

/* Cinema / Pure View Mode Transitions */
body.cinema-mode .editorial-hero {
  opacity: 0;
  transform: translateY(-52%) translateX(-28px);
  pointer-events: none;
}

body.cinema-mode .editorial-hero *,
body.cinema-mode .blessing-card-glass,
body.cinema-mode .hero-cta-row {
  pointer-events: none !important;
}

body.cinema-mode .bottom-dock-wrap {
  opacity: 0;
  transform: translateX(-50%) translateY(24px);
  pointer-events: none;
}

body.cinema-mode .bottom-dock {
  pointer-events: none;
}

body.cinema-mode .brand-crest,
body.cinema-mode #wishPinsLayer,
body.cinema-mode .cinema-frame {
  opacity: 0;
  pointer-events: none;
}

/* =========================================================================
   MODALS: WISH COMPOSER & WAX-SEALED LUXURY CHRISTMAS CARD
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 14, 0.70);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  position: relative;
  width: min(540px, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(13, 23, 38, 0.95) 0%, rgba(6, 12, 21, 0.98) 100%);
  border: 1px solid var(--gold-border-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.78), 0 0 50px rgba(243, 200, 110, 0.12);
  padding: 30px;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
}

.modal-close:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  transform: rotate(90deg);
}

.modal-kicker {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-champagne);
  margin-bottom: 6px;
}

.modal-title {
  font-family: var(--serif-poetic);
  font-size: 22px;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding-right: 36px;
}

.modal-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold-champagne);
  margin-bottom: 7px;
}

.luxury-input,
.luxury-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(246, 214, 150, 0.24);
  background: rgba(4, 9, 17, 0.65);
  color: var(--text-primary);
  font-family: var(--serif-poetic);
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.luxury-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.75;
}

.luxury-input:focus,
.luxury-textarea:focus {
  border-color: var(--gold-champagne);
  box-shadow: 0 0 0 3px rgba(243, 210, 141, 0.12);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.preset-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 214, 150, 0.22);
  background: rgba(243, 210, 141, 0.06);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip:hover,
.preset-chip.active {
  background: rgba(243, 210, 141, 0.20);
  border-color: var(--gold-champagne);
  color: var(--gold-bright);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* Wax-Sealed Envelope & Fine Greeting Card Preview */
.card-modal-wide {
  width: min(620px, 100%);
}

.card-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(3, 8, 15, 0.7);
  border: 1px solid var(--gold-border);
  margin-bottom: 20px;
}

.card-tab {
  padding: 7px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.24s ease;
}

.card-tab.active {
  background: rgba(243, 210, 141, 0.18);
  color: var(--gold-bright);
}

/* Sealed Royal Velvet Envelope Stage */
.envelope-stage {
  position: relative;
  border-radius: 18px;
  padding: 44px 28px;
  background: radial-gradient(circle at 50% 30%, #6b1224 0%, #380813 65%, #1f040b 100%);
  border: 1px solid rgba(248, 214, 148, 0.42);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55), 0 18px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  overflow: hidden;
}

.envelope-flap-lines {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(248, 214, 148, 0.25);
  border-radius: 12px;
  pointer-events: none;
}

.envelope-to-label {
  font-family: var(--serif-poetic);
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  margin-bottom: 24px;
}

.wax-seal-btn {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid #fbe4a8;
  background: radial-gradient(circle at 35% 30%, #ffe9ad 0%, #d49735 55%, #8f5c14 100%);
  color: #2c1803;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65), 0 0 30px rgba(248, 210, 120, 0.45), inset 0 2px 6px rgba(255, 255, 255, 0.65);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
}

.wax-seal-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7), 0 0 42px rgba(255, 222, 140, 0.72), inset 0 2px 6px rgba(255, 255, 255, 0.8);
}

.wax-seal-hint {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(255, 236, 200, 0.72);
}

/* Unsealed Fine Gold-Foil Stationery Card */
.stationery-card {
  position: relative;
  padding: 36px 34px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(32, 46, 68, 0.72) 0%, rgba(9, 16, 28, 0.96) 100%);
  border: 1px solid rgba(246, 212, 145, 0.48);
  box-shadow: inset 0 0 0 6px rgba(9, 16, 28, 0.9), inset 0 0 0 7px rgba(246, 212, 145, 0.22);
  animation: cardUnfold 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardUnfold {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.stationery-crest {
  text-align: center;
  color: var(--gold-champagne);
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.32em;
  margin-bottom: 22px;
}

.stationery-to {
  font-family: var(--serif-poetic);
  font-size: 17px;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.stationery-body {
  font-family: var(--serif-poetic);
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  white-space: pre-line;
  padding: 14px 0;
  border-top: 1px solid rgba(246, 214, 150, 0.14);
  border-bottom: 1px solid rgba(246, 214, 150, 0.14);
}

.stationery-footer {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--serif-poetic);
}

.stationery-date {
  font-family: var(--serif-display);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.stationery-from {
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--gold-champagne);
}

/* Floating Toast Notification */
.luxury-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 78px);
  left: 50%;
  transform: translateX(-50%) translateY(-14px);
  max-width: calc(100vw - 32px);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(10, 20, 34, 0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--gold-border-strong);
  color: var(--gold-bright);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(243, 210, 141, 0.22);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.luxury-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================================
   BESPOKE MOBILE & PORTRAIT TABLET UI (<= 820px)
   ========================================================================= */
@media (max-width: 820px) {
  .brand-full,
  .brand-sub,
  .pill-label-hide-sm,
  .desktop-cam-group,
  .theme-name-full,
  .hide-xs,
  .gesture-hint {
    display: none !important;
  }

  .brand-compact,
  .theme-name-short {
    display: inline;
  }

  .mobile-only-btn,
  .mobile-cam-btn {
    display: inline-flex;
    align-items: center;
  }

  .cinema-frame {
    inset: calc(env(safe-area-inset-top, 0px) + 6px) 8px calc(env(safe-area-inset-bottom, 0px) + 6px) 8px;
    border-radius: 16px;
  }

  /* 1. Safe-Area Jewel Header Bar */
  .top-header {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: 14px;
    right: 14px;
  }

  .brand-crest {
    gap: 8px;
  }

  .crest-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .brand-eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.18em;
  }

  .header-actions {
    gap: 6px;
  }

  .glass-pill {
    height: 32px;
    padding: 0 11px;
    font-size: 11.5px;
    gap: 6px;
  }

  .glass-icon-btn,
  .glass-icon-btn-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
  }

  /* 2. Full-Height Stage Frame: Symmetrical Top Crown Title + Bottom Ergonomic Sheet */
  .editorial-hero {
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    transform: none;
    padding: calc(env(safe-area-inset-top, 0px) + 52px) 14px calc(env(safe-area-inset-bottom, 0px) + 62px) 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
  }

  .hero-heading-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .season-kicker {
    font-size: 9.5px;
    letter-spacing: 0.22em;
    margin-bottom: 4px;
    gap: 8px;
  }

  .season-kicker::before,
  .season-kicker::after {
    content: '';
    width: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-champagne));
  }

  .season-kicker::after {
    background: linear-gradient(90deg, var(--gold-champagne), transparent);
  }

  .hero-title {
    font-size: clamp(29px, 8.2vw, 38px);
    line-height: 1.05;
  }

  .hero-title span {
    display: inline;
  }

  .hero-title .italic-script {
    padding-left: 6px;
  }

  .hero-cn-subtitle {
    margin-top: 4px;
    font-size: 12px;
    letter-spacing: 0.28em;
    padding-left: 0.28em;
    opacity: 0.92;
  }

  /* 3. Bottom Thumb Zone: Collapsible Poem Card + 50/50 CTA Pills */
  .hero-blessing-stack {
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .blessing-card-glass {
    margin-top: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(8, 16, 28, 0.74) 0%, rgba(4, 9, 18, 0.64) 100%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 245, 218, 0.12);
  }

  .blessing-header-row {
    margin-bottom: 6px;
  }

  .blessing-to {
    font-size: 12px;
  }

  .cycle-verse-btn {
    padding: 3px 9px;
    font-size: 10.5px;
  }

  .blessing-verse-zh {
    font-size: 13px;
    line-height: 1.66;
  }

  .blessing-verse-en {
    display: none;
  }

  .blessing-from {
    margin-top: 4px;
    font-size: 11.5px;
  }

  /* Sleek folded 1-line mode on mobile */
  .blessing-card-glass.collapsed {
    padding: 8px 13px;
  }

  .blessing-card-glass.collapsed .blessing-header-row {
    margin-bottom: 0;
  }

  .blessing-card-glass.collapsed .blessing-body-wrap {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
  }

  .hero-cta-row {
    margin-top: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .btn-luxury-gold,
  .btn-luxury-glass {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 12.5px;
    letter-spacing: 0.06em;
  }

  /* 4. Zero-Overflow Full-Width Jewel Control Dock */
  .bottom-dock-wrap {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    left: 12px;
    right: 12px;
    transform: none;
    max-width: none;
  }

  .bottom-dock {
    width: min(460px, 100%);
    justify-content: space-between;
    padding: 4px 6px;
    gap: 1px;
    overflow: hidden;
  }

  .theme-dock-group {
    gap: 1px;
    min-width: 0;
  }

  .theme-chip {
    height: 30px;
    padding: 0 7px 0 5px;
    gap: 4px;
    font-size: 11px;
    letter-spacing: 0.01em;
  }

  .theme-dot {
    width: 10px;
    height: 10px;
  }

  .dock-divider {
    height: 16px;
    margin: 0 1px;
  }

  .mobile-cam-btn,
  .postcard-dock-btn {
    height: 30px;
    padding: 0 6px;
    font-size: 11px;
    letter-spacing: 0.01em;
    color: var(--gold-champagne);
    flex-shrink: 0;
  }

  /* Mobile Cinema Mode Override */
  body.cinema-mode .editorial-hero {
    opacity: 0;
    transform: scale(0.98);
  }

  body.cinema-mode .bottom-dock-wrap {
    opacity: 0;
    transform: translateY(20px);
  }

  .luxury-toast {
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    font-size: 12px;
    padding: 8px 16px;
  }
}

/* Native iOS Bottom Sheet Modals on Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 26px 26px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 12px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
  }

  .modal-backdrop.open .modal-panel {
    transform: translateY(0);
  }

  .sheet-grabber {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(246, 214, 150, 0.32);
    margin: 0 auto 14px;
  }

  .modal-close {
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
  }

  .modal-title {
    font-size: 19px;
  }

  .modal-desc {
    font-size: 12.5px;
    margin-bottom: 14px;
  }

  /* 16px font-size prevents iOS Safari from auto-zooming on input focus */
  .luxury-input,
  .luxury-textarea {
    font-size: 16px;
    padding: 10px 13px;
  }

  .luxury-textarea {
    min-height: 78px;
  }

  .card-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 16px;
  }

  .card-tab {
    flex: 1;
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
  }

  .envelope-stage {
    padding: 32px 18px;
  }

  .envelope-to-label {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .wax-seal-btn {
    width: 76px;
    height: 76px;
    font-size: 12px;
  }

  .stationery-card {
    padding: 24px 20px;
  }

  .stationery-crest {
    font-size: 10.5px;
    letter-spacing: 0.22em;
    margin-bottom: 16px;
  }

  .stationery-to {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .stationery-body {
    font-size: 14.5px;
    line-height: 1.9;
    padding: 12px 0;
  }

  .stationery-footer {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-top: 14px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 16px;
  }

  .modal-actions > button {
    width: 100%;
  }
}

/* Compact Portrait Screens (e.g. iPhone SE 375x667) */
@media (max-width: 820px) and (max-height: 720px) {
  .editorial-hero {
    padding-top: calc(env(safe-area-inset-top, 0px) + 52px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 54px);
  }

  .season-kicker {
    display: none !important;
  }

  .hero-title {
    font-size: 25px;
  }

  .hero-cn-subtitle {
    margin-top: 2px;
    font-size: 11px;
  }

  .hero-blessing-stack {
    gap: 6px;
  }

  .blessing-card-glass {
    padding: 8px 12px;
  }

  .blessing-header-row {
    margin-bottom: 4px;
  }

  .blessing-verse-zh {
    font-size: 12px;
    line-height: 1.50;
  }

  .blessing-from {
    margin-top: 2px;
    font-size: 11px;
  }

  .btn-luxury-gold,
  .btn-luxury-glass {
    height: 35px;
    font-size: 12px;
  }
}

/* Ultra-Narrow Phones (<= 365px) */
@media (max-width: 365px) {
  .theme-chip {
    padding: 0 6px 0 5px;
    font-size: 11px;
    gap: 4px;
  }

  .mobile-cam-btn,
  .postcard-dock-btn {
    padding: 0 5px;
    font-size: 11px;
  }
}

/* Mobile Landscape Adaptation (e.g. 844x390) */
@media (max-height: 520px) and (orientation: landscape) {
  .top-header {
    top: 10px;
    left: 16px;
    right: 16px;
  }

  .brand-sub,
  .season-kicker,
  .blessing-verse-en,
  .gesture-hint {
    display: none !important;
  }

  .editorial-hero {
    inset: auto;
    left: 16px;
    top: 50%;
    transform: translateY(-52%);
    width: min(320px, 44vw);
    padding: 0;
    display: block;
  }

  .hero-heading-block {
    text-align: left;
    align-items: flex-start;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-cn-subtitle {
    font-size: 11.5px;
    padding-left: 0;
    margin-top: 3px;
  }

  .blessing-card-glass {
    margin-top: 8px;
    padding: 8px 12px;
  }

  .blessing-verse-zh {
    font-size: 12px;
    line-height: 1.5;
  }

  .hero-cta-row {
    margin-top: 8px;
    display: flex;
    gap: 6px;
  }

  .btn-luxury-gold,
  .btn-luxury-glass {
    height: 32px;
    padding: 0 12px;
    font-size: 11.5px;
  }

  .bottom-dock-wrap {
    bottom: 8px;
  }
}
