/* archive · v0.3 · 밝은 화면 기본 · 어두운 화면 토글 */
:root {
  --bg: #F6F4EF;
  --bg2: #EEEBE4;
  --ink: #1B2233;
  --ink2: #4A5368;
  --muted: #5C6578;
  --line: rgba(27, 34, 51, 0.12);
  --glass: #ffffff;
  --card-shadow: 0 1px 2px rgba(27, 34, 51, 0.04), 0 8px 24px rgba(27, 34, 51, 0.06);
  --accent: #C94F0A;
  --btn-bg: #ffffff;
  --btn-bg-hover: #F3F1EB;
  --panel-inset: #F3F1EB;
  --canvas-bg: #F0EEE8;
  --chart-grid: rgba(27, 34, 51, 0.08);
  --edge-stroke: rgba(27, 34, 51, 0.28);
  --hero-from: #1C2742;
  --hero-to: #2B3B62;
  --hero-ink: #F7F5F0;
  --hero-ink2: #D8DEEA;
  --hero-muted: #A8B0C4;
  --hero-line: rgba(247, 245, 240, 0.22);
  --hero-glass: rgba(20, 28, 48, 0.55);
  --hero-tag: rgba(16, 22, 40, 0.55);
  --sans: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --display: "Instrument Serif", "Noto Serif KR", Georgia, serif;
  /* Paul Tol — 밝은 바탕에서도 구분되게 채도·명도 조정 */
  --theme-0: #D63B55; /* 화재·재난 안전 */
  --theme-1: #1A8FB8; /* 디지털트윈·복합재난 */
  --theme-2: #9B2D6B; /* 뇌파·BCI·로보틱스 */
  --theme-3: #D96A3A; /* 생체신호 안전장비 */
  --theme-4: #A08A12; /* 실증·생성형 안전문서 */
  --theme-5: #2F5F96; /* BIM 정책·기획 */
  --theme-6: #1A7A2E; /* BIM 센터·스마트건설 */
  --theme-7: #C94F0A; /* 강조 주황 (BIM 교육 자리) */
  --theme-8: #A84458; /* 논문·연구 원고 */
  --theme-9: #7A35B0; /* AI 도구 실험 */
  --theme-10: #6B7280; /* 기획·업무 참고 */
  color-scheme: light;
}

html.theme-dark {
  --bg: #07060f;
  --bg2: #0e0c1c;
  --ink: #f3f0fb;
  --ink2: #c9c4de;
  --muted: #9d97bb;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(16, 13, 36, 0.72);
  --card-shadow: none;
  --accent: #ffb000;
  --btn-bg: rgba(10, 8, 24, 0.55);
  --btn-bg-hover: rgba(255, 255, 255, 0.08);
  --panel-inset: rgba(0, 0, 0, 0.35);
  --canvas-bg: #0a0914;
  --chart-grid: rgba(255, 255, 255, 0.08);
  --edge-stroke: rgba(255, 255, 255, 0.28);
  --hero-from: #07060f;
  --hero-to: #0e0c1c;
  --hero-ink: #f3f0fb;
  --hero-ink2: #c9c4de;
  --hero-muted: #9d97bb;
  --hero-line: rgba(255, 255, 255, 0.14);
  --hero-glass: rgba(16, 13, 36, 0.72);
  --hero-tag: rgba(7, 6, 15, 0.55);
  --theme-0: #ee6677;
  --theme-1: #66ccee;
  --theme-2: #aa3377;
  --theme-3: #ee8866;
  --theme-4: #ccbb44;
  --theme-5: #4477aa;
  --theme-6: #228833;
  --theme-7: #ffb000;
  --theme-8: #bb5566;
  --theme-9: #9944cc;
  --theme-10: #bbbbbb;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-stage canvas { /* auto-rotate는 JS에서 끔 */ }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--theme-1); text-underline-offset: 0.16em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.theme-toggle {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 50;
  appearance: none;
  border: 1px solid rgba(27, 34, 51, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  background: #ffffff;
  color: #1B2233;
  font: 600 0.78rem / 1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(27, 34, 51, 0.06), 0 6px 18px rgba(27, 34, 51, 0.12);
}
.theme-toggle:hover { border-color: #C94F0A; color: #C94F0A; }
html.theme-dark .theme-toggle {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(16, 13, 36, 0.94);
  color: #f3f0fb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
html.theme-dark .theme-toggle:hover {
  border-color: #ffb000;
  color: #ffb000;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  color: var(--hero-ink);
  background:
    radial-gradient(60% 50% at 70% 30%, rgba(102, 140, 210, 0.28), transparent 70%),
    radial-gradient(45% 40% at 20% 80%, rgba(170, 90, 140, 0.16), transparent 65%),
    linear-gradient(155deg, var(--hero-from) 0%, var(--hero-to) 55%, #354772 100%);
}
.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
.hero-stage canvas:active { cursor: grabbing; }
.theme-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.theme-tag {
  position: absolute;
  left: 0;
  top: 0;
  margin: -0.7em 0 0 10px;
  padding: 2px 8px 2px 14px;
  border-radius: 999px;
  background: var(--hero-tag);
  color: var(--hero-ink);
  font: 500 0.74rem / 1.3 var(--sans);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s;
  will-change: transform;
}
.theme-tag::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
.theme-tag.is-on { opacity: 0.92; }
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 30, 52, 0.82) 0%, rgba(28, 39, 66, 0.48) 38%, rgba(28, 39, 66, 0.12) 62%, transparent 78%),
    linear-gradient(180deg, rgba(20, 30, 52, 0.4) 0%, transparent 22%),
    linear-gradient(0deg, rgba(20, 30, 52, 0.88) 0%, rgba(28, 39, 66, 0.32) 28%, transparent 55%);
}
html.theme-dark .hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 6, 15, 0.88) 0%, rgba(7, 6, 15, 0.55) 38%, rgba(7, 6, 15, 0.15) 62%, transparent 78%),
    linear-gradient(180deg, rgba(7, 6, 15, 0.45) 0%, transparent 22%),
    linear-gradient(0deg, rgba(7, 6, 15, 0.92) 0%, rgba(7, 6, 15, 0.35) 28%, transparent 55%);
}

.hero-ui {
  /* 넓은 화면에서 좌우 padding으로 폭이 0이 되던 버그 수정:
     정렬은 margin으로, 안쪽 여백만 padding으로 둔다. */
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: start;
  box-sizing: border-box;
  width: min(36rem, calc(100% - 40px));
  min-width: min(300px, 100%);
  margin-inline: max(20px, calc((100% - 1120px) / 2));
  padding: max(72px, env(safe-area-inset-top)) 0 28px;
  pointer-events: none;
}
.hero-ui .legend-fold,
.hero-ui .legend,
.hero-ui .legend button { pointer-events: auto; }

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffc857;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.hero h1 {
  margin: 0;
  max-width: 100%;
  color: var(--hero-ink);
  font: 400 clamp(1.85rem, 4.2vw + 0.6rem, 3.4rem) / 1.15 var(--display);
  letter-spacing: -0.015em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
  overflow-wrap: normal;
  word-break: keep-all;
}
.lede {
  margin: 0.7rem 0 0;
  max-width: 36em;
  color: var(--hero-ink2);
  font-size: 1rem;
  line-height: 1.55;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.hero-nums {
  margin: 1rem 0 0;
  padding: 10px 14px;
  border: 1px solid var(--hero-line);
  border-radius: 12px;
  background: var(--hero-glass);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  color: var(--hero-ink);
  font: 400 0.98rem / 1.35 var(--sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow-x: auto;
  text-shadow: none;
}
.hero-nums .sep { color: var(--hero-muted); margin: 0 0.15em; }

.legend-fold {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  color: var(--hero-ink2);
  font-size: 0.78rem;
}
.legend-fold > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  color: var(--hero-muted);
  user-select: none;
}
.legend-fold > summary::-webkit-details-marker { display: none; }
.legend-fold > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid var(--hero-muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s;
}
.legend-fold[open] > summary::before { transform: rotate(90deg); }
.legend-fold > summary:hover { color: var(--hero-ink2); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0.45rem 0 0;
  max-width: 36rem;
}
.legend button {
  appearance: none;
  border: 1px solid var(--hero-line);
  border-radius: 999px;
  background: rgba(12, 18, 34, 0.45);
  color: var(--hero-ink2);
  font: 500 0.66rem / 1.2 var(--sans);
  padding: 3px 8px 3px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.legend button:hover { border-color: rgba(255, 255, 255, 0.45); color: var(--hero-ink); }
.legend button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--hero-ink);
}
.legend button.is-dim { opacity: 0.38; }
.legend .swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, #fff);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.tip {
  position: absolute;
  z-index: 3;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(16, 22, 40, 0.92);
  border: 1px solid var(--hero-line);
  color: var(--hero-ink);
  font-size: 0.78rem;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(12px, 12px);
  max-width: min(90vw, 28rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

main { min-height: 0; }

/* —— 발표 본문 섹션 —— */
.slide-section {
  padding: 72px max(16px, calc((100% - 1120px) / 2 + 16px));
  border-top: 1px solid var(--line);
  background:
    radial-gradient(50% 40% at 10% 0%, rgba(201, 79, 10, 0.05), transparent 70%),
    var(--bg);
}
.slide-section:nth-of-type(even) {
  background:
    radial-gradient(45% 35% at 90% 10%, rgba(47, 95, 150, 0.06), transparent 65%),
    var(--bg2);
}
.section-inner { max-width: 1120px; margin: 0 auto; }
.sec-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.slide-section h2 {
  margin: 0;
  font: 400 clamp(1.9rem, 4vw, 2.8rem) / 1.15 var(--display);
  letter-spacing: -0.02em;
}
.sec-plain {
  margin: 0.55rem 0 0;
  max-width: 40em;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.45;
}
.sec-lede {
  margin: 0.45rem 0 1.5rem;
  max-width: 40em;
  color: var(--ink2);
  font-size: 1.02rem;
}

/* 쉬운 말 (용어) + 첫 등장 팝업 */
.term {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: inherit;
  text-align: inherit;
}
button.term-has-tip {
  cursor: help;
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 70%, var(--ink2));
  border-radius: 0;
}
/* 발표 모드: 장마다 따로 보므로 모든 용어에 밑줄 — 누르면 풀이 */
body.is-presenting span.term[data-term] {
  cursor: help;
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 70%, var(--ink2));
}
body.is-presenting span.term[data-term]:hover,
button.term-has-tip:hover,
button.term-has-tip:focus-visible {
  color: var(--accent);
  outline: none;
}
.term-tech {
  font-size: 0.86em;
  color: var(--muted);
  font-weight: 500;
}
.term-pop {
  position: fixed;
  z-index: 80;
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-strong, #fff);
  box-shadow: var(--card-shadow);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
}
.term-pop-title {
  margin: 0 0 0.35rem;
  font-weight: 650;
  font-size: 0.92rem;
}
.term-pop-body { margin: 0; color: var(--ink2); }

.sec-glossary {
  padding: 40px max(16px, calc((100% - 1120px) / 2 + 16px)) 72px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.glossary-fold {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  padding: 0.35rem 1rem 0.7rem;
}
.glossary-fold > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.05rem;
  padding: 0.65rem 0;
  list-style: none;
}
.glossary-fold > summary::-webkit-details-marker { display: none; }
.glossary-fold > summary::before {
  content: '▸ ';
  color: var(--accent);
}
.glossary-fold[open] > summary::before { content: '▾ '; }
.glossary-lede {
  margin: 0 0 0.9rem;
  color: var(--ink2);
  font-size: 0.92rem;
}
.glossary-list {
  margin: 0;
  display: grid;
  gap: 0.75rem 1.25rem;
}
.glossary-list dt {
  font-weight: 650;
  margin: 0;
}
.glossary-list dd {
  margin: 0.2rem 0 0;
  color: var(--ink2);
  font-size: 0.92rem;
  max-width: 44em;
}
.chart-block { margin: 0 0 1.5rem; }
.twin-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 1.5rem;
}
.chart-panel {
  padding: 16px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  min-width: 0;
}
.chart-panel-wide { margin: 0 0 1.5rem; }
.chart-panel h3 {
  margin: 0 0 0.35rem;
  font: 600 0.92rem / 1.3 var(--sans);
  color: var(--ink);
}
.chart-caption {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.chart-host { width: 100%; overflow: hidden; }
.chart-svg { display: block; max-width: 100%; }
.chart-label, .chart-value, .chart-axis {
  fill: var(--ink2);
  font-family: var(--sans);
  font-size: 11px;
}
.chart-value { fill: var(--ink); font-size: 11px; font-weight: 600; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-bar { opacity: 0.92; }

.problem-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.problem-card {
  margin: 0;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 0;
}
.problem-num {
  margin: 0;
  font: 400 clamp(1.4rem, 2.5vw, 1.85rem) / 1.15 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.problem-label {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink2);
}
.problem-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

/* —— v0.2 과정 7단계 —— */
.process-step {
  opacity: 0.42;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.process-step.is-on,
body.is-presenting .process-step.is-present-slide {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .process-step { opacity: 1; transform: none; transition: none; }
}
.step-stage {
  margin: 0 0 1rem;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 0;
}
.step-graphs {
  margin: 0 0 1.1rem;
  min-width: 0;
}
.step-graphs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}
.process-graph-panel {
  margin: 0;
}
.process-graph-panel .chart-host { min-height: 120px; }
.process-graph-hero {
  grid-column: 1 / -1;
}
.process-graph-hero .chart-svg-hero {
  min-height: 360px;
}
.sec-funnel .process-graph-panel { margin-top: 0.25rem; }
@media (max-width: 520px) {
  .step-graphs-grid { grid-template-columns: 1fr; }
  .chart-label, .chart-value, .chart-axis { font-size: 11px; }
}
.step-setting {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: var(--accent);
  line-height: 1.45;
}
.step-learn {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}
.learn-label {
  font-weight: 600;
  color: var(--ink2);
  margin-right: 2px;
}
.learn-link {
  color: var(--theme-1);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-1) 40%, transparent);
}
.learn-link:hover { border-bottom-color: var(--theme-1); }

.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin: 0;
  min-width: 0;
}
.learn-group {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  box-shadow: var(--card-shadow);
  min-width: 0;
}
.learn-step {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink2);
  line-height: 1.35;
}
.learn-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.learn-list li { margin: 0; min-width: 0; }
.learn-list .learn-link { font-size: 0.85rem; word-break: break-word; }

.extract-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0.75rem; }
.extract-tab {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--ink2);
  font: 500 0.82rem / 1.35 var(--sans);
  padding: 8px 12px;
  cursor: pointer;
}
.extract-tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--theme-1) 14%, transparent);
  border-color: color-mix(in srgb, var(--theme-1) 55%, transparent);
  color: var(--ink);
}
.extract-svg { display: block; width: 100%; max-width: 480px; height: auto; }
.extract-svg .ex-env,
.extract-svg .ex-body rect,
.extract-svg .ex-plain rect,
.extract-svg .ex-page,
.extract-svg .ex-vision circle {
  fill: rgba(102, 204, 238, 0.1);
  stroke: rgba(102, 204, 238, 0.45);
  stroke-width: 1.5;
  opacity: 0.25;
  transition: opacity 0.35s;
}
.extract-svg .is-on { opacity: 1; }
.extract-svg .ex-table { fill: rgba(255, 176, 0, 0.18); stroke: rgba(255, 176, 0, 0.5); }
.extract-svg .ex-blob { fill: rgba(255, 255, 255, 0.12); stroke: none; }
.extract-svg line { stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.5; }
.extract-svg .ex-arrow {
  stroke: rgba(255, 176, 0, 0.7);
  stroke-width: 2;
  fill: none;
  opacity: 0.2;
  transition: opacity 0.35s;
}
.extract-svg .ex-arrow.is-on { opacity: 1; }
.extract-svg .ex-label {
  fill: var(--ink2);
  font-size: 11px;
  font-family: var(--sans);
}

.fp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0.85rem;
}
.fp-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-inset);
  transition: border-color 0.35s, background 0.35s;
}
.fp-card.is-match {
  border-color: rgba(34, 136, 51, 0.55);
  background: rgba(34, 136, 51, 0.12);
}
.fp-name { color: var(--ink2); font-size: 0.8rem; }
.fp-hash { margin: 0.4rem 0 0; font-size: 0.78rem; color: var(--muted); }
.fp-hash span { color: var(--theme-6); font-variant-numeric: tabular-nums; }
.fp-verdict {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  opacity: 0.5;
  transition: opacity 0.35s, color 0.35s;
}
.fp-verdict.is-on { opacity: 1; color: var(--theme-6); }

.chunk-rail { position: relative; }
.chunk-meta { margin: 0 0 0.5rem; font-size: 0.82rem; color: var(--muted); }
.chunk-text {
  max-height: 220px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-inset);
  font: 400 0.78rem / 1.55 var(--sans);
  color: var(--ink2);
  white-space: pre-wrap;
  word-break: break-word;
}
.chunk-text .ch-dim { color: color-mix(in srgb, var(--ink2) 40%, transparent); }
.chunk-text .ch-win {
  color: var(--ink);
  background: rgba(255, 176, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 0, 0.35);
}
.chunk-window {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--theme-7);
}
.chunk-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow: auto;
}
.chunk-list li {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(102, 204, 238, 0.1);
  border: 1px solid rgba(102, 204, 238, 0.28);
  font-size: 0.72rem;
  color: var(--ink2);
}
.step-stub { margin: 0; }

.embed-grids {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0.85rem;
}
.embed-pane, .embed-prod {
  min-width: 0;
}
.embed-prod { margin-top: 0.85rem; }
.embed-cap {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  min-height: 2.4em;
}
.vec-grid {
  display: block;
  width: min(100%, 240px);
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--canvas-bg);
  image-rendering: pixelated;
}
.embed-score {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  color: var(--ink2);
  line-height: 1.45;
}
.embed-score strong { color: var(--theme-7); font-variant-numeric: tabular-nums; }

.pca-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--canvas-bg);
}
.query-scores {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-width: 480px;
}
.query-scores li {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr) 3.2em;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink2);
}
.query-scores .sim-bar { height: 8px; }
.query-scores em { font-style: normal; text-align: right; color: var(--theme-7); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .embed-grids { grid-template-columns: 1fr; }
}

.rrf-list li.is-fly {
  background: rgba(255, 176, 0, 0.12);
  color: var(--ink);
}
.rrf-merged li.is-draft {
  opacity: 0.7;
  transition: opacity 0.4s, transform 0.4s;
}
.rrf-merged li.is-folded {
  opacity: 1;
  background: rgba(34, 136, 51, 0.15);
  color: var(--ink);
}

.extract-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0.75rem;
}
.field-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-inset);
  opacity: 0.35;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s, border-color 0.35s;
}
.field-card.is-on {
  opacity: 1;
  transform: none;
  border-color: rgba(102, 204, 238, 0.45);
}
.field-k {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field-v {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--ink);
  min-height: 1.3em;
}
.alias-line {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--theme-6);
  opacity: 0;
  transition: opacity 0.35s;
}
.alias-line.is-on { opacity: 1; }
.link-graph-wrap { margin-top: 0.85rem; max-width: 420px; }
.link-graph {
  display: block;
  width: 100%;
  height: auto;
}
.lg-node {
  fill: rgba(102, 204, 238, 0.12);
  stroke: rgba(102, 204, 238, 0.5);
  stroke-width: 1.5;
}
.lg-org { fill: rgba(34, 136, 51, 0.15); stroke: rgba(34, 136, 51, 0.5); }
.lg-people { fill: rgba(255, 176, 0, 0.12); stroke: rgba(255, 176, 0, 0.45); }
.lg-txt { fill: var(--ink); font-size: 12px; font-family: var(--sans); }
.lg-sub { fill: var(--muted); font-size: 9px; font-family: var(--sans); }
.lg-edge {
  fill: none;
  stroke: var(--edge-stroke);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
.lg-edge.is-on { stroke: rgba(102, 204, 238, 0.65); stroke-dasharray: none; }

@media (max-width: 720px) {
  .extract-fields { grid-template-columns: 1fr; }
  .rrf-grid { grid-template-columns: 1fr; }
}

/* —— AI 체험 —— */
.demo-block {
  margin: 0 0 1.75rem;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.demo-block h3 {
  margin: 0 0 0.75rem;
  font: 600 1.05rem / 1.3 var(--sans);
}
.demo-hint {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.demo-hint code {
  font-size: 0.85em;
  color: var(--theme-1);
}
.demo-badge {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 176, 0, 0.4);
  color: var(--theme-7);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.sent-list, .query-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sent-btn, .query-btn, .demo-action {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--ink2);
  font: 500 0.82rem / 1.35 var(--sans);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sent-btn:hover, .query-btn:hover, .demo-action:hover {
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
  background: var(--btn-bg-hover);
  color: var(--ink);
}
.sent-btn[aria-pressed="true"], .query-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--theme-1) 14%, transparent);
  border-color: color-mix(in srgb, var(--theme-1) 55%, transparent);
  color: var(--ink);
}
.demo-action {
  margin-top: 0.75rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--ink);
}
.sim-bar-wrap { margin-top: 0.85rem; }
.sim-bar-wrap > .sim-bar { display: none; } /* 아래 순위 막대와 겹치므로 글 한 줄만 */
.sim-rank {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.sim-rank li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 38%) 3.2em;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--ink2);
}
.sim-rank li.is-pair { background: rgba(102, 204, 238, 0.12); color: var(--ink); }
.sim-rank .sim-bar { height: 8px; }
.sim-rank em { font-style: normal; text-align: right; color: var(--theme-7); font-variant-numeric: tabular-nums; }
.sim-anchor { margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--muted); }
.sim-anchor strong { color: var(--ink); font-weight: 600; }
.sim-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--chart-grid);
  overflow: hidden;
}
.sim-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--theme-1), var(--theme-7));
  transition: width 0.35s ease;
}
.sim-score {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--ink2);
}
.mini-map {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--canvas-bg);
}
.rrf-grid {
  max-width: 680px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0.6rem;
}
.rrf-grid h4 {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.rrf-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rrf-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--ink2);
}
.rrf-list li em { font-style: normal; color: var(--theme-7); }
.rrf-merged li.is-top {
  background: rgba(102, 204, 238, 0.12);
  color: var(--ink);
}
.fake-doc, .fake-json {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-inset);
  color: var(--ink2);
  font: 400 0.8rem / 1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.fake-json { margin-top: 0.75rem; color: var(--theme-1); }
.file-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}
.file-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
}
.file-list li.is-group { background: rgba(34, 136, 51, 0.15); }
.fn-raw { color: var(--ink2); }
.fn-norm { color: var(--theme-6); font-size: 0.78rem; }
.minhash-fig { margin-top: 0.75rem; max-width: 420px; }
.minhash-fig svg { width: 100%; height: auto; }
.mh-label { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.mh-box { fill: rgba(102, 204, 238, 0.15); stroke: rgba(102, 204, 238, 0.45); }
.mh-box.mh-b { fill: rgba(34, 136, 51, 0.2); stroke: rgba(34, 136, 51, 0.5); }
.mh-txt { fill: var(--ink); font-size: 12px; font-family: var(--sans); }
.mh-sub { fill: var(--muted); font-size: 10px; font-family: var(--sans); }
.mh-link { stroke: var(--edge-stroke); stroke-width: 1.5; fill: none; }
.mh-circle { fill: rgba(255, 176, 0, 0.12); stroke: rgba(255, 176, 0, 0.45); }

/* —— 결과 한눈에 —— */
.results-grid {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.result-card {
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  box-shadow: var(--card-shadow);
}
.result-k {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.result-num {
  margin: 0.45rem 0 0;
  font: 400 1.15rem / 1.25 var(--display);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.result-line {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink2);
}
.result-line .is-weak {
  color: var(--theme-0);
  font-weight: 600;
}

/* —— 검증·원칙·사용·역할 (구버전 잔여) —— */
.accuracy-grid {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.acc-card {
  margin: 0;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.acc-card.acc-weak {
  border-color: rgba(238, 102, 119, 0.45);
  background: rgba(238, 102, 119, 0.08);
}
.acc-num {
  margin: 0;
  font: 400 clamp(1.35rem, 2.2vw, 1.75rem) / 1.15 var(--display);
}
.acc-label {
  margin: 0.35rem 0 0;
  font-weight: 600;
  font-size: 0.92rem;
}
.acc-note {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}
.search-accuracy {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.search-accuracy li {
  display: grid;
  grid-template-columns: minmax(8em, 14em) 1fr 3em;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-inset);
  font-size: 0.9rem;
  color: var(--ink2);
}
.search-accuracy strong {
  font: 400 1.1rem / 1 var(--display);
  color: var(--theme-7);
  text-align: right;
}
.search-accuracy i {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--theme-7) calc(var(--v) * 10%), rgba(255, 255, 255, 0.08) 0);
}
/* 4~5처럼 범위면 5칸째를 옅게 */
.search-accuracy i.is-range {
  background: linear-gradient(90deg, var(--theme-7) 40%, rgba(255, 176, 0, 0.4) 40% 50%, rgba(255, 255, 255, 0.08) 0);
}

.principle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.principle-list li {
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
}
.principle-list h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.principle-list p {
  margin: 0.4rem 0 0;
  color: var(--ink2);
  font-size: 0.92rem;
}

.usage-mock {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-areas: "badge badge" "mock points";
  gap: 0 28px;
  align-items: start;
}
.usage-mock .demo-badge { grid-area: badge; justify-self: start; }
.usage-mock .mock-search { grid-area: mock; }
.usage-mock .usage-points { grid-area: points; margin-top: 0; }
.nw { white-space: nowrap; }
.mock-search {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  display: grid;
  gap: 12px;
}
.mock-q {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}
.mock-hits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.mock-hits li {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-inset);
  display: grid;
  gap: 4px;
}
.mock-tag {
  font-size: 0.72rem;
  color: var(--muted);
}
.mock-title { font-size: 0.9rem; color: var(--ink2); }
.mock-side {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.mock-side strong {
  font: 400 1.2rem / 1.2 var(--display);
  color: var(--ink);
}
.usage-points {
  margin: 1rem 0 0;
  padding: 0 0 0 1.1rem;
  color: var(--ink2);
  font-size: 0.92rem;
}
.usage-points li { margin: 0 0 0.75rem; }
.usage-points strong { color: var(--ink); }

.roles-wrap { overflow-x: auto; }
.roles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.roles-table th, .roles-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.roles-table thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.roles-table tbody th {
  width: 7.5rem;
  color: var(--theme-7);
  font-weight: 600;
  white-space: nowrap;
}
.roles-table td { color: var(--ink2); }
.roles-foot {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .twin-charts { grid-template-columns: 1fr; }
  .problem-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-row { grid-template-columns: 1fr; }
  .usage-mock { grid-template-columns: 1fr; grid-template-areas: "badge" "mock" "points"; }
  .usage-mock .usage-points { margin-top: 1rem; }
  .accuracy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .slide-section { padding: 52px 16px; }
  .problem-cards { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .accuracy-grid { grid-template-columns: 1fr; }
  .rrf-grid { gap: 6px; }
  .rrf-list li { padding: 5px 6px; font-size: 0.78rem; }
  .search-accuracy li { grid-template-columns: 1fr 2.6em; }
  .sim-rank li { grid-template-columns: 1fr 3.2em; gap: 4px 10px; }
  .sim-rank .sim-bar { grid-column: 1 / -1; grid-row: 2; }
  .search-accuracy i { grid-column: 1 / -1; grid-row: 2; }
}

/* —— 발표 모드 —— */
.present-btn {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--glass);
  color: var(--ink);
  font: 600 0.85rem / 1 var(--sans);
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--card-shadow), 0 8px 28px rgba(27, 34, 51, 0.12);
}
.present-btn:hover { border-color: var(--accent); color: var(--accent); }
.present-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.present-chrome {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  pointer-events: none;
  background: linear-gradient(0deg, color-mix(in srgb, var(--bg) 92%, transparent), transparent);
}
.present-chrome[hidden] {
  display: none !important;
}
.present-chrome .present-nav { pointer-events: auto; display: flex; gap: 8px; }
.present-chrome button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--glass);
  color: var(--ink);
  font: 600 0.85rem / 1 var(--sans);
  cursor: pointer;
  box-shadow: var(--card-shadow);
}
.present-count {
  margin: 0;
  pointer-events: none;
  font: 500 0.85rem / 1 var(--sans);
  color: var(--ink2);
  letter-spacing: 0.06em;
}
body.is-presenting {
  overflow: hidden;
}
body.is-presenting .brand {
  display: none;
}
@media (max-width: 720px) {
  /* 휴대폰: 첫 화면을 벗어나면 '발표' 단추가 본문 숫자를 가리지 않게 숨김 */
  body.hero-away:not(.is-presenting) .present-btn { opacity: 0; pointer-events: none; }
}
.present-btn { transition: opacity 0.25s; }
body.is-presenting .present-btn {
  bottom: calc(56px + env(safe-area-inset-bottom));
}
body.is-presenting .is-present-hidden {
  display: none !important;
}
body.is-presenting .is-present-slide {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  height: 100dvh;
  /* 장 안 스크롤 없음 — 넘치면 비율 축소(present.js fitCard) */
  overflow: hidden;
  padding: 0 0 56px;
  background: var(--bg);
  border-top: none;
}
body.is-presenting #hero.is-present-slide {
  display: grid;
  place-items: center;
  padding: 12px 12px 56px;
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
}
body.is-presenting #hero.is-present-slide .hero-stage,
body.is-presenting #hero.is-present-slide .hero-shade,
body.is-presenting #hero.is-present-slide #hoverTip {
  display: none !important;
}
body.is-presenting #hero.is-present-slide .hero-ui {
  position: relative;
  inset: auto;
  width: min(920px, 100%);
  max-width: 920px;
  margin: 0;
  padding: 28px 24px;
  pointer-events: auto;
  color: var(--hero-ink);
}
body.is-presenting #hero.is-present-slide .legend-fold {
  display: none;
}
body.is-presenting .slide-section.is-present-slide {
  padding: 8px 12px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
body.is-presenting .slide-section.is-present-slide .section-inner {
  flex-shrink: 0; /* 장 높이에 눌려 아래가 잘리지 않게 */
  max-width: none;
  width: auto;
  display: block;
  padding: 0;
  margin: 0;
  overflow: hidden;
  min-width: 0;
}
body.is-presenting .present-split.is-present-pane-hidden {
  display: none !important;
}
body.is-presenting .present-fit-scale {
  width: 100%;
  min-width: 0;
}
body.is-presenting .present-part-label {
  margin: 0 0 8px;
  font: 600 0.9rem / 1.3 var(--sans);
  color: var(--accent);
  letter-spacing: 0.02em;
}
body.is-presenting .is-present-pane-hidden {
  display: none !important;
}
body.is-presenting .has-present-panes .step-graphs-grid {
  display: block;
}
body.is-presenting .has-present-panes .step-stage.is-present-pane,
body.is-presenting .has-present-panes .process-graph-panel.is-present-pane {
  /* 높이 상한 없음 — present.js가 장 전체를 비율 축소 */
  min-height: 0;
  overflow: visible;
}
body.is-presenting .has-present-panes .process-graph-panel.is-present-pane .chart-host {
  max-height: none;
}
body.is-presenting .has-present-panes .step-setting,
body.is-presenting .has-present-panes .step-learn {
  flex-shrink: 0;
}
/* 발표: 장에 딸린 것만 화면에서 빼기. 글을 중간에서 자르거나(줄 수 제한)
   그림 높이를 눌러 담지 않는다 — 넘치면 present.js가 장 전체를 비율대로 줄인다.
   "쉽게 말하면"(.sec-plain)과 제목은 단계의 첫 장에서 절대 빼지 않는다. */
body.is-presenting .theme-toggle,
body.is-presenting .present-btn,
body.is-presenting main > :not(.is-present-slide) {
  display: none !important;
}
/* 휴대폰 가로처럼 낮은 화면에서만: 글자를 읽을 수 있게 두고 장 안에서 위아래로 밀어 본다 */
body.is-presenting .slide-section.is-present-slide[data-present-scroll] {
  overflow-y: auto;
  justify-content: flex-start;
  overscroll-behavior: contain;
}
/* 표지: 가운데에, 아래 장 번호 띠는 어두운 바탕에 맞춰 투명하게 */
body.is-presenting #hero.is-present-slide .hero-ui {
  align-self: center;
  justify-self: center;
}
body.is-presenting:has(#hero.is-present-slide) .present-chrome {
  background: none;
}
body.is-presenting:has(#hero.is-present-slide) .present-count {
  color: var(--hero-ink);
}
@media (max-width: 720px) {
  /* 휴대폰 세로 발표: 두 문장의 숫자 무늬를 나란히(세로로 쌓으면 장이 길어져 글자가 12px로 줄었음) */
  body.is-presenting .embed-grids {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  body.is-presenting .learn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
body.is-presenting .present-trim-1 .step-learn {
  display: none !important;
}
body.is-presenting .present-trim-2 .step-setting,
body.is-presenting .present-trim-2 .demo-hint {
  display: none !important;
}
body.is-presenting .present-trim-3 .sec-lede {
  display: none !important;
}
body.is-presenting .present-trim-4 .chart-caption,
body.is-presenting .present-trim-4 .demo-badge {
  display: none !important;
}
/* 같은 단계의 두 번째 장부터(휴대폰 가로처럼 낮은 화면만): 앞 장에 나온 제목·쉽게 말하면은 빼고 장 이름(눈썹 글)만 */
body.is-presenting .present-trim-5 h2,
body.is-presenting .present-trim-5 .sec-plain {
  display: none !important;
}
/* 짧은 화면: 장 안 여백 더 줄임 */
@media (max-height: 420px) {
  body.is-presenting .slide-section.is-present-slide {
    padding-top: 4px;
    padding-bottom: 48px;
  }
  body.is-presenting .present-chrome {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  body.is-presenting .process-graph-panel h3 {
    font-size: 0.95rem;
    margin: 0 0 4px;
  }
}
body.is-presenting .process-graph-hero .chart-svg-hero {
  min-height: 0;
}
body.is-presenting .results-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  body.is-presenting .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-height: 500px) {
  body.is-presenting .results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body.is-presenting .result-card {
    padding: 10px 12px;
  }
  body.is-presenting .result-line {
    display: none;
  }
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 28px max(16px, calc((100% - 1120px) / 2 + 16px));
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--bg2);
}
.brand a { color: inherit; text-decoration: none; }
.brand a:hover { color: var(--ink); }
.brand img { display: block; height: 20px; width: auto; opacity: 0.9; }
.brand .ver { margin-left: auto; opacity: 0.7; }

@media (max-width: 720px) {
  .hero-ui {
    /* Galaxy S9+(320)에서도 제목 폭 ≥300 되도록 좌우 8px */
    width: calc(100% - 16px);
    min-width: 0;
    margin-inline: 8px;
    /* 아래 68px: 오른쪽 아래 '발표' 단추가 범례를 가리지 않게 */
    padding: max(56px, env(safe-area-inset-top)) 0 68px;
  }
  .hero h1 { font-size: clamp(1.7rem, 7.5vw, 2.4rem); }
  .hero-nums {
    font-size: 0.82rem;
    padding: 8px 10px;
    white-space: normal;
  }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(20, 30, 52, 0.3) 0%, transparent 18%),
      linear-gradient(0deg, rgba(20, 30, 52, 0.94) 0%, rgba(28, 39, 66, 0.82) 48%, rgba(28, 39, 66, 0.35) 62%, transparent 74%);
  }
  html.theme-dark .hero-shade {
    background:
      linear-gradient(180deg, rgba(7, 6, 15, 0.35) 0%, transparent 18%),
      linear-gradient(0deg, rgba(7, 6, 15, 0.97) 0%, rgba(7, 6, 15, 0.86) 48%, rgba(7, 6, 15, 0.4) 62%, transparent 74%);
  }
  .brand .ver { margin-left: 0; width: 100%; }
  .theme-toggle { font-size: 0.72rem; padding: 7px 12px; }
}

/* 단계 5: 질문 → 지도 안에서 가까운 40개가 빛남 (M3.2) */
.map-find {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 0.75rem;
}
.mini-map {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--canvas-bg);
}
.map-find .demo-hint { margin-top: 0; }
@media (max-width: 720px) {
  .map-find { grid-template-columns: 1fr; }
}

/* v0.3 점검: 그래프 값 상자 · 두 칸 배치 */
.chart-tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  max-width: min(320px, calc(100vw - 16px));
  padding: 6px 9px;
  border-radius: 8px;
  background: #1B2233;
  color: #fff;
  font: 500 12px / 1.4 var(--sans);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.chart-tip[hidden] { display: none; }
.step-graphs-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.process-graph-full { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .step-graphs-grid.cols-2 { grid-template-columns: 1fr; }
}
