/* ═══════════════════════════════════════════════════
   سینوکس دیزاین — (۱۳ اکتبر) پوستهٔ صفحه
   بر پایهٔ /css/tokens.css و /css/base.css (تم تیره/روشن، RTL)؛ همان زبان بصری پلی‌گراوند
   ═══════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { background: var(--grad-mesh); background-attachment: fixed; color: var(--text-1); min-height: 100dvh; }
[hidden] { display: none !important; }

.dz-shell { min-height: 100dvh; display: flex; flex-direction: column; }

/* ─── نوار بالا ─── */
.dz-topbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; gap: 10px;
  height: var(--space-14); padding: 0 20px;
  background: var(--surface-glass-strong); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-1);
}
.dz-brand { display: flex; align-items: center; gap: 8px; font-weight: var(--fw-extrabold); font-size: var(--fs-lg); color: var(--text-1); white-space: nowrap; }
.dz-brand .sx-icon { color: var(--primary-light); }
.dz-badge { font-size: 10px; font-weight: var(--fw-bold); background: var(--grad-brand); color: #fff; padding: 2px 9px; border-radius: var(--radius-full); }
.dz-spacer { flex: 1; min-width: 8px; }
.dz-back { font-size: var(--fs-sm); color: var(--text-muted); padding: 7px 13px; border-radius: var(--radius-md); border: 1px solid var(--border-1); background: var(--elev-1); white-space: nowrap; }
.dz-back:hover { background: var(--elev-2); color: var(--text-1); }
.dz-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
  background: var(--elev-1); border: 1px solid var(--border-1); color: var(--text-muted); border-radius: var(--radius-md); cursor: pointer;
}
.dz-icon-btn:hover { background: var(--elev-2); color: var(--text-1); }
.dz-select {
  font-family: inherit; font-size: var(--fs-sm); height: 38px; padding: 0 12px 0 32px;
  border: 1px solid var(--border-2); border-radius: var(--radius-md); color: var(--text-1); max-width: 260px;
  background: var(--elev-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c9cba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 10px center / 14px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.dz-select:focus-visible, .dz-field input:focus-visible, .dz-field textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.dz-select-wide { width: 100%; max-width: none; }
.dz-select-billing { color: var(--text-2); }

.dz-banner { padding: 10px 20px; font-size: var(--fs-sm); border-bottom: 1px solid var(--border-1); }
.dz-banner.warn { background: var(--yellow-tint); color: var(--yellow-light); }
.dz-banner.err { background: var(--red-tint); color: var(--red-light); }
.dz-banner.ok { background: var(--green-tint); color: var(--green-light); }
.dz-banner a { color: inherit; font-weight: var(--fw-bold); text-decoration: underline; }

/* ─── چیدمان ─── */
.dz-main { width: 100%; max-width: 1240px; margin: 0 auto; padding: var(--space-8) 20px var(--space-16); }
.dz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-block-end: var(--space-6); flex-wrap: wrap; }
.dz-head-title { min-width: 0; }
.dz-h1 { font-size: var(--fh-h3); font-weight: var(--fw-black); line-height: var(--lh-heading); margin: 0 0 6px; }
.dz-h3 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lg); font-weight: var(--fw-bold); margin: 0 0 var(--space-3); }
.dz-h3 .sx-icon { color: var(--primary-light); }
.dz-h4 { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-bold); margin: var(--space-4) 0 var(--space-2); }
.dz-muted { color: var(--text-muted); }
.dz-small { font-size: var(--fs-xs); }
.dz-crumb { display: inline-block; font-size: var(--fs-sm); color: var(--text-muted); margin-block-end: var(--space-3); }
.dz-crumb:hover { color: var(--text-1); }
.dz-card { background: var(--card); border: 1px solid var(--border-1); border-radius: var(--radius-2xl); padding: var(--space-6); }

/* ─── دکمه‌ها و چیپ‌ها ─── */
.dz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px;
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold); border-radius: var(--radius-md);
  border: 1px solid var(--border-2); background: var(--elev-1); color: var(--text-1); cursor: pointer; white-space: nowrap;
  transition: background var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard), opacity var(--dur-base);
}
.dz-btn:hover { background: var(--elev-2); }
.dz-btn:disabled { opacity: .5; cursor: not-allowed; }
.dz-btn-primary { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: var(--glow-primary-sm); }
.dz-btn-primary:hover { background: var(--grad-brand); box-shadow: var(--glow-primary-md); }
.dz-btn-ghost { background: transparent; }
.dz-btn-lg { min-height: 48px; padding: 0 24px; font-size: var(--fs-md); }
.dz-btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-xs); }
.dz-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary-light); cursor: pointer; text-decoration: underline; }
.dz-chip { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); padding: 2px 9px; border-radius: var(--radius-full); background: var(--surface-tint); border: 1px solid var(--border-1); color: var(--text-2); direction: ltr; unicode-bidi: isolate; }
.dz-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.dz-status.is-done { background: var(--green-tint); color: var(--green-light); }
.dz-status.is-failed { background: var(--red-tint); color: var(--red-light); }
.dz-status.is-running, .dz-status.is-queued { background: var(--primary-tint); color: var(--primary-light); }
.dz-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: dz-pulse var(--dur-pulse) infinite; }
@keyframes dz-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.dz-warn-chip { font-style: normal; font-size: 10px; color: var(--yellow-light); background: var(--yellow-tint); padding: 1px 6px; border-radius: var(--radius-full); }

/* ─── فهرست پروژه‌ها ─── */
.dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-5); }
.dz-pcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border-1); border-radius: var(--radius-2xl); overflow: hidden; color: inherit; transition: border-color var(--dur-base), transform var(--dur-base) var(--ease-standard); }
.dz-pcard:hover { border-color: var(--border-2); transform: translateY(-2px); }
.dz-thumb { aspect-ratio: 16 / 10; background: var(--elev-1) center top / cover no-repeat; display: grid; place-items: center; color: var(--text-dim); border-bottom: 1px solid var(--border-1); }
.dz-pcard-body { padding: var(--space-4); display: grid; gap: 8px; }
.dz-pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dz-pcard-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-pcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); }
.dz-empty { text-align: center; padding: var(--space-16) var(--space-4); display: grid; justify-items: center; gap: var(--space-3); }
.dz-empty h2 { font-size: var(--fs-2xl); margin: 0; }
.dz-empty-icon { width: 64px; height: 64px; border-radius: var(--radius-2xl); display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-light); }

/* ─── فرم طراحی تازه ─── */
.dz-new { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .dz-new { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.dz-form { display: grid; gap: var(--space-5); }
.dz-field { display: grid; gap: 8px; min-width: 0; }
.dz-label { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-2); }
.dz-label small { font-weight: var(--fw-regular); }
.dz-field input, .dz-field textarea {
  width: 100%; font-family: inherit; font-size: var(--fs-md); line-height: var(--lh-body); color: var(--text-1);
  background: var(--elev-1); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 10px 14px;
}
.dz-field textarea { resize: vertical; min-height: 180px; }
.dz-hint { font-size: var(--fs-xs); color: var(--text-muted); }
.dz-row { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .dz-row { grid-template-columns: minmax(0, 1fr) auto; } }
.dz-seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--elev-1); border: 1px solid var(--border-2); border-radius: var(--radius-md); width: max-content; max-width: 100%; }
.dz-seg button { font-family: inherit; font-size: var(--fs-sm); min-height: 32px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.dz-seg button[aria-checked="true"] { background: var(--elev-4); color: var(--text-1); font-weight: var(--fw-bold); }
.dz-ds { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.dz-ds-item {
  display: grid; gap: 6px; justify-items: start; text-align: start; padding: 12px; min-height: 92px;
  font-family: inherit; color: var(--text-1); background: var(--elev-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg); cursor: pointer;
  transition: border-color var(--dur-base), background var(--dur-base);
}
.dz-ds-item:hover { border-color: var(--border-3); }
.dz-ds-item[aria-checked="true"] { border-color: var(--primary); background: var(--primary-tint); box-shadow: var(--ring-primary); }
.dz-ds-chips { display: flex; gap: 4px; min-height: 18px; color: var(--primary-light); }
.dz-ds-chips i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-2); }
.dz-ds-name { font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.dz-ds-sub { font-size: var(--fs-2xs); color: var(--text-muted); }
.dz-form-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding-top: var(--space-2); border-top: 1px solid var(--border-1); }
.dz-estimate { display: inline-flex; align-items: flex-start; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); max-width: 520px; }
.dz-how-list { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: var(--space-4); }
.dz-how-list li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; font-size: var(--fs-sm); }
.dz-how-list li::before { content: counter(s, persian); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-light); font-weight: var(--fw-bold); font-size: var(--fs-xs); }
.dz-how-list span { color: var(--text-muted); font-size: var(--fs-xs); line-height: var(--lh-snug); }

/* ─── مراحل ─── */
.dz-stepper { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.dz-step { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
.dz-step:not(:last-child)::after { content: ''; position: absolute; top: 15px; inset-inline-start: calc(50% + 20px); width: calc(100% - 34px); height: 2px; background: var(--border-2); border-radius: 2px; }
.dz-step.is-done:not(:last-child)::after { background: var(--green); }
.dz-step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--elev-2); border: 1px solid var(--border-2); font-weight: var(--fw-bold); }
.dz-step.is-done .dz-step-dot { background: var(--green-tint); border-color: var(--green-border-tint); color: var(--green-light); }
.dz-step.is-active .dz-step-dot { background: var(--primary-tint); border-color: var(--primary); color: var(--primary-light); }
.dz-step.is-active .dz-step-dot .sx-icon { animation: dz-spin 1s linear infinite; }
.dz-step.is-active, .dz-step.is-done { color: var(--text-1); }
.dz-step.is-failed .dz-step-dot { background: var(--red-tint); border-color: var(--red-border-tint); color: var(--red-light); }
.dz-step.is-queued .dz-step-dot { border-style: dashed; border-color: var(--primary); }
@keyframes dz-spin { to { transform: rotate(360deg); } }
.dz-step-note { min-height: 1.8em; font-size: var(--fs-sm); color: var(--text-muted); margin: 0 0 var(--space-5); text-align: center; }

.dz-error { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); margin-block-end: var(--space-5); border-radius: var(--radius-xl); background: var(--red-tint); border: 1px solid var(--red-border-tint); color: var(--red-light); flex-wrap: wrap; }
.dz-error > div { flex: 1; min-width: 200px; }
.dz-error p { margin: 4px 0 0; color: var(--text-2); font-size: var(--fs-sm); }

/* ─── پیش‌نمایش ─── */
.dz-preview-wrap { display: grid; gap: var(--space-3); margin-block-end: var(--space-6); }
.dz-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dz-frame-box { position: relative; overflow: hidden; background: var(--elev-1); border: 1px solid var(--border-2); border-radius: var(--radius-xl); }
.dz-frame-scale { position: absolute; top: 0; left: 0; transform-origin: top left; }   /* جای افقی و مقیاس را app.js حساب می‌کند */
.dz-frame-scale iframe { display: block; border: 0; background: #fff; }
.dz-shots { display: flex; gap: 10px; flex-wrap: wrap; }
.dz-shot { display: grid; gap: 4px; justify-items: center; padding: 6px; font-family: inherit; font-size: var(--fs-2xs); color: var(--text-muted); background: var(--elev-1); border: 1px solid var(--border-1); border-radius: var(--radius-md); cursor: zoom-in; }
.dz-shot-img { width: 120px; height: 76px; border-radius: var(--radius-sm); background: var(--elev-2) center top / cover no-repeat; }

/* ─── پنل‌های اطلاعات ─── */
.dz-panels { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .dz-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dz-cost-big { font-size: var(--fs-xl); font-weight: var(--fw-bold); margin: 0 0 var(--space-3); }
.dz-table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.dz-table th, .dz-table td { text-align: start; padding: 7px 6px; border-bottom: 1px solid var(--border-soft); }
.dz-table th { color: var(--text-muted); font-weight: var(--fw-medium); }
.dz-key { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-snug); margin: 0 0 var(--space-3); }
.dz-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: var(--fs-sm); }
.dz-dl dt { color: var(--text-muted); }
.dz-dl dd { margin: 0; }
.dz-list { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--text-2); }
.dz-palette { display: flex; flex-wrap: wrap; gap: 10px; margin-block: var(--space-3); }
.dz-swatch { display: grid; justify-items: center; gap: 2px; font-size: 10px; color: var(--text-muted); }
.dz-swatch i { width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--border-2); }
.dz-swatch code { font-size: 9px; }
.dz-sections { margin: 0; padding-inline-start: 22px; display: grid; gap: 10px; font-size: var(--fs-sm); }
.dz-sections li { display: grid; gap: 2px; }
.dz-sections span { color: var(--text-2); }

/* ─── (فاز ۱b) فرم: منتقد، دورها، تخمین، سبک‌ها با جستجو و پاپ‌اور ─── */
.dz-row-loop { align-items: end; }
.dz-estimate-box { display: grid; gap: 4px; max-width: 560px; }
.dz-cap-note { color: var(--text-dim); }
.dz-ds-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dz-ds-search { flex: 1; min-width: 180px; max-width: 320px; font-family: inherit; font-size: var(--fs-sm); height: 36px; padding: 0 12px; color: var(--text-1); background: var(--elev-1); border: 1px solid var(--border-2); border-radius: var(--radius-md); }
.dz-ds-wrap { position: relative; display: grid; gap: 10px; max-height: 560px; overflow-y: auto; padding-inline-end: 4px; }
.dz-ds-group > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-2); padding: 6px 2px; list-style-position: inside; }
.dz-ds-group > .dz-ds { margin-block: 6px 4px; }
.dz-ds-item { position: relative; }
.dz-ds-item.is-own::before { content: ''; position: absolute; inset-inline-end: 10px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary-light); }
.dz-ds-info { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-2); font-size: 11px; font-weight: var(--fw-bold); color: var(--text-muted); background: var(--elev-2); }
.dz-ds-info:hover, .dz-ds-info:focus-visible { color: var(--text-1); border-color: var(--primary); }
.dz-pop { position: absolute; inset-inline: 0; z-index: 30; max-width: 380px; margin-inline: auto; padding: var(--space-4); background: var(--card); border: 1px solid var(--border-2); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg, 0 20px 50px rgba(0,0,0,.35)); }
.dz-field { position: relative; }
.dz-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dz-scale { display: grid; gap: 4px; padding: 14px; margin-block: 8px; border: 1px solid var(--border-2); overflow: hidden; }
.dz-scale > div { line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-scale-btn { justify-self: start; margin-top: 6px; padding: 6px 14px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 700; }

/* ─── (فاز ۱b) نمای پروژه: سقف توکن، مقایسه، نقد، لینت، گزارش تحویل ─── */
.dz-cap { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-block-end: var(--space-4); border-radius: var(--radius-lg); background: var(--yellow-tint); color: var(--yellow-light); font-size: var(--fs-sm); }
.dz-cap.is-capped { background: var(--red-tint); color: var(--red-light); }
.dz-frames { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.dz-frames.is-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dz-frame-col { display: grid; gap: 6px; min-width: 0; }
.dz-frame-label { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-bold); }
.dz-frame-box.is-scroll { overflow-y: auto; overflow-x: hidden; }
.dz-frame-spacer { width: 1px; }
.dz-compare-select { max-width: 220px; }
.dz-crit-mean { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 0 0 var(--space-3); }
.dz-crit-mean b { font-size: var(--fs-3xl, 30px); font-weight: var(--fw-black); }
.dz-cmp.is-better { color: var(--green-light); background: var(--green-tint); }
.dz-cmp.is-worse { color: var(--red-light); background: var(--red-tint); }
.dz-dims { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: 7px; }
.dz-dims li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 18px; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.dz-bar { height: 8px; border-radius: 99px; background: var(--elev-2); overflow: hidden; }
.dz-bar i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.dz-bar i.s1, .dz-bar i.s2 { background: var(--red); }
.dz-bar i.s3 { background: var(--yellow); }
.dz-bar i.s4, .dz-bar i.s5 { background: var(--green); }
.dz-issues, .dz-lint-list ul, .dz-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dz-issues li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 8px; align-items: center; font-size: var(--fs-sm); padding: 8px 10px; border-radius: var(--radius-md); background: var(--elev-1); border-inline-start: 3px solid var(--border-2); }
.dz-issues li.sev3 { border-inline-start-color: var(--red); }
.dz-issues li.sev2 { border-inline-start-color: var(--yellow); }
.dz-issues li small { grid-column: 1 / -1; }
.dz-sev { font-size: 10px; font-weight: var(--fw-bold); color: var(--text-muted); }
.dz-sx { font: 11px/1.6 var(--font-mono, monospace); direction: ltr; padding: 0 7px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--elev-2); color: var(--primary-light); cursor: pointer; }
.dz-sx:hover, .dz-sx.is-on { background: var(--primary); color: #fff; border-color: transparent; }
.dz-lint-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 var(--space-3); }
.dz-chip.is-bad { background: var(--red-tint); color: var(--red-light); }
.dz-chip.is-ok { background: var(--green-tint); color: var(--green-light); }
.dz-lint-list summary { cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); margin-block-end: 8px; }
.dz-lint-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--fs-xs); padding-block: 6px; border-bottom: 1px solid var(--border-soft); }
.dz-lint-list li.is-hard .dz-rule { color: var(--red-light); }
.dz-lint-list small { flex-basis: 100%; color: var(--text-muted); }
.dz-rule { font-weight: var(--fw-bold); }
.dz-checks { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.dz-checks li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); }
.dz-checks li.ok .sx-icon { color: var(--green-light); }
.dz-checks li.bad { color: var(--red-light); }

/* ─── (فاز ۱c) دادهٔ نمونه، تصویر، گفت‌وگو، انتخاب عنصر، امتیاز ─── */
.dz-check-field { gap: 4px; }
.dz-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-1); cursor: pointer; min-height: 36px; }
.dz-check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.dz-suggest { color: var(--primary-light); }
.dz-images-note { margin: -8px 0 0; }
.dz-images-note b { color: var(--text-2); }
.dz-chat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px; background: var(--elev-1); border: 1px solid var(--border-2); border-radius: var(--radius-xl); }
.dz-chat input { flex: 1 1 260px; min-width: 0; min-height: 40px; font-family: inherit; font-size: var(--fs-sm); color: var(--text-1); background: var(--elev-2); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 8px 12px; }
.dz-chat .dz-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-tint); color: var(--primary-light); }
.dz-chat-hint { flex-basis: 100%; }
.dz-pick-chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-pick-chip button { margin-inline-start: 4px; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.dz-pick-layer { position: absolute; top: 0; left: 0; cursor: crosshair; background: transparent; }
.dz-pick-box { position: absolute; pointer-events: none; outline: 3px solid #e11d48; outline-offset: 0; background: rgba(225, 29, 72, .08); border-radius: 4px; }
.dz-pick-box.is-picked { outline-color: #2563eb; background: rgba(37, 99, 235, .12); }
.dz-resolved { display: inline-flex; align-items: center; gap: 4px; }
.dz-chip.is-regen { background: var(--primary-tint); color: var(--primary-light); border-color: var(--primary); }
.dz-stars { display: inline-flex; gap: 4px; direction: ltr; }
.dz-stars button { width: 40px; height: 40px; font-size: 24px; line-height: 1; border: 1px solid var(--border-2); border-radius: var(--radius-md); background: var(--elev-1); color: var(--text-muted); cursor: pointer; }
.dz-stars button.is-on { color: #f5b301; border-color: #f5b301; }
.dz-rate textarea { width: 100%; min-height: 64px; font-family: inherit; font-size: var(--fs-sm); color: var(--text-1); background: var(--elev-1); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 8px 12px; margin-block: 8px; }
.dz-imgs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-block: 8px; }
.dz-img { display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--text-muted); }
.dz-img i { display: block; aspect-ratio: 3 / 2; border-radius: var(--radius-md); background: var(--elev-2) center / cover no-repeat; border: 1px solid var(--border-1); }
.dz-img b { color: var(--text-1); }
.dz-warn-text { color: var(--yellow-light); }
.dz-stack { font-size: var(--fs-xs); color: var(--text-muted); margin: 0 0 var(--space-3); }

/* ─── موبایل ─── */
@media (max-width: 640px) {
  .dz-topbar { padding: 0 12px; gap: 8px; }
  .dz-hide-sm, .dz-badge { display: none; }
  .dz-select-billing { max-width: 150px; }
  .dz-main { padding: var(--space-5) 14px var(--space-12); }
  .dz-card { padding: var(--space-4); }
  .dz-step-label { font-size: 10px; }
  .dz-step:not(:last-child)::after { display: none; }
  .dz-toolbar .dz-spacer { display: none; }
  .dz-toolbar .dz-btn { flex: 1; }
  .dz-frames.is-compare { grid-template-columns: minmax(0, 1fr); }
  .dz-dims li { grid-template-columns: 96px minmax(0, 1fr) 18px; }
  .dz-ds-wrap { max-height: none; }
  .dz-chat .dz-btn { flex: 1 1 auto; }
  .dz-stars button { width: 44px; height: 44px; }
}

/* ─── (فاز ۲a) اسلاید: نوع طراحی، فیلدهای اسلاید، نمای اسلاید (نوار تصویرک‌ها + صحنه + یادداشت) ─── */
.dz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dz-seg-type button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 18px; }
.dz-deck-fields { border: 1px dashed var(--border-2); border-radius: var(--radius-xl); padding: var(--space-4); margin: 0; display: grid; gap: var(--space-4); min-width: 0; }
.dz-deck-fields textarea, .dz-deck-fields input { width: 100%; }
.dz-row-3 { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .dz-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dz-deck-time { display: flex; align-items: center; gap: 6px; margin: 0; }
.dz-type-badge { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: var(--radius-full); font-size: var(--fs-2xs); font-weight: var(--fw-bold); border: 1px solid var(--border-2); background: var(--elev-2); color: var(--text-muted); }
.dz-type-badge.is-slides { background: var(--primary-tint); color: var(--primary-light); border-color: transparent; }
.dz-thumb.is-deck { aspect-ratio: 16 / 9; background-position: center; }
.dz-deckbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-slide-counter { min-width: 64px; text-align: center; font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--text-1); }
.dz-slide-type { font-size: var(--fs-xs); }
.dz-deck-wrap { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.dz-deck-wrap.is-deck { grid-template-columns: 148px minmax(0, 1fr); align-items: start; }
.dz-deck-strip { display: grid; gap: 8px; max-height: min(78vh, 760px); overflow-y: auto; padding: 4px; scrollbar-width: thin; }
.dz-thumbslide { position: relative; display: block; width: 100%; padding: 0; border: 2px solid var(--border-1); border-radius: var(--radius-md); background: var(--elev-1); cursor: pointer; font-family: inherit; }
.dz-thumbslide.is-on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.dz-thumbslide:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.dz-thumbslide-img { display: block; aspect-ratio: 16 / 9; border-radius: calc(var(--radius-md) - 2px); background: var(--elev-2) center / cover no-repeat; }
.dz-thumbslide-no { position: absolute; inset-block-start: 4px; inset-inline-start: 4px; min-width: 22px; padding: 0 6px; border-radius: var(--radius-full); background: var(--surface-glass-strong); color: var(--text-1); font-size: var(--fs-2xs); font-weight: var(--fw-bold); line-height: 20px; text-align: center; }
.dz-deck-notes { padding: 12px 14px; background: var(--elev-1); border: 1px solid var(--border-2); border-radius: var(--radius-xl); }
.dz-deck-notes .dz-h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.dz-deck-notes .dz-list { margin: 0; }
.dz-pptx-note { margin: 0; }
.dz-worst { list-style: none; padding: 0; margin: 0 0 var(--space-3); display: grid; gap: 8px; }
.dz-worst li { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--elev-1); border: 1px solid var(--border-1); }
.dz-worst .dz-sx { justify-self: start; }
@media (max-width: 760px) {
  .dz-deck-wrap.is-deck { grid-template-columns: minmax(0, 1fr); }
  .dz-deck-wrap.is-deck .dz-deck-strip { order: 2; grid-auto-flow: column; grid-auto-columns: 112px; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .dz-deckbar .dz-spacer { display: none; }
  .dz-deckbar #btnRegenSlide { flex: 1 1 100%; }
}

/* (۱۸ اکتبر، ۲c-free) ارائهٔ رایگان ماهانه: تراشهٔ کنار نوع طراحی، خط زیر دکمهٔ شروع، نشان «رایگان» روی پروژه */
.dz-free-chip { display: inline-flex; align-self: flex-start; justify-self: start; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; padding: 6px 12px; border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: var(--fw-medium, 500); line-height: 1.8; background: var(--green-tint); color: var(--green-light); border: 1px solid var(--green-border-tint, transparent); max-width: 100%; }
.dz-free-chip b { font-weight: var(--fw-bold); }
.dz-free-chip.is-used { background: var(--elev-2); color: var(--text-muted); border-color: var(--border-1); }
.dz-free-line { margin: 8px 0 0; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--green-light); text-align: end; }
.dz-free-badge { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: var(--radius-full); font-size: var(--fs-2xs); font-weight: var(--fw-bold); background: var(--green-tint); color: var(--green-light); border: 1px solid var(--green-border-tint, transparent); white-space: nowrap; }
.dz-cost-big .dz-free-badge, .dz-small .dz-free-badge { margin-inline-end: 6px; vertical-align: 1px; }
#fImages button:disabled, #fImages button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
/* (۲c-free دور ۲) قفل رایگان (تعداد اسلاید، تصویر استودیو) و سقف ویرایش ارائهٔ رایگان */
.dz-lock { display: inline-flex; vertical-align: -1px; margin-inline-start: 6px; color: var(--text-muted); }
#fSlides.is-locked { opacity: .75; }
.dz-free-edits { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 6px; padding: 8px 12px; border-radius: var(--radius-md); font-size: var(--fs-sm); line-height: 1.9; background: var(--elev-1); border: 1px solid var(--border-1); color: var(--text-2); }
.dz-free-edits.is-capped { background: var(--yellow-tint); border-color: rgba(245, 158, 11, .35); color: var(--text-1); }
.dz-free-edits a { color: var(--primary-light); font-weight: var(--fw-bold); }
@media (max-width: 560px) { .dz-free-line { text-align: start; } }

/* (۱۹ اکتبر، ۲f) کیف پول SX: تراشهٔ موجودی در نوار بالا، خط تخمین هزینه و قفل «شروع»، تراشهٔ رزرو/مصرف پروژه، پنل شارژ #/charge */
.dz-wallet { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 12px; border-radius: var(--radius-full); font-size: var(--fs-xs); white-space: nowrap; background: var(--primary-tint); color: var(--primary-light); border: 1px solid transparent; }
.dz-wallet:hover { border-color: var(--primary); }
.dz-wallet b { font-weight: var(--fw-bold); color: var(--text-1); }
.dz-wallet.is-low { background: var(--yellow-tint); color: var(--yellow-light); }
.dz-wallet-s { display: none; }
.dz-sx-estimate { max-width: 560px; }
.dz-sx-est { display: grid; gap: 3px; min-width: 0; }
.dz-sx-est b { font-size: var(--fs-sm); color: var(--text-1); }
.dz-sx-est small { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.8; }
.dz-sx-est small b { font-size: inherit; }
.dz-sx-estimate.is-low #sxEstLine { color: var(--yellow-light); }
.dz-sx-low { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-top: 4px; padding: 6px 12px; border-radius: var(--radius-md); font-size: var(--fs-sm); font-weight: var(--fw-bold); background: var(--yellow-tint); color: var(--yellow-light); border: 1px solid rgba(245, 158, 11, .35); }
.dz-sx-low:hover { text-decoration: underline; }
.dz-sx-chip { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); padding: 2px 10px; border-radius: var(--radius-full); background: var(--surface-tint); border: 1px solid var(--border-1); color: var(--text-2); white-space: nowrap; }
.dz-sx-chip.is-hold { background: var(--primary-tint); color: var(--primary-light); border-color: transparent; }
.dz-sx-chip.is-used { background: var(--green-tint); color: var(--green-light); border-color: transparent; }
.dz-sx-chip.is-free { background: var(--elev-2); color: var(--text-muted); }
.dz-cost-big small { font-size: var(--fs-sm); font-weight: var(--fw-regular); }
.dz-charge { display: grid; gap: var(--space-5); margin-top: var(--space-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .dz-charge { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.dz-charge-main { display: grid; gap: 12px; }
.dz-charge-bal { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.dz-charge-bal b { color: var(--text-1); font-size: var(--fs-md); }
.dz-charge-need { margin: 0; padding: 8px 12px; border-radius: var(--radius-md); background: var(--yellow-tint); color: var(--text-1); font-size: var(--fs-sm); line-height: 1.9; }
.dz-charge-need a { color: var(--primary-light); font-weight: var(--fw-bold); }
.dz-charge-range { width: 100%; height: 32px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.dz-charge-ticks { display: flex; justify-content: space-between; margin-top: -6px; font-size: var(--fs-2xs); color: var(--text-muted); }
.dz-charge-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 4px; font-size: clamp(22px, 6vw, 34px); font-weight: var(--fw-black); line-height: 1.3; color: var(--text-1); }
.dz-charge-big b { font-weight: inherit; white-space: nowrap; }
.dz-charge-dot { color: var(--text-dim); }
.dz-charge-usd { margin: -4px 0 4px; font-size: var(--fs-sm); color: var(--text-muted); }
.dz-charge-pay { justify-self: start; min-width: 200px; }
.dz-charge-table td:nth-child(2) { color: var(--text-muted); white-space: nowrap; }
.dz-charge-table td:last-child b { font-size: var(--fs-md); color: var(--text-1); }
.dz-charge-note { display: flex; align-items: flex-start; gap: 8px; margin: var(--space-4) 0 8px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--elev-1); border-inline-start: 3px solid var(--primary); font-size: var(--fs-sm); line-height: 1.9; color: var(--text-1); }
.dz-charge-note .sx-icon { flex: none; margin-top: 4px; color: var(--primary-light); }
@media (max-width: 640px) {
  .dz-wallet { padding: 5px 10px; }
  .dz-wallet-l { display: none; }
  .dz-wallet-s { display: inline; }
  .dz-charge-pay { justify-self: stretch; }
}
/* (۲f-ui) دک‌های بالای ۲۵ اسلاید: دور نقد روی ۳ قفل */
#fRounds button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
#roundsLockNote { color: var(--primary-light); }
/* (۱۹ اکتبر) پرداخت همین‌جا: دکمه‌های درگاه در صفحهٔ شارژ */
.dz-charge-gws { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dz-charge-gws .dz-btn-ghost { margin-inline-start: auto; }
.dz-charge-err { color: var(--sx-danger, #d33); }
@media (max-width: 720px) { .dz-charge-gws { flex-direction: column; align-items: stretch; } .dz-charge-gws .dz-btn-ghost { margin-inline-start: 0; } }

/* (۱۹ اکتبر) راهنما */
.dz-help { display: grid; gap: 16px; max-width: 880px; }
.dz-help-steps { padding-inline-start: 1.4em; display: grid; gap: 10px; line-height: 1.9; }
.dz-help-list { padding-inline-start: 1.2em; display: grid; gap: 6px; line-height: 1.8; }
.dz-help-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* (۱۹ اکتبر) هدر هرگز از کادر بیرون نزند: نام برند با سه‌نقطه کوتاه می‌شود، تراشهٔ موجودی و دکمه‌ها جمع نمی‌شوند */
.dz-topbar { min-width: 0; max-width: 100vw; overflow: hidden; }
.dz-brand { min-width: 0; flex: 0 1 auto; }
.dz-brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dz-topbar .dz-spacer { min-width: 4px; }
.dz-sx-chip, .dz-back, .dz-icon-btn, .dz-help-btn { flex: 0 0 auto; }
@media (max-width: 420px) { .dz-topbar { gap: 6px; padding: 0 8px; } .dz-brand { font-size: var(--fs-md); gap: 6px; } .dz-brand .dz-brand-text { max-width: 96px; } .dz-back { padding: 7px 9px; } }
/* (۱۹ اکتبر) مبلغ پرداخت به تومان، درشت و بالای دکمه‌های درگاه؛ روی دکمه‌ها فقط نام درگاه */
.dz-charge-paytoman { margin: 6px 0 2px; font-size: var(--fs-md); }
.dz-charge-paytoman b { font-size: 1.2em; }
/* (۲p-density) میزان متن روی اسلاید: انتخابگر سه‌حالته، قفل رایگان، تراشهٔ پروژه، اقدام‌های سریع */
.dz-density { margin-top: 4px; }
#fDensity button[aria-disabled="true"], #btnMoreText[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.dz-density-lock { color: var(--text-muted); }
.dz-density-chip { white-space: nowrap; }
@media (max-width: 760px) { .dz-deckbar #btnMoreText, .dz-deckbar #btnLessText { flex: 1 1 calc(50% - 4px); } }

/* (۲۰ اکتبر) نوار زرد قفل‌های ارائهٔ رایگان */
.dz-free-bar { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--yellow-tint); border: 1px solid rgba(245, 158, 11, .4); color: var(--text-1); font-size: var(--fs-sm); line-height: 1.8; }
.dz-free-bar > span { flex: none; color: #d97706; margin-top: 4px; }
.dz-free-bar b { font-weight: var(--fw-bold); }
.dz-free-bar .dz-free-bar-lock { font-weight: var(--fw-bold); }
.dz-free-bar a { color: var(--primary-light); font-weight: var(--fw-bold); white-space: nowrap; }
.dz-free-bar.dz-free-bar-sm { font-size: var(--fs-xs); padding: 8px 12px; margin: 8px 0 4px; }

/* ─── (۲۰ اکتبر) انتخاب نوع روی گوشی: سه دکمه هم‌عرض و تمام‌عرض؛ «/ وان‌پیجر» فقط روی دسکتاپ. پیش از این دکمهٔ پوستر در عرض ≤ ۳۹۰ از کادر بیرون می‌زد
   (اندازه‌گیری: سگمنت ۳۶۵px در ظرف ۳۲۸px؛ در ۳۶۰ کل کارت ۷px از راست بیرون می‌رفت). ─── */
@media (max-width: 560px) {
  .dz-seg-type { display: flex; width: 100%; }
  .dz-seg-type button { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 6px; gap: 5px; white-space: nowrap; }
  .dz-seg-type .dz-seg-long { display: none; }
}
