/* =====================================================================
   هوش استایل — سیستم طراحی
   مفهوم: «اتاق پرو». قاب آینه قوسی تنها عنصر امضادار است؛ بقیه آرام و منظم.
   همه فاصله‌ها با ویژگی‌های منطقی (inline/block) نوشته شده تا RTL و LTR هر دو درست باشند.
   ===================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-var.f6d31671339d.woff2") format("woff2-variations"), url("../fonts/vazirmatn-var.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #F6F5FA;
  --surface: #FFFFFF;
  --surface-2: #EFEDF6;
  --ink: #1E1631;
  --ink-2: #4A4361;
  --ink-3: #7A7392;
  --line: #E3E0EC;
  --line-strong: #CFCADF;
  --violet: #5B4BDB;
  --violet-ink: #4535C4;
  --violet-soft: #ECE9FC;
  --lagoon: #0F8F83;
  --lagoon-soft: #E2F4F1;
  --blush: #F6E6EC;
  --danger: #C2364B;
  --danger-soft: #FBE9EC;
  --warn: #A86A00;
  --warn-soft: #FDF1DC;
  --ok: #17845A;
  --ok-soft: #E3F4EC;
  --mirror-edge: linear-gradient(160deg, #6FD3C6 0%, #8C7FF5 55%, #5B4BDB 100%);
  --shadow-1: 0 1px 2px rgba(30, 22, 49, .06), 0 2px 8px rgba(30, 22, 49, .05);
  --shadow-2: 0 10px 30px -12px rgba(36, 27, 61, .28);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --arch: 999px 999px 26px 26px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --fs-0: .8125rem;
  --fs-1: .9375rem;
  --fs-2: 1.0625rem;
  --fs-3: 1.3125rem;
  --fs-4: 1.625rem;
  --fs-5: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --fs-6: clamp(2.2rem, 1.4rem + 3.4vw, 3.75rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13101C; --surface: #1B1727; --surface-2: #241F33; --ink: #EEEAF7; --ink-2: #C3BCD8; --ink-3: #8F88A8;
    --line: #2E2840; --line-strong: #3E3756; --violet: #9488F7; --violet-ink: #B3AAFB; --violet-soft: #2A2450;
    --lagoon: #3CC6B6; --lagoon-soft: #13312E; --blush: #2C1F2A; --danger: #F07A8C; --danger-soft: #3A1A22;
    --warn: #F0B54A; --warn-soft: #33270F; --ok: #4CC997; --ok-soft: #12302A;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 14px 34px -14px rgba(0,0,0,.7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13101C; --surface: #1B1727; --surface-2: #241F33; --ink: #EEEAF7; --ink-2: #C3BCD8; --ink-3: #8F88A8;
  --line: #2E2840; --line-strong: #3E3756; --violet: #9488F7; --violet-ink: #B3AAFB; --violet-soft: #2A2450;
  --lagoon: #3CC6B6; --lagoon-soft: #13312E; --blush: #2C1F2A; --danger: #F07A8C; --danger-soft: #3A1A22;
  --warn: #F0B54A; --warn-soft: #33270F; --ok: #4CC997; --ok-soft: #12302A;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 14px 34px -14px rgba(0,0,0,.7); color-scheme: dark;
}

/* ---------------------------------------------------------------- پایه */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: var(--fs-2); line-height: 1.85;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
html[dir="ltr"] body { line-height: 1.65; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--violet-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--violet); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-6); font-weight: 850; line-height: 1.2; }
h2 { font-size: var(--fs-5); font-weight: 800; }
h3 { font-size: var(--fs-3); font-weight: 700; }
h4 { font-size: var(--fs-2); font-weight: 700; }
html[dir="ltr"] h1, html[dir="ltr"] h2 { letter-spacing: -.02em; }
p { margin: 0 0 1em; text-wrap: pretty; }
small, .small { font-size: var(--fs-0); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--violet-soft); color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code, kbd, pre, .ltr { direction: ltr; unicode-bidi: isolate; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em; }
pre { background: #191426; color: #E9E5F5; padding: 1rem 1.15rem; border-radius: var(--radius-m); overflow-x: auto; line-height: 1.6; text-align: left; }
:not(pre) > code { background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: var(--radius-s); z-index: 100; }
.skip-link:focus { top: 1rem; color: var(--paper); }
.muted { color: var(--ink-3); }
.text-2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- چیدمان */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 760px; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section-head { max-width: 640px; margin-block-end: 2.25rem; }
.section-head p { color: var(--ink-2); font-size: var(--fs-2); }
.stack > * + * { margin-block-start: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, .75rem); align-items: center; }
.grid { display: grid; gap: var(--gap, 1.25rem); grid-template-columns: repeat(auto-fill, minmax(var(--min, 240px), 1fr)); }
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: 1.05fr .95fr; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.pad { padding: clamp(1.25rem, 3vw, 2rem); }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------------------------------------------------------------- هدر */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-block-end: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 66px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 850; font-size: 1.2rem; flex-shrink: 0; }
.brand img { width: 40px; height: 27px; }
.brand:hover { color: var(--ink); }
.main-nav { display: flex; gap: .15rem; margin-inline-start: 1rem; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-1); font-weight: 600; padding: .45rem .7rem; border-radius: var(--radius-s); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: .35rem; margin-inline-start: auto; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.badge-count { position: absolute; top: 3px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.lang-menu, .mobile-menu { position: relative; }
.lang-menu > summary, .mobile-menu > summary { list-style: none; }
.lang-menu > summary::-webkit-details-marker, .mobile-menu > summary::-webkit-details-marker { display: none; }
.dropdown { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-2); padding: .35rem; z-index: 50; }
.dropdown a, .dropdown button { display: flex; width: 100%; justify-content: space-between; gap: .5rem; padding: .5rem .75rem; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font: inherit; font-size: var(--fs-1); background: none; border: 0; cursor: pointer; text-align: start; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }
.dropdown [aria-current="true"] { color: var(--violet-ink); font-weight: 700; }
.mobile-menu { display: none; }
.mobile-panel { position: fixed; inset: 66px 0 auto 0; background: var(--paper); border-block-end: 1px solid var(--line); padding: 1rem var(--gutter) 1.5rem; box-shadow: var(--shadow-2); }
.mobile-panel a { display: block; padding: .7rem 0; border-block-end: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
@media (max-width: 980px) {
  .main-nav, .header-actions .hide-m { display: none; }
  .mobile-menu { display: block; }
}

/* ---------------------------------------------------------------- دکمه */
.btn { --bg: var(--surface); --fg: var(--ink); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem 1.2rem;
  border-radius: 999px; border: 1px solid var(--bd); background: var(--bg); color: var(--fg); font: inherit; font-weight: 700;
  font-size: var(--fs-1); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:hover { color: var(--fg); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { --bg: var(--violet); --fg: #fff; --bd: var(--violet); }
.btn-primary:hover { --bg: var(--violet-ink); --bd: var(--violet-ink); color: #fff; }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-primary:hover { color: #14102A; --fg: #14102A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { --fg: #14102A; } }
.btn-ink { --bg: var(--ink); --fg: var(--paper); --bd: var(--ink); }
.btn-ink:hover { color: var(--paper); opacity: .92; }
.btn-ghost { --bg: transparent; --bd: transparent; color: var(--ink-2); }
.btn-ghost:hover { --bg: var(--surface-2); }
.btn-danger { --bg: var(--danger-soft); --fg: var(--danger); --bd: transparent; }
.btn-lg { min-height: 54px; padding-inline: 1.7rem; font-size: var(--fs-2); }
.btn-sm { min-height: 34px; padding: .25rem .8rem; font-size: var(--fs-0); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--violet-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- فرم */
.field { display: grid; gap: .35rem; margin-block-end: 1rem; }
.field > label, .label { font-weight: 600; font-size: var(--fs-1); color: var(--ink); }
.field .help { color: var(--ink-3); font-size: var(--fs-0); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .65rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-2); transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.field input[type=color] { padding: .25rem; width: 80px; }
.field .errorlist, .errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: var(--fs-0); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-1); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-block-start: .3rem; accent-color: var(--violet); flex-shrink: 0; }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.choice-cards { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.choice-cards label { position: relative; display: flex; gap: .6rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius-m); cursor: pointer; background: var(--surface); font-weight: 600; }
.choice-cards input { accent-color: var(--violet); width: 18px; height: 18px; }
.choice-cards label:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 1.5rem !important; font-weight: 700; direction: ltr; }

/* ---------------------------------------------------------------- آینه (عنصر امضا) */
.mirror { position: relative; border-radius: var(--arch); padding: 6px; background: var(--mirror-edge); box-shadow: var(--shadow-2); isolation: isolate; }
.mirror > .mirror-glass { position: relative; border-radius: var(--arch); overflow: hidden; background: var(--surface-2); aspect-ratio: 3 / 4.3; }
.mirror > .mirror-glass img { width: 100%; height: 100%; object-fit: cover; }
.mirror::after { content: ""; position: absolute; inset-inline: 22%; bottom: -18px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(36,27,61,.25), transparent); z-index: -1; }
.mirror-sm > .mirror-glass { aspect-ratio: 3 / 4; }
/* پرتو نور حین پردازش — تنها حرکت خودکار سایت */
.mirror.is-working > .mirror-glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.55) 48%, transparent 56%); transform: translateY(-100%); animation: sweep 2.2s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes sweep { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .mirror.is-working > .mirror-glass::after { animation: none; opacity: .3; transform: none; } }

/* ---------------------------------------------------------------- هیرو */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { margin-block-end: 1.25rem; max-width: 15ch; }
html[dir="ltr"] .hero h1 { max-width: 17ch; }
.hero .lede { font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); color: var(--ink-2); max-width: 36rem; margin-block-end: 2rem; }
.hero .mirror { max-width: 400px; margin-inline: auto; }
.hero-note { margin-block-start: 1.1rem; color: var(--ink-3); font-size: var(--fs-0); display: flex; gap: .5rem; align-items: center; }
.hero-note svg { width: 16px; height: 16px; color: var(--lagoon); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero .mirror { max-width: 300px; } }
.trust-row { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-block-start: 2.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-1); }
.trust-row strong { color: var(--ink); }

/* ---------------------------------------------------------------- مراحل */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.step { padding: 1.75rem; counter-increment: step; }
.step + .step { border-inline-start: 1px solid var(--line); }
.step::before { content: counter(step, persian); display: block; font-size: 2.6rem; font-weight: 300; color: var(--violet); line-height: 1; margin-block-end: 1rem; }
html[lang="ar"] .step::before { content: counter(step, arabic-indic); }
html[dir="ltr"] .step::before { content: counter(step); }
.step p { color: var(--ink-2); margin: 0; font-size: var(--fs-1); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .step + .step { border-inline-start: 0; border-block-start: 1px solid var(--line); } }

/* ---------------------------------------------------------------- تب‌ها */
.tabs { display: flex; gap: .25rem; padding: .3rem; border-radius: 999px; background: var(--surface-2); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { border: 0; background: transparent; padding: .55rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 700; font-size: var(--fs-1); color: var(--ink-2); cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
[role="tabpanel"][hidden] { display: none; }
.audience-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; margin-block-start: 2rem; }
.audience-panel ul { padding: 0; margin: 0 0 1.5rem; list-style: none; }
.audience-panel li { padding-block: .55rem; border-block-end: 1px solid var(--line); display: flex; gap: .6rem; }
.audience-panel li svg { width: 18px; height: 18px; color: var(--lagoon); flex-shrink: 0; margin-block-start: .4rem; }
.audience-panel figure { margin: 0; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); }
.audience-panel figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .audience-panel { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- کارت لباس */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 1rem; overflow-x: auto; padding-block-end: .5rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.garment { display: block; text-decoration: none; color: var(--ink); }
.garment .ph { aspect-ratio: 3/4; border-radius: var(--radius-m); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.garment .ph img { width: 100%; height: 100%; object-fit: cover; }
.garment .t { margin-block-start: .55rem; font-weight: 600; font-size: var(--fs-1); line-height: 1.5; }
.garment .m { color: var(--ink-3); font-size: var(--fs-0); }
.garment:hover .ph { border-color: var(--violet); }

/* ---------------------------------------------------------------- قیمت‌گذاری */
.plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 1.75rem 1.5rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.plan.is-featured { border: 2px solid var(--violet); }
.plan-badge { position: absolute; top: -13px; inset-inline-start: 1.25rem; background: var(--violet); color: #fff; font-size: var(--fs-0); font-weight: 700; padding: .15rem .75rem; border-radius: 999px; }
.plan h3 { margin-block-end: .25rem; }
.plan .sub { color: var(--ink-3); font-size: var(--fs-1); min-height: 3.2em; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem; margin-block: 1rem .25rem; }
.price .amount { font-size: 2.1rem; font-weight: 850; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price .unit { color: var(--ink-3); font-size: var(--fs-1); }
.price del { color: var(--ink-3); font-size: var(--fs-1); }
.per-try { color: var(--lagoon); font-size: var(--fs-0); font-weight: 600; min-height: 1.5em; }
.features { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; display: grid; gap: .55rem; font-size: var(--fs-1); flex: 1; }
.features li { display: flex; gap: .55rem; align-items: flex-start; }
.features svg { width: 18px; height: 18px; color: var(--lagoon); flex-shrink: 0; margin-block-start: .3rem; }
.discount-pill { background: var(--blush); color: var(--danger); font-size: var(--fs-0); font-weight: 700; padding: .05rem .5rem; border-radius: 999px; }

/* ---------------------------------------------------------------- جدول، برچسب، هشدار */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
.table th, .table td { padding: .8rem 1rem; text-align: start; border-block-end: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--ink-3); font-weight: 600; font-size: var(--fs-0); background: var(--surface-2); }
.table tr:last-child td { border-block-end: 0; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .6rem; border-radius: 999px; font-size: var(--fs-0); font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--violet-soft); color: var(--violet-ink); }
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-m); background: var(--violet-soft); color: var(--ink); border: 1px solid transparent; font-size: var(--fs-1); }
.alert-success { background: var(--ok-soft); }
.alert-error { background: var(--danger-soft); }
.alert-warning { background: var(--warn-soft); }
.messages { position: fixed; inset-block-end: 1rem; inset-inline-start: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: .5rem; width: min(92vw, 520px); }
html[dir="rtl"] .messages { transform: translateX(50%); }
.messages .alert { box-shadow: var(--shadow-2); display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.messages .alert button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.2rem; line-height: 1; }

/* ---------------------------------------------------------------- آکاردئون */
.faq details { border-block-end: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 0; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--violet); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding-block-end: 1.25rem; color: var(--ink-2); max-width: 70ch; }

/* ---------------------------------------------------------------- نوار فروشگاه */
.store-band { position: relative; color: #fff; border-radius: var(--radius-l); overflow: hidden; min-height: 420px; display: grid; align-items: end; }
.store-band picture, .store-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,14,40,.88) 0%, rgba(20,14,40,.4) 55%, rgba(20,14,40,.1) 100%); z-index: 1; }
.store-band .inner { position: relative; z-index: 2; padding: clamp(1.5rem, 4vw, 3rem); max-width: 640px; }
.store-band h2 { color: #fff; }
.store-band p { color: rgba(255,255,255,.85); }
.store-band .btn { --bg: #fff; --fg: #1E1631; --bd: #fff; }
.store-band .btn.btn-ghost { --bg: transparent; --fg: #fff; --bd: rgba(255,255,255,.55); color: #fff; }
.store-band .btn.btn-ghost:hover { --bg: rgba(255,255,255,.12); }

/* ---------------------------------------------------------------- استودیو */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
@media (max-width: 920px) { .studio { grid-template-columns: 1fr; } }
.studio-col { display: grid; gap: 1.25rem; }
.studio-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 1.25rem; }
.studio-step > header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-block-end: .9rem; }
.studio-step h2 { font-size: var(--fs-3); margin: 0; }
.dropzone { position: relative; display: grid; place-items: center; text-align: center; gap: .5rem; min-height: 220px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-m); background: var(--paper); padding: 1.25rem; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--violet); background: var(--violet-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone svg { width: 36px; height: 36px; color: var(--violet); }
.dropzone .preview { max-height: 320px; border-radius: var(--radius-s); object-fit: contain; }
.dropzone.has-image { border-style: solid; min-height: 0; padding: .5rem; }
.tips { font-size: var(--fs-0); color: var(--ink-3); margin: .75rem 0 0; padding-inline-start: 1.1rem; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; max-height: 340px; overflow-y: auto; padding: .25rem; }
.picker button { position: relative; border: 2px solid transparent; border-radius: var(--radius-s); padding: 0; background: var(--surface-2); cursor: pointer; aspect-ratio: 3/4; overflow: hidden; }
.picker button img { width: 100%; height: 100%; object-fit: cover; }
.picker button[aria-pressed="true"] { border-color: var(--violet); }
.picker button[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color: #fff; font-size: 13px; display: grid; place-items: center; }
.filter-row { display: flex; gap: .35rem; flex-wrap: wrap; margin-block-end: .75rem; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: .2rem .8rem; font: inherit; font-size: var(--fs-0); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.slots { display: grid; gap: .6rem; }
.slot { display: grid; grid-template-columns: 64px 1fr auto; gap: .75rem; align-items: center; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.slot img { width: 64px; height: 80px; object-fit: cover; border-radius: var(--radius-s); }
.slot select { min-height: 40px; font-size: var(--fs-1); }
.quota-bar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .85rem 1.1rem; border-radius: var(--radius-m); background: var(--lagoon-soft); font-size: var(--fs-1); }
.quota-dots { display: flex; gap: 4px; }
.quota-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--lagoon); }
.quota-dots i.used { background: var(--line-strong); }
.result-stage .mirror { max-width: 460px; margin-inline: auto; }
.result-stage .empty { display: grid; place-items: center; height: 100%; color: var(--ink-3); text-align: center; padding: 2rem; font-size: var(--fs-1); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-block-start: 1.5rem; }
/* مقایسه قبل/بعد */
.compare { position: relative; width: 100%; height: 100%; --pos: 50%; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
html[dir="rtl"] .compare .after { clip-path: inset(0 var(--pos) 0 0); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 3; }
.compare .handle { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--pos); width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); z-index: 2; pointer-events: none; }
.compare .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 18px; box-shadow: var(--shadow-2); }
.compare .tag { position: absolute; bottom: 5%; z-index: 2; background: rgba(20,14,40,.6); color: #fff; padding: .1rem .6rem; border-radius: 999px; font-size: var(--fs-0); }
.compare .tag.b { inset-inline-start: 1rem; } .compare .tag.a { inset-inline-end: 1rem; }
.progress-text { text-align: center; margin-block-start: 1rem; color: var(--ink-2); font-size: var(--fs-1); min-height: 1.8em; }

/* ---------------------------------------------------------------- پنل کاربری */
.panel { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; padding-block: 2rem 4rem; }
.panel-nav { position: sticky; top: 86px; display: grid; gap: .15rem; }
.panel-nav a { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: var(--radius-m); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--fs-1); }
.panel-nav a svg { width: 18px; height: 18px; }
.panel-nav a:hover { background: var(--surface-2); color: var(--ink); }
.panel-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.panel-nav .group { font-size: var(--fs-0); color: var(--ink-3); padding: 1rem .8rem .3rem; }
@media (max-width: 900px) { .panel { grid-template-columns: 1fr; } .panel-nav { position: static; display: flex; overflow-x: auto; gap: .25rem; padding-block-end: .25rem; } .panel-nav .group { display: none; } .panel-nav a { white-space: nowrap; } }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-block-end: 1.5rem; }
.page-title h1 { font-size: var(--fs-5); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-block-end: 1.5rem; }
.stat { padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.stat .k { color: var(--ink-3); font-size: var(--fs-0); }
.stat .v { font-size: 1.75rem; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat .s { font-size: var(--fs-0); color: var(--ink-2); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-block-start: .5rem; }
.bars span { flex: 1; background: var(--violet); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.bars span:hover { opacity: 1; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.thumb { display: block; text-decoration: none; color: var(--ink); }
.thumb .ph { aspect-ratio: 3/4; border-radius: 999px 999px 12px 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); font-size: var(--fs-0); }
.thumb .ph img { width: 100%; height: 100%; object-fit: cover; }
.thumb .m { display: flex; justify-content: space-between; margin-block-start: .4rem; font-size: var(--fs-0); color: var(--ink-3); }
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--ink-2); }
.empty-state svg { width: 44px; height: 44px; margin: 0 auto 1rem; color: var(--violet); }
.key-box { display: flex; gap: .5rem; align-items: center; padding: .75rem; border-radius: var(--radius-m); background: var(--surface-2); direction: ltr; font-family: ui-monospace, monospace; font-size: var(--fs-0); word-break: break-all; }

/* ---------------------------------------------------------------- تیکت */
.thread { display: grid; gap: 1rem; }
.msg { max-width: 82%; padding: 1rem 1.15rem; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
.msg.staff { margin-inline-start: auto; background: var(--violet-soft); border-color: transparent; }
.msg.internal { background: var(--warn-soft); border-style: dashed; }
.msg .meta { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-0); color: var(--ink-3); margin-block-end: .4rem; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- محتوای متنی */
.prose { max-width: 70ch; font-size: var(--fs-2); }
.prose h2 { font-size: var(--fs-4); margin-block-start: 2.2em; }
.prose h3 { margin-block-start: 1.8em; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose li { margin-block-end: .4em; }
.prose img { border-radius: var(--radius-m); margin-block: 1.5rem; }
.prose blockquote { margin: 1.5rem 0; padding: .5rem 1.25rem; border-inline-start: 3px solid var(--violet); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; margin-block: 1.5rem; font-size: var(--fs-1); }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .8rem; text-align: start; }
.breadcrumbs { font-size: var(--fs-0); color: var(--ink-3); margin-block-end: 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: .35rem; color: var(--line-strong); }
.breadcrumbs a { color: var(--ink-3); text-decoration: none; }
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.page-hero .lede { font-size: var(--fs-3); color: var(--ink-2); max-width: 46rem; font-weight: 400; line-height: 1.7; }
.card-link { display: block; padding: 1.25rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); text-decoration: none; color: var(--ink); }
.card-link:hover { border-color: var(--violet); color: var(--ink); }
.card-link h3 { font-size: var(--fs-2); margin-block-end: .3rem; }
.card-link p { color: var(--ink-3); font-size: var(--fs-1); margin: 0; }
.spec-table th { width: 40%; }

/* ---------------------------------------------------------------- ورود */
.auth { min-height: calc(100vh - 66px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; background: var(--ink); display: grid; place-items: center; padding: 3rem; overflow: hidden; }
.auth-art .mirror { width: min(340px, 80%); }
.auth-art p { position: absolute; bottom: 2rem; inset-inline: 2rem; color: rgba(255,255,255,.75); text-align: center; font-size: var(--fs-1); margin: 0; }
.auth-main { display: grid; place-items: center; padding: 2.5rem var(--gutter); }
.auth-card { width: min(100%, 420px); }
.auth-card h1 { font-size: var(--fs-5); }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--ink-3); font-size: var(--fs-0); margin-block: 1.25rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn img, .google-btn svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------------------------------------------------------------- فوتر */
.site-footer { background: var(--surface); border-block-start: 1px solid var(--line); padding-block: 3.5rem 2rem; margin-block-start: 4rem; font-size: var(--fs-1); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; }
.footer-grid h2 { font-size: var(--fs-1); color: var(--ink); margin-block-end: .75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--violet-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-block-start: 2.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-0); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- کیوسک (آینه فروشگاه) */
.kiosk-body { background: #0E0B16; color: #EEEAF7; }
.kiosk { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; min-height: 100vh; padding: 2rem; }
.kiosk video, .kiosk canvas, .kiosk .shot { width: 100%; border-radius: var(--arch); background: #000; aspect-ratio: 3/4; object-fit: cover; }
.kiosk .picker { max-height: 60vh; }
.kiosk .btn { min-height: 64px; font-size: 1.2rem; }
@media (max-width: 900px) { .kiosk { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- چاپ فاکتور */
@media print {
  .site-header, .site-footer, .no-print, .messages { display: none !important; }
  body { background: #fff; color: #000; }
  .surface { border-color: #bbb; }
}

/* ---------- استودیو: انتخاب جنسیت و منوهای آبشاری نوع لباس */
.seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; border: 0; padding: 0; margin: 0 0 1rem; }
.seg legend { float: inline-start; margin-inline-end: .5rem; padding: 0; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: .4rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-1); font-weight: 600; background: var(--surface); }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.slot-fields { display: grid; gap: .4rem; min-width: 0; }
.slot-selects { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; }
.slot-selects select { width: 100%; text-overflow: ellipsis; }
.slot-fields .check { font-size: var(--fs-0, .8rem); }
.slot-fields .check input { width: 16px; height: 16px; margin-block-start: .15rem; }
