/* BDO Fish Map — fish wiki static pages.
 * Hand-written subset of the map SPA design tokens (tailwind.config.js +
 * index.css). No map runtime, no Pixi — document pages only. */

/* Inter variable (self-hosted) — same subsets as the SPA's index.css. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #f0f6fc;
  --muted: #8b949e;
  --blue: #1f6feb;
  --red: #f85149;
  --yellow: #d29922;
  --green: #2ea043;
  --slate: #8b949e;
  /* Text-on-dark variants: --blue/--green are too dark for AA contrast on
     --bg; these match the map-grade hues at readable lightness. */
  --blue-text: #58a6ff;
  --green-text: #3fb950;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue-text);
  outline-offset: 2px;
  border-radius: 4px;
}

@keyframes w-menu-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  a, button, summary, .w-card, .w-rel-card, .w-chip, .w-btn, .w-btn-xs,
  .w-nav > a, .w-lang-summary, .w-lang-item, .w-lang-chevron, .w-search-result-item {
    transition: background-color 0.15s ease, border-color 0.15s ease,
      color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  }
  .w-lang[open] .w-lang-menu,
  .w-header-search-dropdown:not([hidden]) {
    animation: w-menu-pop 0.16s ease-out;
  }
}

.w-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

/* ── Header (glass, same spirit as the map chrome) ─────────────────────── */
.w-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 27, 34, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(48, 54, 61, 0.7);
}
.w-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.w-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.w-logo img { height: 32px; width: auto; display: block; }

/* ── Header Search Bar & Dropdown ─────────────────────────────────────── */
.w-header-search-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.w-header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.w-header-search-icon {
  position: absolute;
  left: 11px;
  color: var(--muted);
  pointer-events: none;
  z-index: 2;
  width: 15px;
  height: 15px;
}
.w-header-search-input {
  width: 100%;
  height: 36px;
  padding: 6px 30px 6px 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.75);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.w-header-search-input:focus {
  border-color: var(--blue-text);
  background: rgba(13, 17, 23, 0.95);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.25);
}
.w-header-search-input::placeholder {
  color: var(--muted);
}
.w-header-search-clear {
  position: absolute;
  right: 4px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
}
.w-header-search-clear:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.w-header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow-y: auto;
  background: rgba(22, 27, 34, 0.98);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.8);
  padding: 6px;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.w-header-search-dropdown[hidden] {
  display: none !important;
}
.w-header-search-dropdown::-webkit-scrollbar { width: 6px; }
.w-header-search-dropdown::-webkit-scrollbar-track { background: transparent; }
.w-header-search-dropdown::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 3px; }
.w-header-search-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.5); }

.w-search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.w-search-result-item:hover,
.w-search-result-item.is-active {
  background: rgba(31, 111, 235, 0.1);
  border-color: rgba(31, 111, 235, 0.25);
  text-decoration: none;
}
/* Keyboard-selected row hints that Enter opens it. */
.w-search-result-item.is-active::after {
  content: '↵';
  flex-shrink: 0;
  font-size: 11px;
  color: var(--blue-text);
  opacity: 0.85;
}
.w-search-result-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid var(--border);
}
.w-search-result-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
/* Grade-tinted tiles (override the global .grade-* glow used on hero icons). */
.w-search-result-icon.grade-prize { border-color: rgba(248, 81, 73, 0.45); background: rgba(248, 81, 73, 0.08); box-shadow: none; }
.w-search-result-icon.grade-rare { border-color: rgba(210, 153, 34, 0.45); background: rgba(210, 153, 34, 0.08); box-shadow: none; }
.w-search-result-icon.grade-large { border-color: rgba(31, 111, 235, 0.5); background: rgba(31, 111, 235, 0.09); box-shadow: none; }
.w-search-result-icon.grade-common { border-color: rgba(46, 160, 67, 0.5); background: rgba(46, 160, 67, 0.08); box-shadow: none; }
.w-search-result-icon.grade-trash { border-color: rgba(139, 148, 158, 0.4); background: rgba(139, 148, 158, 0.06); box-shadow: none; }
.w-search-result-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.w-search-result-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w-search-result-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w-search-result-grade {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid;
  line-height: 1.2;
}
.w-search-result-grade.grade-prize { color: var(--red); border-color: rgba(248, 81, 73, 0.35); background: rgba(248, 81, 73, 0.1); box-shadow: none; }
.w-search-result-grade.grade-rare { color: var(--yellow); border-color: rgba(210, 153, 34, 0.35); background: rgba(210, 153, 34, 0.1); box-shadow: none; }
.w-search-result-grade.grade-large { color: var(--blue-text); border-color: rgba(31, 111, 235, 0.4); background: rgba(31, 111, 235, 0.1); box-shadow: none; }
.w-search-result-grade.grade-common { color: var(--green-text); border-color: rgba(46, 160, 67, 0.4); background: rgba(46, 160, 67, 0.1); box-shadow: none; }
.w-search-result-grade.grade-trash { color: var(--slate); border-color: rgba(139, 148, 158, 0.35); background: rgba(139, 148, 158, 0.08); box-shadow: none; }
.w-search-no-results {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  color: var(--muted);
  font-size: 12.5px;
}
.w-search-no-results svg { flex-shrink: 0; opacity: 0.7; }

@media (max-width: 640px) {
  .w-header-inner {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px 10px;
  }
  .w-logo img {
    height: 26px;
  }
  .w-header-search-wrap {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
    margin-top: 2px;
  }
  .w-header-search-input {
    height: 40px;
    font-size: 15px;
    padding: 8px 34px 8px 36px;
    border-radius: 9px;
  }
  .w-header-search-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }
  .w-header-search-clear {
    width: 32px;
    height: 32px;
    right: 4px;
  }
  .w-header-search-dropdown {
    max-height: 340px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.85);
  }
  .w-search-result-item {
    padding: 8px 10px;
  }
}

.w-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
/* Direct children only — the language dropdown lives inside .w-nav too, and
   its rows must NOT inherit the nav-pill inline-flex layout. */
.w-nav > a, .w-lang-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.6);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.w-nav > a:hover, .w-lang-summary:hover { background: #1c2128; color: var(--text); text-decoration: none; }
.w-nav > a.w-nav-active { color: var(--blue-text); border-color: rgba(31, 111, 235, 0.5); background: rgba(31, 111, 235, 0.12); }

.w-lang { position: relative; }
.w-lang-summary { list-style: none; }
.w-lang-summary::-webkit-details-marker { display: none; }
.w-lang-flag {
  width: 20px;
  height: 15px;
  border-radius: 2.5px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.w-lang-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.w-lang-chevron { color: var(--muted); flex-shrink: 0; }
.w-lang[open] .w-lang-chevron { transform: rotate(180deg); }
/* Open state: the button reads as an active toggle. */
.w-lang[open] .w-lang-summary {
  color: var(--text);
  border-color: rgba(31, 111, 235, 0.5);
  background: rgba(31, 111, 235, 0.08);
}
.w-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 232px;
  max-height: min(430px, calc(100vh - 120px));
  overflow-y: auto;
  background: rgba(22, 27, 34, 0.98);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.8);
  padding: 5px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
/* Clean single-column list: one language per row, no per-row borders. */
.w-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
}
.w-lang-item:hover {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text);
  text-decoration: none;
}
.w-lang-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.w-lang-check { color: var(--blue-text); flex-shrink: 0; }
.w-lang-item.w-lang-current {
  color: var(--blue-text);
  font-weight: 600;
  background: rgba(31, 111, 235, 0.1);
}
/* Match the map SPA's slim scrollbar inside the language menu */
.w-lang-menu::-webkit-scrollbar { width: 6px; }
.w-lang-menu::-webkit-scrollbar-track { background: transparent; }
.w-lang-menu::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 3px; }
.w-lang-menu::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.5); }

/* ── Panels & breadcrumb ───────────────────────────────────────────────── */
.w-panel {
  background: rgba(22, 27, 34, 0.75);
  border: 1px solid rgba(48, 54, 61, 0.7);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  padding: 20px;
}

.w-breadcrumb {
  padding: 18px 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.w-breadcrumb a { color: var(--muted); }
.w-breadcrumb a:hover { color: var(--text); }
.w-breadcrumb .w-sep { margin: 0 8px; opacity: 0.5; }
.w-breadcrumb [aria-current] { color: #cbd5e1; }
/* ── Fish hero ─────────────────────────────────────────────────────────── */
.w-hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: stretch;
}
.w-hero { display: flex; gap: 18px; align-items: center; }
.w-hero-icon {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(13, 17, 23, 0.7);
}
.w-hero-icon img { width: 44px; height: 44px; }
.grade-prize { border: 1px solid rgba(248, 81, 73, 0.45); box-shadow: 0 0 18px rgba(248, 81, 73, 0.15); }
.grade-rare { border: 1px solid rgba(210, 153, 34, 0.45); box-shadow: 0 0 18px rgba(210, 153, 34, 0.15); }
.grade-large { border: 1px solid rgba(31, 111, 235, 0.45); box-shadow: 0 0 18px rgba(31, 111, 235, 0.15); }
.grade-common { border: 1px solid rgba(46, 160, 67, 0.45); box-shadow: 0 0 18px rgba(46, 160, 67, 0.15); }
.grade-trash { border: 1px solid rgba(139, 148, 158, 0.35); }

h1.w-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
.w-alt-name { margin: 0 0 10px; font-size: 13px; color: var(--muted); }

.w-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.w-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
}
.w-badge-prize { background: rgba(248, 81, 73, 0.12); border: 1px solid rgba(248, 81, 73, 0.3); color: var(--red); }
.w-badge-rare { background: rgba(210, 153, 34, 0.12); border: 1px solid rgba(210, 153, 34, 0.3); color: var(--yellow); }
.w-badge-large { background: rgba(31, 111, 235, 0.12); border: 1px solid rgba(31, 111, 235, 0.3); color: var(--blue-text); }
.w-badge-common { background: rgba(46, 160, 67, 0.12); border: 1px solid rgba(46, 160, 67, 0.3); color: var(--green-text); }
.w-badge-trash { background: rgba(139, 148, 158, 0.12); border: 1px solid rgba(139, 148, 158, 0.3); color: var(--slate); }

/* ── Summary card / price / CTA ────────────────────────────────────────── */
.w-summary { display: flex; flex-direction: column; gap: 14px; }
.w-price-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.w-price-big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.w-price-big .w-price-suffix { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.w-price-note { font-size: 11px; color: var(--muted); margin-top: 2px; }

.w-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13px; }
.w-facts dt { color: var(--muted); }
.w-facts dd { margin: 0; color: var(--text); overflow-wrap: break-word; }

.w-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  cursor: pointer;
}
.w-btn:hover { text-decoration: none; }
/* All wiki CTAs open the map in a new tab — signal that affordance. */
.w-btn[target="_blank"]::after {
  content: '↗';
  font-size: 11px;
  line-height: 1;
  opacity: 0.75;
}
.w-btn-primary {
  background: var(--blue);
  border-color: rgba(31, 111, 235, 0.6);
  color: #fff;
  box-shadow: 0 4px 18px rgba(31, 111, 235, 0.35);
}
.w-btn-primary:hover { background: #2b7ef0; color: #fff; box-shadow: 0 6px 22px rgba(31, 111, 235, 0.45); }
.w-btn-ghost {
  background: rgba(31, 111, 235, 0.08);
  border-color: rgba(31, 111, 235, 0.3);
  color: var(--blue-text);
}
.w-btn-ghost:hover { background: rgba(31, 111, 235, 0.16); }

.w-btn-xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(31, 111, 235, 0.08);
  border: 1px solid rgba(31, 111, 235, 0.3);
  color: var(--blue-text);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}
.w-btn-xs[target="_blank"]::after { content: '↗'; font-size: 9px; opacity: 0.75; }
.w-btn-xs:hover {
  background: rgba(31, 111, 235, 0.16);
  text-decoration: none;
  color: var(--blue-text);
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.w-section { margin-top: 22px; }
.w-section h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.w-intro {
  margin: 18px 0 0;
  font-size: 14.5px;
  color: #cbd5e1;
  line-height: 1.65;
}
.w-empty { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ── Spots table ───────────────────────────────────────────────────────── */
.w-table-wrap { overflow-x: auto; }
table.w-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.w-table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.w-table td { padding: 9px 10px; border-bottom: 1px solid rgba(48, 54, 61, 0.4); }
.w-table tr:last-child td { border-bottom: none; }
.w-table tr:hover td { background: rgba(31, 111, 235, 0.04); }
.w-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(31, 111, 235, 0.12);
  color: var(--blue-text);
  font-size: 11px;
  font-weight: 700;
}
.w-rate { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--green-text); }
.w-zone-cell { display: inline-flex; align-items: center; }
.w-zone-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.w-method {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 148, 158, 0.12);
  border: 1px solid rgba(139, 148, 158, 0.25);
  color: #cbd5e1;
  margin-right: 4px;
}
/* ── Related cards ─────────────────────────────────────────────────────── */
.w-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.w-rel-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  min-width: 0;
}
.w-rel-card:hover {
  border-color: rgba(31, 111, 235, 0.5);
  text-decoration: none;
  background: rgba(22, 27, 34, 0.8);
}
.w-rel-card img { width: 30px; height: 30px; flex-shrink: 0; }
.w-rel-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-rel-meta { font-size: 11px; color: var(--muted); }
.w-rel-heading { font-size: 13px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.w-rel-group + .w-rel-group { margin-top: 16px; }

/* ── Catalog page ──────────────────────────────────────────────────────── */
.w-catalog-head { padding: 22px 0 6px; }
.w-catalog-head h1 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.w-catalog-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 720px; }

.w-catalog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 8px;
  margin: 0 -8px;
  position: sticky;
  top: 53px;
  z-index: 40;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}
.w-search {
  flex: 1 1 240px;
  max-width: 380px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.7);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
}
.w-search::placeholder { color: var(--muted); }
.w-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.25); }

.w-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.w-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.6);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.w-chip:hover { background: #1c2128; }
/* Resting state: grade-tinted borders so each filter reads at a glance;
   the pressed state below upgrades to full color + tinted background. */
.w-chip.chip-prize { border-color: rgba(248, 81, 73, 0.45); }
.w-chip.chip-rare { border-color: rgba(210, 153, 34, 0.45); }
.w-chip.chip-large { border-color: rgba(31, 111, 235, 0.5); }
.w-chip.chip-common { border-color: rgba(46, 160, 67, 0.5); }
.w-chip.chip-trash { border-color: rgba(139, 148, 158, 0.45); }
.w-chip[aria-pressed='true'].chip-prize { border-color: var(--red); color: var(--red); background: rgba(248, 81, 73, 0.1); }
.w-chip[aria-pressed='true'].chip-rare { border-color: var(--yellow); color: var(--yellow); background: rgba(210, 153, 34, 0.1); }
.w-chip[aria-pressed='true'].chip-large { border-color: var(--blue); color: var(--blue-text); background: rgba(31, 111, 235, 0.1); }
.w-chip[aria-pressed='true'].chip-common { border-color: var(--green); color: var(--green-text); background: rgba(46, 160, 67, 0.1); }
.w-chip[aria-pressed='true'].chip-trash { border-color: var(--slate); color: var(--slate); background: rgba(139, 148, 158, 0.1); }

.w-catalog-count { font-size: 12px; color: var(--muted); margin-left: auto; }

.w-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.w-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  min-width: 0;
}
.w-card:hover {
  border-color: rgba(31, 111, 235, 0.55);
  text-decoration: none;
  background: rgba(22, 27, 34, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.w-card-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(13, 17, 23, 0.7);
}
/* Small catalog icons keep the grade-colored border but not the hero glow. */
.w-card-icon.grade-prize, .w-card-icon.grade-rare, .w-card-icon.grade-large,
.w-card-icon.grade-common, .w-card-icon.grade-trash { box-shadow: none; }
.w-card-icon img { width: 32px; height: 32px; }
.w-card-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.w-card-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-card-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.w-card-grade { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 9.5px; }
.w-card-grade.grade-prize { color: var(--red); border: none; box-shadow: none; }
.w-card-grade.grade-rare { color: var(--yellow); border: none; box-shadow: none; }
.w-card-grade.grade-large { color: var(--blue-text); border: none; box-shadow: none; }
.w-card-grade.grade-common { color: var(--green-text); border: none; box-shadow: none; }
.w-card-grade.grade-trash { color: var(--slate); border: none; box-shadow: none; }
.w-card-price { color: var(--muted); font-variant-numeric: tabular-nums; }

[hidden] { display: none !important; }

/* ── Legal / info pages (privacy, about, contact, legal) ──────────────── */
.w-legal { margin-top: 4px; line-height: 1.7; }
.w-legal h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.w-legal-body h2 {
  margin: 26px 0 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.w-legal-body h3 {
  margin: 20px 0 8px;
  font-size: 14.5px;
  font-weight: 700;
}
.w-legal-body p { margin: 0 0 12px; color: #cbd5e1; }
.w-legal-body ul, .w-legal-body ol { margin: 0 0 12px; padding-left: 22px; color: #cbd5e1; }
.w-legal-body li { margin: 4px 0; }
.w-legal-body a { color: var(--blue-text); }
.w-legal-body strong { color: var(--text); }
.w-legal-updated { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

/* Visually hidden but available to assistive tech (table action column, etc.) */
.w-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.w-footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid rgba(48, 54, 61, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.w-footer-note { flex: 1 1 100%; }
.w-footer a { color: var(--muted); }
.w-footer a:hover { color: var(--text); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .w-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .w-nav > a span, .w-lang-summary span { display: none; }
  .w-hero { flex-direction: row; align-items: flex-start; }
  .w-hero-icon { width: 60px; height: 60px; }
  h1.w-title { font-size: 21px; }
  .w-panel { padding: 16px; }
}
