:root, :host {
  --primary: #4c57c1;
  --primary-rgb: 48,61,161;
  --ink: #202855;
  --ink-soft: #545f80;
  --page: #f4f6fd;
  --surface: #ffffff;
  --muted: #f6f8fe;
  --line: #dee3f0;
  --line-strong: #d4daea;
  --panel-height: 555px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--page);
}

body, :host {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  direction: rtl;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% -8%, rgba(var(--primary-rgb), .055), transparent 31rem),
    var(--page);
  font-family: IRANSans;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

:host {
  display: block;
  min-height: 0;
  background: transparent;
  line-height: normal;
  color-scheme: light;
}

body.has-dialog { overflow: hidden; }

dialog.dialog {
  margin: 0;
  border: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: transparent;
  color: inherit;
}

dialog.dialog::backdrop { background: transparent; }

button,
input,
a { font: inherit; }

button { cursor: pointer; }

a {
  color: inherit;
  text-decoration: none;
}

svg { display: block; }

[hidden] { display: none !important; }

button:focus-visible,
input:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(var(--primary-rgb), .2);
  outline-offset: 2px;
}

.prototype-shell {
  width: min(100%, 1400px);
  margin-inline: auto;
  padding: 18px;
}

.guide-stage { width: 100%; }

.guide-app {
  min-height: 650px;
  padding: 2px;
}

/* Category navigation */
.category-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 12px;
  padding: 14px;
  overflow: visible;
  border: 1px solid #e4e8f3;
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 6px 20px rgba(36, 44, 100, .035);
}

.category-tab {
  display: inline-flex;
  width: auto;
  min-width: max-content;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px 5px 15px;
  border: 1px solid rgba(var(--primary-rgb), .17);
  border-radius: 100px;
  color: #434d6e;
  background: rgba(var(--primary-rgb), .025);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}

.category-tab__icon {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: var(--primary);
  background: transparent;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}

.category-tab__icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.category-tab:hover {
  color: #2c388e;
  border-color: rgba(var(--primary-rgb), .42);
  background: rgba(var(--primary-rgb), .095);
  box-shadow: none;
  transform: translateY(-1px);
}

.category-tab.is-active {
  color: #2a3482;
  border-color: rgba(var(--primary-rgb), 1);
  background: rgba(var(--primary-rgb), .1);
  font-weight: 700;
}

.category-tab.is-active:hover {
  border-color: rgba(var(--primary-rgb), 1);
  background: rgba(var(--primary-rgb), .1);
}

.category-tab.is-active .category-tab__icon {
  color: inherit;
  background: transparent;
  box-shadow: none;
}

/* Desktop composition: video left, details center, list right */
.workspace {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(420px, 1fr) minmax(285px, 325px);
  grid-template-areas: "video details list";
  gap: 12px;
  align-items: start;
}

.workspace > * {
  direction: rtl;
  min-width: 0;
}

.video-column { grid-area: video; }
.details-column { grid-area: details; }
.list-column { grid-area: list; }

.panel {
  height: var(--panel-height);
  min-height: 0;
  overflow: hidden;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(36, 44, 100, .035);
}

/* Lesson list */
.list-panel {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
}

.list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  padding-inline: 2px;
}

.list-heading__copy {
  display: grid;
  gap: 1px;
}

.list-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.list-heading small,
.list-count {
  color: var(--ink-soft);
  font-size: 10px;
}

.list-count {
  flex: 0 0 auto;
  padding-bottom: 2px;
  font-weight: 500;
}

.search-box,
.selector-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--muted);
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}

.search-box:focus-within,
.selector-search:focus-within {
  border-color: rgba(var(--primary-rgb), .48);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .07);
}

.search-box svg,
.selector-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.search-box input,
.selector-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 9px 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  text-align: right;
}

input::placeholder { color: #828caa; }

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="search"]::-ms-clear { display: none; }

.search-clear {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #5c6788;
  background: #e6eaf5;
  font-size: 16px;
  line-height: 1;
}

.search-clear:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .1);
}

.lesson-list {
  direction: ltr;
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  padding-block: 5px;
  padding-inline: 5px;
  overflow: auto;
  border-top: 1px solid var(--line);
  overscroll-behavior: contain;
  scrollbar-color: rgba(var(--primary-rgb), .27) transparent;
  scrollbar-width: thin;
}

.lesson-list::-webkit-scrollbar,
.selector-items::-webkit-scrollbar { width: 5px; }

.lesson-list::-webkit-scrollbar-thumb,
.selector-items::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(var(--primary-rgb), .27);
}

.lesson-row {
  position: relative;
  direction: rtl;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  padding: 7px 8px 7px 15px;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  overflow: hidden;
  text-align: right;
  transition: color .16s var(--ease), background .16s var(--ease);
}

.lesson-row::after {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 3px;
  background: transparent;
  content: "";
}

.lesson-row:hover { background: var(--muted); }

.lesson-row.is-active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .055);
  font-weight: 700;
}

.lesson-row.is-active::after { background: var(--primary); }

.lesson-icon { display: none; }

.lesson-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #667193;
  background: #fff;
  font-size: 9px;
  font-weight: 500;
}

.lesson-row.is-active .lesson-index {
  border-color: rgba(var(--primary-rgb), .28);
  color: var(--primary);
  background: #fff;
}

.lesson-row__title {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-duration {
  flex: 0 0 auto;
  color: #6a7597;
  direction: ltr;
  font-size: 9px;
  font-weight: 400;
}

.empty-state {
  display: grid;
  min-height: 105px;
  place-items: center;
  padding: 20px 10px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

/* Details */
.details-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 1.8vw, 25px);
}

.details-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.category-badge svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.lesson-position {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 400;
}

.lesson-title {
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;
  margin: 21px 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: -.01em;
}

.lesson-description {
  max-width: 720px;
  color: #434d6e;
  font-size: 14px;
  line-height: 2;
}

.lesson-description p { margin: 0 0 8px; }
.lesson-description p:last-child { margin-bottom: 0; }

.details-actions {
  display: flex;
  align-items: stretch;
  gap: 9px;
  margin-top: auto;
  padding-top: 20px;
}

.action-button {
  display: inline-flex;
  flex: 0 1 210px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: color .17s var(--ease), background .17s var(--ease), border-color .17s var(--ease), transform .17s var(--ease);
}

.action-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.action-button:hover { transform: translateY(-1px); }

.action-button--primary {
  color: #fff;
  background: var(--primary);
}

.action-button--primary:hover { background: #404bb3; }

.action-button--secondary {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), .25);
  background: #fff;
}

.action-button--secondary:hover { background: rgba(var(--primary-rgb), .045); }

/* Video preview card */
.video-panel {
  display: flex;
  height: auto;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.video-heading {
  display: flex;
  min-height: 64px;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.video-heading__copy {
  display: grid;
  gap: 1px;
}

.video-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.video-heading small {
  color: var(--ink-soft);
  font-size: 10px;
}

.video-stage {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.video-frame {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: #edf0f9;
  box-shadow: none;
  isolation: isolate;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-frame::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(30, 38, 77, .11));
  content: "";
  pointer-events: none;
}

.video-play {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 50%;
  color: var(--primary);
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 8px 20px rgba(34, 42, 93, .15);
  transform: translate(-50%, -50%);
  transition: transform .28s var(--ease), background .28s var(--ease), box-shadow .28s var(--ease);
}

.video-play::before {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  content: "";
  opacity: 0;
  transform: scale(.82);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  pointer-events: none;
}

.video-play svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.video-frame:hover .video-play,
.video-frame:focus-visible .video-play {
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .14), 0 16px 30px rgba(33, 41, 89, .27);
  transform: translate(-50%, -50%) scale(1.12);
}

.video-frame:hover .video-play::before,
.video-frame:focus-visible .video-play::before {
  opacity: 1;
  transform: scale(1);
}

.video-caption {
  position: absolute;
  z-index: 2;
  inset: auto 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 9px;
  color: #2c3556;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 15px rgba(31, 40, 84, .12);
  backdrop-filter: blur(7px);
  font-size: 10px;
  text-align: right;
}

.video-caption strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-caption small {
  flex: 0 0 auto;
  color: var(--ink-soft);
  direction: ltr;
  font-size: 9px;
}

/* Responsive searchable lesson picker */
.responsive-selector {
  position: relative;
  z-index: 30;
  display: none;
  margin-bottom: 10px;
}

.selector-control {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(320px, 1.2fr);
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(36, 44, 100, .035);
}

.selector-trigger {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: var(--muted);
  text-align: right;
}

.selector-trigger:hover { background: #eff2fa; }

.selector-trigger__main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.selector-trigger__icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .09);
}

.selector-trigger__icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.selector-trigger__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.selector-trigger__copy small {
  color: var(--ink-soft);
  font-size: 9px;
}

.selector-trigger__copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-trigger__arrow {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: var(--primary);
  background: #fff;
  transition: transform .18s var(--ease);
}

.selector-trigger[aria-expanded="true"] .selector-trigger__arrow { transform: rotate(180deg); }

.selector-trigger__arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.selector-search { min-height: 46px; }

.selector-inline {
  margin-top: 6px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(36, 44, 100, .07);
}

.selector-items {
  display: grid;
  max-height: 238px;
  overflow: auto;
}

.selector-item {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #eaedf7;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
}

.selector-item:last-child { border-bottom: 0; }

.selector-item:hover,
.selector-item.is-active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .055);
}

.selector-item small {
  color: inherit;
  direction: ltr;
  font-size: 9px;
  opacity: .7;
}

/* Video dialog */
.dialog {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}

.dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(39, 48, 81, .46);
  backdrop-filter: blur(7px);
}

.dialog__panel {
  position: relative;
  z-index: 1;
  width: min(700px, calc(100vw - 28px));
  max-height: 88vh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 68px rgba(30, 38, 78, .24);
  animation: dialog-in .18s var(--ease) both;
}

.dialog__panel--video {
  width: min(380px, calc(100vw - 28px), calc(56.25dvh - 18px));
  max-height: calc(100dvh - 32px);
  aspect-ratio: 9 / 16;
  border: 0;
  background: var(--primary);
}

.dialog__panel--video::before {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  height: 110px;
  background: linear-gradient(180deg, rgba(24, 32, 63, .55) 0%, rgba(24, 32, 63, .23) 48%, transparent 100%);
  content: "";
  pointer-events: none;
}

.dialog__header {
  position: absolute;
  z-index: 2;
  inset: 12px 18px auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.dialog__label {
  display: inline-flex;
  min-width: 0;
  max-width: calc(100% - 36px);
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: #fff;
  text-shadow: 0 1px 4px rgba(21, 27, 57, .4);
  pointer-events: auto;
}

.dialog__eyebrow {
  flex: 0 0 auto;
  padding-inline-start: 8px;
  border-inline-start: 1px solid rgba(255, 255, 255, .5);
  color: rgba(255, 255, 255, .84);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.dialog__header h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  pointer-events: auto;
  transition: color .18s ease, background-color .18s ease;
}

.icon-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.icon-button:hover {
  color: #c9132b;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(7px);
}

.modal-video {
  position: absolute;
  inset: 0;
}

.modal-video video {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--primary);
  object-fit: cover;
}

.toast {
  position: fixed;
  z-index: 260;
  inset-inline-start: 16px;
  bottom: 16px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 10px 13px;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 28px rgba(var(--primary-rgb), .23);
  font-size: 11px;
  font-weight: 700;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
}

@media (max-width: 1099px) {
  :root, :host { --panel-height: 515px; }

  .prototype-shell { padding: 14px; }
  .desktop-list { display: none; }
  .responsive-selector { display: block; }

  .workspace {
    grid-template-columns: minmax(225px, .78fr) minmax(390px, 1.22fr);
    grid-template-areas: "video details";
    gap: 10px;
  }

  .details-panel { padding: 22px; }
  .lesson-title { margin-top: 17px; margin-bottom: 15px; font-size: 21px; }
  .lesson-description { font-size: 13px; line-height: 2; }
  .details-actions { padding-top: 16px; }
  .action-button { min-height: 42px; font-size: 11px; }
  .video-heading { min-height: 60px; padding-bottom: 9px; }
}

@media (max-width: 759px) {
  :root, :host { --panel-height: auto; }

  .prototype-shell { padding: 8px; }
  .guide-app { padding: 0; }

  .category-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
    padding: 12px;
    overflow: visible;
    border-radius: 14px;
  }

  .category-tab {
    width: 100%;
    min-width: 0;
    min-height: 41px;
    padding: 5px 10px 5px 13px;
    font-size: 10.5px;
    white-space: normal;
  }

  .category-tab__icon { width: 18px; height: 18px; }

  .responsive-selector { margin-bottom: 8px; }

  .selector-control {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 5px;
    border-radius: 12px;
  }

  .selector-trigger,
  .selector-search { min-height: 43px; }

  .selector-trigger__icon { width: 30px; height: 30px; }
  .selector-inline { margin-top: 5px; }
  .selector-items { max-height: 225px; }

  .workspace {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .details-column { order: 1; }
  .video-column { order: 2; }

  .panel { height: auto; }
  .surface { border-radius: 13px; box-shadow: 0 5px 16px rgba(36, 44, 100, .035); }
  .details-panel { min-height: 0; padding: 18px 15px; }
  .details-topline { padding-bottom: 10px; }
  .lesson-title { margin: 14px 0 13px; font-size: 19px; line-height: 1.65; }
  .lesson-description { font-size: 12.5px; line-height: 2; }
  .lesson-description p { margin-bottom: 7px; }

  .details-actions {
    flex-direction: column;
    gap: 6px;
    margin-top: 0;
    padding-top: 15px;
  }

  .action-button {
    width: 100%;
    flex-basis: auto;
    min-height: 42px;
  }

  .video-panel {
    min-height: 0;
    padding: 0;
  }

  .video-heading { min-height: 52px; padding: 7px 12px; }

  .video-stage {
    flex: 0 0 auto;
    height: auto;
  }

  .video-frame { width: 100%; height: auto; }
  .video-caption { inset: auto 10px 10px; }

  .dialog { align-items: center; padding: 10px; }
  .dialog__panel { border-radius: 14px; }
  .dialog__header { inset: 10px 16px auto 10px; }
}

@media (max-width: 380px) {
  .category-tab { gap: 5px; padding: 5px 5px 5px 8px; font-size: 10px; }
  .category-tab__icon { width: 17px; height: 17px; }
  .category-tab__icon svg { width: 14px; height: 14px; }
  .details-panel { padding-inline: 13px; }
  .lesson-title { font-size: 18px; }
  .lesson-description { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
