/* ============================================================
   LOE WIKI — Items module CSS
   Dark fantasy / blood-and-gold + cyan phoenix sub-brand
   Source: docs/BRAND.md + LOE Wiki design v2
   ============================================================ */

:root {
  /* Foundations — cool dark fantasy (reference palette) */
  --bg-base:        #05070b;
  --bg-surface-1:   #141822;
  --bg-surface-2:   #0b0e14;
  --bg-surface-3:   #07090d;
  --border-default: #262b36;
  --border-strong:  #39414f;

  /* Panels + gold borders (reference) */
  --panel:            rgba(12, 14, 19, 0.74);
  --border-gold:      rgba(196, 132, 45, 0.45);
  --border-gold-soft: rgba(196, 132, 45, 0.30);

  /* Brand — gold (reference) */
  --gold-primary:   #d89b36;
  --gold-bright:    #ffd76a;
  --gold-warm:      #b8792e;
  --gold-glow:      #f2ca7d;

  /* Phoenix cyan (wiki sub-brand) */
  --phoenix-cyan:        #4fc3f7;
  --phoenix-cyan-bright: #80deea;

  /* Fire */
  --red-cta:        #c90300;
  --red-deep:       #b30808;

  /* Avalon */
  --avalon-green:   #6e9a28;

  /* Text (reference) */
  --text-primary:   #f2eee7;
  --text-body:      #c9c3bd;
  --text-muted:     #aaa39d;
  --text-hint:      #7e8794;

  /* Display font: Cyrillic-supporting fantasy serif (Cinzel doesn't have Cyrillic) */
  --font-display:   "Marcellus", "Cormorant Garamond", "Cinzel", "Times New Roman", serif;
  --font-body:      "Manrope", system-ui, sans-serif;

  --fs-h1:          44px;
  --fs-h2:          28px;
  --fs-body:        16px;
  --fs-small:       13px;

  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --radius:         8px;
  --transition:     all 0.18s ease-in-out;
  --container:      1600px;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-base);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-primary); text-decoration: none; }
a:hover { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--gold-primary);
  letter-spacing: 0.03em;
  font-weight: 600;
  margin: 0 0 var(--space-4);
  line-height: 1.2;
}
h1 { font-size: var(--fs-h1); text-transform: uppercase; letter-spacing: 0.04em; }
h2 { font-size: var(--fs-h2); }
.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin: 0 0 var(--space-2);
}
.muted { color: var(--text-hint); }
img { max-width: 100%; display: block; }

/* ---- header ---- */
.wiki-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(7,9,13,0.96), rgba(5,7,11,0.94));
  border-bottom: 1px solid var(--border-gold);
  backdrop-filter: blur(8px);
}
.wiki-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--space-6);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-6);
  align-items: center;
}
.wiki-header__brand { display: flex; align-items: center; gap: 12px; }
.wiki-header__phoenix {
  width: 36px; height: 36px;
  background: url('/wiki/assets/phoenix.png') center/contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(79,195,247,0.5));
}
.wiki-header__lockup {
  display: flex; flex-direction: column; gap: 1px; line-height: 1;
}
.wiki-header__name {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 16px;
}
.wiki-header__sub {
  font-family: var(--font-display);
  color: var(--gold-primary);
  font-weight: 500;
  letter-spacing: 0.22em;
  font-size: 11px;
}

.wiki-header__search {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.wiki-header__search input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 18px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}
.wiki-header__search input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(255,178,50,0.16);
}
.wiki-header__search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: ui-monospace, monospace; font-size: 11px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--text-hint);
}

.wiki-header__nav { display: flex; gap: var(--space-4); }
.wiki-header__nav a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}
.wiki-header__nav a:hover { color: var(--gold-primary); text-decoration: none; }
.wiki-header__nav a.is-gold { color: var(--gold-primary); }
.wiki-header__nav a.is-gold:hover { color: var(--gold-bright); }
.wiki-header__search input { border-color: var(--border-gold-soft); }

/* ---- breadcrumbs ---- */
.breadcrumbs {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6) 0;
}
.breadcrumbs ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 13px;
  color: var(--text-hint);
}
.breadcrumbs .sep { color: var(--gold-primary); opacity: 0.6; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--gold-primary); text-decoration: none; }
.breadcrumbs [aria-current] { color: var(--text-primary); }

/* ---- main ---- */
.wiki-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-16);
}

/* ============================================================
   ITEM PAGE
   ============================================================ */
.item-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-8);
}
.item-page__head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-8);
  align-items: start;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-default);
}
.item-page__icon img,
.item-page__icon .icon-placeholder {
  width: 240px; height: 240px;
  display: block;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  filter: drop-shadow(0 0 14px rgba(242,202,125,0.18));
  image-rendering: pixelated;
}
.item-page__icon .icon-placeholder {
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 80px;
  color: var(--text-hint);
}
.item-page__alt {
  color: var(--text-muted);
  font-style: italic;
  margin: 6px 0 0;
}
.item-page__additional {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-warm);
  padding: 4px 10px;
  border: 1px solid var(--gold-warm);
  border-radius: 999px;
}
.item-page__desc { margin-top: var(--space-6); }
.item-page__desc h2 { font-size: 20px; }
.item-page__desc p { color: var(--text-body); }
.item-page__desc--en p { color: var(--text-muted); }

.item-page__infobox {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-6);
  position: sticky; top: 92px;
  height: fit-content;
}
.item-page__infobox h2 { font-size: 18px; margin-bottom: var(--space-4); }
.item-page__infobox dl {
  display: grid; grid-template-columns: max-content 1fr;
  column-gap: var(--space-4); row-gap: 10px;
  margin: 0;
}
.item-page__infobox dt { color: var(--text-hint); font-size: 13px; }
.item-page__infobox dd { color: var(--text-primary); margin: 0; font-size: 14px; font-weight: 500; }
.item-page__flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-4); }
.flag {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.flag--yes { background: rgba(110,154,40,0.12); color: var(--avalon-green); border: 1px solid rgba(110,154,40,0.4); }
.flag--no  { background: rgba(201,3,0,0.08); color: var(--red-cta); border: 1px solid rgba(201,3,0,0.4); }

/* ---- Related grid ---- */
.related { grid-column: 1 / -1; margin-top: var(--space-12); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}
.related-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  color: var(--text-primary);
  transition: var(--transition);
  text-decoration: none;
}
.related-card:hover {
  border-color: var(--gold-primary);
  background: var(--bg-surface-1);
  text-decoration: none;
}
.related-card img,
.related-card .ico-ph {
  width: 48px; height: 48px;
  background: var(--bg-surface-3);
  border-radius: 4px; flex-shrink: 0;
}
.related-card .ico-ph { display: grid; place-items: center; color: var(--text-hint); }
.related-card strong { display: block; font-weight: 600; }
.related-card small {
  display: block; color: var(--text-hint); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.category-page__header {
  text-align: center; margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-default);
}
.category-page__meta {
  color: var(--text-hint);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}
/* ============================================================
   CATEGORY GRID — cards with grade-coloured glow on hover
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 20px;
}
.category-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 18px 14px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-top-width: 3px;
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  min-height: 168px;
}
.category-card:hover {
  background: var(--bg-surface-1);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(0,0,0,0.6);
}

/* Grade-coloured top border so cards visually stratify */
.category-card.card-grade-d    { border-top-color: #6e9a28; }
.category-card.card-grade-c    { border-top-color: #29b6f6; }
.category-card.card-grade-b    { border-top-color: #c060ff; }
.category-card.card-grade-a    { border-top-color: #ffd700; }
.category-card.card-grade-s    { border-top-color: #ffb232; box-shadow: 0 0 14px rgba(255,178,50,0.18); }
.category-card.card-grade-s:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.6), 0 0 18px rgba(255,178,50,0.3); }
.category-card.card-grade-r    { border-top-color: #c90300; box-shadow: 0 0 14px rgba(201,3,0,0.2); }
.category-card.card-grade-r:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.6), 0 0 20px rgba(201,3,0,0.35); }
.category-card.card-grade-none { border-top-color: var(--border-strong); }

.category-card__icon { margin-bottom: 10px; }
.category-card__icon img,
.category-card__icon .ico-fallback {
  width: 64px; height: 64px;
  background: var(--bg-surface-3);
  border-radius: 6px;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
.category-card__title {
  font-size: 13px; line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-weight: 500;
}
.category-card__sub {
  font-size: 10px; color: var(--text-hint);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.category-card__meta {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-hint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Favorite button on card */
.card-fav {
  position: absolute; top: 6px; right: 6px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-hint);
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 50%;
  line-height: 1;
  transition: var(--transition);
  z-index: 2;
}
.card-fav:hover { color: var(--red-cta); transform: scale(1.2); }
.card-fav.is-fav { color: var(--red-cta); }
.card-fav.is-fav::before { content: '♥'; }
.card-fav.is-fav { font-size: 0; }
.card-fav.is-fav::before { font-size: 18px; }

/* Tooltip on hover */
.card-tooltip {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--bg-surface-3);
  border: 1px solid var(--gold-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity 0.15s ease-out;
  z-index: 10;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}
.category-card:hover .card-tooltip {
  opacity: 1; visibility: visible;
}

/* ============================================================
   LIST VIEW (alternate layout for items)
   ============================================================ */
.category-list { display: flex; flex-direction: column; gap: 6px; }
.list-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 140px 60px 80px 28px;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-left-width: 3px;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.list-card:hover {
  background: var(--bg-surface-1);
  border-color: var(--gold-primary);
  text-decoration: none;
}
.list-card.card-grade-d    { border-left-color: #6e9a28; }
.list-card.card-grade-c    { border-left-color: #29b6f6; }
.list-card.card-grade-b    { border-left-color: #c060ff; }
.list-card.card-grade-a    { border-left-color: #ffd700; }
.list-card.card-grade-s    { border-left-color: #ffb232; }
.list-card.card-grade-r    { border-left-color: #c90300; }
.list-card.card-grade-none { border-left-color: var(--border-strong); }
.list-card__icon img,
.list-card__icon .ico-fallback {
  width: 40px; height: 40px;
  background: var(--bg-surface-3);
  border-radius: 4px;
  image-rendering: pixelated;
}
.list-card__name { font-size: 14px; }
.list-card__alt { color: var(--text-hint); font-size: 11px; display: block; }
.list-card__sub { color: var(--text-muted); font-size: 12px; }
.list-card__weight { color: var(--text-hint); font-size: 12px; text-align: right; }
.list-card__compare {
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  cursor: pointer;
  background: var(--bg-surface-3);
  transition: var(--transition);
}
.list-card__compare:hover { border-color: var(--gold-primary); }
.list-card__compare:checked {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
}

@media (max-width: 700px) {
  .list-card {
    grid-template-columns: 40px 1fr 70px 24px;
  }
  .list-card__sub, .list-card__weight { display: none; }
}

/* ============================================================
   COMPARE BAR (floating)
   ============================================================ */
.compare-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-surface-1);
  border: 1px solid var(--gold-primary);
  border-radius: 999px;
  padding: 12px 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.65), 0 0 18px rgba(255,178,50,0.2);
  z-index: 100;
  max-width: 90vw;
}
.compare-bar[hidden] { display: none; }
.compare-bar__label {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-primary);
}
.compare-bar__items { display: flex; gap: 8px; flex-wrap: wrap; max-width: 50vw; overflow: hidden; }
.compare-bar__items .chip {
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  padding: 4px 12px 4px 8px;
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.compare-bar__items .chip button {
  background: none; border: none; color: var(--text-hint);
  font-size: 14px; cursor: pointer; padding: 0;
}
.compare-bar__items .chip button:hover { color: var(--red-cta); }
.compare-bar__clear {
  background: transparent; border: none;
  color: var(--text-hint); font-size: 18px; cursor: pointer;
}
.compare-bar__clear:hover { color: var(--red-cta); }

/* ============================================================
   CLASSES / SKILLS / NPCs
   ============================================================ */
.class-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.class-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--gold-primary);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.class-card:hover { background: var(--bg-surface-1); border-color: var(--gold-primary); text-decoration: none; }
.class-card strong { font-family: var(--font-display); font-size: 15px; display: block; margin-bottom: 6px; }
.class-card p { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.4; }

.skill-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}
.skill-card {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.skill-card:hover { background: var(--bg-surface-1); border-color: var(--gold-primary); text-decoration: none; }
.skill-card__icon { width: 32px; height: 32px; }
.skill-card__icon img { width: 32px; height: 32px; border-radius: 4px; image-rendering: pixelated; }
.skill-card__body strong { font-size: 13px; display: block; }
.skill-card__body small { display: block; color: var(--text-hint); font-size: 11px; line-height: 1.3; }
.skill-card__type {
  background: var(--phoenix-cyan); color: #0a1a2c;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
}

.skill-page__head { display: grid; grid-template-columns: 64px 1fr; gap: 24px; align-items: center; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border-default); }
.skill-page__icon img { width: 64px; height: 64px; border-radius: 6px; image-rendering: pixelated; }
.skill-page__info { background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 8px; padding: 18px; margin-top: 24px; max-width: 400px; }
.skill-page__info dl { display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; row-gap: 8px; margin: 0; }
.skill-page__info dt { color: var(--text-hint); font-size: 13px; }
.skill-page__info dd { color: var(--text-primary); margin: 0; font-size: 14px; font-weight: 500; }

.npc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.npc-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--avalon-green);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.npc-card:hover { background: var(--bg-surface-1); border-color: var(--gold-primary); text-decoration: none; }
.npc-card strong { font-size: 14px; display: block; }
.npc-card small { display: block; color: var(--text-muted); font-size: 12px; font-style: italic; }
.npc-card__meta { display: block; font-size: 11px; color: var(--text-hint); margin-top: 6px; letter-spacing: 0.04em; }

.npc-page__head, .class-page__head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border-default); }
.npc-page__info { background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 8px; padding: 18px; max-width: 400px; }
.npc-page__info dl { display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; row-gap: 8px; margin: 0; }
.npc-page__info dt { color: var(--text-hint); font-size: 13px; }
.npc-page__info dd { color: var(--text-primary); margin: 0; font-size: 14px; font-weight: 500; }

.chain-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.chain-item {
  flex: 1; min-width: 180px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 14px;
}
.chain-item--active { border-color: var(--gold-primary); background: var(--bg-surface-1); box-shadow: 0 0 14px rgba(255,178,50,0.2); }
.chain-tier { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-hint); display: block; margin-bottom: 6px; }
.chain-item a { color: var(--text-primary); }
.chain-item--active a { color: var(--gold-primary); }

/* ============================================================
   COMPARE PAGE
   ============================================================ */
.compare-page { padding: 32px 0; }
.compare-table-wrap { overflow-x: auto; margin-top: 32px; }
.compare-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
  vertical-align: top;
  text-align: left;
}
.compare-table thead th {
  background: var(--bg-surface-2);
  padding: 18px;
  width: 25%;
}
.compare-table .compare-spec {
  color: var(--gold-primary);
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--bg-surface-2);
  width: 180px;
}
.compare-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.compare-card:hover { text-decoration: none; color: var(--gold-primary); }
.compare-card img, .compare-card .ico-fallback {
  width: 80px; height: 80px;
  border-radius: 6px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-hint);
}
.empty-state p { margin-bottom: 24px; font-size: 16px; }

.pagination {
  margin-top: var(--space-8);
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.pagination a, .pagination .current {
  padding: 8px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}
.pagination .current { background: var(--gold-primary); color: var(--bg-base); border-color: var(--gold-primary); }
.pagination a:hover { border-color: var(--gold-primary); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-page__form {
  display: flex; gap: 12px;
  max-width: 600px; margin: var(--space-6) 0;
}
.search-page__form input {
  flex: 1;
  height: 52px;
  padding: 0 18px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-body);
}
.search-page__form input:focus { border-color: var(--gold-primary); outline: none; }
.search-page__form button {
  padding: 0 24px;
  background: var(--red-cta);
  color: var(--text-primary);
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
}
.search-page__form button:hover { background: var(--red-deep); filter: brightness(1.15); }
.search-page__meta { color: var(--text-hint); margin-bottom: var(--space-4); }
.search-page__empty { padding: var(--space-8); text-align: center; color: var(--text-hint); }

.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { margin-bottom: var(--space-2); }
.search-result {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.search-result:hover {
  border-color: var(--gold-primary);
  background: var(--bg-surface-1);
  text-decoration: none;
}
.search-result__icon img,
.search-result__icon .ico-ph {
  width: 40px; height: 40px;
  background: var(--bg-surface-3);
  border-radius: 4px;
}
.search-result__body strong { font-size: 15px; }
.search-result__body small { display: block; margin-top: 2px; color: var(--text-hint); font-size: 12px; }

/* ===== Faceted search (v2) ===== */
.search-page { max-width: 1080px; }
.search-hint { color: var(--text-hint); margin: 6px 0 10px; font-size: 14px; }
.search-suggest { display: flex; flex-wrap: wrap; gap: 10px; }
.search-suggest__chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border-default);
  background: var(--bg-surface-2); color: var(--text-body); text-decoration: none;
  font-family: var(--font-display); font-size: 14px; transition: var(--transition);
}
.search-suggest__chip:hover { border-color: var(--gold-primary); color: var(--gold-bright); background: var(--bg-surface-3); }

/* facet bar */
.search-facets {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 18px 0 30px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border-default);
}
.facet {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 17px; border-radius: 999px;
  border: 1px solid var(--border-default); background: var(--bg-surface-2);
  color: var(--text-body); font-family: var(--font-display); font-size: 14px;
  letter-spacing: 0.02em; cursor: pointer; transition: var(--transition); line-height: 1;
}
.facet:hover { border-color: var(--gold-primary); color: var(--text-primary); }
.facet.is-active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-primary));
  border-color: var(--gold-bright); color: #1c1305; font-weight: 600;
  box-shadow: 0 4px 16px rgba(216,155,54,0.32);
}
.facet em { font-style: normal; opacity: 0.62; font-size: 0.86em; }
.facet.is-active em { opacity: 0.8; }
.facet__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.facet.is-active .facet__dot { box-shadow: 0 0 0 2px rgba(28,19,5,0.25); }
.facet__dot--monster { background: #d2553f; }
.facet__dot--item     { background: var(--gold-bright); }
.facet__dot--location { background: #4f9e84; }
.facet__dot--quest    { background: #a487d0; }
.facet__dot--class    { background: #5b8fc9; }

/* result group */
.sr-group { margin-bottom: 34px; }
.sr-group.is-hidden { display: none; }
.sr-group__head {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  color: var(--gold-bright); letter-spacing: 0.04em; text-transform: uppercase;
}
.sr-group__count {
  font-size: 12px; color: var(--text-muted); font-family: var(--font-body);
  background: var(--bg-surface-2); border: 1px solid var(--border-default);
  border-radius: 999px; padding: 2px 11px; letter-spacing: 0;
}
.sr-list { display: flex; flex-direction: column; gap: 8px; }

/* result row */
.sr {
  display: flex; align-items: center; gap: 16px; padding: 11px 16px;
  border-radius: 12px; background: var(--bg-surface-1);
  border: 1px solid var(--border-default); text-decoration: none;
  transition: var(--transition); position: relative; overflow: hidden;
}
.sr::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: var(--transition); }
.sr:hover { border-color: var(--border-gold); background: var(--bg-surface-2); transform: translateX(3px); text-decoration: none; }
.sr:hover::before { background: var(--gold-primary); }
.sr--extra { display: none; }
.sr-group.is-expanded .sr--extra,
.sr-group.is-solo .sr--extra { display: flex; }
.sr-group.is-solo .sr-more { display: none; }

.sr__ico {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center; background: var(--bg-surface-3);
  border: 1px solid var(--border-default); overflow: hidden;
}
.sr__ico img { width: 42px; height: 42px; object-fit: contain; }
.sr__ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr__ico--monster  { color: #e8745c; }
.sr__ico--location { color: #5cb89a; }
.sr__ico--quest    { color: #b89ae0; }
.sr__ico--class    { color: #6ea0d8; }
.sr__ico--item     { color: var(--gold-bright); }

.sr-badge { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text-body); }
.sr-badge--boss { color: var(--gold-bright); text-shadow: 0 0 10px rgba(255,215,106,0.45); }

.sr__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sr__name { font-size: 16px; color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr__en { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr__meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-hint); white-space: nowrap; }
.sr__chev { flex: 0 0 auto; color: var(--text-muted); font-size: 22px; line-height: 1; opacity: 0; transform: translateX(-4px); transition: var(--transition); }
.sr:hover .sr__chev { opacity: 1; transform: translateX(0); color: var(--gold-primary); }

.sr-tag { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-default); background: var(--bg-surface-2); font-size: 12px; color: var(--text-body); }
.sr-tag--boss { border-color: var(--border-gold); color: var(--gold-bright); background: rgba(216,155,54,0.08); }

.sr mark, .search-page mark { background: rgba(255,215,106,0.2); color: var(--gold-bright); border-radius: 3px; padding: 0 2px; }

.sr-more {
  margin-top: 12px; background: none; border: 1px solid var(--border-default);
  color: var(--gold-primary); font-family: var(--font-display); font-size: 14px;
  padding: 9px 20px; border-radius: 999px; cursor: pointer; transition: var(--transition);
}
.sr-more:hover { border-color: var(--gold-primary); background: var(--bg-surface-2); }
.sr-more.is-hidden { display: none; }

.search-page__empty { padding: 56px 24px; text-align: center; color: var(--text-body); }
.search-page__empty-ico { font-size: 40px; color: var(--gold-primary); opacity: 0.5; margin-bottom: 12px; }
.search-page__empty .muted { color: var(--text-hint); font-size: 14px; margin-top: 4px; }

@media (max-width: 640px) {
  .sr__en { display: none; }
  .sr__meta { font-size: 12px; }
  .sr__ico { width: 40px; height: 40px; }
  .sr__ico img { width: 36px; height: 36px; }
}

/* ===== Collections ===== */
.coll-index__head { margin-bottom: 22px; }
.coll-index__lead { color: var(--text-hint); max-width: 620px; margin-top: 6px; }
.coll-index__count { color: var(--text-muted); font-size: 13px; margin-top: 22px; text-align: center; }

.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.coll-card {
  display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 14px;
  background: var(--bg-surface-1); border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent, var(--gold-primary)); border-radius: 12px;
  text-decoration: none; transition: var(--transition); position: relative;
}
.coll-card:hover { border-color: var(--border-gold); background: var(--bg-surface-2); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.35); text-decoration: none; }
.coll-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coll-card__cat { font-family: var(--font-display); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.coll-card__tier { font-size: 11px; color: var(--text-muted); border: 1px solid var(--border-default); border-radius: 999px; padding: 1px 9px; }
.coll-card__name { font-family: var(--font-display); font-size: 17px; color: var(--text-primary); margin: 0; line-height: 1.25; }
.coll-card__bonus { font-size: 13px; color: var(--gold-bright); margin: 0; line-height: 1.4; }
.coll-card__meta { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }

/* single collection page */
.coll-page { max-width: 920px; }
.coll-hero { padding: 22px 24px; border: 1px solid var(--border-default); border-left: 4px solid var(--accent); border-radius: 14px; background: var(--bg-surface-1); margin-bottom: 26px; }
.coll-hero h1 { margin: 6px 0 0; font-size: 30px; }
.coll-hero .eyebrow a { color: var(--text-hint); text-decoration: none; }
.coll-hero .eyebrow a:hover { color: var(--gold-primary); }
.coll-cat { font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.coll-bonus { display: flex; flex-direction: column; gap: 3px; margin: 16px 0 4px; padding: 12px 16px; background: rgba(216,155,54,.08); border: 1px solid var(--border-gold); border-radius: 10px; }
.coll-bonus__label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.coll-bonus__val { font-size: 16px; color: var(--gold-bright); font-weight: 600; }
.coll-hero__meta { color: var(--text-hint); font-size: 14px; margin: 10px 0 0; }

.coll-slots h2 { margin-bottom: 14px; }
.coll-slot { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-default); }
.coll-slot:last-child { border-bottom: none; }
.coll-slot__no { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-surface-3); border: 1px solid var(--border-gold); color: var(--gold-bright); font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.coll-slot__alts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 1; }
.coll-slot__or { color: var(--text-muted); font-size: 12px; font-style: italic; padding: 0 2px; }
.coll-item { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 999px; text-decoration: none; transition: var(--transition); }
.coll-item:hover { border-color: var(--gold-primary); background: var(--bg-surface-3); text-decoration: none; }
.coll-item__ico { width: 30px; height: 30px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--bg-surface-3); }
.coll-item__ico img { width: 28px; height: 28px; object-fit: contain; }
.coll-item__name { font-size: 14px; color: var(--text-primary); }
.coll-ench { color: var(--gold-bright); font-style: normal; font-weight: 600; }
.coll-cnt { color: var(--text-hint); font-style: normal; }
.coll-subst { margin-top: 18px; color: var(--text-muted); font-size: 13px; }

/* item-page: used in collections */
.item-colls { margin-top: 36px; }
.item-colls h2 { display: flex; align-items: center; gap: 10px; }
.item-colls__n { font-size: 13px; color: var(--text-muted); background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 999px; padding: 2px 10px; font-family: var(--font-body); }
.item-colls__more { color: var(--text-muted); font-size: 13px; margin-top: 12px; }

/* item-page: box contents / opened-from (extract) */
.item-extract { margin-top: 32px; }
.item-extract h2 { display: flex; align-items: baseline; gap: 10px; }
.item-extract__n { font-size: 13px; color: var(--text-muted); background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 999px; padding: 2px 10px; }
.item-extract__hint { font-size: 13px; color: var(--text-muted); font-weight: 400; font-family: var(--font-body); }
.extract-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.extract-row { display: flex; align-items: center; gap: 11px; padding: 8px 12px; background: var(--bg-surface-1); border: 1px solid var(--border-default); border-radius: 10px; text-decoration: none; transition: var(--transition); }
.extract-row:hover { border-color: var(--border-gold); background: var(--bg-surface-2); transform: translateX(2px); text-decoration: none; }
.extract-row__ico { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 7px; overflow: hidden; display: grid; place-items: center; background: var(--bg-surface-3); }
.extract-row__ico img { width: 34px; height: 34px; object-fit: contain; }
.extract-row__name { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--text-primary); line-height: 1.3; }
.extract-row__name .grade-badge, .extract-row__name [class*="grade"] { margin-left: 4px; }
.extract-row__cnt { color: var(--gold-bright); font-style: normal; font-weight: 600; font-size: 13px; }
.extract-row__chance { flex: 0 0 auto; font-size: 12px; color: var(--text-hint); }
.extract-row__chance.is-guaranteed { color: #7fdc7f; }

/* item-page: combat stats */
.item-stats { margin-top: 28px; }
.istat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.istat { display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; background: var(--bg-surface-1); border: 1px solid var(--border-default); border-radius: 10px; }
.istat__v { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--gold-bright); line-height: 1; }
.istat__l { font-size: 12px; color: var(--text-hint); text-transform: uppercase; letter-spacing: 0.04em; }

/* quest page extras */
.npc-quests, .npc-sells { margin-top: 28px; }
.quest-goal { color: var(--text-hint); margin: 6px 0 0; font-size: 15px; }
.quest-goal strong { color: var(--gold-bright); }
.quest-classes { font-size: 13px; line-height: 1.4; }
.quest-cur { margin: 4px 0 14px; padding: 8px 12px; background: rgba(216,155,54,0.08); border: 1px solid var(--border-gold); border-radius: 8px; color: var(--gold-bright); font-size: 14px; font-weight: 600; }

/* crafting */
.craft-list { display: flex; flex-direction: column; gap: 10px; }
.craft-recipe { padding: 12px 14px; background: var(--bg-surface-1); border: 1px solid var(--border-default); border-radius: 10px; }
.craft-recipe__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.craft-kind { font-family: var(--font-display); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border-default); }
.craft-kind--recipe { color: #5cb89a; border-color: rgba(92,184,154,0.4); }
.craft-kind--combine { color: #b89ae0; border-color: rgba(184,154,224,0.4); }
.craft-kind--transmute { color: var(--gold-bright); border-color: var(--border-gold); }
.craft-recipe__label { color: var(--text-body); font-size: 13px; text-transform: capitalize; }
.craft-recipe__chance { color: var(--text-hint); font-size: 12px; }
.craft-recipe__out { color: var(--gold-bright); font-size: 13px; font-weight: 600; }
.craft-recipe__mats { display: flex; flex-wrap: wrap; gap: 8px; }
.craft-mat { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 999px; text-decoration: none; font-size: 13px; color: var(--text-primary); transition: var(--transition); }
.craft-mat:hover { border-color: var(--gold-primary); background: var(--bg-surface-3); text-decoration: none; }
.craft-mat img { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; }
.craft-mat em { color: var(--gold-bright); font-style: normal; font-weight: 600; }

/* SEO lede — data-driven summary paragraph */
.seo-lede { margin: 4px 0 22px; padding: 14px 18px; background: var(--bg-surface-1); border-left: 3px solid var(--gold-primary); border-radius: 0 10px 10px 0; color: var(--text-body); font-size: 15px; line-height: 1.6; }
.seo-lede strong { color: var(--gold-bright); }

/* Server conversion CTA */
.loe-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 32px 0 8px; padding: 20px 24px; border-radius: 14px; border: 1px solid var(--border-gold); background: linear-gradient(135deg, rgba(216,155,54,0.1), rgba(12,14,19,0.6)); position: relative; overflow: hidden; }
.loe-cta::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(255,215,106,0.12), transparent 70%); pointer-events: none; }
.loe-cta__eyebrow { font-family: var(--font-display); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-primary); margin: 0 0 4px; }
.loe-cta__title { font-family: var(--font-display); font-size: 21px; color: var(--text-primary); margin: 0 0 10px; }
.loe-cta__usp { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; }
.loe-cta__usp li { position: relative; padding-left: 18px; font-size: 13px; color: var(--text-body); }
.loe-cta__usp li::before { content: '✦'; position: absolute; left: 0; color: var(--gold-primary); font-size: 11px; }
.loe-cta__btn { flex: 0 0 auto; padding: 13px 28px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-bright), var(--gold-primary)); color: #1c1305; font-family: var(--font-display); font-weight: 700; font-size: 15px; text-decoration: none; letter-spacing: 0.02em; transition: var(--transition); box-shadow: 0 4px 18px rgba(216,155,54,0.35); }
.loe-cta__btn:hover { filter: brightness(1.08); transform: translateY(-1px); text-decoration: none; }
@media (max-width: 600px) { .loe-cta__btn { width: 100%; text-align: center; } }

/* live online badge (header) */
.hdr-online { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-gold-soft); background: rgba(92,184,154,0.08); color: var(--text-primary); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: var(--transition); }
.hdr-online:hover { border-color: #5cb89a; text-decoration: none; }
.hdr-online__dot { width: 8px; height: 8px; border-radius: 50%; background: #3fd17a; animation: loePulse 2s infinite; }
.hdr-online__lbl { color: var(--text-hint); font-weight: 400; }
@keyframes loePulse { 0% { box-shadow: 0 0 0 0 rgba(63,209,122,0.5); } 70% { box-shadow: 0 0 0 6px rgba(63,209,122,0); } 100% { box-shadow: 0 0 0 0 rgba(63,209,122,0); } }

/* CTA proof line + actions + discord */
.loe-cta__proof { margin: 10px 0 0; font-size: 13px; color: var(--text-hint); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.loe-cta__live { display: inline-flex; align-items: center; gap: 6px; color: #7fdc7f; font-weight: 600; }
.loe-cta__dot { width: 8px; height: 8px; border-radius: 50%; background: #3fd17a; animation: loePulse 2s infinite; }
.loe-cta__actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.loe-cta__discord { text-align: center; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border-default); color: #9aa6e0; font-size: 13px; font-weight: 600; text-decoration: none; background: rgba(88,101,242,0.1); transition: var(--transition); }
.loe-cta__discord:hover { border-color: #5865f2; color: #c5ccff; text-decoration: none; }

/* sticky play bar (mobile) */
.playbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(8,10,15,0.96); border-top: 1px solid var(--border-gold); box-shadow: 0 -4px 20px rgba(0,0,0,0.45); }
.playbar__txt { flex: 1; min-width: 0; font-size: 13px; color: var(--text-body); display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.playbar__txt strong { color: #7fdc7f; }
.playbar__txt em { color: var(--gold-bright); font-style: normal; }
.playbar__dot { width: 8px; height: 8px; border-radius: 50%; background: #3fd17a; flex: 0 0 auto; animation: loePulse 2s infinite; }
.playbar__btn { flex: 0 0 auto; padding: 9px 22px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-bright), var(--gold-primary)); color: #1c1305; font-family: var(--font-display); font-weight: 700; font-size: 14px; text-decoration: none; }
.playbar__x { flex: 0 0 auto; background: none; border: none; color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
@media (max-width: 760px) { .playbar { display: flex; } .wiki-main { padding-bottom: 64px; } .hdr-online__lbl { display: none; } }

/* ============================================================
   ITEMS HOME
   ============================================================ */
.items-home__hero {
  text-align: center;
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 1px solid var(--border-default);
  margin-bottom: var(--space-8);
}
.items-home__lead { max-width: 640px; margin: 0 auto var(--space-8); color: var(--text-body); }
.items-home__search {
  display: flex; gap: 8px; max-width: 600px; margin: 0 auto;
}
.items-home__search input {
  flex: 1; height: 56px; padding: 0 18px;
  background: var(--bg-surface-3);
  border: 1px solid var(--gold-primary);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 17px;
}
.items-home__search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,178,50,0.18); }
.items-home__search button {
  padding: 0 24px;
  background: var(--red-cta);
  color: var(--text-primary);
  border: none; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.items-home__cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}
.cat-tile {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-6);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.cat-tile:hover {
  border-color: var(--gold-primary);
  background: var(--bg-surface-1);
  text-decoration: none;
}
.cat-tile__name { font-family: var(--font-display); letter-spacing: 0.05em; }
.cat-tile__count {
  background: var(--bg-surface-3);
  color: var(--gold-primary);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.wiki-footer {
  border-top: 1px solid var(--border-gold);
  background: var(--bg-surface-2);
  margin-top: var(--space-16);
}
.wiki-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px var(--space-8) 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.wiki-footer__logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.wiki-footer__logo .wiki-header__phoenix { width: 34px; height: 34px; }
.wiki-footer__logo .wiki-header__lockup { gap: 1px; }
.wiki-footer__brand p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.6; max-width: 34ch; }
.wiki-footer__col h4 {
  margin: 0 0 14px; font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-primary);
}
.wiki-footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.wiki-footer__links a { color: var(--text-muted); font-size: 13px; text-decoration: none; }
.wiki-footer__links a:hover { color: var(--gold-primary); }
.wiki-footer__social { display: flex; gap: 10px; flex-wrap: wrap; }
.wiki-footer__social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-surface-1); border: 1px solid var(--border-default);
  color: var(--text-muted); transition: var(--transition);
}
.wiki-footer__social a:hover { border-color: var(--gold-primary); color: var(--gold-bright); transform: translateY(-2px); }
.wiki-footer__social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wiki-footer__copy p { margin: 0 0 4px; font-size: 13px; color: var(--text-muted); }
.wiki-footer__copy p:first-child { color: var(--gold-primary); font-family: var(--font-display); letter-spacing: 0.06em; }
.wiki-footer__copy .muted { color: var(--text-hint); font-size: 12px; }
@media (max-width: 900px) {
  .wiki-footer__inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .wiki-footer__inner { grid-template-columns: 1fr; }
}
.wiki-footer a { color: var(--text-muted); }
.wiki-footer a:hover { color: var(--gold-primary); }

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error { text-align: center; padding: var(--space-16) 0; }
.error h1 { color: var(--red-cta); font-size: 64px; }
.red-btn {
  display: inline-block;
  margin-top: var(--space-6);
  padding: 14px 32px;
  background: var(--red-cta);
  color: var(--text-primary);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: var(--transition);
}
.red-btn:hover { background: var(--red-deep); text-decoration: none; }

/* ============================================================
   ICON FALLBACK — category SVG when PNG missing
   ============================================================ */
.ico-fallback {
  display: inline-grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, #3a2e28, #1a1314);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--gold-warm);
  opacity: 0.7;
}
.icon-fallback-svg {
  width: 60%; height: 60%;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
/* Large icon for item page hero */
.item-page__icon .ico-fallback { width: 240px; height: 240px; border-radius: var(--radius); }
.item-page__icon .ico-fallback .icon-fallback-svg { width: 50%; height: 50%; }

/* ============================================================
   BREADCRUMBS (visible above category title)
   ============================================================ */
.breadcrumbs-vis {
  font-size: 13px;
  color: var(--text-hint);
  margin-bottom: 16px;
}
.breadcrumbs-vis a { color: var(--text-muted); }
.breadcrumbs-vis a:hover { color: var(--gold-primary); text-decoration: none; }
.breadcrumbs-vis span { color: var(--gold-primary); opacity: 0.5; margin: 0 6px; }
.breadcrumbs-vis strong { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   FILTER BAR (category page)
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 14px 18px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  margin-bottom: 24px;
  align-items: center;
}
.filter-bar--sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(38,31,33,0.95);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

/* In-category search */
.filter-search {
  display: flex; align-items: center;
  gap: 4px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  flex: 1; min-width: 220px; max-width: 360px;
}
.filter-search:focus-within { border-color: var(--gold-primary); }
.filter-search input {
  background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: var(--font-body); font-size: 13px;
  flex: 1; padding: 4px 0;
}
.filter-search input::placeholder { color: var(--text-hint); }
.filter-search button {
  background: transparent; border: none; color: var(--gold-primary);
  cursor: pointer; padding: 4px 10px; font-size: 16px;
}
.filter-search button:hover { color: var(--gold-bright); }
.filter-search__clear {
  color: var(--text-hint); padding: 0 6px;
  font-size: 16px; line-height: 1;
}
.filter-search__clear:hover { color: var(--red-cta); text-decoration: none; }
.filter-group {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.filter-group--right { margin-left: auto; }
.filter-group__label {
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-hint);
  margin-right: 2px;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-body);
  background: var(--bg-surface-3);
  text-decoration: none;
  transition: var(--transition);
}
.filter-pill:hover { border-color: var(--gold-primary); color: var(--gold-primary); text-decoration: none; }
.filter-pill.active {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: rgba(255, 178, 50, 0.08);
}
.filter-pill em { color: var(--text-hint); font-style: normal; font-size: 10px; }
.filter-pill.active em { color: var(--gold-warm); }
.filter-reset {
  font-size: 11px;
  color: var(--red-cta);
  margin-left: 8px;
  letter-spacing: 0.04em;
}
.filter-reset:hover { color: var(--gold-primary); }

/* ============================================================
   GRADE BADGES — L2-style colored chips per grade tier
   ============================================================ */
.grade-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  border: 1px solid;
  white-space: nowrap;
}
.grade-none { color: #b4aaa6; border-color: #4b3a38; background: rgba(180,170,166,0.06); }
.grade-d    { color: #b8e986; border-color: #6e9a28; background: rgba(110,154,40,0.10); }
.grade-c    { color: #6ec1ff; border-color: #29b6f6; background: rgba(41,182,246,0.10); }
.grade-b    { color: #ff9eff; border-color: #c060ff; background: rgba(192,96,255,0.10); }
.grade-a    { color: #ffe78a; border-color: #ffd700; background: rgba(255,215,0,0.10); }
.grade-s    { color: #ffb232; border-color: #ffb232; background: rgba(255,178,50,0.12); box-shadow: 0 0 6px rgba(255,178,50,0.2); }
.grade-r    { color: #ff5d5d; border-color: #c90300; background: rgba(201,3,0,0.14); box-shadow: 0 0 6px rgba(201,3,0,0.25); }

/* ============================================================
   CLASSES — LAYOUT SWITCH (Атлас vs Список)
   ============================================================ */
.layout-switch {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 12px;
  padding: 4px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 999px;
}
.layout-switch__hint {
  padding: 0 8px 0 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-hint);
}
.layout-switch__pill {
  padding: 6px 14px;
  font-size: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: var(--transition);
}
.layout-switch__pill:hover {
  color: var(--text-primary);
  background: var(--bg-surface-1);
  text-decoration: none;
}
.layout-switch__pill--active {
  background: linear-gradient(135deg, rgba(255,178,50,0.22), rgba(255,178,50,0.06));
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(255,178,50,0.25);
}

/* ============================================================
   CLASSES — VARIANT A: RACE CARDS (Атлас)
   ============================================================ */
.race-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.race-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  min-height: 96px;
  background: linear-gradient(135deg, var(--bg-surface-2), var(--bg-surface-3));
  border: 1px solid var(--border-default);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  overflow: hidden;
}
.race-card::before {
  /* subtle gold ribbon along the top edge */
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0.35;
}
.race-card::after {
  /* corner radial glow on hover */
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 85% 0%, rgba(79,195,247,0.12), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.race-card:hover {
  border-color: var(--phoenix-cyan);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -12px rgba(79,195,247,0.4), 0 0 0 1px rgba(79,195,247,0.2);
  text-decoration: none;
}
.race-card:hover::after { opacity: 1; }
.race-card:hover .race-card__crest {
  color: var(--phoenix-cyan-bright);
  filter: drop-shadow(0 0 12px rgba(79,195,247,0.55));
}
.race-card--active {
  background: linear-gradient(135deg, rgba(255,178,50,0.18), rgba(255,178,50,0.03));
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 1px rgba(255,178,50,0.35), 0 12px 32px -12px rgba(255,178,50,0.4);
}
.race-card--active::before {
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  opacity: 1;
}
.race-card--active .race-card__crest {
  color: var(--gold-bright);
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.55));
}
.race-card__crest {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: var(--phoenix-cyan);
  background: radial-gradient(circle, rgba(0,0,0,0.4), transparent);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  filter: drop-shadow(0 0 6px rgba(79,195,247,0.3));
  transition: var(--transition);
}
.race-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.race-card__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}
.race-card--active .race-card__name { color: var(--gold-bright); }
.race-card__sub {
  font-size: 12px;
  color: var(--text-hint);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.race-card__count {
  display: flex; flex-direction: column; align-items: flex-end;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1;
}
.race-card__count em {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-hint);
  font-weight: 500;
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .race-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .race-cards { grid-template-columns: 1fr; gap: 10px; }
  .race-card { min-height: 80px; padding: 14px 16px; gap: 12px; grid-template-columns: 44px 1fr auto; }
  .race-card__crest { width: 44px; height: 44px; font-size: 24px; }
  .race-card__name { font-size: 16px; }
}

/* ============================================================
   CLASSES — VARIANT B: RACE SIDEBAR (Список)
   ============================================================ */
.classes-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 24px;
}
.classes-shell__content { min-width: 0; }
.race-rail {
  position: sticky;
  top: 80px;
  align-self: start;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  overflow: hidden;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.race-rail__head {
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border-default);
  background: linear-gradient(180deg, rgba(255,178,50,0.06), transparent);
}
.race-rail__head .eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.race-rail__item {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-default);
  transition: var(--transition);
}
.race-rail__item:last-child { border-bottom: none; }
.race-rail__item:hover {
  background: var(--bg-surface-1);
  text-decoration: none;
  color: var(--text-primary);
}
.race-rail__item:hover .race-rail__glyph {
  color: var(--phoenix-cyan-bright);
  filter: drop-shadow(0 0 6px rgba(79,195,247,0.45));
}
.race-rail__item--active {
  background: linear-gradient(90deg, rgba(255,178,50,0.18), rgba(255,178,50,0.03) 70%);
  color: var(--gold-bright);
}
.race-rail__item--active::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold-bright), transparent);
}
.race-rail__item--active .race-rail__glyph {
  color: var(--gold-bright);
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.5));
}
.race-rail__item--active .race-rail__count {
  background: rgba(255,178,50,0.18);
  color: var(--gold-bright);
  border-color: rgba(255,178,50,0.5);
}
.race-rail__glyph {
  font-size: 22px;
  color: var(--phoenix-cyan);
  filter: drop-shadow(0 0 5px rgba(79,195,247,0.35));
  display: flex; align-items: center; justify-content: center;
  width: 36px;
  transition: var(--transition);
}
.race-rail__text {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.race-rail__text strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.race-rail__text small {
  font-size: 11px;
  color: var(--text-hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.race-rail__count {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
}

@media (max-width: 900px) {
  .classes-shell { grid-template-columns: 1fr; }
  .race-rail { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; overflow-x: auto; }
  .race-rail__head { display: none; }
  .race-rail__item { flex: 1 1 calc(50% - 1px); border-bottom: 1px solid var(--border-default); }
}

/* ============================================================
   CLASSES — TABS + TREE
   ============================================================ */
.classes-page { margin-top: 8px; }

/* Race tabs ---------------------------------------------------- */
.race-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px; margin-bottom: 24px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 12px;
}
.race-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}
.race-tab:hover {
  background: var(--bg-surface-1);
  border-color: var(--phoenix-cyan);
  color: var(--text-primary);
  text-decoration: none;
}
.race-tab--active {
  background: linear-gradient(135deg, rgba(79,195,247,0.18), rgba(79,195,247,0.04));
  border-color: var(--phoenix-cyan);
  color: var(--phoenix-cyan-bright);
  box-shadow: 0 0 0 1px rgba(79,195,247,0.25), 0 6px 18px rgba(79,195,247,0.15);
}
.race-tab__glyph {
  font-size: 16px; line-height: 1;
  color: var(--phoenix-cyan);
  filter: drop-shadow(0 0 6px rgba(79,195,247,0.4));
}
.race-tab--active .race-tab__glyph { color: var(--gold-bright); filter: drop-shadow(0 0 6px rgba(255,215,0,0.5)); }
.race-tab__count {
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  background: rgba(0,0,0,0.35); color: var(--text-hint);
  border: 1px solid var(--border-default);
}

/* Tree panel --------------------------------------------------- */
.tree-panel {
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 32px;
}
.tree-panel__header { margin-bottom: 22px; }
.tree-panel__header h2 {
  margin: 0 0 6px; font-size: 26px;
  font-family: var(--font-display); color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 12px;
}
.tree-panel__glyph { color: var(--gold-bright); filter: drop-shadow(0 0 8px rgba(255,215,0,0.4)); }
.tree-panel__header p { margin: 0; color: var(--text-muted); font-size: 14px; }

.tree-tier-pill {
  display: inline-block; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.04); color: var(--text-hint);
  border: 1px solid var(--border-default);
}
.tree-tier-pill--awakened {
  color: #ff8e8e; border-color: rgba(201,3,0,0.5);
  background: rgba(201,3,0,0.12);
  box-shadow: 0 0 6px rgba(201,3,0,0.25);
}

/* Branch (Воин / Маг) ----------------------------------------- */
.tree-branch { margin-bottom: 32px; }
.tree-branch:last-child { margin-bottom: 0; }
.tree-branch__header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-default);
}
.tree-branch__title {
  margin: 0; font-family: var(--font-display);
  font-size: 22px; color: var(--gold-bright);
  letter-spacing: 0.04em;
}
.tree-branch--mage .tree-branch__title { color: var(--phoenix-cyan-bright); }
.tree-branch__legend { display: flex; gap: 6px; flex-wrap: wrap; }

/* Tree grid (4 columns: tiers 0..3) ---------------------------- */
.tree-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
.tree-col {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 14px 12px;
  position: relative;
}
.tree-col--tier-3 {
  background: linear-gradient(180deg, rgba(255,178,50,0.08), rgba(255,178,50,0.02));
  border-color: rgba(255,178,50,0.4);
}
.tree-col__header {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-hint);
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-default);
}
.tree-col--tier-3 .tree-col__header { color: var(--gold-bright); border-bottom-color: rgba(255,178,50,0.3); }
.tree-col__items { display: flex; flex-direction: column; gap: 6px; }
.tree-col__empty { text-align: center; color: var(--text-hint); padding: 12px 0; font-size: 14px; }

/* Class chip in tree ------------------------------------------ */
.tree-class {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--gold-primary);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
  transition: var(--transition);
}
.tree-class:hover {
  background: rgba(79,195,247,0.08);
  border-color: var(--phoenix-cyan);
  border-left-color: var(--phoenix-cyan);
  text-decoration: none;
  transform: translateX(2px);
}
/* class emblem (signature skill icon) */
.tree-class__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.tree-class__icon img {
  width: 28px; height: 28px; max-width: none;
  object-fit: contain; image-rendering: auto;
  border-radius: 5px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface-3);
}
.tree-class:hover .tree-class__icon img {
  border-color: var(--phoenix-cyan);
}
/* fallback dot when class has no emblem */
.tree-class__icon--dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-glow);
  margin: 9px;
}
.tree-class__name {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.tree-class--final {
  border-left-color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(255,178,50,0.10), var(--bg-surface-1) 60%);
  color: var(--text-primary);
}
.tree-class--final .tree-class__name {
  color: var(--gold-bright);
}
.tree-class--final .tree-class__icon img {
  border-color: rgba(255,178,50,0.5);
  box-shadow: 0 0 8px rgba(255,215,0,0.25);
}
.tree-class--final .tree-class__icon--dot {
  background: var(--gold-bright);
  box-shadow: 0 0 8px rgba(255,215,0,0.7);
}
.tree-class--final:hover {
  background: linear-gradient(90deg, rgba(255,178,50,0.22), rgba(255,178,50,0.04) 60%);
  border-color: var(--gold-bright);
  border-left-color: var(--gold-bright);
}

/* "Where awakening leads" chip strip --------------------------- */
.tree-branch__awake {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px dashed rgba(201,3,0,0.35);
  border-radius: 8px;
}
.tree-branch__awake-label {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-hint);
  margin-right: 4px;
}
.tree-branch__awake-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--bg-surface-1);
  border: 1px solid rgba(201,3,0,0.4);
  border-radius: 6px;
  color: #ffd0d0;
  text-decoration: none;
  font-size: 12px;
  font-family: var(--font-display);
}
.tree-branch__awake-chip em {
  font-style: normal; color: var(--text-hint); font-size: 11px;
}
.tree-branch__awake-chip:hover {
  background: rgba(201,3,0,0.18);
  border-color: var(--red-cta);
  text-decoration: none;
}

/* Awakening overview grid ------------------------------------- */
.awakening-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.awakening-card {
  background: var(--bg-surface-2);
  border: 1px solid rgba(201,3,0,0.4);
  border-top: 3px solid var(--red-cta);
  border-radius: 10px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.awakening-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% -20%, rgba(201,3,0,0.18), transparent 60%);
  pointer-events: none;
}
.awakening-card__glyph {
  font-size: 30px; color: var(--red-cta);
  filter: drop-shadow(0 0 10px rgba(201,3,0,0.6));
  margin-bottom: 8px;
}
.awakening-card h3 {
  margin: 0 0 4px; font-family: var(--font-display);
  font-size: 19px; color: #ffd0d0;
}
.awakening-card__role {
  margin: 0 0 10px; color: var(--gold-bright);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.awakening-card__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.awakening-card__list li { font-size: 12px; }
.awakening-card__list a {
  color: var(--text-body); text-decoration: none;
}
.awakening-card__list a:hover { color: var(--phoenix-cyan-bright); }
.awakening-card__more { color: var(--text-hint); font-style: italic; }

/* Footer explainer -------------------------------------------- */
.classes-footer {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 10px;
}
.classes-footer h2 {
  margin: 0 0 12px; font-size: 18px;
  font-family: var(--font-display); color: var(--gold-bright);
}
.classes-footer__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.classes-footer__list li {
  padding: 10px 14px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-body);
}
.classes-footer__list strong { color: var(--text-primary); }
.classes-footer__list em { color: var(--phoenix-cyan-bright); font-style: normal; }

@media (max-width: 900px) {
  .tree-grid { grid-template-columns: 1fr; gap: 12px; }
  .tree-col__header { text-align: left; }
  .race-tabs { padding: 10px; }
  .race-tab { font-size: 13px; padding: 6px 10px; }
  .tree-panel { padding: 18px; }
}

/* ============================================================
   CLASS DETAIL PAGE (/class/{slug})
   ============================================================ */
.class-page__head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--bg-surface-2), var(--bg-surface-3));
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--gold-primary);
  border-bottom: 1px solid var(--border-default);   /* override generic head rule */
  border-radius: 12px;
  margin-bottom: 24px;
}
.class-page__head--mage { border-left-color: var(--phoenix-cyan); }
.class-page__headtext { flex: 1; min-width: 0; }
.class-page__emblem {
  flex-shrink: 0;
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(0,0,0,0.4), transparent);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  margin-top: 4px;
}
.class-page__head--mage .class-page__emblem { border-color: rgba(79,195,247,0.4); }
.class-page__emblem img {
  width: 56px; height: 56px; max-width: none;
  object-fit: contain; image-rendering: auto;
  border-radius: 8px;
  filter: drop-shadow(0 0 8px rgba(255,178,50,0.35));
}
.class-page__head--mage .class-page__emblem img {
  filter: drop-shadow(0 0 8px rgba(79,195,247,0.4));
}
.class-page__head h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}
.class-page__head--mage h1 { color: var(--phoenix-cyan-bright); }
.class-page__head .eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-hint);
}
.class-page__desc {
  margin: 0 0 16px;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.55;
  max-width: 720px;
}
.class-page__stats {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 6px;
}
.class-stat {
  padding: 6px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.class-stat strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  margin-right: 4px;
}

/* Skill section */
.class-skills {
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.class-skills__head { margin-bottom: 16px; }
.class-skills__head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 22px;
}
.class-skills__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* Tabs */
.skill-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 16px 0;
  padding: 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 8px;
}
.skill-tab {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
}
.skill-tab:hover {
  background: var(--bg-surface-1);
  border-color: var(--border-default);
  color: var(--text-primary);
}
.skill-tab--active {
  background: linear-gradient(180deg, rgba(255,178,50,0.18), rgba(255,178,50,0.05));
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(255,178,50,0.25), 0 4px 12px rgba(255,178,50,0.12);
}
.skill-tab__count {
  font-style: normal;
  font-size: 10px;
  font-family: var(--font-body);
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  color: var(--text-hint);
  min-width: 18px; text-align: center;
}
.skill-tab--active .skill-tab__count {
  background: rgba(255,178,50,0.25);
  color: var(--gold-bright);
}

/* Skill table */
.skill-panel { animation: fadeIn 0.2s ease; }
.skill-panel[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.skill-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-surface-2);
}
.skill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--text-body);
}
.skill-table thead th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-surface-3);
  color: var(--text-hint);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}
.skill-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-default);
  vertical-align: middle;
}
.skill-table tbody tr:last-child td { border-bottom: none; }
.skill-table tbody tr:hover { background: rgba(79,195,247,0.05); }

.skill-table__col-icon { width: 56px; }
.skill-table__col-name { width: 210px; }
.skill-table__col-desc { width: auto; min-width: 260px; }
.skill-table__col-type { width: 170px; white-space: nowrap; }
.skill-table__col-mp,
.skill-table__col-hp,
.skill-table__col-sp { width: 66px; text-align: right; }

/* icon cell: tighter padding so the 36px square never gets clipped/squished */
.skill-table__icon { padding-left: 12px !important; padding-right: 6px !important; }
.skill-table__icon img {
  width: 36px; height: 36px;
  max-width: none;            /* override global img{max-width:100%} that squished it */
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  image-rendering: auto;      /* smooth 64→36 downscale (pixelated only helps upscaling) */
  display: block;
  background: var(--bg-surface-3);
}
.skill-icon-stub {
  display: block;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--bg-surface-3), var(--bg-surface-1));
  border: 1px solid var(--border-default);
  border-radius: 6px;
}

/* Skill detail: hero icon + per-level value progression */
.skill-page__icon img {
  width: 64px; height: 64px; max-width: none;
  object-fit: contain; image-rendering: auto;
  border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg-surface-3);
}
.skill-levels { margin: 24px 0; }
.skill-levels h2 {
  font-family: var(--font-display);
  font-size: 18px; color: var(--gold-bright);
  margin: 0 0 12px;
}
.skill-levels__grid {
  display: grid; gap: 2px;
  border: 1px solid var(--border-default);
  border-radius: 8px; overflow: hidden;
}
.skill-level-row {
  display: grid; grid-template-columns: 72px 1fr; gap: 14px;
  padding: 10px 14px; align-items: start;
  background: var(--bg-surface-2);
}
.skill-level-row:nth-child(even) { background: var(--bg-surface-3); }
.skill-level-row__lv {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: var(--gold-bright);
  white-space: nowrap;
}
.skill-level-row__desc {
  font-size: 13px; line-height: 1.5; color: var(--text-body);
}

.skill-link {
  display: block;
  color: var(--phoenix-cyan-bright);
  text-decoration: none;
  font-family: var(--font-display);
  line-height: 1.25;
}
.skill-link:hover { color: var(--gold-bright); text-decoration: none; }
.skill-link strong { display: block; font-size: 13px; font-weight: 600; }
.skill-link small { display: block; color: var(--text-hint); font-size: 11px; margin-top: 2px; }
.skill-table__lvl {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: var(--font-body);
  background: rgba(0,0,0,0.35);
  color: var(--text-hint);
  border-radius: 999px;
  vertical-align: 1px;
}
.skill-table__desc {
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 12px;
}
.skill-param {
  color: var(--gold-bright);
  font-style: normal;
  padding: 0 2px;
  letter-spacing: 0.05em;
}
.skill-table__type {
  color: var(--text-body);
  font-size: 12px;
}
.skill-table__mp { color: var(--phoenix-cyan); font-weight: 500; }
.skill-table__hp { color: var(--red-cta); font-weight: 500; }
.skill-table__sp { color: var(--gold-bright); font-weight: 500; }

/* Sibling cards */
.class-siblings {
  margin-bottom: 24px;
}
.class-siblings h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-primary);
}
.class-siblings__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.class-sibling-card {
  display: block;
  padding: 12px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--gold-primary);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.class-sibling-card:hover {
  background: var(--bg-surface-1);
  border-color: var(--phoenix-cyan);
  border-left-color: var(--phoenix-cyan);
  text-decoration: none;
}
.class-sibling-card__tier {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-hint);
  margin-bottom: 4px;
}
.class-sibling-card strong {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-bright);
}

@media (max-width: 900px) {
  .class-page__head { padding: 20px; }
  .class-page__head h1 { font-size: 28px; }
  .skill-table { font-size: 12px; }
  .skill-table thead th,
  .skill-table tbody td { padding: 8px 10px; }
  .skill-table__col-desc { min-width: 200px; }
}

/* ============================================================
   LOCATIONS
   ============================================================ */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.loc-card {
  display: flex;
  align-items: stretch;
  min-height: 168px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow: hidden;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.loc-card:hover {
  border-color: var(--phoenix-cyan);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -12px rgba(79,195,247,0.5);
}

/* map thumbnail column (left) — portrait 2:3 = same aspect as worldmap.jpg → no crop */
.loc-map {
  position: relative;
  width: 112px;
  flex-shrink: 0;
  align-self: stretch;
  border-right: 1px solid var(--border-default);
  /* real game map (worldmap.jpg) layered over a tactical-grid fallback */
  background-image:
    url('/wiki/assets/worldmap.jpg?v=1'),
    linear-gradient(rgba(79,195,247,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,195,247,0.06) 1px, transparent 1px),
    linear-gradient(160deg, #0d1722, #070b12);
  background-size: cover, 18px 18px, 18px 18px, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat, repeat, repeat, no-repeat;
}
.loc-map--town { filter: grayscale(0.5) brightness(0.8); }
.loc-card:hover .loc-map { filter: brightness(1.08); }
.loc-card:hover .loc-map--town { filter: grayscale(0.4) brightness(0.9); }

/* glowing position marker (gold teardrop) */
.loc-pin {
  position: absolute; width: 16px; height: 16px;
  transform: translate(-50%, -100%);
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  background: radial-gradient(circle at 50% 38%, #fff2cf, var(--gold-bright) 45%, var(--gold-primary));
  border: 1.5px solid #2a1c08;
  box-shadow: 0 0 12px 2px rgba(255,178,50,0.75), 0 2px 4px rgba(0,0,0,0.6);
}
.loc-pin::after {
  content: ""; position: absolute; left: 50%; top: 42%;
  width: 5px; height: 5px; transform: translate(-50%,-50%);
  background: #2a1c08; border-radius: 50%;
}
.loc-card:hover .loc-pin {
  box-shadow: 0 0 18px 5px rgba(255,215,106,0.9), 0 2px 4px rgba(0,0,0,0.6);
}

.loc-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px 16px; }
.loc-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.loc-card__name { font-family: var(--font-display); font-size: 16px; color: var(--text-primary); line-height: 1.25; }
.loc-card:hover .loc-card__name { color: var(--gold-bright); }
.loc-card__lvl {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(110,154,40,0.18);
  color: #aacb6b;
  border: 1px solid rgba(110,154,40,0.5);
  white-space: nowrap;
}
.loc-card__lvl--town { background: rgba(0,0,0,0.3); color: var(--text-hint); border-color: var(--border-default); }
.loc-card__desc { margin: 0 0 6px; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.loc-card__en { font-size: 11px; color: var(--text-hint); margin-top: auto; }

/* location detail */
.location-page__head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border-default); }
.location-page__head h1 { margin: 0 0 4px; font-family: var(--font-display); font-size: 34px; color: var(--gold-bright); }
.location-page__body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.location-page__main { min-width: 0; }
.location-lore { margin-bottom: 24px; }
.location-lore h2, .location-related h2 { font-family: var(--font-display); font-size: 20px; color: var(--gold-bright); margin: 0 0 12px; }
.location-lore p { font-size: 15px; line-height: 1.65; color: var(--text-body); }
.loc-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.loc-related-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; background: var(--bg-surface-2);
  border: 1px solid var(--border-default); border-radius: 6px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.loc-related-card:hover { border-color: var(--phoenix-cyan); background: var(--bg-surface-1); text-decoration: none; }
.loc-related-card strong { font-family: var(--font-display); font-size: 13px; }
.loc-related-card span { font-size: 11px; color: #aacb6b; }
.location-page__info, .quest-page__info {
  align-self: start; position: sticky; top: 80px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default);
  border-radius: 10px; padding: 18px;
}
.location-page__info h3, .quest-page__info h3 {
  margin: 0 0 12px; font-family: var(--font-display); font-size: 16px; color: var(--gold-bright);
}
.location-map {
  position: relative;
  aspect-ratio: 2 / 3;            /* = worldmap.jpg aspect → cover shows full map, pin exact */
  margin: -18px -18px 16px;
  border-bottom: 1px solid var(--border-gold-soft);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background-image:
    url('/wiki/assets/worldmap.jpg?v=1'),
    linear-gradient(rgba(79,195,247,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,195,247,0.06) 1px, transparent 1px),
    linear-gradient(160deg, #0d1722, #070b12);
  background-size: cover, 26px 26px, 26px 26px, cover;
  background-position: center;
  background-repeat: no-repeat, repeat, repeat, no-repeat;
}
.location-map__label {
  position: absolute; left: 12px; bottom: 10px;
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(5,7,11,0.72); padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-gold-soft);
  backdrop-filter: blur(3px);
}
.location-map .loc-pin { width: 22px; height: 22px; }
.location-page__info dl, .quest-page__info dl {
  display: grid; grid-template-columns: max-content 1fr; column-gap: 14px; row-gap: 10px; margin: 0 0 16px;
}
.location-page__info dt, .quest-page__info dt { color: var(--text-hint); font-size: 13px; }
.location-page__info dd, .quest-page__info dd { margin: 0; font-size: 14px; color: var(--text-primary); }
.location-page__info dd a, .quest-page__info dd a { color: var(--phoenix-cyan-bright); text-decoration: none; }
.loc-lvl-strong { font-family: var(--font-display); font-weight: 700; color: #aacb6b !important; font-size: 16px !important; }
.loc-coords { font-family: monospace; font-size: 12px !important; color: var(--text-muted) !important; }
.location-cta { display: block; text-align: center; margin-top: 4px; }

/* ============================================================
   QUESTS
   ============================================================ */
.quest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.quest-card {
  display: block; padding: 16px 18px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default);
  border-left: 3px solid var(--gold-primary); border-radius: 10px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.quest-card:hover {
  background: var(--bg-surface-1); border-color: var(--gold-bright); border-left-color: var(--gold-bright);
  text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 8px 22px -12px rgba(255,178,50,0.4);
}
.quest-card__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.quest-card__lvl {
  flex-shrink: 0; font-family: var(--font-display); font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255,178,50,0.16); color: var(--gold-bright); border: 1px solid rgba(255,178,50,0.45);
}
.quest-card__head strong { font-family: var(--font-display); font-size: 16px; line-height: 1.25; }
.quest-card__intro { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.quest-card__npc { font-size: 11px; color: var(--phoenix-cyan); }

/* quest detail */
.quest-page__head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border-default); }
.quest-page__head h1 { margin: 0 0 4px; font-family: var(--font-display); font-size: 32px; color: var(--gold-bright); }
.quest-page__body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.quest-page__main { min-width: 0; }
.quest-intro { margin-bottom: 24px; }
.quest-intro h2, .quest-steps h2 { font-family: var(--font-display); font-size: 20px; color: var(--gold-bright); margin: 0 0 12px; }
.quest-intro p { font-size: 15px; line-height: 1.65; color: var(--text-body); font-style: italic; }
.quest-steps__list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.quest-step {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-default);
}
.quest-step:last-child { border-bottom: none; }
.quest-step__num {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,178,50,0.2), rgba(255,178,50,0.05));
  border: 1px solid var(--gold-primary);
  font-family: var(--font-display); font-weight: 700; color: var(--gold-bright);
}
.quest-step__goal { display: block; font-size: 15px; color: var(--text-primary); margin-bottom: 4px; }
.quest-step__body p { margin: 0 0 6px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.quest-step__entity { font-size: 12px; color: var(--phoenix-cyan); }
.quest-rewards__title { margin-top: 4px !important; }
.quest-rewards { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.quest-reward {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; background: var(--bg-surface-1);
  border: 1px solid var(--border-default); border-radius: 6px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.quest-reward:hover { border-color: var(--gold-primary); text-decoration: none; }
.quest-reward__icon img, .quest-reward__icon .icon-placeholder { width: 36px; height: 36px; border-radius: 5px; }
.quest-reward__name { font-size: 13px; line-height: 1.3; }
.quest-reward__name em { color: var(--gold-bright); font-style: normal; font-weight: 600; }
.quest-reward--unknown { opacity: 0.7; }

@media (max-width: 900px) {
  .location-page__body, .quest-page__body { grid-template-columns: 1fr; }
  .location-page__info, .quest-page__info { position: static; }
}

/* ============================================================
   EDITORIAL ARTICLES (/ru/{slug}) — doc layout + typography
   ============================================================ */
.doc-page { margin-top: 4px; }
.doc-page__head {
  margin-bottom: 28px;
  padding: 30px 34px;
  background:
    radial-gradient(circle at 90% -30%, rgba(79,195,247,0.10), transparent 55%),
    linear-gradient(135deg, var(--bg-surface-2), var(--bg-surface-3));
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--gold-primary);
  border-radius: 14px;
}
.doc-page__head h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.15;
  color: var(--gold-bright);
  letter-spacing: 0.01em;
}
.doc-page__lede {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 760px;
}
.doc-page__meta {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-hint);
}

.doc-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 32px;
  align-items: start;
}

/* TOC sidebar */
.doc-toc { position: sticky; top: 80px; }
.doc-toc__inner {
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px 14px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.doc-toc__label {
  margin: 0 0 10px; padding: 0 6px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-bright);
}
.doc-toc__nav { display: flex; flex-direction: column; gap: 1px; }
.doc-toc__link {
  display: block;
  padding: 8px 12px;
  border-radius: 7px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  transition: var(--transition);
}
.doc-toc__link:hover {
  background: var(--bg-surface-1);
  color: var(--phoenix-cyan-bright);
  border-left-color: var(--phoenix-cyan);
  text-decoration: none;
}
.doc-toc__link--sub { padding-left: 24px; font-size: 12px; color: var(--text-hint); }

/* Article body typography */
.doc-body {
  min-width: 0;
  max-width: 900px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
}
.doc-body > *:first-child { margin-top: 0; }
.doc-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold-bright);
  margin: 38px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
  letter-spacing: 0.01em;
  scroll-margin-top: 90px;
}
.doc-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--phoenix-cyan-bright);
  margin: 28px 0 10px;
  scroll-margin-top: 90px;
}
.doc-body h4 { font-size: 16px; color: var(--text-primary); margin: 22px 0 8px; font-weight: 700; }
.doc-body p { margin: 0 0 16px; }
.doc-body a {
  color: var(--phoenix-cyan-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(128,222,234,0.3);
  transition: var(--transition);
}
.doc-body a:hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }
.doc-body strong { color: var(--text-primary); font-weight: 700; }
.doc-body em { color: var(--text-body); }
.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 4px; list-style: none; }
.doc-body ul > li, .doc-body ol > li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
}
.doc-body ul > li::before {
  content: "";
  position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-glow);
}
.doc-body ol { counter-reset: docol; }
.doc-body ol > li { counter-increment: docol; }
.doc-body ol > li::before {
  content: counter(docol);
  position: absolute; left: 0; top: 2px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  color: var(--gold-bright);
  background: rgba(255,178,50,0.14);
  border: 1px solid rgba(255,178,50,0.4);
  border-radius: 50%;
}
.doc-body li > ul, .doc-body li > ol { margin: 9px 0 0; }
.doc-body blockquote {
  margin: 0 0 18px;
  padding: 14px 20px;
  background: rgba(79,195,247,0.06);
  border-left: 3px solid var(--phoenix-cyan);
  border-radius: 0 8px 8px 0;
  color: var(--text-body);
}
.doc-body blockquote p:last-child { margin-bottom: 0; }
.doc-body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 5px;
  color: var(--gold-warm);
}
.doc-body pre {
  margin: 0 0 18px; padding: 16px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow-x: auto;
}
.doc-body pre code { padding: 0; background: none; border: none; color: var(--text-body); }
.doc-body hr { border: none; border-top: 1px solid var(--border-default); margin: 32px 0; }
.doc-body table {
  width: 100%; border-collapse: collapse; margin: 0 0 20px;
  border: 1px solid var(--border-default); border-radius: 8px; overflow: hidden;
}
.doc-body th { background: var(--bg-surface-3); color: var(--gold-bright); text-align: left; padding: 10px 14px; font-family: var(--font-display); font-size: 14px; }
.doc-body td { padding: 10px 14px; border-top: 1px solid var(--border-default); font-size: 14px; }
.doc-body img { border-radius: 10px; border: 1px solid var(--border-default); margin: 0 0 18px; }
/* hide Wiki.js heading pilcrow anchors (¶) until hover */
.doc-body .toc-anchor { opacity: 0; margin-left: -0.7em; padding-right: 0.2em; color: var(--text-hint); text-decoration: none; border: none; font-weight: 400; }
.doc-body h2:hover .toc-anchor, .doc-body h3:hover .toc-anchor { opacity: 0.5; }

/* article footer: edit + CTA */
.doc-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--border-default);
}
.doc-foot__edit {
  font-size: 13px; color: var(--text-hint) !important;
  text-decoration: none !important; border: none !important;
}
.doc-foot__edit:hover { color: var(--phoenix-cyan-bright) !important; }
.doc-foot__cta { text-decoration: none !important; border: none !important; }

@media (max-width: 900px) {
  .doc-shell { grid-template-columns: 1fr; gap: 18px; }
  .doc-toc { position: static; order: -1; }
  .doc-toc__inner { max-height: none; }
  .doc-page__head { padding: 22px; }
  .doc-page__head h1 { font-size: 28px; }
  .doc-body { font-size: 15px; }
}

/* ============================================================
   NPC / MOB PAGE v2 — drops + spawns (server data)
   ============================================================ */
.npc-page2__head {
  margin-bottom: 22px; padding: 24px 28px;
  background: linear-gradient(135deg, var(--bg-surface-2), var(--bg-surface-3));
  border: 1px solid var(--border-default); border-left: 4px solid var(--avalon-green);
  border-radius: 12px;
}
.npc-page2__head--boss { border-left-color: var(--red-cta); background: linear-gradient(135deg, rgba(201,3,0,0.12), var(--bg-surface-3)); }
.npc-page2__head h1 { margin: 0 0 4px; font-family: var(--font-display); font-size: 32px; color: var(--gold-bright); }
.npc-page2__head--boss h1 { color: #ff8e8e; }
.npc-page2__nick { margin: 0 0 4px; color: var(--phoenix-cyan-bright); font-size: 14px; }
.npc-page2__body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.npc-page2__main { min-width: 0; }
.npc-page2__info {
  position: sticky; top: 80px; align-self: start;
  background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 10px; padding: 18px;
}
.npc-page2__info h3 { margin: 0 0 12px; font-family: var(--font-display); font-size: 16px; color: var(--gold-bright); }
.npc-page2__info dl { display: grid; grid-template-columns: max-content 1fr; column-gap: 14px; row-gap: 9px; margin: 0 0 16px; }
.npc-page2__info dt { color: var(--text-hint); font-size: 13px; }
.npc-page2__info dd { margin: 0; font-size: 14px; color: var(--text-primary); }
.npc-lvl { font-family: var(--font-display); font-weight: 700; color: #aacb6b !important; font-size: 16px !important; }

/* combat stats */
.npc-stats { margin-bottom: 24px; }
.npc-stats h2 { font-family: var(--font-display); font-size: 22px; color: var(--gold-bright); margin: 0 0 14px; }
.npc-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; margin-bottom: 12px; }
.npc-stat {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: 8px;
}
.npc-stat b { font-family: var(--font-display); font-size: 20px; color: var(--gold-bright); line-height: 1; }
.npc-stat i { font-style: normal; font-size: 11px; letter-spacing: 0.05em; color: var(--text-hint); }
.npc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.npc-chip {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default); color: var(--text-body);
}
.npc-chip i { font-style: normal; color: var(--text-hint); margin-right: 2px; }
.npc-chip--elem { border-color: rgba(79,195,247,0.45); color: var(--phoenix-cyan-bright); }
.npc-chip--rw { border-color: rgba(255,178,50,0.45); color: var(--gold-bright); }

/* drops */
.npc-drops { margin-bottom: 26px; }
.npc-drops h2, .npc-where h2 { font-family: var(--font-display); font-size: 22px; color: var(--gold-bright); margin: 0 0 14px; }
.npc-drops__grp { font-family: var(--font-display); font-size: 14px; color: var(--phoenix-cyan-bright); margin: 16px 0 8px; letter-spacing: 0.04em; }
.drop-list { display: flex; flex-direction: column; gap: 4px; }
.drop-row {
  display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 12px;
  padding: 7px 12px; background: var(--bg-surface-2);
  border: 1px solid var(--border-default); border-radius: 8px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.drop-row:hover { background: var(--bg-surface-1); border-color: var(--gold-primary); text-decoration: none; }
.drop-row__icon img, .drop-row__icon .icon-placeholder { width: 34px; height: 34px; border-radius: 5px; }
.drop-row__name { font-size: 13px; line-height: 1.3; }
.drop-row__lr { font-style: normal; font-size: 11px; color: var(--text-hint); }
.drop-row__count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.drop-row__chance {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--gold-bright); min-width: 56px; text-align: right; white-space: nowrap;
}

/* where found */
.npc-where { margin-bottom: 24px; }
.npc-map {
  position: relative; aspect-ratio: 2 / 3;   /* = worldmap aspect → pins exact */
  width: 300px; max-width: 100%; margin: 0 0 16px;
  border: 1px solid var(--border-gold-soft); border-radius: 12px; overflow: hidden;
  background-image:
    url('/wiki/assets/worldmap.jpg?v=1'),
    linear-gradient(160deg, #0d1722, #070b12);
  background-size: cover, cover; background-position: center; background-repeat: no-repeat;
}
.npc-map__pin {
  position: absolute; width: 12px; height: 12px; transform: translate(-50%, -100%);
  border-radius: 50% 50% 50% 0; rotate: -45deg;
  background: radial-gradient(circle at 50% 38%, #fff2cf, var(--gold-bright) 45%, var(--gold-primary));
  border: 1.5px solid #2a1c08;
  box-shadow: 0 0 8px 1px rgba(255,178,50,0.7);
}
.npc-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.npc-zone {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default);
  border-left: 3px solid var(--avalon-green); border-radius: 6px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.npc-zone:hover { border-color: var(--phoenix-cyan); border-left-color: var(--phoenix-cyan); background: var(--bg-surface-1); text-decoration: none; }
.npc-zone strong { font-family: var(--font-display); font-size: 13px; }
.npc-zone span { font-size: 11px; color: #aacb6b; }

/* item page: "dropped by" */
.item-droppedby { margin-top: 28px; }
.item-droppedby h2 { font-family: var(--font-display); font-size: 20px; color: var(--gold-bright); margin: 0 0 12px; }
.dropby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.dropby-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 13px; background: var(--bg-surface-2);
  border: 1px solid var(--border-default); border-radius: 8px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.dropby-row:hover { border-color: var(--gold-primary); background: var(--bg-surface-1); text-decoration: none; }
.dropby-row__name { font-size: 13px; line-height: 1.25; }
.dropby-row__name small { display: block; color: var(--text-hint); font-size: 11px; }
.dropby-row__chance { font-family: var(--font-display); font-weight: 700; font-size: 12px; color: var(--gold-bright); white-space: nowrap; }

/* location inhabitants */
.location-mobs { margin-bottom: 24px; }
.location-mobs h2 { font-family: var(--font-display); font-size: 20px; color: var(--gold-bright); margin: 0 0 12px; }
.locmob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.locmob-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 13px; background: var(--bg-surface-2);
  border: 1px solid var(--border-default); border-radius: 8px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.locmob-row:hover { border-color: var(--phoenix-cyan); background: var(--bg-surface-1); text-decoration: none; }
.locmob-row--boss { border-left: 3px solid var(--red-cta); }
.locmob-row__name { font-size: 13px; line-height: 1.25; }
.locmob-row__lvl { font-family: var(--font-display); font-weight: 700; font-size: 12px; color: #aacb6b; white-space: nowrap; }

@media (max-width: 900px) {
  .npc-page2__body { grid-template-columns: 1fr; }
  .npc-page2__info { position: static; }
}

/* ============================================================
   BESTIARY — /monsters (monsters + raid bosses)
   ============================================================ */
.bestiary-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; }
.bestiary-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default);
  color: var(--text-muted); font-family: var(--font-display); font-size: 14px;
  letter-spacing: 0.03em; text-decoration: none; transition: var(--transition);
}
.bestiary-tab em { font-style: normal; font-size: 11px; font-family: var(--font-body); padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,0.35); color: var(--text-hint); border: 1px solid var(--border-default); }
.bestiary-tab:hover { color: var(--text-primary); border-color: var(--phoenix-cyan); text-decoration: none; }
.bestiary-tab--active { background: linear-gradient(135deg, rgba(79,195,247,0.16), rgba(79,195,247,0.04)); border-color: var(--phoenix-cyan); color: var(--phoenix-cyan-bright); }
.bestiary-tab--boss.bestiary-tab--active { background: linear-gradient(135deg, rgba(201,3,0,0.22), rgba(201,3,0,0.05)); border-color: var(--red-cta); color: #ffd0d0; }
.bestiary-tab--boss .bestiary-tab__x, .bestiary-tab--boss:hover { border-color: rgba(201,3,0,0.55); }

/* monster grid */
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.mon-card {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; min-height: 96px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default);
  border-left: 3px solid var(--border-strong); border-radius: 10px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.mon-card:hover { border-color: var(--phoenix-cyan); border-left-color: var(--phoenix-cyan); background: var(--bg-surface-1); transform: translateY(-2px); text-decoration: none; box-shadow: 0 8px 20px -12px rgba(79,195,247,0.5); }
.mon-card__lvl {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.mon-card__lvl--lo  { background: rgba(110,154,40,0.18); color: #aacb6b; border: 1px solid rgba(110,154,40,0.5); }
.mon-card__lvl--mid { background: rgba(79,195,247,0.16); color: var(--phoenix-cyan-bright); border: 1px solid rgba(79,195,247,0.45); }
.mon-card__lvl--hi  { background: rgba(255,178,50,0.16); color: var(--gold-bright); border: 1px solid rgba(255,178,50,0.5); }
.mon-card__name { font-family: var(--font-display); font-size: 15px; line-height: 1.25; padding-right: 56px; }
.mon-card:hover .mon-card__name { color: var(--gold-bright); }
.mon-card__en { font-size: 11px; color: var(--text-hint); }
.mon-card__meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.mon-card__zone { font-size: 11px; color: var(--phoenix-cyan); margin-top: auto; padding-top: 4px; }

/* premium boss cards */
.boss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.boss-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 22px 22px 18px; overflow: hidden;
  background: linear-gradient(150deg, rgba(201,3,0,0.14), var(--bg-surface-3) 60%);
  border: 1px solid rgba(201,3,0,0.45); border-radius: 14px;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.boss-card--grand { background: linear-gradient(150deg, rgba(168,85,247,0.16), var(--bg-surface-3) 60%); border-color: rgba(168,85,247,0.5); }
.boss-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 88% -10%, rgba(201,3,0,0.25), transparent 55%); }
.boss-card--grand::after { background: radial-gradient(circle at 88% -10%, rgba(168,85,247,0.28), transparent 55%); }
.boss-card:hover { transform: translateY(-3px); border-color: var(--red-cta); box-shadow: 0 16px 36px -16px rgba(201,3,0,0.6); text-decoration: none; }
.boss-card--grand:hover { border-color: #a855f7; box-shadow: 0 16px 36px -16px rgba(168,85,247,0.6); }
.boss-card__crest { position: absolute; top: 14px; right: 18px; font-size: 30px; color: var(--red-cta); filter: drop-shadow(0 0 10px rgba(201,3,0,0.6)); z-index: 1; }
.boss-card--grand .boss-card__crest { color: #c084fc; filter: drop-shadow(0 0 10px rgba(168,85,247,0.6)); }
.boss-card__badge { position: relative; z-index: 1; align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; background: rgba(201,3,0,0.2); color: #ff9e9e; border: 1px solid rgba(201,3,0,0.5); }
.boss-card--grand .boss-card__badge { background: rgba(168,85,247,0.2); color: #d8b4fe; border-color: rgba(168,85,247,0.5); }
.boss-card__name { position: relative; z-index: 1; font-family: var(--font-display); font-size: 21px; line-height: 1.15; color: #ffd6d6; padding-right: 36px; }
.boss-card--grand .boss-card__name { color: #ecd5ff; }
.boss-card:hover .boss-card__name { color: #fff; }
.boss-card__stats { position: relative; z-index: 1; display: flex; gap: 22px; }
.boss-stat { display: flex; flex-direction: column; line-height: 1; }
.boss-stat b { font-family: var(--font-display); font-size: 22px; color: var(--gold-bright); }
.boss-stat i { font-style: normal; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-hint); margin-top: 4px; }
.boss-card__meta { position: relative; z-index: 1; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border-default); padding-top: 10px; margin-top: 2px; }

@media (max-width: 600px) { .boss-grid { grid-template-columns: 1fr; } }

/* search: grouped sections + simple (no-icon) rows */
.search-group {
  font-family: var(--font-display); font-size: 16px; color: var(--gold-bright);
  margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-default);
  letter-spacing: 0.04em;
}
.search-result--simple { grid-template-columns: 1fr !important; }
.search-result--simple .search-result__body { padding-left: 2px; }

/* broken/missing item icon → clean placeholder box (no browser broken-image glyph) */
.ico-fallback--broken {
  display: inline-grid !important; place-items: center;
  background: linear-gradient(135deg, var(--bg-surface-1), var(--bg-surface-3));
  border: 1px solid var(--border-default); border-radius: 6px;
  vertical-align: middle;
}
.ico-fallback--broken::after {
  content: "?"; font-family: var(--font-display); font-size: 0.7em;
  color: var(--text-hint); opacity: 0.6;
}

/* ============================================================
   CATEGORY FILTER BAR v2 (labeled rows + type icons)
   ============================================================ */
.cat-filters {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 20px; margin-bottom: 22px;
  background: var(--panel); border: 1px solid var(--border-gold);
  border-radius: 14px;
}
.cat-filters.filter-bar--sticky { position: sticky; top: 70px; z-index: 20; backdrop-filter: blur(6px); }
.catf-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.catf-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-primary); margin-right: 6px; white-space: nowrap;
}
.catf-help {
  width: 15px; height: 15px; border-radius: 50%; font-style: normal; font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); color: var(--text-hint); cursor: help;
}
/* search */
.catf-search {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px; min-width: 240px;
  background: rgba(4,6,10,0.7); border: 1px solid var(--border-default); border-radius: 999px;
}
.catf-search__ico { color: var(--text-hint); font-size: 15px; }
.catf-search input { flex: 1; height: 100%; border: none; background: transparent; outline: none; color: var(--text-primary); font-family: var(--font-body); font-size: 14px; min-width: 120px; }
.catf-search input::placeholder { color: var(--text-hint); }
.catf-search__clear { color: var(--text-hint); text-decoration: none; font-size: 16px; padding: 0 2px; }
.catf-search__clear:hover { color: var(--red-cta); }
/* pills */
.catf-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--bg-surface-2); border: 1px solid var(--border-default);
  color: var(--text-muted); font-size: 13px; text-decoration: none; white-space: nowrap;
  transition: var(--transition);
}
.catf-pill:hover { border-color: var(--gold-primary); color: var(--text-primary); text-decoration: none; }
.catf-pill.is-active { background: linear-gradient(135deg, rgba(216,155,54,0.22), rgba(216,155,54,0.05)); border-color: var(--gold-primary); color: var(--gold-bright); }
.catf-pill em { font-style: normal; font-size: 11px; color: var(--text-hint); }
.catf-pill.is-active em { color: var(--gold-primary); }
.catf-ico { width: 17px; height: 17px; fill: none; stroke: var(--gold-primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.catf-pill:hover .catf-ico, .catf-pill.is-active .catf-ico { stroke: var(--gold-bright); }
/* real game item icon inside type pill */
.catf-pill--type { padding: 5px 13px 5px 6px; }
.catf-gameico {
  width: 30px; height: 30px; flex-shrink: 0; display: inline-grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.06), transparent 70%), var(--bg-surface-3);
  border: 1px solid var(--border-default); border-radius: 7px;
}
.catf-gameico img { width: 26px; height: 26px; image-rendering: auto; border-radius: 4px; display: block; }
.catf-pill--type.is-active .catf-gameico { border-color: var(--gold-primary); box-shadow: 0 0 8px rgba(216,155,54,0.35); }
.catf-pill__txt { font-family: var(--font-display); letter-spacing: 0.02em; }
.catf-pill--grade .grade-badge, .catf-pill--grade [class*="grade-"] { transform: none; }
/* reset */
.catf-reset {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 7px 4px;
}
.catf-reset:hover { color: var(--gold-bright); text-decoration: none; }
/* view toggle */
.catf-view { margin-left: auto; display: inline-flex; gap: 4px; }
.catf-vbtn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--bg-surface-2); border: 1px solid var(--border-default);
  color: var(--text-muted); text-decoration: none; font-size: 16px; transition: var(--transition);
}
.catf-vbtn:hover { border-color: var(--gold-primary); color: var(--text-primary); text-decoration: none; }
.catf-vbtn.is-active { background: linear-gradient(135deg, rgba(216,155,54,0.22), rgba(216,155,54,0.05)); border-color: var(--gold-primary); color: var(--gold-bright); }
@media (max-width: 700px) { .catf-reset, .catf-view { margin-left: 0; } .catf-search { width: 100%; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .wiki-header__inner { grid-template-columns: 1fr auto; gap: 12px; }
  .wiki-header__search { grid-column: 1 / -1; order: 3; max-width: none; }
  .wiki-header__nav { display: none; }
  .item-page { grid-template-columns: 1fr; }
  .item-page__head { grid-template-columns: 1fr; text-align: center; }
  .item-page__icon { justify-self: center; }
  .item-page__infobox { position: static; }
  h1 { font-size: 32px; }
  h2 { font-size: 22px; }
}
@media (max-width: 600px) {
  .wiki-main { padding: var(--space-6) var(--space-4) var(--space-12); }
  .item-page__icon img, .item-page__icon .icon-placeholder { width: 180px; height: 180px; }
}
