/* 천년 홈페이지 — 2000년대 무협 MMO 포털 풍 (가운데 고정 폭, 금테 상자, 굴림 게시판). 그림은 모두 직접 그린 SVG/CSS. */
:root {
  --bg: #17110d; --panel: #201812; --panel2: #2a1f17; --line: #6e5530; --line2: #3d2e1d;
  --gold: #e0c27a; --gold2: #b8964f; --text: #d8ccb4; --muted: #9a8c74; --red: #9e2a20; --red2: #c8402f;
  --han: Gungsuh, "궁서", GungsuhChe, Batang, "바탕", serif;
  --soft: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
  --ko: Gulim, "굴림", Dotum, "돋움", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 12px/1.65 var(--ko);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 0, rgba(120, 70, 30, .35), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 8px);
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: #fff1c8; text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip { position: fixed; left: 8px; top: -60px; background: #fff; color: #000; padding: 8px; z-index: 10; }
.skip:focus-visible { top: 8px; }
.wrap { width: 980px; max-width: 100%; margin: 0 auto; }
.link { border: 0; background: none; color: var(--gold); padding: 0; cursor: pointer; }
.link:hover { color: #fff1c8; text-decoration: underline; }
.subtle { color: var(--muted); }

/* 맨 위 안내줄 · 상단 링크 */
.mode-bar { background: #3a120e; color: #f0d9a8; text-align: center; padding: 4px 10px; font-size: 11px; border-bottom: 1px solid #5c2018; }
.topbar { background: #0c0907; border-bottom: 1px solid var(--line2); }
.topbar { font-family: var(--soft); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; gap: 10px; flex-wrap: wrap; }
.topbar-left { color: var(--muted); font-family: var(--soft); letter-spacing: .5px; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.topbar-right > * + *::before { content: ""; }
#top-user { color: var(--gold); }

/* 배너: 클라 로그인 화면 그림(UI/login/login1000.bmp 위쪽)을 잘라 씀 */
.masthead { background: #0b0907; position: relative; overflow: hidden; }
/* 980px 밖 양옆: 같은 그림을 작게 줄인 것(banner_bg.jpg)을 흐리게 깔아 화면 끝까지 채운다 */
.masthead::before { content: ""; position: absolute; inset: -30px; background: url("/img/banner_bg.jpg") center / cover no-repeat; filter: blur(18px) brightness(.45); }
.masthead-inner { position: relative; height: 374px; overflow: hidden; }
.banner-img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  filter: contrast(1.08) saturate(1.1);
}
.masthead-inner::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 55%, rgba(11, 9, 7, .85)); }
.banner-home { position: absolute; inset: 0; z-index: 1; }
.masthead-copy {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; margin: 0; white-space: nowrap;
  font-family: var(--soft); font-size: 17px; font-weight: 300; letter-spacing: .5px; color: #f4e6c4; text-shadow: 0 1px 8px rgba(0, 0, 0, .85);
}

/* 바로가기 줄 (사설 서버 홈페이지에서 흔한 큰 버튼 줄) */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 0 0; }
.quick-item {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 62px; padding: 0 8px;
  border: 1px solid #7a5d31; color: #f0dcae; font: 600 15px var(--soft); letter-spacing: .5px; cursor: pointer; text-decoration: none;
  background: linear-gradient(#3a2a1b, #1d150e); box-shadow: inset 0 0 0 1px #000, inset 0 1px 0 rgba(255, 220, 160, .15);
}
.quick-item:hover { color: #fff; text-decoration: none; border-color: var(--gold); background: linear-gradient(#5a2a1a, #2a120b); }
.q-han { font-family: var(--han); font-size: 24px; color: var(--gold); letter-spacing: 2px; text-shadow: 1px 1px 0 #000; }
.quick-start { border-color: #e0b860; background: radial-gradient(ellipse at 50% 30%, #c84a2a, #7d1c13 70%); }
.quick-start .q-han { color: #fff0c8; }
.quick-start:hover { filter: brightness(1.15); background: radial-gradient(ellipse at 50% 30%, #c84a2a, #7d1c13 70%); }

/* 주 메뉴 */
.gnb { background: linear-gradient(#3b2a1b, #1c140d); border-top: 1px solid #8b6c3a; border-bottom: 2px solid #8b6c3a; }
.gnb .wrap { display: flex; }
.gnb a { flex: 1; text-align: center; padding: 10px 4px; color: #f0dcae; font-family: var(--soft); font-size: 14px; font-weight: 600; letter-spacing: .5px; border-right: 1px solid #4a3622; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.gnb a:first-child { border-left: 1px solid #4a3622; }
.gnb a:hover { background: linear-gradient(#6b2a1c, #3b150e); color: #fff; text-decoration: none; }

/* 본문 2단 */
.layout { display: flex; gap: 10px; padding: 10px 0 20px; align-items: flex-start; }
.side { width: 230px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* 상자 */
.box { background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 0 0 1px #000, 0 2px 6px rgba(0, 0, 0, .5); }
.box-title {
  margin: 0; padding: 6px 10px; font-size: 13px; color: var(--gold); letter-spacing: 1px;
  background: linear-gradient(#3e2c1c, #241a11); border-bottom: 1px solid var(--line);
  display: flex; justify-content: flex-start; align-items: baseline; gap: 0;
}
.box-title::before { content: "◆"; color: var(--red2); font-size: 10px; margin-right: 6px; }
.box-more { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: normal; letter-spacing: 0; }
.box-body { padding: 10px; }
.box-body p { margin: 0 0 6px; }
.box-body p:last-child { margin-bottom: 0; }

/* 게임 시작 버튼 */
.game-start {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 92px;
  border: 2px solid #e0b860; border-radius: 4px; color: #fff3cf; cursor: pointer;
  background: radial-gradient(ellipse at 50% 30%, #d4552f, #8e1f15 60%, #4d0f0a);
  box-shadow: inset 0 0 0 2px #5a140d, inset 0 8px 16px rgba(255, 210, 140, .25), 0 0 14px rgba(220, 120, 40, .35);
  text-shadow: 1px 2px 0 #3a0905;
}
.game-start:hover { filter: brightness(1.15); box-shadow: inset 0 0 0 2px #5a140d, inset 0 8px 16px rgba(255, 210, 140, .3), 0 0 22px rgba(255, 160, 60, .6); }
.game-start:active { transform: translateY(1px); }
.gs-han { font-family: var(--han); font-size: 30px; letter-spacing: 6px; line-height: 1.1; font-weight: bold; }
.gs-kor { font-size: 13px; letter-spacing: 4px; color: #f8dca0; }
.side-message { margin: -4px 0 0; color: #f0c98a; min-height: 0; }
.side-message:empty { display: none; }

/* 로그인 */
.login-grid { display: grid; grid-template-columns: 52px 1fr; gap: 5px 6px; align-items: center; }
.login-grid label { color: var(--muted); }
input[type="text"], input:not([type]), input[type="password"] {
  width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid #5d4729; background: #0f0b08; color: #f3e6c8;
}
input:focus { border-color: var(--gold); outline: none; }
.btn-login {
  width: 100%; margin-top: 8px; padding: 6px; border: 1px solid #c9a35a; color: #2a1608; font-weight: bold;
  background: linear-gradient(#f2d48b, #b98c3f); box-shadow: inset 0 1px 0 #fff2c4;
}
.btn-login:hover { background: linear-gradient(#ffe3a0, #c99b4c); }
.login-links { margin-top: 8px; display: flex; gap: 6px; justify-content: center; color: var(--muted); }
.member strong { color: var(--gold); font-size: 13px; }
.btn-small { padding: 3px 10px; border: 1px solid #6e5530; background: #2b2016; color: var(--text); }
.btn-small:hover { border-color: var(--gold); color: var(--gold); }
.form-message { margin: 6px 0 0; color: #f0b07a; }
.form-message:empty { display: none; }
/* 쿠폰 등록 */
.coupon-history { list-style: none; margin: 6px 0 0; padding: 0; font-size: 11px; }
.coupon-history:empty { display: none; }
.coupon-history li { padding: 3px 0; border-top: 1px dotted #4a3a24; color: var(--muted); overflow-wrap: anywhere; }
.coupon-history .ok { color: #9fd38a; }
.coupon-history .fail { color: #f0b07a; }
.coupon-history .pending { color: #e8d49a; }

/* 다운로드 · 서버 상태 */
.btn-download {
  display: block; text-align: center; padding: 8px; margin-bottom: 8px; border: 1px solid #4c6b3a; color: #cfe6b0; font-weight: bold;
  background: linear-gradient(#36502a, #1d2c16); opacity: .75;
}
.btn-download small { display: block; font-weight: normal; color: #9fb886; }
.btn-download-ready { opacity: 1; text-decoration: none; }
.btn-download-ready:hover { background: linear-gradient(#456635, #26391c); }
.download-list { margin: 4px 0 8px; padding-left: 18px; }
.download-list li { margin: 2px 0; word-break: break-all; }
.server-row { display: flex; justify-content: space-between; align-items: center; }
.server-state { padding: 1px 8px; border: 1px solid #555; color: #aaa; }
.server-state::before { content: "●"; margin-right: 4px; }
.server-state[data-state="online"] { color: #8fe07a; border-color: #3f6a35; }
.server-state[data-state="offline"] { color: #f08a6a; border-color: #6a3326; }

/* 큰 배너: 천년3 리마스터 그림(UI/login/choose.jpg 오른쪽 아래) */
.visual {
  display: flex; align-items: center; gap: 0; min-height: 230px; padding: 0 0 0 24px; border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(90deg, #15130f 0%, #1d1c1a 60%, #262624 100%);
  box-shadow: inset 0 0 0 1px #000;
}
.visual-text { flex: 1; min-width: 0; }
.visual-tag { display: inline-block; margin: 0 0 6px; padding: 1px 8px; background: var(--red); color: #fde5c0; font-size: 11px; }
.visual h1 { margin: 0 0 8px; font-family: var(--han); font-size: 30px; color: #f3d891; font-weight: bold; text-shadow: 2px 2px 0 #000; letter-spacing: 2px; }
.visual p { margin: 0 0 12px; font-size: 13px; color: #e2d3b2; }
.visual-art { width: 300px; height: auto; flex: none; align-self: stretch; object-fit: cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
.btn-red {
  display: inline-block; padding: 6px 16px; border: 1px solid #e0a45c; color: #fff0d4; font-weight: bold;
  background: linear-gradient(#c3402c, #7d1c13); box-shadow: inset 0 1px 0 rgba(255, 220, 170, .4); text-shadow: 1px 1px 0 #3a0905;
}
.btn-red:hover { filter: brightness(1.15); color: #fff; text-decoration: none; }
.btn-red.wide { width: 100%; margin-top: 8px; }

/* 공지 게시판 */
.board-tabs { display: flex; border-bottom: 1px solid var(--line); background: #1a130e; }
.board-tabs button { flex: none; padding: 6px 16px; border: 0; border-right: 1px solid var(--line2); background: none; color: var(--muted); cursor: pointer; }
.board-tabs button[aria-selected="true"] { color: var(--gold); background: #2e2218; box-shadow: inset 0 -2px 0 var(--red2); }
.board-tabs button:hover { color: #fff1c8; }
.board-body { padding: 0; }
.board details { border-bottom: 1px dotted #4a3826; }
.board details:last-child { border-bottom: 0; }
.board summary { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; list-style: none; }
.board summary::-webkit-details-marker { display: none; }
.board summary:hover { background: #2b2017; }
.board details[open] summary { background: #2e2218; color: var(--gold); }
.board details p { margin: 0; padding: 8px 12px 10px 60px; color: #cbbd9f; background: #1a130e; }
.tag { flex: none; width: 58px; white-space: nowrap; text-align: center; font-size: 11px; padding: 0 2px; border: 1px solid; }
.tag.notice { color: #ffb08a; border-color: #8a3a26; background: #3a150e; }
.tag.update { color: #a9d8ff; border-color: #2f5574; background: #102131; }
.tag.test { color: #cfe6b0; border-color: #4c6b3a; background: #18240f; }
.board-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-date { flex: none; color: var(--muted); font-size: 11px; }

/* 게임 소개 */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.features article { border: 1px solid var(--line2); background: var(--panel2); padding: 10px; text-align: center; }
.feature-han { display: block; font-family: var(--han); font-size: 40px; line-height: 1.1; color: var(--red2); text-shadow: 1px 1px 0 #000; }
.features h3 { margin: 4px 0; font-size: 13px; color: var(--gold); }
.features p { margin: 0; color: #c4b698; }

/* 가입 */
.join { max-width: 520px; }
.form-intro { color: var(--muted); }
.join label { color: var(--muted); }
.inline { display: flex; gap: 6px; margin-top: 4px; }
.inline input { flex: 1; }
.verified { margin-bottom: 8px; padding: 5px 8px; border: 1px solid #4c6b3a; background: #18240f; color: #cfe6b0; }
.form-grid { display: grid; grid-template-columns: 90px 1fr; gap: 6px 8px; align-items: start; }
.form-grid label { padding-top: 4px; }
.field-hint { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.agreement { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; }
.success-mark { font-family: var(--han); font-size: 34px; color: var(--red2); margin: 0 0 4px; }
.small-title { margin: 0 0 6px; font-size: 13px; color: var(--gold); }

/* 바닥 */
.footer { border-top: 2px solid #8b6c3a; background: #0c0907; color: var(--muted); padding: 14px 10px 22px; text-align: center; font-size: 11px; }
.footer p { margin: 0 0 4px; }
.footer-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; color: #bba980; }

/* 좁은 화면: 한 줄로 쌓는다 */
@media (max-width: 1000px) {
  .layout { flex-direction: column; padding: 10px; }
  .side { width: 100%; }
  .masthead-inner { height: auto; aspect-ratio: 980 / 374; }
  .quick { padding: 10px 10px 0; }
  .masthead-copy { display: none; }
}
@media (max-width: 640px) {
  .gnb .wrap { flex-wrap: wrap; }
  .quick { grid-template-columns: repeat(2, 1fr); }
  .quick-item { flex-direction: column; gap: 0; height: 54px; font-size: 13px; text-align: center; }
  .q-han { font-size: 18px; white-space: nowrap; }
  .masthead-copy { display: none; }
  .gnb a { flex: 1 0 33%; border-bottom: 1px solid #4a3622; }
  .visual { flex-direction: column; align-items: flex-start; }
  .visual { padding: 18px; }
  .visual-art { width: 220px; align-self: center; -webkit-mask-image: none; mask-image: none; }
  .features { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .board details p { padding-left: 12px; }
  .board-date { display: none; }
}
@media (max-width: 360px) {
  .topbar-left { display: none; }
  .board-tabs button { padding: 6px 10px; }
}

/* ── 게시판 (2026-11-04) ── */
.gnb a { font-size: 13px; }
.gnb a.on { background: linear-gradient(#6b2a1c, #3b150e); color: #fff; }
.tag.free { color: #f0dcae; border-color: #6e5530; background: #2a1f17; }
.tag.guide { color: #a9d8ff; border-color: #2f5574; background: #102131; }
.tag.qna { color: #cfe6b0; border-color: #4c6b3a; background: #18240f; }
.tag.report { color: #e7b6ff; border-color: #5e3a74; background: #1f1029; }
a.box-more { color: var(--muted); }
a.box-more:hover { color: var(--gold); }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px dotted #4a3826; }
.board-list li:last-child { border-bottom: 0; }
.board-list li:hover { background: #2b2017; }
.board-list .board-title { color: var(--text); }
.board-list .board-title:hover { color: #fff1c8; }
.board-list .empty, .board-table .empty { color: var(--muted); justify-content: center; text-align: center; padding: 18px 10px; }
.board-page { padding: 0; }
.board-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-table th { padding: 6px 8px; font-weight: normal; color: var(--gold2); background: #1a130e; border-bottom: 1px solid var(--line); }
.board-table td { padding: 7px 8px; border-bottom: 1px dotted #4a3826; }
.board-table tr:hover td { background: #241b13; }
.c-no { width: 60px; text-align: center; color: var(--muted); }
.c-author { width: 90px; text-align: center; color: #c4b698; }
.c-date { width: 86px; text-align: center; color: var(--muted); font-size: 11px; }
.c-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-title a { color: var(--text); }
.c-title a:hover { color: #fff1c8; }
.reply-n { margin-left: 5px; color: #f08a6a; font-size: 11px; }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; }
.pager { display: flex; gap: 3px; flex-wrap: wrap; }
.pager a { min-width: 26px; padding: 2px 6px; text-align: center; border: 1px solid var(--line2); color: var(--muted); }
.pager a.on { border-color: var(--gold2); color: var(--gold); background: #2e2218; }
#write-form { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
#write-form label { color: var(--muted); margin-top: 6px; }
textarea { width: 100%; padding: 6px 8px; border: 1px solid #5d4729; background: #0f0b08; color: #f3e6c8; font: 13px/1.6 var(--soft); resize: vertical; }
textarea:focus { border-color: var(--gold); outline: none; }
.form-actions { display: flex; gap: 6px; margin-top: 6px; }
#post-view { padding: 12px 14px; }
.post-title { margin: 0 0 4px; font: 600 17px var(--soft); color: #f3d891; }
.post-meta { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line2); color: var(--muted); font-size: 11px; }
.post-body { min-height: 80px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.8 var(--soft); color: #e2d6bc; }
.post-actions { display: flex; gap: 6px; margin: 14px 0; padding-top: 10px; border-top: 1px solid var(--line2); }
a.btn-small { display: inline-block; color: var(--text); }
a.btn-small:hover { text-decoration: none; }
.reply-list { list-style: none; margin: 0 0 10px; padding: 0; }
.reply-list li { padding: 7px 0; border-bottom: 1px dotted #4a3826; }
.reply-head { display: flex; gap: 8px; align-items: baseline; margin: 0 0 2px; }
.reply-head strong { color: var(--gold2); font-weight: normal; }
.reply-del { margin-left: auto; font-size: 11px; color: var(--muted); }
.reply-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #d8ccb4; }
#reply-form { display: flex; gap: 6px; align-items: stretch; }
#reply-form textarea { flex: 1; }
@media (max-width: 1000px) { .gnb a { font-size: 12px; padding: 10px 2px; } }
@media (max-width: 640px) {
  .gnb a { flex: 1 0 25%; }
  .c-no, .c-author { display: none; }
  .board-table th.c-no, .board-table th.c-author { display: none; }
  #reply-form { flex-direction: column; }
}
.board-tabs { flex-wrap: wrap; }
.gnb a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) { .gnb a { font-size: 11px; letter-spacing: 0; } .board-tabs button { padding: 6px 8px; } }
#view-home, #view-board { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 1000px) { .layout { align-items: stretch; } .content { width: 100%; } }

/* ── 도감·랭킹 (2026-11-04) ── */
#view-dex { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#dex-tabs a { flex: none; padding: 6px 12px; border-right: 1px solid var(--line2); color: var(--muted); }
#dex-tabs a[aria-selected="true"] { color: var(--gold); background: #2e2218; box-shadow: inset 0 -2px 0 var(--red2); }
#dex-tabs a:hover { color: #fff1c8; text-decoration: none; }
.dex-search { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line2); background: #1a130e; }
.dex-search input { flex: 1; }
.dex-search select { padding: 3px 4px; border: 1px solid #5d4729; background: #0f0b08; color: #f3e6c8; font: inherit; max-width: 45%; }
.dex-body { padding: 0; }
.item-grid { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; }
.item-grid li.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 20px; }
.item-grid > li:not(.mon-card) > a { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; padding: 8px 4px; border: 1px solid var(--line2); background: #1a130e; text-align: center; }
.item-grid > li:not(.mon-card) > a:hover { border-color: var(--gold2); background: #2b2017; text-decoration: none; }
.item-icon { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; background: radial-gradient(circle, #2c2219, #120d09 70%); border: 1px solid #3d2e1d; }
.item-icon.none { visibility: hidden; }
.item-icon.big { width: 96px; height: 96px; flex: none; }
.item-name { color: var(--text); font-size: 12px; line-height: 1.3; word-break: keep-all; }
.item-sub { color: var(--muted); font-size: 11px; }
.item-detail { padding: 12px 14px; }
.item-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.stat-table { border-collapse: collapse; margin-top: 10px; min-width: 240px; }
.stat-table th, .stat-table td { padding: 4px 12px; border-bottom: 1px dotted #4a3826; text-align: left; }
.stat-table th { color: var(--muted); font-weight: normal; }
.stat-table td { color: var(--gold); text-align: right; }
.c-num { text-align: right; color: #e2d3b2; }
.boss { margin-left: 6px; width: auto; padding: 0 4px; }
#dex-note { margin: 0; font-size: 11px; }
.rank-mini { list-style: none; margin: 0; padding: 6px 10px; }
.rank-mini li { display: flex; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px dotted #3d2e1d; }
.rank-mini li:last-child { border-bottom: 0; }
.rank-mini .empty { color: var(--muted); justify-content: center; }
.rank-no { width: 18px; text-align: center; color: #2a1608; background: var(--gold2); font-size: 11px; font-weight: bold; }
.rank-mini li:nth-child(1) .rank-no { background: #f2d48b; }
.rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { color: var(--muted); font-size: 11px; }
@media (max-width: 640px) {
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .item-icon { width: 48px; height: 48px; }
  #dex-table td:nth-child(3), #dex-table th:nth-child(3) { display: none; }
}

/* ── 몬스터 도감 카드 (움직이는 공격 그림) ── */
#dex-tabs { flex-wrap: wrap; }
.item-grid.mon-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.mon-card { display: flex; flex-direction: column; align-items: center; padding: 8px 8px 10px; border: 1px solid var(--line2); background: #1a130e; text-align: center; }
.mon-card:hover { border-color: var(--gold2); }
.mon-pic { display: flex; flex-shrink: 0; align-items: flex-end; justify-content: center; width: 100%; height: 150px; margin-bottom: 6px;
  background: radial-gradient(ellipse at 50% 80%, #3a3022, #15100b 70%); border: 1px solid #2a2016; overflow: hidden; }
.mon-pic img { max-width: 100%; max-height: 100%; object-fit: contain; object-position: center bottom; image-rendering: pixelated; }
.mon-name { margin: 0; color: var(--gold); font: 600 13px var(--soft); }
.mon-map { margin: 2px 0 0; color: #c4b698; font-size: 11px; }
.mon-attack { margin: 0; color: var(--muted); font-size: 11px; min-height: 14px; }
.mon-stats { display: grid; grid-template-columns: auto auto; gap: 1px 10px; margin: 6px 0 0; font-size: 11px; }
.mon-stats dt { color: var(--muted); text-align: left; }
.mon-stats dd { margin: 0; color: #e2d3b2; text-align: right; }
@media (max-width: 640px) { .item-grid.mon-grid { grid-template-columns: repeat(2, 1fr); } .mon-pic { height: 120px; } }
.mon-switch { display: flex; gap: 4px; margin: -2px 0 6px; }
.mon-switch button { padding: 1px 10px; border: 1px solid var(--line2); background: #241b13; color: var(--muted); font-size: 11px; cursor: pointer; }
.mon-switch button[aria-pressed="true"] { border-color: var(--gold2); color: var(--gold); background: #3a2a1b; }
.mon-switch button:hover { color: #fff1c8; }
.mon-switch button[data-turn] { padding: 1px 7px; color: var(--gold2); } .mon-switch button:disabled { opacity: .35; cursor: default; }

/* ── 아이템 장착 모습 ── */
.wear-panel { float: right; width: 250px; margin: 0 0 10px 14px; padding: 8px; border: 1px solid var(--line2); background: #1a130e; text-align: center; }
.wear-panel .small-title { margin: 0 0 6px; }
.wear-pic { height: 230px; margin-bottom: 6px; }
.wear-pic img { image-rendering: pixelated; }
.wear-panel .mon-switch { justify-content: center; align-items: center; }
.wear-dir { min-width: 74px; color: var(--muted); font-size: 11px; }
.wear-panel .subtle { margin: 4px 0 0; font-size: 11px; }
.item-detail .post-actions { clear: both; }
@media (max-width: 640px) { .wear-panel { float: none; width: 100%; margin: 0 0 10px; } }

/* ── 드롭 아이템 ── */
.mon-drops { width: 100%; margin-top: 8px; text-align: left; border-top: 1px dotted #4a3826; padding-top: 6px; }
.mon-drops summary { cursor: pointer; color: var(--gold2); font-size: 12px; text-align: center; list-style: none; }
.mon-drops summary::-webkit-details-marker { display: none; }
.mon-drops summary::after { content: " ▾"; }
.mon-drops[open] summary::after { content: " ▴"; }
.mon-drops ul, .dropped-by { list-style: none; margin: 6px 0 0; padding: 0; }
.mon-drops li, .dropped-by li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 0; border-bottom: 1px dotted #2f2419; font-size: 11px; }
.drop-name { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--text); }
.drop-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.drop-name:hover { color: #fff1c8; text-decoration: none; }
.drop-icon { width: 22px; height: 22px; flex: none; object-fit: contain; image-rendering: pixelated; }
.drop-rate { flex: none; color: var(--muted); font-size: 10px; }
.drop-rate.quest { color: #cfe6b0; }
.drop-title { clear: both; margin-top: 14px; }
.dropped-by { max-width: 420px; }
.dropped-by li { font-size: 12px; padding: 4px 0; }

/* ── 몬스터 상세 ── */
.mon-name a { color: var(--gold); }
.mon-name a:hover { color: #fff1c8; }
.mon-more { margin-top: 6px; font-size: 11px; color: var(--muted); }
.mon-more:hover { color: var(--gold); }
.mon-detail-pic { width: 270px; }
.mon-detail-pic .mon-pic { height: 250px; }
.spawn-table { min-width: 0; width: 100%; max-width: 520px; }
.spawn-table th { color: var(--gold2); }
.spawn-table td { text-align: left; color: var(--text); }
.spawn-table td.spawn-points { color: var(--muted); font-size: 11px; word-spacing: 2px; }
.mon-drop-full { max-width: 520px; }
@media (max-width: 640px) { .mon-detail-pic { width: 100%; } }
.mon-sec { margin: 14px 0 6px; }
.item-detail .post-meta { overflow: hidden; }
.spawn-table td:nth-child(-n+2), .spawn-table th:nth-child(-n+2) { white-space: nowrap; }
.spawn-table { width: auto; max-width: 100%; }

/* ── 아이템 상세 꾸미기 ── */
.crumb { margin: 0 0 10px; font-size: 11px; color: var(--muted); }
.crumb a { color: var(--gold2); }
.crumb strong { color: var(--text); font-weight: normal; }
.item-hero { align-items: center; gap: 16px; padding: 10px; border: 1px solid var(--line2); background: linear-gradient(90deg, #2a1f16, #17110c); margin-bottom: 12px; overflow: hidden; }
.item-hero-info { min-width: 0; }
.item-hero .post-title { font-size: 20px; margin-bottom: 6px; }
.icon-frame { position: relative; flex: none; padding: 4px; border: 2px solid #6b6155; background: #0f0b08; box-shadow: inset 0 0 12px rgba(0, 0, 0, .8); }
.icon-frame.g-mid { border-color: #5c8a46; box-shadow: inset 0 0 12px rgba(0, 0, 0, .8), 0 0 8px rgba(120, 200, 90, .35); }
.icon-frame.g-high { border-color: #4a7fb8; box-shadow: inset 0 0 12px rgba(0, 0, 0, .8), 0 0 10px rgba(90, 150, 230, .45); }
.icon-frame.g-top { border-color: #d8a94a; box-shadow: inset 0 0 12px rgba(0, 0, 0, .8), 0 0 14px rgba(240, 180, 70, .55); }
.icon-frame .item-icon.big { border: 0; display: block; }
.grade-badge { position: absolute; right: -2px; bottom: -2px; padding: 0 5px; background: #0f0b08; border: 1px solid var(--line); color: var(--gold); font-size: 11px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 1px 8px; border: 1px solid var(--line2); background: #241b13; color: #d8ccb4; font-size: 11px; border-radius: 2px; }
.chip.cat { border-color: #8a3a26; color: #ffb08a; background: #3a150e; }
.chip.wtype { border-color: #6e5530; color: var(--gold); }
.chip.sex { border-color: #5e3a74; color: #e7b6ff; background: #1f1029; }
.chip.src { color: var(--muted); }
.chip.good { border-color: #4c6b3a; color: #cfe6b0; background: #18240f; }
.chip.bad { border-color: #6a3326; color: #f0a08a; background: #2a120c; }
.price { margin: 6px 0 0; color: var(--gold2); font-size: 12px; }
.item-desc { min-height: 0; padding: 8px 10px; border-left: 3px solid var(--line); background: #1a130e; }
.stat-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; max-width: 470px; }
.stat-group { padding: 6px 8px; border: 1px solid var(--line2); background: #1a130e; }
.stat-group h5 { margin: 0 0 4px; color: var(--gold2); font-size: 12px; }
.stat-row { display: grid; grid-template-columns: 52px 1fr 44px; align-items: center; gap: 6px; padding: 2px 0; font-size: 11px; }
.stat-name { color: var(--muted); }
.stat-bar { height: 7px; background: #0f0b08; border: 1px solid #2f2419; }
.stat-fill { display: block; height: 100%; background: linear-gradient(90deg, #8e1f15, #d4552f, #f2d48b); }
.stat-val { text-align: right; color: var(--gold); }
.stat-val.neg { color: #9fb886; }
.stat-note { font-size: 10px; margin: 4px 0 0; }
.series { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; max-width: 470px; }
.series a { display: flex; flex-direction: column; align-items: center; width: 64px; padding: 4px 2px; border: 1px solid var(--line2); background: #1a130e; text-align: center; }
.series a:hover { border-color: var(--gold2); text-decoration: none; }
.series li.on a { border-color: var(--gold); background: #3a2a1b; }
.series-icon { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.series-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 10px; }
.series-grade { color: var(--muted); font-size: 10px; }
@media (max-width: 640px) { .item-hero { flex-direction: row; } .stat-groups, .series { max-width: none; } }

#coupon-char { min-width: 0; width: 100%; padding: 5px 6px; color: var(--text); background: #130e0a; border: 1px solid var(--line); font: inherit; }
.coupon-history .review { color: #f0b07a; }

/* 텔레그램 초대코드 안내 (2026-11-06): 넓은 화면은 본문(980px) 오른쪽, 바로가기 버튼 줄 높이에 붙임. 좁은 화면은 오른쪽 아래 고정 작은 버튼 */
.tg-float { position: absolute; top: 484px; left: calc(50% + 500px); width: 150px; z-index: 20; text-align: center;
  background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 0 0 1px #000, 0 2px 6px rgba(0, 0, 0, .5); padding: 0 0 10px; }
.tg-title { margin: 0 0 8px; padding: 6px 4px; font-size: 13px; color: var(--gold); letter-spacing: 1px; background: linear-gradient(#3e2c1c, #241a11); border-bottom: 1px solid var(--line); }
.tg-qr { display: block; width: 120px; margin: 0 auto; background: #fff; padding: 2px; }
.tg-qr svg { display: block; width: 100%; height: auto; }
.tg-bot { display: block; margin: 6px 4px 2px; font-size: 12px; font-weight: bold; word-break: break-all; }
.tg-how { margin: 4px 6px 8px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.tg-how b { color: #fff; }
.tg-btn { display: block; margin: 0 10px; padding: 6px 0; font-size: 12px; color: #fff; background: linear-gradient(#2f9ad8, #1d6fa5); border: 1px solid #0d4a73; border-radius: 3px; }
.tg-btn:hover { filter: brightness(1.15); color: #fff; text-decoration: none; }
.tg-admin { margin: 10px 4px 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
@media (max-width: 1330px) {
  .tg-float { position: fixed; top: auto; left: auto; right: 10px; bottom: 10px; width: 150px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
  .tg-title, .tg-qr, .tg-bot, .tg-how { display: none; }
  .tg-btn { margin: 0; padding: 6px 4px; white-space: nowrap; }
  .tg-admin { margin: 0; }
  .tg-admin { font-size: 10px; }
}
