:root {
  --bg: #090814;
  --cabinet-dark: #1a1735;
  --cabinet-mid: #2d255f;
  --cabinet-light: #4b3aa0;
  --screen: #080a18;
  --panel: #251f4a;
  --panel-2: #34296f;
  --text: #fff8ef;
  --muted: #c6bddf;
  --yellow: #ffd45a;
  --orange: #ff943d;
  --cyan: #4de7ff;
  --green: #4dff91;
  --red: #ff4b68;
  --radius: 1.25rem;
  --edge: #070713;
  --shadow-hard: 0 1.1rem 0 #070713, 0 2rem 4rem rgba(0,0,0,.55);
  --shadow-btn: inset 0 .3rem 0 rgba(255,255,255,.26), inset 0 -.45rem 0 rgba(0,0,0,.24), 0 .45rem 0 rgba(0,0,0,.42), 0 .9rem 1.5rem rgba(0,0,0,.3);
}
* {
  box-sizing: border-box;
}
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
}
html {
  background: var(--bg);
}
body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text);
  font-family: "Trebuchet MS", "Arial Black", system-ui, sans-serif;
  background: radial-gradient(circle at 18% 14%, rgba(255,79,184,.28), transparent 24%),
    radial-gradient(circle at 84% 10%, rgba(77,231,255,.23), transparent 25%),
    radial-gradient(circle at 50% 98%, rgba(255,212,90,.18), transparent 30%),
    linear-gradient(135deg, #070610, #151237 45%, #080612);
}
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 2px, transparent 2px 10px);
}
body::after {
  z-index: -1;
  background: radial-gradient(circle at center, transparent 35%, rgba(0,0,0,.46));
}
button, input {
  font: inherit;
  font-weight: 1000;
  border-radius: var(--radius);
}
button {
  border: .25rem solid var(--edge);
  cursor: pointer;
  color: var(--text);
  padding: .8em .9em 1em;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: linear-gradient(180deg, #7668df, #44348f 55%, #2b235d);
  box-shadow: var(--shadow-btn);
  text-shadow: 2px 2px 0 #000;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
button:hover:not(:disabled) {
  filter: brightness(1.12) saturate(1.08);
  transform: translateY(-.16rem);
}
button:active:not(:disabled) {
  transform: translateY(.28rem);
  box-shadow: inset 0 .22rem 0 rgba(255,255,255,.22), inset 0 -.25rem 0 rgba(0,0,0,.3), 0 .18rem 0 rgba(0,0,0,.5);
}
button:disabled, input:disabled {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(.4);
}
input {
  width: 100%;
  padding: .9em 1em;
  border: .25rem solid #080816;
  outline: 0;
  text-align: center;
  letter-spacing: .03em;
  color: var(--yellow);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.18)), #0b0d1f;
  box-shadow: inset 0 .3rem 0 rgba(255,255,255,.08), inset 0 -.35rem 0 rgba(0,0,0,.35), 0 .28rem 0 rgba(0,0,0,.35);
  text-shadow: none;
}
input::placeholder {
  color: rgba(255,248,239,.38);
  text-shadow: none;
}
input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 .3rem rgba(77,231,255,.18), inset 0 .3rem 0 rgba(255,255,255,.08), inset 0 -.35rem 0 rgba(0,0,0,.35);
}
.play {
  color: #06130a;
  background: linear-gradient(180deg, #b7ff70, var(--green) 50%, #0aa85a);
  text-shadow: 1px 1px 0 rgba(255,255,255,.35);
}
.copy, .icon-toggle.help-toggle, .icon-toggle.rooms-toggle {
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
  text-shadow: 1px 1px 0 rgba(255,255,255,.35);
}
.reset, .icon-toggle.logout-toggle, .mic-toggle.muted {
  color: #fff;
  background: linear-gradient(180deg, #ff9aac, var(--red), #a60c32);
}
.yellow-btn, .icon-toggle {
  color: #1b1005;
  background: linear-gradient(180deg, #fff09a, var(--yellow), var(--orange));
  text-shadow: 1px 1px 0 rgba(255,255,255,.35);
}
.fa-solid {
  line-height: 1;
  pointer-events: none;
}
.app-shell {
  container-type: size;
  width: 100vw;
  height: 100dvh;
  padding: clamp(.4rem, 1.25cqw, 1.35rem);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.app-card {
  --gap: clamp(.38rem, 1.2cqh, 1rem);
  --pad: clamp(.75rem, 2.2cqh, 2.1rem);
  position: relative;
  z-index: 0;
  width: min(1180px, 94cqw);
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: var(--gap);
  padding: var(--pad);
  overflow: hidden;
  border: clamp(.25rem, .7cqh, .55rem) solid #090816;
  border-radius: clamp(1rem, 2.4cqh, 2.4rem);
  background: linear-gradient(180deg, rgba(255,255,255,.09), transparent 18%), linear-gradient(145deg, var(--cabinet-light), var(--cabinet-mid) 42%, var(--cabinet-dark));
  box-shadow: var(--shadow-hard), inset 0 .5rem 0 rgba(255,255,255,.15), inset 0 -.8rem 0 rgba(0,0,0,.28);
}
.app-card::before, .app-card::after {
  content: "";
  position: absolute;
  inset: clamp(.45rem, 1.4cqh, 1.1rem);
  border-radius: inherit;
  pointer-events: none;
}
.app-card::before {
  border: .18rem solid rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 .18rem rgba(0,0,0,.22);
}
.app-card::after {
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 2px, transparent 2px 7px);
  mix-blend-mode: screen;
}
.app-card > * {
  position: relative;
  z-index: 1;
}
header {
  display: grid;
  place-items: center;
  min-height: 0;
}
.game-logo {
  display: block;
  width: min(48cqw, 34rem);
  max-width: 100%;
  max-height: clamp(3.2rem, 15cqh, 10rem);
  object-fit: contain;
  filter: drop-shadow(.28rem .28rem 0 #000) drop-shadow(.45rem .45rem 0 rgba(255,79,184,.38)) drop-shadow(0 0 1.2rem rgba(255,212,90,.25));
}
.status-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(.35rem, .8cqh, .7rem);
  flex-wrap: wrap;
  min-height: 0;
}
.room-name-stat {
  margin-inline: auto;
}
.status-grid .round-stat, .status-grid .score-stat, .role-stat {
  display: none;
}
.stat {
  padding: clamp(.32rem, .8cqh, .6rem) clamp(.55rem, 1.25cqh, .9rem);
  border: .18rem solid var(--edge);
  border-radius: 999px;
  background: linear-gradient(180deg, #211c47, #141432);
  box-shadow: inset 0 .25rem 0 rgba(255,255,255,.08), 0 .3rem 0 rgba(0,0,0,.34);
  text-align: center;
  text-shadow: 1px 1px 0 #000;
}
.stat span {
  color: var(--muted);
  font-size: clamp(.45rem, 1.25cqh, .7rem);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.stat strong {
  color: var(--yellow);
  font-size: clamp(.6rem, 1.55cqh, .9rem);
  margin-left: .25rem;
}
.screen-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(16rem, .78fr) minmax(0, 1.55fr);
  gap: clamp(.55rem, 1.8cqh, 1.35rem);
  overflow: hidden;
}
.panel, .leaderboard-panel, .arena, .result-card, .name-card, .chat-panel {
  border: clamp(.22rem, .6cqh, .42rem) solid var(--edge);
  border-radius: clamp(.85rem, 2.2cqh, 1.8rem);
  background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 16%), linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: inset 0 .42rem 0 rgba(255,255,255,.1), inset 0 -.65rem 0 rgba(0,0,0,.26), 0 .75rem 0 rgba(0,0,0,.34), 0 1.5rem 3rem rgba(0,0,0,.32);
}
.panel, .leaderboard-panel {
  padding: clamp(.8rem, 2cqh, 1.35rem);
  min-height: 0;
  overflow: auto;
}
.panel {
  text-align: center;
}
.panel h2, .leaderboard-panel h2, .chat-header h2 {
  margin: 0 0 .9em;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: clamp(.72rem, 1.65cqh, 1rem);
  text-shadow: 3px 3px 0 #000;
}
.room-controls {
  display: grid;
  gap: clamp(.5rem, 1.4cqh, .9rem);
}
.room-notice, .available-empty {
  display: none;
  padding: .8rem;
  border: .22rem solid var(--edge);
  border-radius: 1rem;
  font-weight: 1000;
  text-align: center;
  line-height: 1.35;
  text-shadow: 2px 2px 0 #000;
}
.room-notice {
  color: #ffd5de;
  background: linear-gradient(180deg, #5a1d35, #321426);
}
.room-notice.show {
  display: block;
}
.room-notice.ok {
  color: #d9ffe9;
  background: linear-gradient(180deg, #1d5a39, #153220);
}
.available-empty {
  display: grid;
  min-height: 3.6rem;
  place-items: center;
  color: var(--muted);
  background: #141432;
  border-style: dashed;
}
.battle-room {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: clamp(.4rem, 1.2cqh, .85rem);
  overflow: hidden;
}
.arena {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(.2rem, .9cqh, .65rem);
  padding: clamp(3.5rem, 8.5cqh, 5.6rem) clamp(.45rem, 1.5cqw, 1.4rem) clamp(.45rem, 1.4cqh, 1.2rem);
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(77,231,255,.12), transparent 32%), linear-gradient(180deg, #151937, var(--screen));
}
.arena::before, .arena::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.arena::before {
  inset: clamp(.55rem, 1.4cqh, 1.1rem);
  border: .18rem solid rgba(255,255,255,.08);
  border-radius: 1.2rem;
  box-shadow: inset 0 0 2rem rgba(77,231,255,.08);
}
.arena::after {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 2px, transparent 2px 6px);
  mix-blend-mode: screen;
}
.battle-round-hud {
  position: absolute;
  top: clamp(.5rem, 1.5cqh, 1.15rem);
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
}
.battle-round-hud.vs-hud {
  min-width: clamp(4.5rem, 8.5cqw, 6.6rem);
  border-radius: 999px;
}
.vs-badge {
  color: #ffe28a;
  font-size: clamp(1.55rem, 4.6cqh, 2.7rem);
  font-style: italic;
  line-height: 1;
  letter-spacing: .08em;
  text-shadow: .16rem .16rem 0 #000, 0 0 .95rem rgba(255,212,90,.5);
}
.round-title {
  color: var(--muted);
  font-size: clamp(.42rem, 1.1cqh, .58rem);
  text-transform: uppercase;
  letter-spacing: .2em;
  text-shadow: 1px 1px 0 #000;
}
.round-value {
  margin-top: .25rem;
  color: var(--yellow);
  font-size: clamp(.9rem, 2.8cqh, 1.45rem);
  line-height: 1;
  text-shadow: 2px 2px 0 #000;
}
.duel {
  z-index: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  justify-content: center;
  gap: clamp(.9rem, 2.2cqh, 1.6rem);
}
.duel.players-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: min(70rem, 88cqw);
  width: 100%;
  margin-inline: auto;
}
.side {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(.7rem, 1.8cqh, 1.2rem);
  text-align: center;
}
.player-hud {
  align-self: start;
}
.player-side-1 .player-hud {
  justify-self: start;
}
.player-side-2 .player-hud {
  justify-self: end;
}
.player-side-1 {
  justify-items: start;
}
.player-side-2 {
  justify-items: end;
}
.player-side-1 .icon-box,
.player-side-2 .icon-box {
  align-self: center;
}
.player-side-1 .icon-box {
  justify-self: start;
}
.player-side-2 .icon-box {
  justify-self: end;
}
.side.inactive-player {
  display: none;
}
.label {
  width: min(100%, 17.5rem);
  min-height: clamp(1.9rem, 4.4cqh, 2.7rem);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: .38rem .82rem;
  border: .22rem solid var(--edge);
  border-radius: 999px;
  color: var(--text);
  background: linear-gradient(180deg, #262354, #14142d);
  font-size: clamp(.62rem, 1.6cqh, .92rem);
  line-height: 1.1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-shadow: 2px 2px 0 #000;
  box-shadow: inset 0 .2rem 0 rgba(255,255,255,.08), 0 .3rem 0 rgba(0,0,0,.3);
}
.player-side-2 .label {
  justify-content: flex-end;
  text-align: right;
}
.icon-box {
  width: 100%;
  aspect-ratio: 1 / .82;
  display: grid;
  place-items: center;
  color: var(--text);
  text-shadow: 0 .5rem 0 rgba(0,0,0,.34);
  transition: transform .18s ease, filter .18s ease;
}
.rps-png, .icon-box .rps-png, .choice-icon {
  display: block;
  width: 1em;
  height: 1em;
  object-fit: contain;
  pointer-events: none;
}
.side-score {
  width: min(100%, 9.5rem);
  padding: .55rem .65rem;
  border: .22rem solid var(--edge);
  border-radius: 1rem;
  background: linear-gradient(180deg, #241f4c, #111126);
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .1em;
  text-shadow: 2px 2px 0 #000;
  box-shadow: inset 0 .25rem 0 rgba(255,255,255,.08), 0 .35rem 0 rgba(0,0,0,.34);
}
.side-score span {
  display: block;
  margin-bottom: .25rem;
  color: var(--muted);
  font-size: clamp(.42rem, 1.1cqh, .62rem);
}
.side-score strong {
  display: block;
  font-size: clamp(1rem, 3.4cqh, 2rem);
  line-height: 1;
}
.battle-inline-log {
  position: relative;
  z-index: 2;
  min-height: clamp(1.4rem, 3.4cqh, 2.25rem);
  display: grid;
  place-items: center;
  padding-inline: .6rem;
  color: #f5f2ff;
  font-size: clamp(.62rem, 1.7cqh, 1rem);
  line-height: 1.25;
  text-align: center;
  font-weight: 1000;
  text-shadow: 2px 2px 0 #000;
}
.choice-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.choice-dock button {
  height: clamp(3.2rem, 9cqh, 6.5rem);
  display: grid;
  place-items: center;
  gap: .1rem;
  padding: .25rem;
  border-radius: clamp(.85rem, 1.8cqh, 1.5rem);
  font-size: clamp(.58rem, 1.65cqh, .95rem);
}
.choice-icon {
  width: clamp(1.8rem, 5.8cqh, 4rem);
  height: clamp(1.8rem, 5.8cqh, 4rem);
}
.battle-actions {
  display: grid;
  width: min(100%, 32rem);
  margin-inline: auto;
}
.battle-actions button {
  height: clamp(2.7rem, 6.5cqh, 4rem);
  padding: .3rem .75rem .45rem;
  font-size: clamp(.68rem, 1.7cqh, 1rem);
}
.app-card.lobby-mode .status-grid, .app-card.lobby-mode .battle-room {
  display: none;
}
.app-card.lobby-mode .screen-grid {
  grid-template-columns: 1fr;
  place-items: center;
}
.app-card.lobby-mode .lobby-panel {
  width: min(100%, 36rem);
  max-height: 100%;
}
.app-card.game-mode .lobby-panel {
  display: none;
}
.app-card.game-mode .screen-grid {
  grid-template-columns: 1fr;
}
.top-left-toggles {
  position: fixed;
  z-index: 70;
  display: grid;
}
.icon-toggle, .chat-toggle, .mic-toggle {
  width: clamp(2.65rem, 4.2vw, 3.5rem);
  height: clamp(2.65rem, 4.2vw, 3.5rem);
  display: grid;
  place-items: center;
  padding: 0 0 .18rem;
  border-radius: 1rem;
  box-shadow: none;
  text-shadow: none;
}
.icon-toggle.online-toggle {
  color: #06130a;
  background: linear-gradient(180deg, #b7ff70, var(--green), #0aa85a);
}
.sound-toggle {
  color: #06130a;
  background: linear-gradient(180deg, #b7ff70, var(--green), #0aa85a);
}
.sound-toggle.muted {
  color: #fff;
  background: linear-gradient(180deg, #ff9aac, var(--red), #a60c32);
}
.room-exit-toggle {
  display: none;
}
.room-exit-toggle.in-room {
  display: grid;
}
.info-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}
.floating-panel {
  position: fixed;
  top: max(4.25rem, calc(3.8rem + env(safe-area-inset-top)));
  left: clamp(.5rem, 5vw, 4rem);
  right: clamp(.5rem, 5vw, 4rem);
  width: min(48rem, calc(100vw - 1rem));
  max-height: calc(100dvh - 5rem);
  margin-inline: auto;
  display: none;
  overflow: auto;
  pointer-events: auto;
  animation: slideUp .22s ease;
}
.floating-panel.show, .online-players-panel.floating-panel.show, .available-rooms-panel.floating-panel.show {
  display: block;
}
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 .55rem;
  color: var(--text);
  font-weight: 1000;
  text-shadow: 1px 1px 0 #000;
}
.leaderboard-table thead {
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .74rem;
}
.leaderboard-table th, .leaderboard-table td {
  padding: .7rem .55rem;
  text-align: left;
}
.leaderboard-table td {
  background: linear-gradient(180deg, #20204b, #13142e);
}
.leaderboard-table td:first-child {
  border-radius: .9rem 0 0 .9rem;
  color: var(--yellow);
  text-align: center;
}
.leaderboard-table td:last-child {
  border-radius: 0 .9rem .9rem 0;
  text-align: center;
}
.leaderboard-player {
  color: var(--cyan);
  overflow-wrap: anywhere;
}
.rank-badge, .leaderboard-record {
  display: inline-grid;
  place-items: center;
  max-width: 10rem;
  padding: .42rem .65rem;
  border: .18rem solid var(--edge);
  border-radius: 999px;
  background: #090b1c;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 .2rem 0 rgba(255,255,255,.08);
}
.leaderboard-record {
  color: var(--text);
}
.howto-list {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 1000;
  text-shadow: 1px 1px 0 #000;
}
.players-search-input {
  width: 100%;
  margin-bottom: .6rem;
  padding: .7rem .8rem;
  text-align: left;
  font-size: 1rem;
}
.available-rooms, .online-players-list {
  display: grid;
  gap: .45rem;
  max-height: 52vh;
  overflow: auto;
  padding-right: .25rem;
}
.room-card, .online-player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
  padding: .55rem;
  border: .18rem solid var(--edge);
  border-radius: .9rem;
  background: linear-gradient(180deg, #20204b, #13142e);
  box-shadow: inset 0 .18rem 0 rgba(255,255,255,.07), 0 .25rem 0 rgba(0,0,0,.28);
  text-align: left;
}
.room-card strong, .online-player-card strong {
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-card small, .online-player-card small {
  color: var(--muted);
  font-size: .68rem;
  text-shadow: 1px 1px 0 #000;
}
.room-card button, .online-player-card button {
  min-width: 4.5rem;
  padding: .45rem .55rem .55rem;
  font-size: .66rem;
  border-radius: .75rem;
}
.room-card.full-room {
  opacity: .72;
}
.online-player-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.online-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.online-dot {
  flex: 0 0 auto;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 .6rem rgba(77,255,145,.75);
}
.online-dot.busy {
  background: var(--orange);
  box-shadow: 0 0 .6rem rgba(255,148,61,.75);
}
.online-dot.away {
  background: var(--yellow);
  box-shadow: 0 0 .6rem rgba(255,212,90,.65);
}
.online-dot.offline {
  background: #77738f;
  box-shadow: none;
}
.invite-notice {
  position: fixed;
  top: max(.8rem, env(safe-area-inset-top));
  left: 50%;
  z-index: 100000;
  width: min(29rem, calc(100vw - 1rem));
  display: none;
  transform: translateX(-50%);
  padding: .9rem;
  border: .28rem solid var(--edge);
  border-radius: 1.2rem;
  color: #e9fbff;
  background: linear-gradient(180deg, #173c4f, #101b33);
  box-shadow: var(--shadow-hard);
  text-align: center;
  font-weight: 1000;
  text-shadow: 2px 2px 0 #000;
}
.invite-notice.show {
  display: block;
  animation: slideUp .22s ease;
}
.invite-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: .75rem;
}
.invite-close {
  grid-column: 1 / -1;
}
.chat-toggle, .mic-toggle {
  position: fixed;
  right: .75rem;
  z-index: 71;
  display: none;
}
.chat-toggle {
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
}
.chat-toggle.in-room, .mic-toggle.in-room {
  display: grid;
}
.mic-toggle.listening {
  color: #06130a;
  background: linear-gradient(180deg, #b7ff70, var(--green), #0aa85a);
  animation: notifyWiggle 1.3s ease infinite;
}
.mic-toggle.connecting {
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
}
.chat-badge, .mic-badge {
  position: absolute;
  display: none;
  place-items: center;
  border: .18rem solid var(--edge);
  border-radius: 999px;
  font-size: .68rem;
  line-height: 1;
  font-weight: 1000;
  pointer-events: none;
}
.chat-badge {
  top: -.45rem;
  right: -.45rem;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 .4rem .1rem;
  color: #fff;
  background: linear-gradient(180deg, #ff9aac, var(--red), #a60c32);
}
.mic-badge {
  top: 50%;
  right: calc(100% + .5rem);
  transform: translateY(-50%);
  padding: .45rem .65rem;
  color: #251508;
  background: linear-gradient(180deg, #fff09a, var(--yellow), var(--orange));
  white-space: nowrap;
}
.chat-badge.show, .mic-badge.show {
  display: grid;
  animation: badgePop .28s ease;
}
.chat-toggle.has-unread, .mic-toggle.has-mic-unread {
  animation: notifyWiggle .7s ease;
}
.remote-audio, .bgm-audio {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.chat-scrim {
  display: none;
}
.chat-panel {
  position: fixed;
  right: .8rem;
  bottom: .8rem;
  z-index: 65;
  width: min(23rem, calc(100vw - 1.6rem));
  height: min(30rem, 52dvh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .65rem;
  padding: .9rem;
  transform: translateX(calc(100% + 1.5rem));
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.chat-panel.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.chat-close {
  width: 2.4rem;
  height: 2.4rem;
  min-width: 2.4rem;
  padding: 0 0 .15rem;
  border-radius: .8rem;
}
.chat-messages {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: .5rem;
  padding: .6rem;
  border: .22rem solid var(--edge);
  border-radius: 1rem;
  background: #0b0d1f;
}
.chat-empty {
  align-self: center;
  padding: 1rem .5rem;
  color: var(--muted);
  text-align: center;
  font-weight: 1000;
  text-shadow: 2px 2px 0 #000;
}
.chat-message {
  padding: .55rem .65rem;
  border: .18rem solid var(--edge);
  border-radius: .9rem;
  background: linear-gradient(180deg, #20204b, #13142e);
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 0 #000;
}
.chat-message.me {
  background: linear-gradient(180deg, #173c4f, #101b33);
}
.chat-name {
  color: var(--yellow);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.chat-text {
  margin-top: .2rem;
  color: #f5f2ff;
  line-height: 1.35;
}
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
}
.chat-input {
  min-width: 0;
  text-align: left;
  font-size: 1rem;
}
.chat-send {
  min-width: 4.5rem;
}
.name-gate, .result-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(4,4,12,.84);
  backdrop-filter: blur(5px);
}
.name-gate {
  z-index: 80;
}
.name-gate.show, .result-overlay.show {
  display: grid;
  animation: overlayFlash .22s ease;
}
.name-card, .result-card {
  width: min(46rem, 94vw);
  max-height: calc(100dvh - 2rem);
  padding: clamp(1rem, 3cqh, 2.1rem);
  text-align: center;
  overflow: auto;
}
.name-card h2, .result-title {
  margin: 0;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: .06em;
  text-shadow: .3rem .3rem 0 #000, .55rem .55rem 0 rgba(255,79,184,.34);
}
.name-card h2 {
  color: var(--yellow);
  font-size: clamp(2rem, 7cqw, 4rem);
}
.name-card p {
  color: var(--muted);
  font-weight: 1000;
  line-height: 1.45;
  text-shadow: 2px 2px 0 #000;
}
.name-error {
  min-height: 1.4rem;
  margin: .6rem 0;
  color: var(--red);
  font-weight: 1000;
  text-shadow: 2px 2px 0 #000;
}
.result-card {
  display: flex;
  flex-direction: column;
}
.result-title {
  font-size: clamp(2.3rem, 10cqw, 7rem);
}
.result-title.win, .result-win, .star-gain, .rank-up, .streak-gain {
  color: var(--green);
}
.result-title.lose, .result-lose, .star-loss, .rank-down, .streak-loss {
  color: var(--red);
}
.result-title.draw, .result-draw, .star-neutral, .rank-same, .streak-neutral {
  color: var(--yellow);
}
.result-details {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  width: min(40rem, 100%);
  margin: 1rem auto;
  color: #f2efff;
  font-weight: 1000;
  line-height: 1.45;
  text-shadow: 2px 2px 0 #000;
}
.result-actions {
  display: grid;
  gap: .7rem;
  margin-inline: auto;
}
.final-rounds {
  margin-top: 1rem;
  padding: .75rem;
  border: .22rem solid var(--edge);
  border-radius: 1rem;
  background: #0b0d1f;
  text-align: left;
}
.final-rounds > strong {
  display: block;
  margin-bottom: .5rem;
  color: var(--cyan);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.final-round-row, .rank-change-row {
  display: grid;
  grid-template-columns: 3rem minmax(6rem, 1fr) minmax(7rem, 1fr);
  gap: .45rem;
  align-items: center;
  padding: .5rem .6rem;
  margin-top: .35rem;
  border-radius: .75rem;
  background: rgba(255,255,255,.07);
}
.final-score-summary {
  display: block;
  text-align: center;
  color: var(--yellow);
  text-transform: uppercase;
}
.round-choices {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.round-choices .rps-png {
  width: 1.45em;
  height: 1.45em;
}
.round-vs {
  color: #fff;
  font-size: .8em;
}
.my-rank-summary {
  margin-top: 1rem;
}
.my-rank-name, .my-rank-stars, .my-rank-streak {
  display: block;
}
.rank-change-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  font-size: .85rem;
}
.rank-change-player {
  color: var(--yellow);
}
.mobile-bottom-bar {
  display: none !important;
}
.countdown-banner {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  padding: 1rem;
  text-align: center;
  background: rgba(5,6,16,.78);
  backdrop-filter: blur(2px);
}
.countdown-banner.show {
  display: grid;
}
.countdown-number {
  color: var(--yellow);
  font-size: clamp(3rem, 16cqh, 11rem);
  line-height: .86;
  font-weight: 1000;
  text-shadow: .4rem .4rem 0 #000, .7rem .7rem 0 rgba(255,79,184,.34), 0 0 1.7rem rgba(255,212,90,.4);
  animation: countdownBeat .38s ease-in-out infinite alternate;
}
.countdown-number.hit {
  animation: countdownHit .32s ease, countdownBeat .38s ease-in-out .32s infinite alternate;
}
.countdown-text {
  display: inline-block;
  max-width: min(45rem, 92vw);
  margin-top: .9rem;
  padding: .6rem .9rem;
  border: .22rem solid var(--edge);
  border-radius: 999px;
  color: var(--cyan);
  background: linear-gradient(180deg, #24204d, #101026);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 1000;
  text-shadow: 2px 2px 0 #000;
}
.countdown-banner.round-result .countdown-text {
  text-transform: none;
  letter-spacing: .05em;
  color: #f2efff;
  line-height: 1.35;
}
.countdown-banner.round-win .countdown-number {
  color: var(--green);
}
.countdown-banner.round-lose .countdown-number {
  color: var(--red);
}
.countdown-banner.round-draw .countdown-number {
  color: var(--yellow);
}
.icon-box.locked {
  border-color: #0b1218;
  outline: .3rem solid var(--cyan);
  animation: pulse .7s ease;
}
.icon-box.waiting {
  animation: suspense .8s ease-in-out infinite alternate;
}
.icon-box.flash-win, .side.round-win .icon-box {
  outline: .35rem solid var(--green);
}
.icon-box.flash-lose, .side.round-lose .icon-box {
  outline: .35rem solid var(--red);
}
.icon-box.flash-draw, .side.round-draw .icon-box {
  outline: .35rem solid var(--yellow);
}
.icon-box.flash-win {
  animation: pop .45s ease;
}
.icon-box.flash-lose {
  animation: wobble .45s ease;
}
.icon-box.flash-draw {
  animation: pulse .45s ease;
}
.icon-box.fight-left {
  animation: fightLeft .58s ease-in-out infinite alternate;
}
.icon-box.fight-right {
  animation: fightRight .58s ease-in-out infinite alternate;
}
.gesture-symbol {
  display: inline-block;
  transform-origin: center;
}
#player1Icon .gesture-symbol {
  transform: scaleY(-1) rotate(90deg);
}
#player2Icon .gesture-symbol {
  transform: rotate(-90deg);
}
@media (max-width: 860px) {
  .app-shell {
    padding: 0;
    place-items: stretch;
  }
  .app-card {
    width: 100%;
    border: 0;
    border-radius: 0;
    --pad: clamp(.55rem, 3vw, 1rem);
  }
  .top-left-toggles {
    left: .45rem;
    gap: .45rem;
  }
  .chat-toggle, .mic-toggle {
    right: .45rem;
  }
  .game-logo {
    width: min(46cqw, 19rem);
    max-height: 11cqh;
  }
  .status-grid {
    margin-inline: 3rem;
    justify-content: center;
  }
  .screen-grid {
    grid-template-columns: 1fr;
  }
  .arena {
    padding-top: clamp(3rem, 8cqh, 4.2rem);
  }
  .duel.players-2 {
    max-width: none;
  }
  .label {
    min-height: 1.9rem;
    font-size: clamp(.42rem, 1.4cqh, .58rem);
  }
  .icon-box {
    max-width: none;
    aspect-ratio: 1 / .78;
    font-size: clamp(2.7rem, 9.2cqh, 5.5rem);
  }
  .side-score {
    padding: .35rem .45rem;
  }
  .choice-dock button {
    height: clamp(2.9rem, 7.5cqh, 4.3rem);
    font-size: clamp(.56rem, 1.4cqh, .72rem);
  }
  .choice-icon {
    width: clamp(1.6rem, 4.8cqh, 2.6rem);
    height: clamp(1.6rem, 4.8cqh, 2.6rem);
  }
  .floating-panel {
    top: max(3.6rem, calc(3.2rem + env(safe-area-inset-top)));
    left: .45rem;
    right: .45rem;
    width: auto;
    max-height: calc(100dvh - 4.2rem);
  }
  .chat-panel {
    right: 0;
    bottom: max(.5rem, env(safe-area-inset-bottom));
    width: min(88vw, 22rem);
    height: 50dvh;
    border-radius: 1.2rem 0 0 1.2rem;
    border-right: 0;
  }
  .chat-scrim.show {
    position: fixed;
    inset: 0;
    z-index: 64;
    display: block;
    background: rgba(4,4,12,.38);
  }
  .result-overlay {
    padding: 0;
    align-items: stretch;
    justify-items: stretch;
  }
  .result-card {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .result-actions {
    grid-template-columns: 1fr;
  }
  .rank-change-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  .status-grid .stat:not(.room-name-stat) span {
    display: none;
  }
  .room-name-stat span {
    display: inline;
  }
  .final-round-row {
    grid-template-columns: 2rem minmax(4rem, 1fr) minmax(0, 1fr);
    font-size: .72rem;
  }
}
@keyframes countdownHit {
  0% {
    transform: scale(.45) rotate(-3deg);
    opacity: 0;
    filter: brightness(2);
  }
  45% {
    transform: scale(1.2) rotate(2deg);
    opacity: 1;
    filter: brightness(1.4);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
}
@keyframes countdownBeat {
  from {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  to {
    transform: translateY(-.3rem) scale(1.06);
    filter: brightness(1.25);
  }
}
@keyframes suspense {
  from {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  to {
    transform: translateY(-.35rem) scale(1.04);
    filter: brightness(1.2);
  }
}
@keyframes pop {
  0%,100% {
    transform: scale(1);
  }
  45% {
    transform: translateY(-.6rem) scale(1.12) rotate(-2deg);
  }
}
@keyframes wobble {
  0%,100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-.7rem) rotate(-2deg);
  }
  50% {
    transform: translateX(.7rem) rotate(2deg);
  }
  75% {
    transform: translateX(-.45rem) rotate(-1deg);
  }
}
@keyframes pulse {
  0%,100% {
    transform: scale(1);
  }
  50% {
    transform: translateY(-.35rem) scale(1.07);
  }
}
@keyframes readySlideInLeft {
  0% {
    transform: translateX(-120%) scale(.88);
    opacity: 0;
  }
  65% {
    transform: translateX(.3rem) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}
@keyframes readySlideInRight {
  0% {
    transform: translateX(120%) scale(.88);
    opacity: 0;
  }
  65% {
    transform: translateX(-.3rem) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}
@keyframes fightLeft {
  0% {
    transform: translateX(0) rotate(-2deg) scale(1);
  }
  45% {
    transform: translateX(1rem) rotate(5deg) scale(1.05);
  }
  100% {
    transform: translateX(.35rem) rotate(-1deg) scale(1.02);
  }
}
@keyframes fightRight {
  0% {
    transform: translateX(0) rotate(2deg) scale(1);
  }
  45% {
    transform: translateX(-1rem) rotate(-5deg) scale(1.05);
  }
  100% {
    transform: translateX(-.35rem) rotate(1deg) scale(1.02);
  }
}
@keyframes overlayFlash {
  from {
    opacity: 0;
    filter: brightness(2);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}
@keyframes slideUp {
  from {
    transform: translateY(1.4rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes badgePop {
  0% {
    transform: scale(.25);
    opacity: 0;
  }
  70% {
    transform: scale(1.18);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes notifyWiggle {
  0%,100% {
    filter: brightness(1);
  }
  20% {
    filter: brightness(1.32);
  }
  40% {
    filter: brightness(1.08);
  }
  60% {
    filter: brightness(1.28);
  }
}
/* Health bar score style */
.health-stat {
  min-width: clamp(8rem, 18cqw, 12rem);
}
.health-stat strong {
  display: block;
  margin: .15rem 0 .35rem;
}
.side-score.health-score {
  backdrop-filter: blur(1.5px);
}
.player-side-1 .side-score.health-score {
  justify-self: start;
}
.player-side-2 .side-score.health-score {
  justify-self: end;
}
.health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  width: 100%;
}
.player-side-2 .health-header {
  flex-direction: row-reverse;
}
.health-header span,
.side-score.health-score span {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.42rem, 1.1cqh, .62rem);
  letter-spacing: .16em;
}
.health-header strong,
.side-score.health-score strong {
  color: var(--yellow);
  font-size: clamp(.72rem, 2.1cqh, 1.15rem);
  line-height: 1;
  white-space: nowrap;
}
.health-bar {
  width: 100%;
  border-radius: 999px;
}
.health-bar.compact {
  width: min(100%, 8rem);
  height: .62rem;
  margin-inline: auto;
}
.health-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transition: width .45s cubic-bezier(.2,.9,.2,1), filter .25s ease, background .25s ease;
}
.health-fill.low {
  box-shadow: inset 0 .18rem 0 rgba(255,255,255,.3), inset 0 -.22rem 0 rgba(0,0,0,.22), 0 0 .8rem rgba(255,212,90,.4);
}
.health-fill.critical {
  animation: healthCriticalPulse .55s ease-in-out infinite alternate;
}
@media (max-width: 860px) {
  .duel {
    padding-top: clamp(3.7rem, 8.8cqh, 5.2rem);
  }
  .side-score.health-score {
    padding: .38rem .48rem .5rem;
    width: min(100%, 15rem);
  }
  .player-hud {
    width: min(100%, 15rem);
  }
  .label {
    font-size: clamp(.56rem, 1.55cqh, .78rem);
  }
  .battle-round-hud.vs-hud {
    min-width: 4rem;
    padding: .28rem .72rem .38rem;
  }
  .vs-badge {
    font-size: clamp(1.2rem, 3.8cqh, 2rem);
  }
  .health-header {
    margin-bottom: .28rem;
  }
  .health-bar {
    height: .7rem;
  }
}
@keyframes healthCriticalPulse {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.35);
  }
}
/* --- RESTORE: absolute arena-top HUD + HP-only bars --- */
.battle-round-hud.vs-hud {
  position: absolute;
  top: clamp(.6rem, 1.4cqh, 1rem);
  left: 50%;
  z-index: 8;
  transform: translateX(-50%);
}
.duel {
  position: static;
  height: 100%;
  padding-top: 0;
  align-items: center;
}
.player-side {
  position: static;
}
.player-hud {
  position: absolute;
  z-index: 7;
  display: grid;
  pointer-events: none;
}
.player-side-1 .player-hud {
  justify-items: start;
}
.player-side-2 .player-hud {
  justify-items: end;
}
.health-header {
  margin-bottom: .28rem;
}
.health-bar {
  height: clamp(.8rem, 1.95cqh, 1.12rem);
  border: .16rem solid #05060e;
}
.health-bar-right .health-fill {
  margin-left: auto;
}
@media (max-width: 860px) {
  .arena {
    padding-top: clamp(4.9rem, 10.8cqh, 6.4rem);
  }
  .player-hud {
    top: clamp(.45rem, 1.2cqh, .78rem);
    width: min(42%, 12rem);
    max-width: calc(50% - 3.15rem);
  }
  .player-hud .label {
    font-size: clamp(.5rem, 1.4cqh, .72rem);
    padding: .04rem .45rem .09rem;
  }
  .side-score.health-score {
    min-height: 1.8rem;
    padding: .22rem .3rem .28rem;
  }
  .health-bar {
    height: .58rem;
  }
}
/* --- v1.0.2: slanted rectangle healthbar shape override --- */
.player-side-1 .health-bar {
  clip-path: polygon(0 0, 100% 0, calc(100% - .58rem) 100%, 0 100%);
}
.player-side-2 .health-bar {
  clip-path: polygon(.58rem 0, 100% 0, 100% 100%, 0 100%);
}
.player-side-1 .health-fill,
.player-side-1 .health-fill.low,
.player-side-1 .health-fill.critical {
  clip-path: polygon(0 0, 100% 0, calc(100% - .58rem) 100%, 0 100%);
}
.player-side-2 .health-fill,
.player-side-2 .health-fill.low,
.player-side-2 .health-fill.critical {
  clip-path: polygon(.58rem 0, 100% 0, 100% 100%, 0 100%);
}
@media (max-width: 860px) {
  .player-side-1 .side-score.health-score {
    clip-path: polygon(0 0, 100% 0, calc(100% - .7rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score {
    clip-path: polygon(.7rem 0, 100% 0, 100% 100%, 0 100%);
  }
  .player-side-1 .side-score.health-score::before {
    clip-path: polygon(0 0, 100% 0, calc(100% - .48rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score::before {
    clip-path: polygon(.48rem 0, 100% 0, 100% 100%, 0 100%);
  }
  .player-side-1 .health-bar,
  .player-side-1 .health-fill,
  .player-side-1 .health-fill.low,
  .player-side-1 .health-fill.critical {
    clip-path: polygon(0 0, 100% 0, calc(100% - .34rem) 100%, 0 100%);
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(.34rem 0, 100% 0, 100% 100%, 0 100%);
  }
  .player-side-1 .player-hud .label {
    clip-path: polygon(0 0, 100% 0, calc(100% - .32rem) 100%, 0 100%);
  }
  .player-side-2 .player-hud .label {
    clip-path: polygon(.32rem 0, 100% 0, 100% 100%, 0 100%);
  }
}
/* --- v1.0.1.2: slanted rectangle for healthbar + healthbar container only --- */
@media (max-width: 860px) {
  .player-side-1 .side-score.health-score {
    clip-path: polygon(0 0, 100% 0, calc(100% - .72rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score {
    clip-path: polygon(.72rem 0, 100% 0, 100% 100%, 0 100%);
  }
  .player-side-1 .side-score.health-score::before {
    clip-path: polygon(0 0, 100% 0, calc(100% - .48rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score::before {
    clip-path: polygon(.48rem 0, 100% 0, 100% 100%, 0 100%);
  }
  .player-side-1 .health-bar,
  .player-side-1 .health-fill,
  .player-side-1 .health-fill.low,
  .player-side-1 .health-fill.critical {
    clip-path: polygon(0 0, 100% 0, calc(100% - .34rem) 100%, 0 100%);
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(.34rem 0, 100% 0, 100% 100%, 0 100%);
  }
}
/* --- v1.0.1.3: rhomboid healthbar + container override --- */
@media (max-width: 860px) {
  .player-side-1 .side-score.health-score {
    clip-path: polygon(.64rem 0, 100% 0, calc(100% - .64rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score {
    clip-path: polygon(0 0, calc(100% - .64rem) 0, 100% 100%, .64rem 100%);
  }
  .player-side-1 .side-score.health-score::before {
    clip-path: polygon(.42rem 0, 100% 0, calc(100% - .42rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score::before {
    clip-path: polygon(0 0, calc(100% - .42rem) 0, 100% 100%, .42rem 100%);
  }
  .player-side-1 .health-bar,
  .player-side-1 .health-fill,
  .player-side-1 .health-fill.low,
  .player-side-1 .health-fill.critical {
    clip-path: polygon(.28rem 0, 100% 0, calc(100% - .28rem) 100%, 0 100%);
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(0 0, calc(100% - .28rem) 0, 100% 100%, .28rem 100%);
  }
}
/* --- v1.0.1.4: reference beveled healthbar override --- */
@media (max-width: 860px) {
  .player-side-1 .side-score.health-score {
    clip-path: polygon(.72rem 0, 100% 0, calc(100% - .72rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score {
    clip-path: polygon(0 0, calc(100% - .72rem) 0, 100% 100%, .72rem 100%);
  }
  .player-side-1 .side-score.health-score::before {
    clip-path: polygon(.48rem 0, 100% 0, calc(100% - .48rem) 100%, 0 100%);
  }
  .player-side-2 .side-score.health-score::before {
    clip-path: polygon(0 0, calc(100% - .48rem) 0, 100% 100%, .48rem 100%);
  }
  .player-side-1 .health-bar,
  .player-side-1 .health-fill,
  .player-side-1 .health-fill.low,
  .player-side-1 .health-fill.critical {
    clip-path: polygon(.28rem 0, 100% 0, calc(100% - .28rem) 100%, 0 100%);
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(0 0, calc(100% - .28rem) 0, 100% 100%, .28rem 100%);
  }
}
/* --- v1.0.1.5: hide battle healthbar text --- */
.side-score.health-score .health-header,
.side-score.health-score .health-header span,
.side-score.health-score .health-header strong {
  display: none !important;
}
@media (max-width: 860px) {
  .side-score.health-score .health-bar {
    inset: .34rem .43rem .36rem;
  }
}
/* --- v1.0.1.7: health bar above player name --- */
.player-hud {
  grid-template-areas: "health"
    "name";
}
.player-hud .side-score.health-score {
  grid-area: health;
}
.player-side-1 .player-hud,
.player-side-2 .player-hud {
  align-content: start;
}
/* --- v1.0.2.1: player name one-side slant only; healthbar unchanged --- */
.player-hud .label {
  grid-area: name;
  width: fit-content !important;
  max-width: 100%;
  min-width: 0;
  min-height: auto;
  display: inline-flex;
  align-items: center;
  border: .18rem solid #0a0a12;
  border-radius: 0;
  color: #f6f1ff;
  font-size: clamp(.68rem, 1.7cqh, .98rem);
  font-style: italic;
  font-weight: 1000;
  line-height: 1.15;
  text-transform: uppercase;
  text-shadow: .12rem .12rem 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-side-1 .player-hud .label {
  justify-self: start;
  justify-content: flex-start;
  text-align: left;
}
.player-side-2 .player-hud .label {
  justify-self: end;
  justify-content: flex-end;
  text-align: right;
}
.side.my-side .label {
  border-color: #0a0a12;
  box-shadow: inset 0 .16rem 0 rgba(255,255,255,.1), 0 .2rem 0 rgba(0,0,0,.5), 0 .85rem 1.3rem rgba(0,0,0,.25);
}
@media (max-width: 860px) {
  .player-hud .label {
    width: fit-content !important;
    max-width: 100%;
    min-height: auto;
    padding: .18rem .52rem .24rem;
    font-size: clamp(.5rem, 1.4cqh, .72rem);
  }
  .player-side-1 .player-hud .label {
    clip-path: polygon(0 0, 100% 0, calc(100% - .72rem) 100%, 0 100%) !important;
  }
  .player-side-2 .player-hud .label {
    clip-path: polygon(.72rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
}
/* --- v1.0.2.2: one-side slant health bars --- */
.player-side-1 .side-score.health-score::before {
  clip-path: polygon(0 0, 100% 0, calc(100% - .68rem) 100%, 0 100%) !important;
}
@media (max-width: 860px) {
  .player-side-1 .side-score.health-score {
    clip-path: polygon(0 0, 100% 0, calc(100% - .72rem) 100%, 0 100%) !important;
  }
  .player-side-2 .side-score.health-score {
    clip-path: polygon(.72rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
  .player-side-1 .side-score.health-score::before {
    clip-path: polygon(0 0, 100% 0, calc(100% - .48rem) 100%, 0 100%) !important;
  }
  .player-side-2 .side-score.health-score::before {
    clip-path: polygon(.48rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
  .player-side-1 .health-bar,
  .player-side-1 .health-fill,
  .player-side-1 .health-fill.low,
  .player-side-1 .health-fill.critical {
    clip-path: polygon(0 0, 100% 0, calc(100% - .34rem) 100%, 0 100%) !important;
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(.34rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
}
/* --- v1.0.2.3: keep VS pinned top center --- */
.arena {
  position: relative;
}
@media (max-width: 860px) {
  .arena {
    padding-top: clamp(4.9rem, 10.8cqh, 6.4rem);
  }
  .battle-round-hud,
  .battle-round-hud.vs-hud {
    top: clamp(.42rem, 1.1cqh, .8rem) !important;
    max-width: calc(100% - 1rem);
    z-index: 30 !important;
  }
}
/* --- v1.0.2.4: remove VS background panel --- */
.battle-round-hud.vs-hud {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
/* --- v1.0.2.5: exact centered VS overlay --- */
.battle-round-hud,
.battle-round-hud.vs-hud {
  position: absolute !important;
  bottom: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  z-index: 30 !important;
  pointer-events: none;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.battle-round-hud .vs-badge,
.battle-round-hud.vs-hud .vs-badge {
  display: inline-block;
  margin: 0 auto !important;
  text-align: center !important;
}
@media (max-width: 860px) {
  .battle-round-hud,
  .battle-round-hud.vs-hud {
    top: clamp(.42rem, 1.1cqh, .8rem) !important;
  }
}
/* --- v1.0.2.6: redesigned opponent-balanced health fill --- */
.health-bar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 38%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 .8rem, rgba(0,0,0,.08) .8rem 1rem),
    linear-gradient(180deg, #0a0d18, #1a1e36 60%, #090b13);
  box-shadow: inset 0 .16rem .2rem rgba(255,255,255,.06),
    inset 0 -.22rem .35rem rgba(0,0,0,.55),
    0 .18rem 0 rgba(0,0,0,.38);
}
.health-fill,
.health-fill.low,
.health-fill.critical {
  position: relative;
  overflow: hidden;
}
.health-fill::before,
.health-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}
.health-fill::before {
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 52%, rgba(0,0,0,.08));
}
/* center-facing bevel / inner tip */
.player-side-1 .health-fill::after {
  right: 0;
  width: 1rem;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,248,205,.7));
  clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%);
}
.player-side-2 .health-fill::after {
  left: 0;
  width: 1rem;
  background: linear-gradient(90deg, rgba(255,248,205,.7), rgba(255,255,255,0));
  clip-path: polygon(0 0, 82% 0, 100% 100%, 18% 100%);
}
/* keep the fill aligned toward the opponent-facing inner edge */
.player-side-1 .health-bar .health-fill {
  transform-origin: left center;
}
.player-side-2 .health-bar .health-fill {
  transform-origin: right center;
}
@media (max-width: 860px) {
  .player-side-1 .health-fill::after,
  .player-side-2 .health-fill::after {
    width: .72rem;
  }
}
/* --- v1.0.2.7: cleaner balanced top HUD --- */
.side-score.health-score {
  min-height: 0 !important;
  height: clamp(1.45rem, 3.25cqh, 2.05rem) !important;
  display: flex !important;
  align-items: center !important;
  padding: clamp(.22rem, .6cqh, .34rem) clamp(.38rem, .95cqh, .56rem) !important;
  border: .16rem solid rgba(5,6,14,.96) !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(22,22,36,.96), rgba(7,8,17,.98)) !important;
  box-shadow: inset 0 .1rem 0 rgba(255,255,255,.1),
    inset 0 -.14rem 0 rgba(0,0,0,.34),
    0 .18rem .55rem rgba(0,0,0,.4) !important;
}
.side-score.health-score .health-bar {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: clamp(.72rem, 1.45cqh, .96rem) !important;
  margin: 0 !important;
  border: .1rem solid rgba(0,0,0,.9) !important;
  border-radius: .45rem !important;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0) 45%),
    linear-gradient(180deg, #080a13, #161b31 62%, #070813) !important;
  box-shadow: inset 0 .12rem .14rem rgba(255,255,255,.05),
    inset 0 -.16rem .22rem rgba(0,0,0,.55) !important;
}
.health-fill,
.health-fill.low,
.health-fill.critical {
  border-radius: .36rem !important;
}
.health-fill {
  background: linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,0) 40%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 .55rem, transparent .55rem .9rem),
    linear-gradient(90deg, #fff7b8 0%, #ffe579 24%, #ffc45a 55%, #ff8b3f 100%) !important;
  box-shadow: inset 0 .09rem 0 rgba(255,255,255,.36),
    inset 0 -.1rem 0 rgba(0,0,0,.18),
    0 0 .45rem rgba(255,181,74,.24) !important;
}
.health-fill.low {
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 40%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 .55rem, transparent .55rem .9rem),
    linear-gradient(90deg, #fff2a0 0%, #ffd45a 38%, #ff9a3f 72%, #f36a2b 100%) !important;
}
/* smaller, cleaner one-side cuts: less black wedge, more arcade bar */
.player-side-1 .health-fill::after,
.player-side-2 .health-fill::after {
  width: .62rem !important;
  opacity: .55;
}
.player-hud .label {
  padding: .22rem .58rem .28rem !important;
  border-width: .14rem !important;
  background: linear-gradient(180deg, rgba(20,20,34,.96), rgba(7,7,15,.98)) !important;
  box-shadow: inset 0 .08rem 0 rgba(255,255,255,.09), 0 .14rem .45rem rgba(0,0,0,.38) !important;
}
.player-side-1 .player-hud .label {
  clip-path: polygon(0 0, 100% 0, calc(100% - .42rem) 100%, 0 100%) !important;
}
@media (max-width: 860px) {
  .arena {
    padding-top: clamp(4.55rem, 10.2cqh, 5.7rem) !important;
  }
  .player-hud {
    top: clamp(.5rem, 1.15cqh, .78rem) !important;
    width: min(36%, 13.5rem) !important;
    max-width: calc(50% - 3.4rem) !important;
  }
  .side-score.health-score {
    height: 1.35rem !important;
    padding: .18rem .32rem !important;
  }
  .side-score.health-score .health-bar {
    height: .58rem !important;
  }
  .player-side-1 .side-score.health-score {
    clip-path: polygon(0 0, 100% 0, calc(100% - .34rem) 100%, 0 100%) !important;
  }
  .player-side-2 .side-score.health-score {
    clip-path: polygon(.34rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
  .player-side-1 .health-bar,
  .player-side-1 .health-fill,
  .player-side-1 .health-fill.low,
  .player-side-1 .health-fill.critical {
    clip-path: polygon(0 0, 100% 0, calc(100% - .2rem) 100%, 0 100%) !important;
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(.2rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
  .player-hud .label {
    padding: .14rem .42rem .18rem !important;
  }
  .player-side-1 .player-hud .label {
    clip-path: polygon(0 0, 100% 0, calc(100% - .3rem) 100%, 0 100%) !important;
  }
  .player-side-2 .player-hud .label {
    clip-path: polygon(.3rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
}
/* --- v1.0.2.8: mirrored health bars around VS --- */
.arena {
  --hud-side-gap: clamp(.9rem, 2.1cqw, 1.7rem);
  --vs-center-gap: clamp(6.8rem, 12cqw, 9.2rem);
}
.player-hud {
  width: calc((100% - (var(--hud-side-gap) * 2) - var(--vs-center-gap)) / 2) !important;
  max-width: none !important;
  min-width: 0 !important;
  gap: clamp(.24rem, .7cqh, .42rem) !important;
}
.player-side-1 .player-hud {
  left: var(--hud-side-gap) !important;
  right: auto !important;
}
.player-side-2 .player-hud {
  right: var(--hud-side-gap) !important;
  left: auto !important;
}
.side-score.health-score {
  width: 100% !important;
  margin: 0 !important;
}
.battle-round-hud,
.battle-round-hud.vs-hud {
  width: var(--vs-center-gap) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}
/* ensure identical mirrored slants */
.player-side-1 .side-score.health-score {
  clip-path: polygon(0 0, 100% 0, calc(100% - .46rem) 100%, 0 100%) !important;
}
.player-side-1 .health-bar,
.player-side-1 .health-fill,
.player-side-1 .health-fill.low,
.player-side-1 .health-fill.critical {
  clip-path: polygon(0 0, 100% 0, calc(100% - .26rem) 100%, 0 100%) !important;
}
@media (max-width: 860px) {
  .arena {
    --hud-side-gap: .55rem;
    --vs-center-gap: clamp(4.8rem, 16vw, 6rem);
    padding-top: clamp(4.55rem, 10.2cqh, 5.7rem) !important;
  }
  .player-hud {
    top: clamp(.5rem, 1.15cqh, .78rem) !important;
    width: calc((100% - (var(--hud-side-gap) * 2) - var(--vs-center-gap)) / 2) !important;
    max-width: none !important;
  }
  .player-side-1 .side-score.health-score {
    clip-path: polygon(0 0, 100% 0, calc(100% - .34rem) 100%, 0 100%) !important;
  }
  .player-side-2 .side-score.health-score {
    clip-path: polygon(.34rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
  .player-side-1 .health-bar,
  .player-side-1 .health-fill,
  .player-side-1 .health-fill.low,
  .player-side-1 .health-fill.critical {
    clip-path: polygon(0 0, 100% 0, calc(100% - .2rem) 100%, 0 100%) !important;
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(.2rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
}
/* --- v1.0.2.9: translateY right player HUD for exact mirroring --- */
.player-side-2 .player-hud {
  transform: translateY(.06rem) !important;
}
@media (max-width: 860px) {
  .player-side-2 .player-hud {
    transform: translateY(.04rem) !important;
  }
}
/* --- v1.0.3.0: rotate P2 health bar shape for true mirrored top point --- */
.player-side-2 .side-score.health-score {
  clip-path: polygon(0 0, 100% 0, 100% 100%, .46rem 100%) !important;
}
.player-side-2 .side-score.health-score::before {
  clip-path: polygon(0 0, 100% 0, 100% 100%, .32rem 100%) !important;
}
.player-side-2 .health-bar,
.player-side-2 .health-fill,
.player-side-2 .health-fill.low,
.player-side-2 .health-fill.critical {
  clip-path: polygon(0 0, 100% 0, 100% 100%, .26rem 100%) !important;
}
@media (max-width: 860px) {
  .player-side-2 .side-score.health-score {
    clip-path: polygon(0 0, 100% 0, 100% 100%, .34rem 100%) !important;
  }
  .player-side-2 .side-score.health-score::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, .22rem 100%) !important;
  }
  .player-side-2 .health-bar,
  .player-side-2 .health-fill,
  .player-side-2 .health-fill.low,
  .player-side-2 .health-fill.critical {
    clip-path: polygon(0 0, 100% 0, 100% 100%, .2rem 100%) !important;
  }
}
/* --- v1.0.3.4: leaderboard copies Players modal layout --- */
#leaderboardPanel {
  width: min(48rem, calc(100vw - 1rem));
}
#leaderboardPanel .leaderboard-list {
  display: grid;
  gap: .45rem;
  max-height: 52vh;
  overflow: auto;
  padding-right: .25rem;
}
#leaderboardPanel .leaderboard-player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
  padding: .55rem;
  border: .18rem solid var(--edge);
  border-radius: .9rem;
  background: linear-gradient(180deg, #20204b, #13142e);
  box-shadow: inset 0 .18rem 0 rgba(255,255,255,.07), 0 .25rem 0 rgba(0,0,0,.28);
  text-align: left;
}
#leaderboardPanel .leaderboard-player-info {
  min-width: 0;
  display: flex;
  align-items: center;
}
#leaderboardPanel .leaderboard-player-info strong {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#leaderboardPanel .leaderboard-rank-chip {
  flex: 0 0 auto;
  min-width: 2.35rem;
  padding: .22rem .38rem .26rem;
  border: .16rem solid var(--edge);
  border-radius: .65rem;
  background: linear-gradient(180deg, #20204b, #13142e);
  box-shadow: inset 0 .18rem 0 rgba(255,255,255,.07), 0 .18rem 0 rgba(0,0,0,.28);
  color: var(--yellow);
  text-align: center;
  font-size: .76rem;
}
#leaderboardPanel .leaderboard-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#leaderboardPanel .leaderboard-player-info small {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: .68rem;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#leaderboardPanel .leaderboard-streak-btn {
  min-width: 4.5rem;
  padding: .45rem .55rem .55rem;
  font-size: .66rem;
  border-radius: .75rem;
  opacity: 1;
  filter: none;
  cursor: default;
}
#leaderboardPanel .available-empty {
  display: grid;
}
@media (max-width: 860px) {
  #leaderboardPanel .leaderboard-player-card {
    padding: .5rem;
    gap: .42rem;
  }
  #leaderboardPanel .leaderboard-player-info {
    align-items: flex-start;
    flex-direction: column;
    gap: .2rem;
  }
  #leaderboardPanel .leaderboard-player-info strong {
    max-width: 100%;
  }
  #leaderboardPanel .leaderboard-streak-btn {
    min-width: 4.1rem;
    padding: .38rem .45rem .48rem;
  }
}
/* --- v1.0.3.5: swap leaderboard streak and rank positions --- */
#leaderboardPanel .leaderboard-streak-text {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: .68rem;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#leaderboardPanel .leaderboard-rank-btn {
  min-width: 7.6rem;
  max-width: 11rem;
  padding: .45rem .55rem .55rem;
  font-size: .66rem;
  border-radius: .75rem;
  opacity: 1;
  filter: none;
  cursor: default;
  line-height: 1.05;
}
@media (max-width: 860px) {
  #leaderboardPanel .leaderboard-rank-btn {
    min-width: 6.2rem;
    max-width: 8.6rem;
    padding: .38rem .45rem .48rem;
    font-size: .58rem;
  }
}
/* --- v1.0.4.7: remove icon background --- */
/* --- v1.0.4.9: preserve 1.0.4.7 base, bigger icons, yellow player names, no outline indicators --- */
.icon-box {
  max-width: 22rem !important;
  overflow: visible !important;
  font-size: clamp(4.4rem, 15cqh, 12.8rem) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.status-rock,
.icon-box .rps-png {
  width: 1.08em !important;
  height: 1.08em !important;
}
.gesture-symbol {
  font-size: 1.08em !important;
}
.status-text,
.player-hud .label,
.side.my-side .label {
  color: var(--yellow) !important;
}
.icon-box.locked,
.icon-box.flash-win,
.side.round-win .icon-box,
.icon-box.flash-lose,
.side.round-lose .icon-box,
.icon-box.flash-draw,
.side.round-draw .icon-box {
  outline: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.icon-box.fight-clash {
  box-shadow: none !important;
}
@media (max-width: 860px) {
  .icon-box {
    max-width: none !important;
    font-size: clamp(3.8rem, 12cqh, 7.4rem) !important;
  }
}
/* --- v1.0.4.11: complete ready slide-out before hiding + self/opponent name colors --- */
.label,
.player-hud .label {
  color: #fff !important;
}
.side.my-side .label {
  color: var(--yellow) !important;
}
.status-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 92%;
  color: var(--yellow) !important;
  font-size: .22em;
  font-weight: 1000;
  line-height: 1.05;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
}
.status-rock-wrap {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.status-rock {
  width: 1.08em !important;
  height: 1.08em !important;
  object-fit: contain;
}
#player1Icon .status-rock {
  transform: scaleY(-1) rotate(90deg);
}
#player2Icon .status-rock {
  transform: rotate(-90deg);
}
.status-slide-in-left {
  animation: readySlideInLeft .42s cubic-bezier(.2,.8,.2,1);
}
.status-slide-in-right {
  animation: readySlideInRight .42s cubic-bezier(.2,.8,.2,1);
}
.status-slide-out-left {
  animation: readySlideOutLeft .38s cubic-bezier(.4,0,1,1) forwards;
}
.status-slide-out-right {
  animation: readySlideOutRight .38s cubic-bezier(.4,0,1,1) forwards;
}
@keyframes readySlideOutLeft {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-120%) scale(.9);
    opacity: 0;
  }
}
@keyframes readySlideOutRight {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(120%) scale(.9);
    opacity: 0;
  }
}
/* --- v1.0.4.12: player 2 name pointed corner match health bar --- */
.player-side-2 .player-hud .label {
  clip-path: polygon(.98rem 0, 100% 0, 100% 100%, 0 100%) !important;
}
@media (max-width: 860px) {
  .player-side-2 .player-hud .label {
    clip-path: polygon(.72rem 0, 100% 0, 100% 100%, 0 100%) !important;
  }
}
/* --- v1.0.4.13: visible fix for Player 2 name top-left point --- */
.side.player-side-2 .player-hud .label,
.player-side-2 .player-hud .label,
.player-side-2 .label {
  clip-path: polygon(0 0, 100% 0, 100% 100%, .98rem 100%) !important;
}
@media (max-width: 860px) {
  .side.player-side-2 .player-hud .label,
  .player-side-2 .player-hud .label,
  .player-side-2 .label {
    clip-path: polygon(0 0, 100% 0, 100% 100%, .72rem 100%) !important;
  }
}
@media (max-width: 520px) {
  .side.player-side-2 .player-hud .label,
  .player-side-2 .player-hud .label,
  .player-side-2 .label {
    clip-path: polygon(0 0, 100% 0, 100% 100%, .48rem 100%) !important;
  }
}
/* --- v1.0.4.14: choice-change mode + health color thresholds --- */
.choice.chosen {
  position: relative;
  border-color: var(--green) !important;
  outline: .22rem solid rgba(77, 255, 145, .85);
  box-shadow: var(--shadow-btn),
    0 0 1.15rem rgba(77, 255, 145, .55) !important;
  filter: brightness(1.16) saturate(1.12);
}
.choice.chosen::after {
  content: "CHOSEN";
  position: absolute;
  top: -.55rem;
  right: -.42rem;
  z-index: 2;
  padding: .22rem .4rem .26rem;
  border: .16rem solid var(--edge);
  border-radius: 999px;
  color: #06130a;
  background: linear-gradient(180deg, #b7ff70, var(--green), #0aa85a);
  font-size: clamp(.46rem, 1.1cqh, .62rem);
  line-height: 1;
  letter-spacing: .08em;
  text-shadow: 1px 1px 0 rgba(255,255,255,.35);
  box-shadow: 0 .18rem 0 rgba(0,0,0,.42), 0 0 .75rem rgba(77,255,145,.45);
  animation: badgePop .22s ease;
}
.health-fill:not(.low):not(.critical) {
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 38%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.09) 0 .65rem, transparent .65rem 1rem),
    linear-gradient(90deg, #b7ff70 0%, var(--green) 54%, #0aa85a 100%) !important;
  box-shadow: inset 0 .12rem 0 rgba(255,255,255,.38),
    inset 0 -.12rem 0 rgba(0,0,0,.18),
    0 0 .7rem rgba(77,255,145,.3) !important;
}
.health-fill.low:not(.critical) {
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 38%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 .65rem, transparent .65rem 1rem),
    linear-gradient(90deg, #fff09a 0%, var(--yellow) 38%, var(--orange) 100%) !important;
  box-shadow: inset 0 .12rem 0 rgba(255,255,255,.3),
    inset 0 -.12rem 0 rgba(0,0,0,.22),
    0 0 .8rem rgba(255,148,61,.4) !important;
}
.health-fill.critical {
  background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,0) 38%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 .65rem, transparent .65rem 1rem),
    linear-gradient(90deg, #ff9aac 0%, var(--red) 58%, #a60c32 100%) !important;
  box-shadow: inset 0 .12rem 0 rgba(255,255,255,.28),
    inset 0 -.12rem 0 rgba(0,0,0,.22),
    0 0 .9rem rgba(255,75,104,.5) !important;
}
/* --- v1.0.4.15: hidden choice rock uses same P1/P2 rotation as ready-state rock --- */
.choice-rock-wrap {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.choice-rock {
  width: 1.08em !important;
  height: 1.08em !important;
  object-fit: contain;
}
#player1Icon .choice-rock {
  transform: scaleY(-1) rotate(90deg) !important;
}
#player2Icon .choice-rock {
  transform: rotate(-90deg) !important;
}
/* --- v1.0.4.16: centered room name, status pill removed, mobile Room Name label preserved --- */
.room-name-stat {
  flex: 0 1 auto;
  justify-self: center;
}
@media (max-width: 420px) {
  .room-name-stat span {
    display: inline !important;
  }
}
/* --- v1.0.4.17: 2x bigger mobile logo --- */
@media (max-width: 860px) {
  .game-logo {
    width: min(92cqw, 38rem) !important;
    max-height: 22cqh !important;
  }
}
/* --- v1.0.4.19-icon-only-choice-uniform-menu: icon-only choices + uniform menu button spacing --- */
.choice-dock {
  gap: clamp(.45rem, 1.15cqh, .85rem) !important;
}
.choice-dock .choice {
  min-width: 0;
  display: grid !important;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0 !important;
  padding: clamp(.38rem, 1cqh, .72rem) !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
.choice-dock .choice .choice-icon {
  width: clamp(2.25rem, 6.6cqh, 4.8rem) !important;
  height: clamp(2.25rem, 6.6cqh, 4.8rem) !important;
}
.top-left-toggles {
  --menu-button-size: clamp(2.75rem, 4.2vw, 3.5rem);
  --menu-button-gap: clamp(.5rem, 1vw, .65rem);
  top: max(var(--menu-button-gap), env(safe-area-inset-top)) !important;
  left: var(--menu-button-gap) !important;
  gap: var(--menu-button-gap) !important;
}
.icon-toggle,
.chat-toggle,
.mic-toggle {
  width: var(--menu-button-size, clamp(2.75rem, 4.2vw, 3.5rem)) !important;
  height: var(--menu-button-size, clamp(2.75rem, 4.2vw, 3.5rem)) !important;
  border-radius: clamp(.82rem, 1.3vw, 1rem) !important;
  padding: 0 0 .18rem !important;
}
.chat-toggle,
.mic-toggle {
  --menu-button-size: clamp(2.75rem, 4.2vw, 3.5rem);
  --menu-button-gap: clamp(.5rem, 1vw, .65rem);
  right: var(--menu-button-gap) !important;
}
@media (max-width: 860px) {
  .choice-dock {
    gap: clamp(.38rem, 1.8vw, .62rem) !important;
  }
  .choice-dock .choice {
    height: clamp(3.15rem, 8.2cqh, 4.65rem) !important;
    padding: clamp(.28rem, 1.3vw, .52rem) !important;
  }
  .choice-dock .choice .choice-icon {
    width: clamp(2rem, 5.5cqh, 3.15rem) !important;
    height: clamp(2rem, 5.5cqh, 3.15rem) !important;
  }
  .top-left-toggles {
    --menu-button-size: clamp(2.6rem, 11vw, 3.15rem);
    --menu-button-gap: clamp(.42rem, 1.8vw, .58rem);
  }
  .chat-toggle,
  .mic-toggle {
    --menu-button-size: clamp(2.6rem, 11vw, 3.15rem);
    --menu-button-gap: clamp(.42rem, 1.8vw, .58rem);
  }
}
/* --- v1.0.4.23: from v1.0.4.20 base, effective arena top padding for absolute HUD --- */
.arena {
  --arena-extra-top-padding: 20px;
  padding-top: calc(clamp(5.25rem, 11.5cqh, 6.7rem) + var(--arena-extra-top-padding)) !important;
}
.player-hud {
  top: calc(clamp(.72rem, 1.55cqh, 1rem) + var(--arena-extra-top-padding)) !important;
}
.battle-round-hud,
.battle-round-hud.vs-hud {
  top: calc(clamp(.55rem, 1.35cqh, 1rem) + var(--arena-extra-top-padding)) !important;
}
@media (max-width: 860px) {
  .arena {
    --arena-extra-top-padding: 20px;
    padding-top: calc(clamp(4.55rem, 10.2cqh, 5.7rem) + var(--arena-extra-top-padding)) !important;
  }
  .player-hud {
    top: calc(clamp(.5rem, 1.15cqh, .78rem) + var(--arena-extra-top-padding)) !important;
  }
  .battle-round-hud,
  .battle-round-hud.vs-hud {
    top: calc(clamp(.42rem, 1.1cqh, .8rem) + var(--arena-extra-top-padding)) !important;
  }
}
/* --- v1.0.4.26: online-ago text for players list --- */
.online-players-panel .player-list-info {
  display: grid;
  align-items: center;
  gap: .18rem;
}
.online-players-panel .player-list-info strong {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.online-players-panel .player-list-info small {
  display: block;
  padding-left: 1rem;
  line-height: 1.25;
}
@media (max-width: 860px) {
  .online-players-panel .player-list-info {
    gap: .12rem;
  }
  .online-players-panel .player-list-info small {
    padding-left: .9rem;
    font-size: .64rem;
  }
}
/* --- v1.0.4.27: simplify players list online-ago text --- */
.online-players-panel .player-list-info small {
  color: var(--muted);
}
/* --- v1.0.4.28: leaderboard streak colors --- */
#leaderboardPanel .leaderboard-streak-text.win-streak {
  color: var(--green) !important;
}
#leaderboardPanel .leaderboard-streak-text.lose-streak {
  color: var(--red) !important;
}
#leaderboardPanel .leaderboard-streak-text.no-streak {
  color: var(--muted) !important;
}
/* --- v1.0.4.30: opponent slot waiting text --- */
.status-text.waiting-opponent {
  max-width: 92%;
  font-size: .18em;
  line-height: 1.08;
  color: var(--cyan);
}
@media (max-width: 860px) {
  .status-text.waiting-opponent {
    font-size: .16em;
  }
}
/* --- v1.0.4.33: find match button --- */
.find-match-btn {
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
}
.room-controls .find-match-btn {
  width: 100%;
}
/* --- v1.0.4.35: result overlay rank layout cleanup --- */
.result-actions {
  grid-template-columns: 1fr !important;
  width: min(40rem, 100%) !important;
}
.result-actions .yellow-btn,
.result-actions button {
  width: 100%;
}
.result-overlay.final-mode .result-card {
  justify-content: center;
}
.result-overlay.final-mode .result-details {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible;
}
.final-result-message {
  width: min(34rem, 100%);
  color: #f2efff;
  font-size: clamp(.95rem, 2.15cqh, 1.25rem);
  line-height: 1.3;
  text-align: center;
}
.result-overlay.final-mode .final-rounds,
.result-overlay.final-mode .final-round-row,
.result-overlay.final-mode .final-score-summary {
  display: none !important;
}
.my-rank-summary {
  width: min(34rem, 100%);
  display: grid;
  justify-items: center;
  align-items: center;
  gap: clamp(.35rem, 1.05cqh, .75rem);
  margin: 0 auto;
  padding: clamp(1rem, 2.6cqh, 1.65rem);
  border: .22rem solid var(--edge);
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04)), #0b0d1f;
  box-shadow: inset 0 .25rem 0 rgba(255,255,255,.08), 0 .5rem 0 rgba(0,0,0,.36);
  text-align: center;
}
.my-rank-label {
  color: var(--cyan);
  font-size: clamp(1rem, 2.4cqh, 1.35rem);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.my-rank-streak {
  display: block;
  font-size: clamp(.9rem, 2.05cqh, 1.2rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.my-rank-horizontal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.75rem, 2.5cqw, 1.4rem);
  flex-wrap: wrap;
  margin-top: .25rem;
}
.my-rank-name {
  display: block;
  color: var(--yellow);
  font-size: clamp(2rem, 6.5cqw, 4.7rem);
  line-height: .92;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-shadow: .22rem .22rem 0 #000, 0 0 1rem rgba(255,212,90,.28);
}
.my-rank-stars,
.my-rank-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  padding: .35rem .7rem .42rem;
  border: .18rem solid var(--edge);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: clamp(1.05rem, 2.8cqh, 1.6rem);
  line-height: 1;
  white-space: nowrap;
}
.my-rank-delta {
  color: inherit;
}
@media (max-width: 860px) {
  .result-overlay.final-mode .result-details {
    overflow: auto;
  }
  .my-rank-horizontal {
    gap: .55rem;
  }
  .my-rank-name {
    width: 100%;
    font-size: clamp(2rem, 12vw, 3.8rem);
  }
}
/* --- v1.0.4.36-responsive-result-rank: responsive final result/rank layout --- */
.result-card {
  container-type: inline-size;
}
.result-overlay.final-mode .result-card {
  width: min(46rem, 94vw);
  max-height: min(92dvh, 46rem);
  padding: clamp(.85rem, 4cqw, 2.1rem);
  overflow: hidden;
}
.result-overlay.final-mode .result-title {
  font-size: clamp(2.4rem, 15cqw, 6.2rem);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.result-overlay.final-mode .result-details {
  width: 100%;
  max-width: 100%;
  gap: clamp(.65rem, 2.5cqw, 1.25rem);
  margin: clamp(.55rem, 2cqw, 1.05rem) auto;
}
.result-overlay.final-mode .final-result-message {
  width: 100%;
  font-size: clamp(.82rem, 3.1cqw, 1.16rem);
}
.result-overlay.final-mode .my-rank-summary {
  width: min(100%, 34rem);
  max-width: 100%;
  padding: clamp(.85rem, 3.2cqw, 1.55rem);
  gap: clamp(.3rem, 1.5cqw, .7rem);
  overflow: hidden;
}
.result-overlay.final-mode .my-rank-label {
  font-size: clamp(.85rem, 3.4cqw, 1.25rem);
}
.result-overlay.final-mode .my-rank-streak {
  font-size: clamp(.72rem, 2.8cqw, 1.08rem);
}
.result-overlay.final-mode .my-rank-horizontal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  justify-content: center;
  column-gap: clamp(.45rem, 2cqw, .95rem);
  row-gap: clamp(.4rem, 1.5cqw, .65rem);
  width: 100%;
}
.result-overlay.final-mode .my-rank-name {
  min-width: 0;
  max-width: 100%;
  font-size: clamp(1.85rem, 8cqw, 3.75rem);
  line-height: .92;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.result-overlay.final-mode .my-rank-summary.rank-name-long .my-rank-name {
  font-size: clamp(1.55rem, 6.6cqw, 3.15rem);
  letter-spacing: .025em;
}
.result-overlay.final-mode .my-rank-summary.rank-name-xl .my-rank-name {
  font-size: clamp(1.32rem, 5.45cqw, 2.55rem);
  letter-spacing: .018em;
}
.result-overlay.final-mode .my-rank-summary.rank-name-xxl .my-rank-name {
  font-size: clamp(1.12rem, 4.75cqw, 2.15rem);
  letter-spacing: .01em;
}
.result-overlay.final-mode .my-rank-stars,
.result-overlay.final-mode .my-rank-delta {
  font-size: clamp(.88rem, 3.4cqw, 1.45rem);
}
.result-overlay.final-mode .result-actions {
  width: 100% !important;
  max-width: 34rem;
}
@media (max-width: 560px), (max-height: 620px) {
  .result-overlay.final-mode .result-card {
    width: min(94vw, 34rem);
    max-height: 94dvh;
    padding: .8rem;
  }
  .result-overlay.final-mode .result-title {
    font-size: clamp(2rem, 13cqw, 4.2rem);
  }
  .result-overlay.final-mode .my-rank-horizontal {
    grid-template-columns: 1fr;
  }
  .result-overlay.final-mode .my-rank-name {
    width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: clamp(1.9rem, 11.5cqw, 3.4rem);
  }
  .result-overlay.final-mode .my-rank-summary.rank-name-long .my-rank-name {
    font-size: clamp(1.55rem, 9.2cqw, 2.85rem);
  }
  .result-overlay.final-mode .my-rank-summary.rank-name-xl .my-rank-name,
  .result-overlay.final-mode .my-rank-summary.rank-name-xxl .my-rank-name {
    font-size: clamp(1.25rem, 7.8cqw, 2.3rem);
  }
}
/* --- v1.0.4.39: desktop-only stacked rank order; mobile keeps previous layout --- */
@media (min-width: 861px) {
  .result-overlay.final-mode .my-rank-horizontal {
    grid-template-columns: auto auto !important;
    justify-content: center !important;
    justify-items: center !important;
    align-items: center !important;
    column-gap: clamp(.55rem, 2.2cqw, 1rem) !important;
    row-gap: clamp(.45rem, 1.6cqw, .75rem) !important;
  }
  .result-overlay.final-mode .my-rank-name {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  .result-overlay.final-mode .my-rank-stars,
  .result-overlay.final-mode .my-rank-delta {
    justify-self: center !important;
  }
}
/* --- v1.0.4.41: mobile full-width result card background --- */
@media (max-width: 860px) {
  .result-overlay.final-mode {
    padding: 0 !important;
    align-items: stretch !important;
    justify-items: stretch !important;
  }
  .result-overlay.final-mode .result-card {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
  }
}
/* --- v1.0.4.42: mobile result stars no background --- */
@media (max-width: 860px) {
  .result-overlay.final-mode .my-rank-stars,
  .result-overlay.final-mode .my-rank-delta {
    width: auto !important;
    min-width: 0 !important;
    justify-self: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}
/* --- v1.0.4.43: result stars no background on all screen sizes --- */
.result-overlay.final-mode .my-rank-stars,
.result-overlay.final-mode .my-rank-delta {
  width: auto !important;
  min-width: 0 !important;
  justify-self: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* --- v1.0.4.44: reconnect countdown below player name --- */
.reconnect-timer {
  display: none;
  width: fit-content;
  max-width: 100%;
  padding: .16rem .52rem .2rem;
  border: .14rem solid #0a0a12;
  border-radius: .55rem;
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
  font-size: clamp(.48rem, 1.25cqh, .7rem);
  font-style: italic;
  font-weight: 1000;
  line-height: 1.05;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 rgba(255,255,255,.35);
  box-shadow: inset 0 .08rem 0 rgba(255,255,255,.18), 0 .14rem .45rem rgba(0,0,0,.38);
  pointer-events: none;
}
.reconnect-timer.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: reconnectPulse .75s ease-in-out infinite alternate;
}
.reconnect-timer.critical {
  color: #fff;
  background: linear-gradient(180deg, #ff9aac, var(--red), #a60c32);
  text-shadow: 2px 2px 0 #000;
}
.player-side-1 .reconnect-timer {
  justify-self: start;
  clip-path: polygon(0 0, 100% 0, calc(100% - .72rem) 100%, 0 100%);
}
.player-side-2 .reconnect-timer {
  justify-self: end;
  clip-path: polygon(.72rem 0, 100% 0, 100% 100%, 0 100%);
}
@media (max-width: 860px) {
  .reconnect-timer {
    padding: .12rem .42rem .16rem;
    font-size: clamp(.42rem, 1.15cqh, .58rem);
  }
}
@keyframes reconnectPulse {
  from {
    filter: brightness(1);
    transform: translateY(0);
  }
  to {
    filter: brightness(1.25);
    transform: translateY(-.08rem);
  }
}
/* --- v1.0.4.46: full game pause reconnect overlay --- */
.countdown-banner.game-paused {
  z-index: 50;
  background: rgba(4, 4, 12, .9);
  backdrop-filter: blur(6px);
}
.countdown-banner.game-paused .countdown-number {
  color: var(--cyan);
  line-height: .95;
  text-shadow: .35rem .35rem 0 #000, .65rem .65rem 0 rgba(255,79,184,.34), 0 0 1.8rem rgba(77,231,255,.45);
}
.countdown-banner.game-paused .countdown-text {
  color: var(--yellow);
  background: linear-gradient(180deg, #3a2649, #141228);
  border-color: var(--yellow);
}
/* --- sound toggle visibility fix --- */
.sound-toggle {
  display: grid !important;
  visibility: visible !important;
  opacity: 1;
}
.top-left-toggles.dimmed .sound-toggle {
  opacity: .42;
}
/* --- VS Computer mode --- */
.computer-btn {
  color: #1b1005;
}
.app-card.game-mode .computer-btn {
  display: none;
}
/* --- v1.0.4.62: move sound toggle to top-right --- */
.top-left-toggles .sound-toggle {
  right: .75rem !important;
  left: auto !important;
}
/* Keep chat/mic below the always-visible sound toggle. */
@media (max-width: 860px) {
  .top-left-toggles .sound-toggle {
    right: .45rem !important;
  }
}
/* --- v1.0.4.65: centered mobile loading + clean continue text --- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  min-height: 100dvh;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  color: var(--text);
  background: radial-gradient(circle at 18% 14%, rgba(255,79,184,.28), transparent 24%),
    radial-gradient(circle at 84% 10%, rgba(77,231,255,.23), transparent 25%),
    radial-gradient(circle at 50% 98%, rgba(255,212,90,.18), transparent 30%),
    linear-gradient(135deg, #070610, #151237 45%, #080612);
  overflow: hidden;
  transition: opacity .35s ease, visibility .35s ease, transform .35s ease;
}
.loading-screen::before,
.loading-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.loading-screen::before {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 2px, transparent 2px 9px);
  mix-blend-mode: screen;
}
.loading-screen::after {
  background: radial-gradient(circle at center, transparent 28%, rgba(0,0,0,.58));
}
.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}
.loading-card {
  position: relative;
  z-index: 1;
  width: min(32rem, calc(100vw - 2.5rem));
  max-height: calc(100dvh - 2.5rem);
  display: grid;
  justify-items: center;
  gap: .85rem;
  padding: clamp(1.1rem, 4vw, 2rem);
  border: .32rem solid var(--edge);
  border-radius: clamp(1.2rem, 4vw, 2.1rem);
  background: linear-gradient(180deg, rgba(255,255,255,.09), transparent 18%), linear-gradient(145deg, var(--cabinet-light), var(--cabinet-mid) 42%, var(--cabinet-dark));
  box-shadow: var(--shadow-hard), inset 0 .45rem 0 rgba(255,255,255,.14), inset 0 -.7rem 0 rgba(0,0,0,.28);
  text-align: center;
  margin: auto;
  overflow: auto;
}
.loading-logo-ring {
  position: relative;
  width: min(24rem, 78vw);
  aspect-ratio: 2.8 / 1;
  display: grid;
  place-items: center;
  border-radius: 1.4rem;
  background: radial-gradient(circle at 50% 35%, rgba(255,212,90,.16), transparent 62%),
    linear-gradient(180deg, rgba(77,231,255,.18), rgba(255,255,255,.02));
  box-shadow: inset 0 .22rem 0 rgba(255,255,255,.08),
    inset 0 -.3rem 0 rgba(0,0,0,.18),
    0 0 1.2rem rgba(77,231,255,.18);
}
.loading-logo-ring::before,
.loading-logo-ring::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}
.loading-logo {
  position: relative;
  z-index: 1;
  width: min(21rem, 72vw);
  max-height: 7.5rem;
  object-fit: contain;
  filter: drop-shadow(.26rem .26rem 0 #000) drop-shadow(0 0 1.2rem rgba(255,212,90,.35));
  animation: loadingLogoPulse .75s ease-in-out infinite alternate;
}
.loading-title {
  color: var(--yellow);
  font-size: clamp(.9rem, 3.4vw, 1.35rem);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .18em;
  text-shadow: .16rem .16rem 0 #000, 0 0 .9rem rgba(255,212,90,.28);
}
.loading-percent {
  min-width: 5rem;
  padding: .28rem .7rem .34rem;
  border: .18rem solid var(--edge);
  border-radius: 999px;
  color: var(--cyan);
  background: linear-gradient(180deg, #24204d, #101026);
  font-size: clamp(1.05rem, 4vw, 1.6rem);
  font-weight: 1000;
  line-height: 1;
  text-shadow: .14rem .14rem 0 #000;
  box-shadow: inset 0 .16rem 0 rgba(255,255,255,.09), 0 .24rem 0 rgba(0,0,0,.34);
}
.loading-bar {
  width: min(21rem, 72vw);
  height: .9rem;
  overflow: hidden;
  border: .18rem solid var(--edge);
  border-radius: 999px;
  background: #090b1c;
  box-shadow: inset 0 .2rem .25rem rgba(0,0,0,.55), 0 .22rem 0 rgba(0,0,0,.35);
}
.loading-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--yellow), var(--orange));
  box-shadow: 0 0 .8rem rgba(255,212,90,.45);
  transition: width .16s ease-out;
  animation: none !important;
}
.loading-dots {
  display: flex;
  gap: .5rem;
  min-height: 1rem;
}
.loading-dots span {
  width: .62rem;
  height: .62rem;
  border: .13rem solid var(--edge);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 .7rem rgba(77,231,255,.7);
  animation: loadingDot .72s ease-in-out infinite alternate;
}
.loading-dots span:nth-child(2) {
  animation-delay: .12s;
  background: var(--yellow);
  box-shadow: 0 0 .7rem rgba(255,212,90,.7);
}
.loading-dots span:nth-child(3) {
  animation-delay: .24s;
  background: var(--red);
  box-shadow: 0 0 .7rem rgba(255,75,104,.7);
}
.loading-continue {
  display: none;
  min-width: min(19rem, 72vw);
  padding: .8em 1em 1em;
  color: #06130a;
  font-weight: 1000;
  text-shadow: none !important;
  background: linear-gradient(180deg, #b7ff70, var(--green) 50%, #0aa85a);
  animation: loadingContinuePulse .8s ease-in-out infinite alternate;
}
.loading-screen.ready .loading-continue {
  display: block;
}
.loading-screen.ready .loading-dots span {
  animation: none;
  transform: none;
  opacity: 1;
  background: var(--green);
  box-shadow: 0 0 .75rem rgba(77,255,145,.7);
}
@keyframes loadingLogoPulse {
  from {
    transform: translateY(0) scale(1);
    filter: drop-shadow(.26rem .26rem 0 #000) drop-shadow(0 0 .7rem rgba(255,212,90,.25));
  }
  to {
    transform: translateY(-.18rem) scale(1.025);
    filter: drop-shadow(.26rem .26rem 0 #000) drop-shadow(0 0 1.35rem rgba(255,212,90,.5));
  }
}
@keyframes loadingDot {
  from {
    transform: translateY(0) scale(.82);
    opacity: .6;
  }
  to {
    transform: translateY(-.35rem) scale(1.08);
    opacity: 1;
  }
}
@keyframes loadingContinuePulse {
  from {
    filter: brightness(1);
    transform: translateY(0);
  }
  to {
    filter: brightness(1.16);
    transform: translateY(-.14rem);
  }
}
@media (max-width: 860px) {
  .loading-screen {
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }
  .loading-card {
    width: min(28rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: auto;
  }
  .loading-logo-ring {
    width: min(20rem, 78vw);
  }
  .loading-logo {
    width: min(18rem, 72vw);
  }
}
/* --- v1.0.4.66: matchmaking + exit confirmation overlays --- */
.matchmaking-overlay,
.exit-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: none;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(4, 4, 12, .82);
  backdrop-filter: blur(6px);
}
.matchmaking-overlay.show,
.exit-confirm-overlay.show {
  display: grid;
  animation: overlayFlash .18s ease;
}
.matchmaking-card,
.exit-confirm-card {
  width: min(27rem, 94vw);
  display: grid;
  gap: .85rem;
  justify-items: center;
  padding: clamp(1.1rem, 3.2vw, 1.85rem);
  border: .32rem solid var(--edge);
  border-radius: clamp(1rem, 3vw, 1.55rem);
  background: linear-gradient(180deg, rgba(255,255,255,.1), transparent 18%),
    linear-gradient(180deg, #34296f, #191533);
  box-shadow: var(--shadow-hard), inset 0 .38rem 0 rgba(255,255,255,.12), inset 0 -.5rem 0 rgba(0,0,0,.24);
  text-align: center;
}
.matchmaking-spinner {
  width: clamp(4rem, 18vw, 6.6rem);
  aspect-ratio: 1;
  border: .45rem solid rgba(255,255,255,.12);
  border-top-color: var(--yellow);
  border-right-color: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 1.4rem rgba(77,231,255,.2), inset 0 0 1.1rem rgba(255,212,90,.12);
  animation: matchSpin .85s linear infinite;
}
.matchmaking-card h2,
.exit-confirm-card h2 {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(1.9rem, 8vw, 3.6rem);
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-shadow: .22rem .22rem 0 #000;
}
.matchmaking-card p,
.exit-confirm-card p {
  margin: 0;
  color: #f2efff;
  font-weight: 1000;
  line-height: 1.35;
  text-shadow: 2px 2px 0 #000;
}
.matchmaking-card button {
  width: min(100%, 15rem);
}
.exit-confirm-overlay.danger-mode .exit-confirm-card h2 {
  color: var(--red);
}
.exit-confirm-actions {
  width: min(100%, 22rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}
@media (max-width: 520px) {
  .matchmaking-overlay,
  .exit-confirm-overlay {
    align-items: center;
    justify-items: center;
    padding: 1rem;
  }
  .matchmaking-card,
  .exit-confirm-card {
    width: min(92vw, 24rem);
  }
  .exit-confirm-actions {
    grid-template-columns: 1fr;
  }
}
@keyframes matchSpin {
  to {
    transform: rotate(360deg);
  }
}
/* --- v1.0.4.68: equal top-right menu button spacing --- */
:root {
  --right-menu-size: clamp(2.75rem, 4.2vw, 3.5rem);
  --right-menu-gap: clamp(.5rem, 1vw, .65rem);
  --right-menu-right: .75rem;
  --right-menu-top: max(var(--right-menu-gap), env(safe-area-inset-top));
}
.top-left-toggles .sound-toggle,
.chat-toggle,
.mic-toggle {
  width: var(--right-menu-size) !important;
  height: var(--right-menu-size) !important;
  right: var(--right-menu-right) !important;
  left: auto !important;
  border-radius: clamp(.82rem, 1.3vw, 1rem) !important;
  padding: 0 0 .18rem !important;
}
.top-left-toggles .sound-toggle {
  position: fixed !important;
  top: var(--right-menu-top) !important;
  z-index: 74 !important;
  display: grid !important;
}
.chat-toggle {
  top: calc(var(--right-menu-top) + var(--right-menu-size) + var(--right-menu-gap)) !important;
}
.mic-toggle {
  top: calc(var(--right-menu-top) + (var(--right-menu-size) * 2) + (var(--right-menu-gap) * 2)) !important;
}
@media (max-width: 860px) {
  :root {
    --right-menu-size: clamp(2.6rem, 11vw, 3.15rem);
    --right-menu-gap: clamp(.42rem, 1.8vw, .58rem);
    --right-menu-right: .45rem;
  }
}
/* --- v1.0.4.63: spectator room actions --- */
.room-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .42rem;
  flex-wrap: wrap;
}
.room-card-actions button {
  min-width: 4.4rem;
}
.spectate-btn {
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
  text-shadow: 1px 1px 0 rgba(255,255,255,.35);
}
@media (max-width: 520px) {
  .room-card {
    grid-template-columns: 1fr;
  }
  .room-card-actions {
    justify-content: stretch;
  }
  .room-card-actions button {
    flex: 1 1 0;
  }
}
/* --- v1.0.4.65: spectator list button + compact slide panel --- */
.spectator-toggle {
  position: fixed;
  right: var(--right-menu-right, .75rem);
  z-index: 71;
  display: none;
  place-items: center;
  width: var(--right-menu-size, clamp(2.75rem, 4.2vw, 3.5rem));
  height: var(--right-menu-size, clamp(2.75rem, 4.2vw, 3.5rem));
  padding: 0 0 .18rem;
  border-radius: clamp(.82rem, 1.3vw, 1rem);
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
  text-shadow: none;
  top: calc(var(--right-menu-top, max(.5rem, env(safe-area-inset-top))) + (var(--right-menu-size, 3.5rem) * 3) + (var(--right-menu-gap, .65rem) * 3));
}
.spectator-toggle.in-room {
  display: grid;
}
.spectator-toggle.has-spectators {
  animation: notifyWiggle .7s ease;
}
.spectator-badge {
  position: absolute;
  top: -.45rem;
  right: -.45rem;
  min-width: 1.45rem;
  height: 1.45rem;
  display: none;
  place-items: center;
  padding: 0 .4rem .1rem;
  border: .18rem solid var(--edge);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff9aac, var(--red), #a60c32);
  font-size: .68rem;
  line-height: 1;
  font-weight: 1000;
  pointer-events: none;
}
.spectator-badge.show {
  display: grid;
  animation: badgePop .28s ease;
}
.spectator-panel {
  position: fixed;
  right: .8rem;
  top: calc(var(--right-menu-top, max(.5rem, env(safe-area-inset-top))) + (var(--right-menu-size, 3.5rem) * 4) + (var(--right-menu-gap, .65rem) * 4));
  z-index: 65;
  width: min(19rem, calc(100vw - 1.6rem));
  max-height: min(22rem, 42dvh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: .55rem;
  padding: .8rem;
  border: clamp(.22rem, .6cqh, .42rem) solid var(--edge);
  border-radius: clamp(.85rem, 2.2cqh, 1.4rem);
  background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 16%), linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: inset 0 .42rem 0 rgba(255,255,255,.1), inset 0 -.65rem 0 rgba(0,0,0,.26), 0 .75rem 0 rgba(0,0,0,.34), 0 1.5rem 3rem rgba(0,0,0,.32);
  transform: translateX(calc(100% + 1.5rem));
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.spectator-panel.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.spectator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.spectator-header h2 {
  margin: 0;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: clamp(.72rem, 1.65cqh, 1rem);
  text-shadow: 3px 3px 0 #000;
}
.spectator-close {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0 0 .15rem;
  border-radius: .8rem;
}
.spectator-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: .45rem;
}
.spectator-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  padding: .55rem;
  border: .18rem solid var(--edge);
  border-radius: .9rem;
  background: linear-gradient(180deg, #20204b, #13142e);
  box-shadow: inset 0 .18rem 0 rgba(255,255,255,.07), 0 .25rem 0 rgba(0,0,0,.28);
  text-align: left;
}
.spectator-row.me {
  background: linear-gradient(180deg, #173c4f, #101b33);
}
.spectator-info {
  min-width: 0;
}
.spectator-info strong {
  display: block;
  color: var(--yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 2px 2px 0 #000;
}
.spectator-info small {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  text-shadow: 1px 1px 0 #000;
}
.spectator-empty {
  display: grid;
  min-height: 3.2rem;
  place-items: center;
  padding: .75rem;
  border: .18rem dashed var(--edge);
  border-radius: .9rem;
  color: var(--muted);
  background: #141432;
  font-weight: 1000;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
}
.chat-role {
  display: inline-grid;
  place-items: center;
  margin-left: .35rem;
  padding: .12rem .35rem .16rem;
  border: .12rem solid var(--edge);
  border-radius: 999px;
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
  font-size: .62rem;
  line-height: 1;
  text-shadow: none;
  vertical-align: middle;
}
.chat-message.spectator-chat {
  border-color: rgba(77,231,255,.55);
}
@media (max-width: 860px) {
  .spectator-toggle {
    right: var(--right-menu-right, .45rem);
  }
  .spectator-panel {
    right: .45rem;
    top: calc(var(--right-menu-top, max(.42rem, env(safe-area-inset-top))) + (var(--right-menu-size, 3.15rem) * 4) + (var(--right-menu-gap, .58rem) * 4));
    width: min(17.5rem, calc(100vw - .9rem));
    max-height: 36dvh;
  }
}
/* --- v1.0.4.67: lock room actions while already in-room --- */
.room-card.current-room {
  border-color: rgba(255, 212, 90, .85);
  box-shadow: inset 0 .18rem 0 rgba(255,255,255,.07), 0 .25rem 0 rgba(0,0,0,.28), 0 0 1rem rgba(255,212,90,.22);
}
.room-locked-action {
  color: #f8f0ff;
  background: linear-gradient(180deg, #6d6680, #3c3852 58%, #252237);
}
.room-card-actions button:disabled {
  opacity: .58;
}
/* --- v1.0.4.72: unified utility icon buttons, matching spectator eye style --- */
:root {
  --utility-icon-bg: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
  --utility-icon-color: #06111a;
  --utility-icon-danger-bg: linear-gradient(180deg, #ff9aac, var(--red), #a60c32);
  --utility-icon-active-bg: linear-gradient(180deg, #b7ff70, var(--green), #0aa85a);
}
.icon-toggle,
.chat-toggle,
.mic-toggle,
.spectator-toggle {
  color: var(--utility-icon-color) !important;
  background: var(--utility-icon-bg) !important;
  text-shadow: none !important;
  border-color: var(--edge) !important;
  box-shadow: inset 0 .22rem 0 rgba(255,255,255,.24),
    inset 0 -.28rem 0 rgba(0,0,0,.22),
    0 .28rem 0 rgba(0,0,0,.38),
    0 .65rem 1.15rem rgba(0,0,0,.26) !important;
}
.icon-toggle i,
.chat-toggle i,
.mic-toggle i,
.spectator-toggle i {
  font-size: 1.08em;
  filter: drop-shadow(0 .08rem 0 rgba(255,255,255,.28));
}
.icon-toggle:hover:not(:disabled),
.chat-toggle:hover:not(:disabled),
.mic-toggle:hover:not(:disabled),
.spectator-toggle:hover:not(:disabled) {
  filter: brightness(1.12) saturate(1.08) !important;
  transform: translateY(-.16rem) !important;
}
.icon-toggle:active:not(:disabled),
.chat-toggle:active:not(:disabled),
.mic-toggle:active:not(:disabled),
.spectator-toggle:active:not(:disabled) {
  transform: translateY(.2rem) !important;
  box-shadow: inset 0 .2rem 0 rgba(255,255,255,.18),
    inset 0 -.18rem 0 rgba(0,0,0,.26),
    0 .12rem 0 rgba(0,0,0,.48) !important;
}
.icon-toggle.logout-toggle,
.mic-toggle.muted,
.sound-toggle.muted {
  color: #fff !important;
  background: var(--utility-icon-danger-bg) !important;
}
.mic-toggle.listening,
.icon-toggle.online-toggle.active,
.spectator-toggle.has-spectators {
  color: #06130a !important;
  background: var(--utility-icon-active-bg) !important;
}
.top-left-toggles.dimmed .icon-toggle {
  opacity: .72 !important;
  filter: saturate(.85) !important;
}
/* --- v1.0.4.71: updated information modal + rank details --- */
.info-section {
  display: grid;
  gap: .75rem;
  margin-top: .85rem;
  padding: .85rem;
  border: .18rem solid var(--edge);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.12)), #141432;
  box-shadow: inset 0 .16rem 0 rgba(255,255,255,.07), 0 .28rem 0 rgba(0,0,0,.28);
}
.info-section:first-of-type {
  margin-top: 0;
}
.info-section h3 {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(.78rem, 1.8cqh, 1.05rem);
  line-height: 1.15;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}
.info-section .howto-list {
  margin: 0;
  padding-left: 1.25rem;
}
.info-section .howto-list li {
  margin-bottom: .35rem;
}
.info-section .howto-list li:last-child {
  margin-bottom: 0;
}
.rank-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}
.rank-rules span {
  display: block;
  padding: .55rem .65rem;
  border: .15rem solid rgba(7,7,19,.88);
  border-radius: .75rem;
  color: var(--muted);
  background: linear-gradient(180deg, #20204b, #101229);
  font-size: .82rem;
  font-weight: 1000;
  line-height: 1.25;
  text-shadow: 1px 1px 0 #000;
}
.rank-rules strong {
  color: var(--cyan);
}
.rank-table-wrap {
  overflow: auto;
  border: .18rem solid var(--edge);
  border-radius: .9rem;
  background: #090b1c;
}
.rank-info-table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  color: var(--text);
  font-weight: 1000;
  text-shadow: 1px 1px 0 #000;
}
.rank-info-table th,
.rank-info-table td {
  padding: .62rem .7rem;
  border-bottom: .12rem solid rgba(255,255,255,.08);
  text-align: left;
  white-space: nowrap;
}
.rank-info-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--yellow);
  background: linear-gradient(180deg, #2a2454, #12142e);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}
.rank-info-table td:first-child {
  color: var(--cyan);
}
.rank-info-table tr:last-child td {
  border-bottom: 0;
}
.rank-note {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 1000;
  line-height: 1.4;
  text-shadow: 1px 1px 0 #000;
}
@media (max-width: 860px) {
  .info-section {
    padding: .7rem;
  }
  .rank-rules {
    grid-template-columns: 1fr;
  }
  .rank-info-table {
    min-width: 24rem;
  }
  .rank-info-table th,
  .rank-info-table td {
    padding: .52rem .58rem;
  }
}
/* --- v1.0.4.77: settings modal for player name rename/remove --- */
.settings-section {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: .18rem solid var(--edge);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.12)), #141432;
  box-shadow: inset 0 .16rem 0 rgba(255,255,255,.07), 0 .28rem 0 rgba(0,0,0,.28);
}
.settings-section h3 {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(.78rem, 1.8cqh, 1.05rem);
  line-height: 1.15;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}
.settings-note,
.settings-current-name,
.settings-error {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 1000;
  line-height: 1.4;
  text-shadow: 1px 1px 0 #000;
}
.settings-current-name {
  display: block;
  padding: .62rem .72rem;
  border: .15rem solid rgba(7,7,19,.88);
  border-radius: .75rem;
  background: linear-gradient(180deg, #20204b, #101229);
}
.settings-current-name strong {
  color: var(--cyan);
}
.settings-error {
  min-height: 1.2rem;
  color: var(--yellow);
}
.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
.settings-actions button {
  min-height: 3.1rem;
}
@media (max-width: 560px) {
  .settings-actions {
    grid-template-columns: 1fr;
  }
}
/* --- v1.0.4.80: collapsible information sections --- */
.info-accordion {
  border: .2rem solid var(--edge);
  border-radius: 1rem;
  background: linear-gradient(180deg, #20204b, #13142e);
  box-shadow: inset 0 .2rem 0 rgba(255,255,255,.08), 0 .32rem 0 rgba(0,0,0,.32);
  overflow: hidden;
}
.info-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  color: var(--cyan);
  cursor: pointer;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .09em;
  text-shadow: 2px 2px 0 #000;
  list-style: none;
  user-select: none;
}
.info-accordion summary::-webkit-details-marker {
  display: none;
}
.info-accordion summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: .16rem solid var(--edge);
  border-radius: .55rem;
  color: #1b1005;
  background: linear-gradient(180deg, #fff09a, var(--yellow), var(--orange));
  text-shadow: 1px 1px 0 rgba(255,255,255,.35);
  box-shadow: inset 0 .12rem 0 rgba(255,255,255,.28), 0 .18rem 0 rgba(0,0,0,.38);
}
.info-accordion[open] summary::after {
  content: "−";
}
.info-accordion summary:hover {
  color: var(--yellow);
  background: rgba(255,255,255,.05);
}
.info-accordion .howto-list,
.info-accordion .rank-rules,
.info-accordion .rank-table-wrap,
.info-accordion .rank-note {
  margin-left: 1rem;
  margin-right: 1rem;
}
.info-accordion .howto-list {
  margin-top: .1rem;
  margin-bottom: 1rem;
}
.info-accordion .rank-rules {
  margin-top: .1rem;
}
.info-accordion .rank-note {
  margin-bottom: 1rem;
}
.info-accordion strong {
  color: var(--yellow);
}
@media (max-width: 860px) {
  .info-accordion summary {
    min-height: 2.7rem;
    padding: .65rem .75rem;
    font-size: .82rem;
  }
  .info-accordion .howto-list,
  .info-accordion .rank-rules,
  .info-accordion .rank-table-wrap,
  .info-accordion .rank-note {
    margin-left: .75rem;
    margin-right: .75rem;
  }
}
/* --- v1.0.4.81: spacing polish for information accordions --- */
.info-accordion {
  display: block;
  gap: 0;
  margin: 0 0 .85rem;
  padding: 0;
}
.info-accordion:last-child {
  margin-bottom: 0;
}
.info-accordion summary {
  min-height: 3.1rem;
  padding: .8rem 1rem;
  margin: 0;
}
.info-accordion[open] summary {
  border-bottom: .14rem solid rgba(255,255,255,.07);
}
.info-accordion .info-accordion-body {
  display: grid;
  gap: .85rem;
  padding: .9rem 1rem 1rem;
}
.info-accordion .howto-list,
.info-accordion .rank-rules,
.info-accordion .rank-table-wrap,
.info-accordion .rank-note {
  margin: 0;
}
.info-accordion .howto-list {
  padding-left: 1.2rem;
}
.info-accordion .howto-list li {
  margin-bottom: .45rem;
}
.info-accordion .howto-list li:last-child {
  margin-bottom: 0;
}
.info-accordion .rank-rules {
  gap: .55rem;
}
.info-accordion .rank-rules span {
  padding: .65rem .8rem;
}
.info-accordion .rank-table-wrap {
  border-radius: 1rem;
}
.info-accordion .rank-note {
  padding-inline: .05rem;
}
@media (max-width: 860px) {
  .info-accordion {
    margin-bottom: .75rem;
  }
  .info-accordion summary {
    min-height: 2.8rem;
    padding: .68rem .8rem;
  }
  .info-accordion .info-accordion-body {
    gap: .75rem;
    padding: .78rem .8rem .85rem;
  }
  .info-accordion .howto-list {
    padding-left: 1.05rem;
  }
}
/* --- v1.0.4.82: match left utility buttons dim state to right-side modal behavior --- */
.top-left-toggles.dimmed .icon-toggle,
.top-left-toggles.dimmed .sound-toggle {
  opacity: .42 !important;
  filter: saturate(.65) !important;
}
.top-left-toggles .icon-toggle,
.top-left-toggles .sound-toggle {
  transition: opacity .18s ease, filter .18s ease, transform .16s ease;
}
/* --- v1.0.4.83: mobile leaderboard / players modal uses full available size only when needed --- */
@media (max-width: 860px) {
  #leaderboardPanel.floating-panel,
  #onlinePlayersPanel.floating-panel {
    top: max(3.4rem, calc(3rem + env(safe-area-inset-top)));
    left: max(.35rem, env(safe-area-inset-left));
    right: max(.35rem, env(safe-area-inset-right));
    width: auto;
    max-width: none;
    max-height: calc(100dvh - max(3.4rem, calc(3rem + env(safe-area-inset-top))) - max(.35rem, env(safe-area-inset-bottom)));
    height: auto;
    overflow: hidden;
  }
  #leaderboardPanel.show,
  #onlinePlayersPanel.show {
    display: flex;
    flex-direction: column;
  }
  #leaderboardPanel .leaderboard-list,
  #onlinePlayersPanel .online-players-list {
    flex: 0 1 auto;
    max-height: calc(100dvh - max(3.4rem, calc(3rem + env(safe-area-inset-top))) - max(.35rem, env(safe-area-inset-bottom)) - 6.8rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 420px) {
  #leaderboardPanel.floating-panel,
  #onlinePlayersPanel.floating-panel {
    left: 0;
    right: 0;
    top: max(3.25rem, calc(2.9rem + env(safe-area-inset-top)));
    max-height: calc(100dvh - max(3.25rem, calc(2.9rem + env(safe-area-inset-top))));
    border-left: 0;
    border-right: 0;
    border-radius: 1.1rem 1.1rem 0 0;
  }
  #leaderboardPanel .leaderboard-list,
  #onlinePlayersPanel .online-players-list {
    max-height: calc(100dvh - max(3.25rem, calc(2.9rem + env(safe-area-inset-top))) - 6.4rem);
  }
}
/* --- v1.0.4.84: keep mobile leaderboard/players panel margins like info modal --- */
@media (max-width: 860px) {
  #leaderboardPanel.floating-panel,
  #onlinePlayersPanel.floating-panel {
    --mobile-modal-side-gap: max(.45rem, env(safe-area-inset-left));
    --mobile-modal-right-gap: max(.45rem, env(safe-area-inset-right));
    --mobile-modal-bottom-gap: max(.45rem, env(safe-area-inset-bottom));
    left: var(--mobile-modal-side-gap);
    right: var(--mobile-modal-right-gap);
    width: auto;
    max-width: none;
    border-left: .2rem solid var(--edge);
    border-right: .2rem solid var(--edge);
    border-radius: 1.2rem;
    max-height: calc(100dvh - max(3.4rem, calc(3rem + env(safe-area-inset-top))) - var(--mobile-modal-bottom-gap));
  }
}
@media (max-width: 420px) {
  #leaderboardPanel.floating-panel,
  #onlinePlayersPanel.floating-panel {
    left: max(.45rem, env(safe-area-inset-left));
    right: max(.45rem, env(safe-area-inset-right));
    top: max(3.25rem, calc(2.9rem + env(safe-area-inset-top)));
    max-height: calc(100dvh - max(3.25rem, calc(2.9rem + env(safe-area-inset-top))) - max(.45rem, env(safe-area-inset-bottom)));
    border-left: .2rem solid var(--edge);
    border-right: .2rem solid var(--edge);
    border-radius: 1.1rem;
  }
  #leaderboardPanel .leaderboard-list,
  #onlinePlayersPanel .online-players-list {
    max-height: calc(100dvh - max(3.25rem, calc(2.9rem + env(safe-area-inset-top))) - max(.45rem, env(safe-area-inset-bottom)) - 6.4rem);
  }
}
/* --- v1.0.4.85: keep leaderboard max height equal to players panel --- */
#leaderboardPanel.floating-panel,
#onlinePlayersPanel.floating-panel {
  --list-panel-max-height: calc(100dvh - 5rem);
  max-height: var(--list-panel-max-height);
}
#leaderboardPanel .leaderboard-list,
#leaderboardPanel .online-players-list,
#onlinePlayersPanel .online-players-list {
  --list-content-max-height: 52vh;
  max-height: var(--list-content-max-height);
}
@media (max-width: 860px) {
  #leaderboardPanel.floating-panel,
  #onlinePlayersPanel.floating-panel {
    --list-panel-top: max(3.4rem, calc(3rem + env(safe-area-inset-top)));
    --list-panel-bottom-gap: max(.45rem, env(safe-area-inset-bottom));
    --list-panel-max-height: calc(100dvh - var(--list-panel-top) - var(--list-panel-bottom-gap));
    max-height: var(--list-panel-max-height);
  }
  #leaderboardPanel .leaderboard-list,
  #leaderboardPanel .online-players-list,
  #onlinePlayersPanel .online-players-list {
    --list-content-max-height: calc(var(--list-panel-max-height) - 6.8rem);
    max-height: var(--list-content-max-height);
  }
}
@media (max-width: 420px) {
  #leaderboardPanel.floating-panel,
  #onlinePlayersPanel.floating-panel {
    --list-panel-top: max(3.25rem, calc(2.9rem + env(safe-area-inset-top)));
    --list-panel-bottom-gap: max(.45rem, env(safe-area-inset-bottom));
    --list-panel-max-height: calc(100dvh - var(--list-panel-top) - var(--list-panel-bottom-gap));
    max-height: var(--list-panel-max-height);
  }
  #leaderboardPanel .leaderboard-list,
  #leaderboardPanel .online-players-list,
  #onlinePlayersPanel .online-players-list {
    --list-content-max-height: calc(var(--list-panel-max-height) - 6.4rem);
    max-height: var(--list-content-max-height);
  }
}
/* --- v1.0.4.86: unified floating modal sizing and scroll behavior --- */
.info-drawer .floating-panel {
  --modal-top: max(4.25rem, calc(3.8rem + env(safe-area-inset-top)));
  --modal-side-gap: clamp(.5rem, 5vw, 4rem);
  --modal-bottom-gap: max(.5rem, env(safe-area-inset-bottom));
  --modal-width: 48rem;
  --modal-max-height: calc(100dvh - var(--modal-top) - var(--modal-bottom-gap));
  top: var(--modal-top);
  left: var(--modal-side-gap);
  right: var(--modal-side-gap);
  width: min(var(--modal-width), calc(100vw - (var(--modal-side-gap) * 2)));
  max-width: none;
  max-height: var(--modal-max-height);
  height: auto;
  margin-inline: auto;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.info-drawer .floating-panel > h2 {
  margin-top: 0;
}
.info-drawer .floating-panel .leaderboard-list,
.info-drawer .floating-panel .online-players-list,
.info-drawer .floating-panel .available-rooms,
.info-drawer .floating-panel .popup-rooms-list {
  max-height: min(52vh, calc(var(--modal-max-height) - 6.75rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.info-drawer #leaderboardPanel .leaderboard-list,
.info-drawer #onlinePlayersPanel .online-players-list {
  max-height: min(52vh, calc(var(--modal-max-height) - 6.75rem));
}
.info-drawer #availableRoomsPanel .available-rooms {
  max-height: min(52vh, calc(var(--modal-max-height) - 7.65rem));
}
@media (max-width: 860px) {
  .info-drawer .floating-panel {
    --modal-top: max(3.4rem, calc(3rem + env(safe-area-inset-top)));
    --modal-side-gap: max(.45rem, env(safe-area-inset-left));
    --modal-right-gap: max(.45rem, env(safe-area-inset-right));
    --modal-bottom-gap: max(.45rem, env(safe-area-inset-bottom));
    --modal-max-height: calc(100dvh - var(--modal-top) - var(--modal-bottom-gap));
    top: var(--modal-top);
    left: var(--modal-side-gap);
    right: var(--modal-right-gap);
    width: auto;
    max-width: none;
    max-height: var(--modal-max-height);
    border-left: .2rem solid var(--edge);
    border-right: .2rem solid var(--edge);
    border-radius: 1.2rem;
  }
  .info-drawer .floating-panel .leaderboard-list,
  .info-drawer .floating-panel .online-players-list,
  .info-drawer .floating-panel .available-rooms,
  .info-drawer .floating-panel .popup-rooms-list,
  .info-drawer #leaderboardPanel .leaderboard-list,
  .info-drawer #onlinePlayersPanel .online-players-list {
    max-height: min(62vh, calc(var(--modal-max-height) - 6.8rem));
  }
  .info-drawer #availableRoomsPanel .available-rooms {
    max-height: min(62vh, calc(var(--modal-max-height) - 7.7rem));
  }
}
@media (max-width: 420px) {
  .info-drawer .floating-panel {
    --modal-top: max(3.25rem, calc(2.9rem + env(safe-area-inset-top)));
    --modal-side-gap: max(.45rem, env(safe-area-inset-left));
    --modal-right-gap: max(.45rem, env(safe-area-inset-right));
    --modal-bottom-gap: max(.45rem, env(safe-area-inset-bottom));
    --modal-max-height: calc(100dvh - var(--modal-top) - var(--modal-bottom-gap));
    top: var(--modal-top);
    left: var(--modal-side-gap);
    right: var(--modal-right-gap);
    max-height: var(--modal-max-height);
    border-left: .2rem solid var(--edge);
    border-right: .2rem solid var(--edge);
    border-radius: 1.1rem;
  }
  .info-drawer .floating-panel .leaderboard-list,
  .info-drawer .floating-panel .online-players-list,
  .info-drawer .floating-panel .available-rooms,
  .info-drawer .floating-panel .popup-rooms-list,
  .info-drawer #leaderboardPanel .leaderboard-list,
  .info-drawer #onlinePlayersPanel .online-players-list {
    max-height: min(64vh, calc(var(--modal-max-height) - 6.4rem));
  }
  .info-drawer #availableRoomsPanel .available-rooms {
    max-height: min(64vh, calc(var(--modal-max-height) - 7.3rem));
  }
}
/* --- v1.0.4.87: true shared modal body behavior --- */
.info-drawer .floating-panel {
  display: none;
  flex-direction: column;
  min-height: 0;
}
.info-drawer .floating-panel.show,
.info-drawer .online-players-panel.floating-panel.show,
.info-drawer .available-rooms-panel.floating-panel.show {
  display: flex;
}
.info-drawer .floating-panel > h2 {
  flex: 0 0 auto;
}
.info-drawer .floating-panel > .modal-body {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(var(--modal-max-height) - 4.35rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: .15rem;
}
.info-drawer .modal-body > .leaderboard-list,
.info-drawer .modal-body > .online-players-list,
.info-drawer .modal-body > .available-rooms,
.info-drawer .modal-body > .popup-rooms-list,
.info-drawer #leaderboardPanel .modal-body > .leaderboard-list,
.info-drawer #onlinePlayersPanel .modal-body > .online-players-list,
.info-drawer #availableRoomsPanel .modal-body > .available-rooms {
  max-height: none;
  overflow: visible;
}
.info-drawer #availableRoomsPanel .modal-body,
.info-drawer #onlinePlayersPanel .modal-body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.info-drawer #availableRoomsPanel .players-search-input,
.info-drawer #onlinePlayersPanel .players-search-input {
  flex: 0 0 auto;
  margin-bottom: 0;
}
@media (max-width: 860px) {
  .info-drawer .floating-panel > .modal-body {
    max-height: calc(var(--modal-max-height) - 4rem);
  }
}
@media (max-width: 420px) {
  .info-drawer .floating-panel > .modal-body {
    max-height: calc(var(--modal-max-height) - 3.75rem);
  }
}
/* --- v1.0.4.88: dim right-side room buttons when any modal is open --- */
.chat-toggle,
.mic-toggle,
.spectator-toggle {
  transition: opacity .18s ease, filter .18s ease, transform .16s ease;
}
body.modal-open .chat-toggle:hover,
body.modal-open .mic-toggle:hover,
body.modal-open .spectator-toggle:hover {
  opacity: .5 !important;
}
/* --- v1.0.4.89: hard-match right utility dimming with left buttons --- */
body.modal-open .chat-toggle,
body.modal-open .mic-toggle,
body.modal-open .spectator-toggle,
.chat-toggle.dimmed,
.mic-toggle.dimmed,
.spectator-toggle.dimmed {
  opacity: .42 !important;
  filter: saturate(.65) !important;
  animation: none !important;
}
body.modal-open .chat-toggle:hover,
body.modal-open .mic-toggle:hover,
body.modal-open .spectator-toggle:hover,
.chat-toggle.dimmed:hover,
.mic-toggle.dimmed:hover,
.spectator-toggle.dimmed:hover {
  opacity: .42 !important;
  filter: saturate(.65) !important;
  transform: none !important;
}
body.modal-open .chat-toggle.has-unread,
body.modal-open .mic-toggle.has-mic-unread,
body.modal-open .mic-toggle.listening,
body.modal-open .spectator-toggle.has-spectators,
.chat-toggle.dimmed.has-unread,
.mic-toggle.dimmed.has-mic-unread,
.mic-toggle.dimmed.listening,
.spectator-toggle.dimmed.has-spectators {
  animation: none !important;
}
/* --- v1.0.4.91: simple rank progress stars --- */
.rank-progress {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: fit-content;
  max-width: 100%;
  margin-top: .34rem;
  padding: .18rem .42rem;
  border: .12rem solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  color: var(--text);
  font-size: .68rem;
  line-height: 1;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}
.rank-progress-name {
  color: var(--muted);
}
.rank-progress-stars {
  color: var(--yellow);
  letter-spacing: .04em;
}
.rank-progress.compact {
  margin-top: .22rem;
  padding: .14rem .34rem;
  font-size: .56rem;
}
.profile-card {
  cursor: pointer;
}
.profile-card:focus-visible {
  outline: .16rem solid var(--cyan);
  outline-offset: .14rem;
}
.profile-card:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.profile-open-btn {
  pointer-events: auto;
}
.player-profile-panel {
  max-width: min(31rem, calc(100vw - 1.5rem));
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.07);
  border: .14rem solid rgba(255,255,255,.09);
}
.profile-avatar {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--yellow), #ff9f1c);
  color: #1b1200;
  font-size: 1.45rem;
  font-weight: 900;
  text-shadow: none;
  box-shadow: 0 .45rem 0 rgba(0,0,0,.35);
}
.profile-hero strong,
.profile-rank-card strong,
.profile-stat-grid strong {
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
}
.profile-hero small,
.profile-rank-card span,
.profile-stat-grid span {
  color: var(--muted);
  font-size: .64rem;
  text-shadow: 1px 1px 0 #000;
}
.profile-rank-card {
  display: grid;
  gap: .3rem;
  padding: .85rem;
  border-radius: 1rem;
  background: rgba(0,0,0,.22);
  border: .14rem solid rgba(255,255,255,.09);
}
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.profile-stat-grid > div {
  display: grid;
  gap: .22rem;
  padding: .72rem;
  border-radius: .9rem;
  background: rgba(255,255,255,.06);
  border: .12rem solid rgba(255,255,255,.08);
}
.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
.spectator-mode-banner {
  display: none;
  align-self: center;
  width: min(28rem, 92%);
  margin: .45rem auto 0;
  padding: .5rem .7rem;
  border-radius: 999px;
  border: .13rem solid rgba(173,248,255,.25);
  background: rgba(6, 21, 34, .66);
  color: var(--cyan);
  font-size: .62rem;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
}
.spectator-mode-banner.show {
  display: block;
}
.quick-reactions {
  display: none;
  justify-content: center;
  gap: .35rem;
  flex-wrap: wrap;
  margin: .45rem auto 0;
}
.quick-reactions.show {
  display: flex;
}
.quick-reactions button {
  min-width: 2.35rem;
  min-height: 2rem;
  border-radius: .8rem;
  border: .13rem solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 900;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 .22rem 0 rgba(0,0,0,.4);
  cursor: pointer;
}
.quick-reactions button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.15);
}
.quick-reactions button:disabled {
  opacity: .38;
  cursor: not-allowed;
}
.reaction-pop-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9;
}
.reaction-pop {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: .15rem;
  transform: translateX(-50%);
  animation: reactionFloat 1.55s ease-out forwards;
  filter: drop-shadow(0 .35rem 0 rgba(0,0,0,.45));
}
.reaction-pop small {
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}
@keyframes reactionFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, 1rem) scale(.8);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -5rem) scale(1.2);
  }
}
.result-overlay.final-mode .result-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.result-overlay.final-mode #continueRoundBtn {
  display: none;
}
@media (max-width: 720px) {
  .profile-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-actions {
    grid-template-columns: 1fr;
  }
  .quick-reactions button {
    min-width: 2.1rem;
    min-height: 1.85rem;
  }
}
/* --- v1.0.4.92: rank stars use current-tier progress everywhere --- */
.profile-current-rank {
  display: block;
  color: var(--yellow);
  letter-spacing: .02em;
}
.profile-rank-card small {
  display: block;
  margin-top: .22rem;
  color: var(--muted);
  font-size: .72rem;
}
.leaderboard-rank-btn {
  white-space: nowrap;
}
.my-current-rank-placement {
  display: flex;
  justify-content: center;
  margin-top: .45rem;
}
.my-current-rank-placement .rank-progress {
  margin-top: 0;
}
/* --- v1.0.4.93: remove redundant small leaderboard rank progress --- */
#leaderboardPanel .leaderboard-player-info .rank-progress {
  display: none !important;
}
#leaderboardPanel .leaderboard-player-info {
  gap: .16rem;
}
#leaderboardPanel .leaderboard-rank-btn {
  white-space: nowrap;
}
/* --- v1.0.4.94: player profile spacing polish --- */
#playerProfilePanel.player-profile-panel {
  width: min(36rem, calc(100vw - 1rem));
  max-width: min(36rem, calc(100vw - 1rem));
}
#playerProfilePanel > h2 {
  margin-bottom: .75rem;
}
#playerProfilePanel .modal-body,
#playerProfileBody {
  display: grid;
  gap: .72rem;
  padding-right: .2rem;
}
#playerProfileBody .profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .9rem;
  padding: .9rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.045));
  border: .14rem solid rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 .06rem rgba(173,248,255,.08);
}
#playerProfileBody .profile-hero > div:last-child {
  min-width: 0;
  display: grid;
  gap: .25rem;
}
#playerProfileBody .profile-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: .85rem;
  font-size: 1.28rem;
  box-shadow: 0 .35rem 0 rgba(0,0,0,.38), inset 0 .12rem 0 rgba(255,255,255,.28);
}
#playerProfileBody .profile-hero strong {
  font-size: .94rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
#playerProfileBody .profile-hero small,
#playerProfileBody .profile-rank-card small {
  line-height: 1.35;
}
#playerProfileBody .profile-rank-card {
  gap: .38rem;
  padding: .82rem .9rem .9rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.16));
  border: .14rem solid rgba(255,255,255,.10);
}
#playerProfileBody .profile-rank-card > span,
#playerProfileBody .profile-stat-grid span {
  text-transform: uppercase;
  letter-spacing: .045em;
  opacity: .9;
}
#playerProfileBody .profile-current-rank {
  font-size: .95rem;
  line-height: 1.15;
}
#playerProfileBody .profile-stat-grid {
  gap: .6rem;
}
#playerProfileBody .profile-stat-grid > div {
  min-height: 3.05rem;
  align-content: center;
  gap: .28rem;
  padding: .68rem .78rem;
  border-radius: .85rem;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.045));
  border: .12rem solid rgba(255,255,255,.09);
}
#playerProfileBody .profile-stat-grid strong {
  font-size: .94rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
#playerProfileBody .profile-actions {
  gap: .65rem;
  margin-top: .05rem;
}
#playerProfileBody .profile-actions > button {
  min-height: 2.45rem;
  border-radius: .9rem;
  font-size: .8rem;
  letter-spacing: .045em;
}
@media (max-width: 560px) {
  #playerProfilePanel.player-profile-panel {
    width: auto;
    max-width: none;
  }
  #playerProfilePanel .modal-body,
  #playerProfileBody {
    gap: .62rem;
  }
  #playerProfileBody .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
    padding: .75rem;
  }
  #playerProfileBody .profile-avatar {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.08rem;
  }
  #playerProfileBody .profile-stat-grid,
  #playerProfileBody .profile-actions {
    grid-template-columns: 1fr;
  }
}
/* --- v1.0.4.95: top 3 leaderboard name badges + outline crowns --- */
#leaderboardPanel .leaderboard-player-name.top-rank-name {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  max-width: 100%;
  padding: .23rem .52rem .29rem;
  border: .14rem solid rgba(0,0,0,.72);
  border-radius: .65rem;
  box-shadow: inset 0 .16rem 0 rgba(255,255,255,.22), 0 .16rem 0 rgba(0,0,0,.25);
  color: #140d04;
  text-shadow: none;
}
#leaderboardPanel .leaderboard-player-name.top-rank-name.gold {
  background: linear-gradient(180deg, #fff2a1, #ffd34d 58%, #c98b16);
}
#leaderboardPanel .leaderboard-player-name.top-rank-name.silver {
  background: linear-gradient(180deg, #f6f8ff, #c9d2e1 58%, #8692a8);
}
#leaderboardPanel .leaderboard-player-name.top-rank-name.bronze {
  background: linear-gradient(180deg, #ffd3a3, #c47a35 58%, #81502d);
}
#leaderboardPanel .leaderboard-crown-icon {
  flex: 0 0 auto;
  width: .95rem;
  height: .95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 560px) {
  #leaderboardPanel .leaderboard-player-name.top-rank-name {
    padding: .2rem .46rem .26rem;
    gap: .28rem;
  }
  #leaderboardPanel .leaderboard-crown-icon {
    width: .86rem;
    height: .86rem;
  }
}
/* --- v1.0.4.96: reaction slide follows spectator panel styling, auto width --- */
.reaction-toggle {
  position: fixed;
  right: var(--right-menu-right, .75rem);
  z-index: 71;
  display: none;
  place-items: center;
  width: var(--right-menu-size, clamp(2.75rem, 4.2vw, 3.5rem));
  height: var(--right-menu-size, clamp(2.75rem, 4.2vw, 3.5rem));
  padding: 0 0 .18rem;
  border: var(--right-menu-border, .22rem) solid var(--edge);
  border-radius: clamp(.82rem, 1.3vw, 1rem);
  color: #06111a;
  background: linear-gradient(180deg, #adf8ff, var(--cyan), #087bb3);
  box-shadow: inset 0 .26rem 0 rgba(255,255,255,.42), inset 0 -.4rem 0 rgba(0,0,0,.22), 0 .42rem 0 rgba(0,0,0,.36), 0 .8rem 1.4rem rgba(0,0,0,.24);
  text-shadow: none;
  top: calc(var(--right-menu-top, max(.5rem, env(safe-area-inset-top))) + (var(--right-menu-size, 3.5rem) * 4) + (var(--right-menu-gap, .65rem) * 4));
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease, opacity .14s ease;
}
.reaction-toggle.in-room {
  display: grid;
}
.reaction-toggle i {
  font-size: 1.2rem;
  filter: drop-shadow(0 .08rem 0 rgba(255,255,255,.45));
}
.reaction-toggle:hover:not(:disabled) {
  transform: translateY(-.08rem);
  filter: brightness(1.08);
}
.reaction-toggle:active:not(:disabled) {
  transform: translateY(.1rem);
}
.reaction-panel {
  top: calc(var(--right-menu-top, max(.5rem, env(safe-area-inset-top))) + (var(--right-menu-size, 3.5rem) * 5) + (var(--right-menu-gap, .65rem) * 5));
  max-height: min(22rem, 42dvh);
}
.reaction-panel .reaction-list {
  overflow: visible;
}
.reaction-panel .quick-reactions {
  margin: 0;
  display: none;
  justify-content: start;
  align-items: stretch;
}
.reaction-panel .quick-reactions.show {
  display: grid;
}
.reaction-panel .quick-reactions button {
  border-radius: .9rem;
}
body.modal-open .reaction-toggle,
.reaction-toggle.dimmed {
  opacity: .42 !important;
  filter: saturate(.65) !important;
  animation: none !important;
}
body.modal-open .reaction-toggle:hover,
.reaction-toggle.dimmed:hover {
  opacity: .42 !important;
  filter: saturate(.65) !important;
  transform: none !important;
}
@media (max-width: 860px) {
  .reaction-toggle {
    right: var(--right-menu-right, .45rem);
    top: calc(var(--right-menu-top, max(.42rem, env(safe-area-inset-top))) + (var(--right-menu-size, 3.15rem) * 4) + (var(--right-menu-gap, .58rem) * 4));
  }
  .reaction-panel {
    right: .45rem;
    top: calc(var(--right-menu-top, max(.42rem, env(safe-area-inset-top))) + (var(--right-menu-size, 3.15rem) * 5) + (var(--right-menu-gap, .58rem) * 5));
    width: max-content;
    max-width: calc(100vw - .9rem);
    max-height: 36dvh;
  }
}
/* --- v1.0.4.99: reaction grid 3 per row --- */
.spectator-panel,
.reaction-panel {
  top: auto !important;
  bottom: max(.8rem, env(safe-area-inset-bottom));
  max-height: calc(100dvh - 1.6rem);
}
.reaction-panel {
  width: max-content;
  min-width: max-content;
  max-width: calc(100vw - 1.6rem);
  height: auto;
  grid-template-rows: auto auto;
  gap: .5rem;
  padding: .8rem;
}
.reaction-panel .spectator-header {
  gap: .55rem;
  white-space: nowrap;
}
.reaction-panel .reaction-list {
  width: max-content;
  max-height: calc(100dvh - 7.2rem);
  overflow-y: auto;
  overflow-x: visible;
  gap: .42rem;
  padding-right: .05rem;
}
.reaction-panel .quick-reactions {
  width: max-content;
  grid-template-columns: repeat(3, max-content);
  gap: .42rem;
}
.reaction-panel .quick-reactions button {
  width: 3.15rem;
  min-width: 3.15rem;
  height: 3.15rem;
  min-height: 3.15rem;
  padding: 0 0 .12rem;
  display: grid;
  place-items: center;
}
@media (max-width: 860px) {
  .spectator-panel,
  .reaction-panel {
    right: .45rem;
    top: auto !important;
    bottom: max(.5rem, env(safe-area-inset-bottom));
    max-height: calc(100dvh - 1rem);
  }
  .reaction-panel {
    max-width: calc(100vw - .9rem);
  }
  .reaction-panel .reaction-list {
    max-height: calc(100dvh - 6.4rem);
  }
}
/* --- v1.0.4.107: bigger battle reactions + 10-reaction burst support --- */
.reaction-pop {
  z-index: 12;
}
.reaction-pop strong {
  font-size: clamp(3rem, 10vw, 6.4rem);
  line-height: .9;
}
.reaction-pop small {
  font-size: clamp(.62rem, 1.6vw, .86rem);
  padding: .24rem .58rem;
}
@media (max-width: 720px) {
  .reaction-pop strong {
    font-size: clamp(3.2rem, 15vw, 5.8rem);
  }
}
/* --- v1.0.4.108: random arena reaction positions --- */
.reaction-pop {
  top: 50%;
  bottom: auto;
  left: 50%;
}

/* --- v20260516-02: cleaned CSS + smaller arena reaction pops --- */
.reaction-pop strong {
  font-size: clamp(1.25rem, 4.8vw, 2.75rem) !important;
}

.reaction-pop small {
  font-size: .56rem !important;
  padding: .18rem .42rem !important;
}

@media (max-width: 860px) {
  .reaction-pop strong {
    font-size: clamp(1rem, 7vw, 2.25rem) !important;
  }
}
