/* Salo.fun Team — стили командной комнаты и лендинга.
   База — ДС пати: ds-tokens.css (токены) + ds-components.css (ds-btn, ds-form,
   ds-link, ds-logo и пр.). Кастом с префиксом .tm- — доска команд, турнирная
   таблица, карточки игр, лендинг: готовых макетов под командную комнату в ДС
   нет, всё собрано из токенов; карточка игры повторяет паттерн каталога party
   (градиентная рамка через :before, обложка 1200×633). */

:root {
  --tm-orange: var(--color-1);
  --tm-cyan: #36c5fe;
  --tm-lavender: var(--color-8);
  --tm-green: #5bdd41;
  --tm-gold: #ffd34e;
  --tm-purple: #b882ff;
  --tm-pink: #ff7eb6;
  --tm-teal: #2dd4bf;
  --tm-blue: #60a5fa;
  --tm-coral: #ff7f6e;
  --tm-lime: #a3e635;
  --tm-indigo: #818cf8;
  --tm-magenta: #e879f9;
  --tm-sky: #38bdf8;
  --tm-rose: #fb7185;
}

body { background: var(--color-10); color: #fff; min-height: calc(var(--vh, 1vh) * 100); margin: 0; }

.tm { max-width: 1100px; margin: 0 auto; padding: 12px 12px 32px; display: flex; flex-direction: column; gap: 14px; }

/* Публичная шапка Team-лендинга: держим визуально близко к site/marathon, не трогая UI Team-комнаты. */
.tm-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 6, 18, .92);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
}
.tm-site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.tm-site-logo {
  display: inline-flex;
  align-items: baseline;
  color: #fff;
  font-family: 'Montserrat', 'Gilroy', sans-serif;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.tm-site-logo__salo { color: #fa4010; }
.tm-site-logo__dot { color: #cfcffd; }
.tm-site-logo__fun { color: #fea036; }
.tm-site-logo__tag {
  margin-left: 8px;
  color: rgba(255, 255, 255, .72);
  font-family: 'Gilroy', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.tm-site-logo__tag--team { color: var(--tm-purple); }
.tm-site-logo__tag--marathon { color: #f1008e; }
.tm-site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 600;
}
.tm-site-nav a {
  color: rgba(255, 255, 255, .74);
  text-decoration: none;
}
.tm-site-nav a:hover,
.tm-site-nav a:focus { color: #fff; }
.tm-site-nav__cta {
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--gradient-2);
}

/* Шапка */
.tm-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; }
.tm-logo-team {
  background: var(--gradient-2);
  color: #fff; border-radius: 8px;
  margin-left: 8px; padding: 2px 8px;
  font-size: 14px; font-weight: 700; letter-spacing: .5px;
  vertical-align: middle;
}
.tm-header__room {
  min-width: 0; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--color-8); font-weight: 600; font-size: 14px;
  background: var(--color-7); border-radius: 10px; padding: 6px 12px;
}

/* Карточки-секции */
.tm-card { background: var(--color-7); border-radius: 16px; padding: 16px; }
.tm-card__title { font-size: 18px; margin: 0 0 12px; }
.tm-card__title i { color: var(--color-1); margin-right: 6px; }
.tm-muted { color: var(--color-8); opacity: .7; font-size: 13px; }

/* Праздничная карточка (вход, баннер игры): градиентная рамка как у каталога party */
.tm-festive { position: relative; background: var(--gradient-3); z-index: 0; }
.tm-festive:before {
  content: ""; position: absolute; inset: 2px; border-radius: 14px;
  background: var(--color-6); z-index: -1;
}

/* Вход */
.tm-join {
  max-width: 420px; width: 100%; margin: 8vh auto 0; text-align: center;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  padding: 28px 20px;
}
.tm-join__emoji { font-size: 44px; line-height: 1; }
.tm-join__title { margin: 0; font-size: 24px; }
.tm-join__text { color: var(--color-8); margin: 0; line-height: 1.5; }
.tm-join .ds-form { margin-top: 6px; }

.tm-error { max-width: 420px; margin: 10vh auto 0; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.tm-loader {
  max-width: 420px;
  width: 100%;
  margin: 8vh auto 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.tm-loader__spinner {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .16);
  border-top-color: var(--color-1);
  animation: tm-spin .8s linear infinite;
}
.tm-loader__title {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.15;
}
@keyframes tm-spin { to { transform: rotate(360deg); } }
.tm-ingame { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; padding: 16px; border-radius: 16px; }
.tm-ingame p { margin: 0; }

/* Приглашение */
.tm-invite { display: flex; flex-direction: column; gap: 8px; }
.tm-invite__row { display: flex; align-items: center; gap: 10px; }
.tm-invite-inline { margin: 10px 0 14px; }
.tm-screen-link {
  align-self: flex-start; color: var(--color-8); opacity: .72; font-size: 12px;
  text-decoration: none; transition: opacity .18s ease, color .18s ease;
}
.tm-screen-link:hover, .tm-screen-link:focus { color: #fff; opacity: 1; }
.tm-screen-link i { margin-right: 5px; color: var(--tm-cyan); }

.tm-team-zone { display: flex; flex-direction: column; gap: 12px; }
.tm-team-zone__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.tm-team-zone__head .tm-card__title { margin-bottom: 4px; }
.tm-team-zone__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tm-team-zone__actions .ds-btn { min-width: 0; }

/* Управление командами (организатор) */
.tm-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-controls__btn { min-width: 40px; padding: 8px 0; }
.tm-controls__count { font-size: 18px; min-width: 18px; text-align: center; }
.tm-controls__hint { color: var(--color-1); font-weight: 600; }

/* Доска команд: идентичность задают название и иконка, не цвет. */
.tm-team-avatar {
  width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; border-radius: 50%;
  background: transparent; color: #fff;
  font-size: 26px; font-weight: 900; overflow: hidden;
}
.tm-team-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-team__name {
  min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.tm-team__chevron { margin-right: 14px; color: var(--color-8); font-size: 12px; transition: transform .2s ease; }
.tm-team__size { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 2px 10px; font-size: 13px; }
.tm-team__players { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }

.tm-player {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0, 0, 0, .2); border-radius: 10px; padding: 5px 8px;
  border: 1px solid transparent;
}
.tm-player--me .tm-player__name { font-weight: 700; }
.tm-player--selected { border-color: var(--color-1); }
.tm-player--offline { opacity: .45; }
.tm-player__name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.tm-player__status {
  width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%;
  background: var(--tm-green); box-shadow: 0 0 0 3px rgba(74, 222, 128, .12);
}
.tm-player--offline .tm-player__status { background: var(--color-8); box-shadow: none; }
.tm-player__you {
  flex: 0 0 auto; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.1); color: var(--color-8); font-size: 11px;
}

/* Главная команда участника — единственный развёрнутый состав по умолчанию. */
.tm-my-team {
  display: grid; gap: 14px; padding: 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(54, 197, 254, .16), rgba(178, 92, 255, .16) 62%, rgba(0,0,0,.12));
  border: 1px solid rgba(255,255,255,.14);
}
.tm-my-team__hero { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tm-team-avatar--large { width: 68px; height: 68px; border-radius: 50%; }
.tm-my-team__identity { min-width: 0; }
.tm-my-team__identity h3 {
  margin: 2px 0 7px; overflow: hidden; color: #fff; font-size: 22px;
  text-overflow: ellipsis; white-space: nowrap;
}
.tm-my-team__eyebrow {
  color: var(--color-8); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.tm-my-team__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-my-team__players { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 7px; }
.tm-player--detailed { min-height: 38px; padding: 7px 9px; background: rgba(0,0,0,.24); }

.tm-conference {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px;
  padding: 12px; border-radius: 13px; background: rgba(0,0,0,.22);
}
.tm-conference__copy { min-width: 0; }
.tm-conference__label {
  display: block; margin-bottom: 4px; color: var(--color-8); font-size: 11px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.tm-conference__url {
  display: block; overflow: hidden; color: #fff; font-size: 14px;
  text-overflow: ellipsis; white-space: nowrap;
}
.tm-conference__join { min-width: 0; white-space: nowrap; text-decoration: none; }

.tm-other-team-zone { display: grid; gap: 9px; }
.tm-other-team-zone__head h3 { margin: 0 0 3px; color: #fff; font-size: 18px; }
.tm-other-team-zone__head p { margin: 0; }
.tm-other-teams {
  overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  background: rgba(0,0,0,.16);
}
.tm-other-team { border-bottom: 1px solid rgba(255,255,255,.1); }
.tm-other-team:last-child { border-bottom: 0; }
.tm-other-team__toggle {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 16px;
  align-items: center; gap: 10px; width: 100%; padding: 9px 11px;
  border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.tm-other-team__toggle:hover { background: rgba(255,255,255,.05); }
.tm-other-team__avatar {
  display: grid; width: 36px; height: 36px; place-items: center; overflow: hidden;
  border-radius: 50%; background: transparent; color: #fff; font-weight: 700;
}
.tm-other-team__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-other-team__name {
  min-width: 0; overflow: hidden; color: #fff; font-weight: 700;
  text-overflow: ellipsis; white-space: nowrap;
}
.tm-other-team__online { color: var(--color-8); font-size: 13px; white-space: nowrap; }
.tm-other-team .tm-team__chevron { margin: 0; }
.tm-other-team.expanded .tm-team__chevron { transform: rotate(180deg); }
.tm-other-team__players {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  min-height: 0; padding: 2px 11px 11px 57px;
}

/* Инлайн-поле переименования команды */
.tm-input--small {
  flex: 1; min-width: 0; background: var(--color-9); border: 1px solid var(--color-5);
  border-radius: 8px; color: #fff; padding: 4px 8px; font-size: 14px; outline: none;
}
.tm-input--small:focus { border-color: var(--color-1); }

.tm-iconbtn { background: none; border: none; color: var(--color-8); cursor: pointer; padding: 2px 6px; font-size: 13px; }
.tm-iconbtn:hover { color: var(--color-1); }
.tm-iconbtn:disabled { opacity: .3; cursor: default; }
.tm-iconbtn:disabled:hover { color: var(--color-8); }

/* Попап «Управление командами»: ds-popup, но фиксированный к окну страницы
   (в ДС панель абсолютная — рассчитана на контейнер игры) */
.tm-manage .ds-popup__overlay { position: fixed; z-index: 30; }
.tm-manage__panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  right: auto; bottom: auto;
  width: min(680px, calc(100vw - 24px)); max-height: min(80vh, 640px);
  border-radius: 16px; padding: 16px; z-index: 31;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.tm-manage .ds-popup__body { min-height: 0; overflow-y: auto; }
.tm-manage-invite { display: grid; gap: 8px; margin-bottom: 12px; }
.tm-unassigned {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding: 12px; border: 1px solid rgba(255,155,66,.28);
  border-radius: 12px; background: rgba(255,155,66,.08);
}
.tm-unassigned > div { min-width: 0; display: grid; gap: 3px; }
.tm-unassigned > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-conference-settings { display: grid; gap: 10px; }
.tm-conference-settings > .tm-muted { margin: 0 0 2px; }
.tm-conference-field {
  display: grid; grid-template-columns: minmax(160px, .8fr) minmax(0, 1.4fr);
  align-items: center; gap: 10px; padding: 8px; border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.tm-conference-field__input {
  width: 100%; min-width: 0; border: 1px solid var(--color-5); border-radius: 9px;
  background: var(--color-9); color: #fff; padding: 9px 10px; font: inherit; font-size: 14px;
}
.tm-conference-field__input:focus { border-color: var(--color-1); outline: none; }
.tm-conference-settings__error {
  margin: 0; padding: 8px 10px; border-radius: 10px;
  background: rgba(251, 113, 133, .12); color: #fecdd3; font-size: 13px;
}
.tm-profile__panel { width: min(420px, calc(100vw - 24px)); }
.tm-profile { display: grid; gap: 10px; }
.tm-profile__label { color: var(--color-8); font-size: 13px; }
.tm-host-transfer {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.tm-host-transfer__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tm-host-transfer__player {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0,0,0,.22);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.tm-host-transfer__player span { color: var(--color-8); }
.tm-host-transfer__player.offline { opacity: .45; }
.tm-host-transfer__player.active,
.tm-host-transfer__player:disabled { cursor: default; opacity: .55; }
.tm-manage__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 2px; }
.tm-mteam {
  display: flex; flex-direction: column; gap: 6px; min-height: 104px;
  background: var(--color-6); border-radius: 12px; padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
}
.tm-mteam__head { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.tm-mteam__avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: transparent; }
.tm-mteam__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-mteam__name { font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-mteam__actions { display: flex; gap: 6px; margin-top: auto; }
.tm-mteam__players { display: flex; flex-direction: column; gap: 5px; }
.tm-mplayer-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 5px; }
.tm-mplayer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 0; border: 1px solid transparent; border-radius: 8px;
  padding: 5px 7px; background: rgba(0,0,0,.22); color: #fff; cursor: pointer;
  font: inherit; font-size: 13px; text-align: left;
}
.tm-mplayer-remove {
  display: grid;
  width: 28px;
  border: 0;
  border-radius: 8px;
  place-items: center;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.62);
  cursor: pointer;
}
.tm-mplayer-remove:hover { background: rgba(255,80,80,.18); color: #fff; }
.tm-mplayer span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-mplayer.active { border-color: var(--color-1); color: var(--color-1); }
.tm-mplayer.offline { opacity: .45; }
.tm-mplayer i { color: var(--tm-gold); }
.tm-mteam--add {
  align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  color: var(--color-8); border-style: dashed; font: inherit;
}
.tm-mteam--add:hover { color: var(--color-1); border-color: var(--color-1); }
.tm-mteam--add i { font-size: 20px; }

/* Завершённые игры: одна и та же карточка для свежей и прошлых игр. */
.tm-history { display: grid; gap: 12px; margin-top: 14px; }
.tm-match-card { position: relative; padding: 16px; border-radius: 16px; cursor: pointer; }
.tm-match-card__kicker { margin: 0 0 10px; color: var(--color-1); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.tm-match-card__summary { display: grid; gap: 12px; }
.tm-match-card__game { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: start; gap: 14px; }
.tm-match-card__cover { width: 100%; aspect-ratio: 1200 / 633; object-fit: cover; border-radius: 10px; }
.tm-match-card h3 { margin: 0 0 6px; font-size: 20px; text-align: left; }
.tm-match-card__excerpt { margin: 0; color: var(--color-8); font-size: 14px; line-height: 1.45; text-align: left; }
.tm-match-card__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-match-card__facts > span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(0,0,0,.2); color: var(--color-8); font-size: 12px; }
.tm-match-card__facts i { color: var(--color-1); }
.tm-match-card__facts b { color: #fff; font-size: 14px; }
.tm-match-card__rating-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); }
.tm-match-card__rating-label { color: var(--color-8); font-size: 12px; }
.tm-match-card__rating { color: var(--color-1); font-size: 18px; font-weight: 800; white-space: nowrap; }
.tm-match-card__rating small { color: var(--color-8); font-size: 12px; font-weight: 500; }
.tm-match-card__winner { display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.2); }
.tm-match-card__winner > span { color: var(--color-8); font-size: 12px; }
.tm-match-card__winner .tm-team-identity { color: #fff; }
.tm-match-card__winner .tm-team-identity > :last-child { color: #fff; font-size: 14px; }
.tm-match-card__winner-more { color: var(--color-1); font-size: 12px; white-space: nowrap; }
.tm-match-card__time { position: absolute; top: 16px; right: 16px; color: var(--color-8); font-size: 12px; opacity: .7; }
.tm-match-card__details { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 14px; }
.tm-match-table { display: grid; gap: 6px; }
.tm-match-table__row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.2); font-size: 13px; }
.tm-match-table__cups { color: var(--color-1); font-weight: 700; }
.tm-match-vote { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding-top: 10px; }
.tm-match-vote > span { margin-right: 6px; font-weight: 700; }
.tm-match-vote > .tm-match-vote__stars { display: inline-flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 0; margin-right: 0; white-space: nowrap; }
.tm-match-vote__star { padding: 0 2px; border: 0; background: none; color: rgba(255,255,255,.24); font-size: 25px; cursor: pointer; }
.tm-match-vote__star.active, .tm-match-vote__star:hover { color: var(--color-1); }
.tm-match-vote--compact { flex-basis: 100%; margin-top: 2px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.tm-match-card__toggle { display: grid; width: 44px; height: 44px; margin: 8px auto -6px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--color-8); font: inherit; font-size: 16px; cursor: pointer; }
.tm-match-card__toggle:hover,.tm-match-card__toggle:focus-visible { background: rgba(255,255,255,.13); color: #fff; }
.tm-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-1);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tm-link-btn:hover { color: #fff; }
.tm-history-link {
  width: fit-content;
  color: var(--color-1);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.tm-history-link:hover { color: #fff; }
.tm-history-link--archive {
  display: inline-flex;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 173, 35, .32);
  border-radius: 10px;
  background: rgba(255, 173, 35, .08);
}
/* Ссылки истории вечера: публичная для всех участников + HR-отчёт только
   хосту (brief §16). Якорь полей payload: publicHistoryUrl/hrHistoryUrl в
   app/team/backend/team_party_model/party.go. */
.tm-history-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.tm-history-links .tm-history-link--archive { margin-top: 0; align-items: center; gap: 7px; }
.tm-history-link--hr {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .06);
}

/* Турнир: компактная таблица с общими колонками для всех коман. */
.tm-tournament-scroll { width: max-content; max-width: 100%; overflow-x: auto; }
.tm-tournament { width: max-content; border-collapse: separate; border-spacing: 0 6px; }
.tm-tournament__place-col { width: 64px; }
.tm-tournament__team-col { width: auto; }
.tm-tournament__points-col { width: 1%; }
.tm-tournament__row > td {
  padding: 8px 6px;
  background: var(--color-9);
  vertical-align: middle;
}
.tm-tournament__row > td:first-child {
  padding-left: 12px;
  border-left: 4px solid rgba(255,255,255,.18);
  border-radius: 10px 0 0 10px;
}
.tm-tournament__row > td:last-child { padding-right: 12px; border-radius: 0 10px 10px 0; }
.tm-tournament__place-group { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; }
.tm-tournament__place { font-weight: 700; text-align: center; }
.tm-tournament__name { font-weight: 600; }
.tm-tournament__points { display: grid; justify-items: end; font-weight: 700; color: var(--color-1); font-size: 17px; white-space: nowrap; }
.tm-tournament__points b { font: inherit; }
.tm-tournament__points-delta { color: #4ade80; font-size: 11px; font-style: normal; }
.tm-tournament__delta {
  color: #4ade80;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.tm-tournament__delta.down { color: #fb7185; }
.tm-empty-tournament { border: 1px dashed rgba(255,255,255,.14); }

/* Единая идентичность конкретной команды: avatar всегда идёт с именем. */
.tm-team-identity { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tm-team-identity--table { flex: 1; }
.tm-team-identity__avatar { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; overflow: hidden; border-radius: 50%; background: transparent; color: #fff; font-size: 12px; }
.tm-team-identity__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-team-identity > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Каталог игр: карточки с обложками по паттерну каталога party */
.tm-games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tm-game {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 10px; border-radius: 10px; text-align: center;
  background: var(--gradient-3); z-index: 0;
}
.tm-game:before {
  content: ""; position: absolute; inset: 2px; border-radius: 9px;
  background: var(--color-6); z-index: -1;
}
.tm-game__cover { width: 100%; aspect-ratio: 1200 / 633; object-fit: cover; border-radius: 8px; display: block; }
.tm-game__label { font-size: 16px; color: var(--color-1); font-weight: 600; margin: 0; }
.tm-game__scale { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.tm-game__scale span { padding: 4px 7px; border: 1px solid rgba(107, 226, 159, .3); border-radius: 999px; color: #b9f7d3; background: rgba(36, 143, 87, .2); font-size: 11px; font-weight: 800; }
.tm-game__excerpt { margin: 0; color: var(--color-8); font-size: 13px; line-height: 1.4; flex: 1; }
.tm-game__action { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.tm-games-soon {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 217, 102, .58);
  border-radius: 14px;
  background: linear-gradient(112deg, rgba(255, 171, 64, .24), rgba(178, 92, 255, .30));
  box-shadow: 0 10px 28px rgba(50, 16, 94, .26);
}
.tm-games-soon__spark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 232, 150, .18);
  color: #ffe896;
  font-size: 25px;
  line-height: 1;
}
.tm-games-soon__title { margin: 0; color: #fff4ca; font-size: 16px; font-weight: 800; }
.tm-games-soon__text { margin: 3px 0 0; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.35; }

@media (min-width: 768px) {
  .tm-games { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .tm-team-zone__head { flex-direction: column; }
  .tm-team-zone__actions { width: 100%; justify-content: stretch; }
  .tm-team-zone__actions .ds-btn { flex: 1 1 auto; }
  .tm-match-card__game { grid-template-columns: 92px minmax(0, 1fr); }
  .tm-match-table__row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .tm-match-table__cups { grid-column: auto; white-space: nowrap; }
  .tm-team__chevron { margin-right: 12px; }
  .tm-other-team .tm-team__chevron { margin-right: 0; }
  .tm-conference { grid-template-columns: 1fr; align-items: stretch; }
  .tm-conference .ds-btn { width: 100%; }
  .tm-conference-field { grid-template-columns: 1fr; }
  .tm-other-team__toggle { grid-template-columns: 36px minmax(0, 1fr) 16px; }
  .tm-other-team__online { display: none; }
  .tm-other-team__players { grid-template-columns: 1fr; padding-left: 11px; }
  .tm-tournament-scroll, .tm-tournament { width: 100%; }
  .tm-tournament { table-layout: fixed; }
  .tm-tournament__place-col { width: 54px; }
  .tm-tournament__points-col { width: 112px; }
  .tm-tournament .tm-team-identity--table { display: flex; width: 100%; max-width: 100%; }
  .tm-games-soon { padding: 13px 14px; gap: 11px; }
  .tm-games-soon__spark { flex-basis: 34px; width: 34px; height: 34px; font-size: 22px; }
}

/* Уведомление об отклонённом действии (claim в grace-окне и пр.) */
.tm-notice {
  background: color-mix(in srgb, var(--tm-gold) 16%, var(--color-7));
  border: 1px solid color-mix(in srgb, var(--tm-gold) 40%, transparent);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}

/* Заметка о роли ведущего в шапке блока команд */
.tm-host-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  text-align: right;
}
.tm-onboarding {
  display: flex; align-items: flex-start; gap: 10px;
  background: linear-gradient(90deg, rgba(54, 197, 254, .12) 0%, var(--color-7) 60%);
  border-left: 3px solid var(--tm-cyan);
}
.tm-onboarding__text { margin: 0; font-size: 14px; line-height: 1.5; flex: 1; }
.tm-onboarding__close { margin-top: 2px; }

/* Бейдж Бета */
.tm-beta {
  display: inline-block;
  background: var(--gradient-2);
  color: #fff; border-radius: 8px;
  padding: 2px 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  vertical-align: middle; margin-left: 6px;
}

/* 3 шага на лендинге */
.tm-steps {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  width: 100%;
}
.tm-step {
  display: flex; align-items: center; gap: 8px;
  background: var(--color-7); border-radius: 10px; padding: 8px 14px;
}
.tm-step__num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gradient-2); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tm-step__text { font-size: 14px; font-weight: 500; }

.tm-landing {
  max-width: 1120px; margin: 0 auto; padding: 42px 20px 60px;
  display: flex; flex-direction: column; gap: 22px; align-items: center; text-align: center;
}
.tm-hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  text-align: left;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(78, 0, 169, .24), rgba(241, 0, 142, .12) 48%, rgba(254, 160, 54, .08));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
  box-sizing: border-box;
}
.tm-hero__content { min-width: 0; }
.tm-hero__badge { margin: 0 0 20px; }
.tm-landing__brand { margin: 0 0 12px; font-size: 28px; line-height: 1.12; }
.tm-landing__title { margin: 0 0 16px; font-size: 48px; line-height: 1.12; }
.tm-landing__title b { color: var(--color-1); }
.tm-brand-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  font-family: 'Montserrat', 'Gilroy', sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.tm-brand-lockup__salo { color: #fa4010; }
.tm-brand-lockup__dot { color: #cfcffd; }
.tm-brand-lockup__fun { color: #fea036; }
.tm-brand-lockup__suffix {
  margin-left: 12px;
  text-transform: none;
}
.tm-brand-lockup__suffix--team { color: var(--tm-purple); }
.tm-brand-lockup__suffix--marathon { color: #f1008e; }
.tm-inline-brand {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  font-weight: 800;
}
.tm-inline-brand__salo { color: #fa4010; }
.tm-inline-brand__dot { color: #cfcffd; }
.tm-inline-brand__fun { color: #fea036; }
.tm-inline-brand__suffix {
  margin-left: 5px;
  text-transform: none;
}
.tm-inline-brand__suffix--team { color: var(--tm-purple); }
.tm-inline-brand__suffix--marathon { color: #f1008e; }
.tm-landing__sub { color: rgba(255, 255, 255, .86); line-height: 1.55; margin: 0 0 28px; font-size: 20px; max-width: 680px; }
.tm-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tm-hero__link {
  color: rgba(255, 255, 255, .76);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.tm-landing__button {
  font-size: 17px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--gradient-2);
  color: #fff;
  border: 0;
  text-transform: none;
}
.tm-landing__hint { color: var(--color-8); opacity: .7; font-size: 14px; margin: 12px 0 0; }
.tm-hero-panel {
  min-height: 320px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(6, 8, 24, .72);
  border: 1px solid rgba(255, 255, 255, .12);
}
.tm-hero-panel__title {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}
.tm-hero-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tm-hero-panel__metric {
  min-height: 96px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
}
.tm-hero-panel__value {
  display: block;
  margin-bottom: 6px;
  color: var(--color-1);
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}
.tm-hero-panel__label {
  display: block;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  line-height: 1.35;
}
.tm-hero-panel__flow {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}
.tm-hero-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .07);
  font-size: 14px;
}
.tm-hero-panel__bar {
  flex: 1;
  height: 8px;
  max-width: 170px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4E00A9, #F1008E, #fea036);
}
.tm-proof {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  width: 100%;
}
.tm-proof__item {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 12px;
}
.tm-proof__value {
  margin: 0 0 4px;
  color: var(--color-1);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
}
.tm-proof__label {
  margin: 0;
  color: var(--color-8);
  font-size: 13px;
  line-height: 1.35;
}
.tm-landing__covers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; }
.tm-landing__covers .tm-game__cover { border-radius: 8px; }
.tm-landing__feats { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.tm-feat {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--color-7); border-radius: 14px; padding: 12px 16px;
}
.tm-feat__emoji { font-size: 28px; line-height: 1; }
.tm-feat__text { margin: 0; line-height: 1.45; }
.tm-feat__text b { color: var(--color-1); }

@media (min-width: 576px) {
  .tm-landing__covers { grid-template-columns: repeat(3, 1fr); }
  .tm-proof { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .tm-hero { grid-template-columns: minmax(0, 1fr) 390px; padding: 42px; }
}

@media (max-width: 760px) {
  .tm-site-header__inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .tm-site-nav { width: 100%; flex-wrap: wrap; gap: 12px 14px; }
  .tm-site-nav a { white-space: nowrap; }
  .tm-site-nav__cta { flex: 1 0 100%; text-align: center; }
  .tm-landing { padding: 28px 16px 48px; }
  .tm-hero { padding: 22px; border-radius: 22px; }
  .tm-landing__brand { font-size: 22px; }
  .tm-landing__title { font-size: 32px; }
  .tm-landing__sub { font-size: 20px; }
  .tm-hero__actions { align-items: stretch; flex-direction: column; }
  .tm-hero__actions .ds-btn { width: 100%; }
  .tm-hero-panel { min-height: auto; }
}

@media (max-width: 480px) {
  .tm-hero-panel__grid { grid-template-columns: 1fr; }
}

/* Organizer section */
.tm-organizer {
  width: 100%;
  text-align: left;
  background: var(--color-7);
  border-radius: 14px;
  padding: 16px 20px;
}
.tm-organizer__title {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--color-1);
}
.tm-organizer__list {
  margin: 0;
  padding-left: 20px;
  color: var(--color-8);
  line-height: 1.6;
  font-size: 15px;
}
.tm-organizer__list li { margin-bottom: 4px; }

/* Lead capture */
.tm-lead {
  width: 100%;
  background: var(--color-7);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.tm-lead__title {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.3;
}
.tm-lead__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.tm-lead__form .tm-input--small {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  box-sizing: border-box;
}
.tm-lead__form textarea.tm-input--small {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}
.tm-lead__success {
  color: var(--tm-green);
  font-size: 16px;
  font-weight: 600;
  margin: 12px 0 0;
}

/* Invite block */
.tm-invite-landing {
  width: 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tm-green) 12%, var(--color-7)) 0%, var(--color-7) 60%);
  border: 1px solid color-mix(in srgb, var(--tm-green) 30%, transparent);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.tm-invite-landing__title {
  margin: 0 0 16px;
  font-size: 20px;
  color: var(--tm-green);
}
.tm-invite-landing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.tm-program {
  display: grid; gap: 15px; margin: 16px 0;
  border: 1px solid rgba(108,75,220,.32);
  background: linear-gradient(135deg, rgba(108,75,220,.14), rgba(255,155,66,.08));
}
.tm-program__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.tm-program__head h2 { margin: 3px 0 4px; font-size: 22px; }
.tm-program__head p { margin: 0; color: var(--color-8); }
.tm-program__eyebrow,.tm-team-choice__eyebrow {
  color: var(--color-1); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
}
.tm-program__action { display: grid; justify-items: end; gap: 7px; text-align: right; }
.tm-program__steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tm-program__steps li {
  display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(0,0,0,.16);
}
.tm-program__steps li > b {
  display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,.12);
}
.tm-program__steps li > div { min-width: 0; display: grid; gap: 2px; }
.tm-program__steps li > div span { overflow: hidden; color: var(--color-8); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tm-program__steps li > em { color: var(--color-8); font-size: 11px; font-style: normal; font-weight: 700; text-transform: uppercase; }
.tm-program__steps li.done { opacity: .58; }
.tm-program__steps li.done > b { background: var(--tm-green); }
.tm-program__steps li.next { border-color: rgba(108,75,220,.62); background: rgba(108,75,220,.14); }
.tm-program__steps li.next > b { background: var(--color-1); }
.tm-program__toggle {
  justify-self: start; padding: 0; border: 0; color: var(--tm-purple);
  background: transparent; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}
.tm-finale {
  position: relative; isolation: isolate; overflow: hidden; padding: clamp(22px, 5vw, 42px);
  border: 1px solid rgba(255,211,78,.62);
  background:
    radial-gradient(circle at 50% -15%, rgba(255,211,78,.35), transparent 42%),
    radial-gradient(circle at 90% 18%, rgba(255,126,182,.26), transparent 32%),
    linear-gradient(145deg, rgba(108,75,220,.54), rgba(35,15,77,.96) 58%, rgba(255,126,182,.17));
  box-shadow: 0 24px 70px rgba(32,10,77,.42), inset 0 1px rgba(255,255,255,.08);
  text-align: center;
}
.tm-finale::after {
  content: ""; position: absolute; z-index: -1; left: 12%; right: 12%; top: 110px; height: 120px;
  background: radial-gradient(ellipse, rgba(255,211,78,.18), transparent 68%);
  filter: blur(20px);
}
.tm-finale__confetti span {
  position: absolute; z-index: -1; color: var(--tm-gold); font-size: 14px; opacity: .68;
}
.tm-finale__confetti span:nth-child(1) { left: 7%; top: 8%; transform: rotate(18deg); }
.tm-finale__confetti span:nth-child(2) { left: 18%; top: 21%; color: var(--tm-green); font-size: 8px; }
.tm-finale__confetti span:nth-child(3) { right: 8%; top: 12%; color: var(--tm-pink); transform: rotate(-14deg); }
.tm-finale__confetti span:nth-child(4) { right: 19%; top: 28%; color: var(--tm-blue); font-size: 9px; }
.tm-finale__confetti span:nth-child(5) { left: 5%; top: 43%; color: var(--tm-pink); transform: rotate(32deg); }
.tm-finale__intro { position: relative; z-index: 1; }
.tm-finale__intro h1 { margin: 8px 0; font-size: clamp(30px, 6vw, 52px); line-height: 1.05; }
.tm-finale__intro p {
  margin: 0 auto 20px; color: var(--color-8); font-size: clamp(16px, 3vw, 21px);
}
.tm-finale__intro p b { color: #fff; }
.tm-finale__winner { display: grid; justify-items: center; gap: 5px; }
.tm-finale__winner-copy { color: var(--color-8); }
.tm-finale__winner-name { display: block; max-width: 100%; color: #fff; font-size: clamp(21px, 4vw, 30px); line-height: 1.12; overflow-wrap: anywhere; }
.tm-finale__podium {
  position: relative; z-index: 1; width: min(620px, 100%); display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 26px auto 16px;
}
.tm-finale__podium-team {
  min-width: 0; min-height: 122px; display: grid; justify-items: center; align-content: center; gap: 6px;
  padding: 14px 8px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.2));
  box-shadow: 0 14px 30px rgba(0,0,0,.2);
}
.tm-finale__podium-toggle {
  width: 100%; min-width: 0; display: grid; justify-items: center; gap: 6px; padding: 0;
  border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.tm-finale__podium-toggle > i { color: var(--color-8); font-size: 12px; }
.tm-finale__podium-team--1 {
  min-height: 148px; order: 2; border-color: rgba(255,211,78,.72);
  background: linear-gradient(180deg, rgba(255,211,78,.25), rgba(0,0,0,.22));
  transform: translateY(-10px);
}
.tm-finale__podium-team--2 { min-height: 132px; order: 1; }
.tm-finale__podium-team--3 { order: 3; }
.tm-finale__podium-team .tm-team-identity__avatar { width: 48px; height: 48px; }
.tm-finale__podium-team--1 .tm-team-identity__avatar { width: 58px; height: 58px; }
.tm-finale__podium-toggle > b {
  overflow: hidden; max-width: 100%; display: -webkit-box; min-height: 2.3em;
  color: #fff; font-size: 14px; line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.tm-finale__podium-toggle > strong { color: var(--tm-gold); font-size: 14px; }
.tm-finale__roster { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); }
.tm-finale__roster > span { padding: 3px 7px; border-radius: 999px; background: rgba(0,0,0,.22); color: #fff; font-size: 11px; }
.tm-finale__place {
  display: grid; min-width: 28px; height: 28px; padding-inline: 7px; place-items: center;
  border-radius: 999px; color: var(--color-10); background: var(--tm-gold); font-size: 12px; font-weight: 900;
}
.tm-finale__eyebrow {
  color: var(--tm-gold); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}
.tm-finale__facts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tm-finale__facts span {
  padding: 8px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  position: relative; z-index: 1; background: rgba(0,0,0,.24); color: #fff; font-size: 13px;
}
.tm-finale__feedback {
  position: relative; z-index: 1; width: min(760px, 100%); display: grid;
  grid-template-columns: minmax(220px, 1fr) auto; gap: 12px 20px; margin: 24px auto 0; padding: clamp(18px, 4vw, 26px);
  border: 1px solid rgba(91,221,65,.58); border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(91,221,65,.18), transparent 38%),
    rgba(16,8,42,.74);
  box-shadow: 0 18px 40px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.08);
  text-align: left;
}
.tm-finale__feedback-copy { display: grid; align-content: center; gap: 3px; }
.tm-finale__feedback-copy > span {
  color: var(--tm-green); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
}
.tm-finale__feedback-copy strong { color: #fff; font-size: clamp(22px, 4vw, 30px); line-height: 1.1; }
.tm-finale__feedback-copy p { margin: 4px 0 0; color: var(--color-8); font-size: 13px; line-height: 1.4; }
.tm-finale__feedback .tm-event-feedback__stars { align-self: center; justify-self: end; }
.tm-event-feedback__stars { display: flex; }
.tm-event-feedback__stars button {
  padding: 2px; border: 0; color: rgba(255,255,255,.36); background: transparent;
  font-size: clamp(30px, 5vw, 38px); line-height: 1; cursor: pointer; transition: color .15s ease, transform .15s ease;
}
.tm-event-feedback__stars button:hover { color: rgba(255,211,78,.68); transform: translateY(-2px); }
.tm-event-feedback__stars button.active { color: var(--tm-gold); text-shadow: 0 0 18px rgba(255,211,78,.32); }
.tm-finale__rating-hint { grid-column: 2; color: var(--color-8); font-size: 11px; text-align: right; }
.tm-finale__feedback textarea {
  grid-column: 1 / -1; width: 100%; min-height: 76px; resize: vertical; padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #fff; background: rgba(5,2,20,.58);
  font: inherit; line-height: 1.35;
}
.tm-finale__feedback textarea:focus { border-color: var(--tm-green); outline: 2px solid rgba(91,221,65,.18); }
.tm-finale__feedback textarea::placeholder { color: rgba(255,255,255,.42); }
.tm-finale__feedback-submit { grid-column: 1 / -1; width: 100%; min-height: 48px; }
.tm-finale__thanks {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px; text-align: left;
}
.tm-finale__thanks > span {
  display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center;
  border-radius: 50%; color: var(--color-10); background: var(--tm-green); font-size: 24px; font-weight: 900;
}
.tm-finale__thanks strong { color: var(--tm-green); font-size: 20px; }
.tm-finale__thanks p { margin: 3px 0 0; color: var(--color-8); font-size: 13px; }
.tm-tournament-zone { padding-block: clamp(20px, 4vw, 34px); }
.tm-continuation { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.tm-continuation h2 { margin: 4px 0 6px; }
.tm-match-vote--saved {
  width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px 10px;
  border: 1px solid rgba(91,221,65,.32); border-radius: 10px; color: #fff;
  background: rgba(91,221,65,.08); font: inherit; cursor: pointer;
}
.tm-match-vote--saved b { color: var(--tm-gold); }
.tm-match-vote--saved small { margin-left: auto; color: var(--color-8); }
.tm-host-next {
  position: fixed; z-index: 45; left: 50%; bottom: max(10px, env(safe-area-inset-bottom));
  width: min(680px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 12px 11px 16px; border: 1px solid rgba(255,155,66,.5); border-radius: 16px;
  background: rgba(24,12,56,.94); box-shadow: 0 18px 50px rgba(0,0,0,.46);
  backdrop-filter: blur(18px); transform: translateX(-50%);
}
.tm-host-next > div { min-width: 0; display: grid; gap: 2px; }
.tm-host-next span { color: var(--color-8); font-size: 11px; text-transform: uppercase; }
.tm-host-next b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-host-next .ds-btn { min-height: 44px; flex: 0 0 auto; }
.tm-host-next__blocked { display: block; max-width: 520px; color: #fff; font-size: 12px; line-height: 1.3; }
.tm-host-next__blocked strong { color: var(--tm-gold); white-space: normal; }

.tm-header { order: -100; }
.tm-ingame { order: -90; }
.tm-onboarding { order: -89; }
.tm-notice { order: -88; }
.tm-team-choice { order: -87; }
.tm-lobby--before .tm-team-zone { order: -40; }
.tm-lobby--before .tm-program { order: -30; }
.tm-lobby--before .tm-games-zone { order: -20; }
.tm-lobby--between .tm-tournament-zone { order: -50; }
.tm-lobby--between .tm-team-zone { order: -40; }
.tm-lobby--between .tm-program { order: -30; }
.tm-lobby--between .tm-games-zone { order: -20; }
.tm-lobby--finale .tm-finale { order: -60; }
.tm-lobby--finale .tm-tournament-zone { order: -50; }
.tm-lobby--finale .tm-team-zone { order: -30; }
.tm-lobby--finale .tm-games-zone { order: -20; }
.tm-report-zone { order: 10; }
.tm-lobby--host { padding-bottom: max(112px, calc(92px + env(safe-area-inset-bottom))); }
.tm-team-choice {
  margin: 16px 0; border: 1px solid rgba(54,197,254,.28);
  background: linear-gradient(135deg, rgba(54,197,254,.12), rgba(108,75,220,.08));
}
.tm-team-choice h2 { margin: 4px 0 6px; }
.tm-team-choice > p { margin: 0; }
.tm-team-choice__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.tm-team-choice__item { display: grid; justify-items: center; gap: 7px; padding: 15px; border: 1px solid var(--color-7); border-radius: 12px; background: var(--color-10); }
.tm-team-choice__item:hover { border-color: var(--color-1); }
.tm-team-choice__count { color: var(--color-8); font-size: 12px; }
.tm-team-choice__roster {
  display: grid; width: 44px; min-width: 44px; height: 44px; place-items: center; padding: 0; border: 0; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,.08); font: inherit; font-size: 18px; cursor: pointer;
}
.tm-team-choice__roster:hover,.tm-team-choice__roster:focus-visible { background: rgba(255,255,255,.16); }
.tm-team-choice__members {
  width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
  padding: 9px; border-radius: 9px; background: rgba(255,255,255,.055);
}
.tm-team-choice__members > span { padding: 3px 7px; border-radius: 999px; color: #fff; background: rgba(255,255,255,.1); font-size: 12px; }
.tm-team-choice__item .ds-btn { width: 100%; margin-top: 3px; }
.tm-continuation__matches { display:grid; gap:8px; margin-top:12px; }
.tm-continuation__matches article { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid rgba(255,255,255,.1); border-radius:10px; background:rgba(255,255,255,.045); }
.tm-continuation__matches article > div { display:grid; gap:2px; min-width:0; }
.tm-continuation__matches article b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-continuation__matches article span,.tm-continuation__matches time { color:var(--color-8); font-size:12px; }
.tm-continuation__score-title { margin: 16px 0 8px; color: #fff; font-size: 15px; }
.tm-continuation__score { display: grid; gap: 6px; }
.tm-continuation__score > div { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.2); }
.tm-continuation__score > div > strong { color: var(--tm-gold); white-space: nowrap; }
.tm-continuation > .tm-history-link { display: inline-flex; gap: 6px; margin-top: 12px; }
@media (max-width: 640px) {
  .tm-program__head,.tm-unassigned { align-items: stretch; flex-direction: column; }
  .tm-program__action { justify-items: stretch; text-align: left; }
  .tm-program__action .ds-btn { width: 100%; }
  .tm-program__steps li { grid-template-columns: 30px minmax(0,1fr); }
  .tm-program__steps li > em { grid-column: 2; }
  .tm-program__steps li > div span { white-space: normal; }
  .tm-program { gap: 10px; padding: 13px; }
  .tm-program__head h2 { font-size: 18px; }
  .tm-program__action { display: none; }
  .tm-host-next { align-items: stretch; }
  .tm-host-next .ds-btn { padding-inline: 16px; }
  .tm-finale { padding: 20px 14px; }
  .tm-finale__intro p { margin-bottom: 14px; }
  .tm-finale__podium { gap: 6px; margin-top: 22px; }
  .tm-finale__podium-team { min-height: 112px; padding: 10px 5px; border-radius: 14px; }
  .tm-finale__podium-team--1 { min-height: 132px; transform: translateY(-7px); }
  .tm-finale__podium-team .tm-team-identity__avatar { width: 40px; height: 40px; }
  .tm-finale__podium-team--1 .tm-team-identity__avatar { width: 48px; height: 48px; }
  .tm-finale__podium-toggle > b { font-size: 12px; }
  .tm-finale__podium-toggle > strong { font-size: 12px; }
  .tm-finale__facts span { padding: 7px 9px; font-size: 11px; }
  .tm-finale__feedback { grid-template-columns: 1fr; gap: 10px; margin-top: 18px; padding: 17px; }
  .tm-finale__feedback .tm-event-feedback__stars { justify-self: start; }
  .tm-finale__rating-hint { grid-column: 1; text-align: left; }
  .tm-finale__feedback textarea,.tm-finale__feedback-submit { grid-column: 1; }
}

@media (max-width: 560px) {
  .tm-games { grid-template-columns: 1fr; }
  .tm-game { padding: 12px; gap: 10px; }
  .tm-game__scale { display: none; }
  .tm-game__label { font-size: 18px; }
  .tm-game__excerpt { font-size: 14px; }
  .tm-host-next { gap: 8px; padding: 10px 12px; }
  .tm-host-next__blocked { font-size: 11px; }
}
