/* ============================================================
   TARKOV HUB KOREA — 타르코프 커뮤니티 사이트 공용 스타일
   Escape from Tarkov 인게임 UI 무드(다크 + 탄색) 기반 디자인 시스템
   ============================================================ */

/* ---------- 토큰 ---------- */
:root {
  --bg: #0e0e0b;
  --bg-alt: #131310;
  --panel: #1a1a14;
  --panel-2: #21211a;
  --panel-hover: #262620;
  --border: #32302a;
  --border-strong: #4a463c;
  --tan: #9a8866;
  --tan-bright: #c7b299;
  --tan-dim: #6e6350;
  --text: #d6d2c4;
  --text-strong: #efece1;
  --muted: #8c887b;
  --red: #c15b5b;
  --red-deep: #8f3d3d;
  --green: #7fa26a;
  --gold: #d4b46a;
  --blue: #6f8ea6;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  --radius: 3px;
  --od: #4e5540;
  --hazard-a: #8f7c3f;
  --font-head: "Barlow Condensed", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-body: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-stencil: "Black Ops One", "Barlow Condensed", sans-serif;
  --font-mono: "Share Tech Mono", Consolas, "Courier New", monospace;
  /* 위험구역 사선 스트라이프 (군용 테이프 무늬) */
  --hazard: repeating-linear-gradient(-45deg, var(--hazard-a) 0 9px, #14140f 9px 18px);
}

/* ---------- 리셋 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(154, 136, 102, 0.06), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.006) 2px 4px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--tan-bright); text-decoration: none; }
a:hover { color: var(--text-strong); }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--tan-dim); color: var(--text-strong); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-strong);
  line-height: 1.3;
}

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- 헤더 / 내비게이션 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 14, 11, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--hazard);
  opacity: 0.55;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-stencil);
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--tan-bright);
  text-transform: uppercase;
  white-space: nowrap;
}
.logo:hover { color: var(--text-strong); }
.logo .logo-sub {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  padding: 8px 14px;
  font-family: var(--font-head);
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--text-strong); }
.main-nav a.active { color: var(--tan-bright); border-bottom-color: var(--tan); }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--tan-bright);
  font-size: 1.2rem;
  padding: 4px 10px;
}

/* ---------- 내비 드롭다운 ---------- */
.nav-group { position: relative; }
.nav-group-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-family: var(--font-head);
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.nav-group:hover .nav-group-btn, .nav-group:focus-within .nav-group-btn { color: var(--text-strong); }
.nav-group.active .nav-group-btn { color: var(--tan-bright); border-bottom-color: var(--tan); }
.nav-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 175px;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--tan-dim);
  box-shadow: var(--shadow);
  padding: 6px 0;
  z-index: 120;
}
.nav-group:hover .nav-drop, .nav-group:focus-within .nav-drop { display: block; }
.nav-drop a { display: block; padding: 9px 18px; border-bottom: none; font-size: 0.98rem; white-space: nowrap; }
.nav-drop a:hover { background: var(--panel-hover); }
.nav-drop a.active { color: var(--tan-bright); border-bottom: none; }

/* ---------- 페이지 공통 ---------- */
main { flex: 1; padding: 32px 0 64px; }
.page-title {
  font-size: 2rem;
  text-transform: uppercase;
  border-left: 4px solid var(--tan);
  padding-left: 14px;
  margin-bottom: 6px;
}
.page-title::before {
  content: "// ";
  font-family: var(--font-mono);
  color: var(--tan-dim);
  font-size: 0.75em;
  vertical-align: 0.12em;
}
.page-desc { color: var(--muted); margin-bottom: 28px; padding-left: 18px; }

.section-title {
  font-size: 1.35rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 16px;
}
.section-title::before {
  content: "▸▸";
  color: var(--tan-dim);
  font-size: 0.8em;
  letter-spacing: -0.1em;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- 히어로 (메인) ---------- */
.hero {
  position: relative;
  padding: 72px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(154, 136, 102, 0.12), transparent 65%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--hazard);
  opacity: 0.35;
}
.hero::before { top: 0; }
.hero::after { bottom: -2px; }
.hero h1 {
  font-family: var(--font-stencil);
  font-size: clamp(2rem, 5.5vw, 3.3rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1 .accent { color: var(--tan-bright); }
.hero .hero-actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tan-bright);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--tan-dim);
  border-radius: var(--radius);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--tan); color: var(--text-strong); background: var(--panel-hover); }
.btn.primary { background: linear-gradient(180deg, #3a3428, #2b2720); border-color: var(--tan); }
.btn.small { padding: 5px 12px; font-size: 0.88rem; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- 카드 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: border-color 0.15s, transform 0.15s;
}
/* HUD 조준 브래킷 (모서리 표식) */
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
  border: 2px solid rgba(199, 178, 153, 0.28);
  transition: border-color 0.15s;
}
.card::before { top: 5px; left: 5px; border-right: none; border-bottom: none; }
.card::after { bottom: 5px; right: 5px; border-left: none; border-top: none; }
a.card:hover, .card.hoverable:hover { border-color: var(--tan); transform: translateY(-2px); }
a.card:hover::before, a.card:hover::after,
.card.hoverable:hover::before, .card.hoverable:hover::after { border-color: var(--tan); }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.card p { color: var(--muted); font-size: 0.92rem; }
.card .card-icon { font-size: 1.6rem; margin-bottom: 10px; }

/* ---------- 뉴스 / 패치노트 ---------- */
.news-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tan-dim);
  border-radius: var(--radius);
  margin-bottom: 10px;
  scroll-margin-top: 78px; /* 접을 때 상단 고정 헤더에 가리지 않게 */
}
.news-item:hover { border-left-color: var(--tan); }
.news-head { display: flex; gap: 16px; padding: 16px 18px; }
.news-item.expandable > .news-head { cursor: pointer; }
.news-item.expandable > .news-head:hover h3 { color: var(--tan-bright); }
.news-item .news-date {
  flex-shrink: 0;
  width: 100px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding-top: 3px;
}
.news-item .news-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.news-item .news-body p { color: var(--muted); font-size: 0.9rem; }
.news-item .news-body h3 .news-ext { font-size: 0.8em; opacity: 0.6; }
.news-item .news-body { flex: 1; min-width: 0; }
.news-caret {
  flex-shrink: 0; align-self: center;
  font-size: 0.7rem; color: var(--muted);
  transition: transform 0.15s, color 0.15s;
}
.news-item.expandable > .news-head:hover .news-caret { color: var(--tan-bright); }
.news-item.open > .news-head .news-caret { transform: rotate(90deg); color: var(--tan); }
.news-item .news-title-en {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.75;
}
#news-more[hidden] { display: none; }
#news-more-btn { margin: 4px 0 2px; }
.news-foot { margin: 10px 0 4px; font-size: 0.82rem; color: var(--muted); }

/* ---------- 배지 / 태그 ---------- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  font-size: 0.75rem;
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--tan-bright);
  background: rgba(154, 136, 102, 0.08);
}
.badge.red { color: var(--red); border-color: var(--red-deep); background: rgba(193, 91, 91, 0.08); }
.badge.green { color: var(--green); border-color: #4e6442; background: rgba(127, 162, 106, 0.08); }
.badge.gold { color: var(--gold); border-color: #8a7440; background: rgba(212, 180, 106, 0.08); }
.badge.blue { color: var(--blue); border-color: #43596b; background: rgba(111, 142, 166, 0.08); }

/* ---------- 폼 ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.input, textarea.input, select.input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--tan); }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.6; }
select.input { appearance: none; cursor: pointer; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.toolbar .input { width: auto; flex: 1; min-width: 180px; }
.toolbar select.input { flex: 0 0 auto; }

/* ---------- 테이블 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}
table.data thead th {
  position: sticky;
  top: 0;
  background: var(--panel-2);
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tan-bright);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-strong);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
table.data thead th.sorted { color: var(--text-strong); }
table.data tbody td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:hover { background: var(--panel-hover); }
table.data td.num { text-align: right; font-family: var(--font-mono); font-size: 0.88rem; white-space: nowrap; }
table.data th.num { text-align: right; }
.item-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.item-cell img { width: 40px; height: 40px; object-fit: contain; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 2px; flex-shrink: 0; }
.item-cell .item-name { line-height: 1.35; }
.item-cell .item-sub { color: var(--muted); font-size: 0.78rem; }
.price-up { color: var(--green); }
.price-down { color: var(--red); }

/* ---------- 관통 클래스 색상 (탄약 차트) ----------
   서열(효율) 램프: 명도가 6→1로 단조 감소하도록 설계 (색각 이상 사용자도
   밝기만으로 순서를 읽을 수 있음). 셀 안에 숫자를 함께 표기해 색 단독 인코딩을 피함 */
.pen-cell { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: #12120e; }
.pen-6 { background: #8cc063; }
.pen-5 { background: #a3a94f; }
.pen-4 { background: #b28f3e; }
.pen-3 { background: #b3743a; }
.pen-2 { background: #9d4f38; color: #f2efe4; }
.pen-1 { background: #8a3a3a; color: #f2efe4; }
.pen-0 { background: #35352d; color: var(--muted); }
/* 탄약 차트 모아보기 헤더 행 (구경별 · 방탄 등급별) */
tr.ammo-group td {
  background: var(--panel-2);
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--tan-bright);
  border-top: 2px solid var(--border-strong);
}
tr.ammo-group:hover td { background: var(--panel-2); }
tr.ammo-group .ammo-group-sub {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0;
  margin-left: 10px;
}

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; font-size: 0.82rem; }
.legend .chip { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.legend .swatch { width: 14px; height: 14px; border-radius: 2px; display: inline-block; }

/* ---------- 상태 표시 ---------- */
.status-box {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.status-box.error { color: var(--red); border-color: var(--red-deep); }
.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--tan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 맵 카드 ---------- */
/* 하단 맵 카드 그리드는 걷어냈다 (2026-09-20) — 뷰어가 그 역할을 한다.
   .map-bosses 는 뷰어 정보줄에서 계속 쓰므로 .iv-info 쪽 규칙으로 남아 있다. */

/* ---------- PVP/PVE 모드 전환 (세그먼트 컨트롤) ---------- */
.mode-tabs {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.mode-tabs button {
  padding: 8px 20px;
  background: var(--panel);
  color: var(--muted);
  border: none;
  border-right: 1px solid var(--border-strong);
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.mode-tabs button:last-child { border-right: none; }
.mode-tabs button.active { background: var(--tan); color: #14140f; }
.mode-tabs button:hover:not(.active) { color: var(--text-strong); background: var(--panel-hover); }
.mode-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.mode-row .mode-hint { color: var(--muted); font-size: 0.82rem; font-family: var(--font-mono); }

/* ---------- 게시판 ---------- */
.board-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.board-tabs button {
  padding: 7px 16px;
  font-family: var(--font-head);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.board-tabs button:hover { color: var(--text-strong); border-color: var(--border-strong); }
.board-tabs button.active { background: var(--panel-2); color: var(--tan-bright); border-color: var(--tan); }

.post-list { list-style: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.post-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.post-row:last-child { border-bottom: none; }
.post-row:hover { background: var(--panel-hover); }
.post-row .post-cat { flex-shrink: 0; }
.post-row .post-title { flex: 1; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row .post-title .comment-count { color: var(--tan-bright); font-size: 0.82rem; margin-left: 6px; }
.post-row .post-meta { flex-shrink: 0; display: flex; gap: 14px; color: var(--muted); font-size: 0.78rem; font-family: var(--font-mono); }
.post-row .post-meta .likes { color: var(--gold); }

.post-view { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.post-view .post-head { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 18px; }
.post-view h2 { font-size: 1.45rem; margin: 8px 0; }
.post-view .post-info { color: var(--muted); font-size: 0.85rem; display: flex; gap: 16px; flex-wrap: wrap; }
.post-view .post-content { white-space: pre-wrap; line-height: 1.8; min-height: 80px; }
.post-view .post-actions { display: flex; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }

.comment-section { margin-top: 26px; }
.comment-section h3 { font-size: 1.05rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.comment {
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.comment .comment-meta { color: var(--muted); font-size: 0.8rem; margin-bottom: 4px; display: flex; gap: 10px; }
.comment .comment-meta .author { color: var(--tan-bright); }
.comment p { font-size: 0.92rem; white-space: pre-wrap; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; align-items: flex-start; flex-wrap: wrap; }
.comment-form .input { flex: 1; min-width: 200px; }
.comment-form textarea.input { min-height: 60px; }

.notice-bar {
  padding: 10px 16px 10px 26px;
  background:
    var(--hazard) left / 10px 100% no-repeat,
    rgba(154, 136, 102, 0.07);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

/* ---------- 게시판: 사진 첨부 · 목록 보조 ---------- */
.board-empty { padding: 28px; text-align: center; color: var(--muted); }
.post-row .post-title .post-thumb-mark { margin-left: 6px; font-size: 0.8rem; opacity: 0.85; }

.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 180px; }
.field-hint { color: var(--muted); font-size: 0.82rem; margin-top: 6px; }
.field-hint strong { color: var(--tan-bright); font-weight: 500; }
.field-hint-inline { color: var(--muted); font-size: 0.78rem; font-weight: 400; letter-spacing: 0; text-transform: none; }

.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.upload-drop:hover, .upload-drop.over { border-color: var(--tan); color: var(--text-strong); background: var(--panel-hover); }
.upload-drop .upload-icon { font-size: 1.4rem; }
.upload-drop .upload-sub { font-size: 0.78rem; font-family: var(--font-mono); opacity: 0.75; }

.thumb-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.thumb { position: relative; width: 96px; height: 96px; }
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.thumb img.pending { opacity: 0.35; }
.thumb .thumb-spin {
  position: absolute; top: 50%; left: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--tan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.thumb .thumb-x {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; line-height: 1;
  color: var(--text-strong);
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 0.72rem;
  cursor: pointer;
}
.thumb .thumb-x:hover { color: var(--red); border-color: var(--red-deep); }

/* align-items:flex-start — 세로 flex 는 기본이 stretch 라 작은 사진이 폭에 맞춰 늘어난다 */
.post-images { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 18px; }
.post-images img {
  max-width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: zoom-in;
}

.comment .comment-meta .comment-del {
  margin-left: auto;
  padding: 0 4px;
  color: var(--muted);
  background: none;
  border: none;
  font-size: 0.78rem;
  cursor: pointer;
}
.comment .comment-meta .comment-del:hover { color: var(--red); }

/* ---------- 가이드 ---------- */
.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.guide-toc {
  position: sticky;
  top: 80px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.guide-toc h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 10px; }
.guide-toc a { display: block; padding: 5px 0; color: var(--text); font-size: 0.9rem; border-left: 2px solid transparent; padding-left: 10px; }
.guide-toc a:hover { color: var(--tan-bright); border-left-color: var(--tan-dim); }
.guide-section { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; scroll-margin-top: 80px; }
.guide-section h2 { font-size: 1.4rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.06em; }
.guide-section h3 { font-size: 1.08rem; margin: 18px 0 8px; color: var(--tan-bright); }
.guide-section p { margin-bottom: 10px; }
.guide-section ul, .guide-section ol { padding-left: 22px; margin-bottom: 12px; }
.guide-section li { margin-bottom: 6px; }
.guide-section .tip {
  padding: 12px 16px;
  background: rgba(127, 162, 106, 0.06);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  margin: 12px 0;
}
.guide-section .warn {
  padding: 12px 16px;
  background: rgba(193, 91, 91, 0.06);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  margin: 12px 0;
}
dl.term-list dt { color: var(--tan-bright); font-weight: 700; margin-top: 12px; }
dl.term-list dd { color: var(--text); margin-left: 0; padding-left: 14px; border-left: 2px solid var(--border); margin-top: 4px; font-size: 0.92rem; }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--hazard);
  opacity: 0.3;
  margin-bottom: 24px;
}
.site-footer .footer-callsign {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--tan-dim);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--tan-bright); }

/* ---------- 반응형 ---------- */
@media (max-width: 860px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { position: static; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 63px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    max-height: calc(100vh - 63px);
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .main-nav a { border-bottom: 1px solid var(--border); padding: 12px 4px; }
  .main-nav a.active { border-bottom-color: var(--tan); }
  /* 모바일: 드롭다운을 펼쳐진 목록으로 표시 */
  .nav-group { position: static; }
  .nav-group-btn { display: block; width: 100%; text-align: left; padding: 12px 4px; pointer-events: none; color: var(--tan-dim); }
  .nav-drop { display: block; position: static; border: none; box-shadow: none; background: none; padding: 0 0 0 14px; }
  .post-row .post-meta .date-col { display: none; }
}

/* ---------- 모달 (가격 히스토리 등) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 16px;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--tan);
  border-radius: var(--radius);
  width: min(760px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal .modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal .modal-head img { width: 44px; height: 44px; object-fit: contain; background: var(--bg-alt); border: 1px solid var(--border); }
.modal .modal-head h3 { flex: 1; font-size: 1.2rem; }
.modal .modal-close {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 1rem;
  padding: 4px 12px;
}
.modal .modal-close:hover { color: var(--text-strong); border-color: var(--tan); }
.chart-wrap { position: relative; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
  transform: translate(-50%, -115%);
  display: none;
}

/* ---------- 상세 지도 뷰어 ---------- */
.mapviewer-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 0.9rem;
  z-index: 2;
  text-align: center;
}
.mapviewer-help {
  padding: 6px 16px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 인라인 지도 뷰어 (맵 정보 페이지 상단) ---------- */
.inline-viewer { margin-bottom: 8px; }
/* 3단(퀘스트·지도·선택) 구성이라 넓은 화면에서는 컨테이너(1180px) 밖으로 넓힌다 */
@media (min-width: 1280px) {
  .inline-viewer {
    width: min(1760px, 100vw - 32px);
    margin-left: calc(50% - min(1760px, 100vw - 32px) / 2);
  }
}
.inline-viewer .board-tabs { margin-bottom: 12px; }
/* 변형 탭이 많아 좁은 화면에서 잘리지 않도록 줄바꿈 */
#iv-variant-tabs { flex-wrap: wrap; max-width: 100%; }
#iv-variant-tabs button { flex: 1 1 auto; }
#iv-variant-tabs button.iv-coord-tab:not(.active) { color: var(--gold); }
@media (max-width: 700px) {
  #iv-variant-tabs button { padding: 7px 10px; font-size: 0.85rem; letter-spacing: 0.04em; }
}
.iv-stage {
  position: relative;
  height: 72vh;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(154, 136, 102, 0.04), transparent 70%),
    #0a0a08;
  cursor: grab;
  touch-action: none;
}
.iv-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  user-select: none;
}
.iv-info {
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: none;
}
.iv-info-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.iv-info-row h3 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.05em; }
.iv-info-row .iv-info-links { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.iv-info-tip { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
.iv-info .map-bosses { margin-top: 6px; font-size: 0.85rem; }
.iv-info .map-bosses strong { color: var(--gold); font-weight: 500; }
@media (max-width: 860px) {
  .iv-stage { height: 55vh; min-height: 300px; }
}

/* ---------- 퀘스트 트래커 ---------- */
.quest-row-done .post-title, tr.quest-done td { opacity: 0.45; }
tr.quest-done td .quest-name { text-decoration: line-through; }
.quest-progress {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.quest-progress strong { color: var(--tan-bright); }
details.quest-detail summary { cursor: pointer; list-style: none; }
details.quest-detail summary::-webkit-details-marker { display: none; }
details.quest-detail[open] summary .quest-name { color: var(--tan-bright); }
.quest-objectives { margin: 8px 0 4px; padding-left: 4px; font-size: 0.85rem; color: var(--muted); }
.quest-objectives li { margin-bottom: 3px; list-style: none; }
.quest-objectives li::before { content: "▸ "; color: var(--tan-dim); }

/* ---------- 카파 로드맵 ---------- */
.kappa-bar {
  height: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  overflow: hidden;
}
.kappa-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, #a8873f 8px 16px);
  transition: width 0.3s;
}
tr.kappa-tier-row td {
  background: var(--panel-2);
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tan-bright);
  border-top: 2px solid var(--border-strong);
}
tr.kappa-avail td { background: rgba(127, 162, 106, 0.05); }
.kappa-map-batch { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; flex-wrap: wrap; }
.kappa-map-batch > .badge { flex-shrink: 0; margin-top: 2px; }
.kappa-batch-list { display: flex; flex-wrap: wrap; gap: 5px; }
.kappa-chip {
  display: inline-block;
  padding: 2px 9px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.8rem;
  color: var(--text);
}
.kappa-subhead {
  margin: 14px 0 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tan-bright);
}
.kappa-cond-grid { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.kappa-cond {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  padding: 3px 0;
}

/* ---------- 계산기 (바터/제작) ---------- */
.io-items { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.io-item { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 2px; padding: 2px 7px 2px 2px; font-size: 0.8rem; }
.io-item img { width: 26px; height: 26px; object-fit: contain; }
.io-item .cnt { color: var(--tan-bright); font-family: var(--font-mono); }
.profit-pos { color: var(--green); font-weight: 700; }
.profit-neg { color: var(--red); }

/* ---------- 은신처 ---------- */
.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.station-card h3 { display: flex; align-items: center; gap: 10px; }
.station-card h3 img { width: 34px; height: 34px; object-fit: contain; }
details.station-level { border: 1px solid var(--border); border-radius: var(--radius); margin-top: 8px; background: var(--bg-alt); }
details.station-level summary { padding: 9px 12px; cursor: pointer; font-family: var(--font-head); letter-spacing: 0.05em; color: var(--tan-bright); display: flex; justify-content: space-between; gap: 8px; }
details.station-level .level-body { padding: 4px 12px 12px; font-size: 0.85rem; }
details.station-level .level-body .req-line { margin-top: 6px; color: var(--muted); }

/* ---------- 은신처 시뮬레이터 ---------- */
.sim-summary h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.sim-totals { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.sim-totals strong { color: var(--tan-bright); font-family: var(--font-mono); }
.sim-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.sim-controls label { display: inline-flex; align-items: center; gap: 6px; }
.sim-controls select.input { width: auto; padding: 4px 8px; font-family: var(--font-mono); }
.sim-controls .sim-arrow { color: var(--tan); font-weight: 700; }
details.station-level.planned { border-color: var(--tan); background: rgba(154, 136, 102, 0.06); }

/* ---------- 보스/트레이더 도감 ---------- */
.mob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mob-card .mob-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.mob-card .mob-head img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--border-strong); border-radius: 2px; background: var(--bg-alt); }
.mob-card .mob-head h3 { font-size: 1.2rem; }
.mob-card .mob-hp { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.mob-card .mob-maps { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.mob-card .mob-en { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; }
.mob-card .bx-kind {
  font-family: var(--font-mono); font-size: 0.6rem; vertical-align: 3px;
  color: var(--muted); border: 1px solid var(--border); border-radius: 2px; padding: 1px 4px;
}
/* 부위별 체력 — 머리부터 다리까지 한 줄에 */
.bx-hpbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.bx-hpbar span {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 2px; padding: 1px 5px;
}
.bx-hpbar b { color: var(--text-strong); font-weight: 500; }
.bx-esc { font-size: 0.82rem; color: var(--tan-bright); margin-bottom: 6px; }
.bx-note { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.mob-card .bx-maplink { cursor: pointer; font: inherit; font-family: var(--font-mono); }
.mob-card .bx-maplink:hover { color: var(--tan-bright); border-color: var(--tan); }

/* ---------- 보스 스폰 지도 (bosses.html · js/bosses.js) ----------
   지도 위 레이어·마커는 동선 플래너 CSS(.rp-base/.rp-layer/.rp-marker)를 그대로 쓴다 */
.bx-source { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 14px; }
.bx-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-rows: minmax(420px, 72vh);
  gap: 10px;
}
.bx-work > .iv-stage { height: auto; min-height: 0; border-radius: var(--radius); }
.bx-tab-n { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.board-tabs button.active .bx-tab-n { color: #14140f; }
/* 구역 핀 — 보스 얼굴 */
.bx-pin {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--c); background: var(--bg-alt);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.bx-pin img { width: 100%; height: 100%; object-fit: cover; }
.bx-zone { cursor: pointer; }
.bx-zone .rp-mlabel { top: 21px; max-width: 160px; }
/* 같은 구역을 여러 보스가 쓰면 좌표가 똑같다 — --dx/--dy로 화면 기준 거리만큼 벌린다
   (scale 뒤에 오는 translate라 확대해도 벌어진 간격은 그대로) */
.rp-marker.bx-zone, .rp-marker.bx-dot {
  transform: translate(-50%, -50%) scale(var(--rp-inv)) translate(var(--dx, 0px), var(--dy, 0px));
}
/* 스폰 지점 — 구역 안에서 실제로 뜨는 자리 */
.bx-dot {
  width: 9px; height: 9px; z-index: 1;
  background: var(--c); border: 1px solid rgba(0, 0, 0, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.rp-layer.rp-hl .bx-dot:not(.hl) { opacity: 0.12; }

/* 커뮤니티 제보 — 공식 스폰과 한눈에 구분되게 속을 비우고 테두리를 점선으로 */
.bx-dot.cm { background: transparent; border: 1px dashed var(--c); box-shadow: none; }
.bx-zone.cm .bx-pin { border-style: dashed; opacity: 0.85; }
.bx-card-cm { color: var(--gold); }

/* 오른쪽 목록 */
.bx-col { grid-column: 2; }
.bx-row { border-left: 3px solid var(--c); background: var(--bg-alt); border-radius: 2px; margin-bottom: 8px; }
.bx-row.cm { border-left-style: dashed; }
.bx-cm-tag {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em;
  color: var(--gold); border: 1px dashed var(--gold); border-radius: 2px;
  padding: 0 4px; margin-left: 4px; vertical-align: 1px;
}
.bx-row-note { padding: 0 8px 4px; font-size: 0.75rem; color: var(--muted); line-height: 1.5; }
.bx-row-src { padding: 0 8px 6px; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.bx-row-src a { color: var(--blue); }
.bx-row.sel { background: var(--panel-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.bx-row-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 8px; background: none; border: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.bx-row-head:hover { background: var(--panel-hover); }
.bx-av {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 2px; overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--panel);
}
.bx-av img { width: 100%; height: 100%; object-fit: cover; }
.bx-row-main { flex: 1; min-width: 0; }
.bx-row-name { display: block; color: var(--text-strong); font-size: 0.92rem; }
.bx-row-sub { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); line-height: 1.5; }
.bx-row-alt { padding: 0 8px 4px 8px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--gold); }
.bx-zones { padding: 0 8px 8px 8px; display: flex; flex-direction: column; gap: 3px; }
.bx-zone-row {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 3px 6px; font: inherit; font-size: 0.8rem; text-align: left;
  color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 2px;
  cursor: pointer;
}
.bx-zone-row:hover:not(:disabled) { border-color: var(--c); color: var(--text-strong); }
.bx-zone-row:disabled { opacity: 0.45; cursor: default; }
.bx-zone-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-zone-c, .bx-zone-n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.bx-zone-c { color: var(--tan-bright); }
.bx-zone-none { font-size: 0.78rem; color: var(--muted); padding: 0 2px 4px; }
@media (max-width: 1040px) {
  .bx-work { grid-template-columns: 1fr; grid-template-rows: 58vh auto; }
  .bx-col { grid-column: 1; max-height: 60vh; }
}

.trader-card .trader-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin: 8px 0; display: flex; flex-direction: column; gap: 3px; }
.trader-card table.ll { width: 100%; margin-top: 8px; font-size: 0.8rem; border-collapse: collapse; }
.trader-card table.ll th, .trader-card table.ll td { border: 1px solid var(--border); padding: 4px 8px; text-align: center; font-family: var(--font-mono); }
.trader-card table.ll th { color: var(--tan-bright); font-family: var(--font-head); letter-spacing: 0.05em; }

/* ---------- 토스트 알림 (퀘스트 선행 사슬 자동 체크 등) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 500;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast strong { color: var(--gold); }

/* ---------- 시즌 모디파이어 시뮬레이터 ---------- */
.mod-points-card { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.mod-points-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.12em; }
.mod-points { font-family: var(--font-mono); font-size: 2.6rem; line-height: 1.1; color: var(--green); }
.mod-points.invalid { color: var(--red); }
.mod-chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex-basis: 100%; border-top: 1px dashed var(--border); padding-top: 12px; }
.mod-actions-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.mod-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 860px) { .mod-cols { grid-template-columns: 1fr; } }
.mod-col-head { font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 0.08em; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.mod-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  transition: border-color 0.15s, background 0.15s;
}
.mod-item:hover { border-color: var(--border-strong); }
.mod-item input { margin-top: 3px; flex-shrink: 0; }
.mod-item.neg.checked { border-color: var(--red-deep); background: rgba(193, 91, 91, 0.08); }
.mod-item.pos.checked { border-color: #4e6442; background: rgba(127, 162, 106, 0.08); }
.mod-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mod-pts { font-family: var(--font-mono); font-size: 0.85rem; }
.mod-item.neg .mod-pts { color: var(--red); }
.mod-item.pos .mod-pts { color: var(--green); }
.mod-en { color: var(--tan-dim); font-size: 0.72rem; font-family: var(--font-mono); letter-spacing: 0.04em; }
.mod-desc { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.mod-icon { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; border-radius: 2px; }
.mod-icon.small { width: 36px; height: 36px; }
.mod-item.disabled { opacity: 0.45; cursor: not-allowed; }
.mod-item.disabled:hover { border-color: var(--border); }
.mod-excl { font-size: 0.76rem; color: var(--tan-dim); margin-top: 4px; font-family: var(--font-mono); }
.mod-excl.blocked { color: var(--red); }
.mod-tip { font-size: 0.79rem; color: var(--tan); margin-top: 3px; }
.preset-del { margin-left: 8px; color: var(--red); font-weight: 700; cursor: pointer; padding: 0 2px; }
.preset-del:hover { color: var(--text-strong); }
.eval-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .eval-cols { grid-template-columns: 1fr; } }
.eval-head { font-family: var(--font-head); font-size: 1rem; letter-spacing: 0.06em; margin-top: 6px; }
.eval-list { margin: 6px 0 10px 18px; font-size: 0.88rem; }
.eval-list li { margin-bottom: 4px; color: var(--text); }
.eval-foot { color: var(--muted); font-size: 0.85rem; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }

/* ---------- 이미지 라이트박스 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(6, 6, 4, 0.9);
  display: none; align-items: center; justify-content: center;
  padding: 28px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
img.zoomable { cursor: zoom-in; }

/* ---------- 건스미스 도우미 ---------- */
.gs-card { margin-bottom: 16px; }
.gs-card.quest-done { opacity: 0.55; }
.gs-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.gs-head h3 { font-size: 1.25rem; }
.gs-title { color: var(--tan-bright); }
.gs-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.gs-reqs { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gs-build { margin-top: 6px; }
.gs-build-row { display: grid; grid-template-columns: minmax(320px, 640px) 1fr; gap: 8px 18px; align-items: start; margin-top: 4px; }
.gs-build-row.no-img { grid-template-columns: 1fr; }
@media (max-width: 960px) { .gs-build-row { grid-template-columns: 1fr; } }
.gs-banner { display: block; width: 100%; background: var(--bg-alt); border: 1px solid var(--border-strong); border-radius: 2px; }
.gs-gun { margin-bottom: 6px; }
.gs-gun-name { font-weight: 700; color: var(--text-strong); margin-bottom: 6px; font-size: 1.05rem; }
.gs-attrs { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-attr { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold); border: 1px solid #8a7440; padding: 2px 8px; border-radius: 2px; background: rgba(212, 180, 106, 0.06); }
.gs-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.gs-part-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--panel-2); padding: 6px 10px; border-radius: var(--radius); font-size: 0.85rem; }
.gs-part-item img { width: 48px; height: 32px; object-fit: contain; flex-shrink: 0; }
.gs-part-item.gs-cat { border-style: dashed; }
.gs-part-item.gs-cat span { color: var(--blue); }
.gs-part-item.gs-cat em { color: var(--muted); font-style: normal; font-size: 0.78rem; }
.gs-short { color: var(--gold); font-style: normal; font-family: var(--font-mono); font-size: 0.75rem; }
.gs-part-item[data-item] { cursor: pointer; }
.gs-part-item[data-item]:hover { border-color: var(--border-strong); }
.gs-part-item.open { border-color: var(--gold); }
.gs-part-src { grid-column: 1 / -1; border: 1px dashed var(--border-strong); border-left: 3px solid var(--tan); background: var(--bg-alt); padding: 8px 12px; font-size: 0.83rem; margin-top: -4px; border-radius: var(--radius); }
.gs-src-head { color: var(--tan-bright); font-weight: 700; font-size: 0.8rem; margin-bottom: 2px; }
.gs-src-list { margin: 2px 0 0 16px; }
.gs-src-list li { margin-bottom: 2px; }

/* ---------- 퀘스트 연계 트리 ---------- */
.tree-toolbar { align-items: center; }
.tree-toolbar .tree-opt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; white-space: nowrap; }
.tree-count { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; margin-left: auto; }

.tree-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 14px; padding: 8px 12px; border: 1px solid var(--border); border-left: 3px solid var(--tan-dim); background: var(--bg-alt); color: var(--muted); font-size: 0.78rem; font-family: var(--font-mono); }
.tree-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tree-legend b { color: var(--blue); font-size: 0.9rem; }
.tree-legend .sep { width: 1px; height: 14px; background: var(--border-strong); }

/* 트레이더 섹션 */
.qt-trader { margin-bottom: 14px; }
.qt-trader summary { cursor: pointer; font-size: 1.05rem; font-family: var(--font-head); letter-spacing: 0.05em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qt-trader summary::-webkit-details-marker { display: none; }
.qt-trader summary::before { content: "▾"; color: var(--tan); font-size: 0.8rem; width: 12px; }
.qt-trader:not([open]) summary::before { content: "▸"; }
.qt-bar { flex: 0 0 120px; height: 5px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.qt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4e6442, var(--green)); }
.qt-sum { color: var(--muted); font-size: 0.82rem; font-family: var(--font-mono); }
.qt-sum b { color: var(--green); }

/* 트리 + 연결선(엘보) */
/* 사슬이 20단계를 넘는 트레이더(건스미스 등)가 있어 카드 안에서만 가로 스크롤시킨다 */
.qt-tree { list-style: none; margin: 12px 0 0; padding: 0; overflow-x: auto; }
.qt-tree ul { list-style: none; margin: 0; padding-left: 26px; }
.qt-node { position: relative; padding: 0; }
.qt-tree ul > .qt-node::before,
.qt-tree ul > .qt-node::after { content: ""; position: absolute; left: -14px; border-color: var(--border-strong); }
/* 세로 줄기 — 형제끼리 이어져 하나의 선처럼 보인다 */
.qt-tree ul > .qt-node::after { top: 0; bottom: 0; border-left: 1px solid var(--border-strong); }
.qt-tree ul > .qt-node:last-child::after { bottom: auto; height: 15px; }
/* 가로 가지 — 노드 상태에 따라 색이 달라져 사슬을 눈으로 따라갈 수 있다 */
.qt-tree ul > .qt-node::before { top: 15px; width: 12px; border-top: 1px solid var(--border-strong); }
.qt-node.is-done::before { border-top-color: #4e6442; }
.qt-node.is-avail::before { border-top-color: var(--gold); }
.qt-node.is-avail::before { width: 12px; }

/* 노드 한 줄 */
.qt-row { display: flex; align-items: center; gap: 7px; padding: 3px 8px 3px 2px; border-radius: 2px; flex-wrap: wrap; border: 1px solid transparent; transition: opacity 0.15s, background 0.15s; }
.qt-row:hover { background: var(--panel-hover); }
.qt-row.is-focus { border-color: var(--tan); background: rgba(154, 136, 102, 0.1); }
.qt-row.flash { animation: qtFlash 1.4s ease-out; }
@keyframes qtFlash {
  0%, 40% { background: rgba(212, 180, 106, 0.28); border-color: var(--gold); }
  100% { background: transparent; border-color: transparent; }
}

.qt-caret { background: none; border: none; color: var(--tan-dim); font-size: 0.7rem; width: 16px; padding: 0; line-height: 1; }
.qt-caret:hover:not(:disabled) { color: var(--tan-bright); }
.qt-caret:disabled { color: var(--border-strong); cursor: default; }
.qt-row input[type="checkbox"] { accent-color: var(--tan); }

.qt-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; border: 1px solid var(--border-strong); background: var(--panel-2); }
.qt-node.is-done > .qt-row .qt-dot, .qt-dot.is-done { background: var(--green); border-color: #4e6442; }
.qt-node.is-avail > .qt-row .qt-dot, .qt-dot.is-avail { background: var(--gold); border-color: #8a7440; box-shadow: 0 0 6px rgba(212, 180, 106, 0.45); }
.qt-node.is-locked > .qt-row .qt-dot, .qt-dot.is-locked { background: var(--panel-2); border-color: var(--red-deep); }

.qt-name { background: none; border: none; padding: 0; font-size: 0.9rem; color: var(--text); text-align: left; font-family: inherit; }
.qt-name:hover { color: var(--tan-bright); text-decoration: underline dotted; }
.qt-node.is-done > .qt-row .qt-name { color: var(--muted); text-decoration: line-through; }
.qt-node.is-avail > .qt-row .qt-name { color: var(--green); font-weight: 700; }

.qt-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); border: 1px solid var(--border); padding: 0 5px; border-radius: 2px; }
.qt-meta.kappa { color: var(--gold); border-color: #8a7440; }
.qt-lock { font-family: var(--font-mono); font-size: 0.72rem; color: var(--red); }
.qt-fold { font-family: var(--font-mono); font-size: 0.72rem; color: var(--tan); border: 1px solid var(--border-strong); padding: 0 5px; border-radius: 2px; }

/* 다른 트레이더로 넘어가는 연결 */
.qt-link { background: rgba(111, 142, 166, 0.08); border: 1px solid #43596b; color: var(--blue); font-family: var(--font-mono); font-size: 0.7rem; padding: 0 6px; border-radius: 2px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-link:hover { background: rgba(111, 142, 166, 0.22); color: var(--text-strong); }
.qt-link.in.no { color: var(--red); border-color: var(--red-deep); background: rgba(193, 91, 91, 0.08); }
.qt-link.in.ok { color: var(--green); border-color: #4e6442; background: rgba(127, 162, 106, 0.08); }
.qt-link.more { color: var(--muted); border-color: var(--border); background: none; cursor: help; }

.qt-ghost-li::before, .qt-ghost-li::after { opacity: 0.4; }
.qt-ghost { background: none; border: 1px dashed var(--border-strong); color: var(--tan-dim); font-size: 0.8rem; padding: 1px 8px; border-radius: 2px; }
.qt-ghost:hover { color: var(--tan-bright); border-color: var(--tan); }
.qt-ghost span { color: var(--muted); font-size: 0.72rem; font-family: var(--font-mono); }

/* 포커스 모드 — 사슬 밖은 흐리게 */
#tree-body.focus-on .qt-row:not(.in-chain) { opacity: 0.2; }
#tree-body.focus-on .qt-row:not(.in-chain):hover { opacity: 0.65; }
#tree-body.focus-on .qt-node:not(.is-done):not(.is-avail)::before { opacity: 0.5; }

/* 포커스 패널 — 선행 → 대상 → 후행 흐름도 */
.qt-focus { border: 1px solid var(--tan-dim); border-left: 3px solid var(--tan); background: linear-gradient(180deg, var(--panel), var(--bg-alt)); padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--shadow); }
.qt-focus-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.qt-focus-head strong { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: 0.04em; color: var(--text-strong); }
.qt-focus-tag { font-family: var(--font-mono); font-size: 0.7rem; color: #14140f; background: var(--tan); padding: 1px 7px; letter-spacing: 0.08em; }
.qt-focus-stat { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }
.qt-focus-opt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.8rem; margin-left: auto; white-space: nowrap; }
.qt-focus-opt input { accent-color: var(--tan); }

.qt-flow { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 6px 0 10px; }
.qt-fcol { display: flex; flex-direction: column; gap: 4px; min-width: 150px; flex: 0 0 auto; padding: 6px; border: 1px dashed var(--border); border-radius: 2px; background: rgba(0, 0, 0, 0.18); }
/* 대상은 오른쪽 끝에 고정 — 선행 사슬이 길어 가로 스크롤이 생겨도 항상 보인다 */
.qt-fcol.target { border-style: solid; border-color: var(--tan); background: #1c1a14; position: sticky; right: 0; box-shadow: -12px 0 14px -6px rgba(0, 0, 0, 0.75); }
.qt-fcap { font-family: var(--font-mono); font-size: 0.68rem; color: var(--tan-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.qt-fcol.target .qt-fcap { color: var(--tan-bright); }
.qt-farrow { align-self: center; color: var(--tan-dim); font-size: 0.9rem; flex: 0 0 auto; }
.qt-fmore { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); padding-left: 2px; }
.qt-fnone { color: var(--muted); font-size: 0.85rem; padding: 2px 0 6px; }

.qt-fchip { display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left; width: 100%; background: var(--panel-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--border-strong); color: var(--text); font-family: inherit; font-size: 0.8rem; line-height: 1.25; padding: 3px 7px; border-radius: 2px; }
.qt-fchip em { font-style: normal; font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); }
.qt-fchip:hover { border-color: var(--tan); color: var(--text-strong); }
.qt-fchip.is-done { border-left-color: var(--green); color: var(--muted); }
.qt-fchip.is-avail { border-left-color: var(--gold); color: var(--green); font-weight: 700; }
.qt-fchip.is-locked { border-left-color: var(--red-deep); }
.qt-fchip.target { border-color: var(--tan); background: rgba(154, 136, 102, 0.16); }

.qt-fnext { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: 8px; }
.qt-fnext .qt-fchip { width: auto; min-width: 130px; }

@media (max-width: 640px) {
  .qt-tree ul { padding-left: 16px; }
  .qt-tree ul > .qt-node::before,
  .qt-tree ul > .qt-node::after { left: -9px; }
  .qt-tree ul > .qt-node::before { width: 7px; }
  .qt-link { max-width: 150px; }
  .tree-count { margin-left: 0; }
  .qt-focus-opt { margin-left: 0; }
}

/* ---------- 퀘스트 상세 — 스크린샷 확인 기록 ---------- */
.quest-record { border: 1px dashed var(--border-strong); border-left: 3px solid var(--gold); padding: 8px 12px; margin: 8px 0; background: rgba(212, 180, 106, 0.04); font-size: 0.85rem; }
.quest-record-head { color: var(--gold); font-family: var(--font-mono); font-size: 0.78rem; margin-bottom: 4px; }
.quest-record .qr-label { color: var(--tan-bright); font-weight: 700; margin-top: 6px; font-size: 0.8rem; }
.quest-record ul { margin: 2px 0 0 18px; }
.quest-record li { color: var(--text); margin-bottom: 2px; }
.qr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
@media (max-width: 720px) { .qr-cols { grid-template-columns: 1fr; } }
.qr-note { color: var(--muted); margin-top: 2px; }

/* ---------- 배틀패스 문서 파밍 (documents.html) ---------- */
.bp-list { margin: 2px 0 0 18px; }
.bp-list li { margin-bottom: 4px; line-height: 1.5; }
.bp-caps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bp-cap { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); border: 1px solid var(--border); background: var(--panel-2); padding: 4px 10px; border-radius: var(--radius); }
.bp-cap strong { color: var(--tan-bright); }
.bp-cap.mine { border-color: var(--gold); color: var(--gold); }
.bp-cap.mine strong { color: var(--gold); }
.bp-map { margin-bottom: 12px; }
.bp-map-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bp-map-head h3 { margin: 0; font-size: 1.02rem; color: var(--tan-bright); }

/* ---------- 문서 스폰 마커 레이어 (maps.html) ---------- */
.dm-layer {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  pointer-events: none;
  --dm-inv: 1;
}
.dm-marker {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--dm-inv));
  transform-origin: 50% 50%;
  pointer-events: auto;
  cursor: pointer;
}
.dm-dot {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); border: 2px solid #1a1a16;
  box-shadow: 0 0 0 2px rgba(212, 180, 106, 0.35), 0 2px 6px rgba(0,0,0,0.6);
}
.dm-marker.dm-local .dm-dot { background: var(--blue); box-shadow: 0 0 0 2px rgba(90, 150, 210, 0.35); }
.dm-marker.dm-sel .dm-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(120, 190, 120, 0.5); }
.dm-marker.dm-flash .dm-dot { animation: dm-pulse 0.4s ease-in-out 3; }
@keyframes dm-pulse { 50% { transform: scale(1.8); } }
/* hover 카드 — 마커 위에 뜨고, 확대 배율과 무관하게 일정 크기 */
.dm-card {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 260px; display: none; z-index: 5;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold); border-radius: var(--radius);
  padding: 8px 10px; font-size: 0.82rem; line-height: 1.45;
  box-shadow: 0 6px 20px rgba(0,0,0,0.55);
}
.dm-marker:hover .dm-card, .dm-marker.dm-open .dm-card { display: block; }
.dm-marker:hover, .dm-marker.dm-open { z-index: 6; }
.dm-card-head { color: var(--tan-bright); font-weight: 700; margin-bottom: 2px; }
.dm-card-detail { color: var(--muted); margin-bottom: 6px; }
.dm-shot { display: block; width: 100%; border: 1px solid var(--border); border-radius: 2px; margin-bottom: 4px; }
.dm-noshot { color: var(--muted); font-size: 0.76rem; border: 1px dashed var(--border); border-radius: 2px; padding: 6px; margin-bottom: 4px; }
.dm-noshot code { font-size: 0.72rem; color: var(--tan-bright); }
.dm-card-foot { color: var(--muted); font-size: 0.74rem; }
/* 아래쪽 패널 */
.dm-panel { border-radius: 0; border-top: none; }
.dm-panel-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.dm-edit-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.85rem; margin-left: auto; }
.dm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-chip {
  font: inherit; font-size: 0.8rem; cursor: pointer;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 3px 9px;
}
.dm-chip.on { color: var(--tan-bright); border-color: var(--border-strong); }
.dm-chip.sel { border-color: var(--green); color: var(--green); }
.dm-chip:hover { border-color: var(--gold); }
.bp-maplink { margin-left: auto; font-size: 0.82rem; white-space: nowrap; }

/* ---------- 퀘스트 동선 플래너 (maps.html · js/route-planner.js) ---------- */
/* 지도 위 레이어 — 이미지와 같은 transform을 받는다 */
.rp-base, .rp-layer {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.rp-layer { --rp-inv: 1; }
.rp-svg { position: absolute; top: 0; left: 0; overflow: visible; }
/* 선 굵기는 화면 기준으로 일정하게 — 부모 div의 CSS scale은 non-scaling-stroke가 못 잡아서 --rp-inv로 보정 */
#rp-zones polygon {
  fill: var(--c); fill-opacity: 0.16;
  stroke: var(--c); stroke-width: calc(1.5px * var(--rp-inv));
  stroke-dasharray: calc(5px * var(--rp-inv)) calc(4px * var(--rp-inv));
}
#rp-zones polygon.big { fill-opacity: 0.05; stroke-opacity: 0.55; }
/* 처치 지정 구역 — "이 안에서만 잡아야 한다"는 뜻이라 커도 또렷하게 */
#rp-zones polygon.kill {
  fill-opacity: 0.1;
  stroke-width: calc(2.5px * var(--rp-inv));
  stroke-dasharray: calc(10px * var(--rp-inv)) calc(5px * var(--rp-inv));
}
.rp-line, .rp-line-under { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rp-line { stroke-width: calc(3.5px * var(--rp-inv)); }
.rp-line-under { stroke: rgba(0, 0, 0, 0.6); stroke-width: calc(7px * var(--rp-inv)); }
/* 도형 마커 — 사각형 · 원 · 삼각형 */
.rp-shape, .rp-shape-under { stroke-linejoin: round; }
.rp-shape { fill: var(--c); fill-opacity: 0.12; stroke: var(--c); stroke-width: calc(3px * var(--rp-inv)); }
.rp-shape-under { fill: none; stroke: rgba(0, 0, 0, 0.6); stroke-width: calc(6.5px * var(--rp-inv)); }

/* 퀘스트 목표 마커 — 확대 배율과 무관하게 일정 크기 */
.rp-marker, .rp-exit {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--rp-inv));
  transform-origin: 50% 50%;
  pointer-events: auto;
}
.rp-marker { z-index: 2; cursor: default; }
.rp-marker:hover { z-index: 6; }
.rp-marker.dim { opacity: 0.32; }
.rp-pin {
  display: grid; place-items: center;
  min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 13px; border: 2px solid #111;
  background: var(--c); color: #111;
  font: 700 12px/1 var(--font-mono);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.6);
}
.rp-marker.flash .rp-pin { animation: rp-pulse 0.45s ease-in-out 4; }
@keyframes rp-pulse { 50% { transform: scale(1.8); } }
.rp-card {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 280px; display: none;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 8px 10px; font-size: 0.82rem; line-height: 1.45; color: var(--text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}
.rp-marker:hover .rp-card { display: block; }
.rp-layer.drawing .rp-card { display: none !important; }
.rp-card-item { border-left: 3px solid var(--c); padding-left: 8px; }
.rp-card-item + .rp-card-item { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.rp-card-head { color: var(--text-strong); font-weight: 700; margin-bottom: 3px; }
.rp-card-foot { color: var(--muted); font-size: 0.74rem; margin-top: 4px; }
/* 지도 위 퀘스트 이름표 — 선택한 퀘스트를 색·이름으로 구분한다 (우측 패널 토글) */
.rp-mlabel {
  position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  display: none; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; line-height: 1.5; color: var(--text-strong);
  background: rgba(10, 10, 8, 0.86); border: 1px solid var(--c); border-left-width: 3px;
  border-radius: 2px; padding: 0 4px;
}
.rp-layer.rp-names .rp-mlabel { display: block; }
.rp-layer.drawing .rp-mlabel { display: none; }
/* 우측 패널에서 퀘스트에 마우스를 올리면 그 퀘스트 마커만 남긴다 */
.rp-layer.rp-hl .rp-marker:not(.hl) { opacity: 0.18; }
.rp-layer.rp-hl .rp-exit { opacity: 0.3; }
.rp-marker.hl { z-index: 5; }
.rp-marker.hl .rp-pin { box-shadow: 0 0 0 3px var(--text-strong), 0 2px 8px rgba(0, 0, 0, 0.7); }
.rp-marker.hl .rp-mlabel { display: block; }

/* 탈출구 — PMC 초록 · 스캐브 파랑 · 공용 금색 */
.rp-exit { z-index: 1; }
.rp-exit-pmc { --ec: #6ee07a; }
.rp-exit-scav { --ec: #5fb7e5; }
.rp-exit-shared { --ec: #e8b64c; }
.rp-exit-dot {
  display: block; width: 12px; height: 12px;
  background: var(--ec); border: 2px solid #111;
  transform: rotate(45deg);
}
.rp-exit-name {
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  display: none; white-space: nowrap;
  font-size: 11px; color: var(--text-strong);
  background: rgba(10, 10, 8, 0.85); border: 1px solid var(--ec); border-radius: 2px;
  padding: 1px 5px;
}
.rp-exit-name small { color: var(--ec); margin-left: 4px; font-size: 10px; }
.rp-exit:hover { z-index: 6; }
.rp-exit:hover .rp-exit-name, .rp-layer.rp-zoomed .rp-exit-name { display: block; }

/* 커서 — 펜은 십자, 지우개는 셀 */
.iv-stage.rp-pen, .iv-stage.rp-pen .rp-marker, .iv-stage.rp-pen .rp-exit { cursor: crosshair; }
.iv-stage.rp-erase, .iv-stage.rp-erase .rp-marker, .iv-stage.rp-erase .rp-exit { cursor: cell; }

/* 지도 위 도구 막대 */
.rp-tools {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  max-width: calc(100% - 20px);
  cursor: default;
}

/* 팀원과 같이 보기 (js/room.js) */
.rp-room {
  margin-bottom: 10px; padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--green); border-radius: var(--radius);
}
.rm-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 5px;
  font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.05em; color: var(--green);
}
.rm-head .rp-mini { margin-left: auto; }
.rm-head .rp-mini + .rp-mini { margin-left: 0; }
.rm-code {
  font-family: var(--font-mono); font-size: 0.95rem; letter-spacing: 0.14em;
  color: var(--text-strong); background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-strong); border-radius: 2px; padding: 0 6px;
}
.rm-note { font-size: 0.78rem; color: var(--muted); margin: 5px 0 7px; }
.rm-note strong { color: var(--tan-bright); }
.rm-err { font-size: 0.78rem; color: var(--red); margin-top: 6px; }
.rm-form { display: flex; gap: 5px; margin-bottom: 7px; }
.rm-form .input { flex: 1; min-width: 0; font-size: 0.85rem; padding: 5px 8px; }
.rm-form #rm-code { flex: 0 0 110px; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.rm-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.rm-peers { display: flex; flex-wrap: wrap; gap: 5px; }
.rm-peer {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border); border-radius: 2px; padding: 1px 7px;
}
.rm-peer.me { border-color: var(--border-strong); color: var(--text-strong); }
.rm-peer i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
/* 팀원이 지금 긋고 있는 선 */
.rm-ghost {
  fill: none; stroke: var(--c); stroke-opacity: 0.65;
  stroke-width: calc(3.5px * var(--rp-inv));
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: calc(7px * var(--rp-inv)) calc(5px * var(--rp-inv));
}

/* 2D·3D 지도 좌표 맞추기 (js/map-calib.js) */
.rp-calib {
  margin-bottom: 10px; padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--blue); border-radius: var(--radius);
}
.mc-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
  font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.05em; color: var(--blue);
}
.mc-head .rp-mini { margin-left: auto; }
.mc-help { font-size: 0.78rem; color: var(--muted); margin-bottom: 7px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 4px; max-height: 148px; overflow: auto; margin-bottom: 7px; }
.mc-chip {
  font: inherit; font-size: 0.76rem; cursor: pointer;
  padding: 2px 7px; color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border); border-radius: 2px;
}
.mc-chip:hover { border-color: var(--blue); }
.mc-chip.done { color: var(--green); border-color: #4e6442; }
.mc-chip.active { color: #111; background: var(--blue); border-color: var(--blue); }
.mc-status { font-size: 0.78rem; color: var(--muted); margin-bottom: 7px; }
.mc-status strong { color: var(--tan-bright); }
.mc-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.mc-out {
  width: 100%; margin-top: 7px; padding: 6px;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 2px; resize: vertical;
}
/* 맞추는 중 지도에 찍히는 기준점 핀 */
.mc-pin { position: absolute; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; }
.mc-pin span {
  display: block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--blue); border: 2px solid #0e0e0b; box-shadow: 0 0 0 1px var(--blue);
}
.mc-pin em {
  position: absolute; left: 12px; top: -3px; white-space: nowrap;
  font-style: normal; font-size: 0.68rem; color: var(--blue);
  background: rgba(14, 14, 11, 0.88); padding: 0 4px; border-radius: 2px;
}

/* 처치 조건 오버레이 — 지도 왼쪽 아래. 맵 전역 처치처럼 찍을 위치가 없는 목표도 여기 뜬다 */
.rp-kills {
  position: absolute; left: 10px; bottom: 10px; z-index: 3;
  max-width: min(460px, calc(100% - 20px)); max-height: 42%;
  overflow: auto; cursor: default;
  padding: 7px 9px 8px;
  background: rgba(14, 14, 11, 0.92);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--red);
  border-radius: var(--radius);
}
.rp-kill-h {
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
  font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--red);
}
.rp-kill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rp-kill-list li {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  padding: 3px 5px; border-radius: 2px; font-size: 0.8rem;
}
.rp-kill-list li.has-pos { cursor: pointer; }
.rp-kill-list li.has-pos:hover { background: var(--panel-hover); }
.rp-kill-t { color: var(--text-strong); }
.rp-kcs { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rp-kc {
  font-size: 0.72rem; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--border); border-radius: 2px; padding: 0 5px;
}
.rp-kc.w { color: var(--red); border-color: var(--red-deep); }
.rp-kc.area { color: var(--tan-bright); border-style: dashed; }
.rp-seg, .rp-floors {
  display: flex; align-items: stretch;
  background: rgba(14, 14, 11, 0.9);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  overflow: hidden;
}
.rp-seg button, .rp-floors button {
  font: inherit; font-size: 0.95rem;
  min-width: 36px; height: 34px; padding: 0 9px;
  background: transparent; color: var(--text);
  border: none; border-right: 1px solid var(--border);
  cursor: pointer;
}
.rp-seg button:last-child, .rp-floors button:last-child { border-right: none; }
.rp-seg button.active, .rp-floors button.active { background: var(--tan); color: #14140f; }
.rp-seg button:hover:not(.active):not(:disabled), .rp-floors button:hover:not(.active) { background: var(--panel-hover); }
.rp-seg button:disabled { opacity: 0.35; cursor: default; }
.rp-swatches button { min-width: 30px; padding: 0; display: grid; place-items: center; }
.rp-swatches button::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: var(--c); border: 2px solid #111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.rp-swatches button.active { background: transparent; }
.rp-swatches button.active::before { box-shadow: 0 0 0 2px var(--text-strong); }
.rp-len {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-strong);
  background: rgba(14, 14, 11, 0.9); border: 1px solid var(--border);
  border-radius: 2px; padding: 4px 8px;
}
.rp-len:empty { display: none; }
.rp-floors { position: absolute; top: 10px; right: 10px; z-index: 3; }
.rp-floors button { font-size: 0.82rem; }
@media (max-width: 700px) {
  .rp-floors { top: auto; bottom: 10px; }
}
.rp-floors-label {
  display: grid; place-items: center; padding: 0 8px;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  border-right: 1px solid var(--border);
}
.rp-toast {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 4;
  background: rgba(14, 14, 11, 0.94); border: 1px solid var(--tan); border-radius: var(--radius);
  color: var(--text-strong); font-size: 0.85rem; padding: 6px 12px;
  pointer-events: none; white-space: nowrap;
}

/* 3단 작업 영역 — 좌: 상인별 퀘스트 · 중앙: 지도 · 우: 선택한 퀘스트 */
.rp-work {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr) 330px;
  /* 2행: 지도 아래 "필요한 아이템" 띠. 좌·우 칸은 1행에만 둔다 */
  grid-template-rows: minmax(420px, 72vh) auto;
  gap: 10px;
  align-items: stretch;
}
.rp-work > .iv-stage { grid-area: 1 / 2; height: auto; min-height: 0; border-radius: var(--radius); }
.rp-work > .rp-col-left { grid-area: 1 / 1; }
.rp-work > .rp-col-right { grid-area: 1 / 3; }
.rp-work > .rp-need-bar { grid-area: 2 / 2; }
.rp-col {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  overflow: hidden;
}
.rp-col-head {
  display: flex; flex-direction: column; gap: 7px;
  padding: 9px 11px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.rp-col-head h3 {
  margin: 0; font-size: 0.95rem; display: flex; align-items: center; gap: 7px;
}
.rp-col-head .input { width: 100%; font-size: 0.85rem; padding: 5px 8px; }
.rp-count {
  font: 700 0.72rem/1 var(--font-mono); color: #14140f;
  background: var(--tan); border-radius: 9px; padding: 3px 7px;
}
.rp-count.zero { background: var(--border-strong); color: var(--muted); }
.rp-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.rp-opt { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--muted); white-space: nowrap; cursor: pointer; }
.rp-opt input { accent-color: var(--tan); }
.rp-mini {
  font: inherit; font-size: 0.76rem; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 2px; padding: 2px 7px;
}
.rp-mini:hover { border-color: var(--gold); }
.rp-mini.primary { color: var(--tan-bright); border-color: var(--border-strong); }
.rp-col-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 10px 12px; }
.rp-list-head { font-size: 0.8rem; color: var(--tan-bright); margin-bottom: 8px; }
.rp-sub { color: var(--muted); }
.rp-empty { color: var(--muted); font-size: 0.85rem; margin: 2px 0 10px; }

/* 좌 — 상인 아코디언 */
.rp-tr { border-bottom: 1px solid var(--border); }
.rp-tr-head {
  display: flex; align-items: center; gap: 7px; width: 100%;
  font: inherit; font-size: 0.86rem; text-align: left; cursor: pointer;
  background: none; color: var(--text); border: none; padding: 7px 2px;
}
.rp-tr-head:hover { color: var(--tan-bright); }
.rp-tr-caret { color: var(--muted); font-size: 0.7rem; transition: transform 0.12s; }
.rp-tr.open .rp-tr-caret { transform: rotate(90deg); }
.rp-tr-av {
  display: grid; place-items: center; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--c); color: #14140f; font: 700 11px/1 var(--font-mono);
}
.rp-tr-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-tr-sel {
  font: 700 0.68rem/1 var(--font-mono); color: #14140f;
  background: var(--gold); border-radius: 8px; padding: 3px 6px;
}
.rp-tr-n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.rp-tr-body { display: none; padding: 0 0 7px 8px; }
.rp-tr.open .rp-tr-body { display: grid; gap: 2px; }
.rp-q {
  display: flex; align-items: center; gap: 6px; width: 100%;
  font: inherit; font-size: 0.82rem; text-align: left; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px;
}
.rp-q small { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); flex-shrink: 0; }
.rp-q:hover { border-color: var(--gold); }
.rp-q.done { opacity: 0.5; }
.rp-q.on { border-color: var(--c); color: var(--text-strong); background: rgba(0, 0, 0, 0.3); box-shadow: inset 3px 0 0 var(--c); }
.rp-q-mark { flex-shrink: 0; width: 17px; text-align: center; font-size: 0.72rem; color: var(--muted); }
.rp-q-mark b {
  display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--c); color: #111; font: 700 0.7rem/1 var(--font-mono);
}
.rp-q-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-q-map { flex-shrink: 0; font-size: 0.68rem; color: var(--muted); border: 1px solid var(--border); border-radius: 2px; padding: 0 4px; }

/* 우 — 선택한 퀘스트 */
.rp-hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border: 1px dashed var(--border-strong); border-radius: 2px;
  padding: 7px 10px; margin-bottom: 10px;
  font-size: 0.82rem; color: var(--muted);
}
.rp-hint strong { color: var(--tan-bright); }
.rp-sel {
  border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: 2px;
  background: rgba(0, 0, 0, 0.18);
  padding: 8px 10px; margin-bottom: 8px;
}
.rp-sel.hl { background: rgba(0, 0, 0, 0.35); border-color: var(--c); }
.rp-sel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-sel-head strong { color: var(--text-strong); font-size: 0.92rem; }
.rp-letter {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--c); color: #111; font: 700 12px/1 var(--font-mono);
}
.rp-sel-btns { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.rp-link { font-size: 0.78rem; }
.rp-x {
  font: inherit; font-size: 0.78rem; cursor: pointer;
  background: none; color: var(--muted);
  border: 1px solid var(--border); border-radius: 2px; padding: 0 6px;
}
.rp-x:hover { color: var(--tan-bright); border-color: var(--gold); }
.rp-x.rp-del:hover { color: var(--red); border-color: var(--red); }
.rp-sel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; }
.rp-objs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.rp-objs li { display: flex; align-items: baseline; gap: 8px; font-size: 0.83rem; padding: 3px 6px; border-radius: 2px; flex-wrap: wrap; row-gap: 2px; }
.rp-objs li.has-pos { cursor: pointer; }
.rp-objs li.has-pos:hover { background: var(--panel-hover); }
.rp-objs li.other { opacity: 0.6; }
.rp-onum {
  flex-shrink: 0; min-width: 28px; text-align: center;
  font: 700 11px/1.5 var(--font-mono); color: #111;
  background: var(--c); border-radius: 8px; padding: 0 5px;
}
.rp-otext { flex: 1; flex-basis: calc(100% - 44px); }
.rp-otext em { font-style: normal; color: var(--muted); }
.rp-otype { flex-shrink: 0; margin-left: 36px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.rp-otag {
  flex-shrink: 0; font-size: 0.72rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 2px; padding: 0 5px;
}
.rp-otag.here { color: var(--gold); border-color: #8a7440; }
.rp-otag.none { border-style: dashed; }

/* 퀘스트 진행에 필요한 아이템 (선택한 퀘스트 카드 + 지도 아래 띠)
   그룹마다 색(--gc)을 하나씩 물려서 칩·라벨·구분선이 같은 색으로 묶이게 한다 */
.g-key { --gc: var(--gold); }
.g-bring { --gc: var(--tan-bright); }
.g-find { --gc: var(--blue); }
.g-give { --gc: var(--green); }
.g-gear { --gc: var(--red); }
.g-build { --gc: var(--muted); }

.rp-need { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--border); }
.rp-need-h {
  font-family: var(--font-head); font-size: 0.76rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
/* 그룹 이름은 칩 위 한 줄 — 좁은 패널(330px)에서 왼쪽 칸으로 두면 칩이 한 줄에 하나씩만 들어간다.
   왼쪽 색 띠로 어디부터 어디까지가 한 그룹인지 확실히 갈라 둔다 */
.rp-igroup { margin-bottom: 7px; padding: 1px 0 2px 7px; border-left: 2px solid var(--gc); }
.rp-igroup:last-child { margin-bottom: 0; }
.rp-igroup-h {
  display: block; margin-bottom: 3px;
  font-size: 0.75rem; letter-spacing: 0.02em; color: var(--gc);
}
.rp-items { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.rp-item {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 2px 7px 2px 3px; font-size: 0.79rem;
  color: var(--text); background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border); border-radius: 2px;
  /* 그룹 색을 테두리에 옅게 섞는다 (지원 안 되면 위의 --border 그대로) */
  border-color: color-mix(in srgb, var(--gc, var(--border)) 42%, var(--border));
}
.rp-item img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.rp-item-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-item-c { flex-shrink: 0; font-family: var(--font-mono); color: var(--tan-bright); }
.rp-item-f {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--green); border: 1px solid #4e6442; border-radius: 2px; padding: 0 3px;
}
.rp-item-q {
  flex-shrink: 0; margin-left: 1px; padding: 0 3px;
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--gc, var(--muted)); background: rgba(0, 0, 0, 0.4); border-radius: 2px;
}
.rp-item.alt { padding: 3px 7px; color: var(--muted); border-style: dashed; }
/* "이것들 중 아무거나" — 따로 세는 물건으로 읽히지 않게 묶어 둔다 */
.rp-alt {
  flex-basis: 100%; padding: 4px 6px 5px;
  border: 1px dashed var(--border-strong); border-radius: 2px;
  border-color: color-mix(in srgb, var(--gc, var(--border-strong)) 42%, var(--border-strong));
}
.rp-alt-h {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  margin-bottom: 4px; font-size: 0.74rem; color: var(--muted);
}
.rp-alt .rp-items { gap: 3px; }
.rp-alt .rp-item { background: rgba(0, 0, 0, 0.35); }
/* 지도 아래 띠 — 고른 퀘스트의 필요 아이템을 그룹별로 한 줄에 모은다 */
.rp-need-bar {
  padding: 7px 10px 8px;
  background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.rp-nb-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px;
  font-family: var(--font-head); font-size: 0.82rem; letter-spacing: 0.06em;
}
.rp-nb-head strong { color: var(--tan-bright); }
.rp-nb-note {
  margin-left: auto; font-family: var(--font-body); font-size: 0.75rem;
  letter-spacing: 0; color: var(--muted);
}
/* 그룹마다 한 층(row) — 왼쪽 색 띠 + 구분선으로 어디까지가 한 묶음인지 확실히 갈라 둔다.
   너무 길어져 지도가 밀리지 않게, 넘치면 이 안에서 스크롤 */
.rp-nb-body { display: flex; flex-direction: column; max-height: 220px; overflow: auto; }
.rp-nb-body[hidden] { display: none; }
/* 잘린 층이 있으면 아래를 흐리게 — 반쯤 걸친 줄이 깨져 보이지 않게 (has-more 는 JS가 붙인다) */
.rp-need-bar.has-more .rp-nb-body {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
}
.rp-nb-group {
  display: grid; grid-template-columns: 136px minmax(0, 1fr);
  gap: 4px 8px; align-items: start;
  padding: 5px 0 5px 8px;
  border-left: 3px solid var(--gc);
  border-top: 1px solid var(--border);
}
.rp-nb-group:first-child { border-top: none; padding-top: 1px; }
.rp-nb-group:last-child { padding-bottom: 1px; }
.rp-nb-label {
  display: flex; align-items: center; gap: 5px; padding-top: 3px;
  font-size: 0.76rem; color: var(--gc);
}
.rp-nb-n {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 2px; padding: 0 4px;
}
.rp-nb-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
/* 띠 안에서는 대안 묶음도 줄을 차지하지 않고 칩처럼 나란히 선다 */
.rp-nb-chips .rp-alt { flex-basis: auto; display: flex; align-items: center; gap: 6px; padding: 3px 6px; }
.rp-nb-chips .rp-alt-h { margin-bottom: 0; }

@media (max-width: 560px) {
  /* 라벨 칸을 두기엔 좁다 — 층 이름을 칩 위로 올린다 */
  .rp-nb-group { grid-template-columns: minmax(0, 1fr); }
  .rp-nb-label { padding-top: 0; }
}
.rp-source { margin: 8px 2px 12px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.inline-viewer > .iv-info { border-top: 1px solid var(--border); }

/* ---------- 전체화면 ----------
   지도가 화면 전체를 차지하고, 맵·2D/3D 탭과 퀘스트 패널은 그 위에 떠 있는다.
   (예전에는 3단 그리드 그대로라 지도가 화면의 절반밖에 못 썼다) */
.inline-viewer.iv-fullscreen {
  /* 넓은 화면용 width·margin-left를 되돌린다 (위 미디어쿼리) */
  position: fixed; inset: 0; z-index: 400; width: auto; margin: 0;
  display: block;
  padding: 0;
  background: #0a0a08;
  overflow: hidden;
}
/* 지도 = 화면 전체 */
.iv-fullscreen > .rp-work {
  display: block; position: absolute; inset: 0; gap: 0;
}
.iv-fullscreen .rp-work > .iv-stage {
  position: absolute; inset: 0;
  height: auto; min-height: 0; border: none; border-radius: 0;
}

/* 지도 위에 뜨는 것들의 공통 판 */
.iv-fullscreen > .board-tabs,
.iv-fullscreen > .mode-row,
.iv-fullscreen .rp-col,
.iv-fullscreen > .rp-work > .rp-need-bar {
  background: rgba(14, 14, 11, 0.86);
  backdrop-filter: blur(7px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 위 — 맵 탭 / 2D·3D 탭 */
.iv-fullscreen > .board-tabs,
.iv-fullscreen > .mode-row {
  position: absolute; left: 10px; right: 10px; z-index: 6;
  margin: 0; padding: 5px 8px;
  max-height: 84px; overflow-y: auto;
}
.iv-fullscreen > .board-tabs { top: 8px; }
.iv-fullscreen > .mode-row { top: 60px; }
.iv-fullscreen > .mode-row > .mode-hint { display: none; }

/* 좌우 — 퀘스트 패널 (지도 위에 떠 있다) */
.iv-fullscreen .rp-work > .rp-col {
  position: absolute; top: 112px; bottom: 10px; z-index: 5;
}
.iv-fullscreen .rp-work > .rp-col-left { left: 10px; width: 286px; }
.iv-fullscreen .rp-work > .rp-col-right { right: 10px; width: 330px; }
/* 접기 — 상단 바의 ◧ ◨ 버튼 */
.iv-fullscreen.rp-hide-left .rp-work > .rp-col-left,
.iv-fullscreen.rp-hide-right .rp-work > .rp-col-right { display: none; }

/* 아래 — 필요한 아이템 띠. 좌우 패널을 피해 가운데에 둔다 */
.iv-fullscreen > .rp-work > .rp-need-bar {
  position: absolute; left: 306px; right: 350px; bottom: 10px; z-index: 5;
  padding: 4px 8px;
}
.iv-fullscreen.rp-hide-left > .rp-work > .rp-need-bar { left: 10px; }
.iv-fullscreen.rp-hide-right > .rp-work > .rp-need-bar { right: 10px; }
.iv-fullscreen .rp-nb-body { max-height: 96px; }

/* 지도 위 도구 막대·층 선택이 떠 있는 패널과 겹치지 않게 */
.iv-fullscreen .rp-tools { top: 118px; left: 306px; max-width: calc(100% - 660px); }
.iv-fullscreen.rp-hide-left .rp-tools { left: 10px; }
.iv-fullscreen .rp-floors { top: 118px; }

.iv-fullscreen > .iv-info, .iv-fullscreen > .dm-panel,
.iv-fullscreen > .mapviewer-help, .iv-fullscreen > .rp-source { display: none; }

/* 전체화면에서만 보이는 패널 접기 버튼 */
.iv-btns { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
#iv-panel-left, #iv-panel-right { display: none; }
.iv-fullscreen #iv-panel-left, .iv-fullscreen #iv-panel-right { display: inline-block; }
.iv-fullscreen #iv-panel-left.off, .iv-fullscreen #iv-panel-right.off { color: var(--muted); border-color: var(--border); }

@media (max-width: 1240px) {
  .rp-work { grid-template-columns: 240px minmax(0, 1fr) 286px; }
}
@media (max-width: 1040px) {
  /* 좁은 화면: 지도 → 선택한 퀘스트 → 퀘스트 고르기 순으로 쌓는다 */
  .rp-work { display: flex; flex-direction: column; }
  .rp-work > .iv-stage { order: 0; height: 58vh; min-height: 300px; }
  .rp-work > .rp-need-bar { order: 1; }
  /* 세로로 쌓이는 화면에서는 페이지가 이미 스크롤되니 띠 안에서 또 스크롤하지 않는다 */
  .rp-nb-body { max-height: none; }
  .rp-col-right { order: 2; }
  .rp-col-left { order: 3; }
  .rp-col { flex: 0 0 auto; max-height: 46vh; }
  /* 좁은 화면 전체화면: 지도는 화면 전체, 패널은 위에서 덮는 서랍 (기본 접힘) */
  .iv-fullscreen > .rp-work { display: block; overflow: visible; }
  .iv-fullscreen .rp-work > .iv-stage { position: absolute; inset: 0; flex: none; height: auto; min-height: 0; }
  .iv-fullscreen .rp-work > .rp-col { max-height: none; width: min(86vw, 340px); }
  .iv-fullscreen > .rp-work > .rp-need-bar { left: 10px; right: 10px; }
  .iv-fullscreen .rp-tools { left: 10px; max-width: calc(100% - 20px); }
  .iv-fullscreen .rp-nb-body { max-height: 90px; }
}

/* ---------- 퀘스트 보상 검색 (rewards.html) ---------- */
.rw-item { margin-bottom: 12px; }
.rw-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rw-item-head h3 { margin: 0; font-size: 1.02rem; color: var(--tan-bright); }
.rw-item .table-wrap { border: none; background: transparent; }
.rw-item table.data { min-width: 520px; }

/* ---------- 총기 빌드 추천 (builds.html) ---------- */
.gb-list {
  display: grid; gap: 6px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gb-card {
  display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer;
  font: inherit; color: var(--text);
  padding: 7px 10px 7px 7px;
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--tan-dim); border-radius: var(--radius);
}
.gb-card:hover { border-color: var(--tan); background: var(--panel-hover); }
.gb-card.active { border-left-color: var(--gold); background: var(--panel-2); }
.gb-card img { flex-shrink: 0; object-fit: contain; }
.gb-card-b { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gb-card-n { color: var(--text-strong); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-card-m { font-size: 0.76rem; color: var(--muted); }
.gb-card-p { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--tan-bright); }

.gb-detail { margin-bottom: 16px; }
.gb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gb-head img { object-fit: contain; }
.gb-head h2 { font-size: 1.15rem; color: var(--text-strong); }
.gb-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.gb-tabs { margin-bottom: 12px; }

.gb-sum { margin-bottom: 12px; }
.gb-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; font-size: 0.82rem; }
.gb-bar-l { flex: 0 0 72px; color: var(--muted); }
.gb-bar-t { flex: 1; height: 9px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.gb-bar-t i { display: block; height: 100%; }
.gb-bar-t i.ergo { background: var(--green); }
.gb-bar-t i.rec { background: var(--red); }
.gb-bar-v { flex: 0 0 62px; text-align: right; font-family: var(--font-mono); color: var(--text-strong); }
.gb-sum-n { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.gb-chip {
  font-size: 0.78rem; color: var(--muted); padding: 1px 8px;
  border: 1px solid var(--border); border-radius: 2px;
}
.gb-chip.good { color: var(--green); border-color: #4e6442; }

.gb-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gb-part {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 9px 5px 5px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--border); border-radius: 2px;
}
.gb-part img { flex-shrink: 0; object-fit: contain; }
.gb-part-b { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gb-part-n { color: var(--text-strong); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-part-s { display: flex; flex-wrap: wrap; gap: 7px; font-size: 0.75rem; color: var(--muted); }
.gb-part-s em { font-style: normal; color: var(--tan-dim); }
.gb-part-s .up { color: var(--green); }
.gb-part-s .down { color: var(--red); }
.gb-part-p {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--tan-bright);
}
.gb-src { font-family: var(--font-body); font-size: 0.7rem; color: var(--muted); }
.gb-src.tr { color: var(--blue); }

.gb-slots { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 12px; }
.gb-slots h3 { font-size: 1rem; margin-bottom: 4px; }
.gb-slot { display: flex; align-items: flex-start; gap: 9px; margin-top: 8px; }
.gb-slot-n { flex: 0 0 96px; font-size: 0.82rem; color: var(--gold); padding-top: 4px; }
.gb-opts { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.gb-opt {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px 2px 3px; font-size: 0.78rem; color: var(--text);
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); border-radius: 2px;
}
.gb-opt img { object-fit: contain; }
.gb-opt em { font-style: normal; font-size: 0.72rem; color: var(--green); }
.gb-opt b { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; color: var(--tan-bright); }

@media (max-width: 640px) {
  .gb-slot { flex-direction: column; gap: 3px; }
  .gb-slot-n { flex: none; padding-top: 0; }
  .gb-bar-l { flex: 0 0 60px; }
}
/* 상단 고정 헤더에 가리지 않게 */
.gb-detail { scroll-margin-top: 78px; }

/* 뉴스 전문 — 공식 발표를 사이트 안에서 읽는다 (외부 링크 대신).
   항목을 누르면 .open 이 붙고 칸이 아래로 커진다. 0fr → 1fr 이라 내용 높이만큼만 늘어난다. */
.news-detail {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.28s ease, visibility 0s linear 0.28s;
}
.news-item.open > .news-detail {
  grid-template-rows: 1fr; visibility: visible;
  transition: grid-template-rows 0.28s ease, visibility 0s;
}
.news-full { overflow: hidden; } /* 접히는 동안 내용을 잘라 낸다 — 여백은 안쪽에 둔다 */
.news-full-in {
  margin: 0 18px 15px 134px; /* 머리 영역의 요약 글과 왼쪽을 맞춘다 (18 + 날짜 100 + gap 16) */
  padding-top: 11px; border-top: 1px solid var(--border);
}
.news-full-in h4 {
  font-size: 0.9rem; color: var(--tan-bright);
  margin: 13px 0 4px; letter-spacing: 0.02em;
}
.news-full-in h4:first-child { margin-top: 0; }
.news-full-in p { font-size: 0.85rem; color: var(--text); margin-bottom: 5px; line-height: 1.7; }
.news-collapse {
  display: block; margin: 12px 0 0 auto; padding: 0;
  font: inherit; font-size: 0.78rem; cursor: pointer;
  color: var(--muted); background: none; border: none;
}
.news-collapse:hover { color: var(--tan-bright); }
@media (max-width: 700px) {
  .news-full-in { margin-left: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-detail, .news-item.open > .news-detail, .news-caret { transition: none; }
}

/* ---------- 영상 · 숏츠 (videos.html · js/videos.js) ---------- */
.yt-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.yt-chip {
  font: inherit; font-size: 0.82rem; cursor: pointer;
  padding: 3px 10px;
  color: var(--muted); background: var(--panel);
  border: 1px solid var(--border); border-radius: 2px;
}
.yt-chip em { font-style: normal; color: var(--tan-dim); font-family: var(--font-mono); font-size: 0.74rem; }
.yt-chip:hover { color: var(--text-strong); border-color: var(--border-strong); }
.yt-chip.active { color: var(--tan-bright); background: var(--panel-2); border-color: var(--tan); }
.yt-chip.active em { color: var(--tan); }

.yt-grid {
  display: grid; gap: 14px; margin-bottom: 10px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.yt-grid.shorts { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

.yt-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  font: inherit; color: var(--text);
  padding: 0; background: none; border: none;
}
.yt-thumb {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.yt-grid.shorts .yt-thumb { aspect-ratio: 9 / 16; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.18s, opacity 0.18s; }
.yt-card:hover .yt-thumb { border-color: var(--tan); }
.yt-card:hover .yt-thumb img { transform: scale(1.04); opacity: 0.85; }
.yt-dur {
  position: absolute; right: 5px; bottom: 5px;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.78);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-strong);
  border-radius: 2px;
}
.yt-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--text-strong);
  background: rgba(0, 0, 0, 0.35);
  opacity: 0; transition: opacity 0.18s;
}
.yt-card:hover .yt-play { opacity: 1; }
.yt-t {
  color: var(--text-strong); font-size: 0.9rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.yt-card:hover .yt-t { color: var(--tan-bright); }
.yt-m { color: var(--muted); font-size: 0.76rem; }

/* 재생 — 사이트 안에서 (modal-backdrop/.modal 재사용) */
.yt-modal { width: min(980px, 100%); padding: 16px; }
.yt-modal.short { width: min(420px, 100%); }
.yt-modal .modal-head h3 { font-size: 1rem; line-height: 1.4; }
.yt-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--border); }
.yt-modal.short .yt-frame { aspect-ratio: 9 / 16; max-height: 68vh; margin: 0 auto; width: auto; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.yt-modal.short .yt-frame iframe { position: static; }
.yt-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 10px; font-size: 0.82rem;
}
.yt-foot-ch { color: var(--tan-bright); }
.yt-foot-m { color: var(--muted); font-family: var(--font-mono); font-size: 0.76rem; }
.yt-nav { margin-left: auto; display: flex; gap: 6px; }
.yt-nav .btn[disabled] { opacity: 0.4; cursor: default; }

@media (max-width: 560px) {
  .yt-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .yt-grid.shorts { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .yt-modal.short .yt-frame { max-height: 62vh; }
}

/* ============================================================
   스토리 라인 (story.html · js/story.js)
   왼쪽 라인 목록 + 오른쪽 세로 타임라인
   ============================================================ */

.toolbar .tree-opt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; white-space: nowrap; }

.st-work { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; margin-top: 16px; }

.st-side {
  /* 헤더(60px + 위험선 3px)가 sticky라 그 아래에 붙인다 */
  position: sticky; top: 77px; max-height: calc(100vh - 92px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px;
}
.st-side-head {
  font-family: var(--font-head); font-size: 0.88rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tan); padding: 8px 6px 6px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.st-side-head + div + .st-side-head { margin-top: 14px; }

.st-nav {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left;
  background: none; border: 1px solid transparent; border-radius: var(--radius);
  padding: 7px 8px; cursor: pointer; color: var(--text); font-family: inherit; font-size: 0.9rem;
}
.st-nav:hover { background: var(--panel-hover); border-color: var(--border); }
.st-nav.active { background: var(--panel-2); border-color: var(--tan); color: var(--text-strong); }
.st-nav.full .st-nav-name { color: var(--green); }
.st-nav-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-nav-num { color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }
.st-nav-bar { grid-column: 1 / -1; height: 3px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.st-nav-bar i { display: block; height: 100%; background: var(--tan); }
.st-nav.full .st-nav-bar i { background: var(--green); }

.st-body { min-width: 0; }
.st-head-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.st-title { font-family: var(--font-head); font-size: 1.5rem; letter-spacing: 0.05em; color: var(--text-strong); }
.st-by { color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }
.st-sum { color: var(--muted); font-size: 0.85rem; margin: 6px 0 16px; }

.st-line { list-style: none; position: relative; padding-left: 34px; }
.st-line::before {
  content: ""; position: absolute; left: 13px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, var(--border-strong), var(--border));
}
.st-node { position: relative; margin-bottom: 10px; }
.st-step {
  position: absolute; left: -34px; top: 8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem;
  background: var(--panel-2); border: 1px solid var(--border-strong); color: var(--muted); z-index: 1;
}
.st-node.is-done .st-step { background: var(--green); border-color: #4e6442; color: #14140f; }
.st-node.is-avail .st-step { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 8px rgba(212, 180, 106, 0.35); }
.st-node.is-locked .st-step { border-color: var(--red-deep); }

.st-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.st-node.is-avail .st-card { border-color: var(--tan-dim); }
.st-node.is-done .st-card { opacity: 0.72; }
.st-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.st-name { font-size: 0.98rem; color: var(--text-strong); }
.st-node.is-done .st-name { text-decoration: line-through; color: var(--muted); }
.st-state { margin-left: auto; font-size: 0.76rem; font-family: var(--font-mono); padding: 1px 7px; border: 1px solid var(--border); border-radius: 2px; color: var(--muted); }
.st-state.done { color: var(--green); border-color: #4e6442; }
.st-state.avail { color: var(--gold); border-color: #8a7440; }
.st-state.locked { color: var(--red); border-color: var(--red-deep); }

.st-meta { margin-top: 6px; color: var(--muted); font-size: 0.84rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-meta .st-trader { color: var(--tan-bright); }
.st-sep { color: var(--border-strong); }

.st-exts { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-exts-cap { color: var(--muted); font-size: 0.76rem; font-family: var(--font-mono); }
.st-ext { font-size: 0.78rem; padding: 2px 7px; border: 1px solid var(--border); border-radius: 2px; color: var(--muted); }
.st-ext.ok { color: var(--green); border-color: #4e6442; }
.st-ext.no { color: var(--red); border-color: var(--red-deep); }

.st-empty { color: var(--muted); font-size: 0.88rem; padding: 10px 6px; }

@media (max-width: 860px) {
  .st-work { grid-template-columns: 1fr; }
  .st-side { position: static; max-height: 320px; }
}

/* ---------- 블로그 공략 요약 · 영문명 병기 (2026-09-26, quests.js · story.js) ---------- */
.quest-en { color: var(--muted); font-size: 0.8rem; margin-left: 4px; }
.quest-blog { border-left-color: var(--tan-dim); background: rgba(160, 150, 120, 0.04); }
details.quest-blog > summary { cursor: pointer; margin-bottom: 0; }
details.quest-blog[open] > summary { margin-bottom: 4px; }
.qr-src { color: var(--muted); font-size: 0.74rem; font-family: var(--font-mono); margin-top: 8px; }
.st-en { color: var(--muted); font-size: 0.8rem; }
.st-blog { margin-top: 8px; font-size: 0.84rem; }
.st-blog summary { cursor: pointer; color: var(--muted); font-family: var(--font-mono); font-size: 0.76rem; }
.st-blog ul { margin: 4px 0 0 18px; }
.st-blog li { margin-bottom: 2px; }

/* ---------- 퀘스트 마인드맵 (2026-10-05, js/mindmap.js — story.html · quests.html 공용) ---------- */
.st-view-tabs button { padding: 6px 16px; font-size: 0.92rem; }
.mm-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.mm-zoom { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); min-width: 42px; text-align: center; }
.mm-legend { margin-left: auto; display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; color: var(--muted); font-size: 0.78rem; }
.mm-legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid; margin-right: -4px; vertical-align: middle; }
.mm-legend .lg-done { border-color: var(--green); }
.mm-legend .lg-avail { border-color: var(--gold); }
.mm-legend .lg-locked { border-color: var(--border-strong); }
.mm-legend .lg-extra { border-top-style: dashed; border-color: var(--tan-dim); }

.mm-view {
  position: relative; height: 68vh; overflow: auto; cursor: grab; /* 실제 높이는 mindmap.js applyZoom 이 맵에 맞춘다 */
  background:
    radial-gradient(circle, rgba(154, 136, 102, 0.12) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--bg-alt);
  border: 1px solid var(--border); border-radius: var(--radius);
  overscroll-behavior: contain;
}
.mm-view.grabbing { cursor: grabbing; user-select: none; }
.mm-sizer { position: relative; margin: 0 auto; } /* 화면보다 좁으면 가운데 */
.mm-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mm-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mm-hint { color: var(--muted); font-size: 0.76rem; font-family: var(--font-mono); margin: 6px 2px 12px; }

.mm-edge { fill: none; stroke: var(--border-strong); stroke-width: 2; transition: stroke 0.15s, opacity 0.15s; }
.mm-edge.e-done { stroke: var(--green); opacity: 0.7; }
.mm-edge.e-avail { stroke: var(--gold); }
.mm-edge.mm-extra { stroke: var(--tan-dim); stroke-width: 1.5; stroke-dasharray: 5 5; }
.mm-edge.dim { opacity: 0.18; }
.mm-stage.tracing .mm-edge:not(.hot):not(.dim) { opacity: 0.22; }
.mm-edge.hot { stroke: var(--tan-bright); stroke-width: 3; opacity: 1; }

.mm-root {
  position: absolute; width: 210px; transform: translate(-50%, -50%);
  padding: 10px 14px 12px; text-align: center; border-radius: 6px;
  background: linear-gradient(180deg, #3a3428, #2b2720); border: 2px solid var(--tan);
  box-shadow: var(--shadow), 0 0 18px rgba(199, 178, 153, 0.15);
}
.mm-root b { display: block; font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 0.04em; color: var(--text-strong); line-height: 1.25; }
.mm-root span { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--tan-bright); }
.mm-root-bar { display: block; height: 3px; margin-top: 6px; background: rgba(0, 0, 0, 0.35); border-radius: 2px; overflow: hidden; }
.mm-root-bar i { display: block; height: 100%; background: var(--green); }

.mm-node {
  position: absolute; width: 196px; height: 52px; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 7px; padding: 0 10px 0 8px;
  background: var(--panel); border: 1px solid var(--border-strong); border-left-width: 4px;
  border-radius: 5px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.mm-node:hover, .mm-node.hot { border-color: var(--tan-bright); z-index: 2; }
.mm-node.is-done { border-left-color: var(--green); background: #1a2016; }
.mm-node.is-avail { border-color: #8a7440; border-left-color: var(--gold); box-shadow: 0 0 12px rgba(212, 180, 106, 0.25); }
.mm-node.is-locked { border-left-color: var(--red-deep); }
.mm-node.dim { opacity: 0.28; }
.mm-node.sel { outline: 2px solid var(--tan-bright); outline-offset: 2px; z-index: 3; }
.mm-stage.tracing .mm-node:not(.hot):not(.dim) { opacity: 0.55; } /* 흐림(dim)은 강조 중에도 유지 */
.mm-check { flex-shrink: 0; accent-color: var(--green); cursor: pointer; }
.mm-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mm-name { font-size: 0.86rem; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-name em { font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-right: 5px; }
.mm-node.is-done .mm-name { color: var(--muted); text-decoration: line-through; }
.mm-sub { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-extno { color: var(--red); font-weight: 400; font-family: var(--font-mono); }

.mm-fold {
  position: absolute; top: 50%; transform: translateY(-50%); min-width: 20px; height: 20px; padding: 0 4px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--panel-2);
  color: var(--tan-bright); font-family: var(--font-mono); font-size: 0.72rem; line-height: 18px; cursor: pointer;
}
.mm-fold.r { right: -12px; }
.mm-fold.l { left: -14px; }
.mm-fold:hover { border-color: var(--tan); color: var(--text-strong); }

.st-mm-detail .st-line-one { padding-left: 34px; }
.st-mm-detail .st-line-one::before { display: none; }

@media (max-width: 860px) {
  .mm-view { max-height: 62vh; }
  .mm-legend { margin-left: 0; }
}
.mm-node.flash { animation: mm-flash 1.4s ease-out; }
@keyframes mm-flash { 0%, 40% { box-shadow: 0 0 0 4px rgba(199, 178, 153, 0.55); } 100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); } }
.mm-kappa { color: var(--gold); font-weight: 400; }
.mm-extok { color: var(--green); font-weight: 400; font-family: var(--font-mono); }
.mm-extout { color: var(--blue); font-weight: 400; font-family: var(--font-mono); }

/* 연계 트리 마인드맵 — 트레이더 탭 (quests.js renderTreeMap) */
.mm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.mm-tab {
  padding: 6px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-family: inherit; font-size: 0.88rem; cursor: pointer;
}
.mm-tab span { color: var(--muted); font-family: var(--font-mono); font-size: 0.76rem; margin-left: 4px; }
.mm-tab:hover { border-color: var(--tan-dim); background: var(--panel-hover); }
.mm-tab.active { border-color: var(--tan); background: var(--panel-2); color: var(--text-strong); box-shadow: inset 0 -2px 0 var(--tan); }
.mm-tab.miss { opacity: 0.45; }
