/* 공식 사이트(bigamehero.com) — 흰 바탕 테마(2026-12-04 사용자: "칙칙하다, 컴프야 커뮤니티처럼 흰색으로").
   위 머리띠만 게임 남색, 공지·게시판·글쓰기는 흰 판. 마크업은 site/render.js. */
@font-face { font-family: BGH Display; src: url('/assets/fonts/bgh-korean-display.woff2') format('woff2'); font-display: swap; }
:root {
  color-scheme: light;
  --ink: #16191f; --ink-2: #3a404b; --muted: #7b8290; --line: #e6e8ec; --line-2: #d4d8de;
  --bg: #f3f4f6; --card: #fff; --navy: #0f2140; --navy-2: #1b3560; --gold: #e2a72e; --gold-ink: #9a6a07;
  --red: #e5483f; --focus: #2f6fe0; --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.skip-link { position: fixed; z-index: 9; top: 8px; left: 8px; translate: 0 -150%; padding: 12px; background: #fff; border: 1px solid var(--line-2); }
.skip-link:focus { translate: 0; }

/* ---- 머리띠 ---- */
.site { min-height: 100svh; display: flex; flex-direction: column; }
.shell { flex: 1; display: flex; flex-direction: column; }
.masthead {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: env(safe-area-inset-top) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  min-height: 56px; background: var(--navy); color: #fff;
  box-shadow: inset 0 -3px var(--gold);
}
.masthead > * { margin-block: 8px 11px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font: 400 20px/1 BGH Display, system-ui, sans-serif; letter-spacing: -.01em; }
.masthead .account-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px;
  border: 1px solid #ffffff40; border-radius: 18px; background: #ffffff12; color: #fff; font-size: 13px; font-weight: 700;
}
.masthead .account-link svg { width: 18px; height: 18px; flex: none; }
.masthead .account-link .player-name { color: #fff; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-nav {
  position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 4;
  display: flex; align-items: stretch; gap: 0; padding-inline: max(6px, env(safe-area-inset-left));
  background: #fff; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-group { display: flex; align-items: stretch; }
.nav-group + .nav-group { border-left: 1px solid var(--line); margin-left: 6px; padding-left: 6px; }
.group-label { display: none; }
.nav-item {
  display: grid; place-items: center; min-height: 46px; padding-inline: 13px;
  color: var(--ink-2); font-size: 15px; font-weight: 650; white-space: nowrap;
}
.nav-item:hover { color: var(--ink); }
.nav-item[aria-current] { color: var(--navy); font-weight: 800; box-shadow: inset 0 -3px var(--navy); }
.mobile-name { display: none; }
@media (min-width: 761px) { .site-nav { justify-content: center; } .masthead { padding-inline: calc((100% - 760px) / 2); } }

main { flex: 1 0 auto; width: 100%; max-width: 760px; margin: 0 auto; padding: 0 0 8px; }
.page-section { animation: enter 200ms var(--ease) both; }
@keyframes enter { from { opacity: .6; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }

/* ---- 제목 ---- */
.page-title {
  display: flex; align-items: baseline; gap: 6px; margin: 0; padding: 18px 16px 12px;
  background: #fff; font-size: 21px; font-weight: 800; letter-spacing: -.02em;
}
.page-title .count { color: var(--muted); font-size: 16px; font-weight: 500; }
.heading-rule { height: 2px; margin: 0 16px; background: var(--ink); }
.page-section > .heading-rule + * { margin-top: 0; }

/* ---- 공통 판 ---- */
.board-panel, .module, .notice-list, .notice-article, .state-panel, .auth-panel, .write-form { background: var(--card); }
.state-panel, .auth-panel {
  display: grid; justify-items: center; align-content: center; gap: 12px; min-height: 220px;
  padding: 28px 18px; text-align: center; color: var(--ink-2);
}
.state-panel p, .auth-panel p { margin: 0; font-size: 15px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.state-panel time { display: block; font-weight: 750; color: var(--ink); }

/* ---- 버튼 ---- */
.kit-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 6px;
  background: #fff; color: var(--ink); font-size: 15px; font-weight: 700; white-space: nowrap;
  transition: background-color 150ms, transform 150ms var(--ease);
}
.kit-button:hover { background: #f6f7f9; }
.kit-button:active { transform: translateY(1px); }
.kit-button.is-gold { border-color: var(--navy); background: var(--navy); color: #fff; }
.kit-button.is-gold:hover { background: var(--navy-2); }
.kit-button > svg, .row-icon { width: 16px; height: 16px; fill: currentColor; flex: none; }
.kit-button[disabled] { opacity: .55; cursor: default; }
.text-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 40px;
  padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650;
}
.text-action:hover { color: var(--ink); }
.row-arrow { flex: none; width: 7px; height: 11px; background: #9aa1ad; clip-path: polygon(0 0, 100% 50%, 0 100%, 0 76%, 55% 50%, 0 24%); }

/* ---- 공지 목록 ---- */
.notice-list { border-bottom: 1px solid var(--line); }
.notice-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "labels thumb" "title thumb" "date thumb";
  align-items: center; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.notice-row:last-child { border-bottom: 0; }
.notice-row:hover { background: #fafbfc; }
.notice-row .row-arrow { display: none; }
.notice-labels { grid-area: labels; display: flex; flex-wrap: wrap; gap: 5px; }
.notice-title { grid-area: title; min-width: 0; font-size: 16px; font-weight: 650; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.notice-row.is-important .notice-title { font-weight: 800; }
.notice-date { grid-area: date; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.notice-thumb { grid-area: thumb; width: 96px; height: 56px; border-radius: 4px; object-fit: cover; object-position: center 24%; background: #e9ecf0; }
.notice-chip, .notice-pin {
  display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 7px; border-radius: 3px;
  background: #eef1f6; color: #45536a; font-size: 12px; font-weight: 750; white-space: nowrap;
}
.notice-chip[data-kind="event"] { background: #fdf2dc; color: var(--gold-ink); }
.notice-pin { background: var(--navy); color: #fff; }
.notice-pin::before { content: ""; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }

/* ---- 글·공지 본문 ---- */
.back-link { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line); }
.back-link .row-arrow { rotate: 180deg; }
.back-link:hover { color: var(--ink); }
.notice-article { border-bottom: 1px solid var(--line); }
.article-head { display: grid; gap: 8px; padding: 18px 16px 14px; border-bottom: 1px solid var(--line); }
.article-head > * { grid-area: auto; }
.article-head .notice-date { justify-self: start; }
.article-title { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.38; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 13px; }
.article-image { margin: 0; aspect-ratio: 1000 / 417; background: #e9ecf0; }
.article-image img { width: 100%; height: 100%; object-fit: contain; }
.article-body { padding: 20px 16px 26px; color: #23272f; font-size: 16px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
.article-body p { margin: 0; }
.article-body p + p { margin-top: .7em; }
.article-body h2 { margin: 1.4em 0 .4em; padding-left: 10px; border-left: 3px solid var(--gold); font-size: 17px; line-height: 1.4; }
.article-body ul { margin: 0; padding-left: 1.25em; }
.article-body li + li { margin-top: .3em; }
.article-body li::marker { color: var(--gold); }
.article-body .article-note { margin-block: 1.2em; color: var(--muted); font-size: 14px; }
.article-body a, .policy-link { color: #1c5fd0; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.article-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 4px 12px 22px; }
.article-controls .recommend { grid-column: 2; min-width: 112px; border-radius: 22px; }
.recommend b { font-size: 16px; }
.recommend[aria-pressed="true"] { border-color: var(--gold); background: #fff7e4; color: var(--gold-ink); }
.moderation { justify-self: end; display: flex; gap: 2px; }
.article-navigation { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; }
.notice-navigation { justify-content: center; }
#post-navigation { display: grid; grid-template-columns: 1fr auto 1fr; justify-items: start; }
#post-navigation > :last-child { justify-self: end; }
.article-navigation .previous .row-arrow { rotate: 180deg; }
.article-navigation .kit-button { min-width: 108px; }

/* ---- 홈 ---- */
.module { margin-top: 10px; }
.page-section > .module:first-of-type { margin-top: 0; }
.module-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 50px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.module-title { margin: 0; font-size: 17px; font-weight: 800; }
.module-header .text-action .row-arrow { width: 5px; height: 9px; }
.featured-notice { display: grid; grid-template-columns: minmax(0, 1fr) 42%; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.featured-copy { display: grid; gap: 6px; }
.featured-copy strong { font-size: 17px; line-height: 1.4; word-break: keep-all; }
.featured-copy time { color: var(--muted); font-size: 13px; }
.featured-copy > *, .notice-summary > * { grid-area: auto; }
.featured-copy .notice-labels { order: -1; }
.featured-art img { width: 100%; height: auto; aspect-ratio: 1000 / 417; border-radius: 5px; object-fit: cover; background: #e9ecf0; }
.notice-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.notice-summary:last-child { border-bottom: 0; }
.notice-summary .notice-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-summary .notice-date { font-size: 12px; }
.notice-summary .row-arrow { display: none; }
.home-boards { display: grid; gap: 10px; margin-top: 10px; }
.home-post { display: grid; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.home-post:last-child { border-bottom: 0; }
.home-post .post-title { font-size: 15px; }
.home-post-meta { display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 12px; }
.module .state-panel { min-height: 90px; padding: 18px; }
.featured-notice:hover, .notice-summary:hover, .home-post:hover, .post-row:hover { background: #fafbfc; }

/* ---- 게시판 목록 ---- */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 8px 8px; border-bottom: 1px solid var(--line); }
.sort-links { display: flex; gap: 2px; }
.sort-links a { display: grid; place-items: center; min-height: 40px; padding: 0 12px; border-radius: 20px; color: var(--muted); font-size: 14px; font-weight: 700; }
.sort-links [aria-current] { background: #eef1f6; color: var(--ink); }
.list-toolbar .kit-button { min-height: 40px; padding: 0 16px; }
.list-labels { display: none; }
.post-row { display: grid; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-title { font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.post-row.is-popular .post-title, .home-post .post-title { font-weight: 650; }
.hot-label { display: inline-flex; align-items: center; min-height: 19px; padding: 0 5px; margin-right: 2px; border-radius: 3px; vertical-align: 1px; background: #fdf2dc; color: var(--gold-ink); font-size: 11px; font-weight: 800; }
.new-badge { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 5px; border-radius: 3px; vertical-align: 1px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; }
.comment-count { margin-left: 5px; color: var(--red); font-size: 13px; font-weight: 700; white-space: nowrap; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 13px; }
.player { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; min-width: 0; color: var(--ink-2); font-size: 13px; }
.club-logo { width: 20px; height: 20px; flex: none; object-fit: contain; }
.player-name { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.ovr { display: inline-flex; align-items: center; gap: 3px; min-height: 18px; padding: 0 5px; border-radius: 3px; background: var(--navy); color: #ffd27a; font-size: 10px; font-weight: 700; white-space: nowrap; }
.ovr b { font-size: 12px; font-variant-numeric: tabular-nums; }
.position { color: var(--muted); font-size: 12px; }
.post-date, .stat { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat { display: inline-flex; align-items: center; gap: 3px; }
.stat svg { width: 14px; height: 14px; fill: currentColor; }
.stat-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pagination { display: flex; justify-content: center; gap: 2px; padding: 16px 8px; }
.pagination .text-action { min-width: 38px; min-height: 38px; border-radius: 6px; color: var(--ink-2); font-size: 14px; }
.pagination [aria-current] { background: var(--navy); color: #fff; }
.pagination [aria-disabled] { opacity: .35; }
.pagination .prev .row-arrow { rotate: 180deg; }

/* ---- 댓글 ---- */
.comments { margin-top: 10px; }
.section-bar { display: flex; align-items: center; min-height: 50px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.section-title { margin: 0; font-size: 16px; font-weight: 800; }
.section-title span { margin-left: 3px; color: var(--red); }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-row { padding: 6px 16px 14px; border-bottom: 1px solid var(--line); }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 40px; }
.comment-head time { color: var(--muted); font-size: 12px; }
.comment-head .text-action { margin-left: auto; min-height: 36px; }
.comment-text { margin: 0; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; color: #23272f; }
.comment-form, .comment-gate { display: grid; gap: 8px; padding: 14px 16px; background: #f8f9fb; }
.comment-form label { font-size: 14px; font-weight: 750; }
.comment-gate { justify-items: center; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.comment-form .form-actions { justify-content: space-between; }
.form-actions .kit-button { min-width: 92px; }

/* ---- 글쓰기 ---- */
.write-form { display: grid; gap: 14px; padding: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 750; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field small, .field-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.input {
  display: block; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 6px;
  background: #fff; color: var(--ink); font-size: 16px; line-height: 1.6;
}
.input:focus { border-color: var(--navy); outline: 2px solid #0f21401f; outline-offset: 0; }
.input::placeholder { color: #a2a8b3; }
textarea.input { resize: vertical; min-height: 88px; }
.write-form textarea { min-height: 260px; }
.policy-link { display: inline-flex; align-items: center; min-height: 40px; font-size: 13px; justify-self: start; }

/* ---- 로그인 ---- */
.code-form { display: grid; gap: 10px; width: min(100%, 300px); text-align: left; }
.code-form label { font-size: 14px; font-weight: 750; }
.code-input { text-align: center; font-size: 24px; font-weight: 800; letter-spacing: .14em; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.auth-panel { min-height: 260px; }
.auth-actions { display: grid; gap: 10px; width: min(100%, 280px); }
.provider {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 14px;
  border: 1px solid #747775; border-radius: 6px; background: #fff; color: #1f1f1f; font: 600 15px/20px system-ui, sans-serif;
}
.provider svg { width: 18px; height: 18px; flex: none; }
.provider-apple { border-color: #000; background: #000; color: #fff; }
.provider-apple svg { width: 20px; height: 20px; fill: currentColor; }
.auth-panel .guest-note { color: var(--muted); font-size: 13px; }

/* ---- 알림 ---- */
.toast {
  position: fixed; z-index: 8; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0;
  display: flex; align-items: center; gap: 6px; width: max-content; max-width: min(440px, calc(100% - 28px)); min-height: 46px; padding: 8px 4px 8px 16px; line-height: 1.45;
  border-radius: 23px; background: #1d2330; color: #fff; box-shadow: 0 6px 20px #0003; font-size: 14px; font-weight: 650;
}
.toast .text-action { color: #c9ced8; font-size: 18px; }

/* ---- 아래 ---- */
.site-footer {
  margin-top: 16px; padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); background: #1b1f27; color: #aab1bd; text-align: center;
}
.store-links { display: flex; justify-content: center; gap: 8px; }
.store-links .kit-button { width: min(50%, 170px); border-color: #3a414d; background: #262b35; color: #fff; }
.store-links .kit-button:hover { background: #2f3541; }
.store-links svg { width: 17px; height: 17px; fill: currentColor; }
.social-link, .legal-link { display: inline-flex; align-items: center; min-height: 40px; font-size: 13px; }
.social-link { margin-top: 6px; color: #e2e6ec; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; }
.social-link:hover, .legal-link:hover { text-decoration: underline; }
.copyright { margin: 4px 0 0; font-size: 12px; color: #7f8794; }

@media (min-width: 761px) {
  main { padding-top: 16px; }
  .page-section { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
  .page-section:has(> .module) { border: 0; background: transparent; overflow: visible; }
  .module { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .home-boards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-section:has(> .module) > .page-title { border-radius: 8px 8px 0 0; border: 1px solid var(--line); border-bottom: 0; }
  .page-section:has(> .module) > .heading-rule { margin: 0; }
}
@media (max-width: 600px) {
  .desktop-name { display: none; }
  .mobile-name { display: inline; }
  .site-nav { justify-content: space-around; }
  .nav-group, .nav-group + .nav-group { flex: 1; justify-content: space-around; border: 0; margin: 0; padding: 0; }
  .nav-group:first-child { flex: .3; }
  .nav-item { padding-inline: 10px; }
  .notice-thumb { width: 84px; height: 50px; }
  .featured-notice { grid-template-columns: 1fr; }
  .featured-art { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
