:root {
  --ink: #0b0d12;
  --surface: #14171f;
  --surface-2: #1b1f2b;
  --hairline: #262b39;
  --hairline-soft: #1e222e;
  --text: #f3f5f9;
  --text-muted: #8b93a7;
  --accent: #3e7bfa;
  --accent-2: #6a9bff;
  --accent-soft: rgba(62, 123, 250, 0.16);
  --gold: #e8b84b;
  --gold-soft: rgba(232, 184, 75, 0.16);
  --success: #38d9a9;
  --success-soft: rgba(56, 217, 169, 0.14);
  --error: #ff6b6b;
  --error-soft: rgba(255, 107, 107, 0.12);
  --radius-lg: 28px;
  --radius-md: 16px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
  background: var(--ink);
  position: relative;
  overflow-x: hidden;
}

/* ---------------- ambient backdrop ---------------- */
/* دو لکه‌ی نرمِ محوِ آبی/طلایی که خیلی آروم جابه‌جا می‌شن — یه اتمسفرِ
   کارگاهی و گرم پشتِ صحنه، بدونِ اینکه حواسِ کاربر رو از محتوا پرت کنه. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.ambient .orb-a {
  width: 340px; height: 340px;
  top: -140px; left: -80px;
  background: radial-gradient(circle, rgba(62, 123, 250, 0.35), transparent 70%);
  animation: drift-a 26s ease-in-out infinite;
}
.ambient .orb-b {
  width: 300px; height: 300px;
  bottom: -120px; right: -90px;
  background: radial-gradient(circle, rgba(232, 184, 75, 0.22), transparent 70%);
  animation: drift-b 30s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.12); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, -30px) scale(1.08); }
}

.scene {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 28px 22px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------------- entrance choreography ---------------- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.scene > * {
  animation: reveal-up .62s var(--ease-out) both;
}
.scene > .medallion { animation: reveal-pop .68s var(--ease-out) both; }
.scene > .eyebrow      { animation-delay: .02s; }
.scene > .medallion    { animation-delay: .08s; }
.scene > .headline     { animation-delay: .20s; }
.scene > .sub          { animation-delay: .27s; }
.scene > .style-picker { animation-delay: .34s; }
.scene > .color-panel  { animation-delay: 0s; } /* opens later, not part of load sequence */
.scene > .dropzone     { animation-delay: .41s; }
.scene > .filename     { animation-delay: 0s; }
.scene > .cta           { animation-delay: .48s; }
.scene > .status        { animation-delay: 0s; }
.scene > .footnote     { animation-delay: .55s; }

@media (prefers-reduced-motion: reduce) {
  .scene > * { animation: none !important; }
  .ambient .orb { animation: none !important; }
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.eyebrow .dot { color: var(--accent); }

/* ---------------- medallion ---------------- */
.medallion {
  position: relative;
  width: 216px;
  height: 216px;
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 40s linear infinite;
  transition: filter .5s var(--ease-standard);
}
.medallion.is-ready .ring {
  animation-duration: 16s;
  filter: drop-shadow(0 0 6px rgba(232, 184, 75, 0.45));
}
@media (prefers-reduced-motion: reduce) {
  .ring { animation: none; }
}
.ring-track {
  fill: none;
  stroke: var(--hairline);
  stroke-width: 1.2;
}
.ring-ticks {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1 11.2;
  opacity: 0.85;
  transition: stroke .5s var(--ease-standard), opacity .5s var(--ease-standard);
}
.medallion.is-ready .ring-ticks {
  stroke: var(--gold);
  opacity: 1;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* شراره‌ی کوچیکی که فقط وقتی «آماده»‌ایم، دورِ حلقه می‌چرخه — یه نشانه‌ی
   زنده که می‌گه «لوگو نشست، منتظرِ فورج‌کردنیم»، نه صرفاً تزئین. */
.ring-comet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 16s linear infinite;
  opacity: 0;
  transition: opacity .4s var(--ease-standard);
  pointer-events: none;
}
.medallion.is-ready .ring-comet { opacity: 1; }
.ring-comet::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px 3px rgba(232, 184, 75, 0.85), 0 0 22px 6px rgba(232, 184, 75, 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .ring-comet { animation: none; opacity: 0 !important; }
}

.medallion-face {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, var(--surface-2), var(--surface) 70%);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,0.25), 0 18px 40px -18px rgba(62, 123, 250, 0.55);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .18s ease, transform .18s ease, box-shadow .5s var(--ease-standard);
}
.medallion.is-ready .medallion-face {
  box-shadow: inset 0 0 0 6px rgba(0,0,0,0.25), 0 18px 44px -16px rgba(232, 184, 75, 0.45);
}
.medallion-face.is-swapping { opacity: 0; transform: scale(0.96); }
.medallion-face > svg, .medallion-face > * { width: 78%; height: 78%; }

.logo-thumb {
  position: absolute;
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink);
  bottom: 6px;
  right: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  transform: scale(0.4);
  opacity: 0;
  animation: stamp-in .5s var(--ease-spring) forwards;
}
@keyframes stamp-in {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-thumb { animation: none; transform: scale(1); opacity: 1; }
}

/* ---------------- style picker ---------------- */
.style-picker {
  width: 100%;
  margin: 4px 0 22px;
}

/* -- category tabs (pill row, horizontal scroll) -- */
.style-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.style-tabs::-webkit-scrollbar { display: none; }
.style-tabs[hidden] { display: none; }

.style-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  background: var(--surface);
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s var(--ease-standard),
              background .2s var(--ease-standard),
              color .2s var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.style-tab:active { transform: scale(0.96); }
.style-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

/* -- toolbar: "Select All" + live counter, sits above the grid -- */
.style-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 12px;
}
.style-toolbar[hidden] { display: none; }

.select-all-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  background: var(--surface);
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s var(--ease-standard), background .2s var(--ease-standard), color .2s var(--ease-standard);
}
.select-all-btn:active { transform: scale(0.96); }
.select-all-btn.all-selected {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--text);
}
.sab-icon {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 5px;
  border: 1.5px solid var(--text-muted);
  position: relative;
  transition: border-color .18s ease, background .18s ease;
}
.sab-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0px;
  width: 4px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(40deg);
  opacity: 0;
  transition: opacity .15s ease;
}
.select-all-btn.all-selected .sab-icon {
  border-color: var(--gold);
  background: var(--gold);
}
.select-all-btn.all-selected .sab-icon::after { opacity: 1; }

.selection-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--accent-2);
  white-space: nowrap;
}
.selection-count[hidden] { display: none; }

/* -- grouped section headings, only shown when "All" spans >1 category -- */
.style-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 2px 9px;
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.style-group-grid + .style-group-heading { margin-top: 22px; }
.style-group-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 2px 8px;
  text-transform: none;
  letter-spacing: 0;
}

/* -- the grid itself: 3 columns of square animated cards, à la a proper
   template gallery instead of one thin scrolling strip -- */
.style-group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.style-card {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
  border-radius: 18px;
  border: 1.5px solid var(--hairline);
  background: radial-gradient(circle at 35% 25%, var(--surface-2), var(--ink) 78%);
  cursor: pointer;
  transition: border-color .2s var(--ease-standard),
              background .2s var(--ease-standard),
              transform .25s var(--ease-spring),
              box-shadow .2s var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.style-card:active { transform: scale(0.95); }
.style-card.active {
  border-color: var(--accent);
  background: radial-gradient(circle at 35% 25%, var(--accent-soft), var(--ink) 78%);
  box-shadow: 0 10px 22px -14px rgba(62, 123, 250, 0.6);
}
/* حلقه‌ی ضربانیِ کوتاه، فقط لحظه‌ی انتخاب — مثلِ یه تاییدِ لمسی/بصری */
.style-card.just-picked::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1.5px solid var(--accent);
  opacity: 0.9;
  animation: pick-pulse .5s var(--ease-out) forwards;
}
@keyframes pick-pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(1.28); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .style-card.just-picked::before { animation: none; display: none; }
}
.style-card-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform .3s var(--ease-spring);
}
.style-card.active .style-card-thumb { transform: scale(1.06); }
.style-card-thumb > svg,
.style-card-thumb > canvas { width: 100%; height: 100%; }
.style-card-thumb .thumb-emoji { font-size: 28px; line-height: 1; }

/* -- multi-select checkbox badge, independent of the "active" preview ring -- */
.style-card-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 1.5px solid rgba(243, 245, 249, 0.4);
  background: rgba(11, 13, 18, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color .16s ease, background .16s ease, transform .16s var(--ease-spring);
}
.style-card-check:active { transform: scale(0.88); }
.style-card-check::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(40deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity .13s ease;
}
.style-card-check.checked {
  border-color: var(--gold);
  background: var(--gold);
}
.style-card-check.checked::after { opacity: 1; }

/* ---------------- color customization panel ---------------- */
/* آکاردئونِ نرم با تکنیکِ grid-template-rows: 0fr -> 1fr — بدونِ نیاز به
   اندازه‌گیریِ ارتفاع تویِ جاوااسکریپت، و خودش انیمیت می‌شه. */
.color-panel {
  width: 100%;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-bottom: 0;
  transition: grid-template-rows .42s var(--ease-out), opacity .3s var(--ease-standard), margin-bottom .42s var(--ease-out);
}
.color-panel.open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 22px;
}
.color-panel-inner {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline);
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.65);
  text-align: left;
}
.color-panel-title {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 18px 16px 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cp-emoji { font-size: 14px; }

.theme-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
}
.theme-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-top: -4px;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--ink);
  border: 1px solid var(--hairline);
  transition: border-color .15s ease, transform .15s var(--ease-standard);
}
.color-row:focus-within { border-color: var(--accent); }
.color-row:active { transform: scale(0.97); }
.theme-main-row .color-row-info { flex: 1; }

.color-swatch-wrap {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  cursor: pointer;
}
.color-row-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.color-row-label {
  font-family: "Unbounded", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.color-row-hex {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  transition: color .15s ease;
}

/* -- one-tap theme presets -- */
.theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 1px 0;
}
.theme-preset {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--ink), 0 6px 12px -6px rgba(0,0,0,0.6);
  transition: border-color .15s var(--ease-standard), transform .15s var(--ease-spring), box-shadow .15s var(--ease-standard);
}
.theme-preset:active { transform: scale(0.88); }
.theme-preset.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--accent);
  transform: scale(1.08);
}

.color-row-hex-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.color-row-hex-input::placeholder { color: var(--text-muted); }
.color-row-hex-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.color-panel-empty {
  padding: 0 16px 16px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}
/* وقتی داخلِ theme-picker ـه، والد خودش قبلاً پدینگ داره — دوباره اضافه نکن */
.theme-picker > .color-panel-empty {
  padding: 0;
}
.color-swatch {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  padding: 0;
  cursor: pointer;
  background: transparent;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--ink), 0 6px 14px -6px rgba(0,0,0,0.6);
  transition: box-shadow .15s var(--ease-standard), transform .15s var(--ease-spring);
}
.color-swatch:active { transform: scale(0.9); }
.color-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.color-swatch::-webkit-color-swatch { border: none; border-radius: 50%; }
.color-swatch::-moz-color-swatch { border: none; border-radius: 50%; }

/* ---------------- copy ---------------- */
.headline {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  transition: opacity .25s ease;
}

.sub {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 360px;
  transition: opacity .25s ease;
}

/* ---------------- dropzone ---------------- */
.dropzone {
  position: relative;
  width: 100%;
  border: 1.5px dashed var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color .22s var(--ease-standard), background .22s var(--ease-standard),
              transform .15s var(--ease-standard), box-shadow .3s var(--ease-standard);
}
.dropzone:active { transform: scale(0.99); }
.dropzone.has-file {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.015);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
/* فلاشِ کوتاهِ «مهر خوردن» لحظه‌ی قبول‌شدنِ فایل */
.dropzone.just-stamped::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid var(--accent);
  animation: stamp-flash .55s var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes stamp-flash {
  from { box-shadow: 0 0 0 0 rgba(62, 123, 250, 0.55); opacity: 1; }
  to { box-shadow: 0 0 0 14px rgba(62, 123, 250, 0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dropzone.just-stamped::after { animation: none; display: none; }
}

.dz-icon-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  flex: none;
}
.dz-icon {
  position: absolute;
  inset: 0;
  width: 26px; height: 26px;
  color: var(--accent);
  transition: opacity .28s var(--ease-out), transform .32s var(--ease-spring);
}
.dz-icon-check {
  opacity: 0;
  transform: scale(0.5) rotate(-20deg);
}
.dropzone.has-file .dz-icon-arrow {
  opacity: 0;
  transform: scale(0.5) rotate(20deg);
}
.dropzone.has-file .dz-icon-check {
  opacity: 1;
  transform: scale(1) rotate(0);
  color: var(--accent);
}
.dz-text { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.dz-title { font-size: 15px; font-weight: 600; transition: opacity .2s ease; }
.dz-hint { font-size: 12.5px; color: var(--text-muted); }

.filename {
  width: 100%;
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  margin-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: reveal-up .35s var(--ease-out) both;
}

/* ---------------- CTA ---------------- */
.cta {
  position: relative;
  width: 100%;
  margin-top: 22px;
  padding: 17px 20px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s var(--ease-standard), opacity .18s ease,
              box-shadow .3s var(--ease-standard), background .35s var(--ease-standard);
  box-shadow: 0 14px 28px -12px rgba(62, 123, 250, 0.65);
}
.cta:active:not(:disabled) { transform: scale(0.97); }
.cta:disabled {
  opacity: 0.38;
  box-shadow: none;
  cursor: not-allowed;
}
.cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
/* شیمرِ آروم — فقط وقتی دکمه فعاله، یه دعوتِ ظریف برایِ لمس */
.cta::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  animation: shimmer 4.2s ease-in-out infinite;
  animation-delay: 1.4s;
}
.cta:disabled::before,
.cta.is-loading::before,
.cta.is-success::before { display: none; }
@keyframes shimmer {
  0% { left: -60%; }
  28% { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .cta::before { animation: none; display: none; }
}

.cta-label, .cta-check {
  transition: opacity .2s ease, transform .2s var(--ease-standard);
}
.cta.is-loading .cta-label,
.cta.is-success .cta-label { opacity: 0; transform: translateY(4px); position: absolute; }

.cta-spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: spin-fast .7s linear infinite;
}
@keyframes spin-fast { to { transform: rotate(360deg); } }

.cta.is-success {
  background: var(--success);
  box-shadow: 0 14px 28px -12px rgba(56, 217, 169, 0.6);
}
.cta-check {
  width: 20px; height: 20px;
  opacity: 0;
  transform: scale(0.6);
}
.cta.is-success .cta-check {
  opacity: 1;
  transform: scale(1);
}
.cta-check-path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset .38s var(--ease-out) .08s;
}
.cta.is-success .cta-check-path { stroke-dashoffset: 0; }

/* ---------------- status ---------------- */
.status {
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: reveal-up .35s var(--ease-out) both;
}
.status-icon {
  flex: none;
  width: 18px;
  line-height: 1.5;
}
.status.success {
  background: var(--success-soft);
  border: 1px solid rgba(56, 217, 169, 0.35);
  color: var(--success);
}
.status.error {
  background: var(--error-soft);
  border: 1px solid rgba(255, 107, 107, 0.32);
  color: var(--error);
}
.status.warn {
  background: var(--gold-soft);
  border: 1px solid rgba(232, 184, 75, 0.35);
  color: var(--gold);
}

.footnote {
  margin-top: 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  opacity: 0.8;
}

@media (max-width: 420px) {
  .theme-preset {
    width: 27px;
    height: 27px;
  }
}
