/* Тёмная тема по умолчанию — в стиле официального Learnatorium HoN
   (чёрный фон, оранжевый акцент, зелёный secondary). Светлая — data-theme="light". */
:root {
  --bg: #0b0c10;
  --bg2: #12141b;
  --card: #161922;
  --card2: #1b1f2a;
  --border: #262b38;
  --border-hi: #3a4152;
  --text: #e8eaf0;
  --muted: #9aa1b3;
  --accent: #ff8c00;
  --accent-soft: #ff8c0026;
  --accent2: #ffb35c;
  --green: #43cd2c;
  --legion: #4a9eff;
  --hellbourne: #ff5a5a;
  --gold: #ffd11a;
  --shadow: rgba(0, 0, 0, .55);
  --glow: rgba(255, 140, 0, .18);
}
[data-theme="light"] {
  --bg: #f4f1ea;
  --bg2: #ece7db;
  --card: #fffdf8;
  --card2: #f6f2e8;
  --border: #d8d2c4;
  --border-hi: #b8b09c;
  --text: #2b2620;
  --muted: #6f675a;
  --accent: #d97b00;
  --accent-soft: #d97b001f;
  --accent2: #8a6414;
  --green: #1a7f37;
  --legion: #2b6cb0;
  --hellbourne: #c53030;
  --gold: #b8862f;
  --shadow: rgba(60, 50, 30, .12);
  --glow: rgba(217, 123, 0, .15);
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
[data-theme="light"] { color-scheme: light; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-image:
    radial-gradient(ellipse 60% 40% at 15% -5%, var(--accent-soft), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 0%, rgba(67, 205, 44, .05), transparent 60%);
  background-attachment: fixed;
}
/* длинные слова, формулы и URL не должны вылезать за блоки */
.page-title, .tile-title, .tile-sub, .hero-lore, .item-stats-line, .ability-name,
.ability-desc, .ability-flavor, .sec-title, .group-title, .plain-list li,
.data-table td, .data-table th, .sr-name, .sr-sub, .tag, .result-list .sr-item,
.search-hero, .page-desc, .reward-line, .muted, .form-hint {
  overflow-wrap: anywhere;
}
img { user-select: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
h1, h2, h3, .page-title, .tile-title, .logo, .sec-title, .group-title {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .4px;
}
::selection { background: var(--accent); color: #14100a; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 8px 0; flex-wrap: wrap; }
.logo {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 800; font-size: 24px; color: var(--text);
  letter-spacing: 1px; white-space: nowrap; text-transform: uppercase;
}
.logo-accent { color: var(--accent); }
.logo:hover { text-decoration: none; }
.logo:hover .logo-accent { color: var(--accent2); }
.main-nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  color: var(--muted); padding: 8px 11px; border-radius: 7px; white-space: nowrap;
  font-weight: 600; font-size: 14px; position: relative; transition: color .15s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 3px;
  height: 2px; background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transition: transform .18s;
}
.main-nav a:hover { color: var(--text); background: var(--bg2); text-decoration: none; }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after { transform: scaleX(1); }

/* ---------- поиск ---------- */
.search-box { position: relative; display: flex; align-items: center; }
.search-box::before {
  content: ""; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; pointer-events: none;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.search-box input {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px 8px 34px; border-radius: 9px; width: 220px; font-size: 14px;
  transition: width .18s, border-color .15s, box-shadow .15s;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus {
  outline: none; border-color: var(--accent); width: 280px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-results {
  position: absolute; right: 0; top: calc(100% + 8px); width: 400px; max-width: 92vw;
  max-height: 70vh; overflow: auto;
  background: var(--card); border: 1px solid var(--border-hi); border-radius: 12px;
  display: none; box-shadow: 0 16px 40px var(--shadow), 0 0 0 1px var(--glow);
  padding: 6px;
}
.search-results.open { display: block; }
.sr-group {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); padding: 8px 10px 4px;
}
.sr-item {
  display: flex; gap: 10px; align-items: center; padding: 7px 10px;
  color: var(--text); border-radius: 8px;
}
.sr-item:hover, .sr-item.sel { background: var(--accent-soft); text-decoration: none; }
.sr-item.sel { box-shadow: inset 2px 0 0 var(--accent); }
.sr-item img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.sr-icon-fallback {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px;
  background: var(--card2); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--accent2); font-size: 15px;
}
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-type { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; flex-shrink: 0; }
.sr-empty { padding: 14px; color: var(--muted); font-size: 14px; }
.sr-all {
  display: block; text-align: center; padding: 9px; margin-top: 4px;
  border-top: 1px solid var(--border); border-radius: 0 0 8px 8px;
  color: var(--accent2); font-weight: 700; font-size: 13px;
}
.sr-all:hover { background: var(--bg2); text-decoration: none; }

/* ---------- переключатель темы ---------- */
.theme-toggle {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; width: 38px; height: 38px; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .ico-sun, [data-theme="light"] .ico-moon { display: none; }

/* ---------- основа ---------- */
main { padding: 28px 0 56px; min-height: 70vh; }
.site-footer {
  border-top: 1px solid var(--border); color: var(--muted);
  font-size: 13px; background: var(--bg2);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px;
  padding: 30px 18px 18px;
}
.footer-brand .logo { font-size: 20px; display: inline-block; margin-bottom: 8px; }
.footer-tagline { margin: 0; max-width: 340px; line-height: 1.5; }
.footer-nav { display: flex; flex-direction: column; gap: 7px; }
.footer-nav a { color: var(--muted); font-weight: 600; }
.footer-nav a:hover { color: var(--accent2); text-decoration: none; }
.footer-meta { display: flex; flex-direction: column; gap: 7px; }
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--accent2); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 14px 18px;
  font-size: 12px; color: var(--muted); opacity: .85;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- главная / баннер ---------- */
.hero-banner {
  position: relative; text-align: center; padding: 54px 20px 34px; margin-bottom: 26px;
  border-radius: 18px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11,12,16,.55), rgba(11,12,16,.82)),
    url("/assets/og-image.png") center/cover no-repeat,
    radial-gradient(ellipse 70% 120% at 50% -20%, var(--accent-soft), transparent 60%),
    linear-gradient(160deg, var(--card2), var(--card) 60%);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px var(--shadow), inset 0 0 0 1px rgba(255,255,255,.03);
}
[data-theme="light"] .hero-banner {
  background:
    linear-gradient(180deg, rgba(244,241,234,.45), rgba(244,241,234,.78)),
    url("/assets/og-image.png") center/cover no-repeat,
    radial-gradient(ellipse 70% 120% at 50% -20%, var(--accent-soft), transparent 60%),
    linear-gradient(160deg, var(--card2), var(--card) 60%);
}
.hero-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 8l12 30 30 12-30 12-12 30-12-30-30-12 30-12z' fill='none' stroke='%23ff8c00' stroke-opacity='.07'/%3E%3C/svg%3E") center/120px repeat;
}
.hero-banner h1 {
  font-size: clamp(40px, 6vw, 64px); margin: 0 0 10px; letter-spacing: 2px;
  text-transform: uppercase; font-weight: 700;
  background: linear-gradient(180deg, var(--text), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-banner .tagline { color: var(--muted); max-width: 760px; margin: 0 auto; font-size: 16px; position: relative; }
.hero-banner .banner-stats { position: relative; display: flex; justify-content: center; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
.banner-stat { text-align: center; }
.banner-stat b {
  display: block; font-size: 30px; font-weight: 800; color: var(--accent);
  text-shadow: 0 0 18px var(--glow);
}
.banner-stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.banner-stat { transition: transform .2s; }
.banner-stat:hover { transform: translateY(-3px); }

/* ---------- заголовки и описания ---------- */
.page-title {
  font-size: 34px; margin: 6px 0 4px; font-weight: 700;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.page-desc { color: var(--muted); margin-top: 0; max-width: 760px; }
.count { color: var(--muted); font-weight: 400; font-size: .62em; }
.group-title {
  margin: 30px 0 14px; font-size: 24px; font-weight: 700;
  color: var(--accent2); text-transform: uppercase; letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 10px 0 14px; color: var(--muted); font-weight: 600; font-size: 14px;
}
.back-link:hover { color: var(--accent2); }

/* ---------- карточки и сетки ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.card {
  background: linear-gradient(150deg, var(--card2), var(--card) 65%);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; transition: border-color .18s, transform .18s, box-shadow .18s;
}
a.card:hover {
  border-color: var(--accent); transform: translateY(-3px); text-decoration: none;
  box-shadow: 0 10px 28px var(--shadow), 0 0 0 1px var(--glow);
}
.tile { display: flex; flex-direction: column; gap: 8px; color: var(--text); position: relative; overflow: hidden; }
.tile::before {
  content: ""; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px;
  border-radius: 50%; background: var(--accent-soft); pointer-events: none;
}
.tile.big { padding: 24px; }
.tile-title { font-size: 21px; font-weight: 700; }
.tile-count {
  font-size: 38px; font-weight: 800;
  color: var(--accent); line-height: 1;
}
.tile-sub { color: var(--muted); font-size: 13px; }
.tile-icon { width: 46px; height: 46px; object-fit: contain; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.hero-tile { align-items: center; text-align: center; gap: 10px; padding: 20px 14px; min-height: 200px; justify-content: center; }
.hero-tile .tile-icon { width: 72px; height: 72px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); transition: transform .2s; }
.hero-tile:hover .tile-icon { transform: scale(1.08) rotate(-2deg); }
.hero-tile .tile-title { font-size: 19px; }
.hero-tile .tile-sub { font-size: 12px; line-height: 1.5; }
.item-tile .tile-icon { width: 52px; height: 52px; }
.item-tile .tile-title { font-size: 16px; }
.hero-tile .tile-title, .item-tile .tile-title { line-height: 1.25; }

/* ---------- фильтры и поиск по разделу ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 14px 0 18px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
}
.filter-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.filter-sep { width: 14px; }
.btn {
  background: var(--bg2); border: 1px solid var(--border); color: var(--muted);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.btn:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.btn-active {
  background: linear-gradient(180deg, var(--accent), #e07b00);
  border-color: var(--accent); color: #1c1000;
  box-shadow: 0 0 12px var(--glow);
}
.btn-primary {
  display: inline-block; background: linear-gradient(180deg, var(--accent), #e07b00);
  border: 1px solid var(--accent); color: #1c1000;
  padding: 9px 20px; border-radius: 9px; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 14px var(--glow); transition: all .15s;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); text-decoration: none; }
.page-search { margin-left: auto; }
.page-search input {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 8px; font-size: 13px; width: 200px;
}
.page-search input:focus { outline: none; border-color: var(--accent); }
.page-search.standalone { margin-left: 0; }
.page-search.standalone input { width: 340px; max-width: 100%; padding: 9px 14px; font-size: 15px; }

/* ---------- страницы сущностей ---------- */
.hero-header {
  display: flex; gap: 22px; align-items: flex-start;
  margin-bottom: 22px; position: relative; overflow: hidden;
}
.hero-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 100% at 0% 0%, var(--accent-soft), transparent 55%);
}
.hero-header > * { position: relative; }
.hero-icon {
  width: 104px; height: 104px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.55));
  animation: hon-float 5s ease-in-out infinite;
}
@keyframes hon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-icon { animation: none; }
  html { scroll-behavior: auto; }
}
.map-image {
  width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px;
  margin-bottom: 14px; border: 1px solid var(--border);
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.tag {
  background: var(--bg2); border: 1px solid var(--border-hi); border-radius: 20px;
  padding: 4px 13px; font-size: 12px; font-weight: 700; color: var(--text);
  letter-spacing: .4px; text-transform: uppercase;
}
.tag.gold { color: var(--gold); border-color: var(--gold); }
.tag.team-legion { border-color: var(--legion); color: var(--legion); }
.tag.team-hellbourne { border-color: var(--hellbourne); color: var(--hellbourne); }
.hero-lore { color: var(--muted); margin: 12px 0 0; }
.item-stats-line { color: var(--green); font-weight: 700; margin-top: 8px; font-size: 15px; }

.two-col { display: grid; grid-template-columns: 1fr 1.45fr; gap: 20px; align-items: start; }
@media (max-width: 1024px) { .two-col { grid-template-columns: 1fr; } }
.sec-title {
  font-size: 20px; margin: 0 0 14px; color: var(--accent2); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  display: flex; align-items: center; gap: 10px;
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
h3.sec-title { font-size: 17px; margin-top: 22px; }
h3.sec-title::after { display: none; }
.muted { color: var(--muted); }
.reward-line { color: var(--muted); }

/* ---------- таблицы ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table td, .data-table th {
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: top;
}
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: var(--accent-soft); }
.data-table th {
  color: var(--accent2); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  border-bottom: 1px solid var(--border-hi);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { color: var(--muted); }
.table-wrap {
  overflow-x: auto; margin: 4px 0 10px; border-radius: 10px;
  border: 1px solid var(--border); max-width: 100%;
}
.table-wrap .data-table { min-width: 520px; }
.table-wrap .data-table td, .table-wrap .data-table th { padding: 8px 12px; }

/* ---------- способности ---------- */
.abilities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ability-card {
  background: var(--card2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; transition: border-color .15s, transform .15s, box-shadow .15s;
  border-top: 2px solid transparent;
}
.ability-card:hover {
  border-color: var(--border-hi); border-top-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 8px 22px var(--shadow);
}
.ability-card.staff { border-color: var(--accent); box-shadow: 0 0 0 1px var(--glow); }
.ability-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ability-head img {
  width: 46px; height: 46px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.5));
}
.ability-name { font-weight: 700; font-size: 15px; }
.badge {
  font-size: 10px; background: linear-gradient(180deg, var(--accent), #e07b00);
  color: #1c1000; padding: 2px 8px; border-radius: 10px; vertical-align: middle;
  font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.ability-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 3px; }
.ability-desc { color: var(--text); font-size: 14px; }
.ability-flavor {
  color: var(--muted); font-style: italic; font-size: 13px; margin-top: 10px;
  border-left: 2px solid var(--border-hi); padding-left: 10px;
}
.drop-card { margin-bottom: 10px; }

/* ---------- рейтинги ---------- */
.ratings { margin-top: 16px; }
.rating-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.rating-row span:first-child { color: var(--muted); }
.stars { color: var(--accent); letter-spacing: 1px; }

/* ---------- механики / детали ---------- */
.sections-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.detail-block { margin: 10px 0; }
.plain-list { margin: 6px 0; padding-left: 20px; }
.plain-list li { margin: 4px 0; }

/* ---------- поиск: страница результатов ---------- */
.result-section { margin-bottom: 30px; }
.result-list { display: flex; flex-direction: column; gap: 8px; }
.result-list .sr-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px;
}
.result-list .sr-item:hover { border-color: var(--accent); }
.result-list .sr-item img { width: 38px; height: 38px; }
.search-hero {
  display: flex; align-items: center; gap: 14px; margin: 10px 0 22px;
  color: var(--muted); font-size: 15px;
}
.search-hero b { color: var(--text); }

/* ---------- формы ---------- */
.form-card { max-width: 720px; }
.form-card label { display: block; font-weight: 700; margin: 14px 0 6px; }
.form-card input[type="text"], .form-card textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px; padding: 10px 13px; font: inherit; font-size: 14px;
}
.form-card textarea { min-height: 140px; resize: vertical; }
.form-card input:focus, .form-card textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.form-error {
  background: var(--hellbourne); color: #fff; border-radius: 9px;
  padding: 10px 14px; margin: 12px 0; font-size: 14px; font-weight: 600;
}
.form-ok {
  background: var(--green); color: #0d1a05; border-radius: 9px;
  padding: 10px 14px; margin: 12px 0; font-size: 14px; font-weight: 600;
}

/* ---------- адаптивность ---------- */
@media (max-width: 1020px) {
  .search-box { order: 3; flex: 1 1 100%; }
  .search-box input, .search-box input:focus { width: 100%; }
  .search-results { left: 0; right: auto; width: min(400px, 94vw); }
}
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .main-nav { order: 3; width: 100%; padding-bottom: 4px; }
}
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .logo { font-size: 21px; }
  .hero-banner { padding: 36px 14px 26px; }
  .hero-banner h1 { font-size: 36px; }
  .page-title { font-size: 27px; }
  .hero-header { flex-direction: column; gap: 14px; }
  .hero-icon { width: 78px; height: 78px; }
  .tiles { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .abilities-grid { grid-template-columns: 1fr; }
  .filters { padding: 10px; }
  .page-search { margin-left: 0; width: 100%; }
  .page-search input { width: 100%; }
  .data-table td:first-child { white-space: normal; }
  .search-results { position: fixed; left: 10px; right: 10px; top: 70px; width: auto; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- кнопка «наверх» ---------- */
#to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(180deg, var(--accent), #e07b00);
  border: 1px solid var(--accent); color: #1c1000;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transform: translateY(14px);
  transition: opacity .2s, transform .2s, filter .15s;
  box-shadow: 0 8px 24px var(--shadow), 0 0 14px var(--glow);
}
#to-top.show { opacity: 1; transform: translateY(0); }
#to-top:hover { filter: brightness(1.1); }
