/* Dota-тренер. «Ночная карта»: холодная ночь, свет баз в углах (Свет снизу слева, Тьма сверху справа),
   золото аегиса — единственный главный акцент. Зелёный — хорошо и победа, красный — плохо и поражение. */

:root {
  --ink: #08090c;
  --ink-2: #0d0f14;
  --slab: rgba(22, 25, 33, 0.72);
  --slab-solid: #151821;
  --slab-2: rgba(30, 34, 45, 0.7);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eceae4;
  --muted: #8a8f9c;
  --faint: #5d6270;
  --aegis: #e8c27a;
  --aegis-2: #b98a3e;
  --radiant: #4fd1a5;
  --dire: #f2555a;
  --warn: #f2a541;
  --river: #5a8fd6;
  --physical: #f2555a;
  --magical: #9d8cff;
  --pure: #f5d36b;

  /* старые имена, на которые ссылаются графики и разметка */
  --gold: var(--aegis);
  --bad: var(--dire);
  --good: var(--radiant);
  --ember: var(--aegis);
  --fire: linear-gradient(135deg, #f3d595 0%, #e8c27a 45%, #b98a3e 100%);

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --display: "Unbounded", "Manrope", -apple-system, "Segoe UI", sans-serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(.22, 1.2, .36, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --rim: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0.03) 62%, rgba(255, 255, 255, 0.32));
  --lift: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--ink);
  overflow-x: hidden;
}

/* ---------- фон: свет баз и река ---------- */

.backdrop { position: fixed; inset: -20vh -20vw; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .8; will-change: transform; }
.backdrop .radiant { width: 70vw; height: 70vw; left: 8vw; bottom: 10vh; background: radial-gradient(circle, rgba(79, 209, 165, 0.38), transparent 66%); animation: driftA 26s ease-in-out infinite alternate; }
.backdrop .dire { width: 80vw; height: 80vw; right: 4vw; top: 6vh; background: radial-gradient(circle, rgba(242, 85, 90, 0.34), transparent 66%); animation: driftB 30s ease-in-out infinite alternate; }
.backdrop .river { width: 140vw; height: 22vh; left: 0; top: 46%; border-radius: 0; filter: blur(60px); opacity: .22; transform: rotate(35deg); background: linear-gradient(90deg, transparent, rgba(90, 143, 214, 0.45), transparent); }
.backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 40%, transparent 30%, rgba(8, 9, 12, 0.85) 100%); }
@keyframes driftA { to { transform: translate(8vw, -6vh) scale(1.08); } }
@keyframes driftB { to { transform: translate(-6vw, 8vh) scale(.94); } }

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 18px 16px calc(112px + env(safe-area-inset-bottom));
}

/* ---------- типографика ---------- */

h1, h2, .display { font-family: var(--display); letter-spacing: -.02em; }
h1 { font-size: 26px; line-height: 1.12; font-weight: 700; margin: 2px 0 6px; color: var(--text); }
h2 { font-family: var(--sans); font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 30px 2px 12px; color: var(--text); }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; }
.error { color: var(--dire); }
.win-text { color: var(--radiant); }
.loss-text { color: var(--dire); }
b, strong { font-weight: 800; }

/* ---------- плиты (карточки) ---------- */

.card {
  position: relative;
  margin: 12px 0;
  padding: 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015) 60%), var(--slab);
  box-shadow: var(--lift);
  isolation: isolate;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}

.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; padding: 64px 0; }

/* ---------- 3D: наклон за пальцем ---------- */

.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
  will-change: transform;
}
.tilt.tilting { transition: transform .08s linear; }
.tilt .glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; mix-blend-mode: soft-light;
  background: radial-gradient(60% 50% at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.55), transparent 70%);
  opacity: var(--go, 0); transition: opacity .4s ease;
}
.depth-1 { transform: translateZ(18px); }
.depth-2 { transform: translateZ(36px); }

/* ---------- поля и кнопки ---------- */

input, textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: rgba(8, 9, 12, 0.55);
  color: var(--text);
  font: 500 16px/1.4 var(--sans);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { border-color: rgba(232, 194, 122, 0.6); box-shadow: 0 0 0 4px rgba(232, 194, 122, 0.12); }

button {
  position: relative;
  border: 0;
  border-radius: var(--r-md);
  padding: 14px 18px;
  font: 800 15px/1.1 var(--sans);
  letter-spacing: -.005em;
  color: #1a1206;
  cursor: pointer;
  background: linear-gradient(180deg, #f6dda4 0%, #e8c27a 48%, #c9984a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 80, 20, 0.35), 0 10px 24px -8px rgba(232, 194, 122, 0.55);
  transition: transform .35s var(--spring), filter .2s ease, box-shadow .3s ease;
  touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button:active { transform: scale(.965); filter: brightness(1.06); }
button:disabled { opacity: .5; filter: saturate(.6); }
button:focus-visible, .tab:focus-visible, .tabbtn:focus-visible, summary:focus-visible { outline: 2px solid var(--aegis); outline-offset: 3px; }
button.ghost { background: transparent; color: var(--aegis); box-shadow: none; padding: 10px 4px; font-weight: 700; }
button.ghost:active { transform: scale(.98); filter: none; }

/* ---------- шапка приложения ---------- */

.page-head { display: flex; align-items: center; gap: 12px; padding: 6px 2px 8px; }
.page-head h1 { margin: 0; }
.page-head .hero-img { width: 72px; height: 40px; border-radius: 10px; }
/* Шапка главной: Аегис по центру — главный и единственный крупный акцент, под ним название */
.app-top { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 8px 22px; }
.app-top::before { /* луч света сверху, как витрина с трофеем */
  content: ""; position: absolute; top: -40px; left: 50%; width: 240px; height: 230px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 35%, rgba(232, 194, 122, .2), transparent 70%); }
.app-top .aegis { margin: 0 0 16px; }
.app-top .t h1 { margin: 0; font-size: 26px; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff6df, #e8c27a 70%, #b98a3e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-top .t p { margin: 6px auto 0; max-width: 300px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* Аегис чемпионов: раскадровка 3D-модели (48 кадров по кругу) на холсте. --size задаётся на месте использования */
.aegis { --size: 72px; position: relative; width: var(--size); height: var(--size); margin: 0 auto 12px;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; outline: none; }
.aegis.held { cursor: grabbing; }
.aegis:focus-visible { box-shadow: 0 0 0 2px var(--aegis); border-radius: 50%; }
.aegis::after { /* отсвет на «столе» под щитом */
  content: ""; position: absolute; left: 14%; right: 14%; bottom: -10%; height: 16%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(232, 194, 122, .5), rgba(232, 194, 122, .12) 60%, transparent);
  filter: blur(6px); z-index: -1; animation: aegisGlow 6s ease-in-out infinite; }
.aegis-still, .aegis-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  transform: perspective(calc(var(--size) * 5)) rotateX(var(--tx, 0deg)); transition: opacity .25s ease; }
.aegis-canvas { opacity: 0; }
.aegis.ready .aegis-canvas { opacity: 1; }
.aegis.ready .aegis-still { opacity: 0; }
/* «поднял Аегис»: золотая вспышка и кольцо */
.aegis-flash { position: absolute; inset: -30%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 236, 190, .9), rgba(232, 194, 122, .35) 45%, transparent 70%); }
.aegis-flash::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 2px solid rgba(255, 224, 160, .9); opacity: 0; }
.aegis.claim .aegis-flash { animation: aegisFlash .9s ease-out; }
.aegis.claim .aegis-flash::after { animation: aegisRing .9s ease-out; }
.app-top .aegis { --size: 164px; }
.match-empty .aegis { --size: 124px; }
@keyframes aegisGlow { 0%, 100% { opacity: .6; transform: scaleX(.92); } 50% { opacity: 1; transform: scaleX(1.05); } }
@keyframes aegisFlash { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes aegisRing { 0% { opacity: 1; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .aegis::after { animation: none; } }

/* Витрина: живая 3D-модель Sketchfab на весь экран, свет и виды кнопками */
.sc-open, .sc-open body { overflow: hidden; }
.showcase { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  background: radial-gradient(90% 60% at 50% 42%, var(--sc-glow, rgba(232, 194, 122, .2)), transparent 70%), #07080b; animation: fadeIn .25s ease; }
.showcase.light-gold { --sc-glow: rgba(255, 196, 92, .34); }
.showcase.light-night { --sc-glow: rgba(90, 120, 200, .2); }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-head h2 { margin: 0; font-size: 20px; }
.sc-stage { position: relative; flex: 1; min-height: 240px; margin: 8px -16px; }
.sc-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .5s ease; }
.sc-stage.ready iframe { opacity: 1; }
.sc-wait { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center; pointer-events: none; transition: opacity .4s ease; }
.sc-wait img { width: min(62vw, 300px); animation: scBreath 2.4s ease-in-out infinite; }
.sc-stage.ready .sc-wait { opacity: 0; }
.sc-controls { display: grid; gap: 8px; }
.sc-controls .seg-row { margin: 0; }
.sc-claim { width: 100%; }
.sc-credit { margin: 8px 0 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.sc-credit button { padding: 0; background: none; box-shadow: none; color: var(--aegis); font: inherit; text-decoration: underline; }
.showcase.claim::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 40% at 50% 45%, rgba(255, 228, 170, .55), transparent 70%); animation: aegisFlash 1s ease-out both; }
@keyframes scBreath { 50% { transform: scale(1.03); filter: brightness(1.12); } }
.hero-img { width: 64px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--slab-solid); flex: none; }

/* ---------- главная: свежая катка и список ---------- */

.fresh-match {
  display: block; width: 100%; margin: 4px 0 14px; padding: 18px; text-align: left; overflow: hidden;
  border-radius: var(--r-xl); color: var(--text); font: inherit;
  background: radial-gradient(120% 90% at 100% 0%, rgba(79, 209, 165, 0.22), transparent 60%), linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)), var(--slab);
  box-shadow: var(--lift);
}
.fresh-match.loss { background: radial-gradient(120% 90% at 100% 0%, rgba(242, 85, 90, 0.24), transparent 60%), linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)), var(--slab); }
.fresh-match:active { transform: none; filter: none; }
.fresh-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.fresh-hero { font: 700 22px/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 4px; }
.fresh-img { width: 96px; height: 54px; border-radius: 12px; box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.9); }
.fresh-cta { margin-top: 16px; padding: 13px; border-radius: var(--r-md); text-align: center; font-weight: 800; color: #1a1206;
  background: linear-gradient(180deg, #f6dda4, #e8c27a 48%, #c9984a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 24px -8px rgba(232, 194, 122, 0.55); }

.match-item {
  display: block; width: 100%; margin: 8px 0; padding: 12px 14px; text-align: left;
  border-radius: var(--r-md); color: var(--text); font: inherit; font-weight: 500;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)), var(--slab);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px -14px rgba(0, 0, 0, 0.9);
}
.match-item::after { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--radiant); }
.match-item.loss::after { background: var(--dire); }
.match-item .hero-img { width: 60px; height: 34px; }
/* нажатие: плитка проседает в глубину верхним краем, как физическая */
.match-item { transform-origin: 50% 100%; }
.match-item:active { filter: brightness(1.15); transform: perspective(700px) rotateX(7deg) scale(.985); }
.result { font-weight: 800; }

/* ---------- профиль ---------- */

.profile-card { display: flex; align-items: center; gap: 16px; }
.avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; background: var(--slab-solid);
  box-shadow: 0 0 0 2px rgba(232, 194, 122, 0.5), 0 14px 30px -10px rgba(0, 0, 0, 0.9); }
.profile-name { font: 700 21px/1.15 var(--display); letter-spacing: -.02em; }
.rank-medal { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 12px 4px 4px; border-radius: 999px;
  font: 700 13px/1 var(--sans); color: var(--aegis); background: rgba(232, 194, 122, 0.1); }
.rank-medal .pip { width: 26px; height: 26px; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.metric { padding: 12px 6px; border-radius: var(--r-md); text-align: center; background: rgba(8, 9, 12, 0.4); }
.metric b { display: block; font: 700 21px/1.1 var(--display); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.metric span { font-size: 12px; color: var(--muted); }
.form-strip { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.dot { width: 14px; height: 14px; border-radius: 5px; }
.dot.win { background: var(--radiant); box-shadow: 0 0 10px rgba(79, 209, 165, 0.45); }
.dot.loss { background: var(--dire); opacity: .85; }

.hero-stat { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 0; text-align: left; color: var(--text);
  font: inherit; background: transparent; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.hero-stat:last-of-type { border-bottom: 0; }
.hero-stat:active { transform: none; filter: brightness(1.2); }
.hero-stat img { width: 56px; height: 32px; border-radius: 8px; object-fit: cover; }
.hero-stat .hn { font-weight: 700; font-size: 15px; }
.hero-stat .hg { font-size: 12px; color: var(--muted); }
.hero-stat .wr { font: 700 16px/1 var(--display); font-variant-numeric: tabular-nums; }
.hero-stat .wrbar { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin-top: 6px; }
.hero-stat .wrbar > i { display: block; height: 100%; border-radius: 2px; }

.spark { width: 100%; height: auto; display: block; margin-bottom: 10px; overflow: visible; }
.spark polyline { fill: none; stroke: var(--aegis); stroke-width: 2; stroke-linejoin: round; }
.spark circle.w { fill: var(--radiant); }
.spark circle.l { fill: var(--dire); }

/* ---------- шапка разбора: витрина героя ---------- */

.hero-head { padding: 0; overflow: hidden; border-radius: var(--r-xl); }
.hero-banner { position: relative; height: 196px; overflow: hidden; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.hero-banner > img { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); object-fit: cover;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.04);
  filter: saturate(1.15) contrast(1.05); transition: transform .5s var(--ease); }
.tilting .hero-banner > img { transition: transform .08s linear; }
.hero-banner::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0) 20%, rgba(8, 9, 12, 0.55) 62%, rgba(16, 18, 25, 0.98) 100%); }
.hero-title { position: absolute; left: 18px; right: 112px; bottom: 14px; z-index: 2; }
.hero-title h1 { margin: 0 0 6px; font-size: 32px; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6); }
.hero-ring { position: absolute; right: 16px; bottom: 12px; z-index: 2; }
.hero-body { padding: 8px 18px 18px; }
.verdict { font: 600 16px/1.45 var(--sans); color: var(--text); margin: 8px 0 4px; text-wrap: pretty; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 800 12px/1.3 var(--sans); }
.badge.win { color: #062a1e; background: var(--radiant); }
.badge.loss { color: #2b0507; background: var(--dire); }

/* оценка: золотой медальон с объёмом */
.medal {
  --p: 50;
  position: relative; width: 84px; height: 84px; border-radius: 50%;
  transform-style: preserve-3d; animation: medalFloat 6s ease-in-out infinite;
  background: conic-gradient(var(--aegis) calc(var(--p) * 1%), rgba(255, 255, 255, 0.09) 0);
  box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.9), 0 0 30px -8px rgba(232, 194, 122, 0.55);
}
.medal::before { content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #2c2f3a, #12141b 70%); box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.12), inset 0 -6px 12px rgba(0, 0, 0, 0.6); }
.medal::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.45), transparent 32%); mix-blend-mode: soft-light; }
.medal b { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font: 700 24px/1 var(--display); letter-spacing: -.04em; color: #fff; transform: translateZ(14px); }
.medal small { position: absolute; left: 0; right: 0; bottom: 17px; z-index: 1; text-align: center; font: 700 9px/1 var(--sans); color: var(--muted); }
@keyframes medalFloat { 0%, 100% { transform: rotateY(-8deg) rotateX(4deg); } 50% { transform: rotateY(8deg) rotateX(-3deg); } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.stat { padding: 11px 4px; border-radius: var(--r-sm); text-align: center; background: rgba(8, 9, 12, 0.45); }
.stat b { display: block; font: 700 16px/1.15 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); }
.share { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px;
  color: var(--text); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.share svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.advice { margin: 12px 0 4px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; background: rgba(242, 165, 65, 0.1); color: #f6d3a1; }

/* ---------- жидкое стекло: вкладки разбора и нижняя панель ---------- */

.tabs-wrap { position: sticky; top: 8px; z-index: 5; margin: 16px 0 12px; }
.tabs, .tabbar {
  position: relative; isolation: isolate; border: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)), rgba(13, 15, 20, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22), inset 0 -1px 1px rgba(255, 255, 255, 0.05), 0 16px 36px -8px rgba(0, 0, 0, 0.7);
  touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.tabs::before, .tabbar::before, .lens::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.tabs { display: flex; padding: 4px; border-radius: 999px; }
.tab {
  position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; padding: 12px 4px; border-radius: 999px;
  background: transparent; box-shadow: none; color: rgba(236, 234, 228, 0.55); white-space: nowrap;
  font: 700 clamp(11px, 3.2vw, 12.5px)/1 var(--sans); letter-spacing: -.01em; text-align: center; transition: color .3s ease;
}
.tab.hot, .tab.active { color: #fff; }
.tab:active { transform: none; filter: none; }
@media (max-width: 360px) { .tab { font-size: 11px; } }

.lens {
  position: absolute; top: 4px; bottom: 4px; left: 0; z-index: 0; width: 0; border-radius: 999px; pointer-events: none;
  transform: translate3d(0, 0, 0); will-change: transform;
  background: radial-gradient(90% 70% at 30% 0%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0.1));
  -webkit-backdrop-filter: blur(3px) saturate(2) brightness(1.3); backdrop-filter: blur(3px) saturate(2) brightness(1.3);
  box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.45), inset -2px -3px 5px rgba(255, 255, 255, 0.14), 0 6px 20px rgba(0, 0, 0, 0.4), 0 6px 24px rgba(232, 194, 122, 0.18);
  transition: box-shadow .35s ease;
}
.lens::after { content: ""; position: absolute; left: 12%; right: 12%; top: 3px; height: 38%; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent); }
.pressed .lens { box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.6), inset -2px -3px 6px rgba(255, 255, 255, 0.2), 0 10px 28px rgba(0, 0, 0, 0.45), 0 8px 30px rgba(232, 194, 122, 0.32); }
.pressed .tab.active:not(.hot), .pressed .tabbtn.active:not(.hot), .pressed .tabbtn.active:not(.hot) span { color: rgba(236, 234, 228, 0.55); }

.tabbar {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%); width: min(560px, calc(100% - 24px));
  display: flex; padding: 5px; border-radius: 30px;
}
.tabbar .lens { top: 5px; bottom: 5px; }
.tabbtn {
  position: relative; z-index: 1; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 4px; border-radius: 26px; background: transparent; box-shadow: none;
  color: rgba(236, 234, 228, 0.55); font: 700 11px/1 var(--sans); transition: color .3s ease;
}
.tabbtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--spring); }
.tabbtn.hot, .tabbtn.active { color: #fff; }
.tabbtn.active svg { stroke: var(--aegis); }
.tabbtn.hot svg { transform: scale(1.1); }
.pressed .tabbtn.hot svg { transform: scale(1.2); }
.tabbtn.disabled { opacity: .35; }
.tabbtn:active { transform: none; filter: none; }

/* ---------- обзор: тренер ---------- */

.who { display: inline-flex; gap: 4px; margin: 2px 2px 4px; font-size: 13px; color: var(--muted); }

.coach {
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: radial-gradient(120% 70% at 0% 0%, rgba(232, 194, 122, 0.14), transparent 55%), linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)), var(--slab);
}
.coach-title { font: 700 15px/1.2 var(--display); letter-spacing: -.02em; color: var(--aegis); }
.coach-btn { width: 100%; padding: 16px; }
.coach-thinking .coach-btn { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { filter: brightness(1.15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 34px -6px rgba(232, 194, 122, 0.8); } }
.coach-note { margin: 0; color: var(--muted); }
.coach-label { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.coach-label + .coach-main, .coach-label + .coach-steps { margin-top: -6px; }
.coach-main { margin: 0; font: 700 20px/1.35 var(--sans); letter-spacing: -.015em; text-wrap: pretty; }
.coach-moment { position: relative; padding: 14px 14px 14px 16px; border-radius: var(--r-md); background: rgba(8, 9, 12, 0.4); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.coach-moment::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--dire); }
.coach-moment p { margin: 0; }
.coach-moment time { display: block; margin-bottom: 4px; font: 700 15px/1.2 var(--display); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.coach-moment .coach-facts { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.coach-moment .coach-todo { margin-top: 8px; }
.coach-moment .coach-todo b { color: var(--radiant); font-weight: 800; }
.coach-more { margin-top: 10px; padding: 8px 12px; border-radius: 999px; font: 700 12px/1 var(--sans); color: var(--aegis); background: rgba(232, 194, 122, 0.1); box-shadow: none; }
.coach-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.coach-steps::before { content: ""; position: absolute; left: 11px; top: 18px; bottom: 18px; width: 1px; background: linear-gradient(180deg, var(--aegis), rgba(232, 194, 122, 0.15)); }
.coach-step { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 9px 0; text-align: left; color: var(--text);
  font: 600 15px/1.45 var(--sans); background: transparent; box-shadow: none; border-radius: 0; }
.coach-step:active { transform: none; filter: none; }
.coach-mark { position: relative; flex: none; width: 23px; height: 23px; margin-top: -1px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 2px var(--aegis); transition: transform .3s var(--spring); }
.coach-mark::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--aegis); transform: scale(0); transition: transform .3s var(--spring); }
.coach-step[aria-pressed="true"] { color: var(--muted); }
.coach-step[aria-pressed="true"] .coach-step-text { text-decoration: line-through; text-decoration-color: rgba(232, 194, 122, 0.6); }
.coach-step[aria-pressed="true"] .coach-mark::after { transform: scale(1); }
.coach-step:active .coach-mark { transform: scale(.88); }
.coach-fresh > [style*="--i"], .coach-fresh .coach-steps > li { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }

/* ---------- чат ---------- */

.chat { display: flex; flex-direction: column; gap: 12px; }
.chat-hint { margin: -6px 0 0; color: var(--muted); }
.chat-list { display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 88%; padding: 11px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; animation: rise .35s var(--ease) both; }
.chat-msg.user { align-self: flex-end; color: #1a1206; font-weight: 600; background: linear-gradient(180deg, #f3d595, #e2b866); border-bottom-right-radius: 6px; }
.chat-msg.assistant { align-self: flex-start; background: rgba(8, 9, 12, 0.5); border-bottom-left-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.chat-msg.typing { display: flex; gap: 5px; padding: 15px 16px; }
.chat-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite ease-in-out; }
.chat-msg.typing i:nth-child(2) { animation-delay: .15s; }
.chat-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chip { flex: none; padding: 10px 14px; border-radius: 999px; font: 700 13px/1 var(--sans); color: var(--text); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line-2); }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { flex: 1; min-height: 48px; max-height: 120px; resize: none; padding: 13px 16px; border-radius: 18px; }
.chat-send { flex: none; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 16px; }
.chat-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chat-note:empty { display: none; }

/* ---------- проблемы, сильные стороны, мелочи ---------- */

.problem { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.problem-num { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font: 700 15px/1 var(--display); color: var(--dire); background: rgba(242, 85, 90, 0.12); }
.problem-title { font: 800 16px/1.3 var(--sans); margin-bottom: 4px; }
.problem-fact { font-size: 14px; color: var(--muted); }
.problem-action { margin-top: 10px; padding: 11px 13px; border-radius: var(--r-sm); font-size: 14px; background: rgba(79, 209, 165, 0.08); }
.problem-action::before { content: "Что делать: "; color: var(--radiant); font-weight: 800; }
.strength { margin: 8px 2px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; background: rgba(79, 209, 165, 0.07); }
.strength b { color: var(--radiant); }

details.finding { padding: 12px 0; border-top: 1px solid var(--line); }
details.finding:first-child { border-top: 0; padding-top: 2px; }
details > summary { cursor: pointer; list-style: none; position: relative; padding-right: 26px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; position: absolute; right: 4px; top: 7px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .25s ease; }
details[open] > summary::after { transform: rotate(45deg); }
details.timeline-box > summary { font-weight: 800; }
.finding.bad > summary { color: var(--text); }
.finding .tip { margin-top: 8px; font-size: 14px; color: var(--muted); }
.finding.bad { --mark: var(--dire); }
.finding.warn { --mark: var(--warn); }
.finding.good { --mark: var(--radiant); }
.finding > summary::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 0; border-radius: 50%; background: var(--mark, var(--muted)); }

/* оценки по разделам */
.score-row { display: grid; grid-template-columns: 96px 1fr 26px; align-items: center; gap: 12px; margin: 12px 0; }
.score-row > span:first-child { font-size: 14px; color: var(--muted); }
.score-row b { text-align: right; font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.score-row.trend { grid-template-columns: 1fr auto 24px; }
.score-row.hist { grid-template-columns: 1fr auto 20px; margin: 10px 0; }
.score-row.hist em { display: block; font-style: normal; font-size: 11px; }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; transition: width .8s var(--ease); }
.hist-box > summary { margin-bottom: 4px; }

/* ---------- фазы и хронология ---------- */

.phase { padding-left: 20px; }
.phase::after { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--warn); }
.phase.good::after { background: var(--radiant); }
.phase.bad::after { background: var(--dire); }
.phase-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font: 700 15px/1.3 var(--display); letter-spacing: -.02em; }
.phase.good .phase-title .small { color: var(--radiant); }
.phase.bad .phase-title .small { color: var(--dire); }
.phase-title .small { font-family: var(--sans); font-weight: 700; color: var(--warn); }
.phase p { color: var(--muted); font-size: 14px; }
.phase-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.phase-stats b { color: var(--text); font-variant-numeric: tabular-nums; }

.timeline { position: relative; margin: 10px 0 0 4px; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)); }
.moment { position: relative; display: block; margin: 12px 0; font-size: 14px; }
.moment::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px var(--ink-2); }
.moment.bad::before { background: var(--dire); box-shadow: 0 0 0 3px var(--ink-2), 0 0 12px rgba(242, 85, 90, 0.7); }
.moment.warn::before { background: var(--warn); }
.moment.good::before { background: var(--radiant); box-shadow: 0 0 0 3px var(--ink-2), 0 0 12px rgba(79, 209, 165, 0.6); }
.moment.item::before { background: var(--aegis); border-radius: 2px; transform: rotate(45deg); }
.moment time { margin-right: 8px; font: 700 13px/1 var(--display); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.moment.askable { width: 100%; padding: 8px 10px; margin: 4px 0 4px -10px; width: calc(100% + 10px); text-align: left; color: var(--text); font: 500 14px/1.45 var(--sans); background: transparent; box-shadow: none; border-radius: var(--r-sm); }
.moment.askable::before { left: -12px; top: 13px; }
.moment.askable:active { transform: none; background: rgba(255, 255, 255, 0.05); }
.moment.askable::after { content: "Спросить"; float: right; margin-left: 8px; font-size: 11px; font-weight: 800; color: var(--aegis); }

/* линия минута в минуту */
.lane-duel table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lane-duel th, .lane-duel td { padding: 9px 4px; text-align: right; font-size: 14px; border-bottom: 1px solid var(--line); }
.lane-duel tr:last-child th, .lane-duel tr:last-child td { border-bottom: 0; }
.lane-duel th:first-child { text-align: left; font-family: var(--display); font-size: 13px; color: var(--muted); font-weight: 600; }
.lane-duel thead th { color: var(--muted); font: 700 12px/1 var(--sans); }
.lane-duel td b { font-weight: 700; }
.lane-duel .delta { display: block; margin-top: 2px; font-size: 12px; font-weight: 800; }

/* ---------- кто убивал ---------- */

.killer-head { display: flex; align-items: center; gap: 14px; }
.killer-head .hero-img { width: 76px; height: 43px; border-radius: 10px; box-shadow: 0 0 0 2px rgba(242, 85, 90, 0.45), 0 12px 24px -10px rgba(242, 85, 90, 0.6); }
.killer-name { font: 700 18px/1.2 var(--display); letter-spacing: -.02em; }
.dmg-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.06); margin: 14px 0 8px; }
.dmg-bar > i { display: block; height: 100%; }
.Physical { background: var(--physical); }
.Magical { background: var(--magical); }
.Pure { background: var(--pure); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.sub { margin: 18px 0 6px; font: 800 13px/1 var(--sans); color: var(--muted); }
.source { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.source:last-child { border-bottom: 0; }
.source b { font-variant-numeric: tabular-nums; }
.source.control { flex-wrap: wrap; row-gap: 6px; }
.source.control em { font-style: normal; color: var(--muted); font-size: 12px; }
.ctl-tags { flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
.ctl-tags i { font-style: normal; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.ctl-tags i.yes { color: var(--radiant); background: rgba(79, 209, 165, 0.12); }
.ctl-tags i.no { color: var(--dire); background: rgba(242, 85, 90, 0.12); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, 0.06); }
.chip img { width: 30px; height: 22px; border-radius: 6px; object-fit: cover; }
.chip.need { background: rgba(232, 194, 122, 0.12); color: var(--aegis); }
.why-row { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }

/* ---------- миникарта ---------- */

.map-card { display: flex; flex-direction: column; gap: 12px; }
.minimap { width: 100%; max-width: 380px; aspect-ratio: 1; align-self: center; border-radius: 18px; transform: perspective(900px) rotateX(14deg); transform-origin: 50% 100%;
  box-shadow: 0 30px 40px -24px rgba(0, 0, 0, 0.95); }
.mm-river { fill: none; stroke: rgba(90, 143, 214, 0.26); stroke-width: 9; stroke-linecap: round; }
.mm-lane { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.mm-base.radiant { fill: rgba(79, 209, 165, 0.16); stroke: rgba(79, 209, 165, 0.6); stroke-width: .8; }
.mm-base.dire { fill: rgba(242, 85, 90, 0.16); stroke: rgba(242, 85, 90, 0.6); stroke-width: .8; }
.mm-death path { stroke: var(--dire); stroke-width: 1.7; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(242, 85, 90, 0.9)); }
.mm-ward { fill: none; stroke: var(--aegis); stroke-width: 1; opacity: .8; }
.mm-ward.mine { fill: var(--aegis); stroke: none; opacity: 1; filter: drop-shadow(0 0 2px rgba(232, 194, 122, 0.8)); }
.mm-ward.dewarded { stroke: var(--dire); stroke-dasharray: 1.5 1; }
.legend .lg-ward { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--aegis); background: transparent; vertical-align: -1px; }
.legend .lg-ward.mine { background: var(--aegis); }
.legend .lg-ward.dewarded { border-color: var(--dire); border-style: dashed; }

/* ---------- сборка ---------- */

.plan-fact { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.plan-item { display: grid; grid-template-columns: 26px 46px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.plan-item img { width: 46px; height: 34px; border-radius: 8px; object-fit: cover; }
.plan-num { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: none; font: 700 12px/1 var(--display); color: var(--aegis); background: rgba(232, 194, 122, 0.12); }
.plan-name { font-weight: 800; font-size: 15px; }
.tag { margin-left: 8px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--aegis); background: rgba(232, 194, 122, 0.12); }
.build-row { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.build-row:last-of-type { border-bottom: 0; }
.build-row img { width: 46px; height: 34px; border-radius: 8px; object-fit: cover; }
.build-row.missing img { filter: grayscale(1) brightness(.5); }
.build-row .bar { margin-top: 6px; height: 4px; }
.build-status { font: 700 13px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.build-status.have { color: var(--radiant); }
.build-status.miss { color: var(--dire); }
.item-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.item-row img { width: 46px; height: 34px; border-radius: 8px; object-fit: cover; }
.item-row time { margin-left: auto; font: 700 13px/1 var(--display); font-variant-numeric: tabular-nums; }
.timing-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timing-row:last-of-type { border-bottom: 0; }
.timing-row img { width: 46px; height: 34px; border-radius: 8px; object-fit: cover; }
.timing-row b { font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; }

/* ---------- графики ---------- */

.chart { width: 100%; height: auto; display: block; overflow: visible; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.chart .tt { font-size: 10.5px; fill: var(--text); font-weight: 700; }
.chart .tt-title { fill: var(--aegis); }
.chart .tt-death { fill: var(--dire); }
.chart text { fill: var(--muted); font-size: 10px; }
.chart .grid { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }

/* ---------- сравнение каток ---------- */

.compare-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.compare-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; color: var(--text); font: 700 14px/1.2 var(--sans);
  border-radius: var(--r-sm); background: rgba(8, 9, 12, 0.45); box-shadow: inset 3px 0 0 var(--radiant); }
.compare-item.loss { box-shadow: inset 3px 0 0 var(--dire); }
.compare-item:active { transform: scale(.98); filter: none; }
.hero-img.small { width: 44px; height: 26px; border-radius: 6px; }
.compare-out p { margin: 8px 0; }

/* ---------- драфт ---------- */

.seg-row { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: var(--r-md); background: rgba(8, 9, 12, 0.5); }
.seg { flex: 1; padding: 11px; border-radius: var(--r-sm); background: transparent; box-shadow: none; color: var(--muted); font-weight: 800; }
.seg[aria-pressed="true"] { color: #1a1206; background: linear-gradient(180deg, #f3d595, #e2b866); }
.seg:active { transform: none; }
.draft-chosen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; gap: 6px; margin-bottom: 14px; }
.draft-pick { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; background: transparent; box-shadow: none; color: var(--text); font: 700 10.5px/1.2 var(--sans); text-align: center; }
.draft-pick .hero-img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 9px; box-shadow: 0 0 0 2px rgba(242, 85, 90, 0.6); }
.draft-pick.empty { aspect-ratio: 16 / 9; border-radius: 9px; background: rgba(8, 9, 12, 0.4); box-shadow: inset 0 0 0 1px var(--line-2); }
.draft-go { width: 100%; }
/* Сетка героев как в Доте: блоки атрибутов, вертикальные портреты по 6 в ряд (универсальные на широком экране — по 4) */
.draft-grid { display: grid; gap: 18px; margin-top: 12px; }
@media (min-width: 900px) { .draft-grid { grid-template-columns: 6fr 6fr 6fr 4fr; gap: 22px; } .attr-block.all .attr-tiles { grid-template-columns: repeat(4, 1fr); } }
.draft-attr { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #e9e4dc;
  font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.draft-attr i { width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--attr);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .35), 0 0 8px color-mix(in srgb, var(--attr) 60%, transparent); }
.attr-block.str { --attr: radial-gradient(circle at 35% 30%, #ff8a6a, #c4301c 60%, #6e160b); }
.attr-block.agi { --attr: radial-gradient(circle at 35% 30%, #a6f08a, #2fa63f 60%, #10521a); }
.attr-block.int { --attr: radial-gradient(circle at 35% 30%, #9fe2ff, #2a8fd6 60%, #0e3e6e); }
.attr-block.all { --attr: conic-gradient(#e0503c 0 33%, #4cc764 0 66%, #3fa6ea 0); }
.attr-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.draft-hero { padding: 0; border-radius: 3px; overflow: hidden; min-width: 0; background: #0b0d12;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 2px 6px rgba(0, 0, 0, .55); transition: transform .12s, filter .12s; }
.draft-hero:active { transform: scale(.94); }
.draft-hero:disabled { filter: grayscale(1) brightness(.5); opacity: 1; }
.hero-vert { display: block; width: 100%; height: auto; aspect-ratio: 235 / 272; object-fit: cover; }
.hero-vert.wide { object-position: 50% 30%; }
.img-missing { opacity: 0; }
/* шапка (номер, герой, имя) в строку, объяснения под ней на всю ширину: на узком экране текст не жмётся в столбик */
.draft-row { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.draft-row > .grow { display: contents; }
.draft-row .draft-why, .draft-row .small.muted { grid-column: 1 / -1; }
.draft-row .plan-num, .draft-row .hero-img { flex: none; margin-top: 2px; }
.draft-why { margin: 6px 0 0; line-height: 1.45; color: var(--text-2, inherit); }
.draft-why b { color: var(--gold, inherit); font-weight: 700; }
.draft-row .small.muted { margin-top: 6px; }
.draft-row:last-of-type { border-bottom: 0; }
.draft-row .hero-img { width: 60px; height: 34px; }
.draft-row .hn { font-weight: 800; }
.draft-row > b { font: 700 16px/1 var(--display); }

/* ---------- шторка «Поделиться» ---------- */

.sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4, 5, 7, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadeIn .25s ease both; }
.sheet { width: 100%; max-width: 600px; max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--slab-solid);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 -20px 60px rgba(0, 0, 0, 0.6); animation: sheetIn .4s var(--spring) both; }
@keyframes sheetIn { from { transform: translateY(60px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-grip { width: 40px; height: 4px; margin: 0 auto 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); }
.sheet-preview { display: grid; place-items: center; min-height: 220px; perspective: 900px; }
.sheet-preview img { width: 46%; max-width: 230px; border-radius: 16px; transform: rotateY(-14deg) rotateX(6deg); box-shadow: 30px 30px 60px -20px rgba(0, 0, 0, 0.9); animation: cardIn .7s var(--spring) both; }
@keyframes cardIn { from { transform: rotateY(-40deg) rotateX(14deg) translateY(20px); opacity: 0; } }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.sheet-btn, .sheet-close { width: 100%; }
.sheet-btn.ghost { background: rgba(255, 255, 255, 0.07); color: var(--text); padding: 14px 18px; }

/* ---------- состояния ---------- */

.spinner {
  width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--aegis));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.match-empty { text-align: center; padding: 56px 16px; }
.match-empty .aegis { margin-bottom: 22px; }

/* появление экрана: из глубины */
.fade-in { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.985); } }
.slide-from-right { animation: slideR .42s var(--spring) both; }
.slide-from-left { animation: slideL .42s var(--spring) both; }
/* вкладки разбора: соседняя страница выезжает, развернувшись в глубину, как грань куба */
@keyframes slideR { from { opacity: 0; transform: perspective(1200px) translateX(36px) rotateY(-9deg); } }
@keyframes slideL { from { opacity: 0; transform: perspective(1200px) translateX(-36px) rotateY(9deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .backdrop i { animation: none; }
  .tilt { transform: none; }
}

/* правки по скриншотам */
.badge { margin-right: 8px; }
.row > h2 { margin: 30px 2px 12px; }
.row > button.ghost { margin-top: 18px; }
.draft-entry { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 6px; padding: 14px 16px; text-align: left; color: var(--text);
  border-radius: var(--r-lg); background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)), var(--slab); box-shadow: var(--lift); }
/* иконка драфта: золотая плитка с фаской, при нажатии переворачивается к тебе */
.draft-entry .de-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .7), transparent 40%), linear-gradient(160deg, #f6dda4, #c9984a 60%, #8d6428);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(90, 60, 15, .45), 0 8px 16px -6px rgba(232, 194, 122, .55);
  transition: transform .45s var(--spring); }
.draft-entry:active .de-icon { transform: perspective(300px) rotateY(-28deg) rotateX(10deg); }
.draft-entry .de-icon svg { width: 22px; height: 22px; stroke: #3a2608; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.draft-entry b { display: block; font-size: 15px; }
.draft-entry span { font-size: 13px; color: var(--muted); font-weight: 600; }
.draft-entry::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
/* фон body перекрывал свет баз (z-index: -1): фон держит html */
body { background: transparent; }
.draft-pick { width: 100%; align-items: stretch; }
.draft-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- прогресс: задачи, ачивки, неделя ---------- */
.goal-card { display: flex; flex-direction: column; gap: 14px; }
.goal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.goal-head b { flex: none; white-space: nowrap; }
.goal-result p, .goal-next p { margin: 0; font-weight: 700; }
.goal-result { padding: 12px 14px; border-radius: var(--r-md); background: rgba(8, 9, 12, 0.45); }
.goal-result.done { background: rgba(79, 209, 165, 0.1); }
.goal-result.done .goal-head b { color: var(--radiant); }
.goal-result.failed { background: rgba(242, 85, 90, 0.1); }
.goal-result.failed .goal-head b { color: var(--dire); }
.goal-result .small { margin-top: 4px; font-weight: 600; }
.goal-next .goal-head span { color: var(--aegis); }
.goal-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.goal-row i { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--dire); }
.goal-row.done i { background: var(--radiant); }
.goal-row b { font-variant-numeric: tabular-nums; }
.goals .goal-next { margin-bottom: 8px; }

.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ach { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px; border-radius: var(--r-lg);
  font: 500 14px/1.3 var(--sans); color: var(--text); text-align: left; background: var(--slab); box-shadow: var(--lift); opacity: .75; }
.ach:active { transform: scale(.98); filter: none; }

/* монета: две стороны в 3D, ребро из теней */
.coin { position: relative; display: block; width: 44px; height: 44px; margin-bottom: 8px; transform-style: preserve-3d;
  transition: transform .7s var(--spring); }
.coin-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .14), transparent 45%), #1b1d24;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1), inset 0 -3px 6px rgba(0, 0, 0, .5), 0 6px 12px -4px rgba(0, 0, 0, .7); color: var(--muted); }
.coin-face svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.coin-back { transform: rotateY(180deg); font: 800 12px/1 var(--sans); font-variant-numeric: tabular-nums; }
.ach.on .coin-face { color: #3a2608;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .8), transparent 26%), conic-gradient(from 200deg, #f6dda4, #b98a3e, #f3d595, #8d6428, #f6dda4);
  box-shadow: inset 0 0 0 3px rgba(120, 80, 20, .45), inset 0 0 0 5px rgba(246, 221, 164, .55), 0 8px 18px -6px rgba(232, 194, 122, .6); }
.ach.on .coin { animation: coinSpin 9s var(--ease) infinite; }
.coin-delay-1 .coin { animation-delay: 2.2s !important; }
.coin-delay-2 .coin { animation-delay: 4.4s !important; }
.coin-delay-3 .coin { animation-delay: 6.6s !important; }
.ach.flip .coin { animation: none; transform: rotateY(180deg); }
@keyframes coinSpin { 0%, 82% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
.ach.on { opacity: 1; background: radial-gradient(100% 80% at 0% 0%, rgba(232, 194, 122, 0.16), transparent 60%), var(--slab); }
.ach b { font-size: 14px; }
.ach > span:not(.coin) { font-size: 12px; color: var(--muted); line-height: 1.35; }
.ach em { margin-top: auto; padding-top: 6px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); }
.ach.on em { color: var(--aegis); }
.ach-bar { height: 4px; margin-top: 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.ach-bar i { display: block; height: 100%; border-radius: 2px; }

.week-mistake { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 4px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(242, 85, 90, 0.08); }
.week-mistake span { font-size: 12px; font-weight: 800; color: var(--dire); }
.week-mistake em { font-style: normal; font-size: 12px; color: var(--muted); }
.week-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 8px; }
.week-match { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; text-align: left; color: var(--text); font: 700 14px/1.2 var(--sans);
  border-radius: var(--r-md); background: rgba(8, 9, 12, 0.45); box-shadow: none; }
.week-match:active { transform: scale(.98); filter: none; }

/* ---------- друзья ---------- */
.leaderboard { display: flex; flex-direction: column; }
.leader-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.leader-row:last-child { border-bottom: 0; }
.leader-row .grow { display: flex; flex-direction: column; gap: 2px; }
.leader-row > b { font: 700 16px/1 var(--display); font-variant-numeric: tabular-nums; }
.leader-row.me .grow b { color: var(--aegis); }
.leader-remove { width: 32px; height: 32px; padding: 0; border-radius: 10px; color: var(--muted); background: rgba(255, 255, 255, 0.05); box-shadow: none; font-size: 18px; }
.friend-add { margin-top: 12px; }

/* ---------- реплей: позиции ---------- */
.mm-heat { fill: var(--aegis); opacity: .28; }
.mm-path { fill: none; stroke: rgba(242, 85, 90, 0.75); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 1.4; }
.replay-card { display: flex; flex-direction: column; gap: 10px; }
.replay-btn { width: 100%; }
.zones { display: flex; flex-direction: column; gap: 8px; }
.zone-row { display: grid; grid-template-columns: 72px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.zone-row b { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.zone-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.zone-bar i { display: block; height: 100%; }
.zone-bar i.own, .lg-zone.own { background: var(--radiant) !important; }
.zone-bar i.river, .lg-zone.river { background: var(--river) !important; }
.zone-bar i.enemy, .lg-zone.enemy { background: var(--dire) !important; }
.legend .lg-zone { border-radius: 3px; }
.death-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.death-row time { font: 700 13px/1 var(--display); font-variant-numeric: tabular-nums; }
.death-row.alone .grow { color: var(--dire); font-weight: 700; }
.death-row b { font-weight: 700; color: var(--muted); }
