/* Комната «Свояка» и экран для телевизора. Классический вид шоу — зелёное табло, оранжевые цены,
   красные спецтемы и красная кнопка — на токенах «Студии Свояка» из base.css.
   Префиксы: .rm- (комната и пульт), .tv- (большой экран). */

/* ---------- каркас комнаты ---------- */

.rm {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 12px 20px calc(14px + var(--safe-b));
}
.rm-center {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px calc(28px + var(--safe-b));
}
.rm-wait { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.rm-home { width: min(560px, 100%); }
.rm-msg { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.rm-msg .row { justify-content: center; }
.row.center { justify-content: center; }

/* ---------- верхняя полоса ---------- */

.rm-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 54px;
  padding: 7px 8px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .30), rgba(0, 0, 0, .18));
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 26px rgba(0, 0, 0, .18);
}
.rm-top-sp { flex: 1 1 auto; }
.rm-logo { display: inline-flex; align-items: center; gap: 8px; margin: 0 6px 0 2px; user-select: none; }
.rm-logo img { filter: drop-shadow(0 0 10px rgba(255, 157, 28, .35)); }
.rm-logo span {
  font: 400 19px/1 var(--font-logo);
  color: #fff;
  letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(255, 157, 28, .45), 0 2px 0 rgba(0, 0, 0, .35);
}
.rm-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px 0 14px;
  border-radius: 12px;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge);
  color: var(--muted);
  font: 700 11px/1 var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: filter .15s, transform .08s;
}
.rm-code b {
  font: 400 17px/1 var(--font-logo);
  color: var(--orange);
  letter-spacing: .12em;
  text-shadow: 0 0 12px rgba(255, 157, 28, .5);
}
.rm-code svg { color: var(--muted); }
.rm-code:hover { filter: brightness(1.12); }
.rm-code:active { transform: translateY(2px); }
.rm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .28);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.rm-chip b { color: var(--text); }
.rm-chip small { color: var(--dim); font-weight: 700; }
.rm-chip.lit { color: var(--orange-2); background: rgba(255, 157, 28, .14); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .4); }
.rm-chip.warn { color: var(--orange-2); cursor: pointer; background: rgba(255, 157, 28, .16); box-shadow: inset 0 0 0 1px var(--orange); animation: rm-blink 1.6s ease-in-out infinite; }
.rm-tg { --b-depth: 3px; }

/* ---------- сцена: табло + панель ведущего ---------- */

.rm-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-height: 0; }
.rm-stage.with-side { grid-template-columns: minmax(0, 1fr) 340px; }

.rm-panel {
  position: relative;
  isolation: isolate;
  min-height: 440px;
  padding: 46px 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(150, 240, 110, .14), transparent 62%),
    var(--felt),
    linear-gradient(180deg, #0B4A17 0%, #083A12 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 0 90px rgba(0, 0, 0, .30),
    0 0 0 6px rgba(0, 0, 0, .16),
    0 22px 46px rgba(0, 0, 0, .36);
  overflow: hidden;
}
.rm-panel.red {
  border-color: rgba(255, 170, 140, .35);
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(255, 190, 150, .22), transparent 62%),
    var(--felt),
    linear-gradient(180deg, #C42414 0%, #9A140B 100%);
}
.rm-panel-in { width: 100%; }

/* таймер — тонкая полоса по верху табло */
.rm-timer {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.rm-timer[hidden] { display: none; }
.rm-timer-bar { flex: 1 1 auto; height: 7px; border-radius: 99px; background: rgba(0, 0, 0, .34); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); overflow: hidden; }
.rm-timer-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #FFC66E, var(--orange) 60%, #E8830A);
  box-shadow: 0 0 10px rgba(255, 157, 28, .6);
  transition: width .25s linear;
}
.rm-timer-t {
  min-width: 54px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .38);
  color: var(--orange-2);
  font: 400 12px/1 var(--font-logo);
  text-align: center;
  font-variant-numeric: tabular-nums;
  word-spacing: -.3em;
}
.rm-timer.low .rm-timer-bar i { background: linear-gradient(180deg, #FF8A73, var(--red)); box-shadow: 0 0 12px rgba(224, 48, 30, .7); }
.rm-timer.low .rm-timer-t { color: #FFB0A6; animation: rm-blink .9s ease-in-out infinite; }

/* ---------- табло ---------- */

.rm-board { display: grid; gap: 7px; width: 100%; }
.rm-trow { display: grid; gap: 7px; grid-template-columns: minmax(0, var(--tw, 2.3fr)) repeat(var(--n, 5), minmax(0, 1fr)); }
.rm-tname, .rm-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: clamp(56px, 8.4vh, 96px);
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge);
}
.rm-tname {
  color: var(--orange-2);
  font: 700 clamp(13px, 1.2vw, 18px)/1.15 var(--font-ui);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.rm-tname span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.rm-cell {
  justify-content: center;
  border: 0;
  color: var(--orange);
  font: 400 clamp(18px, 2vw, 30px)/1 var(--font-logo);
  font-variant-numeric: tabular-nums;
  word-spacing: -.3em;
  text-shadow: 0 0 14px rgba(255, 157, 28, .55), 0 2px 0 rgba(0, 0, 0, .35);
}
button.rm-cell { width: 100%; cursor: pointer; transition: transform .1s var(--ease-out), background .15s, box-shadow .15s, color .15s; }
.rm-cell.can:hover, .rm-cell.can:focus-visible {
  background: var(--lit-face);
  color: var(--orange-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
  transform: translateY(-2px) scale(1.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--orange-edge), 0 0 24px rgba(255, 157, 28, .5);
}
.rm-cell.can:active { transform: translateY(1px) scale(.99); }
.rm-cell.used { background: var(--cell-used); color: transparent; text-shadow: none; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35); }
.rm-tname.red, .rm-cell.red { background: var(--red-face); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 3px 0 var(--red-edge); }
.rm-tname.red, .rm-cell.red:not(.used) { color: #FFE2B0; text-shadow: 0 0 12px rgba(255, 190, 120, .5), 0 2px 0 rgba(0, 0, 0, .3); }
.rm-cell.red.used { background: #5E0E08; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4); }
.rm-board-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 15px; text-align: center; }
.rm-board-hint b { color: var(--text); }
.rm-board-hint.mine { width: fit-content; margin: 16px auto 0; padding: 8px 16px; border-radius: 99px; background: rgba(255, 157, 28, .16); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .5); color: var(--orange-2); }
.rm-board-hint.mine b { color: #fff; }

.rm-intro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rm-intro-name { word-spacing: -.28em; font: 400 clamp(26px, 3.4vw, 46px)/1.05 var(--font-logo); color: #fff; text-shadow: 0 0 24px rgba(255, 157, 28, .5), 0 3px 0 rgba(0, 0, 0, .35); margin-bottom: 8px; }
.rm-intro-themes { display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(760px, 100%); }
.rm-intro-themes span {
  width: 100%;
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge);
  color: var(--orange-2);
  font: 700 clamp(16px, 1.8vw, 23px)/1.2 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .02em;
  animation: pop .45s var(--ease-pop) both;
}
.rm-intro-themes span.red { background: var(--red-face); color: #FFE2B0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 3px 0 var(--red-edge); }
.rm-event {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  max-width: 620px;
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 157, 28, .14);
  box-shadow: inset 0 0 0 2px var(--orange), 0 0 30px rgba(255, 157, 28, .2);
  animation: pop .5s var(--ease-pop) both;
}
.rm-event b { color: var(--orange); font-size: 19px; }

/* ---------- карточка вопроса ---------- */

.rm-q { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.rm-q-head { color: var(--muted); font: 700 12px/1.2 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; }
.rm-panel.red .rm-q-head { color: #FFD9C7; }
.rm-q-theme { color: var(--orange-2); font: 700 clamp(17px, 1.7vw, 22px)/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .05em; max-width: 900px; }
.rm-q-value {
  display: inline-block;
  padding: .12em .42em .08em;
  border-radius: 26px;
  background: var(--cell-face);
  color: var(--orange);
  font: 400 clamp(64px, 9vw, 128px)/1 var(--font-logo);
  word-spacing: -.3em;
  text-shadow: 0 0 30px rgba(255, 157, 28, .6), 0 4px 0 rgba(0, 0, 0, .35);
  box-shadow: var(--cell-bevel), 0 7px 0 var(--cell-edge), 0 20px 40px rgba(0, 0, 0, .3);
  animation: pop .35s var(--ease-pop) both;
}
.rm-q-value.small { font-size: clamp(34px, 4.4vw, 58px); border-radius: 18px; }
.rm-panel.red .rm-q-value { background: rgba(0, 0, 0, .22); color: #FFE2B0; box-shadow: inset 0 0 0 2px rgba(255, 226, 176, .3), 0 7px 0 rgba(0, 0, 0, .25); }
.rm-splash { word-spacing: -.28em;
  font: 400 clamp(34px, 6vw, 80px)/1.02 var(--font-logo);
  color: #fff;
  letter-spacing: .01em;
  text-shadow: 0 0 30px rgba(255, 157, 28, .8), 0 4px 0 rgba(0, 0, 0, .35);
  animation: pop .45s var(--ease-pop) both, rm-glow 1.2s ease-in-out infinite alternate;
}
.rm-q-prompt { color: var(--orange-2); font: 700 clamp(18px, 2vw, 26px)/1.25 var(--font-ui); max-width: 980px; }
.rm-q-text { color: var(--orange-2); font: 700 clamp(22px, 2.5vw, 38px)/1.28 var(--font-ui); max-width: 1000px; text-wrap: balance; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.rm-panel.red .rm-q-text, .rm-panel.red .rm-q-prompt, .rm-panel.red .rm-q-theme, .rm-panel.red .rm-small { color: #FFE9C9; }
.rm-q-note { color: var(--orange-2); font-size: 20px; font-weight: 600; }
.rm-q-emoji { font-size: clamp(60px, 8.5vw, 116px); line-height: 1.15; letter-spacing: .08em; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.rm-q-img {
  max-width: min(100%, 760px);
  max-height: 46vh;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .25), 0 14px 34px rgba(0, 0, 0, .4);
}
.rm-q-img.small { max-height: 26vh; }
.rm-loading { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.rm-clef { font-size: 110px; line-height: 1; color: var(--orange); text-shadow: 0 0 30px rgba(255, 157, 28, .5); animation: rm-sway 1.4s ease-in-out infinite; }
.rm-big { word-spacing: -.28em; font: 400 clamp(28px, 4.2vw, 58px)/1.05 var(--font-logo); color: var(--orange); text-shadow: 0 0 26px rgba(255, 157, 28, .45), 0 3px 0 rgba(0, 0, 0, .35); overflow-wrap: anywhere; }
.rm-panel.red .rm-big { color: #FFE2B0; }
.rm-small { font-size: 16px; color: var(--orange-2); max-width: 640px; }
.rm-small b { color: #fff; }

.rm-answer {
  display: inline-block;
  max-width: 100%;
  padding: .26em .75em .22em;
  border-radius: 18px;
  background: var(--lit-face);
  color: var(--orange-ink);
  font: 800 clamp(26px, 3.4vw, 48px)/1.12 var(--font-ui);
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 5px 0 var(--orange-edge), 0 0 44px rgba(255, 157, 28, .35);
  animation: pop .4s var(--ease-pop) both;
}
.rm-verdict { font-size: 20px; font-weight: 600; }
.rm-verdict .ok { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 800; }
.rm-verdict .no { color: var(--bad); font-weight: 800; }
.rm-history { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15.5px; color: var(--muted); }
.rm-history > div { max-width: 640px; }
.rm-history svg { vertical-align: -2px; }
.rm-history .ok { color: var(--good); }
.rm-history .no { color: #FFB4A8; }

.rm-abox { width: min(560px, 100%); display: flex; flex-direction: column; gap: 10px; }
.rm-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .32);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 18px;
  font-weight: 600;
}
.rm-status:not(:has(.ava)) { padding: 8px 18px; }
.rm-status b { color: #fff; }
.rm-status.mine { background: rgba(255, 157, 28, .18); box-shadow: inset 0 0 0 2px var(--orange), 0 0 24px rgba(255, 157, 28, .3); color: var(--orange-2); }
.rm-hint { padding: 9px 14px; border-radius: 12px; background: rgba(255, 210, 63, .12); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .45); color: #FFE08A; font-weight: 600; }

/* выбор: кому отдать, ставки, цели модификатора */
.rm-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 880px; }
.rm-picks button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 18px;
  border-radius: 14px;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 4px 0 var(--cell-edge);
  color: var(--text);
  font: 700 18px/1.1 var(--font-ui);
  transition: transform .08s, background .15s, box-shadow .15s, color .15s;
}
.rm-picks button:has(.ava) { padding-left: 8px; }
.rm-picks.prices button { flex-direction: column; justify-content: center; gap: 3px; min-width: 96px; color: var(--orange); font: 400 22px/1 var(--font-logo); text-shadow: 0 0 12px rgba(255, 157, 28, .5); word-spacing: -.3em; }
.rm-picks.prices button small { font: 700 10px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-shadow: none; }
.rm-picks.prices button:hover small { color: rgba(42, 22, 0, .7); }
.rm-picks button:hover, .rm-picks button:focus-visible {
  background: var(--lit-face);
  color: var(--orange-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--orange-edge), 0 0 22px rgba(255, 157, 28, .4);
}
.rm-picks button:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 0 var(--cell-edge); }

.rm-roulette { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.rm-roulette button {
  min-width: 140px;
  min-height: 60px;
  padding: 12px 18px;
  border-radius: 16px;
  color: #fff;
  font: 400 17px/1 var(--font-logo);
  letter-spacing: .02em;
  transition: transform .08s, filter .15s;
}
.rm-roulette button:hover:not(:disabled) { filter: brightness(1.12); }
.rm-roulette button:active:not(:disabled) { transform: translateY(3px); }
.rm-roulette button:disabled { opacity: .35; cursor: not-allowed; }
.rm-roulette .red { background: radial-gradient(130% 120% at 50% 0%, #F2503A, #D1261A 55%, #A8170D); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 0 var(--red-edge); }
.rm-roulette .black { background: linear-gradient(180deg, #2A2A2A, #111); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 0 0 2px #444, 0 4px 0 #000; }
.rm-roulette .zero { background: linear-gradient(180deg, #2EBE56, #1D9A3C); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 0 #0E5A21; }
.rm-ball {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, .2);
  color: #fff;
  font: 400 16px/1 var(--font-logo);
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, .35), inset 0 6px 8px rgba(255, 255, 255, .2), 0 14px 30px rgba(0, 0, 0, .4);
  animation: rm-roll .9s var(--ease-out) both;
}
.rm-ball.red { background: radial-gradient(circle at 40% 30%, #FF6F5A, #D1261A 60%, #8E1209); }
.rm-ball.black { background: radial-gradient(circle at 40% 30%, #555, #151515 60%, #000); }
.rm-ball.zero { background: radial-gradient(circle at 40% 30%, #5BE07E, #1D9A3C 60%, #0D5A20); }

/* финал */
.rm-fthemes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; }
.rm-fthemes button {
  min-height: 96px;
  padding: 10px;
  border-radius: 14px;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 4px 0 var(--cell-edge);
  color: var(--orange);
  font: 800 clamp(13px, 1.3vw, 18px)/1.2 var(--font-ui);
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transition: transform .1s, background .15s;
}
.rm-fthemes button:disabled { cursor: default; }
.rm-fthemes button.can:not(.removed):hover { background: var(--lit-face); color: var(--orange-ink); transform: translateY(-2px); }
.rm-fthemes button.removed { background: var(--cell-used); color: rgba(255, 157, 28, .28); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35); }
.rm-fthemes button.removed span { text-decoration: line-through; text-decoration-thickness: 2px; }

/* таблица мест */
.rm-standings { display: flex; flex-direction: column; gap: 8px; width: min(720px, 100%); }
.rm-st {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .24);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
}
.rm-st-rank { width: 26px; text-align: center; font: 400 15px/1 var(--font-logo); color: var(--muted); }
.rm-st.r1 .rm-st-rank { color: var(--gold); text-shadow: 0 0 12px rgba(255, 210, 63, .6); }
.rm-st.r2 .rm-st-rank { color: #CFD8E6; }
.rm-st.r3 .rm-st-rank { color: #D99A6A; }
.rm-st.r1 { background: linear-gradient(90deg, rgba(255, 210, 63, .16), rgba(0, 0, 0, .2)); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .4); }
.rm-st-nm { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-st-nm a { color: inherit; text-decoration: none; }
.rm-st-nm a:hover { color: var(--orange-2); }
.rm-st-ans { color: var(--orange-2); }
.rm-st-sc { font: 400 20px/1 var(--font-logo); color: var(--orange); word-spacing: -.3em; font-variant-numeric: tabular-nums; }
.rm-st-sc.neg, .rm-st-sc.no { color: var(--bad); }
.rm-st-sc.ok { color: var(--good); }
.rm-st.current { box-shadow: inset 0 0 0 2px var(--orange), 0 0 22px rgba(255, 157, 28, .25); }

.rm-over { gap: 14px; }
.rm-winner-ava { position: relative; padding: 10px; }
.rm-winner-ava::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 210, 63, .7), transparent 30%, rgba(255, 157, 28, .7), transparent 60%, rgba(255, 210, 63, .7), transparent 90%);
  animation: spin 6s linear infinite;
  filter: blur(2px);
  z-index: -1;
}
.rm-winner { word-spacing: -.28em; font: 400 clamp(32px, 5vw, 64px)/1.05 var(--font-logo); color: var(--orange); text-shadow: 0 0 30px rgba(255, 157, 28, .6), 0 4px 0 rgba(0, 0, 0, .35); overflow-wrap: anywhere; }

/* мягкий призыв войти (гость) */
.rm-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(42, 171, 238, .1);
  box-shadow: inset 0 0 0 1px rgba(42, 171, 238, .35);
  color: #9ED9FA;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.rm-soft:hover { background: rgba(42, 171, 238, .2); color: #fff; }
.rm-soft .i-telegram { color: var(--tg); }
/* без бота вход по нику — без телеграмного синего */
.rm-soft.nick { background: rgba(255, 157, 28, .1); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .35); color: var(--orange-2); }
.rm-soft.nick:hover { background: rgba(255, 157, 28, .2); color: #fff; }

/* награда за партию в таблице мест и на подиуме ТВ: рейтинг, опыт, монеты */
.rm-rws { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.rm-rw { padding: 3px 7px; border-radius: 8px; background: rgba(0, 0, 0, .3); font: 700 12px/1.2 var(--font-ui); white-space: nowrap; }
.rm-rw.up { color: var(--good); }
.rm-rw.down { color: var(--bad); }
.rm-rw.xp { color: var(--orange-2); }
.rm-rw.coin { color: var(--gold); }

/* моё место в итогах и моя награда строкой под таблицей: монеты · опыт · рейтинг */
.rm-st.me { box-shadow: inset 0 0 0 2px rgba(255, 157, 28, .6), 0 0 18px rgba(255, 157, 28, .18); }
.rm-myrw { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rm-myrw-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .28);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font: 700 17px/1.25 var(--font-ui);
}
/* точка — перед каждой частью, кроме первой: при переносе она уезжает вместе со своей частью */
.rm-myrw-in b { white-space: nowrap; }
.rm-myrw-in b + b::before { content: '·'; margin-right: 10px; color: var(--dim); }
@media (max-width: 520px) { .rm-myrw-in { gap: 2px 8px; padding: 9px 14px; font-size: 15px; } .rm-myrw-in b + b::before { margin-right: 8px; } }
.rm-myrw .coin { color: var(--gold); }
.rm-myrw .xp { color: var(--orange-2); }
.rm-myrw .up { color: var(--good); }
.rm-myrw .down { color: var(--bad); }

/* ---------- лобби ---------- */

.rm-lobby { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.rm-bigcode { display: flex; justify-content: center; gap: 10px; }
.rm-bigcode .price.xl { min-width: 1.5em; padding: .3em .36em .26em; font-size: clamp(38px, 5.5vw, 64px); }
.rm-bigcode.dim { opacity: .9; }
.rm-linkbox { display: flex; gap: 8px; width: min(700px, 100%); }
.rm-linkbox .field { flex: 1 1 auto; min-width: 0; font-size: 15px; }
.rm-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 640px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 93, 77, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 93, 77, .4);
  color: #FFC4BB;
  font-size: 14px;
  text-align: left;
}
.rm-warn svg { flex: none; margin-top: 2px; }
.rm-lobby-text { max-width: 640px; }
.rm-plist { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; }
.rm-pchip {
  --pc: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 4px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .28);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pc) 70%, transparent);
  font-weight: 700;
  animation: pop .35s var(--ease-pop) both;
}
.rm-pchip.off { opacity: .55; }
.rm-chaos { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(820px, 100%); }
.rm-chaos-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.rm-chaos-pick button {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .24);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
  transition: background .15s, box-shadow .15s;
}
.rm-chaos-pick button:hover { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2); }
.rm-chaos-pick button.on { background: rgba(255, 157, 28, .14); box-shadow: inset 0 0 0 2px var(--orange), 0 0 20px rgba(255, 157, 28, .2); }
.rm-chaos-pick b { display: block; margin-bottom: 4px; font-size: 15px; }
.rm-chaos-pick button.on b { color: var(--orange-2); }
.rm-chaos-pick span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.rm-party-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 700px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 157, 28, .45);
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}
.rm-party-tip > svg { flex: none; color: var(--orange); }
.rm-party-tip.on { border-style: solid; border-color: rgba(255, 157, 28, .6); background: rgba(255, 157, 28, .08); }
.rm-party-tip b { color: var(--text); }
.rm-party-tip .btn { flex: none; }

/* ---------- экран входа в комнату ---------- */

.rm-join { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.rm-join-back { align-self: flex-start; margin: -10px 0 0 -6px; }
.rm-faces { display: flex; justify-content: center; padding-left: 8px; }
.rm-face { margin-left: -8px; border-radius: 50%; box-shadow: 0 0 0 3px var(--card); }
.rm-face.off { opacity: .5; }
.rm-join-form { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 4px; text-align: left; }
.rm-join-form .form-err { text-align: center; }
.rm-divider { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--muted); font-size: 13px; }
.rm-divider::before, .rm-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.rm-pin { display: flex; gap: 8px; width: 100%; }
.rm-pin .field { flex: 1 1 auto; min-width: 0; }

/* ---------- панель ведущего ---------- */

.rm-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rm-side[hidden] { display: none; }
.rm-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(3, 24, 8, .62);
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 24px rgba(0, 0, 0, .18);
}
.rm-box.accent { box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .45), 0 0 26px rgba(255, 157, 28, .08); }
.rm-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 11px/1.2 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rm-host-ans { font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--orange); overflow-wrap: anywhere; }
.rm-accept { margin-top: 6px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.rm-typed { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 42px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .32); font-size: 17px; overflow-wrap: anywhere; }
.rm-judge { display: inline-flex; gap: 6px; margin-left: auto; }
.rm-ctrl { display: flex; flex-direction: column; gap: 10px; }
.rm-ctrl > .btn { width: 100%; white-space: normal; padding-top: 10px; padding-bottom: 10px; }
/* «Верно +2000» и «Неверно −2000» не влезают рядом — каждая встаёт на свою строку, а не вылезает за панель */
.rm-judge-row { flex-wrap: wrap; }
.rm-judge-row .btn { flex: 1 1 auto; padding: 0 12px; white-space: nowrap; }
.rm-mgr { display: flex; flex-direction: column; gap: 6px; }
.rm-mgr .p { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, .22); }
.rm-mgr .nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.rm-mgr .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rm-mgr .nm small { color: var(--orange-2); font: 400 11px/1.2 var(--font-logo); }
.rm-mgr .tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.rm-mgr .tools button { min-width: 30px; height: 28px; padding: 0 7px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 12.5px; font-weight: 700; transition: background .15s; }
.rm-mgr .tools button:hover { background: rgba(255, 157, 28, .25); }
.rm-mgr .tools button.on { background: rgba(255, 157, 28, .22); color: var(--orange-2); }
.rm-mgr .lbl { display: none; }
/* у ведущего пять кнопок на игрока: они — строкой под именем, иначе от похожих имён остаётся «Длин…» */
.rm-mgr.host .p { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; }
.rm-mgr.host .tools { grid-column: 1 / -1; justify-content: stretch; }
.rm-mgr.host .tools button { flex: 1 1 auto; }
.rm-mgr-hint { margin: -4px 0 8px; }

/* ---------- игроки ---------- */

.rm-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.rm-pc {
  --pc: var(--orange);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 14px 12px 10px;
  border-radius: 18px;
  background: var(--felt), linear-gradient(180deg, #0C4416, #08340F);
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 22px rgba(0, 0, 0, .2);
  transition: transform .18s var(--ease-pop), box-shadow .2s, opacity .2s, filter .2s;
}
.rm-pc::after {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--pc);
  box-shadow: 0 0 10px var(--pc);
  opacity: .8;
}
.rm-pc-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rm-pc-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #E8F5E4; font-size: 15px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
a.rm-pc-nm:hover { color: var(--orange-2); text-decoration: underline; text-underline-offset: 3px; }
.rm-pc-badges { min-height: 16px; font-size: 13px; line-height: 1.2; }
.rm-pc-sc { flex: none; color: var(--orange); font: 400 24px/1 var(--font-logo); word-spacing: -.3em; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 157, 28, .4); }
.rm-pc-sc.neg { color: #FFB4A8; text-shadow: none; }
.rm-pc.me { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .32), 0 10px 22px rgba(0, 0, 0, .2); }
.rm-pc.chooser { box-shadow: inset 0 0 0 3px var(--gold), 0 0 22px rgba(255, 210, 63, .25); }
.rm-pc.answering { transform: translateY(-5px); background: var(--felt), linear-gradient(180deg, #3D2A07, #241703); box-shadow: inset 0 0 0 3px var(--orange), 0 0 30px rgba(255, 157, 28, .55), 0 14px 26px rgba(0, 0, 0, .3); }
.rm-pc.tried { opacity: .5; }
.rm-pc.off { opacity: .42; filter: grayscale(.6); }
.rm-pc.frozen { box-shadow: inset 0 0 0 3px #7FD3FF, 0 0 20px rgba(127, 211, 255, .3); filter: saturate(.6); }
.rm-pc.flash { animation: rm-flash .7s ease-out; }

.rm-letter .emo { font: 400 calc(var(--s) * .4)/1 var(--font-logo); color: rgba(20, 10, 0, .78); filter: none; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }

/* ---------- большая красная кнопка ---------- */

.rm-buzzbar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: center; padding: 8px 0 4px; }
.rm-buzzbar:empty { display: none; }
.rm-buzz {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: min(560px, 100%);
  min-height: 92px;
  padding: 14px 20px;
  border-radius: 999px;
  background: radial-gradient(120% 140% at 50% 20%, #FF7158 0%, var(--red) 42%, var(--red-deep) 76%, #860E06 100%);
  color: #fff;
  font: 400 32px/1 var(--font-logo);
  letter-spacing: .06em;
  text-shadow: 0 2px 0 rgba(90, 0, 0, .5);
  box-shadow:
    inset 0 -8px 14px rgba(70, 0, 0, .45),
    inset 0 3px 2px rgba(255, 210, 190, .35),
    0 0 0 5px #170A06,
    0 0 0 7px rgba(255, 196, 107, .34),
    0 8px 0 5px #0B0503,
    0 18px 34px 4px rgba(0, 0, 0, .45),
    0 0 50px 8px rgba(224, 48, 30, .3);
  transition: transform .06s, box-shadow .06s, filter .2s;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.rm-buzz::before {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  top: 7%;
  height: 34%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .06) 75%, transparent);
  pointer-events: none;
  z-index: -1;
}
.rm-buzz small { font: 600 13px/1.2 var(--font-ui); letter-spacing: 0; text-transform: none; opacity: .88; }
.rm-buzz:hover:not(:disabled) { filter: brightness(1.08); }
.rm-buzz:active:not(:disabled), .rm-buzz.pressed {
  transform: translateY(6px);
  box-shadow:
    inset 0 -4px 10px rgba(70, 0, 0, .5),
    inset 0 3px 2px rgba(255, 210, 190, .3),
    0 0 0 5px #170A06,
    0 0 0 7px rgba(255, 196, 107, .34),
    0 2px 0 5px #0B0503,
    0 6px 14px 2px rgba(0, 0, 0, .45),
    0 0 80px 18px rgba(224, 48, 30, .5);
}
.rm-buzz:disabled { cursor: not-allowed; filter: grayscale(.8) brightness(.6); opacity: 1; }
.rm-buzz:focus-visible { outline: 3px solid var(--focus); outline-offset: 12px; }

/* ---------- пульт (режим вечеринки на телефоне) ---------- */

.rm-ctl {
  grid-template-rows: none;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  gap: 12px;
  padding: 10px 14px calc(14px + var(--safe-b));
}
.rm-ctl .rm-top { min-height: 50px; padding: 6px; border-radius: 18px; }
.rm-ctl .rm-panel { min-height: 0; padding: 40px 16px 20px; border-radius: 22px; }
.rm-ctl .rm-q { gap: 12px; }
.rm-ctl .rm-big { font-size: clamp(24px, 8vw, 40px); }
.rm-ctl .rm-q-value { font-size: clamp(52px, 17vw, 84px); }
.rm-ctl .rm-answer { font-size: clamp(20px, 6vw, 30px); }
.rm-ctl .rm-buzzbar { position: static; padding: 14px 0 18px; }
.rm-buzz > span { word-spacing: -.3em; }
.rm-buzz > span i { margin-left: -.32em; font-style: normal; }
.rm-ctl .rm-side:not([hidden]) { order: 5; }
.rm-me-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  border-radius: 20px;
  background: var(--felt), linear-gradient(180deg, #0C4416, #08340F);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 22px rgba(0, 0, 0, .2);
  transition: box-shadow .2s;
}
.rm-me-card.hot { box-shadow: inset 0 0 0 3px var(--orange), 0 0 30px rgba(255, 157, 28, .45); }
.rm-me-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rm-me-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.rm-me-txt .chip { margin-left: 4px; vertical-align: 1px; }
.rm-look {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 196, 107, .45);
  color: var(--orange-2);
  font-weight: 700;
  font-size: 16px;
}
.rm-look.big { padding: 18px 22px; font-size: 19px; }
.rm-choose { display: flex; align-items: center; gap: 14px; text-align: left; }
.rm-choose b { display: block; font-size: 22px; }
.rm-board.compact { gap: 5px; }
.rm-board.compact .rm-trow { gap: 5px; --tw: 1.6fr; }
.rm-board.compact .rm-tname, .rm-board.compact .rm-cell { min-height: 46px; padding: 4px 6px; border-radius: 9px; }
.rm-board.compact .rm-tname { font-size: 10.5px; }
.rm-board.compact .rm-cell { font-size: 14px; }
.rm-buzz.round {
  width: min(72vw, 290px);
  height: min(72vw, 290px);
  min-height: 0;
  border-radius: 50%;
  font-size: clamp(34px, 11vw, 52px);
  background: radial-gradient(circle at 50% 36%, #FF7158 0%, var(--red) 40%, var(--red-deep) 72%, #860E06 100%);
}
.rm-buzz.round::before { left: 22%; right: 22%; top: 7%; height: 32%; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; }
.rm-buzz.round small { max-width: 70%; font-size: 13px; }
.rm-buzz.round:not(:disabled)::after {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 110, 85, .6);
  opacity: 0;
  pointer-events: none;
}
.rm-players.mini { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.rm-players.mini::-webkit-scrollbar { display: none; }
.rm-players.mini .rm-pc { flex: none; gap: 7px; padding: 5px 12px 7px 5px; border-radius: 99px; }
.rm-players.mini .rm-pc::after { left: 14px; right: 14px; height: 2px; }
.rm-players.mini .rm-pc-nm { max-width: 92px; font-size: 12px; }
.rm-players.mini .rm-pc-sc { font-size: 14px; }
.rm-players.mini .rm-pc.answering { transform: none; }

.rm-sound-hint {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(8, 26, 12, .94);
  box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .5), 0 14px 30px rgba(0, 0, 0, .45);
  color: var(--orange-2);
  font-weight: 700;
  transform: translateX(-50%);
  animation: toast-in .3s var(--ease-out) both;
}

/* ---------- анимации ---------- */

@keyframes rm-glow { from { text-shadow: 0 0 18px rgba(255, 157, 28, .5), 0 4px 0 rgba(0, 0, 0, .35); } to { text-shadow: 0 0 44px rgba(255, 157, 28, 1), 0 4px 0 rgba(0, 0, 0, .35); } }
@keyframes rm-sway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes rm-roll { from { transform: rotate(-540deg) scale(.4); } to { transform: rotate(0) scale(1); } }
@keyframes rm-flash { 0% { box-shadow: inset 0 0 0 6px #fff, 0 0 40px rgba(255, 255, 255, .6); } 100% { box-shadow: inset 0 0 0 3px var(--orange), 0 0 30px rgba(255, 157, 28, .55); } }
@keyframes rm-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes rm-ring { 0% { opacity: .8; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.18); } }

@media (prefers-reduced-motion: no-preference) {
  .rm-buzz.round:not(:disabled)::after { animation: rm-ring 1.6s ease-out infinite; }
}

/* ---------- адаптив комнаты ---------- */

@media (max-width: 1100px) {
  .rm-stage.with-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .rm { gap: 10px; padding: 8px 10px calc(10px + var(--safe-b)); }
  .rm-top { gap: 6px; padding: 5px; border-radius: 16px; flex-wrap: nowrap; }
  .rm-logo, .rm-top .hide-s, .rm-top > .icon-btn[data-local="copy"] { display: none; }
  .rm-top > * { flex: none; }
  .rm-top > .rm-chip { flex: 0 1 auto; min-width: 0; }
  .rm-tg span { display: none; }
  .rm-tg { width: 36px; padding: 0; }
  .rm-code { padding: 0 10px; }
  .rm-code > span { display: none; }
  .rm-chip { display: block; font-size: 12.5px; line-height: 32px; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; }
  .rm-chip small { display: none; }
  .rm-panel { min-height: 300px; padding: 40px 12px 16px; border-radius: 20px; }
  .rm-timer { left: 12px; right: 12px; top: 12px; }
  .rm-board, .rm-trow { gap: 4px; }
  .rm-trow { --tw: 1.5fr; }
  .rm-tname, .rm-cell { min-height: 48px; padding: 4px 6px; border-radius: 8px; }
  .rm-tname { font-size: 10.5px; letter-spacing: 0; }
  .rm-cell { font-size: 14px; }
  /* тема — отдельной строкой над своими ценами: в узкой колонке длинные слова рвались посередине */
  .rm .rm-board { gap: 8px; }
  .rm .rm-trow { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
  .rm .rm-tname, .rm .rm-board.compact .rm-tname { grid-column: 1 / -1; min-height: 0; padding: 5px 10px; border-radius: 8px; font-size: 11.5px; letter-spacing: .02em; }
  .rm .rm-tname span { overflow-wrap: break-word; }
  .rm-q { gap: 12px; }
  .rm-q-text { font-size: 20px; }
  .rm-players { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
  .rm-pc { gap: 8px; padding: 8px 10px 10px 8px; border-radius: 14px; }
  .rm-pc .ava { --s: 34px !important; }
  .rm-pc-nm { font-size: 12.5px; }
  .rm-pc-sc { font-size: 17px; }
  .rm-buzzbar { padding: 8px 10px 4px; }
  .rm-buzz { min-height: 76px; font-size: 26px; }
  .rm-fthemes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-fthemes button { min-height: 62px; }
  .rm-chaos-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-linkbox { flex-wrap: wrap; }
  .rm-linkbox .field { flex-basis: 100%; }
  .rm-linkbox .btn { flex: 1 1 0; }
  .rm-party-tip { flex-wrap: wrap; }
  .rm-bigcode { gap: 7px; }
  .rm-pin { flex-direction: column; }
  .rm-roulette button { min-width: 0; flex: 1 1 0; font-size: 14px; }
  .rm-picks button { min-height: 46px; font-size: 16px; }
  /* ведущий с телефона: кнопки под палец и с подписями — подсказок при наведении тут нет */
  .rm-mgr.host .p { row-gap: 8px; }
  .rm-mgr.host .tools { gap: 6px; }
  .rm-mgr.host .tools button { height: 40px; padding: 0 8px; border-radius: 10px; font-size: 13px; }
  .rm-mgr.host .lbl { display: inline; margin-left: 5px; }
}
/* итоги на телефоне: награды соседей — второй строкой под именем, иначе от имён остаётся пара букв */
@media (max-width: 560px) {
  .rm-st:has(> .rm-rws) { flex-wrap: wrap; row-gap: 4px; } /* переносим только строки с наградами — длинное имя без них сжимается в «…» */
  .rm-st:has(> .rm-rws) > .rm-st-nm { flex-basis: 0; }
  .rm-st > .rm-rws { order: 9; flex-basis: 100%; justify-content: flex-start; padding-left: 90px; }
}
/* пульт, повёрнутый боком: круглая кнопка справа и целиком на экране, а не под вопросом за краем */
@media (orientation: landscape) and (max-height: 500px) {
  .rm-ctl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; column-gap: 16px; max-width: 980px; }
  .rm-ctl > * { grid-column: 1; }
  .rm-ctl .rm-buzzbar { grid-column: 2; grid-row: 1 / span 6; align-self: start; position: sticky; top: calc((100vh - min(60vh, 290px)) / 2); padding: 0 8px; }
  .rm-buzz.round { width: min(60vh, 290px); height: min(60vh, 290px); font-size: clamp(28px, 9vh, 44px); }
}

/* ---------- экран для телевизора (/tv/:code) ----------
   Всё в em от --u: размер шрифта считается от ширины и высоты окна, поэтому
   на 1920×1080 и 1280×720 экран выглядит одинаково — просто крупнее или мельче. */

.tv {
  --u: clamp(9px, min(1.04vw, 1.86vh), 46px);
  position: fixed;
  inset: 0;
  display: grid;
  /* колонка — ровно по экрану: без неё она растёт по самой широкой строке (шапка с подсказкой про звук,
     карточки игроков) — и табло, QR и последний игрок уезжают за край */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1em;
  padding: 1em 1.6em 1.3em;
  overflow: hidden;
  font-size: var(--u);
  user-select: none;
  -webkit-user-select: none;
}
.tv .ava { --s: 3em !important; }
.tv .eyebrow { font-size: .8em; }
.tv .rm-event b { font-size: 1.15em; }
.tv-unlock { color: var(--orange-2); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .5); animation: rm-blink 2s ease-in-out infinite; }

/* верх: логотип, комната, раунд, мини-QR */
.tv-top { display: flex; align-items: center; gap: .8em; min-height: 4.2em; }
.tv-logo { display: flex; align-items: center; gap: .55em; margin-right: .4em; }
.tv-logo img { width: 2.7em; height: 2.7em; filter: drop-shadow(0 0 .8em rgba(255, 157, 28, .4)); }
.tv-logo span { font: 400 1.8em/1 var(--font-logo); color: #fff; letter-spacing: .02em; text-shadow: 0 0 1em rgba(255, 157, 28, .45), 0 .1em 0 rgba(0, 0, 0, .35); }
.tv-chip {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  height: 2.4em;
  padding: 0 1.05em;
  border-radius: 99px;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font: 700 1em/1 var(--font-ui);
  white-space: nowrap;
}
.tv-chip svg { width: 1.1em; height: 1.1em; color: var(--orange); }
.tv-chip b { font: 400 1.2em/1 var(--font-logo); color: var(--orange); letter-spacing: .1em; text-shadow: 0 0 .6em rgba(255, 157, 28, .5); }
.tv-chip small { font-size: .85em; color: var(--dim); }
.tv-chip.lit { color: var(--orange-2); background: rgba(255, 157, 28, .14); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .45); font-size: 1.15em; }
.tv-chip.warn { color: #FFB0A6; box-shadow: inset 0 0 0 1px rgba(255, 93, 77, .6); animation: rm-blink 1.4s ease-in-out infinite; }
.tv-sp { flex: 1 1 auto; }
/* тесно в шапке — сжимаются подсказка про звук и название раунда (с многоточием), а QR и кнопки — никогда */
.tv-top > * { flex-shrink: 0; }
.tv-top > .tv-sp { flex-shrink: 1; }
.tv-top > .tv-round { flex-shrink: 3; min-width: 0; }
.tv-top > .tv-unlock { flex-shrink: 1; min-width: 0; }
.tv-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tv-chip > svg, .tv-chip > small { flex: none; }
/* подсказке про звук посреди игры место освобождает надпись у логотипа */
.tv:not(.is-lobby) .tv-top:has(.tv-unlock) .tv-logo span { display: none; }
.tv-btn {
  display: grid;
  place-items: center;
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  color: var(--muted);
  opacity: .55;
  transition: opacity .2s, color .2s;
}
.tv-btn svg { width: 1.15em; height: 1.15em; }
.tv-btn:hover { opacity: 1; color: var(--orange-2); }
:fullscreen .tv-btn[data-tv="full"] { display: none; }
.tv-corner {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .45em 1em .45em .45em;
  border-radius: 1em;
  background: rgba(0, 0, 0, .32);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.tv-qr-mini { flex: none; width: 6.4em; height: 6.4em; border-radius: .5em; overflow: hidden; }
.tv-qr-mini svg, .tv-qr svg { display: block; width: 100%; height: 100%; }
.tv-corner-txt { display: flex; flex-direction: column; gap: .3em; }
.tv-corner-txt span { font: 700 .8em/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tv-corner-txt b { max-width: 24em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.15em; color: var(--orange-2); }

/* сцена */
.tv-stage {
  position: relative;
  isolation: isolate;
  min-height: 0;
  padding: 3.2em 2.6em 2em;
  border-radius: 1.6em;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(150, 240, 110, .14), transparent 62%),
    var(--felt),
    linear-gradient(180deg, #0B4A17 0%, #083A12 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 0 6em rgba(0, 0, 0, .32),
    0 0 0 .35em rgba(0, 0, 0, .18),
    0 1.4em 3em rgba(0, 0, 0, .4);
  overflow: hidden;
}
.tv-stage.red {
  border-color: rgba(255, 170, 140, .35);
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(255, 190, 150, .22), transparent 62%),
    var(--felt),
    linear-gradient(180deg, #C42414 0%, #9A140B 100%);
}
.tv.is-lobby .tv-stage { padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.tv-stage-in { height: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.tv-timer { position: absolute; left: 1.5em; right: 1.5em; top: 1.1em; z-index: 2; display: flex; align-items: center; gap: .8em; }
.tv-timer-bar { flex: 1 1 auto; height: .55em; border-radius: 99px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); overflow: hidden; }
.tv-timer-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(180deg, #FFC66E, var(--orange) 60%, #E8830A); box-shadow: 0 0 .8em rgba(255, 157, 28, .7); transition: width .25s linear; }
.tv-timer-t { min-width: 2.6em; padding: .3em .55em; border-radius: 99px; background: rgba(0, 0, 0, .42); color: var(--orange-2); font: 400 1.35em/1 var(--font-logo); text-align: center; font-variant-numeric: tabular-nums; }
.tv-timer.low .tv-timer-bar i { background: linear-gradient(180deg, #FF8A73, var(--red)); box-shadow: 0 0 1em rgba(224, 48, 30, .8); }
.tv-timer.low .tv-timer-t { color: #FFB0A6; animation: rm-blink .9s ease-in-out infinite; }

/* табло на весь экран: строки делят высоту поровну */
.tv-boardwrap { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 1em; }
.tv-board { flex: 1 1 auto; min-height: 0; grid-template-rows: repeat(var(--rows, 6), minmax(0, 1fr)); gap: .55em; }
.tv .rm-trow { gap: .55em; --tw: 2.5fr; }
.tv .rm-tname, .tv .rm-cell { min-height: 0; padding: .25em .8em; border-radius: .65em; box-shadow: var(--cell-bevel), 0 .2em 0 var(--cell-edge); }
.tv .rm-tname.red, .tv .rm-cell.red { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 .2em 0 var(--red-edge); }
.tv .rm-cell.used { box-shadow: inset 0 .15em .5em rgba(0, 0, 0, .35); }
.tv .rm-tname { font-size: 1.5em; }
.tv .rm-cell { font-size: 2.8em; }
.tv-chooser { align-self: center; display: inline-flex; align-items: center; gap: .7em; padding: .3em 1.2em .3em .3em; border-radius: 99px; background: rgba(0, 0, 0, .32); color: var(--muted); font-size: 1.3em; }
.tv-chooser b { color: #fff; }
.tv-chooser .ava { --s: 2.3em !important; }

.tv-intro { display: flex; flex-direction: column; align-items: center; gap: .9em; text-align: center; }
.tv-intro .eyebrow { font-size: 1em; }
.tv-intro-name { word-spacing: -.28em; font: 400 4em/1 var(--font-logo); color: #fff; text-shadow: 0 0 .5em rgba(255, 157, 28, .55), 0 .08em 0 rgba(0, 0, 0, .35); margin-bottom: .2em; }
.tv-intro-themes { display: grid; gap: .5em; width: min(62em, 100%); }
.tv-intro-themes span {
  padding: .5em 1.1em;
  border-radius: .55em;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 .12em 0 var(--cell-edge);
  color: var(--orange-2);
  font: 700 1.75em/1.15 var(--font-ui);
  text-transform: uppercase;
  animation: pop .45s var(--ease-pop) both;
}
.tv-intro-themes span.red { background: var(--red-face); color: #FFE2B0; }
.tv .rm-event { max-width: 50em; padding: .8em 1.2em; border-radius: .9em; font-size: 1.25em; }

/* вопрос */
.tv-q { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1em; text-align: center; }
.tv-theme { color: var(--orange-2); font: 700 1.7em/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.tv-theme.sm { font-size: 1.15em; letter-spacing: .14em; opacity: .9; }
.tv .rm-q-value { font-size: 9em; border-radius: .16em; box-shadow: var(--cell-bevel), 0 .06em 0 var(--cell-edge), 0 .2em .4em rgba(0, 0, 0, .3); }
.tv .rm-q-value.small { font-size: 4.4em; }
.tv .rm-splash { font-size: 5.8em; }
.tv-content { display: flex; flex-direction: column; align-items: center; gap: .7em; max-width: 66em; min-height: 0; }
.tv-content .rm-q-text { max-width: none; font-size: 3em; line-height: 1.22; }
.tv-content.t-xl .rm-q-text { font-size: 3.7em; }
.tv-content.t-m .rm-q-text { font-size: 2.5em; }
.tv-content.t-s .rm-q-text { font-size: 2.1em; }
.tv-content.small .rm-q-text { font-size: 1.9em; }
.tv-content .rm-q-prompt { max-width: none; font-size: 1.9em; }
.tv-content .rm-q-note { font-size: 1.6em; }
.tv-content .rm-q-emoji { font-size: 8em; }
.tv-content.small .rm-q-emoji { font-size: 4.6em; }
.tv-content .rm-q-img { max-width: 100%; max-height: 50vh; border-radius: .7em; }
.tv-content .rm-q-img.small { max-height: 28vh; }
.tv-content .rm-clef { font-size: 9em; }
.tv-content.small .rm-clef { font-size: 5em; }
.tv-big { word-spacing: -.28em; font: 400 4.4em/1.05 var(--font-logo); color: var(--orange); text-shadow: 0 0 .45em rgba(255, 157, 28, .5), 0 .07em 0 rgba(0, 0, 0, .35); overflow-wrap: anywhere; }
.tv-big.glow { animation: rm-glow 1.2s ease-in-out infinite alternate; }
.tv-stage.red .tv-big, .tv-stage.red .tv-theme, .tv-stage.red .tv-sub, .tv-stage.red .rm-q-text, .tv-stage.red .rm-q-prompt { color: #FFE9C9; }
.tv-sub { color: var(--orange-2); font-size: 1.45em; font-weight: 600; max-width: 48em; }
.tv-sub b { color: #fff; }
.tv-who {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: .55em 1.8em .55em .55em;
  border-radius: 99px;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 .14em rgba(255, 157, 28, .55), 0 0 2em rgba(255, 157, 28, .2);
  text-align: left;
  animation: pop .4s var(--ease-pop) both;
}
.tv-who .ava { --s: 4.4em !important; }
.tv-who .eyebrow { font-size: .85em; }
.tv-who b { display: block; margin-top: .15em; font-size: 2em; line-height: 1.1; }
.tv-press {
  word-spacing: -.28em;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .55em 1.4em;
  border-radius: 99px;
  background: var(--red-face);
  color: #fff;
  font: 400 1.25em/1 var(--font-logo);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 .2em 0 var(--red-edge), 0 0 2em rgba(224, 48, 30, .45);
  animation: rm-blink 1.1s ease-in-out infinite;
}
.tv-press svg { width: 1.2em; height: 1.2em; }
/* прожектор на отвечающем */
.tv-spot {
  display: flex;
  align-items: center;
  gap: 1.1em;
  padding: .6em 2.2em .6em .6em;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255, 157, 28, .32), rgba(255, 157, 28, .08));
  box-shadow: inset 0 0 0 .18em var(--orange), 0 0 3em rgba(255, 157, 28, .5);
  text-align: left;
  animation: pop .4s var(--ease-pop) both;
}
.tv-spot .ava { --s: 5.4em !important; }
.tv-spot .eyebrow { color: var(--orange-2); font-size: .95em; }
.tv-spot b { display: block; margin-top: .1em; color: #fff; font-size: 2.6em; line-height: 1.05; }
.tv-order { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; }
.tv-ord {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .3em .9em .3em .3em;
  border-radius: 99px;
  background: rgba(0, 0, 0, .3);
  font-size: 1.15em;
  font-weight: 700;
  animation: pop .35s var(--ease-pop) both;
}
.tv-ord i { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: rgba(255, 255, 255, .1); font: 400 .8em/1 var(--font-logo); font-style: normal; }
.tv-ord b { font-weight: 800; }
.tv-ord.ok { box-shadow: inset 0 0 0 2px rgba(61, 220, 106, .6); }
.tv-ord.ok b { color: var(--good); }
.tv-ord.no { box-shadow: inset 0 0 0 2px rgba(255, 93, 77, .5); color: #FFC4BB; }
.tv-ord.now { box-shadow: inset 0 0 0 2px var(--orange); color: var(--orange-2); }
.tv-ord.now i { background: var(--lit-face); color: var(--orange-ink); }
.tv-dispute { display: flex; flex-direction: column; align-items: center; gap: .3em; padding: .8em 1.6em; border-radius: 1em; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 2px rgba(255, 210, 63, .5); font-size: 1.3em; }
.tv-dispute b { font-size: 1.4em; }
.tv .rm-answer.tv-answer { font-size: 3.5em; border-radius: .35em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 .1em 0 var(--orange-edge), 0 0 1em rgba(255, 157, 28, .4); }
.tv-verdict { display: inline-flex; align-items: center; gap: .6em; color: var(--muted); font-size: 1.8em; font-weight: 700; }
.tv-verdict.ok { color: #fff; }
.tv-verdict.ok b { color: var(--good); }
.tv-verdict .ava { --s: 2.3em !important; }
.tv .rm-ball { width: 9em; height: 9em; font-size: 1.2em; }
.tv-marks { display: flex; flex-wrap: wrap; justify-content: center; gap: .7em; }
.tv-mark { position: relative; opacity: .4; filter: grayscale(.7); transition: opacity .3s, filter .3s; }
.tv-mark .ava { --s: 3.2em !important; }
.tv-mark.on { opacity: 1; filter: none; }
.tv-mark svg { position: absolute; right: -.2em; bottom: -.2em; width: 1.4em; height: 1.4em; padding: .2em; border-radius: 50%; background: var(--good); color: #04250E; stroke-width: 3; }

/* итоги */
.tv-podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.6em; }
.tv-pod { display: flex; flex-direction: column; align-items: center; gap: .55em; animation: pop .5s var(--ease-pop) both; }
.tv-pod .ava { --s: 5em !important; }
.tv-pod.p1 .ava { --s: 6.6em !important; }
.tv-pod b { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.5em; }
.tv-pod .price.lg { font-size: 1.6em; }
.tv-pod .rm-rws { justify-content: center; gap: .3em; }
.tv .rm-rw { padding: .25em .55em; border-radius: .5em; font-size: 1em; }
.tv-pod-step {
  display: grid;
  place-items: center;
  width: 3.4em;
  height: 1.6em;
  margin-top: .2em;
  border-radius: .25em .25em 0 0;
  background: var(--cell-face);
  box-shadow: var(--cell-bevel);
  color: var(--orange);
  font: 400 2.8em/1 var(--font-logo);
  text-shadow: 0 0 .4em rgba(255, 157, 28, .5);
}
.tv-pod.p1 .tv-pod-step { height: 2.4em; background: var(--lit-face); color: var(--orange-ink); text-shadow: none; }
.tv-pod.p3 .tv-pod-step { height: 1.1em; }
.tv-rest { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; margin-top: 1em; font-size: 1.2em; color: var(--muted); }
.tv-rest span { padding: .3em .8em; border-radius: 99px; background: rgba(0, 0, 0, .3); }
.tv-rest b { color: var(--orange); }
.tv-winner { word-spacing: -.28em; font: 400 5.2em/1 var(--font-logo); color: var(--orange); text-shadow: 0 0 .5em rgba(255, 157, 28, .65), 0 .06em 0 rgba(0, 0, 0, .35); animation: pop .5s var(--ease-pop) both, rm-glow 1.4s ease-in-out infinite alternate; }

/* финал */
.tv-fthemes { width: min(76em, 100%); }
.tv .rm-fthemes button { min-height: 4.2em; padding: .5em; border-radius: .6em; font-size: 1.45em; box-shadow: var(--cell-bevel), 0 .15em 0 var(--cell-edge); }
.tv-finalists { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4em; }
.tv-fin { display: flex; flex-direction: column; align-items: center; gap: .45em; }
.tv-fin .ava { --s: 4.2em !important; }
.tv-fin b { font-size: 1.35em; }
.tv-fin-st { padding: .25em .8em; border-radius: 99px; background: rgba(0, 0, 0, .3); color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: .3em; }
.tv-fin-st.on { color: var(--good); box-shadow: inset 0 0 0 2px rgba(61, 220, 106, .5); }
.tv-fin-st svg { width: 1.1em; height: 1.1em; }
.tv-frows { display: flex; flex-direction: column; gap: .5em; width: min(64em, 100%); }
.tv-frow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr) auto auto;
  align-items: center;
  gap: 1em;
  padding: .45em 1.2em .45em .45em;
  border-radius: 99px;
  background: rgba(0, 0, 0, .28);
  font-size: 1.35em;
  text-align: left;
}
.tv-frow .ava { --s: 2.4em !important; }
.tv-frow.current { box-shadow: inset 0 0 0 2px var(--orange), 0 0 1.4em rgba(255, 157, 28, .3); }
.tv-frow-ans { color: var(--orange-2); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-frow-bet { color: var(--muted); }
.tv-frow-res { font: 400 1.1em/1 var(--font-logo); color: var(--muted); }
.tv-frow-res.ok { color: var(--good); }
.tv-frow-res.no { color: var(--bad); }

/* игроки внизу */
.tv-players { display: flex; justify-content: center; gap: .9em; min-height: 0; }
.tv-players:empty { display: none; }
.tv.is-lobby .tv-players { display: none; }
.tv-pl {
  --pc: var(--orange);
  position: relative;
  display: flex;
  align-items: center;
  gap: .75em;
  flex: 0 1 19em;
  min-width: 0;
  padding: .65em 1.1em .8em .65em;
  border-radius: 1.1em;
  background: var(--felt), linear-gradient(180deg, #0C4416, #08340F);
  box-shadow: inset 0 0 0 1px var(--line), 0 .6em 1.4em rgba(0, 0, 0, .25);
  transition: transform .25s var(--ease-pop), box-shadow .25s, opacity .25s, filter .25s, background .25s;
}
.tv-pl::after { content: ''; position: absolute; left: 1.3em; right: 1.3em; bottom: 0; height: .2em; border-radius: .2em .2em 0 0; background: var(--pc); box-shadow: 0 0 .6em var(--pc); opacity: .85; }
.tv-pl-ava { position: relative; flex: none; }
.tv-pl .ava { --s: 4em !important; }
.tv-pl-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .2em; }
.tv-pl-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 1.25em/1.1 var(--font-ui); letter-spacing: .03em; text-transform: uppercase; }
.tv-pl-txt span { min-height: 1.1em; font-size: .95em; }
.tv-pl-sc { flex: none; color: var(--orange); font: 400 2em/1 var(--font-logo); font-variant-numeric: tabular-nums; text-shadow: 0 0 .5em rgba(255, 157, 28, .45); }
.tv-pl-sc.neg { color: #FFB4A8; text-shadow: none; }
.tv-pl.chooser { box-shadow: inset 0 0 0 .16em var(--gold), 0 0 1.4em rgba(255, 210, 63, .3); }
.tv-pl.answering { transform: translateY(-.6em) scale(1.05); background: var(--felt), linear-gradient(180deg, #4A3208, #2A1B03); box-shadow: inset 0 0 0 .18em var(--orange), 0 0 2.4em rgba(255, 157, 28, .6), 0 .8em 1.6em rgba(0, 0, 0, .35); z-index: 1; }
.tv-pl.tried { opacity: .45; }
.tv-pl.off { opacity: .4; filter: grayscale(.7); }
.tv-pl.frozen { box-shadow: inset 0 0 0 .16em #7FD3FF, 0 0 1.4em rgba(127, 211, 255, .35); }
.tv-pl.buzzed { animation: tv-buzz .8s var(--ease-out); }
.tv-pl-tag {
  position: absolute;
  left: 50%;
  top: -.9em;
  padding: .3em .6em;
  border-radius: 99px;
  background: var(--red-face);
  color: #fff;
  font: 400 .75em/1 var(--font-logo);
  white-space: nowrap;
  box-shadow: 0 .2em 0 var(--red-edge), 0 0 1em rgba(224, 48, 30, .6);
  transform: translateX(-50%);
  animation: pop .3s var(--ease-pop) both;
}

/* лобби: большой QR и как зайти */
.tv-lobby { height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3.4em; padding: 0 2.4em; }
.tv-qr-card.card.marquee { display: flex; flex-direction: column; align-items: center; gap: 1em; padding: 2.4em; border-radius: 1.6em; }
.tv-qr { width: min(27em, 54vh); aspect-ratio: 1; border-radius: .8em; overflow: hidden; background: #FFF7E6; box-shadow: 0 0 0 .35em rgba(0, 0, 0, .3), 0 1em 2.4em rgba(0, 0, 0, .35); }
.tv-qr-cap { word-spacing: -.28em; font: 400 1.15em/1 var(--font-logo); color: var(--orange-2); letter-spacing: .02em; }
.tv-lobby-info { display: flex; flex-direction: column; gap: 1.3em; min-width: 0; }
.tv-lobby-info .eyebrow { font-size: 1em; }
.tv-title { word-spacing: -.28em; font: 400 4.2em/1 var(--font-logo); color: #fff; text-transform: uppercase; text-shadow: 0 0 .5em rgba(255, 157, 28, .5), 0 .07em 0 rgba(0, 0, 0, .35); }
.tv-steps { display: flex; flex-direction: column; gap: .55em; margin: 0; padding: 0; list-style: none; font-size: 1.45em; }
.tv-steps li { display: flex; align-items: center; gap: .7em; }
.tv-steps li > b { flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--lit-face); color: var(--orange-ink); font: 400 .8em/1 var(--font-logo); box-shadow: 0 .12em 0 var(--orange-edge); }
.tv-link { color: var(--orange); font-weight: 800; }
.tv-code-row { display: flex; align-items: center; gap: 1.2em; }
.tv .rm-bigcode { gap: .5em; }
.tv .rm-bigcode .price.xl { font-size: 3.3em; border-radius: .3em; box-shadow: var(--cell-bevel), 0 .1em 0 var(--cell-edge); }
.tv .rm-warn { font-size: 1.1em; max-width: 40em; }
.tv-lobby-players { display: flex; flex-wrap: wrap; gap: 1em; min-height: 6.4em; align-items: flex-start; }
.tv-lp { display: flex; flex-direction: column; align-items: center; gap: .4em; width: 6.6em; animation: pop .45s var(--ease-pop) both; }
.tv-lp .ava { --s: 4.4em !important; }
.tv-lp span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 1.05em; }
.tv-lp.off { opacity: .45; }
.tv-lobby-note { color: var(--muted); font-size: 1.2em; }
.tv-wait-dots { color: var(--muted); font-size: 1.5em; font-weight: 700; }
.tv-wait-dots i { font-style: normal; animation: rm-blink 1.2s ease-in-out infinite; }
.tv-wait-dots i:nth-child(2) { animation-delay: .2s; }
.tv-wait-dots i:nth-child(3) { animation-delay: .4s; }

.tv-net {
  position: fixed;
  left: 50%;
  bottom: 1.6em;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .8em 1.4em;
  border-radius: 1em;
  background: rgba(8, 26, 12, .94);
  box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .5), 0 1em 2em rgba(0, 0, 0, .45);
  color: var(--orange-2);
  font-size: 1.2em;
  font-weight: 700;
  transform: translateX(-50%);
  animation: rm-blink 2.4s ease-in-out infinite;
}
.tv-net { top: 1.4em; bottom: auto; color: #FFB0A6; box-shadow: inset 0 0 0 1px rgba(255, 93, 77, .6), 0 1em 2em rgba(0, 0, 0, .45); animation: none; }
.tv-missing .tv-msg { display: flex; flex-direction: column; align-items: center; gap: 1.4em; max-width: 44em; text-align: center; }

@keyframes tv-buzz {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-1em) scale(1.12); box-shadow: inset 0 0 0 .3em #fff, 0 0 4em rgba(255, 220, 160, .9); }
  100% { transform: translateY(-.6em) scale(1.05); }
}

/* больше четырёх игроков — карточки поменьше, больше шести — два ряда поровну (--per карточек в ряду) */
.tv-players.many { gap: .6em; }
.tv-players.many .tv-pl { gap: .5em; padding: .5em .8em .65em .5em; }
.tv-players.many .tv-pl .ava { --s: 2.9em !important; }
.tv-players.many .tv-pl-txt b { font-size: 1em; }
.tv-players.many .tv-pl-sc { font-size: 1.45em; }
.tv-players.two { flex-wrap: wrap; row-gap: .5em; }
.tv-players.two .tv-pl { flex-basis: calc((100% - (var(--per, 4) - 1) * .6em) / var(--per, 4)); }

/* узкое окно (планшет стоя, телефон открыл экран ТВ): лобби в колонку, шапка в две строки,
   на табло тема — строкой над своими ценами, как в комнате на телефоне */
@media (max-aspect-ratio: 1/1) {
  .tv { --u: clamp(8px, 2.4vw, 22px); }
  .tv:not(.is-lobby) { --u: clamp(7px, 2vw, 18px); }
  .tv-top { flex-wrap: wrap; row-gap: .5em; }
  .tv-lobby { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 1.4em; padding: 0; overflow: auto; }
  .tv-qr { width: min(22em, 70vw); }
  .tv-corner-txt { display: none; }
  .tv-players { flex-wrap: wrap; }
  .tv-stage { padding: 3em 1.4em 1.6em; }
  .tv-players.two .tv-pl { flex-basis: 15em; }
  .tv .rm-trow { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr); gap: .4em; }
  .tv .rm-tname { grid-column: 1 / -1; padding: .3em .8em; font-size: 1.25em; }
  .tv .rm-cell { padding-inline: .3em; font-size: 2.4em; }
}
