/* Фидодром: вид — образец design/mockup-v2 («как будто ты внутри Доты», язык dota2.com в нашем плоском чиби-стиле):
   глубина светом и слоями, заголовки в 5–9 раз крупнее текста, широкие полосы вместо панелей, мало рамок — рамка
   только у того, что нажимают, одна «горящая» кнопка на экран. Шрифты — свои (public/fonts, SIL OFL 1.1):
   Vollkorn SC и Vollkorn — заголовки, Onest — текст. Токены ниже общие для портала и игр: модули игр
   (public/games/*.js) рисуют разметку со своими классами, а цвета, шрифты и формы берут отсюда — поэтому игра
   выглядит частью сайта. */

/* ---------------------------------------------------------------- шрифты (кириллица и латиница отдельно) */

@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/onest-latin.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: 'Vollkorn'; font-style: normal; font-weight: 600 700; font-display: swap; src: url(/fonts/vollkorn-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Vollkorn'; font-style: normal; font-weight: 600 700; font-display: swap; src: url(/fonts/vollkorn-latin.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: 'Vollkorn SC'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/vollkorn-sc-600-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Vollkorn SC'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/vollkorn-sc-600-latin.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: 'Vollkorn SC'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/vollkorn-sc-700-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Vollkorn SC'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/vollkorn-sc-700-latin.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: 'Vollkorn SC'; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/vollkorn-sc-900-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Vollkorn SC'; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/vollkorn-sc-900-latin.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; }

/* ---------------------------------------------------------------- токены */

:root {
  /* тьма — от самой глубокой; ночь и фиолет — свет неба */
  --ink-0: #040507;
  --ink-1: #08090d;
  --ink-2: #0d1016;
  --ink-3: #141821;
  --ink-4: #1c212c;
  --night: #16193d;
  --violet: #4a3a8a;

  --text: #f3ecda;
  --text-2: #d2cab7;
  --muted: #9aa1ab;
  --dim: #646d79;
  --line: rgba(243, 236, 218, 0.1);
  --line-2: rgba(243, 236, 218, 0.18);

  /* два света: тёплый (костёр, лампа, главная кнопка) и холодный (луна) */
  --gold: #d6a23f;
  --gold-hi: #f1d18a;
  --gold-deep: #6f5214;
  --cream: #f4ead0;
  --ember: #ff6a3d;
  --ember-2: #ff8a4c;
  --ember-deep: #cf2f1c;
  --fire: #ffb54a;
  --frost: #8ed2ff;
  --action: #ff6a3d;
  --action-deep: #cf2f1c;
  --red: #c9432f;
  --red-hi: #ff6a4f;
  --red-deep: #5e1710;
  --bad-text: #ff8a76;
  --green: #5fbf6a;
  --green-hi: #8ad883;
  --green-deep: #1d451b;

  /* поверхности: табло, управление, строки внутри (игры) */
  --bg: var(--ink-1);
  --panel: #0b0e14;
  --panel-glass: rgba(11, 13, 19, 0.82);
  --panel-hi: rgba(243, 236, 218, 0.04);
  --panel-2: var(--ink-3);
  --panel-3: var(--ink-4);

  --radius: 3px;
  --radius-sm: 2px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  --display: 'Vollkorn SC', 'Vollkorn', Georgia, serif;
  --title: 'Vollkorn', Georgia, serif;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- основа */

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--ink-0); -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--ink-0);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
b { font-weight: 700; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.center { text-align: center; }

/* ---------------------------------------------------------------- типографика */

/* заголовки — Vollkorn SC прописными, с разрядкой, как на dota2.com */
h1, h2, h3, .display {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* строка над заголовком: ромб, капс, разрядка, золото */
.kicker {
  display: inline-flex; align-items: center; gap: 11px;
  font: 600 12px/1.25 var(--body); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-hi);
}
.kicker::before { content: ''; width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); flex: none; }
.kicker.plain::before { display: none; }
/* заголовок в два яруса: мелкая строка капсом + крупная */
.title { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 0.95; letter-spacing: 0; }
.title .small {
  display: block; margin-bottom: 0.18em;
  font-size: clamp(20px, 2.3vw, 34px); font-weight: 600; letter-spacing: 0.2em; line-height: 1.1; color: var(--text-2);
}
.title .big { display: block; font-size: clamp(56px, 8.6vw, 138px); letter-spacing: 0.025em; color: var(--text); overflow-wrap: anywhere; }
/* слово не влезло даже уменьшенным шрифтом (public/fit.js) — тогда переносим, чтобы не вылезало за край */
.fit-break { overflow-wrap: anywhere !important; }
.title.md .big { font-size: clamp(44px, 6vw, 92px); }
.title.sm .small { font-size: clamp(16px, 1.6vw, 24px); }
.title.sm .big { font-size: clamp(34px, 4.2vw, 60px); }
.title.xs .small { font-size: 15px; letter-spacing: 0.18em; }
.title.xs .big { font-size: clamp(30px, 3vw, 42px); }
.shadowed { text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 12px 48px rgba(0, 0, 0, 0.65); }
/* короткая красная черта под заголовком */
.rule { display: block; width: 76px; height: 3px; margin: 26px 0; background: linear-gradient(90deg, var(--ember), var(--ember-deep)); box-shadow: 0 0 18px rgba(255, 106, 61, 0.55); }
.center .rule { margin-inline: auto; }
.lead { margin: 0; max-width: 34em; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6; color: var(--text-2); }
.lead b { color: var(--text); font-weight: 600; }
.center .lead { margin-inline: auto; }
.error { color: var(--bad-text); min-height: 20px; margin: 10px 0 0; font-size: 14px; }
.error:empty { min-height: 0; margin: 0; }
.note { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- кнопки */

/* контур, как у Доты; главная — огненная (оранжево-красная, как огонь и сумка курьера) */
.btn {
  appearance: none; position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 18px 10px;
  border: 1.5px solid rgba(243, 236, 218, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(4, 5, 7, 0.4);
  color: var(--text);
  font: 700 14px/1.1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.25s, color 0.25s, filter 0.25s;
}
.btn:hover { border-color: var(--text); background: rgba(243, 236, 218, 0.08); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:disabled:hover { border-color: rgba(243, 236, 218, 0.45); background: rgba(4, 5, 7, 0.4); color: var(--text); }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn small { font: 500 12px/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.btn-sm { gap: 7px; padding: 8px 12px 7px; border-width: 1px; font-size: 12px; letter-spacing: 0.1em; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { padding: 14px 24px 13px; font-size: 15.5px; }
.btn-xl { padding: 18px 30px 17px; font-size: 17px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(243, 236, 218, 0.06); border-color: var(--line-2); transform: none; }
.btn-icon { padding: 7px; font: 700 16px/1 var(--body); letter-spacing: 0; }
.btn-primary {
  border: 1px solid rgba(255, 214, 170, 0.7);
  background: linear-gradient(180deg, #ff8a52 0%, #f0552c 48%, #c92c19 100%);
  color: #fff8ec;
  text-shadow: 0 1px 0 rgba(120, 20, 0, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(90, 12, 0, 0.35), 0 10px 26px rgba(207, 47, 28, 0.35);
}
.btn-primary:hover {
  border-color: #ffe1c0; color: #fff;
  background: linear-gradient(180deg, #ff9b64 0%, #ff6236 48%, #d7331d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(90, 12, 0, 0.35), 0 14px 34px rgba(255, 90, 40, 0.5);
}
/* погасший огонь: кнопка есть, но сейчас не нажать */
.btn-primary:disabled, .btn-primary:disabled:hover { opacity: 1; border-color: rgba(255, 138, 82, 0.3); background: rgba(207, 47, 28, 0.12); color: rgba(255, 248, 236, 0.5); text-shadow: none; box-shadow: none; }
/* «горящая» — одна на экран: крупная, с кольцом света и бликом, который пробегает по ней */
.btn-fire {
  padding: 21px 36px 20px; font-size: 19px; letter-spacing: 0.12em; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(90, 12, 0, 0.35),
              0 14px 34px rgba(207, 47, 28, 0.45), 0 0 0 5px rgba(255, 106, 61, 0.12);
}
.btn-fire::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.4) 50%, transparent 65%) -200% 0 / 200% 100% no-repeat;
  animation: glint 5.5s 2s ease-in-out infinite;
}
@keyframes glint { 0%, 70% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.btn-fire:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(90, 12, 0, 0.35), 0 18px 44px rgba(255, 90, 40, 0.55), 0 0 0 7px rgba(255, 106, 61, 0.16); }
.btn-fire svg.i { fill: currentColor; stroke: none; font-size: 17px; }
.btn-gold { border-color: var(--gold); background: rgba(214, 162, 63, 0.08); color: var(--gold-hi); }
.btn-gold:hover { border-color: var(--gold-hi); background: rgba(214, 162, 63, 0.14); color: #fff4d6; box-shadow: 0 0 24px rgba(214, 162, 63, 0.3); }
.btn-gold:disabled:hover { border-color: var(--gold); background: rgba(214, 162, 63, 0.08); color: var(--gold-hi); box-shadow: none; }
.btn-green {
  border: 1px solid var(--green-hi); color: #fff;
  background: linear-gradient(180deg, #7fd179, #3f8f4a); text-shadow: 0 1px 0 rgba(0, 50, 10, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 40, 10, 0.3), 0 10px 24px rgba(63, 143, 74, 0.3);
}
.btn-green:hover { filter: brightness(1.08); border-color: #b0eca9; color: #fff; }
.btn-red {
  border: 1px solid #f08a76; color: #fff;
  background: linear-gradient(180deg, #d9533c, #8e2518); text-shadow: 0 1px 0 rgba(80, 10, 0, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -3px 0 rgba(60, 5, 0, 0.3), 0 10px 24px rgba(142, 37, 24, 0.35);
}
.btn-red:hover { filter: brightness(1.1); border-color: #ffb3a6; color: #fff; }
.btn-danger { border-color: rgba(201, 67, 47, 0.7); color: var(--bad-text); }
.btn-danger:hover { border-color: var(--red-hi); color: #ffb3a6; background: rgba(201, 67, 47, 0.1); }

.link {
  appearance: none; border: 0; background: none; padding: 2px 0;
  color: var(--gold-hi); cursor: pointer; font: inherit; font-size: 14px; text-decoration: underline;
  text-decoration-color: rgba(241, 209, 138, 0.35); text-underline-offset: 3px;
}
.link:hover { text-decoration-color: currentColor; }
.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
/* ссылка-стрелка: капс, разрядка, стрелка уезжает при наведении */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12.5px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-2);
  transition: color 0.2s;
}
.link-arrow:hover { color: var(--text); }
.link-arrow svg.i { font-size: 16px; transition: transform 0.25s var(--ease); }
.link-arrow:hover svg.i { transform: translateX(4px); }

/* ---------------------------------------------------------------- поля */

input, select, textarea {
  min-width: 0;
  padding: 11px 13px;
  background: rgba(4, 5, 7, 0.6);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { border-color: rgba(241, 209, 138, 0.75); background: rgba(4, 5, 7, 0.8); box-shadow: 0 0 0 3px rgba(241, 209, 138, 0.12); }
select option { background: var(--ink-3); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font: 600 11.5px/1.2 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.code-input {
  width: 124px; text-align: center; text-transform: uppercase;
  font: 700 19px/1 var(--body); letter-spacing: 0.3em; padding: 10px 8px 10px calc(8px + 0.3em);
}
.code-row { display: flex; gap: 8px; }
.code-row .btn { flex: 1; }
kbd {
  font: 600 12px/1 var(--body);
  padding: 3px 7px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  background: var(--panel-3); color: var(--text);
}

/* ---------------------------------------------------------------- метки и значки */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: rgba(4, 5, 7, 0.55);
  border: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 500; line-height: 1.35;
  white-space: nowrap;
}
.chip svg.i { font-size: 14px; }
.chip.good { border-color: rgba(95, 191, 106, 0.55); color: var(--green-hi); }
.chip.bad { border-color: rgba(201, 67, 47, 0.6); color: var(--bad-text); }
.chip.empty { color: var(--muted); border-style: dashed; background: transparent; }
.chip.new { border-color: rgba(255, 106, 61, 0.6); color: var(--ember-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.badge-good { background: rgba(95, 191, 106, 0.14); color: var(--green-hi); border: 1px solid rgba(95, 191, 106, 0.45); }
.badge-bad { background: rgba(201, 67, 47, 0.14); color: var(--bad-text); border: 1px solid rgba(201, 67, 47, 0.5); }
.badge-muted { background: var(--panel-3); color: var(--muted); border: 1px solid var(--line); }
.badge-secret { background: rgba(214, 162, 63, 0.12); color: var(--gold-hi); border: 1px solid rgba(214, 162, 63, 0.45); }
.badge-soon {
  align-self: flex-start;
  padding: 5px 11px;
  border: 1px solid rgba(214, 162, 63, 0.5); border-radius: var(--radius-sm);
  background: rgba(214, 162, 63, 0.1);
  font: 600 11px/1 var(--body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-hi);
}
.tag { flex: none; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 6px; border-radius: var(--radius-sm); }
.tag-admin { background: rgba(214, 162, 63, 0.18); color: var(--gold-hi); }
.tag-host { background: var(--panel-3); color: var(--gold-hi); }
.tag-me { background: var(--panel-3); color: #b9c3d9; }
.tag-off { background: var(--panel-3); color: var(--muted); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); flex: none; animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { opacity: 0.45; } }

/* ---------------------------------------------------------------- переключатель (фильтр, вкладки гардероба) */

.seg { display: flex; }
.seg button {
  appearance: none; margin-left: -1px; padding: 9px 13px;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  font: 600 13px/1 var(--body); color: var(--text-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.seg button:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.seg button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.seg button:hover { background: rgba(243, 236, 218, 0.06); color: #fff; }
.seg button.on { position: relative; background: rgba(214, 162, 63, 0.18); border-color: rgba(241, 209, 138, 0.6); color: var(--gold-hi); }

/* ---------------------------------------------------------------- панели: свет сверху-слева вместо рамки-коробки */

.panel {
  position: relative;
  background: linear-gradient(160deg, rgba(243, 236, 218, 0.05), rgba(243, 236, 218, 0) 55%), var(--panel-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 18px 20px 10px;
}
.panel-head h2 { font-size: 19px; letter-spacing: 0.08em; color: var(--text); }
.panel-head h1 { font-size: 28px; letter-spacing: 0.06em; color: var(--text); }
.panel-head small { font: 600 11px/1.3 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.panel-body { padding: 8px 20px 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 2px 12px; }
.section-head h2 { font-size: 22px; letter-spacing: 0.08em; }
.section-head small { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

/* список «скоро» (профиль) */

/* появление при прокрутке: полоса [data-reveal] получает .in (public/scenes.js), её .reveal выплывают по очереди.
   translate, а не transform — чтобы не спорить с подъёмом плиток при наведении (--tr — их собственный переход). */
[data-reveal] .reveal { opacity: 0; translate: 0 26px; transition: opacity 0.9s var(--ease) var(--rd, 0s), translate 0.9s var(--ease) var(--rd, 0s), var(--tr, visibility 0s); }
[data-reveal].in .reveal { opacity: 1; translate: none; }
.d1 { --rd: 0.08s; }
.d2 { --rd: 0.16s; }
.d3 { --rd: 0.24s; }
.d4 { --rd: 0.32s; }

/* ---------------------------------------------------------------- шапка */

/* над артом (главная, «Играть», «Скоро») — прозрачная, после прокрутки и на остальных страницах — плотная (.solid) */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(16px, 2.4vw, 32px);
  padding: 0 clamp(16px, 2.4vw, 36px);
  transition: background 0.35s, box-shadow 0.35s, height 0.35s;
}
.nav::before { /* на прозрачной шапке — лёгкое затемнение сверху, чтобы читались пункты над артом */
  content: ''; position: absolute; inset: 0 0 -30px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 7, 0.7), transparent); transition: opacity 0.35s;
}
.nav.solid { background: rgba(6, 7, 10, 0.9); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav.solid::before { opacity: 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 42px; height: 42px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
.brand span { font: 700 25px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.tabs { display: flex; justify-content: center; gap: clamp(8px, 1.8vw, 30px); min-width: 0; }
.tab {
  position: relative; padding: 10px 2px;
  font: 600 17px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: #cfc8b6;
  white-space: nowrap; transition: color 0.2s;
}
.tab::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--ember); box-shadow: 0 0 12px var(--ember); transform: scaleX(0); transition: transform 0.3s var(--ease);
}
.tab:hover { color: var(--text); }
.tab:hover::after { transform: scaleX(0.5); }
.tab.on { color: #fff; }
.tab.on::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.room-pill:not(.hidden) ~ .nav-cta { display: none; } /* в комнате — «Комната КОД» вместо «Играть» */

/* «ты в комнате» — вернуться из любой вкладки */
.room-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 13px 7px;
  border: 1px solid rgba(95, 191, 106, 0.5); border-radius: var(--radius-sm);
  background: rgba(95, 191, 106, 0.1);
  font: 600 12px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: #cfe9cc;
  white-space: nowrap; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.room-pill:hover { border-color: var(--green-hi); background: rgba(95, 191, 106, 0.16); color: #fff; box-shadow: 0 0 18px rgba(95, 191, 106, 0.25); }
.room-pill b { font: 700 15px/1 var(--body); letter-spacing: 0.22em; color: #fff; }
.room-pill .pill-game { letter-spacing: 0.06em; text-transform: none; font-size: 13px; color: var(--text-2); }

/* аккаунт: «Войти» — строка капсом; вошёл — голова курьера с ником и меню */
.account-slot { display: flex; align-items: center; min-width: 0; }
.btn.acct-login {
  padding: 8px 2px; border: 0; background: none; box-shadow: none;
  font: 600 12.5px/1 var(--body); letter-spacing: 0.24em; color: var(--text-2);
}
.btn.acct-login:hover { background: none; color: #fff; transform: none; }
.acct { position: relative; display: flex; min-width: 0; }
.acct-btn {
  appearance: none; display: inline-flex; align-items: center; gap: 10px; max-width: 220px;
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--text);
}
.acct-btn:hover .acct-nick { color: #fff; }
.acct-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px/1.1 var(--title); letter-spacing: 0.02em; }
.avatar {
  flex: none; width: 40px; height: 40px;
  border: 1px solid rgba(241, 209, 138, 0.6); border-radius: 50%;
  background: var(--art-head, none) center 70% / 118% no-repeat, radial-gradient(circle at 50% 30%, #2a303a, #14171c);
  box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.12), 0 4px 12px rgba(0, 0, 0, 0.45);
}
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 14px); z-index: 60;
  min-width: 260px;
  display: flex; flex-direction: column;
  padding: 8px;
  background: linear-gradient(160deg, rgba(243, 236, 218, 0.05), transparent 60%), rgba(9, 10, 14, 0.97);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.acct-who { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-who b { font: 700 19px/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.acct-who span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.acct-menu button, .acct-menu a {
  appearance: none; border: 0; background: none; text-align: left; cursor: pointer;
  display: block; padding: 10px; border-radius: var(--radius-sm); font-size: 14.5px;
}
.acct-menu button:hover, .acct-menu a:hover, .acct-menu button:focus-visible, .acct-menu a:focus-visible { background: rgba(243, 236, 218, 0.06); color: #fff; outline: none; }

/* медаль и сторона рядом с ником */
.me-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--line-2); border-radius: 40px;
  background: rgba(4, 5, 7, 0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.me-chip:hover { border-color: rgba(241, 209, 138, 0.6); box-shadow: 0 0 16px rgba(214, 162, 63, 0.2); }

/* ---------------------------------------------------------------- страница */

main.site { position: relative; flex: 1; width: 100%; isolation: isolate; overflow-x: clip; }
/* страницы без сцены: сверху — ночное небо и тёплый отсвет, а не плоская заливка */
main.site::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 640px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1000px 440px at 50% -120px, rgba(74, 58, 138, 0.32), transparent 70%),
    radial-gradient(640px 320px at 8% -40px, rgba(214, 162, 63, 0.1), transparent 70%),
    linear-gradient(180deg, var(--ink-1), var(--ink-0));
}
body.over-art main.site::before { display: none; }
.page.boxed { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; padding: calc(var(--nav-h) + 34px) 0 72px; }
/* заголовок страницы: строка + крупный заголовок + черта */
.page-head { margin-bottom: 30px; }
.page-head .title { margin-top: 14px; }
.page-head .rule { margin: 22px 0 0; }

/* ---------------------------------------------------------------- подвал */

.footer { padding: 56px 0 60px; border-top: 1px solid var(--line); background: var(--ink-0); color: var(--dim); font-size: 13.5px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; align-items: center; }
.footer .brand img { width: 34px; height: 34px; }
.footer .brand span { font-size: 19px; }
.footer nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer nav a { color: var(--muted); }
.footer a:hover { color: var(--text-2); }

/* нижняя панель — телефон (ниже, «телефон») */
.bottombar { display: none; }

/* ---------------------------------------------------------------- окна: ник, вход, компания, «Поделиться» */

.modal, .auth {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  padding: 16px;
  background: radial-gradient(80% 60% at 50% 30%, rgba(22, 25, 61, 0.55), rgba(4, 5, 7, 0.88));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  animation: fade-in 0.25s ease-out;
}
@keyframes fade-in { from { opacity: 0; } }
.modal-card, .auth-card {
  position: relative;
  width: min(100%, 440px);
  display: flex; flex-direction: column; gap: 14px;
  padding: 30px 26px 24px;
  background: linear-gradient(160deg, rgba(243, 236, 218, 0.06), transparent 50%), #0b0d12;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(241, 209, 138, 0.06);
  animation: card-in 0.35s var(--ease);
}
.modal-card::before, .auth-card::before { /* тонкая огненная черта сверху */
  content: ''; position: absolute; left: 26px; top: -1px; width: 64px; height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--ember-deep)); box-shadow: 0 0 14px rgba(255, 106, 61, 0.55);
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.modal-card h2, .auth-step h2 { font-size: 30px; letter-spacing: 0.05em; color: var(--text); padding-right: 30px; }
.modal-card p, .auth-step p { margin: 0; }
.modal-card > .kicker, .auth-step > .kicker { margin-bottom: -4px; }
.modal-x, .auth-close { position: absolute; top: 12px; right: 12px; }
.auth-step { display: flex; flex-direction: column; gap: 14px; }
.auth-step .error, .modal-card .error { margin: 0; }
.auth-consent { font-size: 12.5px; color: var(--muted); }
.auth-consent a { color: var(--gold-hi); text-decoration: underline; text-decoration-color: rgba(241, 209, 138, 0.35); }
.auth-code { width: 100%; text-align: center; font: 700 30px/1 var(--body); letter-spacing: 0.4em; padding: 14px 10px 14px calc(10px + 0.4em); }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- уведомления */

.conn, .toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 75;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14.5px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
}
.conn { background: rgba(60, 18, 12, 0.95); border: 1px solid var(--red); }
/* Сайт обновляется (выкатка — public/app.js): не «нет связи», а спокойное золотое «вернёмся через пару секунд» */
.conn.conn-update {
  display: flex; align-items: center; gap: 10px; width: max-content;
  /* непрозрачно: под полосой на телефоне — поле ввода, текст не должен просвечивать */
  background: linear-gradient(90deg, rgb(58, 44, 19), rgb(10, 11, 15) 55%);
  border-color: rgba(241, 209, 138, 0.55); font-weight: 600;
}
.spin {
  flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(241, 209, 138, 0.28); border-top-color: var(--gold-hi);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Объявленное обновление: полоса под шапкой на любой странице — отсчёт, «партии сохранятся»; потом «Сайт обновился» */
.site-update {
  position: fixed; top: calc(var(--nav-h) + 8px); left: 50%; z-index: 70;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px);
  padding: 7px 16px 7px 12px; border-radius: 999px;
  background: linear-gradient(90deg, rgb(62, 47, 20), rgb(10, 11, 15) 45%);
  border: 1px solid rgba(241, 209, 138, 0.5);
  box-shadow: 0 0 0 4px rgba(214, 162, 63, 0.08), 0 14px 34px rgba(0, 0, 0, 0.55);
  font: 600 13.5px/1.3 var(--body); color: var(--text);
  transform: translateX(-50%); animation: fade-in 0.3s var(--ease);
}
.site-update svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--gold-hi); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-update .btn { margin: -3px -9px -3px 2px; }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.toast {
  background: linear-gradient(90deg, rgba(214, 162, 63, 0.16), rgba(9, 10, 14, 0.97) 60%);
  border: 1px solid var(--line-2); border-left: 3px solid var(--gold-hi);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease);
  transform: translate(-50%, 10px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* в комнате — в шапке, на месте вкладок (они на это время прячутся): ни рука, ни поле ассоциации, ни кнопки игры
   под тостом не оказываются; на узком экране — на всю шапку */
body.in-room .toast {
  top: calc((var(--nav-h) - 46px) / 2); bottom: auto; z-index: 55;
  display: flex; align-items: center; justify-content: center; min-height: 46px; width: max-content; max-width: min(620px, 100% - 660px);
  padding: 8px 18px; border-left-width: 1px; border-color: rgba(241, 209, 138, 0.5); text-align: center; font-weight: 600;
  background: linear-gradient(90deg, rgba(214, 162, 63, 0.2), rgba(9, 10, 14, 0.98) 30%, rgba(9, 10, 14, 0.98) 70%, rgba(214, 162, 63, 0.2));
  box-shadow: 0 0 0 4px rgba(214, 162, 63, 0.08), 0 14px 34px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -8px);
}
body.in-room .toast.show { transform: translate(-50%, 0); }
body.in-room .nav .tabs { transition: opacity 0.25s, visibility 0.25s; }
body.in-room.toasting .nav .tabs { opacity: 0; visibility: hidden; }
@media (max-width: 1100px) {
  body.in-room .toast { left: 10px; right: 10px; width: auto; max-width: none; min-height: calc(var(--nav-h) - 10px); top: 5px; padding: 5px 12px; font-size: 13.5px; line-height: 1.25; transform: translateY(-8px); }
  body.in-room .toast.show { transform: none; }
  body.in-room .nav > * { transition: opacity 0.25s, visibility 0.25s; }
  body.in-room.toasting .nav > * { opacity: 0; visibility: hidden; }
}

/* карта крупно */
.zoom {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(4, 5, 7, 0.9);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.zoom figure { margin: 0; width: min(440px, 88vw, calc((100vh - 80px) * 0.75)); }
.zoom img {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(241, 209, 138, 0.6);
  background: radial-gradient(120% 80% at 50% 18%, #2e2a3a 0%, #15171e 58%, #0b0c10 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(214, 162, 63, 0.15);
}
.zoom.tall figure { width: min(440px, 88vw, calc((100vh - 80px) * 2 / 3)); }
.zoom.tall img { aspect-ratio: 2 / 3; }
.zoom figcaption { margin-top: 14px; text-align: center; font: 700 28px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); }

/* «Спросить курьера»: голова ослика своей стороны в круге света */
.ask-btn {
  appearance: none;
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  width: 56px; height: 56px; padding: 0;
  border: 1px solid rgba(241, 209, 138, 0.6); border-radius: 50%;
  background: var(--art-head, none) center 70% / 118% no-repeat, radial-gradient(circle at 50% 30%, #2a303a, #14171c);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(214, 162, 63, 0.1);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.25s;
}
.ask-btn:hover { transform: translateY(-3px); border-color: var(--gold-hi); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(214, 162, 63, 0.3); }
.ask-btn span {
  position: absolute; top: -6px; right: -6px;
  display: grid; place-items: center; width: 21px; height: 21px;
  border-radius: 50%; background: linear-gradient(180deg, #ff8a52, #c92c19); color: #fff;
  font: 700 12px/1 var(--body);
  box-shadow: 0 2px 8px rgba(207, 47, 28, 0.5);
}
body.in-room .ask-btn { display: none; }
.ask-room { width: 36px; height: 36px; font: 700 16px/1 var(--body); color: var(--gold-hi); }

/* ---------------------------------------------------------------- сцена: общие слои (public/scenes.js — параллакс) */

.scene { position: absolute; inset: 0; overflow: hidden; container-type: size; background: var(--ink-1); }
.layer { position: absolute; inset: 0; will-change: transform; pointer-events: none; }
/* «сцена» — прямоугольник 16:9 размером «cover», прижат к низу; всё внутри — в процентах сцены */
.plane {
  position: absolute; bottom: 0; left: 50%;
  width: max(104cqw, calc(179.31cqh * var(--stage-h, 1)));
  aspect-ratio: 1664 / 928;
  transform: translateX(calc(var(--focus, 50%) * -1));
}
.plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.plate.dim { filter: brightness(0.55) saturate(0.8); }
.actor { position: absolute; margin: 0; pointer-events: auto; }
.actor > img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.shade { position: absolute; inset: 0; pointer-events: none; }
.sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* диагональные лучи света, как на странице героя dota2.com */
.light-rays { position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: screen; overflow: hidden; }
.light-rays i { position: absolute; top: -40%; height: 190%; background: linear-gradient(90deg, transparent, rgba(220, 230, 255, 0.07) 20%, rgba(230, 236, 255, 0.11) 50%, rgba(220, 230, 255, 0.07) 80%, transparent); transform: rotate(36deg); transform-origin: 50% 0; }
.light-rays i:nth-child(1) { left: 72%; width: 22%; animation: sway 16s ease-in-out infinite alternate; }
.light-rays i:nth-child(2) { left: 58%; width: 9%; opacity: 0.8; animation: sway 12s ease-in-out infinite alternate-reverse; }
.light-rays i:nth-child(3) { left: 90%; width: 7%; opacity: 0.7; animation: sway 19s ease-in-out infinite alternate; }
@keyframes sway { from { opacity: 0.55; translate: -1% 0; } to { opacity: 1; translate: 1.5% 0; } }

/* ---------------------------------------------------------------- главная: сцена «Привал» */

.camp-hero { position: relative; height: min(100svh, 980px); min-height: 640px; isolation: isolate; }
.camp-hero .scene { --focus: 51%; --fx: 73.5%; --fy: 86%; }
.camp .moon-glow {
  position: absolute; left: 64.9%; top: 20.9%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 250, 222, 0.42), rgba(190, 200, 255, 0.16) 42%, transparent 72%);
  animation: moon 9s ease-in-out infinite; mix-blend-mode: screen;
}
@keyframes moon { 50% { opacity: 0.72; transform: translate(-50%, -50%) scale(1.06); } }
.stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fffbe8;
  box-shadow: 0 0 6px 1px rgba(255, 250, 225, 0.8); animation: twinkle var(--t, 3s) var(--d, 0s) ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1); } }
/* лунные лучи */
.beams { position: absolute; inset: 0; mix-blend-mode: screen; }
.beam {
  position: absolute; top: -20%; height: 150%; transform-origin: 50% 0;
  background: linear-gradient(90deg, transparent, rgba(190, 205, 255, 0.16) 30%, rgba(225, 232, 255, 0.24) 50%, rgba(190, 205, 255, 0.16) 70%, transparent);
  filter: blur(6px); animation: sway var(--s, 14s) ease-in-out infinite alternate;
}
.beam.b1 { left: 58%; width: 9%; transform: rotate(28deg); --s: 13s; }
.beam.b2 { left: 50%; width: 4%; transform: rotate(31deg); opacity: 0.7; --s: 17s; }
.beam.b3 { left: 66%; width: 6%; transform: rotate(25deg); opacity: 0.55; --s: 11s; }
/* туман: полосы, медленно плывут */
.mist {
  position: absolute; left: -10%; width: 120%; height: var(--h, 14%); top: var(--y, 60%);
  background:
    radial-gradient(40% 50% at 20% 50%, rgba(170, 196, 255, 0.34), transparent 70%),
    radial-gradient(35% 55% at 55% 45%, rgba(160, 185, 250, 0.28), transparent 70%),
    radial-gradient(38% 50% at 88% 55%, rgba(175, 196, 255, 0.3), transparent 70%);
  filter: blur(10px); animation: drift var(--s, 40s) linear infinite alternate;
}
.mist.m1 { --y: 55%; --h: 16%; --s: 46s; }
.mist.m2 { --y: 70%; --h: 12%; --s: 34s; opacity: 0.55; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
/* свет костра на земле и на всех, кто рядом */
.fire-light {
  position: absolute; left: var(--fx, 67.5%); top: var(--fy, 86%); width: 46%; aspect-ratio: 2.2;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 170, 70, 0.55), rgba(255, 120, 40, 0.22) 45%, transparent 75%);
  mix-blend-mode: screen; animation: flicker 2.4s steps(1) infinite;
}
.fire-light.up { top: calc(var(--fy, 86%) - 14%); width: 36%; aspect-ratio: 1.2; opacity: 0.55; animation-duration: 3.1s; }
@keyframes flicker {
  0% { opacity: 0.9; } 12% { opacity: 0.78; } 23% { opacity: 1; } 37% { opacity: 0.84; } 49% { opacity: 0.95; }
  61% { opacity: 0.8; } 74% { opacity: 1; } 86% { opacity: 0.87; }
}
.campfire { position: absolute; left: var(--fx, 67.5%); top: var(--fy, 86%); width: 8.2%; transform: translate(-50%, -62%); }
.campfire img { display: block; width: 100%; }
.campfire .flame {
  position: absolute; inset: 0; transform-origin: 50% 64%;
  filter: drop-shadow(0 0 14px rgba(255, 150, 40, 0.85)); animation: flame 0.9s ease-in-out infinite alternate;
}
@keyframes flame { 0% { transform: scale(1, 1) skewX(0); } 35% { transform: scale(0.97, 1.07) skewX(-2deg); } 70% { transform: scale(1.03, 0.95) skewX(2deg); } 100% { transform: scale(0.99, 1.04) skewX(-1deg); } }
.campfire .base { filter: brightness(0.85); }
/* персонажи у костра: приглушить под ночь, тёплый контровой свет со стороны огня (--lx: -1 — огонь справа) */
.lit {
  filter: brightness(0.8) saturate(0.9) sepia(0.1)
          drop-shadow(calc(var(--lx, -1) * -2.5px) -1.5px 0 rgba(255, 176, 96, 0.75))
          drop-shadow(0 0 14px rgba(255, 150, 60, 0.18));
}
.actor::before { /* тень под ногами */
  content: ''; position: absolute; left: 12%; right: 12%; bottom: -2%; height: 8%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); z-index: -1;
}
.actor .flip { transform: scaleX(-1); }
.a-courier { left: 48.5%; top: 72.5%; width: 10.5%; --lx: -1; z-index: 2; }
.a-pudge { left: 58.2%; top: 64.4%; width: 12.8%; --lx: -1; }
.a-lina { left: 77.4%; top: 71%; width: 8.3%; --lx: 1; z-index: 2; }
.a-cm { left: 84.6%; top: 62%; width: 9.6%; --lx: 1; }
/* живые герои у костра: дышат (свойство scale — не спорит ни с отражением .flip, ни с позой на телефоне), Пудж
   покачивается над огнём, над кружкой Кристалки — пар, огонёк Лины мерцает, сосиска на хуке светится от костра */
.a-pudge > img, .a-cm > img, .a-lina img { transform-origin: 50% 100%; animation: breathe 4.2s ease-in-out infinite; }
.a-pudge > img { animation: breathe 4.6s ease-in-out infinite, roast 3.4s ease-in-out infinite; }
.a-cm > img { animation-duration: 3.6s; animation-delay: -1.2s; }
.a-lina img { animation-duration: 3.2s; animation-delay: -0.6s; }
@keyframes breathe { 50% { scale: 1.008 1.022; } }
@keyframes roast { 0%, 100% { rotate: 0deg; } 50% { rotate: -1.4deg; } }
.a-cm .steam { position: absolute; left: var(--cup-x, 36%); top: var(--cup-y, 37%); width: 34%; height: 34%; translate: -50% -100%; pointer-events: none; }
.a-cm .steam i {
  position: absolute; bottom: 0; left: 30%; width: 40%; height: 55%; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, rgba(236, 240, 255, 0.6), rgba(236, 240, 255, 0) 100%); filter: blur(2px);
  animation: steam 3.4s ease-out infinite;
}
.a-cm .steam i:nth-child(2) { left: 10%; animation-delay: 1.1s; animation-duration: 3.8s; }
.a-cm .steam i:nth-child(3) { left: 48%; animation-delay: 2.2s; animation-duration: 3.1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(20%) scale(0.5); } 25% { opacity: 0.75; } 100% { opacity: 0; transform: translate(18%, -120%) scale(1.35, 1.6); } }
.a-lina .spark {
  position: absolute; left: var(--spark-x, 11%); top: var(--spark-y, 21%); width: 34%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 214, 120, 0.85), rgba(255, 120, 40, 0.35) 45%, transparent 75%); mix-blend-mode: screen;
  animation: spark 1.1s steps(1) infinite, lamp 2.2s ease-in-out infinite;
}
@keyframes spark { 0% { opacity: 0.9; } 18% { opacity: 0.55; } 34% { opacity: 1; } 52% { opacity: 0.7; } 70% { opacity: 0.95; } 86% { opacity: 0.6; } }
.a-pudge { --sausage-x: 88%; --sausage-y: 9%; }
.a-pudge .glow {
  position: absolute; left: var(--sausage-x); top: var(--sausage-y); width: 38%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 170, 80, 0.55), transparent 72%); mix-blend-mode: screen; animation: flicker 2.4s steps(1) infinite;
}
.campfire::after { /* свет самого огня — дышит медленнее, чем мерцает пламя */
  content: ''; position: absolute; left: 50%; top: 20%; width: 260%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 170, 70, 0.32), transparent 70%); mix-blend-mode: screen; animation: lamp 2.8s ease-in-out infinite;
}
/* живой курьер у костра: свет от огня справа, а не от лампы Логова */
.a-courier .rig {
  filter: brightness(0.86) saturate(0.92) sepia(0.1)
          drop-shadow(2.5px -1.5px 0 rgba(255, 176, 96, 0.7))
          drop-shadow(0 0 14px rgba(255, 150, 60, 0.18));
}
/* передний план: ближе всех к камере — тёмный силуэт, чуть не в фокусе, опущен вниз */
.fg-plate { transform: translateY(24%); filter: brightness(0.42) saturate(0.7) blur(1.2px); }
/* облачко курьера над ним */
.a-courier .thought {
  position: absolute; left: 50%; bottom: 100%; z-index: 3;
  width: max-content; max-width: 260px; min-height: 0; margin: 0 0 8px;
  --bx: -60%; transform: translateX(var(--bx));
  animation: bubble-in 0.6s 0.9s var(--ease) both;
}
.a-courier .thought::after { left: 62%; }
.a-courier .thought:empty { display: none; }
.a-courier .thought.swap { opacity: 0; transform: translate(var(--bx), 4px); }
@keyframes bubble-in { from { opacity: 0; translate: 0 8px; } }

.camp-hero .shade {
  background:
    linear-gradient(90deg, rgba(4, 5, 7, 0.78) 0%, rgba(4, 5, 7, 0.45) 30%, transparent 52%),
    linear-gradient(0deg, var(--ink-0) 0%, rgba(4, 5, 7, 0.55) 9%, transparent 22%),
    radial-gradient(120% 90% at 60% 55%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.hero-copy {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--nav-h) + 7.5vh);
  pointer-events: none; will-change: transform, opacity;
}
.hero-copy .wrap > * { pointer-events: auto; }
.hero-copy .inner { max-width: 720px; }
.hero-copy .title { margin-top: 22px; }
.hero-copy .lead { max-width: 30em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }
.hero-copy .cta-row { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 34px; }
.hero-default { display: flex; flex-direction: column; align-items: flex-start; }
/* «Есть код?» — строкой под главной кнопкой */
.code-mini {
  position: relative;
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font: 600 12px/1 var(--body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.code-mini label { cursor: pointer; }
.code-mini .code-input { width: 104px; padding: 10px 8px 9px calc(8px + 0.3em); font-size: 17px; background: rgba(4, 5, 7, 0.55); }
.code-mini button {
  appearance: none; padding: 10px 12px; border: 0; background: none; cursor: pointer;
  font: 700 13px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi);
  transition: color 0.2s;
}
.code-mini button:hover { color: #fff; }
.code-mini .error { flex-basis: 100%; margin: 0; letter-spacing: 0; text-transform: none; font-weight: 500; }
.scroll-cue {
  appearance: none; position: absolute; z-index: 5; left: max(var(--gutter), (100% - var(--wrap)) / 2); bottom: 30px;
  display: flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--text-2);
  font: 600 11px/1 var(--body); letter-spacing: 0.3em; text-transform: uppercase;
}
.scroll-cue:hover { color: #fff; }
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(var(--text-2), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; order: -1; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.side-ask .title { margin: 18px 0 0; }
.side-ask .lead { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }
.side-ask .side-choose { margin-top: 26px; max-width: 560px; }

/* ---------------------------------------------------------------- полосы вместо панелей */

.band { position: relative; padding: clamp(80px, 11vw, 150px) 0; isolation: isolate; }
.band-head { margin-bottom: clamp(36px, 5vw, 64px); }
.band-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band-head .title { margin-top: 18px; }
.band > .light-rays { opacity: 0.8; }

/* Дотадл дня — ночная полоса с большим знаком вопроса (public/daily.js) */
.band.daily { z-index: 2; padding: 0; min-height: 680px; display: flex; align-items: center; background: var(--ink-1); overflow-x: clip; }
.daily:empty { min-height: 0; }
.daily .art { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.daily .art img { position: absolute; right: 0; top: 0; height: 100%; width: min(100%, 1330px); object-fit: cover; object-position: 70% 50%; }
.daily .art::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--ink-1) 0%, rgba(8, 9, 13, 0.94) 30%, rgba(8, 9, 13, 0.35) 62%, rgba(8, 9, 13, 0.1) 100%),
    linear-gradient(0deg, var(--ink-0), transparent 22%), linear-gradient(180deg, var(--ink-0), transparent 18%);
}
.daily .qglow {
  position: absolute; right: 16%; top: 12%; width: 440px; aspect-ratio: 1; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 205, 90, 0.35), transparent 70%); mix-blend-mode: screen;
  animation: glow 5s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: 0.72; transform: scale(1.06); } }
.daily > .wrap { padding: 110px 0; }
.daily .inner { max-width: 600px; }
.daily .kicker + .title { margin-top: 18px; }
.guess { display: flex; margin-top: 30px; max-width: 540px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.guess .dl-search { position: relative; flex: 1; min-width: 0; }
.guess .dl-input { width: 100%; height: 100%; padding: 18px 20px; border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: rgba(4, 5, 7, 0.75); font-size: 17px; }
.guess .btn-fire { padding: 19px 26px 18px; font-size: 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.band-board { margin-top: 8px; max-width: 560px; }
.band-board .dl-cell { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -2px 0 rgba(0, 0, 0, 0.25); }
.daily-all { margin-top: 20px; }
.daily-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 26px; color: var(--muted); font-size: 14.5px; }
.daily-meta b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.daily-meta .streak, .daily-meta .streak b { color: var(--fire); }
.daily-meta svg.i { font-size: 17px; vertical-align: -3px; margin-right: 7px; }
.daily-solved { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; max-width: 560px; }
.daily-solved .dl-answer { border-color: var(--green); box-shadow: 0 0 30px rgba(95, 191, 106, 0.22); }
.daily-solved .dl-mini i { width: 16px; height: 16px; }
.daily-solved .daily-share { margin-top: 16px; }

/* Твоё: компании и партии — большие карточки-арты, не рамки */
.yours { background: linear-gradient(180deg, var(--ink-0), var(--ink-2) 60%, var(--ink-1)); overflow-x: clip; }
.company-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.company {
  --tr: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  appearance: none; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px;
  padding: 0; border: 0; overflow: hidden; border-radius: var(--radius);
  background: var(--ink-3); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45); transition: var(--tr);
}
.company > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter 0.4s; filter: brightness(0.75) saturate(0.95); }
.company::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 5, 7, 0.96) 12%, rgba(4, 5, 7, 0.55) 48%, transparent 80%); }
.company:hover { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(241, 209, 138, 0.35); }
.company:hover > img { transform: scale(1.06); filter: brightness(0.9); }
.company.live:hover { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(95, 191, 106, 0.5), 0 0 30px rgba(95, 191, 106, 0.15); }
.company .body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 22px 24px 24px; }
.company .h { display: block; margin: 10px 0 6px; font: 700 30px/1.05 var(--title); letter-spacing: 0.01em; overflow-wrap: anywhere; }
.company .p { display: block; color: var(--text-2); font-size: 14.5px; }
.company .kicker { font-size: 11px; }
.live-tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px;
  border: 1px solid rgba(95, 191, 106, 0.5); border-radius: var(--radius-sm); background: rgba(4, 5, 7, 0.6);
  font: 600 11.5px/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: #cfe9cc;
}
.company .go { position: absolute; right: 22px; top: 22px; z-index: 1; opacity: 0; transform: translateY(-6px); transition: 0.35s var(--ease); }
.company:hover .go, .company:focus-visible .go { opacity: 1; transform: none; }
.company.new { align-items: center; justify-content: center; text-align: center; background: repeating-linear-gradient(135deg, rgba(243, 236, 218, 0.03) 0 12px, transparent 12px 24px), var(--ink-2); border: 1px dashed var(--line-2); box-shadow: none; }
.company.new::after { display: none; }
.company.new .body { align-items: center; }
.company.new .plus { font: 400 64px/1 var(--display); color: var(--gold-hi); transition: transform 0.4s var(--ease); }
.company.new:hover .plus { transform: rotate(90deg); }
.company.new .h { font-size: 24px; }
.company.new:hover { border-color: rgba(241, 209, 138, 0.5); }

.company-row + .recent { margin-top: 56px; }
.recent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.recent-head h3 { margin: 0; font: 700 14px/1 var(--body); letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-2); }
.recent-head small { color: var(--dim); font-size: 13px; }
.recent-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.match {
  --tr: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
  appearance: none; position: relative;
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 10px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(243, 236, 218, 0.05), rgba(243, 236, 218, 0.015));
  border: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: var(--tr);
}
.match:hover { background: rgba(243, 236, 218, 0.07); border-color: var(--line-2); transform: translateY(-3px); }
.match img { width: 92px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.match .m-body { min-width: 0; }
.match b { display: block; font: 700 18px/1.15 var(--title); }
.match span span { display: block; font-size: 13px; color: var(--muted); }
.match .place { color: var(--gold-hi); }

/* ---------------------------------------------------------------- плитки игр: арт во всю плитку, оживают при наведении */

.games-band { background: radial-gradient(90% 60% at 50% 0%, rgba(74, 58, 138, 0.22), transparent 70%), var(--ink-1); overflow-x: clip; }
.games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.games-grid.home .tile:first-child { grid-column: span 2; grid-row: span 2; }
/* плитка: ссылка на страницу игры — название, растянутое на всю плитку; «Создать комнату» — поверх, при наведении.
   Арт — сцена без героев (.bg) и герои слоем (.fig, место — из public/site-art.js): при наведении фон уходит за
   мышью, герои — сильнее и «дышат», свет сцены (.light) разгорается — как видео героев на dota2.com, но без видео. */
.tile {
  --glow: 241, 209, 138;
  --tr: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  --mx: 0; --my: 0;
  position: relative; display: block; width: 100%;
  overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10;
  background: var(--ink-3); color: var(--text); text-align: left; isolation: isolate;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  transition: var(--tr);
}
.tile.big { aspect-ratio: auto; min-height: 100%; }
.tile .art { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.tile .art .bg, .tile .art .bg img { position: absolute; inset: -2%; display: block; width: 104%; height: 104%; max-width: none; object-fit: cover; }
.tile .art .bg img { inset: 0; width: 100%; height: 100%; }
.tile .art .bg { translate: calc(var(--mx) * -8px) calc(var(--my) * -5px); transition: translate 0.6s ease-out, filter 0.45s; filter: saturate(0.92) brightness(0.8); }
.tile .art .fig {
  position: absolute; height: auto; max-width: none; transform-origin: 50% 100%;
  translate: calc(var(--mx) * -18px) calc(var(--my) * -9px); transition: translate 0.45s ease-out, filter 0.45s, scale 0.6s var(--ease);
  filter: saturate(0.95) brightness(0.9) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
}
.tile .art .light { position: absolute; opacity: 0.55; transition: opacity 0.5s; animation-play-state: paused; }
.tile:hover .art .light, .tile:focus-within .art .light { animation-play-state: running; }
.tile::before { /* затемнение снизу — под текст */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(4, 5, 7, 0.95) 0%, rgba(4, 5, 7, 0.6) 28%, transparent 58%);
}
.tile::after { /* пробегающий свет при наведении */
  content: ''; position: absolute; inset: -40%; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 244, 214, 0.2) 50%, transparent 58%);
  transform: translateX(-60%); transition: transform 0s;
}
.tile .info { position: absolute; left: 0; right: 0; bottom: 0; display: block; padding: 20px 22px; }
.tile .h { display: block; font: 700 clamp(24px, 2.2vw, 32px)/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.tile a.h::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* вся плитка — ссылка */
.tile a.h:focus-visible { outline: none; }
.tile a.h:focus-visible::after { outline: 2px solid var(--gold-hi); outline-offset: -3px; border-radius: var(--radius); }
.tile.big .h { font-size: clamp(34px, 4vw, 60px); }
.tile .p { display: block; margin: 8px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.45; max-width: 36em; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.tile .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tile .chip, .soon-tile .chip {
  gap: 7px; padding: 6px 10px; background: rgba(4, 5, 7, 0.6); backdrop-filter: blur(4px);
  font: 600 11.5px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2);
}
/* маленькие плитки: арт важнее — описание проявляется при наведении (как имя героя на dota2.com) */
.tile:not(.big):not(.wide) .p { max-height: 0; opacity: 0; margin-top: 0; overflow: hidden; transition: max-height 0.45s var(--ease), opacity 0.35s, margin 0.45s var(--ease); }
.tile:not(.big):not(.wide):hover .p, .tile:not(.big):not(.wide):focus-within .p { max-height: 3.2em; opacity: 1; margin-top: 8px; }
.tile .cta { position: absolute; z-index: 2; right: 18px; top: 18px; opacity: 0; transform: translateY(-6px); transition: opacity 0.35s, transform 0.35s var(--ease); pointer-events: none; }
.tile .cta .btn { padding: 11px 16px 10px; font-size: 12.5px; background: rgba(207, 47, 28, 0.9); border-color: rgba(255, 214, 170, 0.65); }
.tile .cta .btn:hover { background: rgba(232, 66, 36, 0.96); border-color: #ffe1c0; }
.tile:hover, .tile:focus-within {
  transform: translateY(-8px) scale(1.015); z-index: 2;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(var(--glow), 0.55), 0 0 42px rgba(var(--glow), 0.22);
}
.tile:hover .art .bg, .tile:focus-within .art .bg { filter: saturate(1.05) brightness(0.95); }
.tile:hover .art .fig, .tile:focus-within .art .fig { filter: saturate(1.05) brightness(1.02) drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)); scale: 1.035; animation: alive 2.4s 0.5s ease-in-out infinite; }
.tile:hover .art .light, .tile:focus-within .art .light { opacity: 1; }
.tile:hover .art .bg.whole, .tile:focus-within .art .bg.whole { animation: breath-scene 3.2s ease-in-out infinite; } /* сцена целиком, без слоёв */
@keyframes breath-scene { 0%, 100% { scale: 1.04; } 50% { scale: 1.075; rotate: 0.35deg; } }
.tile:hover::after { transform: translateX(60%); transition: transform 1.1s var(--ease); }
.tile:hover .cta, .tile:focus-within .cta { opacity: 1; transform: none; pointer-events: auto; }
.tile:active { transform: translateY(-4px) scale(1.005); }
/* «оживание»: герои дышат и чуть покачиваются — короткая петля, пока мышь над плиткой */
@keyframes alive { 0%, 100% { transform: none; } 30% { transform: translateY(-1.2%) rotate(-0.4deg) scaleY(1.012); } 65% { transform: translateY(0.4%) rotate(0.3deg) scaleY(0.996); } }
.more-row { display: flex; justify-content: center; margin-top: 48px; }

/* ---------------------------------------------------------------- полоса «Курьер» в Логове */

.band.courier-band { padding: 0; min-height: 640px; display: flex; align-items: center; overflow-x: clip; }
.courier-band .bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.courier-band .bg img { position: absolute; left: 0; top: 0; width: min(100%, 1180px); height: 100%; object-fit: cover; object-position: 30% 60%; filter: brightness(0.82); }
.courier-band .bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(270deg, var(--ink-1) 0%, rgba(8, 9, 13, 0.92) 36%, rgba(8, 9, 13, 0.2) 70%, rgba(8, 9, 13, 0.25) 100%),
              linear-gradient(0deg, var(--ink-0), transparent 20%), linear-gradient(180deg, var(--ink-1), transparent 20%);
}
.courier-band .lamp { position: absolute; left: 13%; top: 30%; width: 520px; aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255, 190, 110, 0.32), transparent 70%); mix-blend-mode: screen; animation: flicker 4s steps(1) infinite; z-index: -1; pointer-events: none; }
.courier-band .wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 90px 0; }
.den-courier { position: relative; justify-self: center; width: min(300px, 70%); margin-top: 120px; }
.den-courier::before { content: ''; position: absolute; left: 10%; right: 12%; bottom: -3%; height: 9%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent); }
.den-courier .rig, .den-courier .rig.free { cursor: pointer; filter: brightness(0.92) saturate(0.95) sepia(0.1) drop-shadow(-3px -2px 0 rgba(255, 196, 120, 0.55)) drop-shadow(0 0 12px rgba(255, 170, 90, 0.2)); }
.den-courier .thought { position: absolute; left: 50%; bottom: 100%; z-index: 2; width: max-content; max-width: 260px; margin: 0 0 6px; transform: translateX(-40%); animation: bubble-in 0.4s var(--ease) both; }
.den-copy .side-choose { margin-top: 30px; }
.den-copy .cta-row { margin-top: 30px; }
.den-copy .title { margin-top: 18px; }

/* ---------------------------------------------------------------- «Играть»: витрина игр */

.play-head { position: relative; min-height: 610px; padding: calc(var(--nav-h) + 46px) 0 0; overflow: hidden; isolation: isolate; }
.play-head .light-rays { z-index: 1; }
.play-head .scene { --focus: 50%; }
.play-head .shade {
  background:
    radial-gradient(60% 70% at 50% 30%, rgba(8, 9, 13, 0.25), rgba(8, 9, 13, 0.82) 70%),
    linear-gradient(0deg, var(--ink-1) 0%, transparent 30%);
}
.play-head .spot { position: absolute; left: 50%; top: -30%; width: 70%; height: 130%; transform: translateX(-50%); background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(255, 232, 190, 0.1) 172deg, rgba(255, 232, 190, 0.16) 180deg, rgba(255, 232, 190, 0.1) 188deg, transparent 200deg); mix-blend-mode: screen; pointer-events: none; }
.play-head .copy { position: relative; z-index: 3; }
.play-head .title { margin-top: 18px; }
.play-me { display: flex; justify-content: center; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.play-me b { color: var(--text); }
.crowd { position: absolute; left: 0; right: 0; top: auto; bottom: 0; height: 300px; pointer-events: none; z-index: 2; }
.crowd::after { content: ''; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(0deg, var(--ink-0), transparent); }
.crowd img {
  position: absolute; bottom: -40px; height: var(--h, 230px); width: auto;
  filter: brightness(0.62) saturate(0.85) drop-shadow(0 -2px 0 rgba(200, 214, 255, 0.55)) drop-shadow(0 0 18px rgba(140, 160, 255, 0.18));
}
.band.play-band { padding-top: 0; background: var(--ink-0); }
.filters {
  position: relative; z-index: 4; display: flex; align-items: center; gap: 18px 30px; flex-wrap: wrap;
  margin-top: -30px; padding: 16px 20px; background: rgba(8, 9, 13, 0.86); border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); border-radius: var(--radius);
}
.filters .lbl, .companies-strip .lbl { font: 600 12px/1 var(--body); letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.filters .group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.filters .code-mini { margin-left: auto; }
.filters .code-mini .code-input { background: rgba(0, 0, 0, 0.4); }
.companies-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 26px 0 32px; }
.companies-strip .lbl { margin-right: 6px; }
.cchip {
  appearance: none; display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px 8px 10px;
  border-radius: 40px; background: rgba(243, 236, 218, 0.05); border: 1px solid var(--line-2); color: var(--text);
  font: 600 14.5px/1.2 var(--body); cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.cchip:hover { background: rgba(243, 236, 218, 0.1); border-color: rgba(241, 209, 138, 0.5); transform: translateY(-2px); }
.cchip .ic { width: 20px; height: 20px; stroke: var(--gold-hi); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cchip.live { border-color: rgba(95, 191, 106, 0.5); }
.cchip.add { color: var(--gold-hi); padding-left: 15px; }
.play-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.companies-strip.hidden + .play-grid { margin-top: 34px; }
.play-grid .tile { grid-column: span 2; }
.play-grid .tile.wide { grid-column: span 3; aspect-ratio: 16 / 9; }
.play-grid.filtered .tile.wide { grid-column: span 2; aspect-ratio: 16 / 10; }
.arena { margin-top: 90px; }
.arena .band-head { margin-bottom: 36px; }
.arena-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.soon-tile { position: relative; padding: 26px 24px; min-height: 170px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(243, 236, 218, 0.05), transparent 60%), var(--ink-2); border: 1px solid var(--line); overflow: hidden; }
.soon-tile::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, rgba(142, 210, 255, 0.12), transparent); }
.soon-tile b { display: block; margin: 12px 0 8px; font: 700 26px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.soon-tile p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- страница игры /play/<игра> (public/game-pages.js) */

/* как страница героя на dota2.com: сцена справа уходит в темноту к тексту, герои — отдельным слоем, свет наискось */
.game-hero {
  position: relative; min-height: max(100svh, 760px); padding: calc(var(--nav-h) + 44px) 0 64px; overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  background: radial-gradient(90% 80% at 75% 30%, #232a3e, #10131b 60%, var(--ink-1));
}
.game-hero > .light-rays { z-index: 1; }
.game-art { position: absolute; inset: 0 0 0 26%; z-index: 0; container-type: size; --stage-h: var(--gp-stage, 1); }
.game-art .gp-bg {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%), linear-gradient(0deg, transparent 0%, #000 22%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%), linear-gradient(0deg, transparent 0%, #000 22%); mask-composite: intersect;
}
.game-art .plane { --focus: var(--gp-focus, 55%); }
/* сцена ниже экрана (page.stage < 1): её верхний край растворяется в ночи */
.game-hero.staged .gp-bg .plane { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%); mask-image: linear-gradient(180deg, transparent 0%, #000 18%); }
.game-art .plate { filter: brightness(0.66) saturate(0.85); }
.game-art .dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gp-figs { z-index: 1; }
.gp-figs .plane { --focus: var(--gp-focus, 55%); }
.game-hero:not(.aligned) .gp-plane { inset: 0; width: auto; aspect-ratio: auto; transform: none; }
/* align: герои стоят там же, где в сцене (tile в site-art.js), и уходят в темноту слева, как и сцена */
.game-hero.aligned .gp-figs { -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%); mask-image: linear-gradient(90deg, transparent 0%, #000 30%); }
.game-hero.aligned .gp-figs .gp-fig { left: var(--fx); bottom: var(--fb); width: var(--fw); height: auto; right: auto; translate: none; max-width: none; object-fit: fill; }
.gp-fig {
  position: absolute; right: var(--gp-right, 3%); bottom: var(--gp-bottom, 5%);
  height: var(--gp-h, 76%); width: min(66cqw, 980px); object-fit: contain; object-position: 100% 100%;
  filter: brightness(0.96) drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}
.game-hero .rail { position: absolute; z-index: 2; left: clamp(16px, 3vw, 44px); top: var(--nav-h); bottom: 80px; width: 1px; background: linear-gradient(var(--line-2), transparent); }
.game-hero .rail span {
  position: absolute; left: -9px; bottom: 0; writing-mode: vertical-rl; transform: rotate(180deg);
  white-space: nowrap; font: 700 15px/1 var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-2);
}
.game-hero .rail em { font: 600 12px/1 var(--body); letter-spacing: 0.3em; font-style: normal; color: var(--dim); margin-top: 14px; }
.game-nav { position: absolute; z-index: 4; right: clamp(16px, 3vw, 44px); top: calc(var(--nav-h) + 40px); display: flex; gap: 6px; }
.game-nav a { display: grid; place-items: center; width: 46px; height: 64px; border: 2px solid var(--line-2); background: rgba(4, 5, 7, 0.35); color: var(--text-2); transition: border-color 0.2s, color 0.2s, background 0.2s; }
.game-nav a.grid { width: 78px; }
.game-nav a:hover { border-color: var(--text); color: #fff; background: rgba(243, 236, 218, 0.06); }
.game-nav svg.i { font-size: 22px; }
.game-hero > .wrap { position: relative; z-index: 3; }
.game-copy { max-width: 620px; }
.game-copy .kicker { color: var(--ember-2); }
.game-copy .kicker svg.i { font-size: 17px; }
.gp-name {
  margin: 18px 0 0; font: 900 min(178px, calc(var(--fit, 11) * 1vw))/0.88 var(--display); letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--text); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), 0 16px 60px rgba(0, 0, 0, 0.6); overflow-wrap: normal;
}
.game-copy .tagline { margin: 18px 0 0; font: 700 clamp(15px, 1.4vw, 19px)/1.35 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--frost); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.game-copy .pitch { margin: 22px 0 0; max-width: 34em; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--text-2); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85); }
.game-copy .pitch b { color: #fff; font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 20px 44px; margin-top: 32px; }
.stat .lbl { display: block; margin-bottom: 10px; font: 600 12px/1 var(--body); letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.stat b { display: flex; align-items: center; gap: 10px; min-height: 22px; font: 700 20px/1 var(--body); letter-spacing: 0.04em; color: var(--text); }
.stat b svg.i { font-size: 20px; color: var(--gold-hi); }
.diamonds { display: flex; gap: 9px; }
.diamonds i { width: 13px; height: 13px; border: 2px solid var(--text); transform: rotate(45deg); }
.diamonds i.on { background: var(--text); box-shadow: 0 0 10px rgba(243, 236, 218, 0.35); }
.game-copy .cta-row { margin-top: 38px; gap: 14px 18px; }
.game-copy .code-mini { flex-basis: 100%; }
/* свет сцены: лампа Бункера, знак вопроса Дотадла, фитиль бомбы… — в процентах картинки сцены (как и сама картинка) */
.light { position: absolute; left: var(--lx, 50%); top: var(--ly, 30%); width: var(--lw, 30%); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; mix-blend-mode: screen; background: radial-gradient(closest-side, var(--lc, rgba(255, 200, 110, 0.45)), transparent 70%); }
.light.l-none { display: none; }
.light.l-alarm { --lx: 51%; --ly: 9%; --lw: 26%; --lc: rgba(255, 60, 40, 0.6); animation: alarm 1.8s ease-in-out infinite; }
.light.l-gold { --lx: 50%; --ly: 24%; --lw: 42%; --lc: rgba(255, 205, 90, 0.5); animation: lamp 4s ease-in-out infinite; }
.light.l-lamp { --lx: 52%; --ly: 30%; --lw: 40%; --lc: rgba(255, 196, 110, 0.45); animation: flicker 3.2s steps(1) infinite; }
.light.l-magic { --lx: 50%; --ly: 40%; --lw: 55%; --lc: rgba(110, 240, 220, 0.35); animation: lamp 3.4s ease-in-out infinite; }
.light.l-dusk { --lx: 72%; --ly: 58%; --lw: 50%; --lc: rgba(255, 150, 110, 0.3); animation: lamp 6s ease-in-out infinite; }
.light.l-torch { --lx: 50%; --ly: 30%; --lw: 110%; --lc: rgba(255, 150, 60, 0.18); animation: flicker 2.4s steps(1) infinite; }
.light.l-fuse { --lx: 78%; --ly: 20%; --lw: 26%; --lc: rgba(255, 170, 60, 0.6); animation: flicker 0.9s steps(1) infinite; }
.light.l-blocks { --lx: 57%; --ly: 53%; --lw: 46%; --lc: rgba(255, 210, 120, 0.4); animation: lamp 3s ease-in-out infinite; }
@keyframes alarm { 50% { opacity: 0.25; } }
@keyframes lamp { 50% { opacity: 0.7; scale: 1.08; } }

/* правила в шагах: крупная цифра контуром и картинка шага в круге света */
.steps-band { background: linear-gradient(180deg, var(--ink-1), var(--ink-2)); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.gp-step { position: relative; padding: 0 6px; }
.step-art { position: relative; display: flex; align-items: flex-end; height: 112px; margin-bottom: 20px; }
.step-art .num { font: 900 118px/0.8 var(--display); color: transparent; -webkit-text-stroke: 1.5px rgba(241, 209, 138, 0.5); }
.step-art .ic {
  position: absolute; left: 58px; bottom: -4px; width: 76px; height: 76px; padding: 17px; border-radius: 50%;
  fill: none; stroke: var(--gold-hi); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  background: radial-gradient(closest-side, rgba(214, 162, 63, 0.22), rgba(20, 24, 33, 0.95) 95%);
  border: 1px solid rgba(241, 209, 138, 0.4); box-shadow: 0 0 30px rgba(214, 162, 63, 0.18), inset 0 0 20px rgba(214, 162, 63, 0.12);
}
.gp-step h3 { margin: 0 0 10px; font: 700 23px/1.1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.gp-step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* свой блок игры */
.extra-band { background: radial-gradient(80% 60% at 50% 0%, rgba(74, 58, 138, 0.18), transparent 70%), var(--ink-1); overflow-x: clip; }
.extra-band .band-head.row { align-items: flex-end; }
.extra-band .band-head .lead { max-width: 30em; font-size: 16.5px; }
.dossier { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card-trait {
  position: relative; padding: 18px 18px 16px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, rgba(243, 236, 218, 0.07), rgba(243, 236, 218, 0.01) 60%), var(--ink-3);
  border: 1px solid var(--line); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.card-trait:hover { transform: translateY(-4px); border-color: rgba(241, 209, 138, 0.45); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }
.card-trait .lbl { font: 600 11.5px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.card-trait b { display: block; margin-top: 10px; font: 700 20px/1.2 var(--title); }
.card-trait span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.card-trait.closed { background: repeating-linear-gradient(135deg, rgba(243, 236, 218, 0.04) 0 10px, transparent 10px 20px), var(--ink-2); }
.card-trait.closed b { color: var(--dim); letter-spacing: 0.2em; }
.specials { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.specials .lbl { margin-right: 6px; font: 600 12px/1 var(--body); letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.special { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border: 1px solid rgba(142, 210, 255, 0.35); background: rgba(142, 210, 255, 0.06); border-radius: var(--radius); font-weight: 600; font-size: 14.5px; }
.special i { width: 30px; height: 30px; border-radius: 2px; background: linear-gradient(135deg, #3b6b9c, #16304d); box-shadow: inset 0 0 0 1px rgba(142, 210, 255, 0.5); display: grid; place-items: center; font: 700 11px/1 var(--body); font-style: normal; color: var(--frost); }
/* рисунки игроков: белый холст, штрих от руки, чат рядом */
.doodles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.doodle-card { margin: 0; display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius); overflow: hidden; background: var(--ink-3); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
.canvas { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #f7f3ea; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.doodle { width: 82%; height: 82%; fill: none; stroke: #242021; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.doodle-card figcaption { padding: 16px 18px 18px; }
.doodle-card .lbl, .ls-talk .lbl { font: 600 11px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.doodle-card b { display: block; margin: 6px 0 12px; font: 700 21px/1.1 var(--title); }
.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.chat li { padding: 6px 10px; border-radius: var(--radius-sm); background: rgba(243, 236, 218, 0.05); color: var(--text-2); }
.chat li em { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--fire); }
.chat li.ok { background: rgba(95, 191, 106, 0.14); color: var(--text); }
.chat li.ok em { color: var(--green-hi); }
/* Испорченный курьер: цепочка фраза → рисунок → фраза */
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; align-items: center; counter-reset: link; }
.chain li { position: relative; }
.chain li + li::before { content: ''; position: absolute; left: -13px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); transform: translate(0, -50%) rotate(45deg); }
.chain li.text { display: grid; place-items: center; min-height: 140px; padding: 18px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(243, 236, 218, 0.07), transparent 60%), var(--ink-3); border: 1px solid var(--line); text-align: center; }
.chain q { font: 700 20px/1.25 var(--title); color: var(--text); quotes: '«' '»'; }
.chain li.draw .canvas { border-radius: var(--radius); }
/* Имбажинариум: колоды веером */
.decks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; max-width: 900px; }
.deck-card { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: center; padding: 22px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(243, 236, 218, 0.06), transparent 60%), var(--ink-3); border: 1px solid var(--line); }
.deck-card .fan { position: relative; width: 100%; height: 150px; }
.deck-card .fan img { position: absolute; left: 50%; bottom: 0; width: 84px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line-2); background: #15171e; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5); transform-origin: 50% 110%; }
.deck-card .fan img:nth-child(1) { transform: translateX(-50%) rotate(-14deg) translateX(-26px); }
.deck-card .fan img:nth-child(2) { transform: translateX(-50%); z-index: 1; }
.deck-card .fan img:nth-child(3) { transform: translateX(-50%) rotate(14deg) translateX(26px); }
.deck-card:hover .fan img:nth-child(1) { transform: translateX(-50%) rotate(-20deg) translateX(-34px); }
.deck-card:hover .fan img:nth-child(3) { transform: translateX(-50%) rotate(20deg) translateX(34px); }
.deck-card .fan img { transition: transform 0.4s var(--ease); }
.deck-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.deck-body b { font: 700 26px/1.05 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.deck-body > span:last-child { color: var(--muted); font-size: 14.5px; }
.deck-card.soon .fan img { filter: saturate(0.85); }
/* Доджкин и Течисы: карты из колоды */
.sample-cards { display: grid; gap: 14px; }
.sample-cards.mk { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sample-cards.tc { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sample-cards .mk-card { min-height: 150px; font-size: 13px; }
.sample-cards .tc-card { min-height: 190px; }
/* Дотадл: три попытки и легенда */
.dl-sample { max-width: 920px; }
/* Герой на букву: буква и речь ведущего */
.letters-sample { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 34px; align-items: center; max-width: 880px; }
.ls-talk { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ls-talk q { margin-bottom: 14px; font: 700 clamp(22px, 2.2vw, 30px)/1.3 var(--title); color: var(--gold-hi); quotes: '«' '»'; }
.ls-talk b { font: 700 28px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }

/* что нужно и последний призыв */
.final-cta { text-align: center; background: radial-gradient(70% 80% at 50% 100%, rgba(207, 47, 28, 0.16), transparent 70%), var(--ink-2); }
.final-cta .title { margin-top: 18px; }
.need { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 44px 0 48px; text-align: left; }
.need div { padding-top: 18px; border-top: 1px solid var(--line-2); }
.need b { display: flex; align-items: center; gap: 10px; font: 700 19px/1.2 var(--display); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.need b svg.i { font-size: 20px; color: var(--gold-hi); }
.need span { color: var(--muted); font-size: 15px; }
.more-band { padding-top: 90px; background: var(--ink-1); }

/* ---------------------------------------------------------------- Убежище и Сокровищница: сцена и «скоро» */

.soon-band { position: relative; min-height: min(100svh, 900px); display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 80px; isolation: isolate; overflow: hidden; }
.soon-band .bg { position: absolute; inset: 0; z-index: -2; }
.soon-band .bg img { position: absolute; left: 0; top: 0; width: min(100%, 1280px); height: 100%; object-fit: cover; object-position: 40% 70%; filter: brightness(0.7) saturate(0.85); }
.soon-band .bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(270deg, var(--ink-1) 0%, rgba(8, 9, 13, 0.9) 40%, rgba(8, 9, 13, 0.15) 75%, rgba(8, 9, 13, 0.3) 100%),
              linear-gradient(0deg, var(--ink-0), transparent 22%), linear-gradient(180deg, rgba(4, 5, 7, 0.7), transparent 24%);
}
.soon-band .wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; }
.soon-actor { justify-self: center; align-self: end; }
.soon-actor img { display: block; filter: brightness(0.88) saturate(0.9) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.zone-refuge .soon-actor img { width: min(320px, 80%); filter: brightness(0.85) saturate(0.88) drop-shadow(2px -2px 0 rgba(255, 170, 90, 0.4)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.zone-treasury .soon-actor img { width: min(220px, 60%); filter: brightness(0.9) saturate(0.92) sepia(0.1) drop-shadow(-2px -2px 0 rgba(255, 196, 120, 0.45)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.zone-treasury .soon-band { background: radial-gradient(60% 60% at 80% 30%, rgba(214, 162, 63, 0.14), transparent 70%); }
.zone-treasury .soon-copy .big { color: var(--gold-hi); }
.soon-copy { align-self: center; }
.soon-copy .title { margin-top: 18px; }
.soon-copy .title .big { font-size: clamp(40px, 4.8vw, 84px); } /* «Сокровищница» — одним словом */
.soon-items { list-style: none; margin: 26px 0 30px; padding: 0; display: grid; gap: 14px; }
.soon-items li { position: relative; padding-left: 22px; color: var(--muted); max-width: 46ch; }
.soon-items li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.soon-items b { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- Профиль */

.cards { display: grid; gap: 22px; align-content: start; min-width: 0; }
.me-section { position: relative; padding: 22px 28px 24px; }
.me-section + .me-section { border-top: 1px solid var(--line); }
.me-section h2 { font-size: 18px; letter-spacing: 0.1em; color: var(--text); margin-bottom: 12px; }
.me-section p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }
.nick-form { display: flex; gap: 10px; max-width: 480px; }
.nick-form input { flex: 1; }
.me-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.danger h2 { color: var(--bad-text); }
.confirm-box { margin-top: 12px; padding: 16px; border: 1px solid rgba(201, 67, 47, 0.5); border-radius: var(--radius); background: rgba(201, 67, 47, 0.08); }
.confirm-box p { color: var(--text); }
.lvl-line { display: flex; align-items: center; gap: 10px; }
.lvl-line small { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wr-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.wr-row h2 { margin-bottom: 4px; }
.wr-row .note { margin: 0; font-size: 13px; }

/* ---------------------------------------------------------------- приглашение в комнату */

.join { display: grid; grid-template-columns: 280px minmax(0, 1fr); max-width: 860px; margin: 10px auto 0; overflow: hidden; }
.join-art {
  position: relative; display: flex; align-items: flex-end; justify-content: center; padding: 26px 0 0 18px;
  background: var(--art-den, none) 47% 72% / cover no-repeat, #1b1712;
}
.join-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 50%, rgba(11, 13, 19, 0.95)); pointer-events: none; }
.join-art .rig { position: relative; z-index: 1; width: 210px; display: block; transform: translateY(8px); }
.join-body { display: flex; flex-direction: column; gap: 16px; padding: 40px 34px 32px 18px; }
.join-body .title { margin-top: 4px; }
.join-body .title .big { font-size: clamp(38px, 4.4vw, 60px); }
.join-body h1 #joinCode { color: var(--gold-hi); font-family: var(--body); font-weight: 800; letter-spacing: 0.1em; }
.join-body p { margin: 0; color: var(--text-2); }
.join-body .btn-primary { align-self: stretch; }

/* ---------------------------------------------------------------- Компании (public/companies.js) */

.room-company { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-left: 6px; padding: 6px 11px 7px; border: 1px solid var(--line-2); border-left: 2px solid var(--gold); border-radius: var(--radius-sm); background: rgba(214, 162, 63, 0.07); }
.room-company .kicker { font-size: 10px; letter-spacing: 0.2em; }
.room-company .kicker::before { display: none; }
.room-company b { font: 700 16px/1.1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.room-company:hover { border-color: var(--gold); }

.co { display: grid; gap: 24px; }
.co-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; overflow: hidden; min-height: 320px; }
.co-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 300px at 0% 0%, rgba(214, 162, 63, 0.14), transparent 70%); }
.co-hero-main { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 34px 32px 30px; }
.co-name { font-size: clamp(40px, 5vw, 76px); line-height: 0.95; color: var(--text); overflow-wrap: anywhere; text-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
.co-hero-main > p { margin: 0; }
.co-live { display: inline-flex; align-items: center; gap: 7px; color: var(--green-hi); }
.co-url { font-size: 13px; color: var(--muted); }
.co-url code { font: 600 13px/1.4 var(--body); color: var(--gold-hi); overflow-wrap: anywhere; }
.co-hero-art { position: relative; display: flex; align-items: flex-end; justify-content: center; padding: 20px 10px 0 0; background: var(--art-den, none) 47% 76% / cover no-repeat, #1b1712; }
.co-hero-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 13, 19, 0.95), transparent 50%), linear-gradient(0deg, rgba(11, 13, 19, 0.4), transparent 30%); }
.co-hero-art .rig { position: relative; width: 180px; transform: translateY(10px); }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.co-history { grid-row: span 2; }
.co-list { list-style: none; margin: 0; padding: 4px 20px 16px; }
.co-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; }
.co-list li + li { border-top: 1px solid var(--line); }
.co-list li.you .co-nick { color: var(--gold-hi); }
.co-head { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: radial-gradient(circle at 50% 30%, #2a303a, #111317); object-fit: cover; }
.co-nick { display: flex; align-items: center; gap: 7px; min-width: 0; font: 700 17px/1.2 var(--title); overflow-wrap: anywhere; }
.co-members > .note { padding: 0 20px 16px; }
.co-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 8px 20px 16px; }
.co-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(243, 236, 218, 0.05), transparent 60%), var(--ink-2); min-width: 0; }
.co-stat .k { font: 600 10.5px/1.2 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.co-stat b { font: 700 20px/1.2 var(--body); color: var(--text); overflow-wrap: anywhere; }
.co-stat small { color: var(--muted); font-size: 12.5px; }
.co-top { list-style: none; margin: 0; padding: 0 20px 16px; }
.co-top li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 14.5px; }
.co-top .rank { color: var(--muted); font-size: 12px; }
.co-top b { color: var(--gold-hi); }
.co-games { list-style: none; margin: 0; padding: 0 20px 12px; }
.co-games > li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; }
.co-games > li + li { border-top: 1px solid var(--line); }
.co-games .ic { width: 38px; height: 38px; padding: 8px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); stroke: var(--gold-hi); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: var(--ink-2); }
.co-game { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.co-game-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.co-game-top b { font: 700 17px/1.2 var(--display); letter-spacing: 0.07em; text-transform: uppercase; color: var(--text); }
.co-game-top small { color: var(--muted); font-size: 12.5px; }
.co-players { display: flex; flex-wrap: wrap; gap: 5px; }
.co-players span { padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); font-size: 12.5px; color: var(--muted); }
.co-players span.won { border-color: rgba(214, 162, 63, 0.6); color: var(--gold-hi); background: rgba(214, 162, 63, 0.08); }
.co-players span.you { color: var(--text); }
.co-players .crown { font-style: normal; margin-right: 3px; }
.co-history .note { padding: 8px 20px 20px; }
.co-settings { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; }
.co-settings > :not(.panel-head) { margin-left: 20px; margin-right: 20px; }
.co-settings > .me-actions:first-child { margin-top: 18px; }
.co-rename { display: flex; align-items: flex-end; gap: 10px; }
.co-rename .field { flex: 1; }
.co-empty { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 14px; padding: 30px; max-width: 780px; margin: 20px auto 0; }
.co-empty h1 { font-size: 40px; color: var(--text); margin: 10px 0 12px; }
.co-empty p { margin: 0 0 16px; color: var(--muted); }
.co-empty-art .rig { width: 170px; }

/* ---------------------------------------------------------------- Позвать друзей (public/invite.js) */

.inv { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.inv-hero { grid-row: span 3; display: grid; grid-template-columns: 240px minmax(0, 1fr); overflow: hidden; }
.inv-art { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; padding: 20px 12px 0; background: var(--art-den, none) 47% 76% / cover no-repeat, #1b1712; }
.inv-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, rgba(11, 13, 19, 0.95)); pointer-events: none; }
.inv-art .thought { position: relative; z-index: 2; align-self: stretch; max-width: none; margin: 0; font-size: 13.5px; min-height: 0; }
.inv-art .rig { position: relative; z-index: 1; width: 170px; transform: translateY(8px); }
.inv-body { display: flex; flex-direction: column; gap: 16px; padding: 34px 30px 28px 18px; }
.inv-body h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1; color: var(--text); }
.inv-body > p { margin: 0; color: var(--text-2); }
.inv-link { display: flex; flex-wrap: wrap; gap: 10px; }
.inv-link input { flex: 1 1 220px; min-width: 0; font-weight: 600; color: var(--gold-hi); }
.inv-rules { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 7px; }
.inv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inv-stat { display: flex; flex-direction: column; gap: 3px; padding: 18px 16px; min-width: 0; }
.inv-stat + .inv-stat { border-left: 1px solid var(--line); }
.inv-stat b { font: 800 38px/1 var(--body); color: var(--gold-hi); text-shadow: 0 0 24px rgba(214, 162, 63, 0.3); }
.inv-stat span { font-size: 12.5px; color: var(--text); }
.inv-stat small { font-size: 11.5px; color: var(--muted); }
.inv-reward { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; }
.inv-reward .wr-reward { flex: 1 1 240px; }
.inv-xp { display: flex; flex-direction: column; align-items: center; padding: 6px 14px; border-left: 1px solid var(--line); }
.inv-xp b { font: 800 34px/1 var(--body); color: var(--gold-hi); }
.inv-xp span { font-size: 12px; color: var(--muted); }
.inv-mine .panel-body p { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; }

/* ---------------------------------------------------------------- Гардероб (public/wardrobe.js) */

.wr { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.wr-stage-panel { overflow: hidden; }
.wr-stage-panel .panel-head h1 { font-size: clamp(30px, 3vw, 44px); letter-spacing: 0.06em; color: var(--text); }
.wr-stage {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px;
  min-height: 440px; padding: 20px 12px 36px;
  background: var(--art-den, none) 47% 72% / cover no-repeat, #1b1712;
  overflow: hidden;
}
.wr-stage::before { /* свет лампы Логова */
  content: ''; position: absolute; left: 28%; top: 26%; width: 380px; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 190, 110, 0.28), transparent 70%); mix-blend-mode: screen; pointer-events: none;
  animation: flicker 4s steps(1) infinite;
}
.wr-stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(11, 13, 19, 0.75), transparent 26%), radial-gradient(120% 90% at 50% 70%, transparent 55%, rgba(0, 0, 0, 0.5));
}
.wr-say { position: relative; z-index: 2; align-self: center; margin: 0 0 4px; max-width: 320px; min-height: 0; }
.wr-courier { position: relative; z-index: 1; width: min(260px, 70%); }
.wr-courier::before { content: ''; position: absolute; left: 12%; right: 14%; bottom: -4px; height: 22px; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.62), transparent); }
.wr-courier .rig { cursor: pointer; }
.wr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 20px 4px; }
.wr-actions [data-wr="save"] { min-width: 140px; }
.wr-actions .link[hidden] { display: none; }
.wr-note { margin: 0; padding: 10px 20px 20px; font-size: 13px; }
.wr-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.wr-tab {
  appearance: none; flex: none;
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 9px 13px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2);
  font: 600 13px/1 var(--body); cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.wr-tab small { font-weight: 500; color: var(--dim); font-size: 11.5px; }
.wr-tab:hover { background: rgba(243, 236, 218, 0.06); color: #fff; }
.wr-tab.on { border-color: rgba(241, 209, 138, 0.6); background: rgba(214, 162, 63, 0.18); color: var(--gold-hi); }
.wr-tab.on small { color: var(--gold-hi); }
.wr-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; padding: 16px 18px; }
.wr-item {
  appearance: none; position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px 6px 10px;
  border: 1px solid var(--line); border-bottom: 2px solid var(--c); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(243, 236, 218, 0.05), transparent 60%), var(--ink-2); color: var(--text); text-align: left; cursor: pointer;
  transition: border-color 0.2s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.wr-item:hover { transform: translateY(-4px); border-color: rgba(241, 209, 138, 0.45); border-bottom-color: var(--c); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }
.wr-item.on { border-color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold-hi), 0 0 24px rgba(214, 162, 63, 0.2); }
.wr-item b { font: 700 14.5px/1.2 var(--title); color: var(--text); overflow-wrap: anywhere; padding: 0 3px; }
.wr-item small { font-size: 11.5px; color: var(--c); padding: 0 3px; }
.wr-item.locked b { color: var(--muted); }
.wr-item.locked small { color: var(--muted); }
.wr-item.locked .rig > img, .wr-item.locked .rig > svg, .wr-item.locked .rig .part { opacity: 0.4; }
.wr-lock {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid var(--line-2); border-radius: 50%; background: rgba(8, 9, 13, 0.72); color: var(--text-2);
}
.wr-lock svg.i { width: 14px; height: 14px; }
.wr-item.special .wr-lock { color: var(--gold-hi); border-color: rgba(241, 209, 138, 0.45); }
.wr-item.special.locked small { color: var(--gold-hi); }
.wr-none { --c: var(--line-2); }
.wr-worn {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 7px; border-radius: var(--radius-sm);
  background: var(--gold-hi); color: #1f1604;
  font: 700 10px/1.3 var(--body); letter-spacing: 0.1em; text-transform: uppercase;
}
.wr-hint { margin: 0; padding: 0 18px 18px; font-size: 13px; }
.wr-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-sm);
  background: radial-gradient(90% 90% at 50% 40%, #2b3039, #14171c 80%);
}
.wr-thumb .rig { position: absolute; }
.wr-thumb-none { display: grid; place-items: center; color: var(--dim); font-size: 30px; }

/* ---------------------------------------------------------------- Дотадл дня: страница /daily (public/daily.js) */

.daily-page { display: grid; gap: 20px; max-width: 1080px; margin: 0 auto; }
.daily-head {
  display: grid; grid-template-columns: minmax(0, 560px); gap: 22px; align-content: end;
  padding: 44px 34px 30px; overflow: hidden; min-height: 380px;
  background: linear-gradient(90deg, rgba(8, 9, 13, 0.97) 0%, rgba(8, 9, 13, 0.88) 40%, rgba(8, 9, 13, 0.2) 72%), var(--art-daily, none) 70% 38% / cover no-repeat, var(--ink-1);
}
.daily-title { position: relative; }
.daily-title .title { margin-top: 16px; }
.daily-title p { margin: 14px 0 0; color: var(--text-2); max-width: 46ch; }
.daily-stats { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.daily-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 15px; border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(4, 5, 7, 0.7); backdrop-filter: blur(4px); }
.daily-stat .k { font: 600 10.5px/1.2 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.daily-stat b { font: 700 24px/1.1 var(--body); color: var(--text); white-space: nowrap; }
.daily-stat small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.flakes i { font-style: normal; color: #9fd3ff; opacity: 0.22; filter: grayscale(1); }
.flakes i.on { opacity: 1; filter: none; text-shadow: 0 0 10px rgba(159, 211, 255, 0.6); }
.daily-next { grid-column: 1 / -1; position: relative; color: var(--muted); font-size: 13.5px; }
.daily-card-note b, [data-countdown] { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.daily-board { padding: 22px; }
.daily-board .dl-top { margin-bottom: 16px; }
.daily-win { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 20px; animation: dailyWin 0.5s ease-out both; }
@keyframes dailyWin { from { transform: scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.daily-win .dl-answer { border-color: var(--green); box-shadow: 0 0 30px rgba(95, 191, 106, 0.2); }
.daily-win-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.daily-win h2 { font-size: 34px; line-height: 1.05; color: var(--gold-hi); }
.daily-win p { margin: 0; }
.daily-win .kicker { color: var(--green-hi); }
.daily-win .dl-mini i { width: 16px; height: 16px; }
.daily-save { color: var(--muted); font-size: 14px; }
.daily-howto { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.daily-howto summary { cursor: pointer; color: var(--gold-hi); font: 600 12.5px/1.4 var(--body); letter-spacing: 0.2em; text-transform: uppercase; }
.daily-howto .dl-legend { margin-top: 10px; }
.daily-card .dl-answer, .daily-win .dl-answer, .daily-solved .dl-answer { width: auto; }
.daily-solved .dl-answer figcaption { font-size: 16px; padding: 7px 4px; overflow-wrap: break-word; }
.daily-squares { margin: 2px 0; }
.daily-share { width: 100%; }
.daily-share textarea { flex: 1 1 100%; font: 13px/1.35 var(--body); resize: none; }

/* ---------------------------------------------------------------- «Поделиться» (public/share.js) и страница /s/<id> */

.results-share { display: flex; justify-content: flex-end; }
.results-friend .wr-reward { margin-top: 2px; }
.share-sheet .modal-card { width: min(100%, 580px); }
.share-preview { position: relative; aspect-ratio: 1200 / 630; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--ink-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.share-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.share-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; background: var(--ink-2); }
.share-link input { width: 100%; font-weight: 600; color: var(--gold-hi); }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-actions .btn-lg { flex: 1 1 100%; }
.share-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.share-foot .link { color: var(--bad-text); font-size: 13px; }
.share-page .nav { grid-template-columns: auto; }
.share-wrap { max-width: 1000px; }
.share-card { overflow: hidden; }
.share-img { display: block; width: 100%; height: auto; }
.share-body { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 30px 32px 32px; }
.share-body::before { content: ''; position: absolute; left: 32px; top: -1px; width: 76px; height: 3px; background: linear-gradient(90deg, var(--ember), var(--ember-deep)); box-shadow: 0 0 18px rgba(255, 106, 61, 0.55); }
.share-body h1 { font-size: clamp(30px, 3.4vw, 50px); line-height: 1; color: var(--text); overflow-wrap: anywhere; }
.share-body p { margin: 0; color: var(--text-2); max-width: 70ch; }
.share-own { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.share-own .link { color: var(--bad-text); }
.share-missing { max-width: 680px; margin: 20px auto 0; }

/* ---------------------------------------------------------------- вход по ссылке (login.html) */

.solo { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.login-card { width: min(100%, 440px); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 28px 30px; text-align: center; }
.login-card::before { content: ''; position: absolute; left: 50%; top: -1px; width: 76px; height: 3px; transform: translateX(-50%); background: linear-gradient(90deg, var(--ember), var(--ember-deep)); box-shadow: 0 0 18px rgba(255, 106, 61, 0.55); }
.login-card .brand { flex-direction: column; gap: 10px; }
.login-card .brand img { width: 76px; height: 76px; }
.login-card h1 { font-size: 36px; color: var(--text); }
.login-card p { margin: 0; color: var(--text-2); }
.login-card .btn { width: 100%; }

/* ---------------------------------------------------------------- документы: /privacy, /terms, /offer, /consent, /contacts, /payment
   (server/legal/pages.js). Длинное чтение в языке сайта: строка-ярлык, крупный заголовок, редакция и дата, переход между
   документами, оглавление сбоку (липкое), текст 66–72 знака в строке; на телефоне оглавление — свёрнутым списком,
   таблицы — карточками. */

.legal { max-width: 1180px; }
.legal-head { margin-bottom: 34px; }
.legal-title { margin: 14px 0 0; max-width: 16em; font: 700 clamp(34px, 4.6vw, 62px)/1.02 var(--display); letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); text-wrap: balance; }
.legal-meta { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.legal-head .rule { margin: 22px 0 0; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; }
.legal-tabs a {
  padding: 8px 12px 7px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: 600 13px/1.1 var(--body); color: var(--text-2); white-space: nowrap; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.legal-tabs a:hover { border-color: rgba(241, 209, 138, 0.5); color: var(--text); }
.legal-tabs a.on { border-color: rgba(241, 209, 138, 0.7); background: rgba(214, 162, 63, 0.16); color: var(--gold-hi); }

.legal-body { display: block; }
.legal-body.has-toc { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 56px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--nav-h) + 22px); max-height: calc(100vh - var(--nav-h) - 44px); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.legal-toc-in { padding: 18px 18px 20px; border-left: 1px solid var(--line-2); }
.legal-toc b, .legal-toc-m summary { display: block; margin-bottom: 10px; font: 600 11.5px/1.2 var(--body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-hi); }
.legal-toc ol, .legal-toc-m ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.legal-toc li a, .legal-toc-m li a { display: block; padding: 5px 0; font-size: 13.5px; line-height: 1.35; color: var(--muted); transition: color 0.2s; }
.legal-toc li a:hover, .legal-toc-m li a:hover { color: var(--text); }
.legal-toc li.lv3 a, .legal-toc-m li.lv3 a { padding-left: 14px; font-size: 13px; color: var(--dim); }
.legal-toc-m { display: none; }
.legal-text .legal-toc-m ol { margin: 0; padding: 0; }
.legal-text .legal-toc-m li { margin: 0; }
.legal-text .legal-toc-m li a { text-decoration: none; }

.legal-text { max-width: 74ch; font-size: 16.5px; line-height: 1.72; color: var(--text-2); }
.legal-text > :first-child { margin-top: 0; }
.legal-text h2 { scroll-margin-top: calc(var(--nav-h) + 20px); margin: 48px 0 14px; font: 700 24px/1.2 var(--display); letter-spacing: 0.03em; color: var(--text); }
.legal-text h3 { scroll-margin-top: calc(var(--nav-h) + 20px); margin: 30px 0 10px; font: 700 19px/1.3 var(--title); color: var(--gold-hi); }
.legal-text h4 { margin: 24px 0 8px; font: 700 16.5px/1.3 var(--title); color: var(--text); }
.legal-text p { margin: 0 0 14px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.legal-text p:target, .legal-text h2:target, .legal-text h3:target { animation: legal-target 2.4s var(--ease); }
@keyframes legal-target { 0% { background: rgba(214, 162, 63, 0.18); } 100% { background: transparent; } }
.legal-text b { color: var(--text); font-weight: 600; }
.legal-text a { color: var(--gold-hi); text-decoration: underline; text-decoration-color: rgba(241, 209, 138, 0.35); text-underline-offset: 3px; }
.legal-text a:hover { text-decoration-color: var(--gold-hi); }
.legal-text ul, .legal-text ol { margin: 0 0 16px; padding-left: 24px; }
.legal-text li { margin: 4px 0; }
.legal-text li::marker { color: var(--gold); }
.legal-text code { padding: 1px 5px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ink-2); font: 500 0.88em/1 ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--text); white-space: nowrap; }
.doc-blank { display: inline; padding: 1px 6px; border: 1px dashed rgba(241, 209, 138, 0.5); border-radius: var(--radius-sm); background: rgba(214, 162, 63, 0.08); color: var(--gold-hi); font-size: 0.9em; }
.doc-note { margin: 0 0 18px; padding: 16px 20px; border: 1px solid rgba(241, 209, 138, 0.35); border-left: 3px solid var(--gold-hi); border-radius: var(--radius); background: linear-gradient(90deg, rgba(214, 162, 63, 0.12), rgba(214, 162, 63, 0.03)); }
.doc-note p:last-child { margin-bottom: 0; }
.doc-table { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(8, 9, 13, 0.6); }
.doc-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.doc-table th, .doc-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.doc-table thead th { border-top: 0; background: rgba(243, 236, 218, 0.03); font: 600 11px/1.3 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.doc-table.kv th[scope="row"] { width: 36%; color: var(--muted); font-weight: 500; }
.doc-table tbody tr:first-child th, .doc-table tbody tr:first-child td { border-top: 0; }
.doc-table thead + tbody tr:first-child td, .doc-table thead + tbody tr:first-child th { border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- подвал: документы, статистика, реквизиты (server/legal/footer.js) */

.footer .wrap { display: grid; gap: 14px; justify-content: stretch; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; }
.footer .foot-docs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.foot-stats { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--muted); }
.foot-stats b { font-weight: 600; color: var(--text-2); }
.foot-stats:hover { color: var(--text-2); }
.foot-seller, .foot-valve { margin: 0; line-height: 1.5; }
.foot-seller a { color: var(--muted); }
.foot-seller { color: var(--muted); }

/* ---------------------------------------------------------------- плашка о статистике (public/legal.js): внизу, не в комнате */

.stats-banner {
  position: fixed; left: 50%; bottom: 22px; z-index: 65;
  display: flex; align-items: center; gap: 14px 22px; width: min(880px, calc(100% - 32px));
  padding: 16px 18px 16px 22px;
  border: 1px solid var(--line-2); border-top: 2px solid var(--gold); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(214, 162, 63, 0.1), transparent 55%), rgba(9, 10, 14, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  font-size: 14px; line-height: 1.5; color: var(--text-2);
  opacity: 0; transform: translate(-50%, 16px); transition: opacity 0.35s, transform 0.35s var(--ease);
}
.stats-banner.in { opacity: 1; transform: translate(-50%, 0); }
.stats-banner b { color: var(--text); font-weight: 600; }
.stats-banner a { color: var(--gold-hi); text-decoration: underline; text-decoration-color: rgba(241, 209, 138, 0.35); }
.sb-text { flex: 1; min-width: 0; }
.sb-actions { display: flex; flex: none; gap: 8px; }
.stats-banner.notice { border-top-color: var(--line-2); }
body:has(.stats-banner) .footer { padding-bottom: 150px; } /* плашка не закрывает подвал: до него можно долистать */

/* ---------------------------------------------------------------- «Мы опубликовали правила» (public/account.js) и Профиль → «Данные» */

.accept-sheet .modal-card { width: min(100%, 520px); }
.accept-sheet .modal-card > p a { color: var(--gold-hi); text-decoration: underline; text-decoration-color: rgba(241, 209, 138, 0.35); }
.accept-sheet .btn-primary { align-self: stretch; }
.accept-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; color: var(--dim); }
.accept-links .link { font-size: 14px; color: var(--text-2); }
.legal-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.legal-stat b { display: block; font: 700 16px/1.25 var(--title); color: var(--text); }
.legal-stat > div > span { display: block; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.legal-links a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.legal-links a:hover { color: var(--text); }

/* ---------------------------------------------------------------- комната: шапка — название игры крупно, код — у всех на виду */

.page.room { padding-top: calc(var(--nav-h) + 20px); }
/* над комнатой — сцена её игры, приглушённая и размытая, уходит в темноту (--room-art ставит public/app.js) */
body.in-room main.site::before {
  inset: -20px -20px auto; height: 640px;
  background:
    linear-gradient(180deg, rgba(4, 5, 7, 0.55) 0%, rgba(4, 5, 7, 0.82) 55%, var(--ink-0) 100%),
    var(--room-art, none) center 32% / cover no-repeat, var(--ink-1);
  filter: blur(3px) saturate(0.85);
}
body.in-room .nav-cta { display: none; }
.room-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 20px;
  padding: 16px 20px;
  margin-bottom: 18px;
  overflow: hidden;
  background:
    radial-gradient(520px 200px at 0% 0%, rgba(214, 162, 63, 0.14), transparent 70%),
    radial-gradient(420px 200px at 100% 0%, rgba(74, 58, 138, 0.22), transparent 70%),
    var(--panel-glass);
}
.room-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.room-title svg { flex: none; width: 46px; height: 46px; padding: 9px; border: 1px solid rgba(241, 209, 138, 0.35); border-radius: 50%; background: radial-gradient(circle at 50% 30%, rgba(214, 162, 63, 0.18), rgba(4, 5, 7, 0.6)); stroke: var(--gold-hi); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; box-shadow: 0 0 20px rgba(214, 162, 63, 0.15); }
.room-title > div { min-width: 0; }
.room-title h1 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.05; letter-spacing: 0.06em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-title .kicker { font-size: 10.5px; letter-spacing: 0.24em; }
.room-code {
  appearance: none;
  display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center;
  padding: 8px 16px;
  background: rgba(4, 5, 7, 0.55);
  border: 1px dashed rgba(241, 209, 138, 0.55);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.room-code:hover { border-style: solid; border-color: var(--gold-hi); background: rgba(214, 162, 63, 0.08); box-shadow: 0 0 24px rgba(214, 162, 63, 0.2); }
.room-label { grid-row: 1 / 3; font: 600 10.5px/1 var(--body); text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); }
#roomCodeText { font: 800 23px/1 var(--body); letter-spacing: 0.22em; color: var(--gold-hi); text-shadow: 0 0 16px rgba(214, 162, 63, 0.35); }
.room-copy { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.room-copy svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.room-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.me-name { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.me-name b { color: var(--text); font-weight: 600; }

.save-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  padding: 9px 9px 9px 16px;
  border: 1px solid rgba(214, 162, 63, 0.4); border-left: 3px solid var(--gold-hi);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(214, 162, 63, 0.14), var(--panel) 70%);
}
.save-banner span { flex: 1; min-width: 0; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.stage { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.side .panel { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3); }
.side .panel-head { align-items: center; padding: 14px 16px 8px; }
.side .panel-head h2 { font-size: 17px; }
.side .panel-body { padding: 6px 14px 14px; }
.side details.panel > summary { cursor: pointer; list-style: none; padding-bottom: 14px; }
.side details.panel > summary::-webkit-details-marker { display: none; }
.side details.panel > summary::after { content: '▾'; color: var(--muted); font-size: 13px; }
.side details.panel[open] > summary { padding-bottom: 8px; }
.side details.panel[open] > summary::after { content: '▴'; }
.step { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.step input { width: 72px; padding: 4px 8px; font-size: 13px; }

/* ---------------------------------------------------------------- табло, управление и игры (разметка — public/games/*.js) */

/* ---------- табло с героем ---------- */

.board {
  position: relative;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(214, 162, 63, 0.07), transparent 70%),
    linear-gradient(180deg, var(--panel-hi), transparent 120px),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
}
.board-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; margin-bottom: 18px;
}
.board-top b { color: var(--text); }
.round-no {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 4px 10px; border-radius: var(--radius-sm); background: var(--panel-3); border: 1px solid var(--line); color: var(--gold-hi);
}
.badge { padding: 4px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.badge-good { background: rgba(95, 191, 106, 0.15); color: var(--green-hi); border: 1px solid rgba(95, 191, 106, 0.45); }
.badge-bad { background: rgba(201, 67, 47, 0.14); color: var(--bad-text); border: 1px solid rgba(201, 67, 47, 0.45); }
.badge-muted { background: var(--panel-3); color: var(--muted); border: 1px solid var(--line); }
.badge-secret { background: rgba(214, 162, 63, 0.14); color: var(--gold-hi); border: 1px solid var(--gold-deep); }

.board-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }

.letter-tile {
  width: 164px; aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 35%, #2b2618, #101114 75%);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 36px rgba(214, 162, 63, 0.18), 0 0 36px rgba(214, 162, 63, 0.1);
}
.letter-tile.dim { border-color: var(--gold-deep); box-shadow: none; opacity: 0.8; }
.lt-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold); }
.lt-letter { font: 700 108px/1 var(--display); color: var(--gold-hi); text-shadow: 0 0 26px rgba(214, 162, 63, 0.45); }
.letter-tile.pop { animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }

.hero-card { margin: 0; min-width: 0; max-width: 460px; width: 100%; justify-self: center; }
.hero-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0b0c0f;
  display: grid; place-items: center;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-frame .ph { display: none; font: 700 72px/1 var(--display); color: var(--muted); }
.hero-card.noimg img { display: none; }
.hero-card.noimg .ph { display: block; }
.hero-card figcaption { margin-top: 10px; text-align: center; font: 700 26px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream); }
.hero-card.secret .hero-frame { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.14), 0 0 40px rgba(214, 162, 63, 0.16); }
.hero-card.revealed .hero-frame { border-color: var(--line-2); }
.hero-card.mystery .hero-frame {
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 67, 47, 0.18), transparent 60%),
    repeating-linear-gradient(45deg, #15171c 0 14px, #101216 14px 28px);
  border-color: rgba(201, 67, 47, 0.5);
}
.hero-card.mystery .q { font: 700 120px/1 var(--display); color: var(--red-hi); text-shadow: 0 0 34px rgba(201, 67, 47, 0.6); }
.hero-card.mystery figcaption { color: var(--muted); letter-spacing: 0.3em; }
.hero-card.idle .hero-frame { border-color: var(--line-2); }
.hero-card.idle .q { color: var(--muted); text-shadow: none; }

.board-caption { margin-top: 18px; text-align: center; color: var(--muted); font-size: 15px; }
.board-caption b { color: var(--text); }
.board-caption .hl { color: var(--gold-hi); font-weight: 700; }

/* ---------- управление ---------- */

.controls {
  background: linear-gradient(180deg, var(--panel-hi), transparent 100px), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.controls .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.status { color: var(--muted); font-size: 15px; }
.status b { color: var(--text); }
.hint { color: var(--muted); font-size: 13px; }
.answering-box {
  width: 100%;
  border: 1px solid rgba(95, 191, 106, 0.5);
  background: linear-gradient(180deg, rgba(95, 191, 106, 0.12), transparent);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.answering-box .who { font: 700 22px/1.2 var(--body); }
.answering-box .who span { color: var(--green-hi); }

.buzzer {
  width: min(100%, 380px);
  height: 88px;
  border: 1px solid #ff7a63;
  border-radius: var(--radius);
  font: 700 34px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--action), var(--action-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 5px 0 var(--red-deep), 0 14px 34px rgba(225, 38, 28, 0.35);
  cursor: pointer;
  transition: transform 0.06s, box-shadow 0.06s, filter 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.buzzer:hover:not(:disabled) { filter: brightness(1.08); }
.buzzer:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 0 var(--red-deep), 0 8px 18px rgba(225, 38, 28, 0.3); }
.buzzer:disabled {
  cursor: default;
  background: #1a1d23;
  border-color: var(--line-2);
  color: var(--muted);
  font: 600 17px/1.2 var(--body);
  letter-spacing: 0.06em;
  box-shadow: 0 5px 0 #0c0d10;
}
.buzzer.mine, .buzzer.mine:disabled {
  background: linear-gradient(180deg, #79c873, #3f8b3a);
  border-color: var(--green-hi);
  color: #fff;
  font: 700 26px/1.1 var(--display);
  letter-spacing: 0.1em;
  box-shadow: 0 5px 0 var(--green-deep), 0 0 0 8px rgba(95, 191, 106, 0.2);
  animation: pulse 1.1s infinite;
}

/* ---------- табло очков ---------- */

.scoreboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.scoreboard li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.scoreboard li.me { border-color: var(--line-2); }
.scoreboard li.is-leader { border-color: var(--gold-deep); border-left-color: var(--gold); background: linear-gradient(90deg, rgba(214, 162, 63, 0.14), var(--panel-2) 70%); }
.scoreboard li.is-answering { border-color: rgba(95, 191, 106, 0.6); border-left-color: var(--green); background: linear-gradient(90deg, rgba(95, 191, 106, 0.16), var(--panel-2) 70%); }
.scoreboard li.offline { opacity: 0.45; }
.rank { color: var(--dim); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.pname { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pname .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
/* ник — кнопка: мини-профиль игрока (public/profile.js) */
.pname .pmini { appearance: none; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 500; text-align: left; cursor: pointer; text-decoration: underline dotted rgba(243, 236, 218, 0.28); text-underline-offset: 3px; }
.pname .pmini:hover { color: var(--gold-hi); text-decoration-color: currentColor; }
.tag { flex: none; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 6px; border-radius: var(--radius-sm); }
.tag-admin { background: rgba(214, 162, 63, 0.18); color: var(--gold-hi); }
.tag-host { background: var(--panel-3); color: var(--gold-hi); }
.tag-me { background: var(--panel-3); color: #b9c3d9; }
.tag-off { background: var(--panel-3); color: var(--muted); }
.score { font: 700 17px/1 var(--body); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; color: var(--cream); }
.score.neg { color: var(--bad-text); }
.score.bump { animation: bump 0.5s; }
.actions { display: flex; gap: 3px; }
/* табло: у ведущего по пять кнопок на строку (очки, ведущий, жалоба, удалить) — они во второй строке под ником, ник
   целиком; у остальных игроков кнопка одна (жалоба) — строка одна */
.scoreboard li:has(.actions > :nth-child(3)) { grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-areas: 'rank name score' '. tools tools'; row-gap: 7px; }
.scoreboard li:has(.actions > :nth-child(3)) .rank { grid-area: rank; }
.scoreboard li:has(.actions > :nth-child(3)) .pname { grid-area: name; }
.scoreboard li:has(.actions > :nth-child(3)) .actions { grid-area: tools; }
.scoreboard li:has(.actions > :nth-child(3)) .score { grid-area: score; }
.mini {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
  font-size: 14px; line-height: 1;
  padding: 0;
}
.mini:hover { border-color: var(--gold); }
.mini.plus:hover { border-color: var(--green); color: var(--green-hi); }
.mini.minus:hover { border-color: var(--red); color: var(--bad-text); }

/* ---------- лог ---------- */

.log { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.log li { color: var(--text-2); overflow-wrap: anywhere; }
.log time { color: var(--dim); font-variant-numeric: tabular-nums; margin-right: 6px; font-size: 12px; }
.log .empty { color: var(--muted); }

/* ---------- настройки и правила ---------- */

.settings-form { display: flex; flex-direction: column; gap: 10px; }
.settings-form label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--text-2); }
.settings-form input { width: 96px; padding: 6px 10px; }
.settings-form select { width: 160px; padding: 6px 10px; }
.settings-game { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.settings-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 4px; }
.rules-list { margin: 0; padding-left: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.rules-list b { color: var(--gold-hi); }

/* ---------- отметки в табло ---------- */

.mark {
  flex: none;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.mark-done { background: rgba(95, 191, 106, 0.2); color: var(--green-hi); }
.mark-wait { background: var(--panel-3); color: var(--muted); animation: blink-soft 1.4s infinite; }
.mark-away { font-size: 12px; }
@keyframes blink-soft { 50% { opacity: 0.4; } }

.controls:empty { display: none; }

/* ---------- Имбажинариум ---------- */

.icard {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: radial-gradient(120% 80% at 50% 18%, #2e2a3a 0%, #15171e 58%, #0b0c10 100%);
  color: #fff;
  font: inherit;
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.icards-tall .icard { aspect-ratio: 2 / 3; } /* наши колоды — вертикальные 2:3 (public/decks.js) */
button.icard { cursor: pointer; }
button.icard:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45); }
.icard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.icard img.fallback { object-position: center 20%; }
.icard-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 8px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  font-weight: 700; font-size: 13px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icard-no {
  position: absolute; top: 7px; left: 7px;
  min-width: 26px; height: 26px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(10, 11, 14, 0.8);
  border: 1px solid var(--line-2);
  font: 700 13px/1 var(--body);
}
.icard-zoom {
  position: absolute; top: 7px; right: 7px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(10, 11, 14, 0.75);
  border: 1px solid var(--line-2);
  font-size: 15px;
  cursor: zoom-in;
  opacity: 0;
  transition: opacity 0.15s;
}
.icard:hover .icard-zoom, .icard:focus-visible .icard-zoom { opacity: 1; }
@media (hover: none) { .icard-zoom { opacity: 0.85; } }
.icard-tag {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--panel-3); border: 1px solid var(--line-2);
  white-space: nowrap;
}
.icard.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.35), 0 12px 26px rgba(0, 0, 0, 0.45); transform: translateY(-6px); }
.icard.mine { border-color: #4b7fc4; }
.icard.mine .icard-tag { background: #1d3558; border-color: #4b7fc4; color: #cfe0ff; }
.icard.voted { border-color: var(--green); }
.icard.voted .icard-tag { background: #173a24; border-color: var(--green); color: var(--green-hi); }
.icard.story { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.3), 0 0 34px rgba(214, 162, 63, 0.3); }
.icard.story .icard-tag { background: #3a2c10; border-color: var(--gold); color: var(--gold-hi); }
.icard.back {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 67, 47, 0.22), transparent 60%),
    repeating-linear-gradient(45deg, #1b1417 0 10px, #140f12 10px 20px);
  border-color: rgba(201, 67, 47, 0.55);
}
.icard.back span { font: 700 58px/1 var(--display); color: var(--red-hi); text-shadow: 0 0 24px rgba(201, 67, 47, 0.6); }
.icard.back.in { animation: deal 0.35s ease-out; }
.icard.placeholder { background: transparent; border-style: dashed; border-color: var(--line-2); }
.icard.placeholder span { display: none; }
@keyframes deal { from { transform: translateY(-16px) rotate(-6deg); opacity: 0; } }

.im-clue:empty, .im-status:empty, .im-actions:empty { display: none; }
.im-clue { text-align: center; margin: 4px 0 18px; }
.clue { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.clue-by { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.clue q { font: 700 30px/1.2 var(--display); color: var(--gold-hi); quotes: '«' '»'; overflow-wrap: anywhere; }
.clue.voice { font: 700 20px/1.3 var(--body); color: var(--gold-hi); }
.clue-prompt { font: 700 20px/1.3 var(--body); }
.clue-prompt.muted { font-weight: 500; }
.phase-label { font-size: 13px; color: var(--gold-hi); }
.im-deck { font-size: 13px; color: var(--muted); }

.im-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 172px));
  justify-content: center;
  gap: 14px;
}
.im-grid.reveal { grid-template-columns: repeat(auto-fill, minmax(128px, 172px)); row-gap: 18px; }
.im-slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.im-owner { text-align: center; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-owner.story { color: var(--gold-hi); font-weight: 700; }
.im-voters { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }

.im-intro { display: grid; place-items: center; padding: 12px 0 4px; }
.fan { position: relative; width: 240px; height: 190px; }
.fan .icard { position: absolute; width: 120px; left: 60px; top: 10px; }
.fan .icard:nth-child(1) { transform: rotate(-14deg) translateX(-54px); }
.fan .icard:nth-child(3) { transform: rotate(14deg) translateX(54px); }
.fan.thinking .icard:nth-child(2) { animation: think 1.6s ease-in-out infinite; }
@keyframes think { 50% { transform: translateY(-10px); } }

.im-status { margin-top: 18px; text-align: center; color: var(--text-2); }
.im-status > * + * { margin-top: 10px; }
.im-status b { color: var(--text); }
.deltas { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.im-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }

.im-over { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }
.im-over .trophy { font-size: 64px; line-height: 1; filter: drop-shadow(0 0 24px rgba(214, 162, 63, 0.5)); }
.im-over .winner { font: 700 32px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-hi); text-align: center; }

#stage[data-game='imaginarium'] .controls { align-items: stretch; text-align: left; }
.im-hand-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.im-hand-head h2, .mk-zone-head h2, .dl-others h2 { font-size: 16px; color: var(--gold-hi); margin: 0; }
.im-hand-head .muted { font-size: 13px; }
.im-hand {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
  padding-top: 6px;
}
.im-hand-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.im-hand-actions:empty { display: none; }
.im-hand-actions input { flex: 1 1 260px; max-width: 480px; }

/* ---------- Рисовалка ---------- */

#stage[data-game='draw'] .board { padding: 16px; }
.dr-head { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr) minmax(90px, auto); align-items: center; gap: 12px; margin-bottom: 10px; }
.dr-round { justify-self: start; white-space: nowrap; }
.dr-word { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; text-align: center; min-height: 44px; justify-content: center; }
.dr-answer { font: 700 28px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-hi); }
.dr-hint { font-size: 12.5px; color: var(--muted); }
.dr-guess { font: 700 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream); }
.dr-timer {
  justify-self: end;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: rgba(0, 0, 0, 0.3);
  font: 700 18px/1 var(--body); color: var(--gold-hi);
}
.dr-timer.off { visibility: hidden; }
.dr-timer.low { border-color: var(--red-hi); color: var(--bad-text); animation: blink-soft 1s infinite; }
.dr-bar { height: 3px; border-radius: 1px; background: var(--panel-3); overflow: hidden; margin-bottom: 12px; }
.dr-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--action)); transition: width 0.25s linear; }

.dr-main { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 12px; }
.dr-canvas-wrap { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: #fff; }
.dr-canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
.dr-canvas.can-draw { cursor: crosshair; }
.dr-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 16px;
  overflow: auto;
  background: rgba(10, 11, 14, 0.86);
  backdrop-filter: blur(2px);
}
.dr-card { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 460px; text-align: center; }
.dr-card.wide { max-width: 100%; }
.dr-card h3 { font-size: 24px; line-height: 1.2; color: var(--cream); }
.dr-card p { margin: 0; }
.dr-big { font-size: 54px; line-height: 1; }
.dr-big.pulse { animation: think 1.4s ease-in-out infinite; }
.dr-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.dr-option {
  width: 128px; padding: 0;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--panel-2); color: inherit; font: inherit;
  overflow: hidden; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.dr-option:hover { transform: translateY(-4px); border-color: var(--gold); }
.dr-hero { margin: 0; }
.dr-hero img {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  background: radial-gradient(120% 80% at 50% 18%, #2e2a3a 0%, #15171e 58%, #0b0c10 100%);
}
.dr-hero figcaption { padding: 6px 8px 8px; font-weight: 700; font-size: 14px; }
.dr-hero.big { width: 150px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gold); background: var(--panel-2); }

.dr-chat {
  display: flex; flex-direction: column;
  contain: size; /* высота — как у холста, сообщения прокручиваются внутри */
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.dr-msgs { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.dr-msgs li { overflow-wrap: anywhere; line-height: 1.35; }
.dr-msgs .sys { color: var(--muted); font-size: 12.5px; }
.dr-msgs .ok { color: var(--green-hi); }
.dr-msgs .close { color: var(--gold-hi); }
.dr-msgs .secret { color: #9fd3ae; background: rgba(95, 191, 106, 0.08); border-radius: var(--radius-sm); padding: 1px 5px; }
.dr-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.dr-form input { flex: 1; padding: 9px 10px; }
.dr-send { padding: 8px 12px; box-shadow: none; }

.dr-tools { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dr-tools:empty { display: none; }
.dr-tool-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.dr-tool-row.right { justify-content: flex-end; }
.dr-color {
  width: 30px; height: 30px; padding: 0;
  border-radius: 999px; border: 2px solid var(--line-2);
  background: var(--c); color: #444; font-size: 14px;
  cursor: pointer;
}
.dr-color.on { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.dr-size {
  width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--panel-3); cursor: pointer;
}
.dr-size span { display: block; width: var(--w); height: var(--w); border-radius: 999px; background: var(--text); }
.dr-size.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(214, 162, 63, 0.35); }
.dr-sep { width: 1px; height: 26px; margin: 0 4px; background: var(--line-2); }

@media (max-width: 760px) {
  /* порядок на телефоне: холст → инструменты → чат, чтобы рисовать без прокрутки */
  #stage[data-game='draw'] .board { display: flex; flex-direction: column; }
  .dr-main { display: contents; }
  .dr-tools { order: 1; margin-top: 10px; }
  .dr-chat { order: 2; margin-top: 10px; contain: none; height: 240px; }
  .dr-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dr-answer { font-size: 22px; }
  /* поверх маленького холста всё должно влезть без прокрутки */
  .dr-overlay { padding: 8px; }
  .dr-card { gap: 6px; }
  .dr-card h3 { font-size: 17px; }
  .dr-card p { font-size: 12.5px; }
  .dr-big { font-size: 36px; }
  .dr-options { gap: 8px; }
  .dr-option { width: 82px; }
  .dr-hero figcaption { padding: 3px 4px 5px; font-size: 11.5px; }
  .dr-hero.big { width: 84px; }
  .dr-card .btn-lg { padding: 9px 16px; font-size: 13px; }
}

/* ---------- Испорченный курьер ---------- */

#stage[data-game='phone'] .board { padding: 16px; }
.ph-body { display: flex; flex-direction: column; gap: 12px; }
.ph-body.locked .ph-canvas-wrap, .ph-body.locked .ph-write { opacity: 0.6; }
.ph-intro { margin: 24px auto; }
.ph-prompt { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.ph-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.ph-prompt q { font: 700 28px/1.2 var(--display); color: var(--gold-hi); quotes: '«' '»'; overflow-wrap: anywhere; }
.ph-prompt q.empty { font: 500 18px/1.3 var(--body); color: var(--muted); }
.ph-canvas-wrap {
  position: relative;
  width: 100%; max-width: 560px; margin: 0 auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius); border: 1px solid var(--line-2);
  overflow: hidden; background: #fff;
}
.ph-canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
.ph-canvas.can-draw { cursor: crosshair; }
.ph-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #9a9a9a; font-size: 14px; }
.ph-write { display: flex; gap: 8px; width: 100%; max-width: 560px; margin: 0 auto; }
.ph-write input { flex: 1; font-size: 17px; }
.ph-actions { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.ph-actions:empty { display: none; }
.ph-status { color: var(--green-hi); font-weight: 500; }
.ph-album-head { text-align: center; color: var(--muted); }
.ph-album-head b { color: var(--text); }
.ph-feed { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 560px; max-height: 68vh; margin: 0 auto; padding: 4px; overflow-y: auto; }
.ph-entry { display: flex; flex-direction: column; gap: 6px; }
.ph-entry.new { animation: deal 0.35s ease-out; }
.ph-entry .ph-canvas-wrap { max-width: 420px; margin: 0; }
.ph-who { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.ph-who b { color: var(--text); }
.ph-bubble {
  align-self: flex-start; max-width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius) var(--radius) var(--radius) 0;
  background: var(--panel-3); border: 1px solid var(--line-2);
  font: 700 18px/1.3 var(--body); color: var(--gold-hi);
  overflow-wrap: anywhere;
}
.ph-bubble.empty { font-weight: 500; color: var(--muted); }
.ph-like {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--panel-3); color: var(--text);
  font: inherit; font-size: 13px;
  cursor: pointer;
}
.ph-like.on { border-color: var(--gold); background: rgba(214, 162, 63, 0.15); }
.ph-like.static { cursor: default; }

@media (max-width: 600px) {
  .dr-head { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .dr-guess { font-size: 18px; }
  .ph-prompt q { font-size: 22px; }
  .ph-bubble { font-size: 16px; }
  .ph-feed { max-height: none; }
}

/* ---------- Бункер ---------- */

#stage[data-game='bunker'] .board { padding: 16px; }
#stage[data-game='bunker'] .controls { align-items: stretch; text-align: left; }
.mark-out { font-size: 12px; }
.scoreboard li:has(.mark-out) .n { text-decoration: line-through; text-decoration-color: rgba(255, 138, 118, 0.6); }

.bk-scenario:empty, .bk-grid:empty { display: none; }
.bk-scn {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 67, 47, 0.45);
  background:
    repeating-linear-gradient(135deg, rgba(214, 162, 63, 0.05) 0 12px, transparent 12px 24px),
    linear-gradient(180deg, rgba(201, 67, 47, 0.12), transparent);
}
.bk-scn summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.bk-scn summary::-webkit-details-marker { display: none; }
.bk-scn-title { font-size: 18px; }
.bk-scn-title b { font-family: var(--display); font-weight: 700; font-size: 21px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-hi); }
.bk-seats { font-size: 13px; color: var(--gold-hi); font-weight: 600; }
.bk-scn p { margin: 8px 0; color: var(--text-2); }
.bk-bunker { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--text-2); }
.bk-features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.bk-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bk-status:empty { display: none; }
.bk-msg { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.bk-msg b { color: var(--text); }
.bk-you { color: var(--gold-hi) !important; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bk-verdict { font: 700 20px/1.3 var(--body); }
.bk-intro { margin: 12px auto; }

.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.bk-dos {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-2);
  transition: border-color 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.bk-dos.me { border-color: var(--line-2); }
.bk-dos.speaking { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.18); }
.bk-dos.out { opacity: 0.55; }
.bk-dos.exiled-now { opacity: 1; border-color: var(--red-hi); box-shadow: 0 0 0 3px rgba(201, 67, 47, 0.25); animation: flashBad 0.7s; }
.bk-dos.survivor { border-color: var(--green); box-shadow: 0 0 0 3px rgba(95, 191, 106, 0.18); }
.bk-dos-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.bk-ava {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: radial-gradient(120% 80% at 50% 18%, #2e2a3a 0%, #15171e 58%, #0b0c10 100%) center / cover;
  background-size: cover;
  background-position: center 18%;
}
.bk-ava.secret { opacity: 0.55; filter: grayscale(0.4); }
.bk-ava.empty { display: grid; place-items: center; font: 700 24px/1 var(--display); color: var(--muted); }
.bk-who { min-width: 0; }
.bk-name { display: flex; align-items: center; gap: 6px; }
.bk-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.bk-hero { font-weight: 700; color: var(--gold-hi); }
.bk-hero.secret { color: var(--muted); font-weight: 500; }
.bk-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.bk-badges .badge { font-size: 12px; padding: 2px 8px; }
.bk-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-rows li {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 5px 6px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.3;
}
.bk-rows li.open { background: rgba(214, 162, 63, 0.08); }
.bk-rows .ic { text-align: center; }
.bk-rows .txt { display: flex; flex-direction: column; min-width: 0; }
.bk-rows li.closed .txt { flex-direction: row; align-items: baseline; gap: 10px; }
.bk-rows .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.bk-rows li.closed .lbl { font-size: 12px; text-transform: none; letter-spacing: 0; }
.bk-rows .val { overflow-wrap: anywhere; }
.bk-rows li.open .val { color: var(--text); font-weight: 500; }
.bk-rows li.secret .val { color: #8f97aa; font-style: italic; }
.bk-rows li.closed .val { color: var(--muted); letter-spacing: 0.2em; }
.bk-open { padding: 3px 9px; font-size: 11px; align-self: center; }
.bk-dos-sp { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: 6px; }
.bk-vote { white-space: nowrap; }
.bk-vote.on { box-shadow: none; }
.bk-side { font-size: 18px; }
.bk-tally { font: 700 16px/1 var(--body); color: var(--bad-text); white-space: nowrap; }

.bk-sp { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.bk-sp.used { opacity: 0.6; }
.bk-sp-card { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 300px; }
.bk-sp-icon {
  flex: none;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-deep);
  background: radial-gradient(circle at 50% 30%, rgba(214, 162, 63, 0.25), transparent 70%), var(--panel-3);
}
.bk-sp-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.bk-sp-card b { font-size: 17px; color: var(--gold-hi); }
.bk-sp-card p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.bk-sp-use { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bk-sp-use select { padding: 8px 10px; }

@media (max-width: 600px) {
  .bk-grid { grid-template-columns: minmax(0, 1fr); }
  .bk-verdict { font-size: 17px; }
}

/* ---------- Дотадл ---------- */

#stage[data-game='dotadle'] .board { padding: 16px; }
#stage[data-game='dotadle'] .controls { align-items: stretch; text-align: left; }
:root { --dl-hit: #3f8f4a; --dl-part: #b58a26; --dl-miss: #8e3325; }
.dl-intro { margin: 16px auto; }
.dl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.dl-search { position: relative; flex: 1 1 320px; }
.dl-input { width: 100%; font-size: 17px; }
.dl-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  list-style: none; margin: 0; padding: 4px;
  background: #121418; border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
}
.dl-suggest.open { display: block; }
.dl-suggest button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.dl-suggest button:hover, .dl-suggest button.on { background: var(--panel-3); }
.dl-suggest img { width: 48px; height: 27px; object-fit: cover; border-radius: var(--radius-sm); }
.dl-left { color: var(--muted); white-space: nowrap; }
.dl-left b { color: var(--text); }
.dl-banner { flex: 1; padding: 12px 14px; border-radius: var(--radius); font-size: 17px; font-weight: 500; }
.dl-banner.ok { background: rgba(95, 191, 106, 0.14); border: 1px solid rgba(95, 191, 106, 0.5); }
.dl-banner.fail { background: rgba(201, 67, 47, 0.12); border: 1px solid rgba(201, 67, 47, 0.45); }

/* Вид таблицы зависит от ширины самой доски (container query): узкая доска в комнате рядом с табло и телефон
   получают одинаковую компактную таблицу. Старый браузер без container queries — широкая таблица с прокруткой. */
.dl-table-wrap { overflow-x: auto; padding-bottom: 4px; container-type: inline-size; }
.dl-table { min-width: 660px; display: flex; flex-direction: column; gap: 6px; }
@supports (container-type: inline-size) { .dl-table { min-width: 0; } }
.dl-rows { display: flex; flex-direction: column; gap: 6px; }
.dl-row { display: grid; grid-template-columns: 1.35fr repeat(7, 1fr); gap: 5px; }
.dl-row.head .dl-cell { min-height: 0; padding: 2px 4px; background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.dl-cell {
  position: relative;
  min-height: 62px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel-3);
  font-size: 12.5px; font-weight: 500; line-height: 1.25; text-align: center;
}
.dl-cell.hit { background: var(--dl-hit); }
.dl-cell.part { background: var(--dl-part); }
.dl-cell.miss, .dl-cell.up, .dl-cell.down { background: var(--dl-miss); }
.dl-cell.hero { padding: 4px; gap: 4px; font-weight: 700; }
.dl-cell.hero img { width: 100%; max-width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }
.dl-arrow { font: 700 18px/1 var(--body); opacity: 0.9; }
.dl-dim { opacity: 0.3; }
.dl-attr { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 4px; vertical-align: 0; }
.dl-attr.str { background: #e5533d; }
.dl-attr.agi { background: #4fcf6b; }
.dl-attr.int { background: #3fa8f5; }
.dl-attr.all { background: linear-gradient(135deg, #e5533d, #4fcf6b, #3fa8f5); }
.dl-row.fresh .dl-cell { animation: dlFlip 0.45s ease-out both; animation-delay: calc(var(--i) * 0.12s); }
@keyframes dlFlip { from { transform: rotateX(90deg); opacity: 0; } to { transform: none; opacity: 1; } }

.dl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.dl-legend i, .dl-mini i { display: inline-block; width: 12px; height: 12px; border-radius: var(--radius-sm); vertical-align: -1px; }
.dl-legend i.hit, .dl-mini i.hit { background: var(--dl-hit); }
.dl-legend i.part, .dl-mini i.part { background: var(--dl-part); }
.dl-legend i.miss, .dl-mini i.miss, .dl-mini i.up, .dl-mini i.down { background: var(--dl-miss); }
.dl-host { margin-top: 10px; justify-content: flex-end; }

.dl-others h2 { margin: 0 0 10px; }
.dl-others-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dl-opp { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.dl-opp.ok { border-color: var(--green); }
.dl-opp.fail { opacity: 0.6; }
.dl-opp-name { font-size: 13px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-mini { display: flex; flex-direction: column; gap: 3px; }
.dl-mini div { display: flex; gap: 3px; }
.dl-mini .gap { color: var(--muted); font-size: 12px; line-height: 1; padding-left: 2px; }

.dl-reveal { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.dl-answer { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gold); background: radial-gradient(120% 80% at 50% 18%, #2e2a3a 0%, #15171e 58%, #0b0c10 100%); }
.dl-answer img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.dl-answer figcaption { padding: 8px; text-align: center; font: 700 22px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-hi); }
.dl-reveal-side { display: flex; flex-direction: column; gap: 12px; }
.dl-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dl-results li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel-2); }
.dl-results li.ok { border-left: 3px solid var(--green); }
.dl-results li.fail { border-left: 3px solid var(--red); opacity: 0.8; }
.dl-pts { font: 700 16px/1 var(--body); }

.dl-lbl { display: none; }
.dl-short { display: none; }
.dl-explain { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dl-explain li + li { margin-top: 6px; }
.dl-explain b { color: var(--text); font-weight: 600; }
.dl-explain i { display: inline-block; width: 11px; height: 11px; border-radius: var(--radius-sm); vertical-align: -1px; }
.dl-explain i.hit { background: var(--dl-hit); }
.dl-explain i.part { background: var(--dl-part); }

/* средняя доска: подписи колонок — короткие («ПОПУЛЯРНОСТЬ» не влезает в клетку) */
@container (max-width: 820px) {
  .dl-row.head .dl-long { display: none; }
  .dl-row.head .dl-short { display: inline; }
}

/* узкая доска (телефон, комната рядом с табло): попытка — одна строка на всю ширину: имя героя сверху, под ним
   портрет и семь клеток с короткими значениями; подписи колонок — строкой-шапкой. Столбцы читаются сверху вниз,
   как в Wordle, без прокрутки вбок. */
@container (max-width: 620px) {
  .dl-table { gap: 4px; }
  .dl-rows { gap: 6px; }
  .dl-row { grid-template-columns: 28px repeat(7, minmax(0, 1fr)); gap: 3px; }
  .dl-row.head .dl-cell { padding: 0; font-size: 8.5px; letter-spacing: 0.02em; line-height: 1.15; }
  .dl-row.head .dl-cell:first-child { visibility: hidden; }
  .dl-cell { min-height: 40px; padding: 3px 1px; gap: 0; font-size: 11px; line-height: 1.15; }
  .dl-cell.hero { display: contents; }
  .dl-cell.hero span { grid-column: 1 / -1; grid-row: 1; padding: 0 2px; font-size: 12px; font-weight: 600; text-align: left; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dl-cell.hero img { grid-column: 1; grid-row: 2; width: 28px; max-width: none; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 50% 30%; }
  .dl-long { display: none; }
  .dl-short { display: inline; }
  .dl-attr { width: 7px; height: 7px; margin-right: 2px; }
  .dl-arrow { font-size: 12px; line-height: 1; }
}
@container (min-width: 420px) and (max-width: 620px) {
  .dl-cell { min-height: 44px; font-size: 12px; }
  .dl-row.head .dl-cell { font-size: 10px; }
}
@media (max-width: 600px) {
  #stage[data-game='dotadle'] .board { padding: 10px; }
  .dl-legend { font-size: 12px; gap: 4px 10px; }
  .dl-reveal { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .dl-answer { width: 170px; }
  .dl-reveal-side { width: 100%; }
}

/* ---------- Доджкин ---------- */

#stage[data-game='munchkin'] .board { padding: 16px; }
#stage[data-game='munchkin'] .controls { align-items: stretch; text-align: left; gap: 16px; }
.mk-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.mk-head:empty { display: none; }
.mk-title { text-align: center; font-size: 16px; color: var(--text-2); }
.mk-title b { color: var(--gold-hi); }
.mk-decks { font-size: 13px; color: var(--muted); white-space: nowrap; }

.mk-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 14px; }
.mk-players:empty { display: none; }
.mk-pl { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.mk-pl.me { border-color: var(--line-2); }
.mk-pl.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.15); }
.mk-pl.fighting { border-color: var(--red-hi); }
.mk-pl.dead { opacity: 0.6; }
.mk-pl.winner { border-color: var(--green); box-shadow: 0 0 0 3px rgba(95, 191, 106, 0.2); }
.mk-lvl {
  width: 52px; height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, var(--panel-2) 58%, transparent 60%),
    conic-gradient(var(--gold) var(--p), var(--panel-3) 0);
  line-height: 1;
}
.mk-lvl b { font: 700 19px/1 var(--body); color: var(--gold-hi); }
.mk-lvl small { font-size: 9px; color: var(--muted); }
.mk-pl-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mk-pl-name { display: flex; align-items: center; gap: 6px; }
.mk-pl-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-pl-stats { display: flex; gap: 10px; font-size: 13px; color: var(--text-2); }
.mk-pl-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-pl-tags .chip { font-size: 11px; padding: 1px 7px; }
.mk-pl-gear { display: flex; flex-wrap: wrap; gap: 3px; }
.mk-gear img { width: 26px; height: 19px; object-fit: cover; border-radius: var(--radius-sm); display: block; }

.mk-table { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.mk-intro { margin: 12px auto; }
.mk-door {
  align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 34px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-deep);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 3px, transparent 3px 26px),
    linear-gradient(180deg, #4d3419, #2e1d0f);
  color: var(--text); font: inherit; cursor: pointer;
  box-shadow: 0 6px 0 #1b1108, var(--shadow);
  transition: transform 0.1s;
}
.mk-door:hover { transform: translateY(-2px); border-color: var(--gold); }
.mk-door:active { transform: translateY(4px); box-shadow: 0 2px 0 #1b1108; }
.mk-door span { font-size: 54px; line-height: 1; }
.mk-door b { font: 700 24px/1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-hi); }
.mk-door small { color: #cdbb9a; font-size: 12.5px; }
.mk-wait { text-align: center; color: var(--muted); padding: 20px 0; font-size: 16px; }
.mk-door-card { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mk-door-card .mk-card { width: 210px; }
.mk-last { padding: 10px 12px; border-radius: var(--radius); font-size: 14.5px; }
.mk-last.win { background: rgba(95, 191, 106, 0.12); border: 1px solid rgba(95, 191, 106, 0.4); }
.mk-last.lose { background: rgba(201, 67, 47, 0.1); border: 1px solid rgba(201, 67, 47, 0.4); }
.mk-choice { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.mk-hint { font-size: 12.5px; color: var(--muted); }
.mk-hint.center { text-align: center; }
.mk-host { justify-content: flex-end; }

.mk-battle { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr); gap: 12px; align-items: stretch; }
.mk-side { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); }
.mk-side.heroes { background: linear-gradient(180deg, rgba(95, 191, 106, 0.12), transparent); border: 1px solid rgba(95, 191, 106, 0.35); }
.mk-side.monsters { background: linear-gradient(180deg, rgba(201, 67, 47, 0.14), transparent); border: 1px solid rgba(201, 67, 47, 0.4); }
.mk-side-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.mk-fighters, .mk-mods, .mk-enh { display: flex; flex-wrap: wrap; gap: 5px; }
.mk-total { margin-top: auto; font: 800 40px/1 var(--body); text-align: center; }
.mk-side.heroes .mk-total { color: var(--green-hi); }
.mk-side.monsters .mk-total { color: var(--bad-text); }
.mk-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-width: 110px; }
.mk-vs b { font: 700 34px/1 var(--display); color: var(--muted); }
.mk-state { font-weight: 700; padding: 4px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.mk-state.win { background: rgba(95, 191, 106, 0.2); color: var(--green-hi); }
.mk-state.lose { background: rgba(201, 67, 47, 0.2); color: var(--bad-text); }
.mk-closing { font-size: 13px; color: var(--gold-hi); min-height: 18px; }
.mk-mons { display: flex; flex-wrap: wrap; gap: 10px; }
.mk-mon { position: relative; display: flex; flex-direction: column; gap: 6px; width: 190px; }
.mk-mon-lvl { position: absolute; top: -8px; right: -6px; padding: 3px 9px; border-radius: var(--radius-sm); background: var(--red); color: #fff; font: 700 15px/1.2 var(--body); box-shadow: var(--shadow); }
.mk-battle-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }

.mk-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 12.5px;
  min-width: 0;
}
.mk-card.door { border-top: 2px solid #a0613a; background: linear-gradient(180deg, rgba(160, 97, 58, 0.14), var(--panel-2) 45%); }
.mk-card.treasure { border-top: 2px solid var(--gold); background: linear-gradient(180deg, rgba(214, 162, 63, 0.12), var(--panel-2) 45%); }
.mk-card.k-curse { border-top-color: #8e4dd6; }
.mk-card.k-monster { border-top-color: var(--red); }
.mk-card.selling { outline: 2px solid var(--gold); outline-offset: 1px; }
.mk-card-top { display: flex; align-items: center; gap: 8px; }
.mk-art { width: 44px; height: 32px; object-fit: cover; border-radius: var(--radius-sm); flex: none; }
.mk-art.hero { height: 44px; object-position: center 20%; background: radial-gradient(120% 80% at 50% 18%, #2e2a3a 0%, #15171e 58%, #0b0c10 100%); }
.mk-emoji { width: 44px; text-align: center; font-size: 26px; line-height: 32px; flex: none; }
.mk-kind { font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.mk-card-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.mk-card-text { color: var(--text-2); display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.mk-bad { color: #ff9d8c; }
.mk-gold { color: var(--gold-hi); }
.mk-card-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 4px; }
.mk-card-acts .btn { padding: 5px 8px; font-size: 11px; letter-spacing: 0.03em; box-shadow: none; }
.mk-sell.on { border-color: var(--gold); color: var(--gold-hi); }
.mk-menu { padding: 4px 6px; font-size: 12px; border-radius: var(--radius-sm); max-width: 150px; }

.mk-zone { display: flex; flex-direction: column; gap: 8px; }
.mk-zone-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mk-zone-head .muted { font-size: 13px; }
.mk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; align-items: stretch; }
.mk-tray {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--gold-deep); background: rgba(214, 162, 63, 0.08);
}

@media (max-width: 700px) {
  .mk-battle { grid-template-columns: minmax(0, 1fr); }
  .mk-vs { flex-direction: row; min-width: 0; }
  .mk-mon { width: calc(50% - 5px); }
  .mk-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-pl { grid-template-columns: 40px minmax(0, 1fr); padding: 8px; gap: 8px; }
  .mk-lvl { width: 40px; height: 40px; }
  .mk-lvl b { font-size: 16px; }
  .mk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-head { grid-template-columns: auto minmax(0, 1fr); }
  .mk-decks { display: none; }
}

/* ---------- Взрывные Течисы ---------- */

#stage[data-game='techies'] .board { padding: 16px; }
#stage[data-game='techies'] .controls { align-items: stretch; text-align: left; gap: 14px; }
.tc-players { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tc-players:empty { display: none; }
.tc-pl { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.tc-pl.me { border-color: var(--line-2); }
.tc-pl.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.15); }
.tc-pl.dead { opacity: 0.5; text-decoration: line-through; text-decoration-color: rgba(255, 138, 118, 0.6); }
.tc-pl.winner { border-color: var(--green); }
.tc-table { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.tc-intro { margin: 12px auto; }
.tc-piles { display: flex; justify-content: center; align-items: center; gap: 28px; }
.tc-deck {
  width: 120px; aspect-ratio: 3 / 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 67, 47, 0.6);
  background:
    radial-gradient(circle at 50% 40%, rgba(201, 67, 47, 0.28), transparent 65%),
    repeating-linear-gradient(45deg, #1b1417 0 10px, #140f12 10px 20px);
  box-shadow: 4px 4px 0 #120c10, 8px 8px 0 #0c080b, var(--shadow);
}
.tc-deck-n { font: 800 40px/1 var(--body); color: var(--gold-hi); }
.tc-deck small { color: var(--muted); font-size: 12px; }
.tc-deck .tc-mines { color: var(--bad-text); font-weight: 700; }
.tc-discard { width: 120px; display: grid; place-items: center; }
.tc-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  border-top-width: 2px;
  background: var(--panel-2);
  text-align: center;
  height: 100%;
}
.tc-card.small { padding: 6px; width: 110px; }
.tc-card.small .tc-art, .tc-card.small .tc-emoji { width: 52px; height: 40px; }
.tc-art { width: 72px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); }
.tc-art.hero { object-position: center 20%; background: radial-gradient(120% 80% at 50% 18%, #2e2a3a 0%, #15171e 58%, #0b0c10 100%); }
.tc-emoji { width: 72px; height: 52px; display: grid; place-items: center; font-size: 34px; }
.tc-name { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.tc-text { font-size: 11.5px; color: var(--text-2); line-height: 1.3; }
.tc-note { font-size: 11px; color: var(--muted); margin-top: auto; }
.tc-card.k-mine { border-color: var(--red); background: linear-gradient(180deg, rgba(201, 67, 47, 0.25), var(--panel-2)); }
.tc-card.k-defuse { border-color: var(--green); }
.tc-card.k-attack { border-color: #e08a3a; }
.tc-card.k-skip { border-color: #4b8bd6; }
.tc-card.k-favor { border-color: #a06cd5; }
.tc-card.k-shuffle { border-color: #3fb8a8; }
.tc-card.k-future { border-color: #4fc3f7; }
.tc-card.k-nope { border-color: var(--gold); }
.tc-card.k-cat { border-color: #7a6a5a; }
.tc-card.selected { outline: 2px solid var(--gold-hi); outline-offset: 2px; transform: translateY(-6px); }
.tc-hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; align-items: stretch; }
.tc-slot { border-radius: var(--radius); transition: transform 0.12s; }
.tc-slot.selectable { cursor: pointer; }
.tc-slot.selectable:hover .tc-card { border-color: var(--gold); }
.tc-play {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--gold-deep); background: rgba(214, 162, 63, 0.07);
}
.tc-play select { padding: 7px 10px; }
.tc-pending {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px; border-radius: var(--radius); text-align: center;
  border: 1px solid rgba(214, 162, 63, 0.5); background: rgba(214, 162, 63, 0.08);
}
.tc-pending.blocked { border-color: rgba(75, 139, 214, 0.6); background: rgba(75, 139, 214, 0.1); }
.tc-pending-title { font-size: 17px; }
.tc-pending-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tc-pending-state { color: var(--muted); font-size: 13px; }
.tc-wait { text-align: center; color: var(--text-2); padding: 10px; }
.tc-wait.me { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-radius: var(--radius); border: 1px solid rgba(95, 191, 106, 0.5); background: rgba(95, 191, 106, 0.1); }
.tc-wait select { padding: 8px 10px; }
.tc-big { font: 700 22px/1.2 var(--body); }
.tc-turn { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--text-2); }
.tc-draw {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 40px; border-radius: var(--radius);
  border: 1px solid var(--red-hi);
  background: linear-gradient(180deg, #3a1a16, #1f0f0d);
  color: var(--text); font: inherit; cursor: pointer;
  box-shadow: 0 5px 0 #130807, var(--shadow);
}
.tc-draw:hover { filter: brightness(1.12); }
.tc-draw:active { transform: translateY(4px); box-shadow: 0 1px 0 #130807; }
.tc-draw span { font-size: 36px; line-height: 1; }
.tc-draw b { font: 700 22px/1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-hi); }
.tc-future { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: var(--radius); border: 1px dashed #4fc3f7; }
.tc-future-cards { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tc-future-slot { position: relative; }
.tc-future-slot > span { position: absolute; top: -8px; left: -8px; z-index: 1; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: #4fc3f7; color: #0b1a22; font-weight: 700; font-size: 12px; }

@media (max-width: 600px) {
  .tc-hand { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-piles { gap: 16px; }
  .tc-deck, .tc-discard { width: 100px; }
}

/* ---------- анимации ---------- */

.stage.flash-good .board { animation: flashGood 0.9s; }
.stage.flash-bad .board { animation: flashBad 0.7s; }
@keyframes flashGood { 0% { box-shadow: 0 0 0 0 rgba(95, 191, 106, 0.9); } 100% { box-shadow: 0 0 0 28px rgba(95, 191, 106, 0); } }
@keyframes flashBad {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); box-shadow: 0 0 0 3px rgba(201, 67, 47, 0.8); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
@keyframes pulse { 0%, 100% { box-shadow: 0 5px 0 var(--green-deep), 0 0 0 6px rgba(95, 191, 106, 0.25); } 50% { box-shadow: 0 5px 0 var(--green-deep), 0 0 0 16px rgba(95, 191, 106, 0.05); } }
@keyframes pop { 0% { transform: scale(0.6) rotate(-8deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* сцена игры: свет сверху, как прожектор над столом (перекрывает старый фон табло) */
.board {
  background:
    radial-gradient(760px 300px at 50% -80px, rgba(74, 58, 138, 0.24), transparent 70%),
    radial-gradient(600px 240px at 50% 0%, rgba(214, 162, 63, 0.08), transparent 70%),
    linear-gradient(160deg, rgba(243, 236, 218, 0.04), transparent 50%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.controls {
  background: linear-gradient(160deg, rgba(243, 236, 218, 0.045), transparent 55%), var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.round-no { font: 700 11.5px/1 var(--body); letter-spacing: 0.18em; padding: 7px 11px; }
.status { font-size: 15.5px; }
.answering-box .who { font: 700 26px/1.2 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.buzzer { font: 700 34px/1 var(--display); border-radius: var(--radius); }
.buzzer.mine, .buzzer.mine:disabled { font: 700 26px/1.1 var(--display); }
.scoreboard li.is-leader { border-color: rgba(214, 162, 63, 0.4); }
.score { font: 700 18px/1 var(--body); }

/* ---------------------------------------------------------------- живой курьер: слои одного размера */

/* Слои лежат друг на друге (основа, зрачок, веко, хвост, уши — всё поверх основы, поэтому суставы без шва).
   Точки вращения — в процентах рамки слоёв (server/storage/site-assets.js, RIG_CROP). */
.rig {
  appearance: none;
  position: relative; display: block;
  width: 100%; aspect-ratio: 672 / 720;
  padding: 0; border: 0; background: none;
  cursor: pointer;
  transform-origin: 53.57% 95.42%;
  animation: breathe 3.4s ease-in-out infinite;
  /* свет Логова: чуть приглушить и согреть, тёплый контровой свет слева-сверху — от лампы */
  filter: brightness(0.9) saturate(0.92) sepia(0.12)
          drop-shadow(-2px -2px 0 rgba(255, 196, 120, 0.5))
          drop-shadow(0 0 10px rgba(255, 170, 90, 0.18));
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.rig:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }
.rig > img, .rig > svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.014) translateY(-1px); } }
.rig .ear-left { transform-origin: 61.31% 22.08%; animation: ear-left 5.2s ease-in-out infinite; }
.rig .ear-right { transform-origin: 76.79% 21.67%; animation: ear-right 6.1s ease-in-out infinite; }
@keyframes ear-left { 0%, 62%, 100% { transform: rotate(0); } 66% { transform: rotate(-9deg); } 70% { transform: rotate(3deg); } 74% { transform: rotate(0); } }
@keyframes ear-right { 0%, 28%, 100% { transform: rotate(0); } 31% { transform: rotate(8deg); } 34% { transform: rotate(-3deg); } 37% { transform: rotate(0); }
                       80% { transform: rotate(0); } 83% { transform: rotate(6deg); } 88% { transform: rotate(0); } }
.rig .tail { transform-origin: 11.31% 72.78%; animation: tail 2.6s ease-in-out infinite; }
@keyframes tail { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(10deg); } }
.rig .pupil { animation: look 7s ease-in-out infinite; }
@keyframes look { 0%, 30%, 100% { transform: translate(0, 0); } 36%, 52% { transform: translate(-1.54%, 0.37%); }
                  58%, 74% { transform: translate(0.34%, -0.75%); } 80% { transform: translate(0, 0); } }
.rig .lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: blink 4.3s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(0); } 94.5% { transform: scaleY(1); } 97% { transform: scaleY(0); } }
/* тычок: подпрыгнуть, уши назад, зажмуриться */
.rig.poke { animation: hop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1); }
.rig.poke .ear-left, .rig.poke .ear-right { animation: ears-back 0.55s ease-out; }
.rig.poke .lid { animation: squint 0.55s ease-out; }
@keyframes hop { 0% { transform: translateY(0) scaleY(1); } 18% { transform: translateY(0) scaleY(0.92); }
                 45% { transform: translateY(-11.2%) scaleY(1.05); } 75% { transform: translateY(0) scaleY(0.96); } 100% { transform: none; } }
@keyframes ears-back { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-14deg); } }
@keyframes squint { 0%, 100% { transform: scaleY(0); } 25%, 70% { transform: scaleY(0.85); } }
/* вещи лежат между слоями ослика (public/courier.js): рамка вещи — в процентах рамки слоёв, может выходить за неё */
.rig .wear, .rig .part { position: absolute; inset: 0; pointer-events: none; }
.rig .part > img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.rig .wear > img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.rig > img[hidden] { display: none; }
.rig[data-hides~="ears"] .ear-left, .rig[data-hides~="ears"] .ear-right { visibility: hidden; }
/* закрытая вещь — тёмный силуэт с тонкой светлой обводкой: «что-то будет», а не серое пятно */
.rig .wear > img.ghost { filter: brightness(0) invert(0.07) drop-shadow(0 0 0.6px rgba(243, 236, 218, 0.95)) drop-shadow(0 0 1.4px rgba(243, 236, 218, 0.45)); }
/* ослик вне Логова: без тёплого света лампы; still — неподвижный (карточки выбора стороны) */
.rig.free { cursor: default; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.results .rig { cursor: pointer; }
.rig.still, .rig.still > * { animation: none !important; }
.rig.still { cursor: inherit; }
/* реакции на итоги: грустит — уши вниз, хвост лениво; радуется — прыгает трижды */
.rig.sad .ear-left { animation: none; transform: rotate(-18deg); }
.rig.sad .ear-right { animation: none; transform: rotate(16deg); }
.rig.sad .tail { animation-duration: 5.5s; }
.rig.cheer { animation: hop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) 3; }
.rig.cheer .ear-left, .rig.cheer .ear-right { animation: ears-back 0.55s ease-out 3; }

/* облачко курьера: кремовое, с хвостиком вниз */
.thought {
  position: relative;
  max-width: 280px;
  padding: 11px 15px;
  background: var(--cream); color: #2a2318;
  border-radius: var(--radius);
  font: 500 14.5px/1.4 var(--body);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s, transform 0.25s;
}
.thought::after { content: ''; position: absolute; top: 100%; left: 38%; border: 8px solid transparent; border-top-color: var(--cream); border-bottom: 0; }
.thought b { font-weight: 700; }
.thought.swap { opacity: 0; transform: translateY(4px); }

/* ---------------------------------------------------------------- медаль уровня: щит, цвет — по редкости предметов Доты */

.medal {
  --c: #7d8793;
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: 25px; height: 28px;
  vertical-align: middle;
  background: var(--c);
  clip-path: polygon(50% 0, 100% 21%, 100% 70%, 50% 100%, 0 70%, 0 21%);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 45%, transparent));
}
.medal::before { content: ''; position: absolute; inset: 2px; clip-path: inherit; background: radial-gradient(circle at 50% 28%, #2b3039, #0e1014 75%); }
.medal b { position: relative; font: 700 11px/1 var(--body); letter-spacing: 0; color: var(--c); text-transform: none; }
.medal.big { width: 62px; height: 70px; }
.medal.big::before { inset: 3px; }
.medal.big b { font: 800 24px/1 var(--body); }
.tier-common { --c: #b0c3d9; }
.tier-uncommon { --c: #5e98d9; }
.tier-rare { --c: #4b69ff; }
.tier-mythical { --c: #8847ff; }
.tier-legendary { --c: #d32ce6; }
.tier-ancient { --c: #eb4b4b; }
.tier-immortal { --c: #e4ae39; }
.tier-arcana { --c: #ade55c; }

/* значок стороны: Свет — золото и солнце, Тьма — красный месяц */
.side-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--side-c); vertical-align: middle; }
.side-badge svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-badge span { font: 600 11.5px/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; }
.side-light { --side-c: var(--gold-hi); --side-glow: rgba(241, 209, 138, 0.22); }
.side-dark { --side-c: var(--bad-text); --side-glow: rgba(255, 138, 118, 0.2); }

/* полоска опыта */
.lvl-bar {
  position: relative; display: block; flex: 1 1 auto; min-width: 60px; height: 8px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: rgba(4, 5, 7, 0.8); overflow: hidden;
}
.lvl-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 55%, var(--gold-hi));
  box-shadow: 0 0 10px rgba(214, 162, 63, 0.55);
  transition: width 0.7s cubic-bezier(0.3, 0.8, 0.3, 1);
}

/* ---------------------------------------------------------------- «я вообще за кого?»: Свет или Тьма */

.side-ask { display: flex; flex-direction: column; align-items: flex-start; }
.side-later { align-self: flex-start; }
.side-choose { display: flex; flex-direction: column; gap: 14px; }
.side-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.side-actions .side-later { align-self: center; }
.side-confirm { min-width: 210px; }
/* пока сторону не разглядывают — тихий контур, а не погасший огонь */
.side-confirm:disabled, .side-confirm:disabled:hover { opacity: 1; background: transparent; border-color: var(--line-2); color: var(--muted); text-shadow: none; box-shadow: none; }
.side-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* карточка стороны: ослик слева, имя и характер справа; выбранная — светится своим светом */
.side-card {
  appearance: none;
  display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: radial-gradient(120% 90% at 0% 50%, var(--side-glow), transparent 70%), rgba(4, 5, 7, 0.62);
  backdrop-filter: blur(4px);
  color: var(--text); text-align: left; cursor: pointer;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.side-card:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.side-card:hover { transform: translateY(-3px); border-color: var(--side-c); }
.side-card:hover .rig { transform: translateY(-3px); }
.side-card.on { border-color: var(--side-c); box-shadow: 0 0 26px var(--side-glow), inset 0 0 0 1px var(--side-c); }
.side-card-art { display: flex; justify-content: center; align-items: flex-end; }
.side-card-art .rig { width: 80px; transition: transform 0.25s var(--ease); }
.side-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.side-card-name { display: flex; align-items: center; gap: 8px; }
.side-card-name b { font: 700 21px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.side-card small { font-size: 13px; line-height: 1.35; color: var(--text-2); }
.side-card small.dim { color: var(--muted); font-size: 12px; }
.side-cards.compact .side-card { grid-template-columns: 60px minmax(0, 1fr); }
.side-cards.compact .side-card-art .rig { width: 60px; }
.side-cards.compact .side-card small.dim { display: none; }

/* ---------------------------------------------------------------- итоги партии: карточка в углу комнаты */

.results {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: min(420px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 18px 18px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(214, 162, 63, 0.14), transparent 70%),
    linear-gradient(160deg, rgba(243, 236, 218, 0.06), transparent 50%), #0b0d12;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
  animation: results-in 0.45s var(--ease);
}
.results::before { content: ''; position: absolute; left: 18px; top: -1px; width: 64px; height: 3px; background: linear-gradient(90deg, var(--ember), var(--ember-deep)); box-shadow: 0 0 14px rgba(255, 106, 61, 0.55); }
body:not(.in-room) .results { display: none; }
.results.up { border-color: rgba(241, 209, 138, 0.7); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 50px rgba(214, 162, 63, 0.3); }
@keyframes results-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.results-x { position: absolute; top: 8px; right: 8px; }
.results-courier { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: end; padding-right: 30px; }
.results-courier .rig { width: 88px; }
.results-say {
  position: relative; align-self: center;
  margin: 0; padding: 10px 13px;
  background: var(--cream); color: #2a2419;
  border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.4;
}
.results-say::before { content: ''; position: absolute; left: -7px; bottom: 14px; border: 7px solid transparent; border-right-color: var(--cream); border-left: 0; }
.results-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.results-body > .kicker { font-size: 11px; }
.results-total { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 14px; }
.results-total b { font: 800 42px/0.95 var(--body); letter-spacing: 0.02em; color: var(--gold-hi); text-shadow: 0 0 24px rgba(214, 162, 63, 0.35); }
.results-total small { color: var(--dim); }
.results-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.results-parts li { display: flex; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); font-size: 12.5px; color: var(--muted); }
.results-parts b { color: var(--text); font-weight: 600; }
.results-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.results-level { display: flex; align-items: center; gap: 10px; }
.results-bar { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.results-bar small { align-self: flex-end; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.results.up .results-medal .medal { animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.results-up { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.results-up[hidden] { display: none; }
.results-up b { font: 700 24px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 0 18px rgba(214, 162, 63, 0.5); animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.results-up span { font-size: 13px; color: var(--text); }
.results-login { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.results-login .link { color: var(--gold-hi); font-weight: 600; }
/* «Новая вещь» / «За дружбу» */
.results-reward[hidden] { display: none; }
.wr-reward {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 9px; border: 1px solid var(--line-2); border-left: 3px solid var(--c); border-radius: var(--radius);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent), var(--panel-2) 70%);
  animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.wr-reward .wr-thumb { width: 64px; }
.wr-reward-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wr-reward-text .kicker { font-size: 10.5px; }
.wr-reward-text b { font: 700 16px/1.2 var(--title); color: var(--text); }
.wr-reward-text small { font-size: 11.5px; color: var(--c); }

/* ---------------------------------------------------------------- курьер-проводник: цель подсвечена, остальное притушено */

.guide-spot {
  position: fixed; z-index: 60; pointer-events: none;
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--gold-hi), 0 0 30px rgba(241, 209, 138, 0.35), 0 0 0 200vmax rgba(4, 5, 7, 0.62);
  transition: left 0.2s, top 0.2s, width 0.2s, height 0.2s;
}
.guide-bubble {
  position: fixed; z-index: 61;
  width: min(370px, calc(100vw - 16px));
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px;
  padding: 14px 14px 14px 12px;
  background: var(--cream); color: #2a2419;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  font-size: 14.5px; line-height: 1.4;
  animation: results-in 0.3s var(--ease);
  pointer-events: none; /* нажатие сквозь подсказку идёт в игру и закрывает её (public/guide.js); нажимаются только кнопки */
}
.guide-bubble .btn { pointer-events: auto; }
.guide-head { width: 46px; height: 46px; border: 2px solid #2a2419; border-radius: 50%; background: var(--art-head, none) center 70% / 118% no-repeat, #2a303a; }
.guide-text p { margin: 0; }
.guide-rules { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.4; }
.guide-rules li + li { margin-top: 4px; }
.guide-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.guide-bubble .btn { border-color: #2a2419; background: transparent; color: #2a2419; text-shadow: none; box-shadow: none; }
.guide-bubble .btn:hover { background: rgba(42, 36, 25, 0.08); color: #2a2419; }
.guide-bubble .btn-gold { background: #2a2419; color: var(--cream); }
.guide-bubble .btn-gold:hover { background: #3a3222; color: #fff; }
.guide-bubble .btn-ghost { border-color: transparent; }

/* ---------------------------------------------------------------- в комнате шапка ниже */

body.in-room { --nav-h: 62px; }
body.in-room .brand img { width: 34px; height: 34px; }
body.in-room .brand span { font-size: 21px; }
body.in-room .tab { font-size: 15.5px; }
body.in-room .avatar { width: 34px; height: 34px; }

/* ---------------------------------------------------------------- планшет */

/* шапке тесно, когда есть «Комната КОД»: сначала уходит игра в плашке и ник рядом с головой */
@media (max-width: 1560px) {
  .room-pill .pill-game { display: none; }
  .nav:has(.room-pill:not(.hidden)) .acct-nick { display: none; }
}
@media (max-width: 1280px) {
  .nav-cta { display: none; }
  .room-pill .pill-word { display: none; }
}
@media (max-width: 1100px) {
  .tabs { gap: 16px; }
  .tab { font-size: 15px; letter-spacing: 0.1em; }
  .room-pill .pill-word { display: none; }
  .recent-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-row .company.new:nth-child(3) { display: none; }
  .play-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .play-grid .tile.wide { grid-column: span 2; }
  .play-grid.filtered .tile.wide { grid-column: span 2; }
}
@media (max-width: 1180px) {
  .brand span { display: none; } /* вкладки ещё в шапке — от логотипа остаётся ослик */
  .acct-nick { display: none; }
}
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .dossier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sample-cards.tc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-art { left: 18%; }
}
@media (max-width: 960px) {
  .nav { gap: 14px; }
  .tabs { gap: 12px; }
  .tab { font-size: 13.5px; letter-spacing: 0.08em; }
  .nav-right { gap: 10px; }
  .layout, .wr, .co-grid, .inv { grid-template-columns: minmax(0, 1fr); }
  .co-history, .inv-hero { grid-row: auto; }
  .courier-band .wrap, .soon-band .wrap { gap: 20px; }
  .daily-head { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 761px) and (max-width: 860px) {
  .nav:has(.room-pill:not(.hidden)) .me-chip { display: none; } /* вкладки ещё в шапке, а тут и комната */
}

/* ---------------------------------------------------------------- телефон */

@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  body.in-room { --nav-h: 54px; }
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
  body { font-size: 15.5px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.in-room { padding-bottom: 0; }

  /* шапка: логотип и «Войти»; вкладки — внизу */
  .nav { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .nav .tabs, .nav-cta { display: none; }
  .brand { gap: 10px; }
  .brand span { display: inline; font-size: 20px; letter-spacing: 0.14em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .brand img { width: 34px; height: 34px; }
  .nav-right { gap: 10px; }
  .btn.acct-login { padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: rgba(4, 5, 7, 0.4); }
  .avatar { width: 36px; height: 36px; }
  .me-chip { padding: 3px 7px 3px 4px; gap: 5px; }
  .me-chip .side-badge svg { width: 16px; height: 16px; }
  .room-pill { padding: 7px 9px; gap: 6px; }
  .room-pill .pill-game, .room-pill .pill-word { display: none; }
  body.in-room .brand span { font-size: 18px; }
  .nav:has(.room-pill:not(.hidden)) .brand span { display: none; } /* в шапке — «Комната КОД»: от логотипа остаётся ослик */

  /* нижняя панель с выделенным «Играть» */
  .bottombar {
    position: fixed; inset: auto 0 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(6, 7, 10, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -1px 0 rgba(241, 209, 138, 0.14), 0 -12px 30px rgba(0, 0, 0, 0.45);
  }
  .bottombar a {
    position: relative; display: grid; justify-items: center; gap: 5px; padding: 7px 0 4px; min-width: 0;
    font: 600 10.5px/1 var(--body); letter-spacing: 0.02em; color: var(--muted);
  }
  .bottombar svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .bottombar a.on { color: var(--gold-hi); }
  .bottombar a.on::before { content: ''; position: absolute; top: -6px; left: 26%; right: 26%; height: 2px; background: var(--ember); box-shadow: 0 0 12px var(--ember); }
  .bottombar a.on svg { filter: drop-shadow(0 0 8px rgba(241, 209, 138, 0.55)); }
  .bottombar a.play-tab { color: var(--text); }
  .bottombar a.play-tab svg { color: #fff; }
  .bottombar a.play-tab::after { content: ''; position: absolute; top: 1px; left: 50%; width: 44px; height: 32px; margin-left: -22px; border-radius: 16px; background: linear-gradient(180deg, #ff8a52, #c92c19); z-index: -1; box-shadow: 0 6px 16px rgba(207, 47, 28, 0.5); }
  .bottombar a.play-tab.on { color: var(--gold-hi); }
  body.in-room .bottombar { display: none; }
  .conn, .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
  body.in-room .conn { bottom: 18px; }
  .ask-btn { right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
  body.side-asking .ask-btn, body.on-gamepage .ask-btn { display: none; } /* не закрывает карточки стороны и «Создать комнату» */
  .footer { padding: 40px 0 96px; } /* низ подвала не под кнопкой курьера (48 px справа внизу) */

  /* типографика */
  .kicker { font-size: 11px; letter-spacing: 0.22em; gap: 10px; }
  .title .small { font-size: 17px; letter-spacing: 0.16em; }
  .title .big { font-size: clamp(50px, 16vw, 72px); }
  .title.md .big { font-size: clamp(40px, 12.5vw, 56px); }
  .title.sm .small { font-size: 15px; }
  .title.sm .big { font-size: 34px; }
  .rule { margin: 20px 0; width: 60px; }
  .lead { font-size: 16px; }
  .btn-fire { padding: 19px 26px 18px; font-size: 17px; width: 100%; }
  .hide-m { display: none; }
  .page.boxed { padding: calc(var(--nav-h) + 20px) 0 40px; }
  .page.room { padding-top: calc(var(--nav-h) + 10px); }

  /* главная: текст над небом, персонажи ближе друг к другу в середине кадра */
  .camp-hero { height: calc(100svh - 68px - env(safe-area-inset-bottom)); max-height: 860px; min-height: 620px; }
  .camp-hero .shade {
    background:
      linear-gradient(180deg, rgba(4, 5, 7, 0.82) 0%, rgba(4, 5, 7, 0.55) 34%, transparent 58%),
      linear-gradient(0deg, var(--ink-0) 0%, rgba(4, 5, 7, 0.5) 7%, transparent 18%);
  }
  .hero-copy { top: calc(var(--nav-h) + 20px); }
  .hero-copy .title { margin-top: 14px; }
  .hero-copy .rule { display: none; }
  .hero-copy .lead { margin-top: 12px; font-size: 15px; line-height: 1.5; max-width: 22em; }
  .hero-copy .cta-row { margin-top: 18px; gap: 10px; align-items: stretch; width: 100%; }
  .hero-copy .code-mini { justify-content: center; }
  .scroll-cue { display: none; }
  .camp-hero .scene { --focus: 61%; --fx: 57.4%; --fy: 87%; }
  .a-courier { left: 47.8%; top: 75%; width: 7.8%; }
  .a-pudge { left: 59.2%; top: 66%; width: 9.2%; --lx: 1; }
  .a-pudge img { transform: scaleX(-1); }
  .a-pudge { --sausage-x: 12%; } /* отражён — сосиска слева */
  .a-cm { left: 68.6%; top: 65.5%; width: 6.2%; }
  .a-lina { display: none; }
  .campfire { width: 5.8%; }
  .a-courier .thought { font-size: 13px; max-width: 170px; padding: 9px 12px; --bx: -14%; }
  .a-courier .thought::after { left: 24%; }
  .side-ask .title { margin-top: 12px; }
  .side-ask .rule { display: none; }
  .side-ask .lead { font-size: 14.5px; margin-top: 10px; }
  .side-ask .side-choose { margin-top: 16px; gap: 10px; }

  .band { padding: 72px 0; }
  .band-head { margin-bottom: 30px; }
  .band.daily { min-height: 0; display: block; }
  .daily .art img { width: 100%; height: 330px; object-position: 78% 50%; }
  .daily .art::after { background: linear-gradient(0deg, var(--ink-1) 38%, rgba(8, 9, 13, 0.6) 62%, rgba(8, 9, 13, 0.1) 80%), linear-gradient(180deg, var(--ink-0), transparent 14%); }
  .daily .qglow { right: -10%; top: 0; width: 300px; }
  .daily > .wrap { padding: 210px 0 72px; }
  .guess { margin-top: 24px; }
  .guess .dl-input { padding: 15px 14px; font-size: 16px; }
  .guess .btn-fire { width: auto; padding: 16px 18px; font-size: 14px; }
  .daily-meta { gap: 10px 20px; font-size: 13.5px; }
  .daily-solved { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .daily-solved .dl-mini i { width: 13px; height: 13px; }
  .daily-solved .dl-answer figcaption { font-size: 13px; letter-spacing: 0.02em; }

  .company-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 20px; scrollbar-width: none; }
  .company-row::-webkit-scrollbar { display: none; }
  .company { flex: 0 0 82%; min-height: 250px; scroll-snap-align: start; }
  .company-row .company.new { display: flex; flex: 0 0 60%; }
  .company-row .company.new:nth-child(3) { display: flex; }
  .company .h { font-size: 25px; }
  .company .go { opacity: 1; transform: none; }
  .company-row + .recent { margin-top: 30px; }
  .recent-list { grid-template-columns: 1fr; gap: 10px; }
  .recent-head small { display: none; }
  .match { grid-template-columns: 80px minmax(0, 1fr); }
  .match img { width: 80px; height: 56px; }

  .games-grid { grid-template-columns: 1fr; gap: 16px; }
  .games-grid.home .tile:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 4.2; }
  .tile, .tile.big { aspect-ratio: 16 / 11; min-height: 0; }
  .tile .h, .tile.big .h { font-size: 28px; }
  .games-grid.home .tile.big .h { font-size: 36px; }
  .tile .p { font-size: 14.5px; }
  .tile:not(.big):not(.wide) .p { max-height: none; opacity: 1; margin-top: 6px; }
  .tile .cta { display: none; }
  .tile .info { padding: 16px; }

  .band.courier-band { min-height: 0; display: block; }
  .courier-band .bg img { width: 100%; height: 420px; object-position: 22% 70%; }
  .courier-band .bg::after { background: linear-gradient(0deg, var(--ink-1) 40%, rgba(8, 9, 13, 0.2) 70%), linear-gradient(180deg, var(--ink-0), transparent 16%); }
  .courier-band .lamp { left: 10%; top: 120px; width: 300px; }
  .courier-band .wrap { grid-template-columns: 1fr; padding: 60px 0 72px; gap: 10px; }
  .den-courier { width: 170px; margin: 110px 0 0 18%; justify-self: start; }
  .den-courier .thought { transform: translateX(-20%); max-width: 200px; font-size: 13px; }

  .side-cards { gap: 10px; }
  .side-card { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; padding: 8px 10px 8px 6px; }
  .side-card-art .rig, .side-cards.compact .side-card-art .rig { width: 50px; }
  .side-cards.compact .side-card { grid-template-columns: 50px minmax(0, 1fr); }
  .side-card-name b { font-size: 17px; }
  .side-card small { font-size: 12px; }
  .side-card small.dim { display: none; }
  .side-confirm { min-width: 0; flex: 1 1 100%; }

  /* «Играть» */
  .play-head { min-height: 470px; padding-top: calc(var(--nav-h) + 24px); }
  .play-head .lead { font-size: 15px; }
  .crowd { height: 180px; }
  .crowd img { --h: 158px !important; height: 158px; bottom: -18px; filter: brightness(0.78) saturate(0.9) drop-shadow(0 -2px 0 rgba(200, 214, 255, 0.55)); }
  .crowd img:nth-child(2n) { display: none; }
  .filters { margin-top: -20px; padding: 12px 14px; gap: 12px; }
  .filters .group { flex-wrap: wrap; gap: 10px; width: 100%; }
  .filters .group .lbl { width: 100%; }
  .seg { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { padding: 9px 11px; white-space: nowrap; }
  .filters .code-mini { margin-left: 0; letter-spacing: 0.16em; }
  .play-grid { grid-template-columns: 1fr; gap: 16px; }
  .play-grid .tile, .play-grid .tile.wide, .play-grid.filtered .tile.wide { grid-column: auto; aspect-ratio: 16 / 11; }
  .companies-strip { flex-wrap: nowrap; overflow-x: auto; margin: 22px calc(var(--gutter) * -1) 26px; padding: 2px var(--gutter) 6px; scrollbar-width: none; }
  .companies-strip::-webkit-scrollbar { display: none; }
  .companies-strip .cchip { flex: none; }
  .arena { margin-top: 60px; }
  .arena-row { grid-template-columns: 1fr; gap: 12px; }
  .soon-tile { min-height: 0; }

  /* страница игры: сцена и герои сверху, текст ниже; стрелки — поверх сцены */
  .game-hero { display: block; min-height: 0; padding: var(--nav-h) 0 44px; }
  .game-art { position: relative; inset: auto; height: min(300px, 36svh); margin-bottom: -22px; }
  .game-art .gp-bg { -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 42%); mask-image: linear-gradient(0deg, transparent 0%, #000 42%); }
  .game-art .plate { filter: brightness(0.74) saturate(0.9); }
  .gp-fig { right: auto; left: 50%; translate: -50% 0; bottom: 4%; height: var(--gp-hm, 84%); width: 100cqw; object-position: 50% 100%; }
  .game-hero.aligned .gp-figs { -webkit-mask-image: none; mask-image: none; }
  .game-art .plane { --focus: var(--gp-focus-m, var(--gp-focus, 55%)); }
  .game-hero .rail { display: none; }
  .game-nav { top: calc(var(--nav-h) + 10px); right: 12px; gap: 4px; }
  .game-nav a { width: 34px; height: 42px; border-width: 1.5px; }
  .game-nav a.grid { width: 46px; }
  .game-nav svg.i { font-size: 18px; }
  .gp-name { margin-top: 12px; font-size: min(88px, calc(var(--fitm, 20) * 1vw)); }
  .game-copy .tagline { margin-top: 14px; font-size: 14.5px; letter-spacing: 0.12em; }
  .game-copy .pitch { margin-top: 14px; font-size: 15px; line-height: 1.5; }
  .stats { display: grid; grid-template-columns: auto auto auto; justify-content: start; gap: 10px 26px; margin-top: 18px; }
  .stat .lbl { font-size: 10.5px; letter-spacing: 0.2em; margin-bottom: 8px; }
  .stat b { font-size: 16px; gap: 7px; }
  .diamonds i { width: 11px; height: 11px; }
  .game-copy .cta-row { margin-top: 20px; gap: 10px; }
  .game-copy .cta-row .btn { width: 100%; }
  .game-copy .code-mini { justify-content: center; }
  .steps { grid-template-columns: 1fr; row-gap: 30px; }
  .gp-step { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 14px; padding: 0; }
  .step-art { grid-row: span 2; height: 84px; margin: 0; }
  .step-art .num { font-size: 84px; }
  .step-art .ic { left: 40px; width: 60px; height: 60px; padding: 13px; }
  .gp-step h3 { font-size: 20px; margin: 4px 0 6px; }
  .gp-step p { font-size: 14.5px; }
  .extra-band .band-head .lead { font-size: 15px; }
  .dossier { gap: 10px; }
  .card-trait { padding: 14px; }
  .card-trait b { font-size: 17px; }
  .doodles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px; scrollbar-width: none; }
  .doodles::-webkit-scrollbar { display: none; }
  .doodle-card { flex: 0 0 78%; scroll-snap-align: start; }
  .chain { grid-template-columns: 1fr; gap: 22px; max-width: 320px; margin: 0 auto; }
  .chain li + li::before { left: 50%; top: -17px; transform: translateX(-50%) rotate(135deg); }
  .chain li.text { min-height: 0; padding: 16px; }
  .deck-card { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .deck-card .fan { height: 110px; }
  .deck-card .fan img { width: 62px; }
  .deck-body b { font-size: 21px; }
  .sample-cards.mk, .sample-cards.tc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .letters-sample { grid-template-columns: 1fr; justify-items: start; gap: 20px; }
  .need { grid-template-columns: 1fr; gap: 14px; margin: 30px 0 34px; }
  .final-cta .title .big { font-size: min(56px, calc(var(--fitm, 12) * 0.9vw)); overflow-wrap: normal; }
  .more-band { padding-top: 60px; }

  /* «Скоро»: сцена сверху, текст ниже */
  .soon-band { display: block; min-height: 0; padding: calc(var(--nav-h) + 200px) 0 60px; }
  .soon-band .bg img { width: 100%; height: 440px; object-position: 30% 70%; }
  .soon-band .bg::after { background: linear-gradient(0deg, var(--ink-0) 45%, rgba(8, 9, 13, 0.2) 75%), linear-gradient(180deg, rgba(4, 5, 7, 0.7), transparent 20%); }
  .soon-band .wrap { grid-template-columns: 1fr; gap: 0; }
  .soon-actor { justify-self: start; margin-left: 8%; }
  .zone-refuge .soon-actor img { width: 200px; }
  .zone-treasury .soon-actor img { width: 140px; }
  .soon-items { margin: 20px 0 24px; }
  .soon-copy .title .big { font-size: 8vw; }

  /* страницы */
  .page-head { margin-bottom: 20px; }
  .join, .co-hero, .inv-hero { grid-template-columns: minmax(0, 1fr); }
  .join-art { min-height: 200px; padding: 18px 0 0; background-position: 47% 72%; }
  .join-art::after { background: linear-gradient(0deg, rgba(11, 13, 19, 0.95), transparent 45%); }
  .join-art .rig { width: 150px; }
  .join-body { padding: 18px 18px 24px; }
  .join { margin-top: 0; }
  .me-section { padding: 18px; }
  .nick-form { flex-wrap: wrap; }
  .nick-form input { flex: 1 1 140px; }
  .medal.big { width: 52px; height: 58px; }
  .medal.big b { font-size: 23px; }
  .co-hero-art { display: none; }
  .co-hero-main { padding: 24px 18px 22px; }
  .co-hero-main .btn-xl { flex: 1 1 100%; }
  .co-stats { padding: 8px 14px 14px; }
  .co-list, .co-games, .co-top { padding-left: 16px; padding-right: 16px; }
  .co-rename { flex-direction: column; align-items: stretch; }
  .co-empty { grid-template-columns: minmax(0, 1fr); }
  .co-empty-art { display: none; }
  .inv-art { display: none; }
  .inv-body { padding: 24px 18px 22px; }
  .inv-stat { padding: 14px 10px; }
  .inv-stat b { font-size: 30px; }
  .inv-xp { border-left: 0; padding: 0; flex-direction: row; gap: 8px; align-items: baseline; }
  .wr-stage { min-height: 300px; padding: 14px 10px 26px; }
  .wr-courier { width: 180px; }
  .wr-actions { padding: 14px 14px 2px; gap: 8px; }
  .wr-actions .btn { flex: 1 1 auto; }
  .wr-actions [data-wr="save"] { flex-basis: 100%; }
  .wr-tabs { padding: 12px 14px 10px; }
  .wr-items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; }
  .wr-item { padding: 4px 4px 7px; }
  .wr-item b { font-size: 13px; }
  .wr-item small { font-size: 10.5px; }
  .wr-worn { top: 7px; left: 7px; font-size: 9px; padding: 1px 4px; }
  .wr-reward { grid-template-columns: 52px minmax(0, 1fr); }
  .wr-reward .wr-thumb { width: 52px; }
  .wr-reward .btn { grid-column: 1 / -1; }
  .daily-page { gap: 14px; }
  .daily-head { padding: 26px 16px 18px; min-height: 0; background: linear-gradient(0deg, rgba(8, 9, 13, 0.97) 38%, rgba(8, 9, 13, 0.55) 70%, rgba(8, 9, 13, 0.3)), var(--art-daily, none) 70% 0 / 150% auto no-repeat, var(--ink-1); padding-top: 120px; }
  .daily-title p { font-size: 14.5px; }
  .daily-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .daily-stat { padding: 9px 10px; }
  .daily-stat .k { font-size: 9.5px; letter-spacing: 0.1em; }
  .daily-stat b { font-size: 21px; }
  .daily-stat small { font-size: 11px; }
  .daily-board { padding: 12px; }
  .daily-board .dl-top { gap: 8px 12px; margin-bottom: 10px; }
  .daily-win { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
  .daily-win .dl-answer figcaption { font-size: 15px; }
  .daily-win h2 { font-size: 24px; }
  .daily-win .dl-mini i { width: 13px; height: 13px; }
  .daily-win .btn-lg { padding: 12px 18px; }
  .share-body { padding: 22px 16px 22px; }
  .share-actions .btn { flex: 1 1 auto; }

  /* документы: оглавление — свёрнутым списком над текстом, таблицы — карточками (подпись столбца — над значением) */
  .legal-head { margin-bottom: 22px; }
  .legal-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 22px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .legal-tabs::-webkit-scrollbar { display: none; }
  .legal-body.has-toc { display: block; }
  .legal-toc { display: none; }
  .legal-toc-m { display: block; margin: 0 0 22px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(8, 9, 13, 0.6); }
  .legal-toc-m summary { margin: 0; cursor: pointer; }
  .legal-toc-m[open] summary { margin-bottom: 8px; }
  .legal-text { font-size: 15.5px; line-height: 1.68; }
  .legal-text h2 { margin-top: 36px; font-size: 20px; }
  .legal-text h3 { font-size: 17.5px; }
  .doc-table:not(.kv) { border: 0; background: none; overflow: visible; }
  .doc-table:not(.kv) thead { display: none; }
  .doc-table:not(.kv) table, .doc-table:not(.kv) tbody, .doc-table:not(.kv) tr, .doc-table:not(.kv) td { display: block; width: auto; }
  .doc-table:not(.kv) tr { margin: 0 0 10px; padding: 4px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(8, 9, 13, 0.6); }
  .doc-table:not(.kv) td { padding: 8px 0; border-top: 1px solid var(--line); }
  .doc-table:not(.kv) tr td:first-child { border-top: 0; color: var(--text); font-weight: 600; }
  .doc-table:not(.kv) td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 600 10.5px/1.3 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
  .doc-table.kv th[scope="row"] { width: 42%; }

  /* плашка о статистике — над нижней панелью, кнопки — на всю ширину; «Спросить курьера» на это время прячется */
  .stats-banner { bottom: calc(76px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; padding: 14px 14px 12px; font-size: 13.5px; }
  body:not(:has(.bottombar)) .stats-banner { bottom: calc(12px + env(safe-area-inset-bottom)); } /* документы, «Поделиться» — без нижней панели */
  .sb-actions .btn { flex: 1 1 0; }
  body:has(.stats-banner) .ask-btn { display: none; }
  body:has(.stats-banner) .footer { padding-bottom: 230px; }
  .foot-row { gap: 14px; }
  .footer .foot-docs { gap: 6px 16px; }

  /* окна */
  .modal, .auth { place-items: start center; padding-top: 8vh; }
  .modal-card, .auth-card { padding: 26px 18px 18px; }
  .modal-card h2, .auth-step h2 { font-size: 26px; }

  /* подсказка курьера — компактнее: меньше места, где ей не закрыть кнопки игры */
  .guide-bubble { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 11px; font-size: 13.5px; line-height: 1.35; }
  .guide-head { width: 34px; height: 34px; }
  .guide-rules { margin-top: 5px; font-size: 12.5px; line-height: 1.32; }
  .guide-rules li + li { margin-top: 2px; }
  .guide-actions { margin-top: 7px; }

  /* итоги партии — во всю ширину снизу */
  .results { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 72vh; overflow-y: auto; padding: 14px 12px 14px; gap: 9px; }
  .results-courier { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .results-courier .rig { width: 64px; }
  .results-say { font-size: 13px; padding: 8px 10px; }
  .results-total b { font-size: 38px; }

  /* комната: игре нужен весь экран */
  /* название игры — во всю ширину (длинное не рвётся посреди слова), ниже — код и кнопки */
  .room-bar { grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px; margin-bottom: 12px; }
  .room-title { grid-column: 1 / -1; gap: 10px; }
  .room-title svg { width: 36px; height: 36px; padding: 7px; }
  .room-title h1 { font-size: 22px; letter-spacing: 0.04em; white-space: normal; overflow-wrap: break-word; }
  .room-code { padding: 6px 10px; column-gap: 8px; }
  #roomCodeText { font-size: 21px; letter-spacing: 0.18em; }
  .room-tools { justify-content: flex-end; }
  .room-tools .me-name { margin-right: auto; max-width: none; flex: 1 1 0; min-width: 0; }
  .room-tools .me-name { visibility: hidden; } /* не влезает рядом с кодом — «вы» и так в табло; место держит */
  .room-copy { display: none; }
  .room-label { grid-row: auto; }
  .room-company { margin-left: 0; padding: 3px 8px 4px; }
  .room-company .kicker { display: none; }
  .room-company b { font-size: 13px; max-width: 110px; }
  .save-banner { font-size: 14px; }
  .layout { gap: 14px; }
  .board { padding: 16px; }
  .board-main { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; }
  .letter-tile { width: 120px; }
  .lt-letter { font-size: 80px; }
  .hero-card.mystery .q { font-size: 90px; }
  .hero-card figcaption { font-size: 22px; }
  .controls { padding: 16px; }
  .buzzer { height: 78px; font-size: 30px; }
  .im-grid, .im-grid.reveal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .im-hand { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .icard-name { font-size: 12px; padding: 18px 6px 6px; }
  .clue q { font-size: 24px; }
}
@media (max-width: 420px) {
  .me-chip .side-badge { display: none; } /* в шапке тесно: остаётся медаль, сторона — в профиле */
  .me-chip { padding: 3px 5px; }
}
@media (max-width: 380px) {
  .brand span { font-size: 17px; letter-spacing: 0.1em; }
  .code-input { width: 104px; }
  .code-mini .code-input { width: 92px; }
  .guess .btn-fire { padding: 16px 13px; font-size: 13px; letter-spacing: 0.08em; }
  .title .big { font-size: clamp(44px, 15vw, 60px); }
}

/* ---------------------------------------------------------------- Геродекс (public/herodex.js): сетка героев как на dota2.com */

.attr-str { --attr: #e4533b; --attr-glow: rgba(228, 83, 59, 0.35); }
.attr-agi { --attr: #4fbf5a; --attr-glow: rgba(79, 191, 90, 0.32); }
.attr-int { --attr: #4aa3e8; --attr-glow: rgba(74, 163, 232, 0.34); }
.attr-all { --attr: #b58ce6; --attr-glow: rgba(181, 140, 230, 0.34); }
.hx-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: var(--attr, var(--gold)); transform: rotate(45deg); box-shadow: 0 0 10px var(--attr-glow, transparent); vertical-align: 1px; }
.kicker .hx-dot { margin-right: 0; }

/* аватар — портрет героя вместо головы курьера (шапка, профиль) */
html.has-avatar .avatar { background: var(--art-avatar) center / cover no-repeat, radial-gradient(circle at 50% 30%, #2a303a, #14171c); }

#page-herodex { padding-bottom: 90px; }
.hx-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 32px 48px; align-items: end; margin-bottom: 30px; }
.hx-hero .title { margin-top: 14px; }
.hx-hero .rule { margin: 22px 0; }
.hx-count { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(214, 162, 63, 0.09), transparent 60%), var(--panel-glass); }
.hx-count-num { display: flex; align-items: baseline; gap: 12px; }
.hx-count-num b { font: 800 clamp(48px, 5vw, 72px)/0.9 var(--body); color: var(--gold-hi); text-shadow: 0 0 30px rgba(214, 162, 63, 0.35); }
.hx-count-num span { font: 600 13px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-2); }
.hx-bar { display: block; position: relative; height: 6px; margin: 16px 0 14px; border-radius: 3px; background: rgba(243, 236, 218, 0.08); overflow: hidden; }
.hx-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-hi)); box-shadow: 0 0 14px rgba(214, 162, 63, 0.55); border-radius: 3px; min-width: 3px; }
.hx-by-attr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.hx-by-attr span { display: flex; align-items: center; gap: 8px; }
.hx-by-attr i { width: 8px; height: 8px; background: var(--attr); transform: rotate(45deg); }
.hx-by-attr b { color: var(--text); font-weight: 700; }
.hx-count .cta-row { margin-top: 18px; }

.hx-rewards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.hx-badge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); color: var(--muted); }
.hx-badge-gem { flex: none; width: 30px; height: 30px; transform: rotate(45deg) scale(0.78); border: 2px solid rgba(243, 236, 218, 0.18); background: rgba(243, 236, 218, 0.04); }
.hx-badge.full .hx-badge-gem { --attr: var(--gold-hi); --attr-glow: rgba(241, 209, 138, 0.45); }
.hx-badge.on { color: var(--text); border-color: rgba(241, 209, 138, 0.35); background: linear-gradient(160deg, rgba(214, 162, 63, 0.12), transparent 70%), var(--ink-2); }
.hx-badge.on .hx-badge-gem { border-color: var(--attr); background: var(--attr); box-shadow: 0 0 18px var(--attr-glow); }
.hx-badge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-badge-text b { font: 700 14.5px/1.15 var(--title); color: inherit; }
.hx-badge-text small { font-size: 12px; color: var(--dim); }
.hx-badge.on .hx-badge-text small { color: var(--gold-hi); }

.hx-filters { position: sticky; top: var(--nav-h); z-index: 5; display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 12px 0; margin-bottom: 18px; background: linear-gradient(180deg, var(--ink-0) 70%, transparent); }
.hx-filters .seg { flex-wrap: wrap; }
.hx-filters .seg button { display: inline-flex; align-items: center; }

.hx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.hx-card {
  position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); background: var(--ink-2); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, filter 0.3s;
}
.hx-card::after { content: ''; position: absolute; inset: 0; border: 1px solid rgba(243, 236, 218, 0.08); border-bottom: 2px solid var(--attr); border-radius: var(--radius); pointer-events: none; z-index: 3; transition: border-color 0.3s; }
.hx-img { position: absolute; inset: 0; }
.hx-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s var(--ease), filter 0.3s; }
.hx-card:not(.locked) .hx-img img { filter: saturate(0.92) brightness(0.92); }
.hx-card:hover { transform: translateY(-6px) scale(1.03); z-index: 2; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 26px var(--attr-glow); }
.hx-card:hover::after { border-color: rgba(241, 209, 138, 0.55); border-bottom-color: var(--attr); }
.hx-card:hover .hx-img img { transform: scale(1.06); filter: none; }
.hx-card.locked { background: radial-gradient(ellipse at 50% 42%, rgba(243, 236, 218, 0.24), rgba(243, 236, 218, 0.05) 60%, transparent 78%), linear-gradient(180deg, var(--ink-3), var(--ink-1)); }
.hx-card.locked .hx-img img { object-fit: contain; opacity: 0.92; filter: drop-shadow(0 0 1px rgba(243, 236, 218, 0.25)); }
.hx-card.locked:hover .hx-img img { transform: scale(1.04); }
.hx-attr { position: absolute; z-index: 2; left: 9px; top: 9px; width: 10px; height: 10px; background: var(--attr); transform: rotate(45deg); box-shadow: 0 0 10px var(--attr-glow), 0 0 0 2px rgba(4, 5, 7, 0.6); }
.hx-card.locked .hx-attr { opacity: 0.55; }
.hx-new { position: absolute; z-index: 2; right: 7px; top: 7px; padding: 3px 7px; border-radius: 2px; background: var(--ember); color: #fff; font: 700 10px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; box-shadow: 0 0 14px rgba(255, 106, 61, 0.6); }
.hx-name { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 30px 10px 10px; background: linear-gradient(180deg, transparent, rgba(4, 5, 7, 0.88) 55%); }
.hx-name b { font: 700 15px/1.1 var(--title); color: var(--text); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); overflow-wrap: anywhere; }
.hx-name small { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.hx-card.locked .hx-name b { color: var(--muted); }
.hx-card.fresh::after { border-color: rgba(255, 106, 61, 0.6); }
.hx-empty { padding: 40px 0; text-align: center; }

.hx-stars { display: inline-flex; gap: 3px; }
.hx-stars i { width: 9px; height: 9px; background: rgba(243, 236, 218, 0.16); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 78%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.hx-stars i.on { background: var(--gold-hi); filter: drop-shadow(0 0 4px rgba(241, 209, 138, 0.7)); }
.hx-stars.big { gap: 6px; }
.hx-stars.big i { width: 22px; height: 22px; }

/* карточка героя: крупно, поверх сетки */
.hx-detail { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: calc(var(--nav-h) + 16px) 24px 24px; background: rgba(2, 3, 5, 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: hx-fade 0.25s var(--ease); }
@keyframes hx-fade { from { opacity: 0; } }
body.hx-open { overflow: hidden; }
.hx-detail-panel {
  position: relative; display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); width: min(1020px, 100%); max-height: 100%; overflow: auto;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(120deg, var(--attr-glow), transparent 38%), var(--ink-1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4); animation: hx-rise 0.35s var(--ease);
}
@keyframes hx-rise { from { transform: translateY(18px); opacity: 0; } }
.hx-detail-art { position: relative; min-height: 100%; background: radial-gradient(ellipse at 50% 40%, var(--attr-glow), transparent 70%), var(--ink-2); }
.hx-detail-art img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2 / 3; }
.hx-detail-panel.locked .hx-detail-art { background: radial-gradient(ellipse at 50% 42%, rgba(243, 236, 218, 0.2), rgba(243, 236, 218, 0.03) 60%, transparent 76%), var(--ink-3); }
.hx-detail-panel.locked .hx-detail-art img { object-fit: contain; }
.hx-step { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; }
.hx-step a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; background: rgba(4, 5, 7, 0.7); color: var(--text-2); transition: color 0.2s, border-color 0.2s; }
.hx-step a:hover { color: #fff; border-color: var(--gold-hi); }
.hx-step svg { width: 18px; height: 18px; }
.hx-detail-body { display: flex; flex-direction: column; gap: 16px; padding: 30px 32px 28px; min-width: 0; }
.hx-detail-body .title .big { font-size: clamp(38px, 4.4vw, 64px); }
.hx-detail-body .title .small { color: var(--muted); }
.hx-close { position: absolute; z-index: 3; right: 12px; top: 12px; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 50%; background: rgba(4, 5, 7, 0.7); color: var(--text-2); font-size: 16px; cursor: pointer; }
.hx-close:hover { color: #fff; border-color: var(--gold-hi); }
.hx-mastery { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.hx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); overflow: hidden; }
.hx-facts div { padding: 12px 14px; background: var(--ink-1); }
.hx-facts dt { font: 600 10.5px/1.2 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.hx-facts dd { margin: 6px 0 0; font: 700 17px/1.2 var(--title); color: var(--text); }
.hx-facts dd small { display: block; margin-top: 3px; font: 400 12px/1.3 var(--body); color: var(--muted); }
.hx-ways h3 { margin-bottom: 8px; font: 700 12px/1 var(--body); letter-spacing: 0.24em; color: var(--text-2); }
.hx-ways ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.hx-ways li { display: inline-flex; gap: 8px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: 13px; }
.hx-ways li span { color: var(--gold-hi); font-weight: 700; }
.hx-ways li.off { color: var(--muted); border-style: dashed; }
.hx-say { display: flex; align-items: flex-start; gap: 12px; }
.hx-say-head, .fd-say-head { flex: none; width: 44px; height: 44px; border: 2px solid #2a2419; border-radius: 50%; background: var(--art-head, none) center 70% / 118% no-repeat, #2a303a; }
.hx-say p, .fd-say p { position: relative; margin: 0; padding: 11px 15px; border-radius: 12px; background: var(--cream); color: #241c10; font-size: 14.5px; line-height: 1.45; }
.hx-say p::before, .fd-say p::before { content: ''; position: absolute; left: -7px; top: 14px; border: 7px solid transparent; border-left: 0; border-right-color: var(--cream); }
.hx-lock-note { font-size: 13.5px; color: var(--muted); }
.hx-lock-note b { color: var(--text); }

/* профиль: блок Геродекса и выбор аватара */
.hx-avs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.hx-av { appearance: none; display: grid; justify-items: center; gap: 5px; width: 64px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 11.5px; cursor: pointer; }
.hx-av img, .hx-av-courier { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line-2); object-fit: cover; transition: border-color 0.2s, box-shadow 0.2s; }
.hx-av-courier { display: block; background: var(--art-head, none) center 70% / 118% no-repeat, radial-gradient(circle at 50% 30%, #2a303a, #14171c); }
.hx-av span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-av:hover img, .hx-av:hover .hx-av-courier { border-color: var(--text-2); }
.hx-av.on { color: var(--gold-hi); }
.hx-av.on img, .hx-av.on .hx-av-courier { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(214, 162, 63, 0.2), 0 0 18px rgba(214, 162, 63, 0.35); }

/* главная, «Твоё»: Геродекс и Лента строкой */
.yours-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.yours-more:empty { display: none; }
.yours-link { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(214, 162, 63, 0.08), transparent 60%), var(--ink-2); transition: transform 0.3s var(--ease), border-color 0.3s; }
.yours-link:hover { transform: translateY(-3px); border-color: rgba(241, 209, 138, 0.4); }
.yours-link .yl-kicker { grid-column: 1 / -1; font: 600 11.5px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-hi); }
.yours-link b { font: 700 22px/1.1 var(--display); letter-spacing: 0.04em; }
.yours-link .hx-bar { margin: 0; }
.yours-link.feed { background: linear-gradient(160deg, rgba(255, 106, 61, 0.12), transparent 60%), var(--ink-2); }
.yours-link.feed .yl-kicker { color: var(--ember-2); }
.yl-faces { grid-column: 1 / -1; display: flex; margin-top: 6px; }
.yl-faces img { width: 36px; height: 36px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--ink-2); box-shadow: 0 0 0 1px var(--line-2); }
.yl-go { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2); }

/* «Играть» → Арена: Лента угадаек открыта */
.arena .band-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.arena-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px 24px; min-height: 170px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(255, 138, 82, 0.45); border-radius: var(--radius);
  background: radial-gradient(ellipse at 100% 0, rgba(255, 106, 61, 0.28), transparent 60%), radial-gradient(ellipse at 0 100%, rgba(74, 58, 138, 0.35), transparent 60%), var(--ink-2);
  box-shadow: 0 14px 34px rgba(207, 47, 28, 0.18); transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.arena-tile:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(207, 47, 28, 0.32); }
.arena-tile b { font: 700 26px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.arena-tile p { margin: 0; color: var(--text-2); font-size: 15px; }
.arena-tile .chip { font: 600 11.5px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 10px; }
.arena-tile .btn { margin-top: auto; }
.at-cards { position: absolute; z-index: -1; right: 18px; top: 18px; width: 90px; height: 110px; }
.at-cards i { position: absolute; inset: 0; border-radius: 6px; border: 1px solid rgba(255, 214, 170, 0.35); background: linear-gradient(180deg, rgba(255, 138, 82, 0.2), rgba(74, 58, 138, 0.2)); }
.at-cards i:nth-child(1) { transform: rotate(-10deg) translate(-14px, 6px); opacity: 0.45; }
.at-cards i:nth-child(2) { transform: rotate(6deg) translate(8px, 2px); opacity: 0.65; }

/* ---------------------------------------------------------------- Арена: Лента угадаек (public/feed.js) — ярко */

.arena-page {
  position: relative; min-height: 100svh; padding: calc(var(--nav-h) + 22px) var(--gutter) 40px; isolation: isolate;
  background: radial-gradient(ellipse 60% 50% at 85% 10%, rgba(255, 106, 61, 0.22), transparent 70%),
              radial-gradient(ellipse 60% 55% at 10% 90%, rgba(74, 58, 138, 0.45), transparent 70%),
              radial-gradient(ellipse 50% 40% at 50% 50%, rgba(214, 162, 63, 0.08), transparent 70%), var(--ink-0);
}
.fd-stage { width: min(640px, 100%); margin: 0 auto; }
.fd-stage:not(.play) { width: min(760px, 100%); padding-top: 4vh; }
.fd-stage.intro { width: min(1140px, 100%); }
.fd-intro { position: relative; max-width: 640px; }
.fd-intro .title { margin-top: 14px; }
.fd-intro .title .big { font-size: clamp(46px, 7vw, 96px); }
/* веер карточек справа — только для вида */
.fd-preview { position: absolute; left: calc(100% + 40px); top: 40px; width: 420px; height: 480px; pointer-events: none; }
.fd-pc { position: absolute; top: 0; width: 230px; padding: 12px 12px 16px; border: 1px solid rgba(243, 236, 218, 0.18); border-radius: 10px; background: linear-gradient(160deg, rgba(243, 236, 218, 0.08), transparent 45%), rgba(10, 12, 18, 0.95); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.fd-pc .fd-img { height: 250px; }
.fd-pc b { display: block; margin-top: 12px; text-align: center; font: 700 17px/1.1 var(--display); letter-spacing: 0.04em; }
.fd-pc.pc1 { left: 0; transform: rotate(-9deg) translateY(40px); z-index: 1; }
.fd-pc.pc2 { left: 170px; transform: rotate(8deg) translateY(56px); z-index: 2; }
.fd-pc.pc3 { left: 88px; transform: rotate(-1deg); z-index: 3; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 50px rgba(255, 106, 61, 0.22); animation: fd-float 5s ease-in-out infinite; }
@keyframes fd-float { 50% { transform: rotate(-1deg) translateY(-10px); } }
@media (max-width: 1180px) { .fd-preview { display: none; } }
.fd-types { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; padding: 0; list-style: none; }
.fd-types li { padding: 7px 12px; border: 1px solid rgba(255, 138, 82, 0.4); border-radius: 2px; background: rgba(255, 106, 61, 0.08); font: 600 12px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.fd-intro .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 18px; }
.fd-best-note { color: var(--text-2); }
.fd-best-note b { color: var(--gold-hi); font-size: 20px; }

.fd-hud { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 12px; }
.fd-hud small { display: block; font: 600 10px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.fd-hud b { font: 800 24px/1 var(--body); }
.fd-streak { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid var(--line-2); border-radius: 22px; background: rgba(4, 5, 7, 0.5); }
.fd-streak svg.i { font-size: 22px; color: var(--muted); }
.fd-streak small { display: none; }
.fd-streak.hot { border-color: rgba(255, 138, 82, 0.7); box-shadow: 0 0 22px rgba(255, 106, 61, 0.35); }
.fd-streak.hot svg.i { color: var(--fire); fill: rgba(255, 181, 74, 0.35); animation: fd-flame 0.9s ease-in-out infinite alternate; }
.fd-streak.hot b { color: var(--fire); }
@keyframes fd-flame { to { transform: scale(1.15) rotate(-6deg); } }
.fd-bestnum b { color: var(--gold-hi); }
.fd-score { justify-self: end; text-align: right; }
.fd-score span { color: var(--dim); font-size: 14px; }

.fd-deck { perspective: 1200px; }
.fd-deck.slide .fd-card { animation: fd-in 0.42s var(--ease); }
@keyframes fd-in { from { transform: translateY(46%) scale(0.94); opacity: 0; } }
.fd-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 20px; overflow: hidden;
  border: 1px solid rgba(243, 236, 218, 0.16); border-radius: 10px;
  background: linear-gradient(160deg, rgba(243, 236, 218, 0.07), transparent 45%), rgba(10, 12, 18, 0.92);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5);
  min-height: min(640px, calc(100svh - var(--nav-h) - 150px));
}
.fd-card.loading { display: grid; place-items: center; }
.fd-spin { width: 36px; height: 36px; border: 3px solid var(--line-2); border-top-color: var(--ember); border-radius: 50%; animation: fd-spin 0.8s linear infinite; }
@keyframes fd-spin { to { transform: rotate(360deg); } }
.fd-card.is-right { border-color: rgba(95, 191, 106, 0.6); box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(95, 191, 106, 0.2); }
.fd-card.is-wrong { border-color: rgba(201, 67, 47, 0.6); box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(201, 67, 47, 0.2); }
.fd-timer { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: rgba(243, 236, 218, 0.08); }
.fd-timer i { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, var(--ember-deep), var(--ember), var(--fire)); box-shadow: 0 0 12px rgba(255, 106, 61, 0.7); animation: fd-time linear forwards; }
.fd-timer i.stop { animation-play-state: paused; opacity: 0.35; }
@keyframes fd-time { to { transform: scaleX(0); } }
.fd-top { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.fd-type { font: 600 11.5px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ember-2); }
.fd-secs { font-size: 12px; color: var(--dim); }
.fd-img { position: relative; display: grid; place-items: center; flex: 1 1 auto; min-height: clamp(170px, 30svh, 260px); border-radius: 8px; overflow: hidden; }
.fd-card .fd-img img { max-height: min(340px, 42svh); }
/* ответ виден — картинка ужимается, чтобы итог и «Дальше» влезли в экран */
.fd-card.is-right .fd-img, .fd-card.is-wrong .fd-img { flex: 0 0 auto; min-height: 0; height: clamp(96px, 15svh, 140px); }
.fd-card.is-right .fd-img img, .fd-card.is-wrong .fd-img img { max-height: 100%; width: auto; }
.fd-img img { max-width: 100%; max-height: 100%; user-select: none; -webkit-user-drag: none; }
.fd-img-sil { background: radial-gradient(ellipse at 50% 45%, #fff7df, #f1d18a 45%, #b57a2a 85%); }
.fd-img-sil img { height: min(300px, 36svh); width: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(80, 40, 0, 0.35)); }
.fd-img-ability, .fd-img-item { background: radial-gradient(ellipse at 50% 50%, rgba(74, 58, 138, 0.55), transparent 70%), var(--ink-2); }
.fd-img-ability img { width: 128px; height: 128px; border-radius: 8px; border: 2px solid rgba(241, 209, 138, 0.6); box-shadow: 0 0 30px rgba(142, 210, 255, 0.25), 0 12px 30px rgba(0, 0, 0, 0.6); }
.fd-img-item img { width: 132px; height: auto; border-radius: 6px; border: 2px solid rgba(241, 209, 138, 0.55); box-shadow: 0 0 30px rgba(214, 162, 63, 0.3), 0 12px 30px rgba(0, 0, 0, 0.6); image-rendering: auto; }
.fd-img-hero { background: radial-gradient(ellipse at 50% 40%, rgba(214, 162, 63, 0.25), transparent 70%), var(--ink-2); }
.fd-img-hero img { height: min(300px, 36svh); width: auto; object-fit: contain; }
.fd-img-patch { background: repeating-linear-gradient(135deg, rgba(243, 236, 218, 0.04) 0 12px, transparent 12px 24px), radial-gradient(ellipse at 50% 50%, rgba(255, 106, 61, 0.25), transparent 70%), var(--ink-2); }
.fd-img-patch span { font: 800 clamp(56px, 12vw, 96px)/1 var(--body); letter-spacing: 0.04em; color: var(--text); text-shadow: 0 0 30px rgba(255, 106, 61, 0.55); }
.fd-q { font: 700 clamp(22px, 3vw, 30px)/1.15 var(--title); letter-spacing: 0.01em; text-transform: none; text-align: center; }
.fd-statement { margin: -4px 0 0; text-align: center; font: 700 clamp(18px, 2.4vw, 22px)/1.35 var(--title); color: var(--gold-hi); }
.fd-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fd-opt {
  appearance: none; position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 14px;
  border: 1.5px solid rgba(243, 236, 218, 0.28); border-radius: 6px; background: rgba(4, 5, 7, 0.55); color: var(--text);
  font: 600 16px/1.2 var(--body); text-align: left; cursor: pointer; transition: transform 0.15s, border-color 0.2s, background 0.2s;
}
.fd-opt kbd { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; border: 1px solid var(--line-2); font: 700 12px/1 var(--body); color: var(--dim); }
.fd-opt:hover:not(:disabled) { border-color: var(--gold-hi); background: rgba(214, 162, 63, 0.12); transform: translateY(-2px); }
.fd-opt:disabled { cursor: default; }
.fd-opts.two .fd-opt { justify-content: center; min-height: 64px; font-size: 18px; }
.fd-opt.picked { border-color: var(--gold-hi); background: rgba(214, 162, 63, 0.18); }
.fd-opt.right { border-color: var(--green-hi); background: rgba(95, 191, 106, 0.22); color: #fff; animation: fd-pop 0.35s var(--ease); }
.fd-opt.right kbd { border-color: var(--green-hi); color: var(--green-hi); }
.fd-opt.wrong { border-color: var(--red-hi); background: rgba(201, 67, 47, 0.25); animation: fd-shake 0.35s; }
.fd-opt.off { opacity: 0.45; }
@keyframes fd-pop { 50% { transform: scale(1.04); } }
@keyframes fd-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.fd-reveal { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); animation: hx-rise 0.3s var(--ease); }
.fd-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.fd-verdict b { font: 800 22px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.is-right .fd-verdict b { color: var(--green-hi); }
.is-wrong .fd-verdict b { color: var(--bad-text); }
.fd-answer { display: flex; align-items: center; gap: 12px; }
.fd-answer img { flex: none; width: 58px; height: 87px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-2); }
.fd-answer div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fd-answer b { font: 700 19px/1.15 var(--title); }
.fd-answer span { color: var(--text-2); font-size: 14.5px; }
.fd-answer small { color: var(--dim); font-size: 12px; }
.fd-next { justify-self: stretch; }
.fd-say { display: flex; align-items: flex-start; gap: 12px; animation: hx-rise 0.3s var(--ease); }
.fd-summary .fd-say { margin-top: 14px; }
.fd-reveal .fd-say-head { width: 38px; height: 38px; }
.fd-reveal .fd-say p { padding: 8px 12px; font-size: 13.5px; }

.fd-summary .title { margin: 12px 0 20px; }
.fd-sum-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); overflow: hidden; margin-bottom: 20px; }
.fd-sum-grid div { padding: 14px; background: var(--ink-1); }
.fd-sum-grid small { display: block; font: 600 10.5px/1.2 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.fd-sum-grid b { display: block; margin-top: 6px; font: 800 28px/1 var(--body); color: var(--gold-hi); }
.fd-bytype { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.fd-bytype li { display: grid; grid-template-columns: 170px 1fr 48px; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); }
.fd-bytype i { position: relative; height: 6px; border-radius: 3px; background: rgba(243, 236, 218, 0.08); overflow: hidden; }
.fd-bytype i b { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--ember-deep), var(--fire)); border-radius: 3px; }
.fd-bytype em { font-style: normal; text-align: right; color: var(--text); }
.fd-summary .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.fd-nag { margin-top: 12px; }

@media (max-width: 1100px) {
  .hx-hero { grid-template-columns: minmax(0, 1fr); }
  .hx-rewards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hx-detail-panel { grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); }
  .hx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hx-rewards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hx-badge { padding: 10px; gap: 8px; }
  .hx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .hx-name { padding: 22px 7px 7px; }
  .hx-name b { font-size: 13px; }
  .hx-name small { font-size: 9.5px; letter-spacing: 0.06em; }
  .hx-stars i { width: 7px; height: 7px; }
  .hx-filters { gap: 8px; margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter); overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .hx-filters .seg { flex-wrap: nowrap; flex: none; }
  .hx-filters .seg button { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .hx-detail { place-items: stretch; padding: 0; z-index: 70; }
  .hx-detail-panel { display: block; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .hx-detail-art { min-height: 0; height: 46svh; }
  .hx-detail-art img { aspect-ratio: auto; height: 100%; object-position: 50% 18%; }
  .hx-detail-panel.locked .hx-detail-art { height: 36svh; }
  body.hx-open .ask-btn { display: none; }
  .hx-detail-body { padding: 20px var(--gutter) calc(32px + env(safe-area-inset-bottom)); gap: 14px; }
  .hx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-close { top: 10px; right: 10px; }
  .yours-more { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 24px; }
  .arena-page { padding: calc(var(--nav-h) + 10px) 12px 24px; }
  .fd-hud { gap: 10px; }
  .fd-hud b { font-size: 20px; }
  .fd-finish { padding: 7px 10px 6px; }
  .fd-card { padding: 14px 12px 14px; gap: 11px; border-radius: 8px; min-height: calc(100svh - var(--nav-h) - 68px - 90px); }
  .fd-img { min-height: clamp(150px, 27svh, 230px); }
  .fd-opt { min-height: 54px; padding: 8px 10px; font-size: 15px; gap: 8px; }
  .fd-opt kbd { display: none; }
  .fd-sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-sum-grid div:last-child { grid-column: span 2; }
  .fd-bytype li { grid-template-columns: 120px 1fr 40px; font-size: 13px; }
  body.fd-playing .ask-btn { display: none; }
}

/* ---------------------------------------------------------------- уведомления и приложение (public/notify.js) */

/* переключатель: дорожка и шарик, включён — золото */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch .track { position: relative; width: 44px; height: 26px; border: 1px solid var(--line-2); border-radius: 13px; background: rgba(4, 5, 7, 0.6); transition: background 0.2s, border-color 0.2s; }
.switch .track i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: transform 0.2s var(--ease), background 0.2s; }
.switch input:checked + .track { border-color: rgba(241, 209, 138, 0.7); background: rgba(214, 162, 63, 0.3); }
.switch input:checked + .track i { transform: translateX(18px); background: var(--gold-hi); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.switch input:disabled + .track { opacity: 0.45; cursor: not-allowed; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; padding: 0; accent-color: var(--gold); }

/* Профиль → «Уведомления» */
.notify-state { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px !important; color: var(--text-2) !important; }
.notify-state svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--gold-hi); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notify-state.good svg { stroke: var(--green-hi); }
.notify-state.bad { color: var(--bad-text) !important; }
.notify-state.bad svg { stroke: var(--bad-text); }
.notify-state.off { color: var(--muted) !important; }
.notify-state.off svg { stroke: var(--dim); }
.notify-panel .me-section .note { margin-top: 10px; }
.notify-types { display: grid; margin: 0; padding: 0; list-style: none; }
.notify-type { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; }
.notify-type + .notify-type { border-top: 1px solid var(--line); }
.notify-type b { display: block; font: 700 16px/1.25 var(--title); color: var(--text); }
.notify-type > div > span { display: block; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.notify-type:not(.on) .notify-sub { display: none; }
.notify-sub { display: grid; gap: 10px; justify-items: start; margin-top: 10px; }
.seg-sm button { padding: 7px 10px 6px; font-size: 12.5px; }
.seg-sm small { font-size: 11px; color: var(--dim); }
.seg-sm button.on small { color: var(--gold-hi); }
.notify-app { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.notify-app img { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
.notify-app b { display: block; font: 700 16px/1.2 var(--title); color: var(--text); }
.notify-app span { font-size: 13.5px; color: var(--muted); }

/* «Напомнить завтра?» под угаданным Дотадлом; «поставь как приложение» после партии */
.ask-card {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px 14px; align-items: center; padding: 12px 14px;
  border: 1px solid rgba(241, 209, 138, 0.35); border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(214, 162, 63, 0.14), rgba(9, 10, 14, 0.92) 60%); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: bubble-in 0.5s var(--ease) both;
}
.ask-head { width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--art-head, none) center 70% / 118% no-repeat, radial-gradient(circle at 50% 30%, #2a303a, #111317); }
.ask-body b { display: block; font: 700 16px/1.25 var(--title); color: var(--text); }
.ask-body span { display: block; font-size: 13px; color: var(--muted); }
.ask-actions { display: flex; align-items: center; gap: 12px; }
.daily-after:empty { display: none; }
.daily-after { max-width: 640px; margin: 18px 0 4px; }
.daily-win > .daily-after { grid-column: 2; margin: -10px 0 0; }
.install-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.install-line img { width: 28px; height: 28px; border-radius: 7px; }
.install-line span { flex: 1 1 180px; }
.install-line .btn-icon { padding: 4px 6px; font-size: 13px; }
.daily-after .install-line { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(9, 10, 14, 0.7); }

/* iPhone: «Поделиться → На экран „Домой“» */
.ios-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ios-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; }
.ios-ico { display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 10px; background: var(--ink-3); }
.ios-ico svg { width: 24px; height: 24px; fill: none; stroke: #4aa3ff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ios-app img { width: 100%; height: 100%; }
.ios-steps b { display: block; color: var(--text); }
.ios-steps span { font-size: 13.5px; color: var(--muted); }

/* компания: «Сообщать, когда компания собирается» */
.co-notify { display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14.5px; color: var(--text-2); cursor: pointer; }

/* почта от ослика: значок у курьера на главной и окно со списком */
.mail-btn {
  position: absolute; right: -16%; top: -2%; z-index: 4; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid rgba(241, 209, 138, 0.45); border-radius: 50%; background: rgba(9, 10, 14, 0.85); color: var(--gold-hi); cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); transition: transform 0.2s var(--ease);
}
.mail-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.mail-btn b { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--ember); color: #fff; font: 700 11px/19px var(--body); text-align: center; }
.mail-btn b:empty { display: none; }
.mail-btn:hover { transform: translateY(-2px); }
.mail-btn.has-new { animation: mail-nudge 2.4s ease-in-out 1.6s 3; }
@keyframes mail-nudge { 0%, 20%, 100% { rotate: 0deg; } 5% { rotate: -12deg; } 10% { rotate: 10deg; } 15% { rotate: -6deg; } }
.mail-sheet .modal-card { width: min(100%, 520px); }
.mail-list { display: grid; gap: 8px; max-height: 55vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.mail-list a { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(243, 236, 218, 0.03); }
.mail-list li.new a { border-color: rgba(241, 209, 138, 0.45); background: rgba(214, 162, 63, 0.08); }
.mail-list a:hover { border-color: var(--line-2); background: rgba(243, 236, 218, 0.06); }
.mail-list b { font: 700 15.5px/1.25 var(--title); color: var(--text); }
.mail-list span { font-size: 14px; color: var(--text-2); }
.mail-list small { font-size: 12px; color: var(--dim); }

/* ---------------------------------------------------------------- память курьера (public/memory.js) */

/* облачко с хвостиком вверх — под осликом */
.thought.up::after { top: auto; bottom: 100%; left: 50%; border: 8px solid transparent; border-bottom-color: var(--cream); border-top: 0; translate: -50% 0; }

/* главная: «Итоги недели готовы» */
.band.week-band {
  padding: 26px 0; border-top: 1px solid rgba(241, 209, 138, 0.2); border-bottom: 1px solid var(--line);
  background: radial-gradient(600px 180px at 12% 50%, rgba(255, 150, 60, 0.16), transparent 70%), linear-gradient(90deg, rgba(214, 162, 63, 0.1), transparent 55%), var(--ink-1);
}
.week-banner { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.wb-art { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 124px; overflow: hidden; border-radius: var(--radius); background: var(--art-den, none) 47% 76% / cover no-repeat, #1b1712; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6); }
.wb-art .rig { width: 104px; transform: translateY(6px); }
.wb-copy .title { margin: 8px 0 6px; }
.wb-copy .title .big { color: var(--gold-hi); }
.wb-copy p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.wb-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* /week — итоги недели */
.week-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 34px 36px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  background: radial-gradient(700px 360px at 85% 75%, rgba(255, 150, 60, 0.2), transparent 70%), radial-gradient(640px 320px at 0% 0%, rgba(74, 58, 138, 0.32), transparent 70%), var(--panel-glass);
}
.week-hero .title .big { font-size: clamp(34px, 4.4vw, 66px); color: var(--gold-hi); overflow-wrap: break-word; }
.week-hero .rule { margin: 22px 0; }
.week-say { position: relative; max-width: 520px; margin: 0 0 22px; padding: 14px 18px; border-radius: var(--radius); background: var(--cream); color: #2a2318; font: 500 16px/1.45 var(--body); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.week-say::after { content: ''; position: absolute; top: 50%; right: -9px; border: 9px solid transparent; border-left-color: var(--cream); border-right: 0; translate: 0 -50%; }
.week-art { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 320px; overflow: hidden; border-radius: var(--radius); background: var(--art-den, none) 47% 78% / cover no-repeat, #1b1712; box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.65); }
.week-art .rig { width: min(78%, 250px); transform: translateY(8px); }
.week-glow { position: absolute; left: 50%; bottom: 4%; width: 74%; height: 26%; translate: -50% 0; background: radial-gradient(closest-side, rgba(255, 180, 90, 0.45), transparent); filter: blur(6px); }
.week-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.stat-tile { position: relative; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(243, 236, 218, 0.05), transparent 60%), var(--panel-glass); animation: tile-in 0.6s var(--ease) both; }
.stat-tile:nth-child(2) { animation-delay: 0.07s; }
.stat-tile:nth-child(3) { animation-delay: 0.14s; }
.stat-tile:nth-child(4) { animation-delay: 0.21s; }
.stat-tile:nth-child(5) { animation-delay: 0.28s; }
.stat-tile:nth-child(6) { animation-delay: 0.35s; }
.stat-tile:nth-child(n + 7) { animation-delay: 0.42s; }
.stat-tile b { display: block; font: 800 40px/1 var(--body); font-variant-numeric: tabular-nums; color: var(--text); }
.stat-tile.text b { font: 700 26px/1.1 var(--title); color: var(--gold-hi); }
.stat-tile span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
@keyframes tile-in { from { opacity: 0; transform: translateY(14px); } }
.week-note { margin-top: 18px; }
.week-empty { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 26px; align-items: center; padding: 28px; }
.week-empty h1 { margin: 8px 0 10px; font-size: clamp(30px, 3.4vw, 44px); color: var(--text); }
.week-empty p { margin: 0 0 12px; color: var(--text-2); }
.we-art { display: flex; align-items: flex-end; justify-content: center; height: 200px; overflow: hidden; border-radius: var(--radius); background: var(--art-den, none) 47% 76% / cover no-repeat, #1b1712; }
.we-art .rig { width: 150px; transform: translateY(6px); }

/* /diary — дневник курьера */
.diary-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.diary-courier { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 16px; }
.dc-rig { display: flex; align-items: flex-end; justify-content: center; height: 220px; overflow: hidden; border-radius: var(--radius); background: var(--art-den, none) 47% 76% / cover no-repeat, #1b1712; box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6); }
.dc-rig .rig { width: 170px; transform: translateY(8px); }
.diary-courier .thought { max-width: none; font-size: 13.5px; }
.diary-days { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.diary-day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(243, 236, 218, 0.045), transparent 55%), var(--panel-glass); }
.dd-date b { display: block; font: 700 19px/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-hi); }
.dd-date small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--dim); }
.dd-lines { display: grid; gap: 10px; }
.dd-lines p { margin: 0; padding-left: 14px; border-left: 2px solid rgba(241, 209, 138, 0.35); font-size: 15.5px; line-height: 1.45; color: var(--text-2); }
.dd-lines b { color: var(--text); }
.diary-empty { display: grid; gap: 14px; padding: 24px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--text-2); }
.diary-empty p { margin: 0; }

/* /memory — что помнит курьер, «стукнуть по голове» */
.memory-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.mem-list ul { margin: 0; padding: 0 20px 12px; list-style: none; }
.mem-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
.mem-list li + li { border-top: 1px solid var(--line); }
.mem-list li p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.mem-list li b { color: var(--text); }
.mem-forget { flex: none; color: var(--muted); }
.mem-forget:hover { color: var(--bad-text); }
.mem-bonk { display: grid; justify-items: center; gap: 12px; padding: 24px 22px; overflow: hidden; text-align: center; }
.mem-bonk h2 { font-size: 22px; letter-spacing: 0.08em; color: var(--text); }
.mem-bonk .note { max-width: 36ch; }
.mem-bonk .thought { margin-top: 6px; }
.bonk-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 200px; height: 186px; border-radius: var(--radius); background: var(--art-den, none) 47% 76% / cover no-repeat, #1b1712; box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6); }
.bonk-rig { transform-origin: 50% 100%; }
.bonk-rig .rig { width: 156px; transform: translateY(6px); }
.bonk-hammer { position: absolute; top: -4px; right: 14px; width: 64px; height: 64px; opacity: 0; transform-origin: 85% 85%; transform: rotate(-70deg); pointer-events: none; }
.bonk-hammer svg { width: 100%; height: 100%; fill: #8a6a2c; stroke: var(--cream); stroke-width: 1.3; stroke-linejoin: round; }
.bonk-stars { position: absolute; left: 50%; top: 30%; width: 100px; height: 36px; translate: -50% 0; opacity: 0; transform: scaleY(0.4); pointer-events: none; }
.bonk-stars i { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; background: var(--gold-hi); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: orbit 1.1s linear infinite; }
.bonk-stars i:nth-child(2) { animation-delay: -0.22s; }
.bonk-stars i:nth-child(3) { animation-delay: -0.44s; }
.bonk-stars i:nth-child(4) { animation-delay: -0.66s; }
.bonk-stars i:nth-child(5) { animation-delay: -0.88s; }
@keyframes orbit { from { transform: rotate(0deg) translateX(46px) rotate(0deg); } to { transform: rotate(360deg) translateX(46px) rotate(-360deg); } }
.mem-bonk.bonking .bonk-hammer { animation: hammer 0.75s cubic-bezier(0.5, 0, 0.8, 0.3) both; }
@keyframes hammer { 0% { opacity: 0; transform: rotate(-70deg); } 25% { opacity: 1; } 65% { opacity: 1; transform: rotate(14deg); } 100% { opacity: 0; transform: rotate(-8deg); } }
.mem-bonk.bonking .bonk-rig { animation: squash 0.7s 0.5s ease-out both; }
@keyframes squash { 30% { transform: scale(1.12, 0.8); } 60% { transform: scale(0.95, 1.06); } }
.mem-bonk.bonking .bonk-stars, .mem-bonk.dizzy .bonk-stars { opacity: 1; }
.mem-bonk.dizzy .bonk-stars { animation: stars-off 0.8s 4.5s both; }
@keyframes stars-off { to { opacity: 0; } }
.mem-bonk.dizzy .bonk-rig { animation: wobble 1.4s ease-in-out 3; }
@keyframes wobble { 25% { rotate: -5deg; } 75% { rotate: 5deg; } }
.bonk-confirm p { margin: 0 0 10px; color: var(--text); }

@media (max-width: 1100px) {
  .memory-grid { grid-template-columns: minmax(0, 1fr); }
  .week-hero { gap: 20px; padding: 26px; }
}
@media (max-width: 760px) {
  .week-banner { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .wb-copy .title .big { font-size: clamp(20px, 6.6vw, 34px); overflow-wrap: break-word; } /* «Коллекционер» — одной строкой от 360px */
  .wb-art { height: 92px; }
  .wb-art .rig { width: 78px; }
  .wb-cta { grid-column: 1 / -1; flex-direction: row; gap: 18px; }
  .week-hero { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; }
  .week-art { order: -1; min-height: 210px; }
  .week-art .rig { width: 170px; }
  .week-say::after { display: none; }
  .week-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-tile { padding: 14px 14px 12px; }
  .stat-tile b { font-size: 30px; }
  .stat-tile.text b { font-size: 20px; }
  .week-empty { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; }
  .we-art { height: 150px; }
  .diary-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .diary-courier { position: static; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 12px; }
  .dc-rig { height: 116px; }
  .dc-rig .rig { width: 92px; }
  .diary-courier .thought::after { display: none; }
  .diary-day { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  .notify-app { grid-template-columns: 40px minmax(0, 1fr); }
  .notify-app img { width: 40px; height: 40px; border-radius: 10px; }
  .notify-app .btn { grid-column: 1 / -1; justify-self: start; }
  .ask-card { grid-template-columns: 40px minmax(0, 1fr); }
  .daily-win > .daily-after { grid-column: 1 / -1; } /* «Напомнить завтра?» — во всю ширину, а не в узкой колонке */
  .notify-sub .seg { overflow: visible; }
  .notify-sub .seg button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 6px; line-height: 1.15; }
  .ask-head { width: 40px; height: 40px; }
  .ask-actions { grid-column: 1 / -1; }
  .mail-btn { right: -48%; top: -6%; width: 32px; height: 32px; }
  .mail-btn svg { width: 16px; height: 16px; }
  .mem-list ul { padding: 0 16px 10px; }
}

/* ---------------------------------------------------------------- Сокровищница: сезон и пропуск (public/treasury.js) */

/* сцена: ночное небо, золотой свет, ослик на пьедестале; копия — слева, как на главной */
.tr-hero { position: relative; height: min(100svh, 900px); min-height: 680px; isolation: isolate; }
.tr-hero .scene { --focus: 50%; }
.tr-glow {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background:
    radial-gradient(34% 46% at 71% 60%, rgba(241, 196, 92, 0.34), transparent 72%),
    radial-gradient(56% 30% at 71% 100%, rgba(214, 162, 63, 0.26), transparent 70%);
  animation: tr-glow 7s ease-in-out infinite;
}
@keyframes tr-glow { 50% { opacity: 0.78; } }
.tr-stage { z-index: 2; }
.tr-podium {
  position: absolute; left: 71%; bottom: 7%; width: clamp(240px, 25vw, 380px);
  transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: auto;
}
.tr-rig { position: relative; z-index: 2; width: 100%; margin-bottom: -8%; }
.tr-rig .rig { cursor: pointer; filter: drop-shadow(0 0 22px rgba(255, 210, 120, 0.28)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55)); }
/* пьедестал — золотой цилиндр: верх — эллипс в свете, бок — бронза в тени */
.tr-plinth { position: relative; z-index: 1; width: 104%; height: clamp(46px, 4.6vw, 68px); isolation: isolate; }
.tr-plinth::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 48%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #fbe6ad, #c8963a 52%, #6b4c16 100%);
  box-shadow: 0 0 26px rgba(241, 209, 138, 0.5), inset 0 -2px 0 rgba(255, 240, 200, 0.5);
}
.tr-plinth::after {
  content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 24%; bottom: 0; border-radius: 0 0 50% 50% / 0 0 34% 34%;
  background: linear-gradient(90deg, #2b1f0a, #7a5a1c 30%, #a57b2c 50%, #6b4e19 72%, #24190a);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.6);
}
.tr-plinth i { position: absolute; left: 3%; right: 3%; top: 64%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(255, 230, 160, 0.7), transparent); }
.tr-beam {
  position: absolute; left: 50%; bottom: 8%; z-index: 1; width: 78%; height: 150%; transform: translateX(-50%);
  background: linear-gradient(0deg, rgba(255, 214, 130, 0.34), rgba(255, 214, 130, 0.08) 55%, transparent 80%);
  clip-path: polygon(22% 100%, 78% 100%, 100% 0, 0 0); filter: blur(8px);
  animation: tr-beam 6s ease-in-out infinite;
}
@keyframes tr-beam { 50% { opacity: 0.65; } }
.tr-say { position: absolute; z-index: 3; bottom: 100%; left: 40%; width: max-content; max-width: min(300px, 70vw); margin: 0 0 10px; }
.tr-say:empty { display: none; }
.tr-say::after { left: 30%; }
.tr-hero .shade {
  background:
    linear-gradient(90deg, rgba(4, 5, 7, 0.9) 0%, rgba(4, 5, 7, 0.55) 34%, transparent 58%),
    linear-gradient(0deg, var(--ink-0) 0%, rgba(4, 5, 7, 0.45) 11%, transparent 24%);
}
.tr-copy { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--nav-h) + 5vh); pointer-events: none; will-change: transform, opacity; }
.tr-copy .wrap > * { pointer-events: auto; }
.tr-hero-copy { max-width: 700px; display: flex; flex-direction: column; align-items: flex-start; }
.tr-hero-copy .title { margin-top: 20px; }
.tr-hero-copy .title .big { color: var(--gold-hi); text-shadow: 0 0 40px rgba(214, 162, 63, 0.35); }
.tr-hero-copy .lead { max-width: 30em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }
.tr-level { width: min(100%, 440px); margin-top: 24px; display: grid; gap: 8px; }
.tr-lvl { font: 600 12px/1 var(--body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2); }
.tr-lvl b { font: 800 26px/1 var(--body); letter-spacing: 0; color: var(--gold-hi); vertical-align: -3px; }
.tr-level small { color: var(--muted); font-size: 12.5px; }
.tr-bar { height: 8px; }
.tr-bar i { background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, var(--gold-hi)); box-shadow: 0 0 12px rgba(214, 162, 63, 0.5); }
.tr-price { margin: 22px 0 0; }
/* цены — Onest: цифры, которые читают (у Vollkorn — «старые» цифры) */
.tr-price-head { font: 700 22px/1.25 var(--body); color: var(--text); }
.tr-price-reg { color: var(--muted); font: 500 15px/1.3 var(--body); white-space: nowrap; }
.tr-have { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0 0; color: var(--gold-hi); font-weight: 600; }
.tr-have > svg { width: 20px; height: 20px; }
.tr-founder {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border: 1px solid rgba(241, 209, 138, 0.55); border-radius: 40px; background: rgba(214, 162, 63, 0.1);
  color: var(--gold-hi); font: 700 12.5px/1 var(--body); letter-spacing: 0.04em; white-space: nowrap;
}
.tr-founder svg { width: 15px; height: 15px; }
.tr-hero-copy .cta-row { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tr-hero-copy .btn svg.i, .tr-buy .btn svg.i { margin-right: 8px; }

.tr-warn { padding: 30px 0; background: linear-gradient(90deg, rgba(214, 162, 63, 0.14), rgba(214, 162, 63, 0.03) 70%); border-block: 1px solid rgba(214, 162, 63, 0.28); }
.tr-warn-box { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.tr-warn-box .thought { max-width: 360px; }
.tr-warn-box .thought::after { display: none; }
.tr-warn-price { margin: 0; font: 600 18px/1.45 var(--body); }
.tr-warn-price b { color: var(--gold-hi); font-size: 22px; }

/* дорожка наград: две ветки по уровням, прокрутка вбок */
.tr-track-band { padding: clamp(70px, 9vw, 120px) 0; background: radial-gradient(70% 60% at 50% 0%, rgba(214, 162, 63, 0.08), transparent 70%), var(--ink-0); }
.tr-track-band .band-head .btn b { margin-left: 8px; }
.tr-track { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
.tr-rows { display: grid; grid-template-rows: 206px 64px 206px; align-items: center; padding: 8px 12px 16px 0; }
.tr-rows span { font: 700 12px/1.25 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tr-rows .lv { color: var(--dim); font-size: 10.5px; }
.tr-rows .paid { display: grid; gap: 4px; color: var(--gold-hi); }
.tr-rows .paid > span { display: flex; align-items: center; gap: 6px; }
.tr-rows .paid svg { width: 18px; height: 18px; flex: none; }
.tr-rows small { display: block; margin-top: 4px; font: 500 11.5px/1.3 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.tr-rows .free { display: grid; }
/* пояснение рядов — только на телефоне (там подписей слева нет) */
.tr-legend { display: none; margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.tr-legend .paid { color: var(--gold-hi); }
.tr-legend span + span::before { content: ' · '; color: var(--muted); }
.tr-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 8px 2px 16px; scrollbar-width: thin; scrollbar-color: rgba(214, 162, 63, 0.5) transparent; }
.tr-cols { display: flex; gap: 10px; width: max-content; }
.tr-col { width: 132px; display: grid; grid-template-rows: 206px 64px 206px; scroll-snap-align: start; }
.tr-cell { display: flex; }
/* уровень без бесплатной награды — тонкая пунктирная дорожка до следующей, а не пустая клетка */
.tr-gap { flex: 1; align-self: center; height: 2px; margin: 0 -5px; background: repeating-linear-gradient(90deg, rgba(243, 236, 218, 0.18) 0 6px, transparent 6px 12px); }
.tr-lv { position: relative; display: flex; align-items: center; justify-content: center; }
.tr-lv::before { content: ''; position: absolute; left: -5px; right: -5px; top: 50%; height: 4px; transform: translateY(-50%); background: var(--ink-4); }
.tr-col.reached .tr-lv::before { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.tr-lv b {
  position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid var(--line-2); border-radius: 50%; background: var(--ink-3);
  font: 700 14px/1 var(--body); color: var(--muted);
}
.tr-col.reached .tr-lv b { border-color: var(--gold); background: #3a2c12; color: var(--gold-hi); }
.tr-col.cur .tr-lv b { box-shadow: 0 0 0 5px rgba(214, 162, 63, 0.2), 0 0 22px rgba(214, 162, 63, 0.6); }
.tr-lv small { position: absolute; z-index: 1; bottom: 1px; padding: 1px 6px; border-radius: 10px; background: var(--ink-0); font-size: 10px; letter-spacing: 0.06em; color: var(--gold-hi); white-space: nowrap; }
.tr-rw {
  appearance: none; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(243, 236, 218, 0.06), rgba(243, 236, 218, 0.015)); color: var(--text);
  text-align: center; cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.25s;
}
.tr-cell.paid .tr-rw { border-color: rgba(214, 162, 63, 0.3); background: linear-gradient(180deg, rgba(214, 162, 63, 0.14), rgba(214, 162, 63, 0.03)); }
.tr-rw:hover { transform: translateY(-3px); border-color: rgba(241, 209, 138, 0.65); }
.tr-rw-art { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-sm); background: radial-gradient(90% 90% at 50% 40%, #2b3039, #14171c 80%); }
.tr-rw-art .wr-thumb { position: absolute; inset: 0; width: 100%; height: 100%; background: none; }
.tr-rw b { font: 600 12.5px/1.2 var(--body); overflow-wrap: anywhere; min-height: 2.4em; display: flex; align-items: center; justify-content: center; margin-top: auto; }
.tr-rw small { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.tr-rw small svg { width: 12px; height: 12px; }
.tr-rw.st-ready { border-color: var(--gold-hi); box-shadow: 0 0 0 1px rgba(241, 209, 138, 0.35), 0 0 26px rgba(214, 162, 63, 0.38); animation: rw-ready 2.4s ease-in-out infinite; }
.tr-rw.st-ready small { color: #1b1305; background: var(--gold-hi); padding: 3px 10px; border-radius: 20px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
@keyframes rw-ready { 50% { box-shadow: 0 0 0 1px rgba(241, 209, 138, 0.6), 0 0 34px rgba(214, 162, 63, 0.55); } }
.tr-rw.st-done { opacity: 0.78; }
.tr-rw.st-done small { color: var(--green-hi); }
.tr-rw.st-far .tr-rw-art, .tr-rw.st-pass .tr-rw-art { filter: saturate(0.5) brightness(0.72); }
.tr-rw.st-pass small { color: var(--gold); }
.tr-frame-art { position: absolute; inset: 0; display: grid; place-items: center; }
.tr-frame-art .avatar { width: 58%; height: auto; aspect-ratio: 1; }
.tr-frame-art .avatar[data-frame]::after { inset: -9%; padding: 7%; }
.tr-title-art span {
  display: inline-block; max-width: 92%; padding: 7px 10px; border: 1px solid rgba(241, 209, 138, 0.55); border-radius: 4px;
  background: rgba(4, 5, 7, 0.6); font: 700 12px/1.25 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-hi);
}
.tr-note { margin-top: 10px; }

/* цена, что даёт пропуск, подарки */
.tr-buy-band { padding: clamp(60px, 8vw, 110px) 0; }
.tr-buy { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.tr-offer-head { margin: 16px 0 0; text-transform: none; letter-spacing: 0; font: 700 clamp(26px, 2.8vw, 36px)/1.2 var(--body); }
.tr-offer-head .tr-price-head { font: inherit; color: var(--text); }
.tr-offer-head .tr-price-reg { display: block; margin-top: 6px; font: 500 17px/1.3 var(--body); } /* своей строкой — без точки */
.tr-offer-head .tr-price-dot { display: none; }
.tr-offer > p { max-width: 560px; color: var(--text-2); }
.tr-offer .cta-row { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.tr-legal { margin-top: 18px; max-width: 560px; }
.tr-test { display: inline-block; margin-top: 10px; padding: 5px 12px; border: 1px dashed rgba(143, 210, 255, 0.5); border-radius: 30px; color: var(--frost); }
.tr-perks { padding: 26px 28px; border: 1px solid rgba(214, 162, 63, 0.25); border-radius: var(--radius); background: radial-gradient(120% 90% at 100% 0%, rgba(214, 162, 63, 0.12), transparent 60%), var(--ink-2); }
.tr-perks h3, .tr-gifts h3 { font-size: 15px; letter-spacing: 0.16em; color: var(--gold-hi); }
.tr-perks ul { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 12px; }
.tr-perks li { position: relative; padding-left: 20px; color: var(--text-2); line-height: 1.45; }
.tr-perks li::before { content: '◆'; position: absolute; left: 0; top: 3px; font-size: 10px; color: var(--gold); }
.tr-perks li b { color: var(--text); }
.tr-gifts { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.tr-gifts ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.tr-gifts li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; }
.tr-gifts code { font: 700 14px/1 var(--body); letter-spacing: 0.12em; color: var(--gold-hi); }
.tr-gifts li span { color: var(--muted); }

/* окно «Оплата» */
.pay-card { width: min(100%, 480px); }
.pay-body { display: grid; gap: 10px; }
.pay-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); font-size: 16px; }
.pay-row b { font: 800 32px/1 var(--body); color: var(--gold-hi); white-space: nowrap; }
.pay-reg { margin: 0; color: var(--muted); font-size: 14px; }
.pay-mode { justify-self: start; margin: 0; padding: 4px 11px; border: 1px dashed rgba(143, 210, 255, 0.55); border-radius: 30px; color: var(--frost); font-size: 12.5px; }
.pay-consent { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pay-consent a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 2px; }

/* страницы «Оплата прошла», «Не прошла», подарок */
.pay-page { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; max-width: 1000px; margin: clamp(20px, 6vw, 60px) auto; }
.pay-art { position: relative; }
.pay-art::before { content: ''; position: absolute; inset: 8% -6% -4%; z-index: -1; background: radial-gradient(closest-side, rgba(241, 196, 92, 0.3), transparent); }
.pay-art .rig { width: 100%; }
.pay-main .title { margin-top: 14px; }
.pay-main .title .big { color: var(--gold-hi); }
.pay-main > p:not(.thought) { max-width: 560px; color: var(--text-2); }
.pay-say { margin: 22px 0 6px; max-width: min(460px, 100%); width: max-content; }
.pay-say::after { display: none; }
.pay-main .cta-row { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.pay-link { display: flex; gap: 10px; margin: 18px 0 10px; max-width: 560px; }
.pay-link input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--ink-2); color: var(--gold-hi); font: 600 14px/1 var(--body); }
.pay-founder { display: flex; align-items: center; gap: 10px; color: var(--gold-hi); font-size: 18px; }
.pay-founder svg { flex: none; width: 24px; height: 24px; }

/* фальшивая Robokassa (своя машина и тесты — server/billing/fake.js) */
body.fake-pay { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.fake-pay-box { width: min(100%, 540px); padding: 32px; border: 2px dashed rgba(143, 210, 255, 0.5); border-radius: 8px; background: var(--ink-2); }
.fake-pay-box h1 { margin: 10px 0; font: 800 54px/1 var(--body); color: var(--gold-hi); }
.fake-pay-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* пропуск в шапке сайта */
.pass-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px;
  border: 1px solid rgba(241, 209, 138, 0.55); border-radius: 40px;
  background: linear-gradient(135deg, rgba(214, 162, 63, 0.28), rgba(214, 162, 63, 0.06));
  color: var(--gold-hi); font: 700 11.5px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pass-chip svg.i { width: 17px; height: 17px; }
.pass-chip:hover { border-color: var(--gold-hi); box-shadow: 0 0 16px rgba(214, 162, 63, 0.35); }
.pass-chip.founder { box-shadow: 0 0 14px rgba(214, 162, 63, 0.3); letter-spacing: 0.02em; }

/* блок пропуска в Профиле: рамка аватара и звание */
.look-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.look-pick .lbl { width: 100%; font: 600 10.5px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.look-pick .cchip { font-size: 13px; }
.look-pick .cchip.on { border-color: var(--gold); color: var(--gold-hi); background: rgba(214, 162, 63, 0.12); }

/* рамки аватара (пропуск сезона): кольцо поверх аватара, у пропуска — переливается */
.avatar[data-frame], html[data-frame] .acct-btn .avatar { position: relative; }
.avatar[data-frame]::after, html[data-frame] .acct-btn .avatar::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; padding: 3px; pointer-events: none;
  background: var(--frame-bg, conic-gradient(#f1d18a, #8a6420, #f1d18a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: frame-spin var(--frame-t, 5s) linear infinite;
  filter: drop-shadow(0 0 6px var(--frame-glow, rgba(241, 209, 138, 0.55)));
}
@keyframes frame-spin { to { rotate: 1turn; } }
[data-frame='moon'] { --frame-bg: conic-gradient(#e8ecff, #9aa6d8, #e8ecff, #9aa6d8, #e8ecff); --frame-glow: rgba(200, 210, 255, 0.45); --frame-t: 0s; }
[data-frame='gold'] { --frame-bg: conic-gradient(#fff4c6, #d6a23f, #6f5214, #f1d18a, #fff4c6); --frame-glow: rgba(241, 209, 138, 0.7); }
[data-frame='frost'] { --frame-bg: conic-gradient(#ffffff, #8ed2ff, #2e6db5, #bfe6ff, #ffffff); --frame-glow: rgba(142, 210, 255, 0.7); --frame-t: 7s; }
[data-frame='ember'] { --frame-bg: conic-gradient(#ffe0a0, #ff6a3d, #8a1a0c, #ffb54a, #ffe0a0); --frame-glow: rgba(255, 106, 61, 0.7); --frame-t: 3.5s; }
[data-frame='storm'] { --frame-bg: conic-gradient(#e6f0ff, #7c6cff, #1c1a5e, #9fd0ff, #e6f0ff); --frame-glow: rgba(124, 108, 255, 0.75); --frame-t: 2.6s; }
[data-frame='night'] { --frame-bg: conic-gradient(#fffbe8, #4a3a8a, #16193d, #8e7cff, #fffbe8); --frame-glow: rgba(142, 124, 255, 0.6); --frame-t: 9s; }
html[data-frame='moon'] .avatar::after, .avatar[data-frame='moon']::after { animation: none; }

/* эффекты курьера (слот «эффект», public/courier.js): частицы поверх ослика, размер — от рамки ослика */
.rig > .fx { position: absolute; inset: 0; pointer-events: none; }
.rig > .fx-aura { z-index: -1; }
.fx i { position: absolute; display: block; transform: translate(-50%, -50%); opacity: 0.85; }
.rig.still .fx i, .rig.still .fx::before, .rig.still .fx::after { animation: none; }
/* золотые искры и звёздная пыль: четырёхлучевые звёздочки мерцают и поднимаются */
.fx-gold i, .fx-stars i {
  width: calc(var(--s, 1) * 10%); aspect-ratio: 1;
  background: radial-gradient(circle, #fffbe6 0 16%, #ffd76e 26%, #d6a23f 46%, transparent 66%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: fx-twinkle 2.8s ease-in-out var(--d, 0s) infinite;
}
.fx-gold, .fx-stars { filter: drop-shadow(0 0 5px rgba(255, 214, 110, 0.95)); }
.fx-stars { filter: drop-shadow(0 0 5px rgba(170, 200, 255, 0.95)); }
.fx-stars i { width: calc(var(--s, 1) * 8%); background: radial-gradient(circle, #ffffff 0 18%, #c8dcff 30%, #7f9dff 48%, transparent 66%); animation-duration: 3.6s; }
@keyframes fx-twinkle {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.2) rotate(0deg); }
  40% { opacity: 1; transform: translate(-50%, -60%) scale(1) rotate(45deg); }
  70% { opacity: 0.8; transform: translate(-50%, -85%) scale(0.7) rotate(70deg); }
  100% { opacity: 0; transform: translate(-50%, -120%) scale(0.2) rotate(90deg); }
}
/* угольки: тёплые искры тянутся шлейфом от спины и хвоста вверх */
.fx-ember i {
  width: calc(var(--s, 1) * 4.4%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #fff1c2 0 24%, #ffa040 48%, rgba(255, 80, 30, 0) 72%);
  filter: drop-shadow(0 0 6px rgba(255, 120, 40, 0.95));
  animation: fx-ember 3s ease-in var(--d, 0s) infinite;
}
.fx-ember::before {
  content: ''; position: absolute; left: 4%; top: 52%; width: 46%; height: 36%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 120, 40, 0.22), transparent); mix-blend-mode: screen;
  animation: fx-pulse 2.4s ease-in-out infinite;
}
@keyframes fx-pulse { 50% { opacity: 0.5; transform: scale(1.08); } }
@keyframes fx-ember {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(-140%, -900%) scale(0.35); }
}
/* морозное дыхание: облачка пара у морды, дальше — иней */
.fx-frost i {
  width: calc(var(--s, 1) * 22%); aspect-ratio: 1.7; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(236, 248, 255, 1), rgba(170, 220, 255, 0.55) 45%, transparent 72%);
  filter: blur(1.5px); transform-origin: 0 50%;
  animation: fx-breath 3.6s ease-out var(--d, 0s) infinite;
}
@keyframes fx-breath {
  0% { opacity: 0; transform: translate(-40%, -50%) scale(0.2); }
  15% { opacity: 1; }
  65% { opacity: 0.55; transform: translate(-5%, -95%) scale(1); }
  100% { opacity: 0; transform: translate(20%, -140%) scale(1.35); }
}
/* снежинки: медленно падают и тают */
.fx-frost i:nth-child(n+4) {
  width: calc(var(--s, 1) * 5%); aspect-ratio: 1; border-radius: 0; filter: drop-shadow(0 0 4px rgba(170, 220, 255, 0.95));
  background:
    linear-gradient(90deg, transparent 44%, #f2faff 44% 56%, transparent 56%),
    linear-gradient(0deg, transparent 44%, #f2faff 44% 56%, transparent 56%),
    linear-gradient(45deg, transparent 45%, #cfeaff 45% 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, #cfeaff 45% 55%, transparent 55%);
  animation: fx-snow 4.2s linear var(--d, 0s) infinite;
}
@keyframes fx-snow {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg); }
  15% { opacity: 1; }
  80% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-80%, 380%) rotate(120deg); }
}
/* грозовые искры: короткие молнии вспыхивают вокруг, ослик на миг светится холодным */
.fx-storm::before {
  content: ''; position: absolute; inset: 6% 4% 10%; border-radius: 45%;
  background: radial-gradient(closest-side, rgba(124, 150, 255, 0.28), transparent); opacity: 0;
  animation: fx-storm-glow 4.8s steps(1) infinite;
}
.fx-storm i { width: calc(var(--s, 1) * 8%); aspect-ratio: 0.5; opacity: 0.9; animation: fx-flash 4.8s steps(1) var(--d, 0s) infinite; }
.fx-storm i svg { width: 100%; height: 100%; fill: #e3eeff; filter: drop-shadow(0 0 3px #7fb8ff) drop-shadow(0 0 8px #4c6dff); }
@keyframes fx-flash { 0%, 100% { opacity: 0; } 2% { opacity: 1; } 4% { opacity: 0.2; } 6% { opacity: 1; } 10% { opacity: 0; } }
@keyframes fx-storm-glow { 0%, 100% { opacity: 0; } 2% { opacity: 1; } 6% { opacity: 0.6; } 10% { opacity: 0; } }
/* аура руны: светящийся круг под копытами и мягкий столб света за осликом */
.fx-aura::before {
  content: ''; position: absolute; left: 50%; bottom: 1%; width: 86%; height: 15%; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(160, 245, 255, 0.95), rgba(80, 140, 255, 0.4) 45%, transparent 72%);
  animation: fx-aura 3.2s ease-in-out infinite;
}
.fx-aura::after {
  content: ''; position: absolute; left: 50%; bottom: 7%; width: 64%; height: 84%; transform: translateX(-50%);
  background: linear-gradient(0deg, rgba(140, 240, 255, 0.4), transparent 78%); filter: blur(10px);
  animation: fx-aura 3.2s ease-in-out infinite;
}
@keyframes fx-aura { 50% { opacity: 0.55; transform: translateX(-50%) scale(1.06); } }
.fx-aura i {
  width: calc(var(--s, 1) * 3.2%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #f4ffff 0 25%, #8cf0ff 50%, transparent 72%);
  filter: drop-shadow(0 0 5px rgba(120, 230, 255, 0.95));
  animation: fx-mote 3.4s ease-out var(--d, 0s) infinite;
}
@keyframes fx-mote {
  0% { opacity: 0; transform: translate(-50%, -50%); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -1400%); }
}

/* номер на табличке шапки основателя (public/courier.js; табличка — на рисунке, цвет номера — plaque.text) */
.rig { container-type: inline-size; }
.rig .wear > .plaque { position: absolute; display: grid; place-items: center; color: #0e172c; }
.rig .wear > .plaque b { font: 800 3cqw/1 var(--body); letter-spacing: 0.01em; white-space: nowrap; }

/* гардероб: эффект — ослик целиком; пока эффектов нет — где их взять */
.wr-thumb-fx .rig { left: 12%; top: 5%; width: 76%; }
.wr-empty { grid-column: span 2; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; border: 1px dashed rgba(241, 209, 138, 0.45); border-radius: var(--radius); color: var(--text-2); font-size: 13.5px; }
.wr-empty b { font: 700 15px/1.2 var(--title); color: var(--gold-hi); }

/* Дотадл дня: серию можно вернуть (пропуск) */
.daily-restore {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 15px; border: 1px solid rgba(159, 211, 255, 0.45); border-radius: var(--radius);
  background: rgba(159, 211, 255, 0.07); font-size: 14px; color: var(--text-2);
}
.daily-restore.off { border-style: dashed; background: rgba(4, 5, 7, 0.6); }
.daily-restore b { color: var(--text); }

/* экран итогов: очки сезона */
.results-season { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.results-season svg { width: 16px; height: 16px; color: var(--gold-hi); }
.results-season b { color: var(--gold-hi); }

/* рекламный блок (public/ads.js): картинка, текст, промокод, ссылка; «Реклама», рекламодатель и erid — у партнёра */
.ad-band { padding: 26px 0 40px; }
.ad-block {
  position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(243, 236, 218, 0.05), rgba(243, 236, 218, 0.015));
}
.ad-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-sm); background: var(--ink-3); }
.ad-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-label { font: 600 10px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.ad-block.partner .ad-label { color: var(--muted); }
.ad-title { display: block; margin-top: 6px; font: 700 18px/1.2 var(--title); color: var(--text); }
.ad-text p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.ad-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.ad-promo { appearance: none; margin-top: 8px; padding: 5px 10px; border: 1px dashed rgba(241, 209, 138, 0.6); border-radius: var(--radius-sm); background: none; color: var(--text-2); font-size: 12.5px; cursor: pointer; }
.ad-promo b { color: var(--gold-hi); letter-spacing: 0.1em; }
.ad-erid { display: block; margin-top: 6px; color: var(--dim); font-size: 11px; }
.ad-panel { padding: 0; overflow: hidden; }
.ad-panel .ad-block { grid-template-columns: 1fr; border: 0; border-radius: 0; gap: 10px; }
.ad-panel .ad-img { aspect-ratio: 16 / 7; }
.ad-panel .ad-cta { justify-self: start; }
.ad-free { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: var(--text-2); font-size: 14px; background: linear-gradient(120deg, rgba(214, 162, 63, 0.14), transparent 70%); }
.ad-free svg { width: 22px; height: 22px; flex: none; color: var(--gold-hi); }
.ad-free b { color: var(--gold-hi); }
.fd-stage .ad-slot { width: min(100%, 680px); margin-top: 30px; }

@media (max-width: 760px) {
  .tr-hero { height: auto; min-height: 0; }
  .tr-hero .scene { position: relative; height: 410px; } /* реплика над осликом — ниже шапки сайта */
  .tr-podium { left: 50%; bottom: 5%; width: 190px; }
  .tr-say { bottom: 100%; left: 50%; transform: translateX(-35%); max-width: 250px; font-size: 13px; }
  .tr-hero .shade { background: linear-gradient(0deg, var(--ink-0) 0%, rgba(4, 5, 7, 0.3) 22%, transparent 45%); }
  .tr-copy { position: relative; top: 0; padding: 4px 0 30px; transform: none !important; opacity: 1 !important; }
  .tr-hero-copy .title { margin-top: 12px; }
  .tr-hero-copy .lead { font-size: 15px; }
  .tr-price-head { font-size: 19px; }
  .tr-hero-copy .cta-row .btn { flex: 1 1 auto; }
  .tr-track { grid-template-columns: 1fr; }
  .tr-rows { display: none; }
  .tr-legend { display: block; }
  .tr-col { width: 118px; grid-template-rows: 192px 58px 192px; }
  .tr-col::before { content: none; }
  .tr-buy { grid-template-columns: minmax(0, 1fr); }
  .tr-perks { padding: 20px; }
  .pay-page { grid-template-columns: minmax(0, 1fr); text-align: left; gap: 10px; }
  .pay-art { width: 170px; margin: 0 auto; }
  .pay-link { flex-direction: column; }
  .pass-chip:not(.founder) span { display: none; }
  .pass-chip { padding: 6px 8px; }
  .ad-block { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .ad-cta { grid-column: 1 / -1; justify-self: start; }
  .ad-title { font-size: 16px; }
}

/* ---------------------------------------------------------------- модерация: жалоба, «Фильтр мата», страница модерации */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.report-card { width: min(100%, 460px); }
.report-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; padding: 0; border: 0; }
.report-reasons label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); cursor: pointer; }
.report-reasons input { accent-color: var(--ember); }
.report-card textarea { width: 100%; resize: vertical; min-height: 64px; }
.report-note { font-size: 12.5px; color: var(--muted); }
.mini.mini-report { color: var(--muted); }
.mini.mini-report:hover { border-color: var(--red); color: var(--bad-text); }
.settings-check { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.settings-check input { width: 18px; height: 18px; accent-color: var(--ember); }
.co-report { margin-top: 10px; font-size: 13px; color: var(--muted); }
.share-report { padding-top: 12px; font-size: 13.5px; color: var(--muted); }
.share-report .link { color: var(--muted); }
.share-report-form { display: grid; gap: 10px; margin-top: 10px; max-width: 420px; }
.share-report-form textarea, .share-report-form select { width: 100%; }
.dr-report { margin-right: auto; color: var(--muted); }

.admin-page .nav { grid-template-columns: auto 1fr; }
.admin-tabs .tab { background: none; border: 0; cursor: pointer; font-size: 15px; }
.admin-wrap { padding-top: 26px; }
.admin-title { margin: 4px 0 18px; font: 700 clamp(30px, 4vw, 44px)/1 var(--display); letter-spacing: 0.06em; }
.admin-filter { margin-bottom: 16px; }
.admin-cols { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; width: 100%; padding: 10px 12px; text-align: left;
  background: var(--panel-glass); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: 14px/1.4 var(--body);
}
button.admin-row { cursor: pointer; }
button.admin-row:hover, .admin-row.on { border-color: rgba(241, 209, 138, 0.55); background: rgba(214, 162, 63, 0.08); }
.admin-row .muted { flex-basis: 100%; font-size: 12.5px; }
.admin-row.static { align-items: center; }
.admin-row.static .btn { margin-left: auto; }
.admin-no { color: var(--gold-hi); font-weight: 700; }
.admin-empty { padding: 14px 4px; }
.admin-report { padding: 20px 22px; display: grid; gap: 10px; }
.admin-report h2 { margin: 0; font-size: 24px; }
.admin-report p { margin: 0; }
.admin-texts { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.admin-texts time, .admin-row time { color: var(--muted); font-size: 12.5px; margin-right: 6px; }
.admin-drawing { width: 100%; max-width: 560px; aspect-ratio: 4 / 3; height: auto; background: #fff; border-radius: var(--radius-sm); }
.admin-hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.admin-actions .field { flex: 1 1 220px; }
.admin-inline { display: inline-flex; gap: 6px; align-items: center; }
.admin-inline select { padding: 8px; }
.admin-key { max-width: 420px; margin: 40px auto; padding: 26px; display: grid; gap: 12px; }
@media (max-width: 860px) {
  .admin-cols { grid-template-columns: minmax(0, 1fr); }
  .report-reasons { grid-template-columns: 1fr; }
}
/* телефон: нижней панели вкладок у страниц команды нет — шапка в две строки: название, под ним вкладки (не влезли —
   листаются вбок) */
@media (max-width: 760px) {
  body.admin-page { --nav-h: 96px; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .admin-page .nav { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; row-gap: 2px; }
  .admin-page .nav .tabs { display: flex; justify-content: flex-start; gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .admin-page .nav .tabs::-webkit-scrollbar { display: none; }
  .admin-tabs .tab { font-size: 14px; letter-spacing: 0.1em; padding: 8px 2px; }
}

/* ---------------------------------------------------------------- профиль (public/profile.js) */

/* Сцена, как у Сокровищницы: ночное небо и поляна; свет — своей стороны (Тьма — лиловая ночь с красным отсветом,
   Свет — золотой рассвет); ослик справа на светлом круге, слева — ник, звание, четыре цифры, кнопки. */
#page-profile, .pe-card {
  --pf-glow-1: rgba(142, 124, 255, 0.34); --pf-glow-2: rgba(201, 67, 47, 0.24);
  --pf-ring: rgba(178, 160, 255, 0.6); --pf-ring-2: rgba(255, 106, 61, 0.32);
}
#page-profile[data-side='light'], .pe-card[data-side='light'] {
  --pf-glow-1: rgba(241, 196, 92, 0.38); --pf-glow-2: rgba(214, 162, 63, 0.28);
  --pf-ring: rgba(255, 228, 156, 0.72); --pf-ring-2: rgba(241, 209, 138, 0.36);
}
.pf-hero { position: relative; height: min(100svh, 860px); min-height: 720px; isolation: isolate; }
.pf-hero .scene { --focus: 50%; }
.pf-glow {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background:
    radial-gradient(30% 44% at 72% 62%, var(--pf-glow-1), transparent 72%),
    radial-gradient(60% 34% at 72% 100%, var(--pf-glow-2), transparent 70%);
  animation: tr-glow 8s ease-in-out infinite;
}
.pf-stage { z-index: 2; }
.pf-podium {
  position: absolute; left: 72%; bottom: 9%; width: clamp(250px, 25vw, 390px);
  transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: auto;
}
.pf-rig { position: relative; z-index: 2; width: 100%; margin-bottom: -12%; }
.pf-rig .rig { cursor: pointer; filter: drop-shadow(0 0 26px var(--pf-glow-1)) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.6)); }
/* светлый круг под копытами — вместо пьедестала Сокровищницы */
.pf-ground {
  position: relative; z-index: 1; width: 96%; aspect-ratio: 5 / 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--pf-ring), transparent 72%), radial-gradient(closest-side, var(--pf-ring-2), transparent);
  box-shadow: 0 0 44px var(--pf-ring-2);
}
.pf-ground::after { content: ''; position: absolute; inset: 16% 7%; border-radius: 50%; border: 1.5px solid var(--pf-ring); opacity: 0.75; }
.pf-beam {
  position: absolute; left: 50%; bottom: 8%; z-index: 1; width: 72%; height: 165%; transform: translateX(-50%);
  background: linear-gradient(0deg, var(--pf-glow-1), transparent 78%);
  clip-path: polygon(24% 100%, 76% 100%, 100% 0, 0 0); filter: blur(10px); opacity: 0.75;
  animation: tr-beam 7s ease-in-out infinite;
}
.pf-say { position: absolute; z-index: 3; bottom: 100%; left: 42%; width: max-content; max-width: min(300px, 70vw); margin: 0 0 10px; }
.pf-say:empty { display: none; }
.pf-hero .shade {
  background:
    linear-gradient(90deg, rgba(4, 5, 7, 0.92) 0%, rgba(4, 5, 7, 0.62) 36%, transparent 60%),
    linear-gradient(0deg, var(--ink-0) 0%, rgba(4, 5, 7, 0.45) 12%, transparent 26%);
}
.pf-copy { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--nav-h) + 5vh); pointer-events: none; will-change: transform, opacity; }
.pf-copy .wrap > * { pointer-events: auto; }
.pf-hero-copy { max-width: 640px; display: flex; flex-direction: column; align-items: flex-start; }
.pf-id { display: flex; align-items: center; gap: 20px; margin-top: 20px; max-width: 100%; }
.pf-avatar { width: 76px; height: 76px; }
.pf-name {
  min-width: 0; font-size: clamp(44px, 5.4vw, 84px); line-height: 0.95; letter-spacing: 0.03em; color: var(--text);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 12px 48px rgba(0, 0, 0, 0.65); overflow-wrap: anywhere;
}
.pf-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; font: 600 15px/1.3 var(--body); color: var(--text-2); }
.pf-title { color: var(--gold-hi); font-weight: 700; }
.pf-title2 { color: var(--text); }
.pf-sep { color: var(--dim); }
.pf-plaques { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pf-plaques .tr-founder { text-transform: none; }
.pf-pass {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border: 1px solid rgba(243, 236, 218, 0.4); border-radius: 40px; background: rgba(243, 236, 218, 0.06);
  color: var(--text); font: 700 12.5px/1 var(--body); letter-spacing: 0.04em; white-space: nowrap;
}
.pf-pass svg { width: 15px; height: 15px; }
/* четыре цифры — Onest, строкой с тонкими разделителями, как у Letterboxd */
.pf-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 640px); margin: 28px 0 0;
  border-block: 1px solid var(--line-2); background: linear-gradient(90deg, rgba(4, 5, 7, 0.55), rgba(4, 5, 7, 0.15));
}
.pf-stat { min-width: 0; padding: 14px 16px 14px 14px; }
.pf-stat + .pf-stat { border-left: 1px solid var(--line); }
.pf-stat dt { font: 600 10.5px/1.2 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.pf-stat dd { margin: 9px 0 0; display: flex; flex-direction: column; gap: 7px; }
.pf-stat b { display: inline-flex; align-items: center; gap: 4px; font: 800 clamp(28px, 2.5vw, 38px)/1 var(--body); color: var(--text); font-variant-numeric: tabular-nums; }
.pf-stat small { color: var(--muted); font-size: 12.5px; line-height: 1.25; }
.pf-bar { width: 100%; min-width: 0; height: 6px; }
svg.pf-flame { width: 0.72em; height: 0.72em; color: var(--ember-2); fill: rgba(255, 106, 61, 0.25); }
.pf-note { margin: 18px 0 0; max-width: 34em; color: var(--text-2); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }
.pf-note b { color: var(--text); }
.pf-hidden {
  display: inline-flex; align-items: center; gap: 10px; margin: 24px 0 0; padding: 12px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: rgba(4, 5, 7, 0.6); color: var(--text-2);
}
.pf-hidden svg { width: 18px; height: 18px; color: var(--gold-hi); }
.pf-actions { margin-top: 26px; }
.pf-gear svg { width: 22px; height: 22px; }
.pf-actions .btn-ghost.pf-gear { border-color: var(--line-2); padding: 9px; }

/* витрина: четыре любимых героя крупно, как постеры у Letterboxd; ниже — знаки и что надето */
.pf-show-band { padding: clamp(56px, 7vw, 100px) 0 clamp(48px, 6vw, 84px); background: radial-gradient(70% 60% at 50% 0%, rgba(214, 162, 63, 0.07), transparent 70%), var(--ink-0); }
.pf-show-band:empty { display: none; }
.pf-show-head { margin-bottom: 30px; }
.pf-heroes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.pf-hc {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--radius);
  background: radial-gradient(90% 70% at 50% 28%, var(--attr-glow, rgba(214, 162, 63, 0.2)), transparent 72%), linear-gradient(180deg, #121620, #0a0c11);
  border: 1px solid var(--line); border-bottom: 2px solid var(--attr, var(--gold));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.pf-hc:hover { transform: translateY(-5px); border-color: rgba(241, 209, 138, 0.45); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 30px var(--attr-glow, transparent); }
.pf-hc-art { display: block; aspect-ratio: 1; overflow: hidden; }
.pf-hc-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform 0.5s var(--ease); }
.pf-hc:hover .pf-hc-art img { transform: scale(1.04); }
.pf-hc-body { display: flex; flex-direction: column; gap: 9px; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.pf-hc-body b { font: 700 clamp(16px, 1.35vw, 21px)/1.1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); overflow-wrap: anywhere; }
.pf-hc-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.pf-hc-meta small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.pf-hc.empty {
  display: grid; place-items: center; aspect-ratio: 1 / 1.3; border: 1px dashed var(--line-2); box-shadow: none;
  background: rgba(243, 236, 218, 0.02);
}
.pf-hc.empty i { font: 700 44px/1 var(--display); font-style: normal; color: var(--dim); }
.pf-heroes.is-empty .pf-hc.empty { aspect-ratio: 16 / 10; }
.pf-since { color: var(--muted); font-weight: 500; }
.pf-auto { margin-top: 16px; font-size: 14px; }
.pf-marks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(28px, 4vw, 64px);
  margin-top: clamp(36px, 5vw, 56px); padding-top: 28px; border-top: 1px solid var(--line);
}
.pf-mark { min-width: 0; }
.pf-mark h3 { margin-bottom: 14px; font-size: 14px; letter-spacing: 0.18em; color: var(--text-2); }
.pf-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pf-badges li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; min-width: 0; max-width: 100%;
  padding: 10px 14px; border: 1px solid rgba(241, 209, 138, 0.38); border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(214, 162, 63, 0.16), rgba(214, 162, 63, 0.03));
}
.pf-badges svg { grid-row: span 2; width: 24px; height: 24px; color: var(--gold-hi); filter: drop-shadow(0 0 8px rgba(214, 162, 63, 0.5)); }
.pf-badges b { font: 700 14px/1.2 var(--body); color: var(--gold-hi); }
.pf-badges small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pf-wear { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pf-wear li { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 40px; background: rgba(4, 5, 7, 0.5); }
.pf-wear li i { flex: none; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.pf-wear b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.pf-wear small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pf-mark-go { margin-top: 18px; }

/* своё: Геродекс, дневник, компании — три колонки полосой, без коробок */
.pf-more-band { padding: clamp(44px, 6vw, 80px) 0 clamp(60px, 8vw, 100px); background: var(--ink-0); border-top: 1px solid var(--line); }
.pf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-tile { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 4px clamp(18px, 2.4vw, 36px); }
.pf-tile:first-child { padding-left: 0; }
.pf-tile:last-child { padding-right: 0; }
.pf-tile + .pf-tile { border-left: 1px solid var(--line); }
.pf-tile .kicker { flex-wrap: wrap; row-gap: 6px; }
.pf-tile .kicker small { color: var(--muted); font-size: 10.5px; letter-spacing: 0.14em; }
.pf-big { display: flex; align-items: baseline; gap: 10px; }
.pf-big b { font: 800 46px/1 var(--body); color: var(--text); font-variant-numeric: tabular-nums; }
.pf-big small { color: var(--muted); font-size: 14px; }
.pf-tile .hx-bar { margin: 0; }
.pf-faces { display: flex; }
.pf-faces img { width: 40px; height: 40px; margin-left: -9px; border: 2px solid var(--ink-0); border-radius: 50%; background: #14171c; object-fit: cover; }
.pf-faces img:first-child { margin-left: 0; }
.pf-tile > .link-arrow { margin-top: auto; padding-top: 6px; }
a.pf-tile:hover .link-arrow { color: var(--text); }
a.pf-tile:hover .link-arrow svg.i { transform: translateX(4px); }
.pf-diary-day { margin: 0; font: 700 12px/1.2 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); }
.pf-diary-line { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.pf-diary-line b { color: var(--text); font-weight: 600; }
/* четыре недели точками, как у Strava: день, о котором курьер писал, светится */
.pf-dots { display: grid; grid-template-columns: repeat(14, 12px); gap: 5px; margin-top: 4px; }
.pf-dots i { width: 12px; height: 12px; border-radius: 3px; background: rgba(243, 236, 218, 0.08); }
.pf-dots i.on { background: var(--gold); box-shadow: 0 0 8px rgba(214, 162, 63, 0.45); }
.pf-dots i.today { outline: 1px solid rgba(243, 236, 218, 0.4); outline-offset: 1px; }
.pf-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: auto; padding-top: 6px; }
.pf-co { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pf-co a { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pf-co li:first-child a { padding-top: 2px; }
.pf-co b { display: inline-flex; align-items: center; gap: 8px; font: 700 17px/1.2 var(--title); color: var(--text); overflow-wrap: anywhere; }
.pf-co small { color: var(--muted); font-size: 12.5px; }
.pf-co a:hover b { color: var(--gold-hi); }
.pf-companies .cta-row { margin-top: auto; padding-top: 8px; }
.pf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; margin-top: clamp(36px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); }
.pf-foot .link-arrow svg.i { font-size: 18px; }
.pf-foot .link-arrow:hover svg.i { transform: none; }

/* ---------------------------------------------------------------- «Изменить профиль» и настройки */

.pe-head, .st-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: clamp(28px, 4vw, 44px); }
.pe-back:hover svg.i, .st-back:hover svg.i { transform: translateX(-4px); }
.pe-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.pe-preview { position: sticky; top: calc(var(--nav-h) + 20px); min-width: 0; }
/* превью — карточка профиля: сцена с осликом своей стороны, ник, звание, четыре героя, знаки */
.pe-card { overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--radius); background: #0b0d12; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.pe-card-stage {
  position: relative; display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    radial-gradient(46% 60% at 50% 96%, var(--pf-ring), transparent 70%),
    radial-gradient(70% 80% at 50% 70%, var(--pf-glow-1), transparent 72%),
    linear-gradient(180deg, #16193d, #0b0d12 92%);
}
.pe-card-stage .rig { width: 62%; margin-bottom: -4%; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.6)); }
.pe-card-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; }
.pe-card-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pe-card-id .avatar { width: 46px; height: 46px; }
.pe-card-name { min-width: 0; font: 700 26px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); overflow-wrap: anywhere; }
.pe-card .pf-line { margin-top: 0; font-size: 13.5px; }
.pe-minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pe-minis img, .pe-mini-empty { display: block; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #14171c; object-fit: cover; object-position: 50% 18%; }
.pe-mini-empty { display: grid; place-items: center; border-style: dashed; color: var(--dim); font: 700 20px/1 var(--display); }
.pe-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-card-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid rgba(241, 209, 138, 0.38); border-radius: 40px; color: var(--gold-hi); font: 600 12px/1 var(--body); }
.pe-card-badges svg { width: 14px; height: 14px; }
.pe-card-note { margin-top: 12px; }
.pe-body { display: flex; flex-direction: column; min-width: 0; }
.pe-sec { padding: 30px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.pe-sec:first-child { padding-top: 0; border-top: 0; }
.pe-sec-head, .st-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.pe-sec-head h2, .st-sec-head h2 { font-size: clamp(21px, 2vw, 27px); letter-spacing: 0.08em; color: var(--text); }
.pe-sec-head small, .st-sec-head small { font: 600 11px/1.3 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.pe-sec > .note { max-width: 62ch; margin-bottom: 16px; }
.pe-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.pe-slot {
  appearance: none; position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line-2); border-bottom: 2px solid var(--attr, var(--gold)); border-radius: var(--radius-sm); background: #0e1117; color: var(--text); text-align: left;
}
.pe-slot img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 18%; }
/* имена героев в выборе — одной строкой, длинные («Виндрейнджер») — многоточием, целиком — в подсказке */
.pe-slot b { padding: 8px 10px; font: 600 13px/1.2 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-x {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(4, 5, 7, 0.8); color: var(--text); font-size: 12px; opacity: 0; transition: opacity 0.2s;
}
.pe-slot:hover .pe-x, .pe-slot:focus-visible .pe-x { opacity: 1; }
.pe-slot.empty { display: grid; place-items: center; aspect-ratio: 1 / 1.22; border: 1px dashed var(--line-2); background: transparent; cursor: default; }
.pe-slot.empty i { font: 700 26px/1 var(--display); font-style: normal; color: var(--dim); }
.pe-search input { width: min(100%, 320px); }
.pe-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 14px;
  max-height: 440px; overflow-y: auto; padding: 2px 6px 2px 0; scrollbar-width: thin;
}
.pe-hero {
  appearance: none; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 6px 6px 8px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(243, 236, 218, 0.03); color: var(--text-2);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.pe-hero:hover { border-color: var(--line-2); background: rgba(243, 236, 218, 0.06); transform: translateY(-2px); }
.pe-hero img { display: block; width: 100%; aspect-ratio: 1; border-radius: 2px; background: #14171c; object-fit: cover; object-position: 50% 18%; }
.pe-hero b { font: 600 12.5px/1.2 var(--body); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-hero small { font-size: 11.5px; color: var(--muted); }
.pe-hero.on { border-color: var(--gold); background: rgba(214, 162, 63, 0.12); box-shadow: inset 0 0 0 1px rgba(214, 162, 63, 0.35); }
.pe-hero.on b { color: var(--gold-hi); }
.pe-save { margin-top: 20px; }
#pe-side .side-choose { margin-top: 6px; }
#pe-outfit .pf-wear { margin: 4px 0 18px; }
#pe-looks .cta-row, #pe-looks .look-pick + .cta-row { margin-top: 18px; }

.st-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.st-nav { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 4px; }
.st-nav button {
  appearance: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; text-align: left;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-2); font: 600 14.5px/1.2 var(--body);
}
.st-nav button:hover { background: rgba(243, 236, 218, 0.06); color: var(--text); }
.st-nav svg.i { font-size: 18px; color: var(--gold-hi); }
.st-body { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 60px); min-width: 0; max-width: 840px; }
.st-sec { scroll-margin-top: calc(var(--nav-h) + 16px); }
.st-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(243, 236, 218, 0.04), transparent 55%), var(--panel-glass); }
.st-card + .panel, .st-card + .st-card { margin-top: 16px; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px 28px; align-items: start; padding: 20px 22px; }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-label { display: flex; flex-direction: column; gap: 5px; }
.st-label b { font: 700 16px/1.25 var(--body); color: var(--text); }
.st-label small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.st-ctl { min-width: 0; }
.st-row > .error { grid-column: 1 / -1; }
.st-value { padding-top: 2px; font: 500 15px/1.4 var(--body); color: var(--text-2); overflow-wrap: anywhere; }
.st-row.danger .st-label b { color: var(--bad-text); }
.st-seg { flex-wrap: wrap; }
.st-vis-hint { margin-top: 10px; }
.st-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.st-link span { color: var(--text-2); font: 500 13px/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace; overflow-wrap: anywhere; }
/* панели уведомлений и данных внутри настроек — без своих заголовков: заголовок у раздела */
.st-sec .panel > .panel-head { display: none; }
.st-sec .panel { box-shadow: none; }

/* мини-профиль за столом: карточка у ника (на телефоне — лист снизу) */
.pf-mini {
  position: fixed; z-index: 75; width: min(340px, calc(100vw - 24px)); overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: #0b0d12;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(241, 209, 138, 0.06);
  animation: card-in 0.25s var(--ease);
}
.pf-mini > .note { padding: 18px; }
.pf-mini-x {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; cursor: pointer;
  border: 0; border-radius: 50%; background: rgba(4, 5, 7, 0.7); color: var(--text-2); font-size: 13px;
}
.pf-mini-x:hover { color: #fff; }
.pf-mini-stage {
  display: flex; align-items: flex-end; justify-content: center; height: 150px; overflow: hidden;
  background: radial-gradient(46% 60% at 50% 100%, rgba(241, 209, 138, 0.3), transparent 70%), linear-gradient(180deg, #16193d, #0b0d12 92%);
}
.pf-mini-stage .rig { width: 150px; margin-bottom: -6px; }
.pf-mini-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.pf-mini-name { font: 700 24px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); overflow-wrap: anywhere; padding-right: 30px; }
.pf-mini .pf-line { margin-top: 0; font-size: 13px; }
.pf-mini .pf-hidden { margin-top: 4px; }
.pf-mini.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }

@media (max-width: 980px) {
  .pe-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pe-preview { position: static; }
  .pe-card { display: grid; grid-template-columns: 40% minmax(0, 1fr); max-width: 640px; }
  .pe-card-stage { aspect-ratio: auto; min-height: 150px; }
  .pe-card-stage .rig { width: 92%; }
  .st-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1100px) {
  .pf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-tile:nth-child(3) { grid-column: 1 / -1; padding: 28px 0 0; margin-top: 24px; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .pf-hero { height: auto; min-height: 0; }
  .pf-hero .scene { position: relative; height: 330px; }
  .pf-podium { left: 50%; bottom: 7%; width: 190px; }
  .pf-say { left: 50%; transform: translateX(-35%); max-width: 250px; font-size: 13px; }
  .pf-hero .shade { background: linear-gradient(0deg, var(--ink-0) 0%, rgba(4, 5, 7, 0.3) 22%, transparent 45%); }
  .pf-copy { position: relative; top: 0; margin-top: -22px; padding: 0 0 30px; transform: none !important; opacity: 1 !important; }
  .pf-id { gap: 14px; margin-top: 12px; }
  .pf-avatar { width: 56px; height: 56px; }
  .pf-name { font-size: clamp(34px, 10.5vw, 50px); }
  .pf-line { margin-top: 12px; font-size: 14px; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
  .pf-stat:nth-child(3) { border-left: 0; }
  .pf-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pf-stat b { font-size: 30px; }
  .pf-actions { margin-top: 20px; width: 100%; }
  .pf-actions .btn-primary { flex: 1 1 auto; }
  .pf-show-band { padding: 44px 0 40px; }
  .pf-show-head { margin-bottom: 20px; }
  .pf-heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pf-hc-body { gap: 6px; padding: 10px 12px 12px; }
  .pf-hc-body b { font-size: 15px; }
  .pf-marks { grid-template-columns: minmax(0, 1fr); margin-top: 30px; padding-top: 22px; }
  /* на телефоне знаки и вещи — чипами без пояснений (пояснение знака — в подсказке) */
  .pf-badges li { padding: 8px 12px; }
  .pf-badges li small, .pf-wear small { display: none; }
  .pf-badges svg { grid-row: auto; width: 20px; height: 20px; }
  .pf-more-band { padding: 30px 0 60px; }
  .pf-tiles { grid-template-columns: minmax(0, 1fr); }
  .pf-tile, .pf-tile:first-child, .pf-tile:last-child, .pf-tile:nth-child(3) { grid-column: auto; margin-top: 0; padding: 22px 0; }
  .pf-tile + .pf-tile { border-left: 0; border-top: 1px solid var(--line); }
  .pf-big b { font-size: 38px; }
  .pf-foot { gap: 14px 22px; margin-top: 10px; }

  .pe-card-body { gap: 9px; padding: 12px 14px 14px; }
  .pe-card-name { font-size: 20px; }
  .pe-card-id .avatar { width: 36px; height: 36px; }
  .pe-minis { gap: 5px; }
  .pe-slots { gap: 6px; }
  .pe-slot b { padding: 5px 6px; font-size: 11px; }
  .pe-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); max-height: 380px; }

  .st-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .st-nav { position: static; flex-flow: row wrap; gap: 6px; }
  .st-nav button { padding: 9px 13px; border: 1px solid var(--line-2); border-radius: 40px; font-size: 13px; }
  .st-row { padding: 16px; }
}

/* ---------------------------------------------------------------- команда Фидодрома (public/staff.js) */

/* цвет роли: Создатель — золото с огнём, Модератор — зелень, Поддержка — синева, Тестер — фиолет */
.staff-owner { --st-c: var(--gold-hi); --st-bg: rgba(214, 162, 63, 0.16); --st-line: rgba(241, 209, 138, 0.6); --st-ring: conic-gradient(#fff4c6, #d6a23f, #cf2f1c, #f1d18a, #fff4c6); --st-glow: rgba(241, 209, 138, 0.7); }
.staff-moderator { --st-c: #9be394; --st-bg: rgba(95, 191, 106, 0.14); --st-line: rgba(95, 191, 106, 0.6); --st-ring: conic-gradient(#e6ffe0, #5fbf6a, #1d451b, #8ad883, #e6ffe0); --st-glow: rgba(95, 191, 106, 0.7); }
.staff-support { --st-c: #9fd8ff; --st-bg: rgba(74, 163, 232, 0.14); --st-line: rgba(74, 163, 232, 0.6); --st-ring: conic-gradient(#e8f6ff, #4aa3e8, #163c66, #8ed2ff, #e8f6ff); --st-glow: rgba(74, 163, 232, 0.7); }
.staff-tester { --st-c: #d2b6f7; --st-bg: rgba(181, 140, 230, 0.15); --st-line: rgba(181, 140, 230, 0.6); --st-ring: conic-gradient(#f5ecff, #b58ce6, #3a2466, #d6c2f5, #f5ecff); --st-glow: rgba(181, 140, 230, 0.7); }
.staff-plaque {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; white-space: nowrap;
  border: 1px solid var(--st-line); border-radius: 40px; background: var(--st-bg); color: var(--st-c);
  font: 700 12.5px/1 var(--body); letter-spacing: 0.04em; box-shadow: 0 0 14px color-mix(in srgb, var(--st-glow) 35%, transparent);
}
.staff-plaque svg { width: 15px; height: 15px; }
.staff-tag { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--st-bg); border: 1px solid var(--st-line); color: var(--st-c); flex: none; }
.staff-tag svg { width: 12px; height: 12px; }
.pe-card-staff, .pf-mini-staff { display: flex; }

/* рамка аватара команды — главнее рамки пропуска; своя — и в шапке сайта (html[data-staff]) */
.avatar[data-staff], html[data-staff] .acct-btn .avatar { position: relative; }
.avatar[data-staff='owner'], html[data-staff='owner'] .acct-btn .avatar { --st-ring: conic-gradient(#fff4c6, #d6a23f, #cf2f1c, #f1d18a, #fff4c6); --st-glow: rgba(241, 209, 138, 0.7); }
.avatar[data-staff='moderator'], html[data-staff='moderator'] .acct-btn .avatar { --st-ring: conic-gradient(#e6ffe0, #5fbf6a, #1d451b, #8ad883, #e6ffe0); --st-glow: rgba(95, 191, 106, 0.7); }
.avatar[data-staff='support'], html[data-staff='support'] .acct-btn .avatar { --st-ring: conic-gradient(#e8f6ff, #4aa3e8, #163c66, #8ed2ff, #e8f6ff); --st-glow: rgba(74, 163, 232, 0.7); }
.avatar[data-staff='tester'], html[data-staff='tester'] .acct-btn .avatar { --st-ring: conic-gradient(#f5ecff, #b58ce6, #3a2466, #d6c2f5, #f5ecff); --st-glow: rgba(181, 140, 230, 0.7); }
.avatar[data-staff]::after, html[data-staff] .acct-btn .avatar::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; padding: 3px; pointer-events: none;
  background: var(--st-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: frame-spin 6s linear infinite;
  filter: drop-shadow(0 0 7px var(--st-glow));
}
/* второе тонкое кольцо — чтобы рамку команды не спутать с купленной */
.avatar[data-staff]::before {
  content: ''; position: absolute; inset: -11px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--st-glow) 80%, transparent);
  pointer-events: none; animation: frame-spin 24s linear infinite reverse;
}

/* раздел «Команда» в настройках */
.st-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.st-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.st-links .link-arrow svg.i:first-child { font-size: 17px; }
.st-links .link-arrow:hover svg.i { transform: none; }
.st-tester { margin-top: 16px; border-color: rgba(181, 140, 230, 0.35); background: linear-gradient(160deg, rgba(181, 140, 230, 0.08), transparent 55%), var(--panel-glass); }
.st-tester .st-label b { display: inline-flex; align-items: center; gap: 8px; color: #d2b6f7; }
.st-tester .st-label b svg { width: 18px; height: 18px; }
.tester-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tester-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 11px 0; }
.tester-list li + li { border-top: 1px solid var(--line); }
.tester-list li > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tester-list b { font: 600 14px/1.3 var(--body); color: var(--text); }
.tester-list small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.tester-list li.danger b { color: var(--bad-text); }
.tester-go { display: flex; align-items: center; gap: 8px; }
.tester-go input { width: 78px; padding: 7px 9px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- поддержка (public/support.js) */

.sup-card { width: min(100%, 560px); max-height: calc(100svh - 32px); overflow-y: auto; }
.sup-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; border: 0; }
.sup-topics .cchip { cursor: pointer; font-size: 13px; }
.sup-topics .cchip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sup-topics .cchip.on { background: rgba(214, 162, 63, 0.18); border-color: rgba(241, 209, 138, 0.7); color: var(--gold-hi); }
.sup-topics .cchip:has(input:focus-visible) { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.sup-card textarea, .sup-reply textarea { width: 100%; resize: vertical; min-height: 96px; line-height: 1.5; }
.sup-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sup-attach label.btn { cursor: pointer; }
.sup-files { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-files .chip .link { margin-left: 4px; padding: 0; font-size: 12px; text-decoration: none; }
.sup-context { color: var(--muted); font-size: 13px; }
.sup-context summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.sup-context ul { margin: 8px 0 6px; padding-left: 18px; display: grid; gap: 3px; }
.sup-legal { font-size: 12.5px; }
.sup-number { margin: 0; color: var(--text-2); }
.sup-number b { color: var(--gold-hi); }
.sup-say { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--cream); color: #2a2318; }
.sup-say p { margin: 0; font: 500 14.5px/1.45 var(--body); }
.sup-oops-head { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--art-head, none) center 70% / 118% no-repeat, radial-gradient(circle at 50% 30%, #2a303a, #14171c); border: 1px solid rgba(241, 209, 138, 0.5); }
.sup-oops-head.big { width: 84px; height: 84px; }
/* курьер предлагает написать: карточка в углу, над нижним меню телефона */
.sup-oops {
  position: fixed; z-index: 72; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: min(360px, calc(100vw - 24px));
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: start; padding: 14px 16px;
  border-radius: var(--radius); background: var(--cream); color: #2a2318; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: card-in 0.3s var(--ease);
}
.sup-oops p { margin: 0; font: 500 14.5px/1.45 var(--body); }
.sup-oops-actions { grid-column: 2; display: flex; align-items: center; gap: 14px; }
.sup-oops .link { color: #6a5530; }
/* на кремовом — тёмная кнопка: золотой текст на креме не читается */
.sup-oops .btn-gold { border-color: #2a2318; background: #2a2318; color: var(--gold-hi); }
.sup-oops .btn-gold:hover { background: #3a2f1f; color: #fff4d6; }
/* страница /support */
.sup-hero { display: flex; align-items: center; gap: 22px; margin-bottom: clamp(30px, 4vw, 48px); padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, rgba(214, 162, 63, 0.1), transparent 55%), var(--panel-glass); }
.sup-hero .lead { max-width: 46em; }
.sup-hero .cta-row { margin-top: 14px; }
.sup-mine { max-width: 880px; }
.sup-tickets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sup-ticket { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-glass); overflow: hidden; }
.sup-ticket.unread { border-color: rgba(241, 209, 138, 0.5); }
.sup-ticket-head {
  appearance: none; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 16px; cursor: pointer; text-align: left;
  border: 0; background: none; color: var(--text-2); font: inherit;
}
.sup-ticket-head:hover { background: rgba(243, 236, 218, 0.04); }
.sup-ticket-no { font: 700 13px/1 var(--body); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.sup-ticket-topic { font-weight: 600; color: var(--text); }
.sup-ticket-head time { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.sup-ticket-last { margin: -4px 16px 14px; color: var(--muted); font-size: 13.5px; }
.sup-status { padding: 3px 9px; border-radius: 40px; font: 600 11.5px/1.3 var(--body); letter-spacing: 0.04em; border: 1px solid var(--line-2); color: var(--text-2); }
.sup-status.s-new { border-color: rgba(241, 209, 138, 0.55); color: var(--gold-hi); }
.sup-status.s-open { border-color: rgba(74, 163, 232, 0.55); color: #9fd8ff; }
.sup-status.s-waiting { border-color: rgba(255, 106, 61, 0.55); color: var(--ember-2); }
.sup-status.s-solved { border-color: rgba(95, 191, 106, 0.55); color: var(--green-hi); }
.sup-new { padding: 3px 8px; border-radius: 40px; background: var(--ember); color: #fff; font: 700 11px/1.2 var(--body); }
.sup-thread { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.sup-msgs { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sup-msg { max-width: 88%; align-self: flex-end; padding: 10px 14px; border-radius: var(--radius); background: rgba(243, 236, 218, 0.06); border: 1px solid var(--line); }
.sup-msg.staff { align-self: flex-start; background: rgba(74, 163, 232, 0.08); border-color: rgba(74, 163, 232, 0.3); }
.sup-msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; font-size: 13px; }
.sup-msg-head b { color: var(--text); }
.sup-msg-head time { color: var(--muted); font-size: 12px; }
.sup-msg-head .staff-plaque { padding: 2px 8px 2px 6px; font-size: 11px; }
.sup-msg p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sup-pics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sup-pics img { display: block; width: 120px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line-2); }
.sup-reply { display: grid; gap: 10px; }

@media (max-width: 760px) {
  .sup-oops { right: 12px; left: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .sup-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .sup-hero .sup-oops-head.big { width: 60px; height: 60px; }
  .sup-msg { max-width: 100%; }
  .tester-go { width: 100%; }
}

/* ---------------------------------------------------------------- без движения: всё стоит на месте, сцена остаётся красивой */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] .reveal { opacity: 1; translate: none; }
  .layer, .hero-copy { transform: none !important; }
  .tile:hover, .company:hover, .match:hover, .btn:hover, .cchip:hover { transform: none; }
}

/* ---------------------------------------------------------------- «о себе» (public/about.js): вопрос курьера и Настройки */

.about-card { display: grid; gap: 14px; }
.about-g { margin: 0; }
.about-legend { margin-bottom: 8px; padding: 0; font: 600 12px/1.2 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.about-birth { margin: 0; }
.about-birth input { width: 100%; max-width: 240px; color-scheme: dark; }
.about-why { margin: 0; font-size: 13px; }
.about-ctl { display: grid; gap: 12px; justify-items: start; }
