/* Black Harbor RP — 블랙 하버 밤거리 테마 (다크 전용) */
:root {
  color-scheme: dark;
  --bg: #0b0c12;
  --bg-2: #10121a;
  --surface: #141721;
  --surface-2: #1a1e2a;
  --line: #242a38;
  --line-soft: #1c2130;
  --text: #e8eaf0;
  --text-2: #b4bacb;
  --muted: #7c849a;
  --accent: #ff7a2f;
  --accent-2: #ffb36b;
  --accent-glow: rgba(255, 122, 47, .35);
  --neon: #4fe3d6;
  --danger: #ff5c6c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 122, 47, .07), transparent 60%),
    radial-gradient(900px 400px at -10% 10%, rgba(79, 227, 214, .05), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.65 "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
main.wrap { flex: 1; width: 100%; padding-top: 32px; padding-bottom: 56px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
::selection { background: var(--accent); color: #140a03; }

/* ── 헤더 ───────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 12, 18, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.top-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: .08em; }
.logo b { color: var(--accent); font-weight: 800; margin-left: -4px; }
.logo-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #ff4f6d);
  color: #160904; font-size: 16px; letter-spacing: 0;
  box-shadow: 0 0 18px var(--accent-glow);
}
.logo.small { font-size: 14px; }
.logo.small .logo-mark { width: 24px; height: 24px; font-size: 13px; border-radius: 7px; box-shadow: none; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 10px; white-space: nowrap; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.me { display: flex; align-items: center; gap: 10px; }
.me form { margin: 0; }
.me-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.me-chip:hover { border-color: var(--accent); }
.me-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.role { font-size: 11px; font-weight: 700; color: var(--accent); background: rgba(255, 122, 47, .12); padding: 1px 7px; border-radius: 999px; }

.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.small { width: 26px; height: 26px; }
.avatar-empty { display: grid; place-items: center; background: var(--surface-2); color: var(--accent-2); font-weight: 700; font-size: 13px; border: 1px solid var(--line); }

/* ── 버튼 ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 9px 16px;
  background: var(--accent); color: #170a02; font: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: transform .1s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { box-shadow: 0 0 0 4px var(--accent-glow); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--text-2); box-shadow: none; background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(255, 92, 108, .45); }
.btn.danger:hover { background: rgba(255, 92, 108, .1); box-shadow: none; }
.btn.steam { background: #e8eaf0; color: #0d1117; }
.btn.steam:hover { box-shadow: 0 0 0 4px rgba(232, 234, 240, .15); }
.btn.steam svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--danger); }

/* ── 히어로 ─────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); min-height: 440px; display: flex; align-items: center; }
.hero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 70% 100%, rgba(255, 122, 47, .38), transparent 70%),
    radial-gradient(40% 40% at 20% 95%, rgba(255, 79, 109, .18), transparent 70%),
    linear-gradient(180deg, #07080e 0%, #0e0f1f 45%, #1d1530 75%, #2a1a2a 100%);
}
.hero-sky::after { /* 별 */
  content: ""; position: absolute; inset: 0 0 45% 0; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 20%, #fff, transparent),
    radial-gradient(1px 1px at 33% 8%, #fff, transparent),
    radial-gradient(1px 1px at 58% 26%, #fff, transparent),
    radial-gradient(1px 1px at 76% 12%, #fff, transparent),
    radial-gradient(1px 1px at 88% 34%, #fff, transparent),
    radial-gradient(1px 1px at 45% 40%, #fff, transparent),
    radial-gradient(1px 1px at 5% 45%, #fff, transparent);
}
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, var(--bg)); }
.hero-inner { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 96px; width: 100%; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--accent-2); }
.hero h1 { margin: 0; font-size: clamp(32px, 5.4vw, 56px); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero h1 span { background: linear-gradient(90deg, var(--accent), #ff4f6d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 18px 0 28px; color: var(--text-2); font-size: 16px; max-width: 520px; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero .btn.ghost { background: rgba(11, 12, 18, .5); backdrop-filter: blur(6px); }
.status {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  background: rgba(11, 12, 18, .6); border: 1px solid var(--line); font-size: 14px; color: var(--text-2);
  backdrop-filter: blur(6px);
}
.status b { color: var(--text); }
.status small { color: var(--muted); margin-left: 4px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.on i { background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: pulse 2s infinite; }
.status.off i { background: var(--danger); }
@keyframes pulse { 50% { opacity: .45; } }

/* ── 홈 게시판 패널 ───────────────────── */
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }
.more { font-size: 13px; color: var(--muted); }
.more:hover { color: var(--accent-2); }
.panel-list { list-style: none; margin: 0; padding: 0; }
.panel-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.panel-list li:first-child { border-top: 0; }
.panel-list a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.panel-list a:hover { color: var(--text); }
.panel-list time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.panel-empty { margin: 14px 0 6px; font-size: 14px; }
em { font-style: normal; color: var(--accent); font-size: 12px; font-weight: 700; }

/* ── 게시판 목록 ─────────────────────── */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.page-head p.muted { margin: 4px 0 0; }
.post-table { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 140px 72px 56px; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.row:first-child { border-top: 0; }
.row { transition: background .12s; }
.row:not(.row-head):hover { background: var(--surface-2); }
.row:not(.row-head):hover .c-title .t { color: var(--accent-2); }
.row.pinned { background: rgba(255, 122, 47, .05); }
.row a.c-author:hover { color: var(--accent-2); }
.row-head { background: var(--bg-2); color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 10px; padding-bottom: 10px; }
.c-num, .c-date, .c-views { color: var(--muted); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.c-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; }
.c-title .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-title .ico { color: var(--muted); font-size: 12px; }
.c-title .likes { color: #ff6b8a; font-size: 12px; font-weight: 700; }
.c-author { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-head .c-title, .row-head .c-author { font-weight: 600; }
.post-table-empty { padding: 48px 20px; text-align: center; margin: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }
.page-num { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #170a02; font-weight: 800; font-size: 14px; }

/* ── 글 보기 ─────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 16px; }
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--accent-2); }
.post-title { margin: 0 0 16px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; overflow-wrap: anywhere; }
.byline { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.byline .avatar { width: 38px; height: 38px; }
.byline > div { display: flex; flex-direction: column; line-height: 1.4; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.article .body { margin: 22px 0 8px; font-size: 16px; line-height: 1.8; min-height: 80px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.actions form { margin: 0; }

.comments-title { margin: 0 0 8px; font-size: 16px; }
.comments-title em { font-size: 16px; }
.comments { list-style: none; margin: 0; padding: 0; }
.comments li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.comments li:first-child { border-top: 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.comment-meta form { margin: 0 0 0 auto; }
.comments .body { margin-top: 2px; font-size: 14.5px; color: var(--text-2); }
.comment-form { display: flex; gap: 10px; margin-top: 14px; align-items: stretch; }
.comment-form .btn { padding-left: 22px; padding-right: 22px; }
.login-hint { margin: 14px 0 0; padding: 14px; text-align: center; border-radius: 10px; background: var(--bg-2); color: var(--muted); font-size: 14px; }
.login-hint a { color: var(--accent-2); font-weight: 600; }

/* ── 폼 ──────────────────────────────── */
input, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.write-form { display: flex; flex-direction: column; gap: 12px; }
.title-input { font-size: 18px; font-weight: 700; }
.error { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; color: var(--danger); background: rgba(255, 92, 108, .08); border: 1px solid rgba(255, 92, 108, .3); font-weight: 600; font-size: 14px; }

/* ── 오류 페이지 ─────────────────────── */
.error-page { text-align: center; padding: 72px 0; }
.err-code { margin: 0; font-size: 88px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; background: linear-gradient(180deg, var(--accent), #ff4f6d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-msg { margin: 16px 0 28px; color: var(--text-2); }

/* ── 푸터 ────────────────────────────── */
.foot { border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.foot-inner { display: flex; align-items: center; gap: 16px; padding-top: 22px; padding-bottom: 28px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* ── 공통 조각 ────────────────────────── */
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--accent-2); }
.mono { font-family: ui-monospace, Consolas, monospace; }
.lead { color: var(--text-2); font-size: 17px; margin: 8px 0 0; max-width: 720px; }
.top-search input { width: 150px; padding: 7px 12px; border-radius: 9px; font-size: 13px; background: var(--surface); }
.top-search input:focus { width: 200px; }
.role-staff { color: var(--neon); background: rgba(79, 227, 214, .12); }
.badge { display: inline-block; flex: none; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.st-pending { color: #ffd166; border-color: rgba(255, 209, 102, .35); background: rgba(255, 209, 102, .08); }
.st-reviewing { color: #6cb4ff; border-color: rgba(108, 180, 255, .35); background: rgba(108, 180, 255, .08); }
.st-accepted, .st-resolved { color: #5ee38f; border-color: rgba(94, 227, 143, .35); background: rgba(94, 227, 143, .08); }
.st-rejected { color: var(--danger); border-color: rgba(255, 92, 108, .35); background: rgba(255, 92, 108, .08); }
.pin { flex: none; font-size: 11px; font-weight: 800; color: #170a02; background: var(--accent); padding: 1px 7px; border-radius: 6px; }
.lock { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.notice-box { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; margin: 0 0 14px; }
.notice-box.ok { border-color: rgba(94, 227, 143, .4); color: #5ee38f; }
.eyebrow a:hover { color: var(--accent); }
.group-title { font-size: 15px; font-weight: 700; color: var(--text-2); margin: 28px 0 10px; display: flex; align-items: center; gap: 8px; }
.group-title::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--accent); }
.board-search { display: flex; gap: 8px; margin-bottom: 12px; max-width: 420px; }
.board-search input { padding: 9px 12px; }
.online-dot { color: var(--neon); font-size: 12px; font-weight: 600; }
.avatar.big { width: 64px; height: 64px; font-size: 24px; }
.avatar.huge { width: 88px; height: 88px; font-size: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chips a { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.chips a:hover { border-color: var(--accent); color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; }
.foot-links a:hover { color: var(--text); }
.hero-link { color: var(--accent-2); font-weight: 600; white-space: nowrap; }

/* ── 상단 안내 티커 ────────────────────── */
.ticker { border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.ticker-inner { display: flex; align-items: center; gap: 12px; height: 44px; overflow: hidden; }
.ticker-tag { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #170a02; background: var(--accent); padding: 2px 8px; border-radius: 6px; }
.ticker-track { position: relative; flex: 1; height: 22px; overflow: hidden; }
.ticker-item { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--text-2); opacity: 0; transform: translateY(100%); transition: opacity .4s, transform .4s; }
.ticker-item:first-child, .ticker-item.on { opacity: 1; transform: none; }
.ticker-track.js .ticker-item:first-child:not(.on) { opacity: 0; transform: translateY(-100%); }
.ticker-item b { color: var(--accent-2); margin-left: 6px; }

/* ── 홈 레이아웃 ──────────────────────── */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.home-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.featured { display: flex; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(120deg, rgba(255, 122, 47, .12), transparent 55%), var(--surface); transition: border-color .15s; }
.featured:hover { border-color: var(--accent); }
.featured-cover { width: 38%; max-height: 220px; object-fit: cover; flex: none; }
.featured-body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; min-width: 0; }
.featured-body .eyebrow { margin: 0; }
.featured-body strong { font-size: 21px; line-height: 1.35; letter-spacing: -0.02em; }
.featured-excerpt { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.featured .more { color: var(--accent-2); }
.panel-list .pin { font-size: 10px; padding: 0 5px; }
.gallery-strip { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 20px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; display: block; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.03); }
.side-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.side-card h3 { margin: 0; font-size: 15px; }
.side-card h4 { margin: 6px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.side-card.discord { background: linear-gradient(135deg, #3b45c4, #5865f2); border: 0; color: #fff; }
.side-card.discord span { font-size: 14px; opacity: .9; }
.side-card.discord .btn { align-self: flex-start; background: #fff; color: #3b45c4; opacity: 1; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 6px; }
.stat-row b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat-row small, .profile-stats small, .forum-count small { color: var(--muted); font-size: 12px; }
.online-list { display: flex; flex-wrap: wrap; gap: 6px; }
.popular { margin: 0; padding: 0; list-style: none; counter-reset: pop; }
.popular li { counter-increment: pop; border-top: 1px solid var(--line-soft); }
.popular li:first-child { border-top: 0; }
.popular a { display: grid; grid-template-columns: 22px 1fr; padding: 7px 0; font-size: 14px; }
.popular a::before { content: counter(pop); color: var(--accent); font-weight: 800; grid-row: span 2; }
.popular span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular small { color: var(--muted); font-size: 12px; }
.quick a { font-size: 14px; color: var(--text-2); padding: 3px 0; }
.quick a:hover { color: var(--accent-2); }

/* ── 포럼 첫 화면 ─────────────────────── */
.forum { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.forum-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 70px 240px; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line-soft); transition: background .12s; }
.forum-row:first-child { border-top: 0; }
.forum-row:hover { background: var(--surface-2); }
.forum-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 19px; }
.forum-icon::before { content: "💬"; }
.fi-notice::before { content: "📢"; } .fi-updates::before { content: "🛠️"; } .fi-events::before { content: "🎉"; }
.fi-intro::before { content: "👋"; } .fi-tips::before { content: "🧭"; } .fi-stories::before { content: "📖"; } .fi-gallery::before { content: "📷"; }
.fi-suggest::before { content: "💡"; } .fi-bugs::before { content: "🐞"; } .fi-report::before { content: "🚨"; } .fi-appeal::before { content: "⚖️"; }
.fi-staffreport::before { content: "🛡️"; } .fi-apply::before { content: "🙋"; } .fi-support::before { content: "🔧"; }
.forum-main { display: flex; flex-direction: column; min-width: 0; }
.forum-main strong { font-size: 15px; }
.forum-main .muted { font-size: 13px; }
.forum-count { text-align: center; }
.forum-count b { display: block; font-size: 17px; }
.forum-latest { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.forum-latest .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.forum-latest small { color: var(--muted); font-size: 12px; }

/* ── 글 본문 (마크다운) ───────────────── */
.post-tags { display: flex; gap: 6px; margin-bottom: 8px; }
.post-tags:empty { display: none; }
.byline .author:hover { color: var(--accent-2); }
.byline .role { margin-left: 4px; }
.prose { margin: 22px 0 8px; font-size: 16px; line-height: 1.8; min-height: 60px; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose p.plain { white-space: pre-wrap; }
.prose h1, .prose h2, .prose h3 { line-height: 1.35; margin: 1.4em 0 .5em; letter-spacing: -0.02em; }
.prose h1 { font-size: 24px; } .prose h2 { font-size: 21px; } .prose h3 { font-size: 18px; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 12px 0; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--text-2); background: var(--bg-2); border-radius: 0 8px 8px 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; color: var(--text); }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: var(--bg-2); }
.prose input[type=checkbox] { width: auto; margin-right: 6px; }
.post-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.post-foot form { margin: 0; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; transition: all .15s; }
.like-btn:hover { border-color: #ff6b8a; color: #ff6b8a; }
.like-btn.on { background: rgba(255, 107, 138, .12); border-color: #ff6b8a; color: #ff6b8a; }
.status-card h2 { margin: 0 0 8px; font-size: 16px; }
.status-now .badge { font-size: 13px; padding: 3px 12px; }
.status-log { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.status-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.op { font-size: 11px; color: var(--accent-2); border: 1px solid rgba(255, 179, 107, .4); border-radius: 999px; padding: 0 6px; }

/* ── 에디터 (Toast UI 다크 테마 위에 덧칠) ── */
.editor-holder .toastui-editor-defaultUI { border-color: var(--line); border-radius: 10px; overflow: hidden; }
.editor-holder .toastui-editor-defaultUI-toolbar { background: var(--surface-2); border-bottom-color: var(--line); }
.editor-holder .toastui-editor-main, .editor-holder .toastui-editor-ww-container { background: var(--bg-2); }
.editor-holder .ProseMirror { font-family: inherit; font-size: 15px; color: var(--text); }
.editor-holder .toastui-editor-mode-switch { background: var(--surface-2); border-top-color: var(--line); }
.editor-status { margin: 0; min-height: 18px; color: var(--accent-2); font-size: 13px; }

/* ── 문서형 페이지 (규칙·가이드·세계관) ── */
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.doc-layout > .doc:first-child { order: 0; }
.doc-layout > .doc:first-child + .toc { order: 1; }
.doc-layout:has(> .doc:first-child) { grid-template-columns: minmax(0, 1fr) 220px; }
.toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); font-size: 14px; }
.toc-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.toc a { padding: 5px 8px; border-radius: 7px; color: var(--text-2); }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc hr { border: 0; border-top: 1px solid var(--line-soft); margin: 8px 0; width: 100%; }
.doc h2 { font-size: 21px; margin: 32px 0 10px; letter-spacing: -0.02em; scroll-margin-top: 84px; }
.doc > :first-child h2, .doc > h2:first-child { margin-top: 0; }
.doc section { scroll-margin-top: 84px; }
.doc p { color: var(--text-2); }
.rule-section { margin-bottom: 28px; }
.rule-section .summary { margin: 0 0 12px; }
.rules { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.rules li { display: flex; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line-soft); scroll-margin-top: 84px; }
.rules li:first-child { border-top: 0; }
.rules li:target { background: rgba(255, 122, 47, .08); }
.rules p { margin: 4px 0 0; font-size: 14px; }
.rule-num { flex: none; min-width: 42px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-2); color: var(--accent-2); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); transition: border-color .15s, transform .15s; }
.guide-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.guide-card span { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.guide-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.fact h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent-2); }
.fact p { margin: 0; font-size: 14px; }
.steps, .start-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li, .start-steps li { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.steps p, .start-steps p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.start-steps h2 { margin: 0; font-size: 18px; }
.start-steps .btn { margin: 10px 6px 0 0; }
.start-steps { margin-bottom: 20px; }
.step-n { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #170a02; font-weight: 800; font-size: 14px; }
.cmd-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.cmd-table td { padding: 10px 14px; border-top: 1px solid var(--line-soft); color: var(--text-2); vertical-align: top; }
.cmd-table tr:first-child td { border-top: 0; }
.cmd-table td:first-child { width: 34%; white-space: nowrap; }
.bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bullets li { padding: 10px 14px 10px 38px; position: relative; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 14px; color: var(--text-2); }
.bullets li::before { position: absolute; left: 14px; top: 10px; }
.bullets.warn li::before { content: "⚠"; color: #ffd166; }
.bullets.tip li::before { content: "💡"; }

/* ── 세계관 ───────────────────────────── */
.world-hero { text-align: center; padding: 28px 0 36px; }
.world-hero h1 { margin: 0; font-size: clamp(40px, 7vw, 72px); font-weight: 900; letter-spacing: -0.04em; background: linear-gradient(180deg, #fff 30%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.world-hero .lead { margin: 14px auto 0; }
.motto { margin: 28px auto 0; max-width: 560px; padding: 18px 24px; border-radius: var(--radius); border: 1px solid rgba(255, 122, 47, .35); background: rgba(255, 122, 47, .06); font-size: 20px; font-weight: 700; }
.motto cite { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; font-style: normal; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 8px; border-left: 2px solid var(--line); }
.timeline li { display: flex; gap: 16px; padding: 0 0 20px 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--accent); }
.timeline li.now::before { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.timeline b { flex: none; width: 48px; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.timeline p { margin: 2px 0 0; font-size: 14px; }
.place-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.place { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.place span { display: block; font-size: 12px; color: var(--accent-2); margin-top: 2px; }
.place p { margin: 8px 0 0; font-size: 14px; }
.faces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.face { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); border-top: 3px solid var(--muted); }
.face p { margin: 8px 0 0; font-size: 14px; }
.face.citizens { border-top-color: #5ee38f; } .face.police { border-top-color: #6cb4ff; } .face.underworld { border-top-color: #b46cff; }
.rumors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rumors li { padding: 16px 18px; border-radius: 4px 14px 14px 14px; background: #1d1a16; border: 1px solid #3a3226; color: #e9dcc6; font-size: 14px; font-style: italic; }
.story-card { padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(180, 108, 255, .1), transparent 60%), var(--surface); border: 1px solid var(--line); }
.story-card p:first-child { color: var(--text); font-weight: 700; font-size: 17px; margin-top: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ── 운영진 / 프로필 / 관리 ───────────── */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.staff-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); text-align: center; }
.staff-card:hover { border-color: var(--accent); }
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-main { flex: 1; min-width: 220px; }
.profile-main h1 { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-main p { margin: 4px 0 0; }
.profile-main a { color: var(--accent-2); }
.bio { color: var(--text-2); white-space: pre-wrap; margin-top: 10px !important; }
.profile-stats { display: flex; gap: 22px; text-align: center; }
.profile-stats b { display: block; font-size: 22px; }
.bio-edit summary { cursor: pointer; font-weight: 600; }
.bio-edit form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.recent-comments { list-style: none; margin: 0; padding: 0; }
.recent-comments li { border-top: 1px solid var(--line-soft); }
.recent-comments li:first-child { border-top: 0; }
.recent-comments a { display: flex; flex-direction: column; padding: 10px 0; }
.recent-comments .body { color: var(--text); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.admin-row { grid-template-columns: minmax(0, 1.4fr) 170px 64px 48px minmax(0, 1.2fr); }
.admin-row a:hover b { color: var(--accent-2); }
.admin-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.admin-actions form { margin: 0; }
select { font: inherit; font-size: 13px; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }

/* ── 모바일 ──────────────────────────── */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .top-inner { flex-wrap: wrap; gap: 8px 12px; min-height: 56px; padding-top: 8px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -8px; padding-bottom: 6px; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .me { margin-left: auto; }
  .me-name, .role { display: none; }
  .me-chip { padding: 3px; }
  .hero { min-height: 400px; }
  .hero-inner { padding-top: 40px; padding-bottom: 72px; }
  .hero-sub br { display: none; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 16px; }
  .row-head { display: none; }
  .c-num, .c-views { display: none; }
  .c-title { grid-column: 1 / -1; flex-wrap: wrap; }
  .c-title .t { white-space: normal; }
  .c-author, .c-date { font-size: 12px; text-align: left; }
  .c-date { text-align: right; }
  .card { padding: 18px; }
  .post-title { font-size: 22px; }
  .comment-form { flex-direction: column; }
  .page-head h1 { font-size: 24px; }
}

@media (max-width: 1080px) {
  .top-search { display: none; }
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { position: static; }
  .doc-layout, .doc-layout:has(> .doc:first-child) { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; order: -1 !important; }
  .toc-title, .toc hr { display: none; }
  .forum-row { grid-template-columns: 40px minmax(0, 1fr) 56px; }
  .forum-latest { display: none; }
}
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .logo { font-size: 15px; letter-spacing: .05em; gap: 7px; }
  .logo-mark { width: 26px; height: 26px; font-size: 14px; }
  .btn.steam { padding: 8px 12px; }
  .featured { flex-direction: column; }
  .featured-cover { width: 100%; max-height: 180px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .place-grid, .faces, .rumors, .guide-facts { grid-template-columns: minmax(0, 1fr); }
  .cmd-table td:first-child { white-space: normal; }
  .admin-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .admin-row.row-head { display: none; }
  .admin-actions { justify-content: flex-start; }
  .foot-links { margin-left: 0; }
  .profile-stats { width: 100%; justify-content: space-around; }
  .ticker-item { font-size: 13px; }
  .page-head { flex-wrap: wrap; }
}
