/* =========================================================================
   스시로 위키 — 디자인 시스템
   바다(깊은 청록·민트) + 스시집(크림 종이·나무·붉은 도장) 톤.
   게임 GUI 팔레트(CREAM #fffaf0 · MINT #c8e4db · INK #204f50)와 맞춘다.
   ========================================================================= */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  /* 브랜드 */
  --accent: #1d6f6c;          /* 깊은 청록 — 링크·강조 */
  --accent-2: #2f8f86;
  --accent-weak: #1d6f6c14;
  --accent-ink: #fffaf0;
  --red: #c2473b;             /* 스시집 붉은 도장 */
  --red-weak: #c2473b14;
  --wood: #a7774a;            /* 나무 */
  --wood-weak: #a7774a1f;
  --gold: #c99a3c;

  /* 표면 — 크림 종이 + 민트 */
  --bg: #f4f1e6;              /* 바탕: 살짝 누런 종이 */
  --surface: #fffaf0;         /* 게임 CREAM */
  --surface-2: #e6f2ec;       /* 옅은 민트 */
  --mint: #c8e4db;            /* 게임 MINT */
  --border: #d7e3db;
  --border-strong: #9ec7ba;   /* 게임 패널 청록 테두리 */
  --text: #1c3b3c;            /* 게임 INK 계열 */
  --text-soft: #4c6866;
  --text-faint: #86a09b;

  /* 사이드바 — 깊은 바다 */
  --side-bg: #123b3d;
  --side-bg-2: #0f3234;
  --side-text: #d8ebe4;
  --side-faint: #84aaa3;
  --side-hover: #ffffff10;
  --side-active: #fffaf0;

  /* 태그/상태 */
  --green: #3e8e5e; --blue: #2f74a8; --purple: #7a5aa6;
  --orange: #c9822f; --gray: #8fa19c; --cyan: #2b8e9a; --pink: #c0607a;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 #1d4b4a0d, 0 6px 18px -8px #1d4b4a2e;
  --sidebar-w: 260px;
  --topbar-h: 56px;
  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
          "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

:root[data-theme="dark"] {
  --accent: #6cc4b6;
  --accent-2: #8fd6c9;
  --accent-weak: #6cc4b61c;
  --accent-ink: #0c2224;
  --red: #e07a6c; --red-weak: #e07a6c1c;
  --wood: #c99a6a; --wood-weak: #c99a6a24;
  --bg: #0c1f21;
  --surface: #12292b;
  --surface-2: #183538;
  --mint: #1f4245;
  --border: #23464a;
  --border-strong: #2f5d5f;
  --text: #e6f1ec;
  --text-soft: #a9c4bd;
  --text-faint: #6f9089;
  --side-bg: #0a1a1c; --side-bg-2: #081617;
  --shadow: 0 1px 0 #0004, 0 10px 24px -10px #0008;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px);
  -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.75; font-size: 15.5px;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.005em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1,h2,h3,h4 { line-height: 1.35; word-break: keep-all; letter-spacing: -0.02em; }
p, li, td, th, dd { word-break: keep-all; overflow-wrap: anywhere; }
strong, b { font-weight: 700; color: var(--text); }
code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-2); padding: .1em .42em; border-radius: 5px; font-size: .88em;
  border: 1px solid var(--border); }
img { max-width: 100%; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

/* SVG 아이콘 */
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.18em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* ===== 레이아웃 셸 ===== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: var(--side-bg); color: var(--side-text);
  display: flex; flex-direction: column; transition: transform .25s ease;
}
/* 사이드바 아래쪽 파도 무늬 (장식) */
.sidebar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'%3E%3Cpath d='M0 15 Q15 5 30 15 T60 15 T90 15 T120 15' fill='none' stroke='%23ffffff' stroke-opacity='.10' stroke-width='1.5'/%3E%3C/svg%3E") repeat-x left bottom / 120px 30px,
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'%3E%3Cpath d='M0 15 Q15 5 30 15 T60 15 T90 15 T120 15' fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.5'/%3E%3C/svg%3E") repeat-x 30px calc(100% - 22px) / 120px 30px; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 30px 32px 90px; }

/* ===== 사이드바 ===== */
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px;
  color: var(--side-text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--surface);
  display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 2px #9ec7ba; }
.brand-logo img { width: 30px; height: 30px; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.02em; line-height: 1.15; color: #fffaf0; }
.brand-name small { display: block; font-weight: 600; font-size: 11px; color: var(--side-faint);
  letter-spacing: .12em; margin-top: 3px; }
.brand-seal { margin-left: auto; width: 22px; height: 22px; border-radius: 5px; background: var(--red);
  color: #fffaf0; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  transform: rotate(-4deg); }

.brand-wordmark { display: block; width: 100%; max-width: 210px; height: auto;
  filter: drop-shadow(0 2px 0 #0d2f3166); }
.brand-name small { margin-top: 6px; }

.side-search { padding: 4px 14px 12px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 11px; }
.sidebar .search-box { background: #ffffff12; border-color: #ffffff1c; }
.sidebar .search-box input { color: #fffaf0; }
.sidebar .search-box input::placeholder { color: var(--side-faint); }
.search-box .icon { color: var(--text-faint); }
.sidebar .search-box .icon { color: var(--side-faint); }
.search-box input { border: 0; background: transparent; outline: none; width: 100%;
  color: var(--text); font-family: inherit; font-size: 14px; }

.nav { padding: 2px 10px 110px; overflow-y: auto; flex: 1; position: relative; z-index: 1;
  scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 11px;
  border-radius: var(--radius-sm); color: var(--side-text); font-weight: 600; font-size: 14.5px; }
.nav-link .icon { color: var(--side-faint); }
.nav-link:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--side-active); color: #123b3d; }
.nav-link.active .icon { color: #1d6f6c; }
.nav-sub { padding-left: 13px; font-weight: 500; font-size: 14px; color: #c3dbd4; }
.nav-sub::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #ffffff2e; flex: none; }
.nav-sub.active::before { background: var(--red); }
.nav-group { margin-top: 10px; }
.nav-group-head { width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 11px; background: none; border: 0; cursor: pointer;
  color: var(--side-faint); font-family: inherit; font-weight: 700; font-size: 11.5px;
  letter-spacing: .1em; }
.nav-group-head .icon { transition: transform .2s; width: 1em; height: 1em; }
.nav-group.open .nav-group-head .icon { transform: rotate(180deg); }
.nav-group-body { display: none; }
.nav-group.open .nav-group-body { display: block; }

/* ===== 상단바 ===== */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar-title { font-weight: 700; font-size: 15px; color: var(--text-soft); }
.topbar-spacer { flex: 1; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  color: var(--text-soft); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.menu-toggle { display: none; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

/* ===== 홈 히어로 (인게임 항공샷 + 물빛 그라데이션 — 사이트의 유일한 그라데이션) ===== */
.hero { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 30px;
  min-height: 340px; display: flex; align-items: flex-end; color: #fffaf0;
  background: #123b3d url("../assets/img/shots/lobby-aerial.jpg") center 40% / cover no-repeat;
  box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #0d2f3100 30%, #0d2f31b8 72%, #0d2f31f0 100%); }
.hero-inner { position: relative; padding: 30px 32px 28px; width: 100%; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .12em; color: #c8e4db; margin-bottom: 8px; }
.hero-kicker::before { content: ""; width: 18px; height: 2px; background: var(--red); }
.hero h1 { margin: 0 0 6px; font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: #fffaf0; }
.hero-logo { display: block; width: min(420px, 100%); height: auto; margin: 2px 0 4px -6px;
  filter: drop-shadow(0 4px 10px #0d2f3180); }
.hero p { margin: 0 0 18px; color: #dcebe6; font-size: 16px; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn { background: #fffaf0; color: #123b3d; border-color: transparent; }
.hero .btn:hover { background: #fff; }
.hero .btn-ghost { background: #ffffff1a; color: #fffaf0; border: 1px solid #ffffff40; }
.hero .btn-ghost:hover { background: #ffffff2a; }

/* 페이지 상단 배너 이미지 */
.page-banner { position: relative; height: 180px; border-radius: var(--radius); overflow: hidden;
  margin: 0 0 22px; background: #123b3d center / cover no-repeat; box-shadow: var(--shadow); }
.page-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== 섹션 제목 ===== */
.section-title { display: flex; align-items: center; gap: 10px; margin: 44px 0 16px;
  font-size: 21px; font-weight: 800; }
.section-title .icon { color: var(--accent); width: 1.2em; height: 1.2em; }
.content h2 { font-size: 21px; font-weight: 800; margin: 46px 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.content h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--red); flex: none; }
.content h2.section-title { border-bottom: 0; padding-bottom: 0; }
.content h2.section-title::before { display: none; }
.content h3 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; }
.content p { margin: 10px 0; }
.content ul, .content ol { padding-left: 20px; }
.content li { margin: 4px 0; }
.content li::marker { color: var(--text-faint); }

.page-header { margin-bottom: 18px; }
.page-header h1 { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-size: 30px; font-weight: 800; }
.page-header h1 .ph-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--accent); flex: none; }
.page-header h1 .ph-icon .icon { width: 24px; height: 24px; }
.page-header p { margin: 0; color: var(--text-soft); font-size: 16px; }
.breadcrumb { font-size: 13px; color: var(--text-faint); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-faint); }

/* ===== 카드 그리드 ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 3px; padding: 16px 16px 15px; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); text-decoration: none; }
.card-icon { color: var(--accent); width: 40px; height: 40px; margin-bottom: 8px; border-radius: 10px;
  background: var(--surface-2); display: grid; place-items: center; }
.card-icon .icon { width: 22px; height: 22px; }
.card-icon img { width: 32px; height: 32px; }
.card-title { font-weight: 700; font-size: 15.5px; }
.card-desc { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }

/* ===== 진행 흐름 (가로 스텝) ===== */
.loop { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: loop; }
.loop li { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 12px 14px; text-align: center; box-shadow: var(--shadow); }
.loop li .slot { margin: 0 auto 8px; }
.loop li b { display: block; font-size: 15px; }
.loop li span { display: block; font-size: 12.5px; color: var(--text-soft); line-height: 1.5; margin-top: 2px; }
.loop li::before { counter-increment: loop; content: counter(loop); position: absolute; top: 8px; left: 10px;
  font-size: 11px; font-weight: 800; color: var(--text-faint); }
.loop li:not(:last-child)::after { content: ""; position: absolute; right: -8px; top: 50%; width: 6px; height: 6px;
  border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong);
  transform: translateY(-50%) rotate(45deg); z-index: 1; }

/* ===== 세로 스텝 ===== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step { display: flex; gap: 14px; padding: 15px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-num { flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px;
  display: grid; place-items: center; margin-top: 1px; }
.step-body h3 { margin: 2px 0 3px; font-size: 16px; }
.step-body p { margin: 0; color: var(--text-soft); font-size: 14.5px; }

/* ===== 아이템 슬롯 (게임 칸처럼: 민트 바탕 + 청록 테두리, 픽셀 확대) ===== */
.slot { width: 52px; height: 52px; display: grid; place-items: center; flex: none;
  background: #f8faed; border: 2px solid #9ec7ba; border-radius: 7px;
  box-shadow: inset 0 -3px 0 #c8e4db; }
.slot img { width: 40px; height: 40px; image-rendering: pixelated; image-rendering: crisp-edges; }
.slot.sm { width: 36px; height: 36px; border-width: 1.5px; border-radius: 6px; box-shadow: inset 0 -2px 0 #c8e4db; }
.slot.sm img { width: 28px; height: 28px; }
.slot.lg { width: 76px; height: 76px; border-radius: 10px; }
.slot.lg img { width: 64px; height: 64px; }
.slot.empty { background: repeating-linear-gradient(45deg, #f8faed, #f8faed 5px, #eef4e8 5px, #eef4e8 10px); }
.slot .icon { color: #7fae9f; width: 22px; height: 22px; }
:root[data-theme="dark"] .slot { background: #e9f1e6; border-color: #5e9688; box-shadow: inset 0 -3px 0 #b9d6cc; }

/* 아이템 이름 줄 (슬롯 + 이름) */
.item { display: inline-flex; align-items: center; gap: 9px; vertical-align: middle; }
.item .slot { width: 36px; height: 36px; border-width: 1.5px; border-radius: 6px; box-shadow: inset 0 -2px 0 #c8e4db; }
.item .slot img { width: 28px; height: 28px; }
.item-name { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* 아이템 그리드 (아이콘 크게) */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; margin: 14px 0; }
.item-cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 8px 11px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.item-cell .slot { width: 64px; height: 64px; }
.item-cell .slot img { width: 48px; height: 48px; }
.item-cell .ic-name { font-weight: 700; font-size: 14px; line-height: 1.35; }
.item-cell .ic-sub { font-size: 12.5px; color: var(--text-soft); line-height: 1.35; }
.item-cell .ic-price { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ===== 콜아웃 ===== */
.callout { display: flex; gap: 12px; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); margin: 16px 0; border-left-width: 4px; }
.callout-icon { flex: none; margin-top: 4px; }
.callout-body { font-size: 14.5px; }
.callout-body p { margin: 4px 0; }
.callout-info    { border-left-color: var(--accent); } .callout-info .callout-icon { color: var(--accent); }
.callout-tip     { border-left-color: var(--green);  } .callout-tip .callout-icon     { color: var(--green); }
.callout-warn    { border-left-color: var(--orange); } .callout-warn .callout-icon    { color: var(--orange); }
.callout-danger  { border-left-color: var(--red);    } .callout-danger .callout-icon  { color: var(--red); }

/* ===== 준비 중 (빈 자리) ===== */
.tbd-block { display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 18px 18px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-soft);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='16' viewBox='0 0 80 16'%3E%3Cpath d='M0 8 Q10 2 20 8 T40 8 T60 8 T80 8' fill='none' stroke='%239ec7ba' stroke-opacity='.35' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x left bottom 6px / 80px 16px,
    var(--surface); }
.tbd-block .tbd-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent); }
.tbd-block .tbd-title { font-weight: 700; color: var(--text); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.tbd-block .tbd-desc { font-size: 13.5px; margin-top: 1px; }
.tbd { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--text-faint); background: var(--surface-2);
  border: 1px dashed var(--border-strong); white-space: nowrap; vertical-align: 1px; }
.badge-tbd { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--accent);
  background: var(--accent-weak); padding: 1px 8px; border-radius: 999px; }

/* ===== 테이블 ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius);
  margin: 16px 0; box-shadow: var(--shadow); background: var(--surface); -webkit-overflow-scrolling: touch; }
.wiki-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.wiki-table th, .wiki-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: middle; }
.wiki-table thead th { background: var(--surface-2); font-weight: 700; color: var(--text-soft);
  font-size: 13px; white-space: nowrap; }
.wiki-table tbody tr:hover { background: var(--accent-weak); }
.wiki-table tbody tr:last-child td { border-bottom: 0; }
.wiki-table td.num, .wiki-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wiki-table td.nowrap { white-space: nowrap; }
.wiki-table .muted { color: var(--text-faint); }

.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px;
  font-weight: 700; color: #fff; white-space: nowrap; }
.tag-green{background:var(--green)} .tag-blue{background:var(--blue)}
.tag-purple{background:var(--purple)} .tag-orange{background:var(--orange)}
.tag-red{background:var(--red)} .tag-gray{background:var(--gray)} .tag-teal{background:var(--accent)}
.tag-soft { background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }

kbd { font-family: inherit; font-size: .82em; font-weight: 700; padding: 2px 8px; min-width: 26px;
  display: inline-block; text-align: center;
  border: 1px solid var(--border-strong); border-bottom-width: 3px; border-radius: 7px;
  background: var(--surface); color: var(--text); }

/* ===== 버튼 ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.btn:hover { border-color: var(--border-strong); text-decoration: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ===== 핵심 숫자 (스탯 타일) ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat-label { font-size: 12.5px; color: var(--text-soft); font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat-value small { font-size: 13px; font-weight: 600; color: var(--text-soft); margin-left: 2px; }

/* 산소통 단계 막대 */
.tiers { display: grid; gap: 8px; margin: 16px 0; }
.tier-row { display: grid; grid-template-columns: 64px 1fr 56px; align-items: center; gap: 12px;
  font-size: 14px; }
.tier-row b { font-weight: 700; }
.tier-bar { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.tier-bar i { display: block; height: 100%; width: calc(var(--v) * 1%); background: #4aa5a8; border-radius: 6px; }
.tier-row .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ===== 상점·필터 ===== */
.shop-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.shop-controls .search-box { flex: 1 1 200px; }
.shop-controls select { padding: 8px 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; }
.empty-msg { text-align: center; color: var(--text-faint); padding: 26px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--text-soft); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px #1d4b4a22; }

/* ===== 도감 ===== */
.dex-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.progress { flex: 1 1 180px; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border); }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.dex-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.dex-list { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dex-item label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; font-size: 14px; text-align: center; position: relative; height: 100%; }
.dex-item input { position: absolute; top: 9px; right: 9px; accent-color: var(--accent); width: 16px; height: 16px; }
.dex-item .slot { width: 64px; height: 64px; }
.dex-item .slot img { width: 48px; height: 48px; }
.dex-item .dx-name { font-weight: 700; font-size: 15px; }
.dex-item .dx-sub { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.dex-item input:checked ~ .slot { border-color: var(--accent); background: #e3f2ea; }
.dex-item input:checked ~ .dx-name::after { content: " ✓"; color: var(--accent); }

/* ===== 아코디언 ===== */
.accordion { display: grid; gap: 8px; }
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.accordion-head { width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 16px; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px; color: var(--text); text-align: left; }
.accordion-head .q { color: var(--red); margin-right: 8px; font-weight: 800; }
.accordion-head .icon { transition: transform .2s; color: var(--text-faint); }
.accordion-item.open .accordion-head .icon { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 16px 14px 40px; color: var(--text-soft); font-size: 14.5px; }
.accordion-item.open .accordion-body { display: block; }

/* ===== 탭 ===== */
.tab-buttons { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px;
  overflow-x: auto; scrollbar-width: none; }
.tab-buttons button { padding: 9px 14px; background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; font-family: inherit; font-weight: 700; font-size: 14.5px; white-space: nowrap;
  color: var(--text-soft); cursor: pointer; }
.tab-buttons button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; } .tab-panel.active { display: block; }

/* ===== 레시피 카드 ===== */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 14px 0; }
.recipe { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.recipe .slot { width: 52px; height: 52px; }
.recipe .slot img { width: 40px; height: 40px; }
.recipe-body { min-width: 0; flex: 1; }
.recipe-name { font-weight: 700; font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.recipe-meta { font-size: 12.5px; color: var(--text-faint); margin-top: 1px; }
.recipe-in { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ing { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px 2px 3px; color: var(--text-soft); line-height: 1.5; }
.ing img { width: 20px; height: 20px; image-rendering: pixelated; }
.ing b { color: var(--text); font-weight: 700; }

/* ===== 푸터 / 맨위로 / 백드롭 ===== */
.footer { border-top: 1px solid var(--border); padding: 22px 30px 26px; color: var(--text-faint);
  font-size: 13px; text-align: center; }
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 35; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 39; background: #0a1e2080; }
.sidebar-backdrop.show { display: block; }

/* ===== 이미지 ===== */
.figure { margin: 18px 0; }
.figure img, .wiki-img { display: block; width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow); background: var(--surface-2); border: 1px solid var(--border); }
.figcap { margin-top: 8px; font-size: 13px; color: var(--text-faint); text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.gallery .figure { margin: 0; }
.gallery img { aspect-ratio: 16 / 10; object-fit: cover; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: center; margin: 18px 0; }
.split .figure { margin: 0; }
.figure img, .wiki-img, .gallery img { cursor: zoom-in; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: #08181ae6;
  display: none; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 12px 48px #000a; }
.lightbox-close { position: fixed; top: 14px; right: 16px; width: 42px; height: 42px;
  display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer;
  background: #ffffff22; color: #fff; }
.lightbox-close .icon { width: 22px; height: 22px; stroke-width: 2; }

/* ===== 편의 ===== */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 60; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow); z-index: 70;
  opacity: 0; pointer-events: none; transition: .25s; display: flex; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.content h2, .content h3 { scroll-margin-top: calc(var(--topbar-h) + 14px); }
.anchor-link { opacity: 0; margin-left: 4px; color: var(--text-faint); font-weight: 400; text-decoration: none; font-size: .8em; }
.content h2:hover .anchor-link, .content h3:hover .anchor-link { opacity: 1; }

/* 자동 목차 */
.toc { position: sticky; top: calc(var(--topbar-h) + 24px); align-self: start;
  font-size: 13.5px; border-left: 2px solid var(--border); padding: 2px 0 2px 14px; }
.toc-title { font-weight: 800; color: var(--text-faint); letter-spacing: .08em; font-size: 11px; margin-bottom: 8px; }
.toc a { display: block; padding: 4px 0; color: var(--text-soft); text-decoration: none; line-height: 1.45; }
.toc a:hover { color: var(--accent); }
.toc a.active { color: var(--accent); font-weight: 700; }
.toc a.lvl-3 { padding-left: 12px; font-size: 12.5px; }
.content-toc { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 40px; max-width: 1120px; }
.content-toc > .toc { grid-column: 2; grid-row: 1 / 99; }
@media (max-width: 1100px) { .content-toc { grid-template-columns: minmax(0,1fr); } .content-toc > .toc { display: none; } }

/* 공지 배너 */
.notice-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: var(--radius-sm); margin-bottom: 20px; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--red); }
.notice-banner .icon { color: var(--red); flex: none; }
.notice-banner .nb-body { flex: 1; font-size: 14.5px; }
.notice-banner .nb-close { flex: none; background: none; border: 0; color: var(--text-faint);
  cursor: pointer; display: grid; place-items: center; padding: 4px; border-radius: 6px; }

/* 패치노트 타임라인 */
.timeline { position: relative; margin: 20px 0; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-entry { position: relative; margin-bottom: 24px; }
.tl-entry::before { content: ""; position: absolute; left: -26px; top: 5px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--accent); }
.tl-entry.latest::before { background: var(--red); box-shadow: 0 0 0 2px var(--red); }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-ver { font-weight: 800; font-size: 17px; }
.tl-date { color: var(--text-faint); font-size: 13px; }
.tl-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.tl-body ul { margin: 0; padding-left: 18px; }
.change { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 6px; margin-right: 6px; color: #fff; }
.change-new { background: var(--green); } .change-fix { background: var(--blue); }
.change-buff { background: var(--purple); } .change-nerf { background: var(--orange); }

/* 문서 하단 이전/다음 */
.doc-nav { display: flex; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.doc-nav a { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; }
.doc-nav a:hover { border-color: var(--border-strong); }
.doc-nav .dn-label { font-size: 12px; color: var(--text-faint); }
.doc-nav .dn-title { font-weight: 700; }
.doc-nav .dn-next { text-align: right; }
.doc-nav .dn-spacer { flex: 1; }

/* 검색 결과 */
.search-results { position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px #0006; max-height: 62vh; overflow-y: auto; padding: 6px; margin: 0 14px; }
.sr-item { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.sr-item:hover, .sr-item.active { background: var(--surface-2); text-decoration: none; }
.sr-title { font-weight: 700; font-size: 14px; }
.sr-snip { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-empty { padding: 14px; color: var(--text-faint); font-size: 13px; text-align: center; }
.sr-item mark { background: var(--accent-weak); color: var(--accent); padding: 0 1px; border-radius: 3px; }

/* ===== 반응형 ===== */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px #0006; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .topbar { padding: 0 14px; }
  .content { padding: 18px 16px 72px; }
  .hero { min-height: 300px; border-radius: 14px; }
  .hero-inner { padding: 22px 20px 20px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
  .page-header h1 { font-size: 25px; }
  .page-header h1 .ph-icon { width: 38px; height: 38px; }
  .page-banner { height: 130px; }
  .content h2 { font-size: 19px; margin-top: 38px; }
  .loop { gap: 6px; }
  .loop li { padding: 10px 2px 9px; }
  .loop li::before, .loop li span, .loop li:not(:last-child)::after { display: none; }
  .loop li .slot { width: 44px; height: 44px; margin-bottom: 6px; }
  .loop li .slot img { width: 32px; height: 32px; }
  .loop li b { font-size: 12.5px; letter-spacing: -.02em; }
  .split { grid-template-columns: 1fr; gap: 12px; }
  .wiki-table { font-size: 14px; }
  .wiki-table th, .wiki-table td { padding: 9px 11px; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card { padding: 13px 12px; }
  .card-desc { font-size: 12.5px; }
  .card-icon { width: 34px; height: 34px; margin-bottom: 6px; }
  .doc-nav { flex-direction: column; }
  .recipes { grid-template-columns: 1fr; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .dex-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .gallery { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .gallery .figure { scroll-snap-align: start; }
  .tier-row { grid-template-columns: 54px 1fr 50px; gap: 8px; }
}

/* ---------- 바다 단계 태그 · 레시피 보조 ---------- */
.tag-sea1 { background: #5fb3a6; } .tag-sea2 { background: #2f8f86; }
.tag-sea3 { background: #22607a; } .tag-sea4 { background: #1b3557; }
.ing-x { width: 20px; height: 20px; border-radius: 4px; background: var(--border); display: inline-block; }
.recipe-name .muted { color: var(--text-faint); font-weight: 600; }
.doc { min-width: 0; }
.content p.muted, .content .muted { color: var(--text-faint); font-size: 13px; }
.content q { quotes: "“" "”"; color: var(--text); font-weight: 600; }
.nowrap { white-space: nowrap; }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats:has(> :nth-child(3):last-child) .stat { padding: 11px 10px; }
  .stats:has(> :nth-child(3):last-child) .stat-value { font-size: 19px; }
}
.item-cell .ic-name, .item-cell .ic-sub { word-break: keep-all; overflow-wrap: break-word; }
.tbd-block .tbd-title { flex-wrap: wrap; row-gap: 4px; }
.badge-tbd { white-space: nowrap; flex: none; }
.wiki-table tbody td:first-child { white-space: nowrap; }
.content { word-break: keep-all; overflow-wrap: break-word; }
@media (max-width: 560px) { .gallery { scrollbar-width: none; } .gallery::-webkit-scrollbar { display: none; } }
.sr-sec { font-weight: 600; opacity: .7; }
.callout-body ul { margin: 2px 0; padding-left: 18px; } .callout-body li { margin: 4px 0; }
