/* ============================================
   리니지 클래식 — Global Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core palette */
  --bg:            #0b0b14;
  --bg-2:          #0f0f1e;
  --bg-3:          #141428;
  --bg-card:       #111120;
  --bg-card-hover: #161630;
  --bg-input:      #0d0d1c;
  --border:        #232342;
  --border-light:  #2d2d52;

  /* Accent — gold */
  --gold:          #c9a84c;
  --gold-light:    #e8c870;
  --gold-dim:      rgba(201,168,76,0.15);
  --gold-glow:     0 0 20px rgba(201,168,76,0.25);

  /* Text */
  --text:          #e6e8f4;
  --text-2:        #a2a5c5;
  --text-3:        #6b6b8e;
  --text-link:     #8ca2f0;

  /* Status colors */
  --green:         #4caf7a;
  --red:           #e05555;
  --blue:          #5588e0;
  --purple:        #9060d0;

  /* Grade colors */
  --grade-d:  #888aaa;
  --grade-c:  #4caf7a;
  --grade-b:  #5588e0;
  --grade-a:  #b060e0;
  --grade-s:  #c9a84c;

  /* Misc */
  --font: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-card: 0 4px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(201,168,76,0.12);
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
table { max-width: 100%; }
button { font-family: var(--font); }

img,
canvas,
.card-image,
.monster-icon,
.poly-rank-img,
.poly-img,
.recipe-icon,
.stage-img-wrap,
.preview-icon-wrap {
  -webkit-user-drag: none;
  user-select: none;
}

img[data-lazy-managed="true"] {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 2.5s infinite linear;
}
img[data-lazy-managed="true"].is-loaded {
  background: transparent;
  animation: none;
}

.card,
.monster-row,
.item-card,
.recipe-item,
.record-entry,
.official-update__item {
  content-visibility: auto;
  contain-intrinsic-size: 1px 120px;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton,
  img[data-lazy-managed="true"] {
    animation: none !important;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background: rgba(11,11,20,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.nav-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: var(--gold-dim);
}
.nav-links a.active {
  font-weight: 700;
}
/* WIP links — dimmed on live, normal locally */
body:not(.is-local) .nav-links a[data-wip] {
  opacity: 0.45;
  cursor: default;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

/* Visitor stats widget */
.nav-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-stat-live,
.nav-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}
.nav-stat-label {
  opacity: 0.55;
  font-size: 10.5px;
}
.nav-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf72;
  flex-shrink: 0;
  animation: statDotPulse 2.4s ease-in-out infinite;
}
@keyframes statDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76,175,114,0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(76,175,114,0); }
}
.nav-stat-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}
.nav-stat-skel {
  display: inline-block;
  width: 24px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.06) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes skelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (max-width: 1024px) {
  .nav-stats { display: none; }
}

/* Mobile bottom nav */
.mob-nav { display: none; }
@media (max-width: 1024px) {
  .mob-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 850;
    display: flex;
    height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #0d0d1a;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    padding: 6px 2px;
    min-width: 0;
    transition: color 0.2s;
  }
  .mob-nav-item.active { color: var(--gold); }
  .mob-nav-item:active { opacity: 0.7; }
  .mob-nav-icon { display: flex; line-height: 0; }
  .mob-nav-icon svg { width: 22px; height: 22px; }
  .mob-nav-label {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 56px;
    text-align: center;
  }
  .mob-nav-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    width: 30px;
    height: 30px;
    min-width: 30px;
    margin: auto 3px;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-nav-arrow:active {
    background: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.9);
  }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* ============================================
   HERO (index only)
   ============================================ */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 70%),
    linear-gradient(180deg, #0f0f20 0%, #0b0b14 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 64px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.012'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { max-width: 620px; margin: 0 auto; position: relative; z-index: 1; }
.hero-logo {
  height: 76px;
  width: auto;
  margin: 0 auto 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(201,168,76,0.4));
}
.hero-brand {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0;
  margin-bottom: 12px;
  text-shadow: 0 0 40px rgba(201,168,76,0.35);
  line-height: 1.3;
}
.hero-subtitle {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ============================================
   CARDS GRID (index)
   ============================================ */
.main-content {
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 48px 24px 72px;
}
.official-update {
  background: var(--bg-card);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 8px;
  padding: 18px 24px 12px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
}
.official-update__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.official-update__label {
  display: inline-flex;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0;
}
.official-update__more {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  transition: color var(--transition);
}
.official-update__more:hover { color: var(--gold); }
.official-notice-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.official-notice-tabs button {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.official-notice-tabs button:hover,
.official-notice-tabs button.active {
  background: rgba(201,168,76,0.14);
  border-color: rgba(201,168,76,0.45);
  color: var(--gold);
}
.official-update__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.official-update__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.official-update__item:last-child { border-bottom: none; }
.official-update__item-main { min-width: 0; flex: 1; }
.official-update__meta {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.official-update__category {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 800;
}
.official-update__item-date {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.official-update__item h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.official-update__item h3 a {
  color: inherit;
  transition: color var(--transition);
}
.official-update__item h3 a:hover { color: var(--gold); }
.official-update__item p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 4px;
}
.official-update__links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.official-update__links a {
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 4px;
  color: var(--gold);
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
  transition: all var(--transition);
}
.official-update__links a:hover {
  background: var(--gold);
  color: var(--bg);
}
.official-update__item--loading {
  align-items: center;
  min-height: 82px;
}
.notice-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font, inherit);
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: color 0.15s, background 0.15s;
}
.notice-toggle-btn:hover {
  color: var(--gold);
  background: rgba(201,168,76,0.04);
}
.section-kicker {
  display: inline-flex;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.discovery-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.25fr);
  gap: 20px;
  background: linear-gradient(180deg, rgba(20,20,40,0.88), rgba(17,17,32,0.98));
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 22px;
}
.discovery-copy h2,
.section-heading-row h2 {
  font-size: 22px;
  line-height: 1.35;
  color: var(--text);
}
.discovery-copy p {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 8px;
}
.discovery-search label {
  display: block;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.global-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.global-search-row input {
  width: 100%;
  min-height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0 14px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}
.global-search-row input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.global-search-row button,
.search-chips button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-2);
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.global-search-row button {
  padding: 0 14px;
}
.global-search-row button:hover,
.search-chips button:hover,
.search-chips button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.search-chips button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}
.data-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.data-stats div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.data-stats strong {
  display: block;
  color: var(--gold-light);
  font-size: 20px;
  line-height: 1.1;
}
.data-stats span {
  color: var(--text-3);
  font-size: 12px;
}
.global-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}
.home-live-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.25fr);
  gap: 20px;
  background: linear-gradient(180deg, rgba(20,20,40,0.88), rgba(17,17,32,0.98));
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 22px;
}
.home-live-panel .section-heading-row,
.home-live-note,
.home-live-player-wrap,
.home-live-carousel,
.home-live-list {
  grid-column: 1 / -1;
}
.home-live-player-wrap {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.home-live-player-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}
.home-live-note {
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 12px;
}
.home-live-list {
  display: none;
}
.home-live-carousel {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: stretch;
  gap: 8px;
}
.home-live-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  padding-right: 2px;
  cursor: grab;
}
.home-live-track.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.home-live-track .home-live-item {
  flex: 0 0 clamp(220px, 24%, 280px);
  grid-template-columns: 1fr;
  align-content: start;
  scroll-snap-align: start;
  min-height: 100%;
  padding: 8px;
}
.home-live-track .home-live-item .home-live-thumb img {
  aspect-ratio: 16 / 9;
}
.home-live-track .home-live-item .home-live-meta strong {
  font-size: 12.5px;
  line-height: 1.4;
}
.home-live-track .home-live-item .home-live-meta p {
  font-size: 11px;
  margin-top: 3px;
}
.home-live-skeleton {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 8px;
}
.home-live-skeleton--compact {
  flex: 0 0 clamp(220px, 24%, 280px);
}
.home-live-skeleton-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
}
.home-live-skeleton-meta {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 2px 0;
}
.home-live-skeleton-line-lg {
  width: 92%;
  height: 14px;
}
.home-live-skeleton-line-sm {
  width: 56%;
  height: 12px;
}
.home-live-nav {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--gold);
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  font-weight: 700;
  transition: all var(--transition);
}
.home-live-nav:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.home-live-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  padding: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), background var(--transition);
}
.home-live-item:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
}
.home-live-thumb {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.home-live-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.home-live-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(212, 37, 37, 0.95);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}
.home-live-viewer {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
}
.home-live-meta strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.home-live-meta p {
  color: var(--text-2);
  font-size: 12px;
  margin-top: 4px;
}
.global-results-empty {
  color: var(--text-3);
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.result-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color var(--transition), background var(--transition);
}
.result-card:hover {
  border-color: rgba(201,168,76,0.55);
  background: var(--bg-card-hover);
}
.result-card img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}
.result-card strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}
.result-card p {
  color: var(--text-2);
  font-size: 12px;
  margin-top: 2px;
}
.result-type {
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}
.path-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 34px;
}
.path-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.path-card:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.path-card span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}
.path-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.cards-section {
  background: linear-gradient(180deg, rgba(20,20,40,0.88), rgba(17,17,32,0.98));
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 22px;
}
.section-heading-row {
  margin-bottom: 16px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  border-color: var(--gold);
}
.card-image {
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  height: 140px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover .card-image::before { opacity: 1; }
.card-image img {
  width: 88px;
  height: 88px;
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
  transition: transform var(--transition);
}
.card:hover .card-image img { filter: brightness(1.08); }
.card-visual {
  --card-img-scale: 1;
  --card-img-x: 0px;
  --card-img-y: 0px;
  transform: translate(var(--card-img-x), var(--card-img-y)) scale(var(--card-img-scale));
  transform-origin: center center;
}
.card-visual--bugbear { --card-img-scale: 1.28; --card-img-y: 4px; }
.card-visual--succubus { --card-img-scale: 1.26; --card-img-y: 5px; }
.card-visual--dwarf { --card-img-scale: 1.26; --card-img-y: 4px; }
.card-visual--dark-elf { --card-img-scale: 1.24; --card-img-y: 4px; }
.card-visual--demon { --card-img-scale: 0.92; --card-img-y: 2px; }
.card--highlight { border-color: rgba(201,168,76,0.25); }
.card--highlight .card-title { color: var(--gold-light); }
.card-body { padding: 18px 20px 22px; flex: 1; }
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}
.card-links { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.card-links li {
  font-size: 12.5px;
  color: var(--text-2);
  padding-left: 14px;
  position: relative;
}
.card-links li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 10px;
}
.card:hover .card-links li { color: var(--text-link); }

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  background:
    radial-gradient(ellipse 70% 100% at 50% -20%, rgba(201,168,76,0.07) 0%, transparent 60%),
    linear-gradient(180deg, #0f0f20 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 36px 0 28px;
}
.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 0 36px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0;
  margin-bottom: 6px;
}
.disclaimer {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.disclaimer::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--gold);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpath d='M12 16v-4'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpath d='M12 16v-4'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask-size: contain;
  opacity: 0.7;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-2)    50%,
    var(--bg-card) 75%
  );
  background-size: 1200px 100%;
  animation: skeleton-shimmer 2.5s infinite linear;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.skeleton-block { display: block; }
/* Skeleton monster card */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-card-header { display: flex; align-items: center; gap: 12px; }
.skeleton-img  { width: 56px; height: 56px; border-radius: var(--radius-sm); flex-shrink: 0; }
.skeleton-title { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.skeleton-line { height: 12px; border-radius: 4px; }
.skeleton-chips { display: flex; gap: 6px; }
.skeleton-chip { height: 22px; width: 64px; border-radius: 20px; }
/* Skeleton table rows */
.skeleton-row td { padding: 12px 10px !important; }
/* Skeleton stat boxes (homepage) */
.skeleton-stat { height: 20px; width: 60px; border-radius: 4px; margin: 0 auto; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background:
    linear-gradient(180deg, rgba(201,168,76,0.035), transparent 42%),
    var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 34px 24px 36px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
}
.footer-logo img { height: 24px; width: auto; opacity: 0.72; }
.footer-disclaimer {
  max-width: 760px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.8;
  word-break: keep-all;
}
.footer-disclaimer a { color: var(--gold); transition: color var(--transition); }
.footer-disclaimer a:hover { color: var(--gold-light); }
.footer-copy { font-size: 11px; color: var(--text-3); opacity: 0.75; }

/* ============================================
   RESPONSIVE NAV
   ============================================ */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 62px; left: 0; right: 0;
    background: rgba(11,11,20,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 16px 18px;
    gap: 2px;
    backdrop-filter: blur(12px);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .navbar-inner { position: relative; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .discovery-panel { grid-template-columns: 1fr; }
  .home-live-panel { grid-template-columns: 1fr; }
  .home-live-carousel { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 6px; }
  .home-live-track .home-live-item { flex-basis: min(78vw, 320px); }
  .home-live-skeleton--compact { flex-basis: min(78vw, 320px); }
  .home-live-nav { font-size: 20px; border-radius: 6px; }
  .path-panel { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .official-update__item {
    flex-direction: column;
    gap: 4px;
  }
  .official-update__item-date { order: -1; }
  .official-update__links {
    justify-content: flex-start;
  }
  .navbar-inner { padding: 0 16px; }
  .page-header-inner { padding: 0 16px; text-align: center; }
  .disclaimer { align-items: flex-start; }
  .hero { padding: 48px 16px 40px; }
  .hero-title { font-size: 22px; }
  .discovery-panel { padding: 18px; }
  .global-search-row { grid-template-columns: 1fr; }
  .data-stats { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 36px 1fr; }
  .result-type { grid-column: 2; width: fit-content; }
  .home-live-item { grid-template-columns: 1fr; }
  .home-live-carousel { grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 5px; }
  .home-live-track { gap: 8px; padding-right: 8px; }
  .home-live-track .home-live-item { flex: 0 0 calc(100% - 12px); max-width: calc(100% - 12px); }
  .home-live-skeleton--compact { flex: 0 0 calc(100% - 12px); max-width: calc(100% - 12px); }
  .home-live-track .home-live-item:last-child,
  .home-live-track .home-live-skeleton--compact:last-child { margin-right: 2px; }
  .home-live-thumb img { object-fit: contain; }
  .home-live-nav { font-size: 18px; }
  .path-panel { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; gap: 14px; }
  .main-content { padding: 28px 16px 48px; }
}
