/* توکن‌های طراحیِ صفحه‌های عملیاتی (از ANSWER-CASCADE-V1) — روشن و خوانا */
@font-face { font-family: Vazirmatn; src: url("fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url("fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url("fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --canvas: #FBFBFD; --surface: #FFFFFF;
  --text-primary: #10131A; --text-secondary: #4F5668; --muted: #6F7688;
  --divider: #D9DEE8; --success: #91E600;
  --math: #0D62F3; --math-soft: #EEF4FF; --math-border: #BFD3FF;
  --physics: #7135F1; --physics-soft: #F2EDFF; --physics-border: #D5C4FF;
  --chemistry: #038685; --chemistry-soft: #EDFAFA; --chemistry-border: #B5E3E1;
  --accent: var(--math); --accent-soft: var(--math-soft); --accent-border: var(--math-border);
}
[data-subject="physics"] { --accent: var(--physics); --accent-soft: var(--physics-soft); --accent-border: var(--physics-border); }
[data-subject="chemistry"] { --accent: var(--chemistry); --accent-soft: var(--chemistry-soft); --accent-border: var(--chemistry-border); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  direction: rtl; background: var(--canvas); color: var(--text-primary);
  font-size: 16px; line-height: 1.9;
}
.screen { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; padding-top: max(20px, calc(env(safe-area-inset-top) + 8px)); min-height: 100vh; }

/* سؤال */
.question-card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: 14px;
  padding: 16px; margin-bottom: 16px; box-shadow: 0 5px 18px rgba(30,54,90,.06);
}
.subject-chip {
  display: inline-block; font-size: 13px; font-weight: 500; padding: 4px 12px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-border); margin-bottom: 10px;
}
.question-text { font-weight: 600; }

/* مرحله‌ها (آبشاری) */
.step {
  background: var(--surface); border: 1px solid var(--divider); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px;
  opacity: 0; transform: translateY(8px); transition: opacity .28s ease, transform .28s ease;
}
.step.revealed { opacity: 1; transform: none; }
.step-title { font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.step-num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
}
.block-text { margin: 6px 0; }
/* جزیره‌ی فرمول: LTR داخلِ متنِ RTL */
.block-formula {
  direction: ltr; unicode-bidi: isolate; text-align: left;
  overflow-x: auto; margin: 8px 0; padding: 4px 2px;
}
.block-formula.katex-failed {
  font-family: "STIX Two Math", "Times New Roman", serif;
  background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; color: var(--accent);
}

/* جواب نهایی (جدا از مرحله‌ها) */
.answer-card {
  background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 14px;
  padding: 16px; margin-top: 8px;
}
.answer-title { font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.answer-part { margin: 6px 0; }
.answer-part .lbl { font-weight: 700; margin-left: 6px; }
.answer-part .formula { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* کنترل‌ها */
.controls { display: flex; gap: 10px; margin-top: 16px; }
.btn {
  flex: 1; padding: 12px; border-radius: 12px; border: none; font-family: inherit;
  font-weight: 700; font-size: 16px; cursor: pointer; background: var(--accent); color: #fff;
}
.btn.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--accent-border); }
.feedback-link {
  display: block; text-align: center; margin-top: 18px; color: var(--muted);
  font-size: 14px; background: none; border: none; font-family: inherit; cursor: pointer; width: 100%;
}
.feedback-link.done { color: var(--success); }

/* گیتِ ابهام */
.amb-what { font-weight: 600; margin: 14px 0 10px; }
.amb-option {
  display: block; width: 100%; text-align: right; background: var(--surface);
  border: 1px solid var(--accent-border); border-radius: 12px; padding: 14px;
  margin-bottom: 10px; font-family: inherit; font-size: 16px; cursor: pointer;
}
.amb-option .formula { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.amb-option[aria-busy="true"] { opacity: .6; }

/* حالتِ در حالِ حل */
.solving { text-align: center; padding-top: 60px; }
.solving .spinner {
  width: 54px; height: 54px; border: 4px solid var(--accent-soft);
  border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.solving .sentence { font-weight: 700; font-size: 19px; }
.error-box { text-align: center; padding-top: 60px; }

/* ---------- دوربین (CAMERA-CORE-V1): کرومِ تیره دورِ ویوفایندر ---------- */
.cam { position: fixed; inset: 0; background: #030812; display: flex; flex-direction: column; }
.cam-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 16px 14px;
  background: linear-gradient(#030812, #030812cc); color: #fff; z-index: 3;
}
.cam-spacer { width: 38px; flex: 0 0 auto; }
.cam-chip {
  font-size: 15px; font-weight: 700; color: #fff; padding: 6px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #2563EB, #0C6AFB); border: 1px solid #ffffff55;
}
.cam-back { width: 38px; height: 38px; border-radius: 12px; border: 1px solid #ffffff33;
  background: none; color: #fff; font-size: 20px; cursor: pointer; }
.cam-view { flex: 1; position: relative; overflow: hidden; background: #000; }
.cam-view video, .cam-view img { width: 100%; height: 100%; object-fit: cover; }
.cam-aim { position: absolute; inset: 12% 10%; pointer-events: none; }
.cam-aim span { position: absolute; width: 34px; height: 34px; border: 3px solid #1B73FF; }
.cam-aim .tl { top: 0; right: 0; border-left: none; border-bottom: none; }
.cam-aim .tr { top: 0; left: 0; border-right: none; border-bottom: none; }
.cam-aim .bl { bottom: 0; right: 0; border-left: none; border-top: none; }
.cam-aim .br { bottom: 0; left: 0; border-right: none; border-top: none; }
.cam-toast {
  position: absolute; bottom: 16px; right: 50%; transform: translateX(50%);
  background: #080A0EEB; color: #fff; font-size: 14px; padding: 8px 16px; border-radius: 20px;
  white-space: nowrap;
}
.cam-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px max(22px, env(safe-area-inset-bottom));
  background: linear-gradient(#0E1D39, #071326); z-index: 3;
}
.cam-side { width: 48px; height: 48px; border-radius: 14px; border: 1px solid #FFFFFF33;
  background: none; color: #fff; font-size: 22px; cursor: pointer; }
.cam-side.on { background: #2563EB; }
.cam-shutter {
  width: 76px; height: 76px; border-radius: 50%; cursor: pointer; border: none;
  background: #10203C; position: relative;
  box-shadow: 0 0 0 4px #10203C, 0 0 0 7px transparent;
}
.cam-shutter::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #7C3AED); z-index: -1;
}
.cam-shutter { display: grid; place-items: center; }
.cam-shutter:active { transform: scale(.94); }
.cam-err { color: #fff; text-align: center; padding: 40px 24px; }

/* ---------- برش (CROP-CORE-V1) ---------- */
.crop { position: fixed; inset: 0; background: #FBFBFD; display: flex; flex-direction: column; }
.crop-head { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 14px 10px; gap: 8px; }
.crop-back { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; border: 1px solid #E0E2E7; background: #fff; color: #171820; font-size: 20px; cursor: pointer; }
.crop-head .chip { display: inline-block; font-size: 14px; font-weight: 700; color: #fff;
  padding: 5px 14px; border-radius: 14px; background: linear-gradient(135deg, #2F7FF7, #0D5FF3); }
.crop-helper { color: #171820; font-size: 15px; font-weight: 700; text-align: center; flex: 1; line-height: 1.7; }
.crop-stage { flex: 1; position: relative; margin: 12px; overflow: hidden; touch-action: none; }
.crop-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.crop-overlay { position: absolute; inset: 0; pointer-events: none; }
.crop-box { position: absolute; border: 2px solid #1B73FF; box-shadow: 0 0 0 9999px #00000052; cursor: move; touch-action: none; pointer-events: auto; }
.crop-h { position: absolute; width: 40px; height: 40px; background: none; border: none;
  pointer-events: auto; touch-action: none; display: grid; place-items: center; }
.crop-h::after { content: ""; width: 18px; height: 18px; background: #1B73FF; border: 2px solid #fff;
  border-radius: 4px; box-shadow: 0 1px 4px #0003; }
.crop-actions { padding: 14px 16px max(18px, env(safe-area-inset-bottom)); }

/* ---------- حساب / فرم‌ها (موقت روشن؛ تمِ کیهانی آخر) ---------- */
.page-title { font-size: 24px; font-weight: 800; text-align: center; margin: 8px 0 20px; }
.back-row { display: flex; justify-content: flex-start; }
.back-btn { background: var(--accent-soft); color: var(--accent); border: none; border-radius: 12px;
  width: 40px; height: 40px; font-size: 20px; cursor: pointer; }
.account-hero { text-align: center; margin: 20px 0; }
.chip-guest { display: inline-block; background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-border); border-radius: 15px; padding: 5px 16px; font-weight: 500; }
.quota-big { font-size: 72px; font-weight: 900; line-height: 1.1; margin: 14px 0 2px; color: var(--accent); }
.quota-label { font-size: 18px; font-weight: 700; }
.quota-sub { color: var(--muted); font-size: 14px; }
.sub-teaser { background: var(--surface); border: 1px solid var(--divider); border-radius: 16px;
  padding: 16px; margin: 20px 0; text-align: center; box-shadow: 0 5px 18px rgba(30,54,90,.06); }
.sub-teaser h3 { margin: 0 0 6px; font-size: 18px; }
.sub-teaser p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field .input-wrap { position: relative; }
.field input { width: 100%; padding: 13px 14px; border: 1px solid var(--divider); border-radius: 12px;
  font-family: inherit; font-size: 16px; background: var(--surface); }
.field input:focus { outline: none; border-color: var(--accent); border-width: 2px; padding: 12px 13px; }
.field .toggle { position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 18px; color: var(--muted); }
.field .err { color: #E5484D; font-size: 13px; margin-top: 6px; min-height: 18px; }
.form-error { color: #E5484D; text-align: center; margin: 8px 0; min-height: 20px; }

/* نوار پایین (تاریخچه / حل / حساب) */
.bottom-nav { position: fixed; bottom: 0; right: 0; left: 0; display: flex; justify-content: space-around;
  align-items: center; padding: 8px 0 max(8px, env(safe-area-inset-bottom)); background: var(--surface);
  border-top: 1px solid var(--divider); box-shadow: 0 -6px 20px rgba(9,3,41,.05); max-width: 480px; margin: 0 auto; }
.nav-item { background: none; border: none; font-family: inherit; cursor: pointer; color: var(--muted);
  font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 16px; }
.nav-item.active { color: var(--accent); }
.nav-item.center .ic { width: 52px; height: 52px; border-radius: 50%; background: var(--accent);
  color: #fff; display: grid; place-items: center; font-size: 24px; margin-top: -18px;
  box-shadow: 0 4px 14px rgba(37,99,235,.4); }
.nav-item .ic { font-size: 22px; }
.has-nav { padding-bottom: 90px; }

/* ---------- تمِ کیهانی (COSMIC) — فقط خوشه‌ی حساب/اشتراک ---------- */
/* بازتعریفِ متغیرهای تم؛ مارک‌آپِ موجود خودکار تیره می‌شود. صفحه‌های عملیاتی (حل/جواب) بدونِ این کلاس روشن می‌مانند. */
.cosmic {
  --canvas: #030329; --surface: #151143;
  --text-primary: #FCFBFF; --text-secondary: #C9BEF0; --muted: #A27BF2;
  --divider: #6342B5;
  --accent: #42D7FF; --accent-soft: #2A155DC7; --accent-border: #7549D8;
  background: radial-gradient(120% 80% at 50% 0%, #0C0A43 0%, #030329 70%);
  color: var(--text-primary); min-height: 100vh;
}
.cosmic .page-title, .cosmic h2 { color: #FCFBFF; }
/* دکمه‌ی اصلی = نئونِ لایم با متنِ تیره (CTA کیهانی) */
.cosmic .btn { background: linear-gradient(135deg, #D6FF1F, #CDEE24); color: #090713; box-shadow: 0 6px 18px #d6ff1f33; }
.cosmic .btn.secondary { background: #151247B8; color: #FCFBFF; border: 1px solid #8D72FF; box-shadow: none; }
/* کارت‌ها = گرادیانِ بنفشِ عمیق */
.cosmic .sub-teaser, .cosmic .question-card {
  background: linear-gradient(160deg, #151143, #2C1264); border: 1px solid #6342B5;
  box-shadow: 0 10px 30px #05021f66; color: #FCFBFF;
}
.cosmic .sub-teaser p { color: #A27BF2; }
/* چیپ مهمان/نام‌کاربری */
.cosmic .chip-guest { background: #2A155DC7; border: 1px solid #7549D8; color: #FCFBFF; }
/* شمارنده‌ی بزرگ = فیروزه‌ای نئون */
.cosmic .quota-big { color: #42D7FF; text-shadow: 0 0 18px #42d7ff55; }
.cosmic .quota-label { color: #FCFBFF; }
.cosmic .quota-sub { color: #A27BF2; }
/* فرم‌ها */
.cosmic .field label { color: #FCFBFF; }
.cosmic .field input { background: #0C0A43; border: 1px solid #6342B5; color: #FCFBFF; }
.cosmic .field input::placeholder { color: #7c6bb0; }
.cosmic .field input:focus { border-color: #42D7FF; }
.cosmic .field .toggle { color: #A27BF2; }
.cosmic .back-btn { background: #2A155DC7; color: #42D7FF; }
.cosmic .feedback-link { color: #A27BF2; }
/* نوار پایینِ کیهانی */
.cosmic .bottom-nav { background: linear-gradient(#0C0A3F, #220D60); border-top: 1px solid #3a2b6e; }
.cosmic .nav-item { color: #9B7BF2; }
.cosmic .nav-item.active { color: #42D7FF; }
.cosmic .nav-item.center .ic { background: linear-gradient(135deg, #5445C9, #B282FD); box-shadow: 0 4px 16px #7b5df366; }

/* دکمه‌های اصلیِ تک‌افتاده (نه داخلِ ردیف) تمام‌عرض */
.screen > .btn { display: block; width: 100%; margin-left: 0; margin-right: 0; }

/* ---------- تزئیناتِ کیهانی: حلقه‌ی قهرمان + نمادهای شناور ---------- */
.cosmic-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cosmic-deco .nebula { position: absolute; border-radius: 50%; filter: blur(38px); opacity: .5; }
.cosmic-deco .nebula.n1 { width: 240px; height: 240px; left: -60px; top: 8%; background: #3a1f8c; }
.cosmic-deco .nebula.n2 { width: 220px; height: 220px; right: -70px; top: 30%; background: #5b2a9e; opacity:.4; }
.cosmic-deco .constellation { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.cosmic-deco .sym { position: absolute; direction: ltr; color: #9B7BF2; opacity: .5; font-family: "STIX Two Math", serif; font-size: 20px; }
.cosmic-deco .star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #B282FD; opacity: .7; box-shadow: 0 0 6px #B282FD; }
.cosmic-deco .planet { position: absolute; opacity: .9; background-size: contain;
  background-repeat: no-repeat; }
.cosmic-deco .planet.p1 { background-image: url("assets/02_ringed_planet.png"); }
.cosmic-deco .planet.p2 { background-image: url("assets/03_second_planet.png"); }

.quota-ring-wrap { position: relative; width: 250px; height: 250px; margin: 10px auto 4px; }
.quota-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 95deg, #4A3AB8 0deg, #6C55E8 90deg, #9B7BF2 180deg, #C9A8FF 250deg, #7B5DF3 330deg, transparent 340deg, transparent 355deg, #4A3AB8 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 20px), #000 calc(100% - 19px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 20px), #000 calc(100% - 19px));
  filter: drop-shadow(0 0 14px #7b5df3aa) drop-shadow(0 0 30px #5445c966);
}
.quota-ring::after { content:""; position:absolute; inset:6px; border-radius:50%;
  box-shadow: inset 0 0 40px #7b5df344; }
.ring-star {
  position: absolute; top: 12px; right: 52px; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle, #fff 30%, #B282FD); display: grid; place-items: center;
  color: #fff; font-size: 20px; box-shadow: 0 0 20px #ffffffaa, 0 0 34px #B282FD;
}
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .quota-big { margin: 0; font-size: 84px; color: #fff; text-shadow: 0 0 24px #b282fdaa; }
.ring-center .quota-label { color: #fff; font-size: 20px; margin-top: -6px; }
.ring-center .quota-sub { color: #A27BF2; font-size: 15px; }

/* آیکون داخلِ دکمه‌ها (کیهانی) */
.cosmic .btn .bic { float: left; opacity: .9; }


/* asset: بی‌نهایتِ سه‌بعدی در کارتِ اشتراک */
.sub-teaser { position: relative; overflow: hidden; }
.sub-infinity { position: absolute; left: -6px; bottom: -10px; width: 120px; height: 120px;
  background: url("assets/01_infinity_platform.png") no-repeat center/contain; opacity: .95; pointer-events: none; }
.cosmic .sub-teaser { padding-left: 120px; }
/* آیکون‌های نوارِ پایین (تصویری) */
.nav-item .icimg { width: 26px; height: 26px; object-fit: contain; }
.nav-item.center .ic .icimg { width: 30px; height: 30px; }
.nav-item.active .icimg { filter: drop-shadow(0 0 6px #42D7FF); }

/* محتوای صفحه‌های کیهانی همیشه بالای لایه‌ی تزئین */
.cosmic > *:not(.cosmic-deco):not(.bottom-nav) { position: relative; z-index: 1; }

/* ---------- صفحه‌ی در حالِ حل (SOLVING) — روشن، جمله‌های چرخان + چک‌لیست ---------- */
.solving { text-align: center; padding-top: 50px; }
.solve-orb { width: 80px; height: 80px; margin: 0 auto 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-border));
  box-shadow: 0 0 0 8px var(--accent-soft), 0 0 30px var(--accent); position: relative; }
.solve-orb::after { content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--accent); animation: spin 1s linear infinite; }
.solving .sentence { font-weight: 800; font-size: 20px; min-height: 30px; transition: opacity .3s; }
.solve-bar { width: 60%; max-width: 240px; height: 4px; background: var(--accent-soft); border-radius: 3px;
  margin: 16px auto 26px; overflow: hidden; position: relative; }
.solve-bar::after { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 40%;
  background: var(--accent); border-radius: 3px; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0%{left:-40%} 100%{left:100%} }
.solve-checklist { max-width: 260px; margin: 0 auto; text-align: right; }
.chk { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.chk .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--divider); display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }
.chk.done { color: var(--text-primary); }
.chk.done .tick { background: var(--success); border-color: var(--success); color: #05320a; }
.chk.active .tick { border-color: var(--accent); color: var(--accent); }
.solve-ready .solve-orb { background: var(--success); box-shadow: 0 0 0 8px #91e60022, 0 0 40px var(--success); }
.solve-ready .solve-orb::after { display: none; }

/* آیتم‌های تاریخچه (کیهانی) */
.hist-item { display: block; width: 100%; text-align: right; margin-bottom: 12px; padding: 14px 16px;
  background: linear-gradient(160deg, #151143, #2C1264); border: 1px solid #6342B5; border-radius: 16px;
  font-family: inherit; cursor: pointer; color: #FCFBFF; }
.hist-subject { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 12px;
  background: #2A155DC7; border: 1px solid #7549D8; color: #42D7FF; margin-bottom: 8px; }
.hist-subject.physics { color: #C9A8FF; } .hist-subject.chemistry { color: #6ee7e0; }
.hist-q { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.hist-a { color: #A27BF2; font-size: 14px; }

/* ---------- صفحه‌ی در حالِ حل — بازسازیِ دقیقِ SOLVING-CORE-V1 ---------- */
.solve2 { background: #FBFBFD; min-height: 100vh; padding: 16px; padding-top: max(16px, calc(env(safe-area-inset-top) + 6px)); }
.solve2 .chip-row { display: flex; justify-content: flex-start; }
.solve2 .s-chip { background: #0D62F3; color: #fff; font-weight: 700; font-size: 15px;
  padding: 6px 18px; border-radius: 14px; }
.solve2 .q-card, .solve2 .w-card { background: #FFF; border: 1px solid #D9DDE7; border-radius: 16px;
  box-shadow: 0 6px 20px #15213d10; margin-top: 16px; padding: 20px 18px; }
.solve2 .q-card { text-align: center; }
.solve2 .q-card .q-formula { direction: ltr; unicode-bidi: isolate; font-size: 22px; color: #0B153A; display: inline-block; }
.solve2 .q-card .q-img { max-width: 100%; max-height: 120px; border-radius: 8px; }
.solve2 .q-underline { width: 90px; height: 4px; background: #C7DBFF; border-radius: 3px; margin: 8px auto 0; }
/* کارتِ پیشرفت */
.solve2 .active-row { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.solve2 .active-sentence { font-weight: 800; font-size: 19px; color: #0B153A; text-align: right; }
.solve2 .active-dot { width: 16px; height: 16px; border-radius: 50%; background: #0D62F3;
  box-shadow: 0 0 10px #0d62f3aa; flex: 0 0 auto; }
.solve2 .p-bar { height: 4px; background: #9299AA; border-radius: 3px; margin: 18px 0; position: relative; overflow: visible; }
.solve2 .p-bar .fill { position: absolute; right: 0; top: 0; height: 100%; background: #0D62F3; border-radius: 3px;
  width: 15%; transition: width .6s ease; }
.solve2 .p-bar .spark { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  background: #A6FF00; box-shadow: 0 0 8px #A6FF00; transform: translate(50%,-50%); transition: right .6s ease; }
.solve2 .queued { text-align: right; color: #9BA1B2; font-size: 16px; margin: 12px 0; opacity: 0; transition: opacity .4s; }
.solve2 .queued.show { opacity: 1; }
.solve2 .w-divider { height: 1px; background: #E0E3EB; margin: 18px 0; }
/* چک‌لیستِ عمودی با خطِ رابط */
.solve2 .clist { }
.solve2 .crow { display: flex; align-items: center; justify-content: flex-start; gap: 12px; position: relative; padding: 6px 0; }
.solve2 .crow .clabel { font-weight: 700; font-size: 16px; color: #9BA1B2; }
.solve2 .crow.done .clabel { color: #0B153A; }
.solve2 .crow .cmark { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #C7DBFF; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff; font-size: 15px; background: #fff; }
.solve2 .crow.done .cmark { background: #10C86D; border-color: #10C86D; }
.solve2 .crow.active .cmark { border-color: #0D62F3; }
.solve2 .crow:not(:last-child) .cmark::after { content: ""; position: absolute; width: 2px; height: 14px;
  background: #E0E3EB; top: 100%; right: 15px; }
/* حالتِ آماده */
.solve2 .ready-icon { width: 72px; height: 72px; margin: 14px auto 10px; border-radius: 50%; background: #A6FF00;
  display: grid; place-items: center; color: #fff; font-size: 34px; box-shadow: 0 7px 24px #a6ff0066; }
.solve2 .ready-title { text-align: center; font-weight: 800; font-size: 24px; color: #0B153A; }

/* ---------- گیتِ ابهام — بازسازیِ دقیقِ AMBIGUITY-CORE-V1 ---------- */
.amb2 { background: #FBFCFF; min-height: 100vh; padding: 16px; padding-top: max(16px, calc(env(safe-area-inset-top) + 6px)); position: relative; }
.amb2 .top { display: flex; align-items: center; justify-content: space-between; }
.amb2 .a-back { width: 46px; height: 46px; border-radius: 13px; border: 1px solid #CCD4E5; background: #fff;
  color: #09183F; font-size: 20px; cursor: pointer; }
.amb2 .a-chip { background: #0D5BFF; color: #fff; font-weight: 700; font-size: 16px; padding: 8px 18px; border-radius: 12px; }
.amb2 .q-card { background: #fff; border: 1px solid #CCD4E5; border-radius: 16px; padding: 12px; margin-top: 20px; text-align: center; }
.amb2 .q-card img { max-width: 100%; max-height: 200px; border-radius: 8px; }
.amb2 .q-card .q-fallback { direction: ltr; font-size: 22px; color: #09183F; padding: 30px 0; }
.amb2 .expl-bar { display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  background: #EEF4FF; border-radius: 10px; padding: 12px 14px; margin-top: 18px; }
.amb2 .expl-bar .dot { width: 12px; height: 12px; border-radius: 50%; background: #0C5CF5; flex: 0 0 auto; }
.amb2 .expl-bar .txt { color: #09183F; font-size: 15px; }
.amb2 .prompt { text-align: center; font-weight: 800; font-size: 20px; color: #09183F; margin: 22px 0 16px; }
.amb2 .opt { display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: #fff; border: 1px solid #CCD4E5; border-radius: 12px; padding: 20px 18px; margin-bottom: 14px;
  font-family: inherit; cursor: pointer; }
.amb2 .opt .of { direction: ltr; unicode-bidi: isolate; font-size: 20px; color: #09183F; }
.amb2 .opt .oradio { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #CCD4E5; flex: 0 0 auto; }
.amb2 .opt.busy .oradio { border-color: #0C5CF5; border-top-color: transparent; animation: spin .8s linear infinite; }
.amb2 .opt.err { border-color: #F02238; background: #FFF2F4; }
.amb2 .opt.err .oradio { border: none; color: #F02238; font-size: 22px; display: grid; place-items: center; }
.amb2 .inline-err { display: flex; justify-content: space-between; margin: -6px 4px 14px; font-size: 14px; }
.amb2 .inline-err .msg { color: #71798F; }
.amb2 .inline-err .retry { color: #0C5CF5; background: none; border: none; font-family: inherit; font-weight: 700; cursor: pointer; }
.amb2 .retake { display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; border: none; color: #0C5CF5; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
  position: absolute; bottom: 26px; left: 16px; right: 16px; }
/* حالتِ منقضی */
.amb2 .exp-wrap { text-align: center; padding-top: 40px; }
.amb2 .exp-icon { font-size: 56px; color: #09183F; }
.amb2 .exp-title { font-weight: 800; font-size: 22px; color: #09183F; margin: 18px 0 26px; }
.amb2 .exp-btn { width: 100%; background: #0D5BFF; color: #fff; border: none; border-radius: 12px; padding: 16px;
  font-family: inherit; font-weight: 700; font-size: 17px; cursor: pointer; }

/* ---------- صفحه‌ی جواب — بازسازیِ دقیقِ ANSWER-CASCADE-V1 ---------- */
.ans2 { background: #FBFBFD; min-height: 100vh; padding: 12px 12px 40px; padding-top: max(12px, calc(env(safe-area-inset-top) + 4px)); }
[data-subject="math"] .ans2 { --sm: #0D62F3; --smd: #084BC4; --ss: #EEF4FF; --ssb: #BFD3FF; }
[data-subject="physics"] .ans2 { --sm: #7135F1; --smd: #5522C4; --ss: #F2EDFF; --ssb: #D5C4FF; }
[data-subject="chemistry"] .ans2 { --sm: #038685; --smd: #026866; --ss: #EDFAFA; --ssb: #B5E3E1; }
.ans2 { --sm: #0D62F3; --ss: #EEF4FF; --ssb: #BFD3FF; }
.ans2 .appbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 12px; }
.ans2 .ab-back { background: none; border: none; font-family: inherit; color: #10131A; font-weight: 700; font-size: 16px; cursor: pointer; }
.ans2 .ab-title { font-weight: 800; font-size: 20px; color: #10131A; }
.ans2 .ab-chip { background: var(--sm); color: #fff; font-weight: 700; font-size: 15px; padding: 7px 16px; border-radius: 10px; }
/* کارتِ مرحله */
.ans2 .scard { display: flex; background: #fff; border: 1.5px solid var(--sm); border-radius: 8px; overflow: hidden;
  margin-bottom: 14px; box-shadow: 0 6px 20px #15213d12; opacity: 0; transform: translateY(8px); transition: .3s; }
.ans2 .scard.show { opacity: 1; transform: none; }
.ans2 .rail { background: var(--sm); width: 46px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 8px; }
.ans2 .rail .num { color: #fff; font-weight: 800; font-size: 22px; }
.ans2 .rail .chk { width: 22px; height: 22px; border-radius: 50%; background: #91E600; display: grid; place-items: center; color: #fff; font-size: 13px; }
.ans2 .sbody { flex: 1; min-width: 0; }
.ans2 .sbody .s-head { padding: 14px 16px; }
.ans2 .s-title { font-weight: 800; font-size: 17px; color: #10131A; margin-bottom: 6px; }
.ans2 .s-desc { color: #4F5668; font-size: 15px; line-height: 1.9; }
.ans2 .frow { display: flex; direction: ltr; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid #EDF0F5; background: var(--ss); }
.ans2 .frow .ficon { width: 40px; flex: 0 0 auto; color: var(--sm); display: grid; place-items: center; }
.ans2 .frow .fdiv { width: 1px; align-self: stretch; background: var(--ssb); }
.ans2 .frow .ff { direction: ltr; unicode-bidi: isolate; font-size: 18px; color: #111318; overflow-x: auto; flex: 1; text-align: center; }
/* بخشِ جوابِ نهایی */
.ans2 .final-head { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 18px 4px 10px; }
.ans2 .final-head .fchk { width: 24px; height: 24px; border-radius: 50%; background: #91E600; display: grid; place-items: center; color: #fff; font-size: 14px; }
.ans2 .final-head .ft { font-weight: 800; font-size: 19px; color: #10131A; }
.ans2 .final-card { background: #fff; border: 1px solid #D9DEE8; border-radius: 12px; padding: 16px; box-shadow: 0 6px 20px #15213d12; }
.ans2 .fpart { text-align: center; margin: 8px 0; }
.ans2 .fpart .plabel { display: inline-block; background: var(--sm); color: #fff; font-weight: 700; border-radius: 8px; padding: 3px 12px; margin-bottom: 8px; }
.ans2 .fpart .ptext { color: #4F5668; font-size: 15px; margin-bottom: 8px; }
.ans2 .fpart .pbox { display: inline-block; background: var(--ss); border: 1px solid var(--ssb); border-radius: 10px; padding: 10px 20px; direction: ltr; unicode-bidi: isolate; font-size: 18px; color: #111318; max-width: 100%; overflow-x: auto; }
.ans2 .fb-link { display: block; width: 100%; text-align: center; margin-top: 20px; background: none; border: none;
  color: #667085; font-family: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; }
.ans2 .fb-link.done { color: #10C86D; text-decoration: none; }

/* ---------- تاریخچه — بازسازیِ دقیقِ HISTORY-CORE-V1 (روشن) ---------- */
.hist2 { background: #FBFCFE; min-height: 100vh; padding: 12px 12px 90px; padding-top: max(12px, calc(env(safe-area-inset-top) + 4px)); }
.hist2 .h-title { text-align: center; font-weight: 800; font-size: 22px; color: #171820; margin: 8px 0 16px; }
.hist2 .group-head { font-weight: 700; font-size: 18px; color: #171820; margin: 18px 4px 10px; text-align: right; }
.hist2 .hrow { display: flex; align-items: stretch; width: 100%; height: 99px; background: #fff;
  border: 1px solid #E0E2E7; border-radius: 12px; overflow: hidden; margin-bottom: 14px; font-family: inherit; cursor: pointer; padding: 0; }
.hist2 .h-rail { width: 72px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; }
.hist2 .h-rail .ic { width: 34px; height: 34px; }
.hist2 .h-rail .lbl { font-size: 14px; font-weight: 700; }
.hist2 .h-preview { flex: 1; min-width: 0; text-align: right; padding: 14px 14px; overflow: hidden; }
.hist2 .h-q { font-weight: 600; font-size: 16px; color: #171820; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist2 .h-q .formula, .hist2 .h-a .formula { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.hist2 .h-a { font-size: 16px; color: #5F606A; margin-top: 6px; direction: ltr; unicode-bidi: isolate; text-align: right; }
.hist2 .h-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; color: #5F606A; font-size: 13px; text-align: center; }
.hist2 .h-chev { flex: 0 0 auto; display: grid; place-items: center; padding: 0 12px; }
.hist2 .h-chev .cc { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
/* حالتِ خالی */
.hist2 .h-empty { text-align: center; padding-top: 70px; }
.hist2 .h-empty .stack { display: inline-flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.hist2 .h-empty .card-mini { width: 180px; height: 44px; border-radius: 10px; border: 2px solid; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.hist2 .h-empty .card-mini .l { flex: 1; height: 3px; background: currentColor; opacity: .25; border-radius: 2px; }
.hist2 .h-empty .et { font-weight: 700; font-size: 18px; color: #171820; margin-bottom: 24px; }
.hist2 .h-empty .eb { background: #1467F5; color: #fff; border: none; border-radius: 12px; padding: 16px 28px; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }

/* ---------- خانه — بازسازیِ دقیقِ HOME_APPROVED (روشن) ---------- */
.home2 { background: #FFFFFF; min-height: 100vh; padding: 14px 16px 90px; padding-top: max(14px, calc(env(safe-area-inset-top) + 6px)); }
.home2 .h-top { display: flex; align-items: center; justify-content: space-between; }
.home2 .free-badge { display: inline-flex; align-items: center; gap: 7px; background: #EEFFD7; color: #3a6b00;
  border-radius: 16px; padding: 7px 13px; font-weight: 700; font-size: 13px; }
.home2 .free-badge .fd { width: 9px; height: 9px; border-radius: 50%; background: #6FE000; }
.home2 .h-logo { width: 64px; height: 64px; object-fit: contain; }
.home2 .h-titr { text-align: center; font-weight: 800; font-size: 23px; color: #071027; margin: 34px 0 26px; }
.home2 .cards { display: flex; gap: 12px; }
.home2 .scard2 { flex: 1; background: #fff; border: 1.5px solid #E5E7EB; border-radius: 18px; padding: 16px 8px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.home2 .scard2.sel { border-color: #7B2CF1; border-width: 2px; background: #FBF7FF; }
.home2 .scard2 .sdot { position: absolute; top: 10px; left: 10px; width: 15px; height: 15px; border-radius: 50%; background: #7B2CF1; opacity: 0; }
.home2 .scard2.sel .sdot { opacity: 1; }
.home2 .scard2 img { width: 100%; max-width: 84px; height: auto; }
.home2 .scard2 .slabel { font-weight: 800; font-size: 17px; color: #071027; }
.home2 .h-cta { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  background: #1677F4; color: #fff; border: none; border-radius: 16px; padding: 20px; margin-top: 22px;
  font-family: inherit; font-weight: 800; font-size: 18px; cursor: pointer; }
.home2 .h-cta img { width: 26px; height: 26px; }

/* ---------- نوارِ پایینِ سرتاسری (راه ب: ماسک + رنگ per-تم) ---------- */
.bottom-nav .nav-item .icm {
  width: 26px; height: 26px; display: block;
  background-color: #5F606A;               /* پیش‌فرضِ روشن: خاکستری */
  -webkit-mask: var(--icon) no-repeat center / contain;
          mask: var(--icon) no-repeat center / contain;
}
.bottom-nav .nav-item.center .icm { width: 30px; height: 30px; }
.bottom-nav .nav-item.active .icm { background-color: #1677F4; }  /* فعالِ روشن: آبی */
/* روی صفحه‌های کیهانی */
.cosmic .bottom-nav .nav-item .icm { background-color: #9B7BF2; }        /* بنفشِ روشن */
.cosmic .bottom-nav .nav-item.active .icm { background-color: #42D7FF; } /* فیروزه‌ای فعال */

/* ---------- اسپلش (طبق motion_spec طراح + تصمیم‌های صابر) ---------- */
@font-face{font-family:Yellowtail;src:url("fonts/yellowtail.woff2") format("woff2");font-display:block}
.splash{position:fixed;inset:0;background:#01040C;z-index:9999;display:flex;align-items:center;justify-content:center;transition:opacity .3s ease}
.splash.out{opacity:0;pointer-events:none}
.sp-wrap{position:relative;width:min(64vw,300px)}
.sp-logo{width:100%;display:block;
  -webkit-mask-image:linear-gradient(135deg,#000 41%,transparent 59%);
  mask-image:linear-gradient(135deg,#000 41%,transparent 59%);
  -webkit-mask-size:280% 280%;mask-size:280% 280%;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  animation:spEntry 300ms cubic-bezier(.22,1,.36,1) both,
            spSweep 3700ms cubic-bezier(.3,.1,.3,.9) 300ms both}
.sp-wrap{animation:spSettle 300ms cubic-bezier(.2,.8,.2,1) 3750ms both}
.sp-name{direction:ltr;white-space:nowrap;margin-top:6px;text-align:center}
.sp-name span{display:inline-block;font-family:Yellowtail,cursive;font-size:44px;line-height:1.3;
  padding-bottom:10px;color:#c3cbdd;
  text-shadow:0 0 12px rgba(255,255,255,.25)}
.sp-name{opacity:0;animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both}
.sp-name span:nth-child(1){animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both,spWave1 2410ms linear 650ms infinite}
.sp-name span:nth-child(2){animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both,spWave2 2410ms linear 650ms infinite}
.sp-name span:nth-child(3){animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both,spWave3 2410ms linear 650ms infinite}
.sp-name span:nth-child(4){animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both,spWave4 2410ms linear 650ms infinite}
.sp-name span:nth-child(5){animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both,spWave5 2410ms linear 650ms infinite}
.sp-name span:nth-child(6){animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both,spWave6 2410ms linear 650ms infinite}
.sp-name span:nth-child(7){animation:spNameIn 420ms cubic-bezier(.22,1,.36,1) 200ms both,spWave7 2410ms linear 650ms infinite}
@keyframes spNameIn{from{opacity:0}to{opacity:1}}
@keyframes spWave1{0.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}1.24%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}7.47%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}13.69%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}80.08%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}86.31%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}92.53%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}100.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}}
@keyframes spWave2{0.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}6.64%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}12.86%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}19.09%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}74.69%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}80.91%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}87.14%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}100.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}}
@keyframes spWave3{0.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}12.03%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}18.26%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}24.48%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}69.29%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}75.52%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}81.74%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}100.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}}
@keyframes spWave4{0.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}17.43%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}23.65%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}29.88%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}63.9%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}70.12%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}76.35%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}100.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}}
@keyframes spWave5{0.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}22.82%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}29.05%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}35.27%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}58.51%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}64.73%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}70.95%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}100.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}}
@keyframes spWave6{0.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}28.22%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}34.44%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}40.66%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}53.11%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}59.34%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}65.56%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}100.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}}
@keyframes spWave7{0.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}33.61%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}39.83%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}46.06%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}47.72%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}53.94%{color:#ffffff;text-shadow:0 0 16px rgba(255,255,255,.95),0 0 34px rgba(255,255,255,.55)}60.17%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}100.0%{color:#c3cbdd;text-shadow:0 0 12px rgba(255,255,255,.25)}}
@keyframes spEntry{from{opacity:0;transform:translate(-10px,-10px);filter:blur(7px)}to{opacity:1;transform:translate(0,0);filter:blur(0)}}
@keyframes spSweep{from{-webkit-mask-position:87% 87%;mask-position:87% 87%}to{-webkit-mask-position:0% 0%;mask-position:0% 0%}}
@keyframes spSettle{from{transform:scale(.98)}to{transform:scale(1)}}
@keyframes spBreath{from{filter:drop-shadow(0 0 6px rgba(182,255,0,.10))}to{filter:drop-shadow(0 0 16px rgba(26,107,255,.22))}}
@media (prefers-reduced-motion: reduce){
  .sp-logo{-webkit-mask-image:none;mask-image:none;animation:spFadeIn 350ms ease-out both}
  .sp-name,.sp-name span{animation:spFadeIn 350ms ease-out both}
  @keyframes spFadeIn{from{opacity:0}to{opacity:1}}
}

/* جزیره‌ی فرمولِ اینلاین داخل متنِ فارسی */
.imath{direction:ltr;unicode-bidi:isolate;display:inline-block;padding:0 3px;vertical-align:middle}
