/* public/css/rankrush-game.css */

/* Active Game Layout — fits entirely in exposed viewport above keyboard */
.game-view {
  display: none;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  gap: 6px;
}

.game-view.active { display: flex; }

body:has(#game-view.active) .scene-backdrop {
  display: none;
}

.board-zone {
  flex: 0 0 auto;
  background: #20252e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.prompt-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  padding: 5px 9px;
}

.prompt-bar > div:first-child {
  min-width: 0;
  flex: 1;
}

.prompt-text {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fef3c7;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.kb-open .prompt-text {
  font-size: 0.84rem;
  line-height: 1.15;
}

.timer-badge {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
  background: rgba(254, 240, 138, 0.12);
  border: 1px solid rgba(254, 240, 138, 0.4);
  padding: 4px 10px;
  border-radius: 12px;
  min-width: 54px;
  text-align: center;
}

.timer-badge.urgent {
  color: var(--rose);
  border-color: var(--rose);
  background: rgba(251, 113, 133, 0.15);
}

.progress-track {
  width: 100%;
  height: 5px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  transition: width 0.35s linear;
}

.board-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(var(--board-rows, 5), 24px);
  grid-auto-flow: column;
  align-content: start;
  gap: 2px 3px;
  margin-top: 4px;
}

.board-empty {
  grid-column: 1 / -1;
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 14px 10px;
  border: 1px dashed rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  width: 100%;
}

body.tv-mode #btn-tv-guide,
body.tv-mode #btn-identity {
  display: none !important;
}

body.tv-mode .game-view.is-ad-break .board-zone,
body.tv-mode .game-view.is-ad-break .ticker-zone {
  display: none;
}

body.tv-mode .game-view.is-ad-break #tv-guess-wall {
  max-height: 76px;
  overflow: hidden;
}

body.tv-mode .board-list {
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
}

body.tv-mode .board-zone {
  padding: 6px 5px;
  gap: 4px;
}

body.tv-mode .player-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

body.tv-mode .player-row {
  height: 22px;
  min-height: 22px;
  align-items: center;
  padding: 1px 6px;
  font-size: 0.84rem;
  background: transparent;
  overflow: hidden;
}

body.tv-mode .entry-chip {
  font-size: 0.74rem;
  padding: 0 7px;
  line-height: 1.25;
}

body.tv-mode .player-entries {
  flex-wrap: nowrap;
  overflow: hidden;
  align-items: center;
}

.game-view.two-line-prompt {
  gap: 4px;
}

.game-view.two-line-prompt .player-rows {
  gap: 1px;
}

.game-view.two-line-prompt .player-row {
  min-height: 16px;
  padding: 0 2px;
}

body.tv-mode .game-view.two-line-prompt .player-rows {
  gap: 0;
}

body.tv-mode .game-view.two-line-prompt .player-row {
  height: 20px;
  min-height: 20px;
  padding: 0 6px;
}

body.tv-mode.tv-studio {
  background:
    radial-gradient(ellipse 80% 50% at 50% 8%, rgba(56, 189, 248, 0.13), transparent 65%),
    radial-gradient(ellipse 60% 40% at 50% 90%, rgba(16, 185, 129, 0.08), transparent 70%),
    var(--bg);
}

body.tv-mode.tv-studio .app-shell {
  max-width: 100%;
  padding: 10px 24px;
}

body.tv-mode.tv-studio #btn-daily,
body.tv-mode.tv-studio #btn-leaders,
body.tv-mode.tv-studio #btn-help {
  display: none !important;
}

body.tv-mode.tv-studio .prompt-text {
  font-size: 1.32rem;
}

body.tv-mode.tv-studio .slot-row {
  font-size: var(--board-font, 1.14rem);
}

body.tv-mode.tv-studio .player-row {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.65);
}

.tv-bottom-dock {
  display: contents;
}

.tv-join-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(74, 222, 128, 0.35);
  align-self: center;
  flex: 0 0 auto;
}

body.tv-mode body.tv-mode.tv-studio {
  background:
    radial-gradient(ellipse 80% 50% at 50% 8%, rgba(56, 189, 248, 0.13), transparent 65%),
    radial-gradient(ellipse 60% 40% at 50% 90%, rgba(16, 185, 129, 0.08), transparent 70%),
    var(--bg);
}

body.tv-mode.tv-studio .app-shell {
  max-width: 100%;
  padding: 10px 24px;
}

body.tv-mode.tv-studio #btn-daily,
body.tv-mode.tv-studio #btn-leaders,
body.tv-mode.tv-studio #btn-help {
  display: none !important;
}

body.tv-mode.tv-studio .prompt-text {
  font-size: 1.32rem;
}

body.tv-mode.tv-studio .slot-row {
  font-size: var(--board-font, 1.14rem);
}

body.tv-mode.tv-studio .player-row {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.65);
}

.tv-bottom-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  transition: gap 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

body.tv-mode .tv-bottom-dock:has(#reveal-fact:not(.hidden)) {
  gap: 14px;
}

body.tv-mode .tv-bottom-dock #reveal-fact {
  display: block !important;
  flex: 1 1 0;
  min-width: 0;
  max-width: 680px;
  max-height: 160px;
  opacity: 1;
  transform: translateX(0);
  padding: 10px 14px;
  border-width: 1px;
  font-size: 0.86rem;
  line-height: 1.42;
  animation: none;
  transition:
    flex-grow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-width 0.3s ease,
    opacity 0.35s ease 0.2s,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

body.tv-mode .tv-bottom-dock #reveal-fact.hidden {
  flex: 0 0 0px;
  max-width: 0;
  max-height: 0;
  opacity: 0;
  transform: translateX(20px);
  padding: 0;
  border-width: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    flex-grow 0.32s ease 0.08s,
    max-width 0.32s ease 0.08s,
    padding 0.32s ease 0.08s,
    border-width 0.2s ease,
    opacity 0.18s ease,
    transform 0.22s ease;
}

.voice-ptt-btn {
  position: absolute;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  padding: 0;
}

.voice-ptt-btn.listening {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.16);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.35);
}

.voice-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.voice-dots span {
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: #60a5fa;
  transform-origin: center;
  animation: voiceWave 0.65s ease-in-out infinite;
}

.voice-dots span:nth-child(2) { animation-delay: 0.14s; }
.voice-dots span:nth-child(3) { animation-delay: 0.28s; }

@keyframes voiceWave {
  0%, 100% { transform: scaleY(0.45); opacity: 0.55; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-dots span { animation: none; transform: scaleY(0.75); }
}

.slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  height: 20px;
  padding: 0 3px;
  border-radius: 6px;
  background: #181c24;
  border: none;
  font-size: var(--board-font, 0.86rem);
  line-height: 1;
  min-width: 0;
  overflow: hidden;
}

.guess-input::-webkit-search-cancel-button,
.rr-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.slot-row.claimed,
.slot-row.claimed.c-cyan,
.slot-row.claimed.c-rose,
.slot-row.claimed.c-gold,
.slot-row.claimed.c-emerald,
.slot-row.claimed.c-orange,
.slot-row.claimed.c-purple,
.slot-row.claimed.c-violet {
  border: none;
  background: #222834;
}

.slot-row.claimed .slot-title {
  color: var(--text);
}

.slot-row.just-added {
  animation: popIn 0.2s ease-out;
}

.slot-row.missed-reveal {
  opacity: 0.65;
  background: #181b21;
}

/* REVEAL phase: slightly larger + brighter board, highlighted reveal tiles */
.board-list.revealing {
  perspective: 600px;
}

.board-list.revealing .slot-row {
  filter: brightness(1.15);
}

.board-list.revealing .slot-row.missed-reveal {
  opacity: 1;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.14), rgba(148, 163, 184, 0.07));
  border: 1px dashed rgba(248, 250, 252, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 10px rgba(248, 250, 252, 0.1);
  transform-origin: 50% 50%;
  animation: feudFlip 0.5s ease-out both;
  animation-delay: var(--reveal-delay, 0s);
}

.board-list.revealing .slot-row.missed-reveal .slot-rank {
  color: #cbd5e1;
}

.board-list.revealing .slot-row.missed-reveal .slot-title {
  color: #f8fafc;
  font-weight: 800;
}

@keyframes feudFlip {
  0% { transform: rotateX(90deg); opacity: 0; }
  60% { transform: rotateX(-12deg); opacity: 1; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .board-list.revealing .slot-row.missed-reveal {
    animation: fadeInReveal 0.3s ease-out both;
    animation-delay: var(--reveal-delay, 0s);
  }
}

@keyframes fadeInReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slot-row.empty-spot {
  background: #14171e;
  border: none;
}

.slot-row.empty-spot .slot-rank {
  color: rgba(156, 163, 175, 0.45);
}

.slot-row.empty-spot .slot-title {
  color: rgba(156, 163, 175, 0.2);
}

.slot-row.empty-spot .slot-title.hint-mask {
  color: #e2e8f0;
  opacity: 1;
}

@keyframes popIn {
  from { transform: scale(0.96); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes roundPromptIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes roundKickerPulse {
  0% { color: var(--gold); text-shadow: 0 0 10px rgba(251, 191, 36, 0.55); transform: scale(1.02); }
  100% { color: var(--accent); text-shadow: none; transform: scale(1); }
}

@keyframes tileDealIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.board-zone.round-enter .cat-label {
  display: inline-block;
  transform-origin: left center;
  animation: roundKickerPulse 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.board-zone.round-enter .prompt-text {
  animation: roundPromptIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.board-zone.round-enter .slot-row {
  animation: tileDealIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.board-zone.round-enter .slot-row:nth-child(1) { animation-delay: 20ms; }
.board-zone.round-enter .slot-row:nth-child(2) { animation-delay: 50ms; }
.board-zone.round-enter .slot-row:nth-child(3) { animation-delay: 80ms; }
.board-zone.round-enter .slot-row:nth-child(4) { animation-delay: 110ms; }
.board-zone.round-enter .slot-row:nth-child(5) { animation-delay: 140ms; }
.board-zone.round-enter .slot-row:nth-child(6) { animation-delay: 170ms; }
.board-zone.round-enter .slot-row:nth-child(7) { animation-delay: 200ms; }
.board-zone.round-enter .slot-row:nth-child(8) { animation-delay: 230ms; }
.board-zone.round-enter .slot-row:nth-child(9) { animation-delay: 260ms; }
.board-zone.round-enter .slot-row:nth-child(10) { animation-delay: 290ms; }

@media (prefers-reduced-motion: reduce) {
  .board-zone.round-enter .cat-label,
  .board-zone.round-enter .prompt-text,
  .board-zone.round-enter .slot-row {
    animation: none !important;
  }
}

.slot-rank {
  font-weight: 800;
  color: var(--muted);
  min-width: 20px;
}

.slot-title {
  flex: 1;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-pts {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.58;
  font-variant-numeric: tabular-nums;
}

.slot-avatar {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.slot-meta {
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Color accents */
.c-cyan { border-color: var(--accent) !important; color: var(--accent); }
.c-rose { border-color: var(--rose) !important; color: var(--rose); }
.c-gold { border-color: var(--gold) !important; color: var(--gold); }
.c-emerald { border-color: var(--emerald) !important; color: var(--emerald); }
.c-orange { border-color: var(--orange) !important; color: var(--orange); }
.c-violet,
.c-purple { border-color: var(--purple) !important; color: var(--purple); }

/* Middle: Pinned 1-line Minimal Scoreboard Bar */
.avatar-score-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-height: 28px;
  margin: 2px 0;
  padding: 4px 8px;
  background: rgba(20, 23, 29, 0.92);
  border: 2px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 2px 0 #090d16;
}

.ticker-zone {
  flex: 1 1 0;
  min-height: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #14171d;
  border: none;
  border-radius: 10px;
  padding: 2px 4px;
}

.ticker-zone::-webkit-scrollbar {
  display: none;
}

.avatar-score-strip::-webkit-scrollbar {
  display: none;
}

.avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1px 2px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.avatar-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.avatar-score {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 5px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 800;
}

.avatar-typing {
  color: var(--accent);
  font-style: italic;
  font-weight: 700;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.kb-open .app-shell {
  padding-bottom: 12px;
}

body.kb-open .ticker-zone {
  min-height: 0;
}

.player-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 1px 2px;
  min-height: 18px;
}

.player-row-head {
  display: flex;
  align-items: center;
  gap: 3px;
  width: var(--row-head-w, auto);
  min-width: 0;
  max-width: 136px;
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 700;
  opacity: 0.92;
}

.player-row-avatar {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.player-row-name {
  color: var(--p-color, var(--accent));
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-row-score {
  color: var(--p-color, #f8fafc);
  width: 4.2ch;
  text-align: right;
  margin-right: 3px;
  flex-shrink: 0;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

@keyframes leaderGlowIn {
  from {
    background: #222834;
    box-shadow: 0 0 0 0 rgba(var(--p-rgb, 251, 191, 36), 0), 0 0 0 rgba(var(--p-rgb, 251, 191, 36), 0);
  }
  to {
    background: rgba(var(--p-rgb, 251, 191, 36), 0.12);
    box-shadow: 0 0 0 2px rgba(var(--p-rgb, 251, 191, 36), 0.78), 0 0 18px rgba(var(--p-rgb, 251, 191, 36), 0.36);
  }
}

.slot-row.claimed.leader-tile {
  background: rgba(var(--p-rgb, 251, 191, 36), 0.12) !important;
  border-color: var(--p-color, var(--gold)) !important;
  box-shadow: 0 0 0 2px rgba(var(--p-rgb, 251, 191, 36), 0.78), 0 0 18px rgba(var(--p-rgb, 251, 191, 36), 0.36);
  animation: leaderGlowIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rrFloatBurst {
  0% { opacity: 0; transform: translate(-50%, 2px) scale(0.86); }
  12% { opacity: 1; transform: translate(-50%, -6px) scale(1.04); }
  50% { opacity: 1; transform: translate(calc(-50% + var(--drift-mid, 4px)), -22px) scale(1.0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift-x, 10px)), -42px) scale(0.96); }
}

.rr-hit-burst {
  position: fixed;
  z-index: 60;
  will-change: transform, opacity;
  pointer-events: none;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid var(--p-color, var(--gold));
  color: var(--p-color, var(--gold));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 8px rgba(var(--p-rgb, 234, 179, 8), 0.35);
  animation: rrFloatBurst 3.2s cubic-bezier(0.25, 0.8, 0.35, 1) forwards;
}

.reveal-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  margin-bottom: 2px;
}

.rr-hl-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.42);
  color: #fde68a;
  animation: slotPopIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.player-entries {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.entry-chip {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0 5px;
  line-height: 1.25;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-row.c-cyan,
.slot-row.c-cyan,
.rr-hit-burst.c-cyan { --p-color: #60a5fa; --p-rgb: 96, 165, 250; }
.player-row.c-rose,
.slot-row.c-rose,
.rr-hit-burst.c-rose { --p-color: #f87171; --p-rgb: 248, 113, 113; }
.player-row.c-emerald,
.slot-row.c-emerald,
.rr-hit-burst.c-emerald { --p-color: #4ade80; --p-rgb: 74, 222, 128; }
.player-row.c-gold,
.slot-row.c-gold,
.rr-hit-burst.c-gold { --p-color: #eab308; --p-rgb: 234, 179, 8; }
.player-row.c-violet,
.player-row.c-purple,
.slot-row.c-violet,
.slot-row.c-purple,
.rr-hit-burst.c-violet,
.rr-hit-burst.c-purple { --p-color: #a78bfa; --p-rgb: 167, 139, 250; }
.player-row.c-orange,
.slot-row.c-orange,
.rr-hit-burst.c-orange { --p-color: #fb923c; --p-rgb: 251, 146, 60; }

.entry-chip.hit {
  background: rgba(var(--p-rgb, 74, 222, 128), 0.18);
  border: 1px solid rgba(var(--p-rgb, 74, 222, 128), 0.55);
  color: var(--p-color, var(--emerald));
}

.entry-chip.near {
  background: rgba(var(--p-rgb, 234, 179, 8), 0.12);
  border: 1px solid rgba(var(--p-rgb, 234, 179, 8), 0.4);
  color: var(--p-color, var(--gold));
  opacity: 0.9;
}

.entry-chip.miss, .entry-chip.claimed {
  background: rgba(var(--p-rgb, 248, 113, 113), 0.08);
  border: 1px solid rgba(var(--p-rgb, 248, 113, 113), 0.28);
  color: var(--p-color, var(--rose));
  opacity: 0.68;
  text-decoration: line-through;
}

.entry-chip.typing {
  background: rgba(var(--p-rgb, 96, 165, 250), 0.12);
  border: 1px dashed rgba(var(--p-rgb, 96, 165, 250), 0.55);
  color: var(--p-color, var(--accent));
}

/* Bottom: Compact One-Handed Input Zone */
.input-zone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  margin-bottom: 4px;
}

.toast-bar {
  min-height: 18px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--gold);
}

.toast-bar:empty {
  display: none;
}

.autocomplete-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}

.ac-pill {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.ac-pill.top-pick {
  border-color: var(--accent);
  background: rgba(96, 165, 250, 0.18);
}

.reveal-fact {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.38;
  animation: fadeInReveal 0.3s ease-out both;
}

.reveal-fact strong {
  color: #f8fafc;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.help-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted);
}

.help-list strong {
  color: var(--text);
}

.help-list code {
  background: var(--surface-2);
  color: var(--text);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.78rem;
}

.ac-pill:active {
  transform: scale(0.96);
  background: var(--accent);
  color: #090d16;
}

.input-form {
  display: flex;
  gap: 8px;
}

.guess-input {
  flex: 1;
  font-size: 1rem;
  line-height: 1.2;
  padding: 7px 12px;
  border-radius: 11px;
}

.guess-input[contenteditable] {
  min-height: 35px;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.guess-input[contenteditable]::-webkit-scrollbar {
  display: none;
}

.guess-input[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  opacity: 0.75;
  pointer-events: none;
}

.guess-input.cooldown {
  border-color: var(--rose);
  opacity: 0.6;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: popIn 0.28s ease-out;
}

.splash-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.splash-sub {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--muted);
}

/* Desktop / Laptop Chrome Responsive Scaling (keeps phone compact layout intact) */
@media (min-width: 768px) and (min-height: 600px) {
  .app-shell {
    max-width: 760px;
    padding: 12px 6px;
    gap: 10px;
  }

  .rr-logo { font-size: 1rem; padding: 7px 14px; }
  .rr-pill { font-size: 0.84rem; padding: 6px 12px; }

  .lobby-card { padding: 28px 26px; gap: 16px; margin-top: 16px; }
  .lobby-kicker { font-size: 1.02rem; }
  .lobby-title { font-size: 3.15rem; }
  .lobby-sub { font-size: 0.98rem; max-width: 440px; }
  .tier-chip { font-size: 0.78rem; padding: 4px 10px; }

  .board-zone { padding: 10px 5px; gap: 8px; }
  .prompt-text { font-size: 1.18rem; }
  .board-list { grid-template-rows: repeat(var(--board-rows, 5), 36px); gap: 4px 8px; }
  .slot-row { height: 36px; font-size: var(--board-font, 1.08rem); padding: 0 4px; }
  .slot-pts { font-size: 0.76rem; }
  .slot-avatar { width: 32px; height: 32px; font-size: 1.56rem; line-height: 1; }

  .avatar-score-strip { min-height: 38px; gap: 14px; padding: 6px 12px; }
  .avatar-pill { font-size: 0.84rem; gap: 6px; }
  .avatar-circle { width: 22px; height: 22px; font-size: 1.05rem; line-height: 1; }
  .avatar-score { font-size: 0.78rem; padding: 1px 7px; }

  .ticker-zone { padding: 4px 6px; gap: 3px; }
  .player-row { min-height: 24px; padding: 2px 4px; }
  .player-row-head { font-size: 0.82rem; width: auto; min-width: 96px; max-width: 145px; }
  .player-row-avatar { width: 20px; height: 20px; font-size: 1rem; line-height: 1; }
  .entry-chip { font-size: 0.78rem; padding: 2px 9px; }

  .ac-pill { font-size: 0.88rem; padding: 7px 14px; }
  .guess-input { font-size: 1.02rem; padding: 8px 14px; }
}

