:root {
  --bg: #F4F2ED;
  --surface: #FFFFFF;
  --surface-soft: #ECEAE3;
  --surface-green: #E3EBE6;
  --surface-warm: #F5E6DF;
  --green: #1B3A2C;
  --green-mid: #2C5E46;
  --accent: #C85A32;
  --olive: #687344;
  --ink: #1A1D1B;
  --ink-muted: #525854;
  --line: #D8D5CC;
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Noto Serif KR', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #141715;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* 배경 층: 슬라이드와 분리된 고정 판 */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(44, 94, 70, 0.28), transparent 70%),
    radial-gradient(800px 520px at 92% 96%, rgba(200, 90, 50, 0.16), transparent 70%),
    #141715;
}
#bg .bgl {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
#bg .bgl + .bgl {
  background-image: none;
  background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,0.35));
}

/* 상단 진행 바 */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 100;
  transition: width 0.25s ease;
}

/* 슬라이드 컨테이너 */
.deck {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 64px;
}

.slide {
  display: none;
  width: min(1280px, 100%);
  height: min(820px, 100%);
  background: var(--bg);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  flex-direction: column;
  padding: 36px 52px 28px;
  animation: fadeIn 0.22s ease;
}
.slide.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 단계 등장 (data-step) */
.step {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
html.stepped .step:not(.in) {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* 공통 헤더 & 푸터 */
.slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green);
  margin-bottom: 22px;
  flex-shrink: 0;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--green-mid);
  text-transform: uppercase;
}
.header-logo { height: 28px; width: auto; object-fit: contain; }

.slide-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
}

.slide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: auto;
  font-size: 12px;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.slide-footer .page-code {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
}

/* 타이포그래피 */
h1, h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.28;
}
h2 {
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  margin-bottom: 8px;
}
.lead {
  font-size: clamp(14px, 1.25vw, 16px);
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.lead strong { color: var(--ink); font-weight: 700; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

a.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--green-mid);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
a.pill-link:hover { color: var(--accent); border-color: var(--accent); }

.zoomable { cursor: zoom-in; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.zoomable:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

/* 유틸리티 그리드 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
}
.card.soft { background: var(--surface-soft); border-color: transparent; }
.card.green { background: var(--surface-green); border-color: transparent; }
.card.warm { background: var(--surface-warm); border-color: transparent; }
.card.dark { background: var(--green); color: #F4F2ED; border-color: transparent; }
.card.dark h3, .card.dark strong { color: #FFFFFF; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; line-height: 1.35; }
.card p, .card li { font-size: 13.5px; line-height: 1.55; color: var(--ink-muted); }
.card.dark p, .card.dark li { color: #D7E2DC; }

ul.sq-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
ul.sq-list li { position: relative; padding-left: 14px; }
ul.sq-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 8px;
  color: var(--green-mid);
  line-height: 2.1;
}
ul.sq-list.accent li::before { color: var(--accent); }
ul.sq-list.olive li::before { color: var(--olive); }

/* s00 표지 */
.slide-cover { padding: 0; display: none; flex-direction: row; }
.slide-cover.active { display: flex; }
.cover-left {
  flex: 1.55;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg);
}
.cover-logo { height: 52px; width: auto; align-self: flex-start; }
.cover-main { margin: auto 0; padding: 24px 0; }
.cover-main .kicker { font-size: 13px; margin-bottom: 18px; display: block; }
.cover-main h1 {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.24;
  margin-bottom: 22px;
}
.cover-sub { font-size: 16px; color: var(--ink-muted); line-height: 1.7; }
.cover-bottom strong { display: block; font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.cover-bottom span { font-size: 13px; color: var(--ink-muted); font-family: var(--font-mono); }

.cover-right {
  flex: 0.9;
  background: var(--green);
  color: #F4F2ED;
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dot-matrix { display: grid; grid-template-columns: repeat(10, 1fr); gap: 16px; opacity: 0.9; }
.dot-matrix span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.22); display: block; }
.dot-matrix span.hot { background: var(--accent); }
.cover-toc { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.cover-toc li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}
.cover-toc li:hover { transform: translateX(4px); color: #FFFFFF; }
.cover-toc .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }

/* s01 */
.summary-layout { display: grid; grid-template-columns: 2.3fr 1fr; gap: 20px; flex: 1; min-height: 0; }
.summary-left { display: flex; flex-direction: column; gap: 14px; }
.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 2px; }
.photo-figure img {
  width: 100%;
  height: 155px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  display: block;
}
.photo-figure figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.photo-figure figcaption strong { color: var(--ink); }
.summary-side {
  background: var(--surface-soft);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.qr-mini { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.qr-mini img { width: 68px; height: 68px; border-radius: 4px; background: #fff; padding: 4px; }

/* s02 */
.why-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 10px; }
.why-col { border-top: 2px solid var(--ink); padding-top: 14px; }
.why-col .num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.why-col h3 { font-size: 18px; font-weight: 800; line-height: 1.38; margin-bottom: 10px; word-break: keep-all; }
.why-col p { font-size: 14px; color: var(--ink-muted); line-height: 1.65; word-break: keep-all; }
.answer-banner {
  margin-top: auto;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.answer-pillars { display: flex; align-items: center; gap: 32px; }
.pillar { text-align: center; }
.pillar strong { display: block; font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.pillar span { font-size: 13px; color: #C2D4CA; }
.plus { font-size: 24px; color: var(--accent); font-weight: 700; }

/* s03 */
.flow-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.flow-card {
  background: var(--surface);
  border: 2px solid var(--green);
  border-radius: 6px;
  padding: 16px;
  position: relative;
}
.flow-card.accent { border-color: var(--accent); }
.flow-card.olive { border-color: var(--olive); }
.step-badge {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}
.flow-card.accent .step-badge { background: var(--accent); }
.flow-card.olive .step-badge { background: var(--olive); }
.flow-card h3 { font-size: 16px; margin-bottom: 8px; }
.flow-card p { font-size: 13px; color: var(--ink-muted); line-height: 1.5; word-break: keep-all; }
.loop-bar {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  padding: 6px 0 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.loop-bar::before, .loop-bar::after { content: ""; flex: 1; height: 2px; background: var(--accent); opacity: 0.5; }
.notice-strip {
  background: var(--surface-warm);
  padding: 12px 18px;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  margin-bottom: 18px;
}

/* s04 */
.sol-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sol-card img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--line);
}
.sol-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sol-card-body h3 { font-size: 16px; font-weight: 800; }
.sol-card-body p { font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; }
.sub-tools { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.how-banner {
  margin-top: 14px;
  background: var(--surface-soft);
  border-radius: 6px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* s05 */
.deep-grid { display: grid; grid-template-columns: 240px 1fr; gap: 18px; margin-top: 14px; flex: 1; min-height: 0; }
.deep-left img {
  width: 100%;
  max-height: 365px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.deep-right { display: flex; flex-direction: column; gap: 12px; }
.deep-right img {
  width: 100%;
  max-height: 165px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
}

/* s06 */
.service-col {
  background: var(--surface-soft);
  border-radius: 6px;
  padding: 22px 20px;
  border-top: 5px solid var(--green);
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.service-col.c2 { border-top-color: var(--ink); }
.service-col.c3 { border-top-color: var(--accent); }
.service-col.c4 { border-top-color: var(--olive); }
.service-col h3 { font-size: 19px; font-weight: 800; line-height: 1.35; }
.service-col li { font-size: 14px; line-height: 1.6; }

/* s07 */
.edu-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; flex: 1; min-height: 0; }
.edu-photos { display: flex; flex-direction: column; gap: 12px; }
.edu-photos img { width: 100%; height: 205px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* s08 */
.curr-layout { display: grid; grid-template-columns: 2.2fr 1fr; gap: 22px; flex: 1; }
table.curr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); border-radius: 6px; overflow: hidden; }
table.curr-table th { background: var(--surface-soft); text-align: left; padding: 9px 12px; font-weight: 700; border-bottom: 2px solid var(--line); }
table.curr-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.curr-table .num { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.stage-tag { font-size: 12px; font-weight: 700; color: var(--green-mid); }
.stage-tag.ai { color: var(--accent); }

/* s09 */
.exp-bottom {
  margin-top: auto;
  background: var(--surface-green);
  border-radius: 8px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 20px;
  align-items: center;
}
.exp-bottom img { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; }

/* s10 */
.verif-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; flex: 1; }
.timeline-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.timeline-list li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.timeline-list .yr { font-family: var(--font-mono); font-weight: 700; color: var(--green); }

/* s11 */
.track-layout { display: grid; grid-template-columns: 1.75fr 1fr; gap: 24px; flex: 1; }
.track-list { list-style: none; display: flex; flex-direction: column; }
.track-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}
.track-list .yr { font-family: var(--font-mono); font-weight: 700; color: var(--green-mid); }
.track-list .role { color: var(--accent); font-weight: 700; }

/* s12 */
.work-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; flex: 1; }
.work-item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.work-item .num { font-family: var(--font-mono); font-weight: 700; color: var(--accent); font-size: 15px; }
.proc-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.proc-bar div { background: var(--surface-soft); padding: 12px 8px; text-align: center; font-size: 13.5px; font-weight: 700; border-radius: 4px; }
.contract-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.contract-table td { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.14); font-size: 13.5px; }
.contract-table td:first-child { font-weight: 700; color: #fff; }
.contract-table td:last-child { text-align: right; color: #D7E2DC; }

/* s13 뒷표지 */
.slide-back { justify-content: center; align-items: center; text-align: center; border-bottom: 12px solid var(--green); }
.back-box { max-width: 780px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.back-contact-grid { width: 100%; display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; text-align: left; margin-top: 12px; }
.qr-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: center; }
.qr-trio a { text-decoration: none; color: var(--ink-muted); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qr-trio img { width: 100%; max-width: 110px; background: #fff; padding: 6px; border-radius: 6px; border: 1px solid var(--line); }

/* 하단 컨트롤 바 */
.controls {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 28, 25, 0.9);
  backdrop-filter: blur(10px);
  color: #F4F2ED;
  padding: 7px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 90;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.controls button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: #F4F2ED;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  transition: background 0.15s;
}
.controls button:hover { background: rgba(255,255,255,0.14); }
.controls .counter { font-family: var(--font-mono); font-size: 12.5px; padding: 0 6px; color: #C7D4CD; }
.controls .stepdots { font-family: var(--font-mono); font-size: 11px; color: var(--accent); min-width: 28px; text-align: center; }

/* 목차 */
.overview-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 17, 0.92);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.overview-modal.open { display: flex; }
.overview-panel { background: var(--bg); max-width: 960px; width: 100%; max-height: 85vh; overflow-y: auto; border-radius: 10px; padding: 28px 32px; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 18px; }
.overview-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.overview-item:hover, .overview-item.current { border-color: var(--accent); transform: translateY(-2px); }
.overview-item .code { font-family: var(--font-mono); font-size: 11px; color: var(--accent); font-weight: 700; }
.overview-item .title { font-size: 13.5px; font-weight: 700; margin-top: 4px; color: var(--ink); line-height: 1.4; }

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); background: #fff; }

/* 발표자 화면 (?presenter) */
#presenter { display: none; }
html.presenter #deck, html.presenter .controls, html.presenter #bg, html.presenter .progress-bar { display: none; }
html.presenter body { overflow: auto; background: #101311; }
html.presenter #presenter {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  padding: 24px;
  min-height: 100vh;
  color: #F4F2ED;
}
#presenter .pn-box { background: #1B211E; border-radius: 10px; padding: 22px 24px; }
#presenter .pn-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
#presenter .pn-title { font-family: var(--font-serif); font-size: 26px; line-height: 1.35; margin: 8px 0 14px; }
#presenter .pn-notes { font-size: 18px; line-height: 1.75; color: #D7E2DC; white-space: pre-line; }
#presenter .pn-next { font-size: 16px; color: #C7D4CD; margin-top: 6px; }
#presenter .pn-timer { font-family: var(--font-mono); font-size: 44px; font-weight: 600; }
#presenter .pn-meta { font-family: var(--font-mono); font-size: 13px; color: #9FB0A7; margin-top: 8px; }
#presenter .pn-btns { display: flex; gap: 10px; margin-top: 16px; }
#presenter button {
  background: transparent; color: #F4F2ED; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px; padding: 10px 18px; font-size: 15px; cursor: pointer; font-family: var(--font-sans);
}
#presenter button:hover { background: rgba(255,255,255,0.12); }

/* 반응형 */
@media (max-width: 900px) {
  .slide { padding: 24px 20px 20px; }
  .slide-cover { flex-direction: column; }
  .cover-left, .cover-right { padding: 32px 24px; }
  .dot-matrix { display: none; }
  .summary-layout, .why-cols, .flow-steps, .grid-4, .grid-3, .grid-2, .grid-5,
  .deep-grid, .edu-layout, .curr-layout, .exp-bottom, .verif-layout,
  .track-layout, .work-layout, .back-contact-grid { grid-template-columns: 1fr; }
  .answer-banner { flex-direction: column; text-align: center; }
  html.presenter #presenter { grid-template-columns: 1fr; }
}

/* ?capture : 모든 단계가 들어온 모습 */
html.capture .step { opacity: 1 !important; transform: none !important; }

/* 인쇄 / A4 가로 PDF */
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { height: auto; overflow: visible; background: var(--bg); }
  #bg, .progress-bar, .controls, .overview-modal, .lightbox, #presenter { display: none !important; }
  .deck { display: block; padding: 0; width: 100%; height: auto; }
  .step { opacity: 1 !important; transform: none !important; }
  .slide {
    display: flex !important;
    width: 297mm;
    height: 210mm;
    box-shadow: none;
    border-radius: 0;
    page-break-after: always;
    break-after: page;
    overflow: hidden;
    animation: none;
  }
}
