/*
 * ============================================================================
 * 사냥터 카드와 드랍 · 맵 조감도 · 이미지 라이트박스 · 태그 칩
 * ============================================================================
 *
 * styles.css 한 파일이 15,400줄이라 어디를 고쳐야 하는지 찾기 어려웠다. 구역별로
 * 나눴다. **순서가 곧 규칙이다.** index.html 의 <link> 차례가 원래 파일의 차례와
 * 같아야 하고, 새 파일을 끼울 때도 그 자리를 지켜야 한다.
 *
 * 색은 :root 와 themes.css 에서만 나온다. 여기에 색을 직접 적지 않는다.
 * 배포 전 npm run check 가 테마별 대비와 정의 없는 토큰을 본다.
 */

/* ====================================================
   SIMPLIFIED HUNTING CARDS & CATEGORIZED DROPS
==================================================== */

/* 1. Hunting Card Grid & Compact Cards */
.hunting-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.hunting-summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: rgb(var(--panel-rgb) / 0.95);
  border: 1px solid rgb(var(--cyan-rgb) / 0.85);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: all 180ms ease;
  user-select: none;
}

.hunting-summary-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  background: rgb(var(--surface-1-rgb) / 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 0 16px rgb(var(--cyan-rgb) / 0.15);
}

.hunting-summary-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.hunting-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(var(--line-rgb) / 0.7);
}

.hunting-header-title-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hunting-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0;
}

.card-detail-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.35);
  background: rgb(var(--cyan-rgb) / 0.1);
  color: var(--on-cyan-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 140ms ease;
}

.hunting-summary-card:hover .card-detail-btn {
  background: var(--cyan);
  color: var(--on-cyan);
}

.hunting-boss-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  background: rgb(var(--gold-rgb) / 0.1);
  border: 1px solid rgb(var(--gold-rgb) / 0.3);
  border-radius: 6px;
  color: var(--on-gold-dim);
  font-size: 13px;
}

.boss-icon {
  font-size: 14px;
}

.hunting-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  flex: 1;
}

.hunting-preview-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.preview-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.monster-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgb(var(--surface-1-rgb) / 0.85);
  border: 1px solid rgb(var(--cyan-rgb) / 0.7);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-strong);
}

.chip-avatar {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.chip-title {
  font-weight: 700;
}

.chip-sub-level {
  font-size: 13px;
  color: var(--ink-cyan);
}

.drop-mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgb(var(--green-dim-rgb) / 0.75);
  border: 1px solid rgb(var(--green-rgb) / 0.25);
  border-radius: 6px;
  font-size: 13px;
  color: var(--on-green-dim);
}

.more-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgb(var(--cyan-rgb) / 0.12);
  border: 1px dashed rgb(var(--cyan-rgb) / 0.4);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-cyan-dim);
}

.drop-more-badge {
  background: rgb(var(--green-rgb) / 0.12);
  border-color: rgb(var(--green-rgb) / 0.4);
  color: var(--on-green-dim);
}

.hunting-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgb(var(--line-rgb) / 0.7);
  font-size: 13px;
  color: var(--muted-2);
}

.entry-summary-text {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.npc-count-text {
  color: var(--ink-green);
  font-weight: 700;
  white-space: nowrap;
}

.card-click-hint {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgb(var(--line-rgb) / 0.7);
  text-align: center;
  font-size: 13px;
  color: var(--ink-cyan);
  transition: color 140ms ease;
}

.hunting-summary-card:hover .card-click-hint {
  color: var(--ink-cyan);
}

/* 2. Categorized Drop Items (팝업 및 상세 화면) */
.highlight-drops-section {
  background: rgb(var(--surface-1-rgb) / 0.85);
  border: 1px solid rgb(var(--cyan-rgb) / 0.25);
  border-radius: 8px;
  padding: 16px;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head-row h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0;
}

.categorized-drops-container {
  display: flex;
  flex-direction: column;
}

.drop-category-row {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid var(--surface-3);
}

.drop-category-row.cat-specialty {
  background: rgb(var(--green-dim-rgb) / 0.45);
  border-color: rgb(var(--green-rgb) / 0.3);
}

.drop-category-row.cat-equip {
  background: rgb(var(--surface-2-rgb) / 0.45);
  border-color: rgb(var(--cyan-rgb) / 0.3);
}

.drop-category-row.cat-book {
  background: rgb(var(--gold-dim-rgb) / 0.45);
  border-color: rgb(var(--gold-rgb) / 0.3);
}

.drop-category-row.cat-etc {
  background: rgb(var(--surface-1-rgb) / 0.45);
  border-color: rgb(var(--muted-2-rgb) / 0.25);
}

.drop-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.cat-specialty .drop-category-header {
  color: var(--ink-green);
}

.cat-equip .drop-category-header {
  color: var(--ink-cyan);
}

.cat-book .drop-category-header {
  color: var(--ink-gold);
}

.cat-etc .drop-category-header {
  color: var(--soft);
}

.cat-count {
  font-size: 13px;
  opacity: 0.8;
}

.drop-category-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drop-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.drop-chip.cat-specialty {
  background: rgb(var(--green-dim-rgb) / 0.85);
  border: 1px solid var(--green-dim);
  color: var(--on-green-dim);
}

.drop-chip.cat-equip {
  background: rgb(var(--surface-2-rgb) / 0.85);
  border: 1px solid rgb(var(--cyan-rgb) / 0.4);
  color: var(--ink-cyan);
}

.drop-chip.cat-book {
  background: rgb(var(--gold-dim-rgb) / 0.85);
  border: 1px solid rgb(var(--gold-rgb) / 0.4);
  color: var(--on-gold-dim);
}

.drop-chip.cat-etc {
  background: rgb(var(--panel-strong-rgb) / 0.85);
  border: 1px solid var(--surface-3);
  color: var(--text);
}

.detail-modal-section {
  padding: 14px;
  border-radius: 8px;
  background: rgb(var(--surface-1-rgb) / 0.65);
  border: 1px solid rgb(var(--cyan-rgb) / 0.7);
  margin-bottom: 14px;
}

/* 3. Monster Text-Only Chips & Cards (사냥터 몬스터 텍스트 전용) */
.monster-text-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.monster-text-card {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgb(var(--panel-strong-rgb) / 0.9);
  border: 1px solid rgb(var(--cyan-rgb) / 0.25);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 120ms ease;
}

.monster-text-card:hover {
  border-color: var(--cyan);
  background: rgb(var(--surface-2-rgb) / 0.95);
  transform: translateY(-1px);
}

.monster-text-card .mini-entity-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.monster-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
}

.monster-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgb(var(--cyan-rgb) / 0.12);
  border: 1px solid rgb(var(--cyan-rgb) / 0.3);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-cyan-dim);
}

.monster-linked-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.monster-linked-card {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgb(var(--surface-1-rgb) / 0.9);
  border: 1px solid rgb(var(--cyan-rgb) / 0.8);
  border-radius: 6px;
}

.monster-linked-card .mini-entity-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ====================================================
   HUNTING MAP VIEW & BOSS DETAILS MODAL STYLING
==================================================== */
.map-view-image-container,
.drop-table-image-container {
  margin-bottom: 16px;
  background: rgb(var(--surface-1-rgb) / 0.9);
  border: 1px solid rgb(var(--cyan-rgb) / 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.map-view-image-header,
.drop-table-image-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}

.image-expand-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgb(var(--cyan-rgb) / 0.15);
  border: 1px solid rgb(var(--cyan-rgb) / 0.35);
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.image-expand-link:hover {
  background: rgb(var(--cyan-rgb) / 0.3);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.clickable-zoom-box {
  position: relative;
  cursor: zoom-in;
}

.clickable-zoom-box:hover .image-zoom-overlay-hint {
  opacity: 1;
}

.image-zoom-overlay-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 12px;
  background: rgb(var(--surface-1-rgb) / 0.85);
  border: 1px solid rgb(var(--cyan-rgb) / 0.5);
  border-radius: 20px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0.8;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: opacity 140ms ease;
}

.map-view-image-box,
.drop-table-image-box {
  width: 100%;
  max-height: 420px;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface-0);
  border-radius: 0 0 8px 8px;
}

.map-view-image-box img,
.drop-table-image-box img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 140ms ease;
}

.clickable-zoom-box:hover img {
  filter: brightness(1.04);
}

/* ====================================================
   IMAGE LIGHTBOX MODAL (화면 Y축 가득 채움 & 원본 비율 유지)
==================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: none;
  background: rgb(var(--surface-0-rgb) / 0.6);
  backdrop-filter: blur(5px);
  padding: 8px;
  animation: fadeInLightbox 120ms ease;
}

@keyframes fadeInLightbox {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-panel {
  width: 99vw;
  max-width: 99vw;
  height: 98vh;
  max-height: 98vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-0);
  border: 1px solid rgb(var(--cyan-rgb) / 0.4);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: scaleUpLightbox 140ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUpLightbox {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgb(var(--surface-1-rgb) / 0.98);
  border-bottom: 1px solid rgb(var(--cyan-rgb) / 0.25);
  flex-shrink: 0;
  height: 44px;
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-icon {
  font-size: 18px;
}

.lightbox-title-wrap h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-strong);
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-newtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgb(var(--cyan-rgb) / 0.15);
  border: 1px solid rgb(var(--cyan-rgb) / 0.35);
  border-radius: 6px;
  color: var(--on-cyan-dim);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 120ms ease;
}

.lightbox-newtab-btn:hover {
  background: rgb(var(--cyan-rgb) / 0.3);
  color: var(--text-strong);
}

.lightbox-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgb(var(--red-rgb) / 0.2);
  border: 1px solid rgb(var(--red-rgb) / 0.5);
  border-radius: 6px;
  color: var(--on-red-dim);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 120ms ease;
}

.lightbox-close-btn:hover {
  background: rgb(var(--red-rgb) / 0.4);
  color: var(--text-strong);
  border-color: var(--red);
}

.lightbox-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-0);
  padding: 4px;
  position: relative;
  overscroll-behavior: contain;
  height: calc(98vh - 72px);
}

.lightbox-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-img {
  height: calc(98vh - 84px);
  width: auto;
  max-width: 98vw;
  max-height: calc(98vh - 84px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.85);
  display: block;
}

.lightbox-footer {
  padding: 4px 16px;
  background: rgb(var(--surface-1-rgb) / 0.95);
  border-top: 1px solid rgb(var(--line-rgb) / 0.7);
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  flex-shrink: 0;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hunting-bonus-banner {
  display: flex;
  align-items: center;
  background: rgb(var(--gold-rgb) / 0.12);
  border-radius: 8px;
  color: var(--on-gold-dim);
  font-size: 13px;
}

.bonus-badge-tag {
  display: inline-block;
  padding: 3px 8px;
  /* 이 배지는 gold 0.12 로 칠한 배너 안에 놓인다. 칠이 겹쳐 깔리므로 0.25 를
     그대로 쓰면 짝 토큰의 기준(0.25)을 넘어선다. 합쳐서 0.25 쯤 되게 낮춘다. */
  background: rgb(var(--gold-rgb) / 0.15);
  border: 1px solid rgb(var(--gold-rgb) / 0.5);
  border-radius: 4px;
  color: var(--on-gold-dim);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.boss-detail-section {
  background: rgb(var(--red-dim-rgb) / 0.85);
  border: 1px solid rgb(var(--red-rgb) / 0.4);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.boss-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(var(--red-rgb) / 0.25);
  margin-bottom: 14px;
}

.boss-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.boss-header-icon {
  font-size: 24px;
}

.boss-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgb(var(--red-rgb) / 0.2);
  border: 1px solid rgb(var(--red-rgb) / 0.4);
  border-radius: 4px;
  color: var(--on-red-dim);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.boss-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0;
}

.boss-cycle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgb(var(--gold-rgb) / 0.15);
  border: 1px solid rgb(var(--gold-rgb) / 0.4);
  border-radius: 6px;
  font-size: 13px;
  color: var(--on-gold-dim);
}

.boss-schedule-wrap {
  margin-bottom: 14px;
}

.boss-schedule-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-gold);
  margin-bottom: 8px;
}

.boss-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.boss-schedule-item {
  padding: 10px 12px;
  background: rgb(var(--surface-1-rgb) / 0.85);
  border: 1px solid rgb(var(--line-rgb) / 0.7);
  border-radius: 6px;
}

.boss-schedule-item.current-map-schedule {
  background: rgb(var(--red-dim-rgb) / 0.75);
  border-color: rgb(var(--red-rgb) / 0.6);
  box-shadow: 0 0 10px rgb(var(--red-rgb) / 0.15);
}

.schedule-map-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 4px;
}

.current-indicator {
  color: var(--ink-red);
  font-weight: 800;
}

.schedule-times {
  font-size: 13px;
  color: var(--ink-gold);
  font-weight: 600;
}

.boss-drops-wrap {
  margin-bottom: 14px;
}

.boss-drops-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-green);
  margin-bottom: 8px;
}

.boss-drops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.boss-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgb(var(--panel-strong-rgb) / 0.85);
  border: 1px solid rgb(var(--cyan-rgb) / 0.2);
  border-radius: 6px;
}

.boss-drop-item.guaranteed-drop {
  background: rgb(var(--gold-dim-rgb) / 0.85);
  border-color: rgb(var(--gold-rgb) / 0.5);
}

.boss-drop-icon-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  border-radius: 4px;
  flex-shrink: 0;
}

.boss-drop-img {
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
}

.boss-drop-emoji {
  font-size: 18px;
}

.boss-drop-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.boss-drop-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.boss-drop-name {
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 700;
}

.guaranteed-badge {
  display: inline-block;
  padding: 1px 5px;
  background: rgb(var(--red-rgb) / 0.25);
  border: 1px solid var(--red);
  border-radius: 4px;
  color: var(--on-red-dim);
  font-size: 13px;
  font-weight: 800;
}

.boss-drop-note {
  font-size: 13px;
  color: var(--muted-2);
}

.boss-notes-wrap {
  padding-top: 10px;
  border-top: 1px dashed rgb(var(--line-rgb) / 0.7);
}

.boss-notes-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-cyan);
  margin-bottom: 6px;
}

.boss-notes-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--soft);
  line-height: 1.6;
}

.official-exchange-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: rgb(var(--green-rgb) / 0.2);
  border: 1px solid rgb(var(--green-rgb) / 0.4);
  border-radius: 8px;
  color: var(--on-green-dim);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 140ms ease;
}

.official-exchange-btn:hover {
  background: var(--green);
  color: var(--on-green);
  transform: translateY(-1px);
}

.choice-group {
  background: rgb(var(--gold-dim-rgb) / 0.3);
}

.spec-usage-guide {
  font-size: 13px;
  color: var(--ink-cyan);
  margin-top: 6px;
  line-height: 1.4;
}

.spec-npc-guide {
  font-size: 13px;
  color: var(--ink-green);
  margin-top: 4px;
  line-height: 1.4;
}

.official-guide-link {
  color: var(--ink-cyan);
  text-decoration: underline;
  font-size: 13px;
  font-weight: 700;
}

.powder-recipe-box {
  margin: 10px 0;
  padding: 10px 14px;
  background: rgb(var(--gold-rgb) / 0.15);
  border: 1px solid rgb(var(--gold-rgb) / 0.4);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.recipe-title-text {
  font-size: 14px;
  color: var(--text-strong);
  font-weight: 800;
}

.recipe-mats-wrap {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mats-head {
  font-size: 13px;
  color: var(--muted);
}

/* ====================================================
   DROP DATABASE REFINED STYLING (드랍DB 전용 레이아웃)
==================================================== */
.drop-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.drop-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: rgb(var(--panel-rgb) / 0.95);
  border: 1px solid rgb(var(--cyan-rgb) / 0.85);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 140ms ease;
}

.drop-card:hover {
  border-color: var(--cyan);
  background: rgb(var(--surface-1-rgb) / 0.98);
}

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

.drop-card-title-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.drop-card-title-box h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0;
}

.drop-card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drop-peb-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: rgb(var(--gold-rgb) / 0.08);
  border: 1px solid rgb(var(--gold-rgb) / 0.25);
  border-radius: 8px;
}

.peb-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-gold);
}

.patch-note-row {
  color: var(--ink-green);
  border-top: 1px dashed rgb(var(--gold-rgb) / 0.2);
  padding-top: 4px;
  margin-top: 2px;
}

.peb-icon {
  font-size: 14px;
}

.drop-card-items-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.drop-section-label {
  font-size: 13px;
  color: var(--ink-cyan);
  font-weight: 700;
}

/* ====================================================
   MODERN UI POLISH & INTERACTION REFINEMENTS
==================================================== */

/* 스크롤바.
   6px 에 손잡이가 --surface-3 이었다. 그 색은 어두운 테마에서 배경과 거의 같아서
   스크롤바가 어디 있는지, 지금 어디쯤인지 보이지 않았다. 폭을 키우고 손잡이를
   강조색으로 칠한다. 색은 테마 변수라 7개 테마와 밝은 테마 모두 따라온다.

   손잡이에 투명 테두리를 두르고 background-clip 을 padding-box 로 두면 테두리
   자리로 트랙이 비쳐, 여백을 낀 알약 모양이 된다. 실제로 보이는 두께는 14 - 6 = 8px 다. */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: rgb(var(--surface-1-rgb) / 0.9);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: rgb(var(--cyan-rgb) / 0.55);
  background-clip: padding-box;
  border: 3px solid transparent;
  border-radius: 999px;
  /* 목록이 길면 손잡이가 몇 px 로 쪼그라들어 잡을 수 없다. */
  min-height: 44px;
  min-width: 44px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--cyan-rgb) / 0.8);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
  background: var(--cyan);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* 파이어폭스. 폭은 auto(기본)와 thin 둘뿐이라 색으로만 또렷하게 만든다.
   @supports 로 감싸는 게 중요하다. scrollbar-color 는 상속되는 속성인데, 크롬은
   그 값이 걸린 요소에서 ::-webkit-scrollbar 를 통째로 무시한다. html 에 그냥
   적었더니 위의 14px 규칙이 페이지 전체에서 죽고 기본 15px 막대가 나왔다.
   selector(::-webkit-scrollbar) 는 크롬에서 참이라 이 블록을 건너뛴다. */
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: auto;
    scrollbar-color: rgb(var(--cyan-rgb) / 0.55) rgb(var(--surface-1-rgb) / 0.9);
  }
}

/* 좁은 화면에서는 14px 이 본문을 많이 먹는다. */
@media (max-width: 640px) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-thumb {
    border-width: 2px;
  }
}

/* 팝업이 이미 열려 있는데 화면을 다시 그린 경우다. render() 는 app 안을 통째로
   새로 만들기 때문에 열림 애니메이션이 처음부터 다시 돈다. 패널이 거듭 미끄러져
   들어와 "두세 번 열리는" 것처럼 보였다(2026-09-19 전수 측정). 새로 열 때만 돌린다. */
.modal-anim-off .detail-overlay,
.modal-anim-off .detail-panel,
.modal-anim-off .detail-modal,
.modal-anim-off .lightbox-overlay,
.modal-anim-off .lightbox-panel {
  animation: none !important;
}

/* Modal Open & Backdrop Smooth Animations */
.detail-overlay {
  animation: fadeInOverlay 180ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.detail-panel {
  animation: slideInModal 220ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInModal {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Close Button Enhancement */
.close-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgb(var(--red-rgb) / 0.4);
  border-radius: 6px;
  background: rgb(var(--red-rgb) / 0.12);
  color: var(--on-red-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
}

.close-button:hover {
  border-color: var(--red);
  background: rgb(var(--red-rgb) / 0.25);
  transform: translateY(-1px);
}

/* ====================================================
   TAG & BADGE CHIPS STYLING (개별 분리 및 띄어쓰기 가독성)
==================================================== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.village-description {
  margin: 0 0 10px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.village-route {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--ink-cyan);
  font-size: 13px;
  line-height: 1.55;
}

.village-route strong {
  flex: 0 0 auto;
  color: var(--ink-cyan);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  border: 1px solid rgb(var(--cyan-rgb) / 0.8);
  background: rgb(var(--panel-strong-rgb) / 0.85);
  color: var(--text);
}

.tag-gift {
  background: rgb(var(--gold-dim-rgb) / 0.6);
  border-color: rgb(var(--gold-rgb) / 0.35);
  color: var(--on-gold-dim);
}

.tag-hunting {
  background: rgb(var(--surface-2-rgb) / 0.6);
  border-color: rgb(var(--cyan-rgb) / 0.35);
  color: var(--ink-cyan);
}

.tag-monster {
  background: rgb(var(--red-dim-rgb) / 0.6);
  border-color: rgb(var(--red-rgb) / 0.35);
  color: var(--on-red-dim);
}

.tag-item {
  background: rgb(var(--green-dim-rgb) / 0.6);
  border-color: rgb(var(--green-rgb) / 0.35);
  color: var(--on-green-dim);
}

.empty-tag {
  color: var(--muted);
  font-size: 13px;
}

.unified-search-banner .search-icon {
  display: grid;
  place-items: center;
  color: var(--ink-cyan);
  font-size: 20px;
}

.integrated-section-header .header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

