/* Hallmark · redesign inside the existing system · tokens: style.css (game Clakk.uss) · pre-emit critique: P4 H4 E4 S5 R4 V4
   홈페이지 시안 (2026-10-11): 속도 측정 페이지(style.css) 위에 얹는 것만 — 상단 메뉴, 최신 소식 한 줄, 게임 소개, 업데이트.
   색·글꼴은 모두 style.css 토큰. 여기서 새로 두는 토큰은 진열대 바닥 하나 (녹화 화면의 배경색이라 밝은 화면에서도 어둡다). */

html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
#game, #news { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* 상단 메뉴 */
.topnav { display: flex; gap: 4px; margin-left: 34px; }
.topnav a { height: 36px; padding: 0 13px; border-radius: 9px; display: inline-flex; align-items: center; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: color .12s, background-color .12s; }
.topnav a:hover { color: var(--text); background: var(--hint); text-decoration: none; }
body:has(#home[hidden]) .topnav { display: none; }

/* 최신 소식 한 줄 (예전 머리글 자리) */
.newsline { align-self: flex-start; max-width: 100%; height: 32px; padding: 0 12px 0 4px; border-radius: 16px; display: inline-flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text-2); font-size: 13px; transition: border-color .12s, color .12s; }
.newsline:hover { text-decoration: none; border-color: var(--accent-dim); color: var(--text); }
.newsline-tag { height: 22px; padding: 0 9px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-fg); font-weight: 500; font-size: 12px; display: inline-flex; align-items: center; flex: none; font-variant-numeric: tabular-nums; }
.newsline-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 구역 제목 */
.sec { padding-block: 72px 0; }
.sec-title { font-size: 34px; line-height: 1.12; font-weight: 500; letter-spacing: -.6px; text-wrap: balance; max-width: 24ch; overflow-wrap: anywhere; }
html[lang="ko"] .sec-title { letter-spacing: -.3px; max-width: 17em; }
.sec-lede { font-size: 17px; line-height: 1.55; color: var(--text-2); max-width: 58ch; margin-top: 14px; }

/* 게임 소개 */
.game-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: end; }
.game-head .sec-lede { margin-top: 0; }
.shelf { margin: 34px calc(50% - 50vw) 0; background: var(--bg-deep); border-block: 1px solid var(--border); }   /* 그림이 투명 바탕이라 밝은 화면에서도 그대로 */
/* 옆으로 밀지 않는다 (사용자 "넘어가는 게 어지럽다") — 칸은 제자리, 한 번에 한 칸만 그림이 서서히 바뀐다 */
.shelf-row { overflow: hidden; padding-block: 26px 22px; }
.shelf-track { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 400px)); justify-content: center; column-gap: 20px; margin: 0 auto; padding-inline: 20px; }   /* --n = 창 폭에 들어가는 칸 수 (home.js) */
.shelf-slot { position: relative; aspect-ratio: 900 / 320; }
.shelf-slot img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity 1.1s ease; }
.shelf-slot img.in { opacity: 0; }
.shelf-note { max-width: 1440px; margin: 0 auto; padding: 0 40px 22px; font-size: 13px; color: var(--text-2); }

.loop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 44px; counter-reset: loop; list-style: none; padding: 0; }
.loop li { counter-increment: loop; border-top: 1px solid var(--border-2); padding-top: 16px; }
.loop li::before { content: counter(loop); display: block; font: 700 15px/1 "Space Grotesk", Roboto, sans-serif; color: var(--accent-fg); margin-bottom: 12px; }
.loop h3 { font-size: 20px; font-weight: 500; }
.loop p { font-size: 15px; line-height: 1.55; color: var(--text-2); margin-top: 6px; max-width: 34ch; }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.shots figure { margin: 0; min-width: 0; }
.shots img, .shots video { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg-deep); }
.shots figcaption { font-size: 14px; line-height: 1.5; color: var(--text-2); margin-top: 10px; max-width: 52ch; }
.shots figcaption b { color: var(--text); font-weight: 500; }

/* 게임에 든 것 · 랭크 */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 56px; }
.facts h3 { font-size: 20px; font-weight: 500; border-top: 1px solid var(--border-2); padding-top: 16px; }
.facts ul { list-style: none; padding: 0; margin: 10px 0 0; }
.facts li { font-size: 15px; line-height: 1.5; color: var(--text-2); padding-block: 7px; max-width: 38ch; }
.facts li + li { border-top: 1px solid var(--border); }
.ranks { margin-top: 72px; }
/* 배지 그림이 어두운 바탕이라 띠도 늘 어둡다 (진열 띠와 같은 색) */
.ladder { list-style: none; margin: 30px 0 0; padding: 22px 12px 20px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px;
  background: #12151B; border: 1px solid var(--border); border-radius: 16px; }
.ladder li { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ladder img { width: min(100%, 104px); height: auto; aspect-ratio: 1; display: block; }
.ladder b { font-size: 15px; font-weight: 500; color: #EDEFF2; margin-top: 2px; overflow-wrap: anywhere; }
.ladder span { font-size: 12.5px; color: #9AA0AB; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rank-rules { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.rank-rules li { font-size: 15px; line-height: 1.55; color: var(--text-2); border-top: 1px solid var(--border-2); padding-top: 14px; }
.rank-rules b { display: block; color: var(--text); font-weight: 500; font-size: 17px; margin-bottom: 4px; }
.shots--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots--3 img, .shots--3 video { aspect-ratio: 16 / 9; object-fit: cover; }
.rank-note { font-size: 13px; color: var(--text-2); margin-top: 18px; }

.avail { margin-top: 44px; padding: 22px 26px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); border-top-color: var(--border-top);
  display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; }
.avail-main { font-size: 20px; font-weight: 500; }
.avail-sub { font-size: 14px; color: var(--text-2); flex: 1; min-width: 220px; }
.steam-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.steam-btn:hover { background: var(--accent-hi); }
.steam-btn[aria-disabled="true"] { background: var(--panel); color: var(--text-2); border: 1px solid var(--border); cursor: default; }
.steam-btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
@media (max-width: 560px) { .steam-btn--sm, .social-btn { display: none; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 50; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; background: var(--panel); color: var(--text); border: 1px solid var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 15px; text-align: center;
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }   /* 좁은 화면은 바닥글 글자 링크로 */
.avail-mail { font-size: 14px; color: var(--text); user-select: all; }

/* 업데이트 */
.news { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; padding-bottom: 80px; }
.news-side { align-self: start; position: sticky; top: 96px; }
.news-list { display: flex; flex-direction: column; min-width: 0; }
.news-item { border-top: 1px solid var(--border-2); }
.news-item:last-child { border-bottom: 1px solid var(--border-2); }
.news-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 18px; align-items: center; gap: 16px; min-height: 68px; padding: 10px 4px; border-radius: 8px; }
.news-item summary::-webkit-details-marker { display: none; }
.news-ver { font: 700 17px/1 "Space Grotesk", Roboto, sans-serif; color: var(--accent-fg); font-variant-numeric: tabular-nums; }
.news-title { font-size: 19px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.news-date { font-size: 13px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.news-chev { width: 9px; height: 9px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform .16s cubic-bezier(.23, 1, .32, 1); justify-self: center; }
.news-item[open] .news-chev { transform: rotate(-135deg) translate(-2px, -2px); }
.news-item summary:hover .news-title { color: var(--accent-fg); }
.news-body { margin: 0; padding: 0 4px 24px 84px; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.news-body li { position: relative; font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 64ch; }
.news-body li::before { content: ""; position: absolute; left: -16px; top: .68em; width: 5px; height: 5px; border-radius: 3px; background: var(--border-3); }
.news-empty { padding: 26px 4px; color: var(--text-2); border-block: 1px solid var(--border-2); }

.foot-mail { color: var(--text-2); user-select: all; }

@media (max-width: 1080px) {
  .game-head, .news { grid-template-columns: minmax(0, 1fr); }
  .game-head { align-items: start; gap: 14px; }
  .news-side { position: static; }
  .loop, .facts, .rank-rules { gap: 24px; }
}
@media (max-width: 760px) {
  .topnav { display: none; }
  .sec { padding-top: 52px; }
  .sec-title { font-size: 27px; }
  .loop, .shots, .facts, .rank-rules { grid-template-columns: minmax(0, 1fr); }
  .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; }
  .ranks { margin-top: 52px; }
  .shelf-note { padding-inline: 16px; }
  .news-item summary { grid-template-columns: 48px minmax(0, 1fr) 18px; gap: 12px; }
  .news-date { grid-column: 2; grid-row: 2; margin-top: -8px; }
  .news-chev { grid-column: 3; grid-row: 1; }
  .news-title { font-size: 17px; }
  .news-body { padding-left: 20px; }
  #lang-seg button { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) { .news-chev, .topnav a, .newsline { transition: none; } }
