/* Экран вопросов: читается с другого конца комнаты. Всё масштабируется от ширины окна. */
body.screen { overflow: hidden; }
.stage { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 1.6vw 2.6vw; gap: 1.4vw; }
.s-head { display: flex; align-items: center; gap: 2vw; padding: 0 1.2vw; }
.s-head .brand { font-size: clamp(14px, 1.2vw, 22px); }
.s-title { flex: 1; text-align: center; color: var(--mute); font-weight: 700; font-size: clamp(14px, 1.3vw, 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-tools { display: flex; align-items: center; gap: 10px; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.conn.reconnecting { background: var(--gold); } .conn.offline { background: var(--bad); }
.s-main { min-height: 0; position: relative; padding: 0 1.2vw; }
.s-center { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.4vw; }
.s-huge { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5.4vw, 110px); line-height: 1.05; letter-spacing: -0.02em; }
.s-sub { color: var(--mute); font-size: clamp(16px, 1.7vw, 32px); max-width: 60vw; }

/* Вопрос + кольцо таймера */
.q-layout { height: 100%; display: grid; grid-template-columns: 1fr auto; gap: 3vw; align-items: center; }
.q-layout.with-img { grid-template-columns: 1.1fr .9fr auto; }
.q-label { display: inline-flex; gap: .8vw; align-items: center; color: var(--mute); font-weight: 800; font-size: clamp(14px, 1.4vw, 26px); margin-bottom: 1.2vw; }
.q-label .bet { color: #241800; background: var(--gold); padding: .2vw .8vw; border-radius: 999px; font-size: .8em; }
.q-text { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 72px); line-height: 1.15; letter-spacing: -0.01em; }
.q-text.long { font-size: clamp(22px, 2.5vw, 52px); }
.q-img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 1.2vw; background: var(--ink-2); }
.q-answer { margin-top: 2vw; padding: 1.4vw 2vw; border-radius: 1.4vw; background: rgba(255, 194, 75, .1); border: 2px solid rgba(255, 194, 75, .5); display: inline-block; animation: pop .35s ease-out; }
.q-answer small { display: block; color: var(--mute); font-weight: 700; font-size: clamp(13px, 1.1vw, 22px); }
.q-answer b { font-family: var(--display); font-weight: 800; color: var(--gold); font-size: clamp(28px, 3.8vw, 80px); line-height: 1.1; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

.ring { width: clamp(150px, 17vw, 340px); aspect-ratio: 1; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--line-soft); }
.ring .arc { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.ring.reading .arc { stroke: var(--mute-2); }
.ring.urgent .arc { stroke: var(--team2); }
.ring.reveal .arc { stroke: var(--ok); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .num { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 5.5vw, 120px); line-height: 1; font-variant-numeric: tabular-nums; }
.ring .cap { display: block; color: var(--mute); font-weight: 700; font-size: clamp(12px, 1vw, 20px); margin-top: .4vw; }

/* Таблица в перерыве и итогах */
.board { height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 1.6vw; min-height: 0; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.board-head h1 { margin: 0; font-size: clamp(28px, 3.2vw, 64px); }
.board-timer { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3.2vw, 64px); color: var(--gold); font-variant-numeric: tabular-nums; }
.board-body { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; min-height: 0; }
.tcol { background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: 1.4vw; padding: 1.4vw 1.8vw; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.tcol.t1 { border-top: 5px solid var(--team1); } .tcol.t2 { border-top: 5px solid var(--team2); }
.tcol .th { display: flex; align-items: baseline; justify-content: space-between; gap: 1vw; margin-bottom: 1vw; }
.tcol .th .nm { font-weight: 800; font-size: clamp(16px, 1.6vw, 32px); color: var(--mute); }
.tcol .th .pt { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 4.4vw, 92px); line-height: 1; font-variant-numeric: tabular-nums; }
.tcol.t1 .pt { color: var(--team1); } .tcol.t2 .pt { color: var(--team2); }
.tcol .pl { display: grid; grid-template-columns: auto 1fr auto; gap: 1vw; align-items: center; padding: .6vw 0; border-bottom: 1px solid var(--line-soft); font-size: clamp(14px, 1.35vw, 28px); font-weight: 700; }
.tcol .pl:last-child { border-bottom: 0; }
.tcol .pl .avatar { width: clamp(26px, 2.4vw, 48px); height: clamp(26px, 2.4vw, 48px); }
.tcol .pl .p { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.tcol .pl.ex { opacity: .55; }
.winner { font-family: var(--display); font-weight: 800; color: var(--gold); font-size: clamp(22px, 2.4vw, 48px); }

/* Нижняя полоса со счётом и никами */
.s-foot { padding: 0 1.2vw .4vw; }
.foot-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2vw; align-items: stretch; }
.ft { background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: 1.2vw; padding: 1vw 1.8vw; min-width: 0; }
.ft1 { border-left: 5px solid var(--team1); }
.ft2 { border-right: 5px solid var(--team2); text-align: right; }
.ft-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1.2vw; }
.ft2 .ft-top { flex-direction: row-reverse; }
.ft-name { font-weight: 800; color: var(--mute); font-size: clamp(14px, 1.3vw, 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-pts { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 2.8vw, 58px); line-height: 1; font-variant-numeric: tabular-nums; }
.ft1 .ft-pts { color: var(--team1); } .ft2 .ft-pts { color: var(--team2); }
.ft-nicks { display: flex; flex-wrap: wrap; gap: .3vw 1vw; margin-top: .6vw; font-weight: 700; font-size: clamp(13px, 1.15vw, 24px); color: var(--paper); }
.ft2 .ft-nicks { justify-content: flex-end; }
.ft-nicks .ex { opacity: .5; text-decoration: line-through; }
.ft-vs { align-self: center; font-family: var(--display); font-weight: 800; color: var(--mute-2); font-size: clamp(22px, 2.2vw, 44px); }

.s-foot .scorebar .tpts { font-size: clamp(26px, 2.8vw, 58px); }
.s-foot .scorebar .tname { font-size: clamp(14px, 1.3vw, 26px); }
.s-foot .ad { margin-top: 1vw; }
.s-foot .ad h3 { font-size: clamp(16px, 1.5vw, 30px); }
.s-foot .ad p { font-size: clamp(13px, 1.1vw, 22px); }
.s-foot .ad img { width: clamp(120px, 12vw, 240px); height: clamp(76px, 7.4vw, 150px); }

.pair-code { font-family: var(--display); font-weight: 800; font-size: clamp(60px, 10vw, 200px); letter-spacing: .12em; color: var(--gold); line-height: 1; }

.s-paused { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(5, 10, 26, .78); z-index: 40; font-family: var(--display); font-weight: 800; font-size: clamp(48px, 8vw, 160px); }
.s-paused small { font-family: var(--body); font-size: clamp(16px, 1.6vw, 30px); color: var(--mute); font-weight: 700; }

@media (max-width: 760px) {
  body.screen { overflow: auto; }
  .stage { height: auto; min-height: 100vh; padding: 14px; gap: 14px; }
  .q-layout, .q-layout.with-img { grid-template-columns: 1fr; }
  .board-body { grid-template-columns: 1fr; }
  .s-head .brand span:last-child { display: none; }
}
