/* Progressive lesson-plan category explorer. Loaded after every theme UI layer. */

:root {
  --qle-ink: #102f3a;
  --qle-muted: #647983;
  --qle-surface: rgba(255, 255, 255, .84);
  --qle-line: rgba(19, 78, 92, .11);
  --qle-shadow: 0 22px 55px rgba(30, 74, 84, .1);
  --qle-ease: cubic-bezier(.16, 1, .3, 1);
}

body.qatreh-lesson-explorer-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.lesson-explorer-launch {
  position: relative;
  z-index: 2;
  margin: clamp(34px, 5vw, 68px) 0 clamp(72px, 8vw, 120px);
}

.lesson-explorer-launch__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
  padding-inline: clamp(4px, 1vw, 12px);
}

.lesson-explorer-launch__head > div:first-child {
  min-width: 0;
  max-width: 720px;
}

.lesson-explorer-launch__head > div:first-child > span,
.lesson-explorer-panel__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #008c74;
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: -.01em;
}

.lesson-explorer-launch__head > div:first-child > span::before,
.lesson-explorer-panel__eyebrow::before {
  width: 18px;
  height: 2px;
  content: "";
  background: currentColor;
  border-radius: 10px;
}

.lesson-explorer-launch__head h2 {
  margin: 7px 0 5px;
  color: var(--qle-ink);
  font-size: clamp(1.38rem, 2.7vw, 2.2rem);
  font-weight: 950;
  line-height: 1.5;
  letter-spacing: -.045em;
}

.lesson-explorer-launch__head p {
  margin: 0;
  color: var(--qle-muted);
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.9;
}

.lesson-explorer-launch__hint {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  color: #55717a;
  font-size: .7rem;
  font-weight: 850;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(20, 90, 102, .09);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(34, 84, 93, .06);
}

.lesson-explorer-launch__hint i {
  position: relative;
  width: 8px;
  height: 8px;
  background: #15c6a2;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(21, 198, 162, .12);
}

.lesson-explorer-launch__hint i::after {
  position: absolute;
  inset: -5px;
  content: "";
  border: 1px solid rgba(21, 198, 162, .38);
  border-radius: inherit;
  animation: qle-pulse 2.2s ease-out infinite;
}

.lesson-explorer-list,
.lesson-explorer-panel__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.lesson-explorer-row {
  --qle-accent: 23, 190, 159;
  --qle-deep: #087e6c;
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto 42px;
  align-items: center;
  width: 100%;
  min-height: 106px;
  gap: 18px;
  box-sizing: border-box;
  padding: 12px 18px 12px 14px;
  overflow: hidden;
  color: var(--qle-ink) !important;
  text-align: right;
  text-decoration: none !important;
  background:
    linear-gradient(110deg, rgba(var(--qle-accent), .1), rgba(255, 255, 255, .9) 35%, rgba(255, 255, 255, .78)) !important;
  border: 1px solid rgba(var(--qle-accent), .22) !important;
  border-radius: 25px;
  box-shadow: 0 13px 34px rgba(27, 78, 88, .07);
  cursor: pointer;
  isolation: isolate;
  appearance: none;
  transition: transform .34s var(--qle-ease), border-color .34s ease, box-shadow .34s ease, background .34s ease;
}
.lesson-explorer-row[style*="--lesson-category-color"] { border-color: color-mix(in srgb, var(--lesson-category-color) 32%, transparent); }
.lesson-explorer-row[style*="--lesson-category-color"] .lesson-explorer-row__visual { color: var(--lesson-category-color); background: color-mix(in srgb, var(--lesson-category-color) 14%, white); }

.lesson-explorer-row::before {
  position: absolute;
  z-index: -1;
  top: -120%;
  left: -12%;
  width: 32%;
  height: 330%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
  opacity: 0;
  transform: rotate(17deg) translateX(-180%);
  transition: transform .8s var(--qle-ease), opacity .2s ease;
}

.lesson-explorer-row::after {
  position: absolute;
  z-index: -2;
  inset: auto -40px -70px auto;
  width: 160px;
  height: 160px;
  content: "";
  background: rgb(var(--qle-accent));
  border-radius: 50%;
  opacity: .07;
  filter: blur(4px);
}

.lesson-explorer-row:hover,
.lesson-explorer-row:focus-visible {
  border-color: rgba(var(--qle-accent), .46) !important;
  box-shadow: 0 22px 46px rgba(23, 76, 87, .13), 0 0 0 4px rgba(var(--qle-accent), .07);
  outline: none;
  transform: translateY(-3px) scale(1.006);
}

.lesson-explorer-row:hover::before,
.lesson-explorer-row:focus-visible::before {
  opacity: 1;
  transform: rotate(17deg) translateX(520%);
}

.lesson-explorer-row:active {
  transform: translateY(0) scale(.995);
}

.lesson-explorer-row.is-tone-blue { --qle-accent: 78, 145, 255; --qle-deep: #326dcf; }
.lesson-explorer-row.is-tone-purple { --qle-accent: 158, 112, 246; --qle-deep: #7546c9; }
.lesson-explorer-row.is-tone-pink { --qle-accent: 239, 105, 153; --qle-deep: #c83e72; }
.lesson-explorer-row.is-tone-gold { --qle-accent: 229, 162, 44; --qle-deep: #9f6d13; }

.lesson-explorer-row__visual {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  overflow: hidden;
  color: var(--qle-deep);
  background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(var(--qle-accent), .2));
  border: 1px solid rgba(var(--qle-accent), .23);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 22px rgba(var(--qle-accent), .12);
  transform: rotate(-2deg);
  transition: transform .42s var(--qle-ease);
}

.lesson-explorer-row:hover .lesson-explorer-row__visual,
.lesson-explorer-row:focus-visible .lesson-explorer-row__visual {
  transform: rotate(3deg) scale(1.07);
}

.lesson-explorer-row__visual b {
  font-size: 1.75rem;
  line-height: 1;
}

.lesson-explorer-row__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-explorer-row__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.lesson-explorer-row__copy small {
  color: var(--qle-deep) !important;
  font-size: .64rem;
  font-weight: 900;
}

.lesson-explorer-row__copy strong {
  color: var(--qle-ink) !important;
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  font-weight: 950;
  line-height: 1.55;
}

.lesson-explorer-row__copy > span {
  display: -webkit-box;
  max-width: 720px;
  overflow: hidden;
  color: var(--qle-muted);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lesson-explorer-row__count {
  display: grid;
  min-width: 78px;
  place-items: center;
  align-content: center;
  gap: 0;
  padding: 8px 13px;
  color: var(--qle-deep);
  background: rgba(var(--qle-accent), .09);
  border: 1px solid rgba(var(--qle-accent), .16);
  border-radius: 16px;
}

.lesson-explorer-row__count b {
  color: inherit !important;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.25;
}

.lesson-explorer-row__count small {
  color: inherit !important;
  font-size: .58rem;
  font-weight: 850;
  opacity: .82;
}

.lesson-explorer-row__arrow {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  background: rgb(var(--qle-accent));
  border-radius: 13px;
  box-shadow: 0 9px 18px rgba(var(--qle-accent), .23);
  transition: transform .38s var(--qle-ease);
}

.lesson-explorer-row:hover .lesson-explorer-row__arrow,
.lesson-explorer-row:focus-visible .lesson-explorer-row__arrow {
  transform: translateX(-5px);
}

.lesson-explorer-row--all {
  font: inherit;
  border-style: dashed !important;
}

.lesson-explorer-overlay[hidden] {
  display: none !important;
}

.lesson-explorer-overlay {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  direction: rtl;
  isolation: isolate;
}

.lesson-explorer-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(7, 27, 39, .43);
  border: 0;
  opacity: 0;
  cursor: default;
  backdrop-filter: blur(0) saturate(110%);
  -webkit-backdrop-filter: blur(0) saturate(110%);
  transition: opacity .48s ease, backdrop-filter .62s var(--qle-ease), -webkit-backdrop-filter .62s var(--qle-ease);
}

.lesson-explorer-overlay.is-ready .lesson-explorer-backdrop {
  opacity: 1;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.lesson-explorer-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  width: min(1120px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  height: min(900px, calc(100dvh - 32px));
  min-height: min(620px, calc(100vh - 44px));
  min-height: min(620px, calc(100dvh - 44px));
  max-height: min(900px, calc(100vh - 32px));
  max-height: min(900px, calc(100dvh - 32px));
  box-sizing: border-box;
  overflow: hidden;
  color: var(--qle-ink);
  background:
    radial-gradient(circle at 92% 0, rgba(87, 233, 201, .19), transparent 27%),
    radial-gradient(circle at 4% 105%, rgba(154, 116, 250, .13), transparent 30%),
    rgba(250, 254, 253, .94);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 34px;
  box-shadow: 0 42px 100px rgba(0, 22, 34, .28), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0;
  transform: translateY(18px) scale(.97);
  transform-origin: center;
  transition: opacity .38s ease, transform .5s var(--qle-ease);
}

.lesson-explorer-overlay.is-ready .lesson-explorer-panel {
  opacity: 1;
  transform: none;
}

.lesson-explorer-panel:focus {
  outline: none;
}

.lesson-explorer-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--qle-line);
}

.lesson-explorer-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 7px;
  padding: 7px 12px;
  color: #31505b;
  font: inherit;
  font-size: .71rem;
  font-weight: 900;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(22, 78, 90, .11);
  border-radius: 13px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.lesson-explorer-tool:hover,
.lesson-explorer-tool:focus-visible {
  color: #007d69;
  background: #fff;
  outline: 3px solid rgba(18, 193, 157, .13);
  transform: translateY(-1px);
}

.lesson-explorer-tool:disabled {
  opacity: .32;
  cursor: not-allowed;
  transform: none;
}

.lesson-explorer-tool--back > span:first-child {
  font-size: 1rem;
}

.lesson-explorer-tool--close {
  width: 40px;
  padding: 0;
  color: #824356;
  font-size: 1.45rem;
  line-height: 1;
  background: rgba(255, 237, 242, .82);
}

.lesson-explorer-crumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.lesson-explorer-crumbs::-webkit-scrollbar {
  display: none;
}

.lesson-explorer-crumbs button,
.lesson-explorer-crumbs span {
  flex: 0 0 auto;
}

.lesson-explorer-crumbs button {
  padding: 5px 8px;
  color: #617680;
  font: inherit;
  font-size: .66rem;
  font-weight: 850;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.lesson-explorer-crumbs button:hover,
.lesson-explorer-crumbs button:focus-visible {
  color: #007e69;
  background: rgba(19, 192, 156, .09);
  outline: none;
}

.lesson-explorer-crumbs span {
  color: #9aabb1;
  font-size: .67rem;
}

.lesson-explorer-crumbs button[aria-current="page"] {
  color: var(--qle-ink);
  cursor: default;
}

.lesson-explorer-panel__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(18px, 3vw, 28px) clamp(20px, 4vw, 38px) 16px;
}

.lesson-explorer-panel__head > div {
  min-width: 0;
}

.lesson-explorer-panel__head h2 {
  margin: 5px 0 2px;
  color: var(--qle-ink) !important;
  font-size: clamp(1.32rem, 2.7vw, 2.05rem);
  font-weight: 950;
  line-height: 1.45;
  letter-spacing: -.04em;
}

.lesson-explorer-panel__head p {
  margin: 0;
  color: var(--qle-muted) !important;
  font-size: .76rem;
  font-weight: 650;
  line-height: 1.8;
}

.lesson-explorer-panel__count {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #087c69;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(21, 195, 157, .1);
  border: 1px solid rgba(21, 195, 157, .17);
  border-radius: 999px;
}

.lesson-explorer-status {
  margin: 0 clamp(20px, 4vw, 38px) 10px;
  padding: 10px 13px;
  color: #a04d26;
  font-size: .72rem;
  font-weight: 800;
  background: #fff5ed;
  border: 1px solid #f7d7c4;
  border-radius: 13px;
}

.lesson-explorer-panel__body {
  align-content: start;
  min-width: 0;
  min-height: 0;
  padding: 5px clamp(20px, 4vw, 38px) clamp(24px, 4vw, 38px);
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(18, 166, 139, .34) transparent;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.lesson-explorer-panel__body::-webkit-scrollbar {
  width: 8px;
}

.lesson-explorer-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.lesson-explorer-panel__body::-webkit-scrollbar-thumb {
  background: rgba(18, 166, 139, .3);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.lesson-explorer-panel__body.is-switching > * {
  animation: qle-exit .18s ease both;
}

.lesson-explorer-skeleton {
  display: grid;
  grid-template-columns: 76px 1fr 100px;
  align-items: center;
  min-height: 104px;
  gap: 17px;
  padding: 12px 17px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(27, 82, 93, .08);
  border-radius: 24px;
}

.lesson-explorer-skeleton span {
  display: block;
  min-height: 13px;
  background: linear-gradient(90deg, rgba(112, 144, 151, .1), rgba(255, 255, 255, .9), rgba(112, 144, 151, .1));
  background-size: 220% 100%;
  border-radius: 999px;
  animation: qle-shimmer 1.15s linear infinite;
}

.lesson-explorer-skeleton span:first-child {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

.lesson-explorer-skeleton span:nth-child(2) {
  width: min(390px, 80%);
}

.lesson-explorer-skeleton span:last-child {
  width: 78px;
}

.lesson-explorer-product {
  position: relative;
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr) 150px;
  align-items: stretch;
  min-height: 142px;
  overflow: hidden;
  background: rgba(255, 255, 255, .79);
  border: 1px solid rgba(20, 78, 90, .1);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(31, 74, 82, .065);
  transition: border-color .3s ease, box-shadow .3s ease, transform .34s var(--qle-ease);
}

.lesson-explorer-product:hover,
.lesson-explorer-product:focus-within {
  border-color: rgba(26, 184, 153, .32);
  box-shadow: 0 20px 42px rgba(30, 75, 83, .11);
  transform: translateY(-2px);
}

.lesson-explorer-product__media {
  position: relative;
  display: grid;
  min-height: 142px;
  place-items: center;
  overflow: hidden;
  color: #147a69;
  text-decoration: none !important;
  background: linear-gradient(145deg, rgba(107, 232, 205, .22), rgba(196, 247, 235, .46));
}

.lesson-explorer-product:nth-child(4n + 2) .lesson-explorer-product__media { color: #5a55b8; background: linear-gradient(145deg, rgba(137, 148, 255, .2), rgba(230, 226, 255, .5)); }
.lesson-explorer-product:nth-child(4n + 3) .lesson-explorer-product__media { color: #a84569; background: linear-gradient(145deg, rgba(255, 156, 190, .2), rgba(255, 229, 237, .54)); }
.lesson-explorer-product:nth-child(4n) .lesson-explorer-product__media { color: #9b6914; background: linear-gradient(145deg, rgba(246, 194, 87, .2), rgba(255, 245, 215, .56)); }

.lesson-explorer-product__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s var(--qle-ease);
}

.lesson-explorer-product:hover .lesson-explorer-product__media > img {
  transform: scale(1.055);
}

.lesson-explorer-product__media > span {
  font-size: 2.35rem;
}

.lesson-explorer-product__media > b {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 5px 8px;
  color: #fff !important;
  font-size: .58rem;
  font-weight: 950;
  background: #08a987;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(3, 127, 101, .22);
}

.lesson-explorer-product__copy {
  min-width: 0;
  align-self: center;
  padding: 17px 20px;
}

.lesson-explorer-product__meta,
.lesson-explorer-product__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lesson-explorer-product__meta span,
.lesson-explorer-product__tags span {
  padding: 4px 7px;
  color: #5a717a;
  font-size: .56rem;
  font-weight: 850;
  background: rgba(91, 126, 136, .07);
  border: 1px solid rgba(45, 89, 100, .08);
  border-radius: 999px;
}

.lesson-explorer-product__copy h3 {
  margin: 7px 0 3px;
  font-size: clamp(.92rem, 1.6vw, 1.08rem);
  font-weight: 950;
  line-height: 1.6;
}

.lesson-explorer-product__copy h3 a {
  color: var(--qle-ink) !important;
  text-decoration: none !important;
}

.lesson-explorer-product__copy h3 a:hover,
.lesson-explorer-product__copy h3 a:focus-visible {
  color: #008c73 !important;
  outline: none;
}

.lesson-explorer-product__copy p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--qle-muted) !important;
  font-size: .67rem;
  font-weight: 600;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lesson-explorer-product__actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
  border-right: 1px solid rgba(22, 78, 90, .08);
}

.lesson-explorer-product__actions > strong {
  color: #0b7c68 !important;
  font-size: .75rem;
  font-weight: 950;
  text-align: center;
}

.lesson-explorer-product__actions > strong :is(ins, del) {
  text-decoration-thickness: 1px;
}

.lesson-explorer-product__actions > strong ins {
  text-decoration: none;
}

.lesson-explorer-product__actions > a,
.lesson-explorer-more,
.lesson-explorer-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 7px;
  padding: 8px 12px;
  color: #fff !important;
  font: inherit;
  font-size: .66rem;
  font-weight: 950;
  text-align: center;
  text-decoration: none !important;
  background: linear-gradient(135deg, #0dbd9a, #07866f);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 10px 22px rgba(6, 153, 123, .18);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.lesson-explorer-product__actions > a:hover,
.lesson-explorer-product__actions > a:focus-visible,
.lesson-explorer-more:hover,
.lesson-explorer-more:focus-visible,
.lesson-explorer-retry:hover,
.lesson-explorer-retry:focus-visible {
  outline: 3px solid rgba(15, 185, 150, .2);
  box-shadow: 0 13px 27px rgba(6, 153, 123, .25);
  transform: translateY(-2px);
}

.lesson-explorer-more-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 2px;
}

.lesson-explorer-more {
  min-width: 210px;
}

.lesson-explorer-more[disabled] {
  opacity: .55;
  cursor: progress;
  transform: none;
}

.lesson-explorer-empty,
.lesson-explorer-error {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 30px;
  color: var(--qle-muted);
  text-align: center;
  background: rgba(255, 255, 255, .6);
  border: 1px dashed rgba(30, 96, 108, .16);
  border-radius: 25px;
}

.lesson-explorer-empty > span,
.lesson-explorer-error > span {
  color: #21ae92;
  font-size: 2.2rem;
}

.lesson-explorer-empty h3,
.lesson-explorer-error h3 {
  margin: 0;
  color: var(--qle-ink) !important;
  font-size: 1rem;
  font-weight: 950;
}

.lesson-explorer-empty p,
.lesson-explorer-error p {
  max-width: 430px;
  margin: 0;
  color: var(--qle-muted) !important;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.9;
}

.lesson-explorer-retry {
  margin-top: 9px;
}

html[data-qatreh-theme="dark"] {
  --qle-ink: #f2fbff;
  --qle-muted: #adc1c9;
  --qle-surface: rgba(13, 34, 48, .9);
  --qle-line: rgba(185, 224, 232, .12);
}

html[data-qatreh-theme="dark"] .lesson-explorer-launch__hint {
  color: #b7cbd2;
  background: rgba(18, 45, 61, .72);
  border-color: rgba(183, 226, 235, .1);
}

html[data-qatreh-theme="dark"] .lesson-explorer-row {
  background: linear-gradient(110deg, rgba(var(--qle-accent), .14), rgba(15, 39, 53, .93) 40%, rgba(10, 29, 42, .94)) !important;
  border-color: rgba(var(--qle-accent), .22) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}

html[data-qatreh-theme="dark"] .lesson-explorer-row__visual {
  background: linear-gradient(145deg, rgba(29, 59, 73, .95), rgba(var(--qle-accent), .18));
  border-color: rgba(var(--qle-accent), .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 23px rgba(0, 0, 0, .13);
}

html[data-qatreh-theme="dark"] .lesson-explorer-panel {
  color: var(--qle-ink);
  background:
    radial-gradient(circle at 92% 0, rgba(50, 211, 178, .13), transparent 27%),
    radial-gradient(circle at 4% 105%, rgba(149, 105, 245, .11), transparent 30%),
    rgba(10, 29, 42, .96);
  border-color: rgba(194, 234, 241, .13);
  box-shadow: 0 42px 110px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
}

html[data-qatreh-theme="dark"] .lesson-explorer-tool,
html[data-qatreh-theme="dark"] .lesson-explorer-product,
html[data-qatreh-theme="dark"] .lesson-explorer-empty,
html[data-qatreh-theme="dark"] .lesson-explorer-error,
html[data-qatreh-theme="dark"] .lesson-explorer-skeleton {
  color: #d8e8ed;
  background: rgba(19, 47, 62, .78);
  border-color: rgba(190, 226, 234, .1);
}

html[data-qatreh-theme="dark"] .lesson-explorer-tool--close {
  color: #ffc0d0;
  background: rgba(121, 46, 69, .25);
}

html[data-qatreh-theme="dark"] .lesson-explorer-product__actions {
  border-right-color: rgba(190, 226, 234, .09);
}

html[data-qatreh-theme="dark"] .lesson-explorer-product__meta span,
html[data-qatreh-theme="dark"] .lesson-explorer-product__tags span {
  color: #c1d3d9;
  background: rgba(187, 220, 228, .07);
  border-color: rgba(187, 220, 228, .08);
}

html[data-qatreh-theme="dark"] .lesson-explorer-status {
  color: #ffd5c1;
  background: rgba(126, 60, 32, .34);
  border-color: rgba(244, 166, 125, .22);
}

@keyframes qle-pulse {
  from { opacity: .8; transform: scale(.6); }
  to { opacity: 0; transform: scale(1.8); }
}

@keyframes qle-shimmer {
  to { background-position: -220% 0; }
}

@keyframes qle-exit {
  to { opacity: 0; transform: translateY(7px); }
}

@media (max-width: 760px) {
  .lesson-explorer-launch {
    margin-top: 30px;
  }

  .lesson-explorer-launch__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .lesson-explorer-launch__hint {
    align-self: flex-start;
  }

  .lesson-explorer-row {
    grid-template-columns: 68px minmax(0, 1fr) auto 34px;
    min-height: 92px;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 21px;
  }

  .lesson-explorer-row__visual {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .lesson-explorer-row__visual b {
    font-size: 1.45rem;
  }

  .lesson-explorer-row__count {
    min-width: 58px;
    padding: 7px 8px;
    border-radius: 13px;
  }

  .lesson-explorer-row__arrow {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  .lesson-explorer-overlay {
    padding: max(7px, env(safe-area-inset-top)) max(7px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
  }

  .lesson-explorer-panel {
    width: 100%;
    height: calc(100vh - 14px);
    height: calc(100dvh - 14px);
    min-height: 0;
    max-height: none;
    border-radius: 26px;
  }

  .lesson-explorer-toolbar {
    min-height: 58px;
    gap: 8px;
    padding: 8px 11px;
  }

  .lesson-explorer-tool {
    min-height: 38px;
    padding-inline: 10px;
  }

  .lesson-explorer-panel__head {
    align-items: flex-start;
    padding: 16px 15px 12px;
  }

  .lesson-explorer-panel__head p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .lesson-explorer-panel__count {
    margin-top: 18px;
  }

  .lesson-explorer-panel__body {
    padding: 4px 12px max(20px, env(safe-area-inset-bottom));
  }

  .lesson-explorer-status {
    margin-inline: 12px;
  }

  .lesson-explorer-product {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 124px;
  }

  .lesson-explorer-product__media {
    min-height: 124px;
  }

  .lesson-explorer-product__copy {
    padding: 13px 14px;
  }

  .lesson-explorer-product__copy p {
    -webkit-line-clamp: 1;
  }

  .lesson-explorer-product__actions {
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    padding: 10px 12px;
    border-top: 1px solid rgba(22, 78, 90, .08);
    border-right: 0;
  }

  .lesson-explorer-product__actions > a {
    min-height: 36px;
  }
}

@media (max-width: 480px) {
  .lesson-explorer-launch__head h2 {
    font-size: 1.25rem;
  }

  .lesson-explorer-launch__head p {
    font-size: .73rem;
  }

  .lesson-explorer-row {
    grid-template-columns: 58px minmax(0, 1fr) 30px;
    gap: 9px;
    min-height: 84px;
    padding: 9px 10px;
    border-radius: 19px;
  }

  .lesson-explorer-row__visual {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .lesson-explorer-row__copy strong {
    font-size: .9rem;
  }

  .lesson-explorer-row__copy > span {
    font-size: .62rem;
    line-height: 1.65;
  }

  .lesson-explorer-row__count {
    display: none;
  }

  .lesson-explorer-row__arrow {
    width: 29px;
    height: 29px;
    font-size: .88rem;
    border-radius: 10px;
  }

  .lesson-explorer-tool--back > span:last-child {
    display: none;
  }

  .lesson-explorer-tool--back {
    width: 39px;
    padding: 0;
  }

  .lesson-explorer-crumbs button {
    font-size: .59rem;
  }

  .lesson-explorer-panel__head {
    gap: 8px;
  }

  .lesson-explorer-panel__head h2 {
    font-size: 1.22rem;
  }

  .lesson-explorer-panel__count {
    display: none !important;
  }

  .lesson-explorer-product {
    grid-template-columns: 88px minmax(0, 1fr);
    border-radius: 19px;
  }

  .lesson-explorer-product__media {
    min-height: 112px;
  }

  .lesson-explorer-product__copy {
    padding: 11px;
  }

  .lesson-explorer-product__copy h3 {
    margin-top: 5px;
    font-size: .82rem;
  }

  .lesson-explorer-product__copy p,
  .lesson-explorer-product__tags {
    display: none;
  }

  .lesson-explorer-product__actions > strong {
    font-size: .67rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lesson-explorer-launch__hint i::after,
  .lesson-explorer-skeleton span {
    animation: none !important;
  }

  .lesson-explorer-row,
  .lesson-explorer-row::before,
  .lesson-explorer-row__visual,
  .lesson-explorer-row__arrow,
  .lesson-explorer-overlay *,
  .lesson-explorer-product {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
