:root {
    --gold: #c69c7c;
    --gold-deep: #b38d59;
    --ink: #1f1f1f;
    --muted: #8c919a;
    --line: #e6e8ec;
    --bg: #f4f5f7;
    --navy: #192950;
    --max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; } /* 폭 계산 실수 방어선. 원인은 각 그리드에서 minmax(0, 1fr)로 막는다 */
body {
    font-family: "Noto Sans KR", sans-serif;
    color: var(--ink);
    background: #fff;
    min-width: 320px;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; vertical-align: top; }
h1, h2, h3, p, ul, ol, dl { margin: 0; padding: 0; }
ul { list-style: none; }

.cnb {
    background: #111;
    color: #d8d8d8;
    font-size: 12px;
}
.cnb-inner {
    max-width: 1224px;
    margin: 0 auto;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
}
.cnb-games strong {
    font-family: Cinzel, serif;
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--gold);
}
.cnb-util { margin-left: auto; display: flex; gap: 16px; }
.cnb-util a:hover { color: #fff; }
.cnb-util .is-join { color: var(--gold); }
.cnb-util form { display: inline; }
.cnb-util button { padding: 0; border: 0; background: none; color: inherit; font-size: 12px; }
.cnb-util button:hover { color: #fff; }
.cnb-user b { color: #fff; font-weight: 500; }

/* 게임시작: GNB 우측, 헤더 높이 전체를 쓰는 큰 버튼 */
.gnb-start {
    flex: none;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 200px;
    margin-right: -24px;
    padding: 0 32px;
    /* 헤더 아래 1px 테두리까지 덮어 흰 줄이 보이지 않게 */
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
    background: #c29a68;
    color: #1b1408;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .04em;
    transition: background-color .15s;
}
.gnb-start:hover { background: #b38d59; }
.gnb-start i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1b1408;
    position: relative;
}
.gnb-start i::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    border-style: solid;
    border-width: 7px 0 7px 11px;
    border-color: transparent transparent transparent #c29a68;
}
.flash-status {
    max-width: var(--max);
    margin: 16px auto 0;
    padding: 12px 16px;
    background: #fbf6ee;
    border: 1px solid #ecdcc4;
    font-size: 14px;
    color: #7a5328;
}

.gnb {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}
.gnb-inner {
    max-width: 1224px;
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 28px;
}
.logo a { display: flex; align-items: center; }
.logo img { display: block; height: 48px; width: auto; }
.gnb-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    background: #fff;
    padding: 8px 12px;
}
.gnb-nav { margin-left: auto; }
.gnb-nav ul { display: flex; gap: 4px; }
.gnb-nav li { position: relative; }
.gnb-nav > ul > li > a {
    display: block;
    padding: 26px 14px;
    font-size: 15px;
    font-weight: 500;
}
.gnb-nav li.is-on > a,
.gnb-nav a:hover { color: var(--gold-deep); }
.gnb-sub {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
    padding: 8px 0;
}
.gnb-nav li:hover .gnb-sub { display: block; }
.gnb-sub a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #555;
}
.gnb-sub a:hover { background: var(--bg); color: var(--ink); }

.wrap-section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 16px;
}
.more {
    font-size: 13px;
    color: var(--muted);
}
.more:hover { color: var(--ink); }

.page-sub .sub-hero {
    height: 180px;
    background: #151515 center/cover no-repeat;
    display: flex;
    align-items: flex-end;
    color: #fff;
}
.page-sub .sub-hero .inner {
    max-width: var(--max);
    margin: 0 auto;
    width: 100%;
    padding: 24px 16px;
}
.page-sub .sub-hero h2 {
    font-size: 28px;
    font-weight: 700;
}
.crumb {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px;
    font-size: 12px;
    color: var(--muted);
}
.crumb a:hover { color: var(--ink); }
.sub-body {
    max-width: var(--max);
    margin: 0 auto 80px;
    padding: 0 16px;
}
.panel {
    background: #fff;
    border: 1px solid var(--line);
    padding: 32px;
}
.page-sub { background: var(--bg); }

.site-footer {
    background: #1f1f1f;
    color: #9a9a9a;
    padding: 40px 16px 56px;
    font-size: 12px;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 18px;
}
.footer-links a { color: #cfcfcf; }
.footer-links strong { color: #fff; }
.footer-copy { line-height: 1.7; margin-top: 6px; }

.board-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
}
.board-tabs a {
    padding: 14px 22px;
    font-weight: 500;
}
.board-tabs a.is-on {
    border-bottom: 2px solid var(--gold-deep);
    color: var(--gold-deep);
}
.board-list li { border-bottom: 1px solid var(--line); }
.board-list a {
    display: flex;
    gap: 16px;
    padding: 16px 4px;
    align-items: center;
}
.board-list em {
    font-style: normal;
    font-size: 12px;
    color: var(--gold-deep);
    min-width: 72px;
}
.board-list time { margin-left: auto; color: var(--muted); font-size: 13px; }

.article-view h3 { font-size: 22px; margin-bottom: 8px; }
.article-view time { color: var(--muted); font-size: 13px; }
.article-view .body { margin-top: 24px; line-height: 1.8; color: #444; }

.auth-box {
    max-width: 420px;
    margin: 48px auto 80px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 40px 32px;
}
.auth-box h2 {
    font-family: Cinzel, serif;
    letter-spacing: 0.2em;
    text-align: center;
    margin-bottom: 28px;
}
.auth-box label { display: block; font-size: 13px; margin: 0 0 6px; }
.auth-box input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    padding: 0 12px;
    margin-bottom: 16px;
}
.auth-box button {
    width: 100%;
    height: 48px;
    border: 0;
    background: #111;
    color: #fff;
    font-size: 15px;
    margin-top: 8px;
}
.auth-box .status {
    background: #fff8ef;
    border: 1px solid var(--gold);
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}
.auth-box .help {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}

.rank-table, .spec-table {
    width: 100%;
    border-collapse: collapse;
}
.rank-table th, .rank-table td,
.spec-table th, .spec-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 8px;
    text-align: left;
    font-size: 14px;
}
.rank-table th { background: var(--bg); font-weight: 500; }
.rank-table td:first-child { color: var(--gold-deep); font-weight: 700; }

.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.shop-grid a {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
}
.shop-grid .thumb {
    height: 180px;
    background: #111 center/cover no-repeat;
}
.shop-grid strong, .shop-grid em { display: block; padding: 0 12px; }
.shop-grid strong { padding-top: 12px; }
.shop-grid em {
    font-style: normal;
    color: var(--gold-deep);
    padding-bottom: 16px;
}

.guide-grid, .world-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.guide-grid article, .world-grid article {
    background: #fff;
    border: 1px solid var(--line);
    padding: 20px;
}
.guide-grid h3, .world-grid h3 { margin-bottom: 8px; }
.guide-grid p, .world-grid p { color: #555; line-height: 1.7; font-size: 14px; }

@media (max-width: 960px) {
    /* 메뉴 버튼과 게임시작 버튼 높이를 44px 로 통일 */
    .gnb-toggle { display: flex; align-items: center; height: 44px; padding: 0 14px; font-size: 14px; }
    .gnb-start { order: 2; min-width: 0; margin-right: 0; margin-bottom: 0; padding: 0 18px; font-size: 15px; align-self: center; height: 44px; }
    .gnb-start i { width: 24px; height: 24px; }
    .gnb-start i::before { left: 9px; top: 6px; border-width: 6px 0 6px 9px; }
    .gnb-nav {
        display: none;
        position: absolute;
        left: 0; right: 0; top: 72px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        margin: 0;
        /* 헤더가 sticky 라 메뉴가 화면보다 길면 메뉴 안에서 스크롤 */
        max-height: calc(100vh - 72px);
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 12px 24px rgba(0,0,0,.12);
    }
    .gnb.is-open .gnb-nav { display: block; }
    html.is-menu-open, html.is-menu-open body { overflow: hidden; }
    .gnb-nav ul { flex-direction: column; }
    .gnb-nav > ul > li > a { padding: 14px 24px; }
    .gnb-sub { position: static; display: block; border: 0; box-shadow: none; padding: 0 24px 12px; }
    .shop-grid, .guide-grid, .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .shop-grid, .guide-grid, .world-grid { grid-template-columns: minmax(0, 1fr); }
    .cnb-games { display: none; }
}

/* ---------- board ---------- */
.board-tabs { overflow-x: auto; white-space: nowrap; }
.board-desc { color: #666; font-size: 14px; line-height: 1.7; margin: 20px 0 0; }
.board-desc code, .doc-content code, .guide-cards code, .guide-steps code, .spec-table code, .cmd-list p code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .92em;
    background: #f6f1ea;
    color: #7a5328;
    padding: 1px 6px;
    border-radius: 3px;
}
.board-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 8px;
}
.board-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.board-cats a {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    font-size: 13px;
    color: #555;
}
.board-cats a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.board-search, .faq-search { display: flex; margin-left: auto; }
.board-search input, .faq-search input {
    width: 220px;
    height: 36px;
    border: 1px solid var(--line);
    border-right: 0;
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
}
.board-search button, .faq-search button {
    height: 36px;
    padding: 0 16px;
    border: 0;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
}
.board-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .author, .board-list .hit { font-style: normal; font-size: 13px; color: var(--muted); }
.board-list .author { width: 90px; text-align: center; }
.board-list .hit { width: 48px; text-align: right; }
.board-list .hit::before { content: "조회 "; font-size: 11px; }
.board-list time { margin-left: 0; width: 84px; text-align: right; }
.board-list a:hover span { text-decoration: underline; }
.board-list .is-notice { background: #fbf8f4; }
.board-list .is-notice em { font-weight: 700; }
.board-list .is-empty, .faq-list .is-empty, .notice-list .is-empty {
    padding: 48px 0;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
.clan-tag { font-weight: 500; color: var(--navy); margin-right: 4px; }

.clan-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0 4px;
    margin-top: 12px;
    border-top: 1px dashed var(--line);
}
.clan-strip a {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg);
    font-size: 13px;
}
.clan-strip a.is-on { background: var(--navy); color: #fff; }
.clan-strip em { font-style: normal; font-size: 11px; color: var(--gold-deep); }
.clan-strip small { font-size: 11px; opacity: .6; }

.pager { display: flex; justify-content: center; gap: 4px; margin-top: 28px; }
.pager a, .pager strong, .pager span {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 1px solid var(--line);
}
.pager strong { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .is-disabled { color: #c5c8cd; }

.article-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.article-flag { font-style: normal; font-size: 13px; color: var(--gold-deep); font-weight: 700; }
.article-view h3 { margin: 6px 0 10px; line-height: 1.4; }
.article-meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; }
.article-nav { margin-top: 40px; border-top: 1px solid var(--ink); }
.article-nav li { display: flex; gap: 20px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.article-nav b { width: 56px; flex: none; font-weight: 500; }
.article-nav span { color: var(--muted); }
.article-nav a:hover { text-decoration: underline; }
.article-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.btn-line { padding: 10px 28px; border: 1px solid var(--ink); font-size: 14px; }
.btn-line:hover { background: var(--ink); color: #fff; }

.doc-content { line-height: 1.8; color: #444; font-size: 15px; }
.doc-content > * + * { margin-top: 12px; }
.doc-content h4 { font-size: 16px; color: var(--ink); margin-top: 28px; }
.doc-content ul, .doc-content ol { padding-left: 20px; }
.doc-content ul { list-style: disc; }
.doc-content a { color: var(--gold-deep); text-decoration: underline; }
.doc-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-content th, .doc-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.doc-content th { background: var(--bg); font-weight: 500; }
.doc-content { overflow-wrap: anywhere; }
/* 관리자 에디터(TinyMCE) 본문: width/height 속성이 박혀 와도 비율 유지, 넓은 표는 가로 스크롤 */
.doc-content img { display: block; max-width: 100%; height: auto; margin: 16px auto; }
.doc-content img[style*="float: left"], .doc-content img[style*="float:left"] { display: inline; margin: 4px 16px 8px 0; }
.doc-content img[style*="float: right"], .doc-content img[style*="float:right"] { display: inline; margin: 4px 0 8px 16px; }
.doc-content table { display: block; max-width: 100%; overflow-x: auto; }
.doc-content iframe, .doc-content video { max-width: 100%; }
.doc-content blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--bg); }
.doc-content hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.doc-content::after { content: ""; display: block; clear: both; }

/* ---------- faq ---------- */
.faq-search { margin: 28px auto 20px; max-width: 560px; }
.faq-search input { flex: 1; width: auto; height: 46px; font-size: 15px; }
.faq-search button { height: 46px; padding: 0 24px; }
.faq-list { margin-top: 20px; border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 8px;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    margin-left: auto;
    flex: none;
    width: 8px;
    height: 8px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(45deg);
    transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary em { font-style: normal; font-size: 12px; color: var(--muted); width: 84px; flex: none; }
.faq-item summary strong { font-weight: 500; font-size: 15px; }
.faq-q, .faq-a-mark {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Cinzel, serif;
    font-weight: 700;
    font-size: 14px;
}
.faq-q { background: var(--ink); color: #fff; }
.faq-a { display: flex; gap: 14px; padding: 20px 8px 24px; background: #fafafa; }
.faq-a-mark { background: var(--gold); color: #fff; }
.faq-a .doc-content { font-size: 14px; padding-top: 2px; }

/* ---------- ranking ---------- */
.rank-head { display: flex; align-items: flex-start; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.rank-head .board-desc { margin: 0; flex: 1; min-width: 260px; }
.notice-box { margin: 0 0 20px; padding: 14px 18px; background: var(--bg); font-size: 14px; color: #555; }
.notice-box.is-error { background: #fdf0ef; color: #b3261e; }
.rank-me {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 20px;
    padding: 18px 22px;
    background: var(--navy);
    color: #fff;
}
.rank-me strong { font-size: 18px; }
.rank-me span { opacity: .75; font-size: 14px; }
.rank-me dl { display: flex; gap: 24px; margin-left: auto; }
.rank-me dt { font-size: 12px; opacity: .65; }
.rank-me dd { margin: 0; font-size: 18px; font-weight: 700; color: var(--gold); }
.rank-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.rank-podium article {
    position: relative;
    padding: 22px 20px 18px;
    background: linear-gradient(160deg, #262626, #111);
    color: #fff;
    overflow: hidden;
}
.rank-podium b {
    position: absolute;
    right: 14px;
    top: 4px;
    font-family: Cinzel, serif;
    font-size: 56px;
    line-height: 1;
    opacity: .18;
}
.rank-podium .podium-1 { background: linear-gradient(160deg, #6b5230, #1b1408); }
.rank-podium .podium-1 b { color: var(--gold); opacity: .45; }
.rank-podium strong { display: block; font-size: 18px; margin-bottom: 4px; }
.rank-podium span { font-size: 13px; opacity: .8; }
.rank-podium em { display: block; margin-top: 12px; font-style: normal; font-size: 12px; color: var(--gold); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.rank-table td.num { font-variant-numeric: tabular-nums; }
.rank-table td.name { font-weight: 500; }
.rank-table tr.is-me td { background: #fbf6ee; }
.rank-table .is-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.dot-online { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #3bb54a; vertical-align: middle; }

/* ---------- guide ---------- */
.guide-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.guide-side { background: #fff; border: 1px solid var(--line); position: sticky; top: 16px; }
.guide-side strong { display: block; padding: 18px 20px; background: var(--ink); color: #fff; font-size: 15px; }
.guide-side a { display: block; padding: 12px 20px; font-size: 14px; border-bottom: 1px solid var(--line); color: #555; }
.guide-side a.is-on { color: var(--gold-deep); font-weight: 700; background: #fbf8f4; }
.guide-side a:hover { color: var(--ink); }
.guide-main { background: #fff; border: 1px solid var(--line); padding: 36px 40px 48px; min-width: 0; }
.guide-lead { font-size: 16px; color: #555; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.guide-section { margin-top: 40px; }
.guide-section > h3 {
    font-size: 20px;
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 3px solid var(--gold-deep);
}
.guide-section > * + * { margin-top: 16px; }
.guide-figure { margin: 0; }
.guide-figure img { width: 100%; max-height: 360px; object-fit: cover; display: block; border: 1px solid var(--line); }
.guide-figure figcaption { font-size: 13px; color: var(--muted); padding-top: 8px; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.guide-cards article { padding: 20px; background: var(--bg); }
.guide-cards h4 { font-size: 15px; margin-bottom: 8px; }
.guide-cards p { font-size: 14px; color: #555; line-height: 1.7; }
.guide-steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 10px; }
.guide-steps li { counter-increment: step; display: flex; gap: 14px; align-items: baseline; padding: 14px 16px; border: 1px solid var(--line); }
.guide-steps li::before {
    content: counter(step, decimal-leading-zero);
    font-family: Cinzel, serif;
    font-weight: 700;
    color: var(--gold-deep);
    flex: none;
}
.guide-steps b { flex: none; width: 110px; }
.guide-steps p { font-size: 14px; color: #555; line-height: 1.7; }
.spec-table th { background: var(--bg); font-weight: 500; }
.guide-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-chips li { padding: 8px 16px; background: var(--navy); color: #fff; font-size: 13px; }

.class-list { display: grid; gap: 14px; }
.class-card { display: grid; grid-template-columns: 150px 1fr; border: 1px solid var(--line); overflow: hidden; }
.class-emblem {
    --c1: #3a3a3a; --c2: #111;
    background: radial-gradient(circle at 50% 35%, var(--c1), var(--c2));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}
.class-emblem span {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,.55);
    transform: rotate(45deg);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}
.class-emblem b { transform: rotate(-45deg); }
.class-prince .class-emblem { --c1: #9a7440; --c2: #2a1d0b; }
.class-knight .class-emblem { --c1: #6c6f78; --c2: #17191d; }
.class-elf .class-emblem { --c1: #4d8a5a; --c2: #0f2414; }
.class-wizard .class-emblem { --c1: #4a5fa8; --c2: #0e1430; }
.class-darkelf .class-emblem { --c1: #6d3f86; --c2: #1a0c22; }
.class-body { padding: 20px 24px; }
.class-en { font-family: Cinzel, serif; font-size: 12px; letter-spacing: .24em; color: var(--gold-deep); }
.class-body h4 { font-size: 20px; margin: 4px 0 8px; }
.class-body h4 small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.class-body > p { font-size: 14px; color: #555; line-height: 1.7; }
.class-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 16px; margin-top: 14px; }
.class-stat dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.class-stat dd { margin: 0; height: 6px; background: var(--bg); }
.class-stat i { display: block; height: 100%; background: var(--gold-deep); }

.cmd-list { border-top: 1px solid var(--ink); }
.cmd-list li { display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.cmd-list > li > code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}
.cmd-list p { font-size: 14px; color: #555; }
.btn-copy {
    padding: 6px 14px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 12px;
    color: #555;
    transition: all .15s;
}
.btn-copy:hover { border-color: var(--ink); color: var(--ink); }
.btn-copy.is-done { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 20px);
    padding: 12px 20px;
    background: rgba(20,20,20,.92);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: all .2s;
    z-index: 100;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 1:1 문의 (ticket) ---------- */
.btn-solid {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
}
.btn-solid:hover { background: #000; }
.board-toolbar .btn-solid { margin-left: auto; }
.article-actions { gap: 8px; }
.article-actions button.btn-line { background: #fff; font: inherit; font-size: 14px; }
.article-actions button.btn-line:hover { background: var(--ink); color: #fff; }
.reply-count { margin-left: 6px; color: var(--gold-deep); font-weight: 500; font-size: 13px; }
.ticket-status {
    flex: none;
    width: 72px;
    padding: 4px 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--line);
    color: var(--muted);
}
.ticket-status.is-open { border-color: #e1c9a7; color: var(--gold-deep); }
.ticket-status.is-answered { border-color: var(--navy); background: var(--navy); color: #fff; }
.article-meta .ticket-status { width: auto; padding: 0 8px; }

.ticket-form { max-width: 760px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.form-row label { font-size: 14px; font-weight: 500; padding-top: 10px; }
.form-static { padding-top: 10px; font-size: 14px; color: #555; }
.form-row input, .form-row select, .form-row textarea, .reply-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    background: #fff;
}
.form-row select { max-width: 240px; height: 42px; }
.form-row textarea, .reply-form textarea { resize: vertical; line-height: 1.7; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus, .reply-form textarea:focus { outline: 0; border-color: var(--gold-deep); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.ticket-body { padding: 24px 0 32px; }
.ticket-thread { border-top: 1px solid var(--ink); padding-top: 20px; }
.ticket-thread > h4 { font-size: 15px; margin-bottom: 12px; }
.ticket-thread > h4 b { color: var(--gold-deep); }
.reply { position: relative; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.reply.depth-2 { margin-left: 28px; }
.reply.depth-3 { margin-left: 56px; }
.reply.depth-4 { margin-left: 84px; }
.reply.depth-2::before, .reply.depth-3::before, .reply.depth-4::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-left: 1px solid #c5c8cd;
    border-bottom: 1px solid #c5c8cd;
}
.reply.is-staff { background: #fbf8f4; }
.reply-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.reply-head time { margin-left: auto; font-size: 12px; color: var(--muted); }
.badge-staff { padding: 1px 6px; background: var(--gold-deep); color: #fff; font-size: 11px; font-weight: 700; }
.reply-body { margin-top: 8px; font-size: 14px; line-height: 1.75; color: #444; word-break: break-word; }
.reply-toggle { margin-top: 8px; padding: 0; border: 0; background: none; font-size: 12px; color: var(--muted); }
.reply-toggle:hover { color: var(--ink); text-decoration: underline; }
.reply-empty { padding: 32px 0; text-align: center; color: var(--muted); font-size: 14px; }
.reply-form { margin-top: 24px; }
.reply .reply-form { margin-top: 12px; }
.reply-target { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; color: var(--gold-deep); }
.reply-target span { font-weight: 700; }
.reply-target button { margin-left: 4px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; }

/* ---------- 게임정보 (도감 · 보스 · 공성) ---------- */
.muted { color: var(--muted); font-weight: 400; font-size: 12px; }
.tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
    border: 1px solid var(--line);
    color: #666;
    white-space: nowrap;
}
.tags .tag:first-child { margin-left: 0; }
.tag-boss { border-color: var(--gold-deep); background: var(--gold-deep); color: #fff; }
.tag-agro { border-color: #d9a6a0; color: #b3261e; }
.tag-weak { border-color: #b9c4dc; color: var(--navy); }

.dex-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.dex-filter input[type=search] { flex: 1; min-width: 180px; height: 38px; border: 1px solid var(--line); padding: 0 12px; font: inherit; font-size: 14px; }
.dex-filter input[type=number] { width: 64px; height: 38px; border: 1px solid var(--line); padding: 0 8px; font: inherit; font-size: 14px; }
.dex-filter label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #555; }
.dex-filter button { height: 38px; padding: 0 20px; border: 0; background: var(--ink); color: #fff; font-size: 13px; }
.dex-count { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.dex-count b { color: var(--ink); }
.dex-table td.name a:hover { color: var(--gold-deep); text-decoration: underline; }
.dex-table td { white-space: nowrap; }
.class-mini { font-size: 12px; color: #666; }

.dex-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.dex-head h3 { font-size: 26px; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 24px; background: var(--line); border: 1px solid var(--line); }
.stat-grid > div { background: #fff; padding: 14px 16px; }
.stat-grid dt { font-size: 12px; color: var(--muted); }
.stat-grid dd { margin: 4px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-grid.is-small dd { font-size: 15px; }
.drop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.drop-list li { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--bg); font-size: 14px; }
.drop-list a:hover { color: var(--gold-deep); text-decoration: underline; }
.drop-list em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.drop-chance { flex: none; min-width: 58px; text-align: right; font-size: 12px; font-weight: 700; color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.drop-note { margin-top: 10px; font-size: 12px; color: var(--muted); }
.class-use { display: flex; flex-wrap: wrap; gap: 6px; }
.class-use li { padding: 8px 16px; border: 1px solid var(--line); font-size: 13px; color: #bbb; text-decoration: line-through; }
.class-use li.is-on { border-color: var(--navy); background: var(--navy); color: #fff; text-decoration: none; }
.doc-content .btn-copy { margin-left: 6px; vertical-align: middle; }

.boss-next { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 10px; margin: 20px 0; align-items: stretch; }
.boss-next > span { display: flex; align-items: center; padding: 0 16px; background: var(--ink); color: var(--gold); font-family: Cinzel, serif; font-weight: 700; }
.boss-next article { padding: 14px 16px; background: linear-gradient(160deg, #262626, #111); color: #fff; }
.boss-next article:first-of-type { background: linear-gradient(160deg, #6b5230, #1b1408); }
.boss-next em { display: block; font-style: normal; font-size: 22px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.boss-next strong { display: block; margin-top: 4px; font-size: 15px; }
.boss-next small { font-size: 12px; opacity: .7; }
.boss-table td { vertical-align: top; }
.boss-table td:first-child b { display: block; font-size: 16px; }
.boss-table td:first-child small { white-space: nowrap; }
.boss-times { display: flex; flex-wrap: wrap; gap: 4px; }
.boss-times span { padding: 2px 8px; background: var(--bg); font-size: 12px; font-variant-numeric: tabular-nums; }
.boss-times span.is-next { background: var(--gold-deep); color: #fff; font-weight: 700; }

.castle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.castle-card { border: 1px solid var(--line); background: #fff; }
.castle-card header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--bg); }
.castle-card.is-owned header { background: var(--navy); color: #fff; }
.castle-no { font-family: Cinzel, serif; font-weight: 700; color: var(--gold-deep); }
.castle-card h4 { font-size: 16px; }
.castle-card dl { padding: 8px 16px 14px; }
.castle-card dl > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.castle-card dl > div:last-child { border-bottom: 0; }
.castle-card dt { color: var(--muted); }
.castle-card dd { margin: 0; font-weight: 500; text-align: right; }

.hunting-table td { vertical-align: middle; }
.lv-bar { position: relative; display: inline-block; width: 120px; height: 6px; margin-right: 10px; background: var(--bg); vertical-align: middle; }
.lv-bar i { position: absolute; top: 0; bottom: 0; background: var(--gold-deep); }

@media (max-width: 960px) {
    /* 표는 글자 단위로 찌그러뜨리지 않고 가로 스크롤 */
    .table-scroll > table th, .table-scroll > table td { white-space: nowrap; }
    .table-scroll .boss-times { flex-wrap: nowrap; }
    .table-scroll > table { width: max-content; min-width: 100%; }
    .doc-content table th, .doc-content table td { white-space: nowrap; }
    .guide-layout { grid-template-columns: minmax(0, 1fr); }
    .guide-side { position: static; }
    .guide-side ul { display: flex; overflow-x: auto; }
    .guide-side li { flex: none; }
    .guide-side a { border-bottom: 0; }
    .guide-side strong { display: none; }
    .castle-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .panel { padding: 20px 16px; }
    .gnb-inner { padding: 0 16px; gap: 12px; }
    .logo img { height: 38px; }
    .cnb-inner { padding: 0 16px; }
    .guide-main { padding: 24px 16px 32px; }
    .board-search { margin-left: 0; width: 100%; }
    .board-search input { flex: 1; width: auto; }
    .board-list a { flex-wrap: wrap; gap: 4px 12px; }
    .board-list span { flex-basis: 100%; order: -1; white-space: normal; }
    .board-list .author { width: auto; text-align: left; }
    .board-list time { margin-left: auto; }
    .rank-podium { grid-template-columns: minmax(0, 1fr); }
    .rank-me dl { margin-left: 0; }
    .class-card { grid-template-columns: minmax(0, 1fr); }
    .class-emblem { min-height: 110px; }
    .class-stat { grid-template-columns: repeat(2, 1fr); }
    .cmd-list li { grid-template-columns: 1fr auto; }
    .cmd-list p { grid-column: 1 / -1; grid-row: 2; }
    .guide-steps li { flex-wrap: wrap; }
    .guide-steps b { width: auto; }
    .faq-item summary em { display: none; }
    .form-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .castle-grid { grid-template-columns: minmax(0, 1fr); }
    .boss-next { grid-template-columns: minmax(0, 1fr); }
    .boss-next > span { padding: 10px 16px; }
    .dex-head { flex-direction: column; align-items: flex-start; }
    .lv-bar { display: none; }
    .form-row label { padding-top: 0; }
    .reply.depth-2 { margin-left: 14px; }
    .reply.depth-3 { margin-left: 28px; }
    .reply.depth-4 { margin-left: 42px; }
    .ticket-list .ticket-status { width: auto; padding: 2px 8px; }
}
.clan-link { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.clan-link:hover { color: var(--gold-deep); }
.clan-actions { display: flex; gap: 8px; }
