/* Страница зрителя: только то, чего нет в дизайн-системе. */

/* Ссылки-кнопки не должны подчёркиваться, как обычные ссылки. */
a.btn:hover,
a.btn:focus {
  text-decoration: none;
}

.screen {
  animation: screen-in 0.22s var(--ease);
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.sk {
  width: 100%;
}
.sk-hero {
  height: 132px;
}
.sk-row {
  height: 66px;
}

/* ---------------- крупная типографика телефона ---------------- */

.hero-name {
  font-size: clamp(1.5rem, 7vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.q-title {
  font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  margin: 0;
  overflow-wrap: anywhere;
}
/* Тема вопроса — в заголовке, сам вопрос — здесь, поэтому текст крупный,
   а не служебно-серый. */
.q-body {
  font-size: clamp(1rem, 4.2vw, 1.15rem);
  color: var(--ink);
  margin: 0;
  overflow-wrap: anywhere;
}
.big {
  font-size: clamp(1.5rem, 8vw, 2.2rem);
  font-weight: 850;
  letter-spacing: -0.02em;
  margin: 0;
}
.rank-big {
  font-size: clamp(2.6rem, 16vw, 4rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ---------------- вопрос ---------------- */

/* Место под таймер держим всегда: кольцо появляется на открытии
   голосования и не должно дёргать вопрос вниз. */
.q-head {
  min-height: 64px;
  flex-wrap: nowrap;
  gap: 12px;
}
.q-head .timer-ring {
  flex: 0 0 auto;
}
.q-status {
  color: var(--ink-2);
  font-weight: 650;
  min-height: 24px;
}
.q-status.wait {
  color: var(--ink-3);
}
.q-status.done {
  color: var(--ok);
}

/* Долю голосов подписываем рядом с числом — так понятнее, чем голое число. */
.option .tally .pct {
  color: var(--ink-3);
  font-weight: 600;
  margin-left: 6px;
}

.result.good {
  border-color: color-mix(in srgb, var(--ok) 55%, transparent);
  background: linear-gradient(180deg, var(--ok-soft), transparent 60%), var(--bg-2);
}
.result.bad {
  border-color: color-mix(in srgb, var(--bad) 55%, transparent);
  background: linear-gradient(180deg, var(--bad-soft), transparent 60%), var(--bg-2);
}

/* ---------------- нижняя панель ---------------- */

body.has-bar {
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}
body.has-bar .toast-host {
  bottom: calc(88px + env(safe-area-inset-bottom));
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px 16px calc(4px + env(safe-area-inset-bottom));
}
.bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: min(100%, 560px);
  margin-inline: auto;
  min-height: 60px;
}
.bar-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bar-team {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-exit {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  flex: 0 0 auto;
  /* Ссылка маленькая, но палец должен попадать: тап-зона во всю высоту панели. */
  min-height: 48px;
  padding: 0 8px;
  margin: -12px -8px;
  touch-action: manipulation;
}
.bar-right {
  flex: 0 0 auto;
  text-align: right;
  line-height: 1.1;
}
.bar-score {
  font-weight: 850;
  font-size: 1.25rem;
}

/* ---------------- мелочи ---------------- */

.links-row {
  display: grid;
  gap: 8px;
}
.you-line {
  overflow-wrap: anywhere;
}
