/* 프리캔버스 AI 사용 가이드 — 발표용 프레젠테이션 스타일 */
:root {
  --ink: #1d2735;
  --ink-soft: #28364a;
  --ink-muted: #455569;
  --panel: #fffdf9;
  --panel-strong: #ffffff;
  --line: #dad2c6;
  --line-soft: #ebe5db;
  --accent: #1f5068;
  --accent-strong: #173f54;
  --accent-warm: #9a7440;
  --tip-bg: #f6efe5;
  --chip-bg: #f7f3ec;
  --shadow-sm: 0 4px 14px rgba(16, 26, 43, 0.08);
  --shadow-md: 0 10px 30px rgba(16, 26, 43, 0.12);
  --shadow-lg: 0 18px 44px rgba(16, 26, 43, 0.16);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

:lang(ko) {
  word-break: keep-all;
  line-break: normal;
}

body {
  font-family: 'Noto Sans KR', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.68;
  color: var(--ink);
  overflow-x: hidden;
  overflow-y: hidden;
  background:
    radial-gradient(75vw 60vh at -8% -18%, #f4ecdf 0%, transparent 63%),
    radial-gradient(70vw 55vh at 112% -12%, #dce9f0 0%, transparent 66%),
    linear-gradient(135deg, #f7f2e9 0%, #edf3f7 48%, #f8f1e7 100%);
  word-break: keep-all;
  line-break: normal;
  overflow-wrap: normal;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.14) 0 1px,
    transparent 1px 22px
  );
  opacity: 0.45;
}

.slides-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.slide {
  width: 100vw;
  height: 100vh;
  padding: 1vh 0.8vw;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.42s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  z-index: 5;
  pointer-events: all;
}

.slide-content {
  width: min(100%, 1500px);
  max-width: 1500px;
  height: auto;
  min-height: 78vh;
  max-height: 96.5vh;
  padding: 2.6rem 2.3rem 2.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, var(--panel-strong) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.slide-content-inner {
  width: 100%;
  transform-origin: top center;
  transition: transform 0.18s ease;
  will-change: transform;
}

.slide-content::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm), var(--accent));
  opacity: 0.88;
}

.slide-content::after {
  content: '';
  position: absolute;
  top: 1.25rem;
  right: 1.2rem;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(31, 80, 104, 0.12), rgba(31, 80, 104, 0));
  pointer-events: none;
}

.slide-content::-webkit-scrollbar {
  width: 7px;
}

.slide-content::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 999px;
}

.slide-content::-webkit-scrollbar-track {
  background-color: #f1ece4;
  border-radius: 999px;
}

.slide-content :is(h1, h3, h4, p, li, .subtitle, .tip-box, .template-note, .key-points p) {
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: normal;
  hyphens: none;
  white-space: normal;
}

.slide-content .screenshot-caption {
  display: none !important;
}

h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: 2.44rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.015em;
  line-height: 1.29;
  margin-bottom: 0.34rem;
  text-wrap: balance;
}

.subtitle {
  font-size: 1.24rem;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.official-link {
  text-align: center;
  margin: -0.55rem 0 1rem;
}

.official-link a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 80, 104, 0.35);
}

.official-link a:hover {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

h3 {
  font-size: 1.36rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.16rem 0 0.42rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h4 {
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
  text-wrap: balance;
}

p {
  font-size: 1.18rem;
  line-height: 1.56;
  color: var(--ink-soft);
  margin-bottom: 0.62rem;
  text-wrap: pretty;
}

strong {
  color: #1f3f57;
}

.icon-list {
  list-style: none;
  margin: 0.5rem 0 0.9rem;
  padding-left: 0;
}

.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.44rem;
  padding: 0.52rem 0.66rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--chip-bg);
  font-size: 1.12rem;
  line-height: 1.46;
  color: var(--ink-soft);
}

.icon-list .icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.04rem;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.98rem;
  border-radius: 50%;
  background: #e7eef2;
}

.numbered-list {
  margin: 0.64rem 0 0.86rem 1.18rem;
  padding-left: 1.05rem;
}

.numbered-list li {
  margin-bottom: 0.28rem;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.numbered-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-right: 0.36rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: var(--shadow-sm);
}

.tip-box {
  background: linear-gradient(120deg, var(--tip-bg) 0%, #f3eade 100%);
  border: 1px solid #e3d6c6;
  border-left: 4px solid var(--accent-warm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.72rem 0.86rem;
  margin-top: 0.78rem;
  font-size: 1.08rem;
  line-height: 1.5;
  color: #394553;
}

.slide.content-sparse-active .slide-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.content-centered .slide-content {
  display: flex;
  align-items: center;
}

.slide.content-centered .slide-content-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
}

.slide.content-centered .slide-content-inner > p,
.slide.content-centered .slide-content-inner > h3,
.slide.content-centered .slide-content-inner > .icon-list,
.slide.content-centered .slide-content-inner > .tip-box,
.slide.content-centered .slide-content-inner > .numbered-list {
  max-width: min(94%, 1080px);
  margin-left: auto;
  margin-right: auto;
}

.slide.content-sparse-active .slide-content-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.slide.content-sparse-active .slide-content-inner > :not(.slide-screenshot):not(.slide-image-rail) {
  text-align: center;
}

.slide.content-sparse-active h1 {
  font-size: clamp(2.55rem, 3.15vw, 3.1rem);
  line-height: 1.22;
}

.slide.content-sparse-active .subtitle {
  font-size: 1.28rem;
  margin-bottom: 1.28rem;
}

.slide.content-sparse-active h3 {
  font-size: 1.42rem;
  margin-top: 1rem;
  margin-bottom: 0.34rem;
}

.slide.content-sparse-active p {
  font-size: 1.22rem;
  line-height: 1.54;
  margin-bottom: 0.66rem;
}

.slide.content-sparse-active .slide-screenshot--primary {
  float: none !important;
  width: min(64%, 760px) !important;
  margin: 0.56rem auto 0.98rem !important;
}

.slide.content-sparse-active .slide-screenshot--primary img {
  max-height: clamp(170px, 24vh, 280px);
}

.slide.content-sparse-active .icon-list,
.slide.content-sparse-active .numbered-list {
  max-width: min(92%, 960px);
  margin-left: auto;
  margin-right: auto;
}

.slide.content-sparse-active .icon-list li,
.slide.content-sparse-active .numbered-list li {
  font-size: 1.14rem;
  text-align: left;
}

.slide.content-sparse-active .tip-box {
  max-width: min(92%, 960px);
  margin-left: auto;
  margin-right: auto;
  font-size: 1.08rem;
  line-height: 1.46;
}

.slide.content-sparse-strong.content-sparse-active h1 {
  font-size: clamp(2.72rem, 3.45vw, 3.3rem);
}

.slide.content-sparse-strong.content-sparse-active p {
  font-size: 1.28rem;
}

.slide--dense h3 {
  margin-top: 0.92rem;
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
}

.slide--dense p {
  font-size: 1.02rem;
  line-height: 1.4;
  margin-bottom: 0.42rem;
}

.slide--dense .icon-list {
  margin: 0.4rem 0 0.68rem;
}

.slide--dense .icon-list li {
  font-size: 0.98rem;
  line-height: 1.34;
  padding: 0.34rem 0.5rem;
  margin-bottom: 0.28rem;
}

.slide--dense .numbered-list {
  margin: 0.4rem 0 0.68rem 1rem;
  padding-left: 0.9rem;
}

.slide--dense .numbered-list li {
  margin-bottom: 0.22rem;
  font-size: 0.98rem;
  line-height: 1.36;
}

.slide--dense .tip-box {
  margin-top: 0.55rem;
  padding: 0.58rem 0.74rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.slide--dense .slide-screenshot--primary img {
  max-height: clamp(110px, 16vh, 220px);
}

.slide--dense .slide-image-rail .slide-screenshot img {
  height: clamp(74px, 10.5vh, 124px);
}

.slide-screenshot {
  width: min(48%, 460px);
  margin: 0.62rem auto 0.72rem;
  padding: 0;
  position: relative;
}

.slide-screenshot--button-shot {
  width: min(64%, 760px);
  margin-top: 0.18rem;
}

.slide-screenshot--button-shot img {
  height: clamp(62px, 8.5vh, 104px);
  max-height: none;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.slide-screenshot img {
  width: 100%;
  max-width: 100%;
  max-height: clamp(140px, 22vh, 280px);
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* 인라인 SVG 개념도 — 실서비스 스크린샷 대신 사용하는 와이어프레임 목업 */
.slide-screenshot svg {
  width: 100%;
  height: auto;
  display: block;
}

.slide-screenshot img:hover {
  transform: none;
  box-shadow: none;
}

.slide-screenshot .screenshot-caption {
  display: none !important;
}

.slide-screenshot.is-missing img.is-missing {
  height: clamp(200px, 31vh, 330px);
  opacity: 0;
  border: 0;
  box-shadow: none;
  cursor: default;
}

.slide-screenshot.is-missing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-md);
  border: 2px dashed #cabda8;
  background:
    linear-gradient(145deg, rgba(249, 243, 234, 0.92), rgba(237, 244, 249, 0.92)),
    repeating-linear-gradient(
      -35deg,
      rgba(31, 80, 104, 0.06) 0 12px,
      rgba(154, 116, 64, 0.07) 12px 24px
    );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.slide-screenshot.is-missing::after {
  content: attr(data-placeholder);
  white-space: pre-line;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #5f6671;
  letter-spacing: -0.005em;
  line-height: 1.55;
  pointer-events: none;
}

.slide.image-flow-left .slide-content,
.slide.image-flow-right .slide-content {
  display: flow-root;
}

.slide.image-flow-left .slide-screenshot--primary,
.slide.image-flow-right .slide-screenshot--primary {
  width: min(30%, 360px);
  margin-top: 0.6rem;
  margin-bottom: 0.82rem;
}

.slide.image-flow-right .slide-screenshot--primary {
  float: right;
  margin-right: 0;
  margin-left: 1rem;
}

.slide.image-flow-left .slide-screenshot--primary {
  float: left;
  margin-left: 0;
  margin-right: 1rem;
}

.slide.image-flow-center .slide-screenshot--primary {
  float: none;
  width: min(48%, 560px);
  margin-left: auto;
  margin-right: auto;
}

.slide.image-flow-left .slide-screenshot--primary .screenshot-caption {
  text-align: left;
}

.slide.image-flow-center .slide-screenshot--primary .screenshot-caption {
  text-align: center;
}

.slide.image-size-sm.image-flow-left .slide-screenshot--primary,
.slide.image-size-sm.image-flow-right .slide-screenshot--primary {
  width: min(24%, 280px);
}

.slide.image-size-md.image-flow-left .slide-screenshot--primary,
.slide.image-size-md.image-flow-right .slide-screenshot--primary {
  width: min(30%, 360px);
}

.slide.image-size-lg.image-flow-left .slide-screenshot--primary,
.slide.image-size-lg.image-flow-right .slide-screenshot--primary {
  width: min(35%, 420px);
}

.slide.image-size-xl.image-flow-left .slide-screenshot--primary,
.slide.image-size-xl.image-flow-right .slide-screenshot--primary {
  width: min(40%, 500px);
}

.slide.image-size-sm.image-flow-center .slide-screenshot--primary {
  width: min(36%, 430px);
}

.slide.image-size-md.image-flow-center .slide-screenshot--primary {
  width: min(44%, 510px);
}

.slide.image-size-lg.image-flow-center .slide-screenshot--primary {
  width: min(52%, 610px);
}

.slide.image-size-xl.image-flow-center .slide-screenshot--primary {
  width: min(58%, 700px);
}

.slide.content-centered.image-flow-left .slide-content,
.slide.content-centered.image-flow-right .slide-content,
.slide.content-centered.image-flow-center .slide-content {
  display: flex !important;
  align-items: center;
}

.slide.has-media-rail .slide-screenshot--primary {
  float: none !important;
  width: min(56%, 680px) !important;
  margin: 0.44rem auto 0.66rem !important;
}

.slide.has-media-rail .slide-screenshot--primary img {
  max-height: clamp(170px, 25vh, 320px);
}

.slide.has-media-rail .slide-image-rail {
  clear: both;
  gap: 0.7rem;
  margin: 0.3rem auto 0.82rem;
  align-items: stretch;
}

.slide.has-media-rail.has-media-rail-duo .slide-image-rail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: min(88%, 980px);
}

.slide.has-media-rail.has-media-rail-single .slide-image-rail {
  grid-template-columns: 1fr;
  max-width: min(70%, 760px);
}

.slide.has-media-rail .slide-image-rail .slide-screenshot {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.slide.has-media-rail .slide-image-rail .slide-screenshot:not(.slide-screenshot--button-shot) img {
  width: 100%;
  min-height: clamp(120px, 17vh, 220px);
  height: clamp(120px, 17vh, 220px);
  max-height: none;
  border: 0;
  box-shadow: none;
  background: transparent;
  object-fit: contain;
}

.slide.has-media-rail .slide-image-rail .slide-screenshot--button-shot {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.media-pair-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.78rem;
  align-items: start;
  margin: 0.3rem auto 0.86rem;
  max-width: min(86%, 980px);
}

.media-pair-row > .slide-screenshot {
  width: 100% !important;
  margin: 0 !important;
}

.media-pair-row > .slide-image-rail {
  clear: none;
  width: 100%;
  max-width: none !important;
  margin: 0;
}

.media-pair-row .slide-image-rail .slide-screenshot {
  margin: 0;
}

.media-pair-row .slide-screenshot img,
.media-pair-row .slide-image-rail .slide-screenshot img {
  width: 100% !important;
  max-width: 100%;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0;
  object-fit: contain;
}

.slide-image-rail {
  clear: both;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.56rem;
  margin: 0.22rem 0 0.74rem;
}

.slide-image-rail--single {
  grid-template-columns: 1fr;
}

.slide-image-rail--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slide-image-rail .slide-screenshot {
  width: 100%;
  margin: 0;
}

.slide-image-rail .slide-screenshot img {
  width: 100%;
  height: clamp(110px, 15vh, 200px);
  max-height: none;
  object-fit: contain;
  background: transparent;
}

.slide-image-rail .slide-screenshot .screenshot-caption {
  display: none;
}

.slide.compact-media .slide-screenshot--primary {
  width: min(24%, 290px) !important;
  margin-left: 0.72rem !important;
  margin-right: 0.72rem !important;
}

.slide.compact-media .slide-image-rail {
  gap: 0.42rem;
  margin-bottom: 0.56rem;
}

.slide.compact-media .slide-image-rail .slide-screenshot img {
  height: clamp(74px, 10.5vh, 126px);
}

.slide.compact-media .slide-screenshot--button-shot {
  width: min(56%, 620px);
}

.slide.compact-media .slide-screenshot--button-shot img {
  height: clamp(56px, 7.6vh, 92px);
}

.slide.super-compact-media .slide-image-rail {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5vh 2.5vw;
  background: rgba(9, 14, 23, 0.84);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox__panel {
  position: relative;
  width: min(94vw, 1540px);
  max-height: 94vh;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(11, 20, 32, 0.44);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.image-lightbox__image {
  width: 100%;
  max-height: 87vh;
  display: block;
  object-fit: contain;
  background: #0f1722;
}

.image-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(19, 27, 38, 0.74);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox__close:hover {
  background: rgba(19, 27, 38, 0.95);
}

.image-lightbox__hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(16, 23, 33, 0.65);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.key-points {
  margin-top: 0.9rem;
}

.key-points p {
  margin-bottom: 0.44rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  margin: 0.82rem 0 0.62rem;
}

.template-card {
  background: linear-gradient(165deg, #fffdfa 0%, #f8f3ec 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 0.84rem 0.9rem;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.template-card:hover {
  transform: translateY(-2px);
  border-color: #cabda9;
  box-shadow: var(--shadow-sm);
}

.template-card--free {
  border-color: #bdd3cb;
  background: linear-gradient(165deg, #f8fcfa 0%, #edf7f3 100%);
}

.template-card--recommended {
  border-color: #d9cbb7;
  background: linear-gradient(165deg, #fef9f1 0%, #f9efe2 100%);
}

.template-card__badge {
  display: inline-block;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  margin-bottom: 0.42rem;
  background: #dbe7ef;
  color: var(--accent-strong);
}

.template-card__badge--pro {
  background: #f0e4d4;
  color: #7a5628;
}

.template-card__badge--ai {
  background: #e9dfd0;
  color: #6f4c22;
}

.template-card h4 {
  margin-bottom: 0.31rem;
}

.template-card p {
  font-size: 0.98rem;
  margin-bottom: 0;
  line-height: 1.46;
}

.template-note {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-top: 0.42rem;
}

.nav-buttons {
  position: fixed;
  right: 3vw;
  bottom: 2.8vh;
  display: flex;
  gap: 0.42rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(218, 210, 198, 0.9);
  border-radius: 999px;
  padding: 0.34rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.nav-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 7px 14px rgba(31, 80, 104, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 16px rgba(31, 80, 104, 0.34);
  filter: brightness(1.03);
}

.nav-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.slide-indicator {
  position: fixed;
  left: 3vw;
  bottom: 2.8vh;
  z-index: 100;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #d9d0c4;
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  font-weight: 700;
  color: #525f6f;
}

.structure-editor-toggle {
  display: none !important;
  position: fixed;
  top: 2.4vh;
  right: 3vw;
  z-index: 160;
  border: 1px solid #c6d2db;
  background: rgba(255, 255, 255, 0.9);
  color: #204761;
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.structure-editor-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(31, 80, 104, 0.2);
}

.structure-editor-toggle[aria-expanded='true'] {
  background: #ecf3f7;
}

.structure-editor {
  position: fixed;
  top: 4.9rem;
  right: 3vw;
  z-index: 170;
  width: min(430px, 94vw);
  max-height: calc(100vh - 6.1rem);
  padding: 0.78rem;
  border-radius: var(--radius-md);
  border: 1px solid #c9d4dd;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 250, 252, 0.97) 100%);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.structure-editor.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.structure-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.structure-editor__title {
  font-size: 0.9rem;
  color: #1f4156;
}

.structure-editor__close {
  border: 1px solid #d2dde5;
  background: #ffffff;
  color: #4a5a68;
  border-radius: 999px;
  padding: 0.2rem 0.64rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.structure-editor__help {
  font-size: 0.75rem;
  color: #536678;
  line-height: 1.38;
  margin-bottom: 0.05rem;
}

.structure-editor__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  color: #5b6f81;
  padding: 0.34rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid #d6e0e7;
  background: #f6fafc;
}

.structure-editor__section-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #486176;
  margin-top: 0.1rem;
}

.structure-editor__tree {
  max-height: min(32vh, 320px);
  overflow: auto;
  padding: 0.32rem 0.28rem;
  border: 1px solid #d2dde5;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.structure-editor__tree-list {
  list-style: none;
  margin: 0;
  padding-left: 0.26rem;
}

.structure-editor__tree-item {
  margin: 0;
}

.structure-editor__tree-node {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #263847;
  border-radius: 8px;
  padding: 0.22rem 0.46rem;
  padding-left: calc(0.46rem + (var(--depth, 0) * 0.84rem));
  font-size: 0.76rem;
  line-height: 1.32;
  cursor: pointer;
  font-family: 'Consolas', 'Noto Sans KR', monospace;
}

.structure-editor__tree-node:hover {
  background: #f2f7fb;
  border-color: #d2e0ea;
}

.structure-editor__tree-node.is-active {
  background: #e5eff6;
  border-color: #b8cddd;
  color: #173f57;
}

.structure-editor__field {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.structure-editor__field span {
  font-size: 0.71rem;
  letter-spacing: 0.01em;
  color: #5d7182;
}

.structure-editor__field input,
.structure-editor__field textarea {
  width: 100%;
  border: 1px solid #d2dde6;
  border-radius: 9px;
  padding: 0.4rem 0.48rem;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #25384a;
  background: #ffffff;
}

.structure-editor__field textarea {
  min-height: 72px;
  max-height: 180px;
  resize: vertical;
  font-family: 'Consolas', 'Noto Sans KR', monospace;
}

.structure-editor__field textarea[readonly] {
  background: #f8fbfd;
}

.structure-editor__field input:disabled,
.structure-editor__field textarea:disabled {
  background: #f0f4f7;
  color: #7f8f9b;
}

.structure-editor__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
}

.structure-editor__actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.26rem;
}

.structure-editor__actions button {
  border: 1px solid #c6d4df;
  border-radius: 9px;
  background: #f8fbfd;
  color: #20465f;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.38rem 0.28rem;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.structure-editor__actions button:hover {
  background: #edf4f9;
  border-color: #b9ccdc;
}

.structure-editor__actions button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.structure-editor__actions .is-danger {
  color: #8c2f33;
  border-color: #dfc5c7;
  background: #fdf4f5;
}

.structure-editor__actions--export {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.structure-editor__text-tools,
.structure-editor__image-tools {
  border: 1px solid #d2dde6;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.44rem 0.5rem 0.5rem;
  display: grid;
  gap: 0.28rem;
}

.structure-editor__text-tools.is-disabled,
.structure-editor__image-tools.is-disabled {
  opacity: 0.58;
  pointer-events: none;
}

.structure-editor__range-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  color: #4f6476;
}

.structure-editor__range-label strong {
  font-size: 0.72rem;
  color: #25475f;
}

.structure-editor__text-tools input[type='range'],
.structure-editor__image-tools input[type='range'] {
  width: 100%;
  accent-color: #2f6a89;
}

.structure-editor__drag-hint {
  font-size: 0.68rem;
  line-height: 1.34;
  color: #5d7283;
  margin-top: 0.05rem;
}

.structure-editor__mini-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.structure-editor__mini-actions--add {
  justify-content: stretch;
}

.structure-editor__mini-actions--add button {
  flex: 1 1 46%;
}

.structure-editor__mini-actions button {
  border: 1px solid #c6d4df;
  border-radius: 9px;
  background: #f8fbfd;
  color: #20465f;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.34rem 0.54rem;
  cursor: pointer;
}

.structure-editor__mini-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.se-draggable-figure {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: left, top, width;
}

.se-draggable-figure[data-se-crop-active='1'] img {
  cursor: grab;
}

.se-added-text {
  font-weight: 700;
  color: #1f4056;
}

.se-dragging-target {
  cursor: grabbing;
  transition: none !important;
}

.se-crop-dragging img {
  cursor: grabbing !important;
}

.se-resize-handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: linear-gradient(145deg, #2f6a89, #1f5068);
  box-shadow: 0 2px 8px rgba(31, 80, 104, 0.35);
  cursor: nwse-resize;
  z-index: 15;
  touch-action: none;
}

body.structure-editor-open .slide.active .slide-content,
body.structure-editor-open .slide.active .slide-content > .slide-content-inner > * {
  animation: none !important;
}

body.structure-editor-open .slide-content-inner {
  transition: none;
}

.structure-editor__status {
  font-size: 0.73rem;
  line-height: 1.32;
  color: #4d6374;
  padding: 0.38rem 0.5rem;
  border-radius: 9px;
  border: 1px solid #d2dde5;
  background: #f7fbfd;
}

.structure-editor__status.is-error {
  color: #7d2a2f;
  border-color: #e5c3c5;
  background: #fdf1f2;
}

.se-selected-target {
  outline: 3px solid rgba(227, 134, 50, 0.86) !important;
  outline-offset: 2px;
}

.se-hover-target {
  outline: 2px dashed rgba(31, 80, 104, 0.78) !important;
  outline-offset: 2px;
}

@keyframes slide-card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.994);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slide-item-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide.active .slide-content {
  animation: slide-card-in 0.42s ease both;
}

.slide.active .slide-content > .slide-content-inner > * {
  animation: slide-item-in 0.44s ease both;
}

.slide.active .slide-content > .slide-content-inner > *:nth-child(1) { animation-delay: 0.02s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(2) { animation-delay: 0.05s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(3) { animation-delay: 0.08s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(4) { animation-delay: 0.11s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(5) { animation-delay: 0.14s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(6) { animation-delay: 0.17s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(7) { animation-delay: 0.2s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(8) { animation-delay: 0.23s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(9) { animation-delay: 0.26s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(10) { animation-delay: 0.29s; }
.slide.active .slide-content > .slide-content-inner > *:nth-child(11) { animation-delay: 0.32s; }

@media (min-width: 1100px) {
  .slide {
    padding: 0.8vh 0.6vw;
  }

  .slide-content {
    max-width: 1520px;
    max-height: 96.5vh;
    padding-left: 2.4rem;
    padding-right: 2.4rem;
  }

  .slide-screenshot {
    width: min(52%, 580px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .slide.active .slide-content,
  .slide.active .slide-content > .slide-content-inner > * {
    animation: none;
    transition: none;
  }
}

@media (max-width: 1024px) {
  .slide {
    padding: 2vh 2.2vw;
  }

  .slide-content {
    padding: 2.25rem 1.85rem 1.8rem;
    min-height: 0;
    max-height: 96vh;
    max-width: 1080px;
  }

  .slide.image-flow-left .slide-content,
  .slide.image-flow-right .slide-content {
    display: block;
  }

  .slide.image-flow-left .slide-screenshot--primary,
  .slide.image-flow-right .slide-screenshot--primary,
  .slide.image-flow-center .slide-screenshot--primary {
    float: none;
    margin-left: auto;
    margin-right: auto;
    width: min(96%, 680px) !important;
  }

  /* 좁은 화면: keep-all 유지하되, 한 줄에 못 들어가는 긴 토큰은 비상 줄바꿈 허용 */
  .slide-content :is(h1, h3, h4, p, li, .subtitle, .tip-box, .template-note, .key-points p) {
    overflow-wrap: anywhere;
  }

  .slide-image-rail {
    grid-template-columns: 1fr;
  }

  .slide-image-rail--duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slide.has-media-rail .slide-screenshot--primary {
    width: min(76%, 560px) !important;
  }

  .slide.has-media-rail.has-media-rail-single .slide-image-rail,
  .slide.has-media-rail.has-media-rail-duo .slide-image-rail {
    max-width: 100%;
  }

  .slide-screenshot {
    width: min(76%, 560px);
  }

  .slide-screenshot img {
    max-height: clamp(170px, 29vh, 320px);
  }

  .template-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.98rem;
  }

  h3 {
    font-size: 1.16rem;
  }

  p,
  .icon-list li,
  .numbered-list li {
    font-size: 1.01rem;
  }

  .media-pair-row {
    max-width: 100%;
    gap: 0.56rem;
  }

  .structure-editor-toggle {
    right: 2.2vw;
  }

  .structure-editor {
    right: 2.2vw;
    width: min(410px, 95vw);
    max-height: calc(100vh - 5.8rem);
  }
}

@media (max-width: 768px) {
  .slide {
    padding: 1.4vh 2.8vw 6.6rem;
    align-items: flex-start;
  }

  .slide-content {
    padding: 1.8rem 1.1rem calc(2rem + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 8rem);
    border-radius: var(--radius-md);
    scroll-padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
  }

  .slide-content::after {
    width: 94px;
    height: 94px;
    top: 1rem;
    right: 1rem;
  }

  .slide-screenshot {
    width: 100%;
  }

  .slide-screenshot img {
    max-height: clamp(170px, 30vh, 310px);
  }

  .image-lightbox {
    padding: 1.8vh 2.5vw;
  }

  .image-lightbox__panel {
    width: 95vw;
  }

  .image-lightbox__hint {
    font-size: 0.76rem;
  }

  h1 {
    font-size: 1.66rem;
    line-height: 1.38;
  }

  .subtitle {
    font-size: 0.96rem;
    margin-bottom: 0.96rem;
  }

  h3 {
    font-size: 1.04rem;
  }

  p,
  .icon-list li,
  .numbered-list li {
    font-size: 0.95rem;
  }

  /* 좁은 화면: 아이콘·볼드 라벨을 플렉스 칼럼 대신 본문 흐름으로 — 한 글자씩 세로로 쪼개지는 것 방지 */
  .icon-list li {
    display: block;
  }

  .icon-list .icon {
    margin-right: 0.34rem;
    vertical-align: -0.34rem;
  }

  .slide--dense h3 {
    font-size: 1rem;
  }

  .slide.content-sparse-active .slide-content {
    display: block;
  }

  .slide.content-centered .slide-content {
    display: block;
  }

  .slide.content-sparse-active .slide-content-inner > :not(.slide-screenshot):not(.slide-image-rail) {
    text-align: initial;
  }

  .slide--dense p,
  .slide--dense .icon-list li,
  .slide--dense .numbered-list li {
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .slide--dense .slide-screenshot--primary img {
    max-height: clamp(150px, 28vh, 250px);
  }

  .template-card p {
    font-size: 0.87rem;
  }

  .nav-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 1rem;
  }

  .slide-indicator {
    font-size: 0.82rem;
    padding: 0.35rem 0.75rem;
  }

  .nav-buttons,
  .slide-indicator {
    bottom: max(0.8rem, env(safe-area-inset-bottom));
  }

  .structure-editor-toggle {
    top: auto;
    bottom: calc(3.9rem + env(safe-area-inset-bottom));
    right: 2.8vw;
    font-size: 0.74rem;
    padding: 0.35rem 0.78rem;
  }

  .structure-editor {
    top: 7.5vh;
    right: 2.8vw;
    left: 2.8vw;
    width: auto;
    max-height: calc(100dvh - 10.2rem);
    padding: 0.68rem 0.68rem calc(0.9rem + env(safe-area-inset-bottom));
  }

  .structure-editor__tree {
    max-height: min(26vh, 260px);
  }

  .structure-editor__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .structure-editor__actions--export {
    grid-template-columns: 1fr;
  }

  .se-resize-handle {
    width: 20px;
    height: 20px;
    right: -10px;
    bottom: -10px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.48rem;
  }

  .slide-screenshot img {
    max-height: clamp(150px, 28vh, 250px);
  }

  .media-pair-row {
    gap: 0.44rem;
  }

  p,
  .icon-list li,
  .numbered-list li {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .tip-box {
    font-size: 0.92rem;
  }

  .slide {
    padding-bottom: 6.2rem;
  }

  .slide-content {
    max-height: calc(100dvh - 7.4rem);
    padding-bottom: calc(2.1rem + env(safe-area-inset-bottom));
  }

  .nav-buttons {
    right: 2.5vw;
  }

  .slide-indicator {
    left: 2.5vw;
  }

  .structure-editor {
    max-height: calc(100dvh - 9.8rem);
  }

  .structure-editor__grid {
    grid-template-columns: 1fr;
  }
}
