@font-face { font-family: "Galmuri11"; src: url("fonts/Galmuri11.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Galmuri11"; font-weight: 700; src: url("fonts/Galmuri11-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Galmuri14"; src: url("fonts/Galmuri14.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #161a24;
  --bg2: #1d2230;
  --panel: #222838;
  --line: #313a4f;
  --text: #eef3f2;
  --muted: #94a0b4;
  --mint: #3effd7;
  --mint2: #1fa89c;
  --pink: #ff3e9f;
  --gold: #ffd36b;
  --pixel: "Galmuri11", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --title: "Galmuri14", "Galmuri11", sans-serif;
  --body: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--body);
  background-image: radial-gradient(circle at 20% 0, #232a3d 0, transparent 40%), radial-gradient(circle at 90% 30%, #1f2638 0, transparent 35%);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
img.px, .px img { image-rendering: pixelated; }
h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.3; margin: 0 0 .5em; letter-spacing: 0; }
h1 { font-size: clamp(28px, 6vw, 44px); }
h2 { font-size: clamp(22px, 4vw, 28px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.pixel { font-family: var(--pixel); }

/* ---------- 머리 ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(22, 26, 36, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--pixel); font-weight: 700; font-size: 20px; }
.logo:hover { text-decoration: none; }
.logo img { width: 36px; height: 36px; border-radius: 8px; }
.logo small { display: block; font-size: 11px; color: var(--mint); font-weight: 400; line-height: 1; }
.logo span { line-height: 1.1; }
.nav { display: flex; gap: 0; flex-wrap: wrap; font-family: var(--pixel); }
.nav a { color: var(--text); padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.nav a:hover, .nav a.on { background: var(--panel); color: var(--mint); text-decoration: none; }
.search { margin-left: auto; }
.search input { width: 170px; max-width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; font: 15px var(--body); }
.search input:focus { outline: 2px solid var(--mint2); border-color: transparent; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); font-size: 22px; width: 44px; height: 40px; border-radius: 8px; cursor: pointer; }

@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .nav { display: none; width: 100%; order: 3; padding-bottom: 8px; }
  .nav.open { display: grid; grid-template-columns: repeat(3, 1fr); }
  .nav a { text-align: center; }
  .search { order: 4; width: 100%; margin: 0 0 10px; }
  .search input { width: 100%; }
}

main { flex: 1; padding-top: 24px; padding-bottom: 48px; outline: none; }

/* ---------- 공통 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-family: var(--pixel); font-weight: 700; }
.btn:hover { border-color: var(--mint2); text-decoration: none; }
.btn.play { background: var(--mint); color: #0f1720; border-color: var(--mint); }
.btn.play:hover { filter: brightness(1.08); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.section { margin: 36px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.tag { display: inline-block; font-family: var(--pixel); font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.mint { color: var(--mint); border-color: var(--mint2); }
.tag.pink { color: var(--pink); border-color: #8a2a5c; }
.tag.gold { color: var(--gold); border-color: #7a6430; }
.crumbs { font-family: var(--pixel); font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--pixel); color: var(--muted); font-weight: 400; font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scroll-x { overflow-x: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.tabs button { font-family: var(--pixel); background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; min-height: 40px; }
.tabs button.on { background: var(--mint); color: #0f1720; border-color: var(--mint); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; font: 15px var(--body); min-height: 40px; }

/* ---------- 첫 화면 ---------- */
.hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 380px; display: flex; align-items: flex-end; background: #0e1118 center / cover no-repeat; border: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 17, 24, .8) 0, rgba(14, 17, 24, .35) 55%, transparent 80%), linear-gradient(180deg, transparent 25%, rgba(14, 17, 24, .95) 100%); }
.hero h1, .hero p { text-shadow: 0 2px 0 #0e1118, 0 0 12px rgba(14, 17, 24, .9); }
@media (max-width: 600px) { .hero { min-height: 440px; background-position: 62% center; } .hero::after { background: linear-gradient(180deg, rgba(14, 17, 24, .15) 0, rgba(14, 17, 24, .9) 55%, rgba(14, 17, 24, .98) 100%); } }
.hero-in { position: relative; z-index: 1; padding: 24px; max-width: 640px; }
.hero h1 { margin-bottom: 6px; }
.hero h1 small { display: block; font-size: 16px; color: var(--mint); font-family: var(--pixel); }
.hero p { color: #d8e0e6; }
.hero .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.facts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }

/* ---------- 소식 ---------- */
.news-item { display: block; color: var(--text); }
.news-item:hover { text-decoration: none; border-color: var(--mint2); }
.news-item .date { font-family: var(--pixel); font-size: 13px; color: var(--muted); }
.news-item h3 { margin: 4px 0 6px; }
.news-item p { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.post-body { white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; font-size: 16px; line-height: 1.8; }

/* ---------- 직업 ---------- */
.job-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: var(--text); }
.job-card .pic { width: 100%; height: 132px; }
.job-card h3 { margin-bottom: 4px; }
.job-card:hover { text-decoration: none; border-color: var(--mint2); }
.job-card .pic, .mob-pic { flex: none; width: 96px; height: 96px; display: grid; place-items: center; background: var(--bg2); border-radius: 12px; overflow: hidden; }
.job-card .pic img, .mob-pic img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.job-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.job-head .mob-pic { width: 140px; height: 140px; }
.skill { border-left: 3px solid var(--mint2); }
.skill h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.skill p { margin: 0; color: #d3dbe2; }
.tone-pink .skill { border-left-color: var(--pink); }

/* ---------- 몬스터 ---------- */
.mob { display: flex; gap: 12px; align-items: center; color: var(--text); padding: 12px; }
.mob:hover { text-decoration: none; border-color: var(--mint2); }
.mob .mob-pic { width: 72px; height: 72px; }
.mob b { font-family: var(--pixel); font-size: 17px; font-weight: 700; display: block; }
.mob span { font-size: 14px; color: var(--muted); }
.boss-card .mob-pic { width: 100%; height: 180px; margin-bottom: 12px; }

/* ---------- 지역 ---------- */
.place { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.place:last-child { border-bottom: 0; }
.place b { font-family: var(--pixel); min-width: 9em; }
.place .mobs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }

/* ---------- 랭킹 · 조회 ---------- */
.rank td:first-child { font-family: var(--pixel); width: 3em; }
.rank tr:nth-child(1) td:first-child { color: var(--gold); }
.notice { border: 1px dashed var(--line); border-radius: 12px; padding: 16px; color: var(--muted); }
.lookup { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.lookup input { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0 14px; font: 16px var(--body); min-height: 44px; }

/* ---------- 바닥 ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; background: var(--bg2); font-size: 14px; color: #c5ced8; }
.foot-links { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------- 게시판 ---------- */
.form { display: grid; gap: 10px; }
.form input, .form textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: 16px/1.6 var(--body); }
.form textarea { resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .btn { justify-self: start; }
.err { color: var(--pink); min-height: 1.2em; margin: 0; }
.comment { margin-bottom: 10px; padding: 12px 16px; }
.comment p { margin-bottom: 4px; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; padding: 0 4px; }
.board td:first-child { min-width: 12em; }
.prob-tabs button { font-size: 14px; }
@media (max-width: 1080px) { .nav.open { grid-template-columns: repeat(4, 1fr); } .nav a { padding: 6px 4px; font-size: 14px; } }
.board-list { padding: 4px 18px; }
.board-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.board-row:last-child { border-bottom: 0; }
.board-row:hover { text-decoration: none; }
.board-row:hover b { color: var(--mint); }
.board-row b { font-weight: 600; overflow-wrap: anywhere; }
.board-row span { font-size: 14px; }
/* ---------- 말 바꾸기 ---------- */
.lang-btn { order: 5; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; min-height: 36px; padding: 0 12px; font: 700 14px var(--pixel); cursor: pointer; }
.lang-btn:hover { border-color: var(--mint2); color: var(--mint); }
@media (max-width: 1080px) {
  .lang-btn { order: 0; margin-left: auto; }
  .menu-btn { margin-left: 0; }
}
@media (max-width: 600px) {
  .top-row { gap: 8px; }
  .logo { font-size: 16px; gap: 8px; }
  .logo img { width: 30px; height: 30px; }
  .lang-btn { padding: 0 10px; min-height: 36px; }
  .menu-btn { width: 40px; height: 36px; }
}
.skill .fx p { margin: 0 0 4px; color: var(--text); }
.skill .fx + p.muted { margin-top: 8px; font-size: 14px; }
