/* ---------- шрифты: свои файлы, без сторонних CDN ---------- */
@font-face {
  font-family: "Unbounded"; font-weight: 200 900; font-display: swap;
  src: url("fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded"; font-weight: 200 900; font-display: swap;
  src: url("fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest"; font-weight: 100 900; font-display: swap;
  src: url("fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-weight: 100 900; font-display: swap;
  src: url("fonts/onest-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

/* ---------- токены: молочно-лунный на почти чёрном, акцент один и точечно ---------- */
:root {
  color-scheme: dark;
  --bg: #0c0b10;
  --surface: #141319;
  --surface-2: #1a1920;
  --surface-3: #23222b;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.11);
  --moon: #ece6d6;
  --text: #e6e2d9;
  --text-2: #aaa5b3;
  --muted: #736e7d;

  /* бренд - только логотип, активная вкладка, фокус. Данные - рост и спад */
  --accent: #a6e36e;
  --violet: #a898ff;
  --up: #5d8fe6;
  --down: #d9646f;

  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: radial-gradient(1100px 520px at 50% -18%, rgba(168, 152, 255, 0.07), transparent 70%), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
/* зерно поверх фона: почти незаметно, но убирает «пластиковую» гладкость */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .topbar, .footer { position: relative; z-index: 1; }

/* ---------- фон: сетка монитора и бегущая развёртка по кардиограмме ---------- */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(236, 230, 214, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 230, 214, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  /* сетка видна у верха и растворяется к середине экрана - за карточками её нет */
  mask-image: radial-gradient(120% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 60% at 50% 0%, #000 0%, transparent 75%);
}
.bg svg {
  position: absolute; left: 0; width: 100%; top: 84px; height: 200px; overflow: visible;
  /* слева заголовки: кардиограмма там гаснет, чтобы не проходить сквозь текст */
  mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, #000 60%);
}
.bg path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.bg-line { stroke: rgba(236, 230, 214, 0.06); stroke-width: 1.2; }
/* развёртка: хвост и яркая голова одного отрезка; голова опережает хвост на его длину минус себя */
.bg-trail { stroke: rgba(166, 227, 110, 0.2); stroke-width: 1.6; stroke-dasharray: 0.22 0.78; animation: sweep-trail 9s linear infinite; }
.bg-head { stroke: rgba(166, 227, 110, 0.55); stroke-width: 1.8; stroke-dasharray: 0.02 0.98; animation: sweep-head 9s linear infinite;
           filter: drop-shadow(0 0 4px rgba(166, 227, 110, 0.6)); }
@keyframes sweep-trail { from { stroke-dashoffset: 0.22; } to { stroke-dashoffset: -0.78; } }
@keyframes sweep-head { from { stroke-dashoffset: 0.02; } to { stroke-dashoffset: -0.98; } }

main { max-width: 1240px; margin: 0 auto; padding: 8px 20px 48px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: inherit; }
kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; }

select, input, button {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 7px 11px;
}
input::placeholder { color: var(--muted); }
select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
button { cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
button:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.22); }
:disabled { opacity: 0.45; cursor: not-allowed; }
.primary { background: var(--moon); color: #111; border-color: var(--moon); font-weight: 600; }
.primary:hover:not(:disabled) { background: #fff; }
.ghost { background: transparent; }
.link { background: none; border: none; padding: 0; color: var(--text-2); font-size: 13px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link:hover:not(:disabled) { color: var(--text); text-decoration-color: var(--text-2); }

/* ---------- шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(12, 11, 16, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 15px; font-weight: 400; letter-spacing: 0.02em; }
.brand b { font-weight: 600; margin-left: 2px; }
.brand svg { width: 28px; height: 28px; overflow: visible; }
/* пульс в логотипе прорисовывается при загрузке и при наведении */
.brand .pulse { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 1.4s var(--ease) both; }
.brand:hover .pulse { animation: draw 1.1s var(--ease); }
.switcher-btn { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 280px; color: var(--text-2); background: var(--surface); }
.switcher-btn #switcher-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.switcher-icon { color: var(--muted); font-size: 15px; line-height: 1; }
.account { display: flex; align-items: center; gap: 8px; }
.account .who { color: var(--muted); font-size: 13px; }

/* ---------- анимации ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--ring); } 100% { box-shadow: 0 0 0 10px transparent; } }
.view { animation: fade 0.35s ease both; }
.panel { animation: rise 0.35s var(--ease) both; }
.spark .line { stroke-dasharray: 1; animation: draw 1.2s var(--ease) both; }
.spark .area { animation: fade 1.2s ease both; }

/* ---------- общие блоки ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.card-sub { color: var(--muted); font-size: 13px; margin-top: 4px; max-width: 780px; }
.card > h2 + .card-sub { margin-bottom: 14px; }
.note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.error { background: var(--surface); border: 1px solid var(--down); border-radius: var(--radius); padding: 16px; margin: 16px 0; color: var(--down); }
.split-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.loading { opacity: 0.45; pointer-events: none; transition: opacity 0.2s; }
.chip { font-size: 12px; color: var(--text-2); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; text-decoration: none; }
a.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.chip.warn { color: var(--down); border-color: rgba(217, 100, 111, 0.35); }
.badge { font-size: 11px; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 8px; }
.steam { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); opacity: 0.8; transition: opacity 0.2s, border-color 0.2s; }
.steam:hover { opacity: 1; border-color: rgba(255, 255, 255, 0.3); }
.steam svg { width: 16px; height: 16px; }

/* ---------- главная ---------- */
.hero { padding: 44px 0 30px; max-width: 820px; }
.hero h1 { font-family: var(--display); font-size: clamp(28px, 4.4vw, 46px); line-height: 1.1; margin: 12px 0 14px; font-weight: 500; color: var(--moon); }
.lead { color: var(--text-2); font-size: 16px; max-width: 640px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 28px; }
.hero-stat b { display: block; font-size: 28px; font-weight: 500; color: var(--moon); }
.hero-stat span { color: var(--muted); font-size: 13px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 12px; }
.toolbar .search { flex: 1 1 280px; }
.toolbar label.toggle { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.toolbar input[type="checkbox"] { accent-color: var(--moon); width: 15px; height: 15px; padding: 0; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; font-size: 13px; padding: 5px 11px; color: var(--muted); border-radius: 7px; }
.seg button.active { background: var(--surface-3); color: var(--text); }
.games-count { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.game-card {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  transition: transform 0.25s var(--ease), border-color 0.25s;
  animation: rise 0.45s var(--ease) both;
}
.game-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.16); }
.game-card h3 { font-size: 15px; line-height: 1.3; padding-right: 36px; }
.game-card .steam { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; }
.game-card .steam svg { width: 14px; height: 14px; }
.game-card .genres { color: var(--muted); font-size: 12px; margin-top: -6px; }
.game-card .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.big { font-size: 36px; font-weight: 500; line-height: 1; color: var(--moon); letter-spacing: -0.02em; }
.big small { font-size: 16px; color: var(--text-2); margin-left: 2px; }
.rating { color: var(--text-2); font-size: 12px; }
.llm-mark { font-size: 11px; color: var(--violet); }
.delta { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--muted); }
.spark { width: 100%; height: 44px; display: block; overflow: visible; }

/* список вместо карточек: для тех, кто сравнивает много игр */
.games.list { display: block; }
.games.list .game-card {
  cursor: pointer; flex-direction: row; align-items: center; gap: 16px; border-radius: 0; border-width: 0 0 1px; background: none; padding: 10px 6px; animation-duration: 0.3s; }
.games.list .game-card:hover { transform: none; background: var(--surface); }
.games.list .game-card h3 { flex: 1 1 200px; padding: 0; }
.games.list .genres { display: none; }
.games.list .row { flex: 0 0 260px; }
.games.list .big { font-size: 20px; }
.games.list .spark { flex: 0 0 180px; width: 180px; height: 28px; }
.games.list .foot { flex: 0 0 140px; text-align: right; }
.games.list .steam { position: static; order: -1; flex: none; }
.games.list .row { align-items: center; }

/* ---------- страница игры ---------- */
.game-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 0 16px; }
.back { color: var(--muted); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--text); }
.title-row { display: flex; align-items: center; gap: 14px; margin: 8px 0; }
#game-title { font-family: var(--display); font-size: clamp(26px, 4vw, 42px); line-height: 1.1; font-weight: 500; color: var(--moon); }
.game-meta { color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gauge { flex: none; width: 180px; text-align: center; }
.gauge svg { width: 180px; height: 180px; display: block; }
.gauge-caption { color: var(--text-2); font-size: 13px; margin-top: -16px; }

.digest { border-left: 2px solid var(--violet); padding: 4px 0 4px 18px; margin: 4px 0 20px; max-width: 900px; }
.digest h2 { font-size: 19px; margin: 6px 0 6px; line-height: 1.35; color: var(--moon); }
.digest p { color: var(--text-2); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.tile:has(.spark) { padding-bottom: 42px; }
.tile-label { color: var(--muted); font-size: 12px; }
.tile-value { font-size: 32px; font-weight: 500; line-height: 1.15; margin: 6px 0 2px; color: var(--moon); letter-spacing: -0.02em; }
.tile-note { color: var(--text-2); font-size: 13px; }
.tile-sub { font-size: 12px; margin-top: 6px; color: var(--muted); }
.tile .spark { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; opacity: 0.7; }

.tabs {
  position: sticky;
  top: 58px;
  z-index: 10;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 4px;
  margin-bottom: 18px;
  background: rgba(12, 11, 16, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tabs button { flex: none; border: none; background: none; color: var(--muted); padding: 12px 14px; border-radius: 0; font-size: 14px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
/* индикатор активной вкладки едет к новой, а не перескакивает */
.tabs-indicator { position: absolute; bottom: -1px; left: 0; height: 2px; width: 0; background: var(--accent); border-radius: 2px; transition: transform 0.35s var(--ease), width 0.35s var(--ease); }

.settings { display: flex; gap: 10px; flex-wrap: wrap; }
.settings label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.settings select { font-size: 13px; padding: 5px 9px; }
.chart { min-height: 500px; }

/* ---------- переломы ---------- */
.turns { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.turns-compact { grid-template-columns: 1fr; }
.turn {
  --ring: rgba(255, 255, 255, 0.2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.3s;
  animation: rise 0.4s var(--ease) both;
}
.turn.focus { border-color: var(--turn-color); animation: ping 1s ease-out 2; --ring: color-mix(in oklab, var(--turn-color) 45%, transparent); }
.turn-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.turn-date { font-weight: 600; color: var(--moon); }
.turn-shift { font-weight: 600; font-variant-numeric: tabular-nums; }
.turn-numbers { color: var(--text-2); font-size: 14px; }
.turn-event { font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.turn-text { font-size: 14px; color: var(--text-2); }
.turn-words { font-size: 13px; color: var(--muted); min-height: 20px; }
.turn-words b { color: var(--text-2); font-weight: 500; }
.turn-actions { display: flex; gap: 16px; margin-top: auto; padding-top: 4px; }
.dot { width: 8px; height: 8px; border-radius: 1px; flex: none; transform: translateY(0) rotate(45deg); display: inline-block; }
td .dot { margin-right: 8px; }
.excerpts summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
blockquote { margin: 8px 0; padding: 2px 12px; border-left: 2px solid var(--line-2); color: var(--text-2); font-size: 14px; }

.highlights { display: flex; flex-direction: column; gap: 14px; }
.highlight { display: flex; gap: 12px; align-items: flex-start; animation: rise 0.4s var(--ease) both; }
.highlight-mark { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.highlight b { display: block; font-size: 14px; font-weight: 500; }
.highlight span { color: var(--muted); font-size: 13px; }

.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.pick p { color: var(--text-2); margin-top: 6px; }

/* ---------- слова ---------- */
.words-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.words-col h3 { margin-bottom: 4px; }
.words-col .card-sub { margin: 0 0 10px; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.word {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  animation: rise 0.35s var(--ease) both;
}
.word small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.word:hover:not(:disabled) { border-color: var(--word-color, var(--line-2)); }
.word.rising { border-color: color-mix(in oklab, var(--word-color) 40%, transparent); }
.words-title { font-size: 12px; color: var(--muted); margin: 12px 0 6px; }

/* ---------- темы ---------- */
.callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.callout { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.callout-name { font-size: 20px; font-weight: 500; margin: 4px 0; color: var(--moon); }
.aspect-legend, .aspect { display: grid; grid-template-columns: 1fr 180px 1fr; align-items: center; gap: 12px; }
.aspect-legend { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.aspect-legend div:first-child { text-align: right; }
.aspect { width: 100%; padding: 4px 0; background: none; border: none; border-radius: 8px; font-size: 14px; color: inherit; text-align: inherit; }
.aspect:hover:not(:disabled) { background: var(--surface-2); }
.aspect-name { text-align: center; }
.aspect-side { display: flex; align-items: center; gap: 8px; }
.aspect-side.left { justify-content: flex-end; }
.aspect-num { color: var(--text-2); font-family: var(--mono); font-size: 12px; min-width: 44px; }
.aspect-side.left .aspect-num { text-align: right; }
.bar { height: 8px; border-radius: 4px; min-width: 2px; transform-origin: left; animation: grow 0.7s var(--ease) both; }
.aspect-side.left .bar { transform-origin: right; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar.up { background: var(--up); }
.bar.down { background: var(--down); }
.heat-wrap { overflow-x: auto; }
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.heat th { color: var(--muted); font-weight: 400; padding: 2px 6px; white-space: nowrap; }
.heat tbody th { text-align: right; color: var(--text-2); }
.heat td { min-width: 40px; height: 28px; text-align: center; border-radius: 5px; font-family: var(--mono); color: var(--text); }
.digests { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.digest-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.digest-item h3 { font-size: 14px; margin: 4px 0 6px; line-height: 1.35; }
.digest-item p { color: var(--text-2); font-size: 14px; }
.llm-note { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); }
.llm-note .highlight-mark { color: var(--violet); }

/* ---------- аудитория ---------- */
.audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 28px 44px; }
.segment h3 { margin-bottom: 4px; }
.segment-insight { color: var(--text-2); font-size: 13px; margin-bottom: 10px; }
.segment-row { display: grid; grid-template-columns: 170px 1fr 44px 92px; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.segment-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segment-num { text-align: right; font-family: var(--mono); font-size: 12px; }
.segment-share { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.meter { position: relative; height: 8px; border-radius: 4px; background: color-mix(in oklab, var(--down) 38%, var(--surface)); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--up); transform-origin: left; animation: grow 0.8s var(--ease) both; }

/* ---------- обновления ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 400; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; cursor: pointer; user-select: none; }
.table th[data-sorted]::after { content: " ↓"; color: var(--text-2); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr { cursor: pointer; transition: background 0.15s; }
.table tbody tr:hover { background: var(--surface-2); }
.num { font-family: var(--mono); font-size: 13px; white-space: nowrap; }

/* ---------- отзывы ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 10px 0 16px; }
.filters label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.filters input, .filters select { height: 36px; padding-top: 0; padding-bottom: 0; }
.filters input[name="q"] { width: 180px; }
.reviews { display: flex; flex-direction: column; gap: 10px; }
.review { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; animation: rise 0.3s var(--ease) both; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.vote { font-weight: 600; font-size: 13px; }
.vote.up { color: var(--up); }
.vote.down { color: var(--down); }
.review-text { white-space: pre-line; font-size: 14px; color: var(--text); overflow-wrap: anywhere; cursor: pointer; }
.review-text.clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.review-text mark { background: rgba(236, 230, 214, 0.16); color: var(--moon); border-radius: 3px; padding: 0 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line-2); color: var(--text-2); }
.tag.up { border-color: color-mix(in oklab, var(--up) 45%, transparent); color: var(--up); }
.tag.down { border-color: color-mix(in oklab, var(--down) 45%, transparent); color: var(--down); }
#reviews-more { margin-top: 14px; }

/* ---------- модальные окна ---------- */
.modal {
  width: min(460px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal[open] { animation: rise 0.25s var(--ease) both; }
.modal::backdrop { background: rgba(6, 5, 9, 0.72); backdrop-filter: blur(3px); }
.modal-wide { width: min(880px, calc(100vw - 32px)); }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-error { color: var(--down); font-size: 13px; min-height: 18px; }
body:not([data-login]) .need-login { display: none; }
#topics-empty [data-llm] { margin-top: 14px; }
.collect-status { font-size: 13px; color: var(--muted); min-height: 18px; }
.collect-status.ok { color: var(--up); }
.collect-status.error { color: var(--down); }
.switcher { padding: 10px; top: 12vh; margin-top: 0; width: min(560px, calc(100vw - 32px)); }
.switcher input { width: 100%; font-size: 16px; padding: 11px 14px; background: var(--surface-2); }
.switcher-hint { color: var(--muted); font-size: 11px; padding: 8px 12px 2px; }
.switcher-list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 52vh; overflow-y: auto; }
.switcher-list li { display: grid; grid-template-columns: 1fr 90px 52px; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.switcher-list li small { display: block; color: var(--muted); font-size: 11px; }
.switcher-list li[aria-selected="true"] { background: var(--surface-3); }
.switcher-list .spark { height: 22px; }
.switcher-list .num { text-align: right; }
.aspect-quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.aspect-quotes h3 { margin-bottom: 6px; }
.quote { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; color: var(--text-2); }
.quote small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.months-chart { width: 100%; height: 160px; display: block; margin-top: 12px; }
.months-labels { display: flex; color: var(--muted); font-size: 11px; font-family: var(--mono); }
.months-labels span { flex: 1; text-align: center; }

.footer { max-width: 1240px; margin: 0 auto; padding: 8px 20px 28px; color: #56525f; font-size: 11px; }

/* ---------- узкие экраны ---------- */
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .split-2, .words-grid, .picks { grid-template-columns: 1fr; }
  .gauge { width: 130px; }
  .gauge svg { width: 130px; height: 130px; }
  .aspect-quotes { grid-template-columns: 1fr; }
  .games.list .spark, .games.list .foot { display: none; }
}
@media (max-width: 640px) {
  main { padding: 4px 14px 36px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand span { display: none; }
  .switcher-btn { min-width: 0; flex: 1; }
  .switcher-btn kbd { display: none; }
  .tabs { top: 54px; }
  .game-hero { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tile { padding: 12px 14px; }
  .tile-value { font-size: 24px; }
  .card { padding: 16px; }
  .aspect-legend, .aspect { grid-template-columns: 1fr 110px 1fr; font-size: 13px; }
  .audience { grid-template-columns: 1fr; }
  .segment-row { grid-template-columns: 116px 1fr 40px; }
  .segment-share { display: none; }
  .turns { grid-template-columns: 1fr; }
  .switcher-list li { grid-template-columns: 1fr 52px; }
  .switcher-list .spark { display: none; }
  .games.list .row { flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-trail, .bg-head { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
