/* The lesson player (single-lesson.php): the course bar, the lesson, the lessons of the course beside it (a sheet
   from the bottom below 1100px), the bar with «یاد گرفتم», the popups and the course offered after it. Same tokens
   as the site header, «دوره‌های من» and the page of all courses; offer cards are that page's cards. */
.lp {
	--lp-deep: var(--ye-deep);
	--lp-accent: var(--ye-accent);
	--lp-ink: var(--ye-ink);
	--lp-muted: var(--ye-muted);
	--lp-border: var(--ye-border);
	--lp-tint: var(--ye-tint);
	--lp-soft: #f4f1f7;
	--lp-gold: var(--ye-gold);
	--lp-buy: var(--ye-buy);
	--lp-buy-dark: var(--ye-buy-strong);
	--lp-green: var(--ye-green);
	--lp-bar-h: 62px;
	--lp-top: 0px;
	/* Tokens of the course-library cards used in «قدم بعدی». */
	--cl-deep: var(--lp-deep);
	--cl-accent: var(--lp-accent);
	--cl-ink: var(--lp-ink);
	--cl-muted: var(--lp-muted);
	--cl-border: var(--lp-border);
	--cl-tint: var(--lp-tint);
	--cl-gold: var(--lp-gold);
	--cl-sale: var(--ye-sale);
	min-height: 60vh;
	background: #faf8fc;
	color: var(--lp-ink);
}
body.admin-bar .lp { --lp-top: 32px; }
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp a, .lp a:hover, .lp a:focus { text-decoration: none; }
.lp button { font-family: inherit; cursor: pointer; }
.lp [x-cloak], .lp[x-cloak] { display: none !important; }
html.lp-locked, html.lp-locked body { overflow: hidden; }
/* The floating support button: a round icon above the bar with «یاد گرفتم», clear of the lesson column on wide screens. */
body.ye-lesson .yet-support { inset-block-end: max(86px, calc(env(safe-area-inset-bottom) + 80px)); }
body.ye-lesson .yet-support__launcher { width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0; border-radius: 999px; }
body.ye-lesson .yet-support__launcher-icon { width: 30px; height: 30px; flex-basis: 30px; background: transparent; }
body.ye-lesson .yet-support__launcher-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- Buttons and small pieces ----- */
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--lp-soft); color: var(--lp-ink); font-size: 15px; font-weight: var(--ye-w-bold); line-height: 1; white-space: nowrap; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.lp-btn:disabled { opacity: .55; cursor: default; }
.lp-btn--go, .lp-btn--go:focus { background: var(--lp-deep); color: #fff; box-shadow: 0 8px 18px rgba(46, 31, 84, .2); }
.lp-btn--go:hover { background: var(--ye-deep-hover); color: #fff; }
.lp-btn--buy, .lp-btn--buy:focus { background: var(--lp-buy); color: #fff; box-shadow: 0 8px 18px rgba(31, 174, 91, .24); }
.lp-btn--buy:hover { background: var(--lp-buy-dark); color: #fff; }
.lp-btn--soft, .lp-btn--soft:focus { background: var(--lp-tint); color: var(--lp-deep); }
.lp-btn--soft:hover { background: #ebe0f8; color: var(--lp-deep); }
.lp-btn--ghost, .lp-btn--ghost:focus { background: none; color: var(--lp-muted); }
.lp-btn--ghost:hover { background: var(--lp-soft); color: var(--lp-ink); }
.lp-btn--wide { width: 100%; }
.lp-btn + .lp-btn--wide { margin-top: 8px; }
.lp-chip { display: inline-block; padding: 0 9px; border-radius: 999px; background: var(--lp-tint); color: var(--lp-deep); font-size: 12.5px; font-weight: var(--ye-w-bold); line-height: 1.9; white-space: nowrap; }
.lp-chip--gold { background: #fff3d6; color: #7a4f00; }
.lp-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--lp-accent); font-size: 13px; font-weight: var(--ye-w-heading); }
.lp-meter { display: block; flex: 1; height: 8px; border-radius: 999px; background: #eee6f6; overflow: hidden; }
.lp-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(270deg, var(--lp-buy), #3fc67c); transition: width .4s ease; }

/* ----- The course bar ----- */
.lp-bar { position: sticky; top: var(--lp-top); z-index: 90; border-bottom: 1px solid var(--lp-border); background: rgba(255, 255, 255, .97); box-shadow: 0 6px 20px rgba(41, 34, 53, .04); }
.lp-bar__in { display: flex; align-items: center; gap: 14px; max-width: 1320px; height: var(--lp-bar-h); margin: 0 auto; padding: 0 15px; }
.lp-bar__back { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border: 1px solid var(--lp-border); border-radius: 12px; background: #fff; color: var(--lp-ink); font-size: 14px; font-weight: var(--ye-w-semibold); }
.lp-bar__back i { color: var(--lp-accent); font-size: 18px; }
.lp-bar__back:hover, .lp-bar__back:focus { border-color: var(--ye-border-accent); color: var(--lp-deep); }
.lp-bar__course { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.45; }
.lp-bar__title { overflow: hidden; color: var(--lp-ink); font-size: 15.5px; font-weight: var(--ye-w-heading); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.lp-bar__title:hover, .lp-bar__title:focus { color: var(--lp-deep); }
.lp-bar__pos { color: var(--lp-muted); font-size: 12.5px; font-weight: 600; }
.lp-bar__progress { display: flex; flex: 0 0 230px; align-items: center; gap: 10px; }
.lp-bar__percent { min-width: 36px; color: var(--lp-deep); font-size: 13.5px; font-weight: var(--ye-w-heading); text-align: left; }
.lp-bar__list { display: none; flex: 0 0 auto; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--lp-deep); color: #fff; font-size: 14px; font-weight: var(--ye-w-bold); }
.lp-bar__line { display: none; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: #eee6f6; }
.lp-bar__line > span { display: block; height: 100%; background: var(--lp-buy); transition: width .4s ease; }

/* ----- Layout: the lesson, and its course's lessons beside it ----- */
.lp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; max-width: 1320px; margin: 0 auto; padding: 22px 15px 64px; }
.lp-main { min-width: 0; }

/* ----- One lesson ----- */
.lp-lesson { transition: opacity .2s ease; }
.lp-lesson.is-loading { opacity: .5; pointer-events: none; }
.lp-head { margin-bottom: 16px; }
.lp-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.lp-pos { padding: 0 10px; border-radius: 999px; background: var(--lp-deep); color: #fff; font-size: 12.5px; font-weight: var(--ye-w-bold); line-height: 2; }
.lp-tag { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--lp-border); border-radius: 999px; background: #fff; color: var(--lp-muted); font-size: 12.5px; font-weight: var(--ye-w-semibold); line-height: 1.9; }
.lp-tag i { color: var(--lp-accent); font-size: 12px; }
.lp-tag--free { border-color: #f2d49a; background: #fff8e8; color: #7a4f00; }
.lp-tag--free i { color: #e0a100; }
.lp-tag--done { border-color: #cfe9d8; background: #e6f7ec; color: var(--lp-green); }
.lp-tag--done i { color: var(--lp-green); }
.lp .lp-title { margin: 0; color: var(--lp-ink); font-size: 26px; font-weight: var(--ye-w-heading); line-height: 1.5; text-align: right; }
.lp-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.lp-topics li { padding: 2px 11px; border-radius: 10px; background: var(--lp-soft); color: var(--lp-muted); font-size: 13.5px; font-weight: 600; line-height: 1.8; }
.lp-unavailable { margin: 24px 0; padding: 22px; border-radius: 16px; background: var(--lp-tint); color: var(--lp-muted); text-align: center; }

.lp-sec { margin: 0; }
.lp-sec + .lp-sec, .lp-tools + .lp-sec { margin-top: 16px; }
.lp-card { padding: 20px 22px; border: 1px solid var(--lp-border); border-radius: 20px; background: #fff; }
.lp .lp-sec__title { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--lp-ink); font-size: 17.5px; font-weight: var(--ye-w-heading); line-height: 1.5; }
.lp .lp-sec__title > i { color: var(--lp-accent); }

/* Video: the player's own styles live in single-lesson-video.php. */
.lp-sec--video .video-wrapper { margin: 0 0 14px; border-radius: 18px; background: #120a1f; box-shadow: 0 16px 36px rgba(41, 34, 53, .18); }
.lp-sec--video .video-wrapper:last-child { margin-bottom: 0; }
.lp-sec--video .plyr, .lp-sec--video video { border-radius: 18px; }

.lp-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.lp-tool { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 1px solid var(--ye-border-strong); border-radius: 12px; background: #fff; color: var(--lp-deep); font-size: 14px; font-weight: var(--ye-w-bold); }
.lp-tool i { color: var(--lp-accent); }
.lp-tool:hover, .lp-tool:focus { border-color: var(--lp-accent); background: var(--lp-tint); color: var(--lp-deep); }

/* Text and exercises (older markup inside). */
.lp .styled { padding: 0; font-size: 17px; line-height: 2; }
.lp .styled > :first-child { margin-top: 0; }
.lp .styled > :last-child { margin-bottom: 0; }

/* ----- Writing: the steps to the teacher, whose turn it is, the text and the correction ----- */
.lp-writing { scroll-margin-top: calc(var(--lp-top) + var(--lp-bar-h) + 12px); }
.lp-writing__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.lp .lp-writing__head .lp-sec__title { margin: 0; }
.lp-wchip { flex: 0 0 auto; padding: 0 11px; border-radius: 999px; background: var(--lp-soft); color: var(--lp-muted); font-size: 12.5px; font-weight: var(--ye-w-heading); line-height: 2; white-space: nowrap; }
.lp-wchip--queue { background: #f0e8fb; color: var(--lp-deep); }
.lp-wchip--review { background: #e7f0fd; color: #1d56b0; }
.lp-wchip--fix { background: #fff1d1; color: #7a4f00; }
.lp-wchip--done { background: #e3f6ea; color: var(--lp-green); }

.lp-wflash { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #e3f6ea; color: var(--lp-green); font-size: 14.5px; font-weight: var(--ye-w-semibold); line-height: 1.8; }
.lp-wflash--error { background: #fdeceb; color: #b42318; }

.lp-wsteps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; padding: 4px 0 0; list-style: none; }
.lp-wsteps__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 4px; text-align: center; }
.lp-wsteps__item::before { content: ""; position: absolute; top: 17px; inset-inline-start: calc(-50% + 22px); inset-inline-end: calc(50% + 22px); height: 3px; border-radius: 3px; background: var(--lp-border); }
.lp-wsteps__item:first-child::before { display: none; }
.lp-wsteps__item.is-done::before, .lp-wsteps__item.is-now::before, .lp-wsteps__item.is-alert::before { background: var(--lp-buy); }
.lp-wsteps__dot { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 4px; border: 2px solid var(--lp-border); border-radius: 50%; background: #fff; color: var(--lp-muted); font-size: 14px; font-weight: var(--ye-w-heading); }
.lp-wsteps__item.is-done .lp-wsteps__dot { border-color: var(--lp-buy); background: var(--lp-buy); color: #fff; }
.lp-wsteps__item.is-now .lp-wsteps__dot { border-color: var(--lp-deep); background: var(--lp-deep); color: #fff; box-shadow: 0 0 0 5px rgba(46, 31, 84, .12); }
.lp-wsteps__item.is-alert .lp-wsteps__dot { border-color: #f0a500; background: #f0a500; color: #fff; box-shadow: 0 0 0 5px rgba(240, 165, 0, .18); }
.lp-wsteps__label { color: var(--lp-muted); font-size: 13px; font-weight: var(--ye-w-semibold); line-height: 1.6; }
.lp-wsteps__item.is-done .lp-wsteps__label { color: var(--lp-ink); }
.lp-wsteps__item.is-now .lp-wsteps__label { color: var(--lp-deep); font-weight: var(--ye-w-heading); }
.lp-wsteps__item.is-alert .lp-wsteps__label { color: #7a4f00; font-weight: var(--ye-w-heading); }
.lp-wsteps__date { color: var(--lp-muted); font-size: 11.5px; font-weight: 600; line-height: 1.6; }

.lp-wstatus { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--lp-soft); }
.lp-wstatus__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--lp-accent); font-size: 17px; }
.lp-wstatus__body { flex: 1; min-width: 0; }
.lp-wstatus__body strong { display: block; color: var(--lp-ink); font-size: 15.5px; font-weight: var(--ye-w-heading); line-height: 1.7; }
.lp-wstatus__body p { margin: 2px 0 0; color: var(--lp-muted); font-size: 14px; line-height: 1.9; }
.lp-wstatus__body .userbtns { display: inline-block; margin-top: 10px; }
.lp-wstatus--queue { background: #f6f1fd; }
.lp-wstatus--review { background: #eef4fe; }
.lp-wstatus--review .lp-wstatus__icon { color: #1d56b0; }
.lp-wstatus--fix { background: #fff7e3; }
.lp-wstatus--fix .lp-wstatus__icon { color: #b07800; }
.lp-wstatus--done { background: #ebf8f0; }
.lp-wstatus--done .lp-wstatus__icon { background: var(--lp-buy); color: #fff; }
.lp-wturn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; background: #fff; color: var(--lp-deep); font-size: 12.5px; font-weight: var(--ye-w-heading); white-space: nowrap; }
.lp-wturn--you { background: #f0a500; color: #fff; }

.lp-wbox { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--lp-border); border-radius: 16px; background: #fcfbfe; }
.lp-wbox__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lp .lp-wbox__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--lp-ink); font-size: 15px; font-weight: var(--ye-w-heading); line-height: 1.6; }
.lp .lp-wbox__head .lp-wbox__title { margin: 0; }
.lp-wbox__title > i:first-child { color: var(--lp-accent); }
.lp-wbox--teacher { border-color: #f5dca0; border-inline-start: 4px solid #f0a500; background: #fffaf0; }
.lp-wbox--teacher .lp-wbox__title > i:first-child { color: #b07800; }
.lp-wbox--result { border-color: #cdebd8; border-inline-start: 4px solid var(--lp-buy); background: #f7fcf9; }
.lp-wbox--fold > summary { margin: 0; cursor: pointer; list-style: none; }
.lp-wbox--fold > summary::-webkit-details-marker { display: none; }
.lp-wbox--fold[open] > summary { margin-bottom: 10px; }
.lp-wbox__caret { margin-inline-start: auto; color: var(--lp-muted); transition: transform .2s ease; }
.lp-wbox--fold[open] .lp-wbox__caret { transform: rotate(180deg); }
.lp-wempty { margin: 0; color: var(--lp-muted); font-size: 14.5px; }

/* A text as written: each paragraph keeps its own language's direction. */
.lp-rich { color: var(--lp-ink); font-size: 16.5px; line-height: 1.95; overflow-wrap: anywhere; }
.lp-rich > *, .lp-rich li { unicode-bidi: plaintext; text-align: start; }
.lp-rich p { margin: 0 0 .7em; }
.lp-rich ul, .lp-rich ol { margin: 0 0 .7em; padding-inline-start: 1.6em; }
.lp-rich ul > li { list-style: disc; }
.lp-rich ol > li { list-style: decimal; }
.lp-rich > :last-child { margin-bottom: 0; }
.lp-rich b, .lp-rich strong { font-weight: var(--ye-w-bold); }
.lp-rich mark { padding: 0 2px; border-radius: 4px; background: #fff0a8; color: inherit; }
.lp-rich s, .lp-rich del, .lp-rich strike { text-decoration-color: #d92d20; text-decoration-thickness: 2px; }

.lp-wresult { margin-top: 14px; }
.lp-wtabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--lp-soft); }
.lp-wtabs button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--lp-muted); font-size: 14px; font-weight: var(--ye-w-bold); }
.lp-wtabs button.is-on { background: #fff; color: var(--lp-deep); box-shadow: 0 2px 8px rgba(41, 34, 53, .08); }
.lp-wresult .lp-wbox { margin-top: 10px; }

.lp-wedit .lp-wform { margin-top: 14px; }
.lp-wform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 14px; }
.lp-wform__hint { color: var(--lp-muted); font-size: 13px; line-height: 1.8; }
.lp-btn--sm { height: 36px; padding: 0 13px; border-radius: 11px; font-size: 13.5px; }

/* Audio and files */
.lp-files { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lp-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--lp-border); border-radius: 14px; background: var(--ye-tint-soft); }
.lp-file__icon { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fdecef; color: var(--ye-sale); font-size: 18px; }
.lp-file__name { flex: 1; min-width: 0; color: var(--lp-ink); font-size: 14.5px; font-weight: var(--ye-w-bold); }
.lp-file .lp-btn { height: 40px; padding: 0 16px; font-size: 14px; }
.lp-audio { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--lp-border); border-radius: 14px; background: var(--ye-tint-soft); }
.lp-audio audio { display: block; width: 100%; height: 44px; }

/* «یادداشت من» */
.lp-notes > summary { margin: 0; cursor: pointer; list-style: none; }
.lp-notes > summary::-webkit-details-marker { display: none; }
.lp-notes__hint { color: var(--lp-muted); font-size: 13.5px; font-weight: 500; }
.lp-notes__caret { margin-inline-start: auto; color: var(--lp-muted); transition: transform .2s ease; }
.lp-notes[open] .lp-notes__caret { transform: rotate(180deg); }
.lp-notes:not([open]) { padding-top: 16px; padding-bottom: 16px; }
.lp-notes:not([open]) > summary { margin: 0; }
.lp-notes__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lp-notes__more { margin: 0; color: var(--lp-muted); font-size: 12.5px; line-height: 1.8; }

/* ----- The bar under the lesson: previous, lessons, «یاد گرفتم» / next ----- */
.lp-dock { position: sticky; bottom: 12px; z-index: 40; display: flex; align-items: center; gap: 8px; margin: 20px 0 0; padding: 8px; border: 1px solid var(--lp-border); border-radius: 18px; background: rgba(255, 255, 255, .97); box-shadow: 0 14px 34px rgba(41, 34, 53, .13); }
.lp-dock__prev { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--lp-soft); color: var(--lp-ink); font-size: 14.5px; font-weight: var(--ye-w-semibold); }
.lp-dock__prev i { font-size: 18px; }
.lp-dock__prev:hover, .lp-dock__prev:focus { background: var(--lp-tint); color: var(--lp-deep); }
.lp-dock__prev.is-off { opacity: .4; }
.lp-dock__list { display: none; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 12px; border: 1px solid var(--lp-border); border-radius: 12px; background: #fff; color: var(--lp-deep); font-size: 14px; font-weight: var(--ye-w-bold); }
.lp-dock__list i { color: var(--lp-accent); }
.lp-dock__list b { color: var(--lp-muted); font-size: 13px; font-weight: var(--ye-w-bold); }
.lp-dock__pos { flex: 1; color: var(--lp-muted); font-size: 14px; font-weight: 700; text-align: center; }
.lp-dock__go { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; height: 46px; margin-inline-start: auto; padding: 0 22px; border-radius: 12px; background: var(--lp-deep); color: #fff; font-size: 15.5px; font-weight: var(--ye-w-heading); box-shadow: 0 8px 18px rgba(46, 31, 84, .2); }
.lp-dock__go i { font-size: 18px; }
.lp-dock__go:hover, .lp-dock__go:focus { background: var(--ye-deep-hover); color: #fff; }
.lp-dock__go--learn { background: var(--lp-buy); box-shadow: 0 8px 18px rgba(31, 174, 91, .26); }
.lp-dock__go--learn:hover, .lp-dock__go--learn:focus { background: var(--lp-buy-dark); }
.lp-dock__go--learn i { font-size: 15px; }
.lp-dock__go--finish { background: linear-gradient(135deg, var(--lp-deep), var(--lp-accent)); }
.lp-dock__go--finish i { color: var(--lp-gold); font-size: 16px; }

/* ----- The course's lessons ----- */
.lp-side { position: sticky; top: calc(var(--lp-top) + var(--lp-bar-h) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--lp-top) - var(--lp-bar-h) - 32px); border: 1px solid var(--lp-border); border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(46, 31, 84, .05); overflow: hidden; }
.lp-side__head { flex: 0 0 auto; padding: 16px 16px 12px; border-bottom: 1px solid var(--lp-border); }
.lp-side__title { display: flex; align-items: center; gap: 8px; }
.lp-side__title strong { color: var(--lp-ink); font-size: 16px; font-weight: var(--ye-w-heading); }
.lp-side__close { display: none; place-items: center; width: 36px; height: 36px; margin-inline-start: auto; border: 0; border-radius: 50%; background: var(--lp-soft); color: var(--lp-muted); font-size: 16px; }
.lp-side__done { margin: 6px 0 0; color: var(--lp-muted); font-size: 13.5px; line-height: 1.8; }
.lp-search { position: relative; display: block; margin: 12px 0 0; font-weight: 400; }
.lp-search input { width: 100%; height: 42px; padding: 0 38px 0 12px; border: 1px solid var(--ye-border-strong); border-radius: 12px; background: #fff; color: var(--lp-ink); font: inherit; font-size: 14px; outline: none; -webkit-appearance: none; appearance: none; }
.lp-search input:focus { border-color: var(--lp-accent); box-shadow: 0 0 0 4px rgba(111, 63, 192, .12); }
.lp-search i { position: absolute; top: 50%; right: 13px; color: var(--lp-accent); transform: translateY(-50%); pointer-events: none; }

.lp-list { flex: 1 1 auto; min-height: 0; margin: 0; padding: 8px; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.lp-item { margin: 0; }
.lp-item + .lp-item { margin-top: 2px; }
.lp-item__link { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: 14px; color: var(--lp-ink); transition: background .15s ease; }
.lp-item__link:hover, .lp-item__link:focus { background: var(--ye-tint-soft); color: var(--lp-ink); }
.lp-item__mark { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--lp-soft); color: var(--lp-muted); font-size: 13.5px; font-weight: var(--ye-w-bold); }
.lp-item__check, .lp-item__lock { display: none; }
.lp-item.is-done .lp-item__mark { background: #e6f7ec; color: var(--lp-green); }
.lp-item.is-done .lp-item__num, .lp-item.is-locked .lp-item__num { display: none; }
.lp-item.is-done .lp-item__check, .lp-item.is-locked .lp-item__lock { display: inline-block; }
.lp-item.is-locked .lp-item__mark { color: var(--ye-faint); font-size: 12.5px; }
.lp-item.is-locked .lp-item__title { color: var(--lp-muted); }
.lp-item.is-current .lp-item__link { background: var(--lp-tint); box-shadow: inset -3px 0 0 var(--lp-accent); }
.lp-item.is-current .lp-item__mark { background: var(--lp-deep); color: #fff; }
.lp-item.is-current.is-done .lp-item__mark { background: var(--lp-buy); color: #fff; }
.lp-item__text { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.lp-item__title { font-size: 14.5px; font-weight: var(--ye-w-bold); line-height: 1.6; text-align: right; }
.lp-item__topic { overflow: hidden; color: var(--lp-muted); font-size: 13px; line-height: 1.6; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.lp-item__kinds { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 3px; color: #847a91; font-size: 12px; line-height: 1.7; }
.lp-item__kinds > span { display: inline-flex; align-items: center; gap: 4px; }
.lp-item__kinds i { color: #a58bd0; font-size: 11px; }
.lp-item__kinds .is-free { padding: 0 7px; border-radius: 999px; background: #fff3d6; color: #7a4f00; font-weight: var(--ye-w-bold); }
.lp-item__now { display: none; flex: 0 0 auto; align-self: center; padding: 0 8px; border-radius: 999px; background: var(--lp-accent); color: #fff; font-size: 11px; font-weight: var(--ye-w-bold); line-height: 1.9; white-space: nowrap; }
.lp-item.is-current:not(.is-locked) .lp-item__now { display: inline-block; }
.lp-list__none { margin: 4px 16px 16px; color: var(--lp-muted); font-size: 13.5px; text-align: center; }

/* The course after this one (or this one to buy), under the list */
.lp-mini { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--lp-border); background: var(--ye-tint-soft); color: var(--lp-ink); }
a.lp-mini:hover, a.lp-mini:focus { background: var(--lp-tint); color: var(--lp-ink); }
.lp-mini__cover { flex: 0 0 72px; }
.lp-mini__cover img { display: block; width: 72px; height: 48px !important; margin: 0; border-radius: 10px; object-fit: cover; }
.lp-mini__text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.5; }
.lp-mini__text small { color: var(--lp-accent); font-size: 12px; font-weight: var(--ye-w-bold); }
.lp-mini__text strong { overflow: hidden; font-size: 14px; font-weight: var(--ye-w-heading); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.lp-mini .cl-price { font-size: 13.5px; }
.lp-mini .cl-price del { display: inline; margin-left: 6px; font-size: 11.5px; }
.lp-mini > i { color: var(--lp-accent); font-size: 18px; }
.lp-mini--buy .lp-btn { height: 40px; padding: 0 16px; font-size: 14px; }

.lp-scrim { position: fixed; inset: 0; z-index: 100000; background: rgba(24, 10, 48, .5); }

/* ----- «قدم بعدی» under the lesson, near the end of the course ----- */
.lp-next { margin-top: 28px; padding: 22px; border: 1px solid var(--lp-border); border-radius: 22px; background: linear-gradient(180deg, var(--ye-tint-soft) 0%, #fff 70%); }
.lp .lp-next h2 { margin: 6px 0 2px; color: var(--lp-ink); font-size: 20px; font-weight: var(--ye-w-heading); line-height: 1.6; }
.lp-next__head p { margin: 0; color: var(--lp-muted); font-size: 14.5px; line-height: 1.8; }
.lp-next__owned { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid #cfe9d8; border-radius: 14px; background: #eefaf2; color: var(--lp-green); font-size: 14.5px; font-weight: var(--ye-w-bold); }
.lp-next__owned:hover, .lp-next__owned:focus { background: #e3f6ea; color: var(--lp-green); }
.lp-next__owned strong { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; white-space: nowrap; }
.lp-next__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; max-width: 660px; margin-top: 16px; }

/* ----- This course, for someone without it (free lesson or locked lesson) ----- */
.lp-buy { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 28px; padding: 22px; border: 1px solid var(--lp-border); border-radius: 22px; background: #fff; }
.lp-buy--locked { margin-top: 4px; border-color: var(--ye-border-strong); background: linear-gradient(180deg, var(--ye-tint-soft) 0%, #fff 75%); box-shadow: 0 14px 34px rgba(46, 31, 84, .08); }
.lp-buy__cover { display: block; }
.lp-buy__cover img { display: block; width: 100%; height: auto !important; margin: 0; border-radius: 16px; aspect-ratio: 3 / 2; object-fit: cover; }
.lp-buy__body { min-width: 0; }
.lp .lp-buy h2 { margin: 8px 0 4px; color: var(--lp-ink); font-size: 20px; font-weight: var(--ye-w-heading); line-height: 1.6; }
.lp-buy__course { margin: 0; color: var(--lp-deep); font-size: 15px; font-weight: var(--ye-w-bold); text-align: right; }
.lp-buy__facts { margin: 12px 0 0; padding: 0; list-style: none; }
.lp-buy__facts li { display: flex; align-items: baseline; gap: 8px; color: var(--lp-ink); font-size: 14.5px; line-height: 1.9; }
.lp-buy__facts i { color: var(--lp-buy); font-size: 13px; }
.lp-buy__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }
.lp-buy__actions .cl-price { font-size: 18px; }
.lp-buy__pack { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px dashed #f2d49a; border-radius: 14px; background: #fffaf0; color: var(--lp-ink); font-size: 14px; font-weight: var(--ye-w-semibold); }
.lp-buy__pack:hover, .lp-buy__pack:focus { border-style: solid; color: var(--lp-ink); }
.lp-buy__pack i { margin-inline-start: auto; color: var(--lp-accent); }
.lp-buy__login { margin: 12px 0 0; color: var(--lp-muted); font-size: 14px; }
.lp-buy__login a { color: var(--lp-accent); font-weight: var(--ye-w-bold); }

/* ----- Popups: after «یاد گرفتم», at the end of the course, watching offline ----- */
.lp-modal { position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center; padding: 16px; background: rgba(24, 10, 48, .55); overflow-y: auto; }
.lp-done { position: relative; width: min(460px, 100%); margin: auto; padding: 30px 24px 22px; border-radius: 24px; background: #fff; color: var(--lp-ink); text-align: center; box-shadow: 0 30px 80px rgba(24, 10, 48, .35); }
.lp-done--finish { width: min(520px, 100%); }
.lp .lp-done h2 { margin: 14px 0 6px; color: var(--lp-ink); font-size: 22px; font-weight: var(--ye-w-heading); line-height: 1.6; }
.lp-done > p { margin: 0; color: var(--lp-muted); font-size: 15px; line-height: 1.9; }
.lp-done__badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e6f7ec; color: var(--lp-buy); font-size: 28px; }
.lp-done__badge--gold { background: #fff3d6; color: #e0a100; }
.lp-offline .lp-done__badge { background: var(--lp-tint); color: var(--lp-accent); }
.lp-x { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--lp-soft); color: var(--lp-muted); font-size: 16px; }
.lp-x:hover { background: var(--lp-tint); color: var(--lp-deep); }
.lp-done__meter { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.lp-done__meter b { color: var(--lp-deep); font-size: 14px; font-weight: var(--ye-w-heading); }
.lp-done__next { display: flex; flex-direction: column; gap: 2px; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; background: var(--lp-tint); text-align: right; }
.lp-done__next small { color: var(--lp-accent); font-size: 12.5px; font-weight: var(--ye-w-bold); }
.lp-done__next strong { color: var(--lp-ink); font-size: 15.5px; font-weight: var(--ye-w-heading); text-align: right; }
.lp-done__next span { color: var(--lp-muted); font-size: 13.5px; text-align: right; }
.lp-steps { display: grid; gap: 10px; margin: 18px 0; padding: 0; list-style: none; text-align: right; }
.lp-steps li { display: flex; align-items: center; gap: 10px; color: var(--lp-ink); font-size: 14.5px; line-height: 1.8; }
.lp-steps li span { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lp-tint); color: var(--lp-deep); font-size: 14px; font-weight: var(--ye-w-heading); }
.lp-feedback { display: grid; gap: 10px; margin-top: 16px; }
.lp-feedback textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid var(--ye-border-strong); border-radius: 14px; background: #fff; color: var(--lp-ink); font: inherit; font-size: 14.5px; line-height: 1.8; resize: vertical; outline: none; }
.lp-feedback textarea:focus { border-color: var(--lp-accent); box-shadow: 0 0 0 4px rgba(111, 63, 192, .12); }
.lp-feedback__sent { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 14px; background: #eefaf2; color: var(--lp-green); font-size: 14.5px; font-weight: var(--ye-w-semibold); }
.lp-finish__next { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--lp-border); text-align: right; }
.lp-finish__label { margin: 0 0 10px; color: var(--lp-muted); font-size: 13.5px; font-weight: var(--ye-w-bold); }
.lp-finish__next .lp-btn--go { margin-bottom: 8px; }
.lp-finish__more { margin: 18px 0 0; }
.lp-finish__more a { display: inline-flex; align-items: center; gap: 6px; color: var(--lp-accent); font-size: 14.5px; font-weight: var(--ye-w-bold); }
.lp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--lp-border); border-radius: 14px; background: #fff; color: var(--lp-ink); }
.lp-row + .lp-row { margin-top: 8px; }
.lp-row:hover, .lp-row:focus { border-color: var(--ye-border-accent); background: var(--ye-tint-soft); color: var(--lp-ink); }
.lp-row__cover { flex: 0 0 72px; }
.lp-row__cover img { display: block; width: 72px; height: 48px !important; margin: 0; border-radius: 10px; object-fit: cover; }
.lp-row__text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.5; }
.lp-row__text small { color: var(--lp-accent); font-size: 12px; font-weight: var(--ye-w-bold); }
.lp-row__text strong { font-size: 14.5px; font-weight: var(--ye-w-heading); text-align: right; }
.lp-row .cl-price { font-size: 13.5px; }
.lp-row .cl-price del { display: inline; margin-left: 6px; font-size: 11.5px; }
.lp-row > i { color: var(--lp-accent); font-size: 18px; }

.lp-toast { position: fixed; right: 50%; bottom: 96px; z-index: 100003; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ye-ink); color: #fff; font-size: 14.5px; font-weight: 700; line-height: 1.8; text-align: center; box-shadow: 0 14px 34px rgba(24, 10, 48, .3); transform: translateX(50%); }

/* ----- No access ----- */
.lp--closed { padding: 48px 15px 72px; }
.lp-gate { max-width: 560px; margin: 0 auto; padding: 32px 28px; border: 1px solid var(--lp-border); border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 14px 34px rgba(46, 31, 84, .06); }
.lp-gate__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--lp-tint); color: var(--lp-accent); font-size: 26px; }
.lp .lp-gate h1 { margin: 14px 0 6px; color: var(--lp-ink); font-size: 22px; font-weight: var(--ye-w-heading); line-height: 1.6; }
.lp-gate p { margin: 0; color: var(--lp-muted); font-size: 15px; line-height: 1.9; }
.lp-gate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }

/* ----- Phones and tablets: one column, the lessons in a sheet from the bottom ----- */
@media (min-width: 1100px) {
	.lp-scrim { display: none !important; }
}
@media (max-width: 1099px) {
	.lp-layout { grid-template-columns: minmax(0, 1fr); }
	.lp-bar__list { display: inline-flex; }
	.lp-side { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 100001; width: min(680px, 100%); max-height: min(84vh, 760px); margin: 0 auto; border-width: 1px 1px 0; border-radius: 22px 22px 0 0; box-shadow: 0 -14px 40px rgba(24, 10, 48, .22); transform: translateY(102%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s; }
	.lp-side.is-open { transform: none; visibility: visible; transition: transform .28s ease; }
	.lp-side__head::before { content: ""; display: block; width: 44px; height: 5px; margin: -6px auto 10px; border-radius: 999px; background: #ddd3ea; }
	.lp-side__close { display: grid; }
	.lp-side > :last-child { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
	.lp-dock__pos { display: none; }
	.lp-dock__list { display: inline-flex; flex: 1; }
}
@media (max-width: 782px) {
	body.admin-bar .lp { --lp-top: 46px; }
}
@media (max-width: 700px) {
	.lp { --lp-bar-h: 56px; }
	.lp-bar__in { gap: 10px; }
	.lp-bar__back { width: 40px; padding: 0; justify-content: center; }
	.lp-bar__back span { display: none; }
	.lp-bar__title { font-size: 14.5px; }
	.lp-bar__progress { display: none; }
	.lp-bar__line { display: block; }
	.lp-layout { padding: 16px 15px 24px; }
	.lp .lp-title { font-size: 21px; }
	.lp-topics li { font-size: 13px; }
	.lp-card { padding: 16px; border-radius: 18px; }
	.lp-sec--video { margin: 0 -15px; }
	.lp-sec--video .video-wrapper, .lp-sec--video .plyr, .lp-sec--video video { border-radius: 0; }
	.lp .styled { font-size: 16px; }
	.lp-dock { bottom: 0; margin: 20px -15px 0; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
	.lp-dock__prev { padding: 0 14px; }
	.lp-dock__prev span { display: none; }
	.lp-dock__go { padding: 0 16px; font-size: 15px; }
	.lp-next, .lp-buy { margin-top: 20px; padding: 18px 16px; border-radius: 18px; }
	.lp .lp-next h2, .lp .lp-buy h2 { font-size: 18px; }
	.lp-next__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.lp-buy { display: block; }
	.lp-buy__cover { float: left; width: 112px; margin: 0 12px 8px 0; }
	.lp-buy__cover img { border-radius: 12px; }
	.lp-buy__facts { clear: both; }
	.lp-buy__actions { justify-content: space-between; }
	.lp-done { padding: 26px 18px 18px; border-radius: 22px; }
	.lp .lp-done h2 { font-size: 20px; }
	.lp-toast { bottom: 84px; }
	.lp-gate { padding: 26px 18px; }
	.lp-writing__head { margin-bottom: 12px; }
	.lp-wsteps { margin-inline: -6px; }
	.lp-wsteps__dot { width: 32px; height: 32px; font-size: 13px; }
	.lp-wsteps__item::before { top: 15px; inset-inline-start: calc(-50% + 20px); inset-inline-end: calc(50% + 20px); }
	.lp-wsteps__label { font-size: 12px; }
	.lp-wsteps__date { font-size: 10.5px; }
	.lp-wstatus { flex-wrap: wrap; padding: 13px 14px; }
	.lp-wstatus__body { flex-basis: calc(100% - 52px); }
	.lp-wturn { margin-inline-start: 52px; }
	.lp-wbox { padding: 14px; }
	.lp-rich { font-size: 16px; }
	.lp-wtabs { display: flex; }
	.lp-wtabs button { flex: 1; justify-content: center; padding: 0 8px; font-size: 13.5px; }
	.lp-wform__foot .lp-btn--go { flex: 1; }
}
