/* =====================================================================
   nooly · i see you deck — Daylight Edition
   Modern Gen-Z editorial · bright, airy, confident
   Lime + ink on cream. Pretendard + Space Grotesk + JetBrains Mono.
   ===================================================================== */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #f3efe7;
  --surface: #fbf8f1;
  --surface-1: #f0ece2;
  --surface-2: #e7e2d4;

  --ink: #14140f;
  --ink-soft: #3d3a32;
  --ink-faint: #807a6c;
  --mute: #b3aea0;

  --accent: #c5f24a;
  --accent-deep: #a6d825;
  --accent-ink: #1a2305;
  --accent-bg: #dff58a;
  --accent-bg-strong: #c5f24a;
  --accent-glow: rgba(197, 242, 74, 0.6);

  --line: #d8d2c1;
  --line-soft: #e6e1d2;
  --rule: #14140f;

  --radius: 6px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  height: 100%;
  font-family: "NanumSquareNeoVariable", "NanumSquareNeo",
    "Pretendard Variable", "Pretendard",
    "Space Grotesk", -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  font-feature-settings: "ss01", "ss02", "tnum";
}

body {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 48px);
  background:
    radial-gradient(1200px 800px at 88% -10%, rgba(197, 242, 74, 0.18) 0%, transparent 55%),
    radial-gradient(900px 700px at 5% 110%, rgba(255, 196, 161, 0.22) 0%, transparent 55%),
    var(--bg);
  position: relative;
}

.deck {
  --max-w: min(1640px, 96vw);
  --max-h: calc(100vh - clamp(32px, 6vw, 96px));
  --h: min(calc(var(--max-w) * 10 / 16), var(--max-h));
  position: relative;
  width: calc(var(--h) * 16 / 10);
  height: var(--h);
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 0 0 1px rgba(20, 20, 15, 0.08),
    0 32px 60px -28px rgba(20, 20, 15, 0.18),
    0 8px 24px rgba(20, 20, 15, 0.06);
}

.folio {
  position: absolute;
  top: 18px;
  right: 80px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  padding: 7px 12px;
  background: rgba(20, 20, 15, 0.04);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.folio-num {
  color: var(--ink);
  font-weight: 600;
  min-width: 28px;
  text-align: right;
  display: inline-block;
  transition: color 0.3s var(--ease);
}
.folio-slash { color: var(--ink-faint); opacity: 0.6; }
.folio-total { color: var(--ink-faint); }
.folio.folio-hidden { visibility: hidden; }

.corner {
  position: absolute;
  top: 16px;
  right: 18px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.corner button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}
.corner button:hover { opacity: 1; background: rgba(20, 20, 15, 0.06); }
.corner button:focus-visible {
  outline: 1.5px solid var(--accent-deep);
  outline-offset: 2px;
  opacity: 1;
}

.nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 120px;
  background: transparent;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.4;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
  z-index: 100;
  border-radius: 12px;
}
.nav:hover { opacity: 1; color: var(--ink); }
.nav:active { transform: translateY(-50%) scale(0.94); }
.nav:focus-visible {
  outline: 1.5px solid var(--accent-deep);
  outline-offset: 4px;
  opacity: 1;
  color: var(--ink);
}
.nav svg { width: 48px; height: 48px; stroke-width: 1.4; }
.nav-prev { left: clamp(6px, 1vw, 24px); }
.nav-next { right: clamp(6px, 1vw, 24px); }

.stage {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slide:not(.cover) {
  padding:
    clamp(72px, 7.5vw, 110px)
    clamp(64px, 7vw, 120px)
    clamp(48px, 5vw, 80px);
  gap: clamp(28px, 2.6vw, 42px);
}

.slide:not(.cover)::before { content: none; }

.slide > .date,
.slide > .headline,
.slide > .bullets > li {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.slide.active > .date           { opacity: 1; transform: none; transition-delay: 60ms; }
.slide.active > .headline       { opacity: 1; transform: none; transition-delay: 160ms; }
.slide.active > .bullets > li   { opacity: 1; transform: none; }
.slide.active > .bullets > li:nth-child(1) { transition-delay: 260ms; }
.slide.active > .bullets > li:nth-child(2) { transition-delay: 320ms; }
.slide.active > .bullets > li:nth-child(3) { transition-delay: 380ms; }
.slide.active > .bullets > li:nth-child(4) { transition-delay: 440ms; }
.slide.active > .bullets > li:nth-child(5) { transition-delay: 500ms; }
.slide.active > .bullets > li:nth-child(6) { transition-delay: 560ms; }

.slide:not(.active) { transition: opacity 0.2s var(--ease); }

.date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  padding: 9px 16px 9px 14px;
  border-radius: var(--radius-pill);
  align-self: flex-start;
  width: auto;
  max-width: max-content;
  box-shadow: 0 4px 14px -4px var(--accent-glow);
}

.date::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 50%;
  flex-shrink: 0;
}

.headline {
  font-size: clamp(40px, 4.4vw, 72px);
  line-height: 1.344;
  letter-spacing: -0.034em;
  font-weight: 700;
  color: var(--ink);
  max-width: 1360px;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: auto;
}

.headline.flow {
  line-height: 1.368;
  letter-spacing: -0.028em;
  max-width: 1360px;
}

.headline mark,
.bullets li mark {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  padding: 0.04em 0.28em;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: none;
}

.headline mark {
  font-weight: 700;
  padding: 0.02em 0.3em;
  border-radius: 8px;
}

.headline .sub {
  font-size: 0.62em;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: -0.02em;
}

.bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.4vw, 22px);
  margin-top: clamp(8px, 1vw, 16px);
  max-width: 1360px;
}

.bullets li {
  font-size: clamp(17px, 1.45vw, 23px);
  line-height: 1.55;
  color: var(--ink-soft);
  padding-left: 32px;
  position: relative;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: auto;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.bullets li strong { color: var(--ink); font-weight: 700; }
.bullets li em { font-style: italic; color: var(--ink-faint); font-weight: 400; }
.bullets li p { display: inline; }

.pills {
  display: flex;
  gap: 0;
  padding: 0 clamp(20px, 3vw, 48px);
  height: 48px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--surface-1);
  position: relative;
}

.pill.pill-cover {
  flex: 0 0 auto;
  width: 36px;
  height: 32px;
  padding: 0;
  margin-right: 18px;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  font-size: 0;
  transition: color 0.2s var(--ease);
  border-radius: 8px;
}

.pill.pill-cover::before { display: none; }

.pill.pill-cover::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: -10px;
  width: 1px;
  background: var(--line);
}

.pill.pill-cover svg {
  width: 16px;
  height: 16px;
  display: block;
  transition: transform 0.25s var(--ease);
}

.pill.pill-cover:hover {
  color: var(--ink);
  background: rgba(20, 20, 15, 0.05);
}
.pill.pill-cover:hover svg { transform: translateY(-1px); }

.pill.pill-cover.active {
  color: var(--ink);
  background: var(--accent);
}

.pill.pill-closing {
  margin-right: 0;
  margin-left: 18px;
}
.pill.pill-closing::after {
  left: -10px;
  right: auto;
}

.pill.pill-cover.active::after,
.pill.pill-cover.past::after,
.pill.pill-closing.active::after,
.pill.pill-closing.past::after {
  width: 1px;
  background: var(--line);
  box-shadow: none;
}

.pill {
  flex: 0 0 auto;
  min-width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  padding: 0 8px;
  position: relative;
  cursor: pointer;
  color: var(--ink-faint);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border-radius: 8px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill::after { content: none; }

.pill:hover { color: var(--ink); background: rgba(20, 20, 15, 0.05); }
.pill.past { color: var(--mute); }
.pill.active { color: var(--ink); background: var(--accent); font-weight: 700; }
.pill:focus-visible { outline: none; color: var(--ink); background: rgba(20, 20, 15, 0.06); }

.player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(28px, 4vw, 56px) 20px;
  background: var(--surface);
}

.player-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 20px;
  background: var(--surface-1);
  border-radius: var(--radius-pill);
  min-height: 42px;
  border: 1px solid var(--line);
}

.play {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
  flex-shrink: 0;
}

.play:hover { background: #000; transform: translateY(-1px); }
.play:active { transform: translateY(0) scale(0.97); }

.play > svg.icon-play,
.play > svg.icon-pause {
  position: relative;
  z-index: 1;
  color: var(--accent);
}

.play .ring {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  transform: rotate(-90deg);
  pointer-events: none;
}

.ring-track { fill: none; stroke: transparent; }
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.15s linear;
}

.play .icon-pause { display: none; }
.play.playing .icon-play { display: none; }
.play.playing .icon-pause { display: block; }

.time, .count {
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.time {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 124px;
}
.time::before {
  content: "● NARRATION";
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
  font-weight: 600;
}

.count { min-width: 50px; text-align: right; color: var(--ink-faint); }

.scrub {
  flex: 1;
  height: 22px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.scrub::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: var(--surface-2);
  border-radius: 999px;
}

.scrub-fill {
  position: absolute;
  left: 0;
  height: 3px;
  background: var(--ink);
  border-radius: 999px;
  width: 0%;
  transition: width 0.12s linear;
}

.scrub-knob {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--ink);
  border-radius: 50%;
  left: 0%;
  transform: translateX(-50%);
  transition: left 0.12s linear;
  box-shadow: 0 2px 6px rgba(20, 20, 15, 0.25);
}

.vol {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s var(--ease);
  flex-shrink: 0;
  opacity: 0.7;
}

.vol:hover { color: var(--ink); background: rgba(20, 20, 15, 0.05); opacity: 1; }
.vol .icon-muted { display: none; }
.vol.muted .icon-vol { display: none; }
.vol.muted .icon-muted { display: block; color: var(--ink); opacity: 1; }

.slide.cover {
  justify-content: space-between;
  gap: 0;
  padding:
    clamp(48px, 5vw, 72px)
    clamp(56px, 6vw, 96px)
    clamp(40px, 4.5vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(900px 700px at 88% 110%, rgba(197, 242, 74, 0.30) 0%, transparent 55%),
    var(--surface);
}

.cover-iris {
  position: absolute;
  right: clamp(-120px, -8vw, -60px);
  bottom: clamp(-140px, -10vw, -80px);
  width: clamp(420px, 56vw, 720px);
  height: clamp(420px, 56vw, 720px);
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      rgba(197, 242, 74, 0.55) 0%,
      rgba(197, 242, 74, 0.25) 22%,
      rgba(197, 242, 74, 0.08) 48%,
      transparent 72%);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
  z-index: 0;
  filter: blur(4px);
}

.cover-iris::after {
  content: "";
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(197, 242, 74, 0.4) 0%,
    rgba(197, 242, 74, 0.1) 60%,
    transparent 100%);
  filter: blur(8px);
}

.slide.cover.active .cover-iris {
  opacity: 1;
  transform: scale(1);
  transition-delay: 100ms;
}

.cover-eye {
  position: absolute;
  right: clamp(140px, 17vw, 245px);
  bottom: clamp(120px, 15vw, 220px);
  width: 38%;
  height: auto;
  transform: translate(50%, 50%) scale(0.94);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at center,
    black 32%,
    rgba(0, 0, 0, 0.85) 48%,
    rgba(0, 0, 0, 0.35) 62%,
    transparent 76%);
          mask-image: radial-gradient(circle at center,
    black 32%,
    rgba(0, 0, 0, 0.85) 48%,
    rgba(0, 0, 0, 0.35) 62%,
    transparent 76%);
  filter: contrast(1.1) brightness(0.95) saturate(0.5);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.slide.cover.active .cover-eye {
  opacity: 0.7;
  transform: translate(50%, 50%) scale(1);
  transition-delay: 240ms;
}

.cover-portrait {
  position: absolute;
  right: clamp(40px, 5vw, 96px);
  top: 50%;
  transform: translate(0, -50%) scale(0.96);
  width: clamp(256px, 25.5vw, 420px);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center 32%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  border-radius: 50%;
  -webkit-mask-image:
    radial-gradient(circle at 50% 46%,
      black 40%,
      rgba(0, 0, 0, 0.88) 60%,
      rgba(0, 0, 0, 0.4) 80%,
      transparent 95%),
    linear-gradient(94deg,
      transparent 12%,
      rgba(0, 0, 0, 0.5) 22%,
      rgba(0, 0, 0, 0.9) 32%,
      black 40%);
          mask-image:
    radial-gradient(circle at 50% 46%,
      black 40%,
      rgba(0, 0, 0, 0.88) 60%,
      rgba(0, 0, 0, 0.4) 80%,
      transparent 95%),
    linear-gradient(94deg,
      transparent 12%,
      rgba(0, 0, 0, 0.5) 22%,
      rgba(0, 0, 0, 0.9) 32%,
      black 40%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  filter: contrast(1.05) saturate(0.95);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.slide.cover.closing.active .cover-portrait {
  opacity: 0.95;
  transform: translate(0, -50%) scale(1);
  transition-delay: 260ms;
}

.slide.cover.closing .cover-iris { opacity: 0; }
.slide.cover.closing.active .cover-iris { opacity: 0.4; }

.slide.cover.closing .cover-title {
  font-size: clamp(72px, 11vw, 168px);
  letter-spacing: -0.044em;
}
.slide.cover.closing .cover-body { max-width: min(820px, 68%); }
.slide.cover.closing .cover-mast,
.slide.cover.closing .cover-foot { max-width: min(900px, 74%); }

.slide.cover > .cover-mast,
.slide.cover > .cover-body,
.slide.cover > .cover-foot {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.slide.cover.active > .cover-mast { opacity: 1; transform: none; transition-delay: 60ms; }
.slide.cover.active > .cover-body { opacity: 1; transform: none; transition-delay: 180ms; }
.slide.cover.active > .cover-foot { opacity: 1; transform: none; transition-delay: 320ms; }

.cover-mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.cover-mast-left { display: flex; align-items: center; gap: 12px; }

.cover-dot {
  width: 9px;
  height: 9px;
  background: var(--accent);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: inline-block;
}

.cover-mast-right { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.cover-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: clamp(20px, 3.5vw, 44px) 0;
}

.cover-eyebrow {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: clamp(20px, 2.5vw, 36px);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}
.cover-eyebrow::before {
  content: "";
  width: 24px;
  height: 8px;
  background: var(--accent);
  border-radius: 4px;
  display: inline-block;
}

.cover-title {
  font-size: clamp(140px, 19vw, 280px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.062em;
  color: var(--ink);
  margin: 0;
  font-family: "NanumSquareNeoVariable", "NanumSquareNeo", "Pretendard Variable", "Pretendard", "Space Grotesk", sans-serif;
}

.cover-rule {
  width: 96px;
  height: 4px;
  background: var(--ink);
  margin: clamp(32px, 3.5vw, 48px) 0 clamp(24px, 2.5vw, 32px);
  border-radius: 2px;
}

.cover-thesis {
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.32;
  letter-spacing: -0.024em;
  font-weight: 600;
  color: var(--ink);
  max-width: 32ch;
  word-break: keep-all;
  overflow-wrap: break-word;
  margin: 0;
}

.cover-thesis mark {
  background: var(--accent);
  color: var(--ink);
  padding: 0.04em 0.3em;
  border-radius: 8px;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.cover-foot {
  display: flex;
  gap: clamp(30px, 4.2vw, 68px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  align-items: flex-end;
}

.cover-col { display: flex; flex-direction: column; gap: 6px; }
.cover-col-right { margin-left: auto; }

.cover-label {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.cover-value {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.edit-modal {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 15, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 50;
}
.edit-modal[hidden] { display: none; }

.edit-panel {
  width: min(900px, 100%);
  max-height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px var(--line),
    0 40px 80px -20px rgba(20, 20, 15, 0.3);
  overflow: hidden;
}

.edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.edit-title {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
}
.edit-title span { color: var(--accent-deep); }

.edit-tabs {
  display: inline-flex;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.edit-tab {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.edit-tab:hover { color: var(--ink); }
.edit-tab.is-active { background: var(--accent); color: var(--ink); }

.edit-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.edit-toolbar.is-disabled { opacity: 0.4; pointer-events: none; }
.tb-group { display: inline-flex; align-items: center; gap: 2px; }
.tb-group > button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.12s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tb-group > button:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.tb-group > button.is-active {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent-deep);
}
.tb-bold { font-weight: 900; }
.tb-italic { font-style: italic; font-family: "Georgia", serif; }
.tb-mark-icon {
  background: var(--accent);
  color: var(--ink);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.tb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.tb-spacer { flex: 1; }

.tb-font {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tb-font > button { border: none; }
.tb-font-input {
  width: 44px;
  height: 22px;
  padding: 0 4px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.tb-font-input::-webkit-outer-spin-button,
.tb-font-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tb-font-input::placeholder { color: var(--ink-faint); }
.tb-font-input:focus {
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--accent-deep);
  border-radius: 3px;
}
.tb-font-reset { font-size: 11px !important; }

.edit-body {
  flex: 1;
  display: flex;
  min-height: 320px;
  background: var(--surface);
}
.edit-rich,
.edit-textarea {
  flex: 1;
  width: 100%;
  min-height: 320px;
  max-height: 60vh;
  overflow: auto;
}

.edit-textarea {
  padding: 18px 20px;
  border: none;
  resize: none;
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  caret-color: var(--accent-deep);
}
.edit-textarea::selection { background: var(--accent-bg); }

.edit-rich {
  padding: 22px 26px;
  background: var(--surface);
  color: var(--ink);
}
.edit-rich .pm-surface {
  outline: none;
  min-height: 280px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  caret-color: var(--accent-deep);
}
.edit-rich .pm-surface > * + * { margin-top: 0.7em; }
.edit-rich h1 { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.022em; color: var(--ink); }
.edit-rich h2 { font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -0.012em; color: var(--ink); }
.edit-rich h3 { font-size: 17px; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.edit-rich p { font-size: 16px; color: var(--ink); }
.edit-rich ul, .edit-rich ol { padding-left: 1.4em; }
.edit-rich li { margin: 0.25em 0; font-size: 16px; }
.edit-rich li::marker { color: var(--accent-deep); }
.edit-rich strong { color: var(--ink); font-weight: 800; }
.edit-rich em { color: var(--ink-soft); font-style: italic; }
.edit-rich mark {
  background: var(--accent);
  color: var(--ink);
  padding: 0 4px;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.edit-rich ::selection { background: var(--accent-bg); }
.edit-rich .pm-surface p.is-editor-empty:first-child::before {
  content: "내용을 입력하세요…";
  color: var(--ink-faint);
  pointer-events: none;
  height: 0;
  float: left;
}

.edit-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-1);
}
.edit-foot .edit-spacer { flex: 1; }

.edit-foot button {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  transition: all 0.15s var(--ease);
}
.edit-foot button:hover { border-color: var(--ink-soft); background: var(--surface); }
.edit-foot .primary { background: var(--ink); color: var(--accent); border-color: var(--ink); }
.edit-foot .primary:hover { background: #000; border-color: #000; }

:root {
  --purple: #8b6dff;
  --purple-deep: #6a4be6;
  --purple-bg: #e6dcff;
  --purple-glow: rgba(139, 109, 255, 0.45);
}

.slide.serendipity .date {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 14px -4px var(--purple-glow);
}
.slide.serendipity .date::before { background: #fff; }

.slide.serendipity .headline mark,
.slide.serendipity .bullets li mark {
  background: var(--purple-bg);
  color: var(--purple-deep);
  box-shadow: none;
}
.slide.serendipity .headline mark {
  background: var(--purple);
  color: #fff;
  font-weight: 700;
}

.slide.serendipity .bullets li::before { background: var(--purple); }

.pill.pill-serendipity { color: rgba(139, 109, 255, 0.7); }
.pill.pill-serendipity:hover { color: var(--purple-deep); background: var(--purple-bg); }
.pill.pill-serendipity.past { color: rgba(139, 109, 255, 0.5); }
.pill.pill-serendipity.active { color: #fff; background: var(--purple); }

@media (max-width: 900px) {
  body { padding: 10px; }
  .deck { width: 100%; height: calc(100vh - 20px); }
  .slide:not(.cover) { padding: 80px 24px 24px 24px; gap: 20px; }
  .folio { right: 80px; top: 14px; font-size: 10px; padding: 6px 10px; }
  .headline { font-size: 28px; line-height: 1.2; }
  .bullets li { font-size: 15px; padding-left: 24px; }
  .bullets li::before { width: 14px; top: 0.62em; }
  .date { font-size: 10.5px; padding: 7px 12px; }
  .pills { padding: 0 16px; height: 42px; }
  .player { padding: 10px 14px 14px; gap: 10px; }
  .time { min-width: 100px; font-size: 11px; }
  .time::before { font-size: 8px; }
  .count { min-width: 40px; font-size: 10.5px; }
  .play { width: 38px; height: 38px; }
  .player-bar { padding: 5px 12px 5px 14px; gap: 10px; min-height: 34px; }
  .cover-title { font-size: clamp(88px, 22vw, 160px); }
  .cover-thesis { font-size: 22px; }
  .cover-foot { flex-wrap: wrap; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide, .slide > .date, .slide > .headline, .slide > .bullets > li,
  .slide.cover > *, .ring-fill, .scrub-fill, .scrub-knob {
    transition: none !important;
  }
}
