/*
 * Игра вдвоём: страница выбора режима, комната, счёт соперника в партии и
 * два столбца в итогах. Отдельный файл, потому что подключается он и к меню
 * (ради уведомлений), и к игре, и к итогам — везде понемногу.
 */

/* ───────────────────────────── страница «с другом» ───────────────────── */

.friend {
  width: min(880px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 40px 0 60px;
  display: grid;
  gap: 26px;
}

.friend__head { display: grid; gap: 10px; }

.friend__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.friend__lead { margin: 0; max-width: 60ch; color: var(--muted); }

.friend__modes { display: grid; gap: 10px; }

.mode-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: var(--surface-1);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s, transform 0.16s var(--ease), background 0.16s;
}

.mode-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.mode-card__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.mode-card__icon svg { width: 24px; height: 24px; }
.mode-card__body { display: grid; gap: 3px; min-width: 0; }

.mode-card__name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.mode-card__text { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.mode-card__go { width: 20px; height: 20px; color: var(--accent); }

.mode-card--soon { opacity: 0.5; cursor: not-allowed; }
.mode-card--soon:hover { border-color: var(--stroke); transform: none; }

.friend__section {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.friend__code { display: flex; gap: 8px; flex-wrap: wrap; }
.friend__code .input { width: 180px; text-transform: uppercase; letter-spacing: 0.12em; }
.friend__note { margin: 8px 0 0; color: var(--muted); font-size: 13px; min-height: 18px; }

/* ───────────────────────────── комната ───────────────────────────────── */

.race {
  position: relative;
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 60px;
  display: grid;
  gap: 18px;
}

/*
 * Фон комнаты. Общий фон сайта нарочно едва заметен, и под ним оставалась
 * чернота. Здесь своя подложка: та же карта мира, но в полную силу, и два
 * цветных пятна по краям. Без размытия — контуры видно как есть; чтобы буквы
 * не спорили с картой, сверху лежит вуаль.
 */
.race-back {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.race-back::before {
  content: '';
  position: absolute;
  inset: -14%;
  background:
    radial-gradient(38vw 38vw at 18% 18%, color-mix(in srgb, var(--decor-a) 85%, transparent), transparent 70%),
    radial-gradient(42vw 42vw at 84% 30%, color-mix(in srgb, var(--decor-b) 85%, transparent), transparent 70%),
    url("../backdrop.svg") center 46% / min(1900px, 150%) auto no-repeat;
  opacity: 0.45;
  /* Размытие лёгкое: формы карты угадываются, но края не режут глаз. */
  filter: blur(9px);
}

:root[data-theme="atlas"] .race-back::before { filter: blur(9px) invert(1); opacity: 0.3; }

.race-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 52%, transparent);
}

.race--guest { gap: 14px; justify-items: start; padding-top: 60px; }

/* Верхняя строка: кто я, приглашение и код — всё в одну линию. */
.race__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--surface-1);
}

.race__me { display: flex; align-items: center; gap: 9px; min-width: 0; }
.race__nick { font-family: var(--font-display); font-weight: 700; }
.race__role { color: var(--dim); font-size: 12.5px; }
.race__code { margin-left: auto; color: var(--muted); font-size: 13px; }
.race__code b { letter-spacing: 0.14em; color: var(--text); }

.race__grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.race__players { display: grid; align-content: start; gap: 4px; }

/*
 * Место за столом — рамка без заливки: занятое обведено сплошной линией
 * потолще, свободное тонким пунктиром. Разницу видно сразу, а сплошного
 * прямоугольника с фоном, который спорил бы с настройками рядом, нет.
 */
.duel-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 2px solid var(--stroke);
  border-radius: 16px;
  background: transparent;
}

.duel-player--me { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.duel-player--empty {
  padding: 11px 14px;
  border: 1px dashed var(--stroke);
}

/* Флаг идёт после ника, вплотную к нему: сперва имя, потом откуда человек. */
.duel-player__flag {
  width: 22px; height: 15px;
  margin-left: 8px;
  border-radius: 3px;
  object-fit: cover;
  vertical-align: -2px;
}

.duel-player--me .duel-player__name { color: var(--accent); }

.duel-player__hole {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border: 1.5px dashed var(--stroke);
  border-radius: 50%;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 13px;
}

.duel-player__body { display: grid; gap: 2px; min-width: 0; }

.duel-player__name {
  margin: 0;
  display: flex;
  align-items: center;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
}

.duel-player__nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Выгнать из комнаты — на другом краю строки, чтобы не задеть случайно. */
.duel-player__kick {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.duel-player__kick svg { width: 15px; height: 15px; }

.duel-player__kick:hover {
  color: var(--danger, #e5484d);
  background: color-mix(in srgb, var(--danger, #e5484d) 14%, transparent);
}
.duel-player__note { margin: 0; color: var(--muted); font-size: 12.5px; }

.race__setup { display: grid; gap: 10px; }

.race__section {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.race__regions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}

/* Те же правила, что и у мест за столом: рамка держит форму, заливки нет. */
.chip-pick {
  display: grid;
  gap: 1px;
  padding: 8px 12px;
  border: 2px solid var(--stroke);
  border-radius: 13px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.chip-pick:hover:not(:disabled) { border-color: var(--accent); }
.chip-pick:disabled { cursor: default; opacity: 0.75; }

.chip-pick.is-active { border-color: var(--accent); }
.chip-pick.is-active .chip-pick__name { color: var(--accent); }

.chip-pick__name { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }

.chip-pick__note {
  color: var(--dim);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race__times,
.race__wins { display: inline-flex; flex-wrap: wrap; width: fit-content; }
.race__go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.race__status { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .race__grid { grid-template-columns: 1fr; }
}

/* ───────────────────────────── приглашение ───────────────────────────── */

.modal-veil {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(14px);
  animation: modal-in 0.18s var(--ease);
}

.modal-veil[hidden] { display: none; }

@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(520px, 100%);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow-lg, 0 30px 80px -30px rgba(0, 0, 0, 0.6));
}

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

.modal__title { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.modal__body { display: grid; gap: 8px; padding: 14px 20px 20px; }

.modal__label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.modal__row { display: flex; gap: 8px; }
.modal__row .input { flex: 1; min-width: 0; }
.modal__note { margin: 2px 0 0; color: var(--dim); font-size: 12.5px; min-height: 17px; }

.input {
  padding: 10px 14px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.input:focus { outline: none; border-color: var(--accent); }

/* ─────────────────────── счёт соперника в партии ─────────────────────── */

.duel-hud {
  position: fixed;
  right: 18px;
  /* Ниже верхней полосы с очками и часами: там свои чипы, и панель на них
     наезжала. */
  top: 108px;
  z-index: 30;
  display: grid;
  gap: 6px;
  min-width: 168px;
  padding: 10px 14px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel-strong);
  backdrop-filter: blur(14px);
}

.duel-hud[hidden] { display: none; }

.duel-hud__clock {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.duel-hud.is-hurry .duel-hud__clock { color: var(--danger, #e5484d); }
.duel-hud__rows { display: grid; gap: 3px; }

.duel-hud__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.duel-hud__who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-hud__row--me .duel-hud__who { color: var(--text); }
.duel-hud__count { font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.duel-hud.is-ahead .duel-hud__row:not(.duel-hud__row--rival) .duel-hud__count { color: var(--accent); }
.duel-hud.is-behind .duel-hud__row--rival .duel-hud__count { color: var(--danger, #e5484d); }

@media (max-width: 720px) {
  .duel-hud { top: auto; bottom: 96px; right: 12px; min-width: 140px; padding: 8px 12px; }
  .duel-hud__clock { font-size: 21px; }
}

/* ─────────────────────────── итог партии вдвоём ──────────────────────── */

/*
 * Весь итог сетевой партии — одна полоса: ник, исход, ник. Под каждым ником
 * крупно та цифра, по которой считали победу, ниже словом, что это за цифра,
 * и совсем мелко второй зачёт. Подробности своей партии игрок видит ниже, на
 * витрине, и дублировать их здесь незачем.
 *
 * Цвета исхода заданы тут, а не в теме: зелёное, красное и серое значат одно
 * и то же при любом оформлении.
 */
.duel-score {
  --win: #3ddc84;
  --lose: #ff6b6b;
  --tie: #c9d3e2;
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 20px 20px 18px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: var(--surface-1);
}

:root[data-theme="atlas"] .duel-score { --win: #17a05c; --lose: #d63c3c; --tie: #7a8598; }

.duel-score[hidden] { display: none; }
.duel-score.is-win { border-color: color-mix(in srgb, var(--win) 40%, transparent); }
.duel-score.is-lose { border-color: color-mix(in srgb, var(--lose) 35%, transparent); }
.duel-score.is-tie { border-color: color-mix(in srgb, var(--tie) 30%, transparent); }

.duel-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 3vw, 34px);
  width: 100%;
}

.duel-strip[hidden] { display: none; }

.duel-strip__side {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 12px 14px;
  border-radius: 18px;
  overflow: hidden;
}

/* Победитель обведён светом: исход виден, даже если не читать цифры. */
.duel-strip__side.is-winner {
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45), 0 0 30px -10px rgba(255, 255, 255, 0.3);
}

:root[data-theme="atlas"] .duel-strip__side.is-winner {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 40%, transparent);
}

.duel-strip__who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.9vw, 21px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.duel-strip__nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-strip__flag { width: 28px; height: 19px; border-radius: 4px; object-fit: cover; flex: none; }

.duel-strip__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.duel-strip__label { margin: 0; color: var(--muted); font-size: 12.5px; }
.duel-strip__spare { margin: 4px 0 0; color: var(--dim); font-size: 12px; }

.duel-strip__side.is-winner .duel-strip__value { color: #fff; }
:root[data-theme="atlas"] .duel-strip__side.is-winner .duel-strip__value { color: var(--text); }

/* Исход между никами — самое крупное на экране. */
.duel-strip__verdict {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4.6vw, 48px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: center;
  white-space: nowrap;
}

.duel-score.is-win .duel-strip__verdict,
.duel-score.is-win .duel-score__verdict {
  color: var(--win);
  text-shadow: 0 0 40px color-mix(in srgb, var(--win) 55%, transparent);
}

.duel-score.is-lose .duel-strip__verdict,
.duel-score.is-lose .duel-score__verdict {
  color: var(--lose);
  text-shadow: 0 0 40px color-mix(in srgb, var(--lose) 45%, transparent);
}

.duel-score.is-tie .duel-strip__verdict,
.duel-score.is-tie .duel-score__verdict {
  color: var(--tie);
  text-shadow: 0 0 36px color-mix(in srgb, var(--tie) 40%, transparent);
}

/* Пока соперник не доиграл, исход блёклый: это ещё не приговор. */
.duel-strip__verdict { color: var(--muted); }

/* «Соперники ещё играют» и подобные — мельче: иначе строка распирает полосу. */
.duel-strip__verdict.is-long {
  font-size: clamp(14px, 1.9vw, 22px);
  letter-spacing: -0.01em;
  white-space: normal;
  max-width: 9ch;
}

/* Заголовок над таблицей — там, где играли втроём и вчетвером. */
.duel-score__verdict {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.duel-score__verdict[hidden] { display: none; }
.duel-score__note { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

/*
 * Искры за ником победителя: восемь точек разлетаются по кругу и гаснут за
 * секунду. Дальше блок стоит спокойно — это отметка момента, а не украшение
 * на всё время.
 */
.duel-side__burst {
  position: absolute;
  top: 26px; left: 50%;
  width: 0; height: 0;
  pointer-events: none;
}

.duel-side__burst i {
  position: absolute;
  width: 7px; height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: duel-spark 1s var(--ease) forwards;
}

.duel-side__burst i:nth-child(1) { --a: 0deg; }
.duel-side__burst i:nth-child(2) { --a: 45deg; animation-delay: 0.04s; }
.duel-side__burst i:nth-child(3) { --a: 90deg; animation-delay: 0.08s; }
.duel-side__burst i:nth-child(4) { --a: 135deg; animation-delay: 0.02s; }
.duel-side__burst i:nth-child(5) { --a: 180deg; animation-delay: 0.06s; }
.duel-side__burst i:nth-child(6) { --a: 225deg; animation-delay: 0.1s; }
.duel-side__burst i:nth-child(7) { --a: 270deg; animation-delay: 0.03s; }
.duel-side__burst i:nth-child(8) { --a: 315deg; animation-delay: 0.07s; }

@keyframes duel-spark {
  0% { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(0.4); }
  25% { opacity: 0.95; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(90px) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .duel-side__burst { display: none; }
}

/*
 * Трое и четверо в полосу не помещаются: там таблица мест. Первый подсвечен
 * так же, как победитель в полосе, своя строка отмечена акцентом.
 */
.duel-table { display: grid; gap: 2px; width: 100%; }

.duel-table__row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) repeat(2, minmax(70px, auto));
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid transparent;
  border-radius: 14px;
}

.duel-table__row--head {
  padding: 0 14px 2px;
  border: 0;
  color: var(--dim);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.duel-table__row--me { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.duel-table__row--top {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 30px -8px rgba(255, 255, 255, 0.22);
}

.duel-table__place { color: var(--muted); font-family: var(--font-display); font-weight: 700; }

.duel-table__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.duel-table__nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-table__flag { width: 24px; height: 16px; border-radius: 3px; object-fit: cover; flex: none; }
.duel-table__num { text-align: right; font-variant-numeric: tabular-nums; }

.duel-table__num--main {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.duel-table__row--waiting .duel-table__num { opacity: 0.5; }

@media (max-width: 620px) {
  .duel-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .duel-strip__verdict { grid-column: 1 / -1; order: -1; }
  .duel-table__row { grid-template-columns: 24px minmax(0, 1fr) minmax(56px, auto); }
  .duel-table__num--extra { display: none; }
}

/* ────────────────────────── уведомления в углу ───────────────────────── */

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
}

.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel-strong);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg, 0 24px 60px -24px rgba(0, 0, 0, 0.55));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast.is-in { opacity: 1; transform: none; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); }

.toast__body { display: grid; gap: 2px; min-width: 0; }
.toast__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.toast__text { margin: 0; color: var(--muted); font-size: 12.5px; }
.toast__side { display: flex; align-items: center; gap: 6px; }

.toast__close {
  border: 0;
  background: none;
  color: var(--dim);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.toast__close:hover { color: var(--text); }

/*
 * Трое и четверо в два столбца не помещаются, и делить экран на четыре
 * колонки — значит сделать цифры мельче подписи. Поэтому там таблица: места
 * сверху вниз, своя строка подсвечена. Двое так и остаются двумя столбцами —
 * дуэль читается лучше лицом к лицу.
 */
.duel-table { display: grid; gap: 2px; width: 100%; }

.duel-table__row {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) repeat(3, minmax(64px, auto));
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
}

.duel-table__row--head {
  padding-bottom: 2px;
  color: var(--dim);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.duel-table__row--me { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.duel-table__place { color: var(--muted); font-family: var(--font-display); font-weight: 700; }
.duel-table__flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; }
.duel-table__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.duel-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.duel-table__num--main { font-family: var(--font-display); font-weight: 700; }
.duel-table__row--waiting .duel-table__num { opacity: 0.55; }

.duel-score--many { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.duel-score--many .duel-score__middle { order: -1; justify-items: start; text-align: left; }

@media (max-width: 620px) {
  .duel-table__row { grid-template-columns: 24px auto minmax(0, 1fr) minmax(52px, auto); }
  .duel-table__num--extra { display: none; }
}


/* ───────────────── пять последних сетевых партий в профиле ───────────── */

.duel-trail { display: inline-flex; gap: 4px; vertical-align: -1px; }

.duel-trail__dot {
  width: 10px; height: 10px;
  border-radius: 3px;
}

.duel-trail__dot.is-win { background: #3ddc84; }
.duel-trail__dot.is-lose { background: #ff6b6b; }

:root[data-theme="atlas"] .duel-trail__dot.is-win { background: #17a05c; }
:root[data-theme="atlas"] .duel-trail__dot.is-lose { background: #d63c3c; }

/* ─────────────────── мелочи комнаты и списка режимов ─────────────────── */

.mode-card__size {
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-body, inherit);
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.race__mode {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.race__code { margin-left: 0; }
.race__back { flex: none; }

/* Код комнаты, которой нет: поле краснеет вместе с подписью под ним. */
.input.is-wrong {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px color-mix(in srgb, #ff6b6b 18%, transparent);
}

.input.is-wrong + .btn { border-color: color-mix(in srgb, #ff6b6b 40%, transparent); }
