/* Readixa — سیستم طراحی صفحه‌های کاربر (حساب، ورود، پلن‌ها، دانلود، یادگیری، …)
   موبایل‌محور؛ از ۸۶۰px به بالا چیدمان دسکتاپ. همراه shell.css بارگذاری می‌شود. */
:root {
  color-scheme: light;
  --bg: #f6f6fa; --surface: #ffffff; --surface-2: #f8f8fc; --surface-3: #f1f1f7;
  --line: #ebebf2; --line-2: #dedfe9;
  --ink: #1d2131; --ink-2: #4a5065; --ink-3: #737a8f; --ink-4: #a2a7b8;
  --pink: #e15b9a; --violet: #8f63ee; --blue: #377def;
  --grad: linear-gradient(120deg, #e15b9a 0%, #9a67ee 55%, #377def 100%);
  --grad-soft: linear-gradient(135deg, #fbeef5 0%, #f1ecfd 50%, #e9f2fe 100%);
  --ok: #148a5b; --ok-soft: #e5f6ee; --warn: #a66b07; --warn-soft: #fdf3dc; --err: #c93c4a; --err-soft: #fdebed;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 26px;
  --sh-1: 0 1px 2px rgba(25, 28, 50, .04);
  --sh-2: 0 1px 2px rgba(25, 28, 50, .04), 0 12px 32px -18px rgba(40, 40, 95, .22);
  --sh-3: 0 2px 6px rgba(25, 28, 50, .05), 0 24px 60px -24px rgba(40, 40, 95, .35);
  --ring: 0 0 0 4px rgba(143, 99, 238, .18);
  --ease: cubic-bezier(.23, 1, .32, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; overflow-x: clip; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: Vazirmatn, Tahoma, sans-serif; font-size: 15px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.5; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: #f6c6de; color: #261d33; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; background: var(--surface-3); color: #7a3f86; border-radius: 6px; padding: 1px 6px; direction: ltr; unicode-bidi: isolate; }
.icon, .ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-3); font-size: 14px; }
.ok { color: var(--ok); font-size: 14px; }
.err { color: var(--err); font-size: 14px; }
p:empty, .ok:empty, .err:empty { display: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── چیدمان صفحه ── */
.page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }
.page.narrow { max-width: 880px; }
.page-bg { position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); height: 420px; z-index: -1; pointer-events: none; background: radial-gradient(60% 80% at 85% 0%, #e3eefd 0%, transparent 70%), radial-gradient(50% 70% at 10% 10%, #f8e5f1 0%, transparent 70%); }
.hero { padding: 44px 0 28px; display: grid; gap: 10px; }
.hero.center { text-align: center; justify-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); color: #a34688; font-size: 13px; font-weight: 650; }
.kicker .icon { width: 15px; height: 15px; }
.hero h1 { font-size: 40px; font-weight: 850; letter-spacing: -.8px; line-height: 1.45; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--ink-3); font-size: 16px; max-width: 620px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 20px; font-weight: 800; }
.section-head p { color: var(--ink-3); font-size: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: grid; gap: 12px; }

/* ── کارت ── */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-2); display: grid; gap: 14px; min-width: 0; align-content: start; }
.card > b:first-child, .card-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head h2, .card-head h3 { font-size: 17px; font-weight: 800; }
.card-head p { font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }
.card-head .spacer + * { flex: none; }
.ibox { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--ink-2); }
.ibox .icon { width: 21px; height: 21px; }
.ibox.pink { background: #fdeaf3; color: #c33f80; }
.ibox.violet { background: #efe9fd; color: #7046d6; }
.ibox.blue { background: #e7f0fe; color: #2a68d6; }
.ibox.green { background: #e4f6ed; color: #198058; }
.ibox.amber { background: #fdf2dc; color: #a46a06; }
.card.soft { background: var(--grad-soft); border-color: #fff; }
.card.dashed { border-style: dashed; border-color: var(--line-2); box-shadow: none; background: rgba(255, 255, 255, .7); }
.card.link { text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card.link:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }

/* ── دکمه ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .18s, border-color .18s, transform .15s var(--ease), box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-2); border-color: #d2d3e0; }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 20px -10px rgba(29, 33, 49, .6); }
.btn.primary:hover { background: #2d3247; }
.btn.brand { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -12px rgba(154, 103, 238, .8); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface); }
.btn.soft { background: var(--surface-3); border-color: transparent; }
.btn.soft:hover { background: #e9e9f2; }
.btn.danger { color: var(--err); }
.btn.lg { min-height: 52px; padding: 0 26px; font-size: 15.5px; border-radius: 15px; }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 40px; min-height: 40px; padding: 0; }
.btn.sm.icon-only { width: 34px; min-height: 34px; }
.btn .icon { width: 18px; height: 18px; }

/* ── فرم ── */
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
:where(.input, input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font-size: 15px; outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
:where(.input, input, select, textarea):focus { border-color: #b9a1f2; background: #fff; box-shadow: var(--ring); }
:where(select) { appearance: none; -webkit-appearance: none; padding-left: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23737a8f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; }
input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
.form-row { display: flex; gap: 10px; align-items: stretch; }
.form-row > .input, .form-row > input { flex: 1; min-width: 0; }

/* ── زبانه‌ها و چیپ‌ها ── */
.tabs, .seg { display: flex; gap: 4px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: 15px; background: var(--surface-3); border: 1px solid var(--line); }
.tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
.tabs button, .seg button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 16px; border-radius: 11px; border: 0; background: transparent; color: var(--ink-3); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .18s, color .18s, box-shadow .18s; }
.tabs button:hover, .seg button:hover { color: var(--ink); }
.tabs button.on, .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(25, 28, 50, .08), 0 4px 12px -6px rgba(25, 28, 50, .18); }
.tab { display: none; } .tab.on { display: grid; gap: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: all .18s; }
.chip:hover { border-color: #cfd0de; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 11px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 650; }

/* ── آمار و نمودار ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { position: relative; display: grid; gap: 2px; align-content: start; padding: 16px 16px 14px; border-radius: 17px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.stat .l { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.stat b { font-size: 28px; font-weight: 850; line-height: 1.4; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat small { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.bar { height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.bar > div { height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .5s var(--ease); }
.bar.warn > div { background: linear-gradient(90deg, #f2b544, #e58a3a); }
.bar.over > div { background: linear-gradient(90deg, #e86a7c, #c93c4a); }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 110px; direction: ltr; padding-top: 18px; }
.chart i { flex: 1; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(#d8c7fb, #c5d9fb); position: relative; transition: background .2s; }
.chart i:hover { background: linear-gradient(#b99af5, #9fc0f7); }
.chart i.today { background: var(--grad); }
.chart i:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3; padding: 4px 9px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; direction: rtl; }

/* ── جدول و فهرست ── */
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
th { background: var(--surface-2); color: var(--ink-3); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.list { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; display: grid; gap: 1px; }
.list-row .grow b { font-size: 14.5px; }
.list-row .grow small { color: var(--ink-3); font-size: 13px; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 26px 16px; color: var(--ink-3); font-size: 14px; }
.empty .ibox { width: 52px; height: 52px; border-radius: 16px; }

.code { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 32px; font-weight: 700; letter-spacing: .22em; direction: ltr; text-align: center; padding: 18px 14px; border-radius: 18px; border: 1.5px dashed #c9b6f2; background: var(--grad-soft); color: #5a3aa8; }
.flash { padding: 12px 16px; border-radius: 14px; font-weight: 650; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--err-soft); color: var(--err); }
.toast { position: fixed; z-index: 120; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--sh-3); animation: toast-in .25s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ── ورود ── */
.auth-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; max-width: 980px; margin: 40px auto 0; border-radius: var(--r-xl); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-3); }
.auth-side { position: relative; padding: 40px; background: radial-gradient(70% 60% at 100% 0%, #c9dcfb 0%, transparent 70%), radial-gradient(70% 70% at 0% 100%, #f6cde3 0%, transparent 70%), linear-gradient(160deg, #f6f0ff, #eef4ff); display: grid; align-content: space-between; gap: 30px; overflow: hidden; }
.auth-side h1 { font-size: 34px; font-weight: 850; line-height: 1.5; letter-spacing: -.6px; }
.auth-side h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side p { color: var(--ink-2); margin-top: 10px; }
.auth-benefits { display: grid; gap: 12px; }
.auth-benefits div { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .7); border: 1px solid #fff; font-size: 14.5px; font-weight: 650; }
.auth-benefits .ibox { width: 36px; height: 36px; border-radius: 11px; }
.auth-main { padding: 40px; display: grid; gap: 18px; align-content: center; }
.auth-main h2 { font-size: 24px; font-weight: 850; }
.auth-main .tabs { width: 100%; }
.auth-main .tabs button { flex: 1; justify-content: center; }
.step { display: none; } .step.on { display: grid; gap: 14px; }
.otp-code { font-family: ui-monospace, Menlo, monospace; font-size: 28px !important; letter-spacing: .4em; text-align: center; direction: ltr; min-height: 60px !important; }
.otp-hint { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.otp-hint a { color: var(--ink-2); cursor: pointer; font-weight: 650; text-decoration: none; }
.otp-hint a:hover { color: var(--pink); }
.otp-hint a[aria-disabled="true"] { color: var(--ink-4); pointer-events: none; }
.auth-card { max-width: 460px; margin: 40px auto 0; }

/* ── پلن‌ها ── */
.plan-switch { margin: 0 auto 22px; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-2); }
.plan.hot { border: 0; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 2px solid transparent; box-shadow: 0 30px 60px -30px rgba(143, 99, 238, .55); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name { font-size: 18px; font-weight: 800; }
.plan-badge { padding: 3px 10px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; }
.plan .price { font-size: 38px; font-weight: 900; line-height: 1.3; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.plan .price-alt { font-size: 14px; color: var(--ink-3); margin-top: -10px; }
.plan .plan-desc { font-size: 14px; color: var(--ink-2); line-height: 1.9; }
.plan ul { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; font-size: 14px; color: var(--ink-2); }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%23148a5b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
.plan-actions { margin-top: auto; display: grid; gap: 8px; }
.plan-actions .btn { width: 100%; }
.plan-actions .muted { text-align: center; font-size: 13px; }
.info-strip { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }

/* ── دانلود ── */
.dl-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dl-tabs button { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: #fff; text-align: right; cursor: pointer; box-shadow: var(--sh-1); transition: border-color .18s, box-shadow .18s, transform .15s var(--ease); }
.dl-tabs button:hover { border-color: #d3d4e1; }
.dl-tabs button .ibox { width: 44px; height: 44px; }
.dl-tabs button span { display: grid; gap: 0; min-width: 0; }
.dl-tabs button b { font-size: 15px; font-weight: 800; color: var(--ink); }
.dl-tabs button small { font-size: 12.5px; color: var(--ink-3); }
.dl-tabs button.on { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: 0 16px 34px -20px rgba(143, 99, 238, .6); }
.dl-pane { display: none; } .dl-pane.on { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dl-pane > .card:first-child { grid-column: 1 / -1; }
.dl-hero { background: radial-gradient(60% 90% at 0% 0%, #ece2fd 0%, transparent 70%), radial-gradient(60% 90% at 100% 100%, #fde6f0 0%, transparent 70%), #fff; padding: 28px; }
.dl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-head .big { font-size: 24px; font-weight: 850; }
.dl-hero .ibox { width: 56px; height: 56px; border-radius: 17px; }
.dl-hero .ibox .icon { width: 28px; height: 28px; }
ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 4px; }
ol.steps li { counter-increment: s; position: relative; padding: 6px 44px 10px 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.9; }
ol.steps li::before { content: counter(s, persian); position: absolute; right: 0; top: 4px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); font-weight: 800; font-size: 14px; }
ol.steps li:not(:last-child)::after { content: ""; position: absolute; right: 14.5px; top: 38px; bottom: -2px; width: 1px; background: var(--line-2); }

/* ── حساب من ── */
.acc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.profile { grid-column: span 2; background: radial-gradient(70% 120% at 100% 0%, #efe7fe 0%, transparent 60%), radial-gradient(60% 100% at 0% 100%, #fde9f2 0%, transparent 60%), #fff; }
.profile-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-lg { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 26px; font-weight: 850; flex: none; box-shadow: 0 12px 26px -14px rgba(143, 99, 238, .9); }
.profile-top .who { flex: 1; min-width: 160px; display: grid; }
.profile-top .who b { font-size: 20px; font-weight: 850; }
.profile-top .who span { color: var(--ink-3); font-size: 14px; direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.quota { display: grid; gap: 8px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); }
.quota-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); }
.quota-top b { color: var(--ink); font-size: 15px; }
.quick { display: grid; gap: 8px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 15px; text-decoration: none; border: 1px solid var(--line); background: var(--surface-2); transition: background .18s, border-color .18s; }
.quick a:hover { background: #fff; border-color: var(--line-2); }
.quick a .grow { flex: 1; display: grid; }
.quick a b { font-size: 14.5px; }
.quick a small { font-size: 12.5px; color: var(--ink-3); }
.quick a > .icon { width: 16px; height: 16px; color: var(--ink-4); }
.devices { display: grid; gap: 8px; }
.device { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.device .grow { flex: 1; min-width: 0; display: grid; }
.device small { color: var(--ink-3); font-size: 12.5px; }
.pay-status { font-size: 12px; }

/* ── متن حقوقی ── */
.legal { display: grid; gap: 16px; }
.legal .lang { position: sticky; top: calc(var(--rx-header-h, 64px) + 10px); z-index: 5; margin: 0 auto; }
.legal section { display: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px 36px; box-shadow: var(--sh-2); }
.legal section.on { display: block; }
.legal h1 { font-size: 24px; font-weight: 850; margin-bottom: 4px; }
.legal h2 { font-size: 18px; font-weight: 800; margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal p, .legal li { color: var(--ink-2); line-height: 2.05; font-size: 15px; }
.legal ul { padding-inline-start: 20px; display: grid; gap: 8px; }
.legal a { color: #7046d6; }
.legal .en { direction: ltr; text-align: left; }
.legal .en ul { padding-inline-start: 20px; }

/* ── ۴۰۴ ── */
.notfound { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 70px 0 40px; }
.notfound .big { font-size: 130px; font-weight: 900; line-height: 1; letter-spacing: -4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: 28px; font-weight: 850; }

/* ═════════════ یادگیری زبان ═════════════ */
.learn-shell { padding-top: 22px; }
.learn-nav { position: sticky; top: calc(var(--rx-header-h, 64px) + 10px); z-index: 20; display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 0 auto 6px; padding: 5px; border-radius: 18px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--sh-2); overflow-x: auto; scrollbar-width: none; }
.learn-nav::-webkit-scrollbar { display: none; }
.learn-nav a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 13px; color: var(--ink-3); text-decoration: none; font-size: 14.5px; font-weight: 700; white-space: nowrap; transition: background .18s, color .18s; }
.learn-nav a .icon { width: 19px; height: 19px; }
.learn-nav a:hover { color: var(--ink); background: var(--surface-3); }
.learn-nav a[aria-current=page] { background: var(--ink); color: #fff; }
.learn-nav .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pink); color: #fff; font-size: 11.5px; line-height: 20px; text-align: center; }
.learn-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; outline: none; min-width: 0; }
.learn-loading { padding: 70px 0; text-align: center; color: var(--ink-3); }
.learn-loading::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--violet); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.learn-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 22px; border-radius: var(--r-xl); border: 1.5px dashed var(--line-2); background: rgba(255, 255, 255, .7); }
.learn-empty::before { content: ""; width: 56px; height: 56px; border-radius: 18px; background: var(--grad-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6c-3-2-6-2-9-1v15c3-1 6-1 9 1 3-2 6-2 9-1V5c-3-1-6-1-9 1Zm0 0v15' fill='none' stroke='%238f63ee' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px no-repeat; }
.learn-empty b { font-size: 17px; font-weight: 800; }
.learn-empty p { max-width: 520px; }
.learn-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; }
.learn-head > div:first-child { min-width: 0; }
.learn-head h1 { font-size: 32px; font-weight: 850; letter-spacing: -.5px; line-height: 1.45; overflow-wrap: anywhere; }
.learn-head h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.learn-head p { color: var(--ink-3); font-size: 14.5px; margin-top: 4px; }
.learn-head select, .row-gap select { width: auto; min-height: 40px; font-size: 13.5px; padding-top: 6px; padding-bottom: 6px; background-color: #fff; }
.learn-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 16px; font-size: 13.5px; color: var(--ink-3); }
.learn-crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.learn-crumbs a:hover { border-color: var(--line-2); }
.learn-view .icon { width: 18px; height: 18px; }

/* داشبورد */
.dash-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dash-stats .stat { background: #fff; box-shadow: var(--sh-1); padding-top: 54px; }
.dash-stats .stat::before { content: ""; position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 10px; background: var(--c-bg) var(--c-ico) center / 18px no-repeat; }
.dash-stats .stat:nth-child(1) { --c-bg: #fdeee4; --c-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22c4 0 7-3 7-7 0-4-3-6-4-10-2 2-3 4-3 6-1-1-2-2-2-4-3 2-5 5-5 8 0 4 3 7 7 7Z' fill='none' stroke='%23d96b2b' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dash-stats .stat:nth-child(2) { --c-bg: #e7f0fe; --c-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='4' fill='none' stroke='%232a68d6' stroke-width='1.8'/%3E%3Cpath d='m10 9 5 3-5 3Z' fill='none' stroke='%232a68d6' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dash-stats .stat:nth-child(3) { --c-bg: #fdeaf3; --c-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6c-3-2-6-2-9-1v15c3-1 6-1 9 1 3-2 6-2 9-1V5c-3-1-6-1-9 1Zm0 0v15' fill='none' stroke='%23c33f80' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dash-stats .stat:nth-child(4) { --c-bg: #e4f6ed; --c-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='%23198058' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dash-stats .stat:nth-child(5) { --c-bg: #efe9fd; --c-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 9 5-9 5-9-5Z M3 13l9 5 9-5' fill='none' stroke='%237046d6' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dash-stats .stat:nth-child(6) { --c-bg: #fdf2dc; --c-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1 6.2L12 17.3 6.5 20.2l1-6.2L3 9.6l6.2-.9Z' fill='none' stroke='%23a46a06' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.week-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; direction: ltr; padding-top: 10px; }
.week-chart .col { flex: 1; display: grid; justify-items: center; align-content: end; gap: 6px; height: 100%; }
.week-chart i { width: 100%; max-width: 26px; border-radius: 8px 8px 4px 4px; background: linear-gradient(#dccdfb, #cfe0fc); }
.week-chart .col.today i { background: var(--grad); }
.week-chart span { font-size: 11.5px; color: var(--ink-4); }
.week-chart .col.today span { color: var(--ink); font-weight: 800; }
.box-bars { display: grid; gap: 12px; }
.box-bars .bx { display: grid; grid-template-columns: 62px 1fr 34px; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.box-bars .bx > span:last-child { text-align: left; font-weight: 800; color: var(--ink); }
.box-bars .bx .bar { height: 12px; }
.recent-list { display: grid; gap: 8px; }

/* کتابخانه */
.lib-tools, .ep-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lib-tools .search, .ep-tools .search { position: relative; flex: 1 1 260px; min-width: 0; display: block; }
.lib-tools .search .icon { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; }
.lib-tools .search input { padding-right: 42px; background: #fff; }
.ep-tools .search input { background: #fff; }
.lib-tools .chips { flex: 1 1 100%; min-width: 0; }
.lib-tools > *, .ep-tools > * { min-width: 0; }
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
.show-card { display: grid; gap: 6px; align-content: start; text-decoration: none; padding: 8px 8px 12px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); transition: transform .22s var(--ease), box-shadow .22s var(--ease); min-width: 0; }
.show-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.poster { position: relative; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, hsl(var(--h) 70% 72%), hsl(calc(var(--h) + 40) 62% 52%)); }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 25, .45)); pointer-events: none; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .initial { font-size: 56px; font-weight: 900; color: rgba(255, 255, 255, .92); text-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.poster img + .initial { display: none; }
.poster .site { position: absolute; z-index: 1; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 11.5px; font-weight: 750; direction: ltr; backdrop-filter: blur(6px); }
.show-card b { font-size: 15px; font-weight: 800; padding: 4px 6px 0; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.show-card small { font-size: 12.5px; color: var(--ink-3); padding: 0 6px; line-height: 1.7; }
.mini-bar { display: block; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 2px 6px 0; flex: none; }
.mini-bar > i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.show-hero { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: end; padding: 18px; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-2); }
.show-hero .poster { box-shadow: var(--sh-2); }
.season { display: grid; gap: 8px; }
.season h2 { font-size: 18px; font-weight: 850; margin: 8px 0 2px; }
.ep-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 17px; background: #fff; border: 1px solid var(--line); text-decoration: none; transition: border-color .18s, box-shadow .18s, transform .18s var(--ease); min-width: 0; }
.ep-row:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.ep-num { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-soft); color: #6a45cf; font-weight: 850; font-size: 15px; }
.ep-row > span:nth-child(2) { display: grid; min-width: 0; }
.ep-row b { font-size: 15px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-row .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-3); }
.ep-row .meta > span + span::before { content: "·"; margin-inline-end: 12px; color: var(--ink-4); }
.ep-row > .muted { font-size: 12.5px; white-space: nowrap; }
.ep-row .mini-bar { margin: 0; }

/* متن قسمت */
.ep-tools { padding: 12px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.ep-tools select { width: auto; min-height: 40px; font-size: 13.5px; padding-top: 4px; padding-bottom: 4px; background-color: #fff; }
.ep-tools .search input { min-height: 42px; }
.ep-tools .seg { padding: 3px; }
.ep-tools .seg button { min-height: 34px; padding: 0 12px; font-size: 13px; }
.comp-pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 13px; background: var(--ok-soft); color: var(--ok); font-size: 13.5px; font-weight: 750; }
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "tm play en" "tm play fa" ". . notes"; column-gap: 10px; row-gap: 2px; padding: 12px 14px; border-radius: 17px; background: #fff; border: 1px solid var(--line); transition: border-color .18s, background .18s; }
.line:hover { border-color: var(--line-2); }
.line.hit { border-color: #f0b84c; background: #fffaf0; }
.line .tm { grid-area: tm; align-self: start; min-height: 30px; padding: 0 9px; border-radius: 9px; border: 0; background: var(--surface-3); color: var(--ink-3); font: 650 12px ui-monospace, Menlo, monospace; direction: ltr; cursor: pointer; }
.line .tm:hover { background: #e9e3fb; color: #6a45cf; }
.line .play { grid-area: play; align-self: start; width: 30px; height: 30px; border-radius: 9px; border: 0; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); cursor: pointer; }
.line .play:hover, .line .play.on { background: var(--ink); color: #fff; }
.line .play.busy { opacity: .5; }
.line .play .icon { width: 16px; height: 16px; }
.line .en { grid-area: en; direction: ltr; text-align: left; font-size: 16px; color: var(--ink); line-height: 1.75; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.line .fa { grid-area: fa; font-size: 15px; color: var(--ink-2); line-height: 1.95; }
.line .fa.pending { color: var(--ink-4); font-size: 13px; }
.line .notes { grid-area: notes; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.line .tip { grid-area: auto; grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); padding: 8px 12px; border-radius: 12px; background: var(--surface-2); margin-top: 6px; }
.lines.mode-en .fa, .lines.mode-fa .en { display: none; }
.lines.mode-fa .line { grid-template-areas: "tm play fa" ". . notes"; }
.lines.mode-en .line { grid-template-areas: "tm play en" ". . notes"; }
.lines.no-notes .notes { display: none !important; }
.note { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 6px 4px 10px; border-radius: 12px; background: var(--k-bg, var(--surface-3)); color: var(--k-fg, var(--ink-2)); font-size: 13px; line-height: 1.6; border: 1px solid transparent; }
.note .kd { font-size: 11px; font-weight: 800; opacity: .75; }
.note .en-w { direction: ltr; font-weight: 750; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.note button { min-height: 26px; padding: 0 9px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .8); color: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.note button:hover { background: #fff; }
.note.known { opacity: .5; }
.note.saved button.save { background: var(--ok); color: #fff; }
.k-verb { --k-bg: #e7f0fe; --k-fg: #22569f; }
.k-phrasal { --k-bg: #efe9fd; --k-fg: #5b37b8; }
.k-idiom { --k-bg: #fdeaf3; --k-fg: #a8326d; }
.k-vocab { --k-bg: #e4f6ed; --k-fg: #17714f; }
.k-grammar { --k-bg: #fdf2dc; --k-fg: #8a5a06; }

/* آزمون و مرور */
.quiz { display: grid; justify-items: center; }
.quiz-card { width: 100%; max-width: 620px; display: grid; gap: 16px; padding: 26px; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-3); }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); font-weight: 650; }
.quiz-word { display: flex; align-items: center; justify-content: center; gap: 10px; direction: ltr; font-size: 34px; font-weight: 850; text-align: center; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow-wrap: anywhere; }
.quiz-sent { direction: ltr; text-align: center; font-size: 16.5px; color: var(--ink-2); line-height: 1.8; padding: 14px; border-radius: 16px; background: var(--surface-2); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.quiz-sent mark { background: #fbe1ee; color: #a8326d; border-radius: 5px; padding: 0 3px; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt { min-height: 58px; padding: 10px 14px; border-radius: 15px; border: 1.5px solid var(--line-2); background: #fff; font-size: 15px; font-weight: 650; cursor: pointer; transition: all .18s; }
.quiz-opt:hover { border-color: #b9a1f2; background: #faf8ff; }
.quiz-opt.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.quiz-opt.bad { border-color: var(--err); background: var(--err-soft); color: var(--err); }
.reveal { display: grid; gap: 6px; text-align: center; padding: 16px; border-radius: 16px; background: var(--grad-soft); }
.reveal b { font-size: 22px; font-weight: 850; }
.grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grade .btn { min-height: 50px; }
.score { text-align: center; justify-items: center; }
.score b { font-size: 56px; font-weight: 900; line-height: 1.2; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* دفتر لغات */
.vocab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.vcard { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); min-width: 0; }
.vcard .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vcard .w { direction: ltr; font-size: 21px; font-weight: 850; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow-wrap: anywhere; }
.vcard .ipa { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.vcard .m { font-size: 15px; color: var(--ink); font-weight: 650; }
.vcard .m .note { padding: 1px 9px; font-size: 11.5px; font-weight: 800; }
.vcard .s { direction: ltr; text-align: left; font-size: 14.5px; color: var(--ink-2); padding: 10px 12px; border-radius: 13px; background: var(--surface-2); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.vcard .s .btn { vertical-align: middle; min-height: 28px; width: 28px; padding: 0; margin-left: 4px; }
.vcard .s-fa { font-size: 13.5px; color: var(--ink-3); line-height: 1.9; }
.vcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.vcard .acts { display: flex; gap: 6px; }
.boxdots { display: inline-flex; gap: 3px; vertical-align: middle; direction: ltr; }
.boxdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.boxdots i.on { background: var(--violet); }
.known-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.known-cloud span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); direction: ltr; font-size: 14px; }
.known-cloud button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-4); cursor: pointer; font-size: 16px; line-height: 1; }
.known-cloud button:hover { background: var(--err-soft); color: var(--err); }
#kAdd input { max-width: none !important; flex: 1 1 220px; width: auto; }

/* ═════════════ واکنش‌گرا ═════════════ */
@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .page { padding: 0 16px; }
  .hero { padding: 26px 0 18px; }
  .hero h1 { font-size: 30px; letter-spacing: -.4px; }
  .hero p { font-size: 15px; }
  .card { padding: 18px; border-radius: 18px; }
  .grid-2, .grid-3, .acc-grid, .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2, .profile { grid-column: auto; }
  .auth-wrap { grid-template-columns: 1fr; margin-top: 16px; border-radius: 22px; }
  .auth-side { padding: 24px 22px; gap: 16px; }
  .auth-side h1 { font-size: 26px; }
  .auth-benefits { grid-template-columns: 1fr; gap: 8px; }
  .auth-benefits div { padding: 9px 12px; font-size: 13.5px; }
  .auth-main { padding: 24px 20px 26px; order: -1; }
  .auth-side { border-top: 1px solid var(--line); }
  .dl-tabs { gap: 8px; }
  .dl-tabs button { flex-direction: column; text-align: center; padding: 12px 6px; gap: 6px; }
  .dl-tabs button .ibox { width: 40px; height: 40px; }
  .dl-tabs button small { display: none; }
  .dl-tabs button b { font-size: 13px; }
  .dl-pane.on { grid-template-columns: minmax(0, 1fr); }
  .dl-hero { padding: 20px; }
  .dl-hero .btn.lg { width: 100%; }
  .legal section { padding: 22px 18px; border-radius: 20px; }
  .notfound .big { font-size: 96px; }
  .learn-shell { padding-top: 12px; }
  .learn-nav { top: calc(var(--rx-header-h, 58px) + 6px); width: 100%; margin: 0 0 4px; border-radius: 16px; }
  .learn-nav a { padding: 0 12px; font-size: 13.5px; min-height: 40px; }
  .learn-head { padding-top: 8px; }
  .learn-head h1 { font-size: 25px; }
  .learn-head .row-gap { width: 100%; }
  .learn-head .row-gap .btn { flex: 1 1 100%; }
  .learn-head .row-gap select { flex: 1 1 40%; min-width: 0; }
  .learn-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 4px; overflow: visible; }
  .learn-nav a { flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 2px; font-size: 11.5px; border-radius: 12px; justify-content: center; text-align: center; white-space: normal; line-height: 1.3; }
  .learn-nav a .icon { width: 20px; height: 20px; }
  .learn-nav .count { position: absolute; top: 3px; inset-inline-start: calc(50% + 6px); min-width: 17px; height: 17px; line-height: 17px; font-size: 10px; padding: 0 4px; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dash-stats .stat { padding: 50px 14px 12px; }
  .dash-stats .stat::before { top: 12px; right: 14px; }
  .stat b { font-size: 24px; }
  .show-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .show-card { border-radius: 18px; padding: 6px 6px 10px; }
  .poster { border-radius: 13px; }
  .show-hero { grid-template-columns: 96px 1fr; gap: 14px; padding: 12px; align-items: center; }
  .show-hero .learn-head h1 { font-size: 21px; }
  .ep-row { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 11px 12px; }
  .ep-num { width: 40px; height: 40px; }
  .ep-row > .muted, .ep-row > .mini-bar { grid-column: 2; justify-self: start; }
  .ep-row > .mini-bar { width: 100% !important; }
  .ep-tools { padding: 10px; gap: 8px; }
  .ep-tools .search { flex-basis: 100%; }
  .ep-tools .seg { flex: 1 1 100%; width: 100%; }
  .ep-tools .seg button { flex: 1; justify-content: center; }
  .ep-tools select { flex: 1 1 40%; }
  .line { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "tm play ." "en en en" "fa fa fa" "notes notes notes"; padding: 12px; row-gap: 6px; }
  .lines.mode-fa .line { grid-template-areas: "tm play ." "fa fa fa" "notes notes notes"; }
  .lines.mode-en .line { grid-template-areas: "tm play ." "en en en" "notes notes notes"; }
  .line .en { font-size: 15.5px; }
  .vocab-list { grid-template-columns: minmax(0, 1fr); }
  .quiz-card { padding: 20px 16px; }
  .quiz-word { font-size: 28px; }
  .quiz-opts { grid-template-columns: minmax(0, 1fr); }
  .toast { bottom: calc(var(--rx-tabbar-h, 64px) + 16px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
  .learn-nav a { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ═════ فیلم‌ها: کارت‌های افقی ═════ */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.mv-art { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(80% 90% at 85% 10%, hsl(var(--h) 75% 62% / .9), transparent 60%), radial-gradient(70% 90% at 10% 100%, hsl(calc(var(--h) + 60) 70% 55% / .85), transparent 60%), linear-gradient(135deg, hsl(var(--h) 45% 22%), hsl(calc(var(--h) + 40) 50% 14%)); }
.mv-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mv-art img.bg { filter: blur(22px) saturate(1.3) brightness(.75); transform: scale(1.25); }
.mv-art img.fg { object-position: center 22%; }
.mv-art .ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 18px; text-align: center; color: rgba(255, 255, 255, .95); }
.mv-art .ph .icon { width: 30px; height: 30px; padding: 8px; box-sizing: content-box; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.mv-art .ph b { font-size: 22px; font-weight: 900; letter-spacing: -.3px; line-height: 1.35; text-shadow: 0 4px 20px rgba(0, 0, 0, .3); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Vazirmatn, sans-serif; max-width: 90%; }
.mv-art:has(img.fg) .ph { display: none; }
.mv-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 20, .25) 0%, transparent 28%, transparent 45%, rgba(8, 8, 20, .88) 100%); pointer-events: none; }
.mv-card { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; text-decoration: none; color: #fff; background: #15172a; box-shadow: 0 1px 2px rgba(25, 28, 50, .06), 0 18px 36px -22px rgba(30, 30, 80, .55); transition: transform .35s var(--ease), box-shadow .35s var(--ease); isolation: isolate; }
.mv-card:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -24px rgba(40, 30, 110, .65); }
.mv-card .mv-art img.fg { transition: transform .6s var(--ease); }
.mv-card:hover .mv-art img.fg { transform: scale(1.05); }
.mv-card:focus-visible { outline: 3px solid rgba(143, 99, 238, .55); outline-offset: 3px; }
.mv-card.noart .mv-art::after { background: linear-gradient(180deg, transparent 50%, rgba(8, 8, 20, .7) 100%); }
.mv-card.noart .mv-art .ph { padding-bottom: 54px; }
.mv-top { position: absolute; z-index: 2; top: 12px; inset-inline: 12px; display: flex; gap: 6px; }
.mv-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.mv-chip.dark { background: rgba(10, 10, 25, .55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mv-play { position: absolute; z-index: 2; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--ink); opacity: 0; transform: scale(.8); transition: opacity .3s var(--ease), transform .3s var(--ease); box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .5); }
.mv-play .icon { width: 24px; height: 24px; }
.mv-card:hover .mv-play { opacity: 1; transform: scale(1); }
.mv-info { position: absolute; z-index: 2; inset-inline: 16px; bottom: 16px; display: grid; gap: 2px; }
.mv-info b { font-size: 19px; font-weight: 850; line-height: 1.45; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Vazirmatn, sans-serif; }
.mv-info small { font-size: 12.5px; color: rgba(255, 255, 255, .78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-bar { display: block; height: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.mv-bar > i { display: block; height: 100%; background: var(--grad); }
.mv-card > .mv-bar { position: absolute; z-index: 2; inset-inline: 0; bottom: 0; }

.mv-feature { position: relative; display: flex; align-items: flex-end; min-height: 300px; border-radius: 28px; overflow: hidden; text-decoration: none; color: #fff; background: #15172a; box-shadow: 0 34px 60px -34px rgba(40, 30, 110, .75); isolation: isolate; }
.mv-art.wide img.fg { object-position: center 25%; }
.mv-art.wide::after { background: linear-gradient(270deg, rgba(8, 8, 20, .92) 0%, rgba(8, 8, 20, .6) 40%, rgba(8, 8, 20, .05) 75%), linear-gradient(0deg, rgba(8, 8, 20, .6), transparent 50%); }
.mv-art.wide .ph { justify-items: end; place-content: center end; padding-inline-end: 8%; opacity: .25; }
.mv-art.wide .ph b { font-size: 60px; }
.mv-feature-in { position: relative; z-index: 2; display: grid; gap: 8px; justify-items: start; padding: 32px; max-width: 560px; }
.mv-feature-in > b { font-size: 34px; font-weight: 900; line-height: 1.3; letter-spacing: -.5px; text-shadow: 0 4px 20px rgba(0, 0, 0, .4); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Vazirmatn, sans-serif; overflow-wrap: anywhere; }
.mv-feature-in > small { font-size: 14px; color: rgba(255, 255, 255, .8); }
.mv-feature-bar { display: flex; align-items: center; gap: 10px; width: min(320px, 100%); font-size: 12.5px; font-weight: 750; color: rgba(255, 255, 255, .85); }
.mv-feature-bar .mv-bar { flex: 1; height: 6px; border-radius: 6px; }
.mv-feature .btn.light { margin-top: 6px; background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .6); }
a.mv-feature:hover .mv-art img.fg { transform: scale(1.03); }
.mv-feature .mv-art img.fg { transition: transform .8s var(--ease); }

.mv-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.mv-ep { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; padding: 8px; padding-inline-end: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); text-decoration: none; position: relative; transition: box-shadow .25s var(--ease), border-color .25s; }
.mv-ep:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.mv-art.thumb { position: relative; inset: auto; aspect-ratio: 16 / 9; border-radius: 12px; }
.mv-art.thumb .ph b { display: none; }
.mv-art.thumb::after { background: linear-gradient(180deg, transparent 50%, rgba(8, 8, 20, .5)); }
.mv-ep-n { position: absolute; z-index: 2; bottom: 14px; inset-inline-start: 16px; padding: 0 8px; border-radius: 8px; background: rgba(10, 10, 25, .6); color: #fff; font-size: 11.5px; font-weight: 800; line-height: 22px; }
.mv-ep-in { display: grid; gap: 4px; min-width: 0; }
.mv-ep-in b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-ep-in small { font-size: 12.5px; color: var(--ink-3); }
.mv-ep-in .mv-bar { height: 5px; border-radius: 5px; background: var(--surface-3); margin-top: 4px; }

@media (max-width: 860px) {
  .mv-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .mv-card { border-radius: 20px; }
  .mv-play { display: none; }
  .mv-feature { min-height: 0; aspect-ratio: 4 / 3.4; border-radius: 22px; }
  .mv-art.wide::after { background: linear-gradient(0deg, rgba(8, 8, 20, .95) 0%, rgba(8, 8, 20, .55) 50%, rgba(8, 8, 20, .1) 80%); }
  .mv-art.wide .ph { place-content: start center; justify-items: center; padding: 50px 18px 0; }
  .mv-art.wide .ph b { font-size: 34px; }
  .mv-feature-in { padding: 20px; }
  .mv-feature-in > b { font-size: 24px; }
  .mv-feature .btn.light { width: 100%; }
  .mv-eps { grid-template-columns: minmax(0, 1fr); }
  .mv-ep { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
}
@media (min-width: 1300px) { .mv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* پوستر عمودی: پس‌زمینهٔ محو + خود کاور کامل در کنار کارت */
.mv-info { justify-items: start; }
.mv-info b, .mv-info small { max-width: 100%; text-align: right; }
.mv-card .mv-art .ph b { display: none; }
.mv-card .mv-art .ph .icon { width: 34px; height: 34px; padding: 14px; }
.mv-card.noart .mv-art .ph { padding-bottom: 40px; }
.mv-art:not(.thumb).portrait img.bg { filter: blur(26px) saturate(1.4) brightness(.6); }
.mv-art:not(.thumb).portrait img.fg { inset: 12px auto 12px 12px; width: auto; height: calc(100% - 24px); aspect-ratio: 2 / 3; border-radius: 12px; object-position: center; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7); z-index: 1; }
.mv-card:hover .mv-art.portrait img.fg { transform: translateY(-3px) rotate(-1.5deg); }
.mv-art.portrait::after { background: linear-gradient(270deg, rgba(8, 8, 20, .55) 0%, rgba(8, 8, 20, .15) 60%), linear-gradient(0deg, rgba(8, 8, 20, .7) 0%, transparent 55%); }
.mv-card:has(.mv-art.portrait) .mv-info { left: calc((100% * 9 / 16 - 24px) * 2 / 3 + 26px); }
.mv-card:has(.mv-art.portrait) .mv-play { left: calc((100% * 9 / 16 - 24px) / 3 + 12px); }
.mv-art.wide.portrait img.fg { inset: 26px auto 26px 32px; height: calc(100% - 52px); border-radius: 16px; }
.mv-art.wide.portrait::after { background: linear-gradient(270deg, rgba(8, 8, 20, .75) 0%, rgba(8, 8, 20, .25) 70%); }
@media (max-width: 860px) {
  .mv-art.wide.portrait img.fg { inset: 18px auto auto 50%; transform: translateX(-50%); height: 52%; }
  .mv-art.wide.portrait::after { background: linear-gradient(0deg, rgba(8, 8, 20, .92) 0%, rgba(8, 8, 20, .5) 45%, rgba(8, 8, 20, .2) 100%); }
  a.mv-feature:hover .mv-art.portrait img.fg { transform: translateX(-50%); }
}
@media (max-width: 860px) {
  .mv-feature { aspect-ratio: auto; min-height: 300px; }
  .mv-art.wide.portrait img.fg { top: 20px; height: 168px; }
  .mv-feature:has(.mv-art.wide.portrait) .mv-feature-in { padding-top: 204px; }
}

/* ═════ صفحهٔ قسمت: سربرگ، نوار ابزار و خط‌های دوزبانه ═════ */
.ep-hero { min-height: 280px; }
.ep-hero .mv-feature-in { max-width: 640px; }
.ep-hero .mv-feature-in > b { font-size: 30px; }
.ep-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ep-stat { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: 12.5px; font-weight: 750; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ep-stat .icon { width: 15px; height: 15px; }
.ep-stat.ok { background: rgba(63, 207, 142, .22); border-color: rgba(63, 207, 142, .4); color: #c9f7df; }
.ep-stat.warn { background: rgba(242, 181, 68, .22); border-color: rgba(242, 181, 68, .45); color: #ffe6b0; }
.ep-stat.violet { background: rgba(185, 150, 255, .22); border-color: rgba(185, 150, 255, .45); color: #e6dbff; }
.ep-hero .btn.glass { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); margin-top: 6px; }
.ep-hero .btn.glass:hover { background: rgba(255, 255, 255, .2); }
.ep-hero .row-gap { gap: 8px; }
.ep-tabs { margin-top: 2px; }
.ep-tabs button.on { background: var(--ink); color: #fff; }
.ep-note { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(120deg, #fff8ea, #fdf1f6); border: 1px solid #f6e2b8; }
.ep-note > span:last-child { display: grid; gap: 2px; font-size: 13.5px; color: var(--ink-2); }
.ep-note b { color: var(--ink); font-size: 14.5px; }

.ep-tools { position: sticky; top: calc(var(--rx-header-h, 64px) + 8px); z-index: 15; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-radius: 20px; box-shadow: 0 14px 30px -22px rgba(40, 40, 95, .45); }
.ep-tools .search { position: relative; }
.ep-tools .search .icon { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; width: 18px; height: 18px; }
.ep-tools .search input { padding-right: 42px; background: var(--surface-2); }
.ep-tools .seg button.on { background: var(--ink); color: #fff; }

.lines { gap: 10px; counter-reset: ln; }
.line { position: relative; counter-increment: ln; padding: 16px 18px 16px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(25, 28, 50, .04); transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease); }
.line::before { content: ""; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); opacity: 0; transition: opacity .2s; }
.line:hover { border-color: #e2dbf6; box-shadow: 0 16px 30px -22px rgba(80, 60, 170, .45); }
.line:hover::before { opacity: 1; }
.line .tm { min-height: 30px; padding: 0 10px; border-radius: 10px; background: var(--grad-soft); color: #6a45cf; font-weight: 750; }
.line .tm:hover { background: #e7defc; color: #5333b8; }
.line .play { width: 32px; height: 32px; border-radius: 50%; background: #efe9fd; color: #7046d6; }
.line .play:hover, .line .play.on { background: linear-gradient(135deg, #9a67ee, #377def); color: #fff; box-shadow: 0 8px 16px -8px rgba(110, 80, 230, .8); }
.line .en { font-size: 17px; font-weight: 500; color: #151827; letter-spacing: .1px; }
.line .fa { position: relative; margin-top: 4px; padding: 6px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(248, 239, 246, 0), #fbf3f8 60%, #f6f0ff); color: #3c3556; font-size: 15.5px; line-height: 1.95; border-inline-start: 3px solid #f2a7cb; }
.line .fa.pending { background: none; border: 0; padding: 0; margin-top: 2px; display: inline-flex; width: fit-content; align-items: center; gap: 6px; color: var(--ink-4); font-size: 12px; font-weight: 650; }
.line .fa.pending::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #f0b84c; }
.lines.mode-fa .line .fa { margin-top: 0; }
.line .notes { gap: 6px; margin-top: 10px; }
.note { border: 1px solid color-mix(in srgb, var(--k-fg, #888) 18%, transparent); padding: 4px 5px 4px 10px; border-radius: 13px; box-shadow: 0 1px 1px rgba(0, 0, 0, .02); }
.note .kd { padding: 1px 7px; border-radius: 7px; background: rgba(255, 255, 255, .75); opacity: 1; font-size: 10.5px; }
.note button { border: 1px solid rgba(0, 0, 0, .05); }
.note button.save { background: var(--k-fg, var(--ink)); color: #fff; border-color: transparent; }
.note.saved button.save { background: var(--ok); }
.line .tip { background: linear-gradient(120deg, #f5f8ff, #f8f3ff); border: 1px dashed #d7cdf6; color: var(--ink-2); }
.line.hit { border-color: #f0b84c; background: #fffaf0; box-shadow: 0 0 0 3px #fdf0d2; }
@media (max-width: 860px) {
  .ep-hero { min-height: 0; }
  .ep-hero .mv-feature-in > b { font-size: 23px; }
  .ep-hero .row-gap, .ep-hero .row-gap .btn { width: 100%; }
  .ep-tools { top: calc(var(--rx-header-h, 58px) + 6px); border-radius: 18px; }
  .line { padding: 14px; border-radius: 18px; }
  .line .en { font-size: 16px; }
  .line .fa { font-size: 15px; }
}
.learn-view .lines { width: 100%; max-width: 960px; margin-inline: auto; }
.learn-view .ep-note { width: 100%; max-width: 960px; margin-inline: auto; }
