/* AI Explorers. Illustrations stay decorative and all captions are live text. */
.ex-picker-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 38px);
  padding: clamp(12px, 2vw, 24px);
  border: 2px solid #fff;
  border-radius: 26px;
  background: linear-gradient(115deg, #fff9e9 0%, #fff 58%, #e7f4ff);
  color: #152653;
  box-shadow: 0 8px 26px #1e40661c;
}
.ex-picker-art {
  display: block;
  flex: 0 1 auto;
  width: clamp(145px, 23%, 265px);
  height: auto;
  aspect-ratio: 552 / 308;
  border-radius: 15px;
  object-fit: cover;
}
.ex-picker-head > div { flex: 1 1 220px; min-width: 0; }
.ex-picker-head h1 { margin: 0; font: 650 clamp(28px, 4vw, 54px)/1.05 "Fredoka", var(--head); overflow-wrap: anywhere; }
.ex-picker-head p { margin: 8px 0 0; color: #36496c; font-size: clamp(15px, 1.3vw, 19px); }
.ex-change-subject { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 15px; color: #16498a; background: #fff; border: 2px solid #c1d8ee; border-radius: 30px; font-weight: 800; text-decoration: none; }
.ex-change-subject:hover { border-color: #276cad; }

.ex-level-grid, .ep5 .ep-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(12px, 1.5vw, 22px);
}
.ex-level-grid { margin-top: clamp(15px, 2vw, 25px); }
.ex-level-card {
  --level-accent: #884011;
  --level-tint: #fff0cd;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 0 0 18px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 23px;
  background: #fff;
  color: #13275a;
  text-decoration: none;
  box-shadow: 0 2px 0 #c7d9e5, 0 8px 24px #17325518;
}
.ex-level-junior { --level-accent: #14599c; --level-tint: #e1f2ff; }
.ex-level-future { --level-accent: #613497; --level-tint: #f0e9ff; }
.ex-level-card:hover { border-color: var(--level-accent); }
.ex-level-card.ex-current { border-color: var(--level-accent); box-shadow: 0 0 0 1px var(--level-accent), 0 8px 24px #17325518; }
.ex-level-card:focus-visible, .ex-change-subject:focus-visible, .ex-progress-subject:focus-visible,
.h3 .hm-s3:focus-visible, .bigsub:focus-visible, .s4 .ls2-sub:focus-visible {
  outline: 3px solid #143f79;
  outline-offset: 3px;
}
.ex-level-scene { width: 100%; height: auto; aspect-ratio: 552 / 308; display: block; object-fit: cover; border-bottom: 4px solid var(--level-tint); }
.ex-level-card > :not(img) { margin-inline: clamp(12px, 1.7vw, 23px); }
.ex-level-card > .ex-level-name, .ex-level-intro { margin-top: 4px; }
.ex-level-name { display: block; font: 650 clamp(21px, 2vw, 29px)/1.08 "Fredoka", var(--head); overflow-wrap: anywhere; }
.ex-level-intro { display: grid; gap: 6px; }
.ex-level-intro small { color: #405170; font-size: 14px; font-weight: 750; }
.ex-level-intro em { color: var(--level-accent); font-style: normal; }
.ex-level-tier { padding: 4px 10px; border-radius: 20px; color: var(--level-accent); background: var(--level-tint); font-size: 14px; font-weight: 800; }
.ex-level-details { display: grid; gap: 5px; color: #364968; font-size: clamp(14px, 1.2vw, 17px); }
.ex-level-details > span { display: flex; align-items: center; gap: 8px; }
.ex-level-details svg { flex: none; width: 21px; height: 21px; }
.ex-level-desc { color: #364968; font-size: 15px; line-height: 1.4; }
.ex-level-button {
  display: inline-flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 14px;
  color: white;
  background: var(--level-accent);
  font: 600 17px/1.15 "Fredoka", var(--head);
}
.ex-level-button svg { width: 19px; height: 19px; fill: currentColor; }
.bigsub .ex-subject-art { height: auto; aspect-ratio: 552 / 308; }
.bigsub .ex-subject-art img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; filter: none; }
.bigsub .bs-go { background: #204e85; }
.h3 .hm-srow { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.h3 .hm-s3 { display: flex; flex-direction: column; background: white; }
.h3 .hm-s3 img { width: 100%; height: auto; aspect-ratio: 552 / 308; object-fit: cover; }
.h3 .hm-s3 .hm-sl {
  position: static;
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 0;
  background: #fff;
}
.h3 .hm-s3 .hm-sl b { white-space: normal; overflow-wrap: anywhere; overflow: visible; font-size: clamp(14px, 1.05vw, 17px); line-height: 1.15; }
.h3 .hm-s3 .hm-sl svg { width: 16px; height: 16px; }

.ls2-subs.s4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s4 .ls2-sub .ls2-art img { aspect-ratio: 552 / 308 !important; }
.s4 .ls2-sub[hidden], .ex-sub-empty[hidden] { display: none !important; }
.s4 .ls2-sub.s3 .s3-n { overflow-wrap: anywhere; color: #172d52; line-height: 1.15; font-size: clamp(17px, 1.5vw, 22px); }
.ex-sub-empty { text-align: center; padding: 14px; color: #374968; }
.ex-progress-subject { display: grid; grid-template-columns: minmax(90px, 40%) minmax(0, 1fr); align-items: center; gap: 12px; color: #182e55; text-decoration: none; background: #fff; padding: 10px; }
.ex-progress-subject img { display: block; width: 100%; height: auto; aspect-ratio: 552 / 308; object-fit: cover; border-radius: 12px; }
.ex-progress-copy { display: grid; gap: 4px; min-width: 0; padding-block: 4px; }
.ex-progress-copy b { font: 650 clamp(17px, 1.5vw, 23px)/1.12 "Fredoka", var(--head); overflow-wrap: anywhere; }
.ex-progress-copy small { color: #415272; line-height: 1.3; }
.sl3.sl-card .sl-rows { margin-top: 2px; }

@media (max-width: 820px) {
  .ex-level-grid, .ep5 .ep-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); }
  .h3 .hm-srow, .ls2-subs.s4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .ex-level-grid, .ep5 .ep-row { grid-template-columns: minmax(0, 1fr); }
  .ex-picker-head { row-gap: 12px; }
  .ex-picker-head > div { flex: 1 1 140px; }
  .ex-picker-art { width: 32%; }
  .ex-picker-head h1 { font-size: 25px; }
  .ex-picker-head p { margin-top: 5px; font-size: 14px; }
  .ex-level-card { gap: 9px; }
}
.dh2 .dh2-art.ex-course-scene {
  align-self: center;
  width: min(38%, 430px);
  height: auto;
  margin: 18px;
  border-radius: 17px;
  aspect-ratio: 552 / 308;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 640px) {
  .dh2 .dh2-art.ex-course-scene { order: -1; width: 100%; margin: 0; border-radius: 0; }
}
