/* 모션 엔진 4개 비교 - 먼작귀 공식 색(이름 카드 배경)과 외곽선색으로 */
:root {
  --ink: #412521;
  --ink-soft: #6d4c47;
  --paper: #fff3ef;
  --card: #ffffff;
  --line: #f0d9d3;
  --pink: #ffa5b1;
  --blue: #7cd7ff;
  --yellow: #ffd272;
  --purple: #bc8be2;
  --green: #98df7b;
  --cheek: #ffc2ca;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; }

/* 머리 */
.head {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px var(--gutter) 8px;
}
.crumb {
  display: inline-block;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.crumb:hover { color: var(--ink); border-color: var(--ink); }
.kicker {
  margin: 28px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
h1, h2 { font-family: "Jua", "Pretendard Variable", sans-serif; font-weight: 400; letter-spacing: -0.01em; }
h1 {
  margin: 2px 0 12px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.1;
}
h1::after {
  content: "";
  display: block;
  width: 2.2em;
  height: 0.16em;
  margin-top: 0.18em;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pink) 0 25%, var(--blue) 25% 50%, var(--yellow) 50% 75%, var(--purple) 75%);
}
.lede { max-width: 40em; margin: 0; font-size: 17px; color: var(--ink-soft); }

/* 재생 영역 */
.player {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 var(--gutter);
}
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: rgba(255, 243, 239, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid var(--ink);
  border-radius: 18px;
}
.play {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.play:active { transform: scale(0.94); }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play .i-pause, .play.on .i-play { display: none; }
.play.on .i-pause { display: block; }
.scrub {
  flex: 1 1 160px;
  min-width: 0;
  accent-color: var(--ink);
  height: 28px;
}
.time {
  flex: none;
  min-width: 3.2em;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 15px;
}
.mode {
  flex: none;
  display: inline-flex;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
}
.mode button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
}
.mode button[aria-checked="true"] { background: var(--ink); color: #fff; }

/* 엔진 탭(좁은 화면 전용) */
.tabs { display: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  margin: 0;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.tile:hover { transform: translateY(-2px); }
.tile.active { box-shadow: 0 0 0 4px var(--c), 6px 6px 0 4px var(--ink); }
.screen { position: relative; }
.tile video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f6e3de;
  object-fit: cover;
}
.cap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 2px solid var(--ink);
}
.cap .dot {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--c);
}
.cap .who { flex: 1; min-width: 0; }
.cap .name { font-family: "Jua", sans-serif; font-size: 22px; line-height: 1.2; }
.cap .name, .cap .how { display: block; }
.cap .how { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.sound {
  flex: none;
  font: inherit;
  cursor: pointer;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.sound:hover { border-color: var(--ink); }
.sound.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sound.mute { background: transparent; color: var(--ink-soft); border-style: dashed; }
.full {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: rgba(65, 37, 33, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.full svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tile:hover .full, .tile:focus-within .full { opacity: 1; }
@media (hover: none) { .full { opacity: 1; } }
.hint { margin: 12px 2px 0; font-size: 14px; color: var(--ink-soft); }

/* 본문 */
.body {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
}
.block { margin-top: 48px; }
h2 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; }
.block p { margin: 0 0 12px; }
.note { font-size: 14px; color: var(--ink-soft); }

.lines {
  list-style: none;
  counter-reset: l;
  margin: 18px 0;
  padding: 6px 18px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
}
.lines li {
  counter-increment: l;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: baseline;
  padding: 10px 0 10px 2.2em;
  position: relative;
  border-bottom: 1px dashed var(--line);
}
.lines li:last-child { border-bottom: 0; }
.lines li::before {
  content: counter(l);
  position: absolute;
  left: 0;
  top: 10px;
  width: 1.6em;
  height: 1.6em;
  line-height: 1.6em;
  text-align: center;
  border-radius: 50%;
  background: var(--cheek);
  font-size: 13px;
  font-weight: 700;
}
.lines b { font-family: "Jua", sans-serif; font-weight: 400; font-size: 19px; }
.lines s { color: #b49a95; }
.lines ins { text-decoration: none; background: linear-gradient(transparent 60%, var(--yellow) 60%); }
.rules { margin: 0 0 12px; padding-left: 1.2em; }
.rules li { margin: 2px 0; }

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.facts {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
}
.facts th, .facts td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.facts thead th { background: #fbe7e2; font-weight: 700; white-space: nowrap; }
.facts tbody tr:last-child td { border-bottom: 0; }
.facts td:first-child { font-family: "Jua", sans-serif; font-size: 17px; white-space: nowrap; }
.facts td:first-child i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; border: 1.5px solid var(--ink); }
.facts .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.facts small { display: block; color: var(--ink-soft); font-size: 12px; }

.asks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.asks li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 14px;
}
.asks span {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  font-weight: 700;
  font-size: 14px;
}

.seen { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.seen li { position: relative; padding: 14px 16px 14px 36px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
/* 제목 첫 줄 가운데에 맞춘 사각 불릿, 본문은 제목 시작선에 맞춰 들여 씀 */
.seen li::before { content: ""; position: absolute; left: 17px; top: calc(14px + 0.85em - 4px); width: 8px; height: 8px; background: var(--pink); }
.seen li:nth-child(2)::before { background: var(--blue); }
.seen li:nth-child(3)::before { background: var(--yellow); }
.seen li:nth-child(4)::before { background: var(--purple); }
.seen b { display: block; margin-bottom: 2px; }

/* 여기까지 온 길 */
.path { list-style: none; counter-reset: s; padding: 0; margin: 16px 0 0; }
.path li { counter-increment: s; position: relative; padding: 0 0 30px 44px; }
.path li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-weight: 800; font-size: 13px; color: var(--ink); }
.path li::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 1px; background: var(--line); }
.path li:last-child { padding-bottom: 0; }
.path li:last-child::after { display: none; }
.path li:last-child::before { background: var(--blue); border-color: var(--blue); }
.path b { display: block; }
.path li > p { margin: 6px 0 0; }
.path .meta { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.cmp { --cmp-line: var(--line); }

.foot {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
.foot p { margin: 4px 0; }

/* 좁은 화면: 한 편씩, 탭으로 고른다 */
@media (max-width: 720px) {
  .tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }
  .tabs button {
    min-width: 0;
    padding: 8px 4px;
    border: 2px solid var(--ink);
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-family: "Jua", sans-serif;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tabs button[aria-selected="true"] { background: var(--c); }
  .grid { grid-template-columns: 1fr; }
  .tile { display: none; }
  .tile.active { display: block; box-shadow: none; }
  .tile:hover { transform: none; }
  .full { opacity: 1; }
  .mode { flex: 1 1 100%; }
  .mode button { flex: 1; }
  .bar { gap: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile, .play { transition: none; }
}
.tile video[hidden] { display: none; }

/* 엔진별 장단점: 영상 2x2 배치와 같은 순서·색 */
.pros { list-style: none; padding: 0; margin: 16px 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pros li { padding: 14px 16px 12px; background: var(--card); border-top: 6px solid var(--c); border-radius: 4px 4px 14px 14px; }
.pros p { margin: 0 0 8px; line-height: 1.6; }
.pros p:last-child { margin-bottom: 0; }
.pros .who { font-family: "Jua", sans-serif; font-size: 22px; line-height: 1.3; margin-bottom: 10px; }
.pros .who i { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--c); border: 1.5px solid var(--ink); vertical-align: 1px; }
.pros .main { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-family: "Pretendard Variable", sans-serif; font-size: 12px; font-weight: 700; vertical-align: 3px; }
.pros .tag { display: block; width: max-content; margin-bottom: 4px; padding: 0 7px; border-radius: 6px; background: #e6f6dd; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.pros .tag.bad { background: #fbe7e2; }
@media (max-width: 720px) { .pros { grid-template-columns: 1fr; } }
