@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&family=Pixelify+Sans:wght@600;700&display=swap');

:root {
  /* Authentic Probably Stolen Tooltip & Terminal Palette */
  --bg-root: #14101b;
  --bg-main: #1c1626;
  --bg-panel: #231c2e;
  --bg-panel-alt: #2a2237;
  --bg-slot: #120e18;
  --bg-hover: #322842;

  --border-outer: #463a59;
  --border-inner: #110d17;
  --border-subtle: #332a42;
  --border-focus: #42a2aa;

  /* Exact text colors from in-game tooltips */
  --text-title: #d5ceb5;      /* Warm cream header */
  --text-main: #cfc9db;       /* Primary body text */
  --text-muted: #8b829e;      /* Secondary muted */
  --text-appraisal: #62ab8f;  /* Mint green appraisal text */
  --text-cyan: #42a2aa;       /* Module & tag cyan [Модули] */
  --text-green: #84ba51;      /* Desired / positive */
  --text-red: #be514c;        /* Undesired / negative */
  --text-amber: #d49b4b;      /* Warning / mixed */

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  --font-pixel: 'Pixelify Sans', 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-root);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Pixel-art rendering */
.pixel-icon {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

/* Top Header & Navigation (PoEDB / Tarkov.dev style) */
.site-header {
  background: var(--bg-main);
  border-bottom: 2px solid var(--border-outer);
  box-shadow: 0 2px 0 var(--border-inner);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo-slot {
  width: 34px;
  height: 34px;
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-slot img {
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  color: var(--text-title);
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Buy & Support Devs Header Block */
.buy-support-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

.buy-support-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.buy-support-links {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  text-decoration: none;
  color: #c7d5e0;
  line-height: 1;
  transition: all 0.15s ease;
}

.buy-btn-steam {
  color: #c7d5e0;
}

.buy-btn-steam svg {
  color: #66c0f4;
  transition: color 0.15s ease;
}

.buy-btn-steam:hover {
  border-color: #66c0f4;
  background: rgba(102, 192, 244, 0.15);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(102, 192, 244, 0.35);
  transform: translateY(-1px);
}

.buy-btn-steam:hover svg {
  color: #ffffff;
}

@media (max-width: 820px) {
  .buy-support-label {
    display: none;
  }
}

/* Language Switcher (Segmented Toggle) */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  padding: 2px;
  gap: 2px;
  user-select: none;
}

.lang-toggle .lang-opt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.36rem 0.7rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  line-height: 1;
  letter-spacing: 0.05em;
}

.lang-toggle .lang-opt:hover {
  color: var(--text-title);
  background: var(--bg-hover);
}

.lang-toggle .lang-opt.active {
  color: #0b0a13;
  background: var(--text-cyan);
  border-color: var(--text-cyan);
  box-shadow: 0 0 8px rgba(110, 231, 221, 0.45);
}

.btn {
  background: var(--bg-panel);
  color: var(--text-title);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  padding: 0.4rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-cyan);
}

.btn-support {
  border-color: var(--text-amber);
  color: var(--text-amber);
}

.btn-support:hover {
  background: rgba(212, 155, 75, 0.14);
  border-color: var(--text-amber);
}

/* Horizontal Tab Bar - Auto-wrapping, no horizontal scroll */
.nav-bar {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  overflow-x: hidden;
  gap: 2px;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.78rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: color 0.1s, background-color 0.1s;
}

.nav-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
}

.nav-btn:hover {
  color: var(--text-title);
  background: rgba(255, 255, 255, 0.03);
}

.nav-btn.active {
  color: var(--text-title);
  background: var(--bg-panel);
  border-bottom-color: var(--text-cyan);
}

.nav-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-cyan);
  background: var(--bg-slot);
  border: 1px solid var(--border-subtle);
  padding: 0.05rem 0.35rem;
}

/* Main Workspace Container */
.workspace {
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  display: block; /* When ad rails are enabled, use: display: grid; grid-template-columns: 200px minmax(0, 1fr) 200px; gap: 1rem; */
  flex: 1;
  align-items: start;
}

.main-col {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

.ad-rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 96px;
  min-width: 0;
  max-width: 100%;
}

.page-section {
  display: none;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.page-section.active {
  display: flex;
}

/* Terminal / Game Window Panels */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.panel-header {
  background: var(--bg-panel-alt);
  border-bottom: 1px solid var(--border-outer);
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-subtitle {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.panel-body {
  padding: 0.85rem;
}

/* Mechanics Reference Box */
.mechanics-notes {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--text-cyan);
  padding: 0.75rem 0.95rem;
  font-size: 0.86rem;
}

.mechanics-notes ul {
  margin-left: 1.2rem;
  margin-top: 0.35rem;
}

.mechanics-notes li {
  margin-bottom: 0.28rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-cyan);
  background: var(--bg-slot);
  padding: 0.06rem 0.28rem;
  border: 1px solid var(--border-subtle);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Tags & Polarity Markers (Game Tooltip Style: [Tag]) */
.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.08rem 0.34rem;
  background: var(--bg-slot);
  border: 1px solid var(--border-subtle);
  display: inline-block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  line-height: 1.3;
}

.tag-cyan {
  color: var(--text-cyan);
  border-color: rgba(66, 162, 170, 0.45);
}

.tag-green {
  color: var(--text-green);
  border-color: rgba(132, 186, 81, 0.45);
}

.tag-blue {
  color: #72a7dc;
  border-color: rgba(114, 167, 220, 0.45);
}

.tag-red {
  color: var(--text-red);
  border-color: rgba(190, 81, 76, 0.45);
}

.tag-amber {
  color: var(--text-amber);
  border-color: rgba(212, 155, 75, 0.45);
}

.tag-appraisal {
  color: var(--text-appraisal);
  border-color: rgba(98, 171, 143, 0.45);
}

a.tag-scav-jump {
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

a.tag-scav-jump:hover {
  border-color: var(--text-green);
  background: rgba(132, 186, 81, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.scav-section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-green);
  background: rgba(132, 186, 81, 0.1);
  border: 1px solid rgba(132, 186, 81, 0.35);
  padding: 0.08rem 0.42rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
  white-space: nowrap;
}

.scav-section-link:hover {
  background: rgba(132, 186, 81, 0.25);
  border-color: var(--text-green);
  color: #fff;
  transform: translateY(-1px);
}

/* Inventory Slot Box */
.slot-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 0 0 1px #09070d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  position: relative;
}

.slot-box img {
  max-width: 36px;
  max-height: 36px;
  width: auto;
  height: auto;
}

.slot-box-sm {
  width: 30px;
  height: 30px;
  min-width: 30px;
  background: var(--bg-slot);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

.slot-box-sm img {
  max-width: 24px;
  max-height: 24px;
}

/* Dense Database Tables (Auto-aligned, ZERO horizontal scroll) */
.db-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-outer);
}

table.db-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.82rem;
}

table.db-table th {
  background: var(--bg-slot);
  color: var(--text-title);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.48rem 0.55rem;
  border-bottom: 1px solid var(--border-outer);
  border-right: 1px solid var(--border-subtle);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
  line-height: 1.25;
}

table.db-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid rgba(51, 42, 66, 0.5);
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.38;
}

table.db-table th:last-child,
table.db-table td:last-child {
  border-right: none;
}

table.db-table tbody tr:nth-child(even) {
  background: rgba(18, 14, 24, 0.35);
}

table.db-table tbody tr:hover {
  background: var(--bg-hover);
}

table.db-table tbody tr.clickable-row {
  cursor: pointer;
}

/* Winemaking Calculator Bench */
.calc-bench {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.75rem;
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  padding: 0.85rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.calc-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-cyan);
  text-transform: uppercase;
}

.calc-field select,
.calc-field input {
  background: var(--bg-panel);
  color: var(--text-title);
  border: 1px solid var(--border-outer);
  padding: 0.4rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  outline: none;
}

.calc-field select:focus,
.calc-field input:focus {
  border-color: var(--text-cyan);
}

.calc-readout {
  grid-column: 1 / -1;
  background: var(--bg-panel);
  border: 1px solid var(--border-outer);
  border-left: 3px solid var(--text-appraisal);
  padding: 0.7rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Filter Bar & View Switcher */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border-outer);
  padding: 0.5rem 0.65rem;
}

.cat-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.cat-btn {
  background: var(--bg-slot);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.52rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
}

.cat-btn:hover {
  color: var(--text-title);
  border-color: var(--border-outer);
}

.cat-btn.active {
  background: var(--bg-panel-alt);
  color: var(--text-cyan);
  border-color: var(--text-cyan);
  font-weight: 700;
}

/* GameWikiStation Expandable Item Catalog & Advanced Filter */
.item-filter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  background: var(--bg-main);
  border: 1px solid var(--border-outer);
  padding: 0.85rem;
}

.item-filter-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.catalog-search-input {
  width: 100%;
  background: var(--bg-slot);
  color: var(--text-title);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  outline: none;
}

.catalog-search-input:focus {
  border-color: var(--text-cyan);
}

.catalog-count-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-cyan);
  margin: 0;
}

.item-advanced {
  font-size: 0.82rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.65rem;
}

.item-advanced-summary {
  cursor: pointer;
  color: var(--text-title);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  user-select: none;
}

.item-advanced-summary span {
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-weight: 400;
  font-family: var(--font-sans);
}

.item-advanced-fields {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto;
  align-items: end;
  gap: 0.75rem 0.9rem;
  margin-top: 0.75rem;
}

@media (max-width: 650px) {
  .item-advanced-fields {
    grid-template-columns: 1fr;
  }
}

.adv-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  min-width: 0;
}

.adv-field select,
.adv-field input {
  width: 100%;
  min-width: 0;
  height: 2.2rem;
  background: var(--bg-slot);
  color: var(--text-title);
  border: 1px solid var(--border-outer);
  padding: 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  outline: none;
}

.adv-field select:focus,
.adv-field input:focus {
  border-color: var(--text-cyan);
}

.adv-reset-btn {
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.catalog-empty {
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-amber);
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
}

/* Category Quick Navigation Grid & Controls */
.cat-quicknav-wrap {
  margin: 1rem 0 1.35rem 0;
  padding: 0.85rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-outer);
}

.cat-quicknav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-subtle);
}

.cat-quicknav-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-cyan);
  text-transform: uppercase;
}

.cat-quicknav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cat-action-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.cat-action-btn:hover {
  color: var(--text-cyan);
  border-color: var(--text-cyan);
  background: var(--bg-hover);
}

.cat-quicknav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.45rem;
}

.cat-quicknav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  min-width: 0;
}

.cat-quicknav-btn:hover {
  border-color: var(--text-cyan);
  background: var(--bg-hover);
  color: var(--text-title);
}

.cat-quicknav-btn.is-open {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-title);
}

.cat-quicknav-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.cat-quicknav-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-quicknav-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.cat-quicknav-btn.is-open .cat-quicknav-count {
  color: var(--text-cyan);
}

/* Category Section & Expandable Card Grid */
.item-group {
  margin-bottom: 1.75rem;
  scroll-margin-top: 6rem;
  transition: box-shadow 0.3s ease;
}

.item-group:last-child {
  margin-bottom: 0;
}

.item-group.is-collapsed {
  margin-bottom: 0.5rem;
}

.item-group-header {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.8rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-outer);
  border-left: 3px solid var(--text-cyan);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: background-color 0.12s, border-color 0.12s;
}

.item-group.is-collapsed .item-group-header {
  margin-bottom: 0;
  border-left-color: var(--text-muted);
  background: var(--bg-panel);
}

.item-group-header:hover {
  background: var(--bg-hover);
  border-color: var(--text-cyan);
  border-left-color: var(--text-cyan);
}

.group-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.group-toggle-icon {
  font-size: 0.72rem;
  color: var(--text-cyan);
  transition: transform 0.15s ease;
  display: inline-block;
  line-height: 1;
  flex-shrink: 0;
}

.item-group.is-collapsed .group-toggle-icon {
  transform: rotate(-90deg);
  color: var(--text-muted);
}

.group-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.group-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.group-toggle-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-slot);
  transition: color 0.12s, border-color 0.12s;
}

.item-group-header:hover .group-toggle-badge {
  color: var(--text-cyan);
  border-color: var(--text-cyan);
}

.item-group.is-collapsed .item-group-body {
  display: none;
}

/* Flash pulse animation when jumped to from QuickNav */
@keyframes groupFlashPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  }
  50% {
    box-shadow: 0 0 15px 4px rgba(56, 189, 248, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}

.group-flash-highlight {
  animation: groupFlashPulse 1.4s ease-out;
}

.group-flash-highlight .item-group-header {
  border-color: var(--text-cyan);
  border-left-color: var(--text-cyan);
  background: var(--bg-hover);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item-grid > li {
  scroll-margin-top: 7.5rem;
  min-width: 0;
}

.item-grid > li > a.item-card-link {
  border: 1px solid var(--border-outer);
  background: var(--bg-slot);
  color: var(--text-title);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  height: 100%;
  min-height: 10.6rem;
  padding: 0.8rem 0.6rem;
  text-decoration: none;
  transition: border-color 0.12s, background-color 0.12s;
}

.item-grid > li > a.item-card-link:hover {
  border-color: var(--text-cyan);
  background: var(--bg-hover);
}

.item-grid .shot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 5.4rem;
}

.item-grid .shot img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

.item-grid .noicon {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.item-grid h3.label {
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-title);
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
  margin: 0;
}

.item-grid h3.label .label-paren {
  display: block;
  margin-top: 0.12rem;
}

.item-grid .sub-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.item-grid small.price {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-align: center;
  color: var(--text-appraisal);
  margin-top: auto;
}

.item-grid .item-facts {
  display: none;
}

/* Expanded Full-Row State (li.open) */
.item-grid > li.open {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 11.2rem minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem 1.4rem;
  padding: 1rem;
  background: var(--bg-main);
  border: 1px solid var(--text-cyan);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.item-grid > li.open > a.item-card-link {
  border-color: var(--border-subtle);
  background: var(--bg-slot);
  height: auto;
}

.item-grid > li.open .item-facts {
  display: block;
  font-size: 0.84rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.item-grid .item-facts > p {
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.55rem;
  color: var(--text-cyan);
  line-height: 1.45;
}

.item-grid .item-facts > p.flavor-line {
  color: var(--text-muted);
  font-style: italic;
}

.item-grid .item-facts dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.45rem 1.15rem;
  margin: 0.5rem 0 0;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.55rem;
}

.item-grid .item-facts dt {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-title);
  text-transform: uppercase;
  padding-top: 0.08rem;
}

.item-grid .item-facts dd {
  margin: 0;
  min-width: 0;
  color: var(--text-main);
}

.item-grid .item-facts ul {
  margin: 0;
  padding-inline-start: 1.15rem;
}

.item-grid .item-facts li {
  margin-bottom: 0.24rem;
  line-height: 1.4;
}

/* Item Spoilers for "Where to get it" & "Where used" */
.item-spoiler {
  margin: 0;
  display: block;
}

.item-spoiler-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-amber);
  background: rgba(212, 155, 75, 0.08);
  border: 1px solid rgba(212, 155, 75, 0.38);
  border-radius: 2px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: all 0.15s ease;
}

.item-spoiler-toggle::-webkit-details-marker {
  display: none;
}

.item-spoiler-toggle::before {
  content: "▶";
  font-size: 0.58rem;
  transition: transform 0.15s ease;
  display: inline-block;
}

.item-spoiler[open] > .item-spoiler-toggle::before {
  transform: rotate(90deg);
}

.item-spoiler-toggle:hover {
  background: rgba(212, 155, 75, 0.2);
  border-color: var(--text-amber);
  color: #ffe6b0;
}

.item-spoiler[open] > .item-spoiler-toggle {
  margin-bottom: 0.45rem;
  border-color: rgba(212, 155, 75, 0.65);
  background: rgba(212, 155, 75, 0.15);
}

.item-spoiler > ul {
  margin: 0.35rem 0 0;
  padding-inline-start: 1.15rem;
}

.item-grid .item-facts ul.related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  padding: 0;
  list-style: none;
}

.item-grid .item-facts ul.related a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.24rem 0.58rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-outer);
  color: var(--text-title);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-decoration: none;
}

.item-grid .item-facts ul.related a:hover {
  border-color: var(--text-cyan);
  color: var(--text-cyan);
  background: var(--bg-hover);
}

.item-grid .item-facts ul.related img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .item-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

@media (max-width: 640px) {
  .item-grid > li.open {
    grid-template-columns: 1fr;
  }
}

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

/* Authentic In-Game Item Tooltip Inspector (Right Column) */
.game-tooltip-box {
  background: #221b2e;
  border: 2px solid #483b5c;
  box-shadow: inset 0 0 0 1px #120d19, 0 6px 18px rgba(0, 0, 0, 0.65);
  padding: 0.85rem 0.9rem;
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: calc(100vh - 155px);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  border-bottom: 1px solid #352b47;
  padding-bottom: 0.5rem;
}

.tt-title {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.25;
}

.tt-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.tt-tags {
  color: var(--text-cyan);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.tt-appraisal {
  color: var(--text-appraisal);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.4;
}

.tt-effect {
  color: var(--text-cyan);
  font-size: 0.85rem;
  line-height: 1.42;
}

.tt-flavor {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  border-top: 1px solid #352b47;
  padding-top: 0.45rem;
  margin-top: 0.2rem;
}

.tt-section {
  border-top: 1px solid #352b47;
  padding-top: 0.55rem;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tt-section-title {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tt-entry-list {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.tt-entry-row {
  background: var(--bg-slot);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.38;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.tt-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.item-link-chip {
  background: var(--bg-panel-alt);
  color: var(--text-title);
  border: 1px solid var(--border-outer);
  padding: 0.12rem 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  vertical-align: middle;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.item-link-chip:hover {
  border-color: var(--text-cyan);
  color: var(--text-cyan);
  background: var(--bg-hover);
}

.item-link-chip img {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.source-select {
  background: var(--bg-slot);
  color: var(--text-title);
  border: 1px solid var(--border-outer);
  padding: 0.3rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  outline: none;
  max-width: 100%;
}

.source-select:focus {
  border-color: var(--text-cyan);
}

/* Sponsored / Ad Unit Box */
.ad-panel {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem;
  text-align: center;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ad-panel.ad-panel-sm {
  min-height: 220px;
}

.ad-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-placeholder-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Footer with Legal Disclaimer */
.site-footer {
  background: var(--bg-main);
  border-top: 1px solid var(--border-outer);
  margin-top: 2rem;
  padding: 1rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 14, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--bg-panel);
  border: 2px solid var(--border-outer);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  max-width: 480px;
  width: 100%;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.code-copy {
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
  padding: 0.45rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-cyan);
  word-break: break-all;
}

/* Inline Item Reference & Floating In-Game Simplified Item Tooltip */
a.inline-item-ref {
  color: var(--text-cyan);
  text-decoration: none;
  border-bottom: 1px dashed rgba(94, 196, 200, 0.55);
  padding: 0 0.1rem;
  border-radius: 2px;
  transition: color 0.12s, background-color 0.12s, border-color 0.12s;
  cursor: pointer;
}

a.inline-item-ref:hover {
  color: var(--text-title);
  background: rgba(94, 196, 200, 0.14);
  border-bottom-color: var(--text-cyan);
}

.game-hover-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: none;
  width: max-content;
  max-width: 340px;
  background: #231d2e;
  border: 2px solid #8a4b46;
  box-shadow: inset 0 0 0 1px #140f1c, 0 10px 26px rgba(0, 0, 0, 0.78);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-sans);
  color: #dcd8e4;
  line-height: 1.38;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.game-hover-tooltip.visible {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.game-hover-tooltip .ght-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.game-hover-tooltip .ght-main {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.game-hover-tooltip .ght-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #e8e2d5;
  line-height: 1.22;
}

.game-hover-tooltip .ght-tags {
  font-size: 0.9rem;
  color: #52b8bd;
  line-height: 1.25;
}

.game-hover-tooltip .ght-tags .ght-tag-contraband {
  color: #c07d7d !important;
}

.item-tags-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0;
  padding: 0;
}

.item-tag-btn {
  display: inline-flex;
  align-items: center;
  background: var(--bg-slot);
  color: #52b8bd;
  border: 1px solid rgba(82, 184, 189, 0.35);
  border-radius: 2px;
  padding: 0.18rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.25;
  user-select: none;
}

.item-tag-btn:hover {
  background: rgba(82, 184, 189, 0.18);
  border-color: #52b8bd;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(82, 184, 189, 0.3);
  transform: translateY(-1px);
}

.item-tag-btn:active {
  transform: translateY(0);
}

.item-tag-btn.type-contraband {
  color: #c07d7d;
  border-color: rgba(192, 125, 125, 0.45);
  background: rgba(192, 125, 125, 0.1);
}

.item-tag-btn.type-contraband:hover {
  background: rgba(192, 125, 125, 0.25);
  border-color: #e08c8c;
  color: #ffdede;
  box-shadow: 0 0 8px rgba(192, 125, 125, 0.35);
}

.item-tag-btn.item-tag-cat {
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.item-tag-btn.item-tag-cat:hover {
  color: var(--text-title);
  border-color: var(--text-title);
  background: rgba(255, 255, 255, 0.06);
}

@keyframes filterHighlightAnim {
  0% { box-shadow: 0 0 0 0 rgba(82, 184, 189, 0.8); border-color: #52b8bd; }
  50% { box-shadow: 0 0 12px 2px rgba(82, 184, 189, 0.6); border-color: #52b8bd; }
  100% { box-shadow: 0 0 0 0 rgba(82, 184, 189, 0); }
}

.filter-highlight {
  animation: filterHighlightAnim 1.2s ease;
}

.game-hover-tooltip .ght-price {
  font-size: 0.9rem;
  color: #46b888;
  line-height: 1.28;
  margin-top: 0.08rem;
}

.game-hover-tooltip .ght-icon {
  width: 52px;
  height: 52px;
  background: #171220;
  border: 1px solid #3c314f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}

.game-hover-tooltip .ght-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.game-hover-tooltip .ght-desc {
  font-size: 0.9rem;
  color: #dad6e2;
  line-height: 1.36;
  margin-top: 0.1rem;
}

.game-hover-tooltip .ght-flavor {
  font-size: 0.86rem;
  font-style: italic;
  color: #938da0;
  line-height: 1.35;
  margin-top: 0.15rem;
}

/* Ad Rail Responsive Rules (Disabled while ad rails are commented out)
@media (max-width: 1320px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 200px;
  }
  .ad-rail-left {
    display: none;
  }
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .ad-rail {
    position: static;
  }
  .ad-panel {
    min-height: 160px;
  }
}
*/

/* About Section */
#sec-about .panel-body {
  padding: 1.5rem;
}

.about-container {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-main);
  min-height: 280px;
}

/* Spoiler & Progression Disclaimer Alert Block */
.spoiler-disclaimer {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-left: 4px solid #ef4444;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.spoiler-disclaimer.is-collapsed {
  padding: 0.65rem 1.1rem;
  margin-bottom: 1.2rem;
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.25);
}

.disclaimer-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding: 0 0 0.55rem 0;
  border: none;
  background: transparent;
  border-bottom: 1px solid rgba(239, 68, 68, 0.22);
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: border-color 0.15s ease;
}

.spoiler-disclaimer.is-collapsed .disclaimer-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.disclaimer-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: #f87171;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-transform: uppercase;
}

.disclaimer-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.disclaimer-toggle-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: #fca5a5;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.disclaimer-header:hover .disclaimer-toggle-badge {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.spoiler-disclaimer.is-collapsed .disclaimer-body {
  display: none;
}

.disclaimer-body p {
  margin: 0 0 0.6rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.disclaimer-body p:last-child {
  margin-bottom: 0;
}

/* About Section - Hero Header Image */
.about-hero-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0 1.75rem 0;
  padding: 0 0.5rem;
}

.about-hero-img {
  max-width: 100%;
  width: 640px;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border-outer);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(66, 162, 170, 0.18);
  display: block;
}

/* About Section - Content Cards */
.about-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.about-card.is-collapsible.is-collapsed .about-card-body {
  display: none;
}

button.about-card-header.about-card-toggle {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-main);
  text-align: left;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

button.about-card-header.about-card-toggle:hover {
  background: rgba(66, 162, 170, 0.08);
}

.about-card.is-collapsible.is-collapsed button.about-card-header.about-card-toggle {
  border-bottom: none;
}

.about-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.about-card-chevron {
  font-size: 0.76rem;
  color: var(--text-cyan);
  transition: transform 0.15s ease;
  user-select: none;
  display: inline-block;
  line-height: 1;
}

.about-card-toggle-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-cyan);
  background: rgba(66, 162, 170, 0.1);
  border: 1px solid rgba(66, 162, 170, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  transition: all 0.15s ease;
  margin-left: auto;
}

button.about-card-header.about-card-toggle:hover .about-card-toggle-badge {
  background: rgba(66, 162, 170, 0.22);
  border-color: var(--text-cyan);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(66, 162, 170, 0.35);
}

.about-card-header {
  padding: 0.85rem 1.25rem;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.about-card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-cyan);
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(66, 162, 170, 0.12);
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(66, 162, 170, 0.35);
  border-radius: 2px;
}

.about-card-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: 0.04em;
}

.about-card-body {
  padding: 1.25rem 1.5rem;
}

.about-game-desc {
  font-size: 0.96rem;
  line-height: 1.7;
  color: #d1d5db;
  margin: 0 0 1.25rem 0;
  max-width: 100%;
  text-align: justify;
  text-justify: inter-word;
}

/* About Metadata Grid */
.about-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-subtle);
}

.about-meta-item {
  background: var(--bg-slot);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.about-meta-item:hover {
  border-color: rgba(66, 162, 170, 0.4);
  background: rgba(66, 162, 170, 0.04);
}

.about-meta-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.about-meta-val {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-cyan);
  font-weight: 700;
}

.about-meta-link {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.about-meta-link:hover {
  color: #5ce1e6;
  text-decoration: underline;
}

.about-meta-arrow {
  font-size: 0.82rem;
  transition: transform 0.15s ease;
}

.about-meta-link:hover .about-meta-arrow {
  transform: translate(1px, -1px);
}

/* Community & Official Transmission Links Grid */
.about-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}

.about-link-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-slot);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.about-link-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border-subtle);
  transition: background 0.18s ease;
}

.about-link-tile:hover {
  background: rgba(66, 162, 170, 0.09);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.about-link-tile:hover::before {
  background: var(--text-cyan);
}

.about-link-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  border: 1px solid var(--border-outer);
  font-size: 1.25rem;
  color: var(--text-cyan);
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.about-link-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 0.15rem;
}

.about-link-name {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: 0.02em;
}

.about-link-sub {
  font-size: 0.77rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-link-arrow {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.about-link-tile:hover .about-link-arrow {
  color: var(--text-cyan);
  transform: translate(2px, -2px);
}

.about-link-tile.discord-tile:hover {
  border-color: #5865f2;
}
.about-link-tile.discord-tile:hover::before {
  background: #5865f2;
}
.about-link-tile.discord-tile:hover .about-link-icon-wrap {
  color: #5865f2;
  border-color: #5865f2;
}

.about-link-tile.steam-tile:hover {
  border-color: #66c0f4;
}
.about-link-tile.steam-tile:hover::before {
  background: #66c0f4;
}
.about-link-tile.steam-tile:hover .about-link-icon-wrap {
  color: #66c0f4;
  border-color: #66c0f4;
}

.about-link-tile.twitter-tile:hover {
  border-color: #e2e8f0;
}
.about-link-tile.twitter-tile:hover::before {
  background: #ffffff;
}
.about-link-tile.twitter-tile:hover .about-link-icon-wrap {
  color: #ffffff;
  border-color: #e2e8f0;
}

.about-link-tile.reddit-tile:hover {
  border-color: #ff4500;
}
.about-link-tile.reddit-tile:hover::before {
  background: #ff4500;
}
.about-link-tile.reddit-tile:hover .about-link-icon-wrap {
  color: #ff4500;
  border-color: #ff4500;
}

.about-link-tile.steamdb-tile:hover {
  border-color: var(--text-cyan);
}
.about-link-tile.steamdb-tile:hover::before {
  background: var(--text-cyan);
}
.about-link-tile.steamdb-tile:hover .about-link-icon-wrap {
  color: var(--text-cyan);
  border-color: var(--text-cyan);
}

.about-link-badge-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ff2442;
}

.about-link-tile.instagram-tile:hover {
  border-color: #e1306c;
}
.about-link-tile.instagram-tile:hover::before {
  background: #e1306c;
}
.about-link-tile.instagram-tile:hover .about-link-icon-wrap {
  color: #e1306c;
  border-color: #e1306c;
}

.about-link-tile.tiktok-tile:hover {
  border-color: #00f2fe;
}
.about-link-tile.tiktok-tile:hover::before {
  background: #00f2fe;
}
.about-link-tile.tiktok-tile:hover .about-link-icon-wrap {
  color: #00f2fe;
  border-color: #00f2fe;
}

.about-link-tile.bilibili-tile:hover {
  border-color: #23ade5;
}
.about-link-tile.bilibili-tile:hover::before {
  background: #23ade5;
}
.about-link-tile.bilibili-tile:hover .about-link-icon-wrap {
  color: #23ade5;
  border-color: #23ade5;
}

.about-link-tile.douyin-tile:hover {
  border-color: #fe2c55;
}
.about-link-tile.douyin-tile:hover::before {
  background: #fe2c55;
}
.about-link-tile.douyin-tile:hover .about-link-icon-wrap {
  color: #fe2c55;
  border-color: #fe2c55;
}

.about-link-tile.red-tile:hover {
  border-color: #ff2442;
}
.about-link-tile.red-tile:hover::before {
  background: #ff2442;
}
.about-link-tile.red-tile:hover .about-link-icon-wrap {
  border-color: #ff2442;
}

.about-link-tile.steam-hub-tile:hover {
  border-color: #89c9e8;
}
.about-link-tile.steam-hub-tile:hover::before {
  background: #89c9e8;
}
.about-link-tile.steam-hub-tile:hover .about-link-icon-wrap {
  color: #89c9e8;
  border-color: #89c9e8;
}

/* Scavenging / Dumping Ground Dedicated Section */
#sec-loot .panel-body {
  padding: 1.25rem 1.5rem;
}

.scav-guide-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--text-cyan);
  font-size: 0.96rem;
  line-height: 2;
  color: var(--text-main);
}

.scav-guide-card .slot-box {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-slot);
  border: 1px solid var(--border-outer);
}

.scav-guide-card .slot-box img {
  width: 52px;
  height: 52px;
}

.scav-guide-card .scav-section-title {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: 0.5px;
  margin-bottom: 0.85rem;
}

.scav-guide-card .scav-block {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.scav-guide-card .scav-block:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.scav-guide-card .scav-block > strong {
  font-size: 1.02rem;
  color: var(--text-title);
  font-family: var(--font-mono);
}

.scav-guide-card .scav-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.scav-guide-card .scav-list li {
  font-size: 0.95rem;
  line-height: 2;
  margin-bottom: 0;
}

.scav-guide-card .item-link-chip {
  font-size: 0.9rem;
  padding: 0.18rem 0.5rem;
  gap: 0.45rem;
  margin: 0.15rem 0.2rem;
  vertical-align: middle;
}

.scav-guide-card .item-link-chip img {
  width: 24px;
  height: 24px;
}

.scav-guide-card code {
  font-size: 0.84rem;
  padding: 0.08rem 0.35rem;
}

/* Event Link Chip (Hover Tooltip for Afterhours Events) */
.event-link-chip {
  background: var(--bg-panel-alt);
  color: var(--text-amber);
  border: 1px solid rgba(212, 163, 89, 0.55);
  padding: 0.16rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  vertical-align: middle;
  margin: 0.12rem 0.2rem;
  transition: all 0.15s ease-in-out;
}

.event-link-chip:hover {
  background: var(--bg-hover);
  border-color: #ffd166;
  color: #ffd166;
  box-shadow: 0 0 8px rgba(212, 163, 89, 0.4);
}

.event-link-chip img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 650px) {
  .cat-quicknav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cat-quicknav-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .cat-quicknav-grid {
    grid-template-columns: 1fr;
  }
}
