/* Миникарта: тёмная тема бренда (игровая карта), без светлого варианта.
   Цвета сторон (зелёный Свет, красная Тьма) семантические; акцент интерфейса один: золото.
   Форма: панели 8px, кнопки и чипы 8px, точки на карте круглые. */
:root {
  --bg: #0e1110;
  --surface: #151918;
  --raise: #1c2120;
  --ink: #e7ebe6;
  --muted: #95a19b;
  --line: #262d2b;
  --accent: #e3b34a;
  --accent-ink: #1a1405;
  --radiant: #6fb26b;
  --dire: #d0553f;
  --r: 8px;
  --wrap: 1320px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: "Tektur", "IBM Plex Sans", sans-serif; font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.i { width: 1.15em; height: 1.15em; flex: none; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: fixed; top: 8px; left: 8px; z-index: 30; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .2s var(--ease), background-color .2s, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #ecc469; }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgb(14 17 16 / .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; gap: 24px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px/1 "Tektur", sans-serif; }
.logo__mark { width: 26px; height: 26px; color: var(--accent); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--ink); }
@media (max-width: 520px) { .nav a:last-child { display: none; } }

/* Board: панель + карта */
.board { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: clamp(28px, 4vw, 56px); align-items: start; }
.panel { display: flex; flex-direction: column; gap: 22px; }
.panel h1 { font-size: clamp(34px, 3.8vw, 52px); }
.panel__lead { color: var(--muted); font-size: 16px; }
.filters { display: grid; gap: 10px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r); width: fit-content; }
.seg button, .chip { height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 500; transition: color .2s, background-color .2s, border-color .2s; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-color: var(--line); }
.chip:hover, .seg button:hover { color: var(--ink); }
.chip[aria-checked="true"] { border-color: var(--accent); color: var(--accent); background: rgb(227 179 74 / .08); }

.pick { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px; min-height: 160px; }
.pick__empty { color: var(--muted); font-size: 15px; }
.pick__empty strong { display: block; color: var(--ink); font-family: "Tektur", sans-serif; font-size: 18px; margin-bottom: 6px; }
.pick__head { display: flex; gap: 14px; align-items: center; }
.pick__name { font: 700 22px/1.1 "Tektur", sans-serif; }
.pick__real { color: var(--muted); font-size: 14px; }
.pick__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--raise); color: var(--muted); }
.badge--radiant { color: var(--radiant); }
.badge--dire { color: var(--dire); }
.pick__text { margin-top: 12px; font-size: 15px; color: #c7cfca; }
.pick__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pick__btns .btn { height: 40px; font-size: 14px; padding: 0 14px; }
.player { position: relative; aspect-ratio: 16 / 9; margin-top: 16px; border-radius: 6px; overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
.ava { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font: 700 17px/1 "Tektur", sans-serif; color: #0e1110; }
.ava--radiant { background: var(--radiant); }
.ava--dire { background: var(--dire); }

.mapbox { position: relative; width: min(100%, calc(100dvh - 150px)); min-width: min(100%, 520px); justify-self: center; }
.map { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r); background: #121614; box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgb(0 0 0 / .9); user-select: none; }
.mapbox__tip { position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); padding: 6px 10px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; white-space: nowrap; }
.mapbox__sides { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; }
.side--radiant { color: var(--radiant); order: -1; }
.side--dire { color: var(--dire); }

/* Пины */
.pin { cursor: pointer; outline: none; transition: opacity .35s; }
.pin__dot { transition: transform .3s var(--ease); transform-box: fill-box; transform-origin: center; }
.pin:hover .pin__dot, .pin:focus-visible .pin__dot { transform: scale(1.18); }
.pin:focus-visible .pin__ring { stroke: var(--accent); stroke-width: 4; opacity: 1; }
.pin__ring { fill: none; stroke: var(--accent); stroke-width: 3; opacity: 0; }
.pin.is-on .pin__ring { opacity: 1; }
.pin.is-off { opacity: .16; pointer-events: none; }
.pin text { font: 700 17px "Tektur", sans-serif; fill: #0e1110; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .pin.is-on .pin__ring { animation: pulse 1.8s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
}
@media (max-width: 600px) {
  .pin__dot { transform: scale(1.3); }
  .pin:hover .pin__dot, .pin:focus-visible .pin__dot { transform: scale(1.45); }
  .pin text { font-size: 21px; }
}
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .creeps { display: none; } }

@media (max-width: 980px) {
  .board { grid-template-columns: 1fr; }
  .panel { position: static; }
  .mapbox { order: -1; width: 100%; min-width: 0; }
  .panel h1 { order: -2; }
}
@media (max-width: 980px) { .board { display: flex; flex-direction: column; } }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 110px); }
.section--tint { background: var(--surface); border-top: 1px solid var(--line); }
.section__lead { margin-top: 14px; color: var(--muted); max-width: 60ch; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 34px; }
.card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .2s, transform .25s var(--ease); }
.card:hover { border-color: #3a4441; transform: translateY(-2px); }
.card[aria-current="true"] { border-color: var(--accent); }
.card[hidden] { display: none; }
.card .ava { width: 42px; height: 42px; font-size: 15px; }
.card strong { display: block; font-family: "Tektur", sans-serif; font-size: 17px; line-height: 1.2; }
.card span span { display: block; color: var(--muted); font-size: 13px; }
.empty { margin-top: 24px; color: var(--muted); }

.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px 40px; margin: 40px 0 0; }
.legend dt { display: flex; gap: 10px; align-items: center; font: 700 17px/1.2 "Tektur", sans-serif; margin-bottom: 6px; }
.legend dd { margin: 0; color: var(--muted); font-size: 15px; }

.foot { border-top: 1px solid var(--line); padding-block: 30px; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.foot p { color: var(--muted); font-size: 14px; max-width: 76ch; }
.foot__up { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 600; font-size: 15px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
