html:has(#e-learning[open]) { overflow: hidden; }
#e-learning {
  --lesson-ink: #30222e;
  --lesson-muted: #675a60;
  --lesson-accent: #913150;
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: min(900px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  border: 1px solid #e5d9d1;
  border-radius: 22px;
  overflow: hidden;
  text-align: start;
  background: #fffcf8;
  color: var(--lesson-ink);
  box-shadow: 0 28px 110px #21122250;
}
#e-learning[open] { display: flex; flex-direction: column; }
#e-learning :is(.el-parts, .el-answers)[hidden] { display: none; }
#e-learning::backdrop { background: #211924bb; backdrop-filter: blur(5px); }
#e-learning .el-header,
#e-learning .el-actions { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 22px; }
#e-learning .el-format { display: block; margin-bottom: 2px; color: var(--lesson-accent); font-size: 12px; font-weight: 800; }
#e-learning h2 { margin: 0; font-size: clamp(18px, 2.8vw, 26px); line-height: 1.2; letter-spacing: -.04em; color: inherit; }
#e-learning button { font: inherit; cursor: pointer; }
#e-learning .el-close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid #dacbc4; background: #fff; color: inherit; font: 24px/1 Arial, sans-serif;
}
#e-learning .el-close:hover, #e-learning .el-back:hover { background: #faeeea; }
#e-learning button:focus-visible { outline: 3px solid #922e55; outline-offset: 2px; }
#e-learning .el-progress { display: flex; flex: none; gap: 3px; }
#e-learning .el-progress i { display: block; width: 33.334%; height: 3px; background: #e9dfd8; }
#e-learning .el-progress .el-read { background: #b63d64; }
#e-learning .el-viewport { min-height: 0; overflow: auto; overscroll-behavior: contain; }
#e-learning .el-layout { display: grid; grid-template-columns: minmax(190px, .78fr) minmax(0, 1.5fr); }
#e-learning .el-picture { position: relative; overflow: hidden; min-height: 310px; background: #ead5c9; }
#e-learning .el-picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 71% 45%; }
#e-learning .el-content { min-width: 0; padding: clamp(19px, 3.5vw, 32px); }
#e-learning .el-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--lesson-accent); font-size: 12px; font-weight: 800; }
#e-learning .el-count { padding-inline-end: 10px; border-inline-end: 1px solid #decacb; font-variant-numeric: tabular-nums; }
#e-learning h3 { margin: 0; color: inherit; font-size: clamp(24px, 3.6vw, 35px); font-weight: 750; letter-spacing: -.045em; line-height: 1.14; }
#e-learning h3:focus { outline: none; }
#e-learning .el-intro { margin: 12px 0 17px; color: var(--lesson-muted); font-size: 15px; line-height: 1.55; }
#e-learning .el-parts { display: grid; gap: 0; margin: 0; }
#e-learning .el-parts div { border-top: 1px solid #e5dbd4; padding: 9px 0; }
#e-learning .el-parts dt { color: #83334d; font-weight: 800; font-size: 13px; }
#e-learning .el-parts dd { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: var(--lesson-ink); }
#e-learning[data-step="3"] .el-parts dd { font-size: 16px; }
#e-learning .el-answers { display: grid; gap: 8px; }
#e-learning .el-answers button {
  position: relative; display: block; min-height: 45px; padding: 11px 13px 11px 36px;
  background: white; border: 1px solid #ded2cd; border-radius: 12px; text-align: start; color: var(--lesson-ink); font-size: 14px; line-height: 1.45;
}
#e-learning .el-answers button::before {
  content: ""; position: absolute; left: 13px; top: 16px; width: 12px; height: 12px;
  border-radius: 50%; border: 1.5px solid #aa999d; box-sizing: border-box;
}
#e-learning .el-answers button:hover { border-color: #b47988; }
#e-learning .el-answers button[aria-pressed="true"] { border-color: var(--lesson-accent); background: #fcf0f2; }
#e-learning .el-answers button[aria-pressed="true"]::before { border: 4px solid var(--lesson-accent); background: #fff; }
#e-learning .el-feedback { margin: 0; color: #704524; font-size: 14px; line-height: 1.5; }
#e-learning .el-feedback:not(:empty) { margin-top: 12px; padding: 11px 13px; border-inline-start: 3px solid #b16a31; background: #fff2de; border-radius: 0 8px 8px 0; }
#e-learning .el-feedback.el-complete:not(:empty) { color: #125344; border-color: #39856d; background: #e6f3eb; }
#e-learning .el-actions { padding-block: 11px; border-top: 1px solid #e5dbd4; }
#e-learning .el-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; border-radius: 24px; font-size: 14px; font-weight: 750; line-height: 1.25; }
#e-learning .el-actions [hidden] { display: none; }
#e-learning .el-back { background: #fff; color: var(--lesson-ink); border: 1px solid #dacbc4; }
#e-learning .el-next { margin-inline-start: auto; border: 1px solid transparent; color: #fff; background: var(--lesson-ink); }
#e-learning .el-next:hover:not(:disabled) { background: #78344f; }
#e-learning .el-next:disabled { background: #e5dcda; color: #706367; cursor: default; }
#e-learning .el-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 650px), (max-height: 480px) {
  #e-learning { width: min(900px, calc(100% - 14px)); max-height: calc(100dvh - 12px); border-radius: 16px; }
  #e-learning .el-header { padding: 9px 10px 9px 16px; }
  #e-learning .el-layout { display: block; }
  #e-learning .el-picture { min-height: 0; height: clamp(80px, 18dvh, 140px); }
  #e-learning .el-picture img { object-position: 50% 34%; }
  #e-learning:not([data-step="1"]) .el-picture { display: none; }
  #e-learning .el-content { padding: 16px; }
  #e-learning .el-actions { padding: 8px 12px; }
}
@media (max-height: 480px) {
  #e-learning .el-picture { display: none; }
}
