/* 요즘레시피 소개영상 - 사이트 색(다크 시세판, 상승 빨강, 하락 파랑)과 엔진 비교 공통 엔진색 */
:root {
  --bg: #131722;
  --panel: #1a1f2c;
  --panel-2: #212736;
  --ink: #d1d4dc;
  --ink-strong: #f2f3f6;
  --ink-soft: #8a8f9c;
  --line: #2c3242;
  --line-strong: #434651;
  --up: #e8442c;
  --down: #2f6fb0;
  --new: #f5c04a;
  /* 엔진색: 모션 엔진 4개 비교(먼작귀)와 같게 */
  --pink: #ffa5b1;
  --blue: #7cd7ff;
  --yellow: #ffd272;
  --purple: #bc8be2;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  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; }
b { color: var(--ink-strong); }

/* 머리 */
.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-strong);
}
.crumb:hover { color: var(--ink-strong); border-color: var(--ink); }
.kicker {
  margin: 28px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.kicker::before {
  content: "▲";
  margin-right: 6px;
  color: var(--up);
  font-size: 12px;
}
h1, h2 { font-family: "SUIT Variable", "Pretendard Variable", sans-serif; letter-spacing: -0.02em; color: var(--ink-strong); }
h1 {
  margin: 4px 0 14px;
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.1;
}
h1::after {
  content: "";
  display: block;
  width: 1.4em;
  height: 0.12em;
  margin-top: 0.22em;
  background: var(--up);
}
.lede { max-width: 42em; margin: 0; font-size: 17px; color: var(--ink); }

/* 재생 영역 */
.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;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: rgba(19, 23, 34, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.play {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--up);
  color: #fff;
  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(--up);
  height: 28px;
}
.time {
  flex: none;
  min-width: 3.2em;
  font-family: "SUIT Variable", sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-strong);
}

/* 장면 버튼: 주문서 장면표 */
.scenes {
  position: relative; /* 버튼 offsetLeft의 기준 */
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 0 14px;
  padding-bottom: 2px;
}
.scenes::-webkit-scrollbar { display: none; }
/* 넓은 화면(2x2 배치)에서는 넘치면 줄을 바꿔 뒤쪽 장면 버튼이 잘리지 않게 */
@media (min-width: 721px) { .scenes { flex-wrap: wrap; overflow-x: visible; } }
.scenes button {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.scenes button:hover { border-color: var(--ink-soft); }
.scenes .t { font-family: "SUIT Variable", sans-serif; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-soft); }
.scenes button.now { border-color: var(--up); background: rgba(232, 68, 44, 0.14); color: var(--ink-strong); }
.scenes button.now .t { color: var(--up); }

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

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.tile:hover { border-color: var(--ink-soft); }
.tile.active { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.screen { position: relative; }
.tile video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1018;
  object-fit: cover;
}
.cap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}
.cap .dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--c);
}
.cap .who { flex: 1; min-width: 0; }
.cap .name { font-family: "SUIT Variable", sans-serif; font-weight: 800; font-size: 20px; line-height: 1.3; color: var(--ink-strong); }
.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;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.sound:hover { border-color: var(--ink-soft); color: var(--ink); }
.sound.on { background: var(--ink-strong); border-color: var(--ink-strong); color: var(--bg); }
.full {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: rgba(13, 16, 24, 0.7);
  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: 56px; }
h2 { font-size: 28px; font-weight: 800; line-height: 1.3; margin: 0 0 12px; }
h2::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 0.9em;
  margin-right: 10px;
  background: var(--up);
  vertical-align: -0.08em;
}
.block p { margin: 0 0 12px; }
.note { font-size: 14px; color: var(--ink-soft); }

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.cue, .facts {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0 14px;
}
.cue { min-width: 0; }
.facts { min-width: 600px; }
.cue th, .cue td, .facts th, .facts td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cue thead th, .facts thead th { background: var(--panel-2); color: var(--ink-strong); font-weight: 700; white-space: nowrap; }
.cue tbody tr:last-child td, .facts tbody tr:last-child td { border-bottom: 0; }
.cue td:nth-child(2) { color: var(--ink-strong); font-weight: 600; }
.cue td:nth-child(3) { font-family: "SUIT Variable", sans-serif; font-weight: 700; color: var(--ink-strong); }
.cue td.dim { font-family: inherit; font-weight: 400; color: var(--ink-soft); }
.num { font-family: "SUIT Variable", sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cue .num { color: var(--ink-soft); }
.facts td:first-child { font-family: "SUIT Variable", sans-serif; font-weight: 800; font-size: 16px; white-space: nowrap; color: var(--ink-strong); }
.facts td:first-child i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; }
.facts small { display: block; color: var(--ink-soft); font-size: 12px; }

.rules { margin: 0 0 12px; padding-left: 1.2em; }
.rules li { margin: 3px 0; }
.rules li::marker { color: var(--up); }

.path { list-style: none; counter-reset: s; padding: 0; margin: 16px 0 0; display: grid; gap: 0; }
.path li {
  counter-increment: s;
  position: relative;
  padding: 0 0 18px 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-strong);
  background: var(--panel);
  font-family: "SUIT Variable", sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink-strong);
}
.path li::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 2px;
  width: 1px;
  background: var(--line-strong);
}
.path li:last-child { padding-bottom: 0; }
.path li:last-child::after { display: none; }
.path li:last-child::before { background: var(--up); border-color: var(--up); color: #fff; }
.path b { display: block; }
.path li > p { margin: 6px 0 0; }
.path li { padding-bottom: 30px; }
.strip { margin: 12px 0 0; }
.strip img { display: block; width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 10px; }
.strip figcaption { margin: 6px 2px 0; font-size: 13px; color: var(--ink-soft); }
.cmp { --cmp-line: var(--line-strong); }

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

/* 엔진별 장단점: 영상 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(--panel); border: 1px solid var(--line-strong); border-radius: 10px; }
.pros p { margin: 0 0 8px; line-height: 1.6; }
.pros p:last-child { margin-bottom: 0; }
.pros .who { font-family: "SUIT Variable", sans-serif; font-weight: 800; font-size: 20px; line-height: 1.3; margin-bottom: 10px; color: var(--ink-strong); }
.pros .who i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--c); vertical-align: 2px; }
.pros .main { margin-left: 8px; padding: 1px 8px; border-radius: 4px; background: var(--up); 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: 4px; background: rgba(232, 68, 44, 0.16); color: #ff8a73; font-size: 12px; font-weight: 700; }
.pros .tag.bad { background: rgba(47, 111, 176, 0.22); color: #8fbaf0; }

.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: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-family: "SUIT Variable", sans-serif;
    font-weight: 800;
    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); border-color: var(--c); color: var(--bg); }
  .grid { grid-template-columns: 1fr; }
  .tile { display: none; }
  .tile.active { display: block; box-shadow: none; }
  .full { opacity: 1; }
  .bar { gap: 8px 10px; }
  .pros { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tile, .play { transition: none; }
}
