/* ============================================================
   Тема «Лига» — вариант редизайна (ветка design-league, 27.10.2026).
   Ориентир — фирменный стиль большой хоккейной лиги: почти чёрный
   фон арены, серебро и белый, один сигнальный красный (лампа гола),
   сжатый спортивный шрифт заглавными, срезанные углы как у щита,
   табло с крупными цифрами. Чужих логотипов и названий нет.
   Подключается после style.css и переопределяет токены и компоненты.
   ============================================================ */

:root {
  --ink: #050607;
  --bg: #0c0e11;
  --bg-2: #08090b;
  --surface: #15181d;
  --surface-2: #1c2026;
  --line: #2e343c;

  --silver: #a8b0b5;
  --silver-hi: #d9dee2;
  --red: #e4002b;          /* лампа гола: главные кнопки и акценты */
  --red-deep: #8f001b;
  --gold: #d8b45a;         /* очки и легенды */
  --ice: #5bc2ff;          /* эпик */
  --green: #19c37d;
  --green-deep: #0c7a4c;
  --amber: var(--gold);
  --amber-deep: #8a6d22;

  --text: #f5f7f8;
  --muted: #a8b0b5;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --cut: 12px;             /* срез угла */

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Oswald', 'Arial Narrow', 'Roboto Condensed', sans-serif;
}

body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035) 0 1px, transparent 1px) 0 0 / 100% 84px,
    radial-gradient(700px 380px at 50% -10%, #1d232b 0%, transparent 70%),
    var(--bg);
  font-size: 16px;
}

/* Срезанный угол — главный «щитовой» мотив */
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }

/* ===================== Шапка ===================== */
header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #111419, #0c0e11);
  padding-bottom: 10px;
}
.badge {
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--silver);
}
h1 {
  font-family: var(--display);
  font-size: 20px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
#status { font-size: 13px; color: var(--silver); letter-spacing: .02em; }
.hchip {
  font-family: var(--display);
  font-size: 16px; font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
}

/* ===================== Кнопки ===================== */
.btn {
  font-family: var(--display);
  font-size: 19px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  border-radius: 4px;
  padding: 16px 18px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: inset 0 -4px 0 var(--red-deep);
}
.btn-primary:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--red-deep); }
.btn-green { background: var(--green); color: #fff; box-shadow: inset 0 -4px 0 var(--green-deep); }
.btn-ghost {
  background: transparent; color: var(--silver-hi);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

/* ===================== Главный экран игры: «матч дня» ===================== */
.match {
  background: linear-gradient(160deg, #1a1e24, #121519);
  border: 1px solid var(--line);
  border-radius: 6px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
}
.match::before { /* красная полоса как у формы */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--red);
}
.match-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 700; color: var(--silver);
  text-transform: uppercase; letter-spacing: .12em;
}
.match-body { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.match-body .hero-wolf { width: 118px; height: 118px; animation: none; flex-shrink: 0; }
.match-rank {
  font-family: var(--display); font-weight: 700;
  font-size: 30px; line-height: 1.02; text-transform: uppercase; letter-spacing: .01em;
}
.match-say { color: var(--silver-hi); font-size: 15px; margin-top: 6px; line-height: 1.35; }

/* табло: три ячейки с крупными цифрами */
.board {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg-2);
}
.board > div { padding: 9px 6px 8px; text-align: center; }
.board > div + div { border-left: 1px solid var(--line); }
.board b {
  display: block;
  font-family: var(--display); font-weight: 600;
  font-size: 30px; line-height: 1; letter-spacing: .02em;
}
.board span { font-size: 12px; color: var(--silver); text-transform: uppercase; letter-spacing: .1em; }
.board .gold { color: var(--gold); }
.board .hot { color: var(--red); }

.xp-bar {
  height: 8px; border-radius: 2px;
  background: var(--bg-2); border: 1px solid var(--line);
}
.xp-fill { background: linear-gradient(90deg, var(--silver), #fff); border-radius: 1px; }
.xp-label { color: var(--silver-hi); font-size: 14px; }
.next-up { margin-top: 12px; }
.next-up .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--silver-hi); margin-bottom: 6px; }
.next-up .row b { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--text); letter-spacing: .03em; }

/* энергия = периоды матча */
.periods { display: flex; gap: 6px; margin-top: 14px; }
.periods i {
  flex: 1; height: 34px; display: grid; place-items: center;
  font-style: normal; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .08em;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; color: var(--text);
}
.periods i.spent { background: transparent; color: #4a525c; border-style: dashed; }
.periods-cap { font-size: 13px; color: var(--silver); margin-top: 6px; text-align: center; }

.sec-label {
  font-family: var(--display); font-weight: 600;
  font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--silver); margin: 22px 0 10px;
  display: flex; align-items: center; gap: 10px;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.cat-grid { gap: 8px; }
.cat-btn {
  font-family: var(--display); font-weight: 600;
  font-size: 16px; text-transform: uppercase; letter-spacing: .05em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  color: var(--text); box-shadow: none;
  padding: 14px 6px;
}
.cat-btn .ci { font-size: 26px; }
.cat-btn:active { background: var(--surface-2); transform: translateY(1px); }

/* завтрашний тизер — повод вернуться */
.tomorrow {
  margin-top: 14px;
  border: 1px dashed var(--silver); border-radius: 4px;
  padding: 12px 14px; display: flex; gap: 12px; align-items: center;
  background: rgba(216, 180, 90, .06);
}
.tomorrow .t-ico { font-size: 28px; }
.tomorrow b { font-family: var(--display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 15px; display: block; }
.tomorrow span { font-size: 14px; color: var(--silver-hi); }

/* ===================== Раунд ===================== */
.q-progress { height: 8px; border-radius: 2px; background: var(--surface-2); }
.q-progress-fill { background: var(--red); border-radius: 2px; }
.q-counter { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--silver-hi); }
.q-text { font-size: 20px; font-weight: 700; line-height: 1.32; }
.opt {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
  font-size: 16.5px; padding: 15px 14px;
}
.opt .key {
  font-family: var(--display); font-weight: 600;
  border-radius: 3px; background: var(--surface-2); color: var(--silver-hi);
}
.opt:active:not(:disabled) { background: var(--surface-2); }
.opt.right { background: rgba(25, 195, 125, .14); border-color: var(--green); }
.opt.right .key { background: var(--green); color: #fff; }
.opt.wrong { background: rgba(228, 0, 43, .14); border-color: var(--red); }
.opt.wrong .key { background: var(--red); color: #fff; }

#sheet { border-radius: 8px 8px 0 0; }
#sheet.ok { background: #0f2a1f; border-top: 4px solid var(--green); }
#sheet.no { background: #2a0f15; border-top: 4px solid var(--red); }
.sheet-title { font-family: var(--display); font-weight: 600; font-size: 24px; text-transform: uppercase; letter-spacing: .03em; }
.sheet-text { font-size: 15.5px; }

.score-big { font-family: var(--display); font-weight: 700; font-size: 68px; letter-spacing: .02em; }
.xp-gain { font-family: var(--display); color: var(--gold); font-size: 22px; letter-spacing: .04em; }
.award {
  border-radius: 4px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  font-size: 15px;
}
.award.levelup { border-left-color: var(--red); }
.cheer { color: var(--silver-hi); font-size: 15.5px; }

/* ===================== Альбом: карточки как спортивные ===================== */
.sec-h { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 20px; }
.hint { font-size: 14px; color: var(--silver); }
.abadge { border-radius: 4px; background: var(--surface); border: 1px solid var(--line); }
.abadge.locked { opacity: .55; }
.b-name { font-size: 13px; }

.card-grid { gap: 10px; }
.gcard {
  --rar: var(--silver);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-top: 5px solid var(--rar);
  border-radius: 4px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  box-shadow: none;
  padding: 10px 8px 10px;
  position: relative;
}
.gcard.epic { --rar: var(--ice); }
.gcard.legend { --rar: var(--gold); }
.gcard .mono {
  font-family: var(--display); font-weight: 700;
  font-size: 34px; line-height: 1; letter-spacing: .02em;
  color: var(--rar); margin: 4px 0 6px;
}
.g-name { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.g-rar { font-size: 11.5px; color: var(--silver); text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.gcard.locked { border-top-color: var(--line); }
.gcard.locked .mono { color: #3a414a; }
.album-bar { border-radius: 2px; background: var(--surface-2); }
.album-fill { background: var(--gold); border-radius: 2px; }

.modal-card { border-radius: 6px; border-top: 6px solid var(--silver); background: var(--surface); }
.modal-card.epic { border-top-color: var(--ice); }
.modal-card.legend { border-top-color: var(--gold); }
.modal-card h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 26px; }

/* ===================== Легенды ===================== */
.legend-card { border-radius: 4px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); }
.legend-title { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 24px; line-height: 1.12; }
.legend-text { font-size: 16.5px; line-height: 1.55; }
.legend-tag { border-radius: 3px; font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; }

/* ===================== Чат ===================== */
.msg.coach { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; }
.msg.me { background: var(--silver-hi); color: #0c0e11; border-radius: 12px 4px 12px 12px; }
.chip {
  font-family: var(--display); font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 3px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 14px;
}
#inp { border-radius: 4px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; }
#send, #mic { border-radius: 4px; }
#send { background: var(--red); }

/* ===================== Нижнее меню ===================== */
#nav { background: rgba(8, 9, 11, .96); border-top: 1px solid var(--line); }
.nav-btn span {
  font-family: var(--display); font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: .1em;
}
.nav-btn.active { color: #fff; }
.nav-btn.active::before { background: var(--red); height: 3px; left: 18%; right: 18%; border-radius: 0; }

/* ===================== PIN ===================== */
.pin-title { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; }
.pin-key { border-radius: 4px; background: var(--surface); border: 1px solid var(--line); font-family: var(--display); font-weight: 600; box-shadow: none; }
.pin-dots span.on { background: var(--red); border-color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .hero-wolf { animation: none; }
}

/* без горизонтальной прокрутки: срезанные углы и сетки не вылезают за край */
.scroll-area { overflow-x: hidden; }
/* лист разбора ниже — чтобы были видны варианты и выбранный ответ */
#sheet { padding-top: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.sheet-wolf { width: 54px; height: 54px; }
.sheet-head { gap: 10px; margin-bottom: 6px; }
.sheet-title { font-size: 21px; }
#sheet .sheet-text { font-size: 15px; line-height: 1.4; }
#sheet .btn { margin-top: 10px; padding: 14px; }

/* ===================== Сундук дня ===================== */
.chest {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-top: 12px; padding: 12px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 4px;
  font: inherit; text-align: left;
}
.chest b {
  display: block; font-family: var(--display); font-weight: 600;
  font-size: 18px; text-transform: uppercase; letter-spacing: .05em;
}
.chest span { display: block; font-size: 14px; color: var(--silver-hi); line-height: 1.35; }
.chest .chest-goal { margin: 3px 0; color: var(--text); }
.chest-svg { width: 64px; height: 54px; flex-shrink: 0; }
.chest.locked .chest-svg { opacity: .55; filter: grayscale(.6); }
.chest.ready { cursor: pointer; border-color: var(--gold); background: linear-gradient(120deg, rgba(216,180,90,.16), var(--surface) 70%); }
.chest.ready .chest-svg { animation: chest-shake 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
.chest.ready:active { transform: translateY(1px); }
.chest-cta { color: var(--gold) !important; font-weight: 700; }
.chest-svg .chest-lid { transition: transform .5s cubic-bezier(.3,1.6,.5,1); transform-origin: 14px 44px; }
.chest-svg.open .chest-lid { transform: rotate(-24deg) translate(-6px, -8px); }

.parts { display: inline-flex; gap: 3px; vertical-align: middle; margin: 0 4px; }
.parts i { width: 16px; height: 10px; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--line); }
.parts i.on { background: var(--gold); border-color: var(--gold); }

.chest-card .chest-svg { width: 120px; height: 100px; display: block; margin: 0 auto 6px; }
.reveal-part .parts i { width: 42px; height: 22px; }
.reveal-part { margin: 8px 0 10px; text-align: center; }
.reveal-xp { font-family: var(--display); font-weight: 700; font-size: 60px; color: var(--gold); line-height: 1; margin: 6px 0; }

@keyframes chest-shake {
  0%, 70%, 100% { transform: rotate(0); }
  76% { transform: rotate(-7deg); } 82% { transform: rotate(6deg); }
  88% { transform: rotate(-4deg); } 94% { transform: rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .chest.ready .chest-svg { animation: none; }
  .chest-svg .chest-lid { transition: none; }
}
.chest .parts { display: inline-flex; margin: 0 6px 0 4px; }
.chest .chest-goal { display: flex; align-items: center; flex-wrap: wrap; }
.next-up .row b { white-space: nowrap; margin-left: 8px; }

/* ===================== Демо-доступ для гостей ===================== */
#demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 16px; background: #1a1208; border-bottom: 1px solid rgba(216, 180, 90, .45);
  font-size: 14px; color: var(--silver-hi); flex-shrink: 0;
}
#demo-bar b { color: var(--gold); font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
#demo-want {
  font: inherit; font-weight: 700; font-size: 14px; color: #111; background: var(--gold);
  border: 0; border-radius: 3px; padding: 6px 10px; cursor: pointer; white-space: nowrap;
}
.pin-hint { font-size: 13px; color: var(--silver); margin-top: -4px; }
.pin-key.pin-ok { color: var(--green); font-size: 26px; }
.lead-card { text-align: left; }
.lead-card h3 { text-align: center; }
.lead-card label { display: block; font-size: 14px; color: var(--silver-hi); margin-top: 10px; }
.lead-card input, .lead-card select, .lead-card textarea {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px;
}
.lead-card textarea { resize: vertical; }
