/* ==========================================================================
   European Luxury Invitation Builder - Custom Design System & Styles
   ========================================================================== */

:root {
  --primary-font: 'Plus Jakarta Sans', sans-serif;
  --serif-title: 'Cormorant Garamond', serif;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f3e5ab 50%, #aa771c 100%);
  --rose-gold-gradient: linear-gradient(135deg, #b76e79 0%, #ffd1dc 50%, #8b4513 100%);
  --silver-gradient: linear-gradient(135deg, #bdc3c7 0%, #ffffff 50%, #7f8c8d 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #18181b;
}
::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #71717a;
}

/* Luxury Paper Textures */
.texture-deckle {
  background-color: #faf7f2;
  background-image: radial-gradient(#ece4d8 1px, transparent 1px), radial-gradient(#ece4d8 1px, #faf7f2 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.03);
}

.texture-linen {
  background-color: #f7f5f0;
  background-image: 
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 4px 4px;
}

.texture-travertine {
  background-color: #eee9e0;
  background-image: radial-gradient(ellipse at center, #f4f0e8 0%, #e2dcce 100%);
}

.texture-velvet {
  background-color: #0c141f;
  background-image: radial-gradient(circle at 50% 50%, #152232 0%, #070a10 100%);
}

.texture-parchment {
  background-color: #fbf8ef;
  background-image: radial-gradient(circle at 10% 20%, #f4edd7 0%, #faf6ec 80%);
}

.texture-emerald {
  background-color: #09231b;
  background-image: radial-gradient(circle at 30% 30%, #11382c 0%, #051410 100%);
}

.texture-burgundy {
  background-color: #2b0b14;
  background-image: radial-gradient(circle at 40% 40%, #3e121e 0%, #19050b 100%);
}

.texture-toile {
  background-color: #fcfbfa;
}

/* Torn / Deckle Edge Effect */
.deckle-border {
  filter: drop-shadow(0px 8px 24px rgba(0, 0, 0, 0.12));
  position: relative;
}

/* Foil Shimmer Effects */
.foil-gold {
  background: var(--gold-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 1px rgba(212, 175, 55, 0.4);
  position: relative;
  display: inline-block;
}

.foil-gold-svg {
  fill: url(#goldGradient) !important;
  stroke: url(#goldGradient) !important;
}

.foil-rose {
  background: var(--rose-gold-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.foil-silver {
  background: var(--silver-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Foil Shimmer Animation on Hover */
.shimmer-effect {
  position: relative;
  overflow: hidden;
}
.shimmer-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 80%
  );
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.75s ease;
  pointer-events: none;
}
.shimmer-effect:hover::after {
  transform: rotate(30deg) translateY(100%);
}

/* Realistic Wax Seal Styles */
.wax-seal {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.wax-seal:hover {
  transform: scale(1.05);
}

.wax-red {
  background: radial-gradient(circle at 35% 35%, #9b111e 0%, #680b14 70%, #42060c 100%);
  color: #ffcad0;
}
.wax-gold {
  background: radial-gradient(circle at 35% 35%, #d4af37 0%, #aa771c 70%, #66460b 100%);
  color: #fff4d1;
}
.wax-sage {
  background: radial-gradient(circle at 35% 35%, #7a8b7b 0%, #566457 70%, #364037 100%);
  color: #e3ebe4;
}
.wax-navy {
  background: radial-gradient(circle at 35% 35%, #1f2d42 0%, #111a28 70%, #080d14 100%);
  color: #d1ddff;
}

/* Arch Frame Mask */
.mask-arch {
  clip-path: inset(0 round 50% 50% 0 0 / 35% 35% 0 0);
}

.mask-oval {
  clip-path: ellipse(50% 50% at 50% 50%);
}

.mask-scallop {
  border-radius: 12px;
  outline: 2px dashed rgba(0,0,0,0.15);
  outline-offset: -6px;
}

/* Bleed Zone Guidelines for Print-Ready 5x7" */
.bleed-guides {
  position: relative;
}
.bleed-guides::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border: 1px dashed rgba(199, 155, 75, 0.6);
  pointer-events: none;
  z-index: 99;
}
.bleed-guides::after {
  content: 'SAFE PRINT MARGIN';
  position: absolute;
  top: 6px;
  right: 22px;
  font-size: 8px;
  font-family: monospace;
  color: rgba(199, 155, 75, 0.8);
  letter-spacing: 0.1em;
  pointer-events: none;
  z-index: 100;
}

/* Selection Box Handle Styling */
.canvas-element:hover:not(.element-selected) {
  outline: 1.5px dashed rgba(199, 155, 75, 0.6);
  outline-offset: 2px;
}

.element-multi-selected {
  outline: 2px solid #f0d78c !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(240, 215, 140, 0.18);
}

.resize-handle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #c79b4b;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  z-index: 50;
}

.photo-replace-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 40;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  background: rgba(12, 10, 8, 0.88);
  color: #f0d78c;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.photo-replace-hint:hover {
  background: rgba(196, 163, 106, 0.95);
  color: #1a140c;
}

.edit-panel-pulse {
  animation: editPanelPulse 1.1s ease-out 1;
}

@keyframes editPanelPulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.element-live-flash {
  animation: elementLiveFlash 0.45s ease-out 1;
}

@keyframes elementLiveFlash {
  0% { filter: brightness(1.25); }
  100% { filter: brightness(1); }
}

/* Prominent live edit dock under canvas toolbar */
.live-edit-dock {
  position: sticky;
  top: 3.25rem;
  width: min(520px, calc(100% - 1rem));
  margin: 0.35rem auto 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.98), rgba(18, 16, 14, 0.98));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.04) inset;
  backdrop-filter: blur(10px);
  padding: 0.9rem 1rem 1rem;
  color: #f4ecdf;
}

.live-edit-dock.is-hidden {
  display: none;
}

.live-edit-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.live-edit-dock-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: #f0d78c;
}

.live-edit-dock-sub {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 236, 223, 0.55);
  font-family: 'Montserrat', sans-serif;
}

.live-edit-dock-close {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #d4d4d8;
  cursor: pointer;
}

.live-edit-dock-close:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.live-edit-dock textarea,
.live-edit-dock input[type="text"],
.live-edit-dock input[type="url"] {
  width: 100%;
  border-radius: 0.65rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: #090807;
  color: #fff8ec;
  padding: 0.7rem 0.8rem;
  font-size: 0.9rem;
  line-height: 1.35;
  outline: none;
}

.live-edit-dock textarea:focus,
.live-edit-dock input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.live-edit-dock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.live-edit-dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #f0d78c;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.live-edit-dock-btn:hover {
  background: rgba(245, 158, 11, 0.22);
}

.live-edit-dock-btn--primary {
  background: linear-gradient(135deg, #d4af37, #f0d78c);
  color: #1a140c;
  border-color: transparent;
  font-weight: 700;
}

.live-edit-dock-btn--primary:hover {
  filter: brightness(1.05);
}

.live-edit-dock-photo {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.live-edit-dock-photo img {
  width: 88px;
  height: 110px;
  object-fit: cover;
  border-radius: 0.55rem;
  border: 1px solid rgba(255,255,255,0.1);
}

#sidebar-right.inspector-spotlight {
  box-shadow: -8px 0 28px rgba(245, 158, 11, 0.12);
  outline: 1px solid rgba(245, 158, 11, 0.25);
}

/* 3D Envelope Animation for Guest Experience */
.perspective-1000 {
  perspective: 1000px;
}

.envelope-flap {
  transform-origin: top center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.envelope-open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 5;
}

.envelope-card {
  transition: transform 0.9s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.envelope-open .envelope-card {
  transform: translateY(-90px) scale(1.05);
  z-index: 20;
}

/* Flip card animation */
.card-flipper {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.card-flipper.flipped {
  transform: rotateY(180deg);
}
.card-front, .card-back {
  backface-visibility: hidden;
}
.card-back {
  transform: rotateY(180deg);
}

/* Print CSS for Clean 5x7" Output */
@media print {
  body * {
    visibility: hidden;
  }
  #card-canvas-container, #card-canvas-container * {
    visibility: visible;
  }
  #card-canvas-container {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    box-shadow: none !important;
  }
}

/* Photo Frame Mask Styles */
.mask-arch {
  border-radius: 9999px 9999px 0 0;
}
.mask-oval {
  border-radius: 50%;
}
.mask-rectangle {
  border-radius: 0;
}

/* Direct Inline On-Canvas Text Editing */
.text-editing-active {
  outline: 2px dashed #f59e0b !important;
  outline-offset: 3px !important;
  background-color: rgba(0, 0, 0, 0.45) !important;
  border-radius: 4px;
  cursor: text !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  caret-color: #f59e0b !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
  padding: 2px 6px;
}

/* Floating Canvas Toolbar */
.floating-canvas-toolbar {
  animation: floatFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide scrollbars for clean European luxury UI */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   Invitation Card Generator — Lobby, brand lockup & premium cards
   ========================================================================== */
:root {
  --lobby-ink: #080706;
  --lobby-ink-soft: #14110e;
  --lobby-champagne: #e2d0aa;
  --lobby-champagne-deep: #c4a36a;
  --lobby-paper: #f4ecdf;
  --lobby-mist: rgba(243, 235, 221, 0.08);
  --card-edge: rgba(226, 208, 170, 0.28);
  --card-glow: rgba(196, 163, 106, 0.22);
}

body.mode-lobby {
  overflow: hidden;
}

.studio-header.is-hidden,
.studio-workspace.is-hidden {
  display: none !important;
}

/* ==========================================================================
   Studio top navigation — professional editor chrome
   ========================================================================== */
.studio-header {
  position: relative;
  z-index: 40;
  flex-shrink: 0;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(22, 18, 14, 0.98) 0%, rgba(12, 10, 8, 0.96) 100%);
  border-bottom: 1px solid rgba(226, 208, 170, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 248, 235, 0.04) inset,
    0 12px 32px rgba(0, 0, 0, 0.28);
}

.studio-header::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(226, 208, 170, 0.55) 22%,
    rgba(243, 229, 171, 0.85) 50%,
    rgba(226, 208, 170, 0.55) 78%,
    transparent 100%
  );
  pointer-events: none;
}

.studio-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 120% at 12% 0%, rgba(196, 163, 106, 0.12), transparent 55%),
    radial-gradient(ellipse 35% 100% at 88% 0%, rgba(226, 208, 170, 0.07), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.studio-nav-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) minmax(0, 1.35fr) minmax(220px, 1.1fr);
  align-items: center;
  gap: 0.65rem 0.85rem;
  min-height: 3.85rem;
  padding: 0.45rem 0.9rem 0.5rem;
}

.studio-nav-brand,
.studio-nav-center,
.studio-nav-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.studio-nav-brand {
  gap: 0.65rem;
}

.studio-nav-center {
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.studio-nav-actions {
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

/* Collections — primary back control */
.studio-collections-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.2rem;
  padding: 0 0.75rem 0 0.45rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(226, 208, 170, 0.22);
  background: rgba(226, 208, 170, 0.07);
  color: #f4ecdf;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.studio-collections-btn:hover {
  background: rgba(226, 208, 170, 0.14);
  border-color: rgba(226, 208, 170, 0.4);
  color: #fff8eb;
  transform: translateX(-1px);
}

.studio-collections-chevron {
  flex-shrink: 0;
  opacity: 0.75;
}

.studio-collections-grid {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.4rem;
  background: rgba(8, 7, 6, 0.45);
  color: #e2d0aa;
}

.studio-collections-label {
  white-space: nowrap;
}

.studio-brand-rule {
  flex-shrink: 0;
  width: 1px;
  height: 1.85rem;
  background: linear-gradient(180deg, transparent, rgba(226, 208, 170, 0.38), transparent);
}

.studio-brand-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.15rem 0.4rem 0.15rem 0.15rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 160ms ease;
}

.studio-brand-btn:hover {
  background: rgba(226, 208, 170, 0.06);
}

.studio-brand-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1a140e;
  background:
    linear-gradient(145deg, #f3e5ab 0%, #e2d0aa 42%, #c4a36a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 248, 230, 0.3) inset,
    0 6px 14px rgba(196, 163, 106, 0.18);
}

.studio-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
  text-align: left;
}

.studio-suite-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f4ecdf;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.studio-suite-badge {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196, 163, 106, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.studio-tool-rail {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 0.95rem;
  background: rgba(8, 7, 6, 0.72);
  border: 1px solid rgba(226, 208, 170, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.studio-side-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  min-width: 4.6rem;
  padding: 0.38rem 0.7rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: rgba(244, 236, 223, 0.55);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.studio-side-btn:hover {
  color: rgba(244, 236, 223, 0.88);
  background: rgba(226, 208, 170, 0.06);
}

.studio-side-btn.is-active {
  color: #1a140e;
  background: linear-gradient(145deg, #f3e5ab 0%, #e2d0aa 48%, #c4a36a 100%);
  box-shadow: 0 6px 16px rgba(196, 163, 106, 0.28);
}

.studio-side-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.1;
}

.studio-side-sub {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.studio-tool-divider {
  width: 1px;
  height: 1.7rem;
  background: linear-gradient(180deg, transparent, rgba(226, 208, 170, 0.35), transparent);
  margin: 0 0.15rem;
}

.studio-icon-btn,
.studio-nav-chip,
.studio-zoom-btn,
.studio-zoom-reset,
.studio-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid rgba(226, 208, 170, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 236, 223, 0.78);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.studio-icon-btn {
  height: 2.15rem;
  padding: 0 0.7rem;
  border-radius: 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.studio-icon-btn--square {
  width: 2.15rem;
  padding: 0;
}

.studio-icon-btn:hover,
.studio-nav-chip:hover,
.studio-zoom-btn:hover,
.studio-zoom-reset:hover {
  color: #f4ecdf;
  border-color: rgba(226, 208, 170, 0.32);
  background: rgba(226, 208, 170, 0.08);
}

.studio-icon-btn.is-on {
  color: #e2d0aa;
  border-color: rgba(196, 163, 106, 0.45);
  background: rgba(196, 163, 106, 0.14);
  box-shadow: 0 0 0 1px rgba(196, 163, 106, 0.08) inset;
}

.studio-tool-cluster,
.studio-zoom-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 0.8rem;
  background: rgba(8, 7, 6, 0.45);
  border: 1px solid rgba(226, 208, 170, 0.1);
}

.studio-zoom-btn {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
}

.studio-zoom-value {
  min-width: 2.7rem;
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e2d0aa;
}

.studio-zoom-reset {
  height: 1.85rem;
  padding: 0 0.55rem;
  border-radius: 0.55rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-nav-chip {
  height: 2.15rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.studio-nav-chip--ghost {
  background: transparent;
  color: rgba(244, 236, 223, 0.7);
}

.studio-export-btn {
  height: 2.25rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border-color: rgba(196, 163, 106, 0.4);
  background: linear-gradient(145deg, #f3e5ab 0%, #e2d0aa 45%, #c4a36a 100%);
  color: #1a140e;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(196, 163, 106, 0.22);
}

.studio-export-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

/* Primary WhatsApp share CTA */
.studio-whatsapp-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 211, 102, 0.45);
  background: linear-gradient(145deg, #25d366 0%, #1ebe57 55%, #128c7e 100%);
  color: #062814;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(37, 211, 102, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
}

.studio-whatsapp-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgba(37, 211, 102, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.studio-whatsapp-btn:active {
  transform: translateY(0);
}

.studio-whatsapp-pulse {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(37, 211, 102, 0.55);
  animation: waPulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes waPulse {
  0% { opacity: 0.7; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.12); }
}

.studio-wa-menu-btn {
  width: calc(100% - 0.75rem);
  margin: 0.15rem 0.375rem 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(37, 211, 102, 0.35);
  background:
    linear-gradient(135deg, rgba(37, 211, 102, 0.16) 0%, rgba(18, 140, 126, 0.12) 100%);
  color: #ecfdf5;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.studio-wa-menu-btn:hover {
  border-color: rgba(37, 211, 102, 0.55);
  background:
    linear-gradient(135deg, rgba(37, 211, 102, 0.24) 0%, rgba(18, 140, 126, 0.18) 100%);
  transform: translateY(-1px);
}

.studio-wa-menu-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  background: #25d366;
  color: #062814;
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.3);
}

.studio-wa-menu-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.studio-wa-menu-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f0fdf4;
  line-height: 1.15;
}

.studio-wa-menu-sub {
  font-size: 0.62rem;
  color: rgba(236, 253, 245, 0.7);
}

.studio-wa-menu-badge {
  flex-shrink: 0;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.22);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #86efac;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .studio-whatsapp-btn-label {
    display: none;
  }

  .studio-whatsapp-btn {
    width: 2.25rem;
    padding: 0;
  }
}

.studio-export-menu {
  animation: studioMenuIn 160ms ease;
}

@keyframes studioMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Export busy overlay + toast */
.export-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(8, 7, 6, 0.62);
  backdrop-filter: blur(6px);
}

.export-busy-overlay.is-hidden {
  display: none;
}

.export-busy-card {
  min-width: min(18rem, 86vw);
  padding: 1.35rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 208, 170, 0.22);
  background: linear-gradient(165deg, #1a1612 0%, #100e0c 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.export-busy-spinner {
  width: 1.75rem;
  height: 1.75rem;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  border: 2px solid rgba(226, 208, 170, 0.2);
  border-top-color: #e2d0aa;
  animation: exportSpin 0.8s linear infinite;
}

@keyframes exportSpin {
  to { transform: rotate(360deg); }
}

.export-busy-title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f4ecdf;
}

.export-busy-label {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(244, 236, 223, 0.62);
}

.export-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 130;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(226, 208, 170, 0.28);
  background: #161310;
  color: #f4ecdf;
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, 120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms ease, opacity 220ms ease;
}

.export-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.export-toast[data-tone="error"] {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

@media (max-width: 1180px) {
  .studio-nav-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'brand actions'
      'center center';
  }

  .studio-nav-brand { grid-area: brand; }
  .studio-nav-center { grid-area: center; justify-content: flex-start; }
  .studio-nav-actions { grid-area: actions; }

  .studio-suite-title,
  .studio-suite-badge {
    max-width: 11rem;
  }
}

@media (max-width: 900px) {
  .studio-nav-hide-sm {
    display: none !important;
  }

  .studio-collections-label {
    display: none;
  }

  .studio-collections-btn {
    padding: 0 0.45rem;
    gap: 0.25rem;
  }

  .studio-suite-title,
  .studio-suite-badge {
    max-width: 8.5rem;
  }

  .studio-nav-chip-label {
    display: none;
  }

  .studio-side-btn {
    min-width: 3.8rem;
    padding: 0.35rem 0.55rem;
  }

  .studio-side-sub {
    display: none;
  }
}

.atelier-lobby {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--lobby-paper);
  background: var(--lobby-ink);
  z-index: 35;
}

.atelier-lobby.is-hidden {
  display: none;
}

.lobby-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(196, 163, 106, 0.2), transparent 55%),
    radial-gradient(ellipse 55% 45% at 8% 70%, rgba(42, 68, 58, 0.32), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 85%, rgba(88, 40, 48, 0.2), transparent 50%),
    linear-gradient(168deg, #080706 0%, #12100d 48%, #0c100e 100%);
  pointer-events: none;
}

.lobby-grain {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.lobby-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.75rem 0.35rem;
}

.lobby-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border: 1px solid rgba(226, 208, 170, 0.28);
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lobby-champagne);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.lobby-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.25rem 1.75rem 2.25rem;
}

.lobby-panel {
  animation: lobbyPanelIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* —— Creative project name lockup —— */
.lobby-hero {
  display: flex;
  justify-content: center;
  text-align: center;
  margin: 0.35rem 0 2rem;
}

.brand-masthead {
  max-width: 46rem;
  animation: brandReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--lobby-champagne-deep);
}

.brand-kicker-line {
  display: inline-block;
  width: 2.4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lobby-champagne-deep), transparent);
}

.brand-lockup {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.brand-script {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  background: linear-gradient(115deg, #fff8ea 10%, #e2d0aa 42%, #c4a36a 58%, #fff1d4 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 28px rgba(196, 163, 106, 0.28));
  animation: scriptFloat 5.5s ease-in-out infinite;
}

.brand-rule {
  position: relative;
  display: block;
  width: min(16rem, 55vw);
  height: 1px;
  margin: 0.55rem 0 0.7rem;
  background: linear-gradient(90deg, transparent, rgba(226, 208, 170, 0.85), transparent);
}

.brand-rule-diamond {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, #f0e2c4, #c4a36a);
  box-shadow: 0 0 12px rgba(196, 163, 106, 0.55);
}

.brand-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.85rem;
}

.brand-word {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(1.55rem, 3.6vw, 2.55rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #f7efdf;
  text-indent: 0.28em;
}

.brand-word--glow {
  background: linear-gradient(180deg, #fff6e4 0%, #e2d0aa 45%, #b89255 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tag {
  margin: 1.05rem auto 0;
  max-width: 28rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.4;
  color: rgba(244, 236, 223, 0.72);
}

.lobby-eyebrow {
  margin: 0 0 0.55rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lobby-champagne-deep);
}

.lobby-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #f8f1e4;
}

.lobby-title--sm {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.lobby-lead {
  margin: 0.7rem 0 0;
  max-width: 34rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.45;
  color: rgba(243, 235, 221, 0.72);
}

.lobby-sections-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.15rem;
}

/* —— Premium section cards —— */
.lobby-section-card {
  position: relative;
  grid-column: span 12;
  min-height: 230px;
  border: 1px solid var(--card-edge);
  border-radius: 1.25rem;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.04), transparent 40%),
    #100e0c;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.4s ease;
  animation: lobbyCardRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lobby-section-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(226, 208, 170, 0.18);
  border-radius: 0.95rem;
  z-index: 3;
  pointer-events: none;
  transition: border-color 0.3s ease;
}

.lobby-section-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 248, 230, 0.14) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.85s ease;
}

.lobby-section-card:nth-child(1) { animation-delay: 0.05s; }
.lobby-section-card:nth-child(2) { animation-delay: 0.12s; }
.lobby-section-card:nth-child(3) { animation-delay: 0.19s; }
.lobby-section-card:nth-child(4) { animation-delay: 0.26s; }
.lobby-section-card:nth-child(5) { animation-delay: 0.33s; }

@media (min-width: 768px) {
  .lobby-section-card:nth-child(1),
  .lobby-section-card:nth-child(2) {
    grid-column: span 6;
    min-height: 285px;
  }
  .lobby-section-card:nth-child(3),
  .lobby-section-card:nth-child(4),
  .lobby-section-card:nth-child(5) {
    grid-column: span 4;
    min-height: 265px;
  }
}

.lobby-section-card:hover,
.lobby-section-card:focus-visible {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(226, 208, 170, 0.65);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 0 0 1px rgba(196, 163, 106, 0.2),
    0 28px 60px rgba(0, 0, 0, 0.5),
    0 0 40px var(--card-glow);
  outline: none;
}

.lobby-section-card:hover::before,
.lobby-section-card:focus-visible::before {
  border-color: rgba(226, 208, 170, 0.42);
}

.lobby-section-card:hover::after,
.lobby-section-card:focus-visible::after {
  transform: translateX(120%);
}

.lobby-section-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  filter: saturate(1.05) contrast(1.04);
}

.lobby-section-card:hover .lobby-section-media {
  transform: scale(1.14);
}

.lobby-section-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 7, 6, 0.15) 0%, rgba(8, 7, 6, 0.35) 35%, rgba(8, 7, 6, 0.88) 72%, rgba(8, 7, 6, 0.96) 100%),
    radial-gradient(ellipse at 70% 20%, rgba(196, 163, 106, 0.12), transparent 50%);
}

.lobby-section-body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.55rem 1.55rem;
}

.lobby-section-index {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(226, 208, 170, 0.88);
  margin-bottom: 0.65rem;
}

.lobby-section-index::before {
  content: '';
  width: 1.1rem;
  height: 1px;
  background: var(--lobby-champagne-deep);
}

.lobby-section-name {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
  font-weight: 600;
  line-height: 1.12;
  color: #fffaf0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.lobby-section-tag {
  margin: 0.6rem 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.35;
  color: rgba(244, 236, 223, 0.8);
  max-width: 28rem;
}

.lobby-section-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 208, 170, 0.18);
}

.lobby-section-count {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lobby-champagne);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 208, 170, 0.22);
  background: rgba(8, 7, 6, 0.35);
}

.lobby-section-cta {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: #f4ecdf;
  opacity: 0.9;
  transition: opacity 0.25s ease, transform 0.25s ease, letter-spacing 0.25s ease;
}

.lobby-section-card:hover .lobby-section-cta {
  opacity: 1;
  transform: translateX(5px);
  letter-spacing: 0.02em;
}

.lobby-templates-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lobby-back-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 208, 170, 0.28);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  color: var(--lobby-champagne);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lobby-back-btn:hover {
  background: rgba(226, 208, 170, 0.1);
  border-color: rgba(226, 208, 170, 0.55);
  transform: translateX(-2px);
}

.lobby-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  padding-bottom: 1rem;
}

/* —— Premium template cards —— */
.lobby-template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--card-edge);
  border-radius: 1.15rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 28%),
    rgba(14, 12, 10, 0.95);
  cursor: pointer;
  text-align: left;
  color: inherit;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 16px 34px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.35s ease;
  animation: lobbyCardRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lobby-template-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(226, 208, 170, 0.45), transparent 35%, transparent 65%, rgba(196, 163, 106, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 5;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.lobby-template-card:hover,
.lobby-template-card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(226, 208, 170, 0.55);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 24px 48px rgba(0, 0, 0, 0.48),
    0 0 32px var(--card-glow);
  outline: none;
}

.lobby-template-card:hover::before,
.lobby-template-card:focus-visible::before {
  opacity: 1;
}

.lobby-template-preview {
  position: relative;
  height: 268px;
  overflow: hidden;
  border-bottom: 1px solid rgba(226, 208, 170, 0.14);
}

.lobby-template-preview-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  background-size: cover;
  background-position: center;
  transition: transform 0.65s ease;
}

.lobby-template-card:hover .lobby-template-preview-inner {
  transform: scale(1.05);
}

.lobby-template-preview-scale {
  width: 400px;
  height: 560px;
  transform: scale(0.38);
  transform-origin: top center;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.lobby-template-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(8, 7, 6, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 208, 170, 0.28);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lobby-champagne);
}

.lobby-template-meta {
  padding: 1.05rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  background: linear-gradient(180deg, rgba(20, 17, 14, 0.2), rgba(8, 7, 6, 0.55));
}

.lobby-template-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8f1e4;
  line-height: 1.25;
}

.lobby-template-style {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(244, 236, 223, 0.68);
}

.lobby-template-action {
  margin-top: auto;
  padding-top: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lobby-champagne-deep);
  border-top: 1px solid rgba(226, 208, 170, 0.14);
}

@keyframes lobbyPanelIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lobbyCardRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes brandReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes scriptFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 640px) {
  .lobby-header,
  .lobby-stage {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .brand-script {
    font-size: clamp(2.8rem, 14vw, 3.6rem);
  }
  .brand-word {
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }
  .lobby-template-preview {
    height: 230px;
  }
}

/* ==========================================================================
   Responsive studio — tablet & phone
   ========================================================================== */
.canvas-stage-shell {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.studio-drawer-backdrop,
.studio-mobile-bar,
.studio-drawer-close,
.studio-drawer-handle {
  display: none;
}

@media (max-width: 900px) {
  body.mode-studio {
    overflow: hidden;
  }

  .studio-nav-shell {
    min-height: 0;
    padding: 0.4rem 0.65rem 0.45rem;
    gap: 0.45rem;
  }

  .studio-nav-center {
    gap: 0.3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.1rem;
    max-width: 100%;
  }

  .studio-nav-center::-webkit-scrollbar {
    display: none;
  }

  .studio-tool-divider,
  .studio-zoom-reset {
    display: none;
  }

  .studio-icon-btn span {
    display: none;
  }

  .studio-icon-btn {
    width: 2.05rem;
    padding: 0;
  }

  .studio-nav-actions {
    gap: 0.28rem;
  }

  .studio-export-btn {
    height: 2.1rem;
    padding: 0 0.75rem;
    font-size: 0.88rem;
  }

  .studio-whatsapp-btn {
    height: 2.1rem;
  }

  /* Workspace: canvas full-bleed; sidebars become sheets */
  #studio-workspace {
    position: relative;
  }

  #canvas-outer-stage {
    width: 100%;
    padding: 0.5rem 0.5rem 4.75rem !important;
  }

  /* Backdrop below drawers; leave mobile bar uncovered */
  #studio-drawer-backdrop.studio-drawer-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 3.7rem;
    z-index: 60 !important;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  body.studio-drawer-open #studio-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* Drawers above backdrop so taps reach Tools/Edit content */
  #sidebar-left.studio-sidebar-left,
  #sidebar-right.studio-sidebar-right {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 3.7rem;
    top: auto;
    width: 100% !important;
    max-width: none !important;
    height: min(68vh, 520px);
    z-index: 80 !important;
    border: 0 !important;
    border-top: 1px solid rgba(226, 208, 170, 0.2) !important;
    border-radius: 1.1rem 1.1rem 0 0;
    background: rgba(12, 10, 8, 0.98) !important;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(110%);
    transition: transform 240ms ease;
    overflow: hidden;
    pointer-events: none;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
  }

  body.drawer-tools-open #sidebar-left.studio-sidebar-left,
  body.drawer-inspector-open #sidebar-right.studio-sidebar-right {
    transform: translateY(0);
    pointer-events: auto !important;
  }

  #sidebar-left.studio-sidebar-left {
    flex-direction: row;
  }

  #sidebar-right.studio-sidebar-right {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  #sidebar-left-content,
  #sidebar-right-content {
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .studio-drawer-close {
    display: block;
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    z-index: 5;
    height: 1.85rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(226, 208, 170, 0.25);
    background: rgba(226, 208, 170, 0.08);
    color: #f4ecdf;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: auto;
  }

  .studio-drawer-handle {
    display: flex;
    justify-content: center;
    padding: 0.55rem 0 0.15rem;
    flex-shrink: 0;
  }

  .studio-drawer-handle span {
    width: 2.4rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(226, 208, 170, 0.35);
  }

  .studio-tab-rail {
    width: 3.4rem !important;
    padding-top: 2.4rem;
    pointer-events: auto;
    z-index: 2;
  }

  .studio-tab-rail .tab-btn {
    pointer-events: auto;
    min-height: 2.75rem;
  }

  .studio-tab-rail .tab-btn span {
    display: none;
  }

  #sidebar-left-content {
    padding-top: 2.6rem !important;
    min-height: 0;
    flex: 1;
    overflow-y: auto !important;
  }

  #studio-mobile-bar.studio-mobile-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90 !important;
    height: 3.65rem;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
    background: rgba(10, 8, 7, 0.96);
    border-top: 1px solid rgba(226, 208, 170, 0.16);
    backdrop-filter: blur(10px);
    pointer-events: auto;
  }

  .studio-mobile-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border: 0;
    background: transparent;
    color: rgba(244, 236, 223, 0.72);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
  }

  .studio-mobile-bar-btn--wa {
    color: #86efac;
  }

  body.drawer-tools-open #btn-mobile-tools,
  body.drawer-inspector-open #btn-mobile-inspector {
    color: #e2d0aa;
  }

  .studio-export-menu {
    position: fixed !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: 4.4rem !important;
    top: auto !important;
    width: auto !important;
    max-height: min(70vh, 480px);
    overflow-y: auto;
    margin: 0 !important;
    z-index: 95 !important;
  }

  .live-edit-dock {
    width: calc(100% - 0.75rem);
    top: 0.35rem;
    padding: 0.75rem;
  }

  .live-edit-dock-actions {
    flex-wrap: wrap;
  }

  #canvas-quick-toolbar {
    width: 100%;
    overflow-x: auto;
  }

  .lobby-templates-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .lobby-hero {
    margin-bottom: 1.25rem;
  }

  .lobby-title {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }
}

@media (max-width: 640px) {
  .studio-nav-brand .studio-brand-rule {
    display: none;
  }

  .studio-brand-btn {
    max-width: 42vw;
  }

  .studio-suite-title,
  .studio-suite-badge {
    max-width: 100%;
  }

  .studio-side-btn {
    min-width: 3.2rem;
    padding: 0.3rem 0.45rem;
  }

  .studio-side-label {
    font-size: 0.78rem;
  }

  .studio-tool-cluster,
  .studio-zoom-cluster {
    padding: 0.12rem;
  }

  .studio-zoom-value {
    min-width: 2.2rem;
    font-size: 0.64rem;
  }

  .studio-nav-actions .studio-nav-chip {
    display: none;
  }

  #sidebar-left.studio-sidebar-left,
  #sidebar-right.studio-sidebar-right {
    height: min(74vh, 580px);
  }

  .lobby-templates-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .lobby-template-preview {
    height: 200px;
  }

  .lobby-template-preview-scale {
    transform: scale(0.32);
    transform-origin: top center;
  }

  .lobby-section-name {
    font-size: 1.35rem;
  }

  .lobby-section-tag {
    font-size: 0.78rem;
  }
}

/* Guest preview envelope — responsive */
.guest-envelope-wrap {
  width: min(400px, 92vw);
  height: min(560px, 128vw);
}

.guest-envelope-card {
  width: min(350px, 84vw);
  height: min(490px, 115vw);
}

@media (max-width: 640px) {
  #close-guest-modal {
    top: 0.75rem !important;
    right: 0.75rem !important;
  }

  #guest-experience-modal .max-w-5xl,
  #guest-experience-modal > div {
    max-width: 100%;
  }
}


