/* DodoPick — премиальная тёмная тема. Vanilla CSS, системные шрифты, офлайн-safe. */

:root {
  --bg-0: #070a12; --bg-1: #0e1320;
  --panel-1: #161e30; --panel-2: #121a2b; --panel-hi: #222d45;
  --line: #26304a; --line-soft: #1c2538; --hair: rgba(255, 255, 255, 0.06);

  --text: #eef2fb; --text-2: #c3cce0; --muted: #8d9bbd; --muted-2: #7787a8; /* ≥4.5:1 на фоне — AA для 11px лейблов */

  --gold: #ffce54; --gold-deep: #f5a623;
  --gold-grad: linear-gradient(135deg, #ffe08a, #ffce54 45%, #f5a623);
  --blue: #4d7bff; --blue-deep: #1f6fd0;
  --red: #ff5d6c; --red-deep: #e23b4d;
  --green: #2bd576; --purple: #7f4fc9;

  --tier-s: #ff5d6c; --tier-a: #ff9f43; --tier-b: #ffce54; --tier-c: #7d8aad;

  --r-chip: 8px; --r-slot: 12px; --r-md: 12px; --r-card: 14px; --r-lg: 18px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px;

  --sh-rest: 0 1px 0 0 var(--hair) inset, 0 0 0 1px rgba(0,0,0,.40) inset, 0 2px 4px -2px rgba(0,0,0,.5), 0 8px 24px -8px rgba(0,0,0,.55);
  --sh-hover: 0 1px 0 0 rgba(255,255,255,.10) inset, 0 0 0 1px rgba(0,0,0,.45) inset, 0 4px 8px -3px rgba(0,0,0,.55), 0 16px 40px -12px rgba(0,0,0,.65);
  --sh-float: 0 1px 0 0 var(--hair) inset, 0 12px 28px -8px rgba(0,0,0,.55), 0 24px 64px -16px rgba(0,0,0,.6);
  --glow-gold: 0 0 0 1px rgba(255,206,84,.5), 0 0 22px -4px rgba(255,206,84,.55);

  --ease: cubic-bezier(.2,.7,.3,1); --ease-pop: cubic-bezier(.34,1.56,.64,1);
  --dur-fast: 120ms; --dur: 180ms; --dur-slow: 260ms;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* перебивает display:flex/grid на скрытых блоках */

body {
  margin: 0; font-family: var(--font); color: var(--text-2);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh;
  background-color: var(--bg-0);
  background-image:
    radial-gradient(1100px 600px at 78% -8%, rgba(77,123,255,.10), transparent 60%),
    radial-gradient(900px 500px at 12% 0%, rgba(255,206,84,.05), transparent 55%),
    radial-gradient(900px 600px at 50% 115%, rgba(127,79,201,.08), transparent 60%),
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: auto, auto, auto, 40px 40px, 40px 40px;
  background-attachment: fixed;
}
.num, .rec-score, .rec-rank, .tc-count, .winbar__us, .winbar__them { font-variant-numeric: tabular-nums; }

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: var(--s5);
  padding: 12px var(--s5); flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(12,17,30,.92), rgba(10,14,24,.78));
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,206,84,.10), var(--sh-float);
}
.brand { display: flex; align-items: center; gap: 11px; }
/* логотип (канвас с вырезанным фоном): свечение в тон темы, чуть «живой» на ховере */
.brand-mark { display: grid; place-items: center; flex: none; }
.brand-mark canvas { display: block; filter: drop-shadow(0 3px 12px rgba(77, 123, 255, .40)) drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); transition: transform var(--dur) var(--ease); }
.brand:hover .brand-mark canvas { transform: rotate(-5deg) scale(1.06); }
.empty .e-logo { display: block; margin: 0 auto var(--s3); animation: float 4s ease-in-out infinite; filter: drop-shadow(0 10px 28px rgba(77, 123, 255, .35)) drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.wordmark { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.wordmark b { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { font-size: 11px; color: var(--muted); margin-top: 3px; }
@media (max-width: 760px) { .tagline { display: none; } }

.controls { display: flex; align-items: flex-end; gap: var(--s4); margin-left: auto; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }

select, input[type="search"] {
  background: var(--bg-1); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
select:focus, input[type="search"]:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,206,84,.16); }
#mapSelect { min-width: 230px; }
select.needs-map { border-color: var(--gold); box-shadow: var(--glow-gold); animation: pulse 1.7s ease-in-out infinite; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 7px; cursor: pointer; transition: var(--dur); font-family: inherit; }
.seg button.active { background: var(--gold-grad); color: #10141f; }

/* монетка «первый пик» с черепом — канвас-подброс, как в игре. НИКАКИХ ховер-эффектов. */
.coin-wrap { display: flex; align-items: center; gap: 9px; }
.coin { position: relative; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; padding: 0; flex: none; }
.coin canvas { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); pointer-events: none; }
/* фикс. ширина под самое длинное слово («Красные») — кнопка «Сброс» не прыгает при флипе.
   Кликабельна, как и сама монетка. */
.coin-label { font-weight: 800; font-size: 14px; min-width: 74px; cursor: pointer; user-select: none; transition: opacity var(--dur), transform var(--dur-fast); }
.coin-label.dim { opacity: .35; }
.coin-label.us { color: var(--blue); }
.coin-label.them { color: var(--red); }

.btn {
  border: 0; border-radius: var(--r-pill); font-weight: 800; cursor: pointer; color: #241700; width: 100%;
  padding: 11px 18px; font-size: 14px; font-family: inherit; margin-bottom: var(--s3);
  background: var(--gold-grad); box-shadow: 0 6px 18px -6px rgba(255,154,0,.6), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -8px rgba(255,154,0,.85); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  width: 100%; margin-bottom: var(--s3); padding: 10px 14px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px; font-family: inherit; transition: var(--dur);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost.active { border-color: var(--gold); color: var(--gold); background: rgba(255,206,84,.08); }
.btn-reset { border: 1px solid rgba(255,93,108,.35); color: #ff8a96; background: transparent; border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; transition: var(--dur); }
.btn-reset:hover { background: rgba(255,93,108,.12); }

/* ===== Раскладка: вертикаль как в игре — табло → рекомендации → сетка ===== */
.layout { display: grid; grid-template-columns: 1fr; grid-template-areas: "board" "reco" "pool"; gap: var(--s4); padding: var(--s5) var(--s5) 48px; max-width: 1280px; margin: 0 auto; }
.board { grid-area: board; }
.reco-stage { grid-area: reco; }
.pool { grid-area: pool; }
.card, .team-card, .pool { position: relative; background: linear-gradient(180deg, var(--panel-1), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-rest); }
.card::before, .pool::before, .team-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.045), transparent 38%); }

/* ===== Табло: команды по краям, центр — карта/фаза/шкала ===== */
.board { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 400px) minmax(300px, 1fr); gap: var(--s4); align-items: stretch; }
.board-mid { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.board-mid .stepper { margin: 0; }
.board-mid .map-hero { height: 76px; margin-bottom: 0; }
.board-mid .map-hero__name { font-size: 16px; margin-top: 2px; }
.board-mid .map-hero__body { bottom: 8px; }
.board-mid .phase { margin-bottom: 0; }
.board-mid .winwrap { margin-bottom: 0; }
/* красная команда «смотрит» на центр — зеркалим строки */
.team-card[data-team=them] .tc-head { justify-content: flex-end; }
.team-card[data-team=them] .tc-row { flex-direction: row-reverse; }
.team-card { padding: var(--s4); overflow: hidden; }
.team-card[data-team=us] { --tc: #4d7bff; --tc-deep: #1f6fd0; }
.team-card[data-team=them] { --tc: #ff5d6c; --tc-deep: #e23b4d; }
.team-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; z-index: 1; background: linear-gradient(90deg, var(--tc), var(--tc-deep)); box-shadow: 0 0 12px -2px var(--tc); }
.tc-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--tc); margin-bottom: var(--s3); }
.tc-head span { color: var(--muted-2); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 11px; }
.tc-row { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s3); }
.tc-row:last-child { margin-bottom: 0; }
.tc-label { width: 40px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.tc-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.slots { display: flex; gap: var(--s2); align-items: flex-start; }
.slot { width: 48px; height: 48px; border-radius: var(--r-slot); position: relative; display: grid; place-items: center; background: linear-gradient(180deg, #10182a, #0c1322); border: 1px solid var(--line); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); transition: .18s var(--ease); overflow: hidden; }
.slot.empty { border: 1.5px dashed rgba(255,255,255,.13); background: rgba(255,255,255,.02); }
/* плюсик строго по центру слота (абсолют + grid — не съезжает ни на каких размерах) */
.slot.empty::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; line-height: 1; color: rgba(255,255,255,.16); font-size: 22px; font-weight: 300; }
.slot.filled { border-color: color-mix(in srgb, var(--tc) 45%, transparent); }
.slot.filled img { width: 42px; height: 42px; object-fit: contain; animation: pickPop 320ms var(--ease-pop); }
/* баны того же размера, что пики — колонки слотов стоят строго друг под другом */
.slot.ban.filled img { filter: grayscale(.7) brightness(.7); }
.slot.ban.filled::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 900; color: #fff; text-shadow: 0 0 8px rgba(226,59,77,.9), 0 1px 2px rgba(0,0,0,.8); }
.slot.active { border-color: var(--gold); animation: activePulse 1.8s ease-in-out infinite; }
.slot.active::before { content: ""; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--gold); z-index: 3; }
.slot-unknown { font-size: 26px; font-weight: 900; color: var(--muted-2); }

/* ===== Пул бравлеров ===== */
.pool { padding: var(--s4); }
.pool-controls { display: flex; gap: 10px; margin-bottom: var(--s3); }
.pool-controls input { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: var(--s3); max-height: clamp(320px, 48vh, 640px); overflow-y: auto; padding: 2px 4px 2px 2px; }
/* заголовок группы редкости (сортировка «Редкость») */
.grid-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rar, var(--muted)); margin-top: var(--s2); }
.grid-h::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--rar, var(--line)); box-shadow: 0 0 8px var(--rar, transparent); }
.grid-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--rar, var(--line)) 40%, transparent), transparent); }
.grid-h.hidden { display: none; }
/* бейдж винрейта на карточке (сортировка «Винрейт») */
.bcard-wr { position: absolute; top: 4px; right: 4px; z-index: 2; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: var(--r-chip); background: rgba(10, 14, 24, .82); color: var(--gold); font-variant-numeric: tabular-nums; }
.bcard {
  position: relative; border-radius: var(--r-slot); padding: 7px 5px 6px; cursor: pointer; overflow: hidden; user-select: none;
  background: linear-gradient(180deg, var(--rar-tint, transparent), transparent 58%), linear-gradient(180deg, var(--panel-1), var(--panel-2));
  border: 1px solid var(--line); box-shadow: var(--sh-rest);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
}
.bcard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--rar, var(--line)); box-shadow: 0 0 10px var(--rar, transparent); }
.bcard img { width: 54px; height: 54px; object-fit: contain; display: block; margin: 0 auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.bcard .bname { font-size: 11px; font-weight: 600; color: var(--text-2); text-align: center; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard:hover { transform: translateY(-3px); border-color: var(--rar, var(--gold)); box-shadow: var(--sh-hover), 0 0 22px -6px var(--rar, transparent); }
.bcard:active { transform: translateY(-1px) scale(.97); box-shadow: var(--sh-rest); transition-duration: var(--dur-fast); }
.bcard.taken { filter: grayscale(.9) brightness(.5); pointer-events: none; }
.bcard.hidden { display: none; }

.map-hero { position: relative; height: 150px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-rest); margin-bottom: var(--s4); }
.map-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); filter: saturate(1.05) contrast(1.05); animation: heroIn .32s var(--ease); }
.map-hero__scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,10,18,.97) 6%, rgba(7,10,18,.45) 42%, transparent 100%), radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--mode) 22%, transparent), transparent 60%); }
.map-hero__body { position: absolute; left: var(--s4); right: var(--s4); bottom: var(--s3); }
.map-hero__mode { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #eaf0ff; padding: 4px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--mode) 28%, transparent); border: 1px solid color-mix(in srgb, var(--mode) 50%, transparent); backdrop-filter: blur(4px); }
.map-hero__name { margin-top: var(--s2); font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text); text-shadow: 0 2px 12px rgba(0,0,0,.8); }

.phase { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-slot); margin-bottom: var(--s4); background: linear-gradient(135deg, rgba(255,206,84,.10), rgba(255,206,84,.03)); border: 1px solid rgba(255,206,84,.22); border-left: 3px solid var(--gold); }
.phase.blue { border-left-color: var(--blue); background: linear-gradient(135deg, rgba(77,123,255,.10), rgba(77,123,255,.03)); }
.phase.red { border-left-color: var(--red); background: linear-gradient(135deg, rgba(255,93,108,.10), rgba(255,93,108,.03)); }
.phase__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: blink 1.2s infinite; flex: none; }
.phase.blue .phase__dot { background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.phase.red .phase__dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
.phase__txt { min-width: 0; }
.phase__txt b { font-size: 13px; font-weight: 800; color: var(--text); }
.phase__txt > span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* шкала шанса победы — перетягивание каната */
.winwrap { margin-bottom: var(--s4); }
.winlabels { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.winlabels .us { color: var(--blue); } .winlabels .them { color: var(--red); }
.winbar { position: relative; height: 30px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: inset 0 2px 6px rgba(0,0,0,.5); background: linear-gradient(90deg, var(--blue-deep), var(--blue) 45%, var(--red) 55%, var(--red-deep)); }
.winbar__split { position: absolute; top: -2px; bottom: -2px; width: 3px; left: var(--us, 50%); background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.8); transition: left .5s var(--ease-pop); }
.winbar__us, .winbar__them { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.winbar__us { left: 10px; } .winbar__them { right: 10px; }
.steps { display: flex; gap: 6px; justify-content: center; margin-top: var(--s3); }
.steps i { width: 8px; height: 8px; border-radius: 50%; background: transparent; border: 1px solid var(--line); }
.steps i.done { background: var(--muted-2); border-color: var(--muted-2); }
.steps i.now { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* рекомендации */
.reco-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 2px 0 var(--s3); }
.rec {
  position: relative; display: grid; grid-template-columns: 30px 16px 46px 1fr auto; align-items: center; gap: var(--s3);
  padding: 10px var(--s3); border-radius: var(--r-card); margin-bottom: var(--s2); cursor: pointer;
  background: linear-gradient(180deg, var(--panel-1), var(--panel-2)); border: 1px solid var(--line); box-shadow: var(--sh-rest);
  transition: transform var(--dur) var(--ease), background-color var(--dur), border-color var(--dur);
}
.rec:hover { transform: translateX(2px); background: var(--panel-hi); }
.rec.tier-S { --tier: var(--tier-s); } .rec.tier-A { --tier: var(--tier-a); }
.rec.tier-B { --tier: var(--tier-b); } .rec.tier-C { --tier: var(--tier-c); }
.rec-badge { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; font-weight: 900; color: #10141f; background: var(--tier); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 14px -3px var(--tier); }
.rec.tier-C .rec-badge { color: #fff; }
.rec-rank { font-size: 12px; font-weight: 800; color: var(--muted-2); text-align: center; }
.rec-pic { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.06), var(--bg-1) 70%); border: 1px solid var(--line); border-bottom: 2.5px solid var(--rar, var(--line)); display: grid; place-items: center; }
.rec-pic img { width: 44px; height: 44px; object-fit: contain; }
.rec-main { min-width: 0; }
.rec-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-tags { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.tag { font-size: 10.5px; font-weight: 600; padding: 3px 7px; border-radius: var(--r-chip); background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.counter { color: #9fe6c0; background: rgba(43,213,118,.10); border-color: rgba(43,213,118,.28); }
.tag.map { color: #bcd4ff; background: rgba(77,123,255,.10); border-color: rgba(77,123,255,.28); }
.tag.syn { color: #ffe1a6; background: rgba(255,206,84,.10); border-color: rgba(255,206,84,.30); }
.rec-score { min-width: 46px; text-align: center; padding: 6px 0; border-radius: 10px; font-size: 15px; font-weight: 900; color: #10141f; background: var(--tier); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 10px -4px var(--tier); }
.rec.tier-C .rec-score { color: #fff; }
.rec.best { background: linear-gradient(180deg, #1c2742, #141d31); border-color: rgba(255,206,84,.4); }
.rec.best::after { content: "★ ЛУЧШИЙ ВЫБОР"; position: absolute; top: -8px; right: 10px; font-size: 9px; font-weight: 800; letter-spacing: .06em; color: #1a1205; background: var(--gold-grad); padding: 3px 8px; border-radius: var(--r-pill); box-shadow: 0 4px 12px -4px rgba(245,166,35,.6); }
.reco-empty { color: var(--muted); font-size: 13px; line-height: 1.55; padding: var(--s3) var(--s1); }

/* лендинг (карта не выбрана) — живёт в пуле над плитками карт */
.empty { display: grid; place-items: center; text-align: center; padding: var(--s6) var(--s5); margin-bottom: var(--s4); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-float); background: radial-gradient(80% 60% at 50% 0%, rgba(255,206,84,.10), transparent 60%), linear-gradient(180deg, #141d31, #0e1626); }
.empty h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--text); margin: 0; }
.empty h2 b { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty p { color: var(--muted); font-size: 13px; max-width: 300px; margin: var(--s2) auto var(--s4); line-height: 1.5; }
.empty .e-stats { display: flex; gap: var(--s3); margin-top: var(--s4); flex-wrap: wrap; justify-content: center; }
.empty .e-stats span { font-size: 11px; color: var(--muted-2); font-weight: 600; }
.empty .e-stats b { color: var(--text-2); }

/* ===== Футер ===== */
.legal { max-width: 1520px; margin: 0 auto; padding: var(--s5); color: var(--muted-2); font-size: 11px; line-height: 1.6; border-top: 1px solid var(--line-soft); }
.legal p { margin: 4px 0; }

/* ===== Скроллбар / фокус ===== */
* { scrollbar-width: thin; scrollbar-color: #2c374e var(--bg-1); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg-1); border-radius: 8px; }
*::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #2e3a57, #222d45); border: 2px solid var(--bg-1); border-radius: 8px; }
:where(button, select, input, .bcard, .rec):focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--gold), 0 0 14px -2px rgba(255,206,84,.5); }

/* степпер 1·2·3 — «где я / что делать» */
.stepper { display: flex; gap: 6px; list-style: none; margin: 0 0 var(--s4); padding: 0; }
.stepper li { flex: 1; text-align: center; font-size: 11px; font-weight: 800; padding: 8px 4px; border-radius: var(--r-pill); color: var(--muted-2); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.stepper li.cur { color: #10141f; background: var(--gold-grad); border-color: transparent; }
.stepper li.done { color: var(--green); border-color: rgba(43, 213, 118, .3); }
.stepper li.done::before { content: "✓ "; }

/* ===== Сцена рекомендаций — главный блок продукта ===== */
.reco-stage { padding: var(--s4); }
.reco-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.reco-head .reco-title { margin: 0; }
.reco-actions { margin-left: auto; display: flex; gap: var(--s2); align-items: center; }
.reco-actions .btn, .reco-actions .btn-ghost { width: auto; margin-bottom: 0; padding: 9px 16px; }

/* топ-3 крупными карточками; №1 — золотая доминанта */
.reco-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s3); }
.rc { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: var(--s4) var(--s3) var(--s3); cursor: pointer; font-family: inherit; color: var(--text-2); background: linear-gradient(180deg, var(--panel-1), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-rest); transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur); }
.rc:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); border-color: var(--tier, var(--gold)); }
.rc.tier-S { --tier: var(--tier-s); } .rc.tier-A { --tier: var(--tier-a); }
.rc.tier-B { --tier: var(--tier-b); } .rc.tier-C { --tier: var(--tier-c); }
.rc-rank { position: absolute; top: 8px; left: 10px; font-size: 12px; font-weight: 800; color: var(--muted-2); }
.rc .rec-score { position: absolute; top: 8px; right: 8px; min-width: 38px; padding: 4px 0; font-size: 13px; }
.rc-pic { width: 76px; height: 76px; border-radius: var(--r-md); border: 1px solid var(--line); border-bottom: 3px solid var(--rar, var(--line)); background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.08), var(--bg-1) 70%); display: grid; place-items: center; overflow: hidden; }
.rc-pic img { width: 70px; height: 70px; object-fit: contain; }
.rc-name { font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.rc .rec-tags { justify-content: center; }
.rc-take { margin-top: auto; width: 100%; padding: 9px 0; border-radius: var(--r-pill); font-weight: 800; font-size: 13px; border: 1px solid var(--line); color: var(--text-2); background: rgba(255,255,255,.05); }
.rc-1 { background: linear-gradient(135deg, #1d2848, #131c30); border-color: rgba(255,206,84,.45); box-shadow: var(--glow-gold); }
.rc-1::before { content: "★ ЛУЧШИЙ ВЫБОР"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; color: #1a1205; background: var(--gold-grad); padding: 3px 8px; border-radius: var(--r-pill); box-shadow: 0 4px 12px -4px rgba(245,166,35,.6); z-index: 2; }
.rc-1 .rc-pic { width: 88px; height: 88px; } .rc-1 .rc-pic img { width: 82px; height: 82px; }
.rc-1 .rc-name { font-size: 18px; }
.rc-1 .rc-take { background: var(--gold-grad); color: #241700; border: 0; box-shadow: 0 6px 18px -6px rgba(255,154,0,.6), inset 0 1px 0 rgba(255,255,255,.4); }

/* «другие варианты» и прогнозы соперника — чипы в ряд */
.reco-more { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rm { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-family: inherit; transition: border-color var(--dur), background-color var(--dur); }
.rm:hover { border-color: var(--tier, var(--gold)); background: var(--panel-hi); }
.rm.tier-S { --tier: var(--tier-s); } .rm.tier-A { --tier: var(--tier-a); }
.rm.tier-B { --tier: var(--tier-b); } .rm.tier-C { --tier: var(--tier-c); }
.rm img { width: 30px; height: 30px; object-fit: contain; }
.rm b { font-size: 13px; font-weight: 700; color: var(--text); }
.rm .sc { font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.reco-hint { font-size: 12px; color: var(--muted-2); margin-top: var(--s3); }

/* итоговый экран драфта */
.fin-verdict { font-size: 18px; font-weight: 800; color: var(--text); padding: var(--s3) var(--s4); border-radius: var(--r-slot); background: linear-gradient(135deg, rgba(255,206,84,.10), rgba(255,206,84,.03)); border: 1px solid rgba(255,206,84,.25); }
.fin-verdict.good { color: var(--green); border-color: rgba(43,213,118,.35); background: linear-gradient(135deg, rgba(43,213,118,.10), rgba(43,213,118,.03)); }
.fin-verdict.bad { color: #ff8a96; border-color: rgba(255,93,108,.35); background: linear-gradient(135deg, rgba(255,93,108,.10), rgba(255,93,108,.03)); }
.fin-rows { display: flex; flex-direction: column; gap: var(--s2); }
.fin-row { display: flex; align-items: center; gap: var(--s3); padding: 8px var(--s3); border-radius: var(--r-card); background: var(--panel-2); border: 1px solid var(--line); }
.fin-pic { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.06), var(--bg-1) 70%); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.fin-pic img { width: 42px; height: 42px; object-fit: contain; }
.fin-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fin-main > b { font-size: 14px; color: var(--text); }
.fin-main .tag { align-self: flex-start; }
.fin-build { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fin-it { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.fin-it img { width: 22px; height: 22px; object-fit: contain; }
.fin-gears { font-size: 11.5px; color: var(--muted); }
.fin-wr { margin-left: auto; font-size: 15px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; flex: none; }

/* динамический акцент по фазе: мой ход — светится реко, ход соперника — сетка */
body[data-turn="pick-us"] .reco-stage, body[data-turn="ban-us"] .reco-stage { border-color: rgba(255,206,84,.45); box-shadow: var(--glow-gold), var(--sh-rest); }
body[data-turn="pick-them"] .pool, body[data-turn="ban-them"] .pool { border-color: rgba(255,93,108,.4); box-shadow: 0 0 0 1px rgba(255,93,108,.18), var(--sh-rest); }

/* удаление слота (✕ в углу) */
.slot-del { position: absolute; top: 2px; right: 2px; width: 17px; height: 17px; border-radius: 50%; border: 0; z-index: 4; cursor: pointer; font-size: 9px; font-weight: 900; line-height: 1; color: #fff; background: rgba(10, 14, 24, .88); opacity: 0; transition: opacity var(--dur); padding: 0; }
.slot.filled:hover .slot-del { opacity: 1; }
.slot-del:hover { background: var(--red); }
/* зона тапа шире видимой иконки (17px → 34px, растём внутрь слота) — меньше промахов на телефоне */
.slot-del::after { content: ""; position: absolute; top: -6px; right: -6px; width: 34px; height: 34px; }
@media (hover: none) { .slot.filled .slot-del { opacity: .9; } }

/* hero-рекомендация — одна доминанта на нашем ходе */
.reco-hero { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: center; padding: var(--s4); border-radius: var(--r-lg); margin-bottom: var(--s3); cursor: pointer; background: linear-gradient(135deg, #1d2848, #131c30); border: 1px solid rgba(255, 206, 84, .45); box-shadow: var(--glow-gold); }
.rh-pic { width: 76px; height: 76px; border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .08), var(--bg-1) 70%); border: 1px solid var(--line); border-bottom: 3px solid var(--rar, var(--line)); flex: none; }
.rh-pic img { width: 70px; height: 70px; object-fit: contain; }
.rh-main { min-width: 0; }
.rh-head { display: flex; align-items: center; gap: 8px; }
.rh-name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-take { padding: 11px 16px; border-radius: var(--r-pill); background: var(--gold-grad); font-weight: 800; color: #241700; border: 0; cursor: pointer; font-family: inherit; font-size: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.reco-sub { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin: var(--s2) 0; }

/* цветные точки змейки (чья очередь) */
.steps i.us { border-color: var(--blue); }
.steps i.them { border-color: var(--red); }
.steps i.us.done { background: var(--blue); }
.steps i.them.done { background: var(--red); }
.steps i.now { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* экран выбора карты плитками (Шаг 1) */
.map-picker { max-height: 74vh; overflow-y: auto; padding: 2px 4px 2px 2px; }
.mp-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--text); margin: 2px 0 var(--s4); }
.mp-group { margin-bottom: var(--s5); }
.mp-group-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s3); }
.mp-group-head img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.mp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.mp-tile { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); cursor: pointer; padding: 0; background: var(--bg-1); box-shadow: var(--sh-rest); transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur); }
.mp-tile:hover { transform: translateY(-3px); border-color: var(--mc); box-shadow: var(--sh-hover), 0 0 24px -6px var(--mc); }
.mp-tile:active { transform: translateY(-1px) scale(.99); }
.mp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* карта рейтинга без картинки в справочнике — заливка цветом режима */
.mp-tile.noimg { background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 45%, #10182a), #0c1322); }
.mp-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 8px; font-size: 13px; font-weight: 800; color: #fff; text-align: left; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); background: linear-gradient(0deg, rgba(7, 10, 18, .94), transparent); }

/* hero-баннер: иконка режима + «сменить» */
.map-hero { cursor: pointer; }
.map-hero__mode img { width: 15px; height: 15px; object-fit: contain; }
.map-hero::after { content: "↻ сменить"; position: absolute; top: 8px; right: 10px; z-index: 2; font-size: 10px; font-weight: 700; color: #fff; background: rgba(7, 10, 18, .6); padding: 4px 9px; border-radius: var(--r-pill); backdrop-filter: blur(4px); pointer-events: none; }

/* кнопка ⓘ на карточке бойца */
.bcard { position: relative; }
.bcard-info { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; border: 0; z-index: 3; cursor: pointer; font-size: 11px; font-weight: 800; font-style: italic; font-family: Georgia, "Times New Roman", serif; line-height: 1; color: var(--text-2); background: rgba(10, 14, 24, .82); padding: 0; opacity: 0; transition: opacity var(--dur); }
.bcard:hover .bcard-info { opacity: 1; }
.bcard-info:hover { color: var(--gold); }
/* зона тапа шире видимой иконки (17px → 40px, растём внутрь карточки) — тап по ⓘ не промахивается в пик */
.bcard-info::after { content: ""; position: absolute; top: -6px; left: -6px; width: 40px; height: 40px; }
@media (hover: none) { .bcard-info { opacity: .85; } }

/* нижний шит деталей бойца */
.sheet-backdrop { position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); }
.sheet { position: fixed; left: 50%; bottom: 0; width: 100%; max-width: 460px; z-index: 60; transform: translate(-50%, 100%);
  background: linear-gradient(180deg, var(--panel-1), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--s4); box-shadow: var(--sh-float); transition: transform .22s cubic-bezier(.2, .8, .2, 1); max-height: 84vh; overflow-y: auto; }
.sheet.open { transform: translate(-50%, 0); }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto var(--s3); }
.bs-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.bs-pic { width: 60px; height: 60px; border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .08), var(--bg-1) 70%); border: 1px solid var(--line); flex: none; }
.bs-pic img { width: 56px; height: 56px; object-fit: contain; }
.bs-title { flex: 1; min-width: 0; }
.bs-name { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.bs-class { font-size: 13px; color: var(--muted); }
.bs-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 14px; flex: none; }
.bs-wr-num { font-size: 22px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.bs-wr-lbl { font-size: 12px; color: var(--muted); }
.bs-sub { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin: var(--s3) 0 var(--s2); }
.bs-items { display: flex; gap: var(--s2); flex-wrap: wrap; }
.bs-item { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; flex: 1; min-width: 150px; }
.bs-item img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.bs-item > div { display: flex; flex-direction: column; font-size: 13px; font-weight: 700; min-width: 0; }
.bs-item small { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.bs-gears { margin-top: var(--s2); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bs-opts { font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.bs-opts small { color: var(--muted-2); }
.bs-crow { display: flex; align-items: center; gap: 8px; margin-bottom: var(--s2); }
.bs-crow > small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; flex: none; width: 92px; }
.bs-crow.good > small { color: var(--green); }
.bs-crow.bad > small { color: var(--red); }
.bs-cchips { display: flex; gap: 6px; flex-wrap: wrap; }
.bs-cchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 9px 3px 3px; }
.bs-cchip img { width: 22px; height: 22px; object-fit: contain; }
.bs-pick { margin-top: var(--s4); margin-bottom: 0; }

/* ===== Анимации ===== */
@keyframes pickPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes activePulse { 0%, 100% { box-shadow: 0 0 0 1px var(--gold) inset, 0 0 0 3px rgba(255,206,84,.16), 0 0 14px -2px rgba(255,206,84,.35); } 50% { box-shadow: 0 0 0 1px var(--gold) inset, 0 0 0 4px rgba(255,206,84,.24), 0 0 20px -2px rgba(255,206,84,.55); } }
@keyframes heroIn { from { opacity: 0; transform: scale(1.1); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(255,206,84,.25); } 50% { box-shadow: 0 0 0 4px rgba(255,206,84,.55); } }

/* строка звания с настоящей игровой иконкой (спрайт) */
.rank-row { display: flex; align-items: center; gap: 8px; }
.rank-badge { display: inline-flex; flex: none; }
.rank-badge:empty { display: none; }
.rank-ico { display: inline-block; background: url("../assets/ranks-row.png") no-repeat; background-size: 800% 100%; vertical-align: middle; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }

/* липкий нижний док пика (виден на мобильном) */
.pick-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: none; align-items: center; gap: var(--s3); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(10, 14, 24, .98), rgba(12, 17, 30, .92)); border-top: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 -8px 24px -8px rgba(0, 0, 0, .6); }
.pd-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pd-dot.us { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.pd-dot.them { background: var(--red); box-shadow: 0 0 8px var(--red); }
.pd-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.pd-text b { font-size: 13px; font-weight: 800; color: var(--text); }
.pd-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-undo { flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 16px; cursor: pointer; }
.pd-take { flex: none; border: 0; border-radius: var(--r-pill); padding: 11px 20px; font-weight: 800; font-size: 14px; color: #241700; background: var(--gold-grad); cursor: pointer; box-shadow: 0 4px 14px -4px rgba(255, 154, 0, .6); }

/* ===== Адаптив ===== */
@media (max-width: 1080px) {
  .layout { padding-bottom: 84px; }
  /* табло: карта/фаза/шкала сверху во всю ширину, команды парой под ними */
  .board { grid-template-columns: 1fr 1fr; gap: var(--s3); }
  .board-mid { grid-column: 1 / -1; order: -1; }
  .reco-actions { flex-wrap: wrap; margin-left: 0; }
  .pick-dock:not([hidden]) { display: flex; }
}
@media (max-width: 720px) {
  /* топ-3: №1 крупно, №2–3 строками */
  .reco-top { grid-template-columns: 1fr; }
  .rc:not(.rc-1) { flex-direction: row; text-align: left; padding: var(--s2) var(--s3); }
  .rc:not(.rc-1) .rc-pic { width: 46px; height: 46px; flex: none; }
  .rc:not(.rc-1) .rc-pic img { width: 42px; height: 42px; }
  .rc:not(.rc-1) .rc-name { font-size: 14px; }
  .rc:not(.rc-1) .rc-take { width: auto; margin: 0 0 0 auto; padding: 8px 14px; flex: none; }
  .rc:not(.rc-1) .rec-tags { justify-content: flex-start; }
  .rc:not(.rc-1) .rec-score { position: static; order: 3; }
  .rc:not(.rc-1) .rc-rank { position: static; }
  .pool-controls { flex-wrap: wrap; }
  .pool-controls input { flex: 1 1 100%; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; }
}
@media (max-width: 620px) {
  .header { padding: 10px 14px; gap: 12px; }
  .layout { padding: 14px 14px 84px; gap: 14px; }
  .controls { gap: 10px; width: 100%; }
  #mapSelect { min-width: 0; flex: 1; }
  .slot { width: 42px; height: 42px; }      /* компактнее — табло как сводка */
  .slot.filled img { width: 36px; height: 36px; }
  .tc-count { display: none; }
}
/* низкие десктопные экраны (ноут 1366×768): ужимаем карточки, чтобы верх сетки был виден */
@media (min-width: 1081px) and (max-height: 820px) {
  .rc { padding: var(--s3); gap: 4px; }
  .rc-pic { width: 60px; height: 60px; } .rc-pic img { width: 56px; height: 56px; }
  .rc-1 .rc-pic { width: 70px; height: 70px; } .rc-1 .rc-pic img { width: 66px; height: 66px; }
  .grid { max-height: 38vh; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition-duration: .01ms !important; } }
