@charset "utf-8";
/* ============================================================
   WORKNEST — 과목 상세(목차) 화면
   ============================================================ */

/* ── 과목 헤더 ────────────────────────────────────────────── */
.book-hero {
  position: relative; overflow: hidden;
  /* 이 화면의 헤더는 흰 배경(불투명)이라 겹치지 않는다. 보통 여백만 준다. */
  padding: 44px 0 56px;
  background: radial-gradient(110% 120% at 78% 0%, #1B2C4C 0%, var(--navy) 58%, #080D18 100%);
  color: #fff;
}
.book-hero::after {
  content: ''; position: absolute; right: -140px; top: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: rgba(53,178,223,.22); filter: blur(90px); pointer-events: none;
}
.book-hero .breadcrumb { color: rgba(255,255,255,.5); }
.book-hero .breadcrumb a:hover { color: #fff; }
.book-hero .breadcrumb span { color: rgba(255,255,255,.34); }

.book-hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 230px 1fr; gap: 42px; align-items: center;
  margin-top: 26px;
}
.book-hero-cover {
  border-radius: 4px 10px 10px 4px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
  transform: perspective(1000px) rotateY(-11deg);
  position: relative;
}
.book-hero-cover::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.42), transparent);
}
.book-hero h1 { margin: 12px 0 12px; font-size: clamp(1.7rem, 1.15rem + 2.2vw, 2.7rem); }
.book-hero .lead { color: rgba(255,255,255,.72); max-width: 560px; }

.book-stats {
  display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 24px;
}
.book-stat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  font-size: .84rem; color: rgba(255,255,255,.82);
}
.book-stat b { color: #fff; font-weight: 700; }

/* ── 열람 권한 안내 띠 ────────────────────────────────────── */
.access-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin: 26px 0 0; padding: 18px 22px;
  border-radius: var(--r); font-size: .92rem;
  border: 1px solid;
}
.access-note p { flex: 1; min-width: 240px; }
.access-note strong { display: block; margin-bottom: 3px; }
.access-note.is-guest    { background: var(--blue-soft);  border-color: #C9DBFF; color: #1E3A8A; }
.access-note.is-pending  { background: var(--amber-soft); border-color: #FBD9A5; color: #92400E; }
.access-note.is-granted  { background: var(--green-soft); border-color: #B7E4C7; color: #14532D; }

/* ── 목차 ─────────────────────────────────────────────────── */
.toc { margin-top: 40px; }
.toc-part {
  display: flex; align-items: center; gap: 14px;
  margin: 34px 0 14px; font-size: .82rem; font-weight: 700;
  letter-spacing: .1em; color: var(--gray-2); text-transform: uppercase;
}
.toc-part::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.toc-part:first-child { margin-top: 0; }

.toc-list { display: grid; gap: 10px; }

.toc-row {
  position: relative;
  display: grid; grid-template-columns: 74px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              border-color .22s var(--ease), background-color .22s var(--ease);
}
a.toc-row:hover {
  transform: translateX(4px);
  border-color: #BFD3F5; box-shadow: var(--shadow-2);
}
a.toc-row:hover .toc-title { color: var(--blue); }

.toc-code {
  font-size: .82rem; font-weight: 700; color: var(--blue);
  letter-spacing: -.01em;
}
.toc-title { font-size: 1.02rem; font-weight: 700; transition: color .2s var(--ease); }
.toc-sub { font-size: .85rem; color: var(--gray-2); margin-top: 3px; }

.toc-side { display: flex; align-items: center; gap: 10px; }
.toc-arrow { color: var(--gray-3); transition: transform .22s var(--ease), color .22s var(--ease); }
a.toc-row:hover .toc-arrow { color: var(--blue); transform: translateX(3px); }

/* 잠긴 항목 */
.toc-row.is-locked { background: var(--bg-soft); border-style: dashed; }
.toc-row.is-locked .toc-title { color: var(--gray-2); }
.toc-row.is-locked .toc-code  { color: var(--gray-3); }
.toc-row.is-locked:hover { border-color: #CBD5E1; }

/* 준비 중 항목 */
.toc-row.is-soon { opacity: .62; }

.lock-ico { width: 15px; height: 15px; color: var(--gray-3); flex-shrink: 0; }

/* 잠긴 줄을 누르면 나오는 말풍선 */
.toc-row.is-locked { cursor: pointer; }
.lock-tip {
  position: absolute; right: 20px; top: calc(100% - 4px); z-index: 10;
  width: max-content; max-width: 280px;
  padding: 11px 15px; border-radius: var(--r-sm);
  background: var(--navy-2); color: #fff; font-size: .82rem; line-height: 1.55;
  box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.lock-tip a { color: #93C5FD; text-decoration: underline; }
.toc-row.show-tip .lock-tip { opacity: 1; transform: none; pointer-events: auto; }

/* ── 진행률 ───────────────────────────────────────────────── */
.progress-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 20px 24px; margin-top: 32px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
}
.progress-card .p-text { flex: 1; min-width: 200px; font-size: .9rem; color: var(--gray); }
.progress-card .p-text b { color: var(--ink); }
.progress-bar { flex: 1 1 220px; height: 8px; border-radius: 8px; background: var(--bg-mute); overflow: hidden; }
.progress-bar i { display: block; height: 100%; border-radius: 8px; background: var(--brand-gradient); transition: width .9s var(--ease); }

/* ── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .book-hero-grid { grid-template-columns: 150px 1fr; gap: 24px; align-items: start; }
}
@media (max-width: 640px) {
  .book-hero { padding-bottom: 38px; }
  .book-hero-grid { grid-template-columns: 116px 1fr; gap: 18px; }
  .book-hero-cover { transform: none; }
  .toc-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 15px 16px; }
  .toc-code { grid-column: 1 / -1; }
  .toc-title { font-size: .96rem; }
  .toc-sub { font-size: .8rem; }
  .lock-tip { right: 8px; left: 8px; max-width: none; }
}
