:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --card-2: #eef1f6;
  --text: #1b2333;
  --muted: #6b7486;
  --line: rgba(27, 35, 51, .08);
  --shadow: 0 4px 16px rgba(27, 35, 51, .06), 0 1px 2px rgba(27, 35, 51, .04);

  --brand-1: #2d4a9a;
  --brand-2: #3c5fc0;
  --brand-3: #c8962e;
  --accent-soft: rgba(60, 95, 192, .1);
  --accent-text: #2d4a9a;
  --grad: linear-gradient(135deg, #1f3266 0%, #2d4a9a 100%);
  --btn: #3c5fc0;
  --sun: #e8b44c;
  --mint: #2f9e6e;
  --sky: #3f86c9;
  --coral: #d0575b;

  --bronze: #c98a55;
  --silver: #a3adbf;
  --gold: #d9a73a;

  --r-lg: 22px;
  --r-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

:root[data-theme="dark"] {
  --bg: #11151d;
  --card: #1a202b;
  --card-2: #232a37;
  --text: #e8ecf3;
  --muted: #8f99ab;
  --line: rgba(255, 255, 255, .07);
  --shadow: 0 4px 16px rgba(0, 0, 0, .3);
  --accent-soft: rgba(110, 145, 230, .16);
  --accent-text: #9db4ef;
  --grad: linear-gradient(135deg, #1b2a52 0%, #26407f 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151d;
    --card: #1a202b;
    --card-2: #232a37;
    --text: #e8ecf3;
    --muted: #8f99ab;
    --line: rgba(255, 255, 255, .07);
    --shadow: 0 4px 16px rgba(0, 0, 0, .3);
    --accent-soft: rgba(110, 145, 230, .16);
    --accent-text: #9db4ef;
    --grad: linear-gradient(135deg, #1b2a52 0%, #26407f 100%);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
b, strong { font-weight: 800; }

/* ---------- Верхний баннер ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 16px 16px 14px;
  background: var(--grad);
  color: #fff;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 6px 20px rgba(20, 30, 60, .18);
}
.hero__blob { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.hero__blob--1 { width: 180px; height: 180px; right: -50px; top: -70px; }
.hero__blob--2 { width: 90px; height: 90px; left: 38%; bottom: -50px; background: rgba(255, 255, 255, .05); }
.hero__row { position: relative; display: flex; align-items: center; gap: 12px; }
.hero__avatar {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 16px;
  background: rgba(255, 255, 255, .22);
  font-size: 22px; font-weight: 900;
  backdrop-filter: blur(6px);
}
.hero__hello { flex: 1; min-width: 0; }
.hero__title { font-size: 19px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__sub { font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__points { text-align: right; line-height: 1; }
.hero__points b { display: block; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hero__points span { font-size: 12px; opacity: .85; }
.hero__chips { position: relative; display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  font-size: 13px; font-weight: 800;
}
.hero__chip--sun { background: rgba(232, 180, 76, .92); color: #2e2104; }

/* Иконки в шапке: регламент, чемпион, позвать друга */
.hero__actions {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 12px;
}
.hero__action {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 0; padding: 9px 8px; border-radius: 14px;
  background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 12px; font-weight: 800;
  backdrop-filter: blur(6px);
  transition: transform .12s;
}
.hero__action:active { transform: scale(.97); }
.hero__action-icon { font-size: 17px; flex: none; }
.hero__action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero__action.is-empty .hero__action-label { opacity: .8; }

/* ---------- Контент ---------- */
.view { padding: 14px 14px calc(96px + var(--safe-bottom)); max-width: 640px; margin: 0 auto; }

.h2 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 20px 4px 10px; font-size: 17px; font-weight: 900;
}
.h2:first-child { margin-top: 4px; }
.h2 small { font-size: 13px; color: var(--muted); font-weight: 700; }

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 12px; border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow);
  font-size: 14px;
}
.banner__icon { font-size: 26px; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty__icon { font-size: 44px; margin-bottom: 8px; }

/* Чипы-фильтры */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 800; white-space: nowrap;
}
.chip.is-active { background: var(--btn); color: #fff; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--card-2); color: var(--muted);
  font-size: 12px; font-weight: 800;
}
.pill--brand { background: var(--accent-soft); color: var(--accent-text); }
.pill--mint { background: rgba(22, 196, 127, .14); color: var(--mint); }
.pill--sun { background: rgba(217, 167, 58, .16); color: #8a620f; }
:root[data-theme="dark"] .pill--sun { color: var(--sun); }
.pill--pink { background: rgba(217, 167, 58, .16); color: #8a620f; }
:root[data-theme="dark"] .pill--pink { color: var(--sun); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px;
  background: var(--btn); color: #fff;
  font-weight: 800; font-size: 15px;
  transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn--block { width: 100%; }
.btn--soft { background: var(--card-2); color: var(--text); box-shadow: none; }
.btn--danger { background: none; color: var(--coral); box-shadow: none; }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* ---------- Карточка матча ---------- */
.match__top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.match__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.team__badge {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 16px;
  font-weight: 900; font-size: 15px; color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
}
.team__name { font-weight: 800; font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; }

.stepper { display: flex; align-items: center; gap: 4px; }
.stepper__col { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.stepper__btn {
  width: 32px; height: 26px; border-radius: 10px;
  background: var(--card-2); color: var(--accent-text);
  font-size: 18px; font-weight: 900; line-height: 1;
}
.stepper__btn:active { transform: scale(.9); }
.stepper__val {
  width: 46px; height: 50px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums;
  background: var(--card-2);
  transition: background .2s, color .2s;
}
.stepper__val.is-set { background: var(--accent-soft); color: var(--accent-text); }
.stepper__val.is-empty { color: var(--muted); }
.stepper__sep { font-size: 24px; font-weight: 900; color: var(--muted); }

.quick { display: flex; gap: 6px; justify-content: center; margin: 12px 0 2px; flex-wrap: wrap; }
.quick button {
  padding: 5px 10px; border-radius: 999px;
  background: var(--card-2); font-size: 13px; font-weight: 800; color: var(--muted);
}
.quick button.is-active { background: var(--accent-soft); color: var(--accent-text); }

.match__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; min-height: 40px; }
.saved { color: var(--mint); font-weight: 900; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- Результаты ---------- */
.score { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; text-align: center; min-width: 84px; }
.score--live { color: var(--coral); font-size: 14px; }
.score__live { display: block; font-size: 10px; font-weight: 900; color: var(--coral); letter-spacing: .04em; }
.result__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.pts {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 4px 10px; font-weight: 900; font-size: 13px; color: #fff;
}
.pts-3 { background: var(--sun); color: #2e2104; }
.pts-2 { background: var(--sky); }
.pts-1 { background: var(--mint); }
.pts-0 { background: var(--card-2); color: var(--muted); }

/* ---------- Таблица ---------- */
.lb { padding: 4px 0; }
.lb__row {
  display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 10px;
  padding: 11px 14px; border-top: 1px solid var(--line);
}
.lb__row:first-child { border-top: 0; }
.lb__row.is-me { background: var(--accent-soft); }
/* Лидеры таблицы — выделение цветом вместо подиума */
.lb__row--top1 { background: rgba(217, 167, 58, .16); box-shadow: inset 3px 0 0 var(--gold); }
.lb__row--top2 { background: rgba(163, 173, 191, .18); box-shadow: inset 3px 0 0 var(--silver); }
.lb__row--top3 { background: rgba(201, 138, 85, .16); box-shadow: inset 3px 0 0 var(--bronze); }
.lb__row--top1 .lb__place, .lb__row--top1 .lb__pts { color: #8a620f; }
:root[data-theme="dark"] .lb__row--top1 .lb__place, :root[data-theme="dark"] .lb__row--top1 .lb__pts { color: var(--sun); }
.lb__place { font-weight: 900; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.lb__exact { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.lb__pts { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; font-size: 16px; }
.legend { color: var(--muted); font-size: 12px; margin: 6px 4px 0; }

/* ---------- Группы ---------- */
.group {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); margin-bottom: 12px; padding: 16px;
  color: #fff; box-shadow: var(--shadow); text-align: left; width: 100%;
}
.group::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .14);
}
.group__name { font-size: 18px; font-weight: 900; margin-bottom: 2px; position: relative; }
.group__meta { font-size: 13px; opacity: .9; position: relative; }
.group__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; position: relative; }
.group__chip { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 12px; font-weight: 800; }
.group__me { position: absolute; right: 16px; bottom: 14px; text-align: right; z-index: 1; }
.group__me b { display: block; font-size: 24px; line-height: 1; }
.group__me span { font-size: 11px; opacity: .85; }

.invite {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  border: 2px dashed var(--line);
}
.invite__icon { font-size: 30px; }
.invite__text { font-size: 14px; }
.invite .btn-row { grid-column: 1 / -1; }

/* Формы */
.field {
  width: 100%; padding: 13px 14px; margin-bottom: 12px;
  border: 2px solid var(--line); border-radius: var(--r-md);
  background: var(--card); outline: none; font-weight: 700;
}
.field:focus { border-color: var(--btn); }
textarea.field { min-height: 90px; resize: vertical; }
.label { display: block; font-size: 13px; color: var(--muted); font-weight: 800; margin: 4px 2px 8px; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.choice--3 { grid-template-columns: repeat(3, 1fr); }
.choice--3 .choice__opt { padding: 12px 6px; font-size: 13px; }
.choice--3 .choice__opt span { font-size: 22px; }
.choice__opt {
  padding: 14px 10px; border-radius: var(--r-md);
  background: var(--card); border: 2px solid var(--line);
  text-align: center; font-weight: 900;
}
.choice__opt span { display: block; font-size: 26px; margin-bottom: 4px; }
.choice__opt small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; }
.choice__opt.is-active { border-color: var(--btn); background: var(--accent-soft); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px; margin-bottom: 12px;
  background: var(--card); border-radius: var(--r-md); border: 2px solid var(--line);
}
.toggle-row small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s;
}
.switch input:checked + span { background: var(--btn); }
.switch input:checked + span::after { transform: translateX(20px); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: 13px;
}
.tag button { font-size: 15px; line-height: 1; opacity: .7; }
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.add-row .field { margin-bottom: 12px; }
.add-row .btn { height: 50px; }

.bank {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; border-radius: var(--r-md); margin-bottom: 12px;
  background: rgba(217, 167, 58, .14);
}
.bank b { font-size: 22px; }

/* ---------- Ачивки ---------- */
.ach-progress { height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; margin: 2px 4px 6px; }
.ach-progress div { height: 100%; background: var(--btn); border-radius: inherit; }
.ach-cat { margin: 16px 4px 8px; font-size: 13px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px 10px; border-radius: var(--r-md);
  background: var(--card); box-shadow: var(--shadow); text-align: center;
}
.ach__medal {
  position: relative; display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  font-size: 28px;
  background: var(--card-2);
}
.ach__medal::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  padding: 4px; background: var(--line);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.ach--bronze.is-on .ach__medal::before { background: var(--bronze); }
.ach--silver.is-on .ach__medal::before { background: var(--silver); }
.ach--gold.is-on .ach__medal::before { background: var(--gold); }
.ach--legend.is-on .ach__medal::before { background: linear-gradient(135deg, var(--gold), var(--brand-2)); }
.ach.is-on .ach__medal { background: rgba(217, 167, 58, .12); }
.ach:not(.is-on) .ach__medal { filter: grayscale(1); opacity: .45; }
.ach__title { font-size: 12px; font-weight: 900; line-height: 1.15; }
.ach:not(.is-on) .ach__title { color: var(--muted); }
.ach__bar { width: 70%; height: 4px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.ach__bar div { height: 100%; background: var(--btn); }
.ach__new {
  position: absolute; top: 6px; right: 6px;
  padding: 2px 6px; border-radius: 999px; background: var(--coral); color: #fff;
  font-size: 10px; font-weight: 900; animation: pulse 1.4s infinite;
}

/* Статистика */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--card); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow); }
.stat__val { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-size: 12px; font-weight: 700; }

.list { background: var(--card); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); }
.list__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 14px; border-top: 1px solid var(--line); text-align: left;
}
.list__item:first-child { border-top: 0; }
.list__label { min-width: 0; }
.list__title { display: block; font-weight: 800; }
.list__sub { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.list__value { color: var(--muted); flex: none; text-align: right; font-weight: 800; }
.list__value strong { color: var(--text); }

.rules { white-space: pre-line; font-size: 14px; font-weight: 600; }

/* Разделитель на экране входа */
.login-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0; color: var(--muted); font-size: 13px; font-weight: 800;
}
.login-sep::before, .login-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Нижняя панель ---------- */
.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-bottom)); z-index: 5;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  padding: 6px; border-radius: 24px;
  background: var(--card);
  box-shadow: 0 6px 24px rgba(27, 35, 51, .14);
  max-width: 560px; margin: 0 auto;
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0 6px; border-radius: 18px;
  color: var(--muted); font-size: 10px; font-weight: 800;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { background: var(--accent-soft); color: var(--accent-text); }
.tab__dot { position: absolute; top: 5px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid var(--card); }

/* ---------- Нижний лист ---------- */
.sheet { position: fixed; inset: 0; z-index: 10; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(17, 21, 29, .45); animation: fade .2s; }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 88vh; overflow-y: auto;
  background: var(--bg); border-radius: 26px 26px 0 0;
  padding: 8px 16px calc(18px + var(--safe-bottom));
  animation: up .25s cubic-bezier(.2, .9, .3, 1.2);
  max-width: 640px; margin: 0 auto;
}
.sheet__handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet__title { font-size: 20px; font-weight: 900; margin: 0 0 4px; }
.sheet__sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; font-weight: 700; }

.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.team-option {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; border: 2px solid transparent; border-radius: var(--r-md);
  background: var(--card); text-align: left; font-size: 14px; font-weight: 800;
}
.team-option .team__badge { width: 32px; height: 32px; font-size: 11px; border-radius: 11px; }
.team-option.is-active { border-color: var(--btn); }

/* ---------- Праздник ---------- */
.celebrate { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(17, 21, 29, .55); animation: fade .2s; padding: 24px; }
.celebrate__card {
  position: relative; z-index: 1;
  width: 100%; max-width: 320px; padding: 26px 20px 20px;
  border-radius: 28px; background: var(--card); text-align: center;
  animation: pop .45s cubic-bezier(.2, .9, .3, 1.4);
}
.celebrate__medal {
  display: grid; place-items: center; margin: 0 auto 12px;
  width: 96px; height: 96px; border-radius: 50%;
  font-size: 50px; background: var(--card-2);
  box-shadow: 0 0 0 5px var(--gold), 0 10px 24px rgba(20, 30, 60, .2);
  animation: wobble 1.2s ease-in-out infinite;
}
.celebrate__kicker { color: var(--gold); font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.celebrate__title { font-size: 24px; font-weight: 900; margin: 4px 0 6px; }
.celebrate__desc { color: var(--muted); margin-bottom: 18px; }
.celebrate__confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti {
  position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px;
  animation: fall linear forwards;
}

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(92px + var(--safe-bottom)); z-index: 40;
  margin: 0 auto; max-width: 420px;
  padding: 12px 16px; border-radius: 16px;
  background: #1b2333; color: #fff;
  font-size: 14px; font-weight: 800; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  animation: up .2s ease-out;
}

.skeleton { height: 150px; border-radius: var(--r-lg); margin-bottom: 12px; background: var(--card); position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--card-2), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes pulse { 50% { transform: scale(1.12); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Админка ---------- */
.hero__admin {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px;
}
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--card); border-radius: var(--r-md); padding: 10px 12px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 11px; font-weight: 700; }
.admin-back { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 800; margin: 0 4px 6px; }
.user-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 14px; border-top: 1px solid var(--line); }
.user-row:first-child { border-top: 0; }
.user-row small { color: var(--muted); font-size: 12px; font-weight: 700; }
.score-input { width: 52px; text-align: center; padding: 10px 6px; margin: 0; }
.fix-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; }

/* Подтверждение вступления */
.confirm-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin-bottom: 12px;
  border-radius: var(--r-md); background: rgba(217, 167, 58, .12); font-size: 14px; }
.confirm-check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--btn); }

/* ---------- Барабан выбора счета ---------- */
.wheels { display: flex; align-items: center; gap: 6px; }
.wheel-wrap { position: relative; width: 58px; height: 132px; }
.wheel-wrap::before {
  content: ""; position: absolute; left: 0; right: 0; top: 44px; height: 44px;
  border-radius: 14px; background: var(--accent-soft); pointer-events: none;
}
.wheel {
  position: relative; height: 100%;
  overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(transparent 0, #000 32%, #000 68%, transparent 100%);
  mask-image: linear-gradient(transparent 0, #000 32%, #000 68%, transparent 100%);
  touch-action: pan-y; outline: none;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel__pad { height: 44px; }
.wheel__item {
  height: 44px; display: grid; place-items: center; scroll-snap-align: center;
  font-size: 22px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums;
  transition: color .15s, transform .15s; cursor: pointer; user-select: none;
}
.wheel__item.is-sel { color: var(--accent-text); font-size: 28px; font-weight: 900; }
.wheel__sep { font-size: 24px; font-weight: 900; color: var(--muted); }
.wheel-hint { text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; margin-top: 2px; }

/* ---------- Друзья ---------- */
.person { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; }
.person:first-child { border-top: 0; }
.person__ava { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #fff; font-weight: 900; font-size: 14px; }
.person__ava--lg { width: 64px; height: 64px; font-size: 20px; margin: 0 auto; }
.person__name { display: block; font-weight: 800; }
.person__sub { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.person__pts { font-weight: 900; font-variant-numeric: tabular-nums; }
.person .btn-row { gap: 6px; }

.friend-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.friend-pick { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: 999px; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: 13px; }
.friend-pick .person__ava { width: 26px; height: 26px; font-size: 10px; }
.friend-pick.is-on { border-color: var(--btn); background: var(--accent-soft); color: var(--accent-text); }
.friend-pick.is-off { opacity: .45; }

/* Рамка фокуса — только для клавиатуры, не после касания */
:focus:not(:focus-visible) { outline: none; }

/* Эмблемы команд */
.team__badge.has-crest { background: #fff !important; font-size: 0; box-shadow: inset 0 0 0 1px var(--line); }
.team__badge img { width: 80%; height: 80%; object-fit: contain; }
