/* ============================================================
   STUDIO 2: tabs of collapsible sections, a joyful light look.
   Loaded after studio.css; restates its tokens for the Zimere
   palette (off-white and golden brown) and styles the new shell.
   Every older component reads these tokens.
   ============================================================ */
:root {
  --bg: #f6efe4;
  --panel: #fffdf8;
  --panel-2: #fbf7f0;
  --panel-3: #f2e7d6;
  --line: #e7dbc9;
  --text: #2b1d12;
  --muted: #74614b;
  --gold: #8b5e2b;
  --gold-deep: #5c3b19;
  --gold-soft: #f3e6d4;
  --script: "Pinyon Script", "Great Vibes", cursive;
  --shadow: 0 18px 40px -26px rgba(92, 59, 25, .45);
}
body { background: var(--bg); color: var(--text); }
.pill.is-active, .btn--gold, .lang-chip.is-active { color: #fff; }
.btn--gold { box-shadow: 0 10px 22px -12px rgba(120, 80, 40, .7); }
.item__remove:hover { color: #c0392b; background: rgba(0, 0, 0, .05); }
.wizard { background: var(--panel); border-right: 1px solid var(--line); }
.stage {
  background:
    radial-gradient(circle, rgba(168, 124, 82, .14) 1px, transparent 1.5px) 0 0 / 22px 22px,
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .9), transparent 60%),
    var(--bg);
}

/* ---------- head ---------- */
.wizard__head { padding: 16px 24px 0; border-bottom: 1px solid var(--line); background: var(--panel); }
.studio-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.studio-back { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px 7px 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.studio-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.studio-top .brand { margin: 0; text-decoration: none; color: var(--text); }
.studio-top .brand svg { stroke: var(--gold); }
.studio-price { margin-inline-start: auto; display: inline-flex; align-items: baseline; gap: 8px; font-size: 15px; }
.studio-price b { font-weight: 700; }
.studio-price__tier { align-self: center; padding: 3px 9px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: var(--panel-3); }
.studio-price__tier--modern { background: #25345c; color: #dfe7ff; }
.studio-price__tier--premium { background: linear-gradient(120deg, #e8cf8f, #b8893a); color: #1d1408; }
.studio-price__tier--luxe { background: #120d10; color: #e6cf95; }

.studio-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-bottom: 14px; }
.studio-tab {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.studio-tab:hover { transform: translateY(-1px); border-color: var(--gold); }
.studio-tab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.studio-tab.is-active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold); }

.wizard__body { padding: 18px 24px 30px; background: var(--panel); overflow-x: hidden; }
.wizard__body.has-more::after { background: linear-gradient(to top, var(--panel), transparent); }
.studio-lead { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.wizard__foot { z-index: 20; background: var(--panel); border-top: 1px solid var(--line); }
/* Positioned so it stays above cards that lift on hover. On phones the
   older rule makes it sticky, which positions it already. */
@media (min-width: 941px) { .wizard__foot { position: relative; } }

/* ---------- accordion sections ---------- */
.acc {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: border-color .25s, box-shadow .25s;
}
.acc.is-open { border-color: #dcc7a8; box-shadow: var(--shadow); }
.acc__head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: start;
  font: inherit;
  cursor: pointer;
}
.acc__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--gold-soft); color: var(--gold-deep); transition: background .25s, color .25s; }
.acc.is-open .acc__icon { background: var(--gold); color: #fff; }
.acc__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acc__title { flex: 1; min-width: 0; display: grid; gap: 1px; }
.acc__title b { font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.15; }
.acc__title small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc__chev { flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s; }
.acc.is-open .acc__chev { transform: rotate(-135deg) translate(-2px, -2px); }
.acc__body { padding: 0 16px 18px; border-top: 1px dashed var(--line); animation: acc-in .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } }
.acc__body > *:first-child { margin-top: 14px; }

/* ---------- choice tiles ---------- */
.tile-grid { display: grid; gap: 10px; }
.tile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .tile-grid--2, .tile-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  color: var(--text);
  text-align: start;
  font: inherit;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-2px); border-color: #d9c2a0; box-shadow: var(--shadow); }
.tile.is-active { border-color: var(--gold); background: #fffaf3; box-shadow: inset 0 0 0 1px var(--gold); }
.tile.is-active::after {
  content: "\2713";
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.tile__art { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--panel-2); color: var(--gold-deep); overflow: hidden; }
.tile__art svg { width: 36px; height: 36px; }
.tile__text { min-width: 0; display: grid; gap: 1px; }
.tile__text b { font-size: 13.5px; font-weight: 700; }
.tile__text small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tile-grid--3 .tile { flex-direction: column; justify-content: center; text-align: center; padding: 14px 8px; }
.type-sample { font-size: 24px; line-height: 1; }
.type-sample--script { font-size: 12px; }
.fx-icon { font-size: 22px; }
.fx-icon--petals { color: #e6879b; }
.fx-icon--confetti { color: #4d9de0; text-shadow: 6px 2px 0 #f2c14e, -6px 3px 0 #e15554; }
.fx-icon--hearts { color: #e15570; }
.fx-icon--stars { color: #e6b422; }
.fx-icon--gold { color: #c9a24d; text-shadow: 0 0 8px rgba(201, 162, 77, .7); }
.fx-icon--none { color: var(--muted); }

.mini-label { margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.note-chip { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff6e6; border: 1px solid #f0d9b0; font-size: 12.5px; color: #8a5a1c; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 14px; padding-bottom: 20px; }
.swatch { position: relative; width: 44px; height: 44px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 4px 10px -4px rgba(0, 0, 0, .3); cursor: pointer; }
.swatch span { position: absolute; top: 100%; left: 50%; translate: -50% 5px; white-space: nowrap; font-size: 10px; color: var(--muted); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--gold), 0 4px 10px -4px rgba(0, 0, 0, .3); }

.mono-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mono-tile { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border: 0; border-radius: 14px; background: var(--mt-bg); color: #fff; font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.mono-tile:hover { transform: translateY(-2px); }
.mono-tile svg { width: 72px; height: 72px; overflow: visible; }
.mono-tile.is-active { box-shadow: 0 0 0 3px var(--gold), 0 10px 20px -10px rgba(0, 0, 0, .5); }

.palette-list { display: grid; gap: 8px; }
.palette-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); text-align: start; font: inherit; color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s; }
.palette-row:hover { transform: translateX(2px); border-color: #d9c2a0; }
.palette-row.is-active { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: #fffaf3; }
.palette-row__dots { display: flex; }
.palette-row__dots i { width: 22px; height: 22px; margin-inline-end: -6px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.palette-row__text { display: grid; gap: 1px; padding-inline-start: 8px; }
.palette-row__text b { font-size: 13.5px; }
.palette-row__text small { font-size: 11.5px; color: var(--muted); font-style: italic; }

/* ---------- photos ---------- */
.dropzone { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed #dcc7a8; border-radius: 14px; background: var(--panel-2); text-align: center; cursor: pointer; }
.dropzone input { display: none; }
.dropzone b { font-size: 14px; color: var(--gold-deep); }
.dropzone span { font-size: 12px; color: var(--muted); }
.dropzone.is-disabled { cursor: not-allowed; opacity: .6; border-style: solid; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--panel-3); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .item__remove { position: absolute; top: 4px; right: 4px; background: rgba(255, 255, 255, .9); }

/* ---------- the share tab's guest card ---------- */
.section-flat { display: grid; gap: 16px; }
.wa-card__box { max-width: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.wa-card__img { display: grid; justify-items: center; align-content: center; gap: 4px; aspect-ratio: 1.91 / 1; text-align: center; padding: 14px; }
.wa-card__kicker { font-size: 9px; letter-spacing: .26em; text-transform: uppercase; }
.wa-card__names { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.wa-card__date { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.wa-card__meta { display: grid; gap: 2px; padding: 10px 12px; font-size: 12.5px; color: #222; }
.wa-card__meta span { color: #666; }
.wa-card__meta small { color: #999; font-size: 11px; }

/* ---------- preview pane ---------- */
.stage__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); }
.seg__btn { padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.seg__btn.is-active { background: var(--gold); color: #fff; box-shadow: 0 6px 14px -8px rgba(120, 80, 40, .8); }
.replay { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .85); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.replay svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.replay:hover { border-color: var(--gold); }
.stage__note { margin: 0; font-size: 11.5px; color: var(--muted); }
.stage__note strong { color: var(--gold-deep); }
.phone { box-shadow: 0 40px 80px -30px rgba(60, 40, 20, .55), 0 0 0 1px rgba(0, 0, 0, .2); }

/* the WhatsApp preview, drawn over the phone screen */
.wa { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: #efe7dd; }
.wa[hidden] { display: none; }
.wa__bar { display: flex; align-items: center; gap: 10px; padding: 40px 14px 10px; background: #f6f6f6; border-bottom: 1px solid #e3e3e3; font-size: 13px; color: #111; }
.wa__bar small { display: block; font-size: 11px; color: #777; }
.wa__avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #fff; font-weight: 700; }
.wa__wall { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 10px; background: radial-gradient(circle, rgba(0, 0, 0, .04) 1px, transparent 1.5px) 0 0 / 16px 16px, #efe7dd; }
.wa__msg { align-self: flex-end; max-width: 88%; padding: 4px 4px 6px; border-radius: 10px 2px 10px 10px; background: #dcf8c6; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); font-size: 12px; color: #111; }
.wa__msg p { margin: 6px 6px 0; color: #027eb5; word-break: break-all; }
.wa__time { display: block; margin: 2px 6px 0; text-align: end; font-size: 10px; color: #6a8c6a; }
.wa-card--compact .wa-card__box { max-width: none; border: 0; border-radius: 8px; box-shadow: none; }
.wa-card--compact .wa-card__names { font-size: 20px; }
.wa-card--compact .wa-card__meta { background: #cdeeb6; font-size: 11.5px; }

/* ---------- warmed pickers ---------- */
.lang-chip.is-active { background: var(--gold); border-color: var(--gold); }
.tpl-card.is-active { box-shadow: 0 0 0 2px var(--gold); }

@media (max-width: 940px) {
  .wizard__head { padding: 12px 14px 0; }
  .wizard__body { padding: 14px 14px 24px; }
  .studio-tab { font-size: 10px; letter-spacing: .06em; }
  .studio-top .brand small { display: none; }
}

/* A concept draws its own opening: the classic tiles are shown, but locked. */
.tile--locked { cursor: default; opacity: .45; filter: grayscale(.6); }
.tile--locked:hover { transform: none; box-shadow: none; border-color: var(--line); }

/* ============================================================
   STUDIO 3: a step rail on the left, a settings panel that can be
   closed, and a preview that can take the whole screen.
   ============================================================ */
.studio {
  grid-template-columns: var(--rail-w, 176px) minmax(380px, 540px) minmax(0, 1fr);
  transition: grid-template-columns .45s cubic-bezier(.16, 1, .3, 1);
}
body.rail-folded { --rail-w: 76px; }
body.panel-closed .studio { grid-template-columns: var(--rail-w, 176px) 0 minmax(0, 1fr); }
body.panel-closed .wizard { visibility: hidden; overflow: hidden; border: 0; }

/* ---------- the rail ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100dvh;
  padding: 18px 12px 14px;
  background: linear-gradient(180deg, #fffdf8, #f5ede1);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.rail__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--gold); text-decoration: none; font-family: var(--script); font-size: 32px; font-weight: 400; line-height: 1; }
.rail__brand svg { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.4; }
.rail__tabs { display: grid; gap: 8px; }
.rail-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.rail-tab:hover { background: rgba(255, 255, 255, .7); color: var(--text); transform: translateX(2px); }
.rail-tab.is-active { background: #fff; border-color: #e3cfb2; color: var(--gold-deep); box-shadow: var(--shadow); }
.rail-tab__icon { position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.rail-tab:hover .rail-tab__icon { transform: rotate(-6deg) scale(1.06); }
.rail-tab.is-active .rail-tab__icon { background: var(--gold); color: #fff; }
.rail-tab__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-tab__no {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}
.rail-tab.is-done .rail-tab__no { background: #3f9b62; box-shadow: none; color: #fff; }
.rail-tab__text { display: grid; gap: 1px; min-width: 0; white-space: nowrap; }
.rail-tab__text b { font-size: 14px; color: var(--text); }
.rail-tab.is-active .rail-tab__text b { color: var(--gold-deep); }
.rail-tab__text small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.rail__fold { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .7); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.rail__fold svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s; }
body.rail-folded .rail__fold svg { transform: rotate(180deg); }
body.rail-folded .rail__brand span,
body.rail-folded .rail-tab__text,
body.rail-folded .rail__fold span { display: none; }
body.rail-folded .rail-tab, body.rail-folded .rail__fold { justify-content: center; }

/* ---------- the panel's own head ---------- */
.panel-title { display: grid; gap: 0; min-width: 0; }
.panel-title small { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.panel-title h1 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.1; }
.wizard__head { padding-bottom: 14px; }
.studio-top { margin-bottom: 0; }
.panel-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .25s, color .2s;
}
.panel-close:hover { transform: rotate(90deg); color: var(--text); }
.studio-lead { padding: 12px 14px; border-radius: 12px; background: linear-gradient(120deg, #fff7ea, #fbeee8); border: 1px solid #f1dcc0; color: #7a5a35; font-size: 13.5px; }

/* finished sections get a green tick on their icon */
.acc__icon { position: relative; }
.acc__tick { position: absolute; right: -5px; bottom: -5px; display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #3f9b62; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; box-shadow: 0 0 0 2px #fff; }
.acc.is-done .acc__tick { display: grid; animation: tick-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes tick-pop { from { transform: scale(0); } }

/* ---------- expanded preview ---------- */
/* Height is the limit on a laptop, so the expanded phone takes all of it:
   full screen hides the browser's own bars, and the phone fills the rest. */
body.is-expanded .stage { padding: 12px 20px; gap: 10px; }
body.is-expanded .phone { width: auto; height: calc(100dvh - 76px); max-height: none; max-width: none; aspect-ratio: 9 / 19.5; }
body.is-expanded .stage__note { display: none; }
.stage { transition: padding .4s; }

/* ---------- a moment of joy ---------- */
.petal-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.petal { position: absolute; will-change: transform, opacity; border-radius: 50% 0 50% 50%; }
.petal--plain { border-radius: 0; }
.studio-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 95;
  padding: 12px 20px;
  border-radius: 99px;
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5);
  transform: translate(-50%, 30px);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .3s;
}
.studio-toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- phones: the rail becomes a bottom bar ---------- */
@media (max-width: 940px) {
  .studio, body.panel-closed .studio { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    inset: auto 0 0 0;
    height: auto;
    flex-direction: row;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: #fff;
    border-right: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px -20px rgba(0, 0, 0, .3);
  }
  .rail__brand, .rail__fold, .rail-tab__text small { display: none; }
  .rail__tabs { flex: 1; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .rail-tab { flex-direction: column; gap: 3px; padding: 6px 2px; justify-content: center; }
  .rail-tab__icon { width: 34px; height: 34px; }
  .rail-tab__text { justify-items: center; }
  .rail-tab__text b { font-size: 11px; }
  body.rail-folded .rail-tab__text { display: grid; }
  body { padding-bottom: 76px; }
  .wizard__foot { bottom: 72px; }
  .panel-close, #expand-btn { display: none; }
  body.panel-closed .wizard { visibility: visible; }
  .panel-title h1 { font-size: 24px; }
}

/* ---------- "your invitation is live" ---------- */
.live-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(43, 36, 32, .45);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s;
}
.live-modal.is-on { opacity: 1; }
.live-modal__card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(100%, 520px);
  padding: 34px 28px 26px;
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 0%, #fff4e2, transparent 60%), #fff;
  box-shadow: 0 40px 80px -30px rgba(60, 40, 20, .6);
  text-align: center;
  transform: translateY(20px) scale(.96);
  transition: transform .45s cubic-bezier(.3, 1.5, .5, 1);
}
.live-modal.is-on .live-modal__card { transform: none; }
.live-modal__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 20px; cursor: pointer; }
.live-modal__badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #3f9b62; color: #fff; font-size: 30px; font-weight: 800; box-shadow: 0 0 0 8px #e3f3e8; animation: tick-pop .6s cubic-bezier(.3, 1.8, .5, 1); }
.live-modal__card h2 { margin: 6px 0 0; font-family: var(--display); font-size: 32px; font-weight: 600; }
.live-modal__card > p { margin: 0; color: var(--muted); font-size: 14px; }
.live-modal__link { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.live-modal__link input { flex: 1; min-width: 0; padding: 13px 14px; border: 2px solid #e3cfb2; border-radius: 12px; background: #fffaf3; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.live-modal__link .btn { flex: none; }
.live-modal__link .btn.is-copied { background: #3f9b62; }
.live-modal__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.live-modal__actions .btn { padding: 11px 18px; font-size: 11px; }
.live-modal__dash { display: grid; gap: 4px; width: 100%; margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: start; }
.live-modal__dash b { font-size: 13.5px; }
.live-modal__dash span { font-size: 12.5px; color: var(--muted); }
.live-modal__link--small input { padding: 9px 12px; font-size: 12px; font-weight: 500; border-width: 1px; }
.live-modal__link--small .btn { padding: 9px 14px; font-size: 11px; }
.live-modal__keep { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: 100%; padding-top: 12px; border-top: 1px dashed var(--line); }
.live-modal__keep > span { font-size: 12.5px; color: var(--muted); }
.live-modal__keep .btn { padding: 9px 14px; font-size: 10.5px; }
.live-modal__sent { flex-basis: 100%; margin: 0 0 4px; padding: 8px 12px; border-radius: 10px; background: #e7f3e9; color: #1d6b38; font-size: 13px; font-weight: 600; }
.live-modal__wa { width: 100%; margin-top: 4px; background: #25a35a; }
.live-modal__wa-note { margin: -4px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- UPI payment panel (studio/upi-pay.js) ---------- */
/* The panel toggles parts with the hidden attribute; the display rules
   below must not override it. */
.upi-pay [hidden] { display: none !important; }
.upi-pay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(36, 23, 13, .62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
}
.upi-pay__card {
  position: relative; display: grid; gap: 12px; justify-items: center; text-align: center;
  width: min(100%, 400px); padding: 28px 24px 24px;
  border-radius: 22px; background: var(--panel); color: var(--text);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
}
.upi-pay__close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--panel-3); color: var(--text); font-size: 24px; cursor: pointer;
}
.upi-pay__eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.upi-pay__amount { margin: 0; font-family: var(--display); font-size: 52px; font-weight: 600; line-height: 1; }
.upi-pay__amount b { color: var(--gold); }
.upi-pay__exact { margin: 0; max-width: 32ch; font-size: 13.5px; color: var(--muted); }
.upi-pay__app {
  display: block; width: 100%; margin-top: 6px; padding: 15px 20px; border-radius: 99px;
  background: var(--gold); color: #fffdf8; font-size: 16px; font-weight: 700; text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(92, 59, 25, .8);
}
.upi-pay__apps, .upi-pay__scan { margin: 0; font-size: 12.5px; color: var(--muted); }
.upi-pay__qr { width: 220px; max-width: 70vw; padding: 8px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.upi-pay__qr svg { display: block; width: 100%; height: auto; }
.upi-pay__noqr { margin: 8px; font-size: 13px; color: var(--muted); }
.upi-pay__to {
  display: grid; gap: 4px; width: 100%; padding: 12px 14px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 14px;
}
.upi-pay__id { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.upi-pay__id code { font-size: 14px; font-weight: 600; }
.upi-pay__copy { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 3px 9px; font-size: 12px; cursor: pointer; }
.upi-pay__ref { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.upi-pay__status { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 0; font-size: 14.5px; font-weight: 600; }
.upi-pay__spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: upi-spin .9s linear infinite; }
@keyframes upi-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .upi-pay__spin { animation: none; } }
.upi-pay.is-paid .upi-pay__status { color: #1d6b38; }
.upi-pay.is-paid .upi-pay__spin, .upi-pay.is-expired .upi-pay__spin { display: none; }
.upi-pay__claim { display: grid; gap: 6px; width: 100%; text-align: start; font-size: 13px; }
.upi-pay__claim-row { display: flex; gap: 8px; }
.upi-pay__claim input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; letter-spacing: .06em; background: var(--panel); color: var(--text); }
.upi-pay__claim button { border: 0; border-radius: 10px; padding: 10px 16px; background: var(--gold); color: #fffdf8; font-weight: 700; cursor: pointer; }
.upi-pay__claim-msg { color: var(--muted); }
.upi-pay__phone-qr { border: 0; background: none; color: var(--gold); font-size: 13px; text-decoration: underline; cursor: pointer; }
.offer-row { display: flex; gap: 8px; }
.offer-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .06em; }

/* ============================================================
   PHONES
   Most people make their invitation on a phone. The picker showed
   one design per row (46 designs, 14 screens of scrolling) and the
   preview drew a phone inside the phone, cut off at the bottom.
   ============================================================ */
@media (max-width: 940px) {
  /* Preview: the invitation itself, filling the space between the top
     tabs and the step bar - no drawn bezel shrinking it. */
  body[data-tab="preview"] .stage { gap: 8px; padding: 8px 10px 10px; }
  body[data-tab="preview"] .stage__bar { gap: 6px; }
  body[data-tab="preview"] .stage__note { display: none; }
  .stage .phone {
    width: 100%;
    max-width: 520px;
    height: calc(100dvh - 46px - 76px - 64px);
    min-height: 420px;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 18px;
    background: #000;
    box-shadow: 0 18px 40px -24px rgba(60, 40, 20, .55), 0 0 0 1px var(--line);
  }
  .stage .phone__notch { display: none; }
  .stage .phone__screen { border-radius: 18px; }

  .tabs button { padding: 13px; }
}

@media (max-width: 560px) {
  /* Two designs to a row, so the whole collection is a short scroll. */
  .wizard .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wizard .tpl-card__art { height: 112px; }
  .wizard .tpl-card__meta { padding: 8px 10px 10px; }
  /* The one-line description does not fit two-up; the name, price and
     the picture carry the choice, and Preview shows the rest. */
  .wizard .tpl-card__meta > span:not([class]) { display: none; }
}

/* Files that did not make it up at publish: said where it cannot be missed. */
.live-modal__warn {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e3b4a2;
  border-radius: 12px;
  background: #fbefe9;
  color: #7a2e16;
  font-size: 14px;
  text-align: start;
}
@media (max-width: 940px) {
  body[data-tab="preview"] .stage { justify-content: flex-start; }
}
