/* =========================================================================
   SportTeamBot — design system
   Полная поддержка светлой и тёмной темы Telegram через var(--tg-theme-*).
   ========================================================================= */

:root {
  /* Telegram theme vars with fallbacks */
  --bg:           var(--tg-theme-bg-color, #ffffff);
  --bg-secondary: var(--tg-theme-secondary-bg-color, #f5f6f8);
  --text:         var(--tg-theme-text-color, #1a1a1a);
  --hint:         var(--tg-theme-hint-color, #8a8d91);
  --link:         var(--tg-theme-link-color, #2a76d4);
  --button:       var(--tg-theme-button-color, #2a76d4);
  --button-text:  var(--tg-theme-button-text-color, #ffffff);

  /* Brand palette */
  --blue:   #2a76d4;
  --blue-2: #1e5cab;
  --orange: #ee7621;
  --orange-2: #d65d0e;
  --green:  #34c759;
  --red:    #ff3b30;
  --gold:   #ffb800;
  --silver: #c0c0c0;
  --bronze: #cd7f32;

  /* Surfaces */
  --card:        rgba(127, 127, 127, 0.08);
  --card-hover:  rgba(127, 127, 127, 0.12);
  --divider:     rgba(127, 127, 127, 0.15);
  --surface:     #ffffff;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Auto detect dark theme if Telegram didn't inject vars */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           var(--tg-theme-bg-color, #1c1c1e);
    --bg-secondary: var(--tg-theme-secondary-bg-color, #2c2c2e);
    --text:         var(--tg-theme-text-color, #f5f5f7);
    --hint:         var(--tg-theme-hint-color, #98989d);
    --card:         rgba(255, 255, 255, 0.07);
    --card-hover:   rgba(255, 255, 255, 0.1);
    --divider:      rgba(255, 255, 255, 0.12);
    --surface:      #26262b;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.45;
}

h1, h2, h3, h4 { margin: 0 0 0.4em; line-height: 1.2; font-weight: 700; }
a { color: var(--link); text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

/* ========== Утилитарные анимации ========== */

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.94); }
  100% { transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes toast-up {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.fade-in { animation: fade-in 0.35s var(--ease-out); }
.slide-in { animation: slide-in-right 0.3s var(--ease-out); }

/* =========================================================================
   MINI APP
   ========================================================================= */

.app {
  padding: 12px 14px calc(env(safe-area-inset-bottom, 0) + 80px);
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
}

/* --- Хедер --- */
.app__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 14px;
}
.app__header h1 {
  font-size: 20px;
  margin: 0;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.badge {
  font-size: 12px;
  color: var(--hint);
  background: var(--card);
  padding: 4px 10px;
  border-radius: var(--r-full);
}

/* --- Табы --- */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--card);
  padding: 4px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  position: sticky;
  top: 8px;
  z-index: 5;
  backdrop-filter: blur(20px);
}
.tab {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--hint);
  transition: all 0.25s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.tab:hover { color: var(--text); }
.tab--active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* --- Loader / Empty / Toast --- */
.loader {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}
.skeleton {
  background: linear-gradient(
    90deg, var(--card) 0%, var(--card-hover) 50%, var(--card) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--r-md);
  animation: shimmer 1.4s linear infinite;
}
.skeleton--card { height: 120px; }
.skeleton--row { height: 56px; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--hint);
  font-size: 14px;
}
.empty__icon { font-size: 44px; margin-bottom: 12px; }
.empty__hint { font-size: 13px; opacity: 0.8; margin-top: 6px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  animation: toast-up 0.3s var(--ease-out);
  max-width: 90vw;
}
.toast--error { background: var(--red); color: #fff; }

/* --- Match card --- */
.match-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), background 0.2s ease;
  cursor: pointer;
}
.match-card:hover { background: var(--card-hover); }
.match-card:active { transform: scale(0.98); }
.match-card--upcoming::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--orange));
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.match-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.match-card__date {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.match-card__time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--hint);
  margin-top: 2px;
}
.match-card__place {
  font-size: 13px;
  color: var(--hint);
  margin-top: 6px;
}

.status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-pill--recruiting { background: rgba(52, 199, 89, 0.15); color: var(--green); }
.status-pill--rostering  { background: rgba(42, 118, 212, 0.15); color: var(--blue); }
.status-pill--drafting   { background: rgba(238, 118, 33, 0.15); color: var(--orange); }
.status-pill--ready      { background: var(--green); color: #fff; }
.status-pill--finished   { background: var(--card-hover); color: var(--hint); }
.status-pill--cancelled  { background: rgba(255, 59, 48, 0.15); color: var(--red); }

/* --- Прогресс откликов --- */
.responses-progress {
  display: flex;
  height: 6px;
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--card-hover);
  margin: 10px 0 6px;
}
.responses-progress__seg {
  transition: width 0.4s var(--ease-out);
  min-width: 0;
}
.responses-progress__seg--yes   { background: var(--green); }
.responses-progress__seg--maybe { background: var(--gold); }
.responses-progress__seg--no    { background: var(--red); opacity: 0.6; }
.responses-meta {
  font-size: 12px;
  color: var(--hint);
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.responses-meta__dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* --- Кнопки ответа --- */
.response-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.response-btn {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--divider);
  border-radius: var(--r-md);
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.response-btn:hover:not(:disabled) {
  border-color: var(--button);
  background: var(--card);
}
.response-btn--active {
  background: var(--button);
  color: var(--button-text);
  border-color: var(--button);
  animation: pop 0.4s var(--ease-bounce);
  box-shadow: 0 4px 12px rgba(42, 118, 212, 0.25);
}
.response-btn__count {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 600;
}

/* --- Счёт --- */
.score-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 0;
}
.score-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}
.score-side__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--hint);
}
.score-side__value {
  font-size: 40px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.score-side--blue   .score-side__value { color: var(--blue); }
.score-side--orange .score-side__value { color: var(--orange); }
.score-side--blue   .score-side__label { color: var(--blue); }
.score-side--orange .score-side__label { color: var(--orange); }
.score-sep {
  font-size: 28px;
  color: var(--hint);
  font-weight: 300;
}

/* --- Состав команд --- */
.teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.team {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 12px;
  border: 1px solid var(--divider);
}
.team--blue   { border-top: 3px solid var(--blue); }
.team--orange { border-top: 3px solid var(--orange); }
.team__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.team--blue   .team__title { color: var(--blue); }
.team--orange .team__title { color: var(--orange); }
.team__count {
  background: var(--card);
  color: var(--hint);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
}
.team__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.team__list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: var(--r-sm);
}
.team__list li.captain { font-weight: 600; }
.team__list li.captain::before { content: "🧢"; font-size: 12px; }
.team__list li.empty-row { color: var(--hint); font-style: italic; }

/* --- Профиль --- */
.profile-hero {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-radius: var(--r-xl);
  padding: 24px;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: "";
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}
.profile-hero__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.profile-hero__avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.profile-hero__badges {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.95;
  line-height: 1.5;
}
.profile-hero__name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 2px;
}
.profile-hero__handle {
  font-size: 13px;
  opacity: 0.85;
}
.profile-hero__rating {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.profile-hero__rating-value {
  font-size: 42px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.profile-hero__rating-label {
  font-size: 13px;
  opacity: 0.85;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.profile-stat {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 8px;
  text-align: center;
}
.profile-stat__value {
  font-size: 18px;
  font-weight: 700;
}
.profile-stat__label {
  font-size: 11px;
  color: var(--hint);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hint);
  margin: 18px 4px 8px;
  font-weight: 600;
}

/* --- Draft (тап-пик) --- */
.draft-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--orange);
  font-weight: 600;
}
.draft-banner {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.draft-banner--mine {
  background: var(--green);
  color: #fff;
  animation: pop 0.4s var(--ease-bounce);
}
.draft-pool {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.draft-pool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: var(--card);
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  text-align: left;
  transition: all 0.2s var(--ease-out);
}
.draft-pool-item--pickable { border-color: var(--green); }
.draft-pool-item--pickable:active {
  transform: scale(0.97);
  background: var(--card-hover);
}
.draft-pool-item__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.draft-pool-item__name { flex: 1; font-weight: 500; }
.draft-pool-item__action {
  font-size: 22px;
  color: var(--green);
  font-weight: 700;
}

/* --- Rating chart (sparkline) --- */
.rating-chart {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 6px;
}
.rating-chart__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--hint);
  margin-top: 4px;
}
.rating-chart__meta b { color: var(--blue); }

/* --- Standings --- */
.standings {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.standings__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border-radius: var(--r-md);
  transition: background 0.2s ease;
  animation: fade-in 0.3s var(--ease-out) backwards;
}
.standings__item:hover { background: var(--card-hover); }
.standings__rank {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  background: var(--bg);
  color: var(--hint);
  flex-shrink: 0;
}
.standings__item--gold   .standings__rank { background: linear-gradient(135deg, #ffd700, #ffa500); color: #fff; }
.standings__item--silver .standings__rank { background: linear-gradient(135deg, #e0e0e0, #999); color: #fff; }
.standings__item--bronze .standings__rank { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }

.standings__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
}
.standings__name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.standings__rating {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
  font-size: 15px;
}
.standings__rating--empty { color: var(--hint); font-weight: 500; }

/* --- Back button --- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  transition: background 0.2s ease;
}
.back-btn:hover { background: var(--card-hover); }

/* --- Список ответов --- */
.response-group {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--r-md);
}
.response-group__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hint);
  margin-bottom: 8px;
}
.response-group__names {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

/* =========================================================================
   PUBLIC LANDING
   ========================================================================= */

.public {
  color: var(--text);
  /* Фон — футбольное поле: глубокая зелень + полосы покоса + продольные линии */
  background-color: #0f3d1e;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.025) 0px,
      rgba(255, 255, 255, 0.025) 70px,
      rgba(0, 0, 0, 0.03) 70px,
      rgba(0, 0, 0, 0.03) 140px
    ),
    radial-gradient(ellipse at 50% 0%, rgba(35, 120, 55, 0.55), transparent 60%),
    linear-gradient(180deg, #134a25 0%, #0d3219 100%);
  background-attachment: fixed;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  color: #fff;
  padding: 88px 0 72px;
  overflow: hidden;
  background: #0c2a18;
}
/* Фон-стадион: если положить /static/hero.jpg — подхватится; иначе остаётся затемнение поверх зелени */
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(8, 20, 14, 0.55) 0%, rgba(9, 34, 19, 0.92) 100%),
    url('/static/hero.jpg');
  background-size: cover;
  background-position: center;
}
.hero__inner { position: relative; z-index: 1; }
.hero__card {
  max-width: 620px;
  background: rgba(10, 20, 30, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 34px 32px;
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.hero__title {
  font-size: 52px;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero__accent { color: #3b82f6; }
.hero__tagline {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 10px;
}
.hero .lead {
  font-size: 17px;
  opacity: 0.88;
  margin: 0 0 26px;
  max-width: 520px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease;
  position: relative;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn:active { transform: translateY(0); }
.btn--primary {
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow-md);
}

.block {
  margin: 50px 0;
}
.block__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}
.block h2 {
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0;
}
.block__sub {
  font-size: 14px;
  color: var(--hint);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.public-match {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 18px;
  transition: transform 0.25s var(--ease-out), background 0.25s ease;
  border: 1px solid var(--divider);
  animation: fade-in 0.4s var(--ease-out) backwards;
}
.public-match:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
}
.public-match__date {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.public-match__time {
  color: var(--hint);
  font-size: 14px;
  margin-top: 2px;
}
.public-match__place {
  color: var(--hint);
  font-size: 13px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.public-match__score {
  font-size: 28px;
  font-weight: 800;
  margin-top: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.public-player {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 18px 12px;
  text-align: center;
  transition: transform 0.2s var(--ease-out), background 0.2s ease;
  border: 1px solid var(--divider);
  animation: fade-in 0.4s var(--ease-out) backwards;
}
.public-player:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
}
.public-player__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}
.public-player__photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  display: inline-block;
}
.public-player__name {
  font-weight: 600;
  font-size: 15px;
}
.public-player__info {
  font-size: 12px;
  color: var(--hint);
  margin-top: 4px;
}

.public__footer {
  border-top: 1px solid var(--divider);
  padding: 30px 0;
  text-align: center;
  color: var(--hint);
  font-size: 14px;
  margin-top: 60px;
}

/* Mobile */
@media (max-width: 600px) {
  .hero { padding: 50px 0 40px; }
  .hero__title { font-size: 36px; } .hero__tagline { font-size: 18px; }
  .hero .lead { font-size: 15px; }
  .block h2 { font-size: 22px; }
  .block { margin: 36px 0; }
}

/* --- Guide (как вступить) на витрине --- */
.guide {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}
.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 18px;
  border: 1px solid var(--divider);
}
.guide-step__num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px;
  flex-shrink: 0;
}
.guide-step__text { font-size: 14px; line-height: 1.5; }
.guide-step__text b { font-size: 15px; }

/* ===== Публичная страница матча (модалка) — Блок Y ===== */
.public-match--clickable { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.public-match--clickable:hover { transform: translateY(-2px); }
.public-match__more { margin-top: 8px; font-size: 12px; color: var(--hint); text-align: right; }

.mm-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: mm-fade .15s ease;
}
@keyframes mm-fade { from { opacity: 0; } to { opacity: 1; } }
.mm-card {
  position: relative; width: 100%; max-width: 460px;
  max-height: 88vh; overflow-y: auto;
  background: var(--surface, #1f1f22); color: var(--text, #111);
  border: 1px solid var(--divider);
  border-radius: 18px; padding: 22px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.mm-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--hint, #888); line-height: 1;
}
.mm-loading { text-align: center; opacity: .6; padding: 30px 0; }
.mm-date { font-size: 18px; font-weight: 800; }
.mm-place { color: var(--hint); margin-top: 2px; }
.mm-score { font-size: 30px; font-weight: 800; text-align: center; margin: 12px 0; letter-spacing: 2px; }
.mm-mvp { text-align: center; margin: 6px 0 4px; }
.mm-teams { display: flex; gap: 12px; margin-top: 14px; }
.mm-team { flex: 1; }
.mm-team__title { font-weight: 700; margin-bottom: 6px; }
.mm-team__list { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 1.7; }
.mm-events { margin-top: 10px; font-size: 14px; }
.mm-section-title { margin-top: 16px; font-weight: 700; }
.mm-gallery {
  margin-top: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.mm-photo {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px;
  background: rgba(127,127,127,.15);
}

/* ===== Веб-панель организатора (Блок Z, F8) ===== */
.org-pill {
  font-size: 12px; padding: 2px 10px; border-radius: var(--r-full);
  background: var(--blue); color: #fff; white-space: nowrap;
}
.org-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: var(--r-md, 12px); font-weight: 600;
  font-size: 14px; background: var(--card); color: var(--text);
  border: 1px solid var(--divider); cursor: pointer;
  transition: transform .15s var(--ease-out), background .2s ease;
}
.org-btn:active { transform: scale(0.97); }
.org-btn--primary { background: var(--blue); color: #fff; border-color: transparent; }
.org-btn--danger { background: #b3261e; color: #fff; border-color: transparent; }
.org-btn--wide { width: 100%; margin-top: 10px; }
.org-mini {
  background: transparent; border: 1px solid var(--divider); color: var(--hint);
  border-radius: var(--r-full); padding: 4px 10px; font-size: 13px; cursor: pointer;
}
.org-mini:active { transform: scale(0.95); }
.org-form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.org-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--hint); }
.org-input {
  background: var(--card); border: 1px solid var(--divider); color: var(--text);
  border-radius: var(--r-md, 12px); padding: 11px 13px; font-size: 15px; width: 100%;
}
.org-input--score { width: 64px; text-align: center; }
.org-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.org-actions--wrap > * { flex: 1 1 40%; }
.org-card { background: var(--card); border: 1px solid var(--divider); border-radius: var(--r-lg); padding: 16px; margin-top: 10px; }
.org-card__line { padding: 3px 0; font-size: 15px; }
.org-section { margin-top: 24px; }
.org-section h3 { font-size: 16px; margin: 0 0 10px; }
.org-list { list-style: none; padding: 0; margin: 0; }
.org-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--divider); font-size: 15px; gap: 10px;
}
.org-row--empty { color: var(--hint); font-style: italic; border-bottom: none; }

/* Z2: под-навигация панели организатора */
.org-subnav { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.org-subtab {
  flex: 0 0 auto; padding: 8px 14px; border-radius: var(--r-full);
  background: var(--card); border: 1px solid var(--divider); color: var(--hint);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.org-subtab--active { background: var(--blue); color: #fff; border-color: transparent; }

/* ===== Карточки игрока (Mini App + витрина), Блок AB ===== */
.standings__item--clickable, .public-player--clickable { cursor: pointer; }
.standings__item--clickable:active { transform: scale(0.99); }
.public-player--clickable { transition: transform .15s ease, background .2s ease; }
.public-player--clickable:hover { background: var(--card-hover, rgba(255,255,255,0.04)); }
.public-player--clickable:active { transform: scale(0.98); }

/* статистика в карточке (Mini App) */
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.pstat { background: var(--card); border: 1px solid var(--divider); border-radius: var(--r-md, 12px); padding: 12px 6px; text-align: center; }
.pstat__val { font-size: 20px; font-weight: 700; }
.pstat__label { font-size: 11px; color: var(--hint); margin-top: 2px; }
.pc-contacts { display: flex; gap: 14px; justify-content: center; margin-top: 10px; font-size: 14px; }
.pc-contacts a { color: var(--blue); text-decoration: none; }

/* публичная модалка карточки игрока (витрина) */
.pc-hero { text-align: center; }
.pc-avatar, .pc-avatar-img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 28px; background: linear-gradient(135deg, var(--blue), var(--orange)); color: #fff; }
.pc-name { font-size: 20px; font-weight: 700; }
.pc-sub { font-size: 14px; color: var(--hint); margin-top: 4px; }
.pc-rating { text-align: center; margin: 12px 0; }
.pc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.pc-stat { text-align: center; }
.pc-stat__val { font-size: 20px; font-weight: 700; }
.pc-stat__label { font-size: 11px; color: var(--hint); }
.pc-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.pc-badge { font-size: 12px; padding: 3px 9px; border-radius: var(--r-full); background: var(--card); border: 1px solid var(--divider); }

/* Фикс: скрытая вкладка (атрибут hidden перебивался display:flex у .tab) */
.tab[hidden] { display: none !important; }

/* Блок AC: «показать всех» + новые топ-блоки */
.show-all-btn {
  display: block; width: 100%; margin-top: 12px; padding: 11px;
  background: var(--card); border: 1px solid var(--divider); color: var(--text);
  border-radius: var(--r-md, 12px); font-weight: 600; cursor: pointer;
}
.show-all-btn:hover { background: var(--card-hover); }
.standings__count { color: var(--hint); font-weight: 700; min-width: 28px; text-align: right; }
.standings__count--red { color: #ff6b6b; }
.standings__item--clickable { cursor: pointer; }

/* На фоне-поле блоки делаем плотнее, чтобы текст читался поверх травы */
.public .block { background: rgba(12, 28, 18, 0.72); border-radius: 16px; padding: 14px; margin-bottom: 22px; backdrop-filter: blur(2px); }

/* Hero CTA — синяя кнопка как в референсе СПБ Футбол */
.hero__card .btn--primary { background: #2563eb; color: #fff; border: none; }
.hero__card .btn--primary:hover { background: #1d4ed8; }
