:root {
  --mj-theme-bg: #070b12;
  --mj-theme-surface: #101824;
  --mj-theme-surface-raised: #151f2d;
  --mj-theme-text: #f6f8fb;
  --mj-theme-muted: #99a7b8;
  --mj-theme-line: rgba(255,255,255,.09);
  --mj-theme-header: rgba(7,11,18,.88);
  --mj-theme-shadow: 0 24px 70px rgba(0,0,0,.36);
  --mj-ease-out: cubic-bezier(.22, 1, .36, 1);
  --mj-ease-standard: cubic-bezier(.2, .8, .2, 1);
  --mj-focus-ring: 0 0 0 4px rgba(var(--mj-accent-rgb),.16);
  --mj-surface-highlight: rgba(255,255,255,.045);
}

html[data-theme="light"] {
  color-scheme: light;
  --mj-bg: #f4f7fb;
  --mj-bg-soft: #edf2f7;
  --mj-surface: #ffffff;
  --mj-surface-2: #f7f9fc;
  --mj-line: rgba(18,35,56,.11);
  --mj-line-strong: rgba(18,35,56,.19);
  --mj-text: #122033;
  --mj-muted: #66768a;
  --mj-primary: #168a61;
  --mj-primary-strong: #0f704e;
  --mj-primary-soft: rgba(var(--mj-accent-rgb),.1);
  --mj-gold: #a96708;
  --mj-danger: #c43f53;
  --mj-shadow: 0 24px 65px rgba(35,55,78,.12);
  --mj-theme-bg: #f4f7fb;
  --mj-theme-surface: #ffffff;
  --mj-theme-surface-raised: #f7f9fc;
  --mj-theme-text: #122033;
  --mj-theme-muted: #66768a;
  --mj-theme-line: rgba(18,35,56,.11);
  --mj-theme-header: rgba(255,255,255,.9);
  --mj-theme-shadow: 0 24px 65px rgba(35,55,78,.12);
  --mj-focus-ring: 0 0 0 4px rgba(var(--mj-accent-rgb),.15);
  --mj-surface-highlight: rgba(18,35,56,.035);
}

/* Product-wide interaction language. Keep the cinematic treatment calm and
   predictable across mouse, touch, keyboard and TV remotes. */
body.mj-app :where(a, button, input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
}

body.mj-app :where([dir="ltr"], .mj-ltr) {
  unicode-bidi: isolate;
}

body.mj-app :where(.mj-button, .mj-icon-button, [data-tv-focus]) {
  transition-timing-function: var(--mj-ease-standard);
}

body.mj-app :where(.mj-button, .mj-icon-button):active {
  transform: translateY(0) scale(.975);
}

body.mj-app [data-tv-focus]:focus-visible {
  outline: 2px solid var(--mj-primary);
  outline-offset: 4px;
  box-shadow: var(--mj-focus-ring);
}

body.mj-app ::selection {
  background: rgba(var(--mj-accent-rgb),.28);
  color: var(--mj-text);
}

html[data-theme="light"] body.mj-app ::selection {
  background: rgba(var(--mj-accent-rgb),.2);
}

/* Horizontal learning navigation behaves like a native tab rail without
   exposing platform scrollbars on compact screens. */
.ml-subnav {
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 8px;
}

.ml-subnav::-webkit-scrollbar { display: none; }
.ml-subnav a {
  scroll-snap-align: center;
  transition: color .18s var(--mj-ease-standard), background-color .18s var(--mj-ease-standard), transform .18s var(--mj-ease-standard);
}
.ml-subnav a:hover { color: var(--mj-text); background: var(--mj-surface-highlight); }
.ml-subnav a:active { transform: scale(.98); }
.ml-subnav a.is-active:hover { color: var(--mj-on-primary); background: var(--ml-accent); }

/* A restrained light sweep gives course cards depth without hurting reading. */
.ml-course-card > a,
.mj-content-card > a {
  isolation: isolate;
}

.ml-course-card > a::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.075) 48%, transparent 76%);
  opacity: 0;
  transform: translateX(30%);
  transition: opacity .28s ease, transform .55s var(--mj-ease-out);
  pointer-events: none;
}

.ml-course-card > a:hover::after,
.ml-course-card > a:focus-visible::after {
  opacity: 1;
  transform: translateX(-22%);
}

@media (max-width: 700px) {
  .ml-subnav {
    width: 100%;
    margin-inline: 0;
    padding-inline: 6px;
    scroll-snap-type: inline mandatory;
    box-shadow: 0 14px 36px rgba(0,0,0,.18);
  }

  .ml-subnav a { min-height: 38px; }
}

@media (hover: none) {
  .ml-course-card > a::after { display: none; }
  body.mj-app :where(.mj-button, .mj-icon-button):hover { transform: none; }
}

html, body.mj-app, .mj-header, .mj-mobile-menu, .mj-theme-menu {
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

html[data-theme="light"] body.mj-app {
  background: radial-gradient(circle at 80% 8%, rgba(var(--mj-accent-rgb),.07), transparent 30rem), var(--mj-bg);
  color: var(--mj-text);
}

html[data-theme="light"] .mj-header,
html[data-theme="light"] .mj-header.is-scrolled { border-color: var(--mj-line); background: var(--mj-theme-header); backdrop-filter: blur(20px) saturate(135%); }
html[data-theme="light"] .mj-primary-nav a { color: #4f6074; }
html[data-theme="light"] .mj-primary-nav a:hover { color: #132235; background: rgba(18,35,56,.055); }
html[data-theme="light"] .mj-primary-nav a.is-active { color: #0c4935; }
html[data-theme="light"] .mj-search,
html[data-theme="light"] .mj-icon-button { background: rgba(255,255,255,.82); box-shadow: 0 8px 24px rgba(30,49,70,.06); }
html[data-theme="light"] .mj-search input { color: #122033; }
html[data-theme="light"] .mj-search input::placeholder { color: #7b8999; }
html[data-theme="light"] .mj-mobile-menu { background: rgba(255,255,255,.97); }
html[data-theme="light"] .mj-footer { color: #66768a; }
html[data-theme="light"] .mj-brand--footer { color: #122033 !important; }
html[data-theme="light"] .mj-bottom-nav { border-color:rgba(18,35,56,.1);background:rgba(250,252,253,.94);box-shadow:0 -12px 36px rgba(35,55,78,.07); }
html[data-theme="light"] .mj-bottom-nav a { color:#6f7e8f; }
html[data-theme="light"] .mj-bottom-nav a.is-active { color:#0c8a60; }
html[data-theme="light"] .mj-bottom-nav__learn { border-color:#f4f7fb; }

.mj-theme-control { position: relative; flex: 0 0 auto; }
.mj-theme-trigger { position: relative; overflow: hidden; }
.mj-theme-icon { position: absolute; width: 19px !important; height: 19px !important; opacity: 0; transform: scale(.72) rotate(-18deg); transition: opacity .18s, transform .18s; }
html[data-theme-preference="light"] .mj-theme-icon--sun,
html[data-theme-preference="dark"] .mj-theme-icon--moon,
html[data-theme-preference="system"] .mj-theme-icon--system { opacity: 1; transform: scale(1) rotate(0); }
.mj-theme-menu { position: absolute; z-index: 180; inset: calc(100% + 12px) auto auto 0; width: 260px; padding: 9px; border: 1px solid var(--mj-line); border-radius: 18px; background: rgba(13,20,30,.97); box-shadow: 0 22px 60px rgba(0,0,0,.36); backdrop-filter: blur(22px); }
.mj-theme-menu[hidden] { display: none !important; }
.mj-theme-menu > span { display: block; padding: 6px 10px 9px; color: var(--mj-muted); font-size: 10px; font-weight: 800; }
.mj-theme-menu button { width: 100%; display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 9px; padding: 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--mj-text); text-align: right; cursor: pointer; }
.mj-theme-menu button:hover, .mj-theme-menu button:focus-visible { background: rgba(255,255,255,.055); }
.mj-theme-menu button.is-selected { border-color: rgba(var(--mj-accent-rgb),.25); background: rgba(var(--mj-accent-rgb),.09); }
.mj-theme-menu button > svg { grid-row: 1/3; width: 20px; height: 20px; color: var(--mj-primary); }
.mj-theme-menu button b, .mj-theme-menu button small { display: block; }
.mj-theme-menu button b { font-size: 11px; }
.mj-theme-menu button small { color: var(--mj-muted); font-size: 8px; }
.mj-theme-menu button i { grid-row: 1/3; grid-column: 3; color: var(--mj-primary); font-style: normal; opacity: 0; }
.mj-theme-menu button.is-selected i { opacity: 1; }
html[data-theme="light"] .mj-theme-menu { background: rgba(255,255,255,.98); box-shadow: 0 22px 60px rgba(35,55,78,.18); }
html[data-theme="light"] .mj-theme-menu button:hover,
html[data-theme="light"] .mj-theme-menu button:focus-visible { background: rgba(18,35,56,.05); }

html[data-theme="light"] .mj-learn-page { --ml-panel: #fff; --ml-panel-2: #f6f9fc; --ml-accent: var(--mj-primary); }
html[data-theme="light"] .ml-subnav { background: rgba(255,255,255,.9); box-shadow: 0 12px 32px rgba(35,55,78,.08); }
html[data-theme="light"] .ml-dashboard-hero { background: radial-gradient(circle at 15% 10%, rgba(var(--mj-accent-rgb),.13), transparent 31rem), linear-gradient(125deg,#fff,#edf4f2 72%); }
html[data-theme="light"] .ml-dashboard-hero::after { color: rgba(18,35,56,.025); }
html[data-theme="light"] .ml-dashboard-hero__copy > p { color: #5d6e81; }
html[data-theme="light"] .ml-daily-ring { background: conic-gradient(var(--ml-accent) calc(var(--progress)*1%), rgba(18,35,56,.1) 0); box-shadow: 0 0 55px rgba(var(--mj-accent-rgb),.1); }
html[data-theme="light"] .ml-daily-ring::before { background: #fff; border-color: var(--mj-line); }
html[data-theme="light"] .ml-stat-grid article,
html[data-theme="light"] .ml-title-card > a { background: #fff; box-shadow: 0 12px 32px rgba(35,55,78,.06); }
html[data-theme="light"] .ml-preferences,
html[data-theme="light"] .ml-filter { background: #fff; }
html[data-theme="light"] .ml-preference-selects select { background: #f7f9fc; color: #122033; }
html[data-theme="light"] .ml-filter input { color: #122033; }
html[data-theme="light"] .ml-how-grid article { background: linear-gradient(145deg,#fff,#f2f6f9); }
html[data-theme="light"] .ml-how-grid b { color: rgba(18,35,56,.035); }
html[data-theme="light"] .ml-dashboard-v2 { background: radial-gradient(circle at 8% 0,rgba(var(--mj-accent-rgb),.12),transparent 30rem),linear-gradient(135deg,#fff,#edf4f2 70%); }
html[data-theme="light"] .ml-dashboard-v2::after { color:rgba(18,35,56,.025); }
html[data-theme="light"] .ml-dashboard-v2__copy>p { color:#5d6e81; }
html[data-theme="light"] .ml-today-plan>div,
html[data-theme="light"] .ml-library-toolbar { background:rgba(255,255,255,.6); }
html[data-theme="light"] .ml-today-plan i { background:rgba(18,35,56,.055); }
html[data-theme="light"] .ml-week-card { border-color:var(--mj-line);background:rgba(255,255,255,.72);box-shadow:0 14px 36px rgba(35,55,78,.08); }
html[data-theme="light"] .ml-week-ring { background:conic-gradient(var(--ml-accent) calc(var(--progress)*1%),rgba(18,35,56,.09) 0); }
html[data-theme="light"] .ml-week-ring::before { background:#fff; }
html[data-theme="light"] .ml-week-card__details>div { background:rgba(18,35,56,.04); }
html[data-theme="light"] .ml-snapshot article,
html[data-theme="light"] .ml-course-card>a { background:#fff;box-shadow:0 12px 32px rgba(35,55,78,.065); }
html[data-theme="light"] .ml-course-progress i { background:rgba(18,35,56,.09); }
html[data-theme="light"] .ml-method-v2 { background:linear-gradient(145deg,#fff,#f1f6f4); }
html[data-theme="light"] .ml-method-v2 article { background:rgba(255,255,255,.6); }
html[data-theme="light"] .ml-course-overview>div,
html[data-theme="light"] .ml-episode-strip>a,
html[data-theme="light"] .ml-lesson-row--v2 { background:#fff;box-shadow:0 12px 32px rgba(35,55,78,.055); }
html[data-theme="light"] .ml-progress-tracks em,
html[data-theme="light"] .ml-episode-strip i,
html[data-theme="light"] .ml-lesson-mini-progress { background-color:rgba(18,35,56,.09); }
html[data-theme="light"] .ml-language-profile article,
html[data-theme="light"] .ml-course-cycle article { background:rgba(18,35,56,.025); }
html[data-theme="light"] .ml-lesson-row--v2.is-current { background:linear-gradient(90deg,var(--mj-primary-soft),#fff 48%); }
html[data-theme="light"] .ml-course-cycle { background:linear-gradient(145deg,#fff,#f1f6f4); }
html[data-theme="light"] .ml-content-progress-list>article { background:rgba(18,35,56,.02); }
html[data-theme="light"] .ml-content-progress-list__tracks i { background:rgba(18,35,56,.09); }

html[data-theme="light"] .mj-watch-detail-page { --mjw-ink:#122033; --mjw-muted:#64758a; --mjw-panel:#fff; --mjw-panel-2:#f5f8fb; --mjw-line:rgba(18,35,56,.11); background:#f4f7fb; color:var(--mjw-ink); }
html[data-theme="light"] .mjw-page { background: radial-gradient(circle at 80% 26%,rgba(var(--mj-accent-rgb),.06),transparent 32rem); }
html[data-theme="light"] .mjw-hero { color:#f5f8fb; }
html[data-theme="light"] .mjw-hero__wash { background: linear-gradient(90deg,rgba(7,11,17,.96) 0%,rgba(7,11,17,.82) 42%,rgba(7,11,17,.32) 78%,rgba(7,11,17,.48) 100%),linear-gradient(0deg,#f4f7fb 0%,rgba(7,11,17,.88) 13%,transparent 57%),linear-gradient(180deg,rgba(7,11,17,.48),transparent 24%); }
html[data-theme="light"] .mjw-breadcrumb,
html[data-theme="light"] .mjw-description,
html[data-theme="light"] .mjw-credits dt { color:#c7d0db; }
html[data-theme="light"] .mjw-breadcrumb b,
html[data-theme="light"] .mjw-credits dd { color:#fff; }
html[data-theme="light"] .mjw-learning-card { background: linear-gradient(155deg,rgba(20,31,44,.94),rgba(8,14,22,.96)); color:#f5f8fb; }
html[data-theme="light"] .mjw-watch,
html[data-theme="light"] .mjw-section,
html[data-theme="light"] .mjw-related-section { color:#122033; }
html[data-theme="light"] .mjw-player-card,
html[data-theme="light"] .mjw-source-panel,
html[data-theme="light"] .mjw-now-playing { box-shadow:0 20px 50px rgba(35,55,78,.1); }
html[data-theme="light"] .mjw-now-playing strong,
html[data-theme="light"] .mjw-browser-source,
html[data-theme="light"] .mjw-source-button { color:#122033; }
html[data-theme="light"] .mjw-player-bar b,
html[data-theme="light"] .mjw-source-panel>header>small,
html[data-theme="light"] .mjw-source-button>span { background:#edf2f6; color:#65758a; }
html[data-theme="light"] .mjw-source-button { background:rgba(18,35,56,.025); }
html[data-theme="light"] .mjw-learn-strip { background:radial-gradient(circle at 5% 15%,rgba(var(--mj-accent-rgb),.1),transparent 25%),linear-gradient(135deg,#fff,#edf5f2); box-shadow:0 18px 45px rgba(35,55,78,.08); }
html[data-theme="light"] .mjw-learn-strip__steps b { color:#122033; }

@media (max-width: 760px) {
  .mj-theme-menu { position: fixed; inset: var(--mj-header) 12px auto; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html, body.mj-app, .mj-header, .mj-mobile-menu, .mj-theme-menu, .mj-theme-icon { transition: none !important; }
}

/* Shared subtitle studio: used by both the watch and guided-learning players. */
.mj-subtitle-settings-toggle { display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:0 10px;border:1px solid rgba(255,255,255,.16)!important;border-radius:9px!important;background:rgba(255,255,255,.08)!important;color:#f7fbff!important;font-weight:750;white-space:nowrap;cursor:pointer; }
.mj-subtitle-settings-toggle svg { width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8; }
.mj-subtitle-settings { position:absolute;z-index:30;inset:14px 14px auto auto;width:min(430px,calc(100% - 28px));max-height:calc(100% - 28px);overflow:auto;padding:14px;border:1px solid rgba(255,255,255,.15);border-radius:18px;background:rgba(9,14,21,.96);color:#f5f8fb;box-shadow:0 24px 70px rgba(0,0,0,.48);backdrop-filter:blur(22px) saturate(130%);direction:rtl;text-align:right; }
.mj-subtitle-settings[hidden] { display:none!important; }
.mj-subtitle-settings__header { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px; }
.mj-subtitle-settings__header small,.mj-subtitle-settings__header strong { display:block; }
.mj-subtitle-settings__header small { margin-bottom:3px;color:var(--mj-primary);font:800 8px/1.2 Arial,sans-serif;letter-spacing:1.1px; }
.mj-subtitle-settings__header strong { font-size:14px; }
.mj-subtitle-settings__header button { width:32px;height:32px;border:1px solid rgba(255,255,255,.13);border-radius:10px;background:rgba(255,255,255,.06);color:#fff;font-size:20px;cursor:pointer; }
.mj-subtitle-settings__preview { min-height:82px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;margin-bottom:12px;padding:11px;border:1px solid rgba(255,255,255,.09);border-radius:13px;background:linear-gradient(135deg,#172334,#080d14);text-align:center;overflow:hidden; }
.mj-subtitle-settings__preview strong,.mj-subtitle-settings__preview span { max-width:100%;padding:3px 8px;border-radius:6px;background:var(--mj-subtitle-background,rgba(0,0,0,.78));text-shadow:0 2px 5px #000; }
.mj-subtitle-settings__preview strong { color:var(--mj-subtitle-en-color,#fff);font:750 var(--mj-subtitle-en-size,13px)/1.45 "Segoe UI",sans-serif; }
.mj-subtitle-settings__preview span { color:var(--mj-subtitle-fa-color,#f8fafc);font-size:var(--mj-subtitle-fa-size,10px);font-weight:650; }
.mj-subtitle-settings__preview[data-order="en-fa"] strong { order:1; }.mj-subtitle-settings__preview[data-order="en-fa"] span { order:2; }
.mj-subtitle-settings__preview[data-order="fa-en"] strong { order:2; }.mj-subtitle-settings__preview[data-order="fa-en"] span { order:1; }
.mj-subtitle-settings__preview[data-layout="inline"] { flex-direction:row; }
.mj-subtitle-settings__preview[data-background-style="transparent"] strong,.mj-subtitle-settings__preview[data-background-style="transparent"] span { padding-inline:2px;background:transparent; }
.mj-subtitle-settings__grid { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
.mj-subtitle-settings__grid label { min-width:0;display:grid;gap:5px;padding:9px;border:1px solid rgba(255,255,255,.09);border-radius:11px;background:rgba(255,255,255,.035);color:#aeb9c6;font-size:8px;font-weight:700; }
.mj-subtitle-settings__grid label>span { display:flex;align-items:center;justify-content:space-between;gap:7px; }
.mj-subtitle-settings__grid select { width:100%;height:34px;padding:0 8px;border:1px solid rgba(255,255,255,.1);border-radius:8px;background:#111a25;color:#f4f7fa;font-family:inherit;font-size:8px; }
.mj-subtitle-settings__grid option { background:#111a25;color:#fff; }
.mj-subtitle-settings__range { grid-column:1/-1; }
.mj-subtitle-settings__range output { direction:ltr;color:var(--mj-primary);font:800 8px/1 Arial,sans-serif; }
.mj-subtitle-settings__range input { width:100%;accent-color:var(--mj-primary);cursor:pointer; }
.mj-subtitle-settings__color { grid-template-columns:1fr 42px!important;align-items:center; }
.mj-subtitle-settings__color input { width:42px;height:30px;padding:2px;border:1px solid rgba(255,255,255,.13);border-radius:8px;background:transparent;cursor:pointer; }
.mj-subtitle-settings__footer { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;color:#8492a2;font-size:7px; }
.mj-subtitle-settings__footer span[data-state="saved"] { color:var(--mj-primary); }.mj-subtitle-settings__footer span[data-state="error"] { color:#ffb86b; }
.mj-subtitle-settings__footer button { min-height:30px;padding:0 10px;border:1px solid rgba(255,255,255,.12);border-radius:8px;background:transparent;color:#c8d1db;font-family:inherit;font-size:8px;cursor:pointer; }

/* Normal watch subtitles. */
.mjw-subtitle-overlay { display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:6px;inset-inline:5%!important;pointer-events:none; }
.mjw-subtitle-overlay[data-mode="off"] { display:none!important; }
.mjw-subtitle-overlay strong,.mjw-subtitle-overlay span { width:fit-content;max-width:100%;margin:0;padding:6px 14px;border-radius:11px;text-wrap:balance;box-shadow:0 7px 20px rgba(0,0,0,.22); }
.mjw-subtitle-overlay strong { direction:ltr;unicode-bidi:plaintext;background:var(--mj-subtitle-en-background,var(--mj-subtitle-background,rgba(0,0,0,.78)))!important;color:var(--mj-subtitle-en-color,#fff)!important;font:650 var(--mj-subtitle-en-size,23px)/1.48 "Segoe UI",Inter,Arial,sans-serif!important; }
.mjw-subtitle-overlay span { direction:rtl;unicode-bidi:plaintext;background:var(--mj-subtitle-fa-background,var(--mj-subtitle-background,rgba(0,0,0,.78)))!important;color:var(--mj-subtitle-fa-color,#f8fafc)!important;font:570 var(--mj-subtitle-fa-size,24px)/1.72 Vazirmatn,myfont,Tahoma,sans-serif!important;letter-spacing:0;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased; }
.mjw-subtitle-overlay[data-order="en-fa"] strong { order:1; }.mjw-subtitle-overlay[data-order="en-fa"] span { order:2; }
.mjw-subtitle-overlay[data-order="fa-en"] strong { order:2; }.mjw-subtitle-overlay[data-order="fa-en"] span { order:1; }
.mjw-subtitle-overlay[data-layout="inline"] { flex-direction:row;align-items:center; }
.mjw-subtitle-overlay[data-background-style="transparent"] strong,.mjw-subtitle-overlay[data-background-style="transparent"] span { padding-inline:2px;background:transparent!important; }
.mjw-subtitle-overlay[data-position="bottom"] { top:auto!important;bottom:78px!important;transform:none!important; }
.mjw-subtitle-overlay[data-position="middle"] { top:50%!important;bottom:auto!important;transform:translateY(-50%)!important; }
.mjw-subtitle-overlay[data-position="top"] { top:42px!important;bottom:auto!important;transform:none!important; }
.mjw-player-shell:fullscreen .mjw-subtitle-overlay[data-position="bottom"] { bottom:92px!important; }

/* Guided-learning subtitles: explicit grid placement prevents EN/FA collisions. */
.ml-cue-overlay { grid-template-columns:34px minmax(0,1fr) 38px!important;grid-template-rows:auto auto;background:var(--mj-subtitle-background,rgba(0,0,0,.78))!important; }
.ml-cue-overlay>[data-replay-cue]:first-of-type { grid-column:1;grid-row:1/3; }
.ml-cue-overlay>.ml-reveal-translation { grid-column:3!important;grid-row:1/3!important; }
.ml-cue-overlay strong,.ml-cue-overlay span { min-width:0;grid-column:2;margin:0;text-wrap:balance; }
.ml-cue-overlay strong { color:var(--mj-subtitle-en-color,#fff)!important;font-size:var(--mj-subtitle-en-size,18px)!important; }
.ml-cue-overlay span { color:var(--mj-subtitle-fa-color,#f8fafc)!important;font-size:var(--mj-subtitle-fa-size,13px)!important; }
.ml-cue-overlay[data-order="en-fa"] strong { grid-row:1; }.ml-cue-overlay[data-order="en-fa"] span { grid-row:2; }
.ml-cue-overlay[data-order="fa-en"] strong { grid-row:2; }.ml-cue-overlay[data-order="fa-en"] span { grid-row:1; }
.ml-cue-overlay[data-layout="inline"] { grid-template-columns:34px minmax(0,1fr) minmax(0,1fr) 38px!important;grid-template-rows:auto!important; }
.ml-cue-overlay[data-layout="inline"]>[data-replay-cue]:first-of-type { grid-column:1;grid-row:1; }
.ml-cue-overlay[data-layout="inline"]>.ml-reveal-translation { grid-column:4!important;grid-row:1!important; }
.ml-cue-overlay[data-layout="inline"][data-order="en-fa"] strong { grid-column:2;grid-row:1; }.ml-cue-overlay[data-layout="inline"][data-order="en-fa"] span { grid-column:3;grid-row:1; }
.ml-cue-overlay[data-layout="inline"][data-order="fa-en"] strong { grid-column:3;grid-row:1; }.ml-cue-overlay[data-layout="inline"][data-order="fa-en"] span { grid-column:2;grid-row:1; }
.ml-cue-overlay[data-background-style="transparent"] { border-color:transparent;background:transparent!important;backdrop-filter:none; }
.ml-cue-overlay[data-position="bottom"] { top:auto!important;bottom:58px!important;transform:none!important; }
.ml-cue-overlay[data-position="middle"] { top:50%!important;bottom:auto!important;transform:translateY(-50%)!important; }
.ml-cue-overlay[data-position="top"] { top:48px!important;bottom:auto!important;transform:none!important; }

@media (max-width:680px) {
  .mj-subtitle-settings { position:fixed;z-index:260;inset:auto 7px calc(env(safe-area-inset-bottom,0px) + 7px);width:auto;max-height:min(78vh,620px);border-radius:18px; }
  .mj-subtitle-settings__grid { grid-template-columns:1fr 1fr; }
  .mjw-subtitle-overlay[data-position="bottom"] { bottom:112px!important; }
  .ml-cue-overlay[data-position="bottom"] { bottom:45px!important; }
  .ml-cue-overlay[data-layout="inline"] { gap:3px 6px;padding-inline:7px; }
}

@media (max-width:430px) {
  .mj-subtitle-settings__grid { grid-template-columns:1fr; }
  .mj-subtitle-settings__range { grid-column:1; }
  .mjw-subtitle-overlay[data-layout="inline"],.ml-cue-overlay[data-layout="inline"] { font-size:90%; }
}

/* Safe-view controls shared by the normal and learning players. */
.mj-safe-quick-toggle,.mj-safe-settings-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;border:1px solid rgba(148,163,184,.24)!important;border-radius:10px!important;background:rgba(15,23,42,.72)!important;color:#e2e8f0!important;min-height:38px;padding:7px 11px!important;font:700 12px/1.2 Vazirmatn,Tahoma,sans-serif!important;white-space:nowrap}.mj-safe-settings-toggle{width:38px;padding:7px!important}.mj-safe-quick-toggle i{color:#94a3b8}.mj-safe-quick-toggle.is-active{border-color:rgba(45,212,191,.62)!important;background:rgba(13,148,136,.18)!important;color:#ccfbf1!important;box-shadow:0 0 0 3px rgba(45,212,191,.08)}.mj-safe-quick-toggle.is-active i{color:#2dd4bf}.mj-safe-settings{position:absolute;z-index:95;left:16px;bottom:76px;width:min(410px,calc(100% - 32px));max-height:min(72vh,650px);overflow:auto;border:1px solid rgba(148,163,184,.25);border-radius:18px;background:rgba(8,15,29,.96);color:#f8fafc;box-shadow:0 24px 70px rgba(2,6,23,.58);backdrop-filter:blur(22px);font-family:Vazirmatn,Tahoma,sans-serif;text-align:right;direction:rtl}.mj-safe-settings[hidden]{display:none!important}.mj-safe-settings>header{display:flex;justify-content:space-between;align-items:center;padding:16px 17px;border-bottom:1px solid rgba(148,163,184,.14)}.mj-safe-settings>header>div{display:flex;align-items:center;gap:11px}.mj-safe-settings>header strong,.mj-safe-settings>header small{display:block}.mj-safe-settings>header small{margin-top:2px;color:#94a3b8;font-size:11px}.mj-safe-settings>header>button{border:0;background:transparent;color:#94a3b8;font-size:24px;cursor:pointer}.mj-safe-icon{position:relative;display:grid;place-items:center;width:39px;height:39px;border-radius:12px;background:rgba(45,212,191,.14)}.mj-safe-icon:before{content:'✓';color:#2dd4bf;font-weight:900}.mj-safe-master{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px;padding:14px;border:1px solid rgba(45,212,191,.22);border-radius:13px;background:rgba(13,148,136,.08);cursor:pointer}.mj-safe-master span{flex:1}.mj-safe-master b,.mj-safe-master small{display:block}.mj-safe-master small{color:#94a3b8;font-size:11px;margin-top:3px;line-height:1.7}.mj-safe-master input{position:absolute;opacity:0;pointer-events:none}.mj-safe-master>i{position:relative;width:48px;height:27px;flex:none;border-radius:99px;background:#334155;transition:.2s}.mj-safe-master>i:after{content:'';position:absolute;top:4px;right:4px;width:19px;height:19px;border-radius:50%;background:#fff;transition:.2s}.mj-safe-master input:checked+i{background:#14b8a6}.mj-safe-master input:checked+i:after{transform:translateX(-21px)}.mj-safe-categories{display:grid;gap:7px;padding:0 14px 14px}.mj-safe-categories label{display:flex;align-items:center;gap:10px;padding:10px 11px;border:1px solid rgba(148,163,184,.14);border-radius:11px;background:rgba(30,41,59,.5);cursor:pointer}.mj-safe-categories input{position:absolute;opacity:0}.mj-safe-categories span{flex:1}.mj-safe-categories b,.mj-safe-categories small{display:block}.mj-safe-categories small{color:#94a3b8;font-size:10px;margin-top:2px}.mj-safe-categories label>i{display:grid;place-items:center;width:22px;height:22px;border:1px solid #475569;border-radius:7px;color:transparent;font-style:normal}.mj-safe-categories input:checked~i{border-color:#2dd4bf;background:#2dd4bf;color:#042f2e}.mj-safe-notice{display:flex;align-items:center;gap:8px;margin:0 14px 14px;color:#cbd5e1;font-size:11px}.mj-safe-notice input{accent-color:#14b8a6}.mj-safe-settings>footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 15px;border-top:1px solid rgba(148,163,184,.14);color:#94a3b8;font-size:10px}.mj-safe-settings>footer span{display:flex;align-items:center;gap:6px}.mj-safe-settings>footer span i{width:7px;height:7px;border-radius:50%;background:#2dd4bf}.mj-safe-settings>footer b{color:#99f6e4;white-space:nowrap}.mj-safe-toast{position:absolute;z-index:110;top:18px;left:50%;display:flex;align-items:center;gap:9px;max-width:calc(100% - 28px);padding:11px 16px;border:1px solid rgba(45,212,191,.42);border-radius:12px;background:rgba(6,78,59,.94);color:#ecfdf5;box-shadow:0 14px 34px rgba(2,6,23,.4);transform:translate(-50%,-14px);opacity:0;transition:.24s;pointer-events:none;font:700 12px Vazirmatn,Tahoma,sans-serif}.mj-safe-toast[hidden]{display:none!important}.mj-safe-toast.is-visible{transform:translate(-50%,0);opacity:1}.is-safe-skipping .mjw-subtitle-overlay,.is-safe-skipping .ml-cue-overlay{opacity:0!important}.mjw-player-shell,.ml-video-shell{isolation:isolate}
html[data-theme="light"] .mj-safe-settings{background:rgba(255,255,255,.97);color:#0f172a;border-color:#dbe3ee}html[data-theme="light"] .mj-safe-master,html[data-theme="light"] .mj-safe-categories label{background:#f8fafc;border-color:#dbe3ee}html[data-theme="light"] .mj-safe-master small,html[data-theme="light"] .mj-safe-categories small,html[data-theme="light"] .mj-safe-notice,html[data-theme="light"] .mj-safe-settings>footer{color:#64748b}
@media(max-width:680px){.mj-safe-settings{position:fixed;z-index:270;inset:auto 7px calc(env(safe-area-inset-bottom,0px) + 7px);width:auto;max-height:min(78vh,650px)}.mj-safe-quick-toggle span{display:none}.mj-safe-quick-toggle{width:38px;padding:7px!important}.mj-safe-toast{position:fixed;top:calc(env(safe-area-inset-top,0px) + 72px)}}

/* Discovery catalog: educational metadata is treated as a first-class filter. */
.mj-catalog-hero { min-height: 310px; display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:42px;background:radial-gradient(circle at 15% 20%,rgba(var(--mj-accent-rgb),.13),transparent 31%),radial-gradient(circle at 78% 80%,rgba(74,100,220,.11),transparent 29%),linear-gradient(125deg,#111c29,#080e17); }
.mj-catalog-hero__copy { position:relative;z-index:2;max-width:760px; }
.mj-catalog-switch { display:inline-flex;gap:3px;margin-bottom:24px;padding:4px;border:1px solid var(--mj-line);border-radius:12px;background:rgba(255,255,255,.035); }
.mj-catalog-switch a { min-width:64px;padding:7px 12px;border-radius:8px;color:var(--mj-muted);font-size:9px;font-weight:750;text-align:center; }
.mj-catalog-switch a.is-active { background:var(--mj-primary);color:var(--mj-on-primary);box-shadow:0 8px 24px rgba(var(--mj-accent-strong-rgb),.18); }
.mj-catalog-hero h1 { margin:8px 0 7px; }
.mj-catalog-hero p { max-width:680px;line-height:1.95; }
.mj-catalog-stats { display:flex;align-items:center;gap:0;margin-top:25px; }
.mj-catalog-stats>span { min-width:120px;display:grid;gap:1px;padding-inline:18px;border-inline-start:1px solid var(--mj-line); }
.mj-catalog-stats>span:first-child { padding-inline-start:0;border:0; }
.mj-catalog-stats strong { direction:ltr;color:var(--mj-text);font:800 18px/1.4 "Segoe UI",var(--mj-font-fa); }
.mj-catalog-stats small { color:var(--mj-muted);font-size:8px; }
.mj-catalog-hero__art { width:330px;height:230px;align-self:center; }
.mj-catalog-hero__art span { width:125px;top:28px;display:flex;flex-direction:column;justify-content:space-between;padding:15px;color:#fff; }
.mj-catalog-hero__art span:nth-child(1) { right:9px; }
.mj-catalog-hero__art span:nth-child(2) { right:105px;top:5px; }
.mj-catalog-hero__art span:nth-child(3) { right:204px;top:35px; }
.mj-catalog-hero__art i { font:900 10px/1 "Segoe UI",sans-serif;letter-spacing:2px; }
.mj-catalog-hero__art b { align-self:flex-end;padding:5px 7px;border-radius:7px;background:rgba(7,12,18,.7);color:var(--mj-primary);font:900 9px/1 "Segoe UI",sans-serif; }

.mj-catalog-toolbar { grid-template-columns:minmax(260px,1fr) auto auto;gap:12px 18px;margin:22px 0 31px;padding:16px 0 17px; }
.mj-catalog-filter { height:48px;background:rgba(255,255,255,.035);transition:border-color 180ms ease,box-shadow 180ms ease,background 180ms ease; }
.mj-catalog-filter:focus-within { border-color:rgba(var(--mj-accent-rgb),.48);background:rgba(var(--mj-accent-rgb),.035);box-shadow:0 0 0 4px rgba(var(--mj-accent-rgb),.065); }
.mj-catalog-filter input { color:var(--mj-text);font-size:10px; }
.mj-catalog-filter kbd { padding:3px 6px;border:1px solid var(--mj-line);border-radius:6px;color:var(--mj-muted);background:rgba(255,255,255,.025);font:700 7px/1 "Segoe UI",sans-serif; }
.mj-catalog-sort { position:relative;height:48px;min-width:178px;display:flex;align-items:center;padding:0 12px;border:1px solid var(--mj-line);border-radius:13px;background:rgba(255,255,255,.035); }
.mj-catalog-sort label { position:absolute;top:-8px;inset-inline-start:10px;padding:0 5px;background:var(--mj-bg);color:var(--mj-muted);font-size:7px; }
.mj-catalog-sort select { width:100%;height:100%;padding-inline-end:24px;border:0;outline:0;appearance:none;background:transparent;color:var(--mj-text);font:650 9px var(--mj-font-fa);cursor:pointer; }
.mj-catalog-sort option { background:var(--mj-surface);color:var(--mj-text); }
.mj-catalog-sort svg { width:15px;height:15px;position:absolute;inset-inline-end:11px;pointer-events:none;color:var(--mj-muted); }
.mj-result-count { min-width:74px;text-align:center; }
.mj-filter-chips { grid-column:1/-1;padding-top:3px; }
.mj-filter-chips button { gap:7px;min-height:37px;padding-inline:13px;background:rgba(255,255,255,.018);transition:color 160ms ease,border-color 160ms ease,background 160ms ease; }
.mj-filter-chips button:hover { color:var(--mj-text);border-color:var(--mj-line-strong); }
.mj-filter-chips button i { width:6px;height:6px;border-radius:50%;background:var(--mj-primary);box-shadow:0 0 10px var(--mj-primary); }
.mj-filter-chips button b { direction:ltr;color:inherit;font:800 8px "Segoe UI",sans-serif; }
.mj-filter-chips button small { min-width:20px;padding:2px 5px;border-radius:6px;background:rgba(255,255,255,.06);font-size:7px;text-align:center; }
.mj-catalog-grid { grid-template-columns:repeat(6,minmax(0,1fr));gap:33px 18px;align-items:start; }
.mj-content-card[hidden] { display:none!important; }
.mj-card-progress { position:absolute;z-index:3;inset:auto 8px 8px;height:4px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.2); }
.mj-card-progress i { display:block;width:var(--progress,0%);height:100%;border-radius:inherit;background:var(--mj-primary);box-shadow:0 0 12px var(--mj-primary); }
.mj-content-card__learn { display:none!important; }
.mj-catalog-grid .mj-content-card__body { min-height:92px; }
.mj-catalog-grid .mj-content-card__learn { min-width:0;display:flex!important;align-items:center!important;gap:7px!important;margin-top:8px!important;padding:6px 7px;border:1px solid rgba(var(--mj-accent-rgb),.12);border-radius:9px;background:rgba(var(--mj-accent-rgb),.055); }
.mj-content-card__learn b { flex:0 0 auto;padding:3px 5px;border-radius:5px;background:var(--mj-primary);color:var(--mj-on-primary);font:900 7px/1 "Segoe UI",sans-serif; }
.mj-content-card__learn small { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mj-muted);font-size:7px; }
.mj-empty-state__icon { width:58px;height:58px;display:grid;place-items:center;margin-bottom:7px;border:1px solid var(--mj-line);border-radius:18px;background:var(--mj-surface);color:var(--mj-primary); }
.mj-empty-state__icon svg { width:25px;height:25px; }
.mj-empty-state button { margin-top:8px;padding:9px 14px;border:1px solid rgba(var(--mj-accent-rgb),.2);border-radius:10px;background:var(--mj-primary-soft);color:var(--mj-primary);font:750 9px var(--mj-font-fa);cursor:pointer; }

html[data-theme="light"] .mj-catalog-hero { background:radial-gradient(circle at 15% 20%,rgba(var(--mj-accent-rgb),.12),transparent 31%),radial-gradient(circle at 78% 80%,rgba(74,100,220,.07),transparent 29%),linear-gradient(125deg,#fff,#edf4f2);box-shadow:0 22px 58px rgba(35,55,78,.08); }
html[data-theme="light"] .mj-catalog-switch,
html[data-theme="light"] .mj-catalog-filter,
html[data-theme="light"] .mj-catalog-sort,
html[data-theme="light"] .mj-filter-chips button { background:rgba(255,255,255,.72); }
html[data-theme="light"] .mj-catalog-filter input,
html[data-theme="light"] .mj-catalog-sort select,
html[data-theme="light"] .mj-result-count b { color:#122033; }
html[data-theme="light"] .mj-catalog-sort label { background:#f4f7fb; }
html[data-theme="light"] .mj-content-card__body>strong { color:#172538; }
html[data-theme="light"] .mj-catalog-grid .mj-content-card__learn { background:rgba(var(--mj-accent-rgb),.055); }

@media(max-width:1220px){.mj-catalog-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.mj-catalog-hero{grid-template-columns:minmax(0,1fr) 270px}.mj-catalog-hero__art{transform:scale(.86);transform-origin:center}}
@media(max-width:920px){.mj-catalog-hero{grid-template-columns:1fr}.mj-catalog-hero__art{display:none}.mj-catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.mj-catalog-toolbar{grid-template-columns:minmax(220px,1fr) auto auto}}
@media(max-width:680px){.mj-catalog-hero{min-height:280px;padding:25px 21px}.mj-catalog-switch{margin-bottom:18px}.mj-catalog-stats{margin-top:20px}.mj-catalog-stats>span{min-width:0;flex:1;padding-inline:9px}.mj-catalog-stats strong{font-size:14px}.mj-catalog-toolbar{grid-template-columns:1fr auto;margin-top:12px}.mj-catalog-filter{grid-column:1/-1;grid-row:1}.mj-catalog-sort{grid-column:1;grid-row:2;min-width:0}.mj-result-count{grid-column:2;grid-row:2}.mj-filter-chips{grid-column:1/-1;grid-row:3}.mj-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 11px}.mj-catalog-grid .mj-content-card__body{min-height:86px}.mj-catalog-grid .mj-content-card__learn{padding:5px}.mj-content-card__learn small{font-size:6.5px}}

.mjw-player-state__actions { display:flex;align-items:center;justify-content:center;gap:8px;margin-top:6px; }
.mjw-player-state__actions button { min-height:34px;padding:0 11px;border:1px solid rgba(255,255,255,.18);border-radius:9px;background:rgba(255,255,255,.08);color:#f5f8fb;font:750 8px var(--mj-font-fa);cursor:pointer; }
.mjw-player-state__actions button:first-child { border-color:rgba(var(--mj-accent-rgb),.32);background:rgba(var(--mj-accent-rgb),.12);color:var(--mj-primary); }
