:root {
  color-scheme: dark;
  color: var(--text);
  background: var(--bg);
  /*
   * 글꼴도 색처럼 **역할**로 쥔다.
   *
   * 예전에는 이 한 줄이 화면 전부를 정했다. 그래서 "제목만 다른 글꼴" 같은 것을
   * 시험할 수가 없었다. 자리마다 하는 일이 다른데도 말이다 —
   *
   *   display  브랜드·큰 제목      성격. 눈에 남는 것
   *   ui       본문·설명           오래 읽어도 편한 것
   *   num      시세·점수·레벨      **자릿수가 안 흔들리는 것**
   *   label    배지·칩·작은 단추   작아도 버티는 것
   *
   * 넷이 전부 --font-ui 를 가리키므로 **지금은 아무것도 안 바뀐다.** 이 상태로도
   * 값이 있다 — CSS 한 줄만 고치면 역할별로 글꼴을 시험해 볼 수 있다.
   *
   * 기본은 **Pretendard** 다. 2026-09-24 에 후보 다섯(시스템 · Pretendard ·
   * IBM Plex Sans KR · Gothic A1 · SUIT)을 화면 위에서 견줘 보고 골랐다. 그때 쓴
   * 도구는 고른 뒤 지웠다 — 역할 토큰 넷이 남아 있으므로 다시 견줄 일이 생기면
   * 아래 네 줄만 바꿔 보면 된다.
   *
   * 예전에는 Inter · Pretendard · Noto Sans KR 을 적어 두고 **웹폰트를 하나도 안
   * 불렀다.** 깔려 있는 사람에게만 보이고 없으면 건너뛰었으니, 보이는 글꼴이
   * 방문자 컴퓨터에 뭐가 깔렸냐로 정해졌다 — 윈도우 대부분은 맑은 고딕이었다.
   * 이제 index.html 이 실제로 받아 오므로 모두에게 같게 보인다.
   *
   * Inter 는 뺐다. 한글이 없어서 한글은 어차피 뒤 후보로 떨어지는데, 앞에 두면
   * 영문과 한글이 서로 다른 글꼴로 섞인다. Pretendard 는 둘 다 가진다.
   */
  --font-ui: "Pretendard Variable", Pretendard, "Noto Sans KR", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-ui);
  --font-num: var(--font-ui);
  --font-label: var(--font-ui);

  /* 남의 브랜드 색. 테마를 따라 바꾸면 안 된다(유튜브 브랜드 규정 — 빨강 · 흰색만).
     첫 화면 「얍카 영상」 칸의 유튜브 아이콘에만 쓴다(features/overview-today.js). */
  --brand-youtube: #ff0000;
  --brand-youtube-arrow: #ffffff;

  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;

  /* 색은 전부 여기서 나온다. 2026-09-18에 모았다.
     그 전에는 카드 배경에만 남색 243종이 박혀 있어 테마를 바꿔도 페이지 배경만 변했다.
     이 블록은 tools/gen_themes.py 가 만든다. 직접 고치지 않는다.
     -rgb 짝은 투명도를 줄 때 쓴다: rgb(var(--cyan-rgb) / 0.3) */
  --theme-label: "딥블루";
  --bg: #07111f; --bg-rgb: 7 17 31;
  --surface-0: #08121f; --surface-0-rgb: 8 18 31;
  --surface-1: #0b1624; --surface-1-rgb: 11 22 36;
  --surface-2: #102032; --surface-2-rgb: 16 32 50;
  --surface-3: #1f3046; --surface-3-rgb: 31 48 70;
  --line: #24354d; --line-rgb: 36 53 77;
  --line-bright: #36506d; --line-bright-rgb: 54 80 109;
  --text: #eef4fb; --text-rgb: 238 244 251;
  --text-strong: #f5f8fc; --text-strong-rgb: 245 248 252;
  --soft: #c5d0dd; --soft-rgb: 197 208 221;
  --muted: #9ba9bb; --muted-rgb: 155 169 187;
  --muted-2: #91a0b3; --muted-2-rgb: 145 160 179;
  --cyan: #79d1f7; --cyan-rgb: 121 209 247;
  --green: #69e6b0; --green-rgb: 105 230 176;
  --gold: #f4c15d; --gold-rgb: 244 193 93;
  --gold-bright: #ffd700; --gold-bright-rgb: 255 215 0;
  --red: #ff8fa1; --red-rgb: 255 143 161;
  --violet: #b560ff; --violet-rgb: 181 96 255;
  --panel-strong: var(--surface-2); --panel-strong-rgb: var(--surface-2-rgb);
  --panel-rgb: var(--surface-1-rgb); --panel: rgb(var(--surface-1-rgb) / 0.96);
  --green-dim: #204443; --green-dim-rgb: 32 68 67;
  --gold-dim: #3e3c31; --gold-dim-rgb: 62 60 49;
  --red-dim: #413140; --red-dim-rgb: 65 49 64;
  --violet-dim: #302654; --violet-dim-rgb: 48 38 84;
  --on-cyan: #08121f; --on-cyan-rgb: 8 18 31;
  --on-cyan-alt: #ffffff; --on-cyan-alt-rgb: 255 255 255;
  --ink-cyan: #90d9f8; --ink-cyan-rgb: 144 217 248;
  --on-cyan-dim: #94daf9; --on-cyan-dim-rgb: 148 218 249;
  --on-gold: #08121f; --on-gold-rgb: 8 18 31;
  --on-gold-alt: #ffffff; --on-gold-alt-rgb: 255 255 255;
  --ink-gold: var(--gold); --ink-gold-rgb: var(--gold-rgb);
  --on-gold-dim: var(--gold); --on-gold-dim-rgb: var(--gold-rgb);
  --on-gold-bright: #08121f; --on-gold-bright-rgb: 8 18 31;
  --on-gold-bright-alt: #ffffff; --on-gold-bright-alt-rgb: 255 255 255;
  --ink-gold-bright: var(--gold-bright); --ink-gold-bright-rgb: var(--gold-bright-rgb);
  --on-gold-bright-dim: var(--gold-bright); --on-gold-bright-dim-rgb: var(--gold-bright-rgb);
  --on-green: #08121f; --on-green-rgb: 8 18 31;
  --on-green-alt: #ffffff; --on-green-alt-rgb: 255 255 255;
  --ink-green: var(--green); --ink-green-rgb: var(--green-rgb);
  --on-green-dim: var(--green); --on-green-dim-rgb: var(--green-rgb);
  --on-red: #08121f; --on-red-rgb: 8 18 31;
  --on-red-alt: #ffffff; --on-red-alt-rgb: 255 255 255;
  --ink-red: #ffaebb; --ink-red-rgb: 255 174 187;
  --on-red-dim: #ffb1bd; --on-red-dim-rgb: 255 177 189;
  --on-violet: #08121f; --on-violet-rgb: 8 18 31;
  --on-violet-alt: #ffffff; --on-violet-alt-rgb: 255 255 255;
  --ink-violet: #d4a4ff; --ink-violet-rgb: 212 164 255;
  --on-violet-dim: #d6a8ff; --on-violet-dim-rgb: 214 168 255;
}

/* 전역 플로팅 도구 */
.floating-tools-root {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  width: 248px;
  z-index: 700;
  color: var(--text, var(--cyan));
  font-size: 14px;
  pointer-events: none;
}

.floating-tools-root.mode-rail { width: 58px; }

.floating-tools-root.mode-top {
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  left: auto !important;
  width: auto;
  max-width: calc(100vw - 20px);
}

.floating-tools-dock,
.floating-tools-popover,
.floating-tools-toast { pointer-events: auto; }

.floating-tools-dock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.mode-full .floating-tools-dock { display: none; }

.floating-tools-launcher,
.floating-timer-summary,
.floating-tool-panel button {
  appearance: none;
  border: 1px solid rgb(var(--cyan-rgb) / 0.42);
  color: inherit;
  background: rgb(var(--surface-1-rgb) / 0.96);
  font: inherit;
  cursor: pointer;
}

.floating-tools-launcher {
  display: inline-grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 15px;
  color: var(--ink-gold);
  font-size: 21px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.floating-timer-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 225px;
  min-height: 46px;
  padding: 0 13px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.mode-rail .floating-timer-summary { display: none; }

.floating-tools-launcher:hover,
.floating-tools-launcher:focus-visible,
.floating-timer-summary:hover,
.floating-timer-summary:focus-visible {
  border-color: rgb(var(--gold-rgb) / 0.72);
  background: rgb(var(--surface-2-rgb) / 0.98);
  outline: none;
}

.floating-summary-label {
  overflow: hidden;
  min-width: 0;
  color: var(--soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-timer-summary strong {
  flex: 0 0 auto;
  color: var(--ink-gold);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.floating-timer-summary.is-completed strong { color: var(--ink-red); }

.floating-tools-popover {
  overflow: hidden;
  width: 248px;
  max-height: calc(100vh - var(--floating-top-offset, 14px) - 14px);
  border: 1px solid rgb(var(--cyan-rgb) / 0.42);
  border-radius: 17px;
  background: rgb(var(--surface-1-rgb) / 0.99);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.mode-rail .floating-tools-popover,
.mode-top .floating-tools-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 20px));
  max-height: calc(100vh - var(--floating-top-offset, 10px) - 58px);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms;
  pointer-events: none;
}

.mode-rail.panel-open .floating-tools-popover,
.mode-top.panel-open .floating-tools-popover {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
  pointer-events: auto;
}

.floating-tool-panel {
  overflow-y: auto;
  max-height: calc(100vh - var(--floating-top-offset, 14px) - 14px);
  padding: 12px;
  overscroll-behavior: contain;
}

.mode-rail .floating-tool-panel,
.mode-top .floating-tool-panel { max-height: calc(100vh - var(--floating-top-offset, 10px) - 58px); }

.floating-tool-head,
.floating-tool-head > div,
.floating-tool-head-actions,
.floating-tool-footer {
  display: flex;
  align-items: center;
}

.floating-tool-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.floating-tool-head > div { gap: 7px; }
.floating-tool-head-actions { gap: 5px; }

.floating-tool-head strong {
  color: var(--text-strong);
  font-size: 15px;
}

.floating-icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  color: var(--ink-cyan);
}

.floating-pin-button {
  display: inline-flex;
  width: auto;
  min-width: 58px;
  padding: 0 7px;
  gap: 4px;
  border-color: var(--cyan);
  background: var(--surface-2);
  color: var(--ink-cyan);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.floating-pin-button b {
  color: var(--ink-cyan);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.floating-pin-button.is-active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--on-gold);
  box-shadow: 0 0 0 2px rgb(var(--gold-rgb) / 0.2),
    0 4px 12px rgb(var(--gold-rgb) / 0.28);
}

.floating-pin-button.is-active b {
  color: var(--surface-1);
  font-weight: 900;
}

.floating-preset-grid {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.floating-preset-grid button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border-color: rgb(var(--gold-rgb) / 0.34);
  border-radius: 10px;
  background: rgb(var(--gold-rgb) / 0.1);
  color: var(--on-gold-dim);
  text-align: left;
}

.floating-preset-grid b { margin-left: auto; }

.floating-preset-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.floating-preset-name em {
  padding: 2px 5px;
  border: 1px solid rgb(var(--green-rgb) / 0.48);
  border-radius: 999px;
  background: rgb(var(--green-rgb) / 0.18);
  color: var(--on-green-dim);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.floating-preset-grid button.is-interval-preset {
  border-color: rgb(var(--green-rgb) / 0.5);
  background: rgb(var(--green-rgb) / 0.2);
}

.floating-timer-kind {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
  padding: 3px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.24);
  border-radius: 10px;
  background: rgb(var(--surface-0-rgb) / 0.55);
}

.floating-timer-kind button {
  min-height: 31px;
  padding: 4px 7px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 750;
}

.floating-timer-kind button.is-active {
  border-color: rgb(var(--cyan-rgb) / 0.48);
  background: rgb(var(--cyan-rgb) / 0.14);
  color: var(--on-cyan-dim);
}

.floating-custom-timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 12px;
}

.floating-custom-timer > input {
  grid-column: 1 / -1;
}

.floating-custom-timer input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.35);
  border-radius: 9px;
  color: var(--ink-cyan);
  background: rgb(var(--surface-0-rgb) / 0.75);
  font: inherit;
}

.floating-custom-timer label {
  position: relative;
  min-width: 0;
}

.floating-custom-timer label input { padding-right: 22px; }

.floating-custom-timer label span {
  position: absolute;
  top: 50%;
  right: 7px;
  color: var(--ink-cyan);
  font-size: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.floating-custom-timer input:focus {
  border-color: rgb(var(--gold-rgb) / 0.75);
  outline: 2px solid rgb(var(--gold-rgb) / 0.12);
}

.floating-custom-timer button {
  min-width: 47px;
  padding: 0 9px;
  border-color: rgb(var(--gold-rgb) / 0.52);
  border-radius: 9px;
  color: var(--ink-gold);
  font-weight: 750;
}

.floating-sound-settings {
  margin: 0 0 12px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.28);
  border-radius: 11px;
  background: rgb(var(--surface-1-rgb) / 0.72);
  transition: border-color 160ms ease, background 160ms ease;
}

.floating-sound-settings.is-open {
  border-color: rgb(var(--cyan-rgb) / 0.42);
  background: rgb(var(--surface-1-rgb) / 0.88);
}

/* 패널 아래쪽 "브라우저 알림" 버튼과 같은 모양으로 맞춘다.
   동그란 아이콘 + 제목·요약 + 알약 배지 + 화살표. */
.floating-sound-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  padding: 7px 9px;
  border: 0;
  border-radius: 11px;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease;
}

.floating-sound-head:hover { background: rgb(var(--cyan-rgb) / 0.07); }
.floating-sound-head:active { background: rgb(var(--cyan-rgb) / 0.12); }

.floating-sound-head:focus-visible {
  outline: 2px solid rgb(var(--cyan-rgb) / 0.7);
  outline-offset: -2px;
}

.floating-sound-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgb(var(--cyan-rgb) / 0.14);
  font-size: 14px;
}

.floating-sound-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.floating-sound-copy strong {
  color: var(--ink-cyan);
  font-size: 13px;
}

/* 접혀 있어도 지금 설정이 뭔지 보이게 한다. 열어 봐야만 알면 접는 의미가 없다. */
.floating-sound-copy small {
  overflow: hidden;
  color: var(--ink-cyan);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-sound-state {
  min-width: 40px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgb(var(--cyan-rgb) / 0.2);
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.floating-sound-state.is-ready { background: var(--green); color: var(--on-green); }
.floating-sound-state.is-stale { background: var(--gold); color: var(--on-gold); }

.floating-sound-caret {
  display: grid;
  width: 12px;
  height: 12px;
  place-items: center;
  color: var(--ink-cyan);
}

/* 글자 ▼ 는 글꼴마다 크기와 위치가 제각각이라 테두리로 그린다. */
.floating-sound-caret::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.floating-sound-settings.is-open .floating-sound-caret::before {
  transform: translateY(1px) rotate(-135deg);
}

/* 펼치면 아래 컨트롤이 같은 내용을 보여 주므로 요약줄은 감춘다. */
.floating-sound-settings.is-open .floating-sound-copy small { display: none; }

.floating-sound-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.floating-sound-body[hidden] { display: none; }

.floating-sound-settings p.floating-sound-state-line {
  margin: 0;
  color: var(--ink-cyan);
  font-size: 13px;
}

.floating-sound-settings p.floating-sound-state-line.is-ready { color: var(--ink-green); }
.floating-sound-settings p.floating-sound-state-line.is-stale { color: var(--ink-gold); }

.floating-volume-field,
.floating-sound-actions {
  display: flex;
  align-items: center;
}

.floating-sound-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 7px;
}

.floating-sound-fields label,
.floating-volume-field {
  min-width: 0;
  color: var(--ink-cyan);
  font-size: 13px;
}

.floating-sound-fields select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 31px;
  margin-top: 3px;
  padding: 0 5px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.35);
  border-radius: 7px;
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
}

.floating-volume-field { gap: 7px; }

.floating-volume-field input {
  min-width: 0;
  flex: 1;
  accent-color: var(--cyan);
}

.floating-volume-field output {
  width: 31px;
  color: var(--ink-cyan);
  text-align: right;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.floating-sound-actions { gap: 6px; }

.floating-sound-actions button {
  flex: 1;
  min-height: 31px;
  padding: 4px 7px;
  border-radius: 8px;
  color: var(--ink-cyan);
  font-size: 13px;
}

.floating-sound-settings p {
  margin: 0;
  color: var(--ink-cyan);
  font-size: 13px;
  line-height: 1.45;
}

.floating-timer-list { display: grid; gap: 8px; }

/* 🛠 제작 중 칸(2026-10-01) — 타이머 아래. 타이머 패널은 남는 높이에서 스크롤하고, 이 칸은 늘 아래에 보인다. */
.floating-tools-popover { display: flex; flex-direction: column; }
.floating-tools-popover > .floating-tool-panel { flex: 1 1 auto; min-height: 0; }
.floating-crafting-slot { flex: 0 0 auto; }
.floating-crafting-slot:empty { display: none; }
.floating-crafting-panel {
  overflow-y: auto;
  max-height: min(46vh, 380px);
  padding: 10px 12px 12px;
  border-top: 1px solid rgb(var(--cyan-rgb) / 0.3);
  overscroll-behavior: contain;
}
.floating-crafting-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.floating-crafting-head b {
  margin-left: auto;
  color: var(--ink-gold);
  font-family: var(--font-num);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.floating-crafting-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.floating-crafting-row {
  position: relative;
  border: 1px solid rgb(var(--cyan-rgb) / 0.3);
  border-radius: 11px;
  background: rgb(var(--surface-1-rgb) / 0.72);
}
.floating-crafting-row.is-done { border-color: rgb(var(--green-rgb) / 0.6); }
.floating-crafting-open {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 30px 8px 8px;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}
.floating-crafting-open:hover,
.floating-crafting-open:focus-visible { background: rgb(var(--surface-2-rgb) / 0.9); outline: none; }
.floating-crafting-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgb(var(--surface-0-rgb) / 0.6);
}
.floating-crafting-icon img { max-width: 30px; max-height: 30px; object-fit: contain; }
.floating-crafting-copy { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.floating-crafting-copy strong { display: flex; align-items: baseline; gap: 4px; min-width: 0; font-size: 13px; }
.floating-crafting-copy strong > span { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.floating-crafting-copy strong em { flex: none; color: var(--ink-gold); font-style: normal; font-family: var(--font-num); }
.floating-crafting-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.floating-crafting-progress { display: flex; align-items: center; gap: 6px; color: var(--soft); font-size: 11px; white-space: nowrap; }
.floating-crafting-progress i {
  overflow: hidden;
  flex: 1 1 auto;
  height: 5px;
  border-radius: 999px;
  background: rgb(var(--line-rgb) / 0.7);
}
.floating-crafting-progress i b { display: block; height: 100%; border-radius: inherit; background: var(--gold); color: var(--on-gold); }
.floating-crafting-done { color: var(--ink-green); font-size: 12px; font-weight: 700; }
.floating-crafting-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.floating-crafting-remove:hover,
.floating-crafting-remove:focus-visible { border-color: rgb(var(--red-rgb) / 0.5); color: var(--ink-red); outline: none; }
.floating-crafting-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.floating-tools-dock { position: relative; }
.floating-crafting-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}


.floating-timer-empty {
  padding: 14px 9px;
  border: 1px dashed rgb(var(--cyan-rgb) / 0.3);
  border-radius: 10px;
  color: var(--ink-cyan);
  text-align: center;
  font-size: 13px;
}

.floating-timer-row {
  padding: 10px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.3);
  border-radius: 12px;
  background: rgb(var(--surface-1-rgb) / 0.72);
}

.floating-timer-row.is-completed {
  border-color: rgb(var(--red-rgb) / 0.66);
  background: rgb(var(--red-dim-rgb) / 0.48);
  animation: floating-timer-alert 1.1s ease-in-out 3;
}

.floating-timer-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.floating-timer-row-head strong {
  overflow: hidden;
  min-width: 0;
  color: var(--ink-cyan);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-interval-badge {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 4px;
  border: 1px solid rgb(var(--green-rgb) / 0.45);
  border-radius: 4px;
  background: rgb(var(--green-rgb) / 0.12);
  color: var(--on-green-dim);
  font-size: 13px;
  vertical-align: 2px;
}

.floating-timer-meta {
  margin-top: 3px;
  color: var(--ink-cyan);
  font-size: 13px;
  line-height: 1.4;
}

.floating-timer-time {
  flex: 0 0 auto;
  color: var(--ink-gold);
  font-size: 17px;
  font-weight: 850;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.is-completed .floating-timer-time { color: var(--ink-red); }

.floating-timer-progress {
  overflow: hidden;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgb(var(--cyan-rgb) / 0.18);
}

.floating-timer-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  color: var(--on-gold);
  transition: width 0.4s linear;
}

.floating-timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.floating-timer-actions button {
  min-height: 29px;
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--soft);
  font-size: 13px;
}

.floating-timer-actions .danger {
  border-color: rgb(var(--red-rgb) / 0.46);
  color: var(--ink-red);
}

.floating-tool-footer {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.floating-tool-footer button {
  flex: 1 1 auto;
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 9px;
  color: var(--soft);
  font-size: 13px;
}

.floating-tool-footer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.floating-tool-footer .floating-notification-button {
  display: grid;
  flex: 1 0 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 7px 9px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.floating-notification-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgb(var(--cyan-rgb) / 0.14);
  font-size: 16px;
}

.floating-notification-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.floating-notification-copy strong {
  color: var(--ink-cyan);
  font-size: 13px;
}

.floating-notification-copy small {
  overflow: hidden;
  color: var(--ink-cyan);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-notification-state {
  min-width: 40px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgb(var(--cyan-rgb) / 0.2);
  color: var(--soft);
  font-size: 13px;
  text-align: center;
}

.floating-notification-button.is-on {
  border-color: rgb(var(--green-rgb) / 0.68);
  background: rgb(var(--green-rgb) / 0.2);
  box-shadow: inset 3px 0 var(--green), 0 0 0 1px rgb(var(--green-rgb) / 0.08);
}

.floating-notification-button.is-on .floating-notification-icon,
.floating-notification-button.is-on .floating-notification-state {
  background: var(--green);
  color: var(--on-green);
}

.floating-notification-button.is-off {
  border-color: rgb(var(--red-rgb) / 0.58);
  background: rgb(var(--red-rgb) / 0.18);
  box-shadow: inset 3px 0 var(--red);
}

.floating-notification-button.is-off .floating-notification-state {
  background: var(--red);
  color: var(--on-red);
}

.floating-notification-button.is-ask {
  border-color: rgb(var(--gold-rgb) / 0.62);
  background: rgb(var(--gold-rgb) / 0.16);
  box-shadow: inset 3px 0 var(--gold);
}

.floating-notification-button.is-ask .floating-notification-state {
  background: var(--gold);
  color: var(--on-gold);
}

.floating-notification-button.is-blocked,
.floating-notification-button.is-unsupported {
  opacity: 1;
}

.floating-notification-button.is-blocked {
  border-color: rgb(var(--red-rgb) / 0.68);
  background: rgb(var(--red-rgb) / 0.22);
  box-shadow: inset 3px 0 var(--red);
}

.floating-notification-button.is-blocked .floating-notification-state {
  background: var(--red);
  color: var(--on-red);
}

.floating-notification-button.is-unsupported {
  border-color: rgb(var(--cyan-rgb) / 0.38);
  background: rgb(var(--cyan-rgb) / 0.14);
}

.floating-tools-toast {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(330px, calc(100vw - 32px));
  padding: 13px 15px;
  /* 기본은 중립. 켜고 끄는 일은 아래 tone-* 이 색으로 나눈다. */
  border: 1px solid rgb(var(--cyan-rgb) / 0.55);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text-strong);
  box-shadow: 0 16px 42px rgb(var(--bg-rgb) / 0.5);
  font-weight: 750;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
}

/* 누를 때마다 아래에서 올라오게 한다. transition 이 아니라 애니메이션이라야
   이미 떠 있는 상태에서 다시 눌러도 처음부터 다시 돈다. */
.floating-tools-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: floating-toast-rise 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floating-toast-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 켤 때는 초록, 끌 때는 잿빛, 막을 때는 붉은색. 글을 읽지 않아도 구분된다. */
.floating-tools-toast.tone-on {
  border-color: rgb(var(--green-rgb) / 0.7);
  background: rgb(var(--green-dim-rgb) / 0.97);
  color: var(--on-green-dim);
}

.floating-tools-toast.tone-off {
  border-color: rgb(var(--line-bright-rgb) / 0.9);
  background: var(--surface-3);
  color: var(--soft);
}

.floating-tools-toast.tone-warn {
  border-color: rgb(var(--red-rgb) / 0.68);
  background: rgb(var(--red-dim-rgb) / 0.97);
  color: var(--on-red-dim);
}

@keyframes floating-timer-alert {
  0%, 100% { box-shadow: 0 0 0 rgb(var(--red-rgb) / 0); }
  50% { box-shadow: 0 0 0 4px rgb(var(--red-rgb) / 0.15); }
}

@media (max-width: 430px) {
  .floating-summary-label { display: none; }
  .floating-timer-summary { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-timer-row.is-completed { animation: none; }
  .floating-tools-toast.is-visible { animation: none; }
  .mode-rail .floating-tools-popover,
  .mode-top .floating-tools-popover { transition: none; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  background: var(--bg);
  background-attachment: fixed;
}

html.modal-scroll-locked,
body.modal-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

button, input { font: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

/*
 * 껍데기는 **가운데** 있다. 폭만 넓혔다.
 *
 * 한동안 화면을 다 쓰게 하고 사이드바를 왼쪽 끝에 붙여 봤는데, 가운데가 낫다는
 * 결론이 났다(2026-09-24 운영자). 되돌리되 좁던 것은 그대로 두지 않는다 —
 * 1360 에서 1560 으로 200px 넓혔다. 본문이 1080 에서 1280 이 된다.
 *
 * **이 값을 여기 말고 다른 데 적지 않는다.** 유니크 조합 결과판이 position: fixed
 * 라 제 자리를 직접 셈하는데, 예전에 1360 을 박아 둔 탓에 폭을 바꾸자 6px 삐져
 * 나왔다. 그래서 --shell-max 하나를 보게 했다.
 */
:root {
  --shell-max: 1560px;
}

.app-shell {
  /*
   * relative 만 건다. transform 으로 밀면 안 된다 — 그것은 자손의
   * position: fixed 가 기대는 기준을 바꿔 버려서, 유니크 조합 결과판처럼 화면에
   * 붙어 있어야 하는 것이 껍데기에 붙어 버린다. relative + right 는 그런 일이
   * 없다.
   */
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: min(var(--shell-max), 100%);
  min-height: 100vh;
  margin: 0 auto;

  /*
   * 타이머까지 **한 덩어리**로 보고 가운데 놓는다.
   *
   * 타이머는 껍데기 바깥 오른쪽에 선다. 껍데기만 가운데 두면 덩어리 전체는 그
   * 폭의 절반만큼 오른쪽으로 치우친다. 그 절반을 왼쪽으로 당긴다.
   * --dock-span 은 floating-tools.js 가 재어 넣고, 겹쳐 뜨는 모드에서는 0 이다.
   */
  right: calc(var(--dock-span, 0px) / 2);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.22);
  /* 스크롤바는 아래쪽 전역 규칙을 따른다. 여기에 있던 5px·투명도 0.25 짜리
     따로쓰기가 옆줄을 사실상 안 보이게 만들고 있었다. 폭만 조금 줄인다. */
}

.sidebar::-webkit-scrollbar {
  width: 11px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-width: 2px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--surface-3);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink-cyan);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgb(var(--cyan-rgb) / 0.08);
}

.brand-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-title::after {
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 8px;
  background: var(--cyan);
  content: "";
}

.brand p,
.page-head p,
.muted,
.empty,
.loading {
  color: var(--muted);
}

.suggestion-panel {
  width: 100%;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: rgb(var(--surface-1-rgb) / 0.82);
}

.suggestion-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--cyan);
}

.suggestion-panel h3 { margin: 0; font-size: 18px; }
.suggestion-panel p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.suggestion-panel .suggestion-anti-spam-notice { color: var(--ink-cyan); font-size: 13px; }
.suggestion-status-chip { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--gold); border-radius: 4px; background: var(--gold-dim); color: var(--on-gold-dim); font-size: 13px; font-weight: 800; white-space: nowrap; }
.suggestion-status-chip.resolved { border-color: var(--green); background: var(--green-dim); color: var(--on-green-dim); }
.suggestion-form { padding: 22px 24px 24px; }
.suggestion-form label { display: block; margin-bottom: 9px; color: var(--text); font-size: 14px; font-weight: 700; }
.suggestion-form input[name="title"] { box-sizing: border-box; width: 100%; min-height: 44px; margin-bottom: 18px; padding: 10px 13px; border: 1px solid var(--cyan); border-radius: 6px; outline: none; background: var(--surface-1); color: var(--ink-cyan); font: inherit; }
.suggestion-form input[name="title"]:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgb(var(--cyan-rgb) / 0.14); }
.suggestion-form textarea { box-sizing: border-box; width: 100%; min-height: 190px; resize: vertical; padding: 13px; border: 1px solid var(--cyan); border-radius: 6px; outline: none; background: var(--surface-1); color: var(--ink-cyan); font: inherit; line-height: 1.6; }
.suggestion-form textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgb(var(--cyan-rgb) / 0.14); }
.suggestion-form textarea::placeholder { color: var(--ink-cyan); }
.suggestion-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.suggestion-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.suggestion-count { color: var(--ink-cyan); font-size: 13px; }
.suggestion-submit { min-width: 76px; padding: 9px 15px; border: 1px solid var(--cyan); border-radius: 6px; background: var(--cyan); color: var(--on-cyan); font: inherit; font-weight: 700; cursor: pointer; }
.suggestion-submit:hover:not(:disabled) { background: var(--cyan); color: var(--on-cyan); }
.suggestion-submit:disabled { opacity: 0.6; cursor: wait; }
.suggestion-feedback { min-height: 21px; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.suggestion-feedback.success { color: var(--ink-green); }
.suggestion-feedback.error { color: var(--ink-red); }
.suggestion-board { width: 100%; margin-top: 22px; }
.suggestion-board-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.suggestion-board-head h3 { margin: 0; font-size: 20px; }
.suggestion-board-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.suggestion-board-controls { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 13px; }
.suggestion-board-controls select, .suggestion-board-controls button, .suggestion-board-pager button { min-height: 36px; padding: 6px 11px; border: 1px solid var(--cyan); border-radius: 7px; background: var(--surface-2); color: var(--ink-cyan); font: inherit; cursor: pointer; }
.suggestion-board-controls button:hover, .suggestion-board-pager button:hover:not(:disabled) { border-color: var(--cyan); }
.suggestion-board-list { display: grid; gap: 9px; }
.suggestion-post, .suggestion-board-empty { border: 1px solid var(--cyan); border-radius: 9px; background: rgb(var(--surface-1-rgb) / 0.82); }
.suggestion-board-empty { margin: 0; padding: 20px; color: var(--muted); }
.suggestion-post { overflow: hidden; border-left-width: 4px; }
.suggestion-post--pending { border-color: var(--gold); border-left-color: var(--gold); }
.suggestion-post--resolved { border-color: var(--green); border-left-color: var(--green); }
.suggestion-post-header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; padding: 16px 18px 14px; background: var(--surface-2); }
.suggestion-post--pending .suggestion-post-header { background: var(--gold-dim); }
.suggestion-post--resolved .suggestion-post-header { background: var(--green-dim); }
.suggestion-post-heading { min-width: 0; flex: 1 1 220px; }
.suggestion-post-label, .suggestion-post-section-label { display: block; color: var(--ink-cyan); font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
.suggestion-post--pending .suggestion-post-label { color: var(--ink-gold); }
.suggestion-post--resolved .suggestion-post-label { color: var(--ink-green); }
.suggestion-post-title { margin: 5px 0 0; color: var(--ink-cyan); font-size: 18px; line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.suggestion-post-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.suggestion-replied-chip { padding: 4px 7px; border-radius: 5px; background: var(--surface-3); color: var(--ink-cyan); font-size: 13px; }
.suggestion-post-meta { width: 100%; margin: 0; color: var(--ink-cyan); font-size: 13px; }
.suggestion-post-body { border-top: 1px solid var(--cyan); padding: 18px; }
.suggestion-post--pending .suggestion-post-body { border-top-color: var(--gold); }
.suggestion-post--resolved .suggestion-post-body { border-top-color: var(--green); }
.suggestion-post-body p { margin: 9px 0 0; color: var(--text); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.suggestion-post-body .suggestion-awaiting { margin-top: 16px; color: var(--ink-cyan); font-size: 13px; }
.suggestion-admin-reply { margin-top: 17px; padding: 15px; border-left: 3px solid var(--cyan); border-radius: 5px; background: var(--surface-2); }
.suggestion-admin-reply strong { color: var(--ink-cyan); }
.suggestion-admin-reply time { margin-left: 10px; color: var(--ink-cyan); font-size: 13px; }
.suggestion-admin-reply p { margin-top: 9px; }
.suggestion-board-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 15px; color: var(--soft); font-size: 13px; }
.suggestion-board-pager button:disabled { opacity: 0.45; cursor: default; }

.nav-list {
  display: grid;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-nav-toggle {
  display: none;
}

.nav-list :is(button, a),
.filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--panel-strong-rgb) / 0.76);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-list :is(button, a) {
  width: 100%;
  justify-content: flex-start;
  padding: 0 12px;
  position: relative;
}

.nav-list :is(button, a).active,
.nav-list :is(button, a):hover,
.filter-toggle.on {
  border-color: var(--cyan);
  background: rgb(var(--cyan-rgb) / 0.15);
  color: var(--text-strong);
}

.nav-list :is(button, a):hover {
  transform: translateX(2px);
}

.nav-list :is(button, a).active::before {
  width: 4px;
  height: 18px;
  margin-right: 2px;
  border-radius: 999px;
  background: var(--cyan);
  content: "";
}

.nav-list :is(button, a).suggestion-nav-tab {
  border-color: rgb(var(--green-rgb) / 0.62);
  background: rgb(var(--green-dim-rgb) / 0.72);
  color: var(--on-green-dim);
}

.nav-list :is(button, a).suggestion-nav-tab:hover,
.nav-list :is(button, a).suggestion-nav-tab.active {
  border-color: var(--green);
  background: rgb(var(--green-dim-rgb) / 0.78);
  color: var(--text-strong);
}

.nav-list :is(button, a).suggestion-nav-tab.active::before {
  background: var(--green);
}

.nav-list :is(button, a).hunting-nav-tab {
  border-color: rgb(var(--gold-rgb) / 0.48);
}

.hunting-maintenance-sign {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 3px 5px 3px 3px;
  border: 1px solid rgb(var(--gold-rgb) / 0.64);
  border-radius: 4px;
  background: rgb(var(--gold-dim-rgb) / 0.8);
  color: var(--on-gold-dim);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.hunting-maintenance-sign img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  image-rendering: pixelated;
}

.hunting-village-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}

.hunting-village-tab {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 9px 12px;
  border: 1px solid rgb(var(--line-rgb) / 0.9);
  border-radius: 12px;
  background: rgb(var(--surface-2-rgb) / 0.9);
  color: var(--text);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hunting-village-tab strong { font-size: 14px; }
.hunting-village-tab span { color: var(--ink-cyan); font-size: 13px; }
/* 마을 칸도 탭 거르개 단추(.chip-btn)와 같은 색 규칙 — 누르면 강조색으로 꽉 찬다(2026-09-30). */
.hunting-village-tab:hover { border-color: rgb(var(--cyan-rgb) / 0.55); background: var(--surface-3); }
.hunting-village-tab:active { transform: scale(0.98); }
.hunting-village-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hunting-village-tab.active { border-color: var(--cyan); background: var(--cyan); color: var(--on-cyan); box-shadow: 0 8px 18px -10px rgb(var(--cyan-rgb) / 0.9); }
.hunting-village-tab.active span { color: var(--on-cyan); opacity: 0.85; }

.hunting-card-village-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border: 1px solid rgb(var(--green-rgb) / 0.42);
  border-radius: 4px;
  background: rgb(var(--green-dim-rgb) / 0.38);
  color: var(--on-green-dim);
  font-size: 13px;
  font-weight: 700;
}

.content {
  min-width: 0;
  padding: 18px 14px 36px;
}

/*
 * 탭마다 본문 폭을 달리 준다.
 *
 * 읽는 탭과 보는 탭은 알맞은 폭이 다르다. 글은 한 줄이 길면 눈이 다음 줄 첫머리를
 * 못 찾아 읽기가 나빠지고, 판·표는 좁으면 칸이 접혀 한눈에 안 들어온다. 하나로
 * 맞추면 둘 중 하나가 손해를 본다.
 *
 * 껍데기가 --shell-max(1560px)로 묶여 있으므로 판·표 탭은 그 폭(본문 1,252px)을
 * 다 쓰고, 글 탭만 1,180px 에서 멈춘다. 아래 판·표 목록의 1660 은 껍데기를 더
 * 넓히지 않는 한 안 걸린다 — 넓힐 때 글 탭만 따라 넓어지지 않게 남겨 둔다.
 *
 * 탭 이름은 app.js 가 `#app` 에 적어 준다.
 */
#app {
  max-width: var(--tab-max, 1180px);
}

/* 판·표가 있는 탭. 넓을수록 한눈에 들어온다. */
#app[data-tab="myGear"],
#app[data-tab="market"],
#app[data-tab="archive"],
#app[data-tab="crafting"],
#app[data-tab="probability"],
#app[data-tab="sets"],
#app[data-tab="requests"],
#app[data-tab="weekQuests"],
#app[data-tab="hunting"],
#app[data-tab="bosses"],
#app[data-tab="skills"],
#app[data-tab="flags"] {
  --tab-max: 1660px;
}

.sr-only {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.global-search-shell {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  gap: 7px;
  margin: -18px -14px 14px;
  padding: 14px 14px 10px;
  background: rgb(var(--bg-rgb) / 0.3);
  backdrop-filter: blur(12px);
}

.global-search-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 5px 6px 5px 15px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.38);
  border-radius: 13px;
  background: rgb(var(--surface-1-rgb) / 0.97);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
}

.global-search-form:focus-within {
  border-color: rgb(var(--cyan-rgb) / 0.85);
  box-shadow: 0 0 0 3px rgb(var(--cyan-rgb) / 0.1), 0 12px 34px rgba(0, 0, 0, 0.28);
}

/* 예전에는 테두리·그라데이션·굵은 글씨라 오른쪽 "검색" 버튼과 똑같이 생겼었다.
   바 양끝에 버튼처럼 생긴 것이 둘이면 어느 쪽을 눌러야 하는지 헷갈린다.
   이건 누르는 것이 아니라 입력란을 가리키는 표시이므로 아이콘만 남긴다. */
/* 글자는 남기되 테두리·그라데이션은 주지 않는다. 그것 때문에 오른쪽 "검색" 버튼과
   똑같이 생겨서, 바 양끝에 버튼처럼 보이는 것이 둘이 됐었다. 이건 누르는 것이 아니라
   입력란을 가리키는 표시다. 세로 선으로 입력란과 구분만 해 준다. */
.global-search-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding-right: 12px;
  border-right: 1px solid rgb(var(--cyan-rgb) / 0.2);
  color: var(--ink-cyan);
  white-space: nowrap;
  cursor: text;
}

.global-search-label-text {
  color: var(--soft);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* 이모지 🔍 는 색 지정이 먹지 않고(제 색으로 그려진다) 플랫폼마다 기울기와 크기가
   달라 다크 UI에서 겉돈다. 선으로 그린 SVG로 바꿨다. 1em이라 font-size로 크기를 잡는다. */
.search-icon-glyph {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  flex: none;
}

.global-search-main-icon {
  display: grid;
  place-items: center;
  color: var(--ink-cyan);
  font-size: 19px;
  transition: color 160ms ease;
}

.global-search-form:focus-within .global-search-label {
  color: var(--ink-cyan);
  border-right-color: rgb(var(--cyan-rgb) / 0.4);
}

.global-search-form:focus-within .global-search-label-text { color: var(--ink-cyan); }

.global-search-form input {
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.16);
  border-radius: 9px;
  outline: 0;
  background: rgb(var(--surface-0-rgb) / 0.6);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, background 160ms ease;
}

.global-search-form input:hover { border-color: rgb(var(--cyan-rgb) / 0.3); }

.global-search-form input:focus {
  border-color: rgb(var(--cyan-rgb) / 0.55);
  background: rgb(var(--surface-0-rgb) / 0.85);
}

.global-search-form input::-webkit-search-cancel-button { display: none; }
.global-search-form input::placeholder { color: var(--ink-cyan); }

.global-search-clear,
.global-search-submit {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.global-search-clear {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cyan);
}

.global-search-clear[hidden] { display: none; }
.global-search-clear:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-strong); }

.global-search-submit {
  min-width: 74px;
  min-height: 38px;
  padding: 0 17px;
  border-radius: 9px;
  background: var(--cyan);
  color: var(--on-cyan);
  font-weight: 800;
}

.global-search-submit:hover { filter: brightness(1.12); }

.global-search-recents {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  color: var(--ink-cyan);
  font-size: 13px;
}

.global-search-recents[hidden] { display: none; }
.global-search-recents > span { flex: 0 0 auto; font-weight: 700; }
.global-search-recents > div { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
.global-search-recents > div::-webkit-scrollbar { display: none; }

.global-search-recent-chip {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgb(var(--cyan-rgb) / 0.3);
  border-radius: 999px;
  background: rgb(var(--surface-1-rgb) / 0.88);
}

.global-search-recent-chip button {
  min-height: 25px;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  color: var(--soft);
  font: inherit;
  cursor: pointer;
}

.global-search-recent-chip button:last-child { padding-left: 3px; color: var(--ink-cyan); }
.global-search-recent-chip button:hover { color: var(--text-strong); }

.global-search-page {
  display: grid;
  gap: 14px;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
}

.global-search-page-head {
  padding: 20px 22px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.26);
  border-radius: 12px;
  background: rgb(var(--surface-3-rgb) / 0.8);
}

.global-search-page-head > span {
  color: var(--ink-green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.global-search-page-head h1 { margin: 4px 0 5px; color: var(--ink-cyan); font-size: 24px; line-height: 1.3; }
.global-search-page-head p { margin: 0; color: var(--soft); font-size: 13px; }

.global-search-section-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.global-search-section {
  overflow: hidden;
  border: 1px solid rgb(var(--cyan-rgb) / 0.28);
  border-radius: 12px;
  background: rgb(var(--surface-1-rgb) / 0.92);
}

.global-search-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 49px;
  padding: 9px 12px;
  border-bottom: 1px solid rgb(var(--cyan-rgb) / 0.2);
  background: rgb(var(--surface-2-rgb) / 0.66);
}

.global-search-section > header > div { display: flex; min-width: 0; align-items: center; gap: 8px; }
.global-search-section > header img { width: 24px; height: 24px; object-fit: contain; }
.global-search-section > header h2 { overflow: hidden; margin: 0; color: var(--ink-cyan); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-section > header span { flex: 0 0 auto; color: var(--ink-cyan); font-size: 13px; }

.global-search-section > header > a {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.3);
  border-radius: 7px;
  color: var(--ink-cyan);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.global-search-section > header > a:hover { border-color: var(--cyan); background: rgb(var(--cyan-rgb) / 0.1); }
.global-search-result-list { display: grid; }

.global-search-result-card {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
}

.global-search-result-card + .global-search-result-card { border-top: 1px solid rgb(var(--cyan-rgb) / 0.16); }
.global-search-result-card:hover { background: rgb(var(--cyan-rgb) / 0.07); }

.global-search-result-image {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.25);
  border-radius: 9px;
  background: rgb(var(--surface-0-rgb) / 0.7);
}

.global-search-result-image img { max-width: 35px; max-height: 35px; object-fit: contain; }
.global-search-result-copy { display: grid; min-width: 0; gap: 2px; }
.global-search-result-copy strong { overflow: hidden; color: var(--ink-cyan); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result-meta { overflow: hidden; color: var(--ink-green); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result-description { display: -webkit-box; overflow: hidden; color: var(--ink-cyan); font-size: 13px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.global-search-result-arrow { color: var(--ink-cyan); font-size: 22px; }

.global-search-loading,
.global-search-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 54px 20px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.24);
  border-radius: 12px;
  background: rgb(var(--surface-1-rgb) / 0.86);
  text-align: center;
}

.global-search-loading > span {
  width: 30px;
  height: 30px;
  border: 3px solid rgb(var(--cyan-rgb) / 0.18);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: global-search-spin 0.8s linear infinite;
}

.global-search-loading strong,
.global-search-empty h2 { margin: 4px 0 0; color: var(--ink-cyan); font-size: 16px; }
.global-search-loading p,
.global-search-empty p { margin: 0; color: var(--ink-cyan); font-size: 13px; }
.global-search-empty > span { font-size: 30px; }
.global-search-warning,
.global-search-section-error { margin: 0; padding: 10px 12px; color: var(--ink-red); font-size: 13px; }
.global-search-warning { border: 1px solid rgb(var(--red-rgb) / 0.3); border-radius: 9px; background: rgb(var(--red-dim-rgb) / 0.24); }

@keyframes global-search-spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .global-search-section-list { grid-template-columns: 1fr; }
}

/* 접혀 있을 때도 도구 묶음이 "검색" 버튼을 덮어 클릭이 막혔다. 잰 폭만큼 비켜 준다.
   561px 아래에서는 도구가 검색줄 위쪽에 놓이므로(padding-top으로 처리) 해당 없다. */
/*
 * 1700px 이라는 위쪽 한계가 있었다. 그 위에서는 껍데기가 1360px 로 묶여 가운데
 * 있었으므로, 오른쪽 빈자리에 도구가 떠 있어 겹칠 일이 없었기 때문이다.
 *
 * 이제 껍데기가 화면을 다 쓰므로 그 전제가 깨졌다. 한계를 뺀다.
 */

/*
 * 도구가 `top` 으로 뜰 때만 검색줄이 비켜 준다.
 *
 * 껍데기가 가운데 있으므로 화면이 넓으면 도구가 그 바깥 빈자리에 서고(`full`),
 * 좁으면 본문 위에 겹쳐 뜬다(`top`). 겹치는 쪽일 때만 "검색" 단추를 비켜 준다.
 * 위쪽 한계를 두지 않는다 — 조건이 mode-top 이라 알아서 맞는다.
 */
@media (min-width: 561px) {
  body:has(.floating-tools-root.mode-top) .global-search-shell {
    padding-right: calc(var(--floating-dock-width, 0px) + 24px);
  }
}

@media (min-width: 821px) {
  body:has(.floating-tools-root.mode-top.panel-open) .global-search-shell { padding-right: 344px; }
}

@media (max-width: 560px) {
  .global-search-shell { margin-top: -10px; padding-top: 62px; }
  .global-search-form { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 5px; padding-left: 6px; }
  .global-search-label { gap: 5px; height: 28px; padding-right: 8px; }
  .global-search-label-text { display: none; }
  .global-search-main-icon { font-size: 16px; }
  .global-search-form input { padding: 0 10px; font-size: 13px; }
  .global-search-submit { min-width: 57px; padding: 0 11px; }
  .global-search-page-head { padding: 16px; }
  .global-search-page-head h1 { font-size: 19px; }
  .global-search-result-card { grid-template-columns: 39px minmax(0, 1fr) auto; padding: 9px 10px; }
  .global-search-result-image { width: 39px; height: 39px; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 10px;
  padding: 0 0 12px;
  background: rgb(var(--bg-rgb) / 0.98);
  backdrop-filter: blur(12px);
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: rgb(var(--surface-1-rgb) / 0.9);
  color: var(--text-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.searchbox span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.searchbox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-strong);
}

.searchbox input::placeholder {
  color: var(--ink-cyan);
}

.searchbox:focus-within {
  border-color: var(--cyan);
}

.filter-toggle {
  flex: 0 0 auto;
  padding: 0 14px;
}

.page {
  display: grid;
  gap: 12px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--ink-cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-callout {
  padding: 14px;
  border: 1px solid rgb(var(--green-rgb) / 0.24);
  border-radius: 8px;
  background: rgb(var(--bg-rgb) / 0.5);
}

.hero-callout span {
  color: var(--ink-green);
  font-size: 13px;
  font-weight: 800;
}

.hero-callout strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.page-head {
  display: grid;
  gap: 5px;
  padding: 2px 0 4px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.map-grid,
.monster-grid,
.doc-grid,
.guide-grid,
.npc-grid,
.drop-list {
  display: grid;
  gap: 10px;
}

.stat,
.wide-card,
.map-card,
.drop-card,
.monster-card,
.doc-card,
.guide-card,
.route-card,
.npc-card,
.note-list,
.table-wrap,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.wide-card,
.map-card,
.drop-card,
.monster-card,
.doc-card,
.guide-card,
.route-card,
.npc-card,
.timeline-item {
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.wide-card:hover,
.map-card:hover,
.drop-card:hover,
.monster-card:hover,
.doc-card:hover,
.guide-card:hover,
.route-card:hover,
.npc-card:hover,
.timeline-item:hover {
  border-color: rgb(var(--cyan-rgb) / 0.42);
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.stat {
  display: grid;
  gap: 5px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.stat::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  content: "";
}

.stat span,
label span,
.section-title small {
  display: block;
  color: var(--muted-2);
  font-size: 13px;
}

.stat strong {
  font-size: 24px;
  line-height: 1.2;
}

.guide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide-card,
.map-body,
.drop-card,
.monster-card,
.doc-card,
.guide-card {
  padding: 14px;
}

.guide-card h3,
.section-title h3 {
  font-size: 17px;
}

.guide-card ul,
.doc-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.guide-card li,
.doc-card li {
  margin: 6px 0;
  color: var(--soft);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 4px;
}

.section-title h3::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--gold);
  content: "";
  vertical-align: 1px;
}

.region-list,
.route-list,
.timeline {
  display: grid;
  gap: 10px;
}

.timeline-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgb(var(--surface-2-rgb) / 0.76);
}

.timeline-card h3 {
  margin: 6px 0 8px;
  font-size: 17px;
}

.timeline-card ul {
  margin: 10px 0;
  padding-left: 20px;
}

.timeline-card li {
  color: var(--soft);
}

.timeline-date {
  color: var(--muted-2);
  font-size: 13px;
}

.timeline-card-actions,
.update-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.update-image-count {
  color: var(--ink-cyan);
  font-size: 13px;
}

.update-detail-heading {
  min-width: 0;
}

.update-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}

.update-article-content {
  display: grid;
  gap: 7px;
}

.update-article-line {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.update-article-heading {
  margin-top: 12px;
  color: var(--ink-cyan);
  font-size: 16px;
  font-weight: 800;
}

.update-article-line[data-update-first-match] {
  scroll-margin-top: 24px;
  padding: 8px 10px;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: rgb(var(--gold-rgb) / 0.1);
}

.update-article-image {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.25);
  border-radius: 6px;
  background: rgb(var(--surface-0-rgb) / 0.55);
  cursor: zoom-in;
}

.update-article-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
}

.update-article-image figcaption {
  margin-top: 8px;
  color: var(--ink-cyan);
  font-size: 13px;
  text-align: center;
}

.section-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title-row h3 { margin: 0; }
.section-title-row span { color: var(--ink-cyan); font-size: 13px; }
@media (max-width:640px) { .section-title-row { align-items: flex-start; flex-direction: column; gap: 4px; } }

.update-article-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-margin-top: 24px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.28);
  border-radius: 6px;
  background: rgb(var(--surface-0-rgb) / 0.55);
}

.update-article-table-wrap[data-update-first-match] {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgb(var(--gold-rgb) / 0.1);
}

.update-article-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.update-article-table-wide {
  min-width: 820px;
}

.update-article-table-very-wide {
  min-width: 1120px;
}

.update-article-table caption {
  padding: 10px 12px;
  color: var(--ink-cyan);
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.update-article-table th,
.update-article-table td {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.24);
  text-align: center;
  vertical-align: middle;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
  /*
   * 칠은 **테마가 한다.** content.js 는 공식 표의 진하기(--update-cell-tone, 0~14)만
   * 넘기고 색은 안 넘긴다. 예전에는 칸마다 딥블루로 섞은 색을 인라인으로 박아서,
   * 화이트 테마에서 흰 바탕 위에 남색 덩어리가 떴다(대비 1.61).
   *
   * 네 규칙이 !important 로 같은 속성을 다투던 것을 여기 하나로 합쳤다. 한 선택자가
   * 맡으니 !important 가 필요 없다.
   */
  color: var(--text);
  background-color: color-mix(in srgb,
    var(--text) calc(var(--update-cell-tone, 0) * 1%),
    var(--surface-1));
}

.update-article-table td p,
.update-article-table th p {
  margin: 0;
}

.update-article-table :where(p, span, div, font, b, strong, em, i, u, a) {
  color: inherit !important;
  background-color: transparent !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.update-article-table td img,
.update-article-table th img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 공식이 th 를 쓸 때만 걸린다. 대개는 td 에 색으로 머리줄을 표시한다. */
.update-article-table th {
  font-weight: 800;
  background-color: color-mix(in srgb,
    var(--text) calc((var(--update-cell-tone, 0) + 6) * 1%),
    var(--surface-1));
}

.update-article-table .update-article-table-title {
  color: var(--ink-gold);
  font-size: 15px;
  font-weight: 800;
  background-color: color-mix(in srgb,
    var(--gold) 12%,
    var(--surface-1));
}

/*
 * 줄무늬는 **공식이 색을 안 준 줄에만** 준다. 색을 준 줄에 덧칠하면 공식이 매긴
 * 단계가 뭉개진다. tone 이 없을 때 3% 를 주고, 있으면 위 규칙이 그대로 이긴다.
 */
.update-article-table tr:nth-child(even) td:not([style*="--update-cell-tone"]) {
  background-color: color-mix(in srgb, var(--text) 3%, var(--surface-1));
}

@media (max-width: 760px) {
  .update-article-table {
    font-size: 13px;
    line-height: 1.55;
  }
  .update-article-table caption,
  .update-article-table .update-article-table-title {
    font-size: 13px;
  }
  .update-article-table th,
  .update-article-table td {
    padding: 8px 7px;
  }
}

.wide-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr auto;
  gap: 14px;
  align-items: start;
}

.hunting-wide-card {
  grid-template-columns: minmax(230px, 0.95fr) minmax(190px, 0.75fr) minmax(230px, 0.95fr) minmax(300px, 1.2fr) minmax(140px, auto);
}

.wide-card h4 {
  font-size: 13px;
  color: var(--muted-2);
}

.hunting-summary {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hunting-summary h3 {
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: normal;
}

.compact-column {
  min-width: 0;
}

.compact-column .tag-row {
  margin-top: 8px;
}

.compact-column .tag-row span {
  max-width: 100%;
}

.route-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.route-range {
  display: grid;
  min-height: 72px;
  place-items: center;
  color: var(--on-cyan);
  background: var(--cyan);
  border-radius: 8px;
  font-weight: 800;
}

.route-main h3 {
  font-size: 18px;
}

.route-main p {
  margin-top: 8px;
  color: var(--soft);
}

.route-main ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--soft);
}

.combo-board,
.unique-controls-card,
.unique-family-card {
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: rgb(var(--surface-1-rgb) / 0.82);
}

.combo-board {
  margin-bottom: 16px;
  padding: 18px;
}

.combo-board-head,
.unique-family-card > header,
.unique-family-actions,
.unique-item-card-top,
.unique-item-main,
.unique-stat-chip-list,
.unique-item-stats {
  display: flex;
  align-items: center;
}

.combo-board-head,
.unique-family-card > header {
  justify-content: space-between;
  gap: 14px;
}

.combo-board-head h2,
.unique-family-card h2 {
  font-size: 19px;
}

.unique-value-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 7px;
  border: 1px solid rgb(var(--green-rgb) / 0.72);
  border-radius: 4px;
  background: rgb(var(--green-dim-rgb) / 0.42);
  color: var(--on-green-dim);
  font-size: 13px;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.combo-board-head p,
.combo-board p {
  margin-top: 6px;
  color: var(--soft);
  font-size: 13px;
}

.unique-stat-chip-list,
.unique-item-stats {
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.unique-stat-chip {
  display: inline-flex;
  padding: 3px 6px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.45);
  border-radius: 4px;
  background: rgb(var(--cyan-rgb) / 0.24);
  color: var(--on-cyan-dim);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.unique-stat-empty {
  color: var(--ink-cyan);
  font-size: 13px;
}

/* 조합판 — 모자·반지·타이어·무기R·무기L 다섯 칸. 좁은 폭에서는 두 줄 · 한 줄로 접힌다. */
.combo-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.combo-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgb(var(--line-rgb) / 0.9);
  border-radius: 8px;
  background: rgb(var(--surface-0-rgb) / 0.6);
  color: var(--text);
  font: inherit;
  text-align: left;
}

button.combo-slot {
  cursor: pointer;
}

.combo-slot.is-empty {
  border-style: dashed;
  color: var(--muted);
}

.combo-slot.is-set {
  border-color: rgb(var(--gold-rgb) / 0.7);
  background: rgb(var(--gold-rgb) / 0.08);
}

.combo-slot.is-unique {
  border-color: rgb(var(--cyan-rgb) / 0.7);
  background: rgb(var(--cyan-rgb) / 0.1);
}

.combo-slot-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.combo-slot-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  word-break: keep-all;
}

.combo-slot-item img {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.combo-slot-item strong {
  font-size: 13px;
  line-height: 1.35;
}

.combo-slot-kind,
.combo-slot-empty {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

.combo-verdict {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgb(var(--surface-0-rgb) / 0.6);
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.combo-verdict span {
  margin-right: 8px;
  color: var(--muted);
  font-weight: 600;
}

.combo-verdict.is-on {
  background: rgb(var(--green-dim-rgb) / 0.34);
  color: var(--on-green-dim);
}

.combo-verdict.is-pending {
  background: rgb(var(--gold-rgb) / 0.1);
  color: var(--ink-gold);
}

.combo-verdict.is-off {
  background: rgb(var(--red-rgb) / 0.12);
}

.combo-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.combo-totals-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.combo-totals .unique-stat-chip-list {
  margin-top: 0;
}

.combo-send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}

.combo-send-btn {
  padding: 8px 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: rgb(var(--gold-rgb) / 0.14);
  color: var(--ink-gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.combo-send-btn:disabled {
  border-color: rgb(var(--line-rgb) / 0.9);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

.combo-board .combo-send-reason {
  margin: 0;
  color: var(--muted);
}

/* 세트 고르기 — 예전 유니크 탭의 「일반 장비 세트 반지」 카드 모양을 그대로 쓴다. */
.combo-set-hint {
  margin: 4px 0 10px;
  color: var(--soft);
  font-size: 13px;
}

.combo-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 8px;
}

.combo-set-card {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 68px;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: var(--surface-1);
  color: var(--ink-cyan);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.combo-set-card:hover,
.combo-set-card.in-board {
  background: rgb(var(--cyan-rgb) / 0.25);
}

.combo-set-card.focused {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.combo-set-card img,
.combo-set-card-empty {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.combo-set-card-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.combo-set-card-copy strong,
.combo-set-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-set-card-copy strong {
  font-size: 14px;
}

.combo-set-card-copy span {
  font-size: 13px;
}

/* 고른 세트의 부위 칩 줄 */
.combo-set-focus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgb(var(--gold-rgb) / 0.6);
  border-radius: 8px;
  background: rgb(var(--gold-rgb) / 0.08);
}

.combo-set-focus strong {
  color: var(--ink-gold);
}

.combo-set-focus-label {
  color: var(--muted);
  font-size: 13px;
}

.combo-part-chip {
  padding: 4px 10px;
  border: 1px solid rgb(var(--line-rgb) / 0.9);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.combo-part-chip.on {
  border-color: var(--gold);
  background: rgb(var(--gold-rgb) / 0.18);
  color: var(--ink-gold);
}

.combo-part-chip.is-all {
  border-style: dashed;
}

.combo-set-detail-link {
  margin-left: auto;
  color: var(--ink-gold);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* 작게 보기 · 크게 보기 */
.sets-view-toggle {
  display: inline-flex;
  border: 1px solid rgb(var(--line-rgb) / 0.9);
  border-radius: 8px;
  overflow: hidden;
}

.sets-view-toggle button {
  padding: 7px 12px;
  border: 0;
  background: transparent;
  color: var(--soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.sets-view-toggle button.active {
  background: rgb(var(--gold-rgb) / 0.16);
  color: var(--ink-gold);
}

#uniqueResultsContainer {
  margin-top: 22px;
  padding-bottom: 72px;
}

/* 아래 요약 막대 — 조합판이 화면 밖일 때만 뜬다(IntersectionObserver). */
.combo-dock {
  position: fixed;
  z-index: 40;
  right: max(14px, calc((100vw - var(--shell-max)) / 2 + var(--dock-span, 0px) / 2 + 14px));
  bottom: 16px;
  left: max(294px, calc((100vw - var(--shell-max)) / 2 - var(--dock-span, 0px) / 2 + 294px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.7);
  border-radius: 8px;
  background: rgb(var(--surface-1-rgb) / 0.96);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.combo-dock[hidden] {
  display: none;
}

.combo-dock-verdict {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.combo-dock-verdict.is-on {
  color: var(--on-green-dim);
}

.combo-dock-verdict.is-pending {
  color: var(--ink-gold);
}

.combo-dock-totals {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.combo-dock-top {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: rgb(var(--gold-rgb) / 0.14);
  color: var(--ink-gold);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .combo-dock { right: 8px; left: 8px; bottom: 8px; }
  .combo-dock-totals { display: none; }
}

/* 세트 카드의 조합판 단추 */
.set-piece-combo-btn,
.set-combo-all-btn {
  padding: 3px 8px;
  border: 1px solid rgb(var(--gold-rgb) / 0.6);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-gold);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.set-piece-combo-btn.is-on {
  background: rgb(var(--gold-rgb) / 0.16);
}

@media (max-width: 900px) {
  .combo-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .combo-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 최소·최대 공격력은 스탯이 아니라 참고(타격 폭)라 칩을 흐리게 둔다(AGENTS.md 3.9.1). */
.unique-stat-chip.is-ref {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.combo-board .unique-set-effect-line {
  color: var(--muted);
  line-height: 1.6;
}

.combo-board .unique-index-notice {
  color: var(--muted);
  font-style: normal;
}

.unique-controls-card {
  margin-top: 16px;
  padding: 14px;
}

.unique-family-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.unique-catalog-heading {
  padding: 4px 2px;
}

.unique-catalog-heading h2 {
  color: var(--ink-cyan);
  font-size: 18px;
}

.unique-catalog-heading p {
  margin-top: 5px;
  color: var(--ink-cyan);
  font-size: 13px;
}

.unique-family-card {
  padding: 16px;
}

.unique-family-actions {
  flex-wrap: wrap;
  gap: 7px;
}

.unique-family-actions button {
  padding: 7px 10px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-cyan);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.unique-family-actions button:hover:not(:disabled) {
  border-color: var(--cyan);
  background: var(--surface-3);
}

.unique-family-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.unique-items-grid {
  display: grid;
  /* 다섯 부위. 한 칸이 170px 보다 좁아지면 줄을 바꾼다 — 고정 5칸이던 때 중간 폭에서 칩이 카드 밖으로 나갔다. */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.unique-standalone-section {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: rgb(var(--surface-1-rgb) / 0.82);
}

.unique-standalone-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.unique-standalone-column {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.unique-standalone-column h3 {
  color: var(--ink-cyan);
  font-size: 15px;
}

.unique-standalone-card-list {
  display: grid;
  gap: 9px;
}

.unique-column-empty {
  margin: 0;
  padding: 12px 8px;
  color: var(--ink-cyan);
  font-size: 13px;
  text-align: center;
  border: 1px dashed var(--cyan);
  border-radius: 5px;
}

.unique-item-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  /* 부위 카드 테두리. 배경과 거의 같은 --surface-3 이라 흐렸다(2026-09-25) — 한 단계 밝은 선으로. */
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  background: var(--surface-1);
  cursor: default;
}

.unique-item-select {
  display: grid;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}

.unique-item-card:hover,
.unique-item-card.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan);
  background: rgb(var(--surface-2-rgb) / 0.88);
}

.unique-item-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.unique-item-card-top {
  justify-content: space-between;
  gap: 6px;
}

.unique-slot-badge,
.unique-level-badge {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.unique-slot-badge {
  background: var(--surface-3);
  color: var(--ink-cyan);
}

.unique-level-badge {
  border: 1px solid rgb(var(--gold-rgb) / 0.48);
  color: var(--ink-gold);
}

.unique-item-main {
  gap: 8px;
  min-width: 0;
}

.unique-item-main img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: var(--surface-0);
}

.unique-item-main strong {
  min-width: 0;
  color: var(--ink-cyan);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.unique-item-stats {
  margin-top: 0;
}

.route-hunting-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgb(var(--line-bright-rgb) / 0.72);
}

.route-hunting-section h4 {
  color: var(--ink-cyan);
  font-size: 14px;
}

.route-hunting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.route-hunting-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: rgb(var(--surface-1-rgb) / 0.82);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.route-hunting-card:hover {
  border-color: var(--cyan);
  background: rgb(var(--surface-2-rgb) / 0.9);
}

.route-hunting-title {
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.route-hunting-level {
  align-self: start;
  padding: 2px 6px;
  border: 1px solid rgb(var(--gold-rgb) / 0.48);
  border-radius: 4px;
  color: var(--ink-gold);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.route-hunting-monsters {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 5px;
}

.route-hunting-monsters span {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(var(--cyan-rgb) / 0.12);
  color: var(--on-cyan-dim);
  font-size: 13px;
}

.map-card h3,
.monster-card h3,
.doc-card h3,
.timeline-item h3 {
  font-size: 16px;
  line-height: 1.3;
}

.tag-row.drops span {
  color: var(--on-green-dim);
  background: rgb(var(--green-dim-rgb) / 0.78);
  border-color: var(--green-dim);
}

.tag-row.boss-spawns span {
  color: var(--on-gold-dim);
  background: rgb(var(--gold-dim-rgb) / 0.72);
  border-color: rgb(var(--gold-rgb) / 0.42);
}

.source-ref,
.status-badge {
  display: none !important;
}

.status-badge.good {
  color: var(--on-green);
  background: var(--green);
}

.status-badge.warn {
  color: var(--on-gold);
  background: var(--gold);
}

.status-badge.neutral {
  color: var(--text);
  background: rgb(var(--panel-strong-rgb) / 0.92);
  border: 1px solid var(--surface-3);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.action-column {
  justify-content: flex-end;
}

.action-column .source-ref {
  max-width: 180px;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-button,
.close-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.42);
  border-radius: 8px;
  background: rgb(var(--cyan-rgb) / 0.22);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.detail-button:hover,
.close-button:hover {
  border-color: var(--cyan);
  background: rgb(var(--cyan-rgb) / 0.3);
}

.map-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-card {
  overflow: hidden;
  cursor: pointer;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 160px;
  background: var(--surface-1);
}

.image-strip img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  filter: saturate(1.08) contrast(1.03);
}

.image-placeholder,
.monster-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  color: var(--muted-2);
  background: var(--surface-1);
}

.map-body {
  display: grid;
  gap: 9px;
}

.map-body p,
.drop-card p,
.monster-card p,
.timeline-item li {
  color: var(--soft);
  overflow-wrap: anywhere;
}

.drop-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drop-list.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.drop-card {
  cursor: pointer;
}

.drop-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drop-card-head h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.3;
}

.drop-card .tag-row {
  max-height: 176px;
  overflow: auto;
  padding-right: 4px;
}

.level-badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: rgb(var(--gold-rgb) / 0.15);
  border: 1px solid rgb(var(--gold-rgb) / 0.35);
  color: var(--on-gold-dim);
  font-size: 13px;
  font-weight: 700;
}

.monster-meta,
.npc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgb(var(--line-rgb) / 0.7);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--surface-3);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted-2);
  background: rgb(var(--panel-strong-rgb) / 0.82);
  font-size: 13px;
}

td {
  color: var(--text);
}

.timeline-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.timeline-item time {
  color: var(--muted-2);
  font-size: 13px;
}

.timeline-item ul {
  margin: 10px 0;
  padding-left: 18px;
}

.note-list {
  display: grid;
  gap: 8px;
  padding: 14px;
  color: var(--soft);
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: stretch end;
  padding: 18px;
  background: rgb(var(--surface-0-rgb) / 0.6);
  backdrop-filter: blur(5px);
  overscroll-behavior: none;
}

.detail-panel {
  width: min(920px, 100%);
  height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgb(var(--cyan-rgb) / 0.34);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  overscroll-behavior: contain;
}

.detail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgb(var(--surface-0-rgb) / 0.94);
  backdrop-filter: blur(12px);
}

.detail-head h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.25;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgb(var(--surface-1-rgb) / 0.7);
}

.detail-gallery img {
  width: 100%;
  min-height: 180px;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--surface-3);
  border-radius: 8px;
  background: var(--bg);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 14px 0;
}

.detail-section {
  margin: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--panel-strong-rgb) / 0.62);
}

.detail-grid .detail-section {
  margin: 0;
}

.detail-section h4 {
  color: var(--ink-cyan);
  font-size: 14px;
}

.detail-section ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.detail-section li,
.detail-section p {
  margin: 5px 0;
  color: var(--soft);
  overflow-wrap: anywhere;
}

.drop-table-section {
  margin-top: 10px;
}

.drop-table {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.drop-table-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-0-rgb) / 0.54);
}

.drop-table-row strong {
  color: var(--ink-gold);
  font-size: 13px;
}

.drop-table-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drop-table-row span {
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid var(--green-dim);
  border-radius: 8px;
  background: rgb(var(--green-dim-rgb) / 0.78);
  color: var(--on-green-dim);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.doc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty,
.loading {
  display: grid;
  min-height: 220px;
  place-items: center;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    gap: 10px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .mobile-nav-toggle {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgb(var(--panel-strong-rgb) / 0.82);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }
  .mobile-nav-toggle-icon {
    color: var(--ink-cyan);
    font-size: 19px;
    line-height: 1;
  }
  .mobile-nav-toggle strong {
    max-width: 42vw;
    overflow: hidden;
    color: var(--ink-cyan);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sidebar:not(.mobile-nav-open) .nav-list {
    display: none;
  }
  /* 좁은 화면에서는 사이드바가 본문 위에 얹히므로 테마 칸이 한 덩이를 잡아먹는다.
     메뉴와 같이 접는다. 펼쳤을 때는 목록 끝으로 보낸다 - 브랜드 바로 아래에 나오면
     방금 누른 "전체 메뉴" 단추가 손가락 밑에서 밀려 내려간다. */
  .sidebar-theme {
    order: 99;
  }
  .sidebar:not(.mobile-nav-open) .sidebar-theme {
    display: none;
  }
  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .nav-list :is(button, a) {
    justify-content: center;
  }
  .nav-list :is(button, a).active::before {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .wide-card,
  .map-grid,
  .doc-grid,
  .guide-grid,
  .npc-grid,
  .drop-list,
  .drop-list.compact {
    grid-template-columns: 1fr;
  }
  .route-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-mark {
    width: 38px;
    height: 38px;
  }
  .brand-icon-img {
    width: 29px;
    height: 29px;
  }
  .sidebar-visitor-stats {
    display: none;
  }
  .sidebar.mobile-nav-open .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-list :is(button, a) {
    min-height: 46px;
    padding: 0 8px;
    font-size: 13px;
  }
  .nav-list :is(button, a) .hunting-maintenance-sign {
    display: none;
  }
  .filter-chips {
    flex-wrap: nowrap;
    margin-right: -14px;
    padding: 1px 14px 7px 1px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .filter-chips::-webkit-scrollbar {
    display: none;
  }
  .filter-chips .chip-btn {
  font-family: var(--font-label);
    flex: 0 0 auto;
    min-height: 36px;
  }
  .detail-head {
    align-items: flex-start;
  }
  .combo-board-head,
  .unique-family-card > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .unique-items-grid,
  .unique-standalone-columns {
    grid-template-columns: 1fr;
  }
}

/* 맵/지역별 필터 칩 & 그룹화 스타일 */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/*
 * 탭 카테고리 · 거르개 단추(모든 탭 공용). 2026-09-30 다시 그렸다 —
 *   안 누른 것: 옅은 바탕 + 머리카락 테두리(전부 청록 테두리면 화면이 무겁고 누른 것과 구분이 약했다)
 *   누른 것: 강조색으로 꽉 채우고 글씨는 그 위 전용 색(--on-cyan) · 은은한 그림자
 *   크기만 다른 .mini-chip 도 같은 알약 모양이다. 색은 전부 테마 토큰(8테마 대비 검사).
 */
.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgb(var(--line-rgb) / 0.9);
  background: rgb(var(--surface-2-rgb) / 0.9);
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.chip-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.chip-btn:active {
  transform: scale(0.97);
}

/* 다른 필터 때문에 0건이 된 칩. 눌러도 되지만 빈 화면이라는 것을 미리 알린다. */
.chip-btn.is-empty:not(.active) {
  opacity: 0.45;
}

.chip-btn:hover {
  border-color: rgb(var(--cyan-rgb) / 0.55);
  color: var(--text-strong);
  background: var(--surface-3);
}

.chip-btn.active,
.chip-btn.active:hover {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--on-cyan);
  font-weight: 700;
  box-shadow: 0 6px 16px -8px rgb(var(--cyan-rgb) / 0.9);
}

.grouped-container {
  display: grid;
  gap: 24px;
}

.map-group-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background: rgb(var(--surface-1-rgb) / 0.6);
  border: 1px solid rgb(var(--cyan-rgb) / 0.6);
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgb(var(--line-rgb) / 0.7);
}

.group-header h3 {
  font-size: 17px;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 6px;
}

.count-badge {
  color: var(--on-cyan-dim);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .brand {
    align-items: flex-start;
  }
  .brand-title {
    font-size: 18px;
  }
  .topbar {
    flex-direction: row;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .timeline-item,
  .npc-card {
    grid-template-columns: 1fr;
  }
  .detail-overlay {
    padding: 0;
  }
  .detail-panel {
    height: 100vh;
    border-radius: 0;
  }
  .detail-head {
    flex-direction: column;
  }
  .drop-table-row {
    grid-template-columns: 1fr;
  }
}

.mini-empty {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgb(var(--cyan-rgb) / 0.15);
  color: var(--on-cyan-dim);
  font-size: 13px;
  font-weight: 700;
}

.npc-mini-empty {
  background: rgb(var(--green-rgb) / 0.15);
  color: var(--on-green-dim);
}

.map-kind-tag {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgb(var(--cyan-rgb) / 0.15);
  border: 1px solid rgb(var(--cyan-rgb) / 0.3);
  color: var(--on-cyan-dim);
  font-size: 13px;
  font-weight: 700;
}

.map-kind-tag.town-tag {
  background: rgb(var(--green-rgb) / 0.15);
  border-color: rgb(var(--green-rgb) / 0.3);
  color: var(--on-green-dim);
}

.map-entry-box {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgb(var(--gold-rgb) / 0.08);
  border: 1px solid rgb(var(--gold-rgb) / 0.25);
  color: var(--on-gold-dim);
  font-size: 13px;
}

.boss-note-tag {
  font-size: 13px;
  color: var(--on-gold-dim);
  background: rgb(var(--gold-rgb) / 0.12);
  padding: 2px 8px;
  border-radius: 4px;
}

.map-entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.map-entity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  background: var(--surface-0);
  border: 1px solid var(--surface-2);
}

.map-entity-item.is-monster {
  border-left: 3px solid var(--cyan);
}

.map-entity-item.is-npc {
  border-left: 3px solid var(--green);
}

.map-entity-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 4px;
  background: rgb(var(--line-rgb) / 0.18);
  flex-shrink: 0;
}

.map-entity-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.map-entity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.map-entity-title strong {
  font-size: 13px;
  color: var(--text-strong);
}

.kind-tag {
  font-size: 13px;
  color: var(--on-gold-dim);
  background: rgb(var(--gold-rgb) / 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

.map-entity-sub {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mini-drops {
  margin-top: 4px;
}

.mini-drops .tag-row span {
  font-size: 13px;
  padding: 1px 6px;
}

.sub-pill:hover,
.sub-pill.active {
  border-color: var(--cyan);
  background: rgb(var(--cyan-rgb) / 0.2);
  color: var(--text-strong);
  box-shadow: 0 4px 12px rgb(var(--cyan-rgb) / 0.15);
}

.sub-pill.active {
  border-bottom: 2px solid var(--cyan);
}

.target-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.target-village {
  background: rgb(var(--gold-rgb) / 0.15);
  color: var(--on-gold-dim);
  border: 1px solid rgb(var(--gold-rgb) / 0.3);
}

.target-solo {
  background: rgb(var(--green-rgb) / 0.15);
  color: var(--on-green-dim);
  border: 1px solid rgb(var(--green-rgb) / 0.3);
}

.duration-badge {
  font-size: 13px;
  color: var(--muted);
  background: rgb(var(--line-rgb) / 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgb(var(--line-rgb) / 0.7);
}

.recipe-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-cyan);
}

.ing-count {
  color: var(--ink-gold);
  font-weight: 700;
}

/* Item Detail Modal Enhancements */
.item-modal-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.item-icon-modal {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--surface-3);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--line-bright);
}

.badge-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.highlight-section {
  background: rgb(var(--green-rgb) / 0.05);
  border-color: rgb(var(--green-rgb) / 0.25);
}

.effect-banner {
  font-size: 15px;
  color: var(--ink-green);
  padding: 8px 12px;
  background: var(--surface-3);
  border-radius: 6px;
  border-left: 3px solid var(--green);
  margin-bottom: 8px;
}

.item-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stat-pill {
  font-size: 13px;
  background: rgb(var(--cyan-rgb) / 0.1);
  color: var(--on-cyan-dim);
  border: 1px solid rgb(var(--cyan-rgb) / 0.25);
}

.modal-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.gift-material-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gift-material-group {
  border-left: 2px solid rgb(var(--cyan-rgb) / 0.5);
  padding-left: 12px;
}

.gift-material-group-title {
  margin-bottom: 8px;
  color: var(--ink-cyan);
  font-size: 13px;
  font-weight: 700;
}

.gift-choice-rule {
  color: var(--ink-gold);
}

.modal-recipe-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgb(var(--surface-2-rgb) / 0.85);
  border: 1px solid var(--cyan);
  border-radius: 6px;
}

.modal-recipe-card img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.count-tag {
  font-size: 13px;
  color: var(--ink-gold);
  font-weight: 700;
  margin-left: 4px;
}

.drop-location-tag {
  font-size: 13px;
  color: var(--ink-cyan);
  margin-left: auto;
}

.drop-mapping-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drop-map-list,
.drop-monster-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drop-map-list > strong,
.drop-monster-list > strong {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.full-col {
  grid-column: 1 / -1;
}


/* 도메인 이전 안내 띠(core/storage-carry.js) — 옛 주소에서 쓰던 저장값 가져오기. */
.carry-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: rgb(var(--cyan-rgb) / 0.12); border-bottom: 1px solid rgb(var(--cyan-rgb) / 0.35); color: var(--text); font-size: 14px; line-height: 1.5; }
.carry-banner > span { flex: 1 1 260px; min-width: 0; }
.carry-banner-go { padding: 6px 14px; border-radius: 6px; background: var(--cyan); color: var(--on-cyan); font-weight: 700; text-decoration: none; white-space: nowrap; }
.carry-banner-close { border: 0; background: transparent; color: var(--muted-2); font-size: 16px; cursor: pointer; padding: 4px 8px; }
