/* ============================================================
   Forever Tavern — базовая тема (тёмная, игровая)
   ============================================================ */

:root {
  --bg: #0d0f14;
  --bg-soft: #12151d;
  --surface: #161a25;
  --surface-2: #1b2030;
  --border: #262b3a;
  --text: #e8eaf0;
  --text-muted: #9aa3b5;
  --text-dim: #6b7385;
  --accent: #f0b429;
  --accent-soft: rgba(240, 180, 41, .12);
  --blue: #6ea8fe;

  --radius: 14px;
  --radius-sm: 9px;
  --container: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 75% -10%, rgba(240, 180, 41, .07), transparent 60%),
    radial-gradient(900px 420px at 10% -5%, rgba(110, 168, 254, .05), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, #f7c544, #e6a91c);
  color: #20180a;
}
.btn-primary:hover { background: linear-gradient(180deg, #ffd056, #f0b429); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: #3d4557;
}
.btn-ghost:hover { border-color: #56607a; }

.btn-sm { padding: 7px 14px; font-size: 13.5px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 20, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--accent); }

.logo-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
}

.main-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: auto;
}
.main-nav::-webkit-scrollbar { display: none; }

.main-nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 11px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color .12s ease, background .12s ease;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

.header-cta { white-space: nowrap; }

/* ---------- Герой ---------- */

.hero {
  padding: 84px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #aeb8cc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 26px;
  background: var(--surface);
}

.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -.02em;
}

.lead {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-muted);
}

/* ---------- Счётчик ---------- */

.countdown {
  margin: 36px auto 0;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 24px;
}

.countdown-label {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cd-cell {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cd-num {
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.cd-cap {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
}

.countdown.is-done .cd-num { color: var(--accent); }

/* ---------- Действия и факты ---------- */

.hero-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.facts {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.fact-k {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
}

.fact-v { font-weight: 700; font-size: 15px; }

/* ---------- Секции ---------- */

.section { padding: 44px 0 8px; }

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.route {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.section h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.01em; }

.section-desc {
  margin: 8px 0 0;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 15px;
}

.status {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: 6px;
  white-space: nowrap;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(22, 26, 37, .45);
  padding: 34px 24px;
  text-align: center;
  margin-bottom: 36px;
}

.empty p { margin: 0; font-weight: 600; color: var(--text-muted); }

.empty-sub {
  margin-top: 6px !important;
  font-weight: 400 !important;
  color: var(--text-dim);
  font-size: 14px;
}

.section-about { padding-bottom: 30px; }

/* ---------- Новости на главной ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0 18px;
  overflow: hidden;
  transition: border-color .12s ease, transform .12s ease;
}
.news-card:hover { border-color: #3d4557; transform: translateY(-2px); text-decoration: none; }

.nc-img {
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 350;
  object-fit: cover;
  display: block;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.news-card > *:not(.nc-img) { margin-inline: 18px; }

.nc-meta { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-dim); }
.nc-cat { color: var(--accent); font-weight: 600; }

.news-card h3 { font-size: 17.5px; line-height: 1.35; font-weight: 700; color: var(--text); }
.news-card:hover h3 { color: var(--accent); }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--accent); text-decoration: none; }

.news-card .nc-teaser { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.55; flex: 1; }
.news-card .nc-more { font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- Статья ---------- */

.article-wrap { max-width: 780px; margin: 0 auto; padding: 40px 20px 60px; }

.breadcrumb { font-size: 13.5px; color: var(--text-dim); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }

.article-wrap h1 {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.18;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.article-lead {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 20px 0 8px;
}

.prose { margin-top: 26px; }
.prose p { margin: 0 0 18px; font-size: 17px; line-height: 1.75; }
.prose h2 { font-size: 22px; margin: 32px 0 14px; letter-spacing: -.01em; }

.quote {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 22px 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 16.5px;
  line-height: 1.7;
}
.quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 13px; color: var(--text-dim); }

.sources {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 34px;
}
.sources h2 { font-size: 15px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.sources ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; }

.verified { display: block; margin-top: 26px; font-size: 12.5px; color: var(--text-dim); }
.backlink { margin-top: 16px; display: inline-block; font-size: 14px; font-weight: 600; }

/* ---------- Карточка инструмента на главной ---------- */

.tool-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, var(--surface) 0%, #1d2030 100%);
  border: 1px solid #7a6326;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 24px;
  transition: border-color .12s ease, transform .12s ease;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.tool-card-body { flex: 1; }
.tool-card h3 { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.tool-card p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; }
.tool-card .nc-more { font-size: 15px; font-weight: 700; color: var(--accent); white-space: nowrap; }

@media (max-width: 640px) {
  .tool-card { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Калькулятор талантов ---------- */

.calc-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 14px;
}

.calc-class {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.calc-class:hover { color: var(--text); border-color: #3d4557; }
.calc-class.is-active {
  color: #20180a;
  background: linear-gradient(180deg, #f7c544, #e6a91c);
  border-color: transparent;
}

.calc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
}

.calc-stats { display: flex; gap: 16px; font-size: 14.5px; color: var(--text-muted); flex-wrap: wrap; }
.calc-stats b { color: var(--accent); font-size: 16px; font-variant-numeric: tabular-nums; }
.calc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.calc-trees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.calc-tree {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  overflow-x: auto;
}

.calc-tree-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.calc-tree-head h2 { font-size: 16.5px; font-weight: 800; flex: 1; }
.calc-tree-pts {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 2px 9px;
}
.calc-tree-reset {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline dotted;
}
.calc-tree-reset:hover { color: var(--text-muted); }

.calc-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 52px);
  grid-auto-rows: 52px;
  column-gap: 6px;
  row-gap: 22px;
  width: max-content;
  margin-inline: auto;
}

.calc-arrows {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.calc-arrow line { stroke: #5b6478; stroke-width: 2.5; stroke-linecap: round; }
.calc-arrow .calc-arrow-casing { stroke: rgba(13, 15, 20, .85); stroke-width: 5.5; }
.calc-arrow polygon { fill: #5b6478; stroke: rgba(13, 15, 20, .85); stroke-width: 1.5; }
.calc-arrow.is-open line { stroke: var(--accent); }
.calc-arrow.is-open .calc-arrow-casing { stroke: rgba(13, 15, 20, .85); }
.calc-arrow.is-open polygon { fill: var(--accent); stroke: rgba(13, 15, 20, .85); }
.calc-cell { z-index: 1; }

.calc-cell {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  overflow: visible;
  transition: border-color .12s ease, filter .12s ease, transform .12s ease;
}
.calc-cell img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.calc-cell:hover { border-color: #56607a; transform: translateY(-1px); }

.calc-cell-letter {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 15px; font-weight: 800; color: var(--text-dim); letter-spacing: .04em;
}

.calc-cell.is-locked img { filter: grayscale(.85) brightness(.55); }
.calc-cell.is-locked { cursor: not-allowed; }
.calc-cell.is-alloc { border-color: #7a6326; }
.calc-cell.is-max { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(240,180,41,.35); }

.calc-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(13, 15, 20, .92);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 4px;
  line-height: 1.5;
  pointer-events: none;
}
.calc-cell.is-max .calc-badge { color: var(--accent); border-color: #7a6326; }

.calc-new {
  position: absolute;
  left: -4px;
  top: -4px;
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #20180a;
  background: var(--accent);
  border-radius: 5px;
  padding: 1px 4px;
  pointer-events: none;
}

.calc-hint {
  min-height: 22px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--accent);
  opacity: 0;
  transition: opacity .15s ease;
}
.calc-hint.is-visible { opacity: 1; }

.calc-summary {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.calc-summary summary { font-weight: 700; font-size: 15px; cursor: pointer; }
.calc-summary pre {
  margin: 12px 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.calc-tip {
  position: fixed;
  z-index: 100;
  max-width: 300px;
  background: #12151d;
  border: 1px solid #3d4557;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.tip-name { margin: 0; font-size: 14.5px; font-weight: 700; }
.tip-en { margin: 2px 0 0; font-size: 11.5px; color: var(--text-dim); font-style: italic; }
.tip-rank { margin: 8px 0 0; font-size: 12px; color: var(--accent); font-weight: 700; }
.tip-desc { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.tip-next { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 8px; }
.tip-req { margin: 8px 0 0; font-size: 12.5px; color: #ffd9a0; font-weight: 600; border-top: 1px solid var(--border); padding-top: 8px; }
.tip-note { margin: 8px 0 0; font-size: 11.5px; color: var(--text-dim); }

@media (max-width: 980px) {
  .calc-trees { grid-template-columns: 1fr; }
  .calc-tree { overflow: visible; }
}

/* ---------- Подвал ---------- */

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 44px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand .logo { margin-bottom: 12px; }

.footer-tagline {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.footer-col { display: flex; flex-direction: column; gap: 8px; }

.footer-col h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin: 0 0 4px;
}

.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--text); }

.footer-legal {
  margin: 36px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.55;
}

.footer-copy { margin: 10px 0 0; color: var(--text-dim); font-size: 12.5px; }

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-cta { display: none; }
}

@media (max-width: 380px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  .hero { padding: 56px 0 44px; }
  .facts { grid-template-columns: 1fr; }
  .countdown-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head { flex-direction: column; gap: 10px; }
  .status { margin-top: 0; align-self: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- Обложка статьи ---------- */

.article-cover {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 22px;
  background: var(--bg-soft);
}

/* ---------- Тир-листы ---------- */

.method {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 26px 0 8px;
}
.method h2 { font-size: 16px; margin: 0 0 8px; }
.method p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--text-muted); }

.tier-block { margin-top: 34px; }
.tier-block h2 { font-size: 22px; letter-spacing: -.01em; margin-bottom: 14px; }

.tier-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.tier-badge {
  flex: none;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  border-radius: 9px;
}
.tier-s .tier-badge { background: rgba(240, 180, 41, .16); color: var(--accent); }
.tier-a .tier-badge { background: rgba(110, 168, 254, .16); color: var(--blue); }
.tier-b .tier-badge { background: rgba(154, 163, 181, .14); color: var(--text-muted); }
.tier-c .tier-badge { background: rgba(107, 115, 133, .1); color: var(--text-dim); }
.tier-s { border-color: #7a6326; }

.tier-cell { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.tier-cell b { font-size: 15.5px; }
.tier-cell span { font-size: 14px; line-height: 1.55; color: var(--text-muted); }

.tier-news { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.tier-news li { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.tier-news b { color: var(--text); }

.tier-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.tier-summary .news-card { padding-bottom: 16px; }
.tier-summary h3 { font-size: 16px; }
@media (max-width: 760px) {
  .tier-summary { grid-template-columns: 1fr; }
}

/* ---------- BiS-листы ---------- */

.bis-factions { display: flex; gap: 8px; margin: 20px 0 14px; }
.bis-side {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.bis-side[data-side="a"].is-active { color: #9cc2ff; border-color: #4a6fb5; background: rgba(110, 168, 254, .12); }
.bis-side[data-side="h"].is-active { color: #ff9c9c; border-color: #b54a4a; background: rgba(224, 86, 106, .12); }

.bis-list h2 { font-size: 18px; margin: 8px 0 10px; }
.bis-list[hidden] { display: none; }

.bis-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  margin-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .12s ease, transform .12s ease;
}
.bis-item:hover { border-color: #3d4557; transform: translateX(3px); text-decoration: none; }
.bis-item img { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft); flex: none; }
.bis-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bis-slot { font-size: 12.5px; color: var(--text-dim); }
.bis-name { font-size: 15.5px; font-weight: 700; }
.q2 { color: #1eff00; }
.q3 { color: #0070dd; }
.q4 { color: #a335ee; }
.q5 { color: #ff8000; }
.q6 { color: #ffffff; }
.bis-go { color: var(--text-dim); font-weight: 700; flex: none; }
.bis-item:hover .bis-go { color: var(--accent); }

.bis-hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.bis-hub .news-card { padding: 0 0 16px; }
@media (max-width: 860px) { .bis-hub { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .bis-hub { grid-template-columns: 1fr; } }

/* ---------- BiS: раскладка на персонаже ---------- */

.bis-side-block[hidden] { display: none; }

.pd {
  display: grid;
  grid-template-columns: 1fr 300px 1fr;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 20px;
}
.pd-col { display: flex; flex-direction: column; gap: 6px; }
.pd-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px 8px 8px;
  transition: border-color .12s ease, transform .12s ease;
}
.pd-slot:hover { border-color: #3d4557; transform: translateX(3px); text-decoration: none; }
.pd-col:last-child .pd-slot:hover { transform: translateX(-3px); }
.pd-slot img { width: 40px; height: 40px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); flex: none; }
.pd-slot-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pd-slot-kind { font-size: 11.5px; color: var(--text-dim); }
.pd-slot-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-center { display: flex; justify-content: center; }
.pd-figure { width: 100%; max-width: 260px; height: auto; }

.bis-stats { margin-top: 22px; }
.bis-stats h2 { font-size: 19px; margin-bottom: 12px; }
.bis-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.bis-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bis-stat span { font-size: 12px; color: var(--text-dim); }
.bis-stat b { font-size: 17px; color: var(--accent); font-variant-numeric: tabular-nums; }

.bis-variants-h { font-size: 22px; margin: 30px 0 14px; }
.bis-group { margin-bottom: 18px; }
.bis-group h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
  margin: 0 0 8px;
}
.bis-item.is-active { border-color: #7a6326; background: linear-gradient(135deg, var(--surface), #1e1c14); }
.bis-pick {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid #7a6326;
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  user-select: none;
}
.bis-pick:hover { background: var(--accent-soft); }
.bis-item.is-active .bis-pick { background: var(--accent); color: #20180a; }

@media (max-width: 900px) {
  .pd { grid-template-columns: 1fr 1fr; }
  .pd-center { grid-column: 1 / -1; order: -1; }
  .pd-figure { max-width: 190px; }
  .bis-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .pd { grid-template-columns: 1fr; }
  .bis-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Фикс: отступы контента внутри карточек с обложкой (перебивает margin:0 у .nc-teaser) */
.news-card > *:not(.nc-img) { margin-left: 18px; margin-right: 18px; }
.news-card > .nc-teaser { margin: 0 18px; }

/* ---------- BiS: слоты-табы и рейтинговые списки ---------- */

.bis-variants-note { margin: -6px 0 14px; font-size: 14px; color: var(--text-dim); }
.bis-slottabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bis-slottab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.bis-slottab img { border-radius: 6px; border: 1px solid var(--border); }
.bis-slottab:hover { color: var(--text); border-color: #3d4557; }
.bis-slottab.is-active { color: var(--accent); border-color: #7a6326; background: var(--accent-soft); }

.bis-panel h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
  margin: 0 0 8px;
}
.bis-panel[hidden] { display: none; }

.bis-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 6px;
}
.bis-rank {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.bis-row:first-of-type .bis-rank { color: var(--accent); }
.bis-row-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bis-row-item img { border-radius: 8px; border: 1px solid var(--border); flex: none; background: var(--bg-soft); }
.bis-row-item .bis-name { font-size: 15px; font-weight: 700; }
.bis-row-item:hover { text-decoration: none; }
.bis-row-item:hover .bis-name { text-decoration: underline; }
.bis-en {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  flex: none;
}
.bis-where { font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.bis-where b { color: #7fb2ff; font-weight: 600; }
.bis-chance { color: var(--accent); font-weight: 600; margin-left: 4px; }
.bis-nosrc { color: var(--text-dim); font-style: italic; }
.bis-wear {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid #7a6326;
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.bis-wear:hover { background: var(--accent); color: #20180a; }

@media (max-width: 760px) {
  .bis-row { grid-template-columns: 28px 1fr; }
  .bis-where { grid-column: 2; }
  .bis-wear { grid-column: 2; justify-self: start; }
}
