
/* hidden هرگز توسط display لغو نشود */
[hidden] { display: none !important; }
/* ═══════════════════════════════════════════════════════════════
   آرمانوین — فرانت عمومی (فاز ۲)
   سبک: موبایل‌اول، RTL، هویت متفاوت از ناحیهٔ مدیریت.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #17171d;
  --muted: #6d6d78;
  --line: #e5e5ea;
  --accent: #4f46e5;          /* بنفش-نیلی — تمایز از #3f5a8a ناحیهٔ admin */
  --accent-ink: #ffffff;
  --accent-soft: #eef0fe;
  --dark: #0b1020;            /* زمینهٔ قهرمانی (hero) */
  --dark-2: #131a33;
  --pos: #1b7f3b;
  --posbg: #e9f6ee;
  --neg: #c2362f;
  --negbg: #fdecea;
  --neu: #8a8a93;
  --warn: #a3762a;
  --warnbg: #fffbf0;
  --r: 14px;                  /* گوشهٔ کارت‌ها */
  --shadow: 0 1px 2px rgba(15, 18, 40, .05), 0 8px 24px rgba(15, 18, 40, .07);
  --font-stack: "Vazirmatn", "Vazir", "Noto Naskh Arabic", Tahoma,
                "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  direction: rtl;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.85;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.45; margin: 0 0 .6em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ── نوار بالایی ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: .65rem clamp(.9rem, 4vw, 2rem);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .5rem; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 30px; height: 30px; }
.brand-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.topnav { display: flex; gap: .25rem; margin-inline-start: auto; }
.topnav a {
  padding: .35rem .7rem; border-radius: 999px;
  color: var(--ink); font-size: .9rem;
}
.topnav a:hover { background: var(--accent-soft); text-decoration: none; }
.user-zone { display: flex; align-items: center; gap: .35rem; }
.user-chips { display: flex; gap: .35rem; align-items: center; }

/* ── دکمه‌ها ─────────────────────────────────────────────── */
.btn {
  display: inline-block; border: 1px solid transparent;
  border-radius: 10px; padding: .55rem 1.2rem;
  font-family: inherit; font-size: .95rem; font-weight: 700;
  cursor: pointer; text-align: center;
  transition: transform .06s ease, background .15s ease, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 2px 10px rgba(79, 70, 229, .28); }
.btn-primary:hover { background: #4338ca; text-decoration: none; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink);
  border-color: var(--line); }
.btn-ghost:hover { background: var(--accent-soft); text-decoration: none;
  border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--negbg); color: var(--neg);
  border-color: #f3c1bd; }
.btn-danger:hover { background: #fbd9d5; }
.btn-sm { padding: .3rem .8rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .8rem 2rem; font-size: 1.05rem; border-radius: 12px; }

/* ── چیدمان ─────────────────────────────────────────────── */
#view { min-height: 70vh; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(.9rem, 4vw, 1.5rem); }
.page { padding: 2rem 0 3rem; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 1.4rem 1.3rem;
}
.grid-2 { display: grid; gap: 1.1rem; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ── قهرمانی (hero) ─────────────────────────────────────── */
.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(99, 102, 241, .35), transparent 60%),
    radial-gradient(40rem 24rem at 10% 110%, rgba(56, 189, 248, .18), transparent 60%),
    linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
  color: #eef0ff;
  padding: clamp(2.4rem, 7vw, 4.5rem) 0 clamp(2.6rem, 7vw, 4.5rem);
}
.hero .wrap { max-width: 900px; text-align: center; }
.hero h1 {
  font-size: clamp(1.55rem, 4.6vw, 2.5rem);
  font-weight: 800; color: #fff; margin-bottom: .5em;
}
.hero .lede { font-size: clamp(.98rem, 2.4vw, 1.12rem); color: #c3c8ec;
  max-width: 34rem; margin: 0 auto 1.6rem; }
.hero .cta-row { display: flex; gap: .7rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 2rem; }
.hero .btn-ghost { color: #e6e8ff; border-color: rgba(255, 255, 255, .3); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1);
  border-color: #fff; color: #fff; }

/* ویجت پیش‌نمایش رایگان */
.preview-box {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r); padding: 1.2rem 1.1rem;
  max-width: 30rem; margin: 0 auto; text-align: start;
  backdrop-filter: blur(4px);
}
.preview-box h3 { color: #fff; margin-bottom: .8rem; font-size: 1rem; }
.preview-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.preview-form input {
  flex: 1; min-width: 11rem;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px;
  background: rgba(255, 255, 255, .1); color: #fff;
  padding: .5rem .8rem; font-family: inherit; font-size: .95rem;
  direction: rtl;
}
.preview-form input::placeholder { color: #a6abcf; }
.preview-form input:focus { outline: 2px solid var(--accent);
  border-color: transparent; }
.preview-result {
  margin-top: 1rem; padding: .9rem 1rem;
  background: rgba(255, 255, 255, .1); border-radius: 10px;
  display: flex; gap: .9rem; align-items: center;
}
.preview-result .sign-glyph {
  font-size: 2.2rem; line-height: 1;
  background: rgba(255, 255, 255, .14);
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.preview-result .sign-title { font-weight: 800; font-size: 1.05rem; }
.preview-result .sign-sub { color: #c3c8ec; font-size: .85rem; }

/* ── بخش‌های «چطور» و «سطوح» ────────────────────────────── */
.section { padding: 2.6rem 0 1rem; }
.section-head { text-align: center; max-width: 36rem; margin: 0 auto 1.6rem; }
.section-head p { color: var(--muted); }
.steps { display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 2.6rem; }
.step::before {
  counter-increment: step; content: counter(step, persian);
  position: absolute; top: 0; inset-inline-start: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
  border: 1px solid #dcdffc;
}
.step h3 { margin-top: .2rem; }

.plan-tiles { display: grid; gap: 1rem; }
@media (min-width: 720px) { .plan-tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: .35rem; }
.tile .tile-name { font-weight: 800; font-size: 1.05rem; }
.tile ul { margin: .4rem 0 0; padding-inline-start: 1.1rem; color: var(--muted);
  font-size: .9rem; }
.tile .tile-tag {
  align-self: start; font-size: .75rem; font-weight: 700;
  padding: .1rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.tile.featured { border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow); }

/* ── فرم‌ها ─────────────────────────────────────────────── */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=date], input[type=time], select, textarea {
  width: 100%; padding: .55rem .75rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
  font-family: inherit; font-size: .95rem;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); border-color: transparent;
}
.field { margin-bottom: 1rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.error-box {
  background: var(--negbg); color: var(--neg);
  border: 1px solid #f3c1bd; border-radius: 10px;
  padding: .55rem .8rem; font-size: .88rem; margin-bottom: .9rem;
}
.ok-box {
  background: var(--posbg); color: var(--pos);
  border: 1px solid #bfe3cb; border-radius: 10px;
  padding: .55rem .8rem; font-size: .88rem; margin-bottom: .9rem;
}
.warn-box {
  background: var(--warnbg); color: var(--warn);
  border: 1px solid #ecd9ae; border-radius: 10px;
  padding: .55rem .8rem; font-size: .88rem; margin-bottom: .9rem;
}

/* ── دروازهٔ ورود/ثبت‌نام ──────────────────────────────── */
.auth-wrap { max-width: 26rem; margin: 1.5rem auto 0; }
.auth-card { padding: 1.8rem 1.5rem; text-align: center; }
.auth-card .brand-logo { width: 46px; height: 46px; margin-bottom: .4rem; }
.auth-card h2 { margin-bottom: .2rem; }
.seg {
  display: flex; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: .25rem; margin: 1rem 0;
}
.seg button {
  flex: 1; border: 0; background: transparent; border-radius: 9px;
  padding: .5rem .4rem; font-family: inherit; font-size: .92rem;
  font-weight: 700; color: var(--muted); cursor: pointer;
}
.seg button.on { background: #fff; color: var(--accent);
  box-shadow: 0 1px 4px rgba(15, 18, 40, .12); }
.auth-card .btn { width: 100%; margin-top: .4rem; }
.auth-links { margin-top: 1rem; font-size: .88rem; color: var(--muted); }
.code-input {
  font-size: 1.3rem !important; letter-spacing: .5em; text-align: center;
  font-weight: 800;
}
.code-actions { display: flex; gap: .5rem; justify-content: center;
  margin-top: .8rem; }
.code-actions .btn { width: auto; }

/* ── ویزارد ۳گام ────────────────────────────────────────── */
.wizard { max-width: 34rem; margin: 0 auto; }
.wizard-progress { display: flex; gap: .4rem; margin-bottom: 1.4rem; }
.wizard-progress span {
  flex: 1; height: 5px; border-radius: 999px; background: var(--line);
}
.wizard-progress span.done { background: var(--accent); }
.wizard .btn-row { display: flex; gap: .6rem; margin-top: 1.2rem; }
.wizard .btn-row .btn { flex: 1; }
.city-pair { display: grid; grid-template-columns: 1fr 1.4fr; gap: .6rem; }
.time-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: .6rem; }
@media (max-width: 520px) { .city-pair { grid-template-columns: 1fr; } }
.dont-know {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .8rem; margin-top: .6rem;
  font-size: .9rem;
}
.dont-know input { width: auto; }
.summary-table { width: 100%; font-size: .93rem; border-collapse: collapse; }
.summary-table td { padding: .45rem .2rem; border-bottom: 1px dashed var(--line); }
.summary-table td:first-child { color: var(--muted); width: 9rem; }
.summary-table td:last-child { font-weight: 700; }

/* ── داشبورد و چارت ────────────────────────────────────── */
.list-row {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem .4rem; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .row-main { flex: 1; min-width: 0; }
.list-row .row-title { font-weight: 800; }
.list-row .row-sub { color: var(--muted); font-size: .83rem; }
.list-row a.row-link:hover { text-decoration: none; }
.list-row a.row-link .row-title { color: var(--accent); }
.chart-wheel-box {
  display: flex; justify-content: center; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); padding: .8rem;
}
.chart-wheel-box img { width: min(100%, 480px); height: auto; }
.sun-hero {
  display: flex; gap: 1rem; align-items: center;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  color: #fff; border-radius: var(--r); padding: 1.2rem 1.3rem;
}
.sun-hero .sign-glyph {
  font-size: 2.6rem; width: 4.2rem; height: 4.2rem; flex: none;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
  display: flex; align-items: center; justify-content: center;
}
.sun-hero .sun-title { font-size: 1.25rem; font-weight: 800; }
.sun-hero .sun-sub { color: #c3c8ec; font-size: .9rem; }

.finding {
  border: 1px solid var(--line); border-radius: 12px;
  padding: .9rem 1rem; margin-bottom: .7rem; background: #fff;
}
.finding .f-head { display: flex; justify-content: space-between; gap: .8rem;
  align-items: baseline; }
.finding .f-label { font-weight: 800; font-size: .95rem; }
.finding .f-score {
  font-size: .78rem; font-weight: 700; white-space: nowrap;
  padding: .05rem .55rem; border-radius: 999px;
}
.finding.pos .f-score { background: var(--posbg); color: var(--pos); }
.finding.neg .f-score { background: var(--negbg); color: var(--neg); }
.finding.neu .f-score { background: var(--bg); color: var(--muted); }
.f-bar { height: 5px; border-radius: 999px; background: var(--bg);
  margin: .5rem 0; overflow: hidden; }
.f-bar i { display: block; height: 100%; border-radius: 999px;
  background: var(--accent); }
.finding.pos .f-bar i { background: var(--pos); }
.finding.neg .f-bar i { background: var(--neg); }
.finding .f-evidence { font-size: .83rem; color: var(--muted); margin: 0; }

.locked-grid {
  display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill,
  minmax(11rem, 1fr));
}
.locked-grid span {
  display: flex; align-items: center; gap: .45rem;
  border: 1px dashed var(--line); border-radius: 10px;
  padding: .45rem .7rem; font-size: .83rem; color: var(--muted);
  background: var(--bg);
}
.locked-grid span::before { content: "🔒"; font-size: .8rem; }
.locked-note { text-align: center; margin-top: 1rem; }

/* ── تنظیمات حساب ──────────────────────────────────────── */
.settings-stack { display: grid; gap: 1.1rem; max-width: 34rem; }
.danger-zone { border-color: #f3c1bd; background: #fffafa; }

/* ── سئو/متن (حریم، قوانین، تماس، سؤالات) ─────────────── */
.prose { max-width: 42rem; margin: 0 auto; }
.prose h2 { margin-top: 1.6rem; }
.prose ul { padding-inline-start: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* ── توست و فوتر ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.2rem; inset-inline: 0; z-index: 60;
  display: flex; justify-content: center; pointer-events: none;
}
.toast > div {
  pointer-events: auto;
  background: var(--ink); color: #fff;
  border-radius: 12px; padding: .7rem 1.2rem; font-size: .92rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  max-width: 90vw;
}
.toast.error > div { background: var(--neg); }
.toast.ok > div { background: var(--pos); }

.footer { border-top: 1px solid var(--line); background: #fff;
  margin-top: 3rem; }
.footer-inner {
  max-width: 1060px; margin: 0 auto;
  padding: 1.8rem clamp(.9rem, 4vw, 1.5rem);
  display: grid; gap: 1.2rem;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.4fr auto; align-items: start; }
  .footer-copy { grid-column: 1 / -1; margin: 0; }
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap;
  justify-content: center; }
.footer-links a { color: var(--muted); font-size: .9rem; }
.footer-links a:hover { color: var(--accent); }

.dev-mail-link {
  position: fixed; bottom: 1rem; inset-inline-start: 1rem; z-index: 50;
  display: flex; align-items: center; gap: .45rem;
  background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 999px; padding: .5rem .95rem; font-size: .85rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.dev-mail-link:hover { background: var(--accent); }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state .big { font-size: 2.4rem; margin-bottom: .5rem; }

.page-title-row { display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }

/* ═══ فاز ۳ — تحلیل کامل + هوش مصنوعی ═══ */
.stat-chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: .35rem .8rem; font-size: .85rem;
  font-weight: 600;
}
.chip-accent { background: #fdf3e0; color: var(--warn); }
.chip-wrap { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.chip-agreement { background: var(--posbg); color: var(--pos); }
.chip-agreement b { font-size: .8rem; }

.cat-group {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); margin-bottom: .8rem; overflow: hidden;
}
.cat-group summary {
  cursor: pointer; padding: .9rem 1.1rem; font-weight: 700;
  color: var(--ink); list-style: none; position: relative;
}
.cat-group summary::-webkit-details-marker { display: none; }
.cat-group summary::after {
  content: "▾"; position: absolute; inset-inline-end: 1.1rem;
  color: var(--muted); transition: transform .15s;
}
.cat-group[open] summary::after { transform: rotate(180deg); }
.cat-group summary:hover { background: var(--bg); }
.an-block { padding: 0 1.1rem .9rem; }
.an-name {
  font-weight: 700; font-size: .9rem; color: var(--muted);
  margin: .8rem 0 .5rem;
}
.an-block .finding { margin-bottom: .5rem; }

.ai-card textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem .9rem; font: inherit; resize: vertical;
  background: var(--bg);
}
.ai-card textarea:focus { outline: 2px solid var(--accent-soft); }
.ai-answer {
  margin-top: .9rem; background: var(--bg);
  border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: 10px; padding: .9rem 1rem; line-height: 1.9;
  white-space: pre-wrap; word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   لایهٔ طراحی تازه — «آسمانِ شب آرمانوین» (۲۰۲۶-۰۸-۲۸)
   فونت: وزیرمتن متغیر (self-host) · انیمیشن: GSAP/Lenis/Motion
   این لایه مقادیر قبلی را بازنویسی می‌کند؛ نام کلاس‌ها دست‌نخورده.
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #f7f7fc;
  --card: #ffffff;
  --ink: #16161f;
  --muted: #67677e;
  --line: #e5e5f0;
  --accent: #5244f0;            /* نیلیِ آرمانوین */
  --accent-2: #8b5cf6;          /* بنفش دوم گرادیان */
  --accent-ink: #ffffff;
  --accent-soft: #eeedfe;
  --gold: #d4a94e;              /* طلاییِ لوگو */
  --gold-soft: #fbf3e0;
  --dark: #0a0e1f;
  --dark-2: #131a38;
  --pos: #178a4c;
  --posbg: #e8f7ee;
  --neg: #c2362f;
  --negbg: #fdecea;
  --neu: #8a8a93;
  --warn: #a3762a;
  --warnbg: #fffbf0;
  --r: 16px;
  --r-btn: 12px;
  --shadow: 0 1px 2px rgba(16,16,40,.04), 0 10px 30px -12px rgba(16,16,40,.12);
  --shadow-lg: 0 2px 4px rgba(16,16,40,.05), 0 22px 44px -16px rgba(50,40,160,.22);
  --grad: linear-gradient(135deg, #5244f0, #8b5cf6);
  --font-stack: "Vazirmatn", "Vazir", "Noto Naskh Arabic", Tahoma,
                "Segoe UI", sans-serif;
}

/* ── پایه و تایپوگرافی ── */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  color: var(--ink);
  line-height: 1.95;
  background:
    radial-gradient(900px 420px at 88% -6%, #e9e6ff 0%, transparent 55%),
    radial-gradient(700px 380px at -10% 20%, #f0ecff59 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, h4 { line-height: 1.65; font-weight: 800; }
h1 { font-size: clamp(1.55rem, 1.1rem + 1.9vw, 2.3rem); }
h2 { font-size: 1.32rem; }
h3 { font-size: 1.04rem; }
.prose h2 { font-size: 1.22rem; margin-top: 1.7rem; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
::selection { background: var(--accent-soft); color: var(--accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #c9c9dc; border-radius: 8px; border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #ababc6; }

/* ── دکمه‌ها ── */
.btn {
  position: relative; display: inline-flex; align-items: center;
  justify-content: center; gap: .45rem;
  border: 1px solid transparent; border-radius: var(--r-btn);
  padding: .62rem 1.2rem; font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s,
              background .18s, border-color .18s, color .18s;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 1.5px var(--accent);
}
.btn:active { transform: scale(.965); }
.btn[disabled] { opacity: .55; pointer-events: none; }

.btn-primary {
  background: var(--grad); color: var(--accent-ink);
  box-shadow: 0 8px 18px -8px rgba(82,68,240,.6),
              inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(82,68,240,.7),
              inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-soft); transform: translateY(-1px);
}
.btn-danger { background: var(--negbg); color: var(--neg); border-color: #f2c8c4; }
.btn-danger:hover { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn-lg { padding: .85rem 1.55rem; font-size: 1.04rem; border-radius: 14px; }
.btn-sm { padding: .4rem .82rem; font-size: .85rem; border-radius: 10px; }

/* دکمهٔ ثانویه روی بخش تیرهٔ قهرمان */
.hero .btn-ghost {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.28); color: #fff;
}
.hero .btn-ghost:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.55); color: #fff;
}

/* ── کارت‌ها و کادرها ── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.tile, .step { transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s; }
.tile:hover, .step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile.featured { border-color: #e8ddba; }
.tile-tag { background: var(--gold-soft); color: var(--warn); }

/* ── فیلدهای ورودی ── */
.field input:not([type="checkbox"]), .field select, .field textarea,
.auth-card input:not([type="checkbox"]), textarea,
.settings-stack input:not([type="checkbox"]), .city-pair select {
  width: 100%; height: 2.95rem; padding: .55rem .95rem;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fbfbfe; color: var(--ink); font: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { height: auto; }
.field select, .city-pair select { cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus,
.auth-card input:focus, textarea:focus, .settings-stack input:focus,
.city-pair select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); background: #fff;
}
input::placeholder, textarea::placeholder { color: #a5a5ba; }
input[type="checkbox"] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }

/* ── سگمنت (قرصی) ── */
.seg {
  display: flex; gap: 2px; padding: 4px;
  background: #ececf5; border-radius: 999px;
}
.seg button {
  flex: 1; border: 0; background: transparent; border-radius: 999px;
  padding: .48rem .8rem; font: inherit; font-weight: 600;
  color: var(--muted); cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.seg button:hover { color: var(--ink); }
.seg button.on {
  background: #fff; color: var(--accent);
  box-shadow: 0 2px 10px rgba(20,20,45,.14);
}

/* ── چیپ‌ها و یافته‌ها ── */
.chip { transition: transform .16s; }
.chip:hover { transform: translateY(-1px); }
.chip-num { font-weight: 800; min-width: 1.25em; display: inline-block; text-align: center; }
.finding {
  border: 1px solid var(--line); border-radius: 12px;
  background: #fdfdff;
  transition: border-color .16s, box-shadow .16s;
}
.finding:hover { border-color: #d9d9ee; box-shadow: var(--shadow); }
.finding.pos { border-inline-start: 3px solid var(--pos); }
.finding.neg { border-inline-start: 3px solid var(--neg); }
.finding.neu { border-inline-start: 3px solid var(--neu); }
.f-bar i { transition: width .9s cubic-bezier(.22,.8,.26,1); }

/* ── دسته‌های تحلیل و جدول‌ها ── */
.cat-group summary:hover { background: #f6f5fe; }
.cat-group[open] summary { color: var(--accent); }
.cat-group[open] summary::after { color: var(--accent); }
.an-block .an-name { color: var(--accent); opacity: .85; }
.summary-table td { padding: .62rem .85rem; }
.summary-table tr { transition: background .14s; }
.summary-table tr:hover { background: #f7f6fd; }
.list-row { transition: background .16s; border-radius: 12px; }
.list-row:hover { background: #f7f6fd; }

/* ── قهرمان (hero) با ستاره‌ها ── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 72% -12%, #1e2757 0%, transparent 60%),
    linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 18% 32%, #ffffff88 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 64% 18%, #ffffff66 50%, transparent 52%),
    radial-gradient(1.9px 1.9px at 86% 62%, #d4a94e99 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 42% 74%, #ffffff55 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 8% 82%, #ffffff66 50%, transparent 52%),
    radial-gradient(1.1px 1.1px at 76% 40%, #ffffff55 50%, transparent 52%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }
.hero h1 {
  background: linear-gradient(100deg, #ffffff 30%, #d6d1ff 75%, #e8cf9a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #fff;
}
.hero .lede { color: #c6c9e6; }
.hero .preview-box {
  background: rgba(255,255,255,.06); color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero .preview-box h3 { color: #fff; }
.hero .preview-box input {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  color: #fff; border-radius: 12px;
}
.hero .preview-box input::placeholder { color: #b9bade; }

/* ── چرخ چارت و خورشید ── */
.chart-wheel-box img {
  filter: drop-shadow(0 14px 34px rgba(18,16,60,.2));
}
.sun-hero {
  background: linear-gradient(135deg, var(--gold-soft), #fdf8ee 60%, var(--accent-soft));
  border: 1px solid #efe6cd; border-radius: var(--r);
}
.sun-hero .sign-glyph { text-shadow: 0 4px 18px rgba(212,169,78,.45); }

/* ── کارت ورود ── */
.auth-card { box-shadow: var(--shadow-lg); }
.auth-card .brand-logo { animation: floaty 4.6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ── نوار پیشرفت ویزارد ── */
.wizard-progress span {
  border-radius: 999px; background: var(--line);
  transition: background .35s;
}
.wizard-progress span.done { background: var(--grad); }

/* ── لوگو و برند ── */
.brand-logo { transition: transform .3s cubic-bezier(.2,.8,.3,1); }
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.07); }
.dev-mail-link { background: var(--grad); }
.dev-mail-link:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(82,68,240,.5); }

/* ── پیام‌ها ── */
.error-box, .warn-box { border-radius: 12px; }
.error-box { border: 1px solid #f2c8c4; }
.warn-box { border: 1px solid #ecdfb4; }

/* ── احترام به کاهش حرکت ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ═══ تب‌های جدید + فوتر اپلیکیشن‌ها ═══ */
.topnav {
  display: flex; align-items: center; gap: .15rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  position: relative; padding: .5rem .72rem; border-radius: 10px;
  white-space: nowrap; font-weight: 600; font-size: .92rem;
  color: var(--muted); text-decoration: none;
  transition: color .16s, background .16s;
}
.topnav a:hover { color: var(--accent); background: var(--accent-soft); }
.topnav a.active { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  .topnav { order: 3; width: 100%; padding-bottom: .25rem; }
}

/* فوتر — اپلیکیشن‌ها */
.footer-apps {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .5rem; margin-top: .9rem;
}
.fa-title { font-weight: 600; }
.app-chip {
  display: inline-flex; align-items: center; gap: .42rem;
  padding: .32rem .78rem; border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  color: #e6e7f5; font-size: .86rem; font-weight: 600;
  text-decoration: none;
  transition: transform .16s, border-color .16s, background .16s;
}
.app-chip:hover {
  transform: translateY(-2px);
  border-color: var(--app-color, #fff);
  background: rgba(255,255,255,.13);
}
.app-dot {
  width: .55rem; height: .55rem; border-radius: 999px;
  background: var(--app-color, #fff);
  box-shadow: 0 0 10px var(--app-color, #fff);
}

/* کارت «به‌زودی» */
.coming-soon {
  max-width: 560px; margin: 2.2rem auto; text-align: center;
  padding: 2.2rem 1.4rem;
}
.cs-icon {
  font-size: 2.6rem; margin-bottom: .6rem;
  animation: floaty 4.6s ease-in-out infinite;
}

/* ═══ کارت‌های روایت + مودال + دکمه‌های اپ ═══ */
.story-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; max-width: 640px; margin: 0 auto;
}
.story-card {
  text-align: center; padding: 1.8rem 1.3rem;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s;
}
.story-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.story-icon {
  font-size: 2.4rem; margin-bottom: .5rem;
  animation: floaty 4.6s ease-in-out infinite;
}
.story-card h3 { margin-bottom: .35rem; }

/* مودال روایت‌ها */
.modal-root { position: fixed; inset: 0; z-index: 90; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 12, 32, .66);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative; margin: 4vh auto; width: min(680px, calc(100% - 2rem));
  max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--dark-2), #0d1226 70%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px; padding: 1.6rem 1.5rem 2rem;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  color: #e8e9f6;
}
.modal-title {
  color: #fff; margin: 0 2.2rem .8rem 0;
  font-size: 1.15rem; line-height: 1.7;
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding-bottom: .8rem;
}
.modal-close {
  position: absolute; top: .9rem; inset-inline-end: .9rem;
  width: 2.1rem; height: 2.1rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff;
  font-size: 1rem; cursor: pointer; line-height: 1;
  transition: background .16s, transform .16s;
}
.modal-close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }
.modal-body h3 {
  color: var(--gold); font-size: 1.02rem; margin: 1.5rem 0 .45rem;
}
.modal-body h3:first-child { margin-top: .4rem; }
.modal-body p { margin: .5rem 0; line-height: 2.05; color: #d6d8ec; }
.modal-body ul, .modal-body ol {
  margin: .5rem 0; padding-inline-start: 1.4rem; line-height: 2.05;
  color: #d6d8ec;
}
.modal-body strong { color: #fff; }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: #3a3f63; border: none; }
body.modal-open { overflow: hidden; }

.story-cta { text-align: center; margin-top: 1.6rem; }

/* لینک مینی دوره‌ها — برجسته */
.course-link {
  display: block; text-align: center; text-decoration: none;
  margin: 1rem auto .4rem; padding: .68rem 1.1rem;
  max-width: 430px; border-radius: 12px; font-weight: 700; font-size: .93rem;
  background: linear-gradient(135deg, #1d9a6b, #23b573);
  color: #fff; box-shadow: 0 8px 20px -8px rgba(35,181,115,.65);
  transition: transform .16s, box-shadow .16s;
}
.course-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(35,181,115,.8);
}
.course-link-main {
  background: linear-gradient(135deg, #e8862e, #f2a950);
  box-shadow: 0 8px 20px -8px rgba(242,169,80,.6);
}

/* دکمه‌های اپ در فوتر — آیکون واقعی */
.app-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.7rem; height: 2.7rem; border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  transition: transform .16s, border-color .16s, background .16s;
}
.app-btn:hover {
  transform: translateY(-3px) scale(1.06);
  background: rgba(255,255,255,.16);
  border-color: currentColor;
}
.app-btn .app-ico { width: 1.45rem; height: 1.45rem; display: inline-flex; }
.app-btn svg { width: 100%; height: 100%; }
.app-btn-soon { opacity: .38; cursor: default; }
.app-btn-soon:hover { transform: none; background: rgba(255,255,255,.08); }

/* ═══ سه کارت روایت + پیش‌نمایش مینی دوره‌ها ═══ */
.story-grid { max-width: 880px; }

.course-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.course-prev {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: .45rem; padding: 1.7rem 1.2rem;
  text-decoration: none; color: inherit;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s,
              border-color .22s;
}
.course-prev:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.cp-icon { font-size: 2.3rem; animation: floaty 4.6s ease-in-out infinite; }
.course-prev .btn { pointer-events: none; }

/* لینک مشاوره در مودال سوم — هم‌خانوادهٔ سبز/نارنجی */
.course-link-consult {
  background: linear-gradient(135deg, #5244f0, #8b5cf6);
  box-shadow: 0 8px 20px -8px rgba(82,68,240,.65);
}
.course-link-consult:hover { box-shadow: 0 12px 26px -8px rgba(82,68,240,.85); }

/* ═══ اسلایدر مینی دوره‌ها ═══ */
.cp-carousel {
  position: relative; max-width: 560px; margin: 0 auto;
}
.cp-viewport { overflow: hidden; border-radius: var(--r); }
.cp-track {
  display: flex; transition: transform .55s cubic-bezier(.22,.8,.26,1);
}
.cp-slide {
  flex: 0 0 100%; min-width: 100%; max-width: 100%;
}
.cp-carousel .course-prev { min-height: 15rem; justify-content: center; }

.cp-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2; width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  transition: background .16s, color .16s, transform .16s;
}
.cp-nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cp-nav:active { transform: translateY(-50%) scale(.92); }
.cp-prev { inset-inline-start: -.9rem; }
.cp-next { inset-inline-end: -.9rem; }
@media (max-width: 560px) {
  .cp-prev { inset-inline-start: .35rem; }
  .cp-next { inset-inline-end: .35rem; }
}

.cp-dots {
  display: flex; justify-content: center; gap: .45rem; margin-top: .8rem;
}
.cp-dot {
  width: .55rem; height: .55rem; border-radius: 999px;
  border: 0; background: #cfcedf; cursor: pointer; padding: 0;
  transition: background .2s, width .2s;
}
.cp-dot.on { background: var(--accent); width: 1.4rem; }

/* ═══ فوتر: «ما را دنبال کنید» — یک ردیف افقی ═══ */
.footer-apps {
  flex-direction: row; align-items: center; justify-content: center;
  flex-wrap: wrap; row-gap: .8rem;
}
@media (min-width: 540px) { .footer-apps { flex-wrap: nowrap; } }

/* ═══ اسلایدر چندکارتی + تکنیک‌های رشد ═══ */
.cp-carousel { max-width: 980px; }
.cp-track { gap: 0; }
.cp-slide {
  flex: 0 0 calc(100% / var(--cp-vis, 1));
  min-width: calc(100% / var(--cp-vis, 1));
  padding-inline: .45rem;
}
.cp-slide .card, .cp-slide.course-prev { height: 100%; }

.tech-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.tech-goal {
  text-align: center; font-weight: 700; color: var(--gold);
  background: rgba(212,169,78,.09); border-radius: 10px;
  padding: .6rem .8rem; margin: .2rem 0 .6rem;
}

/* ═══ تب آسترولوژی — جای سیارات، جنبه‌ها، آمار ═══ */
.pl-list { padding: .6rem .8rem; display: flex; flex-direction: column; gap: .3rem; }
.pl-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .7rem; border-radius: 12px;
  transition: background .15s;
}
.pl-row:hover { background: #f7f6fd; }
.pl-glyph {
  width: 2.3rem; height: 2.3rem; border-radius: 999px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: var(--accent);
  background: var(--accent-soft);
}
.pl-angle .pl-glyph { color: var(--warn); background: var(--gold-soft); }
.pl-name { font-weight: 700; min-width: 8.2rem; }
.pl-sign { color: var(--muted); min-width: 6.4rem; }
.pl-deg { font-weight: 700; direction: ltr; min-width: 4.6rem; }
.pl-house { color: var(--muted); font-size: .88rem; }
.pl-retro {
  margin-inline-start: auto; font-size: .78rem; font-weight: 700;
  color: var(--warn); background: var(--gold-soft);
  border-radius: 999px; padding: .16rem .6rem;
}
@media (max-width: 560px) {
  .pl-name { min-width: 6.4rem; font-size: .9rem; }
  .pl-sign { min-width: 5rem; }
}

.asp-list { padding: .6rem .8rem; display: flex; flex-direction: column; gap: .3rem; }
.asp-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; padding: .5rem .8rem; border-radius: 12px;
  border-inline-start: 3px solid var(--neu); background: #fdfdff;
}
.asp-row.pos { border-inline-start-color: var(--pos); }
.asp-row.neg { border-inline-start-color: var(--neg); }
.asp-row.conj { border-inline-start-color: var(--gold); }
.asp-pair { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.asp-type {
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: .1rem .6rem; font-size: .8rem;
}
.asp-orb { color: var(--muted); font-size: .85rem; direction: ltr; }

.stat-row {
  display: grid; grid-template-columns: 9.5rem 1fr 3.4rem;
  align-items: center; gap: .7rem; margin: .45rem 0;
}
.stat-label { font-weight: 600; font-size: .9rem; }
.stat-bar {
  display: block; height: .8rem; border-radius: 999px;
  background: #edecf5; overflow: hidden;
}
.stat-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--grad); transition: width .9s cubic-bezier(.22,.8,.26,1);
}
.stat-val { font-weight: 800; text-align: left; }
.stat-sep { height: 1px; background: var(--line); margin: .9rem 0; }
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 7rem 1fr 3rem; }
}

.chip-fact {
  background: #fdfdff; color: var(--ink); border: 1px solid var(--line);
  font-weight: 500; line-height: 1.9;
}
.chip-fact b { color: var(--accent); }

/* کاروسل تکنیک‌ها */
.tech-cp-wrap { max-width: 980px; margin: 0 auto; }
#techCarousel { position: relative; }

/* ═══ ردیف سیارات با قابلیت + فصل زندگی + سیناستری ═══ */
.pl-mid { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pl-name { font-weight: 700; }
.pl-ability { font-size: .78rem; color: var(--muted); line-height: 1.6; }
.pl-pos { white-space: nowrap; color: var(--ink); font-weight: 600; }
.pl-pos small { font-weight: 500; direction: ltr; display: inline-block; }
.asp-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.asp-note { line-height: 1.7; }

.cyc-list { padding: .6rem .8rem; display: flex; flex-direction: column; gap: .35rem; }
.cyc-row {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .8rem; border-radius: 12px; background: #fdfdff;
  border: 1px solid var(--line);
}
.cyc-row.cyc-on {
  background: linear-gradient(135deg, var(--gold-soft), #fdf8ee);
  border-color: #ecdfb4;
}
.cyc-icon {
  width: 2.3rem; height: 2.3rem; flex: none; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; background: var(--accent-soft); color: var(--accent);
}
.cyc-on .cyc-icon { background: #fff; color: var(--warn); }
.cyc-mid { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cyc-status {
  font-size: .8rem; font-weight: 700; color: var(--muted);
  white-space: nowrap;
}
.cyc-on .cyc-status { color: var(--warn); }

/* ورود دستی ساعت */
.time-pair { grid-template-columns: 1fr auto 1fr; align-items: center; }
.time-inp { text-align: center; font-weight: 700; letter-spacing: .06em; }
.time-sep { color: var(--muted); font-weight: 800; text-align: center; }

/* ═══ ردیف سیارات — درجه در مرکز ═══ */
.pl-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: .7rem;
}
.pl-center {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  min-width: 7rem;
}
.pl-deg {
  direction: ltr; font-weight: 800; font-size: .95rem; letter-spacing: .03em;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: .28rem .85rem;
  white-space: nowrap;
}
.pl-retro-tag { font-size: .72rem; font-weight: 700; color: var(--warn); }
.pl-side {
  display: flex; align-items: center; justify-content: flex-end;
  gap: .6rem; flex-wrap: wrap;
}
.pl-side .pl-sign { font-weight: 600; color: var(--ink); min-width: 0; }
.pl-side .pl-house {
  color: var(--muted); font-size: .82rem;
  background: #f3f2fa; border-radius: 999px; padding: .16rem .6rem;
}
@media (max-width: 620px) {
  .pl-row { grid-template-columns: auto minmax(0, 1fr); row-gap: .45rem; }
  .pl-center { grid-column: 1 / -1; order: 3; }
}

/* ═══ پنل کاربر ═══ */
.acct-wrap { max-width: 900px; }
.acct-head {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1.3rem; margin-bottom: 1rem;
}
.acct-logo { width: 52px; height: 52px; }
.acct-body { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; }
@media (max-width: 720px) {
  .acct-body { grid-template-columns: 1fr; }
  .acct-menu { display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem; }
  .acct-item { flex: 1 1 40%; }
}
.acct-menu { padding: .6rem; height: fit-content; }
.acct-item {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  border: 0; background: transparent; font: inherit; font-weight: 600;
  color: var(--muted); padding: .6rem .8rem; border-radius: 10px;
  cursor: pointer; text-align: start;
  transition: background .15s, color .15s;
}
.acct-item:hover { background: #f6f5fd; color: var(--ink); }
.acct-item.on { background: var(--accent-soft); color: var(--accent); }
.acct-out { color: var(--neg); margin-top: .5rem; }
.acct-out:hover { background: var(--negbg); color: var(--neg); }
.acct-content h3 { margin: .2rem 0 .8rem; }
.gold { color: var(--warn); }

.ref-link { display: flex; gap: .5rem; margin-top: .9rem; }
.ref-link input {
  flex: 1; height: 2.8rem; padding: .4rem .8rem; font-size: .85rem;
  border: 1.5px dashed var(--line); border-radius: 10px;
  background: #fbfbfe; color: var(--muted);
}

/* پشتیبانی آنلاین */
.sup-box { padding: 1rem; }
.sup-list {
  display: flex; flex-direction: column; gap: .6rem;
  max-height: 340px; overflow-y: auto; padding: .3rem;
  background: #fafafd; border-radius: 12px; min-height: 120px;
}
.sup-msg { display: flex; flex-direction: column; }
.sup-msg.me { align-items: flex-end; }
.sup-msg.admin { align-items: flex-start; }
.sup-bubble {
  max-width: 78%; padding: .55rem .9rem; border-radius: 14px;
  line-height: 1.8; font-size: .92rem;
  white-space: pre-wrap; word-break: break-word;
}
.sup-msg.me .sup-bubble { background: var(--grad); color: #fff;
  border-bottom-left-radius: 4px; }
.sup-msg.admin .sup-bubble { background: #fff; border: 1px solid var(--line);
  border-bottom-right-radius: 4px; }
.sup-msg .muted { font-size: .72rem; margin-top: .15rem; }
.sup-input { display: flex; gap: .5rem; margin-top: .8rem; }
.sup-input input {
  flex: 1; height: 2.8rem; padding: .4rem .9rem;
  border: 1.5px solid var(--line); border-radius: 10px; font: inherit;
}
.sup-input input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); }

.order-empty .btn { margin-top: .5rem; }

/* ═══ کیف پول ═══ */
.wallet-balance {
  display: flex; flex-direction: column; align-items: center;
  gap: .3rem; padding: 1.6rem 1.2rem;
  background: linear-gradient(135deg, var(--dark-2), #1b2350 60%, #23296b);
  border: 1px solid rgba(255,255,255,.12); color: #fff;
}
.wb-label { color: #c6c9e6; font-size: .88rem; }
.wb-amount { font-size: 1.9rem; font-weight: 800; }
.wb-amount small { font-size: .95rem; font-weight: 600; color: #c6c9e6; }
.tx-row { gap: .7rem; align-items: center; }
.tx-dir { font-size: .78rem; font-weight: 700; white-space: nowrap;
  border-radius: 999px; padding: .18rem .6rem; }
.tx-dir.pos { background: var(--posbg); color: var(--pos); }
.tx-dir.neg { background: var(--negbg); color: var(--neg); }
.tx-amount { white-space: nowrap; }
.tx-amount small { font-weight: 600; color: var(--muted); }
.tx-amount.pos { color: var(--pos); }
.tx-amount.neg { color: var(--neg); }

/* ═══ حالت شب 🌙 ═══ */
.theme-dark body, body.theme-dark {
  --bg: #0b0e1d; --card: #141830; --ink: #e9eaf6; --muted: #9a9cb8;
  --line: #262c4d; --accent: #8b7cf7; --accent-soft: #1d2142;
  --posbg: #10331f; --negbg: #3a1512; --warnbg: #2e2410;
  color-scheme: dark;
}
.theme-dark { --bg: #0b0e1d; --card: #141830; --ink: #e9eaf6;
  --muted: #9a9cb8; --line: #262c4d; --accent: #8b7cf7;
  --accent-soft: #1d2142; color-scheme: dark; }
.theme-dark .card { background: var(--card); }
.theme-dark .pl-row:hover, .theme-dark .list-row:hover { background: #1a1f3d; }
.theme-dark .finding, .theme-dark .cp-card { background: #171c38; }
.theme-dark .modal-card { background: linear-gradient(180deg, #141830, #0e1226); }
.theme-dark .field input, .theme-dark .field select, .theme-dark .field textarea {
  background: #0f132a; color: var(--ink); }
.theme-dark .seg { background: #1a1f3d; }
.theme-dark .seg button.on { background: #262c4d; color: #fff; }

/* ═══ بنر ═══ */
.site-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; padding: .6rem 1rem; font-size: .9rem;
  background: var(--accent-soft); color: var(--accent);
  border-bottom: 1px solid var(--line);
}
.site-banner.kind-warn { background: var(--warnbg); color: var(--warn); }
.site-banner.kind-ok { background: var(--posbg); color: var(--pos); }
.sb-inner { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; }
.sb-close { border: 0; background: transparent; color: inherit;
  cursor: pointer; font-size: 1rem; opacity: .7; }
.sb-close:hover { opacity: 1; }

/* ═══ طالع هفتگی ═══ */
.horo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: .9rem;
}
.horo-card { padding: 1rem 1.1rem; }
.horo-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .4rem; }
.horo-glyph {
  width: 2.4rem; height: 2.4rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; background: var(--gold-soft); color: var(--warn);
}
.horo-card p { margin: 0; line-height: 2; }

/* ═══ مأموریت‌ها ═══ */
.mission-list { display: flex; flex-direction: column; gap: .35rem; margin-top: .6rem; }
.mission-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; padding: .45rem .7rem; border-radius: 10px;
  background: #f7f6fd; font-size: .92rem;
}
.theme-dark .mission-row { background: #1a1f3d; }
.mission-row.done { opacity: .65; }

/* دکمهٔ نصب */
#btnInstall { position: fixed; bottom: 1rem; inset-inline-end: 1rem; z-index: 60; }

/* ═══ ناوبری موبایل — نمایش درست فهرست صفحهٔ اصلی ═══ */
@media (max-width: 760px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .35rem .6rem;
    padding: .55rem .75rem;
  }
  .brand { justify-self: start; min-width: 0; }
  .brand-name { font-size: .98rem; }
  .brand-logo { width: 27px; height: 27px; }
  .user-zone {
    justify-self: end; display: flex; align-items: center;
    gap: .3rem; white-space: nowrap;
  }
  .user-zone .btn { padding: .34rem .6rem; font-size: .8rem; }
  .topnav {
    order: 3; grid-column: 1 / -1; width: 100%;
    display: flex; gap: .1rem; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding: .15rem .1rem .3rem;
    border-top: 1px solid var(--line);
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a {
    flex: none; scroll-snap-align: start;
    padding: .42rem .62rem; font-size: .88rem;
    white-space: nowrap;
  }
}
@media (max-width: 400px) {
  .topbar { padding: .45rem .6rem; }
  .brand-name { display: inline-block; max-width: 6.2rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topnav a { padding: .38rem .5rem; font-size: .84rem; }
}

/* حباب دستیار هوشمند در پشتیبانی */
.sup-msg.ai { align-items: flex-start; }
.sup-msg.ai .sup-bubble {
  background: linear-gradient(135deg, #1d2142, #23296b);
  color: #e8e9f6; border: 1px solid #3a3f63;
  border-bottom-right-radius: 4px;
}
.sup-esc { display: flex; justify-content: center; margin-top: .6rem; }
.mp { color: var(--warn); font-size: .78rem; margin-inline-start: .3rem; }
