/* 사용법 영상 화면(guide.html). 색·글꼴·버튼·머리줄은 intro.css 의 것을 그대로 쓴다(body.intro).
   모서리: 무대 20px · 목록 줄 12px. 무대와 표지는 영상과 이어지도록 화면 테마와 상관없이 어두운 색이다.
   층: 고정된 무대 5 < 머리줄 30(intro.css).
   너비: 861px 이상은 두 단(무대 | 목록), 그 아래는 한 단이고 세로 화면에서는 무대가 머리줄 아래에 붙는다. */

.g-main { position: relative; padding: 40px 0 96px; overflow: clip; }
.g-main::before { content: ""; position: absolute; inset: 0 0 auto; height: 520px; background: radial-gradient(60% 70% at 50% 0%, color-mix(in srgb, var(--blue) 13%, transparent), transparent 72%); pointer-events: none; }
.g-main > .i-wrap { position: relative; }

.g-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 28px; }
.g-head h1 { font-size: clamp(29px, 3.6vw, 44px); font-weight: 800; line-height: 1.18; letter-spacing: -0.04em; }
.g-count { color: var(--ink-3); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.g-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 40px; }
.g-player { position: sticky; top: 88px; min-width: 0; }

/* ---- 무대 ---- */
.g-pin { container-type: inline-size; }
.g-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 20px; background: #0b0e14; box-shadow: var(--shadow-card); overflow: hidden; }
/* 두 단에서는 무대와 그 아래 제목이 창 높이 안에 들어오게 한다(머리줄·간격 88 + 제목 줄과 여유 110). */
@media (min-width: 861px) {
  .g-stage { width: min(100%, calc((100dvh - 198px) * 16 / 9)); }
}
.g-video { display: block; width: 100%; height: 100%; background: #0b0e14; }
.g-cover { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 24px; border: 0; background: radial-gradient(60% 72% at 50% 0%, rgba(10, 132, 255, 0.24), transparent 72%), #0b0e14; color: #eef1f6; font: inherit; letter-spacing: inherit; text-align: center; cursor: pointer; }
.g-cover:focus-visible { outline-offset: -8px; border-radius: 20px; }
.g-cover-play { display: grid; place-items: center; width: clamp(60px, 9cqw, 88px); height: clamp(60px, 9cqw, 88px); border-radius: 50%; background: #0a6fd8; box-shadow: 0 18px 36px -14px rgba(10, 132, 255, 0.75); transition: transform 200ms var(--ease-out), background-color 160ms ease; }
.g-cover-play svg { width: 42%; height: 42%; margin-left: 5%; fill: #fff; }
.g-cover:active .g-cover-play { transform: scale(0.96); }
.g-cover-title { margin-top: clamp(14px, 2.6cqw, 24px); font-size: clamp(22px, 5cqw, 46px); font-weight: 800; line-height: 1.2; letter-spacing: -0.04em; text-wrap: balance; }
.g-cover-meta { margin-top: 8px; color: #b9c2cf; font-size: clamp(13.5px, 1.9cqw, 16px); font-weight: 600; font-variant-numeric: tabular-nums; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.g-error { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red-ink); font-size: 14px; font-weight: 600; line-height: 1.5; }

.g-now { margin-top: 20px; }
.g-now-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: -0.03em; }
.g-now-where { margin-top: 4px; color: var(--ink-3); font-size: 14.5px; font-weight: 500; }
.g-beta { height: 22px; margin: 0; padding: 0 9px; font-size: 11.5px; }

/* ---- 목록 ---- */
.g-list { display: grid; gap: 22px; min-width: 0; }
.g-group h2 { margin-bottom: 8px; padding-left: 12px; color: var(--ink-3); font-size: 13px; font-weight: 700; line-height: 1.5; }
.g-group ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.g-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px 8px 12px; border-radius: 12px; color: var(--ink-2); font-size: 15.5px; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.g-item-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fill-strong); color: var(--ink-3); transition: background-color 160ms ease, color 160ms ease; }
.g-item-mark svg { width: 10px; height: 10px; margin-left: 1px; fill: currentColor; }
.g-item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.g-item-length { color: var(--ink-3); font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.g-item.is-current { background: var(--blue-soft); color: var(--blue-ink); font-weight: 700; }
.g-item.is-current .g-item-mark { background: var(--blue-fill); color: #fff; }
.g-item.is-current .g-item-length { color: var(--blue-ink); }

@media (hover: hover) and (pointer: fine) {
  .g-cover:hover .g-cover-play { background: #1a7de6; transform: scale(1.05); }
  .g-cover:hover:active .g-cover-play { transform: scale(0.96); }
  .g-item:not(.is-current):hover { background: var(--fill); color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .g-cover-play, .g-item, .g-item-mark { transition: none; }
}

/* ---- 중간 너비: 두 단을 유지하되 목록을 좁힌다 ---- */
@media (min-width: 861px) and (max-width: 1100px) {
  .g-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
}

/* ---- 한 단 ---- */
@media (max-width: 860px) {
  .g-main { padding-top: 28px; }
  /* 붙는 무대의 불투명한 바탕이 빛 번짐을 직선으로 자르지 않게, 번짐은 무대 위에서 끝낸다. */
  .g-main::before { height: 130px; }
  .g-head { margin-bottom: 16px; }
  .g-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .g-player { display: contents; }
  .g-pin { margin-inline: -24px; padding: 8px 24px 12px; background: var(--bg); }
  .g-now { margin: 4px 0 24px; }
  .g-now-title { font-size: 18px; }
}
/* 세로 화면: 목록을 내려도 무대는 머리줄 아래에 붙어 있다. 포커스로 이동한 줄이 그 뒤에 가리지 않게 여백도 맞춘다. */
@media (max-width: 860px) and (orientation: portrait) {
  html { scroll-padding-top: calc(65px + 28px + (100vw - 48px) * 0.5625); }
  .g-pin { position: sticky; top: 65px; z-index: 5; }
}
/* 가로 화면: 붙이면 무대가 화면을 다 가리므로 붙이지 않고, 무대를 화면 높이에 맞춘다. */
@media (max-width: 860px) and (orientation: landscape) {
  .g-stage { width: min(100%, calc((100dvh - 97px) * 16 / 9)); margin-inline: auto; }
}
@media (max-width: 640px) {
  .g-main { padding: 20px 0 64px; }
  .g-pin { margin-inline: -16px; padding-inline: 16px; }
  .g-stage { border-radius: 16px; }
  .g-cover:focus-visible { border-radius: 16px; }
}
/* 휴대폰 세로: 머리줄이 두 줄(상표 줄 56 + 탭 줄 58 + 선 1)이다. 내리면 상표 줄은 올라가고 탭 줄만 남아 그 아래에 무대가 붙는다. */
@media (max-width: 640px) and (orientation: portrait) {
  html { scroll-padding-top: calc(59px + 28px + (100vw - 32px) * 0.5625); }
  .intro .i-nav { top: -56px; }
  .g-pin { top: 59px; }
}
