.play-page {
  background: #040e13;
}
.play-shell {
  padding: 14px 18px 28px;
  max-width: none;
}

.play-head {
  margin-bottom: 12px;
}
.play-head h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  color: #fff;
}
.play-sub {
  margin: 0;
  font-size: 14px;
  color: #8fa3b3;
}

/* —— Side tabs above chat: Games | Chat —— */
.play-side-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #243541;
  border-radius: 14px;
  background: #0a141b;
}
.play-side-tabs [data-side-tab] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8fa3b3;
  font: 750 13px/1 inherit;
  cursor: pointer;
}
.play-side-tabs [data-side-tab] span {
  color: #6f8494;
  font-weight: 650;
  font-size: 12px;
}
.play-side-tabs [data-side-tab][aria-selected="true"] {
  background: #12303a;
  color: #d0ff00;
}
.play-side-tabs [data-side-tab][aria-selected="true"] span {
  color: #b8d96a;
}
.play-side-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.play-side-panel[hidden] {
  display: none !important;
}
.play-side-games {
  border: 1px solid #243541;
  border-radius: 16px;
  background: linear-gradient(180deg, #0d1820 0%, #0a141b 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.play-side-panel-head {
  flex: 0 0 auto;
  padding: 14px 14px 10px;
  border-bottom: 1px solid #1a2a34;
}
.play-side-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: #fff;
}
.play-side-panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8fa3b3;
}
.play-games {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 8px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #2a3d4a transparent;
}
.play-game {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px;
  border: 1px solid #1c2a33;
  border-radius: 11px;
  background: #0a141b;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.play-game:hover {
  border-color: #2a4554;
}
.play-game img {
  width: 72px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #12202a;
}
.play-game strong {
  display: block;
  font-size: 13px;
  color: #fff;
  margin-bottom: 3px;
}
.play-game span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #8fa3b3;
}
.play-game.active {
  border-color: #d0ff00;
  box-shadow: 0 0 0 1px #d0ff00, 0 0 14px #d0ff0033;
}
.play-game-live {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #e11d48;
  vertical-align: middle;
}
.play-games-empty {
  margin: 0;
  padding: 16px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #8fa3b3;
}
.play-games-empty a {
  color: #d0ff00;
  text-decoration: none;
}
.play-games-empty a:hover {
  text-decoration: underline;
}
.play-side-tabs [data-side-tab="games"] .fa-circle {
  font-size: 0.55em;
  color: #e11d48;
  vertical-align: 0.15em;
}
/* —— Stage: tabs row (equal) then player | chat (equal tops) —— */
.play-stream-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.play-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
}

.play-mode-tabs {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.play-stage > .play-side-tabs {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
}

.play-main {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.play-side {
  grid-column: 2;
  grid-row: 2;
}
.play-stream-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.play-stream-info img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #12202a;
}
.play-stream-info strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #fff;
}
.play-live {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e11d2e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.play-live-off {
  background: #2a3b47;
  color: #9eb3c2;
}
.play-stream-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8fa3b3;
}
.play-stream-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.play-visibility {
  appearance: none;
  border: 1px solid #2a3b47;
  border-radius: 9px;
  background-color: #0c1921;
  color: #d7e3ec;
  font: 600 12px/1 inherit;
  min-height: 38px;
  padding: 0 28px 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238fa3b3' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.play-invite {
  appearance: none;
  border: 0;
  border-radius: 9px;
  min-height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #d0ff00;
  color: #080e00;
  font: 700 13px/1 inherit;
  cursor: pointer;
}
.play-invite:hover {
  filter: brightness(1.05);
}
.play-leave {
  appearance: none;
  border: 1px solid #3a4f5c;
  border-radius: 9px;
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #12202a;
  color: #d7e3ec;
  font: 700 13px/1 inherit;
  cursor: pointer;
}
.play-leave:hover {
  border-color: #e11d2e;
  color: #ff8a93;
}
.play-lobby-hint {
  margin: 0;
  font-size: 14px;
  color: #8fa3b3;
}
.play-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8fa3b3;
  width: 32px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
}
.play-more:hover {
  color: #fff;
  background: #12202a;
}

/* —— Mode tabs + Video / Game (original compact pills) —— */
.play-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  width: fit-content;
  max-width: 100%;
}
.play-mode-tabs button {
  appearance: none;
  border: 1px solid #2a3b47;
  border-radius: 9px;
  background: #0c1921;
  color: #9eb3c2;
  font: 700 12px/1 inherit;
  min-height: 34px;
  padding: 0 14px;
  cursor: pointer;
}
.play-mode-tabs button[aria-selected="true"] {
  background: #d0ff00;
  border-color: #d0ff00;
  color: #080e00;
}
.play-player {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #1c2a33;
  border-radius: 14px;
  overflow: hidden;
  background: #061015;
}
/* 16:9 game only — chrome (Go live / mute) sits below, never over the game. */
.play-player-view {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #061015;
  flex: 0 0 auto;
}
.play-player-img,
.play-live-video,
.play-game-frame,
.play-stream-frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #061015;
  border: 0;
}
.play-game-frame,
.play-stream-frame {
  object-fit: contain;
  background: #000;
}

/* Camera face-cam: small PiP over game / poster (not full-bleed). */
.play-live-video.is-pip,
.play-cam-pip {
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: auto;
  z-index: 7;
  width: min(21%, 106px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #d0ff00;
  box-shadow:
    0 0 0 2px rgba(8, 14, 0, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.55);
  background: #061015;
  pointer-events: none;
}
.play-live-video.is-fullscreen-live {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  object-fit: contain;
  background: #000;
}
.play-cam-pip[hidden],
.play-live-video[hidden] {
  display: none !important;
}
/* Hidden until Go live click adds .is-active — never auto-show */
.play-go-live-countdown {
  display: none !important;
  position: absolute;
  inset: 0;
  z-index: 20;
  place-items: center;
  background: rgba(4, 10, 14, 0.55);
  backdrop-filter: blur(3px);
  pointer-events: none;
}
.play-go-live-countdown.is-active {
  display: grid !important;
}
.play-go-live-countdown-card {
  text-align: center;
  color: #fff;
}
.play-go-live-count {
  display: block;
  font-size: clamp(72px, 14vw, 120px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #d0ff00;
  text-shadow: 0 0 40px rgba(208, 255, 0, 0.35);
  animation: play-count-pop 0.55s ease;
}
.play-go-live-msg {
  margin: 12px 0 0;
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8f2f7;
}
.play-go-live-countdown.is-live .play-go-live-count {
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: 0.12em;
  color: #fff;
}
.play-go-live-countdown.is-live .play-go-live-msg {
  color: #d0ff00;
}
@keyframes play-count-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 700px) {
  .play-live-video.is-pip,
  .play-cam-pip {
    top: 10px;
    right: 10px;
    bottom: auto;
    width: min(24%, 78px);
    border-width: 2px;
  }
}
.play-ctrl-broadcast {
  color: #d0ff00;
}
.play-player[data-mode="play"] .play-hud {
  opacity: 0.55;
}
.play-live-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 2;
  max-width: min(90%, 360px);
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(6, 16, 21, 0.88);
  border: 1px solid #2a3b47;
  color: #d7e3ec;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}
.play-stream-waiting {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(160deg, rgba(6, 16, 21, 0.92), rgba(12, 28, 36, 0.94));
  text-align: center;
  color: #d7e3ec;
}
.play-stream-waiting[hidden] {
  display: none !important;
}
.play-stream-waiting strong {
  font-size: 16px;
  color: #d0ff00;
}
.play-stream-waiting p {
  margin: 0 auto;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.5;
  color: #8fa3b3;
}
.play-stream-waiting code {
  color: #12f9ef;
  font-size: 12px;
}
.play-stream-waiting a {
  color: #d0ff00;
}
.play-live-pill.is-ready {
  background: #2a3b47;
  color: #9eb3c2;
}
.play-hud {
  position: absolute;
  top: 14px;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  transform: skewX(-12deg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.play-hud-lap {
  left: 14px;
}
.play-hud-pos {
  right: 14px;
}
.play-minimap {
  position: absolute;
  left: 14px;
  bottom: 52px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px solid #12f9ef99;
  background:
    radial-gradient(circle at 42% 58%, #12f9ef 0 2px, transparent 3px),
    radial-gradient(circle at 62% 34%, #d0ff00 0 2px, transparent 3px),
    conic-gradient(from 200deg, #12f9ef55, transparent 40%, #12f9ef77 70%, transparent);
  box-shadow: 0 0 18px #12f9ef33 inset, 0 0 12px #12f9ef22;
}
.play-speed {
  position: absolute;
  right: 16px;
  bottom: 52px;
  text-align: right;
  color: #12f9ef;
  text-shadow: 0 0 14px #12f9ef99;
  line-height: 1;
}
.play-speed span {
  display: block;
  font-size: 30px;
  font-weight: 800;
}
.play-speed small {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #8fdff5;
}
.play-controls {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-height: 48px;
  box-sizing: border-box;
  padding: 8px 12px;
  background: #0a141a;
  border-top: 1px solid #1c2a33;
}
.play-ctrl {
  appearance: none;
  border: 0;
  background: transparent;
  color: #e8f0f6;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}
.play-ctrl:hover {
  background: rgba(255, 255, 255, 0.1);
}
.play-ctrl.is-muted {
  color: #ff6b7a;
  background: rgba(225, 29, 46, 0.18);
}
.play-ctrl[hidden] {
  display: none !important;
}
/* Host CTA — clear label so it is not missed */
.play-ctrl-go-live {
  width: auto;
  min-width: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e11d2e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.play-ctrl-go-live:hover {
  background: #ff2a3c;
}
.play-ctrl-go-live[hidden] {
  display: none !important;
}
.play-ctrl-go-live-label {
  line-height: 1;
}
.play-live-pill {
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #e11d2e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.play-ctrl-spacer {
  flex: 1;
}

/* —— Fullscreen watch: video fills viewport, chrome at bottom (Twitch) —— */
.play-player:fullscreen,
.play-player:-webkit-full-screen {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  display: flex;
  flex-direction: column;
}
.play-player:fullscreen .play-player-view,
.play-player:-webkit-full-screen .play-player-view {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  max-height: none;
  background: #000;
}
.play-player:fullscreen .play-player-img,
.play-player:fullscreen .play-live-video:not(.is-pip),
.play-player:fullscreen .play-game-frame,
.play-player:fullscreen .play-stream-frame,
.play-player:-webkit-full-screen .play-player-img,
.play-player:-webkit-full-screen .play-live-video:not(.is-pip),
.play-player:-webkit-full-screen .play-game-frame,
.play-player:-webkit-full-screen .play-stream-frame {
  object-fit: contain;
  background: #000;
}
.play-player:fullscreen .play-controls,
.play-player:-webkit-full-screen .play-controls {
  flex: 0 0 auto;
  width: 100%;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 16, 21, 0.96);
}

/* —— Viewer fullscreen dock: same button size as outside Audience Decision —— */
.play-viewer-dock {
  display: none;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 49, 49, 0.45);
  border-radius: 14px;
  background: rgba(10, 16, 22, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 18px rgba(255, 49, 49, 0.2), 0 10px 28px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}
html.play-is-viewer .play-viewer-dock {
  display: none !important;
}
html.play-is-viewer.play-player-fs .play-viewer-dock {
  display: flex !important;
}
html.play-is-viewer.play-player-fs .play-decision[data-host-decision] {
  display: none !important;
}
html.play-is-viewer .play-effects {
  display: none !important;
}
html.play-is-host .play-viewer-dock {
  display: none !important;
}
.play-viewer-dock-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.play-viewer-dock-meta strong {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.play-viewer-dock-meta .play-vote-timer {
  margin: 0 !important;
  font-size: 13px !important;
  color: #fff !important;
}
.play-viewer-dock-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 1.15fr);
  gap: 10px;
  align-items: stretch;
}
/* Keep outer card size — do not shrink inside the player */
.play-viewer-dock .play-choice,
.play-viewer-dock .play-interact {
  min-height: 96px;
  height: auto;
  border-radius: 12px;
  padding: 14px 12px;
  flex-direction: column;
}
.play-viewer-dock .play-choice i {
  font-size: 22px;
}
.play-viewer-dock .play-choice span {
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
}
.play-viewer-dock .play-choice.cyan {
  background: rgba(12, 20, 28, 0.55);
  border-color: #12f9ef;
  color: #12f9ef;
  box-shadow: 0 0 14px #12f9ef33;
}
.play-viewer-dock .play-choice.red {
  background: rgba(12, 20, 28, 0.55);
  border-color: #ff4d4d;
  color: #ff6b4a;
  box-shadow: 0 0 14px #ff4d4d33;
}
.play-viewer-dock .play-choice.selected {
  background: rgba(18, 32, 42, 0.7);
  box-shadow: 0 0 0 1px currentColor, 0 0 18px currentColor55;
}
.play-viewer-dock .play-interact {
  background: linear-gradient(
    180deg,
    rgba(255, 59, 59, 0.88),
    rgba(208, 16, 32, 0.88)
  );
  border: 2px solid #ff3131;
  box-shadow: 0 0 28px #ff313166;
}
.play-viewer-dock .play-interact:hover,
.play-viewer-dock .play-interact.is-ready {
  filter: brightness(1.05);
}
.play-viewer-dock .play-interact strong {
  font: 800 22px/1 inherit;
}
.play-viewer-dock .play-interact small {
  display: block;
  font: 600 12px/1.25 inherit;
  opacity: 0.92;
}
.play-viewer-dock .play-vote-count {
  display: block;
  font: 600 11px/1 inherit;
  color: #8fa3b3;
}
/* Mobile fullscreen: compact dock above video, not covering the stream */
@media (max-width: 700px) {
  .play-viewer-dock {
    left: 8px;
    right: 8px;
    bottom: 10px;
    top: auto;
    max-height: min(42%, 280px);
    overflow: auto;
    padding: 8px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .play-viewer-dock-meta {
    gap: 8px;
  }
  .play-viewer-dock-meta strong {
    font-size: 13px;
  }
  .play-viewer-dock-meta .play-vote-timer {
    font-size: 11px !important;
  }
  .play-viewer-dock-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .play-viewer-dock .play-choice,
  .play-viewer-dock .play-interact {
    min-height: 44px;
    height: auto;
    padding: 8px 10px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
  }
  .play-viewer-dock .play-choice i {
    font-size: 15px;
    flex: 0 0 auto;
  }
  .play-viewer-dock .play-choice span {
    font-size: 11px;
    line-height: 1.2;
  }
  .play-viewer-dock .play-vote-count {
    margin-left: auto;
    flex: 0 0 auto;
  }
  .play-viewer-dock .play-interact {
    grid-column: 1 / -1;
    min-height: 46px;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }
  .play-viewer-dock .play-interact strong {
    font-size: 14px;
  }
  .play-viewer-dock .play-interact small {
    font-size: 10px;
  }
}

/* —— Audience Decision (host / streamer — below player) —— */
.play-decision {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 1.15fr);
  gap: 10px;
  align-items: stretch;
  border: 1px solid #ff3131;
  border-radius: 14px;
  background: #0a1016;
  box-shadow: 0 0 18px #ff313144, 0 0 0 1px #ff313122 inset;
  padding: 14px;
}
.play-decision-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding-right: 4px;
}
.play-decision-copy h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.play-decision-copy > p {
  margin: 0;
  font-size: 13px;
  color: #e8f0f6;
}
.play-vote-timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px !important;
  font-size: 13px !important;
  color: #fff !important;
}
.play-vote-timer i {
  color: #ff3131;
}
.play-vote-timer strong {
  color: #ff3131;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.play-choice {
  appearance: none;
  border: 1.5px solid transparent;
  border-radius: 12px;
  min-height: 96px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 700 13px/1.2 inherit;
  cursor: pointer;
  color: #fff;
  text-align: center;
  background: #0c141c;
}
.play-choice i {
  font-size: 22px;
}
.play-choice.cyan {
  border-color: #12f9ef;
  color: #12f9ef;
  box-shadow: 0 0 14px #12f9ef33;
}
.play-choice.cyan span {
  color: #fff;
}
.play-choice.red {
  border-color: #ff4d4d;
  color: #ff6b4a;
  box-shadow: 0 0 14px #ff4d4d33;
}
.play-choice.red span {
  color: #fff;
}
.play-choice.selected {
  box-shadow: 0 0 0 1px currentColor, 0 0 18px currentColor55;
  background: #12202a;
}
.play-vote-count {
  font: 600 11px/1 inherit;
  color: #8fa3b3;
  font-style: normal;
}
.play-interact {
  appearance: none;
  border: 2px solid #ff3131;
  border-radius: 12px;
  min-height: 96px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ff3b3b, #d01020);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 28px #ff313166;
}
.play-interact strong {
  font: 800 22px/1 inherit;
  letter-spacing: 0.06em;
}
.play-interact small {
  font: 500 12px/1 inherit;
  opacity: 0.95;
}
.play-interact:hover {
  filter: brightness(1.06);
}
.play-interact.is-ready {
  animation: play-interact-pulse 1.4s ease-in-out infinite;
}
@keyframes play-interact-pulse {
  0%,
  100% {
    box-shadow: 0 0 28px #ff313166;
  }
  50% {
    box-shadow: 0 0 36px #ff3131aa;
  }
}

/* —— Sub row: host effects —— */
.play-subpanels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}
.play-effects {
  border: 1px solid #1e3a44;
  border-radius: 14px;
  background: #0a141b;
  padding: 16px;
  box-shadow: 0 0 0 1px #12f9ef11 inset;
}
.play-effects h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.play-panel-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: #a8b8c4;
}
.play-effects-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.play-effect {
  appearance: none;
  border: 1.5px solid #2a3b47;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 12px/1 inherit;
  cursor: pointer;
  background: #0c1921;
  color: #d7e3ec;
  white-space: nowrap;
}
.play-effect.cyan {
  border-color: #12f9ef;
  color: #12f9ef;
  box-shadow: 0 0 12px #12f9ef22;
}
.play-effect.orange {
  border-color: #3a4a55;
  color: #fff;
}
.play-effect.orange i {
  color: #ff6b4a;
}
.play-cooldown {
  display: flex;
  align-items: center;
  gap: 10px;
}
.play-cooldown p {
  margin: 0;
  font-size: 12px;
  color: #e8f0f6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.play-cooldown-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #15222b;
  overflow: hidden;
}
.play-cooldown-bar span {
  display: block;
  height: 100%;
  background: #8aa0b0;
  border-radius: inherit;
  transition: width 0.2s linear;
}
.play-effect:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.play-cooldown.is-cooling #play-cooldown-bar {
  background: #12f9ef;
}

.play-room-avatars,
.play-voice-avatars {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.play-voice-avatars {
  margin: 0;
}
.play-room-avatar {
  position: relative;
  width: 44px;
  height: 44px;
}
.play-room-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #12202a;
  border: 2px solid transparent;
}
.play-room-avatar.ring-magenta img {
  border-color: #ff4dc4;
  box-shadow: 0 0 10px #ff4dc466;
}
.play-room-avatar.ring-cyan img {
  border-color: #12f9ef;
  box-shadow: 0 0 10px #12f9ef66;
}
.play-room-avatar.ring-red img {
  border-color: #ff4d4d;
  box-shadow: 0 0 10px #ff4d4d66;
}
.play-room-online {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3dff6a;
  border: 2px solid #0a141b;
  box-shadow: 0 0 6px #3dff6aaa;
}
.play-voice-avatars img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1c2a33;
  background: #12202a;
}

/* —— Right: Live Chat —— */
.play-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  position: sticky;
  top: calc(64px + env(safe-area-inset-top, 0px));
  height: calc(100dvh - 78px - env(safe-area-inset-top, 0px));
  max-height: calc(100dvh - 78px - env(safe-area-inset-top, 0px));
  overflow: hidden;
}
.play-chat {
  border: 1px solid #243541;
  border-radius: 16px;
  background: linear-gradient(180deg, #0d1820 0%, #0a141b 100%);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
.play-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #1a2a34;
  background: rgba(6, 16, 21, 0.65);
  flex: 0 0 auto;
}
.play-chat-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.play-chat-head h2 #play-chat-people {
  color: #8fa3b3;
  font-weight: 600;
  font-size: 13px;
}
.play-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3dff6a;
  box-shadow: 0 0 0 3px rgba(61, 255, 106, 0.16), 0 0 10px #3dff6aaa;
}
.play-chat-list {
  list-style: none;
  margin: 0;
  padding: 10px 8px 12px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #3a5160 transparent;
}
.play-chat-list::-webkit-scrollbar {
  width: 8px;
}
.play-chat-list::-webkit-scrollbar-track {
  background: transparent;
}
.play-chat-list::-webkit-scrollbar-thumb {
  background: #2f4452;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.play-chat-list::-webkit-scrollbar-thumb:hover {
  background: #3d5768;
  background-clip: padding-box;
}
.play-chat-empty {
  list-style: none;
  margin: auto 0;
  padding: 36px 20px;
  text-align: center;
  color: #8ea3b3;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
}
.play-chat-msg {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 10px;
  border-radius: 10px;
  transition: background 0.12s ease;
}
.play-chat-msg:hover {
  background: rgba(18, 40, 50, 0.55);
}
.play-chat-msg.is-interact {
  background: rgba(208, 255, 0, 0.04);
  border: 1px solid rgba(208, 255, 0, 0.1);
}
.play-chat-msg img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #12202a;
  border: 1px solid #1e303c;
}
.play-chat-msg strong {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #f2f7fa;
}
.play-role {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  height: auto;
  width: auto;
  aspect-ratio: auto;
  overflow: visible;
  position: static;
  flex-shrink: 0;
  white-space: nowrap;
}
.play-role-viewer {
  background: #0a2a30;
  color: #12f9ef;
}
.play-role-player {
  background: #2a2a08;
  color: #d0ff00;
}
.play-chat-msg p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #d5e2ea;
  line-height: 1.45;
  word-break: break-word;
}
.play-chat-msg.is-interact p {
  color: #e8f7a8;
}
.play-chat-msg time {
  font-size: 11px;
  font-weight: 600;
  color: #6f8494;
  white-space: nowrap;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.play-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 14px;
  border-top: 1px solid #1a2a34;
  background: rgba(6, 16, 21, 0.8);
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.play-chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #2a3b47;
  border-radius: 12px;
  background: #061015;
  color: #f7f9fc;
  padding: 0 14px;
  font: 500 14px/1.2 inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.play-chat-form input:focus {
  border-color: #12f9ef88;
  box-shadow: 0 0 0 3px #12f9ef22;
}
.play-chat-form input::placeholder {
  color: #6f8494;
}
.play-chat-emoji,
.play-chat-send {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8fa3b3;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.play-chat-send {
  color: #0b1216;
  background: #d0ff00;
}
.play-chat-emoji:hover {
  background: #12202a;
  color: #fff;
}
.play-chat-send:hover {
  background: #e2ff4d;
}

.play-voice-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.play-voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.play-mic {
  appearance: none;
  border: 1px solid #2a3b47;
  border-radius: 9px;
  width: 38px;
  height: 38px;
  background: #0c1921;
  color: #c3d4df;
  cursor: pointer;
}
.play-mic:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.play-mic.is-muted {
  border-color: #e11d2e;
  color: #ff6b7a;
  background: #1a0c10;
}
.play-mic:not(:disabled):hover {
  border-color: #d0ff00;
  color: #fff;
}
.play-join-voice {
  flex: 1;
  appearance: none;
  border: 0;
  border-radius: 9px;
  min-height: 38px;
  background: #d0ff00;
  color: #080e00;
  font: 700 13px/1 inherit;
  cursor: pointer;
}
.play-join-voice:hover {
  filter: brightness(1.05);
}

.play-invite-form {
  display: grid;
  gap: 12px;
}
.play-invite-form label {
  display: grid;
  gap: 6px;
  color: #d7e3ec;
  font-size: 14px;
}
.play-invite-form input[type="search"] {
  width: 100%;
  border: 1px solid #2a3c48;
  border-radius: 10px;
  background: #0b141a;
  color: #e8eef3;
  padding: 10px 12px;
  font: inherit;
}
.play-invite-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}
.play-invite-results button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #2a3c48;
  border-radius: 10px;
  background: #101b22;
  color: #e8eef3;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.play-invite-results img {
  border-radius: 50%;
}
.play-invite-results small,
.play-invite-empty,
.play-invite-status {
  color: #8ea3b3;
  font-size: 13px;
}
.play-invite-status {
  min-height: 1.2em;
  margin: 0;
  color: #9ec9ff;
}

@media (max-width: 1280px) {
  .play-stage {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  }
  .play-game {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .play-game img {
    width: 88px;
    height: 52px;
  }
}
@media (max-width: 1200px) {
  .play-decision {
    grid-template-columns: 1fr 1fr;
  }
  .play-decision-copy {
    grid-column: 1 / -1;
  }
  .play-interact {
    grid-column: 1 / -1;
  }
  .play-subpanels {
    grid-template-columns: 1fr;
  }
}
.play-mobile-nav {
  display: none;
}

@media (max-width: 960px) {
  .play-stage {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .play-mode-tabs,
  .play-stage > .play-side-tabs,
  .play-main,
  .play-side {
    grid-column: 1;
    grid-row: auto;
  }
  .play-side {
    position: static;
    height: auto;
    max-height: none;
  }
  .play-chat {
    min-height: 440px;
    height: min(58dvh, 560px);
    flex: none;
  }
}
/* —— Twitch-style mobile play room —— */
@media (max-width: 900px) {
  body.play-page,
  .play-page {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    max-height: none;
  }

  .play-shell {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
    width: 100%;
  }

  .play-head {
    display: none;
  }

  /* Twitch tabs under site topbar */
  .play-mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0;
    padding: 0 4px;
    border: 0;
    border-bottom: 1px solid #1c2a33;
    border-radius: 0;
    background: #0a141b;
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .play-mobile-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    margin: 0;
    padding: 10px 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #8fa3b3;
    font: 700 13px/1 inherit;
  }
  .play-mobile-nav button[aria-selected="true"] {
    background: transparent;
    color: #efeff1;
    border-bottom-color: #14b8a6;
  }

  /* Compact streamer row (Twitch meta) */
  .play-stream-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #1a2a34;
  }
  .play-stream-info {
    gap: 10px;
  }
  .play-stream-info img {
    width: 36px;
    height: 36px;
  }
  .play-stream-info strong {
    font-size: 14px;
    flex-wrap: wrap;
  }
  .play-stream-meta {
    font-size: 12px;
    margin: 2px 0 0;
  }

  /* Host tools: icon row, not giant buttons */
  .play-stream-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }
  .play-visibility {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 36px;
    font-size: 12px;
  }
  .play-invite,
  .play-leave {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 10px;
    gap: 0;
  }
  .play-invite .play-action-label,
  .play-leave .play-action-label {
    display: none;
  }
  .play-invite i,
  .play-leave i {
    font-size: 14px;
    margin: 0;
  }

  /* Hide host chrome on Interact / Chat — focus content */
  .play-shell[data-mobile-panel="interact"] .play-stream-actions,
  .play-shell[data-mobile-panel="chat"] .play-stream-actions {
    display: none;
  }

  .play-stage > .play-side-tabs {
    display: none;
  }

  .play-stage {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    min-height: 0;
  }

  .play-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #1a2a34;
  }
  .play-mode-tabs button {
    width: 100%;
    min-height: 40px;
    border-radius: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #8fa3b3;
    font: 700 13px/1 inherit;
  }
  .play-mode-tabs button[aria-selected="true"] {
    background: transparent;
    color: #d0ff00;
    border-color: transparent;
    border-bottom-color: #d0ff00;
  }

  .play-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    min-height: 0;
  }

  .play-player {
    flex: 0 0 auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    overflow: hidden;
  }
  .play-player-view {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: none;
    touch-action: none;
  }
  .play-game-frame,
  .play-stream-frame,
  .play-live-video:not(.is-pip) {
    object-fit: contain;
  }
  .play-controls {
    padding: 6px 10px;
    gap: 6px;
  }
  .play-ctrl {
    min-width: 40px;
    min-height: 40px;
  }

  /* —— Watch: player first (Twitch) —— */
  .play-stage[data-mobile-panel="watch"] .play-decision,
  .play-stage[data-mobile-panel="watch"] .play-subpanels,
  .play-stage[data-mobile-panel="watch"] .play-side {
    display: none !important;
  }

  /* —— Interact: mini player + vote panel —— */
  .play-stage[data-mobile-panel="interact"] .play-mode-tabs {
    display: none;
  }
  .play-stage[data-mobile-panel="interact"] .play-side {
    display: none !important;
  }
  .play-stage[data-mobile-panel="interact"] .play-player {
    flex: 0 0 auto;
  }
  .play-stage[data-mobile-panel="interact"] .play-player-view {
    aspect-ratio: 16 / 9;
    max-height: 32vh;
  }
  .play-stage[data-mobile-panel="interact"] .play-decision {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 12px;
    padding: 14px;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 0 0 1px #ff313122 inset;
  }
  .play-stage[data-mobile-panel="interact"] .play-decision-copy {
    padding: 0;
    gap: 4px;
  }
  .play-stage[data-mobile-panel="interact"] .play-decision-copy h2 {
    font-size: 16px;
  }
  .play-stage[data-mobile-panel="interact"] .play-decision-copy > p {
    font-size: 13px;
    color: #8fa3b3;
  }
  .play-stage[data-mobile-panel="interact"] .play-choice {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    text-align: left;
    overflow: visible;
  }
  .play-stage[data-mobile-panel="interact"] .play-choice i {
    font-size: 18px;
    flex: 0 0 auto;
    position: static;
  }
  .play-stage[data-mobile-panel="interact"] .play-choice span,
  .play-stage[data-mobile-panel="interact"] .play-vote-count {
    position: static;
  }
  .play-stage[data-mobile-panel="interact"] .play-interact {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    gap: 4px;
  }
  .play-stage[data-mobile-panel="interact"] .play-interact strong {
    font-size: 16px;
  }
  .play-stage[data-mobile-panel="interact"] .play-interact small {
    font-size: 11px;
  }
  .play-stage[data-mobile-panel="interact"] .play-subpanels {
    margin: 0 12px 12px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .play-stage[data-mobile-panel="interact"] .play-effects-row {
    grid-template-columns: 1fr;
  }
  .play-stage[data-mobile-panel="interact"] .play-effect,
  .play-stage[data-mobile-panel="interact"] .play-join-voice {
    min-height: 48px;
  }

  /* —— Chat: mini player + chat (Twitch) —— */
  .play-stage[data-mobile-panel="chat"] .play-decision,
  .play-stage[data-mobile-panel="chat"] .play-subpanels,
  .play-stage[data-mobile-panel="chat"] .play-mode-tabs {
    display: none !important;
  }
  .play-stage[data-mobile-panel="chat"] .play-player {
    flex: 0 0 auto;
  }
  .play-stage[data-mobile-panel="chat"] .play-player-view {
    aspect-ratio: 16 / 9;
    max-height: 28vh;
  }
  .play-stage[data-mobile-panel="chat"] .play-side {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 0 0 auto;
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    margin: 0;
  }
  .play-stage[data-mobile-panel="chat"] .play-chat {
    min-height: 420px;
    height: min(60dvh, 560px);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .play-chat-form input,
  .play-chat-form button {
    min-height: 44px;
    font-size: 16px;
  }
}
