/* HALVE Live room: lobby, countdown, round, reveal, standings. Visual v3 glow glass. Tokens from base.css. */
.live-screen {
  height: 100dvh; min-height: 0; overflow: hidden; gap: 12px;
  padding-bottom: 0;
}
.live-screen > .topbar, .live-screen > .hero-head { flex: none; }
.live-leave { flex: none; }
.live-hint { text-align: center; font-size: var(--fs-s); flex: none; }

/* room code card */
.live-codecard { display: flex; align-items: center; gap: 8px; flex: none; padding: 8px 8px 8px 16px; }
.live-codecol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.live-code { font-weight: 800; font-size: var(--fs-xl); letter-spacing: .3em; line-height: 1.05; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(193, 59, 255, .6); }

/* players: glass tiles */
.live-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; flex: none; }
.live-p {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 10px 4px 8px; border-radius: 18px; transition: opacity .2s;
  background: var(--card-fill); box-shadow: 0 0 0 1px rgba(178, 140, 255, .4) inset;
}
.live-p[data-off] { opacity: .4; }
.live-av { position: relative; display: inline-flex; }
.live-p[data-ready] { box-shadow: 0 0 0 1.5px rgba(110, 231, 183, .75) inset, 0 0 16px -4px rgba(110, 231, 183, .6); }
.live-p[data-ready] .live-av .avatar { box-shadow: 0 0 0 2px var(--mint), 0 0 16px -2px var(--mint); }
.live-badge {
  position: absolute; right: -4px; bottom: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800; line-height: 1; background: #0E0B22; color: var(--text);
  box-shadow: 0 0 0 1px var(--glass-border);
}
.live-badge.ok { background: var(--mint); color: #0E0B22; }
.live-badge.crown { background: #0E0B22; right: auto; left: 50%; bottom: auto; top: -12px; transform: translateX(-50%); box-shadow: 0 0 10px rgba(252, 211, 77, .55); }
.live-badge.bot { background: #6B5BFF; font-size: var(--fs-xs); letter-spacing: .08em; }
.live-pname { max-width: 100%; font-size: var(--fs-xs); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-pflag { font-size: var(--fs-xs); line-height: 1; }
.live-p.empty { opacity: .45; background: none; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16) inset; }
.live-slot { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-l); color: var(--quiet); border: 2px dashed rgba(255, 255, 255, .22); }

/* chat */
.live-chat { flex: 1; min-height: 72px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--r-tile); background: var(--card-fill); box-shadow: 0 0 0 1px rgba(178, 140, 255, .35) inset; }
.live-chat-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; }
.live-chat-list::-webkit-scrollbar { display: none; }
.live-msg { font-size: var(--fs-s); padding: 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, .08); align-self: flex-start; max-width: 86%; overflow-wrap: anywhere; }
.live-msg.mine { align-self: flex-end; background: linear-gradient(135deg, #8E5BFF, #B84DFF 60%, #7A5CFF); color: #fff; }
.live-msg b { color: var(--cool-a); font-weight: 700; }
.live-msg.mine b { color: #fff; }
.live-chat-row { display: flex; gap: 8px; flex: none; align-items: center; }
.live-chat-in {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; color: var(--text); font: inherit; font-size: var(--fs-m);
  background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1px rgba(178, 140, 255, .4) inset;
}
.live-send { flex: none; }
.live-quick { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }

/* reactions */
.live-react { display: flex; justify-content: center; gap: 6px; flex: none; }
.live-react-btn {
  min-width: 44px; height: 44px; padding: 0 8px; border-radius: 999px; color: var(--text); font-size: var(--fs-m); font-weight: 800; transition: transform .12s;
  background: linear-gradient(160deg, rgba(124, 77, 255, .22), rgba(255, 255, 255, .05)); box-shadow: 0 0 0 1px rgba(178, 140, 255, .45) inset;
}
.live-react-btn:active { transform: scale(.9); }
.live-float {
  position: fixed; z-index: 60; font-size: var(--fs-xl); pointer-events: none; transform: translate(-50%, -100%);
  animation: live-rise 1.4s ease-out forwards; text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
@keyframes live-rise { from { opacity: 1; margin-top: 0; } 80% { opacity: 1; } to { opacity: 0; margin-top: -120px; } }

/* countdown */
.live-count-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.live-count {
  font-weight: 800; font-size: calc(var(--fs-hero) * 3.33); line-height: 1; font-variant-numeric: tabular-nums; min-height: 160px;
  background: linear-gradient(135deg, #FFB36B, #FF4F7B 55%, #B84DFF); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 79, 123, .55));
}
.live-count.pop { animation: live-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes live-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.live-strip { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; flex: none; }
.live-strip .live-p { background: none; box-shadow: none; padding: 0; }
.live-strip .live-pname, .live-strip .live-pflag { display: none; }
.live-strip.big { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.live-strip .live-badge { min-width: 16px; height: 16px; font-size: var(--fs-xs); }

/* round + reveal */
.live-stage-wrap { position: relative; flex: 1; min-height: 140px; margin: 0 -16px; }
.live-stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.live-body { position: absolute; inset: 0; pointer-events: none; }
.live-foot { flex: none; display: flex; flex-direction: column; gap: 8px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.live-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* lists (reveal rows, standings): glass cards */
.live-list { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 32dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.live-list::-webkit-scrollbar { display: none; }
.live-row {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 8px; border-radius: 18px; flex: none;
  background: var(--card-fill); box-shadow: 0 0 0 1px rgba(178, 140, 255, .35) inset;
}
.live-swatch { width: 4px; height: 24px; border-radius: 2px; flex: none; }
.live-rname { flex: 1; min-width: 0; font-weight: 700; font-size: var(--fs-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-rtotal { font-weight: 800; font-size: var(--fs-s); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }
.live-in { color: var(--mint); font-size: var(--fs-xs); font-weight: 700; }

/* done */
.live-head { text-align: center; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.live-win-row { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; }
.live-win-row > svg { flex: none; width: 40px; height: auto; }
.live-win { font-weight: 800; font-size: var(--fs-xl); line-height: 1.1; overflow-wrap: anywhere; min-width: 0; }
.live-head[data-won] .live-win {
  background: linear-gradient(135deg, #FFF3B0, #FCD34D 50%, #FF9A5C); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(252, 211, 77, .5));
}
.live-list.podium { flex: 1; min-height: 0; max-height: none; }
.live-row.big { min-height: 60px; gap: 12px; padding: 8px 16px 8px 12px; }
.live-row.big .live-rname { font-size: var(--fs-m); }
.live-row.big .live-rtotal { font-size: var(--fs-l); }
.live-place { width: 28px; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-m); color: var(--quiet); flex: none; }
.live-row.first { background: linear-gradient(135deg, rgba(252, 211, 77, .22), rgba(255, 79, 170, .14)); box-shadow: 0 0 0 1.5px rgba(252, 211, 77, .65) inset, 0 0 24px -6px rgba(252, 211, 77, .55); }
.live-row.first .live-place { color: var(--gold); }
.live-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-two .btn-quiet { padding: 0 12px; }
.live-screen .dock { display: flex; flex-direction: column; gap: 8px; padding: 0 0 calc(12px + env(safe-area-inset-bottom)); background: none; position: static; }
.live-screen .dock .pill-action { width: 100%; }

.live-sheet { display: grid; gap: 12px; padding: 4px; }

@media (prefers-reduced-motion: reduce) {
  .live-count.pop { animation: none; }
  .live-float { animation: live-fade 1.2s linear forwards; }
  @keyframes live-fade { to { opacity: 0; } }
}
@media (max-height: 700px) {
  .live-screen .hero-head { gap: 8px; }
  .live-screen .hero-orb { transform: scale(.85); margin: 0 6px 0 4px; }
  .live-count { font-size: calc(var(--fs-hero) * 2.33); min-height: 112px; }
  .live-p { padding: 6px 4px 6px; }
  .live-codecard { padding: 4px 8px 4px 14px; }
  .live-row.big { min-height: 52px; }
}

.live-chat.empty { flex: none; min-height: 0; padding: 8px; }
.live-chat.empty .live-chat-list { display: none; }
.live-screen .live-chat.empty + .live-hint { margin-top: auto; }
