/* ============================================================
   PromptFight :: дневной мультстадион
   тёплая комикс-бумага в полутон, чернильный тёмно-зелёный,
   оранжевый акцент; ринг с многослойным параллаксом.
   Сетка 4px · жёсткие офсет-тени · один easing.
   ============================================================ */

:root {
  --paper: #10141a;
  --paper-deep: #0c1015;
  --surface: #1a212b;
  --raised: #232c38;
  --ink: #eef1f5;
  --ink-soft: #b6bfcc;
  --muted: #8792a2;
  --line: rgba(182, 191, 204, .14);
  --line-strong: rgba(182, 191, 204, .28);
  --accent: #d6b36a;
  --accent-hover: #e3c483;
  --on-accent: #1c170d;
  --a: #8bd0c1; --a-soft: rgba(139, 208, 193, .10); --a-edge: rgba(139, 208, 193, .35);
  --b: #edb09b; --b-soft: rgba(237, 176, 155, .10); --b-edge: rgba(237, 176, 155, .35);
  --gold: #d6b36a; --gold-soft: rgba(214, 179, 106, .10); --gold-edge: rgba(214, 179, 106, .35);
  --red: #e08b82; --red-soft: rgba(224, 139, 130, .10); --red-edge: rgba(224, 139, 130, .35);
  --r-ctl: 8px; --r-card: 10px; --r-panel: 12px; --bw: 1px;
  --sh-ctl: 0 1px 2px rgba(0,0,0,.2);
  --sh-card: 0 8px 24px rgba(0,0,0,.18);
  --sh-panel: 0 16px 48px rgba(0,0,0,.24);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-size: 16px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: clip;
}

body {
  background: #10141a;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, .display {
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

main { flex: 1 0 auto; }

.lucide { flex: none; }

::selection { background: var(--accent); color: var(--on-accent); }

/* ============================================================
   ФОН СТРАНИЦ: настоящий зал суда (присланный концепт-фон).
   cover по центру — без растяжений, зазоров и тайлинга на любом экране.
   ============================================================ */
.court-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #2a2015;   /* запасной цвет кромки фона — никаких вспышек */
}
/* по умолчанию и на арене: комната с колоннами */
.court-bg,
.page-room .court-bg {
  background-image: url("/static/img/bg/room.webp");
}
/* главная: зал с витражами и скамьёй (перекрывает дефолт) */
.page-home .court-bg {
  background-image: url("/static/img/bg/main.webp");
}
/* затемнение поверх фото-фона: текст читается, но стены видны */
.court-bg::after { content: ""; position: absolute; inset: 0; background: rgba(12, 16, 22, .82); }

/* ============================================================
   ШАПКА
   ============================================================ */
.topbar {
  position: relative;
  z-index: 2;
  display: flex; align-items: center; gap: 12px;
  height: 58px;
  padding: 0 22px;
  background: #151a22;
  border-bottom: 1px solid #2b333f;
  max-width: 100%;
}
/* логотип без белой обводки — чистый гексагон на дереве */
.topbar .logo-mini {
  width: 36px; height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
.brand-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand-img { height: 30px; width: auto; display: block; }
.spacer { flex: 1 1 0; min-width: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  max-width: 100%;
  min-width: 0;
  box-shadow: 2px 2px 0 rgba(10, 7, 4, 0.85);
}
.chip.mono { font-family: ui-monospace, "Cascadia Code", monospace; font-weight: 700; }
.chip .lucide { width: 15px; height: 15px; color: var(--ink-soft); }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 2px 2px 0 rgba(10, 7, 4, 0.85);
  white-space: nowrap;
}
.badge .lucide { width: 14px; height: 14px; }
.badge.wait { color: var(--ink-soft); }
.badge.fight { color: var(--red); background: var(--red-soft);  }
.badge.fight .lucide { color: var(--red); }
.badge.judge { color: #f0c75e; background: var(--gold-soft); }
.badge.judge .lucide { color: #f0c75e; }
.badge.done { color: var(--a); background: var(--a-soft); }
.badge.done .lucide { color: var(--a); }
@keyframes badge-pulse {
  0%, 100% { transform: rotate(-1.5deg) scale(1); }
  50%      { transform: rotate(1.5deg) scale(1.04); }
}

/* ============================================================
   КНОПКИ — мультяшное нажатие
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 800;
  height: 42px;
  padding: 0 20px;
  font-size: 14.5px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: var(--sh-ctl);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease),
              background-color 0.12s var(--ease), color 0.12s var(--ease);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; }
.btn .lucide { width: 17px; height: 17px; }
.btn.big {
  height: 54px;
  padding: 0 30px;
  font-size: 17px;
  border-radius: 14px;
  box-shadow: none;
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.btn.big .lucide { width: 20px; height: 20px; }
.btn.big:hover { background: var(--accent-hover); }
.btn.big:active { transform: translateY(1px); }
.btn.ghost {
  background: var(--surface);
  color: var(--ink);
}
.btn.ghost:hover { background: #2a3442; }
.btn.small { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; box-shadow: none; }
.btn.small .lucide { width: 15px; height: 15px; }
.btn.danger { background: var(--red); color: #fff6f0; }
.btn.danger:hover { background: #ea674f; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 rgba(13,63,46,0.5); }

/* ============================================================
   ГЛАВНАЯ — витражный зал
   ============================================================ */
.home {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding: 46px 0 42px;
}
.hero-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 620px;
}
.hero-logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: hero-pop 0.6s var(--ease) both;
}
/* единый логотип главной: иконка + улыбки одним SVG (logo-hero.svg) */
.hero .logo-hero {
  display: block;
  width: min(320px, 72vw);
  height: auto;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.55));
}
.hero .logo {
  width: 104px;
  height: auto;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
}
.wordmark-img {
  display: block;
  width: min(330px, 74vw);
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}
.hero-tag-en {
  margin: 2px 0 0;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 3.5px;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  animation: rise-in 0.5s var(--ease) 0.1s both;
}
.hero-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 34rem;
  font-weight: 600;
  animation: rise-in 0.5s var(--ease) 0.14s both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: rise-in 0.5s var(--ease) 0.2s both;
}

/* --- витражные окна по бокам героя --- */
.sg-window {
  position: absolute;
  top: 34px;
  width: clamp(140px, 15vw, 220px);
  z-index: 0;
}
.sg-window.left  { left: clamp(0px, 2.5vw, 40px); }
.sg-window.right { right: clamp(0px, 2.5vw, 40px); }
/* тёплый ореол за окном */
.sg-window::before {
  content: "";
  position: absolute;
  inset: -60px -70px;
  background: radial-gradient(50% 46% at 50% 40%, rgba(255, 196, 110, 0.14) 0%, rgba(255, 196, 110, 0) 70%);
  pointer-events: none;
}
.sg-glass {
  position: relative;
  height: clamp(230px, 32vh, 330px);
  border: 9px solid #1c130a;
  border-top-width: 12px;
  border-radius: 999px 999px 12px 12px / 30% 30% 6% 6%;
  background:
    radial-gradient(85% 55% at 50% 20%, rgba(112, 232, 214, 0.45) 0%, rgba(112, 232, 214, 0) 58%),
    linear-gradient(165deg, #1f6070 0%, #17506b 28%, #24406f 52%, #3b3163 76%, #133246 100%);
  box-shadow:
    inset 0 0 0 3px rgba(12, 7, 3, 0.85),
    inset 0 0 46px rgba(2, 10, 14, 0.72),
    0 16px 34px rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* свинцовые перегородки витража */
.sg-glass::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent 47.2%, rgba(10, 6, 3, 0.85) 47.2% 52.8%, transparent 52.8%),
    linear-gradient(to bottom, transparent 31.5%, rgba(10, 6, 3, 0.85) 31.5% 34.5%, transparent 34.5%,
                    rgba(10, 6, 3, 0.85) 65%, rgba(10, 6, 3, 0.85) 67.5%, transparent 67.5%),
    linear-gradient(45deg, transparent 46.5%, rgba(10, 6, 3, 0.5) 46.5% 49.5%, transparent 49.5%),
    linear-gradient(-45deg, transparent 46.5%, rgba(10, 6, 3, 0.5) 46.5% 49.5%, transparent 49.5%);
}
.sg-glass .lucide {
  width: 46%; height: 46%;
  color: #ffc46b;
  opacity: 0.92;
  filter: drop-shadow(0 0 16px rgba(255, 196, 107, 0.55));
}
.sg-sill {
  height: 13px;
  margin-top: -2px;
  background: linear-gradient(180deg, #52391f 0%, #2a1d0f 100%);
  border: 3px solid #140d06;
  border-radius: 5px;
}

/* --- комикс-украшения вокруг окон --- */
.hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.h-bubble {
  position: absolute;
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
  color: #fdf7ea;
  background: #2f6fb3;
  border: 3px solid #1a130c;
  border-radius: 14px;
  padding: 9px 18px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  transform: rotate(3deg);
}
.h-bubble::after {
  content: "";
  position: absolute;
  left: 22px; bottom: -12px;
  width: 14px; height: 14px;
  background: inherit;
  border-right: 3px solid #1a130c;
  border-bottom: 3px solid #1a130c;
  transform: rotate(45deg);
}
.bb-obj { right: clamp(6px, 4vw, 70px); top: 25%; }
.h-burst { position: absolute; left: clamp(6px, 7vw, 130px); bottom: 20%; width: clamp(88px, 9vw, 130px); transform: rotate(-6deg); }
.h-burst svg { display: block; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.45)); }
.h-badge {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  color: #ffd98a;
  background: linear-gradient(180deg, #6b4a2c, #4a3320);
  border: 2.5px solid #f2c744;
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
}
.h-badge .lucide { width: 17px; height: 17px; color: #f2c744; }
.bb-logic { right: clamp(8px, 9vw, 170px); bottom: 5%; }
.h-clock {
  position: absolute;
  right: clamp(4px, 3vw, 60px);
  top: 14%;
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 4px solid #d8c9a5;
  background: radial-gradient(circle at 34% 30%, #3f2f1c, #241a0e 75%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55), inset 0 0 14px rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
}
.h-clock .lucide { width: 32px; height: 32px; color: #e8d9b0; }

/* === выбор зала суда при создании === */
.bg-pick {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  animation: rise-in 0.5s var(--ease) 0.22s both;
}
.bg-pick-lbl {
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700; font-size: 13.5px;
  color: var(--ink-soft);
  letter-spacing: 0.4px;
}
.bg-opt {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: rgba(18, 12, 6, 0.72);
  border: 3px solid #1a130c;
  outline: 2px solid rgba(242, 230, 200, 0.22);
  border-radius: 12px;
  padding: 5px 5px 4px;
  cursor: pointer;
  transition: all .15s var(--ease);
  width: 112px;
}
.bg-opt img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  border: 2px solid rgba(242, 230, 200, 0.25);
  display: block;
}
.bg-opt span {
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700; font-size: 11.5px;
  color: var(--ink-soft);
}
.bg-opt:hover { border-color: var(--gold); transform: translateY(-2px); }
.bg-opt.sel {
  border-color: #1a130c;
  outline-color: var(--gold);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
}
.bg-opt.sel span { color: var(--gold); }
.bg-opt.sel img { border-color: var(--gold); }
@keyframes hero-pop {
  0%   { transform: scale(0.4) rotate(-8deg); opacity: 0; }
  70%  { transform: scale(1.12) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* стикеры под кнопкой — дощечки на стене */
.stick-row {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  animation: rise-in 0.5s var(--ease) 0.26s both;
}
.stick {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  background: rgba(24, 16, 9, 0.8);
  border: 2px solid rgba(242, 230, 200, 0.4);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: 2.5px 2.5px 0 rgba(0, 0, 0, 0.45);
}
.stick .lucide { width: 15px; height: 15px; color: var(--gold); }
.stick:nth-child(1) { transform: rotate(-2deg); }
.stick:nth-child(2) { transform: rotate(1.5deg); }
.stick:nth-child(3) { transform: rotate(-1deg); }

/* === билет на арену === */
.result-card {
  position: relative;
  background: rgba(30, 21, 12, 0.92);
  border: 3px solid #1a130c;
  outline: 2px solid rgba(242, 230, 200, 0.28);
  border-radius: var(--r-card);
  padding: 0;
  display: flex; flex-direction: column; align-items: stretch;
  max-width: 560px; width: 100%;
  margin: 26px auto 0;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
  transform: rotate(-0.6deg);
  animation: ticket-in 0.45s var(--ease) both;
  overflow: hidden;
}
@keyframes ticket-in {
  0%   { transform: rotate(-0.6deg) translateY(18px) scale(0.96); opacity: 0; }
  60%  { transform: rotate(-0.6deg) translateY(-4px) scale(1.01); opacity: 1; }
  100% { transform: rotate(-0.6deg) translateY(0) scale(1); }
}
.ticket-strip {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--gold);
  border-bottom: var(--bw) solid var(--ink);
  padding: 10px 16px;
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: var(--ink);
}
.ticket-strip .lucide { width: 18px; height: 18px; }
.ticket-body {
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  padding: 20px 24px 22px;
  position: relative;
}
/* пробитые отверстия по углам отрыва */
.ticket-body::before,
.ticket-body::after {
  content: "";
  position: absolute;
  top: -15px;
  width: 26px; height: 26px;
  background: #241a0f;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
}
.ticket-body::before { left: -16px; }
.ticket-body::after  { right: -16px; }
.result-card .arena-id {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 21px;
  letter-spacing: 4px;
  color: var(--ink);
  background: var(--paper);
  border: 2px dashed var(--line-strong);
  padding: 12px 24px;
  border-radius: 12px;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.hint { color: var(--muted); font-size: 13.5px; text-align: center; margin: 0; line-height: 1.5; font-weight: 600; }

/* ============================================================
   КРИМИНАЛЬНАЯ ЛЕНТА — одна на всю ширину, бегущая строка.
   Анимацию ведёт JS (main.js): requestAnimationFrame работает
   на всех системах, включая те, где включён «уменьшить движение».
   ============================================================ */
.crime-tape {
  position: relative;
  z-index: 1;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background:
    repeating-linear-gradient(-45deg,
      rgba(20, 14, 6, 0.14) 0 14px, transparent 14px 28px),
    linear-gradient(180deg, #f7cd4d 0%, #eab736 100%);
  border-top: 3.5px solid #1a130c;
  border-bottom: 3.5px solid #1a130c;
  transform: rotate(-1.2deg) scale(1.02);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.tape-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: tape-scroll 30s linear infinite;
}
.tape-track span {
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  color: #17110a;
  padding: 9px 0;
  white-space: nowrap;
}
.tape-track span i {
  font-style: normal;
  color: rgba(23, 17, 10, 0.55);
  padding: 0 18px;
}
@keyframes tape-scroll {
  to { transform: translateX(-50%); }
}

/* ============================================================
   ПРЕВЬЮ БОЯ
   ============================================================ */
.preview { padding: 30px 0 26px; }
.preview-caption {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink-soft);
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.6px;
  margin: 0 0 18px;
}
.preview-caption::before,
.preview-caption::after { content: ""; height: 2.5px; background: rgba(242, 230, 200, 0.45); border-radius: 2px; flex: 1; opacity: 0.6; }

.preview-arena {
  position: relative;
  background: rgba(26, 18, 10, 0.82);
  border: 3px solid #1a130c;
  outline: 2px solid rgba(242, 230, 200, 0.22);
  border-radius: var(--r-panel);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.45);
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 110px 1fr;
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
}
/* зал суда за спором — настоящий фон игры */
.preview-arena::before {
  content: "";
  position: absolute; inset: 0;
  background: url("/static/img/bg/classic/witnessempty.jpg") center / cover no-repeat;
  opacity: 0.13;
  pointer-events: none;
}
.preview-arena > * { position: relative; z-index: 1; }
.preview-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.preview-corner {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.preview-corner .dot { width: 10px; height: 10px; border-radius: 4px; border: 1.5px solid var(--ink); }
.preview-side.pa .preview-corner { color: var(--a); }
.preview-side.pb .preview-corner { color: #e06f1f; }
.preview-side.pa .dot { background: var(--a); }
.preview-side.pb .dot { background: var(--accent); }

.bubble {
  position: relative;
  background: rgba(38, 28, 17, 0.92);
  border: 2px solid rgba(242, 230, 200, 0.65);
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  animation: rise-in 0.3s var(--ease) both;
}
/* хвостик пузыря */
.side .bubble::after,
.preview-side .bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  width: 13px; height: 13px;
  background: inherit;
  border-right: 2px solid rgba(242, 230, 200, 0.65);
  border-bottom: 2px solid rgba(242, 230, 200, 0.65);
  transform: rotate(45deg);
}
.side.A .bubble::after, .preview-side.pa .bubble::after { left: 20px; }
.side.B .bubble::after, .preview-side.pb .bubble::after { right: 20px; }
.side.A .bubble, .preview-side.pa .bubble { background: rgba(35, 78, 56, 0.88); }
.side.B .bubble, .preview-side.pb .bubble { background: rgba(92, 48, 18, 0.88); }

.bubble .who {
  font-weight: 800;
  font-size: 12.5px;
  display: block;
  margin-bottom: 3px;
}
.side.A .bubble .who, .preview-side.pa .bubble .who { color: var(--a); }
.side.B .bubble .who, .preview-side.pb .bubble .who { color: #e06f1f; }
.bubble .round-pip {
  float: right;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 11px;
  color: var(--ink-soft);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  padding: 1px 7px;
  border-radius: 6px;
}

.preview-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.vs-burst {
  width: 96px; height: 90px;
  display: block;
  animation: vs-wobble 5.5s ease-in-out infinite alternate;
  filter: drop-shadow(3.5px 3.5px 0 rgba(10, 7, 4, 0.9));
}
.vs-burst.small { width: 64px; height: 60px; animation: none; }
@keyframes vs-wobble {
  from { transform: rotate(-5deg) scale(1); }
  50%  { transform: rotate(3deg) scale(1.06); }
  to   { transform: rotate(-2deg) scale(1); }
}
.pip-hex-row { display: flex; gap: 7px; align-items: center; }

.hex {
  width: 20px; height: 22px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: rgba(242, 230, 200, 0.28);
  position: relative;
}
.hex.pip-hex::after {
  content: "";
  position: absolute; inset: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--raised);
  transform: scale(0.78);
}
.hex.pip-hex.on { background: var(--accent); }
.hex.pip-hex.on::after { background: var(--accent); }
.pip-hex-row .hex { width: 20px; height: 22px; }

.round-pips {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.round-pips .lbl {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-right: 4px;
}
.preview-turn {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(10, 7, 4, 0.85);
}
.preview-turn b { color: #e06f1f; font-weight: 700; }

/* ============================================================
   ФУТЕР — узкая лента под стеной
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 9px 24px 11px;
  text-align: center;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.45;
  background: rgba(18, 12, 7, 0.9);
  border-top: 2.5px solid rgba(242, 230, 200, 0.18);
}
.footer .lucide { width: 13px; height: 13px; vertical-align: -2px; }

/* ============================================================
   АРЕНА (комната)
   ============================================================ */
.arena-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 26px 24px;
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}
.arena {
  display: grid;
  grid-template-columns: 1fr 320px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1020px) {
  .arena { grid-template-columns: 1fr; }
  .center-col { order: -1; }
}

.arena > * { animation: rise-in 0.45s var(--ease) both; }
.arena > *:nth-child(2) { animation-delay: 0.06s; }
.arena > *:nth-child(3) { animation-delay: 0.12s; }

.side {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  display: flex; flex-direction: column;
  min-height: 420px;
  overflow: visible;
}
.side.A { transform: rotate(-0.35deg); }
.side.B { transform: rotate(0.35deg); }
.side-head {
  padding: 16px;
  border-bottom: 2px solid var(--ink);
  display: flex; gap: 12px; align-items: center;
  border-radius: var(--r-panel) var(--r-panel) 0 0;
}
.side.A .side-head { background: var(--a-soft); }
.side.B .side-head { background: var(--b-soft); }
.avatar {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 2px 2px 0 rgba(10, 7, 4, 0.85);
}
.avatar .lucide { width: 22px; height: 22px; }
.side.A .avatar { color: var(--a); transform: rotate(-4deg); }
.side.B .avatar { color: #e06f1f; transform: rotate(4deg); }
.side-name { font-weight: 800; font-size: 15px; word-break: break-word; color: var(--ink); }
.side-owner { color: var(--muted); font-size: 12.5px; margin-top: 1px; font-weight: 700; }
.side-pos {
  margin: 14px 16px 0;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.side-pos .lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.side-state { margin: 10px 16px 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-state .st {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.side-state .st .lucide { width: 15px; height: 15px; }
.side-state .st.ok { color: var(--a); }
.side-state .st.off { color: var(--muted); }

.feed {
  padding: 14px 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
  max-height: 52vh; overflow-y: auto;
}

.empty-side {
  flex: 1; margin: 16px;
  border: 2.5px dashed var(--line-strong);
  border-radius: var(--r-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 32px 16px; text-align: center;
}
.empty-side .lucide { width: 34px; height: 34px; color: var(--muted); }
.empty-side .t { color: var(--muted); font-size: 14px; font-weight: 700; }

/* --- центральная колонка ---------------------------------------------------- */
.center-col { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
@media (max-width: 1020px) { .center-col { position: static; } }

.center-vs {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding-top: 6px;
}
.turn-box {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(10, 7, 4, 0.85);
  padding: 12px 16px;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-soft);
  width: 100%;
}
.turn-box .lucide { width: 17px; height: 17px; color: var(--muted); }
.turn-box .turn-A { color: var(--a); }
.turn-box .turn-B { color: #e06f1f; }

.cards { display: flex; flex-direction: column; gap: 10px; }
.card-ev {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(10, 7, 4, 0.55);
  padding: 13px 15px;
  text-align: center;
  animation: rise-in 0.35s var(--ease) both;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.card-ev .lucide { width: 18px; height: 18px; color: var(--ink-soft); display: block; margin: 0 auto 6px; }
.card-ev .head { font-weight: 800; }
.card-ev.mini { box-shadow: 2px 2px 0 rgba(10, 7, 4, 0.4); }
.card-ev.big {
  border-color: var(--ink);
  background: var(--gold-soft);
  border-width: 2.5px;
  box-shadow: 4px 4px 0 rgba(10, 7, 4, 0.85);
}
.card-ev.big .lucide { color: #f0c75e; }
.card-ev.big .head { font-size: 16px; color: #f0c75e; }
.card-ev.danger { border-color: var(--red); background: var(--red-soft); }
.card-ev.danger .lucide { color: var(--red); }
.card-ev.danger .head { color: var(--red); }
.card-ev.good .lucide { color: var(--a); }
.card-ev.good .head { color: var(--a); }
.card-ev.orange-hl { border-color: #e06f1f; background: var(--b-soft); }
.card-ev.orange-hl .lucide { color: #e06f1f; }
.card-ev.orange-hl .head { color: #e06f1f; }
.card-ev .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.card-ev .qtext {
  margin-top: 10px; text-align: left;
  white-space: pre-wrap; word-break: break-word;
  background: var(--paper);
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.card-ev .mini { font-size: 12.5px; color: var(--muted); }

.answer-box {
  background: var(--surface);
  border: 2.5px solid var(--gold);
  border-radius: var(--r-card);
  box-shadow: 4px 4px 0 rgba(202, 141, 8, 0.55);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.answer-box .head {
  font-weight: 800;
  color: #f0c75e;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px;
}
.answer-box .head .lucide { width: 16px; height: 16px; }
.answer-box .head .spacer { flex: 1; }
.keycap {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 2px 9px;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.answer-box textarea, .answer-box input {
  width: 100%;
  background: var(--raised);
  color: var(--ink);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-ctl);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
}
.answer-box textarea { min-height: 70px; resize: vertical; }
.answer-box input:focus, .answer-box textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.verdict-card {
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-top: 10px solid var(--gold);
  border-radius: var(--r-panel);
  box-shadow: 5px 5px 0 rgba(10, 7, 4, 0.9);
  padding: 20px;
  text-align: center;
  animation: ticket-in 0.45s var(--ease) both;
}
.verdict-card .vt {
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
}
.verdict-card .vr { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin-top: 8px; white-space: pre-wrap; font-weight: 600; }
.verdict-card .meta { color: var(--muted); font-size: 12.5px; margin-top: 12px; font-family: ui-monospace, "Cascadia Code", monospace; }

/* ============================================================
   МОДАЛКА
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 7, 4, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  width: min(640px, 100%);
  max-height: 92vh; overflow-y: auto;
  padding: 24px;

}
@keyframes modal-in {
  0%   { transform: translateY(26px) scale(0.94) rotate(-1deg); opacity: 0; }
  100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
}
.modal h3 {
  font-size: 21px;
  display: flex; gap: 10px; align-items: center;
}
.modal h3 .lucide { width: 22px; height: 22px; color: var(--accent); }
.modal .field { margin-top: 16px; }
.modal label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.modal input[type="text"], .modal textarea {
  width: 100%;
  background: var(--raised);
  color: var(--ink);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-ctl);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 12px;
}
.modal textarea { min-height: 74px; resize: vertical; }
.modal input:focus, .modal textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.counter {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-weight: 700;
}
.counter.over { color: var(--red); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.warn {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--red-soft);
  border: 2px solid var(--red);
  color: #ffb4a6;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 600;
  margin-top: 16px;
}
.warn .lucide { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--red); }

.token-box {
  display: flex; gap: 8px; align-items: stretch;
  background: var(--paper);
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
}
.token-box code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffb26b;
  word-break: break-all;
  flex: 1;
  align-self: center;
}
pre.prompt-box {
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-soft);
  font-family: ui-monospace, "Cascadia Code", monospace;
  max-height: 300px; overflow-y: auto;
  margin: 0;
}
.links-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.links-list a {
  color: #ffb26b;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 12.5px;
  font-weight: 700;
  word-break: break-all;
}
.links-list a:hover { text-decoration: underline; }

/* ============================================================
   ТОСТЫ
   ============================================================ */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px);
  background: #232c38;
  color: #eef1f5;
  border: 1px solid #465163;
  outline: 2px solid rgba(0, 0, 0, 0.45);
  outline-offset: -5px;
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(10, 7, 4, 0.4);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 90; pointer-events: none;
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* скроллбары */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(10, 7, 4, 0.35); border-radius: 99px; border: 2px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

@keyframes rise-in {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ============================================================
   МОБИЛЬНАЯ ВЁРСТКА
   ============================================================ */
@media (max-width: 900px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 12px;
  }
  .topbar .logo-mini { width: 32px; height: 32px; border-radius: 8px; }
  .brand-img { height: 26px; }
  .topbar .chip { order: 3; flex: 1 1 100%; justify-content: center; height: 32px; font-size: 12.5px; }
  .topbar .chip.mono { letter-spacing: 1px; }
  .topbar #copy-room { order: 4; }
  .topbar .badge { order: 5; margin-left: 0; }
  .topbar .spacer { display: flex; }

  .sg-window { top: 10px; }
  .sg-glass { height: clamp(180px, 24vh, 240px); }
  .hero-deco { display: none; }
  .h-clock { display: none; }
  .bg-bench { width: 130vw; }

  .arena-wrap { padding: 14px 10px 20px; }
  .side { min-height: 300px; transform: none; }
  .feed { max-height: 44vh; padding: 10px 12px 14px; }
  .side-head { padding: 12px; gap: 10px; }
  .side-pos { margin: 10px 12px 0; }
  .side-state { margin: 8px 12px 0; }

  .hero { min-height: auto; padding: 44px 0 40px; gap: 18px; }
  .hero .logo { width: 88px; }
  .hero-sub { font-size: 15.5px; }
  .hero-tag-en { font-size: 11px; letter-spacing: 2.5px; }
  .btn.big { height: 50px; font-size: 15.5px; padding: 0 22px; }

  .preview-arena { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  .preview-center { padding: 6px 0; flex-direction: row; justify-content: center; gap: 16px; }
  .vs-burst { width: 72px; height: 68px; }

  .modal { padding: 16px; }
  .card-ev { padding: 11px 12px; }
  .answer-box { padding: 12px; }
  .tape-track span { font-size: 13px; }
  .crime-tape { transform: rotate(-1deg) scale(1.03); }
}

@media (max-width: 480px) {
  .topbar .chip { font-size: 12px; }
  .topbar .chip.mono { letter-spacing: 0.5px; }
  .topbar .chip .lucide { width: 13px; height: 13px; }
  .badge { font-size: 12px; padding: 0 9px; gap: 5px; }
  .btn { font-size: 14px; padding: 0 14px; }
  .btn.small { font-size: 13px; padding: 0 10px; }
  .btn.big { font-size: 15px; padding: 0 18px; }
  .turn-box { font-size: 14px; padding: 10px 12px; }
  .answer-box input, .answer-box textarea,
  .modal input[type="text"], .modal textarea { font-size: 16px; }
  .result-card .arena-id { font-size: 16px; letter-spacing: 2px; }
  .stick { font-size: 12.5px; padding: 6px 11px; }
  .home { padding: 0 16px; }
}

/* ---------- Редизайн главной: продукт, а не коллаж ---------- */
.page-home .home { max-width: 1040px; padding: 0 28px; }
.page-home .hero { min-height: auto; padding: 72px 0 48px; align-items: stretch; text-align: left; }
.page-home .hero-core { align-items: flex-start; max-width: 680px; gap: 18px; }
.page-home .hero-logos { flex-direction: row; gap: 12px; animation: none; }
.page-home .hero .logo-hero { width: min(260px, 64vw); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5)); }
.hero-eyebrow { margin: 14px 0 0; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-title { margin: 0; font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; max-width: 14ch; }
.page-home .hero-sub { font-size: 17px; line-height: 1.65; max-width: 54ch; animation: none; }
.page-home .hero-actions { justify-content: flex-start; animation: none; margin-top: 6px; }
.page-home .bg-pick { justify-content: flex-start; animation: none; margin-top: 8px; }
.page-home .bg-opt { width: 132px; background: var(--surface); border: 1px solid var(--line-strong); outline: none; border-radius: 8px; padding: 6px; box-shadow: none; }
.page-home .bg-opt img { border: none; border-radius: 4px; }
.page-home .bg-opt.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.page-home .bg-opt:hover { transform: none; }
.page-home .stick-row { justify-content: flex-start; animation: none; gap: 18px; margin-top: 10px; }
.page-home .stick { background: none; border: none; box-shadow: none; padding: 0; transform: none !important; color: var(--muted); font-size: 12px; font-weight: 500; }
.page-home .result-card { transform: none; animation: none; border: 1px solid var(--line-strong); box-shadow: var(--sh-card); margin: 18px 0 0; }
.page-home .ticket-strip { background: var(--gold-soft); color: var(--gold); border-bottom: 1px solid var(--gold-edge); font-size: 12px; letter-spacing: .08em; justify-content: flex-start; }
.page-home .ticket-body { align-items: flex-start; }
.page-home .ticket-body::before, .page-home .ticket-body::after { display: none; }
.page-home .preview { padding: 24px 0 64px; }
.page-home .preview-caption { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.page-home .preview-caption::before, .page-home .preview-caption::after { display: none; }
.page-home .preview-arena { background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--sh-card); padding: 24px; grid-template-columns: 1fr 64px 1fr; }
.page-home .preview-arena::before { display: none; }
.page-home .bubble { background: var(--raised); border: 1px solid var(--line-strong); box-shadow: none; border-radius: 8px; animation: none; font-size: 13.5px; }
.page-home .preview-side.pa .bubble { background: #1e2e2c; }
.page-home .preview-side.pb .bubble { background: #302723; }
.page-home .bubble::after { display: none; }
.page-home .vs-burst { display: none; }
.page-home .preview-center::before { content: "VS"; color: var(--muted); font-weight: 800; font-size: 18px; }
.page-home .preview-turn { border: 1px solid var(--line-strong); box-shadow: none; background: var(--paper); font-size: 11px; }
.page-home .footer { background: #151a22; border-top: 1px solid #2b333f; }
@media (max-width: 700px) {
  .page-home .home { padding: 0 18px; }
  .page-home .hero { padding: 44px 0 32px; }
  .page-home .preview-arena { grid-template-columns: 1fr; }
  .page-home .preview-center { flex-direction: row; }
  .hero-title { font-size: 38px; }
}

.page-home .hero-sub, .page-home .bubble { font-weight: 400; }
