/* ==========================================================================
   WidgetLocket 2.0 — Premium Cute Creator UI
   Inspired by the warm, clean, bright spirit of khunganh.nodns.vn
   Mobile-first, one-hand friendly, 4-step clear workflow.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg-main: #fffdf8;
  --bg-card: #ffffff;
  --bg-subtle: #fcf9f2;
  --bg-cream: #fff5e4;
  --bg-cream-soft: #fff9ef;
  --line: #ede4d3;
  --line-strong: #ded1bc;
  --ink: #2b2318;
  --ink-soft: #5b4d3a;
  --muted: #8c7d66;
  --muted-light: #ab9d88;
  
  /* Cute Pastel Accents */
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-light: #fef3c7;
  --coral: #ff6b8b;
  --coral-soft: #ffe4ec;
  --pink-pastel: #fbcfe8;
  --purple: #8b5cf6;
  --purple-dark: #6d28d9;
  --purple-soft: #ede9fe;
  --mint: #10b981;
  --mint-soft: #d1fae5;
  --sky: #38bdf8;
  --sky-soft: #e0f2fe;

  --shadow-sm: 0 4px 12px rgba(80, 50, 20, 0.04);
  --shadow-md: 0 10px 28px rgba(80, 50, 20, 0.06);
  --shadow-lg: 0 20px 45px rgba(80, 50, 20, 0.09);
  --shadow-float: 0 16px 36px rgba(80, 50, 20, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  font-family: ui-rounded, "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: 
    radial-gradient(circle at 10% 5%, #fffaee 0%, transparent 40%),
    radial-gradient(circle at 90% 12%, #fff1f5 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, #f5f2ff 0%, transparent 50%),
    var(--bg-main);
  background-attachment: fixed;
  padding-bottom: 90px; /* Space for sticky bottom bar */
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* Page Container */
.appShell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 32px;
}

/* ==========================================================================
   Header & Brand
   ========================================================================== */
.topHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.brandLink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brandBadge {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.brandText {
  display: flex;
  flex-direction: column;
}

.brandName {
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.brandName span {
  color: var(--amber-dark);
}

.brandSub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accountChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-cream-soft);
  font-size: 12px;
  font-weight: 750;
  color: var(--ink-soft);
}

.accountChip.gold {
  border-color: #fcd34d;
  background: #fef9c3;
  color: #92400e;
}

.accountChip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.textBtn {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.textBtn:hover {
  color: var(--coral);
  background: rgba(255, 107, 139, 0.08);
}

/* ==========================================================================
   Stepper Navigation Bar (4 Steps)
   ========================================================================== */
.stepperBar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  position: sticky;
  top: 12px;
  z-index: 40;
}

.stepTab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  white-space: nowrap;
}

.stepTab .stepNum {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 850;
  color: var(--muted);
  transition: all 0.2s;
}

.stepTab:hover {
  color: var(--ink);
  background: rgba(255, 245, 228, 0.5);
}

.stepTab.active {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(80, 50, 20, 0.08);
}

.stepTab.active .stepNum {
  background: linear-gradient(135deg, var(--amber), #fbbf24);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.stepTab.completed .stepNum {
  background: var(--mint-soft);
  color: var(--mint);
  border-color: #a7f3d0;
}

/* ==========================================================================
   Page Layout & Sections
   ========================================================================== */
.viewContainer {
  display: block;
  min-height: 480px;
}

.viewStep {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.viewStep.active {
  display: block;
}

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

/* Cards & Panels */
.cuteCard {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  padding: 26px;
  margin-bottom: 20px;
  position: relative;
}

.cardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.cardEyebrow {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin-bottom: 4px;
}

.cardTitle {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.cardDesc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 4px;
}

/* Two-column layout for editor & preview */
.splitView {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.formCol {
  min-width: 0;
}

.previewCol {
  min-width: 0;
  position: sticky;
  top: 76px;
}

/* ==========================================================================
   Form Controls, Inputs & Buttons
   ========================================================================== */
.inputGroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.inputLabel {
  font-size: 12px;
  font-weight: 750;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inputLabel small {
  font-weight: 600;
  color: var(--muted-light);
}

.textInput, .selectInput {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: 14px;
  transition: all 0.2s;
}

.textInput:focus, .selectInput:focus {
  outline: none;
  border-color: var(--amber);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.textInput::placeholder {
  color: var(--muted-light);
}

/* Primary Cute Button */
.btnPrimary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--amber), #fbbf24);
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.32);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.btnPrimary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.42);
  filter: brightness(1.03);
}

.btnPrimary:active {
  transform: translateY(0);
}

.btnPrimary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary Cute Button */
.btnSecondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
  transition: all 0.2s;
}

.btnSecondary:hover {
  border-color: var(--amber);
  color: var(--amber-dark);
  background: var(--bg-cream-soft);
}

.btnSecondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Danger / Delete button */
.btnDanger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  font-size: 15px;
  transition: all 0.2s;
}

.btnDanger:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ==========================================================================
   STEP 1: Tài khoản (Account Verification)
   ========================================================================== */
.accountHeroBox {
  text-align: center;
  padding: 42px 24px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 50% 0%, #fff7e4 0%, #ffffff 70%);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.accountHeroSparkle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-cream);
  border: 1px solid #fde68a;
  color: var(--amber-dark);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 12px;
}

.accountHeroTitle {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1.2;
}

.accountHeroTitle em {
  font-style: normal;
  color: var(--amber-dark);
  background: linear-gradient(180deg, transparent 65%, #fde68a 65%);
}

.accountHeroDesc {
  max-width: 520px;
  margin: 12px auto 26px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.accountSearchForm {
  max-width: 500px;
  margin: 0 auto;
}

.searchBarWrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: #ffffff;
  padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.searchBarWrapper:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.searchPrefix {
  font-size: 16px;
  font-weight: 800;
  color: var(--amber-dark);
  margin-right: 6px;
  user-select: none;
}

.searchInput {
  flex: 1;
  min-height: 44px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.searchInput::placeholder {
  color: var(--muted-light);
  font-weight: 500;
}

.searchSubmitBtn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-lg);
}

.searchHelperChips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.searchChip {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Verified Account Preview Card (Only shows after account is found) */
.verifiedAccountCard {
  max-width: 600px;
  margin: 0 auto;
  border: 2px solid #fcd34d;
  background: linear-gradient(145deg, #fffdf8, #fffbeb);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.verifiedAccountCard::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  filter: blur(20px);
}

.verifiedCardBody {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatarRing {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

.accountDetails {
  flex: 1;
  min-width: 0;
}

.accountNameRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.accountUsername {
  font-size: 20px;
  font-weight: 850;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.roleTag {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.roleTag.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.roleTag.free {
  background: #f1f5f9;
  color: #64748b;
}

.accountUidRow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.copyUidBtn {
  font-size: 11px;
  color: var(--amber-dark);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.1);
}

.verifiedCardActions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed #fde68a;
}

/* ==========================================================================
   STEP 2: Gold & Caption
   ========================================================================== */
/* Gold Date Card */
.goldDateCard {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffdf8, #fffdf2);
}

.dateModeSwitch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.dateModeOption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.dateModeOption input[type="radio"] {
  accent-color: var(--amber);
  width: 17px;
  height: 17px;
}

.dateModeOption.active {
  border-color: var(--amber);
  background: var(--bg-cream-soft);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.dateModeOption b {
  display: block;
  font-size: 12px;
  color: var(--ink);
}

.dateModeOption small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.goldDateStatus {
  font-size: 12px;
  color: var(--amber-dark);
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Caption Section */
.captionAdditiveNotice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.captionAdditiveNotice .infoIcon {
  font-size: 16px;
  line-height: 1;
}

.captionList {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.captionItemCard {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.captionItemCard:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.captionMainRow {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
}

.emojiSelectBox {
  min-height: 46px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--bg-subtle);
  font-size: 20px;
  text-align: center;
  padding: 4px;
}

.captionPaletteRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.paletteLabel {
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
}

.palettePresets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.colorSwatchBtn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s;
}

.colorSwatchBtn:hover {
  transform: scale(1.15);
}

.colorSwatchBtn.active {
  box-shadow: 0 0 0 2.5px var(--amber);
  transform: scale(1.12);
}

.customColorPickers {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.colorPickMini {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.addCaptionBtn {
  width: 100%;
  min-height: 44px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--amber-dark);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.addCaptionBtn:hover {
  background: var(--bg-cream-soft);
  border-color: var(--amber);
}

/* ==========================================================================
   Real Locket Camera Preview (Floating Caption Bar & Gold Card)
   ========================================================================== */
.locketCameraMockup {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 38px;
  background: #121316;
  border: 8px solid #23252a;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 14px 24px;
  color: #ffffff;
}

/* Dynamic island / camera header */
.locketCameraHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  z-index: 2;
}

.cameraViewfinder {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 40%, #2a2d36 0%, #16171b 80%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cameraPhotoSample {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
}

.cameraOverlaySparkles {
  position: absolute;
  top: 30%;
  font-size: 40px;
  opacity: 0.15;
  user-select: none;
}

/* Real Floating Caption Pill in Locket App */
.locketCaptionArea {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.realCaptionPillBar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 90%;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.realCaptionEmoji {
  font-size: 18px;
  line-height: 1;
}

.realCaptionText {
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Camera shutter & bottom controls */
.cameraControlsBar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 8px;
}

.shutterRing {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  padding: 3px;
  display: grid;
  place-items: center;
}

.shutterButton {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
}

/* Gold Membership Card Mockup */
.goldCardMockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1.5px solid #d4af37;
  background: linear-gradient(135deg, #2a241b, #181613);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  margin-top: 14px;
}

.goldHeartIcon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.goldCardTexts {
  display: flex;
  flex-direction: column;
}

.goldCardTitle {
  font-size: 13px;
  font-weight: 850;
  color: #fef08a;
  letter-spacing: -0.01em;
}

.goldCardDate {
  font-size: 11px;
  color: #d1b165;
  font-weight: 600;
}

/* ==========================================================================
   STEP 3: Photobooth Suite (No AI - Pure Canvas)
   ========================================================================== */
.photoTrayBox {
  margin-bottom: 22px;
  padding: 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--bg-cream-soft);
}

.photoTrayHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.photoCountBadge {
  font-size: 12px;
  font-weight: 850;
  color: var(--amber-dark);
  background: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #fde68a;
}

.photoThumbnailsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
}

.photoThumbSlot {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.photoThumbNum {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.photoThumbRemove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.photoUploadPlaceholder {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--line-strong);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.photoUploadPlaceholder:hover {
  border-color: var(--amber);
  color: var(--amber-dark);
  background: var(--bg-cream);
}

.photoUploadPlaceholder .plusIcon {
  font-size: 20px;
  font-weight: 700;
}

.photoUploadPlaceholder small {
  font-size: 10px;
  font-weight: 750;
}

/* Photobooth Frame Selector Tabs */
.photoboothTabs {
  display: flex;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  overflow-x: auto;
}

.pbTabBtn {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: all 0.2s;
}

.pbTabBtn.active {
  background: var(--amber-light);
  color: var(--amber-dark);
  border-color: #fcd34d;
}

/* Frame Cards Grid */
.pbFrameGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.pbFrameCard {
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: all 0.2s;
}

.pbFrameCard:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.pbFrameCard.active {
  border-color: var(--amber);
  background: var(--bg-cream-soft);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.pbFrameCardThumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: #f8fafc;
}

.pbFrameCardTitle {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.pbFrameCardSlots {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}

.pbFrameCheck {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 11px;
  display: none;
  place-items: center;
}

.pbFrameCard.active .pbFrameCheck {
  display: grid;
}

/* Custom Frame Studio Inputs */
.customStudioGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Canvas Photobooth Result */
.canvasPreviewShell {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  text-align: center;
}

.canvasWrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background: #f1f5f9;
}

#photoboothCanvas {
  display: block;
  width: 100%;
  height: auto;
}

.canvasLoadingOverlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--amber-dark);
}

.canvasActionsBar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* ==========================================================================
   STEP 4: Khung Widget (Widget Frame)
   ========================================================================== */
.widgetMockupWrapper {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  text-align: center;
}

.realSquircleWidget {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 32px;
  background: #ffffff;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  border: 8px solid #c4b5fd;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

.widgetPhotoContainer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #f1f5f9;
}

.widgetFrameOverlayImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 5;
}

.widgetInfoRow {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3b2855;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.widgetNickname {
  font-size: 11px;
  font-weight: 850;
}

.widgetDateTag {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
}

/* Preset Frames Swatches */
.presetButtonsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.presetFrameBtn {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  background: #ffffff;
  text-align: center;
  transition: all 0.2s;
}

.presetFrameBtn:hover {
  border-color: var(--amber);
  transform: translateY(-1px);
}

.presetFrameBtn.active {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.presetColorBar {
  display: block;
  height: 22px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.presetFrameBtn b {
  display: block;
  font-size: 10px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Range Sliders */
.sliderField {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sliderValueText {
  float: right;
  font-weight: 850;
  color: var(--amber-dark);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--line);
  outline: none;
  accent-color: var(--amber);
  cursor: pointer;
}

/* ==========================================================================
   Sticky Bottom Bar (Mobile Thumb-Friendly)
   ========================================================================== */
.stickyBottomBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(80, 50, 20, 0.08);
  padding: 10px 18px;
  z-index: 100;
}

.bottomBarInner {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bottomBarLeft {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bottomStepIndicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.bottomBarSaveBtn {
  min-height: 48px;
  padding: 10px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.38);
}

/* ==========================================================================
   Toast Notifications System
   ========================================================================== */
.toastContainer {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
  width: min(90%, 420px);
}

.cuteToast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 750;
  box-shadow: var(--shadow-float);
  animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes toastSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.cuteToast.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.cuteToast.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.cuteToast.info {
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Skeleton Shimmer
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .splitView {
    grid-template-columns: 1fr;
  }
  
  .previewCol {
    position: static;
    order: -1;
    margin-bottom: 24px;
  }
}

@media (max-width: 680px) {
  .appShell {
    width: calc(100% - 24px);
    padding-top: 10px;
  }

  .stepperBar {
    gap: 4px;
    padding: 6px;
    overflow-x: auto;
  }

  .stepTab {
    padding: 8px 10px;
    font-size: 11px;
    gap: 6px;
  }

  .stepTab .stepNum {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .topHeader {
    padding: 10px 14px;
  }

  .brandName {
    font-size: 15px;
  }

  .cuteCard {
    padding: 18px;
    border-radius: var(--radius-lg);
  }

  .customStudioGrid {
    grid-template-columns: 1fr;
  }

  .presetButtonsGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottomBarSaveBtn {
    width: 100%;
  }

  .bottomBarLeft {
    display: none;
  }
}

/* Locket-style portrait caption sheet */
.captionLiveEditor {
  width: 100%;
  max-width: 350px;
  height: min(690px, 76vh);
  min-height: 540px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid #292621;
  border-radius: 31px;
  background: #11110f;
  box-shadow: 0 18px 34px rgba(45,33,14,.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.captionLiveCamera {
  position: relative;
  flex: 0 0 35%;
  min-height: 190px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 48% 92%, rgba(20,17,15,.9) 0 18%, transparent 19%),
    radial-gradient(ellipse at 50% 116%, #191713 0 23%, transparent 24%),
    linear-gradient(168deg, #393833 0%, #8b877d 42%, #a9a397 100%);
}
.captionLiveCamera::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 8%;
  bottom: -25%;
  height: 62%;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at 50% 14%, #171614 0 34%, #2a2723 35% 54%, transparent 55%);
  opacity: .74;
  filter: blur(5px);
}
.captionPreviewStatusBar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 800;
}
.captionPreviewSendTo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
  color: rgba(255,255,255,.84);
  font-size: 15px;
  font-weight: 800;
}
.captionPreviewSendTo span { color: rgba(255,255,255,.7); font-size: 21px; }
.captionPreviewPhoto { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(23,20,17,.35)); }
.captionLiveSheet {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  margin-top: -22px;
  padding: 12px 13px 13px;
  border-radius: 31px 31px 0 0;
  background: linear-gradient(180deg, #211e1c, #151412 82%);
}
.captionLiveSheet .captionLiveHandle { margin-bottom: 10px; }
.captionLiveSheet .captionLiveTitle { margin-bottom: 10px; font-size: 18px; }
.captionLiveList {
  display: block;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  padding: 0 2px 4px;
  overflow-y: auto;
}
.captionLiveGroup { margin: 0 0 13px; }
.captionLiveGroup:last-child { margin-bottom: 0; }
.captionLiveGroupTitle {
  margin: 0 0 7px;
  color: rgba(255,255,255,.66);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -.02em;
}
.captionLiveGroupGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.captionLiveGroup--custom .captionLiveGroupGrid { grid-template-columns: 1fr; }
.captionLiveItem {
  min-height: 39px;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  box-shadow: 0 5px 13px rgba(0,0,0,.22);
}
.captionLiveEmoji { font-size: 14px; }
.captionLiveText { font-size: 10px; }
.captionLiveGrip { font-size: 14px; }
.captionQuickEditor { flex: 0 0 auto; }
.captionAddLiveBtn { flex: 0 0 auto; }

@media (max-width: 680px) {
  .captionLiveEditor { max-width: 330px; height: min(650px, 72vh); min-height: 500px; border-radius: 28px; }
  .captionLiveCamera { flex-basis: 34%; min-height: 170px; }
  .captionLiveSheet { border-radius: 28px 28px 0 0; padding-left: 10px; padding-right: 10px; }
  .captionLiveGroupTitle { font-size: 13px; }
  .captionLiveItem { min-height: 37px; padding: 7px 8px; }
  .captionLiveText { font-size: 9px; }
}

/* Interactive Locket-style caption preview */
#captionList,
#btnAddCaption,
.captionAdditiveNotice {
  display: none !important;
}
.captionPreviewSection {
  margin-top: 16px;
  padding: 16px 0 0;
  border-top: 1px solid #eee3ce;
}
.captionPreviewSectionHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.captionPreviewEyebrow {
  color: #b08d50;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  margin-bottom: 2px;
}
.captionPreviewTitle {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -.035em;
}
.captionPreviewHint {
  color: #a28d6e;
  font-size: 10px;
  text-align: right;
}
.captionLiveEditor {
  position: relative;
  padding: 15px 13px 13px;
  border: 1px solid #29251f;
  border-radius: 24px;
  background: linear-gradient(180deg, #211f1c, #141311);
  box-shadow: 0 12px 24px rgba(45,33,14,.16);
  overflow: hidden;
}
.captionLiveHandle {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: #68635d;
  margin: 0 auto 9px;
}
.captionLiveTitle {
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  text-align: center;
  margin-bottom: 12px;
}
.captionLiveList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 430px;
  padding: 0 3px 2px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #5c554d transparent;
}
.captionLiveItem {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  text-align: left;
  box-shadow: 0 5px 14px rgba(0,0,0,.22);
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
  cursor: grab;
}
.captionLiveItem:hover { transform: translateY(-1px); filter: brightness(1.08); }
.captionLiveItem:active { cursor: grabbing; }
.captionLiveItem.is-dragging { opacity: .42; transform: scale(.98); }
.captionLiveEmoji { flex: 0 0 auto; font-size: 17px; line-height: 1; }
.captionLiveText {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.captionLiveGrip {
  margin-left: auto;
  color: rgba(255,255,255,.72);
  font-size: 18px;
  line-height: 1;
  opacity: .65;
}
.captionQuickEditor {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #544b40;
  border-radius: 16px;
  background: #2b2824;
  animation: captionEditorIn .16s ease-out;
}
@keyframes captionEditorIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.captionQuickEditorHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 12px;
  margin-bottom: 8px;
}
.captionQuickClose {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #ddd4c8;
  background: rgba(255,255,255,.08);
  font-size: 17px;
}
.captionQuickFields { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 7px; }
.captionQuickEmoji,
.captionQuickText {
  min-height: 38px;
  border: 1px solid #5b5145;
  border-radius: 10px;
  background: #1e1c19;
  color: #fff;
  outline: none;
  padding: 7px 9px;
  font-size: 12px;
}
.captionQuickEmoji { text-align: center; font-size: 18px; }
.captionQuickEmoji:focus,
.captionQuickText:focus { border-color: #f6c544; box-shadow: 0 0 0 3px rgba(246,197,68,.12); }
.captionQuickPalette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.captionQuickSwatch {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.24);
}
.captionQuickSwatch.active { outline: 2px solid #ffd25f; outline-offset: 2px; }
.captionQuickActions { display: flex; gap: 6px; margin-top: 10px; }
.captionQuickMove,
.captionQuickDelete {
  min-height: 31px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 750;
}
.captionQuickMove { background: #3b3630; color: #f6e9d5; }
.captionQuickDelete { margin-left: auto; background: #4a2b2d; color: #ffb7b6; }
.captionQuickMove:disabled { opacity: .35; cursor: not-allowed; }
.captionAddLiveBtn {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px dashed #74685a;
  border-radius: 999px;
  color: #f8d47a;
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 800;
}
.captionAddLiveBtn:hover { background: rgba(255,255,255,.09); border-color: #c4a45d; }

@media (max-width: 680px) {
  .captionPreviewSection { margin-top: 13px; padding-top: 13px; }
  .captionPreviewSectionHead { align-items: flex-start; flex-direction: column; gap: 3px; }
  .captionPreviewHint { text-align: left; }
  .captionLiveEditor { border-radius: 21px; padding: 13px 10px 10px; }
  .captionLiveList { max-height: 390px; }
  .captionLiveItem { min-height: 40px; padding: 8px 11px; }
  .captionLiveText { font-size: 12px; }
  .captionQuickActions { flex-wrap: wrap; }
  .captionQuickDelete { margin-left: 0; }
}

/* Final portrait-preview overrides (kept last so the studio skin cannot flatten it). */
.captionLiveEditor {
  width: 100%;
  max-width: 350px;
  height: min(690px, 76vh);
  min-height: 540px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid #292621;
  border-radius: 31px;
  background: #11110f;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.captionLiveCamera { flex: 0 0 35%; min-height: 190px; }
.captionLiveSheet {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  margin-top: -22px;
  padding: 12px 13px 13px;
  border-radius: 31px 31px 0 0;
}
.captionLiveList {
  display: block;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  padding: 0 2px 4px;
  overflow-y: auto;
}
.captionLiveGroupGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.captionLiveGroup--custom .captionLiveGroupGrid { grid-template-columns: 1fr; }
.captionLiveItem { min-height: 39px; padding: 7px 9px; border-radius: 999px; }
.captionLiveText { font-size: 10px; }
.captionLiveSheet .captionQuickEditor,
.captionLiveSheet .captionAddLiveBtn { flex: 0 0 auto; }

@media (max-width: 680px) {
  .captionLiveEditor { max-width: 330px; height: min(650px, 72vh); min-height: 500px; border-radius: 28px; }
  .captionLiveCamera { flex-basis: 34%; min-height: 170px; }
  .captionLiveSheet { border-radius: 28px 28px 0 0; padding-left: 10px; padding-right: 10px; }
  .captionLiveItem { min-height: 37px; padding: 7px 8px; }
  .captionLiveText { font-size: 9px; }
}

/* Photobooth Studio skin: compact 2-column editor inspired by the reference UI. */
.photoboothStudioStep { background: transparent; }
.pbStudioCard {
  width: 100%;
  padding: 34px;
  border: 1px solid #eadfc9;
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 20px 55px rgba(83,62,24,.08);
}
.pbStudioHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.pbStudioTitle { margin: 3px 0 8px; color: #33281c; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.045em; }
.pbStudioDesc { max-width: 670px; margin: 0; color: #987d55; font-size: 13px; line-height: 1.6; }
.pbStudioLimit { flex: 0 0 auto; padding: 8px 13px; color: #9c7842; font-size: 12px; font-weight: 850; white-space: nowrap; }
.pbStudioLayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 410px); align-items: start; gap: 30px; }
.pbStudioControls { min-width: 0; }
.pbStudioPreview { position: sticky; top: 18px; min-width: 0; padding: 19px; border: 1px solid #eadfc9; border-radius: 24px; background: #fffdf8; }
.pbStudioSection, .pbStudioFormSection { margin-bottom: 22px; }
.pbFrameUploadBlock {
  display: grid;
  grid-template-columns: 70px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 19px;
  border: 1.5px dashed #e7c989;
  border-radius: 22px;
  background: #fffaf0;
}
.pbSectionIcon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: #fff1bd; font-size: 29px; }
.pbUploadCopy h3, .pbSectionHeading h3, .pbLibraryHeader h3 { margin: 0; color: #3a2f21; font-size: 16px; letter-spacing: -.02em; }
.pbUploadCopy p, .pbFieldNote, .pbLibraryHeader span, .pbPreviewStatus span, .pbSlotArea p, .pbCommonPhotoArea p, .pbCommonPhotoArea small { color: #a48960; font-size: 11px; }
.pbUploadCopy p { margin: 6px 0 0; }
.pbUploadNameInput { max-width: 280px; margin-top: 10px; padding: 9px 11px; font-size: 11px; }
.pbOutlineBtn, .pbUploadSubmit { min-height: 46px; padding: 0 17px; border: 1px solid #e8dcc3; border-radius: 15px; background: #fff; color: #3e3325; font-size: 13px; font-weight: 850; white-space: nowrap; cursor: pointer; }
.pbOutlineBtn:hover, .pbUploadSubmit:not(:disabled):hover { border-color: #e7b52d; background: #fff9e8; }
.pbUploadSubmit { grid-column: 2 / 4; justify-self: start; min-height: 34px; padding: 0 13px; color: #9a6e0c; font-size: 11px; }
.pbUploadSubmit:disabled { opacity: .45; cursor: not-allowed; }
.pbLayoutSection { padding-top: 2px; }
.pbSectionHeading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.pbHint { color: #af956d; font-size: 10px; }
.pbLayoutOptions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pbLayoutOption { min-height: 48px; padding: 8px 10px; border: 1px solid #ead9b7; border-radius: 16px; background: #fffdf8; color: #796341; font-size: 11px; font-weight: 800; line-height: 1.35; cursor: pointer; }
.pbLayoutOption span { color: #a67819; font-size: 17px; vertical-align: -1px; }
.pbLayoutOption:hover { border-color: #e1ae26; background: #fff8e2; }
.pbLayoutOption.active { border: 2px solid #f2ad00; background: #fff1bf; color: #65440a; box-shadow: 0 0 0 3px rgba(246,183,24,.12); }
.pbLayoutOption:last-child { grid-column: span 2; }
.pbHiddenControl { display: none !important; }
.pbStudioFormSection { display: grid; gap: 15px; }
.pbStudioFormSection .inputGroup { margin: 0; }
.pbStudioFormSection .textInput, .pbAdvanced .textInput, .pbAdvanced .selectInput { min-height: 51px; border-radius: 15px; border-color: #eadfc9; background: #fffdf8; }
.pbFieldNote { display: block; margin-top: 7px; }
.pbAdvanced { margin: 4px 0 20px; padding: 0 17px 17px; border: 1px solid #eadfc9; border-radius: 18px; background: #fffdf8; }
.pbAdvanced summary { padding: 16px 0; color: #6c5123; font-size: 13px; font-weight: 850; cursor: pointer; list-style: none; }
.pbAdvanced summary::-webkit-details-marker { display: none; }
.pbAdvancedGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pbRangeGroup input[type="range"] { width: 100%; accent-color: #e7a900; }
.pbRangeGroup output { float: right; color: #b87900; font-weight: 850; }
.pbAddFrameBtn { width: 100%; min-height: 54px; margin-bottom: 22px; border: 0; border-radius: 17px; background: #ffb800; color: #543500; font-size: 15px; font-weight: 900; box-shadow: 0 4px 0 #df9d00; cursor: pointer; }
.pbAddFrameBtn:hover { filter: brightness(1.03); transform: translateY(-1px); }
.pbPhotoTray { margin: 0 0 22px; padding: 15px; border: 1px solid #eadfc9; border-radius: 18px; background: #fffdf8; }
.pbPhotoTray .photoTrayHeader { margin-bottom: 10px; }
.pbPhotoTray .photoTrayHeader strong { color: #3a2f21; font-size: 13px; }
.pbPhotoTray .photoTrayHeader p { margin-top: 4px; color: #a48960; font-size: 10px; }
.pbPhotoActions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pbSmallBtn { min-height: 34px; padding: 0 11px; border: 1px solid #e6d7b9; border-radius: 11px; background: #fff; color: #654d28; font-size: 11px; font-weight: 850; cursor: pointer; }
.pbSmallBtn:hover { border-color: #deb12f; background: #fff8e5; }
.pbSmallBtn--gold { border-color: #eab327; background: #fff2be; color: #754e00; }
.pbSmallBtn--wide { flex: 1 1 auto; }
.pbPhotoEmpty { padding: 16px 10px 7px; text-align: center; color: #a48960; }
.pbPhotoEmpty span { display: block; margin-bottom: 5px; font-size: 25px; }
.pbPhotoEmpty strong { color: #675033; font-size: 12px; }
.pbPhotoEmpty p { margin: 3px 0 0; font-size: 10px; }
.photoThumbSlot.is-active { border-color: #e5a800; box-shadow: 0 0 0 3px rgba(230,168,0,.2); }
.pbLibrarySection { padding-top: 18px; border-top: 1px solid #eee3d1; }
.pbLibraryHeader { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.pbLibraryTabs { margin: 0 0 13px; padding: 0; border: 0; }
.pbLibraryTabs .pbTabBtn { padding: 8px 10px; font-size: 10px; }
.pbLibraryHint { margin: 0; padding: 17px; border-radius: 14px; background: #fffaf0; color: #94784b; font-size: 12px; line-height: 1.6; }
.pbLibraryEmpty { padding: 25px 10px; text-align: center; color: #987d55; }
.pbLibraryEmpty span { display: block; margin-bottom: 7px; font-size: 28px; }
.pbLibraryEmpty strong { color: #5e4b31; font-size: 12px; }
.pbLibraryEmpty p { margin: 4px 0 0; font-size: 10px; }
.pbPreviewHeading { margin-bottom: 14px; color: #b28a45; font-size: 12px; font-weight: 900; letter-spacing: .15em; text-align: center; }
.pbPreviewCanvasCard { padding: 10px; border-radius: 19px; background: #1b1a18; box-shadow: 0 16px 26px rgba(45,33,14,.17); }
.pbPreviewCanvasWrapper { aspect-ratio: 1; border-radius: 14px; background: #24221f; box-shadow: none; }
.pbPreviewCanvasWrapper #photoboothCanvas { width: 100%; height: 100%; object-fit: contain; }
.pbPreviewStatus { display: flex; justify-content: space-between; gap: 8px; padding: 10px 3px 1px; }
.pbPreviewStatus strong { color: #f8e9bc; font-size: 11px; }
.pbPreviewStatus span { color: #c6ae7f; font-size: 9px; }
.pbSlotArea { padding: 19px 4px 14px; }
.pbSlotArea h3 { margin: 0; color: #3a2f21; font-size: 15px; }
.pbSlotArea p { margin: 5px 0 11px; }
.pbSlotButtons { display: flex; flex-wrap: wrap; gap: 6px; }
.pbSlotButton { min-height: 34px; padding: 0 12px; border: 1px solid #ead9b7; border-radius: 11px; background: #fff; color: #795b24; font-size: 11px; font-weight: 850; cursor: pointer; }
.pbSlotButton.active { border-color: #f0aa00; background: #ffbd0d; color: #5a3b00; }
.pbSlotActions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.pbCommonPhotoArea { padding: 14px 4px 18px; border-top: 1px dashed #e5d6ba; border-bottom: 1px dashed #e5d6ba; }
.pbCommonPhotoArea p { margin: 0 0 9px; font-weight: 800; }
.pbCommonPhotoArea small { display: block; margin-top: 10px; text-align: center; line-height: 1.45; }
.pbPreviewActions { margin-top: 17px; }
.pbPreviewActions button { min-height: 42px; border-radius: 13px; font-size: 11px; }

@media (max-width: 980px) {
  .pbStudioCard { padding: 24px; }
  .pbStudioLayout { grid-template-columns: 1fr; }
  .pbStudioPreview { position: static; max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 680px) {
  .pbStudioCard { padding: 17px 13px; border-radius: 22px; }
  .pbStudioHeader { flex-direction: column; gap: 5px; margin-bottom: 18px; }
  .pbStudioTitle { font-size: 27px; }
  .pbStudioDesc { font-size: 11px; }
  .pbStudioLimit { padding: 0; }
  .pbFrameUploadBlock { grid-template-columns: 50px minmax(0,1fr); gap: 11px; padding: 14px; }
  .pbSectionIcon { width: 50px; height: 50px; border-radius: 14px; font-size: 23px; }
  .pbUploadCopy h3 { font-size: 13px; }
  .pbUploadCopy p { font-size: 10px; }
  .pbUploadNameInput { max-width: none; }
  .pbOutlineBtn { grid-column: 1 / -1; width: 100%; }
  .pbUploadSubmit { grid-column: 1 / -1; }
  .pbLayoutOptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pbLayoutOption:last-child { grid-column: span 2; }
  .pbAdvancedGrid { grid-template-columns: 1fr; }
  .pbLibraryHeader { align-items: flex-start; flex-direction: column; gap: 4px; }
  .pbLibraryTabs { overflow-x: auto; }
  .pbLibraryTabs .pbTabBtn { flex: 0 0 auto; }
  .pbStudioPreview { padding: 12px; border-radius: 19px; }
  .pbPreviewHeading { font-size: 10px; }
}

.pbPromptCard { margin: -7px 0 22px; padding: 16px; border: 1px solid #eadfc9; border-radius: 18px; background: linear-gradient(135deg, #fffaf0, #fffdf8); }
.pbPromptHeader { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pbPromptHeader h3 { margin: 0; color: #3a2f21; font-size: 14px; }
.pbPromptHeader p { margin: 5px 0 0; color: #a48960; font-size: 10px; line-height: 1.45; }
.pbGeminiLink { flex: 0 0 auto; color: #8b6414; font-size: 10px; font-weight: 850; text-decoration: none; }
.pbGeminiLink:hover { text-decoration: underline; }
.pbPromptText { display: block; width: 100%; min-height: 116px; padding: 11px 12px; resize: vertical; border: 1px solid #ead9b7; border-radius: 13px; background: #fff; color: #695536; font: 500 11px/1.55 inherit; outline: none; }
.pbPromptText:focus { border-color: #e5b12c; box-shadow: 0 0 0 3px rgba(229,177,44,.12); }
.pbCopyPromptBtn { width: 100%; min-height: 38px; margin-top: 9px; border: 1px solid #e5b12c; border-radius: 11px; background: #fff0bd; color: #795208; font-size: 11px; font-weight: 850; cursor: pointer; }
.pbCopyPromptBtn:hover { background: #ffe79a; }

@media (max-width: 680px) {
  .pbPromptHeader { flex-direction: column; gap: 5px; }
  .pbPromptText { min-height: 145px; font-size: 10px; }
}

/* Widget gallery skin: warm community frame library + fixed preview rail. */
.widgetGalleryStep { background: transparent; }
.widgetStudioLayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 390px); align-items: start; gap: 24px; }
.widgetLibraryPanel, .widgetPreviewPanel { border: 1px solid #eadfc9; border-radius: 25px; background: #fff; box-shadow: 0 15px 42px rgba(83,62,24,.07); }
.widgetLibraryPanel { padding: 28px; }
.widgetPreviewPanel { position: sticky; top: 18px; padding: 26px 24px 23px; background: linear-gradient(180deg, #fffcf0, #fff7e3); border-color: #edddba; text-align: center; }
.widgetLibraryHeader { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.widgetLibraryHeader h2 { margin: 0; color: #33281c; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.055em; }
.widgetFrameCount { color: #a18a62; font-size: 12px; font-weight: 800; white-space: nowrap; }
.widgetSearchRow { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.widgetSearchRow .textInput { min-height: 51px; border-radius: 15px; background: #fffcf6; font-size: 14px; }
.widgetSoftBtn { min-height: 45px; padding: 0 15px; border: 1px solid #e9dfc8; border-radius: 14px; background: #fffaf0; color: #3f3324; font-size: 12px; font-weight: 850; cursor: pointer; }
.widgetSoftBtn:hover { border-color: #e9ae21; background: #fff0c2; }
.widgetGalleryTabs { display: flex; align-items: center; gap: 15px; margin: 18px 0 20px; }
.widgetGalleryTab { min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 100px; background: transparent; color: #9b825b; font-size: 12px; font-weight: 750; cursor: pointer; }
.widgetGalleryTab.active { border-color: #f5dd92; background: #fff0bd; color: #977000; }
.widgetGalleryTab:hover:not(.active) { background: #fffaf0; }
.widgetGalleryGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px 15px; max-height: 740px; overflow-y: auto; padding: 2px 4px 4px 0; }
.widgetFrameCard { position: relative; min-width: 0; padding-bottom: 18px; }
.widgetFrameThumb { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 2px solid #ede5d5; border-radius: 18px; overflow: hidden; background: repeating-conic-gradient(#f3ecdc 0% 25%, #fffdf8 0% 50%) 0 / 20px 20px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.widgetFrameThumb:hover { transform: translateY(-3px); border-color: #f0c850; box-shadow: 0 8px 18px rgba(180,140,50,.16); }
.widgetFrameThumb.selected { border-color: #efb31b; box-shadow: 0 0 0 3px #fff0bf, 0 7px 17px rgba(180,140,50,.16); }
.widgetFrameThumb img { display: block; width: 100%; height: 100%; object-fit: fill; }
.widgetFrameCard.is-broken .widgetFrameThumb { background: #fff0eb; }
.widgetFrameCaption { padding: 7px 30px 0 4px; overflow: hidden; color: #7a6543; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.widgetFrameHeart { position: absolute; right: 0; bottom: 0; min-width: 28px; padding: 2px 4px; border: 0; background: transparent; color: #d4a12c; font-size: 24px; line-height: 1; cursor: pointer; }
.widgetFrameHeart:hover, .widgetFrameHeart.saved { color: #e1a400; transform: scale(1.12); }
.widgetGalleryEmpty { grid-column: 1 / -1; padding: 42px 18px; border: 1px dashed #eadcc0; border-radius: 15px; background: #fffcf5; color: #a18a64; font-size: 12px; text-align: center; }
.widgetUploadCard { display: grid; grid-template-columns: 45px minmax(0,1fr) auto; align-items: center; gap: 11px; margin-top: 23px; padding: 17px; border: 2px dashed #e0d1a8; border-radius: 18px; background: linear-gradient(135deg,#fffdf7,#fff8ec); }
.widgetUploadIcon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff0bd; color: #b78b1d; font-size: 24px; }
.widgetUploadCard strong { color: #3d3224; font-size: 13px; }
.widgetUploadCard p { margin: 3px 0 0; color: #a48d63; font-size: 10px; }
.widgetChooseUpload { min-height: 36px; padding: 8px 12px; border: 1px solid #e9dfc8; border-radius: 12px; background: #fff; color: #5f4a29; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.widgetChooseUpload:hover { background: #fff0c2; }
.widgetUploadName { grid-column: 2 / 4; min-height: 39px; font-size: 11px; }
.widgetShareCheck { grid-column: 2 / 4; display: flex; align-items: center; gap: 7px; color: #9a8463; font-size: 11px; cursor: pointer; }
.widgetShareCheck input { width: 16px; height: 16px; accent-color: #e2a000; }
.widgetUploadBtn { grid-column: 2 / 4; min-height: 38px; border: 1px solid #e5b12c; border-radius: 12px; background: #fff0bd; color: #795208; font-size: 11px; font-weight: 850; cursor: pointer; }
.widgetUploadBtn:disabled { opacity: .5; cursor: not-allowed; }
.widgetGallerySource { margin: 11px 2px 0; color: #ad956d; font-size: 10px; line-height: 1.5; }
.widgetPreviewEyebrow { color: #b19660; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.widgetGalleryMockup { width: min(245px, 82%); height: auto; aspect-ratio: 1; margin: 26px auto 20px; }
.widgetSelectedLabel { display: block; color: #33281c; font-size: 16px; font-weight: 900; letter-spacing: -.03em; }
.widgetSelectedHint { margin: 5px 0 13px; color: #a18a64; font-size: 12px; }
.widgetPreviewTools { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.widgetPreviewTools .widgetSoftBtn { min-height: 39px; padding: 0 13px; background: #fff; }
.widgetSwatches { display: flex; justify-content: center; gap: 11px; margin: 20px 0 22px; }
.widgetSwatch { width: 24px; height: 24px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: var(--swatch); cursor: pointer; }
.widgetSwatch[aria-pressed="true"] { outline: 2px solid #d0a442; outline-offset: 2px; }
.widgetAccountBox, .widgetPlacementBox { padding-top: 18px; border-top: 1px solid #eaddbf; text-align: left; }
.widgetAccountRow { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.widgetAccountRow input { min-height: 47px; border-radius: 14px; }
.widgetCheckBtn { min-height: 47px; padding: 0 14px; border: 1px solid #e9dfc8; border-radius: 14px; background: #fff; color: #493c25; font-size: 11px; font-weight: 850; cursor: pointer; }
.widgetCustomizeDetails { margin-top: 18px; padding: 14px; border: 1px solid #e8ddc6; border-radius: 16px; background: rgba(255,255,255,.5); text-align: left; }
.widgetCustomizeDetails summary { color: #775b28; font-size: 12px; font-weight: 850; cursor: pointer; }
.widgetCustomizeDetails .presetButtonsGrid { margin-top: 13px; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.widgetCustomizeDetails .presetFrameBtn { padding: 6px 3px; font-size: 9px; }
.widgetCustomizeDetails .presetColorBar { height: 17px; }
.widgetCustomGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.widgetCustomGrid .inputLabel { font-size: 10px; }
.widgetColorInput { height: 34px !important; padding: 2px !important; }
.widgetCustomGrid input[type="range"] { width: 100%; accent-color: #e2a000; }
.widgetNicknameGroup { grid-column: 1 / -1; }
.widgetPlacementBox { margin-top: 18px; }
.widgetPlacementBox .placement-toggle { margin-top: 8px; }
.widgetApplyRow { display: flex; gap: 8px; margin-top: 17px; }
.widgetApplyRow .go { min-height: 49px; }
.widgetApplyRow .go2 { padding: 0 16px; }
.widgetApplyNote { margin: 16px 0 0; color: #aa936e; font-size: 10px; }

@media (max-width: 980px) {
  .widgetStudioLayout { grid-template-columns: 1fr; }
  .widgetPreviewPanel { position: static; max-width: 520px; width: 100%; margin: 0 auto; }
  .widgetGalleryGrid { max-height: none; }
}
@media (max-width: 680px) {
  .widgetLibraryPanel { padding: 18px 14px; border-radius: 21px; }
  .widgetPreviewPanel { padding: 20px 15px; border-radius: 21px; }
  .widgetLibraryHeader { align-items: flex-start; flex-direction: column; gap: 5px; }
  .widgetLibraryHeader h2 { font-size: 26px; }
  .widgetSearchRow { grid-template-columns: 1fr; }
  .widgetSearchRow .widgetSoftBtn { width: 100%; }
  .widgetGalleryTabs { gap: 4px; }
  .widgetGalleryTab { padding: 0 10px; font-size: 11px; }
  .widgetGalleryGrid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px 9px; }
  .widgetFrameThumb { border-radius: 12px; }
  .widgetFrameCaption { padding-left: 2px; font-size: 9px; }
  .widgetFrameHeart { font-size: 21px; }
  .widgetUploadCard { grid-template-columns: 39px minmax(0,1fr); padding: 13px; }
  .widgetChooseUpload { grid-column: 1 / -1; width: 100%; text-align: center; }
  .widgetUploadName, .widgetShareCheck, .widgetUploadBtn { grid-column: 1 / -1; }
  .widgetGalleryMockup { width: 230px; }
  .widgetCustomGrid { grid-template-columns: 1fr; }
  .widgetNicknameGroup { grid-column: auto; }
}

/* Match the real widget preview: the selected PNG is an overlay around the photo. */
.widgetGalleryMockup {
  position: relative;
  overflow: hidden;
  border: 0 !important;
  border-radius: 36px;
  background: #fae3a6;
  box-shadow: 0 13px 25px -10px rgba(130,90,30,.2), 0 0 0 6px #fff, 0 0 0 8px #eadbbe;
}
.widgetGalleryMockup .widgetPhotoContainer {
  z-index: 1;
  display: grid;
  place-items: center;
  background-color: #fae3a6;
  background-size: cover;
  background-position: center;
}
.widgetGalleryMockup .widgetPhotoContainer:not(.has-photo)::before {
  content: '✿';
  position: absolute;
  top: 41%;
  left: 50%;
  color: #c99526;
  font-size: 58px;
  line-height: 1;
  transform: translate(-50%, -50%);
}
.widgetGalleryMockup .widgetPhotoContainer:not(.has-photo)::after {
  content: 'Ảnh của bạn';
  position: absolute;
  top: 61%;
  left: 50%;
  color: #ac843a;
  font: 500 14px/1.2 'Segoe UI', sans-serif;
  white-space: nowrap;
  transform: translateX(-50%);
}
.widgetGalleryMockup .widgetOverlayImg,
.widgetGalleryMockup .widgetFrameOverlayImg {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: fill;
  pointer-events: none;
}
.widgetGalleryMockup .widgetInfoRow { z-index: 10; display: none; }
.widgetCurrentFrameStatus { margin: 10px auto 0; padding: 7px 10px; border: 1px solid #e8d7ad; border-radius: 10px; background: #fff8df; color: #86651f; font-size: 10px; font-weight: 800; line-height: 1.4; }
.widgetCurrentFrameStatus.isPending { border-color: #efc1a0; background: #fff1e8; color: #a15e37; }
.widgetConnectedAccount { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 11px; color: #987d55; font-size: 10px; }
.widgetConnectedDot { width: 8px; height: 8px; border-radius: 50%; background: #54c68a; box-shadow: 0 0 0 3px #dff6e9; }
.widgetCustomizeDetails.isHiddenWhenImageSelected { display: none; }

/* Caption list controls */
.captionItemCard { cursor: grab; }
.captionItemCard.is-dragging { opacity: .5; border-color: #e5b93c; }
.captionDragHandle {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: #b79c72;
  font-size: 21px;
  line-height: 1;
  cursor: grab;
  user-select: none;
}
.captionOrderControls {
  display: flex;
  align-items: center;
  gap: 3px;
}
.captionOrderBtn {
  width: 25px;
  height: 25px;
  border: 1px solid #eadfc9;
  border-radius: 7px;
  background: #fffaf0;
  color: #8d7040;
  font-size: 13px;
  font-weight: 800;
}
.captionOrderBtn:hover:not(:disabled) { background: #fff0bd; border-color: #e5b93c; }
.captionOrderBtn:disabled { opacity: .3; cursor: not-allowed; }
.captionMainRow { grid-template-columns: 25px 50px minmax(0, 1fr) auto 34px; }

@media (max-width: 680px) {
  .captionMainRow { grid-template-columns: 22px 44px minmax(0, 1fr) auto 31px; gap: 7px; }
  .captionOrderControls { flex-direction: column; gap: 2px; }
  .captionOrderBtn { width: 23px; height: 20px; font-size: 11px; }
}

/* ========================================================================== 
   WidgetLocket Studio Refresh — 2026-11-13
   Visual-only pass: calmer hierarchy, less card noise, clearer actions.
   ========================================================================== */
:root {
  --bg-main: #fffaf2;
  --bg-card: #fffefb;
  --bg-subtle: #fffaf2;
  --bg-cream: #fff0c6;
  --bg-cream-soft: #fff9ed;
  --line: #eadfc9;
  --line-strong: #d8c39b;
  --ink: #332a1e;
  --ink-soft: #66563e;
  --muted: #927f63;
  --muted-light: #b6a487;
  --amber: #f6b718;
  --amber-dark: #ae7710;
  --amber-light: #fff0bf;
  --coral: #ef7691;
  --purple: #8b70d9;
  --mint: #4ba981;
  --shadow-sm: 0 2px 8px rgba(99, 71, 29, .035);
  --shadow-md: 0 8px 25px rgba(99, 71, 29, .055);
  --shadow-lg: 0 16px 42px rgba(99, 71, 29, .08);
  --shadow-float: 0 18px 35px rgba(61, 42, 16, .16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
}

html, body {
  background: #fffaf2;
}

body {
  background:
    radial-gradient(900px 400px at 12% -8%, rgba(255, 224, 157, .42), transparent 62%),
    radial-gradient(700px 400px at 100% 12%, rgba(255, 218, 226, .32), transparent 66%),
    #fffaf2;
  color: var(--ink);
  padding-bottom: 78px;
}

.appShell {
  width: min(1160px, calc(100% - 48px));
  padding: 22px 0 48px;
}

.topHeader {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 2px 20px;
  margin-bottom: 8px;
}

.brandLink { gap: 11px; }
.brandBadge {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #ffbd1b;
  color: #9c6800;
  box-shadow: 0 4px 0 #e1a00d, 0 9px 18px rgba(225, 160, 13, .16);
  font-size: 19px;
}
.brandName { font-size: 20px; letter-spacing: -.055em; }
.brandName span { color: #d89409; }
.brandSub {
  margin-top: 1px;
  color: #a18b68;
  font-size: 11px;
  font-weight: 650;
}
.headerActions { gap: 12px; }
.accountChip {
  padding: 7px 11px;
  border-color: #eadfc9;
  background: rgba(255,255,255,.72);
  color: #7f6c50;
  font-size: 11px;
  box-shadow: 0 2px 8px rgba(99,71,29,.03);
}
.accountChip.gold { background: #fff2bd; border-color: #f1d581; color: #9d6b0a; }
.textBtn { color: #9b8765; }

.stepperBar {
  position: static;
  display: flex;
  gap: 7px;
  padding: 5px;
  margin: 0 0 24px;
  border: 1px solid #eadfc9;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 3px 12px rgba(99,71,29,.035);
}
.stepTab {
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
  padding: 9px 12px;
  gap: 8px;
  border-radius: 12px;
  color: #a08b6b;
  font-size: 12px;
  font-weight: 750;
}
.stepTab .stepNum {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  background: #fffaf0;
  border-color: #e8d9bd;
  color: #a38c67;
}
.stepTab.active {
  background: #fff0bf;
  border-color: #f0d278;
  color: #7f5d13;
  box-shadow: none;
}
.stepTab.active .stepNum {
  background: #ffbb12;
  box-shadow: none;
}
.stepTab.completed .stepNum { background: #e8f6ee; border-color: #c5e7d3; }

.viewStep { animation: studioIn .2s ease-out; }
@keyframes studioIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.cuteCard {
  border: 1px solid #eadfc9;
  border-radius: 22px;
  background: rgba(255,254,251,.94);
  box-shadow: 0 6px 22px rgba(99,71,29,.045);
  padding: 22px;
  margin-bottom: 16px;
}
.cardHead { gap: 12px; margin-bottom: 16px; }
.cardEyebrow {
  color: #af8a3d;
  font-size: 10px;
  letter-spacing: .11em;
  margin-bottom: 5px;
}
.cardTitle { font-size: 20px; letter-spacing: -.045em; }
.cardDesc { color: #8c795b; font-size: 12px; line-height: 1.55; }
.splitView {
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
}
.previewCol { top: 20px; }

.inputGroup { gap: 6px; margin-bottom: 13px; }
.inputLabel { color: #6e5c42; font-size: 11px; }
.textInput, .selectInput {
  min-height: 43px;
  padding: 9px 12px;
  border: 1px solid #e5d8bf;
  border-radius: 12px;
  background: #fffaf3;
  font-size: 13px;
}
.textInput:focus, .selectInput:focus {
  border-color: #e7b83a;
  box-shadow: 0 0 0 3px rgba(246,183,24,.16);
}
.btnPrimary {
  min-height: 43px;
  padding: 10px 18px;
  border-radius: 12px;
  background: #ffb914;
  color: #4d3503;
  box-shadow: 0 3px 0 #d99d0a, 0 8px 16px rgba(217,157,10,.15);
  font-size: 13px;
}
.btnPrimary:hover { background: #ffc42f; box-shadow: 0 3px 0 #d99d0a, 0 11px 20px rgba(217,157,10,.18); }
.btnSecondary {
  min-height: 41px;
  padding: 9px 15px;
  border: 1px solid #dfd0b5;
  border-radius: 12px;
  background: #fffdf8;
  color: #66543b;
  font-size: 12px;
}

.accountHeroBox {
  padding: 44px 24px 38px;
  border: 1px solid #f0dfb9;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 78% 8%, rgba(255,220,149,.6), transparent 42%),
    linear-gradient(135deg, #fff7e4, #fffdf8 70%);
  box-shadow: 0 8px 26px rgba(99,71,29,.055);
}
.accountHeroSparkle {
  background: #fffefb;
  border-color: #f1db9c;
  color: #a67716;
  font-size: 10px;
  letter-spacing: .06em;
}
.accountHeroTitle {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.065em;
}
.accountHeroTitle em { color: #c38912; }
.accountHeroDesc { max-width: 560px; margin: 11px auto 24px; color: #806e53; font-size: 13px; }
.accountSearchForm { max-width: 640px; }
.searchBarWrapper {
  border: 1px solid #dbc9a4;
  border-radius: 15px;
  padding: 5px 5px 5px 15px;
  box-shadow: 0 4px 12px rgba(99,71,29,.045);
}
.searchBarWrapper:focus-within { border-color: #e7b22c; box-shadow: 0 0 0 4px rgba(246,183,24,.14); }
.searchInput { font-size: 14px; }
.searchSubmitBtn { border-radius: 11px; }
.searchHelperChips { margin-top: 10px; }
.searchChip { border: 0; background: transparent; color: #a28b68; font-size: 10px; }

.verifiedAccountCard {
  max-width: 720px;
  border: 1px solid #e8cf84;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}
.verifiedCardBody { gap: 14px; }
.avatarRing { width: 58px; height: 58px; border-radius: 18px; font-size: 24px; box-shadow: 0 5px 12px rgba(245,158,11,.24); }
.accountUsername { font-size: 18px; }
.verifiedCardActions { margin-top: 16px; padding-top: 14px; }

.goldDateCard { border-color: #eedb9f; background: linear-gradient(135deg,#fffdf7,#fff8e6); }
.dateModeSwitch { gap: 8px; }
.dateModeOption { padding: 11px 12px; border-color: #eadfc9; border-radius: 12px; }
.dateModeOption.active { border-color: #e5b93c; background: #fff7d9; box-shadow: 0 0 0 3px rgba(246,183,24,.11); }
.dateModeOption b { font-size: 11px; }
.dateModeOption small { font-size: 10px; }
.captionAdditiveNotice { padding: 10px 12px; margin-bottom: 15px; border-radius: 12px; background: #fff8e8; border-color: #f0dfb7; color: #81683a; font-size: 11px; }
.captionItemCard { border-color: #eadfc9; border-radius: 15px; padding: 13px; box-shadow: none; }
.captionItemCard:hover { border-color: #e0c88f; box-shadow: 0 4px 12px rgba(99,71,29,.04); }
.addCaptionBtn { border-color: #dcc9a6; border-radius: 12px; background: #fffaf0; color: #a77512; }

.locketCameraMockup {
  max-width: 300px;
  border: 6px solid #27251f;
  border-radius: 32px;
  background: #171715;
  box-shadow: 0 15px 30px rgba(45,33,14,.18);
}
.realCaptionPillBar { padding: 8px 15px; box-shadow: 0 8px 18px rgba(0,0,0,.34); }
.realCaptionText { font-size: 13px; }
.goldCardMockup { border-color: #c7a33d; background: linear-gradient(135deg,#2b251b,#171511); }

.photoTrayBox {
  padding: 14px;
  border: 1px dashed #d9c39b;
  border-radius: 16px;
  background: #fffaf0;
}
.photoTrayHeader { gap: 10px; }
.photoTrayHeader > div:last-child { flex-wrap: wrap; justify-content: flex-end; }
.photoboothTabs { gap: 6px; padding-bottom: 10px; margin-bottom: 14px; border-color: #eee3ce; }
.pbTabBtn { padding: 7px 11px; border-color: #eee3d0; background: #fffaf0; font-size: 11px; }
.pbTabBtn.active { background: #fff0bd; border-color: #eed47f; color: #966d10; }
.pbFrameGrid { grid-template-columns: repeat(auto-fill, minmax(112px,1fr)); gap: 10px; max-height: 350px; }
.pbFrameCard { border: 1px solid #e7dac2; border-radius: 14px; padding: 7px; box-shadow: none; }
.pbFrameCard.active { border-color: #e6ae21; box-shadow: 0 0 0 3px rgba(246,183,24,.13); }
.pbFrameCardThumb { border-radius: 10px; }
.canvasPreviewShell { border-color: #e8ddca; border-radius: 20px; box-shadow: 0 8px 22px rgba(99,71,29,.06); padding: 13px; }
.canvasWrapper { border-radius: 14px; }

.widgetMockupWrapper { max-width: 285px; }
.realSquircleWidget { border: 6px solid #c7b5ed; border-radius: 30px; padding: 15px; box-shadow: 0 15px 30px rgba(67,49,23,.17); }
.presetButtonsGrid { gap: 7px; }
.presetFrameBtn { padding: 7px 5px; border-color: #eadfc9; border-radius: 12px; }
.presetFrameBtn.active { border-color: #dfae22; box-shadow: 0 0 0 3px rgba(246,183,24,.12); }
.presetColorBar { height: 20px; border-radius: 6px; }

.stickyBottomBar {
  background: rgba(255,253,247,.92);
  border-top: 1px solid #e8ddca;
  box-shadow: 0 -8px 24px rgba(99,71,29,.08);
  padding: 8px 20px;
}
.bottomBarSaveBtn { min-height: 43px; padding: 9px 22px; border-radius: 12px; font-size: 13px; background: #ffb914; color: #4d3503; box-shadow: 0 3px 0 #d99d0a; }

@media (max-width: 900px) {
  .splitView { grid-template-columns: 1fr; }
  .previewCol { order: -1; }
  .previewCol .cuteCard { max-width: 520px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 680px) {
  body { padding-bottom: 72px; }
  .appShell { width: calc(100% - 24px); padding-top: 14px; }
  .topHeader { padding-bottom: 14px; }
  .brandName { font-size: 17px; }
  .brandSub { font-size: 10px; }
  .headerActions { gap: 6px; }
  .accountChip { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stepperBar { margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
  .stepperBar::-webkit-scrollbar { display: none; }
  .stepTab { flex: 0 0 auto; padding: 8px 10px; font-size: 11px; }
  .stepTab .stepNum { width: 21px; height: 21px; flex-basis: 21px; }
  .cuteCard { padding: 16px; border-radius: 18px; }
  .accountHeroBox { padding: 32px 15px 26px; border-radius: 21px; }
  .accountHeroTitle { font-size: 30px; }
  .accountHeroDesc { font-size: 12px; margin-bottom: 18px; }
  .searchBarWrapper { display: flex; padding-left: 12px; }
  .searchInput { min-width: 0; font-size: 13px; }
  .searchSubmitBtn { padding: 0 12px; font-size: 12px; }
  .dateModeSwitch { grid-template-columns: 1fr; }
  .verifiedCardActions { flex-direction: column; }
  .photoTrayHeader { align-items: flex-start; flex-direction: column; }
  .photoTrayHeader > div:last-child { width: 100%; justify-content: flex-start; }
  .photoboothTabs { margin-left: -4px; margin-right: -4px; padding-left: 4px; }
  .pbFrameGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .previewCol .cuteCard { padding: 14px; }
  .locketCameraMockup { max-width: 260px; }
  .stickyBottomBar { padding: 7px 12px; }
  .bottomBarSaveBtn { width: 100%; }
  .bottomBarLeft { display: none; }
}

/* Final portrait-preview overrides. */
.captionLiveEditor {
  width: 100%;
  max-width: 350px;
  height: min(690px, 76vh);
  min-height: 540px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid #292621;
  border-radius: 31px;
  background: #11110f;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.captionLiveCamera { flex: 0 0 35%; min-height: 190px; }
.captionLiveSheet {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  margin-top: -22px;
  padding: 12px 13px 13px;
  border-radius: 31px 31px 0 0;
}
.captionLiveList {
  display: block;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  padding: 0 2px 4px;
  overflow-y: auto;
}
.captionLiveGroupGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.captionLiveGroup--custom .captionLiveGroupGrid { grid-template-columns: 1fr; }
.captionLiveItem { min-height: 39px; padding: 7px 9px; border-radius: 999px; }
.captionLiveText { font-size: 10px; }
.captionLiveSheet .captionQuickEditor,
.captionLiveSheet .captionAddLiveBtn { flex: 0 0 auto; }

@media (max-width: 680px) {
  .captionLiveEditor { max-width: 330px; height: min(650px, 72vh); min-height: 500px; border-radius: 28px; }
  .captionLiveCamera { flex-basis: 34%; min-height: 170px; }
  .captionLiveSheet { border-radius: 28px 28px 0 0; padding-left: 10px; padding-right: 10px; }
  .captionLiveItem { min-height: 37px; padding: 7px 8px; }
  .captionLiveText { font-size: 9px; }
}

/* Studio refresh: clear editing controls and a calm, high-contrast canvas. */
:root {
  --bg-main:#f6f7fb; --bg-card:#fff; --bg-subtle:#f4f5fb; --bg-cream:#f0eefc;
  --bg-cream-soft:#f7f6ff; --line:#e2e5ef; --line-strong:#cdd3e3;
  --ink:#18223a; --ink-soft:#3c4861; --muted:#66728a; --muted-light:#7d8798;
  --amber:#6758d7; --amber-dark:#5344c4; --amber-light:#edebff;
  --shadow-sm:0 4px 16px rgba(31,40,79,.04); --shadow-md:0 14px 35px rgba(31,40,79,.06);
  --shadow-lg:0 22px 55px rgba(31,40,79,.1);
  font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
html, body { background:#f6f7fb; }
body { color:var(--ink); font-size:16px; background:radial-gradient(ellipse at 90% 0%,#eeebff 0,transparent 32%),#f6f7fb; }
.appShell { width:min(1240px,calc(100% - 48px)); padding-top:24px; }
.topHeader { padding:4px 0 20px; margin-bottom:4px; border:0; background:transparent; box-shadow:none; backdrop-filter:none; }
.brandLink { gap:11px; text-decoration:none; }
.brandBadge { background:#6758d7; color:white; border-radius:14px; box-shadow:0 6px 16px rgba(103,88,215,.22); }
.brandName { color:#18223a; font-size:19px; letter-spacing:-.05em; }
.brandName span { color:#6758d7; }
.brandSub { color:#68738a; font-size:12px; letter-spacing:.01em; }
.accountChip { background:#fff; border-color:#e1e5ef; color:#4a5771; font-size:13px; }
.accountChip.gold { background:#f0edff; border-color:#dad3ff; color:#5142bd; }
.accountChip .dot { background:#a4adc0; }
.accountChip.gold .dot { background:#38a978; }
.textBtn { color:#594dc0; font-size:13px; }
.stepperBar { top:8px; padding:6px; gap:4px; border:1px solid #e3e6f0; border-radius:18px; background:rgba(255,255,255,.95); box-shadow:0 6px 22px rgba(31,40,79,.06); }
.stepTab { justify-content:flex-start; min-height:48px; padding:10px 15px; font-size:14px; color:#69748a; border-radius:12px; }
.stepTab .stepNum { width:27px; height:27px; flex:0 0 27px; color:#7b8497; border:1px solid #e1e5ef; background:#f6f7fb; font-size:12px; }
.stepTab.active { color:#4134aa; background:#efedff; border-color:#e4e0ff; box-shadow:none; }
.stepTab.active .stepNum { background:#6758d7; border-color:#6758d7; color:#fff; box-shadow:none; }
.stepTab.completed .stepNum { color:#4d826b; border-color:#c9e9da; background:#eaf8f1; }
.cuteCard, .pbStudioCard, .widgetLibraryPanel, .widgetPreviewPanel { border:1px solid #e4e7f0; border-radius:22px; background:#fff; box-shadow:var(--shadow-md); }
.cuteCard { padding:24px; }
.cardTitle, .pbStudioTitle, .widgetLibraryHeader h2 { color:#19233b; font-size:23px; line-height:1.2; letter-spacing:-.035em; }
.cardEyebrow, .captionPreviewEyebrow, .widgetPreviewEyebrow { color:#6e5ed4; font-size:11px; font-weight:800; letter-spacing:.11em; }
.cardDesc, .pbStudioDesc, .pbStudioSection p, .widgetSelectedHint { color:#65718a; font-size:14px; line-height:1.55; }
.inputLabel { color:#3f4a60; font-size:14px; }
.textInput, .selectInput, .searchInput { min-height:46px; color:#1d2941; border-color:#d9deeb; font-size:16px; }
.textInput:focus, .selectInput:focus, .searchBarWrapper:focus-within { border-color:#8173e8; box-shadow:0 0 0 4px rgba(103,88,215,.13); outline:0; }
.btnPrimary, .bottomBarSaveBtn, .go, .widgetUploadBtn, .pbAddFrameBtn { min-height:46px; background:#6758d7; color:white; border:1px solid #6758d7; border-radius:12px; box-shadow:none; font-size:14px; font-weight:750; }
.btnPrimary:hover, .bottomBarSaveBtn:hover, .go:hover, .widgetUploadBtn:hover, .pbAddFrameBtn:hover { background:#5546c3; color:#fff; box-shadow:0 6px 16px rgba(103,88,215,.22); }
.btnPrimary:disabled, .widgetUploadBtn:disabled { opacity:.55; box-shadow:none; }
.btnSecondary, .widgetSoftBtn, .pbSmallBtn, .pbOutlineBtn { min-height:42px; border:1px solid #dce0ed; border-radius:12px; background:#fff; color:#46516a; font-size:14px; }
.btnSecondary:hover, .widgetSoftBtn:hover, .pbSmallBtn:hover { background:#f5f3ff; border-color:#bdb5f0; color:#5142bd; }
.accountHeroBox { padding:clamp(34px,6vw,72px) 24px 28px; text-align:center; border:1px solid #e4e1f5; border-radius:26px; background:radial-gradient(ellipse at 50% 0%,#eeeaff,transparent 58%),#fff; box-shadow:var(--shadow-md); }
.accountHeroSparkle { display:inline-block; background:#f2efff; border:1px solid #e4ddff; color:#6554cb; font-size:11px; letter-spacing:.12em; }
.accountHeroTitle { margin:18px auto 0; color:#17213a; font-size:clamp(35px,4.5vw,56px); letter-spacing:-.055em; line-height:1.1; }
.accountHeroTitle em { font-style:normal; color:#6758d7; background:none; }
.accountHeroDesc { max-width:570px; margin:18px auto 25px; color:#65718a; font-size:16px; }
.accountSearchForm { max-width:620px; }
.searchBarWrapper { padding:5px 5px 5px 17px; border:1px solid #d9deeb; border-radius:15px; background:#fff; box-shadow:0 8px 24px rgba(31,40,79,.06); }
.searchPrefix { color:#6758d7; }
.searchInput { font-size:16px; border:0; box-shadow:none; }
.searchSubmitBtn { min-height:45px; border-radius:11px; }
.searchChip { color:#6a7590; font-size:13px; font-weight:600; }
.heroFeatures { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; max-width:800px; margin:38px auto 0; text-align:left; }
.heroFeatures > div { display:grid; grid-template-columns:38px 1fr; gap:1px 10px; align-items:center; padding:15px; border:1px solid #e8e9f2; border-radius:15px; background:#fff; }
.heroFeatures span { grid-row:1/3; display:grid; place-items:center; width:38px; height:38px; border-radius:12px; background:#f0edff; color:#6758d7; font-size:20px; }
.heroFeatures strong { font-size:14px; color:#293650; }
.heroFeatures small { font-size:12px; color:#778196; }
.verifiedAccountCard { border-color:#e4e1f5; }
.avatarRing { background:#eeeaff; color:#6758d7; box-shadow:none; }
.goldDateCard { background:#fff; border-color:#e4e7f0; }
.dateModeOption { border-color:#dfe3ef; background:#fff; }
.dateModeOption.active { border-color:#9a8ded; background:#f3f1ff; box-shadow:0 0 0 3px rgba(103,88,215,.1); }
.dateModeOption b { font-size:14px; } .dateModeOption small { font-size:12px; }
#captionList { display:grid !important; gap:12px; }
#btnAddCaption { display:flex !important; margin-top:14px; }
.captionAdditiveNotice { display:flex !important; color:#566482; background:#f4f6fc; border:1px solid #e5e9f4; font-size:13px; }
.captionItemCard { border:1px solid #e1e5ef; border-radius:15px; padding:14px; background:#fff; }
.captionItemCard:hover { border-color:#beb5f0; box-shadow:0 5px 15px rgba(45,40,100,.05); }
.captionMainRow { gap:8px; }
.captionPaletteRow { margin-top:10px; }
.paletteLabel { font-size:13px; color:#58647b; }
.addCaptionBtn { width:100%; min-height:46px; justify-content:center; align-items:center; border:1px dashed #c7bff4; border-radius:12px; background:#f8f7ff; color:#5b4cc9; font-size:14px; }
.captionPreviewSection { margin:0; padding:0; border:0; }
.captionPreviewTitle { font-size:18px; color:#202b43; }
.captionPreviewHint { color:#69758a; font-size:12px; }
.captionEmpty { color:#c9ced8; text-align:center; font-size:13px; padding:20px 10px; }
.goldCardMockup { margin-top:20px; }
.pbStudioCard { padding:28px; }
.pbStudioHeader { border-color:#e9ebf3; }
.pbStudioLayout { gap:24px; }
.pbStudioControls { display:flex; flex-direction:column; gap:16px; min-width:0; }
.pbPhotoTray { order:0; } .pbLibrarySection { order:1; } .pbLayoutSection { order:2; }
.pbStudioFormSection { order:3; } .pbAdvanced { order:4; } #btnSaveCustomFrame { order:5; }
.pbFrameUploadBlock { order:6; } .pbPromptCard { order:7; }
.pbStudioSection, .pbStudioFormSection, .pbPromptCard, .photoTrayBox, .pbAdvanced { border-color:#e4e7f0; background:#fafbfe; }
.pbPromptText { font-size:14px; line-height:1.55; color:#44506a; }
.pbStudioCard p, .pbFieldNote, .pbCommonPhotoArea small { font-size:13px; line-height:1.5; }
.pbPhotoEmpty { padding:18px; }
.pbTabBtn, .pbLayoutOption, .pbSlotButton { font-size:13px; border-color:#dfe3ee; background:#fff; color:#56627a; }
.pbTabBtn.active, .pbLayoutOption.active, .pbSlotButton.active { background:#eeebff; border-color:#a99ef0; color:#4f40b9; }
.pbFrameCard { border-color:#e2e5ef; background:#fff; }
.pbFrameCard.active { border-color:#8c7ce5; box-shadow:0 0 0 3px rgba(103,88,215,.12); }
.pbSavedChoose { display:grid; width:100%; text-align:left; gap:5px; }
.pbSavedDelete { width:100%; min-height:34px; margin-top:8px; font-size:13px; }
.pbPreviewCanvasCard { background:#20253a; }
.pbPreviewHeading { color:#6e5ed4; font-size:11px; }
.pbPreviewStatus strong { color:#f1efff; font-size:13px; } .pbPreviewStatus span { color:#c4c4db; font-size:11px; }
.widgetLibraryPanel { padding:26px; }
.widgetPreviewPanel { padding:26px; background:#f7f6ff; border-color:#e3dfff; }
.widgetGalleryGrid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; max-height:none; overflow:visible; }
.widgetLoadMore { display:block; margin:16px auto 0; padding:9px 18px; }
.widgetGalleryTab.active, .widgetFrameThumb.selected { border-color:#8e7fe8; color:#5645bf; }
.widgetGalleryTab, .widgetFrameCaption, .widgetCurrentFrameStatus, .widgetGallerySource { font-size:13px; }
.widgetUploadCard { border-color:#ddd9f4; background:#faf9ff; }
.widgetCustomizeDetails { border-color:#e0def1; background:#fff; }
.widgetCustomizeDetails summary { color:#5546bd; font-size:14px; }
.stickyBottomBar { background:rgba(255,255,255,.96); border-top:1px solid #e4e7f0; box-shadow:0 -5px 24px rgba(31,40,79,.06); }
.bottomBarInner { gap:12px; } .bottomBarLeft { gap:10px; }
.bottomBarSaveBtn { min-width:170px; }
.saveStatus { color:#66728a; font-size:13px; white-space:nowrap; }
.saveStatus[data-state="dirty"] { color:#b25a12; font-weight:700; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline:3px solid #988cf2; outline-offset:2px; }
@media (max-width:900px) {
  .splitView, .pbStudioLayout, .widgetStudioLayout { grid-template-columns:1fr; }
  .previewCol { position:static; order:0; }
  .widgetPreviewPanel { position:static; }
}
@media (max-width:680px) {
  body { padding-bottom:82px; }
  .appShell { width:calc(100% - 28px); padding-top:16px; }
  .topHeader { padding-bottom:14px; }
  .brandName { font-size:17px; } .brandSub { font-size:11px; }
  .headerActions .accountChip { max-width:125px; }
  .stepperBar { display:grid; grid-template-columns:repeat(4,minmax(135px,1fr)); overflow-x:auto; margin-bottom:16px; }
  .stepTab { min-height:44px; padding:8px 10px; font-size:13px; }
  .accountHeroBox { padding:34px 18px 20px; border-radius:20px; }
  .accountHeroTitle { font-size:36px; } .accountHeroDesc { font-size:15px; }
  .searchBarWrapper { padding-left:12px; } .searchInput { font-size:16px; }
  .searchSubmitBtn { min-width:88px; font-size:14px; }
  .heroFeatures { grid-template-columns:1fr; gap:8px; margin-top:26px; }
  .heroFeatures > div { padding:10px 12px; }
  .cuteCard, .pbStudioCard, .widgetLibraryPanel, .widgetPreviewPanel { padding:18px; border-radius:18px; }
  .cardTitle, .pbStudioTitle, .widgetLibraryHeader h2 { font-size:21px; }
  .captionMainRow { grid-template-columns:20px 44px minmax(0,1fr) auto 30px; gap:5px; }
  .captionOrderBtn { min-width:30px; }
  .widgetGalleryGrid { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:none; }
  .pbFrameGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bottomBarLeft { display:flex !important; flex:1; min-width:0; }
  .bottomStepIndicator, #bottomBarUser { display:none; }
  .bottomBarSaveBtn { min-width:145px; }
  .stickyBottomBar { padding:10px 14px calc(10px + env(safe-area-inset-bottom)); }
}
@media (max-width:380px) {
  .captionMainRow { grid-template-columns:18px 42px minmax(0,1fr) 30px; }
  .captionOrderControls { grid-column:3/5; justify-content:flex-end; }
  .bottomBarSaveBtn { min-width:130px; padding-inline:10px; }
}
.draftConflict { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; padding:15px 18px; border:1px solid #e4c78f; border-radius:16px; background:#fff9eb; color:#6c4b20; }
.draftConflict strong { font-size:14px; } .draftConflict p { margin:3px 0 0; font-size:13px; line-height:1.45; }
.draftConflictActions { display:flex; flex-wrap:wrap; gap:8px; }
.draftConflictActions button { min-height:40px; padding:8px 12px; border:1px solid #d8b476; border-radius:10px; background:#fff; color:#684c27; font-size:13px; font-weight:700; }
.draftConflictActions button:first-child { background:#6758d7; border-color:#6758d7; color:#fff; }
@media (max-width:680px) { .draftConflict { align-items:stretch; flex-direction:column; } .draftConflictActions button { flex:1; } }
#captionCounter { flex:0 0 auto; max-width:none; white-space:nowrap; }
.cardHead > div { min-width:0; }
@media (max-width:480px) {
  .topHeader { gap:6px; }
  .brandLink { gap:8px; min-width:0; }
  .brandName { font-size:15px; white-space:nowrap; }
  .brandSub { display:none; }
  .headerActions { gap:3px; }
  .headerActions .accountChip { max-width:104px; padding:6px 8px; font-size:12px; }
  .textBtn { white-space:nowrap; font-size:12px; padding:6px; }
}

/* Warm Locket-inspired accents and direct paths to the creative tools. */
:root { --bg-main:#fbfaf6; --bg-subtle:#f8f6ef; --bg-cream:#fff4d9; --bg-cream-soft:#fffaf0; --line:#eae5d9; --line-strong:#ded5c2; --ink:#292416; --ink-soft:#514b3e; --muted:#756e60; --amber:#f0b32d; --amber-dark:#aa7413; --amber-light:#fff1c1; }
html, body { background:#fbfaf6; }
body { background:radial-gradient(ellipse at 90% 0%,#fff2d4 0,transparent 32%),#fbfaf6; }
.brandBadge { background:#f7ba31; color:#654512; box-shadow:0 6px 16px rgba(212,153,29,.18); }
.brandName, .cardTitle, .pbStudioTitle, .widgetLibraryHeader h2 { color:#2c271b; }
.brandName span { color:#c68e1f; }
.brandSub, .cardDesc, .pbStudioDesc, .pbStudioSection p, .widgetSelectedHint { color:#756e60; }
.accountChip { border-color:#eae5d9; color:#655c48; }
.accountChip.gold { background:#fff5d8; border-color:#f4dca4; color:#926611; }
.textBtn { color:#9b6d15; }
.stepperBar { border-color:#ece6d9; box-shadow:0 6px 22px rgba(80,63,28,.05); }
.stepTab { color:#7b7364; }
.stepTab .stepNum { color:#8c8069; border-color:#eae3d4; background:#faf8f1; }
.stepTab.active { color:#6a4a0a; background:#fff2c6; border-color:#f6e5ad; }
.stepTab.active .stepNum { background:#f3b62a; border-color:#f3b62a; color:#5a3b00; }
.cuteCard, .pbStudioCard, .widgetLibraryPanel, .widgetPreviewPanel { border-color:#ede7db; box-shadow:0 14px 35px rgba(77,58,21,.055); }
.cardEyebrow, .captionPreviewEyebrow, .widgetPreviewEyebrow, .pbPreviewHeading { color:#a9761a; }
.btnPrimary, .bottomBarSaveBtn, .go, .widgetUploadBtn, .pbAddFrameBtn { background:#f5b92f; border-color:#e9a822; color:#493409; }
.btnPrimary:hover, .bottomBarSaveBtn:hover, .go:hover, .widgetUploadBtn:hover, .pbAddFrameBtn:hover { background:#ffca52; color:#493409; box-shadow:0 6px 16px rgba(207,151,36,.18); }
.btnSecondary, .widgetSoftBtn, .pbSmallBtn, .pbOutlineBtn { border-color:#e7dfcf; color:#61563f; }
.btnSecondary:hover, .widgetSoftBtn:hover, .pbSmallBtn:hover { background:#fff9eb; border-color:#dfbf76; color:#8b6211; }
.textInput:focus, .selectInput:focus, .searchBarWrapper:focus-within { border-color:#e8b243; box-shadow:0 0 0 4px rgba(238,182,55,.15); }
.accountHeroBox { border-color:#f0e7d5; background:radial-gradient(ellipse at 50% 0%,#fff0ca,transparent 62%),#fffefa; }
.accountHeroSparkle { background:#fff9e9; border-color:#f5e2b8; color:#9d7119; }
.accountHeroTitle { color:#30291b; }.accountHeroTitle em { color:#ce961e; }
.accountHeroDesc, .searchChip { color:#796f5d; }
.searchBarWrapper { border-color:#e7dfcf; }.searchPrefix { color:#bb8624; }
.heroExplore { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin:22px auto 0; }
.heroExplore button { min-height:44px; padding:10px 18px; }
.heroFeatures > div { border-color:#eee9de; background:#fff; }
.heroFeatures span { background:#fff3d3; color:#b7831b; }
.heroFeatures strong { color:#443b2a; }.heroFeatures small { color:#827866; }
.dateModeOption.active { border-color:#e2bd60; background:#fff8e5; box-shadow:0 0 0 3px rgba(238,182,55,.12); }
.captionAdditiveNotice { background:#fffbf2; border-color:#f0e5cc; color:#756440; }
.captionItemCard { border-color:#eee8da; }.captionItemCard:hover { border-color:#e0c37d; }
.addCaptionBtn { border-color:#e1c986; background:#fffbf0; color:#94680f; }
.pbStudioSection, .pbStudioFormSection, .pbPromptCard, .photoTrayBox, .pbAdvanced { border-color:#eee7d9; background:#fffdf8; }
.pbTabBtn.active, .pbLayoutOption.active, .pbSlotButton.active { background:#fff2c6; border-color:#e8c269; color:#805b0c; }
.pbFrameCard.active { border-color:#e8b43c; box-shadow:0 0 0 3px rgba(238,182,55,.13); }
.widgetPreviewPanel { background:#fffaf0; border-color:#efe2c5; }
.widgetGalleryTab.active, .widgetFrameThumb.selected { border-color:#deb75c; color:#936913; }
.widgetUploadCard, .widgetCustomizeDetails { border-color:#eee4d2; background:#fffdfa; }
.widgetCustomizeDetails summary { color:#986c19; }
.stickyBottomBar { border-color:#e9e3d7; background:rgba(255,254,250,.97); }
.draftConflictActions button:first-child { background:#f5b92f; border-color:#e9a822; color:#493409; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline-color:#dba62b; }
