/* ============================================================
   lecture/lecture.css — 강의 진행 화면 전용 레이아웃

   디자인 토큰은 ../shared.css 를 그대로 쓴다.
   여기서는 강의 화면에만 필요한 구조/도식만 정의한다.

   PC(프로젝터)  : 본문 최대 폭 1280px, 한 화면에 핵심 메시지 1개
   모바일        : 1 viewport 로 강제하지 않고 세로 스크롤 허용
   ============================================================ */

.lecture-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ------------------------------------------------------------
   상단 — 개념 진행 표시기
   ------------------------------------------------------------ */

.lecture-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(220, 227, 238, .8);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(150%) blur(8px);
}

.lecture-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(1360px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 54px;
  padding: 8px 0;
}

.lecture-brand {
  flex: none;
  color: var(--ink);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-decoration: none;
  white-space: nowrap;
}
.lecture-brand:hover { color: var(--primary); }
.brand-dim { color: #94a3b8; }

.progress {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.p-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.p-list::-webkit-scrollbar { display: none; }

.p-stop {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  color: #9aa7ba;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}

/* 현재 구간만 Primary 로 강조한다 */
.p-stop.on {
  background: var(--primary-soft);
  color: var(--primary);
}

/* 도입부는 전체 개념열을 희미하게 두고 INTRO 만 표시한다 */
.p-list.intro .p-stop:not(.p-intro) { opacity: .45; }
.p-intro { letter-spacing: .14em; }

/* 정리 화면은 전체 개념열을 함께 강조한다 */
.p-list.all .p-stop.on { background: transparent; }

.p-short { display: none; }

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.icon-button:hover { border-color: #b9c9e4; color: var(--primary); }

.icon-lines {
  position: relative;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.icon-lines::before,
.icon-lines::after {
  content: '';
  position: absolute;
  left: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.icon-lines::before { top: -5px; }
.icon-lines::after { top: 5px; }

/* ------------------------------------------------------------
   본문 Frame
   ------------------------------------------------------------ */

.lecture-main {
  flex: 1 1 auto;
  display: flex;
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 34px;
  outline: none;
}

.stage { width: 100%; }

.stage-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

.stage-eyebrow { margin: 0; }

.stage-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 3.1vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.24;
}

.stage-kicker {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: clamp(.95rem, 1.4vw, 1.12rem);
  font-weight: 700;
}

.stage-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stage-note {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: clamp(.88rem, 1.2vw, 1rem);
  font-weight: 600;
  line-height: 1.6;
}

/* 화면 유형별 강조 차이 */
.type-title .stage-inner,
.type-question .stage-inner { justify-content: center; text-align: center; align-items: center; }
.type-title .stage-body,
.type-question .stage-body { width: 100%; align-items: center; }

.type-title .stage-title { font-size: clamp(2.2rem, 5.2vw, 4rem); }
.type-title .stage-note,
.type-question .stage-note { text-align: center; width: 100%; }

/* ------------------------------------------------------------
   공통 문장 요소
   ------------------------------------------------------------ */

.s-lead {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.s-key {
  margin: 0;
  padding: 14px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: clamp(1.05rem, 1.9vw, 1.5rem);
  font-weight: 800;
  line-height: 1.45;
}

.type-question .s-key,
.type-title .s-key { border-left: 0; border-radius: var(--radius-md); text-align: center; }

.s-question {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.6rem, 4vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.3;
  text-align: center;
}

.s-sub {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 600;
}

.s-title-sub {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.95rem, 1.7vw, 1.25rem);
  font-weight: 800;
}

.s-presenter {
  margin: 0;
  color: #94a3b8;
  font-size: .9rem;
  font-weight: 700;
}

.accent-block { color: var(--primary); font-style: normal; }
.accent-chain { color: var(--ink); font-style: normal; }

.quote-strong {
  color: var(--primary);
  font-size: 1.15em;
  font-weight: 900;
}

/* ------------------------------------------------------------
   2열 대비 구조 (duo)
   모바일에서는 억지로 2열을 유지하지 않고 세로로 쌓는다.
   ------------------------------------------------------------ */

.duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

.duo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.duo-card.tone-primary { border-color: #bfd3f8; background: linear-gradient(180deg, #fff, var(--primary-soft)); }
.duo-card.tone-warn { border-color: #f2d7b3; background: linear-gradient(180deg, #fff, var(--warning-soft)); }
.duo-card.tone-ok { border-color: #b6e3d2; background: linear-gradient(180deg, #fff, var(--success-soft)); }

.duo-tag {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
}
.duo-card.tone-primary .duo-tag { color: var(--primary); }
.duo-card.tone-warn .duo-tag { color: var(--warning); }

.duo-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.35;
}

.duo-line {
  margin: 0;
  color: #40506b;
  font-size: clamp(.95rem, 1.3vw, 1.08rem);
  font-weight: 700;
}

.duo-foot {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.duo-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 900;
}
.duo-mid-plain { color: #b4c0d2; }

@media (min-width: 760px) {
  .duo { grid-template-columns: 1fr auto 1fr; gap: 16px; }
}

/* ------------------------------------------------------------
   번호 질문 목록 (원본 p4)
   ------------------------------------------------------------ */

.num-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.num-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .9rem;
  font-weight: 900;
}

.num-question {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 800;
}

.num-answer {
  grid-column: 2;
  color: var(--primary);
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: .02em;
}

@media (min-width: 760px) {
  .num-item { grid-template-columns: auto 1fr auto; }
  .num-answer { grid-column: auto; }
}

/* ------------------------------------------------------------
   카드 그리드
   ------------------------------------------------------------ */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.card-item.accent {
  border-color: #bfd3f8;
  background: linear-gradient(180deg, #fff, var(--primary-soft));
}

.card-tag {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  min-height: 1em;
}

.card-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  font-weight: 900;
  letter-spacing: -.02em;
}

.card-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

@media (min-width: 720px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .card-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------
   Block / Chain 도식
   모바일에서는 가로 스크롤 대신 세로로 재배치한다.
   ------------------------------------------------------------ */

.blk-row { width: 100%; }

.blk-framed {
  padding: 16px;
  border: 1px dashed #b9c9e4;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .55);
}

.blk-frame-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.blk-track {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.blk {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(11, 18, 32, .05);
}

.blk-broken { border-color: #edc6c6; background: linear-gradient(180deg, #fff, #fdf1f1); }
.blk-new { border-color: #b6e3d2; background: linear-gradient(180deg, #fff, var(--success-soft)); }

.blk-name {
  margin: 0;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.blk-prev,
.blk-hash {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.blk-prev strong, .blk-hash strong { color: var(--primary); font-weight: 900; }

.blk-hash-alt strong { color: #c0392b; }

.blk-tx {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  color: #40506b;
  font-size: .9rem;
  font-weight: 700;
}
.blk-tx s { color: #b0bacb; }

.blk-alt {
  margin: 0;
  color: #c0392b;
  font-size: .9rem;
  font-weight: 800;
}

.blk-badge {
  margin: 4px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fdecec;
  color: #c0392b;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.45;
}

.blk-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 900;
}
.blk-link.broken { color: #c0392b; }

@media (min-width: 860px) {
  .blk-track { flex-direction: row; align-items: stretch; }
  .blk-link { transform: none; }
}

/* ------------------------------------------------------------
   흐름 (flow)
   ------------------------------------------------------------ */

.flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}
.flow-step.tone-ok { border-color: #b6e3d2; background: linear-gradient(180deg, #fff, var(--success-soft)); }

.flow-text {
  color: var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 900;
  letter-spacing: -.02em;
}

.flow-desc {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 900;
}

@media (min-width: 860px) {
  .flow { flex-direction: row; align-items: stretch; }
}

/* ------------------------------------------------------------
   참여 노드
   ------------------------------------------------------------ */

.node-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  text-align: center;
}
.node.tone-ok { border-color: #b6e3d2; background: linear-gradient(180deg, #fff, var(--success-soft)); }

.node-name { color: var(--ink); font-size: 1rem; font-weight: 900; }
.node-hash { color: var(--muted); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.node-state { color: var(--muted); font-size: .84rem; font-weight: 800; }
.node.tone-ok .node-state { color: var(--success); }

@media (min-width: 720px) {
  .node-row { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------
   점검 항목
   ------------------------------------------------------------ */

.bullet-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 16px 20px 16px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  font-size: clamp(.98rem, 1.4vw, 1.14rem);
  font-weight: 800;
}
.bullet-list li::marker { color: var(--primary); }

/* ------------------------------------------------------------
   3단 구조 (DApp / Smart Contract / 실행 기반)
   ------------------------------------------------------------ */

.stack {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-layer {
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.stack-layer.tone-primary { border-color: #bfd3f8; background: linear-gradient(180deg, #fff, var(--primary-soft)); }

.stack-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 900;
  letter-spacing: -.02em;
}

.stack-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 700;
}

/* ------------------------------------------------------------
   정리 Q&A
   ------------------------------------------------------------ */

.qa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.qa {
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.qa dt {
  color: var(--primary);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  font-weight: 900;
}

.qa dd {
  margin: 5px 0 0;
  color: #40506b;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.55;
}

@media (min-width: 760px) {
  .qa-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------------------
   노선도
   ------------------------------------------------------------ */

.route-map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  list-style: none;
}

.route-stop {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 9px;
  border-radius: 999px;
  color: #9aa7ba;
  font-size: clamp(.8rem, 1.1vw, .95rem);
  font-weight: 800;
}

.route-stop.on { background: var(--primary-soft); color: var(--primary-deep); }

.route-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}
.route-stop.on .route-dot { background: var(--primary); }

/* ------------------------------------------------------------
   키워드 나열
   ------------------------------------------------------------ */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-cloud li {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #40506b;
  font-size: clamp(.9rem, 1.3vw, 1.05rem);
  font-weight: 800;
}

/* ------------------------------------------------------------
   Hash 입력 대비 (원본 p5)
   ------------------------------------------------------------ */

.hash-rows {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.hash-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.hash-in {
  color: var(--ink);
  font-size: clamp(.98rem, 1.4vw, 1.15rem);
  font-weight: 800;
}
.hash-in strong { color: var(--primary); }

.hash-op { color: var(--muted); font-size: .84rem; font-weight: 900; letter-spacing: .06em; }
.hash-out { color: var(--primary); font-size: 1.05rem; font-weight: 900; }

@media (min-width: 760px) {
  .hash-row { grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; }
}

/* ------------------------------------------------------------
   PoW 조건 (원본 p13)
   ------------------------------------------------------------ */

.target-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #bfd3f8;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--primary-soft));
}

.target-badge {
  padding: 8px 18px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: .06em;
}

.target-desc {
  color: var(--ink);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 800;
}

.candidate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.candidate-list li {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: #40506b;
  font-size: .95rem;
  font-weight: 800;
}

/* ------------------------------------------------------------
   체험 진입 CTA + QR
   QR 은 체험 진입 화면에서만 노출하고 모바일에서는 감춘다.
   ------------------------------------------------------------ */

.cta-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid #bfd3f8;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--primary-soft));
}

.cta-zone-simple { justify-content: center; background: none; border: 0; padding: 0; }

.qr-panel {
  display: none;
  margin: 0;
  text-align: center;
}

.qr-image {
  display: block;
  width: 132px;
  height: 132px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.qr-panel figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.4;
}

.cta-main {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.cta-button { width: 100%; }

.cta-hint {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}
.cta-hint strong { color: var(--primary); }

@media (min-width: 720px) {
  .qr-panel { display: block; }
  .cta-button { width: auto; }
}

/* ------------------------------------------------------------
   마무리 / 이어서 보기
   ------------------------------------------------------------ */

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.resume-line { margin: 0; text-align: center; }

.resume-button {
  padding: 9px 16px;
  border: 1px dashed #b9c9e4;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
}
.resume-button:hover { border-style: solid; }

/* ------------------------------------------------------------
   하단 Navigation
   모바일에서도 콘텐츠를 가리지 않도록 safe-area 를 확보한다.
   ------------------------------------------------------------ */

.lecture-nav {
  position: sticky;
  bottom: 0;
  z-index: 25;
  border-top: 1px solid rgba(220, 227, 238, .9);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(150%) blur(8px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.lecture-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: 10px 0;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  min-width: 92px;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #475569;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, opacity .15s ease;
}
.nav-button:hover:not(:disabled) { border-color: #b9c9e4; color: var(--primary); }
.nav-button:disabled { opacity: .35; cursor: default; }

.nav-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 46px;
  padding: 6px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.nav-counter:hover { background: var(--primary-soft); color: var(--primary); }

.nav-counter-hint {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
}

/* ------------------------------------------------------------
   목차 Drawer
   ------------------------------------------------------------ */

.toc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(11, 18, 32, .35);
}

.toc {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -20px 0 55px rgba(11, 18, 32, .16);
}

.toc[hidden], .toc-backdrop[hidden] { display: none; }

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.toc-title { margin: 0; font-size: 1rem; font-weight: 900; letter-spacing: .04em; }

.toc-close {
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}
.toc-close:hover { background: var(--primary-soft); color: var(--primary); }

.toc-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 12px;
  -webkit-overflow-scrolling: touch;
}

.toc-section { border-bottom: 1px solid #eef2f8; }
.toc-section:last-child { border-bottom: 0; }

.toc-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 8px;
  cursor: pointer;
  list-style: none;
}
.toc-summary::-webkit-details-marker { display: none; }

.toc-section-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .76rem;
  font-weight: 900;
}

.toc-section-label { flex: 1 1 auto; color: var(--ink); font-size: .95rem; font-weight: 800; }
.toc-section-range { color: #9aa7ba; font-size: .76rem; font-weight: 800; }

.toc-screens { margin: 0 0 8px; padding: 0; list-style: none; }

.toc-screen {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.toc-screen:hover { background: #f4f7fb; }
.toc-screen.current { background: var(--primary-soft); }

.toc-screen-id { color: #9aa7ba; font-size: .74rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.toc-screen.current .toc-screen-id { color: var(--primary); }

.toc-screen-title {
  flex: 1 1 auto;
  color: #40506b;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
}
.toc-screen.current .toc-screen-title { color: var(--primary-deep); font-weight: 800; }

.toc-screen-flag {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: .68rem;
  font-weight: 900;
}

/* PDF 는 실제 진행 화면보다 시각적으로 앞서지 않도록 Secondary 로만 둔다 */
.toc-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.toc-secondary {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}
.toc-secondary:hover { border-color: #b9c9e4; color: var(--primary); }

/* ------------------------------------------------------------
   모바일 조정
   ------------------------------------------------------------ */

@media (max-width: 719px) {
  .lecture-header-inner { gap: 10px; }
  .icon-label { display: none; }
  .p-full { display: none; }
  .p-short { display: inline; }
  /* 상단 진행 표시기는 현재 개념 중심으로 축약한다 */
  .p-list:not(.all):not(.intro) .p-stop:not(.on) { display: none; }
  .p-list.all .p-stop { font-size: .66rem; padding: 5px 7px; }

  .lecture-main { padding: 20px 0 28px; }
  .stage-inner { gap: 15px; }
  .nav-button { min-width: 0; padding: 10px 14px; }
  .nav-label { display: none; }
  .stage-note { margin-top: 8px; }
}

@media (min-width: 640px) {
  .lecture-header-inner,
  .lecture-main,
  .lecture-nav-inner { width: min(1280px, calc(100% - 40px)); }
  .lecture-header-inner { width: min(1360px, calc(100% - 40px)); }
}
