@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* ممیز «٫» و جداکننده هزارگان وزیرمتن در عدد درشت بزرگ و پررنگ‌اند؛ همین چند نویسه
   از همان فایل ولی کوچک‌تر کشیده می‌شوند (بدون تغییر متن یا HTML) */
@font-face {
  font-family: "VazirNum";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+066B;
  size-adjust: 60%;
}
@font-face {
  font-family: "VazirNum";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+002C, U+066C;
  size-adjust: 78%;
}

/* ---------- توکن‌ها: «شب زمردی» با دو حالت؛ data-theme را اسکریپت سر صفحه می‌گذارد ---------- */
:root {
  color-scheme: dark;
  /* سطح‌ها */
  --bg: #0d1116;
  --surface: #151a21;
  --surface-2: #1c222b;
  --surface-3: #262d38;
  --hairline: rgba(255, 255, 255, .08);
  --border: #2a313c;
  /* متن */
  --text: #f3f6f9;
  --text-2: #c0c8d2;
  --muted: #8a94a1;
  /* تأکید: زمردی نعنایی با گرادیان به لیمویی */
  --accent: #3ee8a6;
  --accent-2: #b8f35c;
  --accent-soft: rgba(62, 232, 166, .13);
  --accent-glow: rgba(62, 232, 166, .35);
  --on-accent: #03150e;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  /* معنا */
  --good: #3ee8a6;
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, .13);
  --warn: #ffc857;
  --warn-soft: rgba(255, 200, 87, .11);
  /* کارت ثروت خالص در هر دو حالت تیره و درخشان است */
  --hero-1: #104a37;
  --hero-2: #0a1a15;
  --shadow: 0 1px 0 var(--hairline) inset, 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-lg: 0 -12px 48px rgba(0, 0, 0, .55);
  --float-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  --glow-1: rgba(62, 232, 166, .15);
  --glow-2: rgba(184, 243, 92, .07);
  --desk-bg: #0b0e12;
  --radius: 22px;
  --radius-sm: 14px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  /* پالت دسته‌ای (ترتیب ثابت؛ رنگ دنبال گروه است) */
  --s0: #6b7480;
  --s1: #5b9cff;
  --s2: #ff8a5b;
  --s3: #3ee8a6;
  --s4: #ffc857;
  --s5: #ff7eb6;
  --s6: #7ee081;
  --s7: #a78bfa;
  --s8: #ff6b6b;
  --s9: #aab4c3;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5f4;
  --surface: #ffffff;
  --surface-2: #f0f4f2;
  --surface-3: #e5ebe8;
  --hairline: rgba(16, 40, 30, .07);
  --border: #e1e7e4;
  --text: #0e1714;
  --text-2: #43514b;
  --muted: #74807b;
  --accent: #0ea371;
  --accent-2: #7cc520;
  --accent-soft: rgba(14, 163, 113, .1);
  --accent-glow: rgba(14, 163, 113, .25);
  --on-accent: #04190f;
  --good: #0ea371;
  --bad: #e5484d;
  --bad-soft: rgba(229, 72, 77, .1);
  --warn: #a8650a;
  --warn-soft: rgba(240, 170, 40, .14);
  --shadow: 0 1px 2px rgba(16, 40, 30, .05), 0 8px 24px rgba(16, 40, 30, .06);
  --shadow-lg: 0 -12px 40px rgba(16, 40, 30, .16);
  --float-shadow: 0 12px 32px rgba(16, 40, 30, .14);
  --glow-1: rgba(14, 163, 113, .1);
  --glow-2: rgba(124, 197, 32, .07);
  --desk-bg: #dfe6e3;
  --s0: #8b949e;
  --s1: #2f7be5;
  --s2: #f06a35;
  --s3: #0ea371;
  --s4: #dd9f00;
  --s5: #e5609a;
  --s6: #3fae4a;
  --s7: #7c5ce6;
  --s8: #e5484d;
  --s9: #7d8798;
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "VazirNum", "Vazirmatn", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  background:
    radial-gradient(90% 40% at 85% -5%, var(--glow-1), transparent 70%),
    radial-gradient(70% 35% at 0% 0%, var(--glow-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* وزیرمتن همه جا: کنترل‌های فرم و حتی بلوک‌های کد (توکن، راهنمای Shortcuts) هم */
button, input, select, textarea, optgroup, code, pre, kbd, samp, ::placeholder {
  font-family: "VazirNum", "Vazirmatn", system-ui, -apple-system, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
small { font-size: .8em; }

.i { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.neg { color: var(--bad); }

/* ---------- پوسته ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  padding-top: var(--safe-t);
  view-transition-name: appbar;
}

.appbar-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 10px;
  min-height: 56px;
  display: flex;
  align-items: center;
}

.appbar h1 { font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; }
.greet { display: flex; flex-direction: column; line-height: 1.3; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 4px 16px calc(var(--tabbar-h) + var(--safe-b) + 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tabbar {
  position: fixed;
  inset: auto 12px calc(var(--safe-b) + 10px) 12px;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  height: var(--tabbar-h);
  padding: 0 6px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  backdrop-filter: saturate(1.8) blur(22px);
  -webkit-backdrop-filter: saturate(1.8) blur(22px);
  border: 1px solid var(--hairline);
  box-shadow: var(--float-shadow);
  view-transition-name: tabbar;
}

.tabbar a {
  flex: 1;
  max-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  transition: color .2s var(--ease), transform .15s var(--ease);
}

.tabbar a .i { width: 24px; height: 24px; transition: transform .25s var(--ease); }
.tabbar a { position: relative; }
.tabbar a.on { color: var(--text); }
.tabbar a.on .i { color: var(--accent); transform: translateY(-1px) scale(1.1);
  filter: drop-shadow(0 0 8px var(--accent-glow)); }
.tabbar a.on::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.tabbar a:active { transform: scale(.92); }

/* ---------- کارت‌ها ---------- */
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 70%, var(--surface)), var(--surface));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  color: inherit;
}

.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.card-head h2, .card > h2 { font-size: 1rem; font-weight: 800; }
.card-head a { font-weight: 600; }

.section-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  margin: 8px 4px -6px;
}

.lead { color: var(--text-2); font-size: .9rem; padding: 0 4px; }

.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pair > * { min-width: 0; overflow-wrap: anywhere; }
.mini { display: flex; flex-direction: column; gap: 2px; transition: transform .2s var(--spring); }
a.mini:active, a.card:active { transform: scale(.97); }
.mini strong { font-size: 1.3rem; font-weight: 900; letter-spacing: -.01em; }
.mini .bubble { margin-bottom: 4px; width: 34px; height: 34px; border-radius: 11px; }
.mini .bubble .i { width: 18px; height: 18px; }
.mini-label { color: var(--muted); font-size: .78rem; font-weight: 500; }

/* ---------- قهرمان داشبورد ---------- */
/* رنگ کارت ثروت با واحد نمایش عوض می‌شود: تومان زمردی، دلار آبی، طلا طلایی (با انتقال نرم) */
@property --hx { syntax: "<color>"; inherits: true; initial-value: #3ee8a6; }
[data-unit-switch] { --hx: #3ee8a6; transition: --hx .5s var(--ease); }
[data-unit-switch][data-unit="usd"] { --hx: #8ab4ff; }
[data-unit-switch][data-unit="gold"] { --hx: #f4c35a; }
:root[data-theme="light"] .panel[data-unit-switch][data-unit="usd"] { --hx: #3b6fd8; }
:root[data-theme="light"] .panel[data-unit-switch][data-unit="gold"] { --hx: #b8860b; }
.hero {
  --accent: var(--hx);
  --accent-glow: color-mix(in srgb, var(--hx) 35%, transparent);
  --on-accent: #03150e;
  --bad: #ff7b7b;
  --bad-soft: rgba(255, 107, 107, .16);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  padding: 20px 20px 22px;
  color: #fff;
  background: linear-gradient(160deg, var(--hero-1), var(--hero-2) 70%);
  border: 1px solid color-mix(in srgb, var(--hx) 18%, transparent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* دو هاله نوری که آرام جابه‌جا می‌شوند */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.hero::before {
  width: 220px; height: 220px; top: -90px; left: -60px;
  background: color-mix(in srgb, var(--hx) 45%, transparent);
  animation: drift 14s ease-in-out 2 alternate; /* چند بار و بس: انیمیشن همیشگی روی لایه blur باتری می‌خورد */
}

.hero::after {
  width: 180px; height: 180px; bottom: -110px; right: -40px;
  background: rgba(184, 243, 92, .22);
  animation: drift 18s ease-in-out 2 alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 20px) scale(1.15); }
}

.spark { display: block; width: 100%; height: 56px; margin: 10px 0 -4px; overflow: visible; }
.spark path.line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--accent-glow));
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s var(--ease) .2s forwards; }
.spark { color: var(--accent); }
.spark path.area { fill: url(#spark-fill); opacity: 0; animation: fade .8s ease .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hero-label { font-size: .85rem; color: rgba(255, 255, 255, .7); font-weight: 600; }
.hero-value { font-size: 2.9rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.15; margin-top: 10px;
  text-shadow: 0 0 30px rgba(62, 232, 166, .25); }
.hero-value small { font-size: 1rem; font-weight: 600; opacity: .85; }
.hero-sub { font-size: .85rem; color: rgba(255, 255, 255, .6); }

[data-unit-switch] [data-unit-value] { display: none; animation: fade-up .25s var(--ease); }
[data-unit-switch][data-unit="toman"] [data-unit-value="toman"],
[data-unit-switch][data-unit="usd"] [data-unit-value="usd"],
[data-unit-switch][data-unit="gold"] [data-unit-value="gold"] { display: inline; }

.unit-toggle {
  --i: 0;
  --n: 3;
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 3px;
}

/* قرص رنگی که بین گزینه‌ها سُر می‌خورد (کمی فنری) */
.unit-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: calc((100% - 6px) / var(--n));
  inset-inline-start: calc(3px + var(--i) * (100% - 6px) / var(--n));
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transition: inset-inline-start .45s cubic-bezier(.34, 1.5, .5, 1);
}
[data-unit="usd"] .unit-toggle { --i: 1; }
[data-unit="gold"] .unit-toggle { --i: 2; }

.unit-toggle button {
  position: relative;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 4px 13px;
  cursor: pointer;
  opacity: .75;
  transition: color .3s, opacity .3s;
}

.unit-toggle button[aria-selected="true"] { color: var(--on-accent); opacity: 1; }
.unit-toggle button:disabled { opacity: .35; cursor: default; }

.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: .82rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px 3px 12px;
  align-self: flex-start;
}

.delta.down { background: var(--bad-soft); color: var(--bad); }

.delta .i { width: 16px; height: 16px; }
.delta-when { opacity: .75; font-weight: 400; }

.loan-hero .hero-value { font-size: 2.4rem; }

/* ---------- اعلان‌ها ---------- */
.notices { display: flex; flex-direction: column; gap: 8px; }

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--warn);
  background: var(--warn-soft);
  transition: transform .15s var(--ease);
}

.notice:active { transform: scale(.98); }
.notice span { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.notice small { opacity: .85; }
.i.end { width: 18px; height: 18px; opacity: .6; }

.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .85rem;
  margin-top: 10px;
}

.alert .i { width: 18px; height: 18px; }
.alert.danger { background: var(--bad-soft); color: var(--bad); }

/* ---------- جریان نقدی و نوار سنج ---------- */
.flow-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.flow-numbers div { display: flex; flex-direction: column; }
.flow-numbers strong { font-size: 1rem; font-weight: 800; }

.meter {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
}

.meter-fill {
  position: absolute;
  inset: 0 0 0 auto;
  width: var(--w);
  border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: grow .9s var(--ease) both;
  transform-origin: right;
}

.meter.over .meter-fill { background: var(--bad); box-shadow: 0 0 12px rgba(255, 107, 107, .4); }

.meter-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  right: var(--at);
  width: 2px;
  border-radius: 2px;
  background: var(--text-2);
}

.meter-legend { display: flex; justify-content: space-between; font-size: .82rem; margin-top: 8px; }

.progress {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 6px 0 2px;
}

.progress > span {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 999px;
  background: var(--accent);
  animation: grow .7s var(--ease) both;
  transform-origin: right;
}

/* ---------- ترکیب دارایی ---------- */
.stack-bar {
  display: flex;
  gap: 3px;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  animation: grow .8s var(--ease) both;
  transform-origin: right;
}

.seg-fill { width: var(--w); min-width: 4px; }

.legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.legend a { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: inherit;
  text-decoration: none; padding: 4px 0; }
.legend-label { flex: 1; }
.legend-pct { color: var(--muted); font-size: .8rem; min-width: 44px; text-align: left; }
.legend-value { font-weight: 700; min-width: 96px; text-align: left; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.seg-fill, .dot { background: var(--c); }

.chart-box { position: relative; height: 200px; }

/* ---------- فهرست‌ها ---------- */
/* خلاصه بالای هر فهرست: نسخه کوچک کارت درخشان صفحه اصلی */
.summary {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--hairline));
  box-shadow: var(--shadow);
}

.summary strong { font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.3; }
.summary.two { flex-direction: row; gap: 24px; }
.summary.two > div { display: flex; flex-direction: column; }
.summary.two strong { font-size: 1.3rem; }

.list {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  text-align: right;
  cursor: pointer;
  position: relative;
  transition: background .15s;
}

.row + .row, .row-form + .row, .row + .row-form { border-top: 1px solid var(--border); }
.row:active { background: var(--surface-2); }
.row.static { cursor: default; }
.row.static:active { background: none; }
.row.dim { opacity: .55; }
.row.tall { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.row.danger .row-title { color: var(--bad); }
.row-form { margin: 0; }

.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--muted); font-size: .8rem; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.row-end strong { font-weight: 700; }

.bubble {
  --c: var(--s0);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
}

.bubble .i { width: 21px; height: 21px; }
.bubble.big { width: 52px; height: 52px; border-radius: 16px; }
.bubble.s0 { color: var(--text-2); background: var(--surface-2); }

.pill {
  font-size: .72rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
}

.pill.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- زبانه‌های بالای صفحه ---------- */
.seg {
  display: flex;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}

.seg a {
  flex: 1;
  text-align: center;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 600;
  transition: background .2s var(--ease), color .2s;
}

.seg a.on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow); }
:root[data-theme="light"] .seg a.on { background: var(--surface); }

/* ---------- حالت خالی و خوش‌آمد ---------- */
.empty {
  text-align: center;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}

.empty-icon .i { width: 34px; height: 34px; }
.empty h2 { font-size: 1.1rem; }
.empty p { color: var(--muted); font-size: .9rem; max-width: 320px; margin-bottom: 8px; }

.welcome { display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.welcome h2 { font-size: 1.25rem; margin-top: 6px; }
.steps { margin: 4px 0 8px; padding-right: 22px; color: var(--text-2); list-style: persian; }
.steps li { padding: 2px 0; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- میان‌برها ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 4px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  transition: transform .2s var(--spring), border-color .2s;
}

.quick-btn .bubble { width: 44px; height: 44px; border-radius: 15px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 25%, transparent); }

.quick-btn:active { transform: scale(.95); }

/* ---------- دکمه‌ها ---------- */
.btn {
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: var(--grad);
  color: var(--on-accent);
  box-shadow: 0 8px 24px rgba(62, 232, 166, .25);
  cursor: pointer;
  transition: transform .12s var(--ease), filter .2s, opacity .2s;
}

.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn .i { width: 20px; height: 20px; }
.btn.wide { width: 100%; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.danger-ghost { background: var(--bad-soft); color: var(--bad); padding: 0 16px; box-shadow: none; }
.htmx-request .btn[type="submit"], .btn.htmx-request { opacity: .6; pointer-events: none; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
}

.icon-btn .i { width: 18px; height: 18px; }

.fab {
  position: fixed;
  z-index: 25;
  left: max(16px, calc(50% - 304px));
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px);
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: var(--on-accent);
  box-shadow: 0 10px 30px var(--accent-glow), 0 0 0 1px rgba(255, 255, 255, .15) inset;
  transition: transform .15s var(--ease);
  animation: pop .35s var(--ease) both;
}

.fab .i { width: 26px; height: 26px; }
.fab:active { transform: scale(.9); }

/* ---------- فرم‌ها ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full, .field:has(textarea) { grid-column: 1 / -1; }
.field[hidden] { display: none; }

.label { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.opt { color: var(--muted); font-weight: 400; font-size: .75rem; }

.input { position: relative; display: flex; align-items: center; }

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* جلوگیری از بزرگ‌نمایی خودکار iOS */
  color: inherit;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 11px 12px;
  min-height: 48px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8494' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
  padding-left: 36px;
}

input:focus, select:focus, textarea:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.input.has-unit input { padding-left: 56px; }
.unit { position: absolute; left: 12px; color: var(--muted); font-size: .8rem; pointer-events: none; }
input[data-money], input[data-num], input[inputmode="numeric"] { direction: ltr; text-align: right; }
.money-words { font-size: .78rem; color: var(--accent); min-height: 1.2em; margin-top: -2px; }
textarea { min-height: 72px; resize: vertical; }

.hint { color: var(--muted); font-size: .76rem; }
.error { color: var(--bad); font-size: .78rem; font-weight: 600; }
.has-error input, .has-error select { border-color: var(--bad); background: var(--bad-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .12s var(--ease);
}

.chip span .i { width: 18px; height: 18px; }
.chip span:active { transform: scale(.95); }
.chip input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 14px rgba(62, 232, 166, .15); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.track {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  flex: none;
  transition: background .2s var(--ease);
}

.track::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .25s var(--ease);
}

.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(-18px); }

details.group { padding: 0; }
details.group > summary, details.disclosure > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details > summary::-webkit-details-marker { display: none; }
details.group > summary::after, details.disclosure > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-left: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .2s var(--ease);
}

details[open].group > summary::after, details[open].disclosure > summary::after { transform: rotate(135deg); }
details.group .fields { padding: 0 16px 16px; animation: fade-up .25s var(--ease); }
details.disclosure { padding: 0; }
details.disclosure > :not(summary) { margin: 0 16px 16px; }

.sticky-actions {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); /* بالای نوار تب شناور */
  z-index: 5;
}

.sticky-actions .btn { box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }

.price-row { align-items: center; }
.price-row .input.compact { width: 46%; max-width: 220px; }
.price-row input { min-height: 42px; padding-top: 8px; padding-bottom: 8px; font-size: 16px; }

.steps-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps-head { display: flex; justify-content: space-between; font-size: .88rem; }

.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th, .table td { padding: 6px 4px; border-bottom: 1px solid var(--border); text-align: right; }
.table .num { text-align: left; }

.disclaimer { color: var(--muted); font-size: .78rem; text-align: center; }
.footnote { color: var(--muted); font-size: .75rem; text-align: center; margin-top: 12px; }

/* ---------- برگه پایین ---------- */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  max-height: 92dvh;
  padding: 0 16px calc(16px + var(--safe-b));
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet[open] { animation: sheet-in .38s var(--ease) both; }
.sheet.closing { animation: sheet-out .22s ease-in both; }
.sheet::backdrop { background: rgba(10, 14, 20, .42); backdrop-filter: blur(2px); animation: fade .3s ease both; }
.sheet.closing::backdrop { animation: fade .22s ease reverse both; }

.sheet-grip {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 22px;
  background: var(--surface);
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
  cursor: grab;
}

.sheet-grip::before { content: ""; width: 40px; height: 5px; border-radius: 999px; background: var(--border); }

.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.sheet-head h2 { font-size: 1.15rem; font-weight: 800; }

.sheet-actions {
  position: sticky;
  bottom: calc(-16px - var(--safe-b));
  display: flex;
  gap: 8px;
  padding: 12px 0 calc(16px + var(--safe-b));
  margin-bottom: calc(-16px - var(--safe-b));
  background: linear-gradient(to top, var(--surface) 75%, transparent);
}

.sheet-actions .btn.wide { flex: 1; }

/* ---------- پیام کوتاه ---------- */
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: calc(var(--safe-t) + 12px);
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  animation: toast 2.8s var(--ease) both;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- ورود ---------- */
.auth {
  max-width: 380px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.auth h1 { font-size: 1.5rem; }
.auth .form { margin-top: 12px; }

.auth-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  box-shadow: 0 10px 30px color-mix(in srgb, var(--hero-1) 35%, transparent);
}

.auth-logo .i { width: 34px; height: 34px; }

/* ---------- حرکت ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { from { transform: none; } to { transform: translateY(100%); } }

@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, -16px) scale(.96); }
  10%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -16px) scale(.96); }
}

/* ورود کوتاه: محتوا تا پایان انیمیشن نامرئی است، پس هرچه طولانی‌تر، صفحه کندتر به نظر می‌رسد
   (قبلاً ۰٫۵ ثانیه + تأخیر تا ۰٫۲۵؛ حالا همه چیز تا حدود ۰٫۳ ثانیه دیده می‌شود) */
.page > *, .live > * { animation: rise .22s var(--ease) both; }
.page > *:nth-child(2), .live > *:nth-child(2) { animation-delay: .03s; }
.page > *:nth-child(3), .live > *:nth-child(3) { animation-delay: .06s; }
.page > *:nth-child(4), .live > *:nth-child(4) { animation-delay: .09s; }
.page > *:nth-child(n+5), .live > *:nth-child(n+5) { animation-delay: .12s; }
.live.refreshed > * { animation: none; } /* تازه‌سازی خودکار نباید صفحه را دوباره بلرزاند */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

::view-transition-old(root) { animation: .14s ease both fade reverse; }
::view-transition-new(root) { animation: .22s var(--ease) both fade-up; }
::view-transition-old(tabbar), ::view-transition-new(tabbar),
::view-transition-old(appbar), ::view-transition-new(appbar) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- روی صفحه بزرگ (مک): اپ داخل قاب آیفون ---------- */
/* قاب گوشی دسکتاپ حذف شد؛ نسخه دسکتاپ واقعی در انتهای فایل است */

@media (max-width: 360px) {
  .fields { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- مبلغ: عدد درشت، واحد ریز ---------- */
.amt { white-space: nowrap; }
.amt small { font-size: .6em; font-weight: 600; opacity: .7; margin-inline-start: .3em; letter-spacing: 0; }
.hero-value .amt small { font-size: .45em; opacity: .85; }
.legend-value .amt small, .row-end .amt small { font-size: .72em; }

/* شماره رنگ هر گروه؛ پس از .bubble تا رنگ پیش‌فرض آن را بازنویسی کند */
.s0 { --c: var(--s0); } .s1 { --c: var(--s1); } .s2 { --c: var(--s2); } .s3 { --c: var(--s3); }
.s4 { --c: var(--s4); } .s5 { --c: var(--s5); } .s6 { --c: var(--s6); } .s7 { --c: var(--s7); }
.s8 { --c: var(--s8); } .s9 { --c: var(--s9); }

/* جا برای دکمه شناور تا ردیف آخر زیر آن نرود */
.page:has(.fab) { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 96px); }
/* مبالغ بزرگ‌اند؛ همیشه تمام‌عرض */
.field:has(input[data-money]) { grid-column: 1 / -1; }

/* ---------- وضعیت منبع قیمت ---------- */
.source-card { display: flex; flex-direction: column; gap: 10px; }
.source-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.status-dot.ok { background: var(--good); }
.status-dot.bad { background: var(--bad); }

/* ---------- داشبورد زنده ---------- */
.live { display: flex; flex-direction: column; gap: 14px; }
.page > .live { animation: none; }

.other-prices .list.flat { box-shadow: none; margin: 0 0 8px; }
.other-prices > .list { margin: 0; }
.source-note { flex-basis: 100%; font-size: .78rem; padding-inline-start: 17px; }
.source-note.warn { color: var(--warn); }
.source-note.bad { color: var(--bad); }

/* ---------- پیامک بانکی ---------- */
.sms-text { white-space: pre-line; font-size: .88rem; line-height: 1.6; }
.sms-actions { display: flex; gap: 8px; margin-top: 8px; }
.sms-actions form { margin: 0; }
.small-btn { min-height: 34px; padding: 0 14px; font-size: .82rem; border-radius: 10px; }
.sms-quote {
  white-space: pre-wrap;
  font: inherit;
  font-size: .85rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0;
}
.upload-form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.upload-form input[type="file"] { flex: 1; min-width: 180px; min-height: 0; padding: 8px; }
.setup h3 { font-size: .92rem; margin: 6px 0; }
.setup ol { padding-right: 20px; margin: 0 0 10px; font-size: .86rem; color: var(--text-2); }
.setup li { margin-bottom: 6px; }
.setup pre, .setup code { font-size: .78rem; background: var(--surface-2); border-radius: 6px; padding: 2px 6px; }
.setup pre { padding: 8px; white-space: pre-wrap; word-break: break-all; text-align: left; }
.token { display: block; word-break: break-all; padding: 8px; background: var(--surface-2); border-radius: 8px; margin-bottom: 8px; }

/* ---------- خرج‌ها ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav strong { font-size: 1.05rem; }
.month-nav .icon-btn .i { transform: scaleX(-1); }
.month-nav .icon-btn .i.end { transform: none; }
.cat-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cat-bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: .9rem; }
.cat-value { font-weight: 700; }
.cat-track { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cat-fill { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); }
.flow-numbers.four { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
.flow-numbers a { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.spend-total { display: block; color: inherit; text-decoration: none; margin-bottom: 12px; }
.spend-total strong { font-size: 1.5rem; font-weight: 800; }

/* ---------- صفحه اصلی: جزئیات «شب زمردی» ---------- */
.greet .muted { font-weight: 600; }
.flow-numbers strong { font-weight: 900; font-size: 1.1rem; }
.flow-numbers > * { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.flow-numbers .free { background: var(--accent-soft); }
.flow-numbers .free strong { color: var(--accent); }
.flow-numbers .free strong.neg { color: var(--bad); }
.cat-fill { box-shadow: 0 0 10px color-mix(in srgb, var(--c) 45%, transparent); }
.legend .dot { box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.notice { border: 1px solid color-mix(in srgb, var(--warn) 22%, transparent); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem;
  color: rgba(255, 255, 255, .6); margin-top: 6px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(62, 232, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 232, 166, 0); } }
.delta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; }
.delta-row .delta { margin-top: 0; white-space: nowrap; }
.delta-row .delta-when { font-size: .75rem; color: rgba(255, 255, 255, .55); }

/* ---------- انتخاب ظاهر ---------- */
.theme-pick { display: flex; gap: 8px; padding: 12px 14px; }
.theme-pick button {
  flex: 1;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s var(--spring);
}
.theme-pick button:active { transform: scale(.95); }
.theme-pick button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft); }
.theme-swatch { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--hairline); }
.theme-swatch.light { background: linear-gradient(135deg, #ffffff 50%, #f0f4f2 50%); }
.theme-swatch.dark { background: linear-gradient(135deg, #1c222b 50%, #0d1116 50%); }
.theme-swatch.system { background: linear-gradient(135deg, #ffffff 50%, #0d1116 50%); }

/* ---------- صفحه‌های ورود ---------- */
.auth-link { display: inline-block; margin-top: 8px; font-size: .88rem; font-weight: 600; }
.auth-link.as-button { background: none; border: 0; font: inherit; color: var(--accent); cursor: pointer; }
.auth-alt { color: var(--muted); font-size: .88rem; margin-top: 10px; }
.auth-alt a { font-weight: 700; }
.code-input { text-align: center !important; font-size: 1.5rem !important; letter-spacing: .5em;
  font-weight: 800; }
.brand-logo { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 6px;
  box-shadow: 0 16px 40px rgba(62, 232, 166, .22); animation: pop .5s var(--spring) both; }
.brand-name { font-size: 2.2rem !important; font-weight: 900; letter-spacing: -.02em; line-height: 1.2; }
.brand-dot { color: var(--accent); text-shadow: 0 0 14px var(--accent-glow); }
.brand-tag { color: var(--text-2); font-weight: 600; font-size: .9rem; margin-top: -4px; }
.pos { color: var(--good); }
.spend-in { display: flex; justify-content: space-between; align-items: baseline; color: inherit;
  text-decoration: none; margin: -4px 0 12px; padding: 8px 12px; border-radius: 12px;
  background: var(--accent-soft); }

/* ---------- ویرایش دسته‌ها ---------- */
.cat-editor { display: flex; flex-direction: column; gap: 10px; }
.cat-edit-row { display: flex; align-items: center; gap: 10px; transition: opacity .2s; }
.cat-edit-row input:not([type=checkbox]) { flex: 1; min-height: 44px; }
.cat-edit-row.is-hidden { opacity: .5; }
.hide-toggle { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted);
  white-space: nowrap; cursor: pointer; }
.hide-toggle input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }

/* ---------- قیمت‌های من ---------- */
.watch { display: flex; flex-direction: column; gap: 8px; }
.watch-head { margin: 4px 4px 0; }
.watch-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.watch-scroll::-webkit-scrollbar { display: none; }
.watch-card { flex: 0 0 auto; min-width: 138px; scroll-snap-align: start; display: flex;
  flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.watch-label { font-size: .75rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.watch-card strong { font-size: 1rem; font-weight: 900; white-space: nowrap; }
.watch-change { display: inline-flex; align-items: center; gap: 2px; font-size: .74rem;
  font-weight: 700; color: var(--muted); }
.watch-change .i { width: 14px; height: 14px; }
.watch-change.up { color: var(--good); }
.watch-change.down { color: var(--bad); }

/* ---------- ریزه‌کاری‌های «شب زمردی» در همه صفحه‌ها ---------- */
.row { transition: background .15s, transform .15s var(--ease); }
.row:active { transform: scale(.99); }
.row-end strong { font-weight: 800; }
.bubble { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent); }
.empty-icon { box-shadow: 0 0 40px var(--accent-soft); }
.seg { border: 1px solid var(--hairline); }
.seg a.on { color: var(--accent); }
details.group, details.disclosure { transition: border-color .2s; }
details[open].group, details[open].disclosure { border-color: color-mix(in srgb, var(--accent) 22%, var(--hairline)); }
.progress > span, .cat-fill { background-image: linear-gradient(90deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 70%, #fff)); }
.source-card { background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); }

/* ---------- از وزیر بپرس ---------- */
.ask-vazir { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  color: inherit; text-decoration: none; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--hairline));
  background: radial-gradient(120% 160% at 100% 0%, var(--accent-soft), transparent 65%), var(--surface);
  box-shadow: var(--shadow); transition: transform .2s var(--spring); }
.ask-vazir:active { transform: scale(.98); }
.ask-vazir img { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 0 18px var(--accent-glow); }
.ask-vazir span { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.ask-vazir small { color: var(--muted); font-size: .78rem; }
.assistant-consent { display: flex; flex-direction: column; gap: 12px; text-align: center; }

/* چت تمام‌صفحه: سربرگ، پیام‌ها (تنها بخش اسکرول‌خور) و جای نوشتن پایین */
.chat-app { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  background:
    radial-gradient(80% 35% at 85% 0%, var(--glow-1), transparent 70%),
    var(--bg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 14px 10px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px); }
.chat-back .i { transform: scaleX(-1); }
.chat-head-logo { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 0 16px var(--accent-glow); }
.chat-head-title { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.chat-head-title strong { font-size: 1.05rem; font-weight: 900; }
.chat-head-title span { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); }
.chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 0 auto; }
.chat-row { display: flex; animation: rise .3s var(--ease) both; }
.chat-row.me { justify-content: flex-start; }
.chat-row.vazir { justify-content: flex-end; }
.chat-msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; line-height: 1.85; font-size: .94rem;
  overflow-wrap: anywhere; }
.chat-msg.me { background: var(--grad); color: var(--on-accent); font-weight: 600;
  border-bottom-right-radius: 6px; white-space: pre-wrap; }
.chat-msg.vazir { background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow);
  border-bottom-left-radius: 6px; }
.chat-msg.vazir p { margin: 0 0 6px; } .chat-msg.vazir p:last-child { margin: 0; }
.chat-msg.vazir ul, .chat-msg.vazir ol { margin: 4px 0 8px; padding-right: 20px; }
.chat-msg.vazir li { margin: 2px 0; }
.chat-msg.vazir li::marker { color: var(--accent); }
.chat-msg.vazir strong { font-weight: 800; color: var(--text); }
.chat-msg.error { border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: blink 1.2s infinite ease-in-out both; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-hello { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 24px 6px 8px; animation: rise .5s var(--ease) both; }
.chat-hello img { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 16px 40px var(--accent-glow); }
.chat-hello h2 { font-size: 1.35rem; font-weight: 900; }
.chat-hello p { color: var(--muted); font-size: .9rem; max-width: 300px; }
.chat-starters { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 14px; }
.starter { display: flex; align-items: center; gap: 10px; text-align: right; font: inherit; font-size: .9rem;
  font-weight: 600; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow);
  transition: transform .2s var(--spring), border-color .2s; }
.starter:active { transform: scale(.98); border-color: var(--accent); }
.starter .i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.chat-composer { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 6px 6px 6px 8px;
  border-radius: 24px; border: 1px solid var(--hairline); background: var(--surface-2);
  box-shadow: var(--float-shadow); }
.chat-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat-composer textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; border: 0;
  background: transparent; padding: 11px 10px; line-height: 1.6; box-shadow: none !important; }
.chat-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; display: grid;
  place-items: center; background: var(--grad); color: var(--on-accent); cursor: pointer;
  box-shadow: 0 6px 18px var(--accent-glow); transition: transform .2s var(--spring), opacity .2s; }
.chat-send:disabled { opacity: .35; box-shadow: none; cursor: default; }
.chat-send:not(:disabled):active { transform: scale(.9); }
.chat-disclaimer { text-align: center; color: var(--muted); font-size: .7rem;
  padding: 6px 16px calc(var(--safe-b) + 8px); }

/* کارت تأیید ثبت در چت */
.action-card { width: 86%; padding: 12px 14px; border-radius: 18px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--hairline)); box-shadow: var(--shadow);
  animation: rise .35s var(--ease) both; }
.action-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--accent); }
.action-head .i { width: 18px; height: 18px; }
.action-card dl { margin: 0 0 10px; display: flex; flex-direction: column; gap: 4px; }
.action-card dl div { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
.action-card dt { color: var(--muted); }
.action-card dd { margin: 0; font-weight: 700; text-align: left; }
.action-buttons { display: flex; gap: 8px; }
.action-buttons .btn { flex: 1; min-height: 42px; }
.action-buttons .btn.ghost { flex: 0 0 auto; padding: 0 18px; }
.action-card.done { display: flex; align-items: center; gap: 8px; width: auto; font-weight: 700;
  color: var(--accent); padding: 10px 14px; }
.action-card.done .i { width: 18px; height: 18px; }
.action-card.cancelled { color: var(--muted); border-color: var(--hairline); }

/* ---------- پرسونا: آواتار، مصاحبه و کارت شخصیت ---------- */
.avatar { --size: 44px; width: var(--size); height: var(--size); flex: none; display: grid; place-items: center;
  border-radius: 30%; position: relative; overflow: hidden;
  background:
    radial-gradient(70% 60% at 30% 20%, hsl(var(--h, 160) 95% 80% / .9), transparent 70%),
    linear-gradient(145deg, hsl(var(--h, 160) 80% 58%), hsl(calc(var(--h, 160) + 45) 75% 38%));
  box-shadow: 0 6px 16px hsl(var(--h, 160) 70% 40% / .35), inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -6px 12px rgba(0, 0, 0, .15); }
.avatar-emoji { font-size: calc(var(--size) * .58); line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.avatar.xl { --size: 112px; border-radius: 34px; }
.avatar.avatar-empty { background: var(--surface-2); color: var(--accent); box-shadow: none; border: 1px dashed var(--border); }
.avatar.avatar-empty .i { width: 20px; height: 20px; }
.appbar-inner .greet { flex: 1; }
.greet-avatar { display: block; border-radius: 32%; transition: transform .2s var(--spring); }
.greet-avatar:active { transform: scale(.92); }
.greet-avatar .avatar { --size: 42px; }

.persona-cta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  color: inherit; text-decoration: none; border: 1px solid color-mix(in srgb, var(--s7) 35%, var(--hairline));
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--s7) 18%, transparent), transparent 65%), var(--surface);
  box-shadow: var(--shadow); transition: transform .2s var(--spring); }
.persona-cta:active { transform: scale(.98); }
.persona-cta-stack { display: flex; flex: none; }
.persona-cta-stack .avatar { --size: 34px; border: 2px solid var(--surface); }
.persona-cta-stack .avatar + .avatar { margin-inline-start: -12px; }
.persona-cta-text { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.persona-cta-text small { color: var(--muted); font-size: .78rem; }
.persona-row .avatar { --size: 40px; }

/* مصاحبه: هر سؤال یک پیام وزیر و چند گزینه؛ با جاوااسکریپت یکی‌یکی ظاهر می‌شوند */
.interview-progress { width: 64px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.interview-progress span { display: block; height: 100%; width: var(--p, 0%); background: var(--grad);
  transition: width .4s var(--ease); }
.interview .chat-scroll { padding-bottom: calc(var(--safe-b) + 32px); }
.q { display: flex; flex-direction: column; gap: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; padding-inline-start: 10%;
  animation: rise .35s var(--ease) both; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 10px 14px; border-radius: 16px; font-size: .9rem; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--hairline)); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow); transition: transform .2s var(--spring), background .2s, border-color .2s; }
.choice:active span { transform: scale(.95); }
.choice input:checked + span { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.q-next { align-self: center; }
.btn.small { min-height: 40px; padding: 0 18px; font-size: .88rem; }
.q-answer { display: none; border: 0; background: none; padding: 0; font: inherit; cursor: pointer; width: 100%; }
.q.answered .choices { display: none; }
.q.answered .q-answer { display: flex; }
.interview.js .q { display: none; }
.interview.js .q.shown { display: flex; }
.note-box { display: flex; flex-direction: column; gap: 10px; animation: rise .35s var(--ease) both; }
.note-box textarea { min-height: 70px; resize: vertical; }

/* کارت شخصیت: کارت کلکسیونی با قاب فویل، کمیابی، شماره و چهار ویژگی */
.tcard-stage { perspective: 1100px; padding: 6px 4px 4px; overflow-x: clip; overflow-y: visible; }
.tcard { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%;
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 4px; padding: 14px 16px 16px; border-radius: 30px; color: #f5f7fa;
  max-width: 380px; margin: 0 auto;
  background:
    radial-gradient(120% 70% at 50% 0%, hsl(var(--h) 85% 55% / .55), transparent 62%),
    radial-gradient(90% 60% at 100% 100%, hsl(calc(var(--h) + 50) 80% 50% / .35), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .07) 1px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(175deg, hsl(var(--h) 35% 14%), #07090c 85%);
  border: 1.5px solid transparent;
  box-shadow: 0 24px 60px hsl(var(--h) 70% 30% / .45), 0 2px 0 rgba(255, 255, 255, .06) inset;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); }
.tcard::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: -1;
  background: conic-gradient(from 0deg, hsl(var(--h) 90% 65%), hsl(calc(var(--h) + 60) 90% 65%),
    hsl(calc(var(--h) + 180) 90% 70%), hsl(calc(var(--h) + 300) 90% 65%), hsl(var(--h) 90% 65%));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.tcard.tilting { transition: transform .08s linear; }
.tcard-foil { position: absolute; inset: 0; pointer-events: none; z-index: 2; mix-blend-mode: color-dodge; opacity: .35;
  background:
    radial-gradient(40% 35% at var(--mx) var(--my), rgba(255, 255, 255, .55), transparent 70%),
    repeating-linear-gradient(115deg, hsl(var(--h) 100% 70% / .0) 0 12px, hsl(calc(var(--h) + 120) 100% 70% / .25) 18px,
      hsl(calc(var(--h) + 240) 100% 70% / .0) 26px); }
.tcard.common .tcard-foil { opacity: .12; }
.tcard.rare .tcard-foil { opacity: .22; }
.tcard.legendary { box-shadow: 0 24px 70px hsl(var(--h) 80% 40% / .6), 0 0 0 1px rgba(255, 215, 120, .35); }
.tcard.reveal { animation: cardin 1.1s var(--spring) both; }
@keyframes cardin { 0% { opacity: 0; transform: rotateY(-120deg) scale(.7); } 60% { opacity: 1; } 100% { transform: none; } }
.tcard-top { width: 100%; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.tcard-rarity { font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.tcard.epic .tcard-rarity { background: hsl(275 70% 55% / .35); border-color: hsl(275 80% 70% / .5); }
.tcard.legendary .tcard-rarity { background: linear-gradient(90deg, #f7d774, #f0a35b); color: #2a1a00; border: 0; }
.tcard.rare .tcard-rarity { background: hsl(205 80% 55% / .3); border-color: hsl(205 80% 70% / .45); }
.tcard-no { font-size: .8rem; font-weight: 800; color: rgba(245, 247, 250, .75); }
.tcard-no small { font-weight: 600; opacity: .6; }
.tcard-art { position: relative; width: 150px; height: 150px; display: grid; place-items: center; margin: 4px 0 2px; }
.tcard-ring { position: absolute; inset: 8px; border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--h) 90% 65% / .55), hsl(var(--h) 90% 50% / .08) 60%, transparent 70%);
  box-shadow: 0 0 0 1px hsl(var(--h) 90% 75% / .25), 0 0 0 14px hsl(var(--h) 90% 75% / .06);
  animation: pulse-ring 3.2s ease-in-out infinite; }
@keyframes pulse-ring { 50% { transform: scale(1.06); opacity: .8; } }
.tcard-emoji { position: relative; font-size: 88px; line-height: 1; animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45));
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
@keyframes float { 50% { transform: translateY(-7px) rotate(-3deg); } }
.tcard-kicker { font-size: .7rem; font-weight: 700; color: rgba(245, 247, 250, .55); }
.tcard-name { font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.25;
  background: linear-gradient(180deg, #fff, hsl(var(--h) 70% 85%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tcard-twin { font-size: .8rem; color: rgba(245, 247, 250, .7); }
.tcard-tag { font-size: .92rem; line-height: 1.85; max-width: 320px; margin: 6px 0 4px; color: rgba(245, 247, 250, .92); }
.tcard-stats { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; position: relative; z-index: 1; }
.tstat { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 6px; padding: 9px 11px;
  border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .07); text-align: right; }
.tstat span { font-size: .72rem; color: rgba(245, 247, 250, .65); }
.tstat b { font-size: .95rem; font-weight: 900; }
.tstat i { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tstat em { display: block; height: 100%; width: var(--w); border-radius: 3px;
  background: linear-gradient(90deg, hsl(var(--h) 90% 62%), hsl(calc(var(--h) + 50) 90% 68%)); }
.tcard-traits { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.tcard-traits span { padding: 4px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); }
@media (prefers-reduced-motion: reduce) { .tcard-emoji, .tcard-ring { animation: none; } }

.persona-summary { margin-top: 16px; }
.persona-summary-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.persona-summary-head img { width: 28px; height: 28px; border-radius: 9px; }
.persona-summary p { line-height: 1.9; color: var(--text-2); }
.persona-risk { margin-top: 12px; }
.persona-risk-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); margin-top: 10px; }
.persona-risk + .ask-vazir { margin-top: 12px; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 6px; min-width: 0;
  border-radius: 16px; border: 1px solid transparent; background: none; color: var(--text-2);
  font: inherit; cursor: pointer; position: relative; transition: transform .2s var(--spring), background .2s; }
.avatar-pick:active { transform: scale(.92); }
.avatar-pick .avatar { --size: 50px; }
.avatar-name { font-size: .64rem; font-weight: 700; line-height: 1.4; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.avatar-pick.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.avatar-pick.mine::after { content: "★"; position: absolute; top: 2px; inset-inline-end: 4px; font-size: .8rem;
  color: var(--warn); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }

/* مصاحبه با وزیر */
.persona-intro { display: flex; justify-content: center; padding: 6px 0 4px; }
.persona-intro .avatar { --size: 40px; border: 2px solid var(--bg); animation: rise .5s var(--ease) both; }
.persona-intro .avatar + .avatar { margin-inline-start: -10px; }
.persona-intro .avatar:nth-child(2) { animation-delay: .06s; } .persona-intro .avatar:nth-child(3) { animation-delay: .12s; }
.persona-intro .avatar:nth-child(4) { animation-delay: .18s; } .persona-intro .avatar:nth-child(5) { animation-delay: .24s; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-inline-start: 10%; animation: rise .35s var(--ease) both; }
.chip-reply { font: inherit; font-size: .88rem; font-weight: 600; padding: 9px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--hairline)); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); transition: transform .2s var(--spring), border-color .2s; }
.chip-reply:active { transform: scale(.95); border-color: var(--accent); }
.quick-link { align-self: center; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.redo { margin-top: 18px; }

/* ---------- نمودار قیمت و تغییر روزانه ---------- */
a.watch-card { color: inherit; text-decoration: none; transition: transform .2s var(--spring), border-color .2s; }
a.watch-card:active { transform: scale(.96); border-color: var(--accent); }
.chart-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.chart-link .i { width: 16px; height: 16px; color: var(--accent); }
.day-change { display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; font-weight: 800; margin-top: 2px; }
.day-change .i { width: 13px; height: 13px; }
.day-change small { font-weight: 600; color: var(--muted); }
.day-change.up { color: var(--good); } .day-change.down { color: var(--bad); } .day-change.flat { color: var(--muted); font-weight: 600; }
.pc-now { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.pc-now strong { font-size: 1.5rem; font-weight: 900; letter-spacing: -.01em; }
.pc-ranges { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.pc-ranges button { flex: 1; font: inherit; font-size: .8rem; font-weight: 700; padding: 8px 4px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.pc-ranges button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.pc-ranges button:disabled { opacity: .35; cursor: default; }
.pc-range-change { margin: 10px 2px 4px; }
.pc-range-change strong.up { color: var(--good); } .pc-range-change strong.down { color: var(--bad); }
.chart-box.pc-box { height: 230px; }
.pc-since { margin: 6px 2px 0; }
.pc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.pc-stats div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--hairline); }
.pc-stats span { font-size: .72rem; color: var(--muted); }
.pc-stats b { font-size: .92rem; font-weight: 800; }
.pc-stats b.up { color: var(--good); } .pc-stats b.down { color: var(--bad); }
.pc-stats small { font-size: .7rem; color: var(--muted); }
.pc-empty { padding: 20px 0; text-align: center; }
.pc-ask { margin-top: 6px; }

/* ---------- عکس در چت وزیر ---------- */
.chat-attach { width: 40px; height: 44px; flex: none; display: grid; place-items: center; color: var(--muted);
  cursor: pointer; border-radius: 50%; transition: color .2s, transform .2s var(--spring); }
.chat-attach:active { transform: scale(.9); }
.chat-attach:hover { color: var(--accent); }
.chat-attach .i { width: 22px; height: 22px; }
.chat-attach-preview { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 8px 10px;
  border-radius: 18px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  animation: rise .3s var(--ease) both; }
.chat-attach-preview[hidden] { display: none; }
.chat-attach-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; flex: none; }
.chat-attach-preview p { flex: 1; font-size: .74rem; line-height: 1.7; color: var(--text-2); }
.chat-photo { display: block; max-width: 220px; max-height: 260px; border-radius: 14px; margin-bottom: 6px; object-fit: cover; }
.chat-msg.me:has(.chat-photo) { padding: 6px; }
.confirm-all { width: 86%; min-height: 46px; }

/* ---------- صفحه معرفی عمومی: شفق متحرک، گوشی با گفتگوی زنده، نوار قیمت، کارت‌ها ---------- */
.lx { position: relative; overflow: hidden; min-height: 100dvh; isolation: isolate; }
.lx-aurora { position: absolute; inset: -20% -10% auto; height: 900px; z-index: -2; filter: blur(70px); opacity: .7; pointer-events: none; }
.lx-aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 18s ease-in-out infinite alternate; }
.lx-aurora i:nth-child(1) { width: 520px; height: 520px; top: 0; right: 5%; background: #1fbf86; }
.lx-aurora i:nth-child(2) { width: 420px; height: 420px; top: 140px; left: 0; background: #6d5cff; animation-duration: 22s; }
.lx-aurora i:nth-child(3) { width: 360px; height: 360px; top: 320px; right: 30%; background: #b8f35c; opacity: .6; animation-duration: 26s; }
:root[data-theme="light"] .lx-aurora { opacity: .35; }
:root[data-theme="light"] .lx-aurora i { mix-blend-mode: multiply; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.15); } 100% { transform: translate(-40px, 80px) scale(.95); } }
.lx-grid { position: absolute; inset: 0 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--hairline) 1px, transparent 1px), linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%); }

.lx-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); }
.lx-nav nav { display: flex; align-items: center; gap: 14px; }
.lx-brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-size: 1.25rem; font-weight: 900; }
.lx-brand img { border-radius: 10px; box-shadow: 0 0 18px var(--accent-glow); }
.lx-link { color: var(--text-2); text-decoration: none; font-weight: 700; font-size: .9rem; }
.lx main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.lx-hero { display: grid; gap: 34px; align-items: center; padding: 34px 0 26px; }
@media (min-width: 880px) { .lx-hero { grid-template-columns: 1.1fr .9fr; padding-top: 70px; } }
.lx-hero-text { display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center; }
@media (min-width: 880px) { .lx-hero-text { text-align: right; align-items: flex-start; } }
.lx-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 800;
  color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.lx-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.lx-hero h1 { font-size: clamp(2.1rem, 9vw, 3.6rem); font-weight: 900; line-height: 1.3; letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--text) 20%, var(--accent) 45%, var(--accent-2) 55%, var(--text) 80%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -150% 0; } }
.lx-lead { color: var(--text-2); font-size: 1.02rem; line-height: 2.05; max-width: 520px; }
.lx-ask { font-size: .95rem; color: var(--muted); min-height: 1.9em; }
.lx-typed { color: var(--text); font-weight: 800; }
.lx-caret { display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -3px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.lx-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lx-cta .btn { min-width: 150px; min-height: 52px; font-size: 1rem; }
.lx-cta .flip { transform: none; }
.lx-glow { position: relative; box-shadow: 0 10px 34px var(--accent-glow); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 14px 48px var(--accent-glow), 0 0 0 6px var(--accent-soft); } }
.lx-trust { font-size: .78rem; color: var(--muted); }

/* گوشی نمایشی با گفتگوی خودکار */
.lx-phone-wrap { position: relative; display: grid; place-items: center; padding: 30px 0; }
.lx-phone { position: relative; width: 300px; height: 560px; border-radius: 44px; padding: 14px; overflow: hidden;
  background: linear-gradient(160deg, #1b222c, #0a0d11); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 0 0 6px #05070a, 0 0 80px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: hover 7s ease-in-out infinite; color: #f3f6f9; display: flex; flex-direction: column; }
@keyframes hover { 50% { transform: translateY(-10px) rotate(-1deg); } }
.lx-notch { width: 96px; height: 24px; border-radius: 0 0 14px 14px; background: #05070a; margin: -14px auto 8px; }
.lx-phone-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.lx-phone-head img { width: 32px; height: 32px; border-radius: 10px; }
.lx-phone-head span { display: flex; flex-direction: column; line-height: 1.3; }
.lx-phone-head small { display: flex; align-items: center; gap: 4px; font-size: .66rem; color: #8a94a1; }
.lx-phone-head small i { width: 6px; height: 6px; border-radius: 50%; background: #3ee8a6; box-shadow: 0 0 6px #3ee8a6; }
.lx-chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 10px 6px; overflow: hidden; }
.lx-msg { max-width: 84%; padding: 8px 12px; border-radius: 16px; font-size: .78rem; line-height: 1.8; animation: pop .45s var(--spring) both; }
.lx-msg.me { align-self: flex-start; background: linear-gradient(120deg, #3ee8a6, #b8f35c); color: #03150e; font-weight: 700; border-bottom-right-radius: 4px; }
.lx-msg.vazir { align-self: flex-end; background: #1c222b; border: 1px solid rgba(255, 255, 255, .07); border-bottom-left-radius: 4px; }
.lx-msg.typing { display: flex; gap: 4px; padding: 11px 13px; }
.lx-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #3ee8a6; animation: blink 1.2s infinite both; }
.lx-msg.typing i:nth-child(2) { animation-delay: .15s; } .lx-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
.lx-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.lx-bars div { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 6px; font-size: .64rem; color: #c0c8d2; }
.lx-bars i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #3ee8a6, #b8f35c); width: 0; transition: width 1s var(--ease) .2s; }
.lx-msg-card { margin-top: 6px; padding: 6px 10px; border-radius: 10px; text-align: center; font-weight: 800; font-size: .72rem;
  background: linear-gradient(120deg, #3ee8a6, #b8f35c); color: #03150e; }
.lx-phone-input { display: flex; align-items: center; justify-content: space-between; margin: 4px; padding: 6px 6px 6px 12px;
  border-radius: 22px; background: #1c222b; font-size: .72rem; color: #8a94a1; }
.lx-phone-input b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(120deg, #3ee8a6, #b8f35c); color: #03150e; }
.lx-phone-input .i { width: 16px; height: 16px; }
.lx-orbit { position: absolute; width: 400px; height: 400px; animation: spin 40s linear infinite; pointer-events: none; }
.lx-orbit > span { position: absolute; top: 50%; left: 50%; transform: rotate(calc(var(--i) * 60deg)) translate(200px) rotate(calc(var(--i) * -60deg)); margin: -22px; }
.lx-orbit .avatar { --size: 44px; animation: spin 40s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 420px) { .lx-orbit { width: 340px; height: 340px; } .lx-orbit > span { transform: rotate(calc(var(--i) * 60deg)) translate(170px) rotate(calc(var(--i) * -60deg)); } }

/* نوار قیمت زنده */
.lx-ticker { position: relative; overflow: hidden; margin: 10px -16px 0; padding: 12px 0; border-block: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 70%, transparent); direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.lx-ticker-track { display: flex; width: max-content; gap: 34px; animation: marquee 40s linear infinite; }
.lx-ticker:hover .lx-ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.lx-tick { direction: rtl; display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; font-size: .9rem; font-weight: 700; }
.lx-tick b { color: var(--muted); font-weight: 600; font-size: .8rem; }
.lx-tick em { font-style: normal; font-size: .78rem; }
.lx-tick em.up, .lx-chart-nums b.up { color: var(--good); } .lx-tick em.down, .lx-chart-nums b.down { color: var(--bad); }

/* بخش‌ها و کارت‌ها */
.lx-section { margin-top: 72px; }
.lx-section > h2, .lx-chart h2, .lx-persona h2 { font-size: clamp(1.45rem, 5.5vw, 2.1rem); font-weight: 900; letter-spacing: -.02em; text-align: center; }
.lx-sub { color: var(--text-2); text-align: center; line-height: 2; max-width: 560px; margin: 10px auto 22px; }
.lx-bento, .lx-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.lx-card { --mx: 50%; --my: 50%; position: relative; overflow: hidden; padding: 20px; border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--hairline); box-shadow: var(--shadow);
  transition: transform .3s var(--spring), border-color .3s; }
.lx-card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--accent-soft), transparent 70%); }
.lx-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline)); }
.lx-card:hover::before { opacity: 1; }
.lx-card h3, .lx-card .lx-h { font-size: 1.05rem; font-weight: 800; margin: 12px 0 6px; }
.lx-card p:not(.lx-h) { color: var(--muted); font-size: .88rem; line-height: 1.95; }

.lx-chart { display: grid; gap: 20px; align-items: center; padding: 26px 20px; border-radius: 30px;
  background: linear-gradient(170deg, #0f2a20, #07090c); color: #f3f6f9; border: 1px solid rgba(62, 232, 166, .2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
@media (min-width: 880px) { .lx-chart { grid-template-columns: .8fr 1.2fr; padding: 36px; } .lx-chart h2, .lx-chart .lx-sub { text-align: right; margin-inline: 0; } }
.lx-chart .lx-sub { color: #c0c8d2; }
.lx-chart-nums { display: flex; gap: 22px; justify-content: center; }
@media (min-width: 880px) { .lx-chart-nums { justify-content: flex-start; } }
.lx-chart-nums span { display: flex; flex-direction: column; }
.lx-chart-nums small { color: #8a94a1; font-size: .75rem; }
.lx-chart-nums b { font-size: 1.5rem; font-weight: 900; }
.lx-line { width: 100%; height: 220px; overflow: visible; }
.lx-line .lx-area { fill: url(#lx-fill); opacity: 0; transition: opacity 1.2s ease 1.2s; }
.lx-line .lx-stroke { fill: none; stroke: url(#lx-stroke); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 8px rgba(62, 232, 166, .6)); transition: stroke-dashoffset 2.2s var(--ease); }
.lx-chart.in .lx-stroke { stroke-dashoffset: 0; }
.lx-chart.in .lx-area { opacity: 1; }

.lx-persona { display: grid; gap: 30px; align-items: center; }
@media (min-width: 880px) { .lx-persona { grid-template-columns: 1fr 1fr; } .lx-persona-text h2, .lx-persona-text .lx-sub { text-align: right; margin-inline: 0; } }
.lx-persona-text { display: flex; flex-direction: column; align-items: center; }
@media (min-width: 880px) { .lx-persona-text { align-items: flex-start; } }
.lx-fan { position: relative; height: 300px; display: grid; place-items: center; perspective: 900px; }
.lx-mini { position: absolute; width: 150px; height: 210px; border-radius: 22px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; padding: 12px; text-align: center; color: #f3f6f9;
  background: radial-gradient(90% 60% at 50% 0%, hsl(var(--h) 85% 55% / .6), transparent 70%), linear-gradient(175deg, hsl(var(--h) 35% 16%), #07090c 90%);
  border: 1px solid hsl(var(--h) 80% 65% / .5); box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
  transform: rotate(calc(var(--i) * 12deg)) translateX(calc(var(--i) * -46px)) translateY(calc(var(--i) * var(--i) * 6px));
  animation: fan 6s ease-in-out infinite; animation-delay: calc(var(--i) * .2s); }
.lx-mini span { font-size: 54px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4)); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.lx-mini b { font-weight: 900; font-size: .95rem; }
.lx-mini small { font-size: .65rem; color: rgba(243, 246, 249, .65); }
@keyframes fan { 50% { transform: rotate(calc(var(--i) * 15deg)) translateX(calc(var(--i) * -56px)) translateY(calc(var(--i) * var(--i) * 6px - 8px)); } }

.lx-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: none; }
.lx-steps li { position: relative; padding: 22px 20px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--hairline); }
.lx-step-no { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; font-weight: 900; font-size: 1.1rem;
  background: var(--grad); color: var(--on-accent); box-shadow: 0 8px 22px var(--accent-glow); }
.lx-steps h3, .lx-steps .lx-h { font-size: 1.05rem; font-weight: 800; margin: 12px 0 4px; }
.lx-steps p:not(.lx-h) { color: var(--muted); font-size: .88rem; line-height: 1.9; }
.lx-privacy { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px;
  border-radius: 30px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.lx-privacy h2 { font-size: 1.4rem; font-weight: 900; }
.lx-privacy p { color: var(--text-2); line-height: 2; max-width: 560px; }
/* ورود با چهره: اسکن متحرک */
.lx-face { display: grid; gap: 26px; align-items: center; justify-items: center; padding: 30px 20px; border-radius: 30px;
  background: linear-gradient(170deg, #0f2a20, #07090c); color: #f3f6f9; border: 1px solid rgba(62, 232, 166, .2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.lx-face-text { text-align: center; }
@media (min-width: 880px) { .lx-face { grid-template-columns: auto 1fr; padding: 40px 48px; justify-items: start; }
  .lx-face-text { text-align: right; } .lx-face-text .lx-sub { text-align: right; margin-inline: 0; } }
.lx-face h2 { font-size: clamp(1.45rem, 5.5vw, 2.1rem); font-weight: 900; }
.lx-face .lx-sub { color: #c0c8d2; }
.lx-scan { position: relative; width: 150px; height: 150px; display: grid; place-items: center; color: #3ee8a6; }
.lx-scan > .i { width: 96px; height: 96px; stroke-width: 1.3; filter: drop-shadow(0 0 12px rgba(62, 232, 166, .55)); }
.lx-scan-ring { position: absolute; inset: 0; border-radius: 40px; border: 1.5px solid rgba(62, 232, 166, .35);
  animation: scan-ring 3.2s ease-in-out infinite; }
.lx-scan-line { position: absolute; inset-inline: 22px; top: 22px; height: 2px; border-radius: 2px; background: #3ee8a6;
  box-shadow: 0 0 14px 3px rgba(62, 232, 166, .7); animation: scan-line 3.2s ease-in-out infinite; }
.lx-scan-ok { position: absolute; bottom: -6px; inset-inline-end: -6px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: var(--on-accent); box-shadow: 0 8px 22px rgba(62, 232, 166, .45); animation: scan-ok 3.2s ease-in-out infinite; }
.lx-scan-ok .i { width: 20px; height: 20px; }
@keyframes scan-line { 0%, 100% { top: 22px; opacity: 0; } 10%, 55% { opacity: 1; } 60% { top: calc(100% - 24px); opacity: 0; } }
@keyframes scan-ring { 0%, 55% { transform: scale(1); opacity: .6; } 70% { transform: scale(1.08); opacity: 1; border-color: #3ee8a6; } 100% { transform: scale(1); opacity: .6; } }
@keyframes scan-ok { 0%, 58% { transform: scale(0); } 68% { transform: scale(1.15); } 75%, 92% { transform: scale(1); } 100% { transform: scale(0); } }
.lx-face-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (min-width: 880px) { .lx-face-points { justify-content: flex-start; } }
.lx-face-points li { padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #3ee8a6;
  background: rgba(62, 232, 166, .1); border: 1px solid rgba(62, 232, 166, .25); }
.lx-face-points li::before { content: "✓ "; }

/* همه دستگاه‌ها */
.lx-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lx-app { display: flex; flex-direction: column; }
.lx-app p:not(.lx-h) { flex: 1; }
.lx-app .btn { margin-top: 12px; align-self: flex-start; gap: 6px; }
.lx-app-actions { display: flex; flex-wrap: wrap; gap: 0 8px; }
.install-stores { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 12px; }
@media (max-width: 420px) { .lx-hide-sm { display: none; } }

.lx-faq { margin-bottom: 8px; max-width: 760px; margin-inline: auto; }
.lx-faq p { color: var(--text-2); line-height: 1.95; padding-top: 8px; }
.lx-final { margin: 80px auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lx-final img { border-radius: 22px; box-shadow: 0 18px 50px var(--accent-glow); animation: hover 6s ease-in-out infinite; }
.lx-final .lx-final-title { margin: 0; line-height: 1.5; font-size: clamp(1.4rem, 6vw, 2.2rem); font-weight: 900; }
.lx-final .btn { min-width: 200px; min-height: 54px; }
.lx-footer { text-align: center; color: var(--muted); font-size: .75rem; padding: 40px 16px calc(var(--safe-b) + 24px); }

/* ظاهر شدن هنگام اسکرول */
.lx.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.lx.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .lx *, .lx *::before { animation: none !important; transition: none !important; }
  .lx.js [data-reveal] { opacity: 1; transform: none; }
  .lx-line .lx-stroke { stroke-dashoffset: 0; } .lx-line .lx-area { opacity: 1; }
}

/* صفحه معرفی روی دسکتاپ پس‌زمینه ساده دارد. body نباید ظرف اسکرول شود (overflow جز visible):
   با overscroll-behavior: none، اسکرول ترک‌پد و موس مک روی body قفل می‌شد و صفحه پایین نمی‌رفت. */
@media (min-width: 700px) {
  body.site { display: block; background: var(--bg); }
}

/* =====================================================================
   طراحی دوم «وزیر»: سلسله‌مراتب روشن، سطح‌های تخت و آرام، عدد درشت بی‌شکست
   (این لایه روی قبلی می‌نشیند؛ ترتیب فایل مهم است)
   ===================================================================== */
:root {
  --bg: #0a0c10;
  --surface: #12161c;
  --surface-2: #191e26;
  --surface-3: #232a34;
  --hairline: rgba(255, 255, 255, .06);
  --radius: 22px;
  --shadow: none;
}
:root[data-theme="light"] {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f2f4f6;
  --surface-3: #e7eaee;
  --hairline: rgba(10, 20, 30, .07);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
}
body { font-size: 15px; letter-spacing: -.005em; }
.page { gap: 16px; padding-top: 8px; }

/* عنوان صفحه و بخش‌ها */
.appbar h1 { font-size: 1.75rem; font-weight: 900; letter-spacing: -.025em; }
.section-title { font-size: .95rem; font-weight: 800; color: var(--text); letter-spacing: -.01em; margin: 10px 4px -4px; }

/* سطح‌ها: تخت، بدون گرادیان و سایه سنگین */
.card, .list { background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.card { padding: 18px; }
.bubble { width: 40px; height: 40px; border-radius: 13px; }
.bubble .i { width: 20px; height: 20px; }

/* عدد و واحد: عدد پررنگ، واحد کوچک و کم‌رنگ، هرگز دو خط */
.amt { white-space: nowrap; font-weight: 800; }
.amt small { font-size: .62em; font-weight: 600; opacity: .55; margin-inline-start: .28em; }
.pos { color: var(--good); } .neg { color: var(--bad); }

/* ---------- قهرمان صفحه اصلی ---------- */
.hero.hx { padding: 20px 20px 16px; gap: 6px; border-radius: 28px; }
.hero.hx .hero-value { font-size: 2.7rem; margin-top: 6px; line-height: 1.2; }
.hero.hx .hero-value .amt small { font-size: .4em; opacity: .7; }
.hero-meta { display: flex; align-items: center; gap: 8px; min-height: 26px; flex-wrap: wrap; }
.hero.hx .spark { height: 48px; margin: 4px 0 0; }
.hero-mix { display: flex; gap: 3px; height: 6px; margin: 14px 0 2px; }
.hero-mix span { width: var(--w); min-width: 6px; border-radius: 3px; background: var(--c, var(--accent)); }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.hero-split a { display: flex; flex-direction: column; gap: 2px; color: #fff; padding-inline-end: 12px; }
.hero-split a + a { padding-inline: 14px 0; border-inline-start: 1px solid rgba(255, 255, 255, .08); }
.hero-split small { font-size: .74rem; color: rgba(255, 255, 255, .6); font-weight: 600; }
.hero-split strong { font-size: 1.3rem; }

/* اقدام‌های سریع: چهار دکمه گرد زیر قهرمان، مثل اپ‌های بانکی */
.qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 2px; }
.qa-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); font-size: .78rem; font-weight: 700;
  transition: transform .2s var(--spring); }
.qa-btn:active { transform: scale(.92); }
.qa-ic { width: 56px; height: 56px; border-radius: 20px; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--hairline); color: var(--accent); box-shadow: var(--shadow); }
.qa-ic .i { width: 24px; height: 24px; }
.qa-ai .qa-ic { background: linear-gradient(145deg, #0f3a2b, #08130f); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 8px 24px var(--accent-glow); }
.qa-ai .qa-ic img { width: 34px; height: 34px; border-radius: 10px; }
.qa-ai { color: var(--text); }

/* پنل‌های صفحه اصلی */
.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 16px 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { font-size: 1rem; font-weight: 800; }
.panel-head a { font-size: .8rem; font-weight: 700; }
.month-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.month-split a { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); color: var(--text); }
.month-split small, .flow-grid small, .sum-card small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.month-split strong { font-size: 1.35rem; }
.cat-bars.slim { gap: 10px; }
.cat-bars.slim .cat-track { height: 6px; }
.flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-bottom: 14px; }
.flow-grid > * { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.flow-grid strong { font-size: 1.05rem; }
.flow-grid .free strong { font-size: 1.05rem; }
.mix-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mix-list a { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 9px 0; color: var(--text); font-size: .9rem; }
.mix-list li + li a { border-top: 1px solid var(--hairline); }
.mix-pct { color: var(--muted); font-size: .8rem; min-width: 34px; text-align: left; }
.mix-value { min-width: 96px; text-align: left; }

/* قیمت‌های من: ردیف فشرده و افقی */
.watch-head h2 { font-size: .95rem; font-weight: 800; }
.watch-card, a.watch-card { min-width: 124px; padding: 10px 12px; border-radius: 16px; gap: 2px; background: var(--surface); border-color: var(--hairline); box-shadow: var(--shadow); }
.watch-card strong { font-size: .98rem; }
.watch-card strong .amt small { font-size: .6em; }
.watch-label { font-size: .72rem; }
.watch-change { font-size: .72rem; }

/* کارت جمع صفحه‌های فهرست */
.summary, .sum-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 24px; background:
  radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.summary strong, .sum-card strong { font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.25; }
.summary.two, .sum-card.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sum-card.two > div { display: flex; flex-direction: column; gap: 2px; }
.sum-card.two > div + div { border-inline-start: 1px solid var(--hairline); padding-inline-start: 14px; }
.sum-card.two strong { font-size: 1.35rem; }
.sum-card .hero-mix span { background: var(--c); }
.mix-chips { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: .76rem; color: var(--muted); font-weight: 600; }
.mix-chips span { display: inline-flex; align-items: center; gap: 5px; }
.mix-chips .dot { width: 8px; height: 8px; }

/* فهرست گروه‌بندی‌شده: یک کارت، برچسب گروه داخلش */
.list.grouped { padding: 4px 0; }
.list-label { padding: 12px 16px 2px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.list-label + .row { border-top: 0 !important; }
.row { min-height: 66px; padding: 10px 16px; gap: 12px; }
.row + .row { border-top-color: var(--hairline); }
.row-title { font-size: .95rem; font-weight: 700; }
.row-sub { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row-end strong { font-size: .98rem; }
.row-share { font-size: .7rem; color: var(--muted); font-weight: 600; }

/* بدهی‌ها: مبلغ کنار نام، نوار پیشرفت تمام‌عرض */
.row.debt { align-items: flex-start; padding-block: 14px; }
.row.debt .row-main { gap: 4px; }
.debt-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.debt-line strong { font-size: 1rem; white-space: nowrap; }
.debt-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin: 6px 0 2px; }
.debt-progress .progress { height: 7px; margin: 0; width: 100%; }
.debt-count { font-size: .72rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.amt-inline { color: var(--text-2); }

/* دکمه افزودن: گرد و جمع‌وجور بالای نوار پایین */
.fab { width: 56px; height: 56px; border-radius: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 26px); }

/* نوار پایین: کمی بلندتر و آرام‌تر */
.tabbar { border-radius: 26px; }
.tabbar a { font-size: .68rem; font-weight: 700; }

/* انتخاب ظاهر: سگمنت جمع‌وجور به‌جای سه کاشی بزرگ */
.theme-pick { padding: 6px; gap: 4px; }
.theme-pick button { flex-direction: row; justify-content: center; gap: 8px; padding: 10px 8px; min-height: 0; border-radius: 14px; font-size: .85rem; }
.theme-pick .theme-swatch { width: 16px; height: 16px; border-radius: 50%; flex: none; }

/* صفحه اصلی در حالت روشن: قهرمان تیره می‌ماند */
:root[data-theme="light"] .qa-ai .qa-ic { background: linear-gradient(145deg, #0f3a2b, #0a1a14); }

/* بازار: فهرست قیمت مثل اپ بورس؛ ثبت دستی فقط در حالت ویرایش */
.appbar-inner { justify-content: space-between; gap: 12px; }
.appbar-action { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .85rem; }
.appbar-action .i { width: 16px; height: 16px; }
.market-row { min-height: 62px; }
.market-row .row-end strong { font-size: 1rem; }
.chg { display: inline-block; min-width: 58px; text-align: center; padding: 2px 8px; border-radius: 8px;
  font-size: .74rem; font-weight: 800; direction: ltr; }
.chg.up { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.chg.down { color: var(--bad); background: var(--bad-soft); }
.chg.flat { color: var(--muted); background: var(--surface-2); font-weight: 600; direction: rtl; }
.other-prices .list.flat { background: none; border: 0; box-shadow: none; }

/* =====================================================================
   طراحی سوم: عدد سبک‌تر، نوار پایین با «وزیر» در مرکز
   ===================================================================== */
/* عددها ۷۰۰ به‌جای ۹۰۰: خواناتر و ظریف‌تر؛ عنوان‌ها ۸۰۰ */
.amt, .hero-value, .hero.hx .hero-value, .summary strong, .sum-card strong, .row-end strong, .month-split strong,
.flow-grid strong, .hero-split strong, .watch-card strong, .mix-value, .debt-line strong, .pc-now strong,
.market-row .row-end strong, .tstat b, .chart-nums b { font-weight: 700; letter-spacing: -.01em; }
.hero.hx .hero-value { font-size: 2.55rem; letter-spacing: -.02em; }
.amt small, .hero-value small { font-weight: 500; }
.appbar h1 { font-weight: 800; }
.panel-head h2, .section-title, .card-head h2 { font-weight: 800; }
.row-title { font-weight: 600; }

/* نوار پایین: آیکون در قرص روشن برای تب فعال، «وزیر» گرد و درخشان در مرکز */
.tabbar { height: 70px; padding: 0 8px; align-items: center; border-radius: 28px; overflow: visible; }
.tabbar a { gap: 3px; font-size: .68rem; font-weight: 700; color: var(--muted); }
.tabbar a.on::after { display: none; }
.tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; transition: background .25s var(--ease); }
.tabbar a .tab-ic .i { width: 22px; height: 22px; }
.tabbar a.on .tab-ic { background: var(--accent-soft); }
.tabbar a.on .tab-ic .i { transform: none; filter: none; }
.tabbar a.on { color: var(--text); }
.tab-vazir { position: relative; }
.tab-vazir-orb { width: 54px; height: 54px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #134d38, #07120d 75%); border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 8px 24px var(--accent-glow), 0 0 0 5px var(--bg); transition: transform .25s var(--spring); }
.tab-vazir-orb img { width: 34px; height: 34px; border-radius: 10px; }
.tab-vazir:active .tab-vazir-orb { transform: scale(.92); }
.tab-vazir span:last-child { color: var(--accent); }
/* حلقه تپنده روی لایه جدا با opacity/transform (نه box-shadow که هر فریم دوباره کشیده می‌شود)، چند بار و بس */
.tab-vazir-orb::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 22px var(--accent-glow);
  opacity: 0; }
.tab-vazir-orb { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .tab-vazir-orb::after { animation: orb 4s ease-in-out 3; }
  @keyframes orb { 0%, 100% { opacity: 0; transform: scale(.9); } 50% { opacity: 1; transform: none; } }
}
/* زبانه‌های بالای صفحه: سه یا چهار گزینه در یک ردیف */
.seg a { font-size: .85rem; padding-inline: 4px; white-space: nowrap; }

/* =====================================================================
   نسخه دسکتاپ: نوار کناری به‌جای نوار پایین، محتوای پهن و دوستونه
   ===================================================================== */
.tabbar .side-brand { display: none; }
@media (min-width: 900px) {
  :root { --side-w: 236px; }
  .tabbar { inset: 16px 16px 16px auto; width: var(--side-w); height: auto; flex-direction: column; justify-content: flex-start;
    align-items: stretch; gap: 4px; padding: 18px 12px; border-radius: 28px; }
  .tabbar .side-brand { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px;
    padding: 4px 10px 18px; margin-bottom: 6px; color: var(--text); font-size: 1.3rem; font-weight: 900;
    border-bottom: 1px solid var(--hairline); border-radius: 0; background: none !important; }
  .side-brand img { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 0 18px var(--accent-glow); }
  .tabbar a { flex: none; max-width: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px;
    border-radius: 16px; font-size: .95rem; font-weight: 700; }
  .tabbar a:hover { background: var(--surface-2); color: var(--text); }
  .tabbar a.on { background: var(--accent-soft); color: var(--text); }
  .tabbar a.on .tab-ic, .tab-ic { width: auto; height: auto; background: none; }
  .tab-vazir-orb { width: 36px; height: 36px; margin: -4px 0; animation: none !important; box-shadow: 0 4px 14px var(--accent-glow); border-width: 1px; }
  .tab-vazir-orb img { width: 24px; height: 24px; border-radius: 7px; }
  .tabbar .tab-vazir { order: 9; margin-top: auto; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent); }
  .tab-vazir span:last-child { color: var(--text); }
  .appbar { margin-inline-start: calc(var(--side-w) + 32px); padding-top: 18px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* ستون محتوا وسط فضای کنار نوار کناری؛ عنوان و نشان «ویژه» هم‌لبه با محتوا */
  :root { --content-w: 880px; --wide-w: 1120px; --main-w: calc(100vw - var(--side-w) - 32px); }
  /* نوار بالا: قرص شیشه‌ای شناور هم‌عرض محتوا، تا متن زیرش هنگام اسکرول خوانا بماند */
  .appbar { padding: 12px 24px 0; view-transition-name: none; }  /* نام انتقال، بلور فرزند را از کار می‌اندازد */
  .appbar-inner { max-width: calc(var(--content-w) - 48px); margin-inline: auto; padding: 10px 20px; min-height: 64px;
    border-radius: 24px; border: 1px solid var(--glass-edge);
    background: linear-gradient(180deg, var(--glass-hi), transparent 60%), color-mix(in srgb, var(--surface) 72%, transparent);
    backdrop-filter: blur(28px) saturate(1.8); -webkit-backdrop-filter: blur(28px) saturate(1.8);
    box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px rgba(0, 0, 0, .08); }
  :root { --glass-edge: rgba(255, 255, 255, .09); --glass-hi: rgba(255, 255, 255, .06); }
  :root[data-theme="light"] { --glass-edge: rgba(255, 255, 255, .7); --glass-hi: rgba(255, 255, 255, .55); }
  .screen:has(.page-dashboard) .appbar-inner { max-width: calc(var(--wide-w) - 48px); }
  .page { margin-inline-start: calc(var(--side-w) + 32px); max-width: none; margin-inline-end: 0; padding: 8px 24px 64px; }
  .page > :not(.fab) { max-width: calc(var(--content-w) - 48px); width: 100%; margin-inline: auto; }
  .page-dashboard > :not(.fab) { max-width: calc(var(--wide-w) - 48px); }
  #live { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  #live > .hero, #live > .qa, #live > .notices, #live > .watch, #live > .persona-cta { grid-column: 1 / -1; }
  #live > .hero { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  #live > .hero > .hero-top, #live > .hero > .hero-value, #live > .hero > .hero-meta { grid-column: 1; }
  #live > .hero > .spark { grid-column: 2; grid-row: 1 / span 3; height: 120px; align-self: center; }
  #live > .hero > .hero-split { grid-column: 1 / -1; }
  #live > .sc-today, #live > .onb-resume, #live > .install-nudge { grid-column: 1 / -1; }
  .qa { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* میان‌برها روی دسکتاپ: کارت افقی به‌جای دکمه گرد */
  .qa { gap: 12px; }
  .qa .qa-btn, .qa > a { width: 100%; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px;
    border-radius: 20px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow);
    color: var(--text); font-size: .95rem; transition: transform .2s var(--spring), border-color .2s; }
  .qa .qa-btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); }
  .qa .qa-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); border: 0; box-shadow: none; color: var(--accent); }
  .qa .qa-ic .i { width: 22px; height: 22px; }
  .watch-scroll { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); overflow: visible; }
  .watch-scroll > .watch-card { min-width: 0; }
  a.watch-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); }
  .fab { bottom: 32px; left: max(24px, calc((var(--main-w) - var(--content-w)) / 2 - 64px)); }
  .screen:has(.page-dashboard) .fab { left: max(24px, calc((var(--main-w) - var(--wide-w)) / 2 - 64px)); }
  .sheet { inset: 0; margin: auto; max-width: 560px; max-height: 86dvh; border-radius: 28px; padding: 18px 20px 20px; }
  .sheet-grip { display: none; }
  .chat-composer, .chat-attach-preview { width: min(720px, calc(100% - 24px)); margin-inline: auto; }
  .chat-head { padding-inline: max(14px, calc((100% - 720px) / 2)); }
  .toast { left: calc((100% - var(--side-w) - 32px) / 2); }
  /* کارت وزیر ویژه پایین نوار کناری (جای نشان نوار بالا روی دسکتاپ) */
  .tabbar .side-premium { order: 8; margin-top: auto; display: flex !important; align-items: center; gap: 10px; padding: 12px !important;
    border-radius: 18px !important; color: #f5e9c8 !important; isolation: isolate; position: relative; overflow: hidden;
    background: radial-gradient(140% 140% at 90% 0%, #5b34b5, #1b1240 70%) !important; }
  .side-premium::before { content: ""; position: absolute; inset: -60%; z-index: -1; opacity: .25;
    background: repeating-conic-gradient(rgba(242,193,78,.6) 0 7deg, transparent 7deg 20deg); animation: pz-spin 22s linear infinite; }
  .side-premium img { width: 40px; height: 40px; flex: none; animation: pz-bob 2.2s ease-in-out infinite; }
  .side-premium b { display: block; color: #ffe08a; font-weight: 900; }
  .side-premium small { display: block !important; color: #d9cdf5; font-size: .75rem; font-weight: 600; }
  .side-premium + .tab-vazir, .tabbar .side-premium ~ .tab-vazir { margin-top: 8px; }
  .appbar .pz-chip { display: none; }
  /* فرم‌ها: فیلد مبلغ هم یک ستون، تا ردیف‌ها هم‌عرض بمانند */
  .fields { gap: 16px 20px; align-items: start; }
  .fields .field:has(input[data-money]) { grid-column: auto; }
  /* شخصیت‌های کنار مسیر دارالفنون نزدیک مسیر، نه لبه صفحه */
  .page .sc-cameo.left { left: max(0px, calc(50% - 280px)); }
  .page .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page .sc-cameo.right { right: max(0px, calc(50% - 280px)); }
}

/* صفحه نصب اپ */
.install { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-t) + 16px) 16px calc(var(--safe-b) + 32px);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.install-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.install h1 { font-size: 1.5rem; font-weight: 900; }
.install-done { color: var(--good); font-weight: 800; }
.install-card { width: 100%; text-align: right; padding: 18px; border-radius: 22px; background: var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; opacity: .75; }
.install-card.mine { opacity: 1; border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); box-shadow: 0 10px 30px var(--accent-soft); }
.install-card h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 800; }
.install-card h2 .i { width: 20px; height: 20px; color: var(--accent); }
.install-card ul { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); line-height: 1.95; font-size: .92rem; }
.install-card h2 .bubble { width: 34px; height: 34px; }
.privacy-contact { font-weight: 700; }
.lx-footer a { color: var(--text-2); }
.install-card ol { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); line-height: 1.9; font-size: .92rem; }

/* ورود با چهره */
.passkey-login { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.passkey-login .or { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: 10px; }
.passkey-login .or::before, .passkey-login .or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.passkey-login .btn .i, .passkey-card .btn .i { width: 20px; height: 20px; }
.passkey-card { align-items: center; text-align: center; gap: 12px; }
.passkey-card p { color: var(--text-2); line-height: 1.9; font-size: .92rem; }
.passkey-face { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.passkey-face .i { width: 34px; height: 34px; }

/* ---------- صفحه‌های عمومی قیمت (/price) ---------- */
.pub-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 880px; margin: 0 auto; padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.pub-brand { display: flex; align-items: center; gap: 8px; color: inherit; font-size: 1.15rem; font-weight: 900; }
.pub-brand img { border-radius: 9px; }
.pub-nav nav { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: .9rem; }
.pub-nav nav a:not(.btn) { color: var(--text-2); }
.pub { max-width: 880px; margin: 0 auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.pub h1 { font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 900; letter-spacing: -.02em; }
.pub-crumbs { font-size: .8rem; color: var(--muted); }
.pub-crumbs a { color: var(--muted); }
.pub-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pub-hero p { width: 100%; }
.pub-price { font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 900; }
.pub-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800;
  background: var(--surface-2); color: var(--text-2); }
.pub-chip.up { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.pub-chip.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pub-card { padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.pub-card h2, .pub-h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; }
.pub-h2 { margin: 8px 0 0; }
.pub-chart { display: block; width: 100%; height: 200px; overflow: visible; }
.pub-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pub-area { fill: var(--accent-soft); }
.pub-range { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: .85rem; color: var(--text-2); }
.pub-changes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pub-changes div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.pub-changes small { color: var(--muted); font-size: .75rem; }
.pub-changes b { font-size: 1rem; }
.pub-changes b.up { color: var(--good); } .pub-changes b.down { color: var(--bad); }
.pub-bubble { margin-top: 10px; font-size: .9rem; }
.pub-story p { color: var(--text-2); line-height: 2.1; }
.pub-cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 18px; border-radius: 26px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.pub-cta h2 { font-size: 1.2rem; font-weight: 900; }
.pub-cta p { color: var(--text-2); line-height: 2; max-width: 520px; }
.pub-cta .btn { min-width: 180px; margin-top: 4px; }
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-links a { padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--hairline); color: var(--text); font-size: .85rem; font-weight: 700; }
.pub-table { list-style: none; margin: 0; padding: 0; }
.pub-table li + li { border-top: 1px solid var(--hairline); }
.pub-table a { display: grid; grid-template-columns: auto minmax(0, 1fr) 76px; align-items: center; gap: 10px; padding: 12px 2px; color: var(--text); }
.pub-name { font-weight: 800; white-space: nowrap; }
.pub-val { font-weight: 800; font-variant-numeric: tabular-nums; text-align: left; font-size: .92rem; white-space: nowrap; }
.pub-table .pub-chip { justify-content: center; }
.pub-note { line-height: 1.9; }
a.lx-tick { color: inherit; text-decoration: none; }
.pub-lead { line-height: 2; }
.pub-tool .form { display: flex; flex-direction: column; gap: 10px; }
.pub-tool .sticky-actions { position: static; padding: 0; background: none; }
.pub-result { display: flex; flex-direction: column; gap: 12px; }
/* ---------- آموزش (/learn) ---------- */
.learn-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.learn-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--hairline); color: var(--text); transition: border-color .2s, transform .2s; }
.learn-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); transform: translateY(-2px); }
.learn-card h2 { font-size: 1.02rem; font-weight: 800; line-height: 1.7; }
.learn-card p { color: var(--text-2); font-size: .88rem; line-height: 1.9; }
.learn-card small { color: var(--muted); }
.learn-body { max-width: 680px; }
.learn-body h1 { margin-bottom: 6px; }
.learn-body h2 { font-size: 1.25rem; font-weight: 900; margin: 26px 0 8px; }
.learn-body h3 { font-size: 1.05rem; font-weight: 800; margin: 18px 0 6px; }
.learn-body p, .learn-body li { line-height: 2.1; color: var(--text-2); font-size: 1rem; }
.learn-body p { margin: 0 0 10px; }
.learn-body ul, .learn-body ol { padding-inline-start: 22px; margin: 0 0 12px; }
.learn-body strong { color: var(--text); }
.learn-body blockquote { margin: 12px 0; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft);
  border-inline-start: 4px solid var(--accent); color: var(--text); font-weight: 700; line-height: 2; }
@media (max-width: 420px) { .pub-hide-sm { display: none; } }
.pub .lx-faq { width: 100%; max-width: none; margin-inline: 0; }
/* ---------- دنگ ---------- */
.text-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.text-btn.danger { color: var(--bad); font-weight: 700; font-size: .88rem; }
.dong-delete { display: flex; justify-content: center; margin: 8px 0 24px; }
.dong-balances, .dong-transfers, .dong-who { list-style: none; margin: 0; padding: 0; }
.dong-balances li, .dong-transfers li { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.dong-balances li + li, .dong-transfers li + li { border-top: 1px solid var(--hairline); }
.dong-balances li > span, .dong-transfers li > span { flex: 1; font-weight: 700; }
.dong-balances small { color: var(--muted); font-size: .75rem; min-width: 52px; text-align: left; }
.dong-transfers form { margin: 0; }
.dong-who li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.dong-exact { display: none; max-width: 150px; }
.dong-form:has(input[name=mode][value=exact]:checked) .dong-exact { display: block; }
.dong-form:has(input[name=mode][value=exact]:checked) .dong-who .switch { pointer-events: none; opacity: .5; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.dong-public-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.dong-public-list li div { display: flex; flex-direction: column; }
/* صفحه معرفی: ابزارها و آموزش */
.lx-tools, .lx-learn { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lx-tool, .lx-article { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.lx-tool p, .lx-article p { flex: 1; }
.lx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lx-chips span { padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.lx-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-weight: 800; color: var(--accent); font-size: .88rem; }
.lx-more .i { width: 16px; height: 16px; }
.lx-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.lx-quick a { padding: 7px 12px; border-radius: 12px; border: 1px solid var(--hairline); background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--text-2); font-size: .8rem; font-weight: 700; text-decoration: none; }
.lx-article small { color: var(--accent); font-weight: 800; font-size: .75rem; }
.lx-article h3 { line-height: 1.7; }
.lx-center { text-align: center; margin-top: 16px; }
/* صفحه معرفی: دارالفنون */
.lx-school { display: grid; gap: 24px; align-items: center; }
@media (min-width: 880px) { .lx-school { grid-template-columns: 1.2fr 1fr; } .lx-school-topics { grid-column: 1 / -1; } }
.lx-school-text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.lx-school-text h2, .lx-school-text .lx-sub { text-align: right; margin-inline: 0; }
@media (max-width: 640px) { .lx-hide-md { display: none; } }
/* یک کار اصلی در صفحه معرفی؛ ورود یک خط کوچک */
.lx-have { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.lx-have a { font-weight: 800; color: var(--accent); }
/* پیشنهاد نصب بعد از ثبت‌نام */
.install-nudge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 20px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.install-nudge[hidden] { display: none; }
.install-nudge-text { flex: 1; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.install-nudge-text strong { font-size: .92rem; }
.install-nudge-text strong[hidden] { display: none; }
.install-nudge-text small { color: var(--text-2); font-size: .78rem; }
/* خوش‌آمد داخل اپ */
.welcome-app { gap: 12px; }
.welcome-points { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 10px; text-align: right; }
.welcome-points li { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: .92rem; }

/* راهنمای Shortcuts آیفون در صفحه پیامک */
.sms-ios summary { display: flex; align-items: center; gap: 8px; }
.copy-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; margin-bottom: 10px; }
.copy-field .label { grid-column: 1 / -1; margin: 0; }
.copy-field code { min-width: 0; word-break: break-all; text-align: left; padding: 8px; background: var(--surface-2); border-radius: 8px; font-size: .8rem; }
.ios-steps li { line-height: 1.9; }
.ios-label { direction: ltr; unicode-bidi: isolate; font-weight: 700; color: var(--text); background: var(--surface-2); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.ios-test { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text); }
.setup .btn.wide { margin: 4px 0 12px; }
.sms-manual { margin: 8px 0 12px; border-top: 1px solid var(--border, var(--surface-2)); padding-top: 10px; }
.sms-manual summary { cursor: pointer; font-size: .86rem; color: var(--text-2); margin-bottom: 8px; }
.ios-video { display: block; width: 62%; max-width: 240px; margin: 0 auto 12px; border-radius: 18px; background: #070f0c; aspect-ratio: 9 / 16; }

/* پنل مدیریت کاربران */
.admin-note { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.admin-note .i { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 720px) { .admin-stats { grid-template-columns: repeat(4, 1fr); } }
.admin-stat { background: var(--surface); border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.admin-stat-n { font-size: 1.3rem; line-height: 1.4; font-weight: 900; color: var(--text); }
.admin-stat-l { font-size: .8rem; color: var(--muted); }
.admin-stat.lead-stat .admin-stat-n { color: var(--accent); }
.admin-chart h2 { font-size: .95rem; margin-bottom: 12px; }
.admin-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; direction: ltr; border-bottom: 1px solid var(--line, var(--surface-2)); }
.admin-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; outline: none; }
.admin-bar i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; }
.admin-bar:hover i, .admin-bar:focus i { opacity: 1; box-shadow: 0 0 0 2px var(--accent-soft); }
.admin-axis { display: flex; justify-content: space-between; margin-top: 6px; direction: ltr; }
.admin-search { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-search input { flex: 1; min-width: 0; background: var(--surface); border-color: var(--surface-2); }
.admin-row .row-sub { white-space: normal; }
.admin-row .row-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: flex-start; }
.admin-delete summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer; }
.admin-delete summary::-webkit-details-marker { display: none; }
.admin-delete[open] { flex-basis: 100%; }
.admin-delete .form { margin-top: 8px; display: grid; gap: 8px; }
.admin-pages { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0; }

/* مصاحبه پرسونا: جوابی که وزیر از داده‌های کاربر حدس زده */
.q-inferred { display: flex; align-items: center; gap: 6px; margin: -2px 0 8px; font-size: .78rem; color: var(--accent); }
.q-inferred .i { width: 14px; height: 14px; }

/* راه‌اندازی اولیه (/start) */
.onb { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.onb-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 12px;
            background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.onb-head img { border-radius: 10px; flex: none; }
.onb-progress { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.onb-progress span { display: block; height: 100%; width: var(--p); background: var(--grad); border-radius: 3px; transition: width .4s; }
.onb-skip { font-size: .8rem; white-space: nowrap; }
.onb-body { width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); }
.onb-body h1 { font-size: 1.6rem; font-weight: 900; margin: 4px 0 8px; line-height: 1.4; }
.onb-body > p.muted { line-height: 1.9; margin-bottom: 18px; }
.onb-step { margin-top: 8px; }
.onb-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.onb-choice { position: relative; }
.onb-choice input { position: absolute; opacity: 0; inset: 0; }
.onb-choice span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 12px 6px;
                   border-radius: 18px; background: var(--surface); border: 2px solid transparent; text-align: center; cursor: pointer;
                   transition: border-color .15s, background .15s, transform .15s; }
.onb-choice .i { width: 28px; height: 28px; color: var(--muted); }
.onb-choice b { font-size: .86rem; font-weight: 700; }
.onb-choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.onb-choice input:checked + span .i { color: var(--accent); }
.onb-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.onb-choice input:active + span { transform: scale(.97); }
.onb-group { background: var(--surface); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.onb-group h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 10px; }
.onb-group h2 .i { width: 20px; height: 20px; color: var(--accent); }
.onb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 10px; }
.onb-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .9rem; }
.onb-check input { width: 20px; height: 20px; min-height: 0; }
.onb-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
.onb-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 18px; }
.onb-summary > div { background: var(--surface); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.onb-summary strong { font-size: 1.3rem; font-weight: 900; }
.onb-summary strong.up { color: var(--good, var(--accent)); }
.onb-summary strong.down { color: var(--bad); }
.onb-sms { display: grid; gap: 10px; }
.onb-sms p { display: flex; gap: 6px; align-items: flex-start; }
.onb-sms .i { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.onb-cards { display: flex; justify-content: center; margin: 24px 0 8px; }
.onb-cards .avatar { width: 72px; height: 72px; margin: 0 -10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.onb-cards .avatar:nth-child(2) { transform: translateY(-10px) scale(1.12); z-index: 1; }
.onb-resume { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 14px; border-radius: 20px; text-decoration: none; color: inherit;
              background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface); border: 1.5px solid var(--accent-soft); }
.onb-resume-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.onb-resume-text small { color: var(--muted); line-height: 1.7; }

/* راه‌اندازی با گفتگوی وزیر */
.setup-skip { font-size: .85rem; margin-inline-start: auto; }
.setup-form-link { display: block; text-align: center; margin-top: 12px; font-size: .86rem; }
.setup-card { display: grid; gap: 10px; width: min(100%, 340px); padding: 16px; border-radius: 20px; background: var(--surface);
              border: 1.5px solid var(--accent-soft); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.setup-card strong { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.setup-card strong .i { width: 20px; height: 20px; color: var(--accent); }
.setup-card p { margin: 0; line-height: 1.8; }
.setup-card p.small { display: flex; gap: 6px; align-items: flex-start; }
.setup-card p.small .i { flex: none; width: 15px; height: 15px; margin-top: 3px; }
.setup-card .text-btn { justify-self: center; }
.setup-card-avatars { display: flex; justify-content: center; margin: 4px 0; }
.setup-card-avatars .avatar { width: 56px; height: 56px; margin: 0 -8px; }
.setup-card-avatars .avatar:nth-child(2) { transform: translateY(-6px) scale(1.1); z-index: 1; }
.setup-next { display: grid; gap: 6px; justify-items: center; margin: 4px 0 18px; text-align: center; }

/* جایزه اینستاگرام (/gift) */
.gift-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.gift-steps li { display: flex; align-items: center; gap: 12px; line-height: 1.8; }
.gift-steps .bubble { flex: none; width: 38px; height: 38px; }
.gift-form { display: flex; flex-direction: column; gap: 8px; }
.gift-form label { font-weight: 800; }
.gift-form input { text-align: left; }
.admin-gift { margin-bottom: 16px; }
.admin-gift summary h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.admin-gift-list { margin: 12px 0 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.admin-gift-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.admin-gift-list a { font-weight: 800; }

/* تورم رسمی مرکز آمار (تنظیمات و پنل مدیریت) */
.inflation-card h2, .admin-cpi h2 { font-size: .95rem; margin-bottom: 12px; }
.inflation-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.inflation-rate { background: var(--surface); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.inflation-rate strong { font-size: 1.2rem; line-height: 1.4; font-weight: 900; color: var(--text); }
.inflation-rate.lead-rate strong { color: var(--accent); }
@media (max-width: 380px) { .inflation-rates { grid-template-columns: 1fr; } }
.admin-cpi p { margin-bottom: 6px; }

/* =====================================================================
   مدرسه وزیر: نقشه مسیر، درس کارت‌به‌کارت، برگه بازخورد، جشن پایان
   (ظاهر و حرکت از store/learn/learn-prototype.html، با توکن‌های اپ)
   ===================================================================== */
:root { --sc-gold: #f5c76a; --sc-gold-deep: #a8761c; --sc-accent-deep: #179b68; --sc-bad: #ff7a6b;
  --sc-bad-deep: #a8392d; --sc-ink: #2b1d05; --sc-lift: #07120d; }
:root[data-theme="light"] { --sc-lift: #c9d3cf; --sc-gold-deep: #c28e2c; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }

/* شخصیت (دینار) */
.mascot { display: inline-block; flex: none; line-height: 0; }
@keyframes sc-idle { 50% { transform: translateY(-3px) scaleY(1.012); } }
@keyframes sc-hop { from { transform: translateY(0) scaleY(.975); } to { transform: translateY(-14px) scaleY(1.02); } }
@keyframes sc-sag { 50% { transform: translateY(3px) scaleY(.985); } }

/* قرص‌های زنجیره و امتیاز، نوار هفته */
.sc-pills { display: flex; gap: 8px; }
.sc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800;
  font-size: .9rem; background: var(--surface-2); border: 1px solid var(--hairline); }
.sc-pill.fire { color: var(--sc-gold); }
.sc-pill.xp { color: var(--accent); }
.flame { display: inline-block; transform-origin: 50% 90%; }
@media (prefers-reduced-motion: no-preference) { .flame { animation: sc-flicker 1.6s ease-in-out infinite; } }
@keyframes sc-flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }
.sc-week { display: flex; justify-content: space-between; gap: 6px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--hairline); }
.sc-week div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); }
.sc-week i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: .9rem; background: var(--surface-2); }
.sc-week .done i { background: linear-gradient(150deg, var(--sc-gold), #ffb347); color: var(--sc-ink); box-shadow: 0 0 18px rgba(245, 199, 106, .45); }
.sc-week .frozen i { background: #5ac8fa33; color: #5ac8fa; }
.sc-week .today i { box-shadow: inset 0 0 0 2px var(--sc-gold); }
.sc-week .done, .sc-week .today, .sc-week .frozen { color: var(--text-2); }
.sc-freeze { margin: -6px 4px 0; }

/* نقشه مسیر (سبک دولینگو): گره‌های سه‌بعدی زیگزاگ به رنگ تاپیک، کارت کوچک با زدن گره */
.sc-world { --u: var(--accent); --u-deep: var(--sc-accent-deep); --u-soft: rgba(62, 232, 166, .18); }  /* همه تاپیک‌ها سبز وزیر */
.sc-station { scroll-margin-top: 80px; }
.sc-station + .sc-station { margin-top: 18px; }
.sc-unit { border-radius: 18px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; background: var(--u-deep); color: #f2fff8; box-shadow: 0 5px 0 #0a3d29; }
.sc-unit small { display: block; font-size: .78rem; opacity: .9; font-weight: 700; }
.sc-unit b { font-size: 1.15rem; font-weight: 900; }
.sc-count { font-size: .85rem; font-weight: 800; background: rgba(0, 0, 0, .18); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.sc-trail { --row-h: 112px; position: relative; padding: 40px 0 8px; }
.sc-row { position: relative; height: var(--row-h); display: flex; justify-content: center; align-items: center; }
.sc-node { position: relative; width: 72px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  border: 0; padding: 0; font: inherit; font-size: 1.75rem; font-weight: 900; color: var(--on-accent); cursor: pointer;
  background: var(--u); box-shadow: 0 8px 0 var(--u-deep); transform: translate(var(--x), 0);
  transition: transform .12s ease, box-shadow .12s ease; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) { .sc-node, .sc-chest { animation: sc-pop .45s var(--d, 0ms) var(--spring) both; } }
@keyframes sc-pop { from { opacity: 0; scale: .6; } }
.sc-node:active { transform: translate(var(--x), 6px); box-shadow: 0 2px 0 var(--u-deep); }
.sc-node:focus-visible { outline: 3px solid var(--u); outline-offset: 6px; }
.sc-node.done span { font-size: 2rem; }
.sc-node.open { background: var(--surface-3); box-shadow: 0 8px 0 var(--sc-lift), inset 0 0 0 4px var(--u); }
.sc-node.lock { background: var(--surface-3); box-shadow: 0 8px 0 var(--sc-lift); }
.sc-node.lock span { filter: grayscale(1); opacity: .6; }
.sc-node.now::before { content: ""; position: absolute; inset: -11px -11px -17px; border-radius: 50%;
  border: 6px solid var(--u-soft); }
.sc-node.story { border-radius: 24px; }
.sc-node.story.now::before { border-radius: 32px; }
.sc-tip { position: absolute; bottom: calc(50% + 40px); left: 50%; translate: calc(-50% + var(--x)) 0; z-index: 3;
  padding: 7px 14px; border-radius: 12px; font-weight: 900; font-size: .9rem; white-space: nowrap; pointer-events: none;
  background: var(--surface); color: var(--u); border: 2px solid var(--hairline); box-shadow: 0 3px 0 var(--hairline); }
.sc-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -7px; border: 7px solid transparent;
  border-bottom: 0; border-top-color: var(--surface); }
@media (prefers-reduced-motion: no-preference) { .sc-tip { animation: sc-float 1.6s ease-in-out infinite; } }
@keyframes sc-float { 50% { transform: translateY(-5px); } }
.sc-row.open .sc-tip { display: none; }
/* کارت کوچک گره */
.sc-pop { display: none; position: absolute; top: calc(50% + 46px); left: 50%; translate: -50% 0; z-index: 6;
  width: min(300px, 92%); padding: 16px; border-radius: 18px; background: var(--u-deep); color: #f2fff8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.sc-pop::before { content: ""; position: absolute; bottom: 100%; left: calc(50% + var(--x)); margin-left: -9px;
  border: 9px solid transparent; border-top: 0; border-bottom-color: var(--u-deep); }
.sc-row.open .sc-pop { display: block; }
@media (prefers-reduced-motion: no-preference) { .sc-row.open .sc-pop { animation: sc-pop-in .22s var(--spring) both; } }
@keyframes sc-pop-in { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
.sc-pop b { display: block; font-size: 1.05rem; font-weight: 900; }
.sc-pop p { margin: 4px 0 0; font-size: .88rem; line-height: 1.8; opacity: .92; }
.sc-pop-go { display: block; margin-top: 12px; padding: 12px; border-radius: 14px; text-align: center; font-weight: 900;
  background: #fff; color: var(--u-deep); box-shadow: 0 4px 0 rgba(0, 0, 0, .18); text-decoration: none; }
.sc-pop-go:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.sc-pop.lock { background: var(--surface-2); color: var(--text); }
.sc-pop.lock::before { border-bottom-color: var(--surface-2); }
.sc-pop-lock { font-weight: 700; }
.sc-row:has(.sc-pop) { z-index: 1; }
.sc-row.open { z-index: 7; }
/* صندوقچه‌ها: بدون دایره، فقط خود صندوقچه */
.sc-chest-form { margin: 0; display: contents; }
.sc-chest { display: grid; place-items: center; width: 80px; height: 72px; border: 0; padding: 0; background: none;
  font-size: 3rem; line-height: 1; transform: translate(var(--x), 0); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .18)); }
.sc-chest.lock { filter: grayscale(1) drop-shadow(0 6px 0 rgba(0, 0, 0, .12)); opacity: .6; }
.sc-chest.done span { opacity: .85; }
.sc-chest.ready { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .sc-chest.ready span { display: inline-block; animation: sc-wiggle 1.8s ease-in-out infinite; } }
@keyframes sc-wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-10deg) scale(1.08); } 80% { transform: rotate(10deg) scale(1.08); } 90% { transform: rotate(-5deg); } }
.sc-chest.end { font-size: 2.6rem; }
/* شخصیت بزرگ کنار مسیر */
.sc-cameo { position: absolute; top: calc(40px + var(--row) * var(--row-h) - 30px); width: 124px; pointer-events: none; }
.sc-cameo.left { left: 0; }
.sc-cameo.right { right: 0; }
.sc-cameo .mascot { width: 100%; }
.sc-cameo .mascot img { width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) { .sc-cameo { animation: sc-pop .5s .25s var(--spring) both; } }
/* داستان: صحنه گفت‌وگو و جمله اول درس */
.sc-scene-title { margin: 0 0 12px; font-weight: 900; color: var(--accent); font-size: .9rem; }
.sc-scene { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.sc-line { display: flex; align-items: flex-end; gap: 8px; }
.sc-line[hidden] { display: none; }  /* display:flex نباید hidden را بی‌اثر کند */
.sc-line.typing .sc-line-bubble p { display: none; }
.sc-line.typing .sc-line-bubble::after { content: ""; display: block; width: 34px; height: 10px; margin-top: 6px;
  background: radial-gradient(circle 4px, var(--muted) 98%, transparent) 0 50% / 12px 10px repeat-x; }
@media (prefers-reduced-motion: no-preference) {
  .sc-line.typing .sc-line-bubble::after { animation: sc-typing .8s steps(3) infinite; }
}
@keyframes sc-typing { from { width: 10px; } to { width: 34px; } }
.sc-line.me { flex-direction: row-reverse; }
.sc-line-who { width: 66px; }
.sc-line-who img { width: 100%; height: auto; }
.sc-line-bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--surface);
  border: 1px solid var(--hairline); }
.sc-line.me .sc-line-bubble { border-radius: 18px 18px 4px 18px; background: rgba(245, 199, 106, .12); border-color: rgba(245, 199, 106, .3); }
.sc-line-bubble b { display: block; font-size: .74rem; color: var(--accent); }
.sc-line.me .sc-line-bubble b { color: var(--sc-gold); }
.sc-line-bubble p { margin: 2px 0 0; line-height: 1.9; }
@media (prefers-reduced-motion: no-preference) { .sc-line:not([hidden]) { animation: sc-line-in .4s var(--spring) both; } }
@keyframes sc-line-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.sc-beat { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 8px 12px 8px 8px; border-radius: 18px;
  background: var(--surface); border: 1px dashed var(--hairline); }
.sc-beat-who { width: 50px; }
.sc-beat-who img { width: 100%; height: auto; }
.sc-beat p { margin: 0; font-size: .86rem; line-height: 1.8; }
.sc-beat b { display: block; font-size: .72rem; color: var(--sc-gold); }
.sc-soon { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sc-soon li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text-2); font-size: .88rem; line-height: 1.8; }
.sc-soon small { display: block; font-weight: 800; color: var(--text); font-size: .92rem; }
.sc-soon-lock { opacity: .6; }

/* کارت «درس امروز» روی داشبورد */
.sc-today { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 18px 18px 18px 8px;
  border-radius: 26px; color: #f2f5f1;
  background: radial-gradient(90% 80% at 100% 0%, rgba(245, 199, 106, .22), transparent 60%), linear-gradient(160deg, #143325, #08150f);
  box-shadow: inset 0 0 0 1px rgba(245, 199, 106, .28), 0 18px 44px rgba(0, 0, 0, .35); transition: transform .3s var(--spring); }
.sc-today:active { transform: scale(.98); }
.sc-today-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sc-today-eyebrow { font-size: .78rem; font-weight: 700; color: var(--sc-gold); }
.sc-today strong { font-size: 1.25rem; font-weight: 900; line-height: 1.5; }
.sc-today small { color: rgba(242, 245, 241, .7); font-size: .88rem; }
.sc-today-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.sc-today-go { padding: 9px 16px; border-radius: 14px; font-weight: 900; font-size: .9rem; background: var(--sc-gold);
  color: var(--sc-ink); box-shadow: 0 4px 0 var(--sc-gold-deep); }
.sc-today-streak { font-size: .8rem; font-weight: 800; color: var(--sc-gold); }
.sc-today-bird { width: 92px; }
.sc-today-shine { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 240, 200, .16) 50%, transparent 60%); transform: translateX(120%); }
@media (prefers-reduced-motion: no-preference) { .sc-today-shine { animation: sc-sweep 3.4s 1s ease-in-out 3; } }
.sc-today-bird img { animation-iteration-count: 4 !important; } /* پرنده صفحه اصلی چند بار تکان می‌خورد و می‌ایستد */
@keyframes sc-sweep { 0% { transform: translateX(120%); } 45%, 100% { transform: translateX(-120%); } }

/* صفحه درس: تمام‌صفحه، بدون نوار پایین */
.sc-lesson { position: fixed; inset: 0; z-index: 40; overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
  padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 24px);
  background: radial-gradient(60% 40% at 50% 0%, var(--glow-1), transparent 70%), var(--bg); }
.sc-lesson > * { width: 100%; max-width: 560px; margin-inline: auto; }
.sc-top { display: flex; align-items: center; gap: 14px; }
.sc-x { width: 40px; height: 40px; border-radius: 12px; font-size: 1.3rem; color: var(--muted); display: grid; place-items: center; }
.sc-x:focus-visible, .sc-check:focus-visible, .sc-ghost:focus-visible { outline: 3px solid var(--sc-gold); outline-offset: 3px; }
.sc-bar { position: relative; flex: 1; height: 16px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sc-bar span { position: absolute; inset-block: 0; right: 0; width: var(--p, 0%); border-radius: 999px;
  transition: width .7s var(--spring); background: linear-gradient(270deg, var(--accent), var(--accent-2)); }
.sc-bar span::after { content: ""; position: absolute; top: 3px; right: 8px; left: 8px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.sc-combo { font-weight: 900; color: var(--sc-gold); font-size: .9rem; min-width: 46px; text-align: left; transition: transform .3s var(--spring); }
.sc-combo.pop { transform: scale(1.35); }
.sc-replay { margin: -8px 0 0; text-align: center; }
.sc-stage { flex: 1; display: flex; flex-direction: column; }
.sc-card { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.sc-card[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .sc-card { animation: sc-card-in .5s var(--ease) both; }
  .sc-card.out { animation: sc-card-out .26s ease-in both; }
}
@keyframes sc-card-in { from { opacity: 0; transform: translateX(-40px); } }
@keyframes sc-card-out { to { opacity: 0; transform: translateX(40px); } }
.sc-say { display: flex; align-items: flex-end; gap: 10px; }
.sc-bubble { position: relative; flex: 1; min-width: 0; padding: 16px 18px; border-radius: 22px; background: var(--surface);
  border: 2px solid var(--hairline); display: flex; flex-direction: column; gap: 6px; }
.sc-bubble::after { content: ""; position: absolute; left: -9px; bottom: 26px; width: 16px; height: 16px; background: var(--surface);
  border-left: 2px solid var(--hairline); border-bottom: 2px solid var(--hairline); transform: rotate(45deg); }
.sc-say-bird { width: 84px; }
.sc-kicker { font-size: .82rem; font-weight: 800; color: var(--accent); }
.sc-sample { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; font-size: .72rem;
  background: var(--warn-soft); color: var(--warn); }
.sc-q { margin: 0; font-size: 1.22rem; font-weight: 900; line-height: 1.7; text-wrap: balance; }
.sc-q em, .sc-sub em { font-style: normal; color: var(--sc-gold); }
.sc-sub { margin: -6px 0 0; color: var(--text-2); font-size: .95rem; line-height: 1.85; }
.sc-note { margin: 0; font-size: .76rem; color: var(--muted); line-height: 1.7; }
.sc-art { display: grid; place-items: center; }
.sc-art svg { width: 180px; max-width: 100%; height: auto; }
.sc-art .drip { transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  .sc-art .drip { animation: sc-drip 1.6s ease-in infinite; }
  .sc-art .drip.d2 { animation-delay: .6s; } .sc-art .drip.d3 { animation-delay: 1.1s; }
}
@keyframes sc-drip { 0% { transform: translateY(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
.sc-melt { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--hairline); }
.sc-melt-row { display: grid; grid-template-columns: 52px 1fr 104px; align-items: center; gap: 10px; font-size: .82rem; }
.sc-melt-row span { color: var(--muted); }
.sc-melt-row i { height: 24px; border-radius: 8px; width: var(--w); background: linear-gradient(270deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(62, 232, 166, .25); }
@media (prefers-reduced-motion: no-preference) { .sc-melt-row i { animation: sc-grow 1s var(--ease) both; }
  .sc-melt-row:nth-child(2) i { animation-delay: .2s; } .sc-melt-row:nth-child(3) i { animation-delay: .4s; }
  .sc-melt-row:nth-child(4) i { animation-delay: .6s; } }
@keyframes sc-grow { from { width: 0; } }
.sc-melt-row.low i { background: linear-gradient(270deg, #e59a4c, var(--sc-bad)); box-shadow: 0 0 18px rgba(255, 122, 107, .25); }
.sc-melt-row b { font-weight: 800; text-align: left; font-size: .8rem; }

/* گزینه‌ها */
.sc-form { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.sc-opts { display: grid; gap: 12px; border: 0; margin: 0; padding: 0; min-width: 0; }
.sc-opts.two { grid-template-columns: 1fr 1fr; }
.sc-opt { position: relative; display: block; cursor: pointer; }
.sc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.sc-opt span { display: block; padding: 15px 18px; border-radius: 18px; font-weight: 800; font-size: 1.02rem; line-height: 1.6;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--hairline), 0 4px 0 var(--sc-lift);
  transition: transform .15s, box-shadow .15s, background .2s; }
.sc-opt.big span { padding: 22px 10px; text-align: center; font-size: 1.12rem; }
.sc-opt:hover span { background: var(--surface-2); }
.sc-opt:active span { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--hairline), 0 1px 0 var(--sc-lift); }
.sc-opt input:focus-visible + span { outline: 3px solid var(--sc-gold); outline-offset: 3px; }
.sc-opt input:checked + span { box-shadow: inset 0 0 0 2px var(--accent), 0 4px 0 var(--sc-accent-deep); background: var(--accent-soft); }
.sc-opt.right span, .sc-opt.right input:checked + span { box-shadow: inset 0 0 0 2px var(--accent), 0 4px 0 var(--sc-accent-deep); background: var(--accent-soft); }
.sc-opt.wrong span, .sc-opt.wrong input:checked + span { box-shadow: inset 0 0 0 2px var(--sc-bad), 0 4px 0 var(--sc-bad-deep); background: var(--bad-soft); }
@media (prefers-reduced-motion: no-preference) {
  .sc-opt.right span { animation: sc-yay .5s var(--spring); }
  .sc-opt.wrong span { animation: sc-shake .45s; }
}
@keyframes sc-yay { 40% { transform: scale(1.05); } }
@keyframes sc-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.sc-locked .sc-opt { pointer-events: none; }

/* اسلایدر و شیشه‌ها */
.sc-range { display: flex; flex-direction: column; gap: 10px; }
.sc-range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sc-range-head b { font-size: 1.8rem; font-weight: 900; color: var(--sc-gold); }
.sc-range-head span { color: var(--text-2); font-weight: 700; }
.sc-range input[type=range] { width: 100%; height: 34px; -webkit-appearance: none; appearance: none; background: transparent; direction: rtl; }
.sc-range input[type=range]::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: var(--surface-2); }
.sc-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -11px;
  border-radius: 50%; background: var(--sc-gold); box-shadow: 0 4px 0 var(--sc-gold-deep), 0 0 0 6px rgba(245, 199, 106, .18); }
.sc-range input[type=range]::-moz-range-track { height: 12px; border-radius: 6px; background: var(--surface-2); }
.sc-range input[type=range]::-moz-range-thumb { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--sc-gold); }
.sc-range input[type=range]:focus-visible { outline: 3px solid var(--sc-gold); outline-offset: 4px; border-radius: 12px; }
.sc-jars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 16px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--hairline); }
.sc-jar { position: relative; aspect-ratio: 3 / 4; border-radius: 8px 8px 12px 12px; background: var(--surface-2); overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .06); }
.sc-jar::before { content: ""; position: absolute; top: 0; left: 15%; right: 15%; height: 12%; border-radius: 0 0 4px 4px;
  background: rgba(255, 255, 255, .12); z-index: 1; }
.sc-jar i { position: absolute; inset: auto 0 0 0; height: 0; background: var(--sc-gold); transition: height .45s var(--spring); }
.sc-jar.on i { height: 100%; }

/* دکمه اصلی */
.sc-check { margin-top: auto; width: 100%; display: block; text-align: center; padding: 16px; border-radius: 18px; font-weight: 900;
  font-size: 1.08rem; background: var(--accent); color: var(--on-accent); box-shadow: 0 5px 0 var(--sc-accent-deep);
  transition: transform .12s, box-shadow .12s, opacity .2s; }
.sc-check:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--sc-accent-deep); }
.sc-check:disabled { opacity: .35; cursor: default; transform: none; }
.sc-ghost { flex: none; padding: 16px 18px; border-radius: 18px; font-weight: 900; background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--hairline), 0 4px 0 var(--sc-lift); }

/* برگه بازخورد پایین */
.sc-sheet { position: fixed; z-index: 45; inset: auto 0 0 0; max-width: none !important; margin: 0;
  padding: 22px 16px calc(var(--safe-b) + 20px); transform: translateY(calc(100% + 120px)); visibility: hidden;
  transition: transform .45s var(--spring), visibility 0s .45s; }  /* +120: شخصیت بالای برگه هم بیرون برود */
.sc-sheet.show { transform: none; visibility: visible; transition: transform .45s var(--spring); }
.sc-sheet.good { background: linear-gradient(0deg, #0b2a1d, #113a28); box-shadow: 0 -1px 0 rgba(62, 232, 166, .35); }
.sc-sheet.bad { background: linear-gradient(0deg, #2a100c, #3a1712); box-shadow: 0 -1px 0 rgba(255, 122, 107, .35); }
.sc-fb { position: relative; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; color: #f2f5f1; }
.sc-fb h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 900; }
.sc-fb.good h3 { color: var(--accent); }
.sc-fb.bad h3 { color: var(--sc-bad); }
.sc-fb p { margin: 0; color: rgba(242, 245, 241, .78); line-height: 1.9; font-size: .97rem; }
.sc-fb.bad .sc-check { background: var(--sc-bad); box-shadow: 0 5px 0 var(--sc-bad-deep); color: #2a0a05; }
.sc-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; }
.sc-fb.good .sc-badge { background: var(--accent); color: var(--on-accent); }
.sc-fb.bad .sc-badge { background: var(--sc-bad); color: #2a0a05; }
.sc-fb-bird { position: absolute; left: 0; top: -92px; width: 78px; }
.sc-fb .sc-race { display: none; }

/* مسابقه داده واقعی */
.sc-race { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--hairline); }
.sc-race-row { display: grid; grid-template-columns: 86px 1fr; gap: 8px; align-items: center; font-weight: 800; font-size: .86rem; }
.sc-race-row div { position: relative; height: 30px; }
.sc-race-row i { position: absolute; inset-block: 0; right: 0; width: 2%; border-radius: 8px; transition: width 1.6s var(--ease);
  background: linear-gradient(270deg, #5b6570, #8c96a0); }
.sc-race-row b { position: absolute; top: 50%; right: 2%; transform: translateY(-50%); padding-right: 8px; font-size: .8rem;
  white-space: nowrap; transition: right 1.6s var(--ease); }
.sc-race.run i { width: var(--w); }
.sc-race.run b { right: var(--w); }
.sc-race-row.k-usd i { background: linear-gradient(270deg, #1f9d6b, #3ee8a6); }
.sc-race-row.k-coin_emami i { background: linear-gradient(270deg, #b8862b, #f0c35a); }
.sc-race-row.k-gold18_gram i { background: linear-gradient(270deg, #d99a1e, #ffe08a); }
.sc-race-row.win b { color: var(--sc-gold); }

/* پایان درس */
.sc-done { gap: 18px; }
.sc-done-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; }
.sc-done-hero h1 { margin: 0; font-size: 1.8rem; font-weight: 900; }
.sc-done-hero p { margin: 0; color: var(--text-2); line-height: 1.8; }
.sc-done-bird { width: 150px; }
@media (prefers-reduced-motion: no-preference) { .sc-done-bird { animation: sc-trophy .9s var(--spring) both; } }
@keyframes sc-trophy { from { transform: scale(0) rotate(-20deg); } }
.sc-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sc-stat { border-radius: 18px; overflow: hidden; text-align: center; }
@media (prefers-reduced-motion: no-preference) { .sc-stat { animation: sc-pop .5s var(--spring) both; }
  .sc-stat:nth-child(2) { animation-delay: .15s; } .sc-stat:nth-child(3) { animation-delay: .3s; } }
.sc-stat small { display: block; padding: 6px; font-size: .75rem; font-weight: 900; color: var(--sc-ink); }
.sc-stat b { display: block; padding: 14px 6px; font-size: 1.35rem; font-weight: 900; background: var(--surface); border-radius: 0 0 18px 18px; }
.sc-stat.g small { background: var(--sc-gold); } .sc-stat.g b { color: var(--sc-gold); box-shadow: inset 0 0 0 2px var(--sc-gold); }
.sc-stat.a small { background: var(--accent); } .sc-stat.a b { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.sc-stat.f small { background: #ff9f4a; } .sc-stat.f b { color: #ffb36b; box-shadow: inset 0 0 0 2px #ff9f4a; }
.sc-chest-line, .sc-streak-line, .sc-center { margin: 0; text-align: center; font-weight: 700; color: var(--text-2); }
.sc-chest-line { color: var(--sc-gold); font-weight: 900; }
.sc-knowledge { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 22px;
  background: radial-gradient(90% 90% at 100% 0%, rgba(110, 140, 255, .18), transparent 60%), var(--surface); border: 1px solid var(--hairline); }
.sc-knowledge .avatar { width: 60px; height: 60px; flex: none; }
.sc-k-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sc-k-body small { color: var(--muted); font-size: .78rem; }
.sc-k-row { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; font-weight: 800; }
.plus { color: var(--accent); }
.sc-k-meter { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; display: flex; }
.sc-k-meter i { height: 100%; width: var(--w); background: linear-gradient(90deg, #6e8cff, #b6c4ff); }
.sc-k-meter u { height: 100%; width: var(--w); background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .sc-k-meter u { animation: sc-grow 1s 1.2s var(--spring) both; } }
.sc-knowledge.leveled { box-shadow: 0 0 0 2px var(--sc-gold), 0 0 40px rgba(245, 199, 106, .35); }
@media (prefers-reduced-motion: no-preference) { .sc-knowledge.leveled { animation: sc-yay .8s 1.4s var(--spring) both; } }
.sc-done-actions { display: flex; gap: 10px; margin-top: auto; }
.sc-done-actions .sc-check { margin: 0; flex: 1; }
.sc-fx { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none !important; pointer-events: none; z-index: 60; }

/* سطح کارت شخصیت: قاب برنزی، نقره‌ای، طلایی */
.tcard-level { font-size: .72rem; font-weight: 900; padding: 4px 10px; border-radius: 999px; color: #2b1606;
  background: linear-gradient(90deg, #d59a6a, #a8683c); }
.tcard.lvl-2 .tcard-level { background: linear-gradient(90deg, #f1f4f8, #a9b4c2); color: #1d2530; }
.tcard.lvl-3 .tcard-level { background: linear-gradient(90deg, #ffe08a, #f0a35b); color: #2a1a00; }
.tcard.lvl-1::before { background: conic-gradient(from 0deg, #c98a5a, #f2c49b, #8f5631, #e3a878, #c98a5a); }
.tcard.lvl-2::before { background: conic-gradient(from 0deg, #dfe6ee, #8e9aa8, #ffffff, #a9b4c2, #dfe6ee); opacity: 1; padding: 2.5px; }
.tcard.lvl-3::before { background: conic-gradient(from 0deg, #ffe08a, #f0a35b, #fff3c9, #d99a1e, #ffe08a); opacity: 1; padding: 3.5px; }
.tcard.lvl-3 { box-shadow: 0 24px 70px rgba(245, 199, 106, .4), 0 0 0 1px rgba(255, 215, 120, .45); }
.tstat small { font-weight: 700; opacity: .7; }
:root[data-theme="light"] .sc-q em, :root[data-theme="light"] .sc-sub em, :root[data-theme="light"] .sc-race-row.win b,
:root[data-theme="light"] .sc-range-head b, :root[data-theme="light"] .sc-pill.fire { color: #a86f0c; }

/* ورود به مدرسه: قرص زنجیره کنار آواتار بالای خانه */
.sc-entry { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 12px 0 14px;
  margin-inline-end: 8px; border-radius: 999px; font-weight: 900; font-size: 1rem; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--hairline); transition: transform .2s var(--spring); }
.sc-entry .flame { filter: grayscale(1); opacity: .6; animation: none; }
.sc-entry.lit { color: var(--sc-gold); border-color: color-mix(in srgb, var(--sc-gold) 45%, transparent);
  box-shadow: 0 0 18px rgba(245, 199, 106, .2); }
.sc-entry.lit .flame { filter: none; opacity: 1; animation: sc-flicker 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .sc-entry.lit .flame { animation: none; } }
.sc-entry-cap { position: absolute; top: -7px; left: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid;
  place-items: center; background: var(--accent); color: var(--on-accent); }
.sc-entry-cap .i { width: 14px; height: 14px; }
.sc-entry:active { transform: scale(.92); }
:root[data-theme="light"] .sc-entry.lit { color: #a86f0c; }

.sms-pair-code { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.pair-code code { display: inline-block; font-size: 2rem; letter-spacing: .4em; padding: .4rem .8rem; }

/* مدرسه: جان، آزمون تعیین سطح، تاپیک‌ها و انواع تازه کارت */
.sc-pill.heart { color: #ff6b8b; }
.sc-pill.heart.inf { color: var(--sc-gold); }
.sc-pill.heart.empty { color: var(--muted); }
.sc-pill.heart.lost { animation: sc-shake .45s; }
.sc-top .sc-pill { flex: none; padding: 5px 10px; font-size: .85rem; }
.sc-placement { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 24px;
  background: radial-gradient(90% 80% at 100% 0%, rgba(245, 199, 106, .2), transparent 60%), linear-gradient(160deg, #143325, #08150f);
  color: #f2f5f1; box-shadow: inset 0 0 0 1px rgba(245, 199, 106, .28); }
.sc-placement h2 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 900; }
.sc-placement p { margin: 0 0 10px; color: rgba(242, 245, 241, .75); font-size: .88rem; line-height: 1.8; }
.sc-placement-bird { width: 76px; }
.sc-placement-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sc-placement-actions .text-btn { color: rgba(242, 245, 241, .7); font-size: .82rem; }
.sc-placement-actions .sc-today-go { display: inline-block; }
.sc-placement-cta { margin-top: 4px; }

.sc-story { padding: 14px 16px; border-radius: 18px; background: var(--warn-soft); color: var(--text); line-height: 1.9;
  font-size: .95rem; border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.sc-gap { display: inline-block; min-width: 3em; border-bottom: 3px dashed var(--sc-gold); color: transparent; }
.sc-opts.chips { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.sc-opts.chips .sc-opt span { text-align: center; }
.sc-number { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--hairline); }
.sc-number:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.sc-number input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--text); font: inherit; font-size: 1.5rem;
  font-weight: 900; padding: 8px 10px; outline: none; }
.sc-number span { color: var(--muted); font-weight: 700; white-space: nowrap; }
.sc-chip { display: block; width: 100%; padding: 13px 14px; border-radius: 16px; text-align: center; font-weight: 800; font-size: .95rem;
  line-height: 1.6; background: var(--surface); box-shadow: inset 0 0 0 2px var(--hairline), 0 4px 0 var(--sc-lift); position: relative;
  transition: transform .15s, box-shadow .15s, background .2s; }
.sc-chip:active { transform: translateY(3px); }
.sc-chip.big { padding: 20px 10px; font-size: 1.05rem; }
.sc-chip:focus-visible { outline: 3px solid var(--sc-gold); outline-offset: 3px; }
.sc-chip.sel { box-shadow: inset 0 0 0 2px var(--sc-gold), 0 4px 0 var(--sc-gold-deep); }
.sc-match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-match-col { display: flex; flex-direction: column; gap: 10px; }
.sc-chip[data-pair="0"] { box-shadow: inset 0 0 0 2px #3ee8a6, 0 4px 0 #179b68; background: rgba(62, 232, 166, .1); }
.sc-chip[data-pair="1"] { box-shadow: inset 0 0 0 2px #5ac8fa, 0 4px 0 #2b7fa8; background: rgba(90, 200, 250, .1); }
.sc-chip[data-pair="2"] { box-shadow: inset 0 0 0 2px #a78bfa, 0 4px 0 #6d4fc4; background: rgba(167, 139, 250, .12); }
.sc-chip[data-pair="3"] { box-shadow: inset 0 0 0 2px #ff9f4a, 0 4px 0 #b86a24; background: rgba(255, 159, 74, .1); }
.sc-chip[data-pair="4"] { box-shadow: inset 0 0 0 2px #ff6b8b, 0 4px 0 #b23c58; background: rgba(255, 107, 139, .1); }
.sc-order { display: grid; gap: 10px; }
.sc-order .sc-chip[data-n] { box-shadow: inset 0 0 0 2px var(--accent), 0 4px 0 var(--sc-accent-deep); background: var(--accent-soft); }
.sc-order .sc-chip[data-n]::before { content: attr(data-n); position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: .85rem; }
.sc-order-picked { margin: 0; padding: 12px 34px 12px 14px; min-height: 48px; border-radius: 16px; border: 2px dashed var(--hairline);
  display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 700; color: var(--text-2); }
.sc-order-picked:empty { display: none; }
.sc-quick { display: flex; flex-direction: column; gap: 14px; }
.sc-quick-time { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.sc-quick-time span { display: block; height: 100%; width: var(--p, 100%); background: linear-gradient(270deg, var(--sc-gold), #ff9f4a);
  transition: width .2s linear; }
.sc-quick-left { margin: -6px 0 0; text-align: left; color: var(--muted); font-size: .8rem; font-weight: 700; min-height: 1em; }
.sc-quick-text { margin: 0 0 10px; font-size: 1.1rem; font-weight: 800; line-height: 1.8; }
.sc-quick-text .num { color: var(--muted); font-size: .8rem; margin-inline-end: 6px; }
.sc-form.is-right .sc-match, .sc-form.is-right .sc-order, .sc-form.is-right .sc-number { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 18px; }
.sc-form.is-wrong .sc-match, .sc-form.is-wrong .sc-order, .sc-form.is-wrong .sc-number { outline: 2px solid var(--sc-bad); outline-offset: 6px; border-radius: 18px; }
.sc-locked .sc-chip { pointer-events: none; }
.sc-out { padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .22); }
.sc-out .muted { display: block; margin-top: 4px; }
:root[data-theme="light"] .sc-story { color: var(--text); }
.sc-check[hidden], .sc-quick-item[hidden] { display: none; }
.sc-order-picked { list-style: persian; }

/* شخصیت‌های تصویری دارالفنون (مثل دینار) به‌جای پرنده */
.mascot.cast img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .mascot.cast.idle img, .mascot.cast.think img { animation: sc-idle 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
  .mascot.cast.happy img, .mascot.cast.party img { animation: sc-hop .45s var(--spring) infinite alternate; transform-origin: 50% 100%; }
  .mascot.cast.sad img { animation: sc-sag 3s ease-in-out infinite; transform-origin: 50% 100%; }
}
.sc-line-bubble em, .sc-beat em, .sc-cameo-say em { font-style: normal; font-weight: 800; color: var(--sc-gold); }
/* ---------- برگه تغییر ثروت نسبت به دیروز ---------- */
a.hero-tap { display: block; color: inherit; text-decoration: none; }
.hero-more { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px;
  font-size: .78rem; font-weight: 600; color: rgba(255, 255, 255, .75); text-decoration: none; }
.hero-more .i { width: 14px; height: 14px; }
.pnl-total { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 12px 0 4px; }
.pnl-total .delta, .pnl-sheet .row-end .delta { margin-top: 0; }
.pnl-sheet .row-end .delta { white-space: nowrap; }
.pnl-static { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--hairline); font-size: .88rem; }
.pnl-empty { margin: 16px 0 4px; }

/* انتخاب تاپیک (مثل تغییر زبان دولینگو): دکمه بالای نقشه، پنل شخصیت‌ها */
.sc-switch { position: relative; z-index: 20; }
.sc-switch-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 10px; border-radius: 20px;
  border: 2px solid var(--hairline); background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  box-shadow: 0 4px 0 var(--hairline); text-align: start; }
.sc-switch-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--hairline); }
.sc-switch-who { width: 52px; }
.sc-switch-who img { width: 100%; height: auto; }
.sc-switch-now { flex: 1; display: flex; flex-direction: column; }
.sc-switch-now small { color: var(--muted); font-size: .74rem; font-weight: 700; }
.sc-switch-now b { font-size: 1.08rem; font-weight: 900; }
.sc-switch-caret { color: var(--accent); font-size: 1.1rem; transition: transform .2s ease; }
.sc-switch.open .sc-switch-caret { transform: rotate(180deg); }
.sc-switch-panel { display: none; position: absolute; top: calc(100% + 10px); inset-inline: 0; padding: 16px; border-radius: 22px;
  background: var(--surface); border: 2px solid var(--hairline); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.sc-switch-panel::before { content: ""; position: absolute; bottom: 100%; inset-inline-start: 34px; border: 10px solid transparent;
  border-top: 0; border-bottom-color: var(--hairline); }
.sc-switch.open .sc-switch-panel { display: block; }
@media (prefers-reduced-motion: no-preference) { .sc-switch.open .sc-switch-panel { animation: sc-pop-in .22s var(--spring) both; } }
/* پس‌زمینه تیره با سایه خود پنل؛ ::after با position:fixed داخل جعبه‌ای که transform دارد گیر می‌افتاد
   و روی دکمه مربع تیره می‌ساخت. دکمه بالاتر از سایه می‌ماند. */
.sc-switch.open .sc-switch-panel { box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 0 0 100vmax rgba(0, 0, 0, .45); }
.sc-switch-btn { position: relative; z-index: 2; }
.sc-switch-title { margin: 0 4px 12px; font-weight: 900; }
.sc-switch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sc-switch-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 10px 10px; border-radius: 18px; text-align: center; text-decoration: none; color: var(--text);
  border: 2px solid var(--hairline); box-shadow: 0 4px 0 var(--hairline); }
.sc-switch-item:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--hairline); }
.sc-switch-item .mascot { width: 68px; }
.sc-switch-item .mascot img { width: 100%; height: auto; }
.sc-switch-item b { font-size: .84rem; font-weight: 900; line-height: 1.5; }
.sc-switch-item small { color: var(--muted); font-size: .7rem; }
.sc-switch-item > small { margin-bottom: 10px; }
.sc-meter { display: block; width: 100%; height: 8px; margin-top: auto; border-radius: 999px; overflow: hidden;
  background: var(--surface-3); }
.sc-meter i { display: block; height: 100%; width: var(--w); min-width: 8px; border-radius: inherit;
  background: linear-gradient(270deg, var(--sc-accent-deep), var(--accent)); }  /* راست‌به‌چپ: سر پیشرفت روشن‌تر */
.sc-meter i[style*="--w: 0"] { min-width: 0; }
.sc-switch-item.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 4px 0 var(--sc-accent-deep); }
/* بدون مربع خاکستری لمس موبایل و قاب فوکوس مستطیلی؛ فوکوس صفحه‌کلید قاب گرد می‌گیرد */
.sc-switch-btn, .sc-switch-item, .sc-node, .sc-chest, .sc-pop-go { -webkit-tap-highlight-color: transparent; }
.sc-switch-btn:focus, .sc-switch-item:focus, .sc-chest:focus { outline: none; }
.sc-switch-btn:focus-visible, .sc-switch-item:focus-visible, .sc-chest:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* دسته‌بندی: هر کارت یک ردیف با دکمه سطل‌ها */
.sc-sort { display: flex; flex-direction: column; gap: 10px; }
.sc-sort-row { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--hairline); }
.sc-sort-text { font-weight: 800; }
.sc-sort-buckets { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-sort-buckets .sc-chip { flex: 1; min-width: 0; }
.sc-sort .sc-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.sc-locked .sc-sort .sc-chip { pointer-events: none; }
/* «وزیر برای تو»: متن شخصی، اول حالت فکر کردن */
.sc-ai { min-height: 3.4em; }
.sc-ai-text { margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 2; }
.sc-ai-text em { font-style: normal; color: var(--sc-gold); }
.sc-ai-by { display: block; margin-top: 8px; color: var(--muted); font-size: .76rem; }
.sc-ai-by a { color: var(--accent); }
.sc-ai-wait { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; }
.sc-ai-wait span { width: 34px; height: 10px; flex: none;
  background: radial-gradient(circle 4px, var(--accent) 98%, transparent) 0 50% / 12px 10px repeat-x; }
@media (prefers-reduced-motion: no-preference) { .sc-ai-wait span { animation: sc-typing .8s steps(3) infinite; } }
/* ماشین حساب زیر سؤال‌های محاسبه‌ای */
.sc-calc { margin-top: 10px; }
.sc-calc summary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  list-style: none; font-weight: 800; font-size: .9rem; color: var(--accent); background: var(--accent-soft);
  -webkit-tap-highlight-color: transparent; }
.sc-calc summary::-webkit-details-marker { display: none; }
.sc-calc[open] summary { margin-bottom: 10px; }
.sc-calc-box { padding: 12px; border-radius: 22px; background: var(--surface); border: 2px solid var(--hairline); }
.sc-calc-screen { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-height: 64px; margin-bottom: 10px;
  padding: 10px 14px; border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.sc-calc-screen small { min-height: 1.3em; color: var(--muted); font-size: .85rem; white-space: nowrap; direction: ltr; }
.sc-calc-screen b { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; white-space: nowrap; }
.sc-calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sc-key { height: 50px; border: 0; border-radius: 14px; font: inherit; font-size: 1.25rem; font-weight: 800; cursor: pointer;
  color: var(--text); background: var(--surface-3); box-shadow: 0 4px 0 var(--sc-lift); -webkit-tap-highlight-color: transparent; }
.sc-key:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sc-lift); }
.sc-key.op { color: var(--accent); background: var(--accent-soft); }
.sc-key.fn { color: var(--muted); }
.sc-key.eq { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--sc-accent-deep); }
.sc-key.use { grid-column: span 3; font-size: .95rem; background: var(--sc-accent-deep); color: #f2fff8; box-shadow: 0 4px 0 #0a3d29; }
.sc-key:focus { outline: none; }
.sc-key:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sc-locked .sc-calc { display: none; }

/* دارالفنون پررنگ‌تر در صفحه معرفی */
.lx-school { padding: 28px 20px; border-radius: 28px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); scroll-margin-top: 80px; }
.lx-school h2 { font-size: clamp(1.7rem, 6.5vw, 2.5rem); }
.lx-link-school { font-weight: 900; color: var(--accent); }
.lx-school-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); text-decoration: none; font-size: .85rem; }
.lx-school-pill .i { width: 18px; height: 18px; }
/* دارالفنون در صفحه معرفی: مسیر کوچک، دینار و شخصیت هر تاپیک */
.lx-school-art { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 300px; }
.lx-school-path { flex: none; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lx-node { position: relative; display: grid; place-items: center; width: 58px; height: 52px; border-radius: 50%;
  transform: translateX(var(--x)); font-size: 1.35rem; font-weight: 900; color: var(--on-accent);
  background: var(--accent); box-shadow: 0 6px 0 var(--sc-accent-deep, #179b68); }
.lx-node.now::before { content: ""; position: absolute; inset: -9px -9px -14px; border-radius: 50%;
  border: 5px solid var(--accent-soft); }
.lx-node.now i { position: absolute; top: 50%; left: calc(100% + 14px); translate: 0 -50%; white-space: nowrap; font-style: normal; font-size: .8rem;
  padding: 5px 11px; border-radius: 10px; background: var(--surface); color: var(--accent); border: 2px solid var(--hairline); }
.lx-node.chest { background: none; box-shadow: none; font-size: 2.2rem; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .2)); }
.lx-node.lock { background: var(--surface-3); box-shadow: 0 6px 0 var(--hairline); font-size: 1.1rem; }
.lx-school-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 46%; max-width: 190px; }
.lx-school-hero img { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .3)); }
.lx-school-say { margin: 0; padding: 10px 12px; border-radius: 16px 16px 16px 4px; font-size: .82rem; font-weight: 700; line-height: 1.8;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .lx-school-hero img { animation: lx-float 3.2s ease-in-out infinite; }
  .lx-node.now i { animation: lx-float 1.6s ease-in-out infinite; }
}
@keyframes lx-float { 50% { transform: translateY(-6px); } }
.lx-school-topics .lx-h { margin: 0 0 12px; text-align: center; }
.lx-school-cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 880px) { .lx-school-cast { grid-template-columns: repeat(6, 1fr); } }
.lx-school-cast li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 12px; border-radius: 18px;
  text-align: center; background: var(--surface); border: 2px solid var(--hairline); box-shadow: 0 4px 0 var(--hairline); }
.lx-school-cast img { width: 64px; height: 64px; }
.lx-school-cast b { font-size: .8rem; font-weight: 900; line-height: 1.5; }
.lx-school-cast small { color: var(--muted); font-size: .72rem; }
/* باز شدن صندوقچه: افتادن ← لرزیدن ← پریدن در ← نور و سکه ← جایزه‌ها ← ادامه */
.sc-chest-open { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 24px 20px calc(var(--safe-b, 0px) + 24px); text-align: center;
  background: radial-gradient(70% 55% at 50% 42%, rgba(245, 199, 106, .22), transparent 70%), rgba(6, 12, 9, .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f2f5f1; }
.sc-chest-open.closing { opacity: 0; transition: opacity .25s ease; }
.sc-co-stage { position: relative; width: 260px; height: 260px; display: grid; place-items: end center; }
.sc-co-chest { position: relative; z-index: 2; width: 210px; overflow: visible; }
.sc-co-lid { transform-box: fill-box; transform-origin: 50% 100%; }
.sc-co-glow { opacity: 0; }
.sc-co-shadow { fill: rgba(0, 0, 0, .35); }
.sc-co-rays { position: absolute; z-index: 1; left: 50%; top: 52%; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 223, 128, .55) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%); }
.sc-co-burst { position: absolute; z-index: 3; left: 50%; top: 60%; width: 0; height: 0; }
.sc-co-burst i { position: absolute; width: 18px; height: 18px; margin: -9px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 35% 35%, #fff6c9, #f5c76a 55%, #a8761c); box-shadow: 0 0 8px rgba(255, 210, 100, .7); }
.sc-co-burst i.gem { border-radius: 4px; transform: rotate(45deg); background: linear-gradient(135deg, #b7ffe3, #2fbf7f 60%, #0f6b47); }
.sc-co-rewards { position: absolute; z-index: 4; left: 0; right: 0; top: 4px; display: flex; justify-content: center; gap: 10px; }
.sc-co-reward { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 16px; font-weight: 900;
  font-size: 1.05rem; color: #04190f; background: linear-gradient(160deg, #ffe08a, #f5c76a); box-shadow: 0 5px 0 #a8761c; }
.sc-co-reward.heart { background: linear-gradient(160deg, #ffb3a8, #ff7a6b); box-shadow: 0 5px 0 #b8473a; }
.sc-co-title { margin: 6px 0 0; font-size: 1.7rem; font-weight: 900; color: #ffe08a; }
.sc-co-note { margin: 0; max-width: 300px; color: rgba(242, 245, 241, .8); line-height: 1.9; }
.sc-co-go { width: min(340px, 100%); margin-top: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .sc-chest-open { animation: sc-co-fade .25s ease both; }
  .sc-co-chest { animation: sc-co-drop .55s cubic-bezier(.3, 1.6, .5, 1) both, sc-co-shake .8s .55s ease-in-out both; }
  .sc-co-lid { animation: sc-co-lid .5s 1.35s cubic-bezier(.2, 1.5, .4, 1) both; }
  .sc-co-glow { animation: sc-co-glow .4s 1.35s ease-out both; }
  .sc-co-rays { animation: sc-co-rays-in .5s 1.35s ease-out both, sc-co-spin 9s 1.35s linear infinite; }
  .sc-co-burst i { animation: sc-co-coin 1s calc(1.4s + var(--w)) cubic-bezier(.15, .7, .3, 1) both; }
  .sc-co-reward { animation: sc-co-reward .55s 1.55s cubic-bezier(.3, 1.6, .5, 1) both; }
  .sc-co-reward.heart { animation-delay: 1.75s; }
  .sc-co-title, .sc-co-note, .sc-co-go { animation: sc-co-up .4s 2s ease-out both; }
  .sc-co-note { animation-delay: 2.1s; }
  .sc-co-go { animation-delay: 2.25s; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-co-lid { transform: translate(0, -46px) rotate(-16deg); }
  .sc-co-glow, .sc-co-rays { opacity: 1; }
}
@keyframes sc-co-fade { from { opacity: 0; } }
@keyframes sc-co-drop { from { opacity: 0; transform: translateY(-160px) scale(.6); } }
@keyframes sc-co-shake { 0%, 100% { transform: none; } 15% { transform: rotate(-3deg); } 30% { transform: rotate(3deg); }
  45% { transform: rotate(-5deg) scale(1.02); } 60% { transform: rotate(5deg) scale(1.04); } 75% { transform: rotate(-7deg) scale(1.06); }
  90% { transform: rotate(7deg) scale(1.08) translateY(-4px); } }
@keyframes sc-co-lid { 0% { transform: none; } 60% { transform: translate(0, -62px) rotate(-22deg); }
  100% { transform: translate(0, -46px) rotate(-16deg); } }
@keyframes sc-co-glow { from { opacity: 0; } to { opacity: 1; } }
@keyframes sc-co-rays-in { from { opacity: 0; transform: scale(.3); } to { opacity: 1; } }
@keyframes sc-co-spin { to { rotate: 360deg; } }
@keyframes sc-co-coin { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; }
  70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); } }
@keyframes sc-co-reward { from { opacity: 0; transform: translateY(70px) scale(.3); } }
@keyframes sc-co-up { from { opacity: 0; transform: translateY(14px); } }

/* داخل اپ اندروید وزیر ناوبری پایین نیتیو است؛ نوار تب سایت پنهان می‌شود */
.in-shell { --tabbar-h: 0px; }
.in-shell .tabbar { display: none; }
.dong-tool-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
.dong-tool-row .field, .dong-tool-row input { min-width: 0; width: 100%; }
.dong-tool-row + .dong-tool-row { border-top: 1px solid var(--hairline); padding-top: 8px; margin-top: 8px; }
   کارت ثروت: عددها برجسته ولی آرام
   ===================================================================== */
.hero.hx .hero-value { font-size: 2.9rem; font-weight: 800; letter-spacing: -.025em; text-shadow: none; }
.hero.hx .hero-value .amt {
  background: linear-gradient(180deg, #fff 45%, color-mix(in srgb, var(--hx) 55%, #fff));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--hx) 30%, transparent));
}
.hero.hx .hero-value .amt small { -webkit-text-fill-color: rgba(255, 255, 255, .55); margin-inline-start: 6px; font-size: .36em; }
.hero-split a > small { display: inline-flex; align-items: center; gap: 6px; }
.hero-split a > small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-split .out > small::before { background: var(--bad); }
.hero-split strong .amt small { color: rgba(255, 255, 255, .5); margin-inline-start: 4px; }
.hero .delta { font-size: .86rem; }
/* تازه‌سازی خودکار: خط نمودار بدون انیمیشن ولی دیده شود؛ بعد از عوض‌کردن واحد دوباره کشیده می‌شود */
.live.refreshed [data-unit-switch]:not(.switched) .spark path { animation: none; stroke-dashoffset: 0; opacity: 1; }
.panel-head h2 small { font-size: .7em; font-weight: 600; }
=======
.pub-intro { color: var(--text-2); line-height: 2.1; }
.pub-faq details { border-top: 1px solid var(--hairline); padding: 10px 0; }
.pub-faq details:first-of-type { border-top: 0; padding-top: 0; }
.pub-faq summary { cursor: pointer; font-weight: 800; line-height: 1.9; }
.pub-faq details p { color: var(--text-2); line-height: 2.1; margin-top: 6px; }
.pub-table a[aria-current="page"] { background: var(--surface-2); }
.pub-rows li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 2px; }

/* پنل مدیریت: فیلترها، قیف، ماندگاری، جزئیات کاربر */
.admin-search select { background: var(--surface); border-color: var(--surface-2); flex: none; max-width: 40%; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.admin-chip { font-size: .82rem; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--surface-2); text-decoration: none; }
.admin-chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.admin-funnel, .admin-retention, .admin-user { margin-bottom: 16px; }
.admin-funnel h2, .admin-retention h2 { font-size: .95rem; margin-bottom: 6px; }
.admin-funnel-row { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 10px; align-items: center; margin-top: 8px; }
.admin-funnel-l { font-size: .85rem; }
.admin-funnel-bar { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.admin-funnel-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.admin-funnel-n { font-size: .85rem; font-weight: 700; min-width: 5.5rem; text-align: end; }
.admin-table-wrap { overflow-x: auto; margin-top: 10px; }
.admin-cohorts { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-cohorts th, .admin-cohorts td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--surface-2); }
.admin-cohorts th { color: var(--muted); font-weight: 600; }
.admin-heat { display: inline-block; min-width: 3.2rem; padding: 2px 6px; border-radius: 8px; background: color-mix(in srgb, var(--accent) var(--p), transparent); }
/* پنل مدیریت حرفه‌ای: ناوبری بخش‌ها، کارت شاخص با تغییر، نمودار، جدول، فیلترها و لاگ خطا */
.admin-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; padding: 4px;
  background: var(--surface-2); border-radius: 14px; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { flex: none; white-space: nowrap; padding: 7px 12px; border-radius: 10px; color: var(--text-2); font-size: .85rem;
  font-weight: 600; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.admin-nav a.on { background: var(--surface-3, var(--surface)); color: var(--text); box-shadow: var(--shadow); }
.admin-nav .pill { font-size: .7rem; padding: 0 6px; }
.admin-kpis { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .admin-kpis { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .admin-kpis { grid-template-columns: repeat(6, 1fr); } }
a.admin-stat.link { text-decoration: none; transition: transform .15s; }
a.admin-stat.link:hover { transform: translateY(-2px); }
.admin-delta { font-size: .75rem; font-weight: 700; color: var(--muted); }
.admin-delta.up { color: var(--good, var(--accent)); }
.admin-delta.down { color: var(--bad); }
.admin-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.admin-card-head h2 { margin: 0; font-size: 1rem; }
.admin-card-head .admin-filters { margin: 0; }
.admin-chart-box { position: relative; width: 100%; }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.admin-grid > .card { margin: 0; }
@media (min-width: 900px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.page[class*=" page-admin"] section.card, .page[class*=" page-admin"] details.card { margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th, .admin-table td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--surface-2); white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.admin-table td:first-child, .admin-table th:first-child { text-align: start; }
.admin-table tr.dim td { opacity: .55; }
.admin-users-table td:first-child { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.admin-table tr.admin-avg td { font-weight: 800; border-top: 2px solid var(--surface-2); }
.admin-cohort-matrix .admin-heat { min-width: 2.8rem; }
.admin-selects { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.admin-selects label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); min-width: 8.5rem; flex: 1 1 8.5rem; }
.admin-selects label.grow { flex: 3 1 14rem; }
.admin-selects select, .admin-selects input { min-height: 38px; font-size: .88rem; }
.admin-user-filters .admin-search { margin-bottom: 10px; flex-wrap: wrap; }
.admin-user-filters .admin-search:last-child { margin: 0; }
.admin-insight-card .lead { font-size: 1.1rem; font-weight: 800; margin: 4px 0 8px; }
.admin-insight-card h2 { display: flex; gap: 8px; align-items: center; font-size: 1rem; }
.admin-insight-list { margin: 8px 0 0; padding-inline-start: 20px; display: grid; gap: 10px; }
.admin-insight-list li { display: flex; flex-direction: column; gap: 2px; line-height: 1.8; }
.admin-insight-good h2 { color: var(--good, var(--accent)); }
.admin-insight-bad h2 { color: var(--bad); }
.admin-trace { max-height: 420px; overflow: auto; font-size: .75rem; line-height: 1.5; padding: 12px; border-radius: 12px;
  background: var(--surface-2); white-space: pre-wrap; word-break: break-word; text-align: left; }
.admin-error-msg { font-family: ui-monospace, monospace; font-size: .85rem; word-break: break-word; }
.admin-errors .row-sub code { font-size: .78rem; }
@media (min-width: 900px) {
  .page[class*=" page-admin"] > :not(.fab) { max-width: calc(var(--wide-w) - 48px); }
  .screen:has(.page[class*=" page-admin"]) .appbar-inner { max-width: calc(var(--wide-w) - 48px); }
}
.admin-row .row-title a { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; color: inherit; }
.admin-stat.dim { opacity: .55; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.pub-shots img { flex: none; width: min(62%, 240px); height: auto; border-radius: 22px; border: 1px solid var(--hairline); scroll-snap-align: start; }
.pub-text { color: var(--text-2); line-height: 2.1; }
.pub-points { margin: 8px 0 0; padding-inline-start: 20px; color: var(--text-2); line-height: 2.1; }

/* «از کجا با وزیر آشنا شدی؟» روی داشبورد؛ یک کلیک و تمام */
.heard-from h2 { margin: 0 0 4px; font-size: 1rem; }
.heard-from-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.heard-chip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid transparent; background: var(--surface-2);
  color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.heard-chip:hover, .heard-chip:focus-visible { border-color: var(--accent); color: var(--text); }
.heard-chip:active { transform: scale(.97); }
.admin-channels h3 { margin: 16px 0 4px; font-size: .95rem; }
.admin-landings { margin: 8px 0 12px; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.admin-landings bdi { word-break: break-all; }

/* ---------- گزارش بازار ۱۲ و ۱۸ ---------- */
.brief-body { margin: .75rem 0; line-height: 1.9; }
.brief-h { font-size: .95rem; margin: 1.1rem 0 .55rem; }
.brief-news { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.brief-news li { line-height: 1.7; font-size: .9rem; }
.brief-foot { margin-top: 1rem; }

.bf-hero { --c: var(--s9); display: flex; align-items: center; gap: 12px; margin: .8rem 0 1rem;
  padding: 16px; border-radius: var(--radius-sm); line-height: 1.7; font-size: 1.02rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 26%, var(--surface)), color-mix(in srgb, var(--c) 6%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.bf-hero.mood-up { --c: var(--good); }
.bf-hero.mood-down { --c: var(--s1); }
.bf-hero.mood-mixed { --c: var(--s7); }
.bf-hero.mood-calm { --c: var(--s4); }
.bf-hero-emoji { font-size: 1.9rem; line-height: 1; }

.bf-news { display: flex; flex-direction: column; gap: 10px; }
.bf-card { --c: var(--s2); padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  border-inline-start: 4px solid var(--c); animation: bf-in .35s var(--ease) both; }
.bf-card:nth-child(2) { animation-delay: .05s; } .bf-card:nth-child(3) { animation-delay: .1s; }
.bf-card:nth-child(4) { animation-delay: .15s; } .bf-card:nth-child(5) { animation-delay: .2s; }
.bf-card.mk-fx { --c: var(--s6); } .bf-card.mk-gold { --c: var(--s4); } .bf-card.mk-stock { --c: var(--s1); }
.bf-card.mk-crypto { --c: var(--s7); } .bf-card.mk-economy { --c: var(--s2); }
.bf-card h3 { font-size: .95rem; margin: 6px 0 2px; line-height: 1.6; }
.bf-card p { margin: 0; color: var(--text-2); font-size: .86rem; line-height: 1.7; }
.bf-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bf-tag { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent); }
.bf-effect { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.bf-effect.fx-up { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.bf-effect.fx-down { color: var(--bad); background: var(--bad-soft); }
.bf-effect.fx-mixed { color: var(--warn); background: var(--warn-soft); }
.bf-empty { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); }
@keyframes bf-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .bf-card { animation: none; } }

.bf-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bf-tile, .bf-index > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hairline); min-width: 0; }
.bf-tile strong, .bf-index strong { font-size: .95rem; }
.bf-tile-name { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-chg { align-self: flex-start; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.bf-chg.up { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.bf-chg.down { color: var(--bad); background: var(--bad-soft); }
.bf-chg.flat { color: var(--muted); }

.bf-box { --c: var(--s1); margin-top: 1rem; padding: 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.bf-box h3 { font-size: .95rem; margin: 0 0 8px; }
.bf-box p { margin: 8px 0 0; line-height: 1.8; font-size: .9rem; }
.bf-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bf-index > div { background: var(--surface); }
.bf-watch { --c: var(--s4); }
.bf-watch ul { margin: 0; padding-inline-start: 20px; line-height: 1.8; font-size: .9rem; }
.bf-all { margin-top: 1rem; }
.bf-all summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 600; }

/* ---------- دارایی‌ها: جاری و غیرجاری ---------- */
.liq-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.liq-part { --c: var(--s3); display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.liq-part small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.liq-part strong { font-size: 1.05rem; }
.liq-part span { color: var(--c); font-weight: 700; font-size: .85rem; }
.liq-noncurrent { --c: var(--s1); }
.asset-section { margin-top: 18px; }
.asset-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 0 4px 10px;
  padding-inline-start: 10px; border-inline-start: 4px solid var(--c, var(--s3)); }
.asset-section.liq-current { --c: var(--s3); }
.asset-section-head h2 { margin: 0; font-size: 1.05rem; }
.asset-section-head small { display: block; font-size: .76rem; }
.asset-section-sum { display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
.asset-group { margin-bottom: 12px; }
.asset-group-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 6px; }
.asset-group-head .bubble { width: 30px; height: 30px; }
.asset-group-title { flex: 1; font-weight: 700; font-size: .92rem; }
.asset-group-head strong { font-size: .92rem; }

/* ---------- بخش «بیشتر»: ابزارهای وزیر، تنظیمات، حساب ---------- */
.more-h { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 22px 4px 10px; }
.more-h .i { width: 18px; height: 18px; color: var(--muted); }
.more-h .more-h-ic .i { color: var(--accent); }
.more-tools { position: relative; margin-top: 6px; padding: 16px 14px 18px; border-radius: var(--radius);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
              radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--s7) 14%, transparent), transparent 60%), var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.more-tools .more-h { margin: 0 2px 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tool { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 6px 12px;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--hairline); color: inherit;
  text-decoration: none; transition: transform .15s var(--spring), border-color .15s; min-width: 0; }
.tool:active { transform: scale(.95); }
@media (hover: hover) { .tool:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-2px); } }
.tool-icon { --c: var(--s0); width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 4px;
  color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 85%, #fff 15%), var(--c));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.tool-icon .i { width: 23px; height: 23px; }
.tool-icon.s1 { --c: var(--s1); } .tool-icon.s2 { --c: var(--s2); } .tool-icon.s4 { --c: var(--s4); }
.tool-icon.s5 { --c: var(--s5); } .tool-icon.s6 { --c: var(--s6); } .tool-icon.s7 { --c: var(--s7); }
.tool-title { font-weight: 800; font-size: .88rem; }
.tool-sub { font-size: .7rem; color: var(--muted); line-height: 1.5; }
.tool-admin { border-style: dashed; }

.more-install { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: var(--radius-sm);
  color: var(--on-accent); background: var(--grad); text-decoration: none; box-shadow: 0 8px 22px var(--accent-glow); }
.more-install[hidden] { display: none; }
.more-install strong { display: block; font-size: .95rem; }
.more-install small { opacity: .8; font-size: .78rem; }
.more-install-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .28); }

.more-split { display: grid; gap: 4px; }
@media (min-width: 900px) { .more-split { grid-template-columns: 1fr 1fr; gap: 24px; } }
.more-split .list + .list { margin-top: 10px; }
.account-card, .acc-hero { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, color-mix(in srgb, var(--s1) 14%, var(--surface)), var(--surface));
  border: 1px solid var(--hairline); color: inherit; text-decoration: none; margin-bottom: 10px; }
.account-card strong, .acc-id strong { display: block; font-size: 1rem; }
.account-card small, .acc-id small { color: var(--muted); font-size: .78rem; }
.acc-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--s1), var(--s7)); flex: none; }
.acc-avatar .i { width: 22px; height: 22px; }
.acc-hero { padding: 18px; margin-top: 6px; }
.acc-hero .acc-avatar { width: 58px; height: 58px; }
.acc-danger-title { color: var(--bad); }
.acc-danger-list { border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.acc-form { display: flex; flex-direction: column; gap: 8px; }
.acc-form .btn { margin-top: 8px; }
.acc-warning { display: flex; gap: 10px; padding: 12px; border-radius: var(--radius-sm); background: var(--bad-soft); color: var(--text); }
.acc-warning .i { color: var(--bad); flex: none; width: 22px; height: 22px; }
.acc-warning p { margin: 0; line-height: 1.8; font-size: .88rem; }
.btn.danger { background: var(--bad); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--bad) 30%, transparent); }

/* صفحه معرفی: نمایش‌های متحرک به‌جای متن */
.lx-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 56px; }
@media (min-width: 720px) { .lx-stats { grid-template-columns: repeat(4, 1fr); } }
.lx-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 8px; border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--hairline); }
.lx-stats b { font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 900; line-height: 1.2;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-stats span { color: var(--muted); font-size: .82rem; font-weight: 700; }

.lx-viz { position: relative; height: 112px; margin: -4px -4px 4px; border-radius: 18px; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid var(--hairline); }
.lx-viz-spark svg { position: absolute; inset: 12px 12px 8px; width: calc(100% - 24px); height: calc(100% - 20px); }
.lx-viz-spark rect { transform-box: fill-box; transform-origin: bottom; animation: candle 4s var(--ease) var(--d) infinite; }
.lx-viz-spark rect.up { fill: #3ee8a6; } .lx-viz-spark rect.down { fill: #ff6b81; }
.lx-viz-line { fill: none; stroke: #6d5cff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: viz-draw 4s var(--ease) .8s infinite; }
.lx-viz-tag { position: absolute; top: 10px; inset-inline-start: 12px; padding: 2px 10px; border-radius: 999px; font-size: .72rem;
  background: #6d5cff; color: #fff; direction: ltr; animation: viz-pop 4s var(--spring) 1.8s infinite both; }
@keyframes candle { 0% { transform: scaleY(0); } 25%, 85% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
@keyframes viz-draw { 0% { stroke-dashoffset: 1; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes viz-pop { 0%, 10% { opacity: 0; transform: scale(.5); } 20%, 70% { opacity: 1; transform: none; } 85%, 100% { opacity: 0; } }

.lx-viz-shot { position: absolute; inset: 12px 22%; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.lx-viz-shot span { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.lx-viz-shot i { width: 18px; height: 18px; border-radius: 6px; background: var(--accent-soft); }
.lx-viz-shot b { flex: 1; }
.lx-viz-shot em { font-style: normal; color: var(--accent); font-weight: 900; animation: viz-check 3s var(--spring) var(--d) infinite both; }
.lx-viz-shot u { position: absolute; inset-inline: 0; top: 0; height: 2px; background: var(--accent);
  box-shadow: 0 0 12px var(--accent); animation: viz-scan 3s linear infinite; }
@keyframes viz-scan { 0% { top: 4%; } 60%, 100% { top: 96%; opacity: 0; } }
@keyframes viz-check { 0%, 15% { opacity: 0; transform: scale(0); } 30%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.lx-viz-sms, .lx-viz-row { position: absolute; inset-inline: 14px; margin: 0; padding: 8px 12px; border-radius: 14px; font-size: .74rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-viz-sms { top: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--text-2); animation: viz-sms 5s var(--ease) infinite; }
.lx-viz-row { bottom: 14px; display: flex; align-items: center; gap: 8px; background: var(--accent-soft); animation: viz-row 5s var(--spring) infinite; }
.lx-viz-row b { flex: 1; overflow: hidden; text-overflow: ellipsis; } .lx-viz-row em { font-style: normal; font-weight: 900; color: #ff6b81; }
@keyframes viz-sms { 0% { opacity: 0; transform: translateY(-14px); } 12%, 45% { opacity: 1; transform: none; } 60%, 100% { opacity: .35; transform: scale(.96); } }
@keyframes viz-row { 0%, 40% { opacity: 0; transform: translateY(18px) scale(.9); } 55%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.lx-viz-calc { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; }
.lx-viz-total { margin: 0; }
.lx-viz-total b { font-size: 1.8rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-viz-total small { color: var(--muted); font-size: .75rem; }
.lx-viz-tests { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; }
.lx-viz-tests span { padding: 2px 8px; border-radius: 999px; font-size: .68rem; white-space: nowrap; font-weight: 800; background: var(--accent-soft); color: var(--accent);
  animation: viz-check 3.5s var(--spring) var(--d) infinite both; }

.lx-flips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .lx-flips { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.lx-flip { perspective: 900px; min-height: 196px; cursor: pointer; outline: none; }
.lx-flip-in { position: relative; height: 100%; min-height: inherit; transform-style: preserve-3d; transition: transform .7s var(--spring); }
.lx-flip:focus-visible .lx-flip-in, .lx-flip.on .lx-flip-in { transform: rotateY(180deg); }
@media (hover: hover) { .lx-flip:hover .lx-flip-in { transform: rotateY(180deg); } }
.lx-flip-front, .lx-flip-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 16px; }
/* بلند شدن کارت با hover نباید چرخش رو و پشت را بشکند */
.lx-flip .lx-flip-front, .lx-flip .lx-flip-front:hover { transform: rotateY(0deg); }
.lx-flip .lx-flip-back, .lx-flip .lx-flip-back:hover { transform: rotateY(180deg); }
.lx-flip:hover .bubble, .lx-flip.on .bubble, .lx-flip:focus-visible .bubble { animation: none; }
.lx-flip-front { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lx-flip-front .bubble { scale: 1.35; margin-bottom: 8px; animation: float 4s ease-in-out infinite; }
.lx-flip:nth-child(2n) .bubble { animation-delay: -2s; }
.lx-flip-hint { margin-top: 4px; color: var(--accent); font-size: .72rem; font-weight: 800; }
.lx-flip-back { overflow: hidden; }
.lx-flip-back .lx-h { margin-top: 0 !important; font-size: .95rem !important; }
.lx-flip-back p:not(.lx-h) { font-size: .8rem !important; line-height: 1.8 !important; }
@media (max-width: 420px) { .lx-flip-back { padding: 14px 12px; } .lx-flip-back p:not(.lx-h) { font-size: .76rem !important; line-height: 1.7 !important; } }

.lx-steps li { text-align: center; background: none; border: 0; }
.lx-steps .lx-step-no { position: relative; z-index: 1; width: 64px; height: 64px; margin-inline: auto; border-radius: 22px; }
.lx-step-no .i { width: 28px; height: 28px; }
.lx-step-no small { position: absolute; top: -6px; inset-inline-end: -6px; display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--surface); color: var(--accent); font-size: .75rem; font-weight: 900; box-shadow: var(--shadow); }
@media (min-width: 720px) {
  .lx-steps li:not(:last-child)::after { content: ""; position: absolute; top: 54px; inset-inline-start: calc(50% + 40px); width: calc(100% - 68px);
    height: 3px; border-radius: 3px; background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .9s var(--ease) .5s; }
  .lx-steps li.in::after { transform: scaleX(1); }
}

.lx-article h3 { flex: 1; }

.lx-mask { position: relative; width: min(320px, 100%); aspect-ratio: 1.6; padding: 18px; border-radius: 20px; margin-bottom: 10px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; color: #fff; text-align: start;
  background: linear-gradient(135deg, #0f3a2b, #1fbf86 60%, #b8f35c); box-shadow: 0 18px 40px var(--accent-glow);
  animation: hover 6s ease-in-out infinite; }
.lx-mask-chip { position: absolute; top: 18px; inset-inline-start: 18px; width: 40px; height: 30px; border-radius: 7px;
  background: linear-gradient(135deg, #f5d77a, #c9a23a); }
.lx-mask p { display: flex; justify-content: space-between; direction: ltr; margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: .08em; }
.lx-mask span { position: relative; display: inline-grid; }
.lx-mask span > * { grid-area: 1 / 1; font-style: normal; text-align: center; }
.lx-mask span:not(.kept) i { animation: mask-out 6s var(--ease) var(--d) infinite; }
.lx-mask em { opacity: 0; animation: mask-in 6s var(--ease) var(--d) infinite; }
.lx-mask .kept { padding: 0 6px; border-radius: 8px; animation: mask-keep 6s var(--ease) infinite; }
.lx-mask small { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; opacity: .9; }
.lx-mask small .i { width: 14px; height: 14px; }
@keyframes mask-out { 0%, 15% { opacity: 1; filter: none; } 25%, 90% { opacity: 0; filter: blur(4px); } 100% { opacity: 1; } }
@keyframes mask-in { 0%, 18% { opacity: 0; transform: translateY(6px); } 28%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mask-keep { 0%, 50% { background: transparent; } 60%, 90% { background: rgba(255, 255, 255, .22); } 100% { background: transparent; } }

.lx-footer-prices { margin: 0 0 10px; line-height: 2.2; }
.lx-enamad { margin: 16px 0 0; }
.lx-footer-prices a { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .lx-viz-line { stroke-dashoffset: 0; } .lx-viz-sms, .lx-viz-row, .lx-viz-tag, .lx-viz-shot em, .lx-viz-tests span { opacity: 1; }
  .lx-mask em { opacity: 0; } .lx-flip-in { transition: none; }
}
/* ---------- مینی‌اپ دنگ ---------- */
.dg-hero { position: relative; overflow: hidden; margin-top: 4px; padding: 20px 18px 18px; border-radius: var(--radius); color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, #ff7eb6 0%, transparent 55%), radial-gradient(120% 120% at 0% 100%, #a78bfa 0%, transparent 60%), linear-gradient(135deg, #6d4aff, #ff5f8f);
  box-shadow: 0 14px 34px rgba(109, 74, 255, .28); }
.dg-hero h1 { margin: 0; font-size: 1.7rem; font-weight: 900; }
.dg-hero p { margin: 4px 0 0; opacity: .9; }
.dg-hero small { opacity: .85; }
.dg-hero-art { position: absolute; inset-inline-end: 14px; top: 12px; font-size: 1.8rem; letter-spacing: -6px; opacity: .9; }
.dg-code-form { display: flex; gap: 8px; margin-top: 16px; }
.dg-code-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 0; font-weight: 800; letter-spacing: .25em;
  text-transform: uppercase; background: rgba(255, 255, 255, .95); color: #222; }
.dg-code-form .btn { background: #1a1036; color: #fff; box-shadow: none; }
.dg-error { margin: 8px 0 0; font-weight: 700; color: #fff3a8; }
.dg-groups { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 700px) { .dg-groups { grid-template-columns: 1fr 1fr; } }
.dg-group-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .15s var(--spring); }
.dg-group-card:active { transform: scale(.98); }
.dg-group-top { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; }
.dg-group-mid { display: flex; align-items: center; gap: 10px; }
.dg-tag { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; font-size: .74rem; font-weight: 800;
  color: var(--s6); background: color-mix(in srgb, var(--s6) 16%, transparent); }
.dg-pill { align-self: flex-start; font-size: .8rem; font-weight: 800; padding: 4px 12px; border-radius: 99px; }
.dg-pill.pos { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.dg-pill.neg { color: var(--bad); background: var(--bad-soft); }
.dg-pill.even { color: var(--muted); background: var(--surface-2); }
.dg-new, .dg-add { margin-top: 14px; }
.dg-new summary, .dg-add summary { cursor: pointer; font-weight: 800; list-style: none; }
.dg-new summary::-webkit-details-marker, .dg-add summary::-webkit-details-marker { display: none; }
.dg-new[open] summary, .dg-add[open] summary { margin-bottom: 12px; }
.dg-setting { margin-top: 14px; }
.switch-row { cursor: pointer; }

.dg-av { --size: 38px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; }
.dg-letter { display: grid; place-items: center; font-weight: 900; color: #fff; font-size: calc(var(--size) * .42);
  background: linear-gradient(145deg, hsl(var(--h) 75% 62%), hsl(calc(var(--h) + 40) 70% 50%)); }
.dg-letter.waiting { opacity: .55; outline: 2px dashed var(--border); outline-offset: 1px; }
.dg-av.sm { --size: 32px; } .dg-av.xs { --size: 26px; }
.avatar.dg-av { border-radius: 50%; }
.dg-stack { display: inline-flex; padding-inline-start: 6px; }
.dg-stack .dg-av { margin-inline-start: -8px; box-shadow: 0 0 0 2px var(--surface); }
.dg-more { display: grid; place-items: center; font-size: .66rem; font-weight: 800; background: var(--surface-3); color: var(--text-2); }

.dg-head { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: start; margin-top: 4px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, #6d4aff 16%, var(--surface)), color-mix(in srgb, #ff5f8f 10%, var(--surface)));
  border: 1px solid var(--hairline); }
.dg-back { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--text); transform: scaleX(-1); }
.dg-head h1 { margin: 0; font-size: 1.25rem; }
.dg-head-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.dg-invite { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 800; color: #6d4aff; text-decoration: none;
  padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, #6d4aff 12%, transparent); }
.dg-invite .i { width: 14px; height: 14px; }
.dg-head-balance { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dg-head-balance .dg-pill { font-size: .95rem; padding: 6px 14px; }
.dg-tabs { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 12px 0; padding: 4px;
  border-radius: 14px; background: var(--surface-2); }
.dg-tabs a { text-align: center; padding: 9px 4px; border-radius: 11px; color: var(--text-2); text-decoration: none; font-weight: 700; font-size: .86rem; }
.dg-tabs a.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.dg-expenses .row-end small { font-size: .72rem; }

.dg-usd { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--s6) 14%, var(--surface)), var(--surface)); }
.dg-usd h2 { margin: 0 0 4px; font-size: 1rem; }
.dg-usd p { margin: 0; }
.dg-balances, .dg-transfers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dg-balances li { display: flex; align-items: center; gap: 10px; }
.dg-balances .dg-name { flex: 1; font-weight: 700; }
.dg-balances .pos, .dg-balances .neg { display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
.dg-balances small { font-size: .72rem; }
.dg-money { display: flex; flex-direction: column; align-items: flex-end; }
.dg-money small { color: var(--muted); font-size: .72rem; }
.dg-transfers li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.dg-flow { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dg-transfers b small { color: var(--muted); font-weight: 600; }
.dg-actions { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.dg-settlement .row-end { gap: 4px; }

.dg-chat { display: flex; flex-direction: column; min-height: 55vh; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; }
.dg-messages { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px; max-height: 60vh; overflow-y: auto;
  background: radial-gradient(80% 60% at 100% 0%, color-mix(in srgb, #6d4aff 7%, transparent), transparent 70%); }
.dg-chat-empty { margin: auto; }
.dg-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 85%; }
.dg-msg.mine { align-self: flex-start; flex-direction: row-reverse; }
.dg-msg:not(.mine) { align-self: flex-end; }
.dg-bubble { padding: 8px 12px; border-radius: 16px; background: var(--surface-2); border-end-end-radius: 6px; }
.dg-msg.mine .dg-bubble { color: #fff; background: linear-gradient(135deg, #6d4aff, #8e6bff); border-end-end-radius: 16px; border-end-start-radius: 6px; }
.dg-bubble b { display: block; font-size: .74rem; color: #6d4aff; }
.dg-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.dg-bubble time { display: block; font-size: .66rem; opacity: .65; margin-top: 2px; }
.dg-chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--hairline); background: var(--surface); }
.dg-chat-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; }

.dg-invite-card { text-align: center; }
.dg-qr { display: grid; place-items: center; margin: 12px auto; padding: 12px; width: fit-content; border-radius: 18px; background: #fff;
  box-shadow: 0 10px 30px rgba(109, 74, 255, .18); }
.dg-qr img { display: block; width: 200px; height: 200px; }
.dg-code { font-size: 1.8rem; font-weight: 900; letter-spacing: .3em; margin: 6px 0 12px; color: #6d4aff; }
.dg-invite-card .token-row { justify-content: center; }
.dg-add-member { margin-top: 10px; }
.dg-join-hero .dg-stack { vertical-align: middle; }
.dg-join-form, .dg-join-login { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.dg-join-form h2 { margin: 0; font-size: 1rem; }
.dg-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dg-pick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; border: 2px solid var(--hairline);
  background: var(--surface-2); cursor: pointer; text-align: center; font-weight: 700; font-size: .85rem; }
.dg-pick-item input { position: absolute; opacity: 0; pointer-events: none; }
.dg-pick-item:has(input:checked) { border-color: #6d4aff; background: color-mix(in srgb, #6d4aff 10%, var(--surface)); }
.dg-new-name { display: none; }
.dg-join-form:has(input[value="new"]:checked) .dg-new-name, .dg-join-form:not(:has(.dg-pick)) .dg-new-name { display: flex; flex-direction: column; }
.dg-file { padding: 10px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface-2); }
.dg-receipt-note { line-height: 1.8; }

/* ---------- وزیر ویژه (/premium) ---------- */
.premium-plans { display: flex; flex-direction: column; gap: 10px; }
.premium-plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--hairline); background: var(--surface); cursor: pointer; }
.premium-plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.premium-plan .row-main { flex: 1; display: flex; flex-direction: column; }
.premium-plan small { color: var(--muted); }
.premium-price { white-space: nowrap; }
button.premium-plan { width: 100%; font: inherit; color: inherit; text-align: right; }
.premium-nudge { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(135deg, #1b1240, #3b1f7a); color: #f5e9c8; font-weight: 700; font-size: .9rem; }
.premium-nudge .i { width: 18px; height: 18px; color: #f2c14e; flex: none; }
.admin-ad { gap: 10px; align-items: center; }
.admin-ad.off { opacity: .55; }
.admin-ad-img { border-radius: 10px; object-fit: cover; }

/* ---------- صحنه‌های متحرک وزیر ویژه (شخصیت‌های دارالفنون) ---------- */
.pz-scene { position: relative; height: 190px; width: 100%; overflow: hidden; border-radius: 24px;
  background: radial-gradient(120% 90% at 50% 100%, #3b1f7a 0%, #1b1240 55%, #0e0a24 100%); isolation: isolate; }
.pz-k-promo { height: 150px; border-radius: 20px 20px 0 0; }
.pz-k-hearts { height: 150px; background: radial-gradient(120% 90% at 50% 100%, #5a1630 0%, #2a0c1e 60%, #13060f 100%); }
.pz-rays { position: absolute; inset: -60%; z-index: -1; opacity: .35;
  background: repeating-conic-gradient(from 0deg, rgba(242,193,78,.55) 0 8deg, transparent 8deg 22deg);
  animation: pz-spin 18s linear infinite; }
.pz-glow { position: absolute; left: 50%; bottom: -40px; width: 220px; height: 220px; translate: -50% 0; z-index: -1;
  border-radius: 50%; background: radial-gradient(circle, rgba(242,193,78,.55), transparent 65%); animation: pz-breathe 2.6s ease-in-out infinite; }
.pz-cast { position: absolute; bottom: 0; line-height: 0; }
.pz-cast img { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.pz-hero { position: absolute; left: 50%; bottom: 6px; width: 118px; translate: -50% 0;
  animation: pz-land .7s cubic-bezier(.2,1.6,.4,1) both, pz-bob 2.2s ease-in-out .9s infinite; transform-origin: 50% 100%; }
.pz-hero .pz-cast { position: relative; }
.pz-k-promo .pz-hero { width: 96px; }
.pz-crown { position: absolute; left: 50%; top: -22px; width: 54px; translate: -50% 0; z-index: 2;
  animation: pz-crown 1.1s cubic-bezier(.3,1.5,.5,1) .55s both, pz-tilt 2.2s ease-in-out 1.7s infinite; }
.pz-crown-svg { width: 100%; height: auto; filter: drop-shadow(0 0 10px rgba(242,193,78,.8)); }
.pz-side { width: 74px; animation: pz-pop .5s cubic-bezier(.2,1.6,.4,1) both, pz-hop 1.4s ease-in-out infinite; }
.pz-left { left: 14%; animation-delay: .2s, .9s; }
.pz-right { right: 14%; animation-delay: .35s, 1.2s; }
.pz-far-left { left: 1%; width: 62px; animation-delay: .45s, 1.5s; }
.pz-far-right { right: 1%; width: 62px; animation-delay: .6s, 1.05s; }
.pz-k-promo .pz-left { left: 6%; } .pz-k-promo .pz-right { right: 6%; }
.pz-spark { position: absolute; width: 8px; height: 8px; border-radius: 2px; rotate: 45deg; background: #ffe9a3;
  left: calc(8% + var(--i) * 9%); top: var(--y);
  box-shadow: 0 0 10px #f2c14e; animation: pz-twinkle 1.6s ease-in-out calc(var(--i) * .17s) infinite; }
.pz-coin { position: absolute; top: -20px; width: 14px; height: 14px; border-radius: 50%;
  left: calc(10% + var(--i) * 15%); background: radial-gradient(circle at 35% 35%, #fff3c4, #f2c14e 45%, #b67a12);
  box-shadow: 0 0 0 2px #8a5a0b inset; animation: pz-rain 2.8s linear calc(var(--i) * .45s) infinite; }
.pz-sad { width: 104px; animation: pz-pop .5s both, pz-sigh 2.4s ease-in-out .6s infinite; }
.pz-heart { position: absolute; right: 18%; top: 22%; width: 64px; animation: pz-heart 1.2s ease-in-out .4s infinite; }
.pz-heart svg { width: 100%; height: auto; filter: drop-shadow(0 0 12px rgba(255,77,109,.8)); }
.pz-heart b { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 6px;
  color: #fff; font-size: 1.6rem; font-weight: 900; }
.pz-btn { background: linear-gradient(135deg, #f2c14e, #e0902a); color: #2a1600; border: 0; font-weight: 900;
  box-shadow: 0 4px 0 #a3620f; animation: pz-nudge 2.4s ease-in-out 1.5s infinite; }
@keyframes pz-spin { to { rotate: 360deg; } }
@keyframes pz-breathe { 50% { scale: 1.12; opacity: .8; } }
@keyframes pz-land { 0% { transform: translateY(-180px) scaleY(1.1); } 70% { transform: translateY(0) scale(1.15, .85); } 100% { transform: none; } }
@keyframes pz-bob { 50% { transform: translateY(-6px) scale(1.02, .98); } }
@keyframes pz-crown { 0% { transform: translateY(-160px) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes pz-tilt { 50% { transform: rotate(-8deg) translateY(-2px); } }
@keyframes pz-pop { from { transform: translateY(40px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pz-hop { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -14px; } }
@keyframes pz-twinkle { 0%, 100% { scale: .2; opacity: 0; } 50% { scale: 1; opacity: 1; } }
@keyframes pz-rain { 0% { transform: translateY(0) rotateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(240px) rotateY(720deg); opacity: 0; } }
@keyframes pz-sigh { 50% { transform: translateY(4px) rotate(-3deg); } }
@keyframes pz-heart { 0%, 100% { scale: 1; } 15% { scale: 1.18; } 30% { scale: .96; } 45% { scale: 1.1; } }
@keyframes pz-nudge { 0%, 85%, 100% { rotate: 0deg; } 88% { rotate: -4deg; } 92% { rotate: 4deg; } 96% { rotate: -2deg; } }
@media (prefers-reduced-motion: reduce) {
  .pz-scene *, .pz-btn { animation: none !important; }
}

/* کارت تبلیغ صفحه پایان درس */
.sc-ad { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; margin: 14px 0 6px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow);
  color: inherit; animation: pop .45s ease both .3s; }
.sc-ad-label { position: absolute; top: 8px; left: 12px; font-size: .7rem; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 8px; padding: 0 6px; }
.sc-ad-img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; }
.sc-ad-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sc-ad-body small { color: var(--text-2); line-height: 1.7; }
.sc-ad-free { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.sc-ad-free .i { width: 14px; height: 14px; }
.sc-ad-house { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden;
  background: linear-gradient(180deg, #1b1240, #120c2c); color: #f5e9c8; border-color: #3b1f7a; }
.sc-ad-house .sc-ad-body { padding: 4px 16px 0; }
.sc-ad-house .sc-ad-body small { color: #d9cdf5; }
.sc-ad-house .pz-btn { margin: 10px 16px 16px; align-self: stretch; text-align: center; }
.sc-out-premium { display: flex; flex-direction: column; gap: 0; border-radius: 20px; overflow: hidden;
  margin: 8px 0; background: #2a0c1e; }
.sc-out-premium .pz-scene { border-radius: 0; }
.sc-out-premium .pz-btn { margin: 10px 14px 14px; text-align: center; }

/* ---------- وزیر ویژه: نشان تاج نوار بالا، بنر «بیشتر» و صفحه /premium ---------- */
.pz-chip { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; font-weight: 900; font-size: .82rem; color: #2a1600;
  background: linear-gradient(135deg, #ffe08a, #f2b13a); box-shadow: 0 3px 0 #b8781a, 0 6px 18px rgba(242,177,58,.35);
  animation: pz-chip 3.2s ease-in-out infinite; }
.pz-chip svg { width: 18px; height: 14px; }
.pz-chip.on { color: #ffe9a3; background: linear-gradient(135deg, #3b1f7a, #1b1240); box-shadow: 0 0 0 1px #f2c14e inset, 0 6px 18px rgba(59,31,122,.4); animation: none; }
@keyframes pz-chip { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-6deg) scale(1.06); } 94% { transform: rotate(5deg) scale(1.06); } 97% { transform: rotate(-2deg); } }

.pz-banner { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px;
  border-radius: 22px; overflow: hidden; color: #f5e9c8; isolation: isolate;
  background: radial-gradient(120% 140% at 90% 0%, #5b34b5 0%, #2a1866 45%, #140d33 100%);
  box-shadow: 0 12px 30px rgba(27,18,64,.35); }
.pz-banner::before { content: ""; position: absolute; inset: -50%; z-index: -1; opacity: .25;
  background: repeating-conic-gradient(rgba(242,193,78,.6) 0 7deg, transparent 7deg 20deg); animation: pz-spin 22s linear infinite; }
.pz-banner .row-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pz-banner strong { font-size: 1.1rem; font-weight: 900; color: #ffe08a; }
.pz-banner small { color: #d9cdf5; }
.pz-banner .i { color: #ffe08a; }
.pz-banner-cast { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); animation: pz-bob 2.2s ease-in-out infinite; }
.pz-banner-crown { position: absolute; top: 4px; right: 34px; width: 34px; z-index: 2; animation: pz-tilt 2.2s ease-in-out infinite; }
.pz-banner-crown svg { width: 100%; height: auto; }

/* با :has به‌جای کلاس body: hx-boost کلاس body را عوض نمی‌کند، پس رسیدن با لینک پس‌زمینه روشن می‌ماند */
body:has(.pz-main) { background: #0e0a24; }
body:has(.pz-main) .screen { background: radial-gradient(140% 60% at 50% 0%, #2a1866 0%, #120c2c 55%, #0e0a24 100%); }
.pz-main { max-width: 640px; margin: 0 auto; padding: calc(var(--safe-t, 0px) + 14px) 16px 48px; color: #f5e9c8;
  display: flex; flex-direction: column; gap: 22px; }
.pz-back { display: inline-flex; align-items: center; gap: 4px; color: #d9cdf5; font-weight: 800; align-self: flex-start; }
.pz-hero-head { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.pz-hero-head .pz-scene { height: 220px; box-shadow: 0 0 0 1px rgba(242,193,78,.25), 0 20px 60px rgba(0,0,0,.45); }
.pz-title { font-size: 2.3rem; font-weight: 900; letter-spacing: -.02em; margin-top: 6px;
  background: linear-gradient(90deg, #fff3c4, #f2c14e 40%, #fff3c4 60%, #e0902a); -webkit-background-clip: text; background-clip: text;
  color: transparent; background-size: 200% 100%; animation: shimmer 4s linear infinite; }
.pz-tagline { font-size: 1.15rem; font-weight: 900; color: #ffe08a; }
.pz-sub { color: #cfc3ec; line-height: 1.9; font-size: .93rem; }
.pz-status { align-self: center; display: inline-flex; gap: 6px; align-items: center; padding: 6px 14px; border-radius: 999px;
  background: rgba(62,232,166,.12); color: #3ee8a6; font-weight: 800; }
.pz-section h2 { font-size: 1.15rem; font-weight: 900; margin-bottom: 12px; color: #fff; }
.pz-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pz-feature { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(242,193,78,.18);
  animation: rise .5s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(var(--i) * 60ms + .3s); }
.pz-feature strong { color: #fff; font-weight: 900; }
.pz-feature small { color: #b9add9; line-height: 1.7; }
.pz-feature-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 4px;
  background: linear-gradient(135deg, #ffe08a, #e0902a); color: #2a1600; box-shadow: 0 3px 0 #a3620f; }
.pz-feature-ic .i { width: 20px; height: 20px; }
.pz-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pz-plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 8px 14px;
  border-radius: 20px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.12); color: inherit;
  font: inherit; cursor: pointer; text-align: center; transition: transform .2s, border-color .2s, box-shadow .2s; }
.pz-plan input { position: absolute; opacity: 0; pointer-events: none; }
.pz-plan strong { font-weight: 900; color: #fff; }
.pz-price { display: flex; flex-direction: column; align-items: center; line-height: 1.2; color: #ffe08a; }
.pz-price b { font-size: 1.6rem; font-weight: 900; }
.pz-price i { font-style: normal; font-size: .72rem; color: #e9d8a6; }
.pz-plan small { color: #b9add9; font-size: .78rem; }
.pz-plan:has(input:checked), .pz-plan:hover { border-color: #f2c14e; transform: translateY(-3px);
  box-shadow: 0 0 0 4px rgba(242,193,78,.18), 0 14px 30px rgba(0,0,0,.35); }
.pz-plan.best { background: linear-gradient(180deg, rgba(242,193,78,.18), rgba(255,255,255,.04)); }
.pz-best { position: absolute; top: -11px; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 900;
  color: #2a1600; background: linear-gradient(135deg, #ffe08a, #f2b13a); white-space: nowrap; animation: pz-nudge 2.4s ease-in-out infinite; }
.pz-saving { font-size: .72rem; font-weight: 900; color: #3ee8a6; }
.pz-buy { grid-column: 1 / -1; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; border: 0; border-radius: 18px; font: inherit; font-weight: 900; font-size: 1.05rem; cursor: pointer;
  color: #2a1600; background: linear-gradient(135deg, #ffe08a, #f2b13a); box-shadow: 0 5px 0 #a3620f, 0 14px 30px rgba(242,177,58,.3); }
.pz-buy:active { transform: translateY(4px); box-shadow: 0 1px 0 #a3620f; }
.pz-buy .i { width: 18px; height: 18px; }
.pz-buy.alt { color: #fff; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px #f2c14e; }
.pz-buy.alt:active { box-shadow: inset 0 0 0 2px #f2c14e; }
.pz-note { grid-column: 1 / -1; color: #b9add9; font-size: .85rem; text-align: center; }
.pz-compare { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 18px; overflow: hidden;
  background: rgba(255,255,255,.04); font-size: .9rem; }
.pz-compare th, .pz-compare td { padding: 10px 12px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.06); }
.pz-compare td:first-child { text-align: right; color: #d9cdf5; }
.pz-compare th { color: #b9add9; font-weight: 800; }
.pz-compare .pz-col { background: rgba(242,193,78,.12); color: #ffe08a; font-weight: 900; }
.pz-support { display: flex; gap: 6px; align-items: center; justify-content: center; }
.pz-support a { color: #ffe08a; }
.pz-terms { color: #8f84b3; font-size: .8rem; line-height: 1.9; padding-inline-start: 18px; }
@media (max-width: 380px) { .pz-plans { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .pz-chip, .pz-banner::before, .pz-banner-cast, .pz-banner-crown, .pz-title, .pz-feature, .pz-best { animation: none !important; }
}
.scenario { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.scenario div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 14px; background: var(--surface-2, var(--surface)); border: 1px solid var(--hairline); }
.scenario small { color: var(--muted); font-size: .78rem; }
.scenario .good { color: var(--good); }
.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: 160px; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.compare-card dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 8px 0 0; font-size: .88rem; }
.compare-card dt { color: var(--muted); }
.compare-card dd { margin: 0; text-align: left; }
.compare-card.best { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 30%, transparent); }
@media (max-width: 420px) { .scenario { grid-template-columns: 1fr; } }
.family-invite { align-items: center; text-align: center; }
.family-code { font-size: 2rem; font-weight: 900; letter-spacing: .25em; color: var(--accent); }
.family-total { text-align: center; }
.family-networth { font-size: 1.8rem; font-weight: 900; }
.family-row { gap: 10px; }
.family-row .progress { margin-top: 6px; }
.sc-row { position: relative; }
.sc-premium { position: absolute; top: -10px; left: calc(50% + var(--x, 0px) + 18px); z-index: 2; font-size: 1.1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); animation: pz-tilt 2.4s ease-in-out infinite; }
.premium-pill { padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 900; color: #2a1600;
  background: linear-gradient(135deg, #ffe08a, #f2b13a); white-space: nowrap; }

.tabbar .side-premium { display: none; }

/* ==============================================================
/* =====================================================================
   قیمت‌های من: کارت با قیمت، تغییر روز و نمودار کوچک ۳۰ روز؛ رنگ کارت با جهت تغییر
   ===================================================================== */
.watch-tools { display: flex; align-items: center; gap: 10px; }
.unit-toggle.mini { --n: 2; background: var(--surface-2); border-color: var(--hairline); }
.unit-toggle.mini button { color: var(--text-2); font-size: .72rem; padding: 3px 11px; }
.unit-toggle.mini button[aria-selected="true"] { color: var(--on-accent); }
.watch-card, a.watch-card { --dir: var(--muted); position: relative; overflow: hidden; min-width: 168px;
  padding: 12px 14px 0; gap: 6px; border-radius: 20px;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--dir) 7%, var(--surface))); }
.watch-card.up { --dir: var(--good); }
.watch-card.down { --dir: var(--bad); }
.watch-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.watch-card strong { font-size: 1.15rem; }
.watch-card .watch-change { padding: 2px 7px; border-radius: 999px; font-weight: 700;
  background: color-mix(in srgb, var(--dir) 14%, transparent); }
.watch-spark { display: block; width: calc(100% + 28px); height: 36px; margin: 2px -14px 0; color: var(--dir); }
.watch-spark .line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.watch-spark .area { fill: currentColor; opacity: .12; }

/* نوار بارگذاری بالای صفحه هنگام ناوبری یا ارسال فرم (app.js: is-loading) */
html.is-loading::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 10000;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 40% 100% no-repeat,
    color-mix(in srgb, var(--accent) 25%, transparent);
  animation: load-bar 1s linear infinite;
  pointer-events: none;
}
html.is-loading { cursor: progress; }
@keyframes load-bar { from { background-position: 250% 0, 0 0; } to { background-position: -150% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) {
  html.is-loading::before { animation: none; background: var(--accent); opacity: .7; }
}

/* ---------- پشتیبانی و تیکت‌ها ---------- */
.support-faq { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.support-faq p { color: var(--text-2); line-height: 1.9; }
.support-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.support-body { white-space: pre-line; line-height: 1.9; overflow-wrap: anywhere; margin-top: 10px; }
.support-reply { border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--hairline)); }
.support-reply h2 { display: flex; gap: 6px; align-items: center; font-size: 1rem; }
.support-ticket, .support-reply { margin-bottom: 12px; }
.support-form .fields, .support-draft .fields { display: flex; flex-direction: column; gap: 12px; }
.support-form textarea, .support-draft textarea { min-height: 120px; resize: vertical; }
.support-draft { width: 100%; }
.support-draft .small .i, .support-form .small .i, .chat-disclaimer .i { width: 14px; height: 14px; vertical-align: -2px; }
.support-preview { white-space: normal; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.admin-tabs { margin-bottom: 14px; }
.admin-tabs .pill { margin-inline-start: 4px; }
.admin-filter { margin-bottom: 12px; }
.admin-filter .chip.on span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
/* ---------- کارت مغایرت مانده (پیامکی که نرسید) ---------- */
.gap-card { display: flex; flex-direction: column; gap: 8px; }
.gap-head { display: flex; align-items: center; gap: 10px; }
.gap-card p { margin: 0; line-height: 1.7; }
.gap-part { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.gap-part + .gap-part, .gap-more .gap-part { padding-top: 12px; border-top: 1px solid var(--hairline); }
.gap-more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }

/* ---------- وزیر ویژه: بودجه‌بندی آینده، اهداف مالی و کارت‌های صفحه اصلی ----------
   زبان بصری همان «وزیر ویژه»: بنفش شب و طلا. سطح قهرمان در هر دو حالت تیره است. */
:root {
  --pro-1: #0e0a24;
  --pro-2: #1b1240;
  --pro-3: #3b1f7a;
  --gold: #f2c14e;
  --gold-2: #ffe08a;
  --gold-3: #e0902a;
  --pro-text: #f5e9c8;
  --pro-muted: #b9add9;
}
.pro-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 900; color: #2a1600; background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 2px 0 #b8781a, 0 4px 14px rgba(242, 177, 58, .35); }
.pro-chip svg { width: 15px; height: 12px; }

/* سطح قهرمان: گرادیان بنفش، شفق متحرک و لبه طلایی */
.pro-hero, .pro-tile-budget, .pro-locked { position: relative; isolation: isolate; overflow: hidden; color: var(--pro-text);
  background: radial-gradient(140% 120% at 100% 0%, var(--pro-3) 0%, var(--pro-2) 45%, var(--pro-1) 100%);
  border: 1px solid rgba(242, 193, 78, .22);
  box-shadow: 0 1px 0 rgba(255, 233, 163, .12) inset, 0 18px 50px rgba(27, 18, 64, .45); }
.pro-hero { border-radius: 28px; padding: 18px 18px 20px; margin-bottom: 14px; text-align: center;
  animation: pro-rise .6s var(--ease) both; }
.pro-aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.pro-aurora span { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; filter: blur(42px); opacity: .55;
  animation: pro-drift 14s ease-in-out infinite alternate; }
.pro-aurora span:nth-child(1) { background: #7b4dff; top: -30%; right: -15%; }
.pro-aurora span:nth-child(2) { background: var(--gold); bottom: -45%; left: -20%; opacity: .28; animation-duration: 18s; }
.pro-aurora span:nth-child(3) { background: #ff5fa2; top: 30%; left: 35%; width: 35%; opacity: .2; animation-duration: 11s; }
.pro-hero-top { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pro-hero-top h1 { font-size: 1.15rem; font-weight: 900; color: #fff; }
.pro-month { font-size: .78rem; color: var(--pro-muted); font-weight: 700; }
.pro-hero-sub { margin: 8px auto 0; max-width: 34em; font-size: .85rem; line-height: 1.8; color: var(--pro-muted); }
.pro-hero.compact { padding-bottom: 16px; }
.pro-hero .pro-daily { margin-top: 12px; }

/* حلقه پیشرفت */
.pro-ring { width: 100%; height: auto; display: block; rotate: -90deg; overflow: visible; }
.pro-ring-track { fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: 9; }
.pro-ring-bar { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: var(--p) 100;
  animation: pro-ring 1.4s var(--ease) both .15s; }
.pro-ring.tone-gold .pro-ring-bar { stroke: var(--gold); filter: drop-shadow(0 0 6px rgba(242, 193, 78, .7)); }
.pro-ring.tone-bad .pro-ring-bar { stroke: #ff6b81; filter: drop-shadow(0 0 6px rgba(255, 107, 129, .7)); }
.pro-ring.big .pro-ring-track, .pro-ring.big .pro-ring-bar { stroke-width: 7; }
.pro-gauge { position: relative; width: min(220px, 62vw); margin: 14px auto 4px; }
.pro-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pro-gauge-center small { font-size: .78rem; color: var(--pro-muted); font-weight: 700; }
.pro-gauge-center strong { font-size: 1.55rem; font-weight: 900; color: #fff; letter-spacing: -.5px;
  text-shadow: 0 0 24px rgba(242, 193, 78, .35); }
.pro-gauge-center strong .amt small { font-size: .55em; color: var(--pro-muted); margin-inline-start: 3px; }
.pro-gauge-center > span { font-size: .78rem; color: var(--pro-muted); }
.pro-daily { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pro-daily strong { font-size: 1.15rem; font-weight: 900;
  background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--gold-2)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: pro-shine 4s linear infinite; }
.pro-daily small { font-size: .78rem; color: var(--pro-muted); }
.pro-daily small a { color: var(--gold-2); }
.pro-note { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 14px;
  text-align: start; font-size: .8rem; line-height: 1.8; color: var(--pro-text);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(242, 193, 78, .18); }
.pro-note .i { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--gold); }

/* سه آمار زیر قهرمان */
.pro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.pro-stat { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow); animation: pro-rise .5s var(--ease) both .1s; }
.pro-stat small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.pro-stat strong { font-size: .86rem; font-weight: 900; line-height: 1.6; }
.pro-stat.gold { border-color: rgba(242, 193, 78, .45); background: linear-gradient(160deg, rgba(242, 193, 78, .14), var(--surface) 70%); }
.pro-stat.gold strong { color: var(--gold); }
:root[data-theme="light"] .pro-stat.gold strong { color: #a8650a; }
.pro-stat.bad strong { color: var(--bad); }
.pro-aside { margin: 4px 4px 10px; }
.pro-section { font-size: 1rem; font-weight: 900; margin: 18px 4px 4px; }
.pro-section.small { font-size: .85rem; margin: 14px 0 8px; display: flex; align-items: center; gap: 6px; }
.pro-section .i { width: 16px; height: 16px; color: var(--gold); }

/* سقف هر دسته */
.pro-lines { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0 0 8px; padding: 0; }
.pro-line { --c: var(--s0); padding: 12px 14px 12px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow);
  animation: pro-rise .5s var(--ease) both calc(.15s + var(--i) * .06s); }
.pro-line-head { display: flex; align-items: center; gap: 10px; }
.pro-line-head .bubble { width: 36px; height: 36px; border-radius: 12px; }
.pro-line-name { flex: 1; font-weight: 800; display: flex; flex-direction: column; }
.pro-line-name small { font-weight: 600; font-size: .72rem; color: var(--warn); }
.pro-pill { font-size: .7rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pro-pill.ok { color: var(--good); background: var(--accent-soft); }
.pro-pill.fast { color: var(--warn); background: var(--warn-soft); }
.pro-pill.over { color: var(--bad); background: var(--bad-soft); }
.pro-bar { position: relative; height: 10px; margin: 12px 0 8px; border-radius: 999px; background: var(--surface-3); overflow: visible; }
.pro-bar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); border-radius: inherit;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 60%, #fff));
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 55%, transparent); animation: pro-fill 1s var(--ease) both .3s; }
.pro-line.is-fast .pro-bar-fill { --c: var(--warn); }
.pro-line.is-over .pro-bar-fill { --c: var(--bad); }
.pro-bar-today { position: absolute; top: -4px; bottom: -4px; inset-inline-start: var(--today); width: 2px; border-radius: 2px;
  background: var(--text); opacity: .55; }
.pro-line-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--text-2); }
.pro-line-foot b { color: var(--text); font-weight: 900; }
.pro-line.s1 { --c: var(--s1); } .pro-line.s2 { --c: var(--s2); } .pro-line.s3 { --c: var(--s3); } .pro-line.s4 { --c: var(--s4); }
.pro-line.s5 { --c: var(--s5); } .pro-line.s6 { --c: var(--s6); } .pro-line.s7 { --c: var(--s7); } .pro-line.s8 { --c: var(--s8); }

/* کارت ساده و فرم هدف پس‌انداز */
.pro-card { padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow); margin: 12px 0; }
.pro-card h2 { font-size: .95rem; font-weight: 900; }
.pro-big { font-size: 1.5rem; font-weight: 900; color: var(--gold); }
:root[data-theme="light"] .pro-big { color: #a8650a; }
.pro-goal-form label { display: flex; align-items: center; justify-content: space-between; font-weight: 800; }
.pro-goal-form input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 18px 0 10px;
  min-height: 0; padding: 0; border: 0; border-radius: 999px; box-shadow: none; cursor: pointer;
  background: linear-gradient(90deg, var(--gold-3), var(--gold), var(--gold-2)); }
.pro-goal-form input[type="range"]:focus { box-shadow: 0 0 0 4px rgba(242, 193, 78, .25);
  background: linear-gradient(90deg, var(--gold-3), var(--gold), var(--gold-2)); }
.pro-goal-form input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gold); box-shadow: 0 0 0 6px rgba(242, 193, 78, .2), 0 4px 10px rgba(0, 0, 0, .35); }
.pro-goal-form input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gold); box-shadow: 0 0 0 6px rgba(242, 193, 78, .2); }
.pro-btn { background: linear-gradient(135deg, var(--gold-2), var(--gold) 50%, var(--gold-3)); color: #2a1600; border: 0;
  font-weight: 900; box-shadow: 0 4px 0 #a3620f, 0 10px 24px rgba(242, 177, 58, .3); margin-top: 10px; }

/* اهداف مالی */
.pro-goal { padding: 16px; border-radius: 26px; margin-bottom: 14px; background: var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow); animation: pro-rise .55s var(--ease) both calc(.1s + var(--i) * .08s); }
.pro-goal-head { display: flex; align-items: flex-start; gap: 14px; }
.pro-goal-ring { position: relative; width: 84px; flex: none; }
.pro-goal-ring .pro-ring-track { stroke: var(--surface-3); }
.pro-goal-ring b, .pro-mini-gauge b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: .95rem; }
.pro-goal-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pro-goal-title h2 { font-size: 1.1rem; font-weight: 900; }
.pro-goal-title p { margin: 0; }
.pro-goal-title strong { font-size: 1.05rem; font-weight: 900; }
.pro-goal-title p small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; }
.pro-goal-eta { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 14px;
  font-weight: 900; color: var(--pro-text); background: linear-gradient(120deg, var(--pro-3), var(--pro-2));
  border: 1px solid rgba(242, 193, 78, .3); }
.pro-goal-eta .i { width: 18px; height: 18px; color: var(--gold); flex: none; }
.pro-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; padding-top: 8px; }
.pro-path:nth-child(3) { grid-column: 1 / -1; }
.pro-path:only-child { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .pro-paths { grid-template-columns: repeat(3, 1fr); }
  .pro-path:nth-child(3):not(:only-child) { grid-column: auto; }
}
.pro-path { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px;
  border-radius: 18px; background: var(--surface-2); border: 1px solid var(--hairline); }
.pro-path.best { background: linear-gradient(165deg, rgba(242, 193, 78, .16), var(--surface-2) 65%);
  border-color: rgba(242, 193, 78, .55); box-shadow: 0 0 0 1px rgba(242, 193, 78, .25), 0 10px 26px rgba(242, 177, 58, .14); }
.pro-path.warn { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.pro-path-badge { position: absolute; top: -9px; inset-inline-end: 12px; padding: 2px 9px; border-radius: 999px;
  font-size: .68rem; font-weight: 900; color: #2a1600; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.pro-path-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(242, 193, 78, .14); color: var(--gold); }
:root[data-theme="light"] .pro-path-icon { color: #a8650a; }
.pro-path-icon .i { width: 18px; height: 18px; }
.pro-path strong { font-size: 1.15rem; font-weight: 900; margin-top: 4px; }
.pro-path-name { font-weight: 800; font-size: .85rem; }
.pro-path small { color: var(--text-2); font-size: .74rem; line-height: 1.8; }
.pro-warn { color: var(--bad); display: block; }
.pro-deadline { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px; border-radius: 14px;
  background: var(--accent-soft); font-size: .82rem; line-height: 1.8; }
.pro-deadline.warn { background: var(--warn-soft); }
.pro-deadline .i { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.pro-deadline.warn .i { color: var(--warn); }
.pro-news ul { margin: 0; padding: 0 18px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: .84rem; }

/* صفحه اصلی */
.pro-home { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; margin: 0 0 14px; }
.pro-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 24px; color: inherit;
  text-decoration: none; transition: transform .2s var(--ease); animation: pro-rise .55s var(--ease) both; }
.pro-tile:active { transform: scale(.98); }
.pro-tile-goal { background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow); animation-delay: .08s; }
.pro-tile-head { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 800; }
.pro-tile-budget .pro-tile-head span { color: var(--pro-muted); }
.pro-tile-goal .pro-tile-head .i { width: 16px; height: 16px; color: var(--gold); }
.pro-tile-body { display: flex; align-items: center; gap: 12px; }
.pro-tile-body.empty { flex-direction: column; align-items: flex-start; gap: 4px; font-size: .85rem; }
.pro-tile-body.empty span { color: var(--gold); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.pro-tile-body.empty .i { width: 15px; height: 15px; }
.pro-mini-gauge { position: relative; width: 64px; flex: none; }
.pro-tile-goal .pro-ring-track { stroke: var(--surface-3); }
.pro-tile-budget .pro-mini-gauge b { color: #fff; }
.pro-tile-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pro-tile-text small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.pro-tile-budget .pro-tile-text small, .pro-tile-budget .pro-tile-text span { color: var(--pro-muted); }
.pro-tile-text strong { font-size: 1.05rem; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-tile-budget .pro-tile-text strong { color: #fff; }
.pro-tile-text span { font-size: .72rem; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.pro-tile-text span .i { width: 13px; height: 13px; color: var(--gold); }
.pro-locked { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 0 0 14px; border-radius: 24px;
  text-decoration: none; animation: pro-rise .55s var(--ease) both; }
.pro-locked-preview { display: flex; align-items: center; gap: 10px; flex: none; filter: blur(3px) saturate(1.2); opacity: .75; }
.pro-locked-preview .pro-mini-gauge b, .pro-locked-preview strong { color: #fff; }
.pro-locked-preview .pro-tile-text small, .pro-locked-preview .pro-tile-text span { color: var(--pro-muted); }
.pro-locked-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pro-locked-body strong { font-size: 1rem; font-weight: 900; color: #fff; }
.pro-locked-body small { font-size: .78rem; color: var(--pro-muted); line-height: 1.8; }
.pro-locked-body .pz-btn { padding: 8px 14px; font-size: .82rem; display: inline-flex; align-items: center; gap: 6px; }
.pro-locked-body .pz-btn .i { width: 15px; height: 15px; }
@media (max-width: 420px) {
  .pro-home { grid-template-columns: 1fr; }
  .pro-locked { flex-direction: column; align-items: stretch; }
  .pro-locked-preview { justify-content: center; }
}

/* پیشنهاد وزیر و افق‌های خرید در اهداف */
.pro-advice { position: relative; margin: 14px 0 4px; padding: 14px; border-radius: 18px; color: var(--pro-text);
  background: radial-gradient(120% 140% at 100% 0%, var(--pro-3), var(--pro-2) 60%, var(--pro-1));
  border: 1px solid rgba(242, 193, 78, .35); box-shadow: 0 10px 30px rgba(27, 18, 64, .35); }
.pro-advice-head { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 900; color: var(--gold-2); }
.pro-advice-head .i { width: 16px; height: 16px; color: var(--gold); }
.pro-advice p { margin: 6px 0; font-size: 1rem; font-weight: 900; line-height: 1.9; color: #fff; }
.pro-advice small { display: block; font-size: .78rem; color: var(--pro-muted); line-height: 1.8; }
.pro-advice-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .8rem; font-weight: 800; color: var(--gold-2); }
.pro-advice-cta .i { width: 14px; height: 14px; }
.pro-horizons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pro-horizon { display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--hairline); font-size: .82rem; font-weight: 800; }
.pro-horizon.on { border-color: rgba(242, 193, 78, .6); box-shadow: 0 0 0 1px rgba(242, 193, 78, .25); }
.pro-horizon b { font-size: .95rem; font-weight: 900; }
.pro-horizon span { display: flex; flex-direction: column; line-height: 1.5; }
.pro-horizon small { font-size: .66rem; color: var(--muted); font-weight: 600; }
.pro-horizon .gold { color: var(--gold); }
:root[data-theme="light"] .pro-horizon .gold { color: #a8650a; }

/* شش ماه آینده */
.pro-ahead-total { font-size: 1.05rem; font-weight: 900; color: var(--gold); margin: 6px 0 14px; line-height: 1.8; }
:root[data-theme="light"] .pro-ahead-total { color: #a8650a; }
.pro-ahead-total.bad { color: var(--bad); }
.pro-ahead-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 120px;
  padding: 0 2px; margin-bottom: 12px; }
.pro-ahead-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.pro-ahead-bar { width: 100%; max-width: 34px; height: max(var(--h), 4%); border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
  box-shadow: 0 0 14px rgba(242, 193, 78, .35); transform-origin: bottom;
  animation: pro-grow .8s var(--ease) both calc(.2s + var(--i) * .07s); }
.pro-ahead-col.neg .pro-ahead-bar { background: linear-gradient(180deg, #ff9aa8, var(--bad)); box-shadow: 0 0 14px rgba(255, 107, 129, .35); }
.pro-ahead-col small { font-size: .68rem; color: var(--muted); font-weight: 700; }
.pro-ahead-unit { margin: 0 0 2px; text-align: end; }
.pro-ahead-rows { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; }
.pro-ahead-rows li { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 6px; align-items: center; padding: 9px 0;
  border-top: 1px solid var(--hairline); font-size: .9rem; font-weight: 800; }
.pro-ahead-rows li > span { display: flex; flex-direction: column; }
.pro-ahead-rows small { font-size: .66rem; color: var(--muted); font-weight: 600; }
.pro-ahead-month small { color: var(--good) !important; }
.pro-ahead-rows .gold { color: var(--gold); }
:root[data-theme="light"] .pro-ahead-rows .gold { color: #a8650a; }
.pro-ahead-rows .bad { color: var(--bad); }
@keyframes pro-grow { from { transform: scaleY(0); } }
@keyframes pro-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pro-ring { from { stroke-dasharray: 0 100; } }
@keyframes pro-fill { from { width: 0; } }
@keyframes pro-drift { to { transform: translate(18%, 12%) scale(1.15); } }
@keyframes pro-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .pro-hero, .pro-stat, .pro-line, .pro-goal, .pro-tile, .pro-locked, .pro-ring-bar, .pro-bar-fill,
  .pro-aurora span, .pro-daily strong, .pro-ahead-bar { animation: none !important; }
}

/* دنگ: عکس چت، رسید آیتم‌به‌آیتم و کارت */
.dg-photo-img { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; margin: 4px 0; object-fit: cover; }
.dg-photo { margin-top: 10px; }
.dg-photo form { display: flex; flex-direction: column; gap: 10px; }
.dg-photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dg-bill { display: flex; flex-direction: column; gap: 6px; min-width: min(300px, 70vw); }
.dg-bill-head { display: flex; flex-direction: column; gap: 2px; }
.dg-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dg-item { padding: 8px 10px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.dg-item.done { opacity: .6; }
.dg-item.mine { border-color: #6d4aff; opacity: 1; }
.dg-item-main { display: flex; justify-content: space-between; gap: 8px; }
.dg-claim { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dg-card { display: inline-flex; gap: 8px; align-items: center; font-size: .85em; }
.dg-me { margin-bottom: 12px; }
.dg-incoming li { opacity: .8; }

/* رسید در چت: کارت روشن و خوانا، نه حباب بنفش */
.dg-msg:has(.has-bill) { align-self: stretch; }
.dg-msg .dg-bubble.has-bill, .dg-msg.mine .dg-bubble.has-bill { flex: 1; color: var(--text); background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 16px; }
.dg-bubble.has-bill .muted, .dg-bubble.has-bill small { color: var(--muted); }
.dg-item-main span { color: var(--text); font-weight: 600; }
.dg-claim .btn { min-height: 38px; padding-inline: 14px; }
