/* 탑과 용병단 공식 사이트 — 모든 페이지가 같이 쓰는 머리 메뉴(.gnb) · 갈래 줄(.subbar) · 꼬리말(.ft)
 *
 * 소개 · 커뮤니티는 이 파일과 home.css 를, 안내 · 패치 노트 같은 자료 페이지는 이 파일과 옛 본문 스타일 style.css 를 싣는다.
 * style.css 의 색 이름(--gold 등)과 부딪히지 않게 여기 색은 --o- 를 붙인다.
 * 제목 글꼴은 게임의 갈무리11(픽셀) — site/font 의 파일은 scripts/site-assets.py font 가 쓰는 글자만 남겨 줄인 것이다.
 */
@font-face { font-family: "Galmuri"; src: url("/font/galmuri11.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Galmuri"; src: url("/font/galmuri11-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --o-night: #0a0d16;
  --o-night-2: #121726;
  --o-night-3: #1b2133;
  --o-line: #2a3148;
  --o-ink: #ece6d6;
  --o-dim: #a29d8c;
  --o-gold: #f0b94e;
  --o-gold-deep: #b9792a;
  --o-crimson: #a8262c;
  --o-crimson-hi: #d0453c;
  --o-parch: #efe6d2;
  --o-parch-2: #e4d8bd;
  --o-parch-ink: #2a2117;
  --o-parch-dim: #6a5a42;
  --o-parch-line: #cdbb94;
  /* 본문은 시스템 글꼴 — 외부 글꼴을 받지 않는다(방문자 정보가 남의 서버로 가지 않게). 픽셀 제목 글꼴만 /font 에 직접 둔다 */
  --o-pixel: "Galmuri", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --o-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --o-gut: max(16px, env(safe-area-inset-left, 0px));
  --o-gut-r: max(16px, env(safe-area-inset-right, 0px));
}

/* ── 머리 메뉴 ── */
.gnb { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--o-night) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--o-line); padding-top: env(safe-area-inset-top, 0px); font-family: var(--o-body); }
.gnb-in { max-width: calc(1180px + var(--o-gut) + var(--o-gut-r)); margin: 0 auto; padding: 0 var(--o-gut-r) 0 var(--o-gut); display: flex; align-items: center; gap: 22px; height: 56px; }
.gnb .logo, .ft .logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--o-pixel); font-weight: 700; font-size: 17px; color: var(--o-gold); white-space: nowrap; }
.gnb .logo img, .ft .logo img { width: 28px; height: 28px; display: block; }
.gnb-nav { display: flex; gap: 20px; font-size: 14px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gnb-nav::-webkit-scrollbar { display: none; }
.gnb-nav a { text-decoration: none; color: var(--o-dim); white-space: nowrap; padding-block: 6px; border-bottom: 2px solid transparent; }
.gnb-nav a:hover { color: var(--o-ink); }
.gnb-nav a.on { color: var(--o-ink); border-bottom-color: var(--o-gold); }
.gnb-lang { font-size: 13px; color: var(--o-dim); text-decoration: none; white-space: nowrap; }
.gnb-lang:hover { color: var(--o-ink); }
.gnb-dl { align-self: stretch; display: inline-flex; align-items: center; padding: 0 18px; margin-right: calc(-1 * var(--o-gut-r)); background: linear-gradient(180deg, var(--o-crimson-hi), var(--o-crimson)); color: #fff3e0; text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.gnb a:focus-visible, .subbar a:focus-visible, .ft a:focus-visible { outline: 2px solid var(--o-gold); outline-offset: 2px; }

/* ── 자료 페이지의 갈래 줄 ── */
.subbar { background: var(--o-night-2); border-bottom: 1px solid var(--o-line); font-family: var(--o-body); }
.subbar-in { max-width: calc(1180px + var(--o-gut) + var(--o-gut-r)); margin: 0 auto; padding: 0 var(--o-gut-r) 0 var(--o-gut); }
.subbar .topnav-links { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; font-size: 14px; }
.subbar .topnav-links::-webkit-scrollbar { display: none; }
.subbar a { color: var(--o-dim); text-decoration: none; white-space: nowrap; padding: 10px 0 8px; border-bottom: 2px solid transparent; }
.subbar a:hover { color: var(--o-ink); }
.subbar a[aria-current="page"] { color: var(--o-gold); border-bottom-color: var(--o-gold); }

/* ── 꼬리말 ── */
.ft { background: #05060b; border-top: 1px solid var(--o-line); font-family: var(--o-body); font-size: 13px; color: var(--o-dim); }
.ft-in { max-width: calc(1180px + var(--o-gut) + var(--o-gut-r)); margin: 0 auto; padding: 28px var(--o-gut-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--o-gut); display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.ft .logo { font-size: 15px; margin-right: auto; }
.ft .logo img { width: 24px; height: 24px; }
.ft a { color: var(--o-dim); text-decoration: none; }
.ft a:hover { color: var(--o-ink); }

/* 좁은 화면: 로고 · 언어 · 다운로드가 한 줄, 메뉴는 그 아래 가로로 민다 */
@media (max-width: 820px) {
  .gnb-in { height: auto; flex-wrap: wrap; gap: 0 14px; padding-top: 0; }
  .gnb .logo { height: 50px; margin-right: auto; }
  .gnb-dl { height: 50px; }
  .gnb-nav { order: 3; flex: 1 0 100%; gap: 18px; padding-bottom: 4px; }
  .ft .logo { flex: 1 0 100%; }
}
