/*
 * NVP24 공통 틀(상단 바 · 헤더 · GNB · 푸터) 보정 — layouts/main · layouts/hub 전용.
 * 이 두 레이아웃은 본문용 옛 CSS(game/*.css · hub/base.css · b.css)를 함께 싣는데, 그 안의 .gnb · .logo · .search · .btn · .wrap · .topbar
 * 규칙이 포털 틀에 새어 들어온다. 그래서 nvp24.css 를 먼저, 본문 CSS 를 그 다음, 이 파일을 마지막에 싣고
 * 틀 요소 안에서만 nvp24.css 값을 다시 못박는다. (layouts/portal 은 옛 CSS 를 싣지 않으므로 이 파일이 필요 없다)
 */

/* 토큰 — 본문 CSS 가 :root 토큰(--bg, --brand …)을 바꿔도 틀은 NVP24 색을 쓴다 */
.topbar, .header, .gnb, .footer, .nv-drawer {
  --bg: #f5f7fb; --surface: #ffffff; --surface-2: #f1f4f9; --line: #e4e8f0; --line-2: #d5dbe6;
  --text: #111827; --text-2: #4b5563; --text-3: #8a93a3;
  --brand: #1747d6; --brand-2: #0b2a8f; --brand-soft: #e9efff; --brand-ink: #1a3fb8;
  --red: #e5293b; --red-soft: #fdecee; --mint: #0fb5a0; --amber: #f59e0b;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .05);
  --wrap: 1280px;
  --font: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.5; letter-spacing: -0.01em;
}
[data-theme="dark"] .topbar, [data-theme="dark"] .header, [data-theme="dark"] .gnb, [data-theme="dark"] .footer, [data-theme="dark"] .nv-drawer {
  --bg: #0d1017; --surface: #151a23; --surface-2: #1c2230; --line: #262d3b; --line-2: #323b4d;
  --text: #eef1f6; --text-2: #b3bccb; --text-3: #7a8497;
  --brand: #5b86ff; --brand-2: #3a63e6; --brand-soft: #18213a; --brand-ink: #9db6ff;
  --red: #ff5a67; --red-soft: #3a1a1f; --shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.topbar *, .header *, .gnb *, .footer *, .nv-drawer * { box-sizing: border-box; }
.nv-drawer svg { display: inline-block; }
.nv-drawer .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border-radius: 10px; font-weight: 700; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.nv-drawer .btn-primary { background: var(--brand-2); color: #fff; border: 0; }
.nv-drawer .btn-line { border: 1px solid var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.topbar a:hover, .header a:hover, .footer a:hover { color: inherit; }
.topbar svg, .header svg, .gnb svg, .footer svg { display: inline-block; }

/* 틀 안의 .wrap — hub/base.css 의 그리드 .wrap 을 되돌린다 */
.topbar > .wrap, .header > .wrap, .gnb > .wrap, .footer > .wrap {
  max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; grid-template-columns: none;
}

/* 상단 바 — hub/base.css .topbar(sticky · 흐림 · 안쪽 여백) 되돌림 */
div.topbar { position: static; display: block; padding: 0; gap: 0; z-index: auto; backdrop-filter: none; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12.5px; }
div.topbar > .wrap { display: flex; align-items: center; gap: 14px; height: 38px; }
.topbar .util a:hover { color: var(--text); }
.topbar .util .on, .topbar .util .on:hover { color: var(--brand); }

/* 헤더 */
header.header { position: static; background: var(--surface); }
header.header > .wrap { display: flex; align-items: center; gap: 28px; height: 84px; }
.header .logo, .footer .logo { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: none; padding: 0; font-size: inherit; font-weight: inherit; letter-spacing: normal; line-height: normal; }
.header .logo .mark, .footer .logo .mark { font-weight: 900; letter-spacing: -0.06em; line-height: 1; color: var(--brand-2); font-style: italic; }
.header .logo .mark { font-size: 32px; }
.footer .logo .mark { font-size: 24px; }
.header .logo .mark b, .footer .logo .mark b { color: var(--brand); }
[data-theme="dark"] .header .logo .mark, [data-theme="dark"] .footer .logo .mark { color: #fff; }
.header .logo small { display: block; margin: 0; font-size: 11px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }

.header form.search { position: static; width: auto; flex: 1; max-width: 560px; display: flex; align-items: center; gap: 0; height: 48px; border: 2px solid var(--brand); border-radius: 12px; background: var(--surface); padding: 0 6px 0 18px; box-shadow: none; }
.header form.search input { flex: 1; width: auto; height: auto; min-width: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: none; color: var(--text); font-size: 14.5px; box-shadow: none; }
.header form.search .scope { display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; padding: 0 14px; border-right: 0; border-left: 1px solid var(--line); color: var(--text-2); opacity: 1; }
.header form.search button.go { position: static; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--brand); }
.header form.search button.go:hover { background: var(--brand-soft); }
.header form.search button.go svg { width: 18px; height: 18px; }

.header .hd-cta .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border: 0; border-radius: 10px; font-weight: 700; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.header .hd-cta .btn svg { width: 16px; height: 16px; }
.header .hd-cta .btn-primary, .header .hd-cta .btn-primary:hover { color: #fff; }
.header .hd-cta .btn-primary { background: var(--brand-2); }
.header .hd-cta .btn-primary:hover { background: var(--brand); }
.header .hd-cta .btn-line { border: 1px solid var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.header .hd-cta .btn-line:hover { background: var(--surface); color: var(--brand-ink); }

/* GNB — game/components.css(.gnb flex · 1080px 이하 숨김) · hub/b.css(.gnb 흐림 · 메뉴 배경) 되돌림 */
div.gnb { display: block; position: sticky; top: 0; z-index: 20; gap: 0; background: var(--surface); backdrop-filter: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
div.gnb > .wrap { display: flex; align-items: center; height: 54px; gap: 4px; }
div.gnb.open > .wrap { height: auto; min-height: 54px; }
div.gnb nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
div.gnb.open nav { flex-wrap: wrap; overflow: visible; }
div.gnb nav a { position: relative; display: flex; align-items: center; gap: 6px; height: 54px; padding: 0 14px; border-radius: 0; background: none; box-shadow: none; font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--text); }
div.gnb nav a:hover, div.gnb nav a.on { color: var(--brand); background: none; box-shadow: none; }
div.gnb .all { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; margin-right: 10px; background: none; color: var(--text); }

/* 푸터 (한 덩어리 — 본문 CSS 의 footer · p · ul · dl 규칙을 막는다) */
footer.footer { margin-top: 56px; padding: 0; background: var(--surface); border: 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.footer p, .footer ul, .footer dl, .footer dd, .footer h2 { margin: 0; padding: 0; }
.footer p { line-height: 1.75; }
.footer ul { list-style: none; }
.footer a { color: inherit; text-decoration: none; }

@media (max-width: 1080px) {
  div.gnb { display: block; }
  div.gnb nav { display: flex; }
  .header .hd-cta .btn-line { display: none; }
}
@media (max-width: 760px) {
  .topbar > .wrap, .header > .wrap, .gnb > .wrap, .footer > .wrap { padding-left: 16px; padding-right: 16px; }
  header.header > .wrap { height: auto; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; gap: 12px; }
  .header form.search { order: 3; max-width: none; flex-basis: 100%; height: 44px; }
  .header form.search .scope { display: none; }
  .header .hd-cta .btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .header .logo .mark { font-size: 26px; }
  div.gnb > .wrap { height: 48px; }
  div.gnb nav a { height: 48px; padding: 0 10px; font-size: 14px; }
}
