/* 소식 (/notice · /info · /info/detail/N) — 탭(공지 · 게임 출시) · 해마다 묶은 목록 · 게임 출시 탭 맨 위 최근 출시 3칸 · 공지 읽기.
 * 시안 news.css 를 옮겼다. 색은 sb.css 토큰만. 휴대폰(390px)부터 넓혀 간다. 점검 #7(초점 테두리) · #13(탭 높이 --control-h) 반영. */

/* ---------- 최근 출시 3칸 (게임 출시 탭, sb.css .spot 위에) — 휴대폰 작은 제목 · 요약 숨김은 sb.css .spot__lead · .spot__sum (점검 #2) ----------
 * 카드는 어느 폭에서나 16:9 — 게임 영상이 가로라 옆을 자르지 않는다 (사용자 2026-11-30 가로 카드만). sb.css 의 16:10 · 고정 높이 대신:
 * 셋이면 큰 카드(두 줄) | 작은 카드 둘. 오른쪽 칸 폭 = (전체 − 틈 × 25/9) ÷ 3 이면 큰 카드의 16:9 높이 = 작은 카드 둘의 16:9 높이 + 틈. */
.news-panel .news-spot {
  margin-bottom: clamp(28px, 4vw, 48px);
}
.news-panel .news-spot .spot__item {
  aspect-ratio: 16 / 9;
}
/* 작은 카드는 900px 에서 높이가 150px 남짓 — 이름은 두 줄까지 */
.news-spot .spot__item .h-card {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-spot .card__foot > div {
  min-width: 0;
}
@media (min-width: 900px) {
  .news-panel .news-spot {
    grid-template-rows: none;
    height: auto;
  }
  .news-panel .news-spot--3 {
    grid-template-columns: minmax(0, 1fr) calc((100% - var(--gap) * 25 / 9) / 3);
  }
  /* 둘이면 같은 폭 두 장, 하나면 큰 카드 폭 (16:9 한 장이 화면을 다 덮지 않게) */
  .news-panel .news-spot--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .news-panel .news-spot--1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: calc((100% - var(--gap)) * 2 / 3);
  }
  .news-panel .news-spot--1 .spot__item,
  .news-panel .news-spot--2 .spot__item {
    grid-row: auto;
  }
}

/* ---------- 탭 줄 ---------- */
.news-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  padding: 12px 0;
  margin-bottom: clamp(18px, 2.6vw, 32px);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.news-bar.is-stuck {
  border-bottom-color: var(--line);
}
/* 키보드로 거슬러 올라갈 때(Shift+Tab) 초점 잡힌 줄이 붙은 탭 줄 밑에 숨지 않게 — 탭 줄 높이(칸 + 위아래 24px + 밑줄 1px)만큼 더 띄워 멈춘다 */
html:has(.news-bar) {
  scroll-padding-top: calc(var(--header-h) + var(--control-h) + 25px + 12px);
}
/* 가로로 넘기는 줄 — 키보드 초점 테두리가 잘리지 않게 안쪽 여백을 두고 같은 만큼 바깥으로 뺀다 (점검 #7, sb.css .chips 와 같다) */
.ntabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px;
  margin: -6px;
}
.ntabs::-webkit-scrollbar {
  display: none;
}
.ntab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h); /* 점검 #13 — 칩 · 검색과 같은 높이 (마우스 화면 40px, 손가락 화면 44px) */
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.ntab:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.ntab[aria-selected='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ---------- 해마다 묶은 목록 ---------- */
.news-years {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}
.news-year {
  display: grid;
  gap: 12px;
}
.news-year__label {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.news-year__label .num {
  font-size: clamp(30px, 4.2vw, 56px);
}
@media (min-width: 900px) {
  .news-year {
    grid-template-columns: minmax(150px, 1fr) minmax(0, 3.4fr);
    align-items: start;
    gap: var(--gap);
  }
  .news-year__label {
    position: sticky;
    top: calc(var(--header-h) + 88px);
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
  }
}
.news-rows {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.news-rows > li + li {
  border-top: 1px solid var(--line);
}
/* 빈 탭 — 공지가 없으면 게임 출시 탭으로 가는 단추 */
.news-empty .btn svg {
  width: 16px;
  height: 16px;
}
.news-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 12px 12px 10px;
  border-radius: 18px;
  transition: background-color var(--dur) var(--ease);
}
a.news-row:hover {
  background: var(--surface-2);
}
.news-row > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform var(--dur) var(--ease);
}
a.news-row:hover > svg {
  transform: translateX(3px);
  color: var(--ink);
}
.news-row__thumb {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: cover;
  background: var(--tile-bg);
}
.news-row__thumb--letter {
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 19px;
  font-weight: 800;
}
.news-row__thumb--notice,
.news-row__thumb--story {
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red-text);
}
.news-row__thumb--story {
  background: var(--surface-2);
  color: var(--ink-2);
}
.news-row__thumb--notice svg,
.news-row__thumb--story svg {
  width: 22px;
  height: 22px;
}
.news-row__text {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.news-row__text b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.news-row--static .news-row__text b {
  -webkit-line-clamp: 3;
}
.news-row__text small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.news-kind {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 800;
}
.news-kind--notice {
  background: var(--red-soft);
  color: var(--red-text);
}
.news-store {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.news-store svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.news-row time {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 479px) {
  .news-row {
    gap: 12px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }
  .news-row__thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .news-row > svg {
    display: none;
  }
  .news-row time {
    align-self: start;
    margin-top: 3px;
  }
}

/* ---------- 공지 읽기 ---------- */
.news-article {
  padding-top: clamp(16px, 2.4vw, 32px);
}
.news-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  transition:
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.news-back:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.news-back svg {
  width: 18px;
  height: 18px;
}
.news-article__head {
  display: grid;
  gap: 16px;
  max-width: 980px;
  padding-block: clamp(22px, 3.4vw, 44px) clamp(20px, 3vw, 36px);
}
.news-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.news-article__meta time {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}
.news-badge {
  background: var(--red-soft);
  color: var(--red-text);
  box-shadow: none;
}
.news-article__title {
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.news-article__grid {
  display: grid;
  gap: var(--gap);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 112px);
}
@media (min-width: 1000px) {
  .news-article__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
  .news-article__aside {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}
.news-article__aside {
  display: grid;
  gap: var(--gap);
}
.news-aside {
  gap: 14px;
}
.news-aside .btn {
  justify-self: start;
}
.news-aside .btn svg,
.news-missing .btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.news-aside__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.news-release__letter {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-weight: 800;
}

/* 본문 — CMS 글을 걸러 그린 것 (news-page.ts safeCmsHtml). 글 속 색 · 글꼴 지정은 걸러서 없고, 여기서 다시 입힌다 */
.news-prose {
  display: block;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.news-prose p,
.news-prose ul,
.news-prose ol,
.news-prose blockquote,
.news-prose table,
.news-prose pre,
.news-prose figure {
  max-width: 46em;
  margin: 0 0 14px;
}
.news-prose > :last-child {
  margin-bottom: 0;
}
.news-prose .sb-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.news-prose .sb-sub::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--red);
  transform: rotate(45deg);
}
.news-prose > .sb-sub:first-child {
  margin-top: 0;
}
.news-prose h1,
.news-prose h2,
.news-prose h3,
.news-prose h4,
.news-prose h5,
.news-prose h6 {
  margin: 30px 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.news-prose strong,
.news-prose b {
  color: var(--ink);
  font-weight: 800;
}
.news-prose a {
  color: var(--red-text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.news-prose a:hover {
  text-decoration-thickness: 2.5px;
}
.news-prose ul,
.news-prose ol {
  padding-left: 1.3em;
}
.news-prose blockquote {
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--line-strong);
}
.news-prose img {
  height: auto;
  border-radius: var(--r-sm);
}
.news-prose hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.news-prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 14px;
}
.news-prose th,
.news-prose td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.news-prose pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 14px;
}
.news-missing .empty span {
  color: var(--muted);
}
