/* ============================================================
   presentation-theme.css
   Logis-AI 슬라이드 프레젠테이션 전용 테마
   Reveal.js 5.x 위에 덮어씌우는 브랜드 스타일
   ============================================================ */

/* ── AI/AX 라이트 테크 브랜드 변수 ─────────────────────────── */
:root {
  /* Cobalt blue + gradient accent (Minimal AI) */
  --brand:          #3B82F6;
  --brand-glow:     rgba(59, 130, 246, 0.35);
  --brand-light:    rgba(59, 130, 246, 0.1);
  --brand-border:   rgba(59, 130, 246, 0.28);
  --accent-violet:  #8B5CF6;
  --accent-violet-glow: rgba(139, 92, 246, 0.25);
  --accent-pink:    #EC4899;
  --accent-mint:    #06B6D4;

  /* Light slide layer (전체 슬라이드) */
  --bg:             #F8F9FA;
  --bg-aurora:      radial-gradient(ellipse 70% 55% at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 55%),
                    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
                    linear-gradient(180deg, #fafbff 0%, #F8F9FA 60%, #f4f6fc 100%);
  --surface:        #FFFFFF;
  --surface-low:    #F2F4F8;
  --surface-high:   #E6E8F2;
  --on-surface:     #181c23;
  --on-muted:       #414753;
  --outline:        #c1c6d6;
  --outline-faint:  rgba(193, 198, 214, 0.45);
  --card-shadow:    0 2px 12px rgba(24, 28, 35, 0.06);
  --card-shadow-lg: 0 8px 28px rgba(24, 28, 35, 0.08);
  --card-shadow-accent: 0 4px 20px rgba(59, 130, 246, 0.14);
  --glass-blur:     blur(10px);
  --glass-border:   1px solid var(--outline-faint);

  /* Demo/code 패널 (메인과 동일 톤) */
  --demo-bg:             var(--bg);
  --demo-surface:        var(--surface);
  --demo-surface-low:    var(--surface-low);
  --demo-surface-high:   var(--surface-high);
  --demo-on-surface:     var(--on-surface);
  --demo-on-muted:       var(--on-muted);
  --demo-outline:        var(--outline);
  --demo-outline-faint:  var(--outline-faint);
  --demo-brand:          var(--brand);
  --demo-brand-light:    var(--brand-light);
  --demo-brand-border:   var(--brand-border);

  /* IDE (데모 패널) */
  --ide-bg:         #1e1e1e;
  --ide-titlebar:   #2d2d2d;
  --ide-border:     rgba(0,0,0,0.18);
  --ide-text:       #d4d4d4;
  --ide-muted:      #969696;
}

/* ── 전역 리셋 / Reveal 오버라이드 ──────────────────────── */
.reveal {
  font-family: "Pretendard", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 32px;
  color: var(--on-surface);
  background: var(--bg-aurora), var(--bg);
  background-color: var(--bg);
}

.reveal .slides {
  text-align: left;
}

.reveal h1,
.reveal h2,
.reveal h3 {
  font-family: inherit;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--on-surface);
  margin: 0 0 0.4em;
}

.reveal h1 { font-size: 2em; font-weight: 700; line-height: 1.1; }
.reveal h2 { font-size: 1.35em; font-weight: 700; line-height: 1.2; }
.reveal h3 { font-size: 1em; font-weight: 600; }

/* 발표자 노트 (aside.notes → S키 스피커 뷰 / show-notes 패널) */
.reveal aside.notes {
  font-size: 0.8em;
}

.reveal .speaker-notes {
  font-size: 0.8em !important;
}

.reveal p  { line-height: 1.55; margin: 0 0 0.5em; }
.reveal ul  { list-style: disc; margin-left: 1.2em; }
.reveal li  { margin-bottom: 0.3em; }

/* Reveal 내장 색상 오버라이드 */
.reveal {
  --r-controls-spacing: 1.1rem;
}

.reveal .controls {
  color: var(--brand);
  filter: drop-shadow(0 1px 4px rgba(59, 130, 246, 0.25));
}

.reveal .progress {
  color: var(--brand);
  height: 4px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* Overview(Esc): 덱 전체 조망 — fit 스크립트와 함께 사용 */
.reveal.overview {
  background: #e4e9f2;
}

.reveal.overview .slides {
  transform-origin: 0 0;
}

.reveal.overview .controls {
  display: none !important;
}

.reveal.overview .slides section,
.reveal.overview .slides section > section {
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(24, 28, 35, 0.1);
  transition: box-shadow 0.15s ease;
}

/* Overview: 현재 선택 슬라이드 — 브랜드 글로우 */
.reveal.overview .slides section.present,
.reveal.overview .slides section > section.present {
  outline: none !important;
  border-radius: 6px;
  box-shadow:
    0 0 0 3px var(--brand),
    0 0 0 7px rgba(59, 130, 246, 0.2),
    0 0 20px 4px rgba(59, 130, 246, 0.25),
    0 8px 24px rgba(59, 130, 246, 0.15) !important;
  z-index: 5;
}

.reveal.overview .slides section:hover:not(.present),
.reveal.overview .slides section > section:hover:not(.present) {
  box-shadow:
    0 0 0 2px rgba(59, 130, 246, 0.35),
    0 4px 12px rgba(59, 130, 246, 0.12);
}

.reveal.overview .slides > section.stack {
  outline: none !important;
  box-shadow: none;
}

.reveal.overview .slides > section.stack.present {
  box-shadow: none !important;
}

.reveal.overview .backgrounds .slide-background.present {
  box-shadow: 0 0 18px var(--brand-glow);
}

/* 섹션 이동: 좌/우 화살표만 표시 */
.reveal .controls .navigate-up,
.reveal .controls .navigate-down {
  display: none !important;
}

/* 좌/우 이동: 화면 양쪽 세로 중앙 — 배경 없이 화살표만, 클릭 영역만 확대 */
.reveal .controls[data-controls-layout="edges"] .navigate-left,
.reveal .controls[data-controls-layout="edges"] .navigate-right {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.5rem;
  background: none;
  border-radius: 0;
  box-shadow: none;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.reveal .controls[data-controls-layout="edges"] .navigate-left {
  left: max(0.85rem, env(safe-area-inset-left, 0px));
}

.reveal .controls[data-controls-layout="edges"] .navigate-right {
  right: max(0.85rem, env(safe-area-inset-right, 0px));
}

.reveal .controls[data-controls-layout="edges"] .navigate-left:hover,
.reveal .controls[data-controls-layout="edges"] .navigate-right:hover,
.reveal .controls[data-controls-layout="edges"] .navigate-left:focus-visible,
.reveal .controls[data-controls-layout="edges"] .navigate-right:focus-visible {
  opacity: 1;
  background: none;
  box-shadow: none;
}

/* 비활성(첫/마지막 슬라이드) 화살표 */
.reveal .controls[data-controls-layout="edges"] .navigate-left.disabled,
.reveal .controls[data-controls-layout="edges"] .navigate-right.disabled {
  opacity: 0.2;
  pointer-events: none;
}

/* ── 슬라이드 공통 레이아웃 ────────────────────────────── */
.slides > section,
.slides > section > section {
  padding: 0 !important;
  height: 100%;
}

/* 내용 영역 래퍼 — 슬라이드 내부를 채우는 flex 컨테이너 */
.slide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  padding: 4% 6%;
  box-sizing: border-box;
  gap: 1rem;
}

.slide-body.center {
  align-items: center;
  text-align: center;
}

.slide-body--center {
  justify-content: center;
}

.slide-body--center h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.slide-body--center .hero-sub {
  text-align: center;
  margin-bottom: 1rem;
}

/* 강조 콜아웃 (인라인 브랜드색 대체) */
.slide-callout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  font-size: 0.55em;
  font-weight: 600;
  margin-top: 0.3rem;
}

.slide-callout .material-symbols-outlined {
  font-size: 1.1em;
}

.slide-callout--boxed {
  font-size: 0.52em;
  margin-top: 0.4rem;
  background: var(--brand-light);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--brand-border);
  box-shadow: var(--card-shadow-accent);
}

.slide-callout--boxed .material-symbols-outlined {
  font-size: 1.2em;
}

.slide-callout strong {
  color: var(--on-surface);
  font-weight: 700;
}

/* 2열 레이아웃 */
.slide-cols {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 100%;
  width: 100%;
  gap: 1.25rem;
}

.slide-col-left {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 4% 3% 4% 6%;
  gap: 0.55rem;
  box-sizing: border-box;
}

.slide-col-right {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 4% 5% 4% 2%;
  box-sizing: border-box;
  min-width: 0;
}

/* ── 타이포그래피 헬퍼 ────────────────────────────────── */
.step-badge {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--surface-low);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-badge.filled {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--card-shadow-accent);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  gap: 0.25em;
  padding: 0.22em 0.55em;
  border-radius: 999px;
  border: var(--glass-border);
  background: var(--surface);
  font-size: 0.48em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--on-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  box-shadow: var(--card-shadow);
}

.chip.brand {
  background: var(--brand-light);
  border-color: var(--brand-border);
  color: var(--brand);
  box-shadow: var(--card-shadow-accent);
}

/* 소개 슬라이드: 긴 도구명은 줄바꿈 허용, 여전히 콘텐츠 너비만 차지 */
.slide-col-left > .chip.brand {
  align-self: flex-start;
  white-space: normal;
  text-align: left;
  hyphens: auto;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.3rem;
  margin-top: 0.15rem;
  width: 100%;
  max-width: 100%;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.18em 0.48em;
  border-radius: 6px;
  font-size: 0.44em;
  font-weight: 600;
  line-height: 1.3;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  white-space: nowrap;
  box-shadow: var(--card-shadow-accent);
}

.tag--lg {
  font-size: 0.55em;
  padding: 0.4em 0.8em;
}

.slide-desc {
  font-size: 0.65em;
  color: var(--on-muted);
  line-height: 1.6;
  margin: 0;
}

.slide-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── 히어로 / 타이틀 슬라이드 ──────────────────────────── */
.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  /* padding: 0.4em 1em; */
  border-radius: 999px;
  /* border: 1px solid var(--outline-faint); */
  /* background: var(--surface-low); */
  font-size: 0.5em;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: 2.2em;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--on-surface);
  margin: 0 0 0.4em;
}

.hero-sub {
  font-size: 0.7em;
  color: var(--on-muted);
  line-height: 1.55;
  max-width: 34em;
  margin: 0;
}

/* ── 오프닝 히어로 슬라이드 ────────────────────────────── */
.opening-hero {
  position: relative;
  overflow: hidden;
}

.opening-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 85% 25%, rgba(236, 72, 153, 0.07), transparent 60%),
    radial-gradient(ellipse 70% 50% at 15% 80%, rgba(59, 130, 246, 0.1), transparent 65%),
    var(--bg-aurora);
}

.opening-shell {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.35rem;
  padding: 6% 8% 5%;
  box-sizing: border-box;
  max-width: 100%;
}

.opening-head {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 36em;
}

.opening-head .hero-badge {
  margin-bottom: 0;
}

.opening-title {
  font-size: 2.5em;
  margin: 0;
  white-space: nowrap;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent-violet) 55%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.opening-lead {
  margin: 0;
  font-size: 0.62em;
  line-height: 1.6;
  color: var(--on-muted);
  max-width: 32em;
}

.opening-lead strong {
  color: var(--on-surface);
  font-weight: 600;
}

/* 5단계 가로 파이프라인 — 슬라이드 2 flow-card와 톤 통일 */
.opening-pipeline {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.15rem 0;
}

.opening-pipe-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.85rem 0.5rem;
  background: var(--surface);
  border: var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.opening-pipe-item .material-symbols-outlined {
  font-size: 1.15em;
  color: var(--brand);
}

.opening-pipe-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.42em;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
}

.opening-pipe-label {
  font-size: 0.44em;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.25;
}

.opening-pipe-item--last {
  border-color: var(--brand-border);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, var(--surface) 100%);
  box-shadow: var(--card-shadow-accent);
}

.opening-pipe-item--last .opening-pipe-num {
  background: var(--brand);
  color: #fff;
}

.opening-pipe-arrow {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.75em;
  color: var(--outline);
  margin: 0 0.15rem;
  user-select: none;
}

.opening-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.opening-chips .chip {
  font-size: 0.44em;
  padding: 0.2em 0.5em;
}

.opening-foot {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--outline-faint);
  width: 100%;
  max-width: 36em;
}

.opening-foot .brand-logo {
  margin: 0;
  font-size: 1em;
  line-height: 1.35;
  padding-bottom: 0.1em;
}

.opening-foot-divider {
  width: 1px;
  height: 0.9em;
  background: var(--outline-faint);
}

.opening-foot-meta {
  font-size: 0.44em;
  color: var(--on-muted);
  font-weight: 500;
}

/* ── 워크플로 개요 카드 ──────────────────────────────── */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.8rem;
}

.flow-card {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: 14px;
  padding: 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.flow-card--highlight {
  border-color: var(--brand-border);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, var(--surface) 100%);
  box-shadow: var(--card-shadow-accent);
}

.flow-card--highlight .fc-num {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--card-shadow-accent);
}

.flow-card .fc-num {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.55em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-card .fc-icon {
  font-size: 1.1em;
  color: var(--brand);
}

.flow-card .fc-label {
  font-size: 0.46em;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.3;
}

.flow-card .fc-sub {
  font-size: 0.38em;
  color: var(--on-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.3;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  color: var(--outline);
  padding-top: 1.5rem;
}

/* ── 전체 화면 데모 슬라이드 (하이브리드: 다크 프레임 + 밝은 패널) ── */
.slide-demo-full {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 2% 3%;
  box-sizing: border-box;
  background: transparent;
}

.demo-panel--full {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  box-shadow: var(--card-shadow-lg);
}

.demo-panel--full .demo-panel-body {
  padding: 0.4rem;
}

/* 데모 영상 — 슬라이드 내 인라인 재생 (모달 전환 없음) */
.demo-panel-body--video {
  background: #0f1115;
  cursor: default;
  padding: 0;
}

.demo-inline-video {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1115;
}

.demo-slide-video {
  display: none;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
}

.demo-inline-video.is-playing .demo-slide-video {
  display: block;
}

.demo-video-launch--overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.5rem;
  border: none;
  border-radius: 0;
  background: linear-gradient(160deg, #1a1d24 0%, #12151a 100%);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-family: inherit;
}

.demo-inline-video.is-playing .demo-video-launch--overlay {
  display: none;
}

.demo-video-launch--overlay:hover,
.demo-video-launch--overlay:focus-visible {
  background: linear-gradient(160deg, #22262e 0%, #151820 100%);
  outline: none;
}

.demo-video-launch-icon .material-symbols-outlined {
  font-size: 4.5rem;
  color: var(--brand);
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
}

.demo-video-launch-label {
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.demo-video-launch-hint {
  font-size: 0.44em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

.demo-panel--full > .code-panel-body.demo-panel--full-code {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
}

.demo-panel--full .demo-panel-body.demo-panel--full-md {
  flex: 1 1 0;
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
}

.demo-panel--full .demo-panel-body.demo-panel--full-md .wiki-md-body {
  width: 100%;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  box-sizing: border-box;
}

.demo-panel--full.light-panel .demo-panel-bar {
  background: var(--demo-surface-low);
  border-bottom-color: var(--demo-outline-faint);
}

/* WIKI 댓글 PNG */
.demo-panel--full .demo-panel-body.demo-panel--full-img {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: var(--demo-surface-high);
  align-items: stretch;
  justify-content: flex-start;
}

/*
 * WIKI 댓글 PNG — 스크린샷 우측 빈 여백 제거
 * (.demo-panel-body img 보다 구체적인 선택자로 width 확대 적용)
 */
.demo-panel--full .demo-panel-body.demo-panel--full-img .wiki-reply-viewport {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  box-sizing: border-box;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

/* ── 데모 패널 (IDE 스타일) ─────────────────────────── */
.demo-panel {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--outline-faint);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  background: var(--ide-bg);
  height: 100%;
  min-height: 0;
}

.demo-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  background: var(--ide-titlebar);
  border-bottom: 1px solid var(--ide-border);
  flex-shrink: 0;
  gap: 0.5rem;
}

.demo-panel-bar .bar-title {
  font-size: 0.5em;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  font-family: -apple-system, BlinkMacSystemFont, Inter, sans-serif;
}

.demo-panel-bar .bar-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.demo-panel-bar .bar-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.demo-panel-bar .dot-red   { background: #ff5f57; }
.demo-panel-bar .dot-yellow{ background: #febc2e; }
.demo-panel-bar .dot-green { background: #28c840; }

.demo-panel-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.6rem;
}

.demo-panel-body img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* WIKI 댓글 PNG — 우측 빈 여백 크롭(반드시 .demo-panel-body img 뒤에 둠) */
.demo-panel--full .demo-panel-body.demo-panel--full-img .wiki-reply-viewport img {
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: unset;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  background: #fff;
}

.demo-panel-body.light {
  background: var(--demo-surface);
}

.demo-panel-body.code {
  background: var(--ide-bg);
  padding: 0;
}

/* ── MP4 고화질 버튼 ────────────────────────────────── */
.btn-mp4 {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.32);
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-size: 0.48em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}

.btn-mp4:hover { background: rgba(255,255,255,0.1); }

.btn-mp4-light {
  border-color: var(--demo-brand-border);
  color: var(--demo-brand);
  background: transparent;
}

.btn-mp4-light:hover { background: var(--demo-brand-light); }

/* ── Markdown 미리보기 패널 (라이트 데모 레이어) ─────── */
.demo-panel.light-panel {
  background: var(--demo-surface);
}

.demo-panel.light-panel .demo-panel-bar {
  background: var(--demo-surface-low);
  border-bottom-color: var(--demo-outline-faint);
}

.demo-panel.light-panel .demo-panel-bar .bar-title {
  color: var(--demo-on-surface);
}

.wiki-md-body {
  font-family: "Pretendard", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.45em;
  line-height: 1.65;
  color: var(--demo-on-surface);
  overflow-y: auto;
  padding: 1rem 1.2rem;
  height: 100%;
  box-sizing: border-box;
}

.wiki-md-body h1 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--demo-on-surface);
}

.wiki-md-body h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--demo-on-surface);
}

.wiki-md-body h3, .wiki-md-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--demo-on-surface);
}

.wiki-md-body p { margin-bottom: 0.5rem; }

.wiki-md-body blockquote {
  border-left: 3px solid var(--demo-brand);
  padding-left: 0.8rem;
  margin: 0.5rem 0;
  color: var(--demo-on-muted);
  font-style: italic;
}

.wiki-md-body ul, .wiki-md-body ol {
  margin: 0.4rem 0 0.4rem 1.4rem;
}

.wiki-md-body li { margin-bottom: 0.2rem; }

.wiki-md-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0;
  font-size: 0.88em;
}

.wiki-md-body th, .wiki-md-body td {
  border: 1px solid var(--demo-outline);
  padding: 0.35rem 0.45rem;
  text-align: left;
  vertical-align: top;
}

.wiki-md-body th { background: var(--demo-surface-low); font-weight: 600; }

.wiki-md-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 0.4rem 0;
  border: 1px solid var(--demo-outline-faint);
}

.wiki-md-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--demo-surface-low);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.wiki-md-body pre {
  background: var(--ide-bg);
  color: var(--ide-text);
  padding: 0.8rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.6rem 0;
  font-size: 0.82em;
}

.wiki-md-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* ── Markdown 원본 패널 (코드 에디터 스타일) ──────── */
.code-panel-body {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 0.8rem 1rem;
}

.code-panel-body pre {
  margin: 0;
  font-size: 0.45em;
  line-height: 1.6;
  color: var(--ide-text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── 터미널 스타일 코드 블록 ──────────────────────── */
.terminal-block {
  background: var(--ide-bg);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.terminal-block--spaced {
  margin-top: 0.5rem;
}

.terminal-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58em;
  color: #4ade80;
}

.terminal-block .term-muted {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.48em;
  color: var(--ide-muted);
  margin-top: 0.3rem;
}

/* ── 클로징 / Q&A 슬라이드 ──────────────────────── */
.closing-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 1.2rem;
  padding: 5% 8%;
  box-sizing: border-box;
  overflow: hidden;
}

.closing-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(139, 92, 246, 0.06), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 80%, rgba(59, 130, 246, 0.08), transparent 65%);
}

.closing-wrap > * {
  position: relative;
  z-index: 1;
}

.closing-wrap h2 {
  font-size: 1.3em;
  color: var(--on-surface);
  margin: 0;
}

.closing-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.8rem;
}

.closing-copy {
  font-size: 0.42em;
  color: var(--on-muted);
  margin-top: 1rem;
}

.brand-logo {
  display: inline-block;
  font-size: 1.6em;
  font-weight: 700;
  line-height: 1.3;
  padding: 0.02em 0 0.08em;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent-violet) 50%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.02em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.closing-tag {
  font-size: 0.6em;
  color: var(--on-muted);
}

/* ── MP4 모달 오버레이 ──────────────────────────── */
#pres-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#pres-video-modal.open {
  display: flex;
}

.pres-video-inner {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: min(1100px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  /* flex 자식 높이 0 붕괴 방지 — 본문은 영상 intrinsic 크기를 따름 */
  height: auto;
}

.pres-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.pres-video-header .vtitle {
  font-size: 0.55em;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}

.btn-close-modal {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  font-size: 1.5em;
  padding: 0.2em;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: background 0.15s;
}

.btn-close-modal:hover { background: rgba(255,255,255,0.1); }

.pres-video-body {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 0.5rem;
  overflow: auto;
  max-height: calc(90vh - 3.5rem);
}

#pres-video-player {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1060px, 94vw);
  max-height: calc(90vh - 4.5rem);
  border-radius: 6px;
  object-fit: contain;
  background: #000;
}

/* ── iframe 슬라이드 ──────────────────────────────── */
.iframe-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--demo-surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--demo-outline-faint);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.iframe-panel--full {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.iframe-panel--full .iframe-bar--full {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
}

.iframe-panel--full .bar-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.iframe-panel--full .bar-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.iframe-panel--full iframe {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
}

.iframe-panel iframe {
  flex: 1 1 0;
  border: 0;
  display: block;
  min-height: 0;
  width: 100%;
}

.iframe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.8rem;
  background: var(--demo-surface-low);
  border-bottom: 1px solid var(--demo-outline-faint);
  flex-shrink: 0;
}

.iframe-bar .bar-label {
  font-size: 0.48em;
  font-weight: 600;
  color: var(--demo-on-surface);
}

/* ── 모바일 가로: 전체 화면(프레젠테이션) 버튼 ─────────── */
.mobile-present-btn {
  display: none;
  position: fixed;
  z-index: 220;
  left: 50%;
  bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: var(--card-shadow-accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-present-btn:not([hidden]) {
  display: inline-flex;
}

.mobile-present-btn__icon {
  font-size: 1.15rem;
}

.mobile-present-btn.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* 네이티브/의사 전체 화면 — 주소창 최소화·슬라이드 영역 확대 */
html.presentation-mode,
html:fullscreen,
html:-webkit-full-screen {
  overflow: hidden;
  height: 100%;
  height: 100dvh;
}

html.presentation-mode body,
html:fullscreen body,
html:-webkit-full-screen body {
  overflow: hidden;
  margin: 0;
  height: 100%;
  height: 100dvh;
}

html.presentation-mode .reveal,
html:fullscreen .reveal,
html:-webkit-full-screen .reveal {
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
}

html.presentation-mode .nav-hint,
html:fullscreen .nav-hint {
  display: none !important;
}

html.portrait-scroll .mobile-present-btn {
  display: none !important;
}

html.pwa-banner-visible .mobile-present-btn {
  bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}

/* ── PWA 설치 배너 (모바일) ─────────────────────────── */
.pwa-install-banner {
  position: fixed;
  z-index: 240;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 0.75rem max(0.65rem, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(248, 249, 250, 0.5) 12%, rgba(248, 249, 250, 0.95));
  pointer-events: none;
}

.pwa-install-banner:not([hidden]) {
  pointer-events: auto;
}

.pwa-install-banner__inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: var(--glass-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--card-shadow-lg);
}

.pwa-install-banner__icon {
  font-size: 1.6rem;
  color: var(--brand);
  flex-shrink: 0;
}

.pwa-install-banner__text {
  flex: 1;
  min-width: 0;
}

.pwa-install-banner__title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.2;
}

.pwa-install-banner__desc {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--on-muted);
}

.pwa-install-banner__action {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--card-shadow-accent);
}

.pwa-install-banner__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--surface-low);
  color: var(--on-muted);
  cursor: pointer;
}

.pwa-install-banner__close .material-symbols-outlined {
  font-size: 1rem;
}

/* ── 네비게이션 힌트 ──────────────────────────────── */
.nav-hint {
  position: fixed;
  bottom: 2.2rem;
  right: 1.2rem;
  font-size: 0.38em;
  color: var(--on-muted);
  opacity: 0.7;
  pointer-events: none;
  line-height: 1.7;
  text-align: right;
  z-index: 100;
}

/* ── 접근성 ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal .slides section { transition: none !important; }
}

/* ── 반응형 (소형 화면 / 프로젝터 보정) ────────────── */
@media (max-width: 900px) {
  .flow-grid { grid-template-columns: 1fr 1fr; }
  .opening-shell { padding: 5% 6%; gap: 1rem; }
  .opening-title { font-size: 1.85em; white-space: normal; }
  .opening-pipeline { flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
  .opening-pipe-arrow { display: none; }
  .opening-pipe-item { flex: 1 1 calc(33% - 0.5rem); min-width: 5.5rem; }
}

/* 세로 모바일: 2열 → 1열 스택 */
@media (max-width: 900px) and (orientation: portrait) {
  .slide-cols {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    height: auto;
  }

  .slide-col-left {
    flex: unset;
    width: 100%;
    padding: 4% 5% 2%;
  }

  .slide-col-right {
    flex: unset;
    width: 100%;
    padding: 0 5% 4%;
  }

  .intro-visual-panel {
    align-self: stretch;
  }
}

/* 가로 모바일: 2열 유지 + 컴팩트 (본문은 패딩·비율로만 확장) */
@media (max-width: 900px) and (orientation: landscape) {
  .reveal .controls[data-controls-layout="edges"] .navigate-left {
    left: max(0.35rem, env(safe-area-inset-left, 0px));
  }

  .reveal .controls[data-controls-layout="edges"] .navigate-right {
    right: max(0.35rem, env(safe-area-inset-right, 0px));
  }

  .slide-cols {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
    width: 100%;
    padding: 0 2%;
    box-sizing: border-box;
  }

  .slide-col-left {
    flex: 0 0 42%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.65rem 0.75rem;
    gap: 0.4rem;
    background: var(--surface);
    border: var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    box-sizing: border-box;
  }

  .slide-col-right {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .slide-title {
    font-size: 1.05em;
    margin: 0;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--outline-faint);
    width: 100%;
  }

  .slide-col-left > .chip.brand {
    margin-top: 0.08rem;
  }

  .slide-desc {
    font-size: 0.52em;
    line-height: 1.48;
    margin-top: 0.1rem;
  }

  .slide-desc br + br {
    display: none;
  }

  .slide-callout {
    font-size: 0.46em;
    margin-top: 0.35rem;
  }

  .slide-callout--boxed {
    margin-top: 0.4rem;
  }

  .chip {
    font-size: 0.4em;
  }

  .tag {
    font-size: 0.36em;
  }

  .tag-list {
    gap: 0.2rem;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--outline-faint);
    width: 100%;
  }

  .terminal-block {
    padding: 0.5rem 0.65rem;
    margin-top: 0.35rem !important;
  }

  .terminal-block code {
    font-size: 0.5em;
  }

  .intro-visual-panel {
    width: 100%;
    height: auto;
    align-self: stretch;
    padding: 0.55rem 0.65rem;
    gap: 0.32rem;
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .intro-visual-head {
    font-size: 0.4em;
  }

  .intro-flow-steps {
    gap: 0.24rem;
  }

  .intro-flow-step {
    padding: 0.32rem 0.42rem;
    gap: 0.3rem;
  }

  .intro-flow-step .step-num {
    width: 1.1rem;
    height: 1.1rem;
    font-size: 0.34em;
  }

  .intro-flow-step .material-symbols-outlined {
    font-size: 1em;
  }

  .intro-flow-step-text strong {
    font-size: 0.44em;
  }

  .intro-flow-step-text span {
    font-size: 0.36em;
    line-height: 1.3;
  }

  .intro-compare {
    gap: 0.2rem;
  }

  .intro-compare-item {
    padding: 0.3rem 0.4rem;
    font-size: 0.36em;
    line-height: 1.32;
  }

  .intro-compare-before::before,
  .intro-compare-after::before {
    margin-bottom: 0.1rem;
  }

  .intro-next-hint {
    font-size: 0.34em;
    margin-top: 0.15rem;
    padding-top: 0.25rem;
  }
}

/* ── 인트로 슬라이드 우측 비주얼 패널 ─────────────── */
.intro-visual-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  gap: 0.6rem;
  justify-content: flex-start;
  align-self: center;
  box-sizing: border-box;
  padding: 0.75rem 0.85rem;
  background: var(--surface);
  border: var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow-lg);
  overflow: hidden;
}

.intro-visual-panel::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -15%;
  width: 55%;
  height: 70%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(236, 72, 153, 0.06) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.intro-visual-panel > * {
  position: relative;
  z-index: 1;
}

.intro-visual-head {
  font-size: 0.48em;
  font-weight: 600;
  color: var(--on-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  flex-shrink: 0;
}

.intro-flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-shrink: 0;
}

.intro-flow-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface-low);
  border: var(--glass-border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}

.intro-flow-step .step-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.42em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.intro-flow-step .material-symbols-outlined {
  font-size: 1.35em;
  color: var(--brand);
  flex-shrink: 0;
}

.intro-flow-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.intro-flow-step-text strong {
  font-size: 0.52em;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.25;
}

.intro-flow-step-text span {
  font-size: 0.44em;
  color: var(--on-muted);
  line-height: 1.4;
}

.intro-compare {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}

.intro-compare-item {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.44em;
  line-height: 1.45;
}

.intro-compare-before {
  background: #f5f5f7;
  border: 1px dashed var(--outline);
  color: var(--on-muted);
}

.intro-compare-before::before {
  content: '기존';
  display: block;
  font-size: 0.85em;
  font-weight: 700;
  color: #717785;
  margin-bottom: 0.25rem;
}

.intro-compare-after {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--on-surface);
}

.intro-compare-after::before {
  content: '개선';
  display: block;
  font-size: 0.85em;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.intro-next-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35em;
  margin: 0.15rem 0 0;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--outline-faint);
  font-size: 0.42em;
  color: var(--brand);
  font-weight: 500;
  opacity: 0.85;
}

.intro-next-hint .material-symbols-outlined {
  font-size: 1.1em;
}

/* ── step 인트로 아이콘 박스 ─────────────────────── */
.step-icon-box {
  background: var(--surface-low);
  border-radius: 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.step-icon-box span.material-symbols-outlined {
  font-size: 2.2em;
  color: var(--brand);
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ── 모바일 세로: 연속 스크롤 (가로는 Reveal 프레젠테이션 유지) ── */
html.portrait-scroll,
html.portrait-scroll body {
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

html.portrait-scroll .reveal,
html.portrait-scroll .reveal .viewport {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  touch-action: pan-y !important;
}

html.portrait-scroll .reveal .slides {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  transform: none !important;
  display: block !important;
  perspective: none !important;
}

/* Step 묶음(수직 자식 있음)은 래퍼 없이 자식만 흐름에 참여 */
html.portrait-scroll .reveal .slides > section:has(> section) {
  display: contents !important;
  min-height: 0 !important;
  height: auto !important;
}

html.portrait-scroll .reveal .slides section,
html.portrait-scroll .reveal .slides section.past,
html.portrait-scroll .reveal .slides section.future,
html.portrait-scroll .reveal .slides section.present,
html.portrait-scroll .reveal .slides > section:not(:has(> section)),
html.portrait-scroll .reveal .slides section > section {
  display: block !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: auto !important;
  pointer-events: auto !important;
  scroll-snap-align: start;
  box-sizing: border-box;
  border-bottom: 10px solid var(--surface-high);
}

/* 오프닝: 한 화면 분량 + aurora */
html.portrait-scroll .reveal .slides > section.opening-hero {
  min-height: 100svh;
  min-height: 100vh;
  background: var(--bg-aurora), var(--bg);
  border-bottom-color: rgba(59, 130, 246, 0.2);
}

/* 워크플로·클로징 등 단일 섹션 */
html.portrait-scroll .reveal .slides > section:not(:has(> section)):not(.opening-hero) {
  min-height: auto !important;
  background: var(--bg);
}

/* Step·데모 등 하위 슬라이드 — 교차 배경으로 구역 구분 */
html.portrait-scroll .reveal .slides section > section {
  min-height: auto !important;
  background: var(--bg);
}

html.portrait-scroll .reveal .slides section > section:nth-of-type(even) {
  background: #f0f3fa;
}

/* 데모·코드·iframe 슬라이드: 밝은 프레임 */
html.portrait-scroll .reveal .slides section > section:has(.slide-demo-full) {
  background: #eef3fc;
  border-bottom-color: #d5dae6;
}

/* display:contents 래퍼는 위 규칙보다 우선 */
html.portrait-scroll .reveal .slides > section:has(> section) {
  display: contents !important;
  min-height: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html.portrait-scroll {
  scroll-snap-type: y proximity;
}

html.portrait-scroll .reveal .controls,
html.portrait-scroll .reveal .progress,
html.portrait-scroll .reveal .slide-number,
html.portrait-scroll .nav-hint {
  display: none !important;
}

html.portrait-scroll .slide-body,
html.portrait-scroll .slide-cols,
html.portrait-scroll .slide-demo-full,
html.portrait-scroll .opening-shell {
  min-height: auto;
}

/* ── 세로 모드 타이포그래피 (기본 32px → 모바일 가독 크기) ── */
html.portrait-scroll .reveal {
  font-size: clamp(17px, 4.25vw, 22px);
}

html.portrait-scroll .reveal h1 {
  font-size: clamp(1.35rem, 6.5vw, 1.75rem);
  line-height: 1.2;
}

html.portrait-scroll .reveal h2 {
  font-size: clamp(1.1rem, 5vw, 1.35rem);
  line-height: 1.25;
}

html.portrait-scroll .reveal h3 {
  font-size: 1rem;
}

html.portrait-scroll .opening-shell {
  padding: max(1.25rem, env(safe-area-inset-top)) 6% 1.5rem;
  gap: 0.9rem;
}

html.portrait-scroll .opening-title {
  font-size: clamp(1.45rem, 7vw, 1.85rem) !important;
  line-height: 1.22;
  white-space: normal !important;
  word-break: keep-all;
  overflow-wrap: break-word;
  letter-spacing: -0.02em;
}

html.portrait-scroll .hero-badge {
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}

html.portrait-scroll .opening-lead {
  font-size: 0.82rem;
  line-height: 1.55;
  max-width: 100%;
}

html.portrait-scroll .opening-pipe-item {
  padding: 0.65rem 0.4rem;
}

html.portrait-scroll .opening-pipe-item .material-symbols-outlined {
  font-size: 1.25rem;
}

html.portrait-scroll .opening-pipe-num {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.65rem;
}

html.portrait-scroll .opening-pipe-label {
  font-size: 0.7rem;
}

html.portrait-scroll .opening-chips .chip {
  font-size: 0.65rem;
  white-space: normal;
  text-align: center;
}

html.portrait-scroll .opening-foot-meta {
  font-size: 0.65rem;
}

html.portrait-scroll .hero-sub {
  font-size: 0.82rem;
}

html.portrait-scroll .slide-title {
  font-size: 1.2rem;
}

html.portrait-scroll .slide-desc {
  font-size: 0.82rem;
}

html.portrait-scroll .chip {
  font-size: 0.7rem;
}

html.portrait-scroll .tag {
  font-size: 0.62rem;
  white-space: normal;
}

html.portrait-scroll .flow-card {
  padding: 0.65rem 0.45rem;
}

html.portrait-scroll .flow-card .fc-num {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.7rem;
}

html.portrait-scroll .flow-card .fc-icon {
  font-size: 1.1rem;
}

html.portrait-scroll .flow-card .fc-label {
  font-size: 0.68rem;
}

html.portrait-scroll .flow-card .fc-sub {
  font-size: 0.58rem;
}

html.portrait-scroll .intro-visual-head {
  font-size: 0.72rem;
}

html.portrait-scroll .intro-flow-step-text strong {
  font-size: 0.78rem;
}

html.portrait-scroll .intro-flow-step-text span {
  font-size: 0.7rem;
}

html.portrait-scroll .intro-compare-item {
  font-size: 0.72rem;
}

html.portrait-scroll .intro-next-hint {
  font-size: 0.72rem;
}

html.portrait-scroll .demo-video-launch-icon .material-symbols-outlined {
  font-size: 2.75rem;
}

html.portrait-scroll .demo-video-launch-label {
  font-size: 0.85rem;
}

html.portrait-scroll .demo-video-launch-hint {
  font-size: 0.72rem;
}

html.portrait-scroll .wiki-md-body {
  font-size: 0.8rem;
}

html.portrait-scroll .closing-wrap h2 {
  font-size: clamp(1.2rem, 5.5vw, 1.4rem) !important;
}

html.portrait-scroll .slide-body {
  padding: 1.5rem 5% 2rem;
  gap: 1.1rem;
}

html.portrait-scroll .slide-body.center {
  background: transparent;
}

html.portrait-scroll .reveal .slides > section:not(:has(> section)):not(.opening-hero) .slide-body {
  padding: 1.75rem 5% 2.25rem;
}

html.portrait-scroll .slide-cols {
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 5% 1.75rem;
  box-sizing: border-box;
}

html.portrait-scroll .slide-col-left,
html.portrait-scroll .slide-col-right {
  flex: unset;
  width: 100%;
  padding: 1.1rem 1rem !important;
  border-radius: 14px;
  border: var(--glass-border);
  box-shadow: var(--card-shadow);
  box-sizing: border-box;
}

html.portrait-scroll .slide-col-left {
  background: var(--surface);
}

html.portrait-scroll .slide-col-right {
  background: var(--surface-low);
  margin-top: 0;
}

html.portrait-scroll .slide-title {
  padding-bottom: 0.6rem;
  margin-bottom: 0.35rem;
  border-bottom: 2px solid var(--brand-light);
  width: 100%;
}

html.portrait-scroll .intro-visual-panel {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: 12px;
  padding: 0.85rem 0.75rem;
  box-shadow: var(--card-shadow);
}

html.portrait-scroll .intro-visual-head {
  padding-bottom: 0.5rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px dashed var(--outline-faint);
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

html.portrait-scroll .intro-flow-step {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

html.portrait-scroll .intro-compare {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--outline-faint);
}

html.portrait-scroll .intro-next-hint {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--brand-border);
}

html.portrait-scroll .flow-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0 0;
}

html.portrait-scroll .flow-card {
  box-shadow: var(--card-shadow);
  border: var(--glass-border);
}

html.portrait-scroll .opening-pipeline {
  flex-wrap: wrap;
  justify-content: center;
}

html.portrait-scroll .opening-pipe-arrow {
  display: none;
}

html.portrait-scroll .opening-pipe-item {
  flex: 1 1 calc(50% - 0.35rem);
  min-width: 6.5rem;
}

html.portrait-scroll .slide-demo-full {
  height: auto;
  min-height: 70vh;
  padding: 1.25rem 4% 1.75rem;
  background: var(--surface-low);
}

html.portrait-scroll .slide-demo-full::before {
  content: '';
  display: block;
  height: 4px;
  margin: -1.25rem -4% 1rem;
  width: calc(100% + 8%);
  background: linear-gradient(90deg, var(--brand), var(--accent-violet), var(--accent-pink));
}

html.portrait-scroll .demo-panel--full {
  min-height: 60vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow-lg);
}

html.portrait-scroll .closing-wrap {
  padding: 2rem 6% 2.5rem;
  text-align: center;
}

html.portrait-scroll .demo-inline-video {
  min-height: 40vh;
}

html.portrait-scroll .iframe-panel {
  min-height: 70vh;
}

html.portrait-scroll .iframe-panel iframe {
  min-height: 60vh;
}

html.portrait-scroll .wiki-md-body {
  max-height: none;
  overflow: visible;
}

html.portrait-scroll .demo-panel-body.demo-panel--full-md .wiki-md-body {
  max-height: none;
  overflow: visible;
}
