/* «Кто шпион?» — оформление. Лобби и разделы — тёмный стиль Games (общие классы style.css).
   Партия — сцены Кодекса из img/кто-шпион/: фоны, карточки, жетоны, часы, эмблемы, лупа, ширма.
   Предметы здесь НЕ рисуются: в css только цифры и подписи поверх готовых файлов, рамки, тени, состояния,
   полоса времени. Из шпион-экран.js идут только классы и data-атрибуты.
   Цвета: графит и изумруд на сцене, чистое золото #F4C54A → #FFE08A, выделение — салатовый акцент Games.
   Красного и горчичного нет: отказ и предупреждение — светлое золото, раскрытие — серебристо-синий. */

body.шпион {
  --золото: #F4C54A;
  --золото-светлое: #FFE08A;
  --серебро: #cfe0ff;
  --на-сцене: #f4f4ed;
  --стекло: rgba(9, 15, 17, .66);
  --стекло-плотное: rgba(9, 15, 17, .84);
  --стекло-край: rgba(255, 255, 255, .18);
  --отказ: #FFE08A;
}

.спрайт { position: absolute; width: 0; height: 0; overflow: hidden; }
.без-скриптов { padding: 24px; text-align: center; }
.знак { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

@keyframes появление { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes мигание { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes качание { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes полоса-пять { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes штамп { 0% { transform: scale(1.6); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } 100% { transform: none; opacity: 1; } }

.качать { animation: качание .42s ease-in-out; }

/* ---------- Лобби ---------- */
.страница-шпион .лобби__картинка { aspect-ratio: 2 / 1; }
.страница-шпион .лобби__рисунок { width: 100%; height: 100%; object-fit: cover; display: block; }
.страница-шпион .лобби__подпись {
  font-family: var(--шрифт); font-weight: 800; font-size: clamp(16px, 4.8vw, 21px); line-height: 1.25; color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .75);
}
@media (max-width: 340px), (max-height: 640px) { .страница-шпион .лобби__картинка { aspect-ratio: 2 / 1; } }
.плашка-возврата {
  min-height: 56px; margin: 4px 0; padding: 10px 16px; border-radius: 16px; border: 1px solid rgba(210, 247, 107, .55);
  background: rgba(210, 247, 107, .12); color: inherit; font: inherit; font-weight: 700; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
}
.плашка-возврата__счёт { font-size: 13px; font-weight: 600; opacity: .75; }
.подсказка-строка { margin: 0; font-size: 13px; line-height: 1.35; text-align: center; color: var(--сб-акцент); }
.лобби__низ-строка { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.плашка-без-сети { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; opacity: .75; }
.верх-игры__пусто { display: block; width: 44px; height: 44px; }
.верх-игры__название { margin: 0; flex: 1 1 auto; min-width: 0; text-align: center; font-size: 18px; font-weight: 800; line-height: 1.15; }
.ссылка-кнопка, .кнопка-главная, .кнопка-плоская, .кнопка-малая, .сегмент, .строка-игрока, .степпер-крупный__кнопка, .плитка-места,
.рука__кнопка, .голос__кнопка, .карта, .имя-строка__карандаш {
  font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ссылка-кнопка {
  min-height: 44px; padding: 8px 12px; border: 0; background: none; color: var(--сб-акцент); font-weight: 700; font-size: 15px;
  text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.ссылка-кнопка--блок { width: 100%; }

/* ---------- Сцена партии ---------- */
.сцена {
  color: var(--на-сцене); text-align: center; overflow: hidden; gap: 8px; background: #0a1012 center / cover no-repeat;
  user-select: none; -webkit-user-select: none;
}
#экран-настройка, #экран-набор, #экран-правил { background-image: url("../../img/кто-шпион/фон-настройка.jpg"); }
#экран-передача, #экран-карта { background-image: url("../../img/кто-шпион/фон-передача.jpg"); }
#экран-раунд { background-image: url("../../img/кто-шпион/фон-раунд.jpg"); }
#экран-обвинение, #экран-финал, #экран-время { background-image: url("../../img/кто-шпион/фон-обвинение.jpg"); }
#экран-угадать { background-image: url("../../img/кто-шпион/фон-угадывание.jpg"); }
#экран-итог-раунда[data-победа="город"] { background-image: url("../../img/кто-шпион/фон-итог-город.jpg"); }
#экран-итог-раунда[data-победа="шпионы"] { background-image: url("../../img/кто-шпион/фон-итог-шпионы.jpg"); }
#экран-табло, #экран-итог-вечера { background-image: url("../../img/кто-шпион/фон-табло.jpg"); }

.сцена > * { box-sizing: border-box; width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; flex: 0 0 auto; }
.сцена > .верх-игры {
  display: flex; align-items: center; justify-content: space-between; height: 44px; margin-top: 0; margin-bottom: 0;
  max-width: 540px;
}
/* В Telegram общий css прячет верхнюю строку; в партии она нужна («‹» и «⋯» — единственные двери). */
html.в-телеграме .сцена > .верх-игры { display: flex; }
.сцена .верх-игры__кнопка { background: var(--стекло); color: #fff; border-radius: 12px; }
.сцена button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.сцена button:focus-visible { outline: 2px solid var(--сб-акцент); outline-offset: 2px; }
.сцена h2, .сцена h3 { text-shadow: 0 2px 10px rgba(0, 0, 0, .75); }
.прокрутка { flex: 1 1 auto !important; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 2px 2px 8px; text-align: left; }
.прокрутка::-webkit-scrollbar { display: none; }
.низ-экрана { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.сообщение { min-height: 20px; margin: 2px 0 0; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--сб-акцент); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.сообщение:empty { min-height: 0; margin: 0; }
.сообщение[data-вид="отказ"] { color: var(--отказ); }
.шаг-заголовок { margin: 4px 0 2px; font-size: 20px; line-height: 1.25; font-weight: 800; }
.подпись-блока { margin: 14px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; opacity: .85; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.подсказка-блока { margin: 6px 0 0; font-size: 13px; line-height: 1.35; opacity: .9; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.подсказка-блока:empty { display: none; }
.счётчик-рук { margin: 0; font-size: 15px; font-weight: 800; }
.счётчик-рук[data-вид="отказ"] { color: var(--отказ); }

/* ---------- Кнопки ---------- */
.кнопка-главная, .кнопка-плоская, .кнопка-малая {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; font-weight: 800; text-align: center;
  line-height: 1.15; transition: transform .12s, opacity .15s;
}
.кнопка-главная {
  width: 100%; min-height: 56px; padding: 0 20px; border: 0; font-size: 18px; background: var(--сб-акцент); color: var(--сб-акцент-текст);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.кнопка-плоская {
  width: 100%; min-height: 48px; padding: 0 16px; font-size: 16px; background: var(--стекло); color: #fff; border: 1px solid var(--стекло-край);
}
.кнопка-плоская--главная { background: var(--сб-акцент); color: var(--сб-акцент-текст); border-color: transparent; }
/* «Начать новую» поверх незаконченной партии: действие, которое стирает чужой труд, выглядит опасным */
.кнопка-плоская--опасная { background: #8b302b; color: #fff; border-color: transparent; }
.кнопка-малая {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 8px; font-size: 13.5px; background: var(--стекло); color: #fff; border: 1px solid var(--стекло-край);
}
.кнопка-главная:active, .кнопка-плоская:active, .кнопка-малая:active { transform: scale(.97); }
.кнопка-главная[aria-disabled="true"] { background: #4b5257; color: #c9ced2; box-shadow: none; }
.кнопка-малая[aria-disabled="true"], .кнопка-плоская[aria-disabled="true"] { opacity: .5; }
.ряд-кнопок, .ряд-малых { display: flex; gap: 8px; }
.ряд-кнопок > * { flex: 1 1 0; }
.ряд-малых { flex-wrap: nowrap; }

/* ---------- Настройка ---------- */
.плашка-вечера { padding: 12px; border-radius: 16px; background: var(--стекло-плотное); border: 1px solid rgba(210, 247, 107, .5); margin-bottom: 8px; }
.плашка-вечера__текст { margin: 0 0 8px; font-weight: 800; text-align: center; }
.степпер-крупный { display: flex; align-items: center; justify-content: center; gap: 18px; }
.степпер-крупный__кнопка {
  width: 60px; height: 60px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 18px;
  background: var(--стекло-плотное); border: 1px solid var(--стекло-край);
}
.степпер-крупный__кнопка .знак { width: 28px; height: 28px; }
.степпер-крупный__кнопка[aria-disabled="true"] { opacity: .4; }
.степпер-крупный__число { min-width: 72px; text-align: center; font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, .75); }
.имена { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.имя-строка {
  display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 6px 6px 10px; border-radius: 16px; background: var(--стекло);
  border: 1px solid var(--стекло-край); animation: появление .22s ease-out;
}
.имя-строка__поле {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 8px; font: inherit; font-weight: 700; font-size: 16px; color: #fff; background: none;
  border: 1px solid transparent; border-radius: 10px; text-overflow: ellipsis; user-select: text; -webkit-user-select: text;
}
.имя-строка__поле:focus { border-color: var(--сб-акцент); background: rgba(255, 255, 255, .06); outline: none; }
.имя-строка__карандаш { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; opacity: .7; background: none; border: 0; }
.сегменты { display: flex; gap: 8px; flex-wrap: wrap; }
.сегмент {
  flex: 1 1 0; min-width: 52px; min-height: 44px; padding: 8px 12px; border-radius: 14px; font-weight: 700; font-size: 15px; line-height: 1.2;
  background: var(--стекло); color: #fff; border: 1px solid var(--стекло-край); display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .12s;
}
.сегмент:active { transform: scale(.96); }
.сегмент[aria-pressed="true"] { background: var(--сб-акцент); color: var(--сб-акцент-текст); border-color: var(--сб-акцент); }
.сегмент[aria-disabled="true"] { opacity: .4; }
.правила-вечера { display: flex; flex-direction: column; gap: 4px; padding: 4px 10px 10px; border-radius: 16px; background: var(--стекло); border: 1px solid var(--стекло-край); }
.правило { padding-top: 8px; }
.правило__название { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 800; text-align: left; }
.правило .сегмент { min-width: 44px; padding: 6px 8px; font-size: 14px; }

/* ---------- Поля своего набора ---------- */
.поле {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: 16px; color: #fff; background: var(--стекло-плотное);
  border: 1px solid var(--стекло-край); border-radius: 14px; user-select: text; -webkit-user-select: text; min-height: 48px;
}
.поле:focus { outline: none; border-color: var(--сб-акцент); }
.поле--большое { min-height: 180px; resize: none; line-height: 1.4; }

/* ---------- Жетоны игроков (картинка Кодекса, номер поверх) ---------- */
.жетон { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; container-type: inline-size; }
.жетон__картинка { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.жетон__номер, .жетон > b { position: relative; font-size: 44cqw; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); font-variant-numeric: tabular-nums; line-height: 1; }
.жетон--пойман .жетон__номер { opacity: .55; }
.жетон--крупный { width: min(34vw, 150px); height: min(34vw, 150px); background: url("../../img/кто-шпион/жетон-игрока.webp") center / contain no-repeat; margin: 6px 0; }
.жетон--крупный > b { font-size: 46cqw; }

/* ---------- Передача ---------- */
.передача__центр { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; }
.передача__призыв { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .3px; opacity: .9; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.передача__имя { margin: 0; font-size: clamp(30px, 10vw, 44px); font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; }
.передача__строка { margin: 6px 0 0; font-size: 15px; line-height: 1.4; max-width: 300px; opacity: .9; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.время__часы { width: min(34vw, 140px); height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); }

/* ---------- Карточка (600 x 840, поля в cqw) ---------- */
.карта-место { container-type: size; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.карта { position: relative; display: block; padding: 0; border: 0; background: none; color: #fff; container-type: inline-size; aspect-ratio: 600 / 840; width: min(100cqw, 71.428cqh); height: auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .6)); }
.карта__основа { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.карта--закрытая:active { transform: scale(.98); }
.карта--открытая { cursor: default; animation: появление .18s ease-out; }
.карта__окно { position: absolute; left: 12.8%; top: 7.5%; width: 74.3%; height: 50.8%; display: flex; align-items: center; justify-content: center; }
.карта__иконка { width: 82%; height: 82%; object-fit: contain; }
.карта__плашка { position: absolute; left: 7%; width: 86%; box-sizing: border-box; padding: 0 7cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.карта__плашка--место { top: 62.5%; height: 18%; }
.карта__плашка--роль { top: 83.7%; height: 6.8%; overflow: visible; }
.карта__плашка--роль .карта__подпись { position: absolute; left: 0; right: 0; bottom: calc(100% + 3px); }
.карта__подпись { font-size: 3.3cqw; letter-spacing: .3px; text-transform: uppercase; opacity: .8; line-height: 1.1; }
.карта__значение { font-size: 6.4cqw; font-weight: 900; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--золото-светлое); text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.карта-совет { display: none; margin: 0; padding: 0 16px; text-align: center; font-size: 14px; line-height: 1.25; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
#экран-карта[data-состояние="открыта"] .карта-совет { display: block; }
.карта-подсказка { margin: 0; font-size: 15px; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.карта-полоса { height: 8px; width: 100%; max-width: 360px; border-radius: 4px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.карта-полоса > i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--золото), var(--золото-светлое)); transform-origin: left center; }
.карта-полоса--идёт > i { animation: полоса-пять 5s linear forwards; }
.карта-итог { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; }
.карта-итог__заголовок { margin: 0; font-size: 28px; font-weight: 900; line-height: 1.15; }
.карта-итог__текст { margin: 0; font-size: 17px; opacity: .9; }
#экран-карта[data-состояние="итог"] .карта-место { display: none; }

/* ---------- Ширма ---------- */
.ширма { position: fixed; inset: 0; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .3s ease; background: #060a0b; display: flex; align-items: center; justify-content: center; }
.ширма > img { height: 100%; width: auto; max-width: 100%; object-fit: cover; }
.ширма--видна { opacity: 1; pointer-events: auto; }

/* ---------- Раунд ---------- */
.раунд__тело { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.таймер { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; padding: 4px 0; }
.таймер__часы { width: clamp(52px, 15vw, 76px); height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); flex: 0 0 auto; }
.таймер__середина { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.таймер__число { font-size: clamp(40px, 13vw, 56px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.таймер__полоса { -webkit-appearance: none; appearance: none; width: clamp(130px, 40vw, 190px); height: 8px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.таймер__полоса::-webkit-progress-bar { background: rgba(255, 255, 255, .18); }
.таймер__полоса::-webkit-progress-value { background: linear-gradient(90deg, var(--золото), var(--золото-светлое)); transition: width .25s linear; }
.таймер__полоса::-moz-progress-bar { background: linear-gradient(90deg, var(--золото), var(--золото-светлое)); }
#экран-раунд[data-время="свободно"] .таймер__часы, #экран-раунд[data-время="свободно"] .таймер__полоса { display: none; }
#экран-раунд[data-время="свободно"] .таймер__число { font-size: 26px; }
#экран-раунд[data-последние="да"] .таймер__число { color: var(--золото-светлое); animation: мигание 1s ease-in-out infinite; }
#экран-раунд[data-время="пауза"] .таймер__число { opacity: .6; }
.раунд__строка { margin: 0; font-size: 16px; font-weight: 800; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.раунд__строка--тихая { font-size: 14px; font-weight: 600; opacity: .85; }
.раунд__дело { margin: 4px 0 2px; font-size: 13px; line-height: 1.3; opacity: .8; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.вопрос { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 16px; background: var(--стекло-плотное); border: 1px solid var(--стекло-край); display: flex; flex-direction: column; align-items: center; gap: 4px; animation: появление .2s ease-out; }
.вопрос__группа { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--золото-светлое); }
.вопрос__текст { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.жетоны { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.игрок { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 8px 3px 4px; border-radius: 14px; background: var(--стекло); border: 1px solid var(--стекло-край); min-width: 0; text-align: left; }
.игрок__имя { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.игрок__метки { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.игрок__галочка .знак { width: 16px; height: 16px; color: var(--сб-акцент); }
.игрок__напоминаний { font-style: normal; font-size: 12px; font-weight: 800; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: rgba(255, 255, 255, .16); }
.игрок[data-статус="выбыл"] { opacity: .55; }
.игрок[data-статус="выбыл"] .игрок__имя { text-decoration: line-through; }
.раунд__низ { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.раунд__низ .кнопка-главная { min-height: 56px; }
@media (min-height: 700px) { .жетоны { gap: 8px; } .игрок { min-height: 46px; } }
#экран-раунд[data-много="да"] .таймер__часы { width: 36px; }
#экран-раунд[data-много="да"] .таймер__число { font-size: 32px; }
#экран-раунд[data-много="да"] .вопрос { padding: 6px 10px; gap: 2px; }
.жетоны[data-много="да"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.жетоны[data-много="да"] .игрок { min-height: 30px; padding: 1px 4px 1px 2px; gap: 3px; }
.жетоны[data-много="да"] .игрок .жетон { width: 26px; height: 26px; }
.жетоны[data-много="да"] .игрок__имя { font-size: 11px; }
.жетоны[data-много="да"] .игрок__напоминаний { display: none; }
.раунд__низ { padding-bottom: 12px; }
#экран-раунд[data-много="да"] .раунд__дело { display: none; }
#экран-раунд[data-много="да"] .раунд__низ { gap: 4px; }
#экран-раунд[data-много="да"] .раунд__тело { gap: 3px; }
#экран-раунд[data-много="да"] .таймер { padding: 0; }
@media (max-width: 340px), (max-height: 600px) {
  #экран-раунд[data-много="да"] .вопрос__текст { font-size: 15px; line-height: 1.2; }
  #экран-раунд[data-много="да"] .вопрос__группа { display: none; }
  #экран-раунд[data-много="да"] .таймер__часы, #экран-раунд[data-много="да"] .таймер__полоса, #экран-раунд[data-много="да"] .раунд__строка--тихая { display: none; }
  .таймер__часы { width: 44px; }
  .таймер__число { font-size: 38px; }
  .раунд__низ .кнопка-главная { min-height: 56px; font-size: 16px; }
  .игрок { min-height: 40px; padding: 2px 6px 2px 3px; gap: 5px; }
  .игрок .жетон { width: 32px; height: 32px; }
  .игрок__имя { font-size: 13px; }
  .раунд__дело { display: none; }
  .кнопка-малая { font-size: 12.5px; padding: 2px 4px; }
}

/* ---------- Обвинение, финал ---------- */
/* stretch нужен: общий style.css ставит .выбор «align-items: center», и строка с длинным именем раздувалась по тексту,
   а короткие сужались и уезжали к середине — ширина строки теперь одна, имя усекается многоточием */
.выбор { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.строка-выбора { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 12px 6px 8px; border-radius: 16px; background: var(--стекло-плотное); border: 1px solid var(--стекло-край); color: #fff; text-align: left; animation: появление .18s ease-out; }
.строка-выбора:active { transform: scale(.98); }
.строка-выбора[aria-disabled="true"] { opacity: .45; }
.строка-выбора[aria-pressed="true"] { border-color: var(--сб-акцент); }
.строка-выбора__имя { flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.строка-выбора__пометка { font-size: 13px; opacity: .75; flex: 0 0 auto; }
.строка-голоса, .строка-рук { display: flex; align-items: center; gap: 10px; min-height: 56px; min-width: 0; box-sizing: border-box; padding: 6px 8px; border-radius: 16px; background: var(--стекло-плотное); border: 1px solid var(--стекло-край); }
.строка-голоса__имя, .строка-рук__имя { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 800; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* сетка с равными колонками: «За» и «Против» всегда одного размера, у любого имени и при крупном шрифте */
.голос { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; flex: 0 0 auto; }
.голос__кнопка { min-width: 76px; min-height: 44px; padding: 0 10px; border-radius: 12px; font-size: 15px; font-weight: 800; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid var(--стекло-край); }
.голос__кнопка[aria-pressed="true"] { background: var(--сб-акцент); color: var(--сб-акцент-текст); border-color: var(--сб-акцент); }
.голос__кнопка[aria-disabled="true"] { opacity: .6; }
.рука { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.рука__кнопка { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid var(--стекло-край); }
.рука__число { min-width: 32px; text-align: center; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- Угадывание ---------- */
.места { display: flex; flex-direction: column; gap: 10px; }
.тема__заголовок { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; text-align: left; color: var(--золото-светлое); }
.плитки { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.плитка-места { position: relative; min-height: 84px; padding: 6px 4px 5px; border-radius: 14px; background: var(--стекло-плотное); color: #fff; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-width: 0; }
.плитка-места__иконка { width: 44px; height: 44px; object-fit: contain; }
.плитка-места__название { font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.плитка-места--выбрана { border-color: var(--сб-акцент); background: rgba(210, 247, 107, .16); }
.плитка-места[data-зачёркнуто="да"] { opacity: .4; }
.плитка-места[data-зачёркнуто="да"] .плитка-места__название { text-decoration: line-through; }
@media (max-width: 340px) { .плитки { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Проверка обвиняемого ---------- */
.проверка { position: fixed; inset: 0; z-index: 100; background: rgba(6, 10, 11, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 20px; text-align: center; color: #fff; }
.проверка.скрыт { display: none !important; }
.проверка__лупа { width: min(46vw, 190px); height: auto; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .6)); }
.проверка__слово { margin: 0; font-size: clamp(34px, 11vw, 52px); font-weight: 900; line-height: 1.1; }
.проверка__подпись { margin: 0; max-width: 320px; font-size: 17px; line-height: 1.35; }
.проверка[data-стадия="ожидание"] .проверка__лупа { animation: мигание 1s ease-in-out infinite; }
.проверка[data-стадия="итог"] .проверка__слово { animation: штамп .4s ease-out; }
.проверка[data-вид="шпион"] .проверка__слово { color: var(--серебро); }
.проверка[data-вид="житель"] .проверка__слово { color: var(--золото-светлое); }
.проверка .кнопка-главная { max-width: 360px; margin-top: 8px; }

/* ---------- Итог раунда ---------- */
.итог__тело { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.итог__эмблема { width: min(40vw, 170px); height: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6)); animation: штамп .45s ease-out; }
.итог__эмблема--кубок { width: min(38vw, 160px); }
.итог__заголовок { margin: 0; font-size: clamp(26px, 8vw, 34px); font-weight: 900; line-height: 1.15; }
.итог__причина { margin: 0; font-size: 16px; line-height: 1.35; opacity: .95; }
.итог__место { margin: 0; font-size: 17px; font-weight: 800; color: var(--золото-светлое); }
.итог__шпионы { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.итог__шпионы-метка { font-size: 14px; font-weight: 700; opacity: .85; }
.чип-шпион { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 20px; background: var(--стекло-плотное); border: 1px solid var(--стекло-край); }
.чип-шпион__имя { font-size: 15px; font-weight: 800; }
.очки-список { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.очки-строка { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px 10px 2px 4px; border-radius: 14px; background: var(--стекло); border: 1px solid var(--стекло-край); min-width: 0; }
.очки-строка .жетон { width: 34px; height: 34px; }
.очки-строка__имя { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 700; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.очки-строка__очки { font-size: 17px; font-weight: 900; }
.очки-строка[data-очки="есть"] .очки-строка__очки { color: var(--золото-светлое); }
.очки-строка[data-очки="нет"] { opacity: .7; }

/* ---------- Табло и журнал ---------- */
.табло__строки { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.табло__строка { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 12px 4px 6px; border-radius: 14px; background: var(--стекло-плотное); border: 1px solid var(--стекло-край); min-width: 0; }
.табло__строка[data-лидер="да"] { border-color: var(--золото); }
.табло__место { width: 20px; text-align: center; font-weight: 900; font-size: 15px; color: var(--золото-светлое); }
.табло__имя { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 800; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.табло__ячейки { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 70px; }
.ячейка { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.ячейка[data-шпион="да"] { background: var(--серебро); box-shadow: 0 0 6px rgba(207, 224, 255, .7); }
.табло__очки { min-width: 30px; text-align: right; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.журнал { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.журнал__запись { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 14px; background: var(--стекло); border: 1px solid var(--стекло-край); font-size: 14px; text-align: left; }
.журнал__раунд { color: var(--золото-светлое); }

/* ---------- Как играть ---------- */
.правила__лента { flex: 1 1 auto; min-height: 0; display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; max-width: 520px; width: 100%; }
.правила__лента::-webkit-scrollbar { display: none; }
.карточка-правила { flex: 0 0 100%; scroll-snap-align: center; box-sizing: border-box; padding: 10px 12px 12px; border-radius: 20px; background: var(--стекло-плотное); border: 1px solid var(--стекло-край); text-align: left; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 8px; }
.карточка-правила__картинка { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; display: block; flex: 0 0 auto; }
.карточка-правила__заголовок { margin: 0; font-size: 22px; font-weight: 900; }
.карточка-правила__текст { margin: 0; font-size: 15.5px; line-height: 1.4; }
.карточка-правила__советы { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.35; }
.карточка-правила__пример { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 224, 138, .14); font-weight: 700; }
.правила__точки { display: flex; justify-content: center; gap: 8px; padding: 2px 0; }
.точка { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.точка[data-активна="да"] { background: var(--сб-акцент); width: 20px; border-radius: 4px; }
@media (max-height: 640px) { .карточка-правила__картинка { aspect-ratio: 3 / 1; } }

/* ---------- Окно (общее) ---------- */
#окно { z-index: 120; }
.окно__тело { overflow-y: auto; max-height: 52vh; scrollbar-width: none; }
.окно__текст { margin: 0 0 8px; font-size: 16px; line-height: 1.4; text-align: center; }
.окно__кнопки { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.список-окна { display: flex; flex-direction: column; gap: 6px; }
#окно .строка-выбора { background: rgba(255, 255, 255, .07); }
.как-работает { margin: 0 0 8px; padding-left: 22px; font-size: 15.5px; line-height: 1.4; text-align: left; }
.как-работает li + li { margin-top: 6px; }
#окно .правила-вечера { background: none; border: 0; padding: 0; }

/* ---------- Рекорды и профиль ---------- */
.экран.путь .сводка { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; }
.сводка__строка { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.сводка__название { margin: 0; font-size: 15px; opacity: .85; text-align: left; }
.сводка__значение { margin: 0; font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
/* кнопка «В лобби» под списком: в Telegram верхней строки с «‹» нет, это единственный видимый выход */
.низ-экрана--путь { margin-top: 16px; }
.профиль-игрока { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.профиль-игрока__имя { margin: 0; min-width: 0; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
