:root {
  --ink: #0e1215;
  --ink-2: #161b20;
  --paper: #efe8da;
  --paper-2: #f5f1e7;
  --on: #f3efe6;
  --on-dim: rgba(243, 239, 230, 0.58);
  --on-faint: rgba(243, 239, 230, 0.34);
  --hair: rgba(243, 239, 230, 0.14);
  --paper-ink: #16191d;
  --paper-dim: rgba(22, 25, 29, 0.56);
  --paper-hair: rgba(22, 25, 29, 0.16);
  --air: #6fb6ad;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--on);
  background: var(--ink);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* ---------- rail ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 10px clamp(16px, 4vw, 56px);
  background: rgba(14, 18, 21, 0.74);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hair);
}

.rail-back {
  flex: 0 0 auto;
  color: var(--on-dim);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.rail-back:hover { color: var(--on); }

.rail-poll {
  flex: 1 1 auto;
  display: flex;
  gap: clamp(8px, 1.6vw, 22px);
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: center;
}
.rail-poll::-webkit-scrollbar { display: none; }

.ptog {
  display: grid;
  gap: 1px;
  padding: 4px 2px 6px;
  border: 0;
  border-top: 2px solid transparent;
  background: transparent;
  color: var(--on-faint);
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ptog b { font-size: 14px; font-weight: 800; letter-spacing: 0.01em; }
.ptog i { font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: 0.08em; opacity: 0.8; }
.ptog:hover { color: var(--on-dim); }
.ptog.is-active { color: var(--on); border-top-color: var(--on); }

.rail-station {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 1px;
  padding: 4px 0 4px 14px;
  border: 0;
  background: transparent;
  color: var(--on);
  text-align: right;
}
.rail-station span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-faint);
}
.rail-station strong { font-size: 15px; font-weight: 700; }
.rail-station::after { content: " ▾"; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 62px);
  overflow: hidden;
}
.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 62px);
  padding: clamp(24px, 5vw, 72px);
}
.eyebrow {
  position: absolute;
  top: clamp(20px, 5vw, 44px);
  left: clamp(24px, 5vw, 72px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--on-dim);
}
.hero-foot { display: grid; gap: clamp(10px, 1.6vw, 18px); max-width: 1100px; }
.hero-area {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-dim);
}
.hero-name {
  font-size: clamp(40px, 7.4vw, 104px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.022em;
  color: var(--on);
}
.hero-grade {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 800;
  color: var(--grade, var(--air));
}
.hero-grade::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--grade, var(--air));
  box-shadow: 0 0 22px var(--grade, var(--air));
}
.hero-line {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2.6vw, 34px);
  flex-wrap: wrap;
}
.hero-poll {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dim);
}
.hero-num { display: inline-flex; align-items: baseline; gap: 8px; }
.hero-num strong {
  font-size: clamp(34px, 4.2vw, 60px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-num em { font-style: normal; font-size: 16px; font-weight: 600; color: var(--on-dim); }
.hero-caption {
  max-width: 48ch;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.62;
  color: var(--on-dim);
}
.hero-weather {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-faint);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-faint);
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { opacity: 0.3; transform: translate(-50%, 0); } 50% { opacity: 0.7; transform: translate(-50%, 5px); } }

/* ---------- poll cards (7 항목 펼침) ---------- */
.poll-cards {
  padding: clamp(28px, 5vh, 48px) clamp(16px, 4vw, 56px) clamp(10px, 3vh, 28px);
  background: var(--ink);
  border-top: 1px solid var(--hair);
}
.poll-cards-head { max-width: 1240px; margin: 0 auto clamp(14px, 2.4vh, 24px); }
.poll-cards-head h2 {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--on);
  margin: 0 0 6px;
}
.poll-cards-head p {
  font-size: 13px;
  color: var(--on-dim);
  margin: 0;
}
.poll-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-width: 1240px;
  margin: 0 auto;
}
.poll-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(243, 239, 230, 0.04);
  border: 1px solid var(--hair);
  border-radius: 12px;
  color: var(--on);
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.poll-card:hover { background: rgba(243, 239, 230, 0.07); }
.poll-card.is-active {
  background: rgba(243, 239, 230, 0.09);
  border-color: rgba(243, 239, 230, 0.34);
}
.poll-card .pc-row { display: flex; align-items: center; gap: 10px; }
.poll-card .pc-row-2 { justify-content: space-between; }
.poll-card .pc-dot {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}
.poll-card .pc-label {
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.poll-card .pc-grade {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-style: normal;
}
.poll-card .pc-full {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--on-dim);
  text-transform: uppercase;
}
.poll-card .pc-num { display: inline-flex; align-items: baseline; gap: 4px; }
.poll-card .pc-num strong {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--on);
}
.poll-card .pc-num em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-dim);
}

/* ---------- plates ---------- */
.plate { padding: clamp(56px, 9vh, 132px) clamp(20px, 5vw, 72px); }
.plate-inner { max-width: 1240px; margin: 0 auto; }

.plate-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: clamp(22px, 3vw, 40px);
  border-bottom: 1px solid var(--hair);
}
.plate-head .plate-no {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-faint);
}
.plate-head h2 {
  font-size: clamp(24px, 3.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.04;
}
.plate-head .plate-sub {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--on-dim);
  text-align: right;
}
.plate-head.sub { margin-top: clamp(40px, 6vw, 80px); }

/* portrait */
.portrait-wrap {
  height: clamp(420px, 56vh, 640px);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: #10151a;
}
.portrait-wrap canvas { display: block; width: 100%; height: 100%; }
.plate-caption {
  max-width: 62ch;
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--on-dim);
}
.plate-legend {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-faint);
}

/* portrait: flowing day (B) + rhythm band (A) */
.portrait-stage {
  position: relative;
  height: clamp(360px, 50vh, 560px);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: #0c1013;
}
.portrait-stage canvas { display: block; width: 100%; height: 100%; }
.portrait-readout {
  position: absolute;
  left: clamp(16px, 2.4vw, 30px);
  top: clamp(16px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.pr-hour { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; color: var(--on-dim); }
.pr-grade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--grade, var(--air));
}
.pr-grade::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--grade, var(--air));
  box-shadow: 0 0 16px var(--grade, var(--air));
}
.pr-num { display: inline-flex; align-items: baseline; gap: 6px; }
.pr-num strong { font-size: clamp(30px, 4vw, 52px); font-weight: 200; line-height: 1; }
.pr-num em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--on-dim); }
.portrait-timeline { display: flex; align-items: stretch; gap: 14px; margin-top: 14px; }
.portrait-play {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: transparent;
  color: var(--on);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.portrait-play:hover { background: rgba(243, 239, 230, 0.06); }
#portraitBand {
  flex: 1 1 auto;
  display: block;
  width: 100%;
  height: 56px;
  border: 1px solid var(--hair);
  cursor: pointer;
  touch-action: none;
}

/* atlas (ink band — 보랏빛 라디얼이 잉크 위에 옅게 깔리는 밤하늘 도판) */
.atlas {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(138, 126, 168, 0.10), transparent 42%),
    radial-gradient(ellipse at 50% 92%, rgba(118, 110, 152, 0.06), transparent 38%),
    var(--ink);
  color: var(--on);
  overflow: hidden;
}
.atlas .plate-head { border-bottom-color: var(--hair); }
.atlas .plate-head .plate-no { color: var(--on-faint); }
.atlas .plate-head .plate-sub { color: var(--on-dim); }
.atlas-wrap {
  position: relative;
  height: clamp(440px, 60vh, 700px);
  overflow: hidden;
  border: 1px solid rgba(158, 152, 184, 0.15);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(138, 126, 168, 0.05), transparent 60%),
    #13131a;
}
.atlas-wrap canvas { display: block; width: 100%; height: 100%; }
.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 28px);
  padding: 8px 10px;
  border: 1px solid rgba(158, 152, 184, 0.18);
  background: rgba(20, 18, 28, 0.72);
  backdrop-filter: blur(8px);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--on);
}
.map-legend i { width: 11px; height: 11px; border-radius: 50%; }

.atlas-timeline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.atlas-timeline .scrubber { flex: 1 1 auto; margin-top: 0; }
.atlas-play {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid rgba(158, 152, 184, 0.28);
  border-radius: 2px;
  background: transparent;
  color: var(--on);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.atlas-play:hover { background: rgba(138, 126, 168, 0.10); border-color: rgba(158, 152, 184, 0.46); }
@media (max-width: 560px) {
  .atlas-timeline { flex-wrap: wrap; }
  .atlas-play { width: 100%; }
}

.scrubber {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}
.scrubber span, .scrubber strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dim);
}
.scrubber strong { color: var(--on); }
.scrubber input { width: 100%; accent-color: var(--on); }

/* notes: clues + school */


/* history: year × month heatmap */
.history-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(20px, 4vw, 48px);
  margin-bottom: 18px;
}
.history-tabs {
  display: flex;
  gap: clamp(8px, 1.4vw, 20px);
}
.history-tab {
  padding: 4px 2px 6px;
  border: 0;
  border-top: 2px solid transparent;
  background: transparent;
  color: var(--on-faint);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.history-tab:hover { color: var(--on-dim); }
.history-tab.is-active { color: var(--on); border-top-color: var(--on); }
.history-stage {
  height: clamp(420px, 62vh, 720px);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: #0c1013;
}
.history-stage canvas { display: block; width: 100%; height: 100%; }



/* history — comparison panel */
.history-compare {
  margin-top: clamp(24px, 3vw, 40px);
  padding-top: clamp(20px, 2.4vw, 28px);
  border-top: 1px solid var(--hair);
}
.compare-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(16px, 2vw, 22px);
}
.compare-head .compare-no {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-faint);
}
.compare-head h3 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.012em;
}
.compare-sub {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-dim);
}
.compare-rows {
  display: grid;
  gap: 0;
  max-width: 760px;
}
.compare-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  align-items: baseline;
  gap: clamp(14px, 3vw, 36px);
  padding: 14px 0;
  border-top: 1px solid var(--hair);
}
.compare-row:first-child { border-top: 0; }
.compare-row.now strong { font-weight: 800; color: var(--on); }
.compare-row .label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--on-dim);
}
.compare-row .label em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--on-faint);
  margin-left: 6px;
  text-transform: uppercase;
}
.compare-row .value {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 200;
  color: var(--on);
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}
.compare-row .value em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-dim);
  margin-left: 4px;
}
.compare-row .delta {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: right;
  min-width: 96px;
}
.compare-row .delta.down { color: #5aa7c8; }
.compare-row .delta.up { color: #d19a3a; }
.compare-row .delta.neutral { color: var(--on-faint); }
.compare-note {
  margin-top: clamp(18px, 2vw, 26px);
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.62;
  color: var(--on-dim);
}
.compare-more {
  margin-top: clamp(18px, 2vw, 26px);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.compare-more a {
  color: var(--air);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.compare-more a:hover { color: var(--on); }



/* rail chapter link — 별책/LAB 간 이동 (선명히) */
.rail-chapter,
.rail-chapter:link,
.rail-chapter:visited,
.rail-chapter:active {
  flex: 0 0 auto;
  position: relative;
  margin-left: 6px;
  padding-left: 14px;
  color: var(--on);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.rail-chapter::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--on-faint);
}
.rail-chapter:hover { color: var(--air); }

/* 챕터 전환 도판 — 본문 끝, 별책으로 이끄는 자리 */
.chapter-next {
  position: relative;
  padding: clamp(96px, 16vh, 200px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--hair);
  background:
    radial-gradient(ellipse at 50% 8%, rgba(108, 188, 178, 0.20), transparent 42%),
    radial-gradient(ellipse at 50% 92%, rgba(86, 172, 206, 0.13), transparent 38%);
  text-align: center;
  overflow: hidden;
}
.chapter-next .plate-inner { max-width: 720px; margin: 0 auto; }

.chapter-no {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--on-faint);
  margin-bottom: clamp(40px, 6vw, 64px);
}

.chapter-link,
.chapter-link:link,
.chapter-link:visited,
.chapter-link:active {
  display: block;
  color: var(--on);
  text-decoration: none;
}

.chapter-title {
  color: var(--on);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -0.018em;
  line-height: 1.0;
  margin: 0;
  transition: opacity 0.3s ease;
}

.chapter-sub {
  margin: clamp(18px, 2.2vw, 26px) auto 0;
  max-width: 50ch;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.66;
  color: var(--on-dim);
}

.chapter-cta {
  display: inline-block;
  margin-top: clamp(36px, 4vw, 52px);
  padding: 13px 28px;
  border: 1px solid var(--hair);
  color: var(--on);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, letter-spacing 0.25s ease;
}
.chapter-link:hover .chapter-cta {
  background: var(--on);
  color: var(--ink);
  border-color: var(--on);
  letter-spacing: 0.26em;
}
.chapter-link:hover .chapter-title { opacity: 0.92; }

@media (max-width: 560px) {
  .chapter-title { font-size: clamp(30px, 8.4vw, 44px); }
  .chapter-next { padding: clamp(64px, 10vh, 100px) 20px; }
  .chapter-cta { padding: 11px 22px; font-size: 11px; }
}

/* glossary — quiet closing reference */
.glossary {
  padding: clamp(40px, 7vh, 96px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--hair);
}
.glossary .plate-head { margin-bottom: clamp(20px, 2.4vw, 32px); }
.glossary-list {
  display: grid;
  gap: 0;
  max-width: 960px;
}
.glossary-item {
  padding: 22px 0;
  border-top: 1px solid var(--hair);
}
.glossary-item:first-child { border-top: 0; padding-top: 0; }
.glossary-term {
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--on);
}
.glossary-term em {
  font-style: normal;
  margin-left: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--on-dim);
}
.glossary-desc {
  margin-top: 8px;
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.66;
  color: var(--on-dim);
}
.glossary-thresh {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--on-faint);
}

/* footer */
.bold-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 36px clamp(20px, 5vw, 72px) 56px;
  border-top: 1px solid var(--hair);
  color: var(--on-dim);
  font-size: 13px;
  line-height: 1.5;
}
.bold-footer strong { color: var(--on); font-weight: 800; }
.bold-footer a { color: var(--air); font-weight: 700; text-decoration: none; }

/* index overlay (right drawer) */
.index-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(7, 10, 12, 0.82);
  backdrop-filter: blur(8px);
}
.index-overlay[hidden] { display: none; }
.index-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(520px, 92vw);
  height: 100%;
  padding: 22px clamp(18px, 2.4vw, 30px);
  background: var(--ink-2);
  border-left: 1px solid var(--hair);
  overflow-y: auto;
}
.index-panel header { display: flex; align-items: center; justify-content: space-between; }
.index-panel header strong { font-size: 16px; font-weight: 800; letter-spacing: 0.04em; }
#indexClose { border: 0; background: transparent; color: var(--on-dim); font-size: 13px; font-weight: 700; }
#indexClose:hover { color: var(--on); }
#indexSearch {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--on);
  outline: none;
}
#indexSearch::placeholder { color: var(--on-faint); }
.index-list { display: grid; gap: 0; }
.index-row {
  display: grid;
  grid-template-columns: 12px 60px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  color: var(--on);
  text-align: left;
  transition: background 0.15s ease;
}
.index-row:hover { background: rgba(243, 239, 230, 0.05); }
.index-row.is-active { background: rgba(243, 239, 230, 0.08); }
.index-dot { width: 10px; height: 10px; border-radius: 50%; }
.index-area { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-faint); }
.index-row strong { font-size: 16px; font-weight: 700; }
.index-val { font-size: 11px; font-weight: 700; color: var(--on-dim); text-align: right; }
.index-empty { padding: 16px 6px; color: var(--on-dim); font-size: 14px; }

.read-key {
  max-width: 66ch;
  margin-bottom: clamp(20px, 2.6vw, 34px);
  font-size: 13px;
  line-height: 1.62;
  color: var(--on-dim);
}
.read-key b { color: var(--on); font-weight: 700; letter-spacing: 0.04em; }
.atlas .read-key { color: var(--on-dim); }
.atlas .read-key b { color: var(--on); }

/* responsive */
@media (max-width: 860px) {
  /* 모바일에서는 헤더의 7개 탭이 좁아 정보가 잘 안 들어옴 → 숨기고 hero 아래 카드 그리드로 한 눈에 본다 */
  .rail-poll { display: none; }
  .poll-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .poll-card { padding: 12px; gap: 6px; }
  .poll-card .pc-label { font-size: 15px; }
  .poll-card .pc-num strong { font-size: 20px; }
  .ptog i { display: none; }
  .hero-content { gap: 26px; }
  .eyebrow { position: absolute; top: clamp(18px, 5vw, 32px); left: clamp(20px, 5vw, 32px); }
  .plate { padding: clamp(40px, 7vh, 90px) clamp(18px, 5vw, 32px); }
  .plate-head h2 { font-size: clamp(22px, 5vw, 32px); }
  .portrait-stage { height: clamp(300px, 46vh, 460px); }
  .atlas-wrap { height: clamp(360px, 52vh, 540px); }
  .history-stage { height: clamp(360px, 56vh, 560px); }
  .history-controls { gap: 12px 16px; }
  .history-tabs { flex-wrap: wrap; gap: 10px 16px; }
  .portrait-timeline { gap: 10px; }
  .glossary { padding: clamp(36px, 6vh, 72px) clamp(18px, 5vw, 32px); }
}

@media (max-width: 560px) {
  .rail { gap: 10px; padding: 8px 14px; min-height: 56px; }
  .rail-station span { display: none; }
  .rail-station strong { font-size: 13px; }
  .ptog b { font-size: 13px; }
  .hero-name { font-size: clamp(36px, 11vw, 64px); letter-spacing: -0.018em; }
  .hero-num strong { font-size: clamp(28px, 7.4vw, 48px); }
  .hero-caption { font-size: 14px; }
  .portrait-stage { height: clamp(260px, 44vh, 360px); }
  .pr-num strong { font-size: clamp(24px, 6.4vw, 36px); }
  .portrait-readout { left: 12px; top: 12px; }
  .portrait-timeline { flex-wrap: wrap; }
  .portrait-play { width: 100%; }
  #portraitBand { height: 50px; }
  .atlas-wrap { height: clamp(320px, 56vh, 460px); }
  .scrubber { grid-template-columns: 1fr; gap: 8px; }
  .scrubber strong { text-align: left; }
  .history-stage { height: clamp(320px, 60vh, 480px); }
  .history-tabs { font-size: 12px; }
  .history-tab { font-size: 12px; }
  .plate-head { gap: 10px; }
  .plate-head .plate-sub { width: 100%; margin-left: 0; text-align: left; }
  .glossary-term em { display: block; margin: 4px 0 0 0; }
}
