/* ============================================================
   경제 탐험대 — 화면 층 (디자인 시스템 v4 「햇살 든 유자」)

   공용 CSS(crownyuja.co.kr/ds/v3/yuja.css + themes/student.css) 위에 얹는다.
   - 접두는 ec- 만 쓴다. yj- 는 DS 이름공간이라 새로 짓지 않는다(있는 것만 빌려 쓴다).
   - 색·그림자·모서리·움직임·간격은 토큰 이름으로만. HEX 를 적지 않는다.
   - 캔버스(--yj-canvas) 위 미색 카드(--yj-card) + 그림자 1. 본문 17px 이상.
   - 모바일·태블릿 세로 우선. 옆 여백 16px. 가로 스크롤 없음. 화면 높이는 100dvh 로만.
   ============================================================ */

/* ── 바탕 ─────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
body.ec-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--yj-canvas);
  color: var(--yj-ink);
  font-family: var(--yj-font-ui);
  font-size: var(--yj-t-body);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
.ec-body *, .ec-body *::before, .ec-body *::after { box-sizing: border-box; }
.ec-body img { max-width: 100%; }
.ec-body a { color: inherit; }
.ec-body :focus-visible {
  outline: 2px solid var(--yj-yuja-600);
  outline-offset: 2px;
  border-radius: var(--yj-r-xs);
}

/* ── 상단바 56px (yj-shell__bar 를 그대로 쓰고 안쪽만 짠다) ── */
.ec-bar { gap: var(--yj-s2); padding-left: var(--yj-s4); padding-right: var(--yj-s2); }
.ec-brand {
  display: inline-flex; align-items: center; gap: var(--yj-s2);
  min-height: var(--yj-tap);
  text-decoration: none;
  color: var(--yj-ink-deep);
  flex: 1; min-width: 0;
}
.ec-brand img { width: 28px; height: 28px; flex: none; }
.ec-brand__name {
  font-family: var(--yj-font-serif);
  font-size: 18px; font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-bar__title {
  flex: 1; min-width: 0;
  font-size: var(--yj-t-small); font-weight: 600;
  color: var(--yj-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-menu { display: flex; align-items: center; gap: var(--yj-s1); flex: none; }
.ec-menu__item {
  position: relative;
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 14px;
  border-radius: var(--yj-r-full);
  font-size: var(--yj-t-small); font-weight: 600;
  color: var(--yj-sub);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--yj-m-fast) var(--yj-ease), background-color var(--yj-m-fast) var(--yj-ease);
}
.ec-menu__item::before { content: ""; position: absolute; inset: -4px 0; }   /* 터치 44 */
.ec-menu__item:hover { color: var(--yj-ink-deep); }
.ec-menu__item[aria-current="page"] {
  background: var(--yj-yuja-100);
  color: var(--yj-ink-deep);
  font-weight: 700;
}

/* ── 본문 틀 ──────────────────────────────────────────── */
.ec-main {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--yj-s5) var(--yj-s4) var(--yj-s7);
  padding-bottom: calc(var(--yj-s7) + var(--yj-safe-b));
  display: flex; flex-direction: column;
  gap: var(--yj-s5);
}
.ec-main--read { max-width: 760px; }

/* ── 대문 머리 ────────────────────────────────────────── */
.ec-intro { display: grid; gap: var(--yj-s3); }
.ec-intro__title {
  margin: 0;
  font-family: var(--yj-font-serif);
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.04em;
  color: var(--yj-ink-deep);
}
.ec-intro__lead { margin: 0; font-size: var(--yj-t-body); line-height: 1.7; color: var(--yj-ink); max-width: 40em; }
.ec-intro__row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--yj-s3) var(--yj-s4);
  margin-top: var(--yj-s2);
}
.ec-intro__row .yj-btn--primary { text-decoration: none; }

/* 학년 고르기 — yj-seg 를 빌린다. 글자는 15px 이상으로 */
.ec-grade { flex: none; display: inline-flex; align-items: center; gap: var(--yj-s2); }
.ec-grade__label { font-size: var(--yj-t-small); font-weight: 600; color: var(--yj-sub); }
.ec-grade .yj-seg > * {
  height: 38px; padding: 0 16px;
  font-size: var(--yj-t-small);
  border: 0; background: transparent; cursor: pointer;
  font-family: inherit;
  position: relative;
}
.ec-grade .yj-seg > *::before { content: ""; position: absolute; inset: -3px 0; }  /* 터치 44 */
.ec-grade .yj-seg > .is-on { background: var(--yj-yuja-200); }

/* ── 영역 타일 ────────────────────────────────────────── */
.ec-areas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--yj-s4);
}
@media (min-width: 720px) {
  .ec-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ec-area { display: flex; flex-direction: column; gap: var(--yj-s3); scroll-margin-top: 72px; }
.ec-area__head { display: flex; align-items: center; gap: var(--yj-s3); }
.ec-area__pill {
  display: inline-flex; align-items: center; gap: var(--yj-s2);
  height: 36px; padding: 0 14px 0 10px;
  border-radius: var(--yj-r-full);
  background: var(--yj-yuja-100);
  color: var(--yj-ink-deep);
  font-weight: 700; font-size: var(--yj-t-body);
  white-space: nowrap;
}
.ec-area__pill .ec-ic { color: var(--yj-yuja-ink); }
.ec-area__letter { font-size: var(--yj-t-small); font-weight: 700; color: var(--yj-yuja-ink); }
.ec-area__count { margin-left: auto; font-size: var(--yj-t-cap); font-weight: 500; color: var(--yj-sub); white-space: nowrap; }
.ec-area__sub { margin: 0; font-size: var(--yj-t-body); color: var(--yj-sub); line-height: 1.6; }
.ec-area__list { display: flex; flex-wrap: wrap; gap: var(--yj-s2); margin: 0; padding: 0; list-style: none; }

/* 개념 칩 — 누르면 개념 지면으로 가는 링크(필터가 아니다). 44px · 17px */
.ec-concept {
  display: inline-flex; align-items: center; gap: var(--yj-s2);
  min-height: var(--yj-tap);
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--yj-line-strong);
  border-radius: var(--yj-r-full);
  background: var(--yj-card);
  color: var(--yj-ink-deep);
  font-size: var(--yj-t-body); font-weight: 600;
  text-decoration: none;
  transition: border-color var(--yj-m-fast) var(--yj-ease), background-color var(--yj-m-fast) var(--yj-ease);
}
.ec-concept:hover { border-color: var(--yj-yuja-600); background: var(--yj-yuja-50); }
.ec-concept:active { transform: scale(.98); }
.ec-concept .ec-ic { color: var(--yj-sub); }
.ec-concept__tag {
  font-size: var(--yj-t-cap); font-weight: 500;
  color: var(--yj-sub);
  padding-left: var(--yj-s2);
  border-left: 1px solid var(--yj-line);
}
.ec-concept.is-seen .ec-ic { color: var(--yj-leaf-ink); }
.ec-concept.is-other { border-style: dashed; color: var(--yj-ink); font-weight: 500; }

/* ── 개념 지면 ────────────────────────────────────────── */
.ec-crumb { display: flex; align-items: center; gap: var(--yj-s2); flex-wrap: wrap; }
.ec-crumb .ec-area__pill { position: relative; text-decoration: none; }
.ec-crumb .ec-area__pill::before { content: ""; position: absolute; inset: -4px 0; }   /* 터치 44 */
.ec-crumb .ec-area__pill:hover { background: var(--yj-yuja-200); }

.ec-card { display: flex; flex-direction: column; gap: var(--yj-s4); }
.ec-section-label {
  margin: 0;
  font-size: var(--yj-t-label);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--yj-yuja-ink);
}

.ec-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--yj-s4); align-items: center; }
.ec-pic {
  width: 76px; height: 76px;
  padding: 14px;
  border-radius: var(--yj-r-lg);
  background: var(--yj-yuja-50);
  color: var(--yj-yuja-ink);
}
.ec-pic svg { width: 48px; height: 48px; display: block; }
.ec-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--yj-s3); margin: 0; }
.ec-name__ko {
  font-family: var(--yj-font-disp);
  font-size: var(--yj-t-disp);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--yj-ink-deep);
}
.ec-name__hanja {
  font-family: var(--yj-font-hanja);
  font-size: var(--yj-t-hanja);
  font-weight: 600;
  color: var(--yj-sub);
}
.ec-easy { margin: var(--yj-s1) 0 0; font-family: var(--yj-font-serif); font-size: 19px; font-weight: 500; line-height: 1.6; color: var(--yj-ink-deep); }

.ec-text { display: grid; gap: var(--yj-s3); }
.ec-text p { margin: 0; font-size: var(--yj-t-body); line-height: 1.9; color: var(--yj-ink); }
.ec-text__wait { font-size: var(--yj-t-small); color: var(--yj-sub); }
.ec-text-head { display: flex; align-items: center; justify-content: space-between; gap: var(--yj-s3); flex-wrap: wrap; }

.ec-now {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--yj-r-sm);
  background: var(--yj-canvas);
  font-size: var(--yj-t-small); line-height: 1.7;
  color: var(--yj-ink);
}
.ec-now b { color: var(--yj-ink-deep); margin-right: var(--yj-s2); }

/* 낱말 → 어사문 */
.ec-words { display: grid; gap: var(--yj-s2); }
.ec-words__list { display: flex; flex-wrap: wrap; gap: var(--yj-s2); margin: 0; padding: 0; list-style: none; }
.ec-word {
  display: inline-flex; align-items: baseline; gap: 6px;
  min-height: var(--yj-tap);
  padding: 9px 14px;
  border-radius: var(--yj-r-sm);
  background: var(--yj-yuja-100);
  color: var(--yj-ink-deep);
  font-size: var(--yj-t-body); font-weight: 700;
  text-decoration: none;
  transition: background-color var(--yj-m-fast) var(--yj-ease);
}
.ec-word:hover { background: var(--yj-yuja-200); }
.ec-word__hanja { font-family: var(--yj-font-hanja); font-size: 14px; font-weight: 500; color: var(--yj-sub); }
.ec-word .ec-ic { align-self: center; width: 16px; height: 16px; color: var(--yj-yuja-ink); }
.ec-words__note { margin: 0; font-size: var(--yj-t-cap); color: var(--yj-sub); }

/* 교과 표지 */
.ec-tags { display: flex; flex-wrap: wrap; gap: var(--yj-s2); margin: 0; padding: 0; list-style: none; }
.ec-tags .yj-tag { height: auto; min-height: 26px; padding: 3px 10px; font-size: var(--yj-t-cap); white-space: normal; }

/* 영상 */
.ec-videos { display: grid; gap: var(--yj-s5); }
.ec-video { display: grid; gap: var(--yj-s2); }
.ec-video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--yj-r-sm);
  overflow: hidden;
  background: var(--yj-forest);
}
.ec-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ec-video__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--yj-on-forest);
  font: inherit;
}
.ec-video__poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--yj-m-slow) var(--yj-ease);
}
.ec-video__poster:hover img { transform: scale(1.02); }
.ec-video__poster.is-noimg { background: var(--yj-forest); }
.ec-video__noimg { position: relative; padding: 0 var(--yj-s5); font-size: var(--yj-t-small); text-align: center; line-height: 1.6; }
.ec-video__play {
  position: relative;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: var(--yj-r-full);
  background: var(--yj-yuja-300);
  color: var(--yj-on-action);
  box-shadow: var(--yj-sh-2);
  transition: background-color var(--yj-m-fast) var(--yj-ease), transform var(--yj-m-mid) var(--yj-ease);
}
.ec-video__play .ec-ic { width: 28px; height: 28px; margin-left: 3px; }
.ec-video__poster:hover .ec-video__play { background: var(--yj-yuja-500); }
.ec-video__poster:active .ec-video__play { transform: scale(.97); }
.ec-video__title { margin: 0; font-size: var(--yj-t-body); font-weight: 700; color: var(--yj-ink-deep); line-height: 1.5; }
.ec-video__meta { font-size: var(--yj-t-cap); font-weight: 500; color: var(--yj-sub); margin-left: var(--yj-s2); white-space: nowrap; }
.ec-video__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--yj-s1) var(--yj-s3); }
.ec-video__src { margin: 0; font-size: var(--yj-t-cap); color: var(--yj-sub); }
.ec-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--yj-tap);
  font-size: var(--yj-t-small); font-weight: 600;
  color: var(--yj-ink-deep);
  text-decoration: underline;
  text-decoration-color: var(--yj-line-strong);
  text-underline-offset: 3px;
}
.ec-link:hover { text-decoration-color: var(--yj-ink-deep); }
.ec-link .ec-ic { width: 16px; height: 16px; color: var(--yj-sub); }

/* 체험 */
.ec-try { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--yj-s3); }
.ec-try__text { margin: 0; font-size: var(--yj-t-body); color: var(--yj-ink); }
.ec-try__text small { display: block; font-size: var(--yj-t-small); color: var(--yj-sub); }

/* 생각해 보기 */
.ec-reflect { display: grid; gap: var(--yj-s4); margin: 0; padding: 0; list-style: none; counter-reset: ec-q; }
.ec-reflect__q { display: grid; gap: var(--yj-s2); counter-increment: ec-q; }
.ec-reflect__q label { font-size: var(--yj-t-body); font-weight: 600; color: var(--yj-ink-deep); line-height: 1.6; }
.ec-reflect__q label::before { content: counter(ec-q) ". "; color: var(--yj-yuja-ink); }
.ec-reflect textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--yj-line-strong);
  border-radius: var(--yj-r-sm);
  background: var(--yj-card);
  color: var(--yj-ink);
  font: inherit; font-size: var(--yj-t-body); line-height: 1.6;
  resize: vertical;
}
.ec-reflect textarea::placeholder { color: var(--yj-sub); opacity: 1; }
.ec-reflect textarea:focus { outline: none; border-color: var(--yj-yuja-600); box-shadow: inset 0 0 0 1px var(--yj-yuja-600); background: var(--yj-card-hi); }
.ec-reflect__note { margin: 0; font-size: var(--yj-t-cap); color: var(--yj-sub); }

/* 우리 반에서는 — yj-callout 을 빌린다 */
.ec-board { display: grid; gap: var(--yj-s1); }
.ec-board p { margin: 0; font-size: var(--yj-t-body); line-height: 1.7; }
.ec-board small { font-size: var(--yj-t-small); color: var(--yj-sub); }

/* 이전·다음 */
.ec-pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--yj-s3); }
.ec-pager__link {
  display: flex; align-items: center; gap: var(--yj-s2);
  min-height: 64px;
  padding: var(--yj-s3) var(--yj-s4);
  border: 1px solid var(--yj-line);
  border-radius: var(--yj-r-lg);
  background: var(--yj-card);
  box-shadow: var(--yj-sh-1);
  text-decoration: none;
  color: var(--yj-ink-deep);
  transition: box-shadow var(--yj-m-mid) var(--yj-ease), transform var(--yj-m-mid) var(--yj-ease);
}
.ec-pager__link:hover { box-shadow: var(--yj-sh-2); transform: translateY(-2px); }
.ec-pager__link:active { transform: scale(.98); }
.ec-pager__link--next { justify-content: flex-end; text-align: right; grid-column: 2; }
.ec-pager__link .ec-ic { flex: none; color: var(--yj-sub); }
.ec-pager__txt { display: grid; min-width: 0; }
.ec-pager__dir { font-size: var(--yj-t-cap); font-weight: 500; color: var(--yj-sub); }
.ec-pager__name { font-size: var(--yj-t-body); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 안내 카드(준비 중 · 못 찾음 · 데이터 없음) */
.ec-notice { display: grid; gap: var(--yj-s3); justify-items: start; }
.ec-notice__title { margin: 0; font-family: var(--yj-font-serif); font-size: 20px; font-weight: 600; color: var(--yj-ink-deep); }
.ec-notice p { margin: 0; font-size: var(--yj-t-body); line-height: 1.7; }
.ec-notice .ec-ic { width: 28px; height: 28px; color: var(--yj-yuja-ink); }

/* 푸터 */
.ec-foot {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--yj-s4) var(--yj-s4) calc(var(--yj-s5) + var(--yj-safe-b));
  border-top: 1px solid var(--yj-line);
  font-size: var(--yj-t-cap);
  color: var(--yj-sub);
  line-height: 1.7;
}
.ec-foot--read { max-width: 760px; }
.ec-foot p { margin: 0; }

/* ── 좁은 화면 ────────────────────────────────────────── */
@media (max-width: 520px) {
  .ec-hero { grid-template-columns: minmax(0, 1fr); }
  .ec-pic { width: 64px; height: 64px; padding: 12px; }
  .ec-pic svg { width: 40px; height: 40px; }
  .ec-menu__item { padding: 0 10px; }
  .ec-pager { grid-template-columns: minmax(0, 1fr); }
  .ec-pager__link--next { grid-column: 1; }
  .ec-intro__row .yj-btn--primary { width: 100%; }
}

@media print {
  .ec-bar, .ec-pager, .ec-video__frame, .ec-try { display: none; }
  body.ec-body { background: none; }
}

/* ============================================================
   선생님 슬라이드 (P1) — js/slides.js · 기획서 §5-3 · §5-4
   전자칠판·TV 1920×1080 기준. 캔버스 위 미색 카드 한 장, 한 장에 한 생각.
   글자 크기는 화면 너비와 높이 중 작은 쪽을 따라 자란다 — 1920×1080 에서 본문 46 · 제목 75 안팎.
   인쇄는 css/economy-print.css 가 같은 변수를 줄여서 A4 메모판으로 편다.
   ============================================================ */
.ec-sl {
  --ec-sl-body:  clamp(32px, min(2.4vw, 4.4dvh), 56px);
  --ec-sl-title: clamp(48px, min(4vw, 7dvh), 96px);
  --ec-sl-q:     clamp(40px, min(3.1vw, 5.6dvh), 72px);
  --ec-sl-label: clamp(24px, min(1.7vw, 3.1dvh), 34px);
  --ec-sl-pic:   clamp(72px, min(7vw, 12dvh), 168px);
  --ec-sl-pad:   clamp(24px, 4vw, 80px);
  --ec-sl-gap:   clamp(16px, 2.6dvh, 40px);

  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  height: 100dvh;
  background: var(--yj-canvas);
  color: var(--yj-ink);
}

/* 머리 — 56px 상단바(yj-shell__bar)를 빌린다 */
.ec-sl__head { gap: var(--yj-s3); padding-left: var(--yj-s5); padding-right: var(--yj-s5); }
.ec-sl__head-title {
  flex: 1; min-width: 0; margin: 0;
  display: flex; align-items: baseline; gap: var(--yj-s3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ec-sl__head-title b { font-family: var(--yj-font-serif); font-size: 20px; font-weight: 600; color: var(--yj-ink-deep); }
.ec-sl__head-title span { font-size: var(--yj-t-small); font-weight: 600; color: var(--yj-sub); }
.ec-sl__from {
  flex: none; margin: 0;
  max-width: 60%;
  padding: 6px 14px;
  border-radius: var(--yj-r-full);
  background: var(--yj-yuja-100);
  color: var(--yj-ink-deep);
  font-size: var(--yj-t-small); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 진도 막대 — 원색은 이 가는 막대에만 */
.ec-sl__progress { height: 4px; background: var(--yj-line); }
.ec-sl__progress-bar {
  display: block; height: 100%;
  background: var(--yj-yuja-500);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform var(--yj-m-mid) var(--yj-ease);
}

/* 무대와 카드 */
.ec-sl__stage {
  min-height: 0;
  display: grid; place-items: center;
  padding: clamp(12px, 2.4dvh, 40px) clamp(16px, 3vw, 64px);
}
.ec-sl__card {
  width: 100%;
  max-width: 1680px;
  height: 100%;
  overflow: auto;
  display: flex; flex-direction: column; justify-content: center;
  gap: var(--ec-sl-gap);
  padding: var(--ec-sl-pad);
  border: 1px solid var(--yj-line);
  border-radius: var(--yj-r-lg);
  background: var(--yj-card);
  box-shadow: var(--yj-sh-1);
  font-size: var(--ec-sl-body);
  line-height: 1.5;
}
.ec-sl__card > * { margin: 0; }
.ec-sl__label {
  font-size: var(--ec-sl-label);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--yj-yuja-ink);
}
.ec-sl__big {
  margin: 0;
  font-family: var(--yj-font-serif);
  font-size: var(--ec-sl-title);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.03em;
  color: var(--yj-ink-deep);
}
.ec-sl__text { font-size: var(--ec-sl-body); line-height: 1.55; color: var(--yj-ink); }
.ec-sl__src { font-size: var(--ec-sl-label); line-height: 1.5; color: var(--yj-sub); }

/* 1 제목 — 쉬운 말 + 개념 그림 크게 */
.ec-sl__title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--ec-sl-pad);
}
.ec-sl__pic {
  display: grid; place-items: center;
  width: calc(var(--ec-sl-pic) * 1.9); height: calc(var(--ec-sl-pic) * 1.9);
  border-radius: var(--yj-r-lg);
  background: var(--yj-yuja-50);
  color: var(--yj-yuja-ink);
}
.ec-sl__pic svg { width: calc(var(--ec-sl-pic) * 1.2); height: calc(var(--ec-sl-pic) * 1.2); }
.ec-sl__title-txt { display: grid; gap: var(--yj-s3); min-width: 0; }
.ec-sl__name { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--yj-s4); }
.ec-sl__name > span:first-child {
  font-family: var(--yj-font-disp);
  font-size: var(--ec-sl-body);
  font-weight: 800;
  color: var(--yj-ink-deep);
}
.ec-sl__hanja {
  font-family: var(--yj-font-hanja);
  font-size: calc(var(--ec-sl-body) * .72);
  font-weight: 600;
  color: var(--yj-sub);
}

/* 2 우리 반 장면 — 돈이 흐르는 세 칸 */
.ec-sl__flow {
  display: flex; align-items: stretch;
  gap: var(--yj-s3);
  margin: 0; padding: 0; list-style: none;
}
.ec-sl__step {
  flex: 1 1 0; min-width: 0;
  display: grid; align-content: center; gap: var(--yj-s2);
  padding: clamp(16px, 2.4dvh, 36px) clamp(16px, 1.6vw, 32px);
  border: 1px solid var(--yj-line-strong);
  border-radius: var(--yj-r-lg);
  background: var(--yj-canvas);
  text-align: center;
}
.ec-sl__step.is-last { background: var(--yj-yuja-100); border-color: var(--yj-yuja-600); }
.ec-sl__step-k { font-size: var(--ec-sl-label); font-weight: 600; color: var(--yj-sub); line-height: 1.35; }
.ec-sl__step-v {
  font-family: var(--yj-font-disp);
  font-size: calc(var(--ec-sl-title) * .85);
  font-weight: 800;
  line-height: 1.2;
  color: var(--yj-ink-deep);
  font-variant-numeric: tabular-nums;
}
.ec-sl__arrow { flex: none; display: grid; place-items: center; color: var(--yj-sub); }
.ec-sl__arrow svg { width: calc(var(--ec-sl-label) * 1.6); height: calc(var(--ec-sl-label) * 1.6); }

/* 3 왜 — 그림 2~3컷 나란히 */
.ec-sl__why {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 48px);
  margin: 0; padding: 0; list-style: none;
}
.ec-sl__why-item { display: grid; justify-items: center; align-content: start; gap: var(--ec-sl-gap); text-align: center; }
.ec-sl__why-pic {
  display: grid; place-items: center;
  width: calc(var(--ec-sl-pic) * 1.6); height: calc(var(--ec-sl-pic) * 1.6);
  border-radius: var(--yj-r-lg);
  background: var(--yj-yuja-50);
  color: var(--yj-yuja-ink);
}
.ec-sl__why-pic svg { width: var(--ec-sl-pic); height: var(--ec-sl-pic); }
.ec-sl__why-no { font-family: var(--yj-font-disp); font-size: var(--ec-sl-title); font-weight: 800; }
.ec-sl__why-line { margin: 0; font-size: var(--ec-sl-body); font-weight: 600; line-height: 1.45; color: var(--yj-ink-deep); }

/* 4 영상 — 섬네일, 누르면 youtube-nocookie */
.ec-sl__video {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2.4vw, 48px);
}
.ec-sl__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--yj-r-sm);
  overflow: hidden;
  background: var(--yj-forest);
}
.ec-sl__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ec-sl__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  font: inherit;
}
.ec-sl__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ec-sl__poster.is-noimg { background: var(--yj-forest); }
.ec-sl__play {
  position: relative;
  display: grid; place-items: center;
  width: 96px; height: 96px;
  border-radius: var(--yj-r-full);
  background: var(--yj-yuja-300);
  color: var(--yj-on-action);
  box-shadow: var(--yj-sh-2);
  transition: background-color var(--yj-m-fast) var(--yj-ease), transform var(--yj-m-mid) var(--yj-ease);
}
.ec-sl__play svg { width: 40px; height: 40px; margin-left: 4px; }
.ec-sl__poster:hover .ec-sl__play { background: var(--yj-yuja-500); }
.ec-sl__poster:active .ec-sl__play { transform: scale(.97); }
.ec-sl__video-txt { display: grid; gap: var(--yj-s3); }
.ec-sl__vtitle { margin: 0; font-size: var(--ec-sl-body); font-weight: 700; line-height: 1.4; color: var(--yj-ink-deep); }
.ec-sl__upto {
  margin: 0;
  padding: var(--yj-s3) var(--yj-s4);
  border-radius: var(--yj-r-sm);
  background: var(--yj-yuja-50);
  border-left: 2px solid var(--yj-yuja-500);
  font-size: var(--ec-sl-label); font-weight: 600; color: var(--yj-ink-deep);
}
.ec-sl__thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--yj-r-sm); background: var(--yj-forest); }

/* 6 토론 — 질문 하나씩 */
.ec-sl__talk { display: grid; gap: var(--ec-sl-gap); margin: 0; padding: 0; list-style: none; }
.ec-sl__q {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline;
  gap: var(--yj-s4);
  font-family: var(--yj-font-serif);
  font-size: var(--ec-sl-q);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--yj-ink-deep);
}
.ec-sl__q-no { font-family: var(--yj-font-disp); font-size: .8em; font-weight: 800; color: var(--yj-yuja-ink); }
.ec-sl__q.is-wait {
  padding: var(--yj-s4) var(--yj-s5);
  border: 1px dashed var(--yj-line-strong);
  border-radius: var(--yj-r-lg);
  font-family: var(--yj-font-ui);
  font-size: var(--ec-sl-label); font-weight: 500;
  color: var(--yj-sub);
}

/* 7 정리 — 한 문장 + 낱말 셋 */
.ec-sl__words { display: flex; flex-wrap: wrap; gap: var(--yj-s4); margin: 0; padding: 0; list-style: none; }
.ec-sl__word {
  display: inline-flex; align-items: baseline; gap: var(--yj-s3);
  padding: var(--yj-s3) var(--yj-s5);
  border-radius: var(--yj-r-sm);
  background: var(--yj-yuja-100);
  font-size: var(--ec-sl-body); font-weight: 700;
  color: var(--yj-ink-deep);
}
.ec-sl__word-h { font-family: var(--yj-font-hanja); font-size: .62em; font-weight: 500; color: var(--yj-sub); }

/* 8 돌아가기 — 큰 단추 */
.ec-sl__acts { display: flex; flex-wrap: wrap; gap: var(--yj-s4); }
.ec-sl__acts .yj-btn {
  height: auto; min-height: clamp(64px, 8dvh, 96px);
  padding: var(--yj-s3) clamp(24px, 2vw, 40px);
  border-radius: var(--yj-r-full);
  font-size: var(--ec-sl-label);
  white-space: normal;
}
.ec-sl__acts .yj-btn .yj-ic { width: calc(var(--ec-sl-label) * 1.1); height: calc(var(--ec-sl-label) * 1.1); }
.ec-sl__closehint { font-weight: 600; color: var(--yj-ink-deep); }

/* 발표자 메모 — 아래쪽 접이식 띠, 기본 숨김 */
.ec-sl__notes {
  max-height: 32dvh; overflow: auto;
  padding: var(--yj-s4) clamp(16px, 3vw, 64px);
  border-top: 1px solid var(--yj-line);
  background: var(--yj-yuja-50);
  display: grid; gap: var(--yj-s2);
}
.ec-sl__notes[hidden] { display: none; }
.ec-sl__notes > p { margin: 0; }
.ec-sl__notes-k { font-size: var(--yj-t-label); font-weight: 700; letter-spacing: .04em; color: var(--yj-yuja-ink); }
.ec-sl__notes-t { font-size: clamp(20px, 1.4vw, 28px); line-height: 1.6; color: var(--yj-ink-deep); }
.ec-sl__notes-warn { font-size: var(--yj-t-small); color: var(--yj-sub); }

/* 아래 줄 — 넘기기 · 전체 화면 · 메모 · 닫기 */
.ec-sl__bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--yj-s2) var(--yj-s4);
  padding: var(--yj-s3) clamp(16px, 3vw, 64px);
  padding-bottom: calc(var(--yj-s3) + var(--yj-safe-b));
  border-top: 1px solid var(--yj-line);
  background: var(--yj-card);
}
.ec-sl__nav, .ec-sl__tools { display: flex; align-items: center; gap: var(--yj-s2); }
.ec-sl__count {
  min-width: 88px;
  text-align: center;
  font-family: var(--yj-font-disp);
  font-size: 24px; font-weight: 800;
  color: var(--yj-ink-deep);
  font-variant-numeric: tabular-nums;
}
.ec-sl__bar .yj-btn--lg { font-size: 17px; }
.ec-sl__bar .yj-btn--ghost:hover:not(:disabled) { background: var(--yj-yuja-50); }
.ec-sl__memo-btn.is-on { background: var(--yj-yuja-200); color: var(--yj-ink-deep); box-shadow: inset 0 0 0 1px var(--yj-yuja-600); }
.ec-sl__memo-btn.is-on:hover:not(:disabled) { background: var(--yj-yuja-200); }

/* 알림(토스트) — 숲 바탕 + 흰 글자 */
.ec-sl__toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--yj-safe-b));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 14px 22px;
  border-radius: var(--yj-r-sm);
  background: var(--yj-forest);
  color: var(--yj-on-forest);
  font-size: 20px; font-weight: 600;
  box-shadow: var(--yj-sh-3);
  z-index: 10;
}
.ec-sl__toast[hidden] { display: none; }

.ec-sl__print { display: none; }

/* 태블릿 세로 — 영상·제목은 위아래로, 휴대폰은 세 칸 흐름도 위아래로 */
@media (max-width: 900px) {
  .ec-sl__video { grid-template-columns: minmax(0, 1fr); }
  .ec-sl__title { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .ec-sl__card { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .ec-sl__flow { flex-direction: column; }
  .ec-sl__arrow svg { transform: rotate(90deg); }
}
@media (max-width: 600px) {
  .ec-sl {
    --ec-sl-body: 24px; --ec-sl-title: 34px; --ec-sl-q: 28px; --ec-sl-label: 18px; --ec-sl-pic: 56px; --ec-sl-pad: 20px;
  }
  .ec-sl__btxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ec-sl__why { grid-auto-flow: row; }
  .ec-sl__from { max-width: 100%; }
  .ec-sl__head-title span { display: none; }
}

/* 선생님 대문 — 조작 안내 */
.ec-keys { display: grid; gap: var(--yj-s1); margin: 0; padding: 0; list-style: none; font-size: var(--yj-t-small); color: var(--yj-ink); line-height: 1.8; }
.ec-keys kbd {
  display: inline-block;
  min-width: 28px;
  margin-right: 4px;
  padding: 0 8px;
  border: 1px solid var(--yj-line-strong);
  border-radius: var(--yj-r-xs);
  background: var(--yj-card);
  font-family: inherit; font-size: var(--yj-t-cap); font-weight: 700;
  text-align: center;
  color: var(--yj-ink-deep);
}
