@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&display=swap');

:root {
  /* Акцентный шрифт: condensed Oswald для заголовков и чисел (характерный + узкий — длинные слова влезают лучше) */
  --font-display: 'Oswald', 'Roboto', system-ui, sans-serif;
  /* ——— Steam-палитра: сине-стальной графит, голубые акценты, зелёные кнопки ——— */
  --bg: #1b2838;            /* контент Steam */
  --bg-top: #171a21;        /* верхняя плашка/шапка */
  --card: #16202d;          /* база карточки */
  --card-top: #233a52;      /* верх градиента карточки */
  --card2: #2a3f5a;         /* вложенные плашки */
  --card3: #1c2a3a;
  --txt: #c7d5e0;           /* основной текст (светло-голубой) */
  --muted: #7d8a99;
  --steam: #66c0f4;         /* фирменный голубой: заголовки/ссылки */
  --steam-deep: #2a6896;
  --accent: #ff5b6e;        /* «улика/ложь» — красный, пробивает на синем (семантика негатива) */
  --accent2: #3a82c4;       /* вторичный стально-синий (бывш. фиолетовый) — Steam-хром */
  --bad: #ff5b6e;
  --good: #a1cd44;          /* Steam-зелёный */
  --warn: #e6b53d;
  --night: #5a78ff;
  --line: #000913;          /* тёмные разделители (как в Steam) */
  --line-soft: rgba(255, 255, 255, 0.07);
  --hi: rgba(255, 255, 255, 0.06); /* верхний световой кант */
}
/* ——— Сброс стилей (modern reset) ——— */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: none; text-size-adjust: none; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { min-height: 100svh; line-height: 1.55; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; text-wrap: balance; }
p, li, figcaption, blockquote, dd { overflow-wrap: break-word; }
img, svg, canvas, video, picture { display: block; max-width: 100%; }
img, picture { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; background: none; border: none; }
button, [role='button'], label, summary { cursor: pointer; }
textarea { resize: vertical; }
a { color: inherit; text-decoration: none; }
:where(ul, ol) { list-style: none; padding: 0; margin: 0; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--steam); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* Steam-скроллбары: тонкие сине-стальные */
* { scrollbar-width: thin; scrollbar-color: #2c4358 transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.22); }
::-webkit-scrollbar-thumb { background: #2c4358; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3c5a76; background-clip: padding-box; }

body {
  font-family: "Roboto", system-ui, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  background: linear-gradient(180deg, #1b2838 0%, #15202c 55%, #10161e 100%) fixed, var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: pretty; /* мягкие переносы: меньше «висячих» слов и кривых двухстрочников */
}
a:hover { color: var(--steam); }

/* Акцентный шрифт — заголовки, числа, крупные значения */
h1,
.card h2,
.patient-name, .patient-badge,
.big-numbers .n b,
.gauge-val span,
.vital .vi-val,
.promise-stat .big,
.rec .rv,
.dl-game,
.rv-stat-v,
.cs-tag,
.tab-btn,
.rel-ver, .rel-title { font-family: var(--font-display); letter-spacing: 0.3px; }
/* у condensed-чисел чуть крупнее для веса */
.big-numbers .n b { font-size: 27px; letter-spacing: 0.5px; }
.gauge-val span { font-size: 48px; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid #0a0d12;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 12px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #171a21, #141820);
  z-index: 10;
}
h1 span { color: var(--steam); }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.header-right a.btn { text-decoration: none; }
.brand img { width: 52px; height: 52px; border-radius: 12px; background: var(--card2); object-fit: cover; }
h1 { font-size: 20px; margin: 0; }
.sub { color: var(--muted); font-size: 13px; }
.status-pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  background: var(--card2);
  border: 1px solid var(--line);
}
.status-pill.live { background: #3a0f1a; color: #ff5b7e; border-color: #ff3d68; animation: pulse 1.6s infinite; }
.status-pill.ingame { background: #142a18; color: #57d98a; border-color: #2ecc71; }
.status-pill.night { background: #161347; color: #9aa0ff; border-color: var(--night); }
.status-pill.away { background: #2e2410; color: #ffd27f; border-color: var(--warn); }
.status-pill.offline { color: var(--muted); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

main { max-width: min(1820px, 96vw); margin: 0 auto; padding: 22px 24px 64px; }
.quip-banner {
  background: linear-gradient(90deg, #1f3b5a, #16202d);
  border: 1px solid #0c141d;
  border-left: 3px solid var(--steam);
  border-radius: 5px;
  padding: 11px 16px;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; }
.card {
  background: linear-gradient(180deg, #1e2d3e 0%, var(--card) 64px, var(--card) 100%);
  border: 1px solid #0c141d;
  border-radius: 5px;
  padding: 12px 15px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ——— Масонри-раскладка вкладок: карточки плотно заполняют ширину монитора ———
   Компактные карточки тилятся в несколько колонок; широкие (графики, таблицы,
   логи, hero) помечены .full и занимают всю ширину. */
/* Flexbox: карточки в неполном ряду растягиваются на всю ширину (flex-grow),
   а align-items: stretch держит ряд выровненным по высоте — без рваных низов. */
.tab-panel.active { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.tab-panel.active .grid { display: contents; } /* распускаем старые ряды-обёртки в общий поток */
.tab-panel.active > .card,
.tab-panel.active .grid > .card { flex: 1 1 410px; min-width: 0; margin: 0; }
.tab-panel.active .card.full { flex-basis: 100%; }
@media (max-width: 720px) { .tab-panel.active > .card, .tab-panel.active .grid > .card { flex-basis: 100%; } }
.card h2 {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--steam);
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-soft);
}
.card h2 small { color: var(--muted); font-weight: 400; font-size: 11.5px; text-transform: none; letter-spacing: 0; }

.gauge-card { text-align: center; }
.gauge { position: relative; max-width: 230px; margin: 0 auto; }
.gauge-val { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; }
.gauge-val span { font-size: 44px; font-weight: 800; }
.gauge-val small { color: var(--muted); margin-left: 2px; align-self: flex-end; padding-bottom: 8px; }
.verdict { color: var(--muted); margin-top: 6px; font-size: 13px; line-height: 1.4; }

.now-state { font-size: 15px; margin-bottom: 10px; font-weight: 600; line-height: 1.35; }
.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.4; }
.kv li span:first-child { color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.kv li span:last-child { text-align: right; font-weight: 600; overflow-wrap: break-word; }

.big-numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.big-numbers.wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.halfyear-card { background: linear-gradient(135deg, #1f3b5a, #14202c); border-color: #0c141d; }
.halfyear-verdict {
  font-size: 14px;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  padding: 11px 14px;
  margin-bottom: 12px;
  color: #dbeaf5;
}
.halfyear-card .big-numbers .n b { color: var(--steam); }

.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.rec { background: linear-gradient(90deg, #21344a, #18222e); border: 1px solid #0c141d; border-radius: 4px; padding: 12px 14px; }
.rec .rl { color: var(--muted); font-size: 12px; }
.rec .rv { font-size: 20px; font-weight: 700; margin-top: 2px; }
.rec .rs { color: var(--muted); font-size: 12px; margin-top: 2px; }

.bedtime-pred {
  background: linear-gradient(90deg, #161347, #1a1226);
  border: 1px solid #2c2466;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 15px;
}
.bedtime-pred b { color: #9aa0ff; }
.fake-sleeps { display: flex; flex-direction: column; gap: 7px; max-height: 300px; overflow: auto; }
.fake-sleep {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card2);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.4;
}
.fake-sleep > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.fake-sleep .big { color: var(--warn); font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.fake-sleep .when { color: var(--muted); font-size: 12px; }

.promise-stat { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.promise-stat .big { font-size: 34px; font-weight: 800; color: var(--accent); }
.promise-stat .sub { color: var(--muted); font-size: 13px; }
.promises { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.promise {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card2);
  border-left: 3px solid var(--line);
}
.promise.broken { border-left-color: var(--accent); }
.promise.kept { border-left-color: var(--good); }
.promise.pending { border-left-color: var(--warn); }
.promise.confessed { border-left-color: #9b59ff; }
.promise .ic { font-size: 18px; flex-shrink: 0; }
.promise .body { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.promise .q { color: #d7dae6; }
.promise .d { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.promise .when { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ——— Лог стримов ——— */
.streamlog { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.streamlog li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.plat-badge { font-weight: 700; font-size: 11px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.plat-badge.twitch { background: #3a1d6e; color: #c9b6ff; }
.plat-badge.vkplay { background: #123a5a; color: #8fd0ff; }
.streamlog .live-now { color: #ff5b7e; font-weight: 700; }
.streamlog .sl-time { color: var(--muted); }
.streamlog .sl-meta { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ——— Ченджлог ——— */
.changelog { display: flex; flex-direction: column; gap: 22px; }
.rel { border-left: 3px solid var(--accent2); padding-left: 16px; }
.rel-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rel-ver { background: var(--accent2); color: #fff; font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.rel-title { font-weight: 700; font-size: 16px; }
.rel-date { color: var(--muted); font-size: 12px; margin-left: auto; }
.rel-items { list-style: none; margin: 0; padding: 0; }
.rel-items li { display: flex; gap: 10px; padding: 5px 0; font-size: 14px; color: #d7dae6; }
.rel-items .ri { min-width: 20px; }

/* ——— Ачивки ——— */
.achv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.achv {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.achv.locked { opacity: 0.4; filter: grayscale(1); }
.achv.unlocked { border-color: var(--steam-deep); background: linear-gradient(90deg, #1d3046, #16202d); }
.achv .ico { font-size: 30px; }
.achv .t { font-weight: 700; font-size: 14px; }
.achv .d { color: var(--muted); font-size: 12px; }

/* ——— Календарь ——— */
.cal-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 12px; }
.cal-head h2 { margin: 0; min-width: 200px; text-align: center; }
.cal-legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.cal-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; color: var(--muted); font-size: 12px; padding-bottom: 4px; }
.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  min-height: 56px;
}
.cal-cell.empty { background: transparent; border: none; }
.cal-cell.nodata { opacity: 0.4; }
.cal-cell.has { cursor: pointer; transition: transform 0.1s, border-color 0.1s; }
.cal-cell.has:hover { transform: translateY(-2px); border-color: var(--accent2); }
.cal-cell.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 61, 104, 0.4); }
.cal-d { font-size: 13px; color: var(--txt); font-weight: 600; }
.cal-dot { position: absolute; left: 6px; right: 6px; bottom: 22px; height: 6px; border-radius: 3px; }
.cal-meta { margin-top: auto; font-size: 11px; color: var(--muted); }

.sub2 { margin: 18px 0 8px; font-size: 14px; color: var(--muted); }
.gline { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.4; }
.gline > :first-child { min-width: 0; overflow-wrap: break-word; }
.gline > :last-child { flex-shrink: 0; text-align: right; }
@media (max-width: 600px) { .cal-cell { min-height: 46px; padding: 4px; } .cal-meta { font-size: 9px; } }

.table-wrap { overflow-x: auto; }
table.gstats { width: 100%; border-collapse: collapse; font-size: 13px; }
table.gstats th, table.gstats td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.gstats th { color: var(--muted); font-weight: 600; position: sticky; top: 0; }
table.gstats td.g { font-weight: 600; color: var(--txt); white-space: normal; }
table.gstats tr:hover td { background: var(--card2); }
table.gstats .bar { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--steam), var(--steam-deep)); min-width: 4px; }
table.gstats .night { color: var(--steam); }
.big-numbers .n {
  background: linear-gradient(180deg, #2b405a, #1b2937);
  border: 1px solid #0c141d;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 78px;
  text-align: center;
}
.big-numbers .n b { display: block; font-size: 25px; font-weight: 800; line-height: 1.05; color: #e6f0f7; overflow-wrap: anywhere; }
.big-numbers .n small { color: var(--muted); font-size: 11px; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.3px; text-wrap: balance; }

.heatmap { display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 3px; font-size: 10px; }
.heatmap .lbl { color: var(--muted); display: flex; align-items: center; }
.heatmap .cell { aspect-ratio: 1; border-radius: 3px; background: var(--card2); }
.heatmap .hour-lbl { color: var(--muted); text-align: center; }
.heatmap .nightcol { outline: 1px solid rgba(74, 58, 255, 0.35); }

.streams { display: flex; flex-direction: column; gap: 10px; }
.stream {
  background: var(--card2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  border-left: 3px solid var(--accent2);
}
.stream.night { border-left-color: var(--night); }
.stream .tag { display: inline-block; font-size: 11px; color: var(--warn); margin-top: 4px; }
.stream .when { color: var(--muted); font-size: 12px; }

.btn {
  background: linear-gradient(180deg, #3aa0e0 0%, #1f6aa5 100%);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 8px 15px;
  font-size: 12.5px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition: filter 0.12s, background 0.12s;
}
.btn:hover { background: linear-gradient(180deg, #4fb6f2 0%, #2a7fc0 100%); }
.btn-ghost { background: linear-gradient(180deg, #38516a 0%, #243646 100%); border: none; color: #c7d5e0; font-weight: 500; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset; }
.btn-ghost:hover { background: linear-gradient(180deg, #45617c 0%, #2c4357 100%); color: #fff; filter: none; }

.meme-live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.meme-live-head h2 { margin: 0; }
.meme-live-head small { color: var(--muted); font-weight: 400; font-size: 12px; }
.meme-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.meme-live-body { display: grid; grid-template-columns: 300px 1fr; gap: 16px; margin-top: 14px; align-items: start; }
.meme-card-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0c0d12; }
.meme-format { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; pointer-events: none; backdrop-filter: blur(2px); }
.meme-card-wrap img { display: block; width: 100%; height: auto; }
.meme-card-wrap img.flash { animation: cardFlash 0.5s ease; }
@keyframes cardFlash { 0% { opacity: 0.2; transform: scale(0.98); } 100% { opacity: 1; transform: none; } }
@media (max-width: 720px) { .meme-live-body { grid-template-columns: 1fr; } }
.meme-feed { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow: auto; }
.meme-item {
  background: linear-gradient(90deg, #1d2c3e, #1a2330);
  border: 1px solid #0c141d;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  animation: slideIn 0.35s ease;
}
.meme-item .meme-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.meme-item .meme-cat { font-size: 10.5px; font-weight: 700; color: var(--steam); background: rgba(102, 192, 244, 0.12); border: 1px solid rgba(102, 192, 244, 0.25); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.meme-item .meme-time { color: var(--muted); font-size: 11px; }
.meme-item .meme-act { margin-left: auto; color: var(--muted); font-size: 14px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.meme-item .meme-act:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.meme-item .meme-text { cursor: pointer; }
.meme-item .meme-text:hover { color: #fff; }
.meme-item.fresh { box-shadow: 0 0 0 2px rgba(102, 192, 244, 0.4); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select {
  background: var(--card2);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}
.filters .chk { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }

.presence-wrap { max-width: 220px; height: 200px; margin: 0 auto; position: relative; }
.presence-wrap canvas { width: 100% !important; height: 100% !important; }
.presence-legend { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 13px; flex-wrap: wrap; }
.presence-legend b { font-weight: 700; }
.presence-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

.roast-card .roast {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  margin: 0;
  max-height: 340px;
  overflow: auto;
  color: #d7dae6;
}

.days { display: flex; flex-direction: column; gap: 10px; }
.day {
  background: var(--card2);
  border-radius: 8px;
  padding: 9px 12px;
}
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day-date { font-weight: 700; }
.day-strip { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 13px; letter-spacing: 1px; margin: 8px 0; word-break: break-all; }
.day-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 6px 0; background: #0c0d12; }
.day-bar i { display: block; height: 100%; }
.day-bar .ig { background: #2ecc71; }
.day-bar .id { background: #ffb020; }
.day-bar .off { background: #3a3f52; }
.day-meta { font-size: 13px; line-height: 1.6; color: var(--muted); }
.day-meta b { color: var(--txt); }
.day-roast { font-size: 13px; margin-top: 6px; color: #e7d3a8; }

.actlog { list-style: none; padding: 0; margin: 0; max-height: 380px; overflow: auto; font-size: 13px; }
.actlog li { display: flex; align-items: flex-start; gap: 8px 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.actlog .when { flex: 0 0 auto; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.actlog .al-what { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.actlog .al-right { flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding-top: 1px; }
.actlog .al-dur { color: var(--muted); }
.actlog .al-tag { flex: 0 0 auto; font-size: 11px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.actlog .al-tag.stream { background: #3a1d6e; color: #c9b6ff; }
.actlog .al-tag.self { background: var(--card); color: var(--muted); }
.actlog .al-tag.sleep { background: #161347; color: #9aa0ff; }
.actlog .ig { color: #57d98a; }
.actlog .id { color: #ffc452; }
.actlog .off { color: var(--muted); }
@media (max-width: 560px) { .actlog li { flex-wrap: wrap; } .actlog .al-right { margin-left: 0; } }

.timeline { list-style: none; padding: 0; margin: 0; max-height: 380px; overflow: auto; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline .t { color: var(--muted); min-width: 48px; }
.timeline .ic { min-width: 22px; }

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 600px) {
  .heatmap { font-size: 7px; grid-template-columns: 26px repeat(24, 1fr); }
  .quip-banner { font-size: 16px; }
}

/* Двойная жизнь / часовой пояс / долг сна */
.dl-row { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.dl-side { flex: 1 1 200px; background: var(--card2); border-radius: 12px; padding: 14px 16px; border: 1px solid #2a2e3e; }
.dl-side.pub { border-color: #2ecc71; }
.dl-side.sec { border-color: var(--accent2); }
.dl-tag { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dl-game { font-size: 22px; font-weight: 800; margin: 4px 0; }
.dl-num { font-size: 13px; color: var(--muted); }
.dl-vs { align-self: center; font-weight: 800; color: var(--accent); font-size: 18px; }
.ludo-tz { margin-top: 12px; padding: 10px 14px; background: var(--card2); border-radius: 10px; font-size: 14px; }
.sleep-debt { margin-top: 8px; padding: 10px 14px; background: #2a0f16; border: 1px solid var(--accent); border-radius: 10px; font-size: 14px; }
.muted { color: var(--muted); }

/* ——— Мобильная адаптация ——— */
@media (max-width: 680px) {
  header { padding: 12px 16px; gap: 10px; }
  h1 { font-size: 18px; }
  .sub { font-size: 12px; }
  .brand { gap: 11px; }
  .brand img { width: 44px; height: 44px; }
  .header-right { gap: 8px; }
  .header-right .btn { padding: 7px 11px; font-size: 12px; }
  .status-pill { padding: 7px 13px; font-size: 13px; }
  main { padding: 16px 14px 48px; }
  .card { padding: 16px 14px; }
  .quip-banner { padding: 14px 16px; }
  .meme-btns .btn { padding: 7px 11px; font-size: 12px; }
  .big-numbers .n { padding: 12px; }
  .big-numbers .n b { font-size: 25px; }
  .promise-stat .big { font-size: 28px; }
  .dl-game { font-size: 19px; }
  .records { grid-template-columns: 1fr; }
  .cal-head { gap: 10px; }
  .cal-head h2 { min-width: auto; font-size: 16px; }
  footer { padding: 16px 14px 40px; }
}
@media (max-width: 400px) {
  h1 { font-size: 16px; }
  .header-right { width: 100%; }
  .card h2 { font-size: 14px; }
}

.trends-wrap { position: relative; height: 300px; }
.trends-wrap canvas { width: 100% !important; }

.week-compare { margin-top: 12px; padding: 10px 12px; background: var(--card2); border-radius: 8px; font-size: 13px; line-height: 1.45; }

/* Народный фольклор / словарь */
.insight-lines { font-size: 13.5px; line-height: 1.55; }
.insight-lines b { color: #fff; }
.lingo-board { margin-top: 16px; }
.lingo-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.lingo-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; position: relative; padding: 6px 0; min-height: 26px; }
.lingo-lbl { font-size: 13px; z-index: 1; min-width: 0; overflow-wrap: break-word; }
.lingo-n { font-weight: 800; color: #d7b3ff; z-index: 1; }
.lingo-bar { position: absolute; left: 0; bottom: 2px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--steam-deep), #1c2a3a); opacity: 0.55; }
.lingo-n { color: var(--steam); }

/* Кредиты разработчика в подвале */
.credit { color: var(--muted); }
.credit a { color: var(--accent2); text-decoration: none; font-weight: 600; }
.credit a:hover { text-decoration: underline; }

.par-with { color: #c9b6ff; font-size: 11.5px; }

.achv-date { color: #7CF0A8; font-size: 11.5px; margin-top: 4px; }
.achv.locked .achv-date { display: none; }

.par-layers { display: flex; flex-direction: column; gap: 2px; }
.par-layer { font-size: 13px; }
.par-later { color: #ffb020; font-size: 11.5px; }

/* ——— Страница «Рецензия на рецензии» ——— */
.rv-lead { font-size: 15px; line-height: 1.6; color: #d7dae6; margin-bottom: 16px; }
.rv-hl { color: #ffd27f; }
.rv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.rv-stat { background: var(--card2); border-radius: 12px; padding: 14px; text-align: center; }
.rv-stat-v { font-size: 30px; font-weight: 900; color: #d7b3ff; }
.rv-stat-l { font-size: 13px; margin-top: 4px; }
.rv-stat-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rv-quotes { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.rv-quotes blockquote { margin: 0; background: var(--card2); border-left: 3px solid var(--accent2); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; line-height: 1.5; color: #e0d8f5; }
.rv-quotes cite { display: block; color: var(--muted); font-size: 12px; font-style: normal; margin-top: 4px; }
.rv-narrow { font-size: 14px; line-height: 1.6; color: #d7dae6; background: rgba(108,92,231,0.1); border-radius: 10px; padding: 12px 14px; }
.rv-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.rv-num { background: var(--card2); border-radius: 10px; padding: 12px 14px; }
.rv-num-l { font-size: 12px; color: var(--muted); }
.rv-num-v { font-size: 16px; font-weight: 700; margin: 3px 0; }
.rv-num-s { font-size: 12px; color: var(--muted); }
.rv-war { margin-bottom: 16px; }
.rv-war-head { font-weight: 700; margin-bottom: 6px; }
.rv-reply { margin: 0 0 6px; background: #2a0f16; border-left: 3px solid var(--accent); border-radius: 8px; padding: 9px 13px; font-size: 13px; line-height: 1.5; color: #f0d0d8; }
.rv-list { display: flex; flex-direction: column; gap: 10px; }
.rv-item { background: var(--card2); border-radius: 10px; padding: 11px 14px; border-left: 3px solid var(--good); }
.rv-item.not { border-left-color: var(--accent); }
.rv-item-head { font-size: 14px; margin-bottom: 4px; }
.rv-item-text { font-size: 12.5px; color: #b9bccd; line-height: 1.5; }
.rv-up { color: var(--good); }
.rv-down { color: var(--accent); }

/* Автопортрет фоном + разбор по играм + разнообразие */
.rv-portrait {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-repeat: no-repeat; background-position: center 60px; background-size: min(60vw, 520px);
  opacity: 0.05; filter: grayscale(0.2) contrast(1.1);
}
.rv-analysis { margin-top: 7px; font-size: 12.5px; line-height: 1.5; color: #ffd27f; background: rgba(255,210,127,0.07); border-radius: 8px; padding: 7px 11px; }
.rv-verdict-full { font-size: 14px; line-height: 1.65; color: #d7dae6; }
.rv-verdict-full b { color: #fff; }
.rv-genres { display: flex; flex-direction: column; gap: 10px; }
.rv-genre { background: var(--card2); border-radius: 10px; padding: 11px 14px; }
.rv-genre-head { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; }
.rv-genre-head .cnt { color: var(--accent2); }
.rv-genre-games { font-size: 12.5px; color: #b9bccd; }
.rv-genre.big { border-left: 3px solid var(--accent); }

/* Автопортрет — карточка */
.rv-self { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rv-self-img { width: 130px; height: 130px; border-radius: 12px; border: 2px solid var(--accent2); object-fit: cover; flex-shrink: 0; }
.rv-self-text { flex: 1; min-width: 240px; font-size: 14px; line-height: 1.6; color: #d7dae6; }
.rv-self-text p { margin: 0 0 10px; }
.rv-self-text b { color: #fff; }

.rv-self-sum { background: rgba(108,92,231,0.1); border-radius: 8px; padding: 10px 13px; font-weight: 500; color: #e0d8f5; }

.promise a.when:hover { color: var(--txt); text-decoration: underline; }

/* Плавная прокрутка + кнопка «наверх» для длинного дашборда */
html { scroll-behavior: smooth; }
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--accent2); color: #fff; font-size: 22px; line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4); cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.to-top.show { opacity: 0.9; pointer-events: auto; }
.to-top:hover { opacity: 1; transform: translateY(-2px); }

/* Быстрая навигация по длинному дашборду */
.quicknav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.quicknav a {
  font-size: 13px; padding: 6px 13px; border-radius: 999px;
  background: var(--card2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.quicknav a:hover { color: var(--txt); border-color: var(--accent2); }
section[id^="s-"] { scroll-margin-top: 90px; } /* офсет под липкую шапку при переходе по якорю */
@media (max-width: 600px) { .quicknav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } }

/* Вкладки дашборда (разгрузка длинной ленты) */
/* Сегмент-контрол: пилюли в общей подложке, активная — синий градиент */
.tabs { display: inline-flex; gap: 3px; flex-wrap: wrap; margin-bottom: 16px; background: #11181f; border: 1px solid var(--line); border-radius: 11px; padding: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset; }
.tab-btn { font-size: 13px; font-weight: 600; padding: 8px 15px; border-radius: 8px; background: transparent; border: none; color: var(--muted); white-space: nowrap; transition: background 0.13s, color 0.13s; }
.tab-btn:hover { color: #e6f0f7; background: rgba(255, 255, 255, 0.05); }
.tab-btn.active { background: linear-gradient(180deg, #3aa0e0, #1f6aa5); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 1px 4px rgba(0, 0, 0, 0.3); }
.tab-panel { display: none; }
/* активная панель раскладывается сеткой — правила в секции .card (масонри-сетка) */
@media (max-width: 600px) { .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; width: 100%; } }

/* 🪦 Музей мёртвого PvP */
.pvp-verdict { font-size: 15px; line-height: 1.5; margin-bottom: 12px; }
.pvp-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); margin-bottom: 7px; }
.pvp-row .grave { flex: 1; font-weight: 600; }
.pvp-row .grave-h { font-variant-numeric: tabular-nums; color: var(--accent2); font-weight: 700; }
.pvp-row .grave-recent { font-size: 12px; color: var(--muted); min-width: 78px; text-align: right; }

/* ⏳ Live-счётчик «через полчасика» */
.open-promise { padding: 12px 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,61,104,0.16), rgba(255,176,32,0.12)); border: 1px solid rgba(255,61,104,0.35); font-size: 16px; margin-bottom: 12px; }
.open-promise b { font-variant-numeric: tabular-nums; }

/* 🎖 Доска дипломов */
.diploma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.diploma-card { display: flex; flex-direction: column; }
.diploma-card .sub { min-height: 40px; }
.diploma-frame { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin: 10px 0 14px; background: #0c0a12; }
.diploma-frame img { display: block; width: 100%; height: auto; }
.diploma-card .meme-btns { margin-top: auto; }

/* 🌗 Замечание про сон + сегментированный сон */
.sleep-remark { font-size: 15px; line-height: 1.45; margin: 4px 0 10px; color: var(--txt); }
.sleep-segments { margin-top: 8px; }
.sleep-segments .seg-title { color: var(--muted); font-size: 12px; margin: 6px 0 4px; }

/* 🌙 Беспокойный сон — ночные подъёмы на катку */
.restless-sleep { margin: 12px 0; display: flex; flex-direction: column; gap: 7px; }
.restless-sleep .seg-title { color: var(--warn); font-size: 14px; font-weight: 700; }
.restless-sleep .restless-nums { font-size: 13px; color: var(--txt); }
.restless-sleep .restless-latest { color: var(--muted); font-size: 12px; margin-top: 2px; }
.restless-sleep .sleep-remark { font-size: 14px; margin: 4px 0 0; }

/* 🩺 Медкарта пациента — hero-блок на Обзоре */
.patient-card { border: 1px solid var(--warn); background: linear-gradient(180deg, rgba(255,61,104,0.08), var(--card)); }
.patient-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.patient-badge { background: var(--warn); color: #1a0c12; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.3px; }
.patient-name { font-size: 18px; font-weight: 800; }
.patient-diagnosis { font-size: 14px; line-height: 1.4; margin: 2px 0 10px; }
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.vital { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; display: flex; flex-direction: column; gap: 1px; }
.vital.bad { border-color: rgba(255,61,104,0.5); }
.vital .vi-ico { font-size: 15px; line-height: 1; }
.vital .vi-val { font-size: 16px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.vital.bad .vi-val { color: var(--warn); }
.vital .vi-lab { color: var(--muted); font-size: 11.5px; line-height: 1.25; }

/* 🎻/🌙 Карточки-улики */
#ghostedCard, #restlessCard { border-left: 3px solid var(--warn); }

/* 🎭 Кооп на камеру vs соло в захлёб */
.cs-row { display: flex; align-items: stretch; gap: 12px; margin: 8px 0 12px; flex-wrap: wrap; }
.cs-side { flex: 1 1 220px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cs-side.cam { border-color: rgba(102,192,244,0.5); }
.cs-side.solo { border-color: rgba(255,91,110,0.5); }
.cs-tag { font-weight: 800; margin-bottom: 6px; }
.cs-games { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.cs-nums { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.cs-vs { align-self: center; color: var(--muted); font-weight: 800; }

/* 🔥 Чем живёт сейчас (игры за 2 недели) */
.recent-games { margin: 12px 0; }
.recent-games .rg-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rg-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) 3fr auto; align-items: center; gap: 10px; padding: 4px 0; }
.rg-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-bar { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--steam), var(--steam-deep)); min-width: 4px; }
.rg-h { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--steam); font-size: 13px; }

/* 🧮 Разбивка индекса */
.index-how { margin-top: 12px; font-size: 13px; }
.index-how summary { cursor: pointer; color: var(--accent2); font-weight: 600; }
.index-breakdown { margin-top: 10px; }
.ib-lead { color: var(--muted); font-size: 12px; line-height: 1.4; margin-bottom: 10px; }
.ib-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; align-items: center; gap: 8px 10px; margin-bottom: 6px; }
.ib-name { font-weight: 600; font-size: 12px; }
.ib-bar { height: 8px; border-radius: 5px; background: var(--card2); overflow: hidden; }
.ib-bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.ib-val { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; }
.ib-formula { grid-column: 1 / -1; font-size: 11px; margin: -2px 0 4px; }
.ib-total { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }

/* 🗯 Доска обещаний: вердикт + типы */
.promise-verdict { margin-top: 8px; font-size: 14px; font-style: italic; color: var(--txt); }
.ptype-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ptype-chip { font-size: 12px; padding: 4px 9px; border-radius: 20px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); }
.ptype-chip b { color: var(--accent); }

/* Сводка-заголовок блока параллельных игр */
.par-summary { padding: 8px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; }

/* ——— Читаемость: длинные строки/значения не ломают и не «наезжают» ——— */
.verdict { line-height: 1.5; }
.patient-diagnosis, .halfyear-verdict, .week-compare, .day-roast, .sleep-remark,
.stream, .meme-item, .ludo-tz, .sleep-debt, .bedtime-pred, .open-promise,
.pvp-verdict, .promise-verdict, .cs-games, .cs-nums, .cs-tag, .dl-game, .dl-num,
.rec .rv, .timeline li, .streamlog li { overflow-wrap: anywhere; }
/* Любой ряд «лейбл слева — значение справа»: лейбл может сжиматься, значение не наезжает */
.gline, .kv li, .fake-sleep, .pvp-row, .streamlog li { min-width: 0; }
.pvp-row .grave { min-width: 0; overflow-wrap: break-word; }
.cs-side { min-width: 0; }
/* Длинные слова/названия игр нигде не вылезают за блок (0-специфичный :where не ломает остальное) */
.card :where(p, li, span, b, small, div, td, h2, h3, summary, pre) { overflow-wrap: anywhere; }
