:root {
  --bg: #0b0f14;
  --bg-elevated: #121820;
  --bg-card: #161d27;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef2f7;
  --text-muted: #8b97a8;
  --accent: #39d98a;
  --accent-dim: rgba(57, 217, 138, 0.15);
  --live: #ff4d6d;
  --home: #5b9dff;
  --draw: #c4cad4;
  --away: #ffb347;
  --over: #39d98a;
  --under: #a78bfa;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

body.sp-app {
  touch-action: manipulation;
}

body.sp-app .tabbar__btn,
body.sp-app .icon-btn,
body.sp-app .filter,
body.sp-app .tab {
  -webkit-user-select: none;
  user-select: none;
}

body.sp-app .tabbar__btn:active,
body.sp-app .icon-btn:active,
body.sp-app .filter:active {
  transform: scale(0.96);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(57, 217, 138, 0.12), transparent 55%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 480px;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  padding-bottom: 0;
}

/* Анимация входа только при смене маршрута — не при первой загрузке (вызывала моргание) */
body.app-route-enter .app-view--active {
  animation: view-in 0.2s ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.app-route-enter .app-view--active,
  .vote-btn.is-picking,
  .vote-btn.is-voted {
    animation: none !important;
  }
}

.app-viewport {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  min-height: 0;
}

.app--event .comments {
  padding-bottom: calc(120px + var(--tabbar-height, 52px) + var(--safe-bottom));
}

body.app--hide-tabbar.app--event .comments {
  padding-bottom: calc(100px + var(--safe-bottom));
}


.icon-btn--avatar {
  font-size: 1.25rem;
  line-height: 1;
}

.profile-logout {
  margin-left: auto;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.profile {
  padding: 0 12px 24px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 4px 20px;
}

.profile-hero__avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.profile-hero__nick {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.profile-hero__email {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-section {
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.profile-section__title {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.profile-section__subtitle {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
}

.profile-section__hint {
  margin: -6px 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.profile-stats--sub {
  margin-top: 8px;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-panel, rgba(0, 0, 0, 0.2));
  border: 1px solid var(--border);
}

.profile-stat__value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.profile-stat__label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.profile-stat__note {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-breakdown {
  display: grid;
  gap: 6px;
}

.profile-breakdown__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.avatar-pick {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  font-size: 1.35rem;
  cursor: pointer;
  transition: 0.15s ease;
}

.avatar-pick.is-active {
  border-color: rgba(57, 217, 138, 0.5);
  background: var(--accent-dim);
  box-shadow: 0 0 0 2px rgba(57, 217, 138, 0.2);
}

.avatar-pick:hover {
  border-color: rgba(57, 217, 138, 0.35);
}

/* Feed: фильтры + гостевой баннер — одна липкая шапка при скролле */
.feed-sticky-head {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--surface-header, rgba(11, 15, 20, 0.94));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.feed-sticky-head .feed-toolbar {
  position: static;
  top: auto;
  z-index: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

body.has-feed-promo .feed-sticky-head {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

/* Feed toolbar (filters) */
.feed-toolbar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--surface-header, rgba(11, 15, 20, 0.92));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) 16px 6px;
  flex-shrink: 0;
  z-index: 30;
  background: var(--surface-header, rgba(11, 15, 20, 0.92));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.topbar--profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.brand__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  line-height: 1.2;
}

.brand__logo {
  display: block;
  width: 48px;
  height: auto;
  flex-shrink: 0;
}

.brand__name {
  display: block;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
  white-space: nowrap;
}

.brand__tagline {
  display: block;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
}

.brand__link--compact {
  padding: 4px 10px 4px 4px;
  border-radius: 12px;
}

.brand__link--compact .brand__logo {
  width: 40px;
}

.brand__link--compact .brand__name {
  font-size: 0.88rem;
}

.brand__link--compact .brand__tagline {
  font-size: 0.65rem;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #1fa463);
  box-shadow: 0 6px 20px rgba(57, 217, 138, 0.25);
  font-size: 1.1rem;
}

.back-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
}

.filters-panel {
  border-top: 1px solid var(--border);
}

/* Filters (компактные: ~1.5× ниже базовых размеров) */
.filters {
  display: flex;
  gap: 5px;
  padding: 5px 12px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters--sport {
  padding-top: 0;
  padding-bottom: 5px;
  min-height: 38px;
}

.filters::-webkit-scrollbar {
  display: none;
}

.badge--sport {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.filter {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition: 0.15s ease;
}

.filter.is-active {
  background: var(--accent-dim);
  border-color: rgba(57, 217, 138, 0.35);
  color: var(--accent);
}

.feed-status {
  margin: 0;
  padding: 6px 16px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.feed-status[data-kind="error"] {
  color: #ff8fa3;
}

.feed-status[data-kind="loading"] {
  color: var(--accent);
}

.feed-status[data-kind="refreshing"] {
  color: var(--text-muted);
}

/* Feed skeleton */
.event-card--skeleton {
  pointer-events: none;
  user-select: none;
}

.event-card--skeleton .event-card__link {
  cursor: default;
}

.skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.05) 90%
  );
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.15s ease-in-out infinite;
}

.skeleton--league {
  width: 42%;
  height: 12px;
}

.skeleton--badge {
  width: 44px;
  height: 22px;
  border-radius: 999px;
  display: inline-block;
}

.skeleton--logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto;
}

.skeleton--name {
  width: 72%;
  height: 12px;
  margin: 0 auto;
}

.skeleton--score {
  width: 52px;
  height: 20px;
  margin: 0 auto;
}

.skeleton--ugc-title {
  width: 56px;
  height: 10px;
}

.skeleton--ugc-meta {
  width: 72px;
  height: 10px;
}

.bar-row--skeleton {
  grid-template-columns: 28px 1fr 34px;
}

.skeleton--label {
  width: 20px;
  height: 10px;
  border-radius: 4px;
}

.skeleton--bar {
  height: 7px;
  border-radius: 999px;
}

.skeleton--pct {
  width: 28px;
  height: 10px;
  margin-left: auto;
}

.skeleton--foot {
  width: 55%;
  height: 10px;
}

.ugc-block--skeleton {
  background: rgba(0, 0, 0, 0.18);
}

.feed--boot .skeleton {
  animation: none;
  background: rgba(255, 255, 255, 0.07);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Feed cards */
.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 8px;
}

.feed-footer {
  padding: 4px 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.feed-footer[hidden] {
  display: none !important;
}

/* Плашка «ещё матчи» — сразу над таббаром, без зазора */
.feed-load-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  right: auto;
  bottom: var(--tabbar-block-height);
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(11, 15, 20, 0.94);
  border-top: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

.feed-load-bar[hidden] {
  display: none !important;
}

body.has-feed-load-bar .app-viewport {
  padding-bottom: calc(4.75rem + var(--tabbar-block-height));
}

.feed-load-bar__meta {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.25;
  text-align: center;
}

.feed-guest-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.feed-guest-gate__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.feed-guest-gate__text strong {
  color: var(--text);
  font-weight: 900;
}

.btn--sm {
  padding: 10px 14px;
  font-size: 0.82rem;
}

.event-card--guest .event-card__link {
  cursor: pointer;
}

.ugc-guest-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ugc-guest-wrap__blur {
  filter: blur(6px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.ugc-guest-lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  text-align: center;
  background: rgba(11, 15, 20, 0.45);
}

.ugc-guest-lock__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.ugc-guest-lock__text {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

.vote-panel--guest {
  position: relative;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-panel--guest .ugc-guest-lock {
  position: relative;
  inset: auto;
  width: 100%;
  background: transparent;
}

#vote-guest-lock {
  width: 100%;
}

.feed-end-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
}

.feed-footer__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.feed-footer__btn {
  min-width: 200px;
}

.feed-footer__btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.feed-append-skeletons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.feed-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
}

.event-card {
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s ease;
}

.event-card:active {
  transform: scale(0.985);
}

.event-card__link {
  display: block;
}

.event-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 0;
}

.league {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.event-card--pinned {
  border-color: rgba(57, 217, 138, 0.35);
  box-shadow: 0 0 0 1px rgba(57, 217, 138, 0.12), var(--shadow);
}

.badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.badge--top-match {
  background: rgba(255, 179, 71, 0.2);
  color: #ffb347;
  border: 1px solid rgba(255, 179, 71, 0.35);
}

.badge--pin {
  background: rgba(57, 217, 138, 0.2);
  color: var(--accent);
  border: 1px solid rgba(57, 217, 138, 0.35);
}

.badge--live {
  background: rgba(255, 77, 109, 0.18);
  color: var(--live);
  animation: pulse-live 1.6s ease infinite;
}


@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.team--away {
  text-align: center;
}

.team__logo,
.team__ph {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.team__ph {
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.team__name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scorebox {
  text-align: center;
  min-width: 72px;
}

.score {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.score-detail {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.score-point {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent, #7dd3fc);
}

.hero__score--tennis .score {
  font-size: 1.6rem;
}

.hero__score--tennis .score-detail {
  font-size: 0.8rem;
  margin-top: 6px;
}

.hero__score--tennis .score-point {
  font-size: 0.72rem;
  margin-top: 4px;
}

.kickoff {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* UGC blocks */
.event-card__ugc {
  display: grid;
  gap: 8px;
  padding: 0 12px 10px;
}

.ugc-block {
  background: var(--surface-panel, rgba(0, 0, 0, 0.22));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.ugc-results--closed .ugc-block {
  opacity: 0.92;
}

.ugc-results--closed .ugc-title,
.ugc-results--closed .ugc-meta,
.ugc-results--closed .bar-label,
.ugc-results--closed .bar-pct {
  color: var(--text-muted);
}

.ugc-results--closed .bar-fill {
  background: rgba(148, 163, 184, 0.45) !important;
}

.vote-panel--closed {
  pointer-events: none;
}

.vote-closed-note {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.12);
}

.ugc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ugc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ugc-meta {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
}

.bar-row {
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.bar-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 2px;
  transition: width 0.4s ease;
}

.bar-fill--home { background: var(--home); }
.bar-fill--draw { background: var(--draw); }
.bar-fill--away { background: var(--away); }
.bar-fill--over { background: var(--over); }
.bar-fill--under { background: var(--under); }

.bar-pct {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.event-card__foot {
  padding: 0 12px 12px;
}

.pick-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.pick-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.pick-avatar {
  font-size: 1rem;
}

.pick-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pick-body strong {
  color: var(--text);
  font-size: 0.74rem;
}

.foot-note {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-previews {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.comment-preview {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.comment-preview__avatar {
  flex-shrink: 0;
  font-size: 0.95rem;
}

.comment-preview__body {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comment-preview__body strong {
  color: var(--text);
  font-size: 0.72rem;
  margin-right: 4px;
}

.comments-empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: rgba(11, 15, 20, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}

.bottom-nav__item {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.bottom-nav__item.is-active {
  color: var(--accent);
  background: var(--accent-dim);
}

.bottom-nav__item--muted {
  opacity: 0.45;
}

/* Event page hero */
.hero {
  padding: 8px 16px 16px;
}

.hero__league {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.hero__status {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hero__status--live {
  color: var(--live);
}

.hero__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
}

.hero__team {
  text-align: center;
}

.hero__team h1 {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 700;
}

.hero__logo,
.hero__ph {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.hero__ph {
  display: inline-grid;
  place-items: center;
  font-size: 1.4rem;
}

.hero__score {
  padding-top: 12px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero__score small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Tabs */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 10px;
}

.tab {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 12px;
  padding: 10px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}

.tab.is-active {
  background: var(--accent-dim);
  border-color: rgba(57, 217, 138, 0.35);
  color: var(--accent);
}

.panel.is-hidden {
  display: none;
}

.panel__inner {
  padding: 0 16px 12px;
}

.vote-panel {
  display: grid;
  gap: 14px;
}

.vote-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.vote-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vote-btn {
  flex: 1 1 auto;
  min-width: 72px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.16s cubic-bezier(0.34, 1.4, 0.64, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.vote-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(57, 217, 138, 0.45) 0%, transparent 68%);
  opacity: 0;
  transform: scale(0.4);
  pointer-events: none;
}

.vote-btn:active:not(:disabled) {
  transform: scale(0.93);
}

.vote-btn.is-picking {
  animation: vote-pop 0.42s cubic-bezier(0.34, 1.4, 0.64, 1);
  border-color: rgba(57, 217, 138, 0.55);
  box-shadow: 0 0 0 2px rgba(57, 217, 138, 0.18);
}

.vote-btn.is-picking::after {
  animation: vote-ripple 0.42s ease-out;
}

.vote-btn.is-voted {
  border-color: rgba(57, 217, 138, 0.45);
  background: var(--accent-dim);
  color: var(--accent);
  animation: vote-selected 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.vote-btn:disabled {
  cursor: wait;
  opacity: 0.88;
}

@keyframes vote-pop {
  0% { transform: scale(1); }
  35% { transform: scale(0.9); }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes vote-ripple {
  0% {
    opacity: 0.75;
    transform: scale(0.35);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes vote-selected {
  0% { transform: scale(0.94); box-shadow: 0 0 0 0 rgba(57, 217, 138, 0.45); }
  60% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(57, 217, 138, 0.12); }
  100% { transform: scale(1); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vote-btn,
  .vote-btn.is-picking,
  .vote-btn.is-voted {
    animation: none;
    transition: none;
  }

  .vote-btn.is-picking::after {
    animation: none;
    opacity: 0;
  }
}

/* Comments */
.comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(120px + var(--safe-bottom));
}

.comment {
  display: flex;
  gap: 10px;
}

.comment--reply {
  margin-top: 10px;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.comment--mine .comment__body {
  border-color: rgba(57, 217, 138, 0.25);
}

.comment__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.comment__body {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.comment__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.74rem;
}

.comment__meta strong {
  color: var(--text);
}

.comment__meta span {
  color: var(--text-muted);
}

.comment__body p {
  margin: 0;
  font-size: 0.86rem;
}

.comment__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ghost-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.comment-reply-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-height, 52px) + 62px + var(--safe-bottom));
  width: min(480px, 100%);
  z-index: 46;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(11, 15, 20, 0.96);
  border-top: 1px solid var(--border);
}

.comment-reply-bar.is-hidden {
  display: none;
}

.comment-reply-bar__label {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

.comment-reply-bar__cancel {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.comment-form.is-hidden {
  display: none;
}

.comment-form {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-height, 52px) + var(--safe-bottom));
  width: min(480px, 100%);
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(11, 15, 20, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 46;
}

body.app--hide-tabbar .comment-form {
  bottom: calc(10px + var(--safe-bottom));
}

body.app--hide-tabbar .comment-reply-bar {
  bottom: calc(var(--tabbar-height, 40px) + 20px + var(--safe-bottom));
}

.comment-form input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}

.comment-form input:focus {
  outline: 2px solid rgba(57, 217, 138, 0.35);
  outline-offset: 0;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg-elevated);
  color: var(--text);
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent), #1fa463);
  color: #062116;
}

.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
}

.empty-state p {
  margin: 0 0 12px;
}

@media (min-width: 481px) {
  body {
    background:
      radial-gradient(ellipse 80% 50% at 50% -5%, rgba(57, 217, 138, 0.1), transparent 50%),
      #080b10;
  }

  .app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: var(--bg);
  }
}

/* Auth modal */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal__card {
  width: min(400px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.auth-modal__card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.auth-modal__card p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.auth-modal__card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-modal__card input {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-modal__card h2 {
  margin: 0;
}

.auth-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}

.auth-switch__btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}

.auth-switch__btn.is-active {
  background: var(--accent-dim);
  border-color: rgba(57, 217, 138, 0.35);
  color: var(--accent);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form.is-hidden {
  display: none;
}

.auth-2fa {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.auth-2fa.is-hidden {
  display: none;
}

.auth-check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.btn.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.auth-hint {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-hint[data-kind="ok"] {
  color: var(--accent);
}

.auth-hint[data-kind="error"] {
  color: #ff8fa3;
}

.auth-vk-block {
  margin-bottom: 4px;
}

.auth-vk-block.is-hidden {
  display: none;
}

.vk-id-widget {
  min-height: 48px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-vk-welcome {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-switch.is-hidden {
  display: none;
}

/* Gamification: medals, leaderboard, follow */
.medal {
  font-size: 1rem;
  line-height: 1;
}

.follow-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.follow-btn.is-following {
  border-color: var(--border);
  color: var(--text-muted);
}

.comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.pick-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-hero {
  padding: 8px 0 12px;
}

.rating-hero__title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.rating-hero__sub,
.rating-hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.rating-period {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.leaderboard-row__rank {
  width: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.leaderboard-row__avatar {
  font-size: 1.4rem;
}

.leaderboard-row__main {
  flex: 1;
  min-width: 0;
}

.leaderboard-row__head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.leaderboard-row__nick {
  font-weight: 600;
}

.leaderboard-row__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-gamification {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.profile-gamification__value {
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-gamification__label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-gamification__no-medal {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.following-list,
.following-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.following-list__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.following-list__main {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.following-feed__item {
  border-bottom: 1px solid var(--border);
}

.following-feed__link {
  display: block;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
}

.following-feed__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.following-feed__match {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.following-feed__pick {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pred-result {
  margin-left: auto;
  font-weight: 700;
}

.pred-result--hit {
  color: #5ee89a;
}

.pred-result--miss {
  color: #ff8fa3;
}

.pred-result--pending {
  color: var(--text-muted);
}

/* Feed promo carousel (guests, mobile) */
.feed-promo:not(.is-visible),
.feed-promo[hidden] {
  display: none !important;
}

.feed-promo.is-visible {
  display: block;
  padding: 0 10px 8px;
}

.feed-promo__wrap {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(74, 255, 168, 0.45);
  background:
    linear-gradient(135deg, rgba(57, 255, 148, 0.28) 0%, rgba(31, 164, 99, 0.12) 42%, rgba(11, 15, 20, 0.72) 100%),
    radial-gradient(ellipse 90% 80% at 0% 0%, rgba(57, 255, 148, 0.35), transparent 55%);
  box-shadow: 0 8px 28px rgba(57, 217, 138, 0.18);
  overflow: hidden;
}

.feed-promo__dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.feed-promo__viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.feed-promo__track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.feed-promo__slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 112px;
  padding: 16px 40px 14px 14px;
  box-sizing: border-box;
}

.feed-promo__body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-promo__login {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(57, 217, 138, 0.35);
}

.feed-promo__slide--cta {
  cursor: default;
}

.feed-promo__slide--cta .feed-promo__title {
  background: linear-gradient(135deg, #7dffb8 0%, #39ff9a 45%, #1fa463 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feed-promo__icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(57, 255, 148, 0.22), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(74, 255, 168, 0.35);
  box-shadow: 0 4px 14px rgba(57, 217, 138, 0.2);
}

.feed-promo__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-promo__title {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  color: #eafff4;
}

.feed-promo__text {
  font-size: 0.92rem;
  line-height: 1.35;
  color: rgba(232, 237, 247, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-promo__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 0 12px;
}

.feed-promo__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.feed-promo__dot.is-active {
  background: linear-gradient(135deg, #7dffb8, #39ff9a);
  box-shadow: 0 0 0 3px rgba(57, 255, 148, 0.28);
}

@media (min-width: 768px) {
  .feed-promo.is-visible {
    display: block;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

.auth-pitch {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(57, 217, 138, 0.08);
  border: 1px solid rgba(57, 217, 138, 0.2);
}
