/* TX Arena multiplayer overlay (docs/specs/mp-ui.md §4; CONTRACT 3.4 layers; unit U16).
   Hub, lobby and results panels on the overlay layer, the room bar, room notes, the host hand-over card, the live
   leaderboard dock and the 3-2-1 countdown. Restrained, terminal-like: flat panels separated by 1 px rules, one
   accent per element, no glow and no gradient except the player's own DEV award line (and the skeleton shimmer),
   weights 400 / 600 only, spacing on a 4 / 8 px rhythm. Every class is mp- prefixed; the sheet does not depend on
   the game's stylesheet. Tokens are the Axiom "R G B" triplets of base.css. */

/* ---------------------------------------------------------------------------------------------------------
   4.1 Unit tokens and shared rules
   --------------------------------------------------------------------------------------------------------- */
#mp-root {
  --mp-gold: 247 196 51;
  --mp-silver: 192 199 214;
  --mp-bronze: 214 140 84;
  --mp-line: rgb(var(--primary-stroke));
  --mp-pad: 20px;
  font-family: var(--font-ax);
  font-size: 13px;
  font-weight: 400;
  color: rgb(var(--text-primary));
}
#mp-root .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
#mp-root .up {
  color: rgb(var(--increase));
}
#mp-root .down {
  color: rgb(var(--decrease));
}
#mp-root b,
#mp-root strong {
  font-weight: 600;
}
.mp-grow {
  flex: 1 1 auto;
}

/* While an mp overlay layer is up, game toasts wait under it (CONTRACT 3.4: 900 -> 750). */
body:has(#mp-root > .mp-layer:not(.hidden)) #toast-root {
  z-index: 750;
}

/* ---------------------------------------------------------------------------------------------------------
   4.2 Primitives
   --------------------------------------------------------------------------------------------------------- */
.mp-btn {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: rgb(var(--text-primary));
  background: rgb(var(--background-tertiary));
  border: 1px solid rgb(var(--secondary-stroke));
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.mp-btn:hover:not(:disabled) {
  background: rgb(var(--secondary-stroke));
}
.mp-btn i {
  font-size: 15px;
  color: rgb(var(--text-secondary));
}
.mp-btn.primary {
  background: rgb(var(--primary-color));
  border-color: transparent;
  color: #fff;
}
.mp-btn.primary i {
  color: #fff;
}
.mp-btn.primary:hover:not(:disabled) {
  background: rgb(var(--primary-color-hover));
}
.mp-btn.ghost {
  background: transparent;
  border-color: rgb(var(--secondary-stroke));
  color: rgb(var(--text-secondary));
}
.mp-btn.ghost:hover:not(:disabled) {
  background: rgb(var(--background-tertiary));
  color: rgb(var(--text-primary));
}
.mp-btn.danger {
  background: rgb(var(--decrease) / 0.14);
  border-color: rgb(var(--decrease) / 0.45);
  color: rgb(var(--decrease));
}
.mp-btn.danger:hover:not(:disabled) {
  background: rgb(var(--decrease) / 0.24);
}
.mp-btn.lg {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
}
.mp-btn.sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}
.mp-btn.xs {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  gap: 4px;
  border-radius: 6px;
}
.mp-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.mp-btn .ri-play-fill {
  font-size: 12px;
  margin-left: -4px;
}
.mp-btn:focus-visible,
.mp-icon-btn:focus-visible,
.mp-seg button:focus-visible,
.mp-stepper button:focus-visible,
.mp-switch:focus-visible,
.mp-link:focus-visible,
.mp-rb-main:focus-visible,
.mp-rb-btn:focus-visible,
.mp-lb-kick:focus-visible,
.mp-lb-mkhost:focus-visible {
  outline: 2px solid rgb(var(--primary-color) / 0.7);
  outline-offset: 2px;
}

.mp-kbd {
  height: 18px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: rgb(255 255 255 / 0.75);
  background: rgb(255 255 255 / 0.14);
}
.mp-start .mp-kbd,
.mp-lb-next .mp-kbd {
  margin-left: 2px;
}

.mp-icon-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgb(var(--text-tertiary));
  transition: background-color 0.12s, color 0.12s;
}
.mp-icon-btn i {
  font-size: 17px;
  line-height: 1;
}
.mp-icon-btn:hover:not(:disabled) {
  background: rgb(var(--background-tertiary));
  color: rgb(var(--text-primary));
}
.mp-icon-btn.sm {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.mp-icon-btn.sm i {
  font-size: 16px;
}

.mp-link {
  align-self: flex-start;
  font-size: 12px;
  color: rgb(var(--text-secondary));
  text-decoration: underline;
  text-decoration-color: rgb(var(--text-tertiary));
  text-underline-offset: 3px;
}
.mp-link:hover {
  color: rgb(var(--text-primary));
}

.mp-input {
  height: 36px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 8px;
  outline: none;
  background: var(--ax-bg);
  border: 1px solid rgb(var(--secondary-stroke));
  color: rgb(var(--text-primary));
  font-size: 13px;
  transition: border-color 0.12s;
}
.mp-input::placeholder {
  color: rgb(var(--text-tertiary));
}
.mp-input:focus {
  border-color: rgb(var(--primary-color) / 0.8);
}
.mp-input[readonly] {
  color: rgb(var(--text-primary));
  cursor: default;
}

.mp-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--text-tertiary));
}

.mp-av {
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-ax), var(--emoji);
  font-weight: 600;
  line-height: 1;
  color: #07080c;
  overflow: hidden;
}
.mp-av.empty {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px dashed rgb(var(--secondary-stroke));
  color: rgb(var(--text-tertiary));
  font-size: 14px;
}

.mp-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  color: rgb(var(--text-tertiary));
}
.mp-tag.off {
  font-style: italic;
}
.mp-ver {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1;
  color: rgb(var(--primary-light-blue));
}
.mp-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: rgb(var(--decrease));
}

.mp-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--ax-bg);
  border: 1px solid rgb(var(--primary-stroke));
}
.mp-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(var(--text-tertiary));
  transition: background-color 0.12s, color 0.12s;
}
.mp-seg button:hover:not(:disabled) {
  color: rgb(var(--text-primary));
}
.mp-seg button.on {
  color: rgb(var(--text-primary));
  background: rgb(var(--secondary-stroke));
}
.mp-seg.ro button:not(.on) {
  opacity: 0.5;
}
.mp-seg.ro button {
  cursor: default;
}

.mp-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgb(var(--secondary-stroke));
  transition: background-color 0.15s;
}
.mp-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgb(var(--text-secondary));
  transition: transform 0.15s, background-color 0.15s;
}
.mp-switch.on {
  background: rgb(var(--primary-color));
}
.mp-switch.on .mp-switch-knob {
  background: #fff;
  transform: translateX(16px);
}
.mp-switch:disabled {
  opacity: 0.6;
  cursor: default;
}

.mp-stepper {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border-radius: 8px;
  background: var(--ax-bg);
  border: 1px solid rgb(var(--primary-stroke));
}
.mp-stepper button {
  width: 32px;
  height: 100%;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgb(var(--text-secondary));
}
.mp-stepper button i {
  font-size: 15px;
}
.mp-stepper button:hover:not(:disabled) {
  color: rgb(var(--text-primary));
}
.mp-stepper button:disabled {
  opacity: 0.3;
  cursor: default;
}
.mp-stepper b {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
}
.mp-stepper.ro b {
  padding: 0 8px;
}
.mp-stepper.mp-buy-step b {
  min-width: 56px;
  padding: 0 2px;
}

.mp-conn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgb(var(--text-secondary));
  white-space: nowrap;
}
.mp-conn i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--primary-yellow));
  animation: mp-blink 1s ease-in-out infinite;
}
.mp-conn.ok i {
  background: rgb(var(--increase));
  animation: none;
}

.mp-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: rgb(var(--primary-light-blue));
  background: rgb(var(--primary-color) / 0.12);
  border: 1px solid rgb(var(--primary-color) / 0.22);
}
.mp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------------------------------------------
   4.3 Overlay layer and panels
   --------------------------------------------------------------------------------------------------------- */
.mp-layer {
  position: fixed;
  inset: 0;
  z-index: 760;
  overflow: auto;
  display: flex;
  padding: var(--mp-top, 28px) 20px 28px;
  background: rgb(4 5 9 / 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: mp-fade 0.16s ease-out;
}
.mp-layer > * {
  margin: auto;
}
.mp-panel {
  position: relative;
  width: min(960px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - var(--mp-top, 28px) - 28px);
  max-height: calc(100dvh - var(--mp-top, 28px) - 28px);
  background: rgb(var(--background-secondary));
  border: 1px solid rgb(var(--primary-stroke));
  border-radius: 12px;
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.5);
  animation: mp-pop 0.18s ease-out;
  outline: none;
}
.mp-head,
.mp-foot {
  flex-shrink: 0;
}
.mp-body,
.mp-hub-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.mp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 16px var(--mp-pad);
  border-bottom: 1px solid var(--mp-line);
}
.mp-h-txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mp-h-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-h-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-h-sub {
  font-size: 12px;
  color: rgb(var(--text-secondary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-lobby .mp-h-sub {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.mp-h-subt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-h-room {
  color: rgb(var(--text-secondary));
  font-weight: 400;
}
.mp-timeout {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  color: rgb(var(--primary-yellow));
}

.mp-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.mp-col {
  min-width: 0;
  padding: 16px var(--mp-pad);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-col + .mp-col {
  border-left: 1px solid var(--mp-line);
}
.mp-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--text-tertiary));
}
.mp-sec:not(:first-child) {
  margin-top: 8px;
}
.mp-sec-n {
  font-weight: 400;
  letter-spacing: 0;
  color: rgb(var(--text-tertiary));
}
.mp-sec-note {
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgb(var(--text-tertiary));
}
.mp-sec-note b {
  color: rgb(var(--text-secondary));
}
.mp-host-yes {
  color: rgb(var(--text-secondary));
}

.mp-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 12px var(--mp-pad);
  border-top: 1px solid var(--mp-line);
}
.mp-foot-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  color: rgb(var(--text-secondary));
}
.mp-foot-note b {
  color: rgb(var(--text-primary));
}
.mp-foot-note .warn,
.mp-foot-note.warn {
  color: rgb(var(--primary-yellow));
}
.mp-foot-actions {
  display: flex;
  gap: 8px;
}

/* ---------------------------------------------------------------------------------------------------------
   4.4 Hub
   --------------------------------------------------------------------------------------------------------- */
.mp-hub {
  width: min(440px, 100%);
}
.mp-x {
  margin-left: auto;
}
.mp-hub-body {
  padding: 20px var(--mp-pad);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mp-hub-ask {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: rgb(var(--text-secondary));
}
.mp-hub-askcode {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: rgb(var(--text-primary));
}
.mp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 0;
  border-radius: 8px;
  background: var(--ax-bg);
  border: 1px solid rgb(var(--secondary-stroke));
  transition: border-color 0.12s;
}
.mp-name-row:focus-within {
  border-color: rgb(var(--primary-color) / 0.8);
}
.mp-name-row.acct:focus-within {
  border-color: rgb(var(--secondary-stroke));
}
.mp-name-row .mp-input {
  flex: 1 1 auto;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-size: 14px;
}
.mp-acct {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  font-size: 12px;
  color: rgb(var(--text-secondary));
  white-space: nowrap;
}
.mp-hub-login {
  margin-top: -8px;
}
.mp-hub-err {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: rgb(var(--decrease));
  background: rgb(var(--decrease) / 0.08);
}
.mp-hub-err > span {
  flex: 1 1 auto;
  min-width: 0;
}
.mp-hub-body > .mp-create {
  width: 100%;
}
.mp-hub-joinrow {
  display: flex;
  gap: 8px;
}
.mp-code-in {
  flex: 1 1 auto;
  height: 40px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
}
.mp-code-in::placeholder {
  font-weight: 400;
  letter-spacing: 0.24em;
}
.mp-or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: rgb(var(--text-tertiary));
}
.mp-or::before,
.mp-or::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--mp-line);
}
.mp-hub-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgb(var(--text-tertiary));
}
.mp-hub-live {
  margin-top: 2px;
}

/* ---------------------------------------------------------------------------------------------------------
   4.5 Lobby
   --------------------------------------------------------------------------------------------------------- */
.mp-code {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  -webkit-user-select: all;
  user-select: all;
}
.mp-copy {
  margin-left: 8px;
}
.mp-copy.done,
.mp-copy.done i {
  color: rgb(var(--increase));
}
.mp-last {
  align-self: auto;
  flex-shrink: 0;
  font-size: 12px;
}
.mp-gset {
  margin-left: 4px;
}

.mp-players {
  display: flex;
  flex-direction: column;
}
.mp-players.many {
  max-height: min(56vh, 520px);
  overflow: auto;
}
.mp-prow {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 48px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 8px;
}
.mp-prow + .mp-prow {
  margin-top: 2px;
}
.mp-prow.can-kick {
  grid-template-columns: 28px minmax(0, 1fr) auto 48px 52px;
}
.mp-prow.new {
  animation: mp-pop 0.18s ease-out;
}
.mp-prow.you {
  background: rgb(var(--background-tertiary) / 0.7);
}
.mp-players.many .mp-prow.you {
  position: sticky;
  top: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(rgb(var(--background-tertiary) / 0.9), rgb(var(--background-tertiary) / 0.9)), rgb(var(--background-secondary));
}
.mp-prow.off {
  opacity: 0.45;
}
.mp-prow.empty {
  grid-template-columns: 28px 1fr;
  animation: none;
}
.mp-pname {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.mp-pn {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-crown {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1;
  color: rgb(var(--mp-gold));
}
.mp-psub {
  min-width: 0;
  font-size: 12px;
  color: rgb(var(--text-tertiary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-prow.more .mp-psub {
  font-variant-numeric: tabular-nums;
}
.mp-st {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.mp-st i {
  font-size: 14px;
}
.mp-st.rdy {
  color: rgb(var(--increase));
  font-weight: 600;
}
.mp-st.off,
.mp-st.wait {
  color: rgb(var(--text-tertiary));
}
.mp-ppts {
  text-align: right;
  font-size: 13px;
}
.mp-ppts small {
  margin-left: 4px;
  font-size: 11px;
  color: rgb(var(--text-tertiary));
}
.mp-skel {
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgb(var(--background-tertiary) / 0.3), rgb(var(--background-tertiary) / 0.8), rgb(var(--background-tertiary) / 0.3));
  background-size: 200% 100%;
  animation: mp-shimmer 1.2s linear infinite;
}
.mp-skel + .mp-skel {
  margin-top: 4px;
}

/* host controls in rows */
.mp-pacts {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}
.mp-pacts .mp-icon-btn {
  opacity: 0;
  color: rgb(var(--text-tertiary));
  transition: opacity 0.12s, background-color 0.12s, color 0.12s;
}
.mp-prow:hover .mp-pacts .mp-icon-btn,
.mp-pacts .mp-icon-btn:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .mp-pacts .mp-icon-btn {
    opacity: 0.7;
  }
}
.mp-pacts .mp-kick:hover {
  color: rgb(var(--decrease));
  background: rgb(var(--decrease) / 0.1);
}
.mp-pacts .mp-mkhost:hover {
  color: rgb(var(--mp-gold));
  background: rgb(var(--mp-gold) / 0.1);
}
.mp-prow.ask {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  background: rgb(var(--decrease) / 0.07);
  box-shadow: inset 0 0 0 1px rgb(var(--decrease) / 0.25);
  animation: none;
}
.mp-prow.ask.mk {
  background: rgb(var(--primary-color) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--primary-color) / 0.32);
}
.mp-ask-q {
  min-width: 0;
  font-size: 13px;
  color: rgb(var(--text-secondary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-ask-q b {
  color: rgb(var(--text-primary));
}
.mp-ask-btns {
  display: flex;
  gap: 8px;
}

/* settings */
.mp-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mp-set {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 32px;
}
.mp-set > .mp-lbl {
  width: 56px;
  flex-shrink: 0;
}
.mp-set-hint {
  font-size: 12px;
  color: rgb(var(--text-tertiary));
}
.mp-set-sub {
  flex-basis: 100%;
  margin: -6px 0 0 68px;
}
.mp-set-pvp.na .mp-switch {
  opacity: 0.4;
}
.mp-warn {
  font-size: 12px;
  color: rgb(var(--primary-yellow));
}
.mp-buy-ctl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: -4px;
}
.mp-buy-pair,
.mp-buy-dev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mp-buy-k {
  font-size: 12px;
  color: rgb(var(--text-tertiary));
}

/* chat */
.mp-chat {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 8px;
  background: var(--ax-bg);
  border: 1px solid var(--mp-line);
}
.mp-chat-list {
  height: 160px;
  min-height: 120px;
  flex: 1 1 auto;
  overflow: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mp-cl {
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mp-cl-n {
  margin-right: 8px;
}
.mp-cl-x {
  color: rgb(var(--text-primary));
}
.mp-cl.sys,
.mp-cl-sys {
  font-size: 12px;
  color: rgb(var(--text-tertiary));
}
.mp-chat-empty {
  margin: auto;
  font-size: 12px;
  color: rgb(var(--text-tertiary));
}
.mp-chat-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-top: 1px solid var(--mp-line);
}
.mp-chat-in,
.mp-chat-in:focus {
  flex: 1 1 auto;
  height: 32px;
  border: 0;
  background: transparent;
}
.mp-chat-send {
  width: 32px;
  height: 32px;
}

/* name field */
.mp-name {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px 0 4px;
  border-radius: 8px;
  background: var(--ax-bg);
  border: 1px solid rgb(var(--secondary-stroke));
  cursor: text;
  transition: border-color 0.12s;
}
.mp-name:focus-within {
  border-color: rgb(var(--primary-color) / 0.8);
}
.mp-name.locked {
  cursor: default;
}
.mp-name.locked:focus-within {
  border-color: rgb(var(--secondary-stroke));
}
.mp-name-in,
.mp-name-in:focus {
  width: 156px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-weight: 600;
}
.mp-name-pen {
  font-size: 14px;
  color: rgb(var(--text-tertiary));
}

/* footer buttons */
.mp-ready {
  min-width: 120px;
}
.mp-res-ready {
  min-width: 132px;
}
.mp-start {
  min-width: 160px;
}
.mp-back {
  min-width: 168px;
}
.mp-claim {
  min-width: 132px;
}
.mp-ready.on,
.mp-ready.on:hover:not(:disabled) {
  color: rgb(var(--increase));
  border-color: rgb(var(--increase) / 0.5);
  background: rgb(var(--increase) / 0.08);
}
.mp-ready.on i {
  color: rgb(var(--increase));
}
.mp-start.confirm,
.mp-start.confirm:hover:not(:disabled) {
  background: rgb(var(--primary-yellow));
  color: #1a1305;
}
.mp-start.confirm i {
  color: #1a1305;
}
.mp-away {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgb(var(--primary-yellow));
}
.mp-away i {
  font-size: 14px;
}
.mp-away-sub {
  color: rgb(var(--text-secondary));
}

/* ---------------------------------------------------------------------------------------------------------
   4.6 Results
   --------------------------------------------------------------------------------------------------------- */
.mp-results {
  width: min(1000px, 100%);
}
.mp-res-body {
  grid-template-columns: minmax(0, 1fr) 280px;
}
.mp-res-side .mp-chat-list {
  height: auto;
  min-height: 200px;
}
.mp-res-coin {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.mp-res-coin-k {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--text-tertiary));
}
.mp-res-coin-tk {
  color: rgb(var(--text-primary));
}
.mp-res-coin-nm {
  color: rgb(var(--text-secondary));
}

/* podium */
.mp-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  padding: 8px 8px 0;
}
.mp-pod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mp-pod.empty {
  visibility: hidden;
}
.mp-pod-who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
.mp-pod-name {
  max-width: 100%;
  margin-top: 4px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-pod.you .mp-pod-name {
  color: rgb(var(--primary-color));
}
.mp-pod-pts {
  font-size: 12px;
  color: rgb(var(--text-secondary));
}
.mp-pod-step {
  width: 100%;
  display: grid;
  place-items: center;
  border-radius: 8px 8px 0 0;
  font-size: 16px;
  font-weight: 600;
}
.mp-pod.p1 .mp-pod-step {
  height: 64px;
  color: rgb(var(--mp-gold));
  background: rgb(var(--mp-gold) / 0.12);
}
.mp-pod.p2 .mp-pod-step {
  height: 48px;
  color: rgb(var(--mp-silver));
  background: rgb(var(--mp-silver) / 0.08);
}
.mp-pod.p3 .mp-pod-step {
  height: 36px;
  color: rgb(var(--mp-bronze));
  background: rgb(var(--mp-bronze) / 0.1);
}
.mp-results.fresh .mp-pod {
  animation: mp-rise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.mp-results.fresh .mp-pod.p1 {
  animation-delay: 0.2s;
}
.mp-results.fresh .mp-pod.p2 {
  animation-delay: 0.1s;
}

/* standings */
.mp-srow {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 72px 72px 104px 36px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
}
.mp-srow:not(.head) + .mp-srow:not(.head) {
  border-radius: 0;
  border-top: 1px solid var(--mp-line);
}
/* our row stays rounded and the hairlines next to it turn transparent */
.mp-srow.you,
.mp-srow:not(.head) + .mp-srow.you {
  border-radius: 8px;
  border-top-color: transparent;
  background: rgb(var(--background-tertiary) / 0.7);
}
.mp-srow.you + .mp-srow:not(.head) {
  border-top-color: transparent;
}
.mp-results.fresh .mp-srow:not(.head) {
  animation: mp-pop 0.2s ease-out both;
}
.mp-results.fresh .mp-srow:nth-child(3) {
  animation-delay: 0.04s;
}
.mp-results.fresh .mp-srow:nth-child(4) {
  animation-delay: 0.08s;
}
.mp-results.fresh .mp-srow:nth-child(5) {
  animation-delay: 0.12s;
}
.mp-srow.head {
  min-height: 24px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--text-tertiary));
  animation: none;
}
.mp-srow .r {
  display: flex;
  justify-content: flex-end;
  text-align: right;
}
.mp-srow.dnf {
  opacity: 0.5;
}
.mp-place {
  font-size: 13px;
  color: rgb(var(--text-tertiary));
}
.mp-place.m1 {
  color: rgb(var(--mp-gold));
  font-weight: 600;
}
.mp-place.m2 {
  color: rgb(var(--mp-silver));
  font-weight: 600;
}
.mp-place.m3 {
  color: rgb(var(--mp-bronze));
  font-weight: 600;
}
.mp-swho {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mp-sname {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}
.mp-sn {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-sverdict {
  font-size: 12px;
  line-height: 1.35;
  color: rgb(var(--text-tertiary));
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.mp-spct {
  font-size: 14px;
  font-weight: 600;
}
#mp-root .mp-spnl,
#mp-root .mp-spnl.up,
#mp-root .mp-spnl.down {
  font-size: 12px;
  color: rgb(var(--text-secondary));
}
.mp-sreact {
  font-size: 12px;
  color: rgb(var(--text-secondary));
  white-space: nowrap;
}
.mp-sreact.bad {
  color: rgb(var(--decrease) / 0.85);
}
.mp-spts {
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--text-secondary));
}

/* award line */
.mp-award {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: rgb(var(--mp-gold) / 0.06);
  border: 1px solid rgb(var(--mp-gold) / 0.22);
}
.mp-award-ic {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 18px;
  color: rgb(var(--mp-gold));
  background: rgb(var(--mp-gold) / 0.12);
}
.mp-award-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mp-award-h {
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-award-k {
  color: rgb(var(--mp-gold));
}
.mp-award-n {
  font-weight: 600;
}
.mp-award-h .mp-ver,
.mp-award-h .mp-tag {
  margin-left: 8px;
}
.mp-award-sub {
  font-size: 12px;
  color: rgb(var(--text-secondary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-award-pts {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--mp-gold));
}
.mp-award.mine {
  border-color: rgb(var(--mp-gold) / 0.6);
  background: linear-gradient(90deg, rgb(var(--mp-gold) / 0.18), rgb(var(--mp-gold) / 0.05) 72%);
  box-shadow: 0 8px 28px rgb(var(--mp-gold) / 0.14);
}
.mp-award.mine .mp-award-ic {
  background: rgb(var(--mp-gold));
  color: #1a1305;
}
.mp-award.mine .mp-award-pts {
  font-size: 16px;
}
.mp-award.mine::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.16) 50%, transparent 70%);
  transform: translateX(-110%);
}
.mp-results.fresh .mp-award {
  animation: mp-pop 0.25s ease-out both;
}
.mp-results.fresh .mp-award.mine {
  animation: mp-award-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.mp-results.fresh .mp-award.mine::after {
  animation: mp-shine 1.1s ease-out 0.3s both;
}
.mp-results.fresh .mp-award-ic i {
  display: inline-block;
  animation: mp-award-ic 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.6) 0.2s both;
}
.mp-award-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgb(var(--mp-gold));
  background: rgb(var(--mp-gold) / 0.12);
}

/* session table */
.mp-trow {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
}
.mp-trow + .mp-trow {
  margin-top: 2px;
}
.mp-trow.you {
  background: rgb(var(--background-tertiary) / 0.7);
}
.mp-tpos {
  width: 16px;
  flex-shrink: 0;
  font-size: 12px;
  color: rgb(var(--text-tertiary));
}
.mp-tn {
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-tpts {
  width: 56px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 600;
}
.mp-tpnl {
  width: 72px;
  flex-shrink: 0;
  text-align: right;
}
.mp-tbest {
  width: 64px;
  flex-shrink: 0;
  text-align: right;
  color: rgb(var(--text-secondary));
}
.mp-more-note {
  padding: 6px 8px 2px;
  font-size: 11px;
  color: rgb(var(--text-tertiary));
}
.mp-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 4px;
}
.mp-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgb(var(--text-tertiary));
  animation: mp-blink 1.2s ease-in-out infinite;
}
.mp-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.mp-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
.mp-res-secs {
  font-size: 11px;
  font-weight: 400;
  color: rgb(var(--text-tertiary));
}
.mp-res-secs:empty {
  display: none;
}

/* ---------------------------------------------------------------------------------------------------------
   4.7 Live board dock
   --------------------------------------------------------------------------------------------------------- */
.mp-dock {
  position: fixed;
  z-index: 655;
  left: 16px;
  bottom: 16px;
  width: 304px;
  font-family: var(--font-ax);
  font-size: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: rgb(var(--background-secondary) / 0.96);
  border: 1px solid rgb(var(--secondary-stroke));
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: mp-pop 0.16s ease-out;
}
.mp-lb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 4px 0 12px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border-bottom: 1px solid var(--mp-line);
}
.mp-dock.collapsed .mp-lb-head {
  border-bottom: 0;
}
.mp-dock.collapsed .mp-lb-body {
  display: none;
}
.mp-lb-head b {
  font-size: 12px;
  white-space: nowrap;
}
.mp-lb-live {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgb(var(--increase));
}
.mp-lb-meta {
  font-size: 11px;
  color: rgb(var(--text-tertiary));
}
.mp-lb-me {
  font-size: 11px;
  font-weight: 600;
  color: rgb(var(--text-secondary));
}
.mp-lb-conn {
  display: inline-flex;
  font-size: 13px;
  color: rgb(var(--primary-yellow));
  animation: mp-blink 1s ease-in-out infinite;
}
.mp-lb-list {
  display: flex;
  flex-direction: column;
  padding: 2px 0;
  max-height: var(--mp-lb-max, 236px);
  overflow: auto;
}
.mp-lb-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 46px 58px 14px;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 10px 0 12px;
}
.mp-lb-body.wide .mp-lb-row {
  grid-template-columns: 22px minmax(0, 1fr) 46px 58px 14px;
}
.mp-lb-row.head {
  height: 22px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--text-tertiary));
}
.mp-lb-row .r {
  text-align: right;
}
.mp-lb-row.you {
  position: sticky;
  top: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(rgb(var(--background-tertiary) / 0.9), rgb(var(--background-tertiary) / 0.9)), rgb(var(--background-secondary));
  box-shadow: inset 2px 0 0 rgb(var(--primary-color));
}
.mp-lb-row.off {
  opacity: 0.45;
}
.mp-lb-pos {
  font-size: 11px;
  color: rgb(var(--text-tertiary));
}
.mp-lb-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.mp-lb-n {
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-lb-name .mp-ver {
  font-size: 12px;
}
.mp-lb-entry {
  font-size: 11px;
  color: rgb(var(--text-secondary));
}
.mp-lb-pnl {
  font-size: 12px;
  font-weight: 600;
}
.mp-lb-ic {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: rgb(var(--text-tertiary));
}
.mp-lb-ic.hold,
.mp-lb-ic.done {
  color: rgb(var(--text-secondary));
}
.mp-lb-ic.sold {
  color: rgb(var(--increase));
}
.mp-lb-count,
.mp-lb-foot {
  font-size: 11px;
  border-top: 1px solid var(--mp-line);
}
.mp-lb-count {
  padding: 5px 12px;
  color: rgb(var(--text-tertiary));
}
.mp-lb-foot {
  padding: 8px 12px;
  color: rgb(var(--text-secondary));
}
.mp-lb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 4px 0 12px;
  border-top: 1px solid var(--mp-line);
}
.mp-lb-hint {
  min-width: 0;
  font-size: 11px;
  color: rgb(var(--text-tertiary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-lb-force {
  flex-shrink: 0;
}
.mp-btn.mp-lb-force {
  color: rgb(var(--text-tertiary));
  border-color: transparent;
}
.mp-btn.mp-lb-force:hover:not(:disabled) {
  color: rgb(var(--text-primary));
}
.mp-btn.mp-lb-force.danger,
.mp-btn.mp-lb-force.danger:hover:not(:disabled) {
  color: rgb(var(--decrease));
  border-color: rgb(var(--decrease) / 0.45);
}
.mp-lb-rules {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid var(--mp-line);
}
.mp-lb-left {
  font-size: 11px;
  color: rgb(var(--text-secondary));
}
.mp-lb-rules.spent .mp-lb-left {
  color: rgb(var(--primary-yellow));
}
/* host hover controls on board rows */
.mp-lb-st {
  position: relative;
  display: grid;
  place-items: center;
}
.mp-lb-kick,
.mp-lb-mkhost {
  position: absolute;
  display: none;
  place-items: center;
  border-radius: 6px;
  font-size: 13px;
  background: rgb(var(--background-secondary));
}
.mp-lb-kick {
  inset: -5px -6px;
  color: rgb(var(--decrease));
}
.mp-lb-kick:hover {
  background: rgb(var(--decrease) / 0.14);
}
.mp-lb-mkhost {
  top: -5px;
  bottom: -5px;
  right: calc(100% + 2px);
  width: 24px;
  color: rgb(var(--mp-gold));
}
.mp-lb-mkhost:hover {
  background: rgb(var(--mp-gold) / 0.14);
}
.mp-lb-row:hover .mp-lb-kick,
.mp-lb-row:hover .mp-lb-mkhost,
.mp-lb-row:focus-within .mp-lb-kick,
.mp-lb-row:focus-within .mp-lb-mkhost {
  display: grid;
}
.mp-lb-row.ask {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 0 6px 0 12px;
  background: rgb(var(--decrease) / 0.08);
}
.mp-lb-row.ask.mk {
  background: rgb(var(--primary-color) / 0.1);
}
.mp-lb-askq {
  min-width: 0;
  font-size: 12px;
  color: rgb(var(--text-secondary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-lb-askq b {
  color: rgb(var(--text-primary));
}
.mp-lb-row.ask .mp-btn.xs {
  height: 20px;
  padding: 0 6px;
}
.mp-lb-nextrow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 10px 12px;
  border-top: 1px solid var(--mp-line);
}
.mp-lb-next-hint {
  font-size: 11px;
  color: rgb(var(--text-secondary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-lb-next {
  width: 100%;
  height: 36px;
  font-size: 13px;
}

/* ---------------------------------------------------------------------------------------------------------
   4.8 Countdown
   --------------------------------------------------------------------------------------------------------- */
.mp-count {
  position: fixed;
  z-index: 656;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
  width: min(360px, 92vw);
  text-align: center;
  border-radius: 12px;
  background: rgb(var(--background-secondary) / 0.94);
  border: 1px solid rgb(var(--secondary-stroke));
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: mp-fade 0.15s ease-out;
}
.mp-count-kicker {
  font-size: 12px;
  color: rgb(var(--text-secondary));
}
.mp-count-ring {
  --p: 1;
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(rgb(var(--primary-color)) calc(var(--p) * 360deg), rgb(var(--background-tertiary)) 0);
}
.mp-count-ring::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgb(var(--background-secondary));
}
.mp-count-n {
  position: relative;
  z-index: 1;
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}
.mp-count-n.word {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.mp-count-n.pop {
  animation: mp-tick 0.3s ease-out;
}
.mp-count-chip {
  align-self: center;
}
.mp-count-sub {
  font-size: 12px;
  line-height: 1.5;
  color: rgb(var(--text-tertiary));
}
.mp-count-last {
  font-size: 12px;
  line-height: 1.5;
  color: rgb(var(--text-secondary));
}
.mp-count-last b {
  color: rgb(var(--text-primary));
}
.mp-count-pts {
  color: rgb(var(--text-tertiary));
}

/* ---------------------------------------------------------------------------------------------------------
   4.9 Room bar, notes, hand-over card
   --------------------------------------------------------------------------------------------------------- */
.mp-roombar {
  position: fixed;
  z-index: 770;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 3px;
  border-radius: 8px;
  background: rgb(var(--background-secondary));
  border: 1px solid rgb(var(--secondary-stroke));
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.mp-rb-main {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 7px 0 0 7px;
  color: rgb(var(--text-secondary));
  overflow: hidden;
  transition: background-color 0.12s, color 0.12s;
}
.mp-rb-main:hover {
  background: rgb(var(--background-tertiary));
  color: rgb(var(--text-primary));
}
.mp-rb-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgb(var(--primary-yellow));
  animation: mp-blink 1s ease-in-out infinite;
}
.mp-rb-dot.ok {
  background: rgb(var(--text-tertiary));
  animation: none;
}
.mp-roombar[data-stage='live'] .mp-rb-dot.ok {
  background: rgb(var(--increase));
}
.mp-rb-room {
  flex-shrink: 0;
}
.mp-rb-code {
  color: rgb(var(--text-primary));
  font-weight: 600;
  letter-spacing: 0.08em;
}
.mp-rb-part {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-rb-part::before {
  content: '·';
  margin-right: 8px;
  color: rgb(var(--text-tertiary));
}
.mp-rb-stage {
  color: rgb(var(--text-primary));
}
.mp-roombar[data-stage='away'] .mp-rb-stage {
  color: rgb(var(--primary-yellow));
}
.mp-rb-div {
  width: 1px;
  height: 14px;
  margin: 0 3px;
  flex-shrink: 0;
  background: rgb(var(--secondary-stroke));
}
.mp-rb-btn {
  display: inline-block;
  flex-shrink: 0;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(var(--text-secondary));
  transition: background-color 0.12s, color 0.12s;
}
.mp-rb-btn:hover:not(:disabled) {
  background: rgb(var(--background-tertiary));
  color: rgb(var(--text-primary));
}
.mp-rb-lobby.on,
.mp-rb-lobby.on:hover {
  color: rgb(var(--primary-light-blue));
  background: rgb(var(--primary-color) / 0.12);
}
.mp-rb-leave.ask,
.mp-rb-leave.ask:hover {
  color: rgb(var(--decrease));
  background: rgb(var(--decrease) / 0.12);
}
.mp-rb-next {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 0 8px 0 10px;
  color: #fff;
  background: rgb(var(--primary-color));
}
.mp-rb-next:hover:not(:disabled) {
  color: #fff;
  background: rgb(var(--primary-color-hover));
}
.mp-rb-next:disabled {
  opacity: 0.5;
  cursor: default;
}
.mp-rb-next i {
  font-size: 11px;
  color: #fff;
}

.mp-note {
  position: fixed;
  z-index: 771;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  max-width: min(520px, 90vw);
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  color: rgb(var(--text-primary));
  background: rgb(var(--background-secondary));
  border: 1px solid rgb(var(--secondary-stroke));
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
}
.mp-note > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-note i {
  font-size: 14px;
  color: rgb(var(--primary-light-blue));
}
.mp-note.warn {
  border-color: rgb(var(--primary-yellow) / 0.45);
}
.mp-note.warn i {
  color: rgb(var(--primary-yellow));
}
.mp-note.pop {
  animation: mp-pop 0.18s ease-out;
}

.mp-leavepop {
  position: fixed;
  z-index: 772;
  width: 312px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: 10px;
  background: rgb(var(--background-secondary));
  border: 1px solid rgb(var(--secondary-stroke));
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
  animation: mp-pop 0.14s ease-out;
}
.mp-lp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -6px;
}
.mp-lp-k {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: rgb(var(--text-secondary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-lp-t {
  padding-right: 4px;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.mp-lp-q {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--text-tertiary));
}
.mp-lp-sel {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.mp-lp-sel option {
  background: rgb(var(--background-secondary));
}
.mp-lp-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.mp-lp-btns .mp-btn {
  width: 100%;
}
.mp-lp-note {
  padding-right: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: rgb(var(--text-tertiary));
}

/* ---------------------------------------------------------------------------------------------------------
   4.10 Menu button
   --------------------------------------------------------------------------------------------------------- */
.mp-menu-btn {
  position: relative;
}
.mp-menu-live {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgb(var(--increase));
}

/* ---------------------------------------------------------------------------------------------------------
   4.11 Animations
   --------------------------------------------------------------------------------------------------------- */
@keyframes mp-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mp-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes mp-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes mp-tick {
  from {
    opacity: 0.3;
    transform: scale(1.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes mp-blink {
  50% {
    opacity: 0.35;
  }
}
@keyframes mp-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: 0 0;
  }
}
@keyframes mp-award-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes mp-award-ic {
  0% {
    transform: scale(0.4) rotate(-20deg);
  }
  60% {
    transform: scale(1.25) rotate(6deg);
  }
  100% {
    transform: none;
  }
}
@keyframes mp-shine {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(110%);
  }
}
/* The countdown card keeps its centring transform: its fade animates opacity only. */
@media (prefers-reduced-motion: reduce) {
  .mp-layer,
  .mp-panel,
  .mp-prow.new,
  .mp-results.fresh .mp-srow:not(.head),
  .mp-results.fresh .mp-pod,
  .mp-dock,
  .mp-count,
  .mp-count-n.pop,
  .mp-note.pop,
  .mp-leavepop,
  .mp-results.fresh .mp-award,
  .mp-results.fresh .mp-award.mine,
  .mp-results.fresh .mp-award.mine::after,
  .mp-results.fresh .mp-award-ic i {
    animation: none;
  }
}

/* ---------------------------------------------------------------------------------------------------------
   4.12 Breakpoints
   --------------------------------------------------------------------------------------------------------- */
@media (max-height: 820px) {
  .mp-layer {
    padding-bottom: 16px;
  }
  .mp-panel {
    max-height: calc(100vh - var(--mp-top, 28px) - 16px);
    max-height: calc(100dvh - var(--mp-top, 28px) - 16px);
  }
  .mp-head {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .mp-foot {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .mp-col {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .mp-settings {
    gap: 8px;
  }
  .mp-chat-list {
    height: 104px;
    min-height: 72px;
  }
  .mp-res-side .mp-chat-list {
    min-height: 120px;
  }
}
@media (max-width: 860px) {
  .mp-body,
  .mp-res-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .mp-col + .mp-col {
    border-left: 0;
    border-top: 1px solid var(--mp-line);
  }
  .mp-head {
    flex-wrap: wrap;
  }
  .mp-srow {
    grid-template-columns: 20px minmax(0, 1fr) 64px 64px 32px;
  }
  .mp-srow > .mp-sreact,
  .mp-srow.head > :nth-child(5) {
    display: none;
  }
  .mp-name-in,
  .mp-name-in:focus {
    width: 112px;
  }
}
@media (max-width: 520px) {
  #mp-root {
    --mp-pad: 16px;
  }
  .mp-layer {
    padding: var(--mp-top, 12px) 8px 12px;
  }
  .mp-panel {
    max-height: calc(100vh - var(--mp-top, 12px) - 12px);
    max-height: calc(100dvh - var(--mp-top, 12px) - 12px);
  }
  .mp-rb-n {
    display: none;
  }
  .mp-dock {
    width: calc(100vw - 20px);
  }
  .mp-srow {
    grid-template-columns: 20px minmax(0, 1fr) 64px 32px;
  }
  .mp-srow > .mp-spnl,
  .mp-srow.head > :nth-child(4) {
    display: none;
  }
  .mp-award {
    padding: 12px;
  }
  .mp-award-sub {
    white-space: normal;
    line-height: 1.4;
  }
}
