/* Announcer beta — builds on Pyx Assistant tokens */

/* PA locks the page (orb UI). Announcer needs normal document scrolling. */
html.announcer-page,
html.announcer-page body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.announcer-page body {
  min-height: 100dvh;
}

.voice-boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg, #0e1712) 78%, transparent);
  backdrop-filter: blur(10px);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.voice-boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.voice-boot__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  max-width: 280px;
  padding: 28px 24px 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: 0 18px 40px color-mix(in srgb, #000 22%, transparent);
}

.voice-boot__spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--muted) 30%, transparent);
  border-top-color: var(--swirl-c, #3ecf8e);
  animation: poll-spin 0.75s linear infinite;
}

.voice-boot__title {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.voice-boot__msg {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
  min-height: 2.6em;
}

.voice-boot__skip {
  margin-top: 4px;
}

.voice-boot__skip.is-hidden {
  display: none;
}

.announcer-stage {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100dvh;
  height: auto;
  display: block;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  overflow: visible;
}

.announcer-stage > .swirl {
  pointer-events: none;
}

.announcer-main {
  position: relative;
  z-index: 2;
  padding: 8px 20px 32px;
}

.announcer-main .lede {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.45;
}

.voice-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass) 70%, transparent);
}

.voice-bar label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
}

.voice-bar select {
  flex: 1 1 180px;
  min-width: 0;
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 40%, var(--glass));
  color: inherit;
}

.voice-bar__hint {
  flex: 1 1 100%;
  font-size: 0.78rem;
  color: var(--muted);
}

.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 18px 18px;
  backdrop-filter: blur(16px);
  margin-bottom: 16px;
}

.panel.is-hidden {
  display: none;
}

.panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel h2,
.panel h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass) 70%, transparent);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.18s;
}

.game-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--swirl-c) 55%, var(--line));
}

.game-card__title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.game-card__meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.84rem;
}

.game-card__state {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--swirl-a), var(--swirl-c));
  color: #102018;
}

.game-card__state.is-final,
.game-card__state.is-sched {
  background: var(--glass);
  color: var(--muted);
  border: 1px solid var(--line);
}

.mode-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass) 80%, transparent);
}

.mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.mode-btn.is-on {
  background: linear-gradient(135deg, var(--swirl-d), var(--swirl-c));
  color: #102018;
}

.scoreboard {
  text-align: center;
  padding: 18px 12px 14px;
  margin: 8px 0 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 35%, var(--glass));
}

.scoreboard__matchup {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 560;
}

.scoreboard__score {
  margin-top: 6px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.scoreboard__meta {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

#lastCall {
  min-height: 2.6em;
  margin: 8px 0 18px;
}

.poll-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 0;
  min-height: 1.4em;
}

.poll-status .caption__status {
  margin: 0;
}

.poll-spinner {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-top-color: var(--swirl-c, #3ecf8e);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease;
}

.poll-spinner.is-on {
  opacity: 1;
  animation: poll-spin 0.7s linear infinite;
}

.poll-spinner.is-fetch {
  border-top-color: var(--swirl-a, #7ee0b0);
  animation-duration: 0.45s;
}

.poll-countdown {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.poll-countdown.is-hidden {
  display: none;
}

.poll-countdown strong {
  font-weight: 700;
  color: inherit;
}

@keyframes poll-spin {
  to {
    transform: rotate(360deg);
  }
}

.call-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(42vh, 360px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.call-log li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass) 65%, transparent);
  font-size: 0.9rem;
  line-height: 1.35;
}

.call-log .when {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.live-layout.is-hidden {
  display: none;
}

.ask-panel h2 {
  margin-bottom: 6px;
}

.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.ask-chip {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 35%, var(--glass));
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.ask-chip:hover {
  border-color: color-mix(in srgb, var(--swirl-c) 55%, var(--line));
  transform: translateY(-1px);
}

.ask-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 72px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 40%, var(--glass));
  color: inherit;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
}

.ask-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--swirl-c) 55%, transparent);
  outline-offset: 1px;
}

.ask-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.ask-submit {
  border: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--swirl-d), var(--swirl-c));
  color: #102018;
}

.ask-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.ask-answer {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 30%, var(--glass));
  font-size: 0.92rem;
  line-height: 1.45;
  min-height: 4.5em;
  max-height: min(40vh, 360px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
}

.ask-answer__empty {
  margin: 0;
  color: var(--muted);
}

.ask-answer__q {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}

.ask-answer__body {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .live-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .panel__row {
    flex-wrap: wrap;
  }
}
