/* 홀덤 NEWS(`/news.html`) 전용 판.
 *
 * 머리(`.mypg-head`)·바탕색·토큰은 `app.css` 것을 그대로 쓴다. 이 파일은 탭·재생기·목록만 정한다.
 *
 * ── 배치 ──
 * 폰: 탭 → 재생기(붙박이) → 목록. 재생기가 붙박이라 목록을 굴려도 보던 영상이 안 사라진다.
 * PC(≥980px): 왼쪽 넓은 기둥에 재생기, 오른쪽에 목록. 국모 뉴스 탭과 같은 꼴이다.
 */

.newspg { --headh: 56px; --tabh: 48px; }

.news-head h1 b { color: var(--point); font-weight: 800; letter-spacing: 0; }

/* 탭 — 머리 바로 밑에 붙는다. 폰에서 다섯 칸이 넘치면 옆으로 민다(줄을 안 바꾼다). */
.news-tabs {
  position: sticky;
  top: var(--headh);
  z-index: 9;
  height: var(--tabh);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.news-tabs::-webkit-scrollbar { display: none; }
.news-tabs button {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.3px;
  cursor: pointer;
  white-space: nowrap;
}
.news-tabs button[aria-selected="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.news-tabs button:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }

.news-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 12px 24px;
  display: grid;
  gap: 12px;
}

/* ── 재생기 ── */
.news-stage {
  position: sticky;
  top: calc(var(--headh) + var(--tabh));
  z-index: 5;
  margin: -12px -12px 0;
  padding: 12px 12px 0;
  background: var(--bg);
}
.news-stage[hidden] { display: none; }
/* 16:9 를 못 박는다 — 재생기 호스트(`.kmytp`)가 `height:100%` 라 부모가 높이를 안 들면 0px 로 접힌다.
   ⚠ 여기서 iframe 에 자리를 주지 않는다(크롭을 이겨 유튜브 제목·로고를 도로 불러온다 — app.css `.ytnow-frame`). */
.news-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}
/* 아직 안 튼 영상 — 섬네일 위에 재생 단추. 들어오자마자 소리가 나지 않게 누를 때만 튼다. */
.news-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0; background: #000;
  cursor: pointer;
}
.news-poster img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; }
.news-poster .play {
  position: absolute; left: 50%; top: 50%;
  width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: rgba(14, 14, 17, 0.72);
  display: grid; place-items: center;
}
.news-poster .play svg { width: 30px; height: 30px; fill: var(--y); margin-left: 4px; }
.news-poster:hover .play { background: rgba(14, 14, 17, 0.9); }
.news-poster:focus-visible { outline: 3px solid var(--y); outline-offset: -3px; }

.news-now { padding: 10px 2px 12px; }
.news-now h2 {
  margin: 0;
  font-size: 15px; font-weight: 700; line-height: 1.45; letter-spacing: -0.3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-now .meta { margin-top: 4px; font-size: 12.5px; color: var(--sub); }
.news-now .meta a { color: var(--sub); }

/* ── 목록 ── */
.news-list { display: grid; gap: 2px; }
.news-row {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%;
  padding: 8px;
  border: 0; border-radius: 12px;
  background: none;
  font: inherit; text-align: left; color: var(--ink);
  cursor: pointer;
}
.news-row:hover { background: var(--card); }
.news-row:focus-visible { outline: 2px solid var(--y); outline-offset: -2px; }
.news-row.on { background: var(--card); box-shadow: inset 3px 0 0 var(--y); }
.news-row .thumb {
  position: relative; flex: none;
  width: 44%; max-width: 168px;
  aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden;
  background: #d9d9de;
}
.news-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-row .txt { min-width: 0; flex: 1; }
.news-row b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; font-weight: 600; line-height: 1.45; letter-spacing: -0.2px;
}
.news-row .meta { display: block; margin-top: 4px; font-size: 12px; color: var(--sub); overflow-wrap: anywhere; }
.news-row.on b { color: var(--point); }

/* 쇼츠 — 세로 카드 격자. 섬네일은 16:9 로 오므로 가운데를 세로로 잘라 보인다. */
.news-list.shorts { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.news-list.shorts .news-row { flex-direction: column; gap: 6px; padding: 0; }
.news-list.shorts .news-row .thumb { width: 100%; max-width: none; aspect-ratio: 9 / 16; }
.news-list.shorts .news-row .txt { padding: 0 2px 6px; }
.news-list.shorts .news-row.on { box-shadow: 0 0 0 2px var(--y); }

.news-empty, .news-err {
  margin: 36px 12px; text-align: center;
  font-size: 13.5px; line-height: 1.7; color: var(--sub);
}
.news-empty b, .news-err b { display: block; margin-bottom: 4px; font-size: 15px; color: var(--ink); }
.news-err button { margin-top: 12px; }

.news-more {
  display: block; width: 100%;
  margin-top: 8px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
}
.news-more[hidden] { display: none; }
.news-more:disabled { color: var(--sub); cursor: default; }

.news-foot {
  max-width: 1240px; margin: 0 auto; padding: 0 20px 40px;
  font-size: 11.5px; line-height: 1.7; color: var(--sub); text-align: center;
}

@media (min-width: 900px) {
  .newspg { --headh: 60px; }
}
@media (min-width: 980px) {
  .news-body {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
    padding: 20px 20px 32px;
    align-items: start;
  }
  .news-stage {
    margin: 0; padding: 0;
    top: calc(var(--headh) + var(--tabh) + 20px);
  }
  .news-now { padding: 12px 2px 0; }
  .news-now h2 { font-size: 18px; -webkit-line-clamp: 3; }
  .news-now .meta { font-size: 13px; }
  .news-row .thumb { width: 150px; }
  .news-list.shorts { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
