﻿/* v193: player-facing layout polish kept in a dedicated final cascade layer. */
#lobby {
  box-sizing: border-box;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* v224: final Toy action dock authority. The explicit data state avoids the
   historical :has() and mobile footer rules changing the reference layout. */
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  align-items: stretch !important;
  gap: 8px !important;
  min-height: 76px !important;
  padding: 0 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border: 2px solid rgba(64, 38, 13, .92) !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 rgba(58, 31, 10, .78), 0 8px 16px rgba(14, 12, 5, .18) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 8px !important;
  align-content: center !important;
  padding: 9px 12px !important;
  overflow: hidden !important;
  text-align: left !important;
  background: linear-gradient(180deg, #ffe99a 0%, #f4c85e 100%) !important;
  color: #5a3b12 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  background-size: 20px 20px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span {
  color: #5a3b12 !important;
  font-size: clamp(12px, 1.4vw, 16px) !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  color: rgba(80, 52, 14, .86) !important;
  font-size: clamp(9px, 1vw, 11px) !important;
  line-height: 1.2 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 8px 18px !important;
  background: linear-gradient(180deg, #ffc65a 0%, #f28b2e 100%) !important;
  color: #5a2d0b !important;
  font-size: clamp(18px, 2.2vw, 26px) !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before {
  content: "" !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 10px solid transparent !important;
  border-bottom: 10px solid transparent !important;
  border-left: 15px solid #6b360c !important;
}
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
    grid-template-rows: 64px !important;
    min-height: 64px !important;
    gap: 6px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    min-height: 64px !important;
    height: 64px !important;
    border-radius: 10px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
    grid-template-columns: 23px minmax(0, 1fr) !important;
    column-gap: 5px !important;
    padding: 6px 7px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
    width: 22px !important;
    height: 22px !important;
    background-size: 16px 16px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span { font-size: 11px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small { font-size: 8px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start { gap: 7px !important; padding: 6px 8px !important; font-size: 17px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before { border-top-width: 8px !important; border-bottom-width: 8px !important; border-left-width: 12px !important; }
}

/* v224-final-tail: keep the Toy action dock above all historical footer variants. */
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  min-height: 76px !important;
  gap: 8px !important;
  align-items: stretch !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  display: flex !important;
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 8px !important;
  align-content: center !important;
  padding: 9px 12px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  background-size: 20px 20px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: normal !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  order: 2 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 8px 18px !important;
}
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
    grid-template-rows: 64px !important;
    min-height: 64px !important;
    gap: 6px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    min-height: 64px !important;
    height: 64px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
    grid-template-columns: 23px minmax(0, 1fr) !important;
    column-gap: 5px !important;
    padding: 6px 7px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
    width: 22px !important;
    height: 22px !important;
    background-size: 16px 16px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    gap: 7px !important;
    padding: 6px 8px !important;
  }
}

#lobby > .lobby-header,
#lobby > .lobby-tabs,
#lobby > #lobby-character-view {
  width: min(1320px, 100%);
  box-sizing: border-box;
  margin-inline: auto;
}

#lobby > .lobby-header {
  flex: 0 0 auto;
  padding-inline: 10px;
  border: 1px solid rgba(205, 229, 201, .26);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(31, 58, 43, .82), rgba(19, 40, 31, .72));
  box-shadow: 0 5px 16px rgba(2, 10, 7, .2);
}

#lobby > .lobby-tabs {
  flex: 0 0 auto;
  padding-inline: 4px;
  border: 1px solid rgba(205, 229, 201, .2);
  border-radius: 7px;
  background: rgba(17, 38, 29, .58);
}

#lobby > #lobby-character-view {
  min-height: 0;
  border: 1px solid rgba(205, 229, 201, .22);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(236, 247, 239, .97), rgba(205, 233, 224, .94));
  box-shadow: 0 10px 24px rgba(2, 12, 8, .2);
}

@media (min-width: 761px) {
  #lobby-character-view > .character-list.character-wheel {
    height: min(58vh, 500px);
    min-height: 320px;
  }
}

/* Solo character selection keeps the wheel's positioning transform on the
   card itself; only the centered portrait animates when a player selects it. */
#lobby .character-list.character-wheel {
  isolation: isolate;
}

#lobby .character-list.character-wheel::after {
  content: "";
  position: absolute;
  z-index: 30;
  top: 43%;
  left: calc(50% - 86px);
  width: 172px;
  height: 9px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 247, 202, .96), rgba(238, 187, 66, .96), transparent);
  box-shadow: 0 0 12px rgba(234, 190, 77, .62);
  pointer-events: none;
  transform: rotate(-21deg) scaleX(.16);
  transform-origin: 12% 50%;
}

#lobby .character-list.character-wheel.is-character-attacking::after {
  animation: lobby-character-slash 460ms cubic-bezier(.2, .75, .25, 1) both;
}

#lobby .character-list.character-wheel.is-character-attacking .character-option.active .character-portrait {
  animation: lobby-character-attack 460ms cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes lobby-character-slash {
  0% { opacity: 0; transform: translateX(-24px) rotate(-21deg) scaleX(.16); }
  38% { opacity: .96; transform: translateX(0) rotate(-21deg) scaleX(1); }
  100% { opacity: 0; transform: translateX(18px) rotate(-21deg) scaleX(1.1); }
}

@keyframes lobby-character-attack {
  0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
  34% { transform: translateX(-7px) rotate(-1deg) scale(.985); }
  62% { transform: translateX(13px) rotate(2deg) scale(1.035); }
}

#lobby-character-view > .character-summary {
  box-sizing: border-box;
  width: min(980px, calc(100% - 32px));
  justify-self: center;
  padding-inline: 18px;
  border: 1px solid rgba(74, 123, 104, .44);
  border-radius: 7px;
  background: rgba(246, 252, 245, .76);
  box-shadow: 0 3px 0 rgba(73, 130, 108, .28);
}

#lobby-character-view > .lobby-footer {
  width: min(980px, calc(100% - 32px));
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(132px, .8fr) minmax(210px, 1.2fr);
  gap: 10px;
  padding-inline: 0;
  border-top: 1px solid rgba(74, 123, 104, .24);
}

#lobby-character-view > .lobby-footer #lobby-multiplayer,
#lobby-character-view > .lobby-footer #lobby-start {
  width: 100%;
  min-width: 0;
}

#lobby-character-view > .lobby-footer #lobby-multiplayer {
  min-height: 46px;
  border-color: rgba(92, 126, 90, .7);
  color: #e8f0df;
  background: rgba(67, 105, 67, .88);
  box-shadow: 0 5px 0 rgba(40, 70, 43, .78);
}

#lobby-character-view > .lobby-footer #lobby-start {
  min-height: 52px;
  font-size: 17px;
  letter-spacing: 0;
}

#shop-tabs {
  align-items: center;
}

#shop-tabs button {
  position: relative;
  min-height: 34px;
  border-radius: 5px;
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

#shop-tabs button:hover { color: #e9e6c6; background: rgba(198, 213, 164, .08); }
#shop-tabs button.active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 2px;
  left: 14px;
  height: 2px;
  border-radius: 2px;
  background: #e7c75f;
  box-shadow: 0 0 9px rgba(231, 199, 95, .42);
}

#lobby-start,
#lobby-multiplayer {
  min-width: 0;
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease;
}

#lobby-start:hover,
#lobby-multiplayer:hover,
#lobby-start:focus-visible,
#lobby-multiplayer:focus-visible {
  filter: brightness(1.04) saturate(1.04);
  box-shadow: 0 6px 0 rgba(91, 56, 19, .48), 0 9px 18px rgba(41, 44, 22, .16);
}

#lobby-start:active,
#lobby-multiplayer:active { transform: translateY(2px); }

#hud .health-panel {
  box-sizing: border-box;
  max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, rgba(7, 23, 18, .91), rgba(5, 15, 12, .84));
  border-color: rgba(178, 214, 176, .3);
  border-left-color: rgba(232, 201, 93, .78);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

#timer {
  border-radius: 6px;
  background: rgba(5, 19, 14, .82);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .24);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(246, 215, 112, .95);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  #lobby {
    gap: 6px;
    scrollbar-gutter: auto;
  }

  #lobby > #lobby-character-view { border-radius: 8px; }
  #lobby-character-view > .character-summary,
  #lobby-character-view > .lobby-footer {
    width: calc(100% - 12px);
  }
  #lobby-character-view > .character-summary { padding-inline: 9px; }
  #lobby-character-view > .lobby-footer {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    padding-inline: 2px;
    column-gap: 6px;
  }
  #lobby-character-view > .lobby-footer #lobby-start { font-size: 15px; }
  #hud .health-panel {
    max-width: calc(100vw - 116px);
    background: linear-gradient(180deg, rgba(5, 24, 19, .95), rgba(4, 17, 13, .9));
  }
  #timer { min-width: 74px; padding-inline: 7px; }
}

@media (max-width: 360px) {
  #lobby .lobby-footer #lobby-multiplayer {
    width: 100%;
    min-width: 0 !important;
  }
}

/* v196: multiplayer room polish. Keep the existing protocol and wheel
   interaction, but give the room a stable game-like hierarchy. */
#multiplayer-lobby {
  background: rgba(7, 15, 12, .84);
  backdrop-filter: blur(12px) saturate(.9);
}

#multiplayer-lobby .multiplayer-panel {
  width: min(1060px, 100%);
  max-height: min(900px, calc(100vh - 32px));
  padding: 22px;
  border: 1px solid rgba(238, 207, 111, .38);
  border-radius: 12px;
  background: #101a16;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .06);
  contain: layout paint;
}

#multiplayer-lobby .multiplayer-header {
  min-height: 58px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

#multiplayer-lobby .multiplayer-header p {
  margin-bottom: 5px;
  color: #b4c0b5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#multiplayer-lobby .multiplayer-header h2 {
  color: #f8e6a5;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: .02em;
}

#multiplayer-lobby .multiplayer-identity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin: 14px 0 2px;
  padding: 9px 12px;
  border: 1px solid rgba(123, 174, 135, .26);
  border-radius: 7px;
  color: #d5e0d3;
  background: rgba(45, 86, 58, .22);
}

#multiplayer-lobby .multiplayer-identity-label {
  color: #91b99a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

#multiplayer-lobby #multiplayer-name-display {
  overflow: hidden;
  color: #fff2bf;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#multiplayer-lobby #multiplayer-name-source {
  color: #9eb0a1;
  font-size: 11px;
  white-space: nowrap;
}

#multiplayer-lobby.room-active .multiplayer-panel {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 32px));
}

#multiplayer-lobby.room-active .room-panel {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(320px, 1fr) auto;
  gap: 12px 20px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(228, 203, 111, .22);
  border-radius: 10px;
  background: #15221b;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

#multiplayer-lobby.room-active .room-panel-heading {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(228, 203, 111, .22);
  border-radius: 6px;
  background: #1c3023;
}

#multiplayer-lobby.room-active .room-panel-heading span {
  color: #f1e4ba;
  font-size: 14px;
  font-weight: 800;
}

#multiplayer-lobby.room-active .room-panel-heading strong {
  color: #e7c75f;
  font-size: 14px;
}

#multiplayer-lobby.room-active .room-phase {
  grid-column: 1 / -1;
  margin: 0;
  color: #adc3ae;
  font-size: 12px;
  letter-spacing: .04em;
}

#multiplayer-lobby.room-active .room-players {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(123, 174, 135, .22);
  border-radius: 8px;
  background: rgba(10, 20, 15, .38);
  contain: layout paint;
}

#multiplayer-lobby.room-active .room-players li {
  min-height: 48px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-left: 3px solid #6caa74;
  border-radius: 5px;
  background: rgba(255, 255, 255, .045);
}

#multiplayer-lobby.room-active .room-player-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border: 1px solid rgba(255, 230, 153, .42);
}

#multiplayer-lobby.room-active .room-players li small {
  color: #e7c75f;
  font-size: 10px;
  white-space: nowrap;
}

#multiplayer-lobby.room-active .room-character-select.character-wheel {
  grid-column: 2;
  grid-row: 3;
  min-height: 320px !important;
  height: min(48vh, 430px) !important;
  border: 1px solid rgba(228, 203, 111, .2);
  border-radius: 8px;
  background: #111d17;
  box-shadow: inset 0 -34px 48px rgba(73, 118, 76, .12), inset 0 1px rgba(255, 255, 255, .04);
  contain: layout paint;
}

#multiplayer-lobby.room-active .room-character-select.character-wheel::before {
  content: "选择你的守护者";
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 30;
  color: #a9c1aa;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  pointer-events: none;
}

#multiplayer-lobby.room-active .room-character-select.character-wheel button {
  border: 1px solid rgba(145, 173, 138, .24) !important;
  border-radius: 8px;
  background: rgba(25, 42, 31, .86) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

#multiplayer-lobby.room-active .room-character-select.character-wheel button.active {
  border-color: #f1d574 !important;
  background: #263c2b !important;
  box-shadow: 0 0 0 2px rgba(241, 213, 116, .2), 0 12px 26px rgba(0, 0, 0, .3);
}

#multiplayer-lobby.room-active .room-character-select.character-wheel button.active::after {
  content: "当前选择";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 6px;
  border: 1px solid rgba(241, 213, 116, .6);
  border-radius: 4px;
  color: #fff0ae;
  background: rgba(76, 63, 27, .86);
  font-size: 9px;
  font-weight: 800;
}

#multiplayer-lobby.room-active .room-character-select.character-wheel .character-platform {
  opacity: .85;
}

#multiplayer-lobby.room-active .room-character-select.character-wheel .character-option-label {
  padding: 7px 5px 9px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

#multiplayer-lobby.room-active .room-character-select.character-wheel strong {
  color: #f4ecd9;
  font-size: 16px;
}

#multiplayer-lobby.room-active .room-character-select.character-wheel small {
  color: #aebfae;
  font-size: 10px;
}

#multiplayer-lobby.room-active .room-actions {
  grid-column: 1 / -1;
  grid-row: 4;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 2px;
}

#multiplayer-lobby.room-active .room-actions #room-leave {
  margin-right: auto;
}

#multiplayer-lobby.room-active .room-actions #room-ready {
  min-width: 220px;
  min-height: 48px;
  color: #1a241a;
  background: #e7c75f;
  box-shadow: 0 3px 0 #8f7537;
}

#multiplayer-lobby.room-active .room-actions #room-start {
  min-height: 48px;
  color: #edf6e8;
  background: #4e8659;
  box-shadow: 0 3px 0 #2d5636;
}

#multiplayer-lobby .room-chat,
#multiplayer-lobby .room-chat-form,
#multiplayer-lobby .room-chat-messages {
  display: none !important;
}

@media (max-width: 760px) {
  #multiplayer-lobby .multiplayer-panel,
  #multiplayer-lobby.room-active .multiplayer-panel {
    max-height: calc(100vh - 18px);
    padding: 14px;
    border-radius: 10px;
  }

  #multiplayer-lobby .multiplayer-identity-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #multiplayer-lobby #multiplayer-name-source {
    grid-column: 2;
  }

  #multiplayer-lobby.room-active .room-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(270px, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  #multiplayer-lobby.room-active .room-players {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #multiplayer-lobby.room-active .room-character-select.character-wheel {
    grid-column: 1;
    grid-row: 4;
    min-height: 270px !important;
    height: 270px !important;
  }

  #multiplayer-lobby.room-active .room-actions {
    grid-column: 1;
    grid-row: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #multiplayer-lobby.room-active .room-actions #room-leave {
    grid-column: 1 / -1;
    margin-right: 0;
  }

  #multiplayer-lobby.room-active .room-actions #room-ready,
  #multiplayer-lobby.room-active .room-actions #room-start {
    min-width: 0;
  }
}

/* v223-toy-action-dock-final: last cascade authority for the Toy footer. */
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  align-items: stretch !important;
  gap: 8px !important;
  min-height: 76px !important;
  width: 100% !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  box-sizing: border-box !important;
  border: 2px solid rgba(64, 38, 13, .92) !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 rgba(58, 31, 10, .78), 0 8px 16px rgba(14, 12, 5, .18) !important;
  transform: translateY(0) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 8px !important;
  align-content: center !important;
  padding: 9px 12px !important;
  overflow: hidden !important;
  text-align: left !important;
  background: linear-gradient(180deg, #ffe99a 0%, #f4c85e 100%) !important;
  color: #5a3b12 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  background-size: 21px 21px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span {
  color: #5a3b12 !important;
  font-size: clamp(12px, 1.4vw, 16px) !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  color: rgba(80, 52, 14, .86) !important;
  font-size: clamp(9px, 1vw, 11px) !important;
  line-height: 1.2 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 8px 18px !important;
  background: linear-gradient(180deg, #ffc65a 0%, #f28b2e 100%) !important;
  color: #5a2d0b !important;
  font-size: clamp(18px, 2.2vw, 26px) !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before {
  content: "" !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 10px solid transparent !important;
  border-bottom: 10px solid transparent !important;
  border-left: 15px solid #6b360c !important;
  filter: drop-shadow(1px 1px 0 rgba(255, 244, 183, .42)) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden):active,
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start:active {
  transform: translateY(3px) !important;
  box-shadow: 0 2px 0 rgba(58, 31, 10, .78) !important;
}
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
    grid-template-rows: 64px !important;
    min-height: 64px !important;
    gap: 6px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    min-height: 64px !important;
    height: 64px !important;
    border-radius: 10px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
    grid-template-columns: 25px minmax(0, 1fr) !important;
    column-gap: 5px !important;
    padding: 6px 7px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
    width: 24px !important;
    height: 24px !important;
    background-size: 17px 17px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span {
    font-size: 11px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
    font-size: 8px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    gap: 7px !important;
    padding: 6px 8px !important;
    font-size: 17px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before {
    border-top-width: 8px !important;
    border-bottom-width: 8px !important;
    border-left-width: 12px !important;
  }
}

/* v223-toy-action-dock: explicit state wins over the historical footer
   variants. The data attribute is written by renderLobby, so this does not
   depend on :has() support or on the order in which the SDK reveals the
   reward button. */
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  align-items: stretch !important;
  gap: 8px !important;
  min-height: 76px !important;
  width: 100% !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  box-sizing: border-box !important;
  border: 2px solid rgba(64, 38, 13, .92) !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 rgba(58, 31, 10, .78), 0 8px 16px rgba(14, 12, 5, .18) !important;
  transform: translateY(0) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 8px !important;
  align-content: center !important;
  padding: 9px 12px !important;
  overflow: hidden !important;
  text-align: left !important;
  background: linear-gradient(180deg, #ffe99a 0%, #f4c85e 100%) !important;
  color: #5a3b12 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  background-size: 21px 21px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span {
  color: #5a3b12 !important;
  font-size: clamp(12px, 1.4vw, 16px) !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  color: rgba(80, 52, 14, .86) !important;
  font-size: clamp(9px, 1vw, 11px) !important;
  line-height: 1.2 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 8px 18px !important;
  background: linear-gradient(180deg, #ffc65a 0%, #f28b2e 100%) !important;
  color: #5a2d0b !important;
  font-size: clamp(18px, 2.2vw, 26px) !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before {
  content: "" !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 10px solid transparent !important;
  border-bottom: 10px solid transparent !important;
  border-left: 15px solid #6b360c !important;
  filter: drop-shadow(1px 1px 0 rgba(255, 244, 183, .42)) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden):active,
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start:active {
  transform: translateY(3px) !important;
  box-shadow: 0 2px 0 rgba(58, 31, 10, .78) !important;
}
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
    grid-template-rows: 64px !important;
    min-height: 64px !important;
    gap: 6px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    min-height: 64px !important;
    height: 64px !important;
    border-radius: 10px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
    grid-template-columns: 25px minmax(0, 1fr) !important;
    column-gap: 5px !important;
    padding: 6px 7px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
    width: 24px !important;
    height: 24px !important;
    background-size: 17px 17px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span {
    font-size: 11px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
    font-size: 8px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    gap: 7px !important;
    padding: 6px 8px !important;
    font-size: 17px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before {
    border-top-width: 8px !important;
    border-bottom-width: 8px !important;
    border-left-width: 12px !important;
  }
}

/* v222-stage-visual-copy-specificity: override the legacy card-era plaque
   rules without changing any other lobby panels. */
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
  top: 10px !important;
  right: auto !important;
  bottom: auto !important;
  left: 10px !important;
  width: min(30%, 184px) !important;
  max-width: 184px !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: 88px !important;
  padding: 7px 9px 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy h3,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy h3 {
  margin: 0 !important;
  font-size: clamp(16px, 1.9vw, 21px) !important;
  line-height: 1.05 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > strong {
  margin-top: 2px !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy .room-character-stage-description {
  margin-top: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
@media (max-width: 760px) {
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
    top: 7px !important;
    left: 7px !important;
    width: min(39%, 142px) !important;
    max-width: 142px !important;
    max-height: 74px !important;
    padding: 6px 7px 7px !important;
  }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy h3 { font-size: 15px !important; }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > strong,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > strong { font-size: 9px !important; }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy .room-character-stage-description {
    margin-top: 2px !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
  }
}

/* v224-final-tail: this must remain the physical end of the stylesheet. */
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  min-height: 76px !important;
  gap: 8px !important;
  align-items: stretch !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 8px !important;
  align-content: center !important;
  padding: 9px 12px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  background-size: 20px 20px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: normal !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 8px 18px !important;
}
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
    grid-template-rows: 64px !important;
    min-height: 64px !important;
    gap: 6px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    min-height: 64px !important;
    height: 64px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
    grid-template-columns: 23px minmax(0, 1fr) !important;
    column-gap: 5px !important;
    padding: 6px 7px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
    width: 22px !important;
    height: 22px !important;
    background-size: 16px 16px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
    gap: 7px !important;
    padding: 6px 8px !important;
  }
}

/* v224-tail: explicit Toy footer state is the last cascade authority. */
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  gap: 8px !important;
  min-height: 76px !important;
  padding: 0 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border: 2px solid rgba(64, 38, 13, .92) !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 rgba(58, 31, 10, .78), 0 8px 16px rgba(14, 12, 5, .18) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 8px !important;
  align-content: center !important;
  padding: 9px 12px !important;
  overflow: hidden !important;
  text-align: left !important;
  background: linear-gradient(180deg, #ffe99a 0%, #f4c85e 100%) !important;
  color: #5a3b12 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  background-size: 20px 20px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span { color: #5a3b12 !important; font-size: clamp(12px, 1.4vw, 16px) !important; font-weight: 900 !important; line-height: 1.15 !important; }
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small { color: rgba(80, 52, 14, .86) !important; font-size: clamp(9px, 1vw, 11px) !important; line-height: 1.2 !important; }
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 8px 18px !important;
  background: linear-gradient(180deg, #ffc65a 0%, #f28b2e 100%) !important;
  color: #5a2d0b !important;
  font-size: clamp(18px, 2.2vw, 26px) !important;
  font-weight: 950 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before { content: "" !important; display: block !important; width: 0 !important; height: 0 !important; border-top: 10px solid transparent !important; border-bottom: 10px solid transparent !important; border-left: 15px solid #6b360c !important; }
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important; grid-template-rows: 64px !important; min-height: 64px !important; gap: 6px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start { min-height: 64px !important; height: 64px !important; border-radius: 10px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) { grid-template-columns: 23px minmax(0, 1fr) !important; column-gap: 5px !important; padding: 6px 7px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before { width: 22px !important; height: 22px !important; background-size: 16px 16px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span { font-size: 11px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small { font-size: 8px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start { gap: 7px !important; padding: 6px 8px !important; font-size: 17px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before { border-top-width: 8px !important; border-bottom-width: 8px !important; border-left-width: 12px !important; }
}

/* v223: Toy action dock. This deliberately comes last: earlier mobile
   experiments alternated between a stacked footer and reversed grid ratios.
   Keep the reward and the primary action in one stable, game-like row. */
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  grid-auto-rows: auto !important;
  align-items: stretch !important;
  gap: 10px !important;
  min-height: 76px !important;
  padding: 0 !important;
  overflow: visible !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #lobby-start {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: block !important;
  padding: 8px 15px 7px !important;
  overflow: hidden !important;
  border: 3px solid #624416 !important;
  border-bottom-width: 6px !important;
  background: linear-gradient(180deg, #f5d36d 0%, #e7ae31 52%, #d6911e 100%) !important;
  box-shadow: inset 0 2px rgba(255, 250, 203, .55), 0 2px 0 rgba(105, 64, 12, .3) !important;
  color: #304229 !important;
  text-align: left !important;
  text-shadow: 0 1px rgba(255, 239, 158, .56) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden)::before {
  content: none !important;
  display: none !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #304229 !important;
  text-overflow: clip !important;
  white-space: normal !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) span {
  font-size: clamp(14px, 1.55vw, 20px) !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) small {
  margin-top: 4px !important;
  font-size: clamp(10px, 1.08vw, 14px) !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #lobby-start {
  order: 2 !important;
  padding: 0 20px !important;
  border: 3px solid #725019 !important;
  border-bottom-width: 7px !important;
  background: linear-gradient(180deg, #ffe891 0%, #ffd464 44%, #f6a51f 45%, #ee9518 100%) !important;
  box-shadow: inset 0 2px rgba(255, 251, 212, .7), 0 2px 0 rgba(115, 67, 13, .34) !important;
  color: #593413 !important;
  font-size: clamp(20px, 2.35vw, 29px) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 1px rgba(255, 241, 172, .75) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #lobby-start::before {
  margin: 0 11px 2px 0 !important;
  border-top-width: 10px !important;
  border-bottom-width: 10px !important;
  border-left-width: 15px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden):active,
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #lobby-start:active {
  transform: translateY(3px) !important;
  box-shadow: inset 0 1px rgba(93, 56, 10, .2) !important;
}
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
    grid-template-rows: 64px !important;
    gap: 7px !important;
    min-height: 64px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #lobby-start {
    min-height: 64px !important;
    height: 64px !important;
    border-radius: 8px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) {
    padding: 6px 9px 5px !important;
    border-width: 2px !important;
    border-bottom-width: 5px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) span {
    font-size: clamp(11px, 3.25vw, 14px) !important;
    line-height: 1.1 !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #toy-coin-reward:not(.hidden) small {
    margin-top: 3px !important;
    font-size: clamp(8px, 2.45vw, 10px) !important;
    line-height: 1.16 !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #lobby-start {
    padding: 0 8px !important;
    border-width: 2px !important;
    border-bottom-width: 5px !important;
    font-size: clamp(17px, 5.1vw, 21px) !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer #lobby-start::before {
    margin-right: 7px !important;
    border-top-width: 8px !important;
    border-bottom-width: 8px !important;
    border-left-width: 12px !important;
  }
}

/* v218: stage hierarchy and Toy action dock.  This intentionally comes last:
   earlier bundles still include several mutually exclusive lobby layouts. */
#lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
  top: 12px !important;
  right: auto !important;
  bottom: auto !important;
  left: 12px !important;
  width: min(36%, 218px) !important;
  max-width: 218px !important;
  max-height: none !important;
  padding: 9px 10px 10px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, rgba(7, 22, 13, .9), rgba(12, 39, 24, .72)) !important;
  box-shadow: 0 7px 16px rgba(2, 10, 5, .22) !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > p:first-child,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-state {
  display: none !important;
}

/* v234: 房间大厅阶段也能先预选角色，所以这一阶段要让状态行露出来，
   明确告诉玩家「已预选 XXX，房主开始后直接进入倒计时」。 */
#multiplayer-lobby.room-active .room-character-select.is-preview .room-character-stage-state {
  display: block !important;
  margin: 4px 0 0 !important;
  overflow: visible !important;
  color: #ffe9a8 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.32 !important;
  white-space: normal !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > .solo-character-stage-lock {
  display: block !important;
  margin: 0 0 3px !important;
  color: #f0d879 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
  display: block !important;
  margin: 0 !important;
  font-size: clamp(19px, 2.25vw, 25px) !important;
  line-height: 1.08 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  display: block !important;
  margin: 3px 0 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  display: -webkit-box !important;
  max-width: none !important;
  margin: 5px 0 0 !important;
  overflow: hidden !important;
  color: rgba(232, 243, 226, .88) !important;
  font-size: 10px !important;
  line-height: 1.32 !important;
  text-align: left !important;
  text-overflow: clip !important;
  white-space: normal !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro span { display: none !important; }

#lobby #character-list.solo-character-picker .solo-character-stage-intro p { display: block !important; }

#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  top: 4px !important;
  right: auto !important;
  bottom: 0 !important;
  left: 65% !important;
  width: min(47%, 294px) !important;
  height: calc(100% - 8px) !important;
  max-width: 294px !important;
  object-position: center bottom !important;
}
/* Match the most specific legacy portrait selector so cached card-layout
   rules cannot reset the live stage back to the left edge. */
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
  top: auto !important;
  right: auto !important;
  bottom: 10px !important;
  left: 60% !important;
  width: min(60%, 340px) !important;
  height: min(74%, 340px) !important;
  max-width: 340px !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
  display: grid !important;
  grid-template-columns: minmax(138px, .95fr) minmax(0, 1.35fr) !important;
  grid-template-rows: minmax(60px, auto) !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 7px !important;
  min-height: 60px !important;
  padding: 7px 8px !important;
  text-align: left !important;
}

body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  width: 31px !important;
  height: 31px !important;
  margin: 0 !important;
  align-self: center !important;
}

body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) span {
  color: #5d4514 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
}

body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) small {
  color: rgba(72, 55, 18, .84) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start {
  order: 2 !important;
  min-height: 60px !important;
  font-size: clamp(17px, 4.8vw, 23px) !important;
}

#event-banner[data-kind="toy-blocked"] {
  position: fixed !important;
  top: max(72px, calc(env(safe-area-inset-top) + 72px)) !important;
  right: 12px !important;
  bottom: auto !important;
  left: 12px !important;
  z-index: 10020 !important;
  width: auto !important;
  max-width: 420px !important;
  margin: 0 auto !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(247, 211, 103, .72) !important;
  border-radius: 7px !important;
  background: rgba(28, 42, 23, .96) !important;
  color: #fff0bd !important;
  font-size: 11px !important;
  line-height: 1.28 !important;
  opacity: 0 !important;
  transform: translateY(-8px) !important;
  transition: opacity .18s ease, transform .18s ease !important;
  pointer-events: none !important;
}
#event-banner.show[data-kind="toy-blocked"] {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 10px !important;
    left: 10px !important;
    width: 126px !important;
    max-width: 126px !important;
    padding: 7px 8px 8px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 { font-size: 18px !important; }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-skill { font-size: 10px !important; }

  #lobby #character-list.solo-character-picker .solo-character-stage-intro,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
    margin-top: 4px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    top: 5px !important;
    left: 70% !important;
    width: min(54%, 224px) !important;
    height: calc(100% - 6px) !important;
    max-width: 224px !important;
  }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
    top: 5px !important;
    left: 70% !important;
    width: min(54%, 224px) !important;
    height: calc(100% - 6px) !important;
    max-width: 224px !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
    grid-template-columns: minmax(138px, .95fr) minmax(0, 1.35fr) !important;
    grid-template-rows: minmax(60px, auto) !important;
  }
}

/* v219: the portrait is the stage focal point. Older cascade blocks used a
   65% anchor to make room for a side plaque; the current plaque is already
   pinned to the corner, so the playable character stays centered and fully
   contained on both desktop and Toy mobile viewports. */
#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  left: 50% !important;
  width: min(54%, 320px) !important;
  max-width: 320px !important;
  height: calc(100% - 8px) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  transform: translateX(calc(-50% + var(--stage-motion-x, 0px))) scale(var(--stage-motion-scale, 1)) !important;
}

/* All non-character lobby pages share the same hard layout boundary. This
   prevents legacy rules from leaving the stage, roster, map, or start footer
   visible above the talent, mastery, and challenge content. */
#lobby.lobby-non-character-tab > #lobby-character-view {
  display: none !important;
}

#lobby.lobby-non-character-tab > #meta-shop {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  width: min(1320px, 100%) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(205, 229, 201, .22) !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, rgba(236, 247, 239, .97), rgba(205, 233, 224, .94)) !important;
  box-shadow: 0 10px 24px rgba(2, 12, 8, .2) !important;
}

#lobby.lobby-non-character-tab > #meta-shop > .shop-content {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  padding: clamp(14px, 2.5vw, 30px) !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    left: 50% !important;
    width: min(64%, 244px) !important;
    max-width: 244px !important;
    height: calc(100% - 80px) !important;
    top: 24px !important;
    bottom: 0 !important;
  }

  #lobby.lobby-non-character-tab > #meta-shop {
    grid-row: 3 !important;
    min-height: 0 !important;
  }
}

/* v214: compact the stage information and return vertical space to the full
   character presentation. The action dock becomes a 3:1 pair only when the
   optional Toy interaction reward is visible. */
#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  transform: translateX(calc(-50% + var(--stage-motion-x, 0px))) scale(var(--stage-motion-scale, 1)) !important;
  transform-origin: center bottom !important;
  will-change: transform !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 8px !important;
    left: 8px !important;
    width: min(48%, 196px) !important;
    max-width: 196px !important;
    max-height: 94px !important;
    padding: 7px 9px 8px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy > p,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy > p {
    margin-bottom: 2px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.08 !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy strong,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy strong {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-intro,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
    margin-top: 3px !important;
    font-size: 10px !important;
    line-height: 1.24 !important;
    -webkit-line-clamp: 2 !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    top: 24px !important;
    height: calc(100% - 80px) !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(48px, auto) !important;
    min-height: 48px !important;
    gap: 0 !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
    grid-template-columns: minmax(0, 3fr) minmax(88px, 1fr) !important;
    column-gap: 7px !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start,
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) {
    min-height: 50px !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) {
    padding: 5px 7px !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden)::before {
    width: 29px !important;
    height: 29px !important;
    margin-right: 5px !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) small {
    display: none !important;
  }

  #event-banner[data-kind="toy-blocked"] {
    top: max(72px, calc(env(safe-area-inset-top) + 72px)) !important;
    max-width: min(350px, calc(100vw - 28px)) !important;
    padding: 7px 10px !important;
    font-size: 11px !important;
    line-height: 1.32 !important;
  }
}

/* v211 final override: yellow-marked upper-left area carries the character
   introduction; the lower red-marked strip stays clear for the avatar rail.
   Gameplay VFX textures are shown over the centered hero during preview. */
#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
  top: 14px !important;
  right: auto !important;
  bottom: auto !important;
  left: 14px !important;
  width: min(42%, 286px) !important;
  max-width: 286px !important;
  max-height: 132px !important;
  padding: 11px 13px 12px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(8, 20, 13, .9), rgba(10, 25, 16, .64)) !important;
  text-align: left !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3,
#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill,
#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  text-align: left !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  margin-top: 6px !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro span { display: none !important; }

#lobby #character-list.solo-character-picker .solo-character-stage-vfx,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-vfx {
  position: absolute !important;
  inset: 8% 8% 18% !important;
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  pointer-events: none !important;
  opacity: 0 !important;
  mix-blend-mode: screen !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-vfx img,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-vfx img {
  width: min(72%, 420px) !important;
  max-height: 68% !important;
  object-fit: contain !important;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--character-color, #e7ca74) 52%, transparent)) !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage::before,
#lobby #character-list.solo-character-picker .solo-character-stage::after,
#multiplayer-lobby.room-active .room-character-stage::before,
#multiplayer-lobby.room-active .room-character-stage::after { display: none !important; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-vfx,
#multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-vfx {
  animation: gameplay-vfx-in 620ms cubic-bezier(.2, .75, .25, 1) both !important;
}
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-vfx img,
#multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-vfx img {
  animation: gameplay-vfx-pulse 620ms cubic-bezier(.2, .75, .25, 1) both !important;
}
@keyframes gameplay-vfx-in { 0% { opacity: 0; transform: scale(.74); } 22% { opacity: .96; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
@keyframes gameplay-vfx-pulse { 0% { transform: scale(.62) translateX(10%); } 24% { transform: scale(.9) translateX(0); } 100% { transform: scale(1.08) translateX(-4%); } }
@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
    top: 10px !important; left: 10px !important; width: min(54%, 222px) !important; max-width: 222px !important; max-height: 116px !important; padding: 9px 10px 10px !important;
  }
}

/* v211: use the actual gameplay VFX textures in the stage. The old CSS-only
   line art is intentionally disabled so the preview communicates the same
   attack silhouette players see after entering a run. */
#lobby #character-list.solo-character-picker .solo-character-stage-vfx,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-vfx {
  position: absolute !important;
  inset: 8% 8% 18% !important;
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  pointer-events: none !important;
  opacity: 0 !important;
  mix-blend-mode: screen !important;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--character-color, #e7ca74) 52%, transparent)) !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-vfx img,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-vfx img {
  display: block !important;
  width: min(72%, 420px) !important;
  max-height: 68% !important;
  object-fit: contain !important;
  object-position: center !important;
  opacity: .94 !important;
  transform: scale(.72) translateX(10%) !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage::before,
#lobby #character-list.solo-character-picker .solo-character-stage::after,
#multiplayer-lobby.room-active .room-character-stage::before,
#multiplayer-lobby.room-active .room-character-stage::after {
  display: none !important;
}

#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-vfx,
#multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-vfx {
  animation: gameplay-vfx-in 620ms cubic-bezier(.2, .75, .25, 1) both !important;
}

#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-vfx img,
#multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-vfx img {
  animation: gameplay-vfx-pulse 620ms cubic-bezier(.2, .75, .25, 1) both !important;
}

@keyframes gameplay-vfx-in {
  0% { opacity: 0; transform: scale(.74); }
  22% { opacity: .96; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes gameplay-vfx-pulse {
  0% { transform: scale(.62) translateX(10%); }
  24% { transform: scale(.9) translateX(0); }
  100% { transform: scale(1.08) translateX(-4%); }
}

@media (prefers-reduced-motion: reduce) {
  #lobby #character-list.solo-character-picker .solo-character-stage-vfx,
  #multiplayer-lobby.room-active .room-character-stage-vfx,
  #lobby #character-list.solo-character-picker .solo-character-stage-vfx img,
  #multiplayer-lobby.room-active .room-character-stage-vfx img {
    animation: none !important;
    opacity: .82 !important;
  }
}

/* v210: stage copy is a compact information plaque in the upper-left corner.
   This keeps the hero readable at center while leaving the lower avatar strip
   dedicated to selection and the attack preview. */
#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
  top: 14px !important;
  right: auto !important;
  bottom: auto !important;
  left: 14px !important;
  width: min(42%, 286px) !important;
  max-width: 286px !important;
  max-height: 132px !important;
  padding: 11px 13px 12px !important;
  border: 1px solid color-mix(in srgb, var(--character-color, #e7ca74) 52%, rgba(255, 255, 255, .18)) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(8, 20, 13, .88), rgba(10, 25, 16, .58)) !important;
  box-shadow: 0 10px 24px rgba(3, 11, 6, .28), inset 0 1px rgba(255, 255, 255, .1) !important;
  text-align: left !important;
  backdrop-filter: blur(8px) saturate(1.08) !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > p:first-child,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-state {
  margin: 0 0 5px !important;
  color: rgba(231, 241, 228, .68) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
  display: block !important;
  margin: 0 !important;
  color: #fff1c9 !important;
  font-size: clamp(19px, 2.3vw, 26px) !important;
  line-height: 1.08 !important;
  text-align: left !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  display: block !important;
  margin: 4px 0 0 !important;
  color: var(--character-color, #e7ca74) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill span {
  display: none !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  display: -webkit-box !important;
  max-width: none !important;
  margin: 6px 0 0 !important;
  color: rgba(226, 237, 221, .84) !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro span {
  display: none !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro p {
  display: inline !important;
  margin: 0 !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
    top: 10px !important;
    left: 10px !important;
    width: min(54%, 222px) !important;
    max-width: 222px !important;
    max-height: 116px !important;
    padding: 9px 10px 10px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
    font-size: 18px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-intro,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
    -webkit-line-clamp: 2 !important;
    font-size: 9px !important;
  }
}

/* v209: standalone leaderboard surface.  When the leaderboard tab is active
   the character hall is removed from layout entirely; the board gets the
   full content row so it cannot appear stacked underneath the roster. */
#lobby.leaderboards-open > #lobby-character-view {
  display: none !important;
}

#lobby.leaderboards-open > #meta-shop {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  width: min(1320px, 100%) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(205, 229, 201, .22) !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, rgba(236, 247, 239, .97), rgba(205, 233, 224, .94)) !important;
  box-shadow: 0 10px 24px rgba(2, 12, 8, .2) !important;
}

#lobby.leaderboards-open > #meta-shop > .shop-content {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  padding: clamp(18px, 3vw, 34px) !important;
}

#lobby.leaderboards-open .shop-footer { display: none !important; }

.leaderboard-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px);
  box-sizing: border-box;
  border: 1px solid rgba(74, 123, 104, .34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(249, 253, 245, .94), rgba(229, 242, 231, .9));
  box-shadow: 0 12px 26px rgba(29, 66, 46, .14), inset 0 1px rgba(255,255,255,.72);
  color: #183426;
}

.leaderboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(74, 123, 104, .2);
}

.leaderboard-heading p {
  margin: 0 0 4px;
  color: #5e806e;
  font-size: 11px;
  letter-spacing: .08em;
}

.leaderboard-heading h2 {
  margin: 0;
  color: #173a29;
  font: 900 clamp(24px, 4vw, 32px)/1.1 serif;
  letter-spacing: .02em;
}

.leaderboard-refresh {
  flex: 0 0 40px;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgba(74, 123, 104, .36);
  border-radius: 50%;
  color: #2f6248;
  background: rgba(255,255,255,.62);
  font-size: 21px;
}

.leaderboard-source-modes,
.leaderboard-modes,
.leaderboard-period-modes {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 auto 10px;
}

.leaderboard-source-modes button,
.leaderboard-modes button,
.leaderboard-period-modes button {
  min-width: 88px;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(74, 123, 104, .28);
  border-radius: 999px;
  color: #4f6f5c;
  background: rgba(255,255,255,.56);
  font-size: 12px;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.leaderboard-source-modes button.active,
.leaderboard-modes button.active,
.leaderboard-period-modes button.active {
  border-color: #3e7958;
  color: #fff;
  background: #3e7958;
  box-shadow: 0 3px 8px rgba(38, 91, 60, .2);
}

.leaderboard-source-modes button:hover,
.leaderboard-modes button:hover,
.leaderboard-period-modes button:hover { transform: translateY(-1px); }

.leaderboard-period-modes { margin-bottom: 16px; }
.leaderboard-period-modes button { min-width: 70px; }

.toy-leaderboard-note {
  margin: 0 auto 16px;
  color: #6b8574;
  font-size: 11px;
  text-align: center;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

.leaderboard-card {
  min-height: 176px;
  padding: 16px;
  border: 1px solid rgba(74, 123, 104, .28);
  border-radius: 9px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 4px 12px rgba(35, 75, 51, .08);
}

.leaderboard-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: #244a34;
  font-size: 14px;
}

.leaderboard-card h3 > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #fff7d5;
  background: #bf8a2e;
  font-size: 12px;
}

.leaderboard-card h3 strong {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(191, 138, 46, .34);
  border-radius: 999px;
  color: #8a6424;
  background: rgba(241, 208, 122, .18);
  font-size: 10px;
}

.leaderboard-card ol { gap: 0; }
.leaderboard-card li {
  min-height: 34px;
  padding: 5px 0;
  border-bottom-color: rgba(74, 123, 104, .14);
  color: #3d5b49;
  font-size: 12px;
}

.leaderboard-card li:last-child { border-bottom: 0; }
.leaderboard-card li b { color: #a2711e; }
.leaderboard-map-tag { color: #8a6424; background: rgba(241,208,122,.16); }

@media (max-width: 600px) {
  #lobby.leaderboards-open > #meta-shop > .shop-content { padding: 10px !important; }
  .leaderboard-shell { padding: 14px 10px; border-radius: 9px; }
  .leaderboard-heading { margin-bottom: 13px; padding-bottom: 11px; }
  .leaderboard-heading h2 { font-size: 24px; }
  .leaderboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .leaderboard-source-modes button,
  .leaderboard-modes button,
  .leaderboard-period-modes button { min-width: 0; min-height: 34px; padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #multiplayer-lobby .room-character-select.character-wheel button {
    transition: none !important;
  }
}

/* v207: stable centered stage and no legacy summary grid slot. The portrait
   stays fully visible above the bottom copy while the headshot rail keeps its
   own scroll position when a role is selected. */
#lobby:not(.boss-material-selection) > #lobby-character-view {
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

#lobby #lobby-character-view > .character-summary {
  display: none !important;
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  top: 0 !important;
  left: 50% !important;
  bottom: auto !important;
  width: min(42%, 300px) !important;
  height: calc(100% - 86px) !important;
  transform: translateX(calc(-50% + var(--stage-motion-x, 0px))) scale(var(--stage-motion-scale, 1)) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    width: min(56%, 230px) !important;
    height: calc(100% - 82px) !important;
  }
}

/* v206: final character-select composition. The stage owns the available
   height; copy is a real information rail and the roster stays anchored. */
#lobby #lobby-character-view {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto auto !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

#lobby #lobby-character-view > #lobby-map-select {
  grid-row: 1 !important;
  min-height: 0 !important;
}

#lobby #character-list.solo-character-picker {
  grid-row: 2 !important;
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

#lobby #lobby-character-view > .character-summary {
  display: none !important;
  grid-area: auto !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#lobby #lobby-character-view > .lobby-footer {
  grid-row: 3 !important;
}

#lobby .solo-character-stage,
#multiplayer-lobby.room-active .room-character-stage {
  position: relative !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  min-height: clamp(330px, 48vh, 560px) !important;
  height: clamp(330px, 48vh, 560px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  isolation: isolate;
  border-radius: 22px !important;
}

#lobby .solo-character-stage::after,
#multiplayer-lobby.room-active .room-character-stage::after {
  z-index: 1;
}

#lobby .solo-character-stage > .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-stage > #room-character-stage-portrait {
  position: absolute !important;
  z-index: 2 !important;
  inset: 12px 0 auto !important;
  width: min(64%, 390px) !important;
  height: min(72%, 360px) !important;
  max-width: 390px !important;
  max-height: 360px !important;
  margin: 0 auto !important;
  align-self: auto !important;
  justify-self: center !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  transform: scale(.92) !important;
  transform-origin: center bottom !important;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, .34));
  pointer-events: none;
}

#lobby .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-stage > .room-character-stage-copy {
  position: relative !important;
  z-index: 4 !important;
  grid-row: 2 !important;
  align-self: end !important;
  width: min(100%, 760px) !important;
  min-height: 92px !important;
  margin: 0 auto !important;
  padding: 14px clamp(18px, 4vw, 42px) 16px !important;
  text-align: center !important;
  background: linear-gradient(180deg, rgba(10, 12, 24, .02), rgba(10, 12, 24, .86) 28%, rgba(10, 12, 24, .94)) !important;
  border-top: 1px solid rgba(255, 255, 255, .12) !important;
  box-sizing: border-box !important;
}

#lobby .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-stage-copy h3 {
  margin: 0 !important;
  color: #fff8e7 !important;
  font-size: clamp(20px, 2.2vw, 30px) !important;
  line-height: 1.05 !important;
  letter-spacing: .02em !important;
}

#lobby .solo-character-stage-copy p,
#multiplayer-lobby.room-active .room-character-stage-copy p {
  max-width: 680px !important;
  margin: 6px auto 0 !important;
  color: rgba(255, 247, 231, .78) !important;
  font-size: clamp(12px, 1.1vw, 15px) !important;
  line-height: 1.45 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#lobby .solo-character-stage-copy .solo-character-stage-skill,
#multiplayer-lobby.room-active .room-character-stage-copy .room-character-stage-skill {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 7px !important;
  margin-top: 5px !important;
  color: var(--character-color, #efc56e) !important;
}

#lobby .solo-character-stage-copy .solo-character-stage-skill span,
#multiplayer-lobby.room-active .room-character-stage-copy .room-character-stage-skill span {
  color: rgba(255, 247, 231, .52) !important;
  font-size: 10px !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}

#lobby .solo-character-roster,
#multiplayer-lobby.room-active #room-character-roster {
  position: relative !important;
  z-index: 8 !important;
  display: flex !important;
  flex: none !important;
  width: 100% !important;
  min-height: 82px !important;
  height: 82px !important;
  margin: 0 !important;
  padding: 10px max(14px, env(safe-area-inset-left)) 10px max(14px, env(safe-area-inset-right)) !important;
  box-sizing: border-box !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: none !important;
  overscroll-behavior-x: contain !important;
  overflow-anchor: none !important;
  scrollbar-width: thin;
}

#lobby .solo-character-roster > *,
#multiplayer-lobby.room-active #room-character-roster > * {
  flex: 0 0 60px !important;
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  scroll-snap-align: none !important;
}

#multiplayer-lobby.room-active .room-panel {
  min-height: 0 !important;
}

#multiplayer-lobby.room-active #room-character-select {
  display: grid !important;
  grid-template-rows: minmax(330px, 1fr) auto !important;
  min-height: 0 !important;
  height: min(620px, 62vh) !important;
  overflow: hidden !important;
}

#multiplayer-lobby.room-active .room-actions {
  flex: 0 0 auto !important;
}

@media (max-width: 720px) {
  #lobby .solo-character-stage,
  #multiplayer-lobby.room-active .room-character-stage {
    min-height: 290px !important;
    height: min(54vh, 430px) !important;
    border-radius: 16px !important;
  }

  #lobby .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-stage > #room-character-stage-portrait {
    inset: 8px 0 auto !important;
    width: min(78%, 300px) !important;
    height: min(68%, 280px) !important;
    transform: scale(.88) !important;
  }

  #lobby .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-stage > .room-character-stage-copy {
    min-height: 84px !important;
    padding: 10px 14px 12px !important;
  }

  #lobby .solo-character-roster,
  #multiplayer-lobby.room-active #room-character-roster {
    height: 72px !important;
    min-height: 72px !important;
    gap: 8px !important;
  }

  #lobby .solo-character-roster > *,
  #multiplayer-lobby.room-active #room-character-roster > * {
    flex-basis: 52px !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
  }

  #multiplayer-lobby.room-active #room-character-select {
    height: min(510px, 60vh) !important;
    grid-template-rows: minmax(290px, 1fr) auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #lobby .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-stage > #room-character-stage-portrait {
    transition: none !important;
  }
}

/* v207: override legacy carousel positioning after all historical rules. */
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 330px !important;
  height: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
  position: relative !important;
  inset: auto !important;
  grid-row: 2 !important;
  grid-column: 1 !important;
  align-self: stretch !important;
  width: min(100%, 760px) !important;
  min-height: 108px !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 12px 28px 14px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > p:first-child,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > p:first-child {
  margin-top: 0 !important;
  font-size: 11px !important;
  color: rgba(255, 247, 231, .52) !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > strong {
  display: inline-block !important;
  margin-left: 8px !important;
  color: var(--character-color, #efc56e) !important;
  font-size: 13px !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  max-width: 680px !important;
  margin: 5px auto 0 !important;
  text-align: left !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro span {
  flex: 0 0 auto !important;
  color: var(--character-color, #efc56e) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro p {
  min-width: 0 !important;
  margin: 0 !important;
  text-align: left !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
  position: absolute !important;
  inset: 8px 0 108px !important;
  z-index: 2 !important;
  width: min(66%, 390px) !important;
  height: auto !important;
  max-width: 390px !important;
  max-height: calc(100% - 116px) !important;
  margin: auto !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  transform: scale(.86) !important;
  transform-origin: center bottom !important;
}

#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-roster,
#multiplayer-lobby.room-active #room-character-select > #room-character-roster {
  position: relative !important;
  inset: auto !important;
  grid-row: 2 !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  z-index: 8 !important;
}

#lobby:not(.boss-material-selection) > #lobby-character-view {
  grid-template-columns: minmax(92px, 122px) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
}

#lobby:not(.boss-material-selection) > #lobby-character-view > #character-list.solo-character-picker {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 64px !important;
  min-height: 0 !important;
  height: auto !important;
}

@media (max-width: 720px) {
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage {
    min-height: 290px !important;
  }

  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
    min-height: 92px !important;
    padding: 10px 14px 12px !important;
  }

  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
    inset: 6px 0 92px !important;
    width: min(78%, 300px) !important;
    max-height: calc(100% - 100px) !important;
    transform: scale(.8) !important;
  }

  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro {
    display: block !important;
  }
}

/* v205: final character-select composition. The stage is the focal point,
   while the compact portrait dock stays anchored and never reflows the page. */
#lobby:not(.boss-material-selection) > #lobby-character-view {
  grid-template-columns: minmax(92px, 122px) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 12px !important;
  row-gap: 10px !important;
  padding: 12px !important;
}

#lobby:not(.boss-material-selection) > #lobby-character-view > #lobby-map-select {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: start !important;
}

#lobby:not(.boss-material-selection) > #lobby-character-view > #character-list.solo-character-picker {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 8px !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 64px !important;
  gap: 8px !important;
}

#lobby:not(.boss-material-selection) > #lobby-character-view > .character-summary {
  display: none !important;
}

#lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  min-height: 58px !important;
  padding: 0 !important;
  border-top: 1px solid rgba(74, 123, 104, .24);
}

#lobby #character-list.solo-character-picker .solo-character-stage,
#multiplayer-lobby.room-active .room-character-select .room-character-stage {
  position: relative !important;
  inset: auto !important;
  grid-row: 1 !important;
  grid-column: 1 !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 50% 34%, rgba(91, 149, 108, .2), transparent 38%),
    linear-gradient(180deg, #2a5038 0%, #1d3929 68%, #14281c 100%) !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
  position: absolute !important;
  right: 12px !important;
  bottom: 10px !important;
  left: 12px !important;
  z-index: 4 !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 8px 12px 7px !important;
  overflow: hidden !important;
  border: 1px solid rgba(239, 211, 129, .28) !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, rgba(10, 25, 15, .35), rgba(7, 18, 11, .86)) !important;
  box-shadow: 0 7px 18px rgba(3, 11, 6, .22), inset 0 1px rgba(255, 255, 255, .08) !important;
  backdrop-filter: blur(5px);
  text-align: center !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > p:first-child,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-state {
  margin: 0 0 2px !important;
  color: rgba(219, 235, 215, .72) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
  display: inline-block !important;
  margin: 0 !important;
  color: #fff2c9 !important;
  font-size: clamp(22px, 3vw, 30px) !important;
  line-height: 1.05 !important;
  vertical-align: baseline;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  display: inline-flex !important;
  margin: 0 0 0 9px !important;
  color: var(--character-color, #e7ca74) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  vertical-align: baseline;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  display: block !important;
  max-width: 760px;
  margin: 3px auto 0 !important;
  color: rgba(226, 237, 221, .82) !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  text-align: center !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro span {
  display: inline-block !important;
  margin-right: 5px;
  color: #e7ca74 !important;
  font-weight: 800;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro p {
  display: inline !important;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
}

#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  display: inline-flex !important;
  gap: 5px !important;
  margin-top: 0 !important;
}

#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill span {
  display: none !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  position: absolute !important;
  left: 50% !important;
  bottom: 64px !important;
  z-index: 1 !important;
  width: min(44%, 286px) !important;
  height: calc(100% - 72px) !important;
  max-height: none !important;
  min-height: 0 !important;
  transform: translateX(-50%) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  filter: drop-shadow(0 13px 11px rgba(0, 0, 0, .34)) !important;
}

#lobby #character-list.solo-character-picker .solo-character-roster,
#multiplayer-lobby.room-active .room-character-select .room-character-roster {
  position: relative !important;
  inset: auto !important;
  grid-row: 2 !important;
  grid-column: 1 !important;
  z-index: 5 !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  background: rgba(8, 20, 12, .88) !important;
}

#lobby #character-list.solo-character-picker .solo-character-roster::before,
#multiplayer-lobby.room-active .room-character-select .room-character-roster::before {
  display: none !important;
}

#lobby .solo-character-roster .character-option,
#multiplayer-lobby.room-active .room-character-roster-option {
  position: relative !important;
  flex: 0 0 52px !important;
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 2px !important;
  border-radius: 6px !important;
  transform: none !important;
}

#lobby .solo-character-roster .character-option.active,
#multiplayer-lobby.room-active .room-character-roster-option.active {
  transform: translateY(-3px) !important;
  box-shadow: 0 0 0 1px rgba(240, 212, 123, .42), 0 6px 14px rgba(2, 10, 5, .36) !important;
}

/* A character-specific spotlight for characters whose skill is a howl/call. */
#lobby .solo-character-stage[data-effect="spotlight"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="spotlight"]::before {
  top: -14%;
  left: 50%;
  width: 34%;
  height: 118%;
  border: 0;
  background: linear-gradient(180deg, rgba(255, 246, 194, .55), rgba(255, 220, 115, .12) 48%, transparent 82%);
  filter: blur(5px);
  transform: translateX(-50%) scaleY(.35);
  transform-origin: 50% 0;
}

#lobby .solo-character-stage[data-effect="spotlight"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="spotlight"]::after {
  top: auto;
  right: 22%;
  bottom: 26%;
  left: 22%;
  width: auto;
  height: 22%;
  border: 2px solid rgba(255, 222, 120, .85);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 22px rgba(255, 220, 113, .42), inset 0 0 16px rgba(255, 220, 113, .25);
  transform: scale(.2);
}

#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="spotlight"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="spotlight"]::before {
  animation: stage-spotlight-beam 700ms ease-out both;
}

#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="spotlight"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="spotlight"]::after {
  animation: stage-spotlight-ring 700ms ease-out both;
}

@keyframes stage-spotlight-beam {
  0% { opacity: 0; transform: translateX(-50%) scaleY(.2); }
  30% { opacity: .9; transform: translateX(-50%) scaleY(1); }
  100% { opacity: 0; transform: translateX(-50%) scaleY(1.04); }
}

@keyframes stage-spotlight-ring {
  0% { opacity: 0; transform: scale(.2); }
  34% { opacity: .95; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.22); }
}

@media (max-width: 760px) {
  #lobby:not(.boss-material-selection) > #lobby-character-view {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(280px, 1fr) auto !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  #lobby:not(.boss-material-selection) > #lobby-character-view > #lobby-map-select {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  #lobby:not(.boss-material-selection) > #lobby-character-view > #character-list.solo-character-picker {
    grid-column: 1 !important;
    grid-row: 2 !important;
    grid-template-rows: minmax(0, 1fr) 56px !important;
  }

  #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage {
    min-height: 0 !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    width: min(52%, 230px) !important;
    height: calc(100% - 66px) !important;
    bottom: 58px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-roster,
  #multiplayer-lobby.room-active .room-character-select .room-character-roster {
    height: 56px !important;
    min-height: 56px !important;
  }

  #lobby .solo-character-roster .character-option,
  #multiplayer-lobby.room-active .room-character-roster-option {
    flex-basis: 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
  }

  #lobby .solo-character-roster .character-portrait,
  #multiplayer-lobby.room-active .room-character-roster-option > img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
    right: 7px !important;
    bottom: 7px !important;
    left: 7px !important;
    padding: 6px 8px 5px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
    font-size: 22px !important;
  }
}

/* The legacy lobby grid can resolve the character row below the stage's
   intrinsic height on narrow Toy screens. Reserve both stage and roster rows. */
@media (max-width: 760px) {
  #lobby > #lobby-character-view {
    grid-template-rows: auto 322px auto auto !important;
  }

  #lobby #character-list.solo-character-picker {
    height: 322px !important;
    min-height: 322px !important;
    max-height: 322px !important;
    grid-template-rows: 220px 76px !important;
    overflow: hidden !important;
  }
}

/* v200: unified character selection. A fixed stage keeps transparent character
   art inside the viewport; the compact roster makes every role reachable. */
#lobby #character-list.solo-character-picker {
  display: grid !important;
  grid-template-rows: minmax(210px, 1fr) 94px;
  gap: 9px;
  min-width: 0;
  min-height: 0;
  height: min(52vh, 490px);
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(65, 107, 80, .3);
  border-radius: 8px;
  background: #173023;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 10px 22px rgba(5, 20, 10, .16);
  contain: layout paint;
}

#lobby .solo-character-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(142px, 43%);
  align-items: end;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--character-color, #d7bd72) 38%, transparent);
  border-radius: 6px;
  background: #22412f;
  box-shadow: inset 0 -44px 0 rgba(4, 16, 8, .18), inset 0 1px rgba(255, 255, 255, .05);
}

#lobby .solo-character-stage::before,
#lobby .solo-character-stage::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}

#lobby .solo-character-stage::before {
  right: 8%;
  bottom: 10%;
  width: 42%;
  height: 8px;
  border: 2px solid var(--character-color, #e7ca74);
  border-radius: 50%;
  transform: rotate(-20deg) scaleX(.2);
}

#lobby .solo-character-stage::after {
  top: 44%;
  right: 7%;
  width: 45%;
  height: 3px;
  background: var(--character-color, #e7ca74);
  box-shadow: 0 0 10px var(--character-color, #e7ca74);
  transform: rotate(-24deg) scaleX(.15);
  transform-origin: 100% 50%;
}

#lobby .solo-character-stage[data-effect="laser"]::after {
  width: 72%;
  height: 4px;
  transform: rotate(0deg) scaleX(.1);
}

#lobby .solo-character-stage[data-effect="domain"]::before,
#lobby .solo-character-stage[data-effect="gas"]::before {
  width: 52%;
  height: 28%;
  border-width: 5px;
  transform: scale(.25);
}

#lobby .solo-character-stage[data-effect="quake"]::after {
  top: auto;
  right: 10%;
  bottom: 14%;
  width: 54%;
  transform: none;
}

#lobby .solo-character-stage-copy {
  z-index: 1;
  align-self: center;
  min-width: 0;
  padding: 20px 12px 20px 22px;
}

#lobby .solo-character-stage-copy p {
  margin: 0 0 8px;
  color: #c0d6c2;
  font-size: 12px;
  line-height: 1.35;
}

#lobby .solo-character-stage-copy h3 {
  margin: 0;
  color: #fff1c9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

#lobby .solo-character-stage-copy strong {
  display: block;
  margin-top: 10px;
  color: var(--character-color, #e7ca74);
  font-size: 15px;
}

#lobby .solo-character-stage-portrait {
  z-index: 1;
  align-self: end;
  justify-self: center;
  width: min(100%, 330px);
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .28));
}

#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage::before,
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage::after {
  animation: character-stage-effect 480ms cubic-bezier(.2, .75, .25, 1) both;
}

#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-portrait {
  animation: character-stage-attack 480ms cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes character-stage-effect {
  0% { opacity: 0; }
  35% { opacity: .95; transform: translateX(-4px) rotate(-20deg) scaleX(1); }
  100% { opacity: 0; transform: translateX(18px) rotate(-20deg) scaleX(1.08); }
}

@keyframes character-stage-attack {
  0%, 100% { transform: translateX(0) scale(1); }
  35% { transform: translateX(-7px) scale(.985); }
  65% { transform: translateX(13px) scale(1.035); }
}

#lobby .solo-character-roster {
  display: flex;
  min-width: 0;
  gap: 7px;
  padding: 1px 1px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(231, 202, 116, .5) transparent;
  scrollbar-width: thin;
  touch-action: pan-x;
}

#lobby .solo-character-roster .character-option {
  position: relative;
  display: grid;
  flex: 0 0 76px;
  grid-template-rows: 54px auto;
  align-content: center;
  justify-items: center;
  min-width: 76px;
  min-height: 82px;
  margin: 0;
  padding: 4px 4px 5px;
  overflow: hidden;
  border: 1px solid rgba(204, 225, 199, .25);
  border-radius: 6px;
  color: #d9e8d6;
  background: #213a2b;
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
  opacity: 1;
  filter: none;
  transform: none;
  scroll-snap-align: center;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

#lobby .solo-character-roster .character-option:hover,
#lobby .solo-character-roster .character-option:focus-visible,
#lobby .solo-character-roster .character-option.active {
  border-color: var(--character-color, #e7ca74);
  background: #2b4a35;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--character-color, #e7ca74) 42%, transparent), 0 0 12px color-mix(in srgb, var(--character-color, #e7ca74) 20%, transparent);
}

#lobby .solo-character-roster .character-option.locked {
  opacity: .62;
}

#lobby .solo-character-roster .character-option.locked::after,
#multiplayer-lobby.room-active .room-character-roster-option.is-locked::after {
  content: "锁";
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 237, 190, .45);
  border-radius: 50%;
  color: #fff2c4;
  background: rgba(31, 42, 28, .88);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

#lobby .solo-character-roster .character-portrait {
  display: grid;
  width: 100%;
  height: 54px;
  place-items: end center;
  overflow: hidden;
}

#lobby .solo-character-roster .character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

#lobby .solo-character-roster .character-option-label {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#lobby .solo-character-roster .character-option-label strong {
  font: inherit;
}

#multiplayer-lobby.room-active .room-character-stage {
  border-color: color-mix(in srgb, var(--character-stage-color, #e7ca74) 38%, transparent);
}

#multiplayer-lobby.room-active .room-character-stage::before {
  border: 2px solid var(--character-stage-color, #e7ca74);
  background: var(--character-stage-color, #e7ca74);
}

#multiplayer-lobby.room-active .room-character-stage[data-effect="laser"]::before {
  top: 48%;
  right: 3%;
  width: 70%;
  height: 3px;
  border: 0;
  transform: scaleX(.16);
}

#multiplayer-lobby.room-active .room-character-stage[data-effect="domain"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="gas"]::before {
  top: 38%;
  width: 40%;
  height: 22%;
  border-width: 5px;
  background: transparent;
  transform: scale(.25);
}

#multiplayer-lobby.room-active .room-character-roster-option.is-locked {
  opacity: .64 !important;
}

#multiplayer-lobby.room-active .room-character-roster-option.is-locked:hover:not(:disabled),
#multiplayer-lobby.room-active .room-character-roster-option.is-locked:focus-visible {
  border-color: #e7ca74 !important;
  background: #2b4a35 !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker {
    grid-template-rows: minmax(194px, 1fr) 82px;
    height: min(48vh, 340px);
    padding: 7px;
    gap: 7px;
  }

  #lobby .solo-character-stage {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 42%);
  }

  #lobby .solo-character-stage-copy {
    padding: 15px 6px 15px 15px;
  }

  #lobby .solo-character-stage-copy p {
    font-size: 11px;
  }

  #lobby .solo-character-stage-copy strong {
    margin-top: 7px;
    font-size: 13px;
  }

  #lobby .solo-character-roster .character-option {
    flex-basis: 66px;
    min-width: 66px;
    min-height: 70px;
    grid-template-rows: 46px auto;
  }

  #lobby .solo-character-roster .character-portrait {
    height: 46px;
  }

  #lobby .solo-character-roster .character-option-label {
    font-size: 10px;
    line-height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage::before,
  #lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage::after,
  #lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-portrait {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #lobby-start,
  #lobby-multiplayer,
  #shop-tabs button,
  .lobby-map-select .map-region-card {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  #lobby-start:active,
  #lobby-multiplayer:active,
  #shop-tabs button:hover,
  .lobby-map-select .map-region-card:hover {
    transform: none !important;
  }
}

/* v194: Toy mobile lobby action dock and stage composition.
   The Toy build only exposes start + reward actions, so the mobile layout
   must size itself from those visible controls instead of legacy placeholders. */
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) {
    gap: 6px;
    padding: max(8px, env(safe-area-inset-top)) 9px max(8px, env(safe-area-inset-bottom));
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) > .lobby-header {
    flex-basis: 52px;
    height: 52px;
    border-radius: 10px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) > .lobby-tabs {
    flex-basis: 40px;
    height: 40px;
    padding: 4px;
    border-radius: 9px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) > .lobby-tabs button {
    min-height: 32px;
    border-radius: 6px;
    font-size: 11px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(205px, 1fr) 96px 128px;
    align-content: start;
    gap: 7px;
    padding: 7px 6px max(8px, env(safe-area-inset-bottom));
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(242, 250, 245, .98), rgba(208, 235, 225, .96));
    box-shadow: 0 12px 28px rgba(2, 12, 8, .24), inset 0 1px rgba(255, 255, 255, .55);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) #lobby-map-select {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 0;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) #lobby-map-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) #lobby-map-select .map-region-card {
    min-height: 58px;
    padding: 6px;
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 5px;
    border-width: 1px;
    border-radius: 8px;
    box-shadow: 0 3px 0 rgba(22, 50, 43, .76);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) #lobby-map-select .map-region-icon {
    width: 26px;
    height: 26px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) #lobby-map-select .lobby-guide-entry {
    grid-column: 1 / -1;
    min-height: 38px;
    border-radius: 8px;
    border-width: 1px;
    background: linear-gradient(180deg, #1e7561, #155949);
    box-shadow: 0 3px 0 #0d4138;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: auto !important;
    min-height: 205px !important;
    max-height: none !important;
    margin: 0;
    border: 1px solid rgba(75, 133, 112, .42);
    border-radius: 10px;
    background: radial-gradient(circle at 50% 44%, rgba(255, 255, 255, .78), rgba(217, 239, 230, .18) 55%, rgba(111, 168, 144, .15));
    box-shadow: inset 0 -18px 24px rgba(56, 113, 93, .11);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel .character-option {
    width: min(132px, 34vw) !important;
    height: calc(100% - 8px) !important;
    bottom: 4px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel .character-wheel-nav {
    width: 34px;
    height: 52px;
    min-width: 34px;
    min-height: 52px;
    border-radius: 9px;
    font-size: 23px;
    background: rgba(31, 66, 51, .86);
    box-shadow: 0 5px 12px rgba(24, 49, 37, .22);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-summary {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    min-height: 82px;
    padding: 9px 10px;
    gap: 10px;
    border: 1px solid rgba(74, 123, 104, .42);
    border-radius: 9px;
    background: rgba(247, 253, 248, .86);
    box-shadow: 0 4px 0 rgba(73, 130, 108, .24);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-identity h1 {
    font-size: clamp(25px, 8vw, 33px);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-skill-summary h3 {
    font-size: 16px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-skill-summary p {
    font-size: 10px;
    line-height: 1.35;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer {
    grid-column: 1;
    grid-row: 4;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    padding: 0;
    border-top: 0;
    background: transparent;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer > button {
    flex: 0 0 auto;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-radius: 9px;
    touch-action: manipulation;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start {
    order: 1;
    min-height: 58px;
    padding: 0 18px;
    color: #27331d;
    border: 2px solid #f4d467;
    background: linear-gradient(180deg, #ffe18a 0%, #f3b936 100%);
    box-shadow: 0 4px 0 #b9791f, 0 8px 14px rgba(99, 71, 18, .18);
    font-size: 17px;
    letter-spacing: .02em;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin: 0 8px 1px 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid currentColor;
    vertical-align: middle;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) {
    order: 2;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    min-height: 54px;
    padding: 7px 12px;
    border: 1px solid rgba(219, 190, 91, .66);
    color: #f6ebbb;
    background: linear-gradient(135deg, #315f4d, #244b3e);
    box-shadow: 0 3px 0 #163a31;
    text-align: left;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden)::before {
    content: "+2";
    grid-row: 1 / -1;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border: 1px solid rgba(246, 218, 121, .75);
    border-radius: 50%;
    color: #ffe69a;
    background: rgba(10, 31, 24, .34);
    font-size: 11px;
    font-weight: 900;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward span,
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward small {
    grid-column: 2;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward span {
    font-size: 13px;
    font-weight: 900;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward small {
    margin-top: 1px;
    color: #c4d8c1;
    font-size: 9px;
    line-height: 1.25;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start:active,
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:active {
    transform: translateY(2px);
    filter: brightness(.97);
  }
}

@media (max-width: 360px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view {
    padding-inline: 4px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) #lobby-map-select .map-region-card {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 4px;
    padding-inline: 4px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) #lobby-map-select .map-region-copy strong {
    font-size: 11px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel .character-option {
    width: 116px !important;
  }
}

/* v196 final override: room chat was removed from the product surface. Keep
   this rule last so legacy mobile selectors in styles.css cannot re-enable it. */
#multiplayer-lobby .room-chat,
#multiplayer-lobby .room-chat-form,
#multiplayer-lobby .room-chat-messages,
#multiplayer-lobby.room-active .room-chat,
#multiplayer-lobby.room-active .room-chat-form,
#multiplayer-lobby.room-active .room-chat-messages {
  display: none !important;
}

/* v195: turn the Toy lobby into a composed mobile stage instead of leaving
   the flex item's unused height below the action dock. The wheel keeps a
   controlled card height so taller phones gain breathing room without
   stretching portraits into oversized cards. */
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    grid-template-rows: auto minmax(280px, 1fr) auto auto;
    align-content: stretch;
    overflow: hidden;
    background:
      linear-gradient(180deg, rgba(242, 250, 245, .98), rgba(208, 235, 225, .96)),
      radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .34), transparent 58%);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel {
    position: relative;
    height: 100% !important;
    min-height: 280px !important;
    max-height: none !important;
    overflow: hidden !important;
    isolation: isolate;
    border-color: rgba(75, 133, 112, .5);
    background:
      radial-gradient(ellipse at 50% 68%, rgba(255, 255, 255, .88) 0 12%, rgba(235, 249, 241, .56) 34%, transparent 70%),
      linear-gradient(180deg, rgba(232, 247, 239, .72), rgba(189, 225, 209, .34));
    box-shadow: inset 0 -28px 32px rgba(56, 113, 93, .12), inset 0 1px rgba(255, 255, 255, .7);
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel::before {
    content: "";
    position: absolute;
    right: 12%;
    bottom: 9%;
    left: 12%;
    height: 14%;
    z-index: -1;
    border-radius: 50%;
    background: rgba(67, 132, 106, .14);
    filter: blur(10px);
    pointer-events: none;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel .character-option {
    height: min(calc(100% - 8px), 340px) !important;
    min-height: 0 !important;
    bottom: 4px;
  }

  /* The intro offset is useful on desktop but makes a narrow Toy viewport
     capture a half-visible character before the 220ms settle timer fires. */
  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel.is-initial-position {
    --wheel-intro-x: 0px !important;
  }
}

@media (min-width: 461px) and (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1.42fr) minmax(150px, .88fr) !important;
    grid-template-rows: minmax(58px, auto) !important;
    grid-auto-rows: 0 !important;
    align-items: stretch;
    gap: 8px;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start,
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) {
    min-height: 58px;
  }
}

@media (max-width: 460px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    grid-auto-rows: 0 !important;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel .character-option {
    height: min(calc(100% - 8px), 304px) !important;
  }
}

@media (max-width: 360px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view {
    grid-template-rows: auto minmax(254px, 1fr) auto auto;
  }

  body.toy-ranked-only #lobby:not(.boss-material-selection) .character-list.character-wheel {
    min-height: 254px !important;
  }
}

/* v197: a fixed character stage replaces the room wheel. Room snapshots now
   update content inside stable bounds instead of continuously relocating cards. */
#multiplayer-lobby.room-active .room-panel {
  grid-template-columns: minmax(188px, 218px) minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(420px, 1fr) auto !important;
  align-items: stretch;
}

#multiplayer-lobby.room-active .room-players {
  grid-column: 1 !important;
  grid-row: 3 !important;
  overflow: auto;
}

#multiplayer-lobby.room-active .room-character-select {
  position: relative !important;
  display: grid !important;
  grid-column: 2 !important;
  grid-row: 3 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 100px !important;
  gap: 9px !important;
  min-height: 420px !important;
  height: min(58vh, 540px) !important;
  padding: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(183, 212, 178, .24) !important;
  border-radius: 8px !important;
  background: #17291d !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 12px 26px rgba(0, 0, 0, .2) !important;
  contain: layout paint;
}

#multiplayer-lobby.room-active .room-character-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 44%);
  align-items: end;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 197, 116, .2);
  border-radius: 6px;
  background: #203827;
  box-shadow: inset 0 -52px 0 rgba(8, 21, 12, .16), inset 0 1px rgba(255, 255, 255, .05);
}

#multiplayer-lobby.room-active .room-character-stage::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 9%;
  left: 8%;
  height: 10px;
  border-radius: 50%;
  background: rgba(7, 16, 9, .3);
  filter: blur(7px);
  pointer-events: none;
}

#multiplayer-lobby.room-active .room-character-stage::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 43%;
  right: 7%;
  width: 46%;
  height: 9px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 244, 193, .96), rgba(240, 191, 76, .94), transparent);
  box-shadow: 0 0 12px rgba(241, 204, 101, .58);
  pointer-events: none;
  transform: rotate(-22deg) scaleX(.18);
  transform-origin: 100% 50%;
}

#multiplayer-lobby.room-active .room-character-stage-copy {
  z-index: 1;
  align-self: center;
  padding: 36px;
  padding-right: 8px;
}

#multiplayer-lobby.room-active .room-character-stage-state {
  min-height: 18px;
  margin: 0 0 10px;
  color: #b9ceba;
  font-size: 12px;
  line-height: 1.45;
}

#multiplayer-lobby.room-active .room-character-stage h3 {
  margin: 0;
  color: #f6edce !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

#multiplayer-lobby.room-active .room-character-stage-skill {
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
}

#multiplayer-lobby.room-active .room-character-stage-skill span {
  color: #8fa98f;
  font-size: 11px;
  font-weight: 700;
}

#multiplayer-lobby.room-active .room-character-stage-skill strong {
  color: #e7ca74 !important;
  font-size: 16px;
  line-height: 1.35;
}

#multiplayer-lobby.room-active .room-character-stage-portrait {
  z-index: 1;
  align-self: end;
  justify-self: center;
  width: min(100%, 350px) !important;
  height: 100% !important;
  max-height: 390px;
  min-height: 0 !important;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .25));
}

#multiplayer-lobby.room-active .room-character-stage.is-attacking::before {
  animation: room-stage-slash 460ms cubic-bezier(.2, .75, .25, 1) both;
}

#multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-portrait {
  animation: room-stage-attack 460ms cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes room-stage-slash {
  0% { opacity: 0; transform: translateX(-26px) rotate(-22deg) scaleX(.18); }
  38% { opacity: .95; transform: translateX(0) rotate(-22deg) scaleX(1); }
  100% { opacity: 0; transform: translateX(18px) rotate(-22deg) scaleX(1.12); }
}

@keyframes room-stage-attack {
  0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
  34% { transform: translateX(-8px) rotate(-1deg) scale(.985); }
  62% { transform: translateX(14px) rotate(2deg) scale(1.035); }
}

#multiplayer-lobby.room-active .room-character-roster {
  display: flex;
  min-width: 0;
  gap: 8px;
  padding: 2px 1px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(231, 202, 116, .48) transparent;
  scrollbar-width: thin;
  touch-action: pan-x;
}

#multiplayer-lobby.room-active .room-character-roster-option {
  position: relative !important;
  display: grid !important;
  flex: 0 0 84px;
  grid-template-rows: 54px auto !important;
  align-content: center;
  justify-items: center;
  min-width: 84px !important;
  min-height: 84px !important;
  height: 84px !important;
  margin: 0 !important;
  padding: 5px 5px 6px !important;
  overflow: hidden;
  border: 1px solid rgba(192, 215, 188, .22) !important;
  border-radius: 6px !important;
  color: #d7e4d4 !important;
  background: #21362a !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .045) !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  scroll-snap-align: center;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease !important;
}

#multiplayer-lobby.room-active .room-character-roster-option:hover:not(:disabled),
#multiplayer-lobby.room-active .room-character-roster-option:focus-visible {
  border-color: rgba(243, 221, 139, .76) !important;
  background: #294532 !important;
  outline: none;
}

#multiplayer-lobby.room-active .room-character-roster-option:focus-visible {
  box-shadow: 0 0 0 2px rgba(241, 213, 116, .55), inset 0 1px rgba(255, 255, 255, .045) !important;
}

#multiplayer-lobby.room-active .room-character-roster-option.active {
  border-color: #edcf75 !important;
  color: #fff4cf !important;
  background: #35533a !important;
  box-shadow: inset 0 0 0 1px rgba(255, 242, 188, .25), 0 0 0 1px rgba(237, 207, 117, .2) !important;
}

#multiplayer-lobby.room-active .room-character-roster-option:disabled {
  cursor: default;
}

#multiplayer-lobby.room-active .room-character-roster-option img {
  width: 100% !important;
  height: 54px !important;
  min-height: 0 !important;
  object-fit: contain;
  filter: none !important;
}

#multiplayer-lobby.room-active .room-character-roster-option span {
  width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#multiplayer-lobby.room-active .room-actions {
  grid-column: 1 / -1 !important;
  grid-row: 4 !important;
}

@media (max-width: 760px) {
  #multiplayer-lobby.room-active .room-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto minmax(342px, 1fr) auto !important;
  }

  #multiplayer-lobby.room-active .room-players {
    grid-column: 1 !important;
    grid-row: 3 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #multiplayer-lobby.room-active .room-character-select {
    grid-column: 1 !important;
    grid-row: 4 !important;
    grid-template-rows: minmax(0, 1fr) 82px !important;
    min-height: 342px !important;
    height: 342px !important;
    padding: 8px !important;
  }

  #multiplayer-lobby.room-active .room-character-stage {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 42%);
  }

  #multiplayer-lobby.room-active .room-character-stage-copy {
    padding: 18px;
    padding-right: 2px;
  }

  #multiplayer-lobby.room-active .room-character-stage h3 {
    font-size: 30px;
  }

  #multiplayer-lobby.room-active .room-character-stage-skill {
    margin-top: 12px;
  }

  #multiplayer-lobby.room-active .room-character-stage-portrait {
    width: min(100%, 230px) !important;
    height: min(100%, 242px) !important;
  }

  #multiplayer-lobby.room-active .room-character-roster {
    gap: 6px;
  }

  #multiplayer-lobby.room-active .room-character-roster-option {
    flex-basis: 70px;
    grid-template-rows: 44px auto !important;
    min-width: 70px !important;
    min-height: 70px !important;
    height: 70px !important;
    padding: 3px !important;
  }

  #multiplayer-lobby.room-active .room-character-roster-option img {
    height: 44px !important;
  }

  #multiplayer-lobby.room-active .room-character-roster-option span {
    font-size: 10px;
    line-height: 15px;
  }

  #multiplayer-lobby.room-active .room-actions {
    grid-column: 1 !important;
    grid-row: 5 !important;
  }
}

@media (max-width: 380px) {
  #multiplayer-lobby.room-active .room-character-select {
    min-height: 322px !important;
    height: 322px !important;
  }

  #multiplayer-lobby.room-active .room-character-stage-copy {
    padding: 14px;
    padding-right: 0;
  }

  #multiplayer-lobby.room-active .room-character-stage h3 {
    font-size: 26px;
  }
}

/* v201: roster entries are avatars, not miniature character cards. Keep the
   selection strip scannable by framing a square head crop and moving the name
   into a quiet caption below it. */
#lobby .solo-character-roster .character-option {
  flex-basis: 70px;
  min-width: 70px;
  min-height: 78px;
  height: 78px;
  grid-template-rows: 58px 15px;
  padding: 3px 4px 2px;
}

#lobby .solo-character-roster .character-portrait {
  width: 58px;
  height: 58px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(231, 202, 116, .28);
  border-radius: 8px;
  background: #16281e;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

#lobby .solo-character-roster .character-portrait img {
  width: 148%;
  height: 148%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 50% 16%;
}

#multiplayer-lobby.room-active .room-character-roster-option {
  flex-basis: 70px;
  min-width: 70px !important;
  min-height: 78px !important;
  height: 78px !important;
  grid-template-rows: 58px 15px !important;
  padding: 3px 4px 2px !important;
}

#multiplayer-lobby.room-active .room-character-roster-option img {
  width: 86px !important;
  height: 86px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: 50% 16%;
  border: 1px solid rgba(231, 202, 116, .28);
  border-radius: 8px;
  background: #16281e;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

@media (max-width: 760px) {
  #lobby .solo-character-roster .character-option {
    flex-basis: 62px;
    min-width: 62px;
    min-height: 70px;
    height: 70px;
    grid-template-rows: 50px 14px;
    padding: 2px 2px 1px;
  }

  #lobby .solo-character-roster .character-portrait,
  #multiplayer-lobby.room-active .room-character-roster-option img {
    width: 50px;
    height: 50px;
  }

  #lobby .solo-character-roster .character-portrait img {
    width: 128%;
    height: 128%;
  }

  #multiplayer-lobby.room-active .room-character-roster-option img {
    width: 72px !important;
    height: 72px !important;
  }

  #multiplayer-lobby.room-active .room-character-roster-option {
    flex-basis: 62px;
    min-width: 62px !important;
    min-height: 70px !important;
    height: 70px !important;
    grid-template-rows: 50px 14px !important;
    padding: 2px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #multiplayer-lobby.room-active .room-character-roster,
  #multiplayer-lobby.room-active .room-character-roster-option {
    scroll-behavior: auto;
    transition: none !important;
  }

  #multiplayer-lobby.room-active .room-character-stage.is-attacking::before,
  #multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-portrait {
    animation: none;
  }
}

/* v202: the roster is part of the stage composition.  Keep the character
   preview as one continuous surface and dock the headshot strip over its
   lower edge, matching the compact hero-select treatment requested for both
   solo and multiplayer. */
#lobby #character-list.solo-character-picker,
#multiplayer-lobby.room-active .room-character-select {
  position: relative !important;
  display: block !important;
  height: min(52vh, 490px) !important;
  min-height: 320px !important;
  padding: 10px !important;
  overflow: hidden !important;
  border-radius: 9px !important;
  background: #13261b !important;
  isolation: isolate;
}

#lobby #character-list.solo-character-picker .solo-character-stage,
#multiplayer-lobby.room-active .room-character-select .room-character-stage {
  position: absolute !important;
  inset: 10px !important;
  z-index: 0;
  display: grid !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 7px !important;
  background: #203c2b !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage::after,
#multiplayer-lobby.room-active .room-character-select .room-character-stage::after {
  z-index: 0;
  opacity: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 15, 8, .12) 72%, rgba(4, 13, 7, .7) 100%);
  filter: none;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
  z-index: 2;
  align-self: start;
  max-width: 52%;
  padding: clamp(18px, 3vw, 32px) 12px clamp(90px, 12%, 132px) clamp(18px, 4vw, 40px) !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  z-index: 1;
  align-self: end;
  max-height: none !important;
  height: 100% !important;
  padding-bottom: 34px;
}

#lobby #character-list.solo-character-picker .solo-character-roster,
#multiplayer-lobby.room-active .room-character-select .room-character-roster {
  position: absolute !important;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 4;
  display: flex !important;
  align-items: center;
  gap: 7px;
  height: 82px;
  min-height: 0;
  padding: 7px 8px 6px !important;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(231, 202, 116, .25);
  border-radius: 8px;
  background: rgba(9, 22, 14, .86);
  box-shadow: 0 -8px 24px rgba(3, 12, 7, .24), inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(7px);
}

#lobby #character-list.solo-character-picker .solo-character-roster::before,
#multiplayer-lobby.room-active .room-character-select .room-character-roster::before {
  content: "角色";
  flex: 0 0 auto;
  align-self: stretch;
  display: grid;
  place-items: center;
  width: 18px;
  color: rgba(243, 224, 166, .72);
  font-size: 10px;
  font-weight: 800;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
  border-right: 1px solid rgba(231, 202, 116, .18);
}

#lobby .solo-character-roster .character-option,
#multiplayer-lobby.room-active .room-character-roster-option {
  flex: 0 0 62px !important;
  width: 62px !important;
  min-width: 62px !important;
  height: 68px !important;
  min-height: 68px !important;
  grid-template-rows: 49px 14px !important;
  gap: 2px;
  padding: 3px 3px 2px !important;
  border-radius: 6px !important;
  background: rgba(31, 57, 40, .86) !important;
}

#lobby .solo-character-roster .character-portrait,
#multiplayer-lobby.room-active .room-character-roster-option img {
  width: 49px !important;
  height: 49px !important;
  min-height: 0 !important;
  overflow: hidden;
  border-radius: 5px;
  background: #102319;
}

#lobby .solo-character-roster .character-portrait img,
#multiplayer-lobby.room-active .room-character-roster-option img {
  width: 136% !important;
  height: 136% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: 50% 16% !important;
}

#lobby .solo-character-roster .character-option-label,
#multiplayer-lobby.room-active .room-character-roster-option span {
  font-size: 10px !important;
  font-weight: 800;
  line-height: 14px !important;
}

#lobby .solo-character-roster .character-option.active,
#multiplayer-lobby.room-active .room-character-roster-option.active {
  transform: translateY(-3px) !important;
  border-color: #f0d47b !important;
  background: #35553d !important;
  box-shadow: 0 0 0 1px rgba(240, 212, 123, .32), 0 5px 14px rgba(2, 10, 5, .34) !important;
}

#lobby .solo-character-roster .character-option.active::before,
#multiplayer-lobby.room-active .room-character-roster-option.active::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 15px;
  left: 15px;
  height: 2px;
  border-radius: 2px;
  background: #f0d47b;
  box-shadow: 0 0 8px rgba(240, 212, 123, .7);
}

@media (min-width: 761px) {
  #lobby #character-list.solo-character-picker .solo-character-roster,
  #multiplayer-lobby.room-active .room-character-select .room-character-roster {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker,
  #multiplayer-lobby.room-active .room-character-select {
    height: 342px !important;
    min-height: 342px !important;
    padding: 7px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage {
    inset: 7px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-roster,
  #multiplayer-lobby.room-active .room-character-select .room-character-roster {
    right: 11px;
    bottom: 11px;
    left: 11px;
    height: 76px;
    padding: 5px 6px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
    max-width: 58%;
    padding: 16px 5px 78px 16px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
    font-size: 30px;
  }

  #lobby .solo-character-roster .character-option,
  #multiplayer-lobby.room-active .room-character-roster-option {
    flex-basis: 56px !important;
    width: 56px !important;
    min-width: 56px !important;
    height: 62px !important;
    min-height: 62px !important;
    grid-template-rows: 43px 13px !important;
  }

  #lobby .solo-character-roster .character-portrait,
  #multiplayer-lobby.room-active .room-character-roster-option img {
    width: 43px !important;
    height: 43px !important;
  }

  #lobby .solo-character-roster .character-option-label,
  #multiplayer-lobby.room-active .room-character-roster-option span {
    font-size: 9px !important;
    line-height: 13px !important;
  }
}

@media (max-width: 380px) {
  #lobby #character-list.solo-character-picker,
  #multiplayer-lobby.room-active .room-character-select {
    height: 322px !important;
    min-height: 322px !important;
  }
}

/* v203: compact head-only roster and character-specific stage previews. The
   roster is intentionally icon-only; names remain available through the
   button's aria-label/title for keyboard and screen-reader users. */
#lobby > #lobby-character-view {
  min-height: 0 !important;
}

#lobby #character-list.solo-character-picker {
  height: min(42vh, 420px, calc(100vh - 310px)) !important;
  min-height: 280px !important;
  max-height: 420px !important;
}

#lobby .solo-character-roster .character-option,
#multiplayer-lobby.room-active .room-character-roster-option {
  flex: 0 0 56px !important;
  width: 56px !important;
  min-width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  display: grid !important;
  grid-template-rows: 1fr !important;
  gap: 0 !important;
  padding: 3px !important;
  align-items: center;
  justify-items: center;
}

/* v204: override the legacy wheel selector that still assigns 164px cards.
   The roster is now an icon strip, so its hitboxes must stay inside the dock. */
#lobby:not(.boss-material-selection) .character-list.character-roster .character-option {
  flex: 0 0 56px !important;
  width: 56px !important;
  min-width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  grid-template-rows: 1fr !important;
  transform: none !important;
}

#lobby .solo-character-roster .character-option-label,
#multiplayer-lobby.room-active .room-character-roster-option > span {
  display: none !important;
}

#lobby .solo-character-roster .character-portrait,
#multiplayer-lobby.room-active .room-character-roster-option > img {
  display: block !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  overflow: hidden !important;
  border: 1px solid rgba(239, 210, 126, .32);
  border-radius: 6px;
  background: #102319;
}

#lobby .solo-character-roster .character-portrait img,
#multiplayer-lobby.room-active .room-character-roster-option > img {
  width: 142% !important;
  height: 142% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: 50% 15% !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker {
    height: min(342px, calc(100vh - 250px)) !important;
    min-height: 280px !important;
  }

  #lobby .solo-character-roster .character-option,
  #multiplayer-lobby.room-active .room-character-roster-option {
    flex-basis: 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 2px !important;
  }

  #lobby:not(.boss-material-selection) .character-list.character-roster .character-option {
    flex-basis: 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  #lobby .solo-character-roster .character-portrait,
  #multiplayer-lobby.room-active .room-character-roster-option > img {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
  }
}

/* Shared stage primitives. Both lobby implementations use the same effect
   vocabulary, so a selection feels like the actual skill preview rather than
   a generic slash regardless of whether it is solo or online. */
#lobby #character-list.solo-character-picker .solo-character-stage::before,
#lobby #character-list.solo-character-picker .solo-character-stage::after,
#multiplayer-lobby.room-active .room-character-stage::before,
#multiplayer-lobby.room-active .room-character-stage::after {
  content: "";
  position: absolute;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform-origin: center;
}

/* claw: three readable claw cuts and an impact spark */
#lobby .solo-character-stage[data-effect="claw"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="claw"]::before {
  top: 29%;
  right: 9%;
  width: 34%;
  height: 30%;
  border: 0;
  background: linear-gradient(112deg, transparent 0 22%, var(--character-color, #efc668) 23% 27%, transparent 28% 43%, var(--character-color, #efc668) 44% 48%, transparent 49% 64%, var(--character-color, #efc668) 65% 69%, transparent 70%);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--character-color, #efc668) 80%, transparent));
  transform: rotate(-18deg) scale(.2);
}

#lobby .solo-character-stage[data-effect="claw"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="claw"]::after {
  top: 43%;
  right: 12%;
  width: 18px;
  height: 18px;
  border: 2px solid var(--character-color, #efc668);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(239, 198, 104, .2), 0 0 14px var(--character-color, #efc668);
  transform: scale(.2);
}

/* hiss / niulai: expanding sound-wave rings */
#lobby .solo-character-stage[data-effect="hiss"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="hiss"]::before,
#lobby .solo-character-stage[data-effect="niulai"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="niulai"]::before {
  top: 29%;
  right: 9%;
  width: 30%;
  height: 30%;
  border: 3px solid var(--character-color, #75d8df);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(117, 216, 223, .2), 0 0 0 20px rgba(117, 216, 223, .11);
  transform: scale(.25);
}

#lobby .solo-character-stage[data-effect="hiss"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="hiss"]::after,
#lobby .solo-character-stage[data-effect="niulai"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="niulai"]::after {
  top: 44%;
  right: 4%;
  width: 42%;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--character-color, #75d8df), transparent);
  box-shadow: 0 -10px 0 -1px color-mix(in srgb, var(--character-color, #75d8df) 75%, transparent), 0 10px 0 -1px color-mix(in srgb, var(--character-color, #75d8df) 75%, transparent);
  transform: translateX(-28px) scaleX(.2);
}

/* gas: a growing tailpipe cloud */
#lobby .solo-character-stage[data-effect="gas"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="gas"]::before {
  top: 40%;
  right: 6%;
  width: 30%;
  height: 22%;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 25% 55%, rgba(142, 229, 126, .9) 0 18%, transparent 19%), radial-gradient(circle at 48% 38%, rgba(108, 208, 119, .82) 0 24%, transparent 25%), radial-gradient(circle at 72% 60%, rgba(94, 192, 113, .7) 0 28%, transparent 29%);
  filter: blur(1px) drop-shadow(0 0 10px rgba(117, 205, 119, .5));
  transform: scale(.22);
}

#lobby .solo-character-stage[data-effect="gas"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="gas"]::after {
  top: 33%;
  right: 23%;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(154, 231, 135, .85);
  border-radius: 50%;
  box-shadow: 24px -10px 0 -2px rgba(154, 231, 135, .7), 46px 8px 0 -4px rgba(154, 231, 135, .55);
  transform: scale(.2);
}

/* domain / shieldDog: protective fields */
#lobby .solo-character-stage[data-effect="domain"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="domain"]::before,
#lobby .solo-character-stage[data-effect="shieldDog"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="shieldDog"]::before {
  top: 27%;
  right: 8%;
  width: 34%;
  height: 34%;
  border: 4px solid var(--character-color, #b5d87c);
  border-radius: 50%;
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--character-color, #b5d87c) 32%, transparent), 0 0 18px color-mix(in srgb, var(--character-color, #b5d87c) 56%, transparent);
  transform: scale(.2);
}

#lobby .solo-character-stage[data-effect="domain"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="domain"]::after,
#lobby .solo-character-stage[data-effect="shieldDog"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="shieldDog"]::after {
  top: 44%;
  right: 12%;
  width: 28%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--character-color, #b5d87c);
  box-shadow: 0 0 14px var(--character-color, #b5d87c);
  transform: scaleX(.15);
}

/* quake: ground fissure and a low shockwave */
#lobby .solo-character-stage[data-effect="quake"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="quake"]::before {
  top: auto;
  right: 8%;
  bottom: 18%;
  width: 42%;
  height: 22%;
  border: 0;
  background: linear-gradient(115deg, transparent 0 23%, #e2b85c 24% 28%, transparent 29% 45%, #e2b85c 46% 50%, transparent 51% 69%, #e2b85c 70% 74%, transparent 75%);
  transform: scaleX(.15) translateX(-20px);
}

#lobby .solo-character-stage[data-effect="quake"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="quake"]::after {
  top: auto;
  right: 7%;
  bottom: 23%;
  width: 50%;
  height: 13px;
  border: 2px solid rgba(226, 184, 92, .82);
  border-color: rgba(226, 184, 92, .82) transparent transparent;
  border-radius: 50%;
  transform: scaleX(.2);
}

/* truck / charge: directional speed lines */
#lobby .solo-character-stage[data-effect="truck"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="truck"]::before,
#lobby .solo-character-stage[data-effect="charge"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="charge"]::before {
  top: 42%;
  right: 2%;
  width: 56%;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--character-color, #ef7b4d) 20%, #fff1c9 72%, transparent);
  box-shadow: 0 -14px 0 -1px color-mix(in srgb, var(--character-color, #ef7b4d) 70%, transparent), 0 14px 0 -1px color-mix(in srgb, var(--character-color, #ef7b4d) 70%, transparent);
  transform: translateX(-44px) scaleX(.16);
}

#lobby .solo-character-stage[data-effect="truck"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="truck"]::after {
  top: 34%;
  right: 7%;
  width: 26%;
  height: 26%;
  border: 3px solid #ef7b4d;
  border-radius: 4px;
  transform: translateX(-14px) scale(.2) skewX(-12deg);
}

/* laser / bladeDog: high-contrast weapon streaks */
#lobby .solo-character-stage[data-effect="laser"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="laser"]::before {
  top: 47%;
  right: 2%;
  width: 72%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #fff7cf 20%, #ff6a53 58%, transparent);
  box-shadow: 0 0 16px #ff705e, 0 0 30px rgba(255, 96, 84, .62);
  transform: scaleX(.08);
}

#lobby .solo-character-stage[data-effect="laser"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="laser"]::after {
  top: 41%;
  right: 12%;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff8d2;
  box-shadow: 0 0 18px #ff6e5d;
  transform: scale(.1);
}

#lobby .solo-character-stage[data-effect="bladeDog"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="bladeDog"]::before {
  top: 36%;
  right: 5%;
  width: 58%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #d9e8ff 38%, #9ab6e8 72%, transparent);
  box-shadow: 0 18px 0 -1px rgba(154, 182, 232, .8);
  transform: rotate(-18deg) translateX(-20px) scaleX(.12);
}

#lobby .solo-character-stage[data-effect="bladeDog"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="bladeDog"]::after {
  top: 37%;
  right: 13%;
  width: 20px;
  height: 20px;
  border: 2px solid #d9e8ff;
  border-radius: 50%;
  transform: scale(.15);
}

/* laughGas: playful rising bubbles */
#lobby .solo-character-stage[data-effect="laughGas"]::before,
#multiplayer-lobby.room-active .room-character-stage[data-effect="laughGas"]::before {
  top: 28%;
  right: 8%;
  width: 42%;
  height: 38%;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 12% 72%, rgba(255, 240, 99, .95) 0 8%, transparent 9%), radial-gradient(circle at 40% 46%, rgba(255, 224, 74, .9) 0 11%, transparent 12%), radial-gradient(circle at 72% 26%, rgba(255, 240, 131, .82) 0 15%, transparent 16%);
  transform: translateY(18px) scale(.2);
}

#lobby .solo-character-stage[data-effect="laughGas"]::after,
#multiplayer-lobby.room-active .room-character-stage[data-effect="laughGas"]::after {
  top: 40%;
  right: 22%;
  width: 24px;
  height: 12px;
  border: 3px solid #fff2a1;
  border-color: #fff2a1 transparent transparent;
  border-radius: 50%;
  transform: rotate(-12deg) scale(.2);
}

/* Per-skill motion. */
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="claw"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="claw"]::before { animation: stage-claw 500ms cubic-bezier(.2, .75, .25, 1) both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="claw"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="claw"]::after { animation: stage-impact 500ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="hiss"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="hiss"]::before,
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="niulai"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="niulai"]::before { animation: stage-ring 560ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="hiss"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="hiss"]::after,
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="niulai"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="niulai"]::after { animation: stage-wave 520ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="gas"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="gas"]::before { animation: stage-cloud 620ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="gas"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="gas"]::after { animation: stage-bubbles 620ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="domain"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="domain"]::before,
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="shieldDog"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="shieldDog"]::before { animation: stage-ring 560ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="domain"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="domain"]::after,
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="shieldDog"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="shieldDog"]::after { animation: stage-pulse 520ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="quake"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="quake"]::before { animation: stage-fissure 560ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="quake"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="quake"]::after { animation: stage-groundwave 560ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="truck"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="truck"]::before,
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="charge"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="charge"]::before { animation: stage-speed 500ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="truck"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="truck"]::after { animation: stage-impact 500ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="laser"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="laser"]::before { animation: stage-laser 470ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="laser"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="laser"]::after { animation: stage-flash 470ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="bladeDog"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="bladeDog"]::before { animation: stage-blade 500ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="bladeDog"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="bladeDog"]::after { animation: stage-impact 500ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="laughGas"]::before,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="laughGas"]::before { animation: stage-bubbles 620ms ease-out both; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage[data-effect="laughGas"]::after,
#multiplayer-lobby.room-active .room-character-stage.is-attacking[data-effect="laughGas"]::after { animation: stage-smile 620ms ease-out both; }

@keyframes stage-claw {
  0% { opacity: 0; transform: rotate(-18deg) translateX(-20px) scale(.2); }
  32% { opacity: 1; transform: rotate(-18deg) translateX(0) scale(1); }
  100% { opacity: 0; transform: rotate(-18deg) translateX(24px) scale(1.08); }
}
@keyframes stage-impact { 0% { opacity: 0; transform: scale(.2); } 42% { opacity: .95; transform: scale(1.15); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes stage-ring { 0% { opacity: 0; transform: scale(.2); } 30% { opacity: .95; transform: scale(.72); } 100% { opacity: 0; transform: scale(1.18); } }
@keyframes stage-wave { 0% { opacity: 0; transform: translateX(-34px) scaleX(.15); } 35% { opacity: .92; transform: translateX(0) scaleX(1); } 100% { opacity: 0; transform: translateX(24px) scaleX(1.08); } }
@keyframes stage-cloud { 0% { opacity: 0; transform: scale(.2); } 42% { opacity: .9; transform: scale(.8); } 100% { opacity: 0; transform: translateX(20px) scale(1.25); } }
@keyframes stage-bubbles { 0% { opacity: 0; transform: translateY(18px) scale(.2); } 35% { opacity: .9; transform: translateY(0) scale(.9); } 100% { opacity: 0; transform: translateY(-28px) scale(1.15); } }
@keyframes stage-pulse { 0% { opacity: 0; transform: scaleX(.15); } 35% { opacity: .95; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1.22); } }
@keyframes stage-fissure { 0% { opacity: 0; transform: translateX(-20px) scaleX(.15); } 40% { opacity: .95; transform: translateX(0) scaleX(1); } 100% { opacity: 0; transform: translateX(18px) scaleX(1.08); } }
@keyframes stage-groundwave { 0% { opacity: 0; transform: scaleX(.2); } 38% { opacity: .95; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1.2); } }
@keyframes stage-speed { 0% { opacity: 0; transform: translateX(-44px) scaleX(.16); } 35% { opacity: .95; transform: translateX(0) scaleX(1); } 100% { opacity: 0; transform: translateX(28px) scaleX(1.1); } }
@keyframes stage-laser { 0% { opacity: 0; transform: scaleX(.08); } 25% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1.08); } }
@keyframes stage-flash { 0% { opacity: 0; transform: scale(.1); } 30% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(2); } }
@keyframes stage-blade { 0% { opacity: 0; transform: rotate(-18deg) translateX(-20px) scaleX(.12); } 34% { opacity: .98; transform: rotate(-18deg) translateX(0) scaleX(1); } 100% { opacity: 0; transform: rotate(-18deg) translateX(28px) scaleX(1.08); } }
@keyframes stage-smile { 0% { opacity: 0; transform: rotate(-12deg) scale(.2); } 35% { opacity: .95; transform: rotate(-12deg) scale(1); } 100% { opacity: 0; transform: rotate(-12deg) translateY(-18px) scale(1.2); } }

@media (prefers-reduced-motion: reduce) {
  #lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage::before,
  #lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage::after,
  #multiplayer-lobby.room-active .room-character-stage.is-attacking::before,
  #multiplayer-lobby.room-active .room-character-stage.is-attacking::after {
    animation: none !important;
  }
}

/* v203: final character-select composition. The stage is a centered portrait
   preview; copy is docked to the bottom and the roster is a compact headshot
   rail. This intentionally overrides older carousel/card rules above. */
#lobby #character-list.solo-character-picker,
#multiplayer-lobby.room-active .room-character-select {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 72px !important;
  gap: 8px !important;
  min-width: 0 !important;
  min-height: 320px !important;
  height: min(54vh, 500px) !important;
  padding: 9px !important;
  overflow: hidden !important;
  background: #12251a !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage,
#multiplayer-lobby.room-active .room-character-select .room-character-stage {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  grid-row: 1 !important;
  grid-column: 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background:
    radial-gradient(ellipse at 50% 48%, color-mix(in srgb, var(--character-color, #e7ca74) 12%, transparent), transparent 38%),
    linear-gradient(180deg, #2b543b 0%, #1d3a2a 66%, #13271b 100%) !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
  position: absolute !important;
  right: 10px !important;
  bottom: 9px !important;
  left: 10px !important;
  z-index: 5 !important;
  display: block !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 8px 12px 7px !important;
  overflow: hidden !important;
  border: 1px solid color-mix(in srgb, var(--character-color, #e7ca74) 32%, rgba(220, 235, 216, .18)) !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, rgba(10, 25, 15, .48), rgba(6, 16, 10, .9)) !important;
  box-shadow: 0 7px 18px rgba(3, 11, 6, .28), inset 0 1px rgba(255, 255, 255, .08) !important;
  text-align: center !important;
  backdrop-filter: blur(6px);
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > p:first-child,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-state {
  display: block !important;
  min-height: 0 !important;
  margin: 0 0 2px !important;
  color: rgba(224, 238, 219, .72) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
  display: inline !important;
  margin: 0 !important;
  color: #fff1c9 !important;
  font-size: clamp(21px, 3vw, 30px) !important;
  line-height: 1.08 !important;
  vertical-align: baseline !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  display: inline-flex !important;
  gap: 5px !important;
  margin: 0 0 0 8px !important;
  color: var(--character-color, #e7ca74) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  vertical-align: baseline !important;
}

#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill span {
  display: none !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  display: block !important;
  max-width: 780px !important;
  margin: 3px auto 0 !important;
  overflow: hidden !important;
  color: rgba(226, 237, 221, .84) !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro span {
  display: inline-block !important;
  margin-right: 5px !important;
  color: #e7ca74 !important;
  font-weight: 800 !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro p {
  display: inline !important;
  margin: 0 !important;
  font-size: inherit !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  position: absolute !important;
  top: 5px !important;
  left: 50% !important;
  bottom: 0 !important;
  z-index: 1 !important;
  width: min(46%, 330px) !important;
  height: calc(100% - 74px) !important;
  max-height: none !important;
  min-height: 0 !important;
  transform: translateX(-50%) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  filter: drop-shadow(0 13px 11px rgba(0, 0, 0, .34)) !important;
}

/* Head-only square buttons: there is deliberately no second caption row. */
#lobby #character-list.solo-character-picker .solo-character-roster,
#multiplayer-lobby.room-active .room-character-select .room-character-roster {
  position: relative !important;
  inset: auto !important;
  z-index: 6 !important;
  display: flex !important;
  grid-row: 2 !important;
  grid-column: 1 !important;
  width: 100% !important;
  height: 72px !important;
  min-height: 72px !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border-radius: 7px !important;
  background: rgba(8, 20, 12, .9) !important;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  touch-action: pan-x;
}

#lobby #character-list.solo-character-picker .solo-character-roster .character-option,
#multiplayer-lobby.room-active .room-character-select .room-character-roster-option {
  display: grid !important;
  flex: 0 0 62px !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  justify-items: center !important;
  width: 62px !important;
  min-width: 62px !important;
  height: 62px !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 3px !important;
  border-radius: 7px !important;
  scroll-snap-align: center;
}

#lobby #character-list.solo-character-picker .solo-character-roster .character-option-label,
#multiplayer-lobby.room-active .room-character-select .room-character-roster-option span {
  display: none !important;
}

#lobby #character-list.solo-character-picker .solo-character-roster .character-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-roster-option img {
  display: grid !important;
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  min-height: 54px !important;
  place-items: center !important;
  object-fit: cover !important;
  object-position: 50% 16% !important;
  border: 1px solid rgba(231, 202, 116, .3) !important;
  border-radius: 7px !important;
  background: #16281e !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08) !important;
}

#lobby #character-list.solo-character-picker .solo-character-roster .character-portrait img {
  width: 148% !important;
  height: 148% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: 50% 16% !important;
}

#lobby #character-list.solo-character-picker .solo-character-roster .character-option.active,
#multiplayer-lobby.room-active .room-character-select .room-character-roster-option.active {
  transform: translateY(-3px) !important;
  border-color: #edcf75 !important;
  background: #35533a !important;
  box-shadow: inset 0 0 0 1px rgba(255, 242, 188, .3), 0 0 0 1px rgba(237, 207, 117, .22) !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker,
  #multiplayer-lobby.room-active .room-character-select {
    grid-template-rows: minmax(0, 1fr) 64px !important;
    height: min(50vh, 370px) !important;
    min-height: 300px !important;
    padding: 7px !important;
    gap: 7px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    width: min(58%, 245px) !important;
    height: calc(100% - 66px) !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-roster,
  #multiplayer-lobby.room-active .room-character-select .room-character-roster {
    height: 64px !important;
    min-height: 64px !important;
    padding: 3px 5px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-roster .character-option,
  #multiplayer-lobby.room-active .room-character-select .room-character-roster-option {
    flex-basis: 54px !important;
    width: 54px !important;
    min-width: 54px !important;
    height: 54px !important;
    min-height: 54px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-roster .character-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-roster-option img {
    width: 47px !important;
    height: 47px !important;
    min-width: 47px !important;
    min-height: 47px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
    right: 7px !important;
    bottom: 7px !important;
    left: 7px !important;
    padding: 6px 8px 5px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
    font-size: 21px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    animation: none !important;
  }
}

/* v208: final cascade for the two character-select surfaces. Keep the stage
   centered and roomy while the old summary node contributes no layout space. */
#lobby:not(.boss-material-selection) > #lobby-character-view > .character-summary,
#lobby #lobby-character-view > .character-summary {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

#lobby #character-list.solo-character-picker,
#multiplayer-lobby.room-active .room-character-select {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 72px !important;
  align-content: stretch !important;
  justify-items: stretch !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage,
#multiplayer-lobby.room-active .room-character-select .room-character-stage {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  isolation: isolate !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  top: 2px !important;
  right: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  width: min(40%, 280px) !important;
  height: calc(100% - 76px) !important;
  max-width: 280px !important;
  transform: translateX(-50%) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
  right: clamp(8px, 3vw, 24px) !important;
  bottom: 8px !important;
  left: clamp(8px, 3vw, 24px) !important;
  max-height: 82px !important;
  text-align: center !important;
}

#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  display: block !important;
  max-width: 760px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#lobby #character-list.solo-character-picker .solo-character-roster,
#multiplayer-lobby.room-active .room-character-select .room-character-roster {
  align-self: stretch !important;
  justify-self: stretch !important;
  overscroll-behavior-x: contain !important;
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
}

@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker,
  #multiplayer-lobby.room-active .room-character-select {
    grid-template-rows: minmax(0, 1fr) 64px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    width: min(52%, 220px) !important;
    height: calc(100% - 68px) !important;
    max-width: 220px !important;
  }

  #lobby #character-list.solo-character-picker .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
    max-height: 78px !important;
  }
}

/* v211-end: authoritative upper-left intro and gameplay VFX preview. */
#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy {
  top: 14px !important; right: auto !important; bottom: auto !important; left: 14px !important;
  width: min(42%, 286px) !important; max-width: 286px !important; max-height: 132px !important;
  padding: 11px 13px 12px !important; border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(8,20,13,.9), rgba(10,25,16,.64)) !important;
  text-align: left !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  white-space: normal !important; display: -webkit-box !important; -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important; overflow: hidden !important; margin-top: 6px !important; text-align: left !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro span { display: none !important; }
#lobby #character-list.solo-character-picker .solo-character-stage::before,
#lobby #character-list.solo-character-picker .solo-character-stage::after,
#multiplayer-lobby.room-active .room-character-stage::before,
#multiplayer-lobby.room-active .room-character-stage::after { display: none !important; }
#lobby #character-list.solo-character-picker .solo-character-stage-vfx,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-vfx {
  position: absolute !important; inset: 8% 8% 18% !important; z-index: 2 !important; display: grid !important;
  place-items: center !important; pointer-events: none !important; opacity: 0 !important; mix-blend-mode: screen !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-vfx img,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-vfx img {
  width: min(72%, 420px) !important; max-height: 68% !important; object-fit: contain !important;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--character-color, #e7ca74) 52%, transparent)) !important;
}
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-vfx,
#multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-vfx { animation: gameplay-vfx-in 620ms cubic-bezier(.2,.75,.25,1) both !important; }
#lobby #character-list.solo-character-picker.is-character-attacking .solo-character-stage-vfx img,
#multiplayer-lobby.room-active .room-character-stage.is-attacking .room-character-stage-vfx img { animation: gameplay-vfx-pulse 620ms cubic-bezier(.2,.75,.25,1) both !important; }
@media (max-width:760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy { top: 10px !important; left: 10px !important; width: min(54%,222px) !important; max-width: 222px !important; max-height: 116px !important; padding: 9px 10px !important; }
}

/* v212: the stage canvas is fed by the same drawEffects() pipeline used in a run. */
#lobby #character-list.solo-character-picker .solo-character-stage-preview,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-preview {
  position: absolute !important;
  inset: 0 !important;
  z-index: 4 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  display: block !important;
  mix-blend-mode: normal !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait { z-index: 2 !important; }
#lobby #character-list.solo-character-picker .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy { z-index: 6 !important; }
#lobby #character-list.solo-character-picker .solo-character-stage-vfx,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-vfx { display: none !important; }

/* The live preview canvas now draws the same player sprite as gameplay. Keep
   the DOM portrait as a loading/error fallback, but never let it double-render
   over the authoritative canvas during an active preview. */
#lobby #character-list.solo-character-picker .solo-character-stage.is-live-preview > .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage.is-live-preview > .room-character-stage-portrait {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Hide the legacy portrait while the real gameplay assets are loading. This
   prevents a single-frame static-art flash before the authoritative preview
   canvas takes over. If loading fails, the JS cleanup removes this state. */
#lobby #character-list.solo-character-picker .solo-character-stage.is-preview-pending > .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage.is-preview-pending > .room-character-stage-portrait {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* v215 final mobile stage authority. This block intentionally follows legacy
   responsive rules so cached Toy bundles cannot expand the plaque or stack
   the primary action beneath the optional interaction reward. */
#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  transform: translateX(calc(-50% + var(--stage-motion-x, 0px))) scale(var(--stage-motion-scale, 1)) !important;
  transform-origin: center bottom !important;
  will-change: transform !important;
}
@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 8px !important; left: 8px !important; width: min(48%, 196px) !important;
    max-width: 196px !important; max-height: 94px !important; padding: 7px 9px 8px !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy > p,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy > p {
    margin-bottom: 2px !important; font-size: 10px !important; line-height: 1.15 !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
    margin: 0 !important; font-size: 18px !important; line-height: 1.08 !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy strong,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy strong {
    font-size: 11px !important; line-height: 1.15 !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-intro,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
    margin-top: 3px !important; font-size: 10px !important; line-height: 1.24 !important; -webkit-line-clamp: 2 !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    top: 24px !important; height: calc(100% - 80px) !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer {
    display: grid !important; grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(48px, auto) !important; min-height: 48px !important; gap: 0 !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
    grid-template-columns: minmax(0, 3fr) minmax(88px, 1fr) !important; column-gap: 7px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start,
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) { min-height: 50px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) {
    padding: 5px 7px !important; grid-template-columns: auto minmax(0, 1fr) !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden)::before {
    width: 29px !important; height: 29px !important; margin-right: 5px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) span { display: none !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) small { display: none !important; }
  #event-banner[data-kind="toy-blocked"] {
    top: max(72px, calc(env(safe-area-inset-top) + 72px)) !important;
    max-width: min(350px, calc(100vw - 28px)) !important; padding: 7px 10px !important;
    font-size: 11px !important; line-height: 1.32 !important;
  }
}

/* v213: final layout authority. Legacy stage rules position the information
   plaque as a grid row; the live preview needs it pinned to the upper-left
   corner so the lower rail remains reserved for headshot selection. */
#lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
  position: absolute !important;
  top: 14px !important;
  right: auto !important;
  bottom: auto !important;
  left: 14px !important;
  z-index: 6 !important;
  display: block !important;
  width: min(42%, 286px) !important;
  max-width: 286px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 11px 13px 12px !important;
  border: 1px solid color-mix(in srgb, var(--character-color, #e7ca74) 52%, rgba(255, 255, 255, .18)) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(8, 20, 13, .9), rgba(10, 25, 16, .64)) !important;
  box-sizing: border-box !important;
  text-align: left !important;
}
@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 10px !important;
    left: 10px !important;
    width: min(54%, 222px) !important;
    max-width: 222px !important;
    padding: 9px 10px 10px !important;
  }
}

/* v217: this must remain last because old build blocks also target the plaque. */
@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 8px !important;
    left: 8px !important;
    width: min(46%, 176px) !important;
    max-width: 176px !important;
    max-height: 94px !important;
    padding: 7px 9px 8px !important;
  }
}

/* v218-final: authoritative character stage and Toy action dock. */
#lobby #character-list.solo-character-picker .solo-character-stage,
#multiplayer-lobby.room-active .room-character-select .room-character-stage {
  position: relative !important;
  isolation: isolate !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
  top: 12px !important;
  right: auto !important;
  bottom: auto !important;
  left: 12px !important;
  width: min(36%, 218px) !important;
  max-width: 218px !important;
  max-height: none !important;
  padding: 9px 10px 10px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, rgba(7, 22, 13, .9), rgba(12, 39, 24, .72)) !important;
  box-shadow: 0 7px 16px rgba(2, 10, 5, .22) !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy > p:first-child,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-state { display: none !important; }
#lobby #character-list.solo-character-picker .solo-character-stage-copy > .solo-character-stage-lock {
  display: block !important;
  margin: 0 0 3px !important;
  color: #f0d879 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
  display: block !important;
  margin: 0 !important;
  font-size: clamp(19px, 2.25vw, 25px) !important;
  line-height: 1.08 !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  display: block !important;
  margin: 3px 0 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  display: -webkit-box !important;
  max-width: none !important;
  margin: 5px 0 0 !important;
  overflow: hidden !important;
  color: rgba(232, 243, 226, .88) !important;
  font-size: 10px !important;
  line-height: 1.32 !important;
  text-align: left !important;
  text-overflow: clip !important;
  white-space: normal !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro span { display: none !important; }
#lobby #character-list.solo-character-picker .solo-character-stage-intro p { display: block !important; }
#lobby #character-list.solo-character-picker .solo-character-stage-portrait,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
  top: 4px !important;
  right: auto !important;
  bottom: 0 !important;
  left: 65% !important;
  width: min(47%, 294px) !important;
  height: calc(100% - 8px) !important;
  max-width: 294px !important;
  object-position: center bottom !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
  display: grid !important;
  grid-template-columns: minmax(138px, .95fr) minmax(0, 1.35fr) !important;
  grid-template-rows: minmax(60px, auto) !important;
  align-items: stretch !important;
  gap: 8px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 7px !important;
  min-height: 60px !important;
  padding: 7px 8px !important;
  text-align: left !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  width: 31px !important;
  height: 31px !important;
  margin: 0 !important;
  align-self: center !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) span {
  color: #5d4514 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #toy-coin-reward:not(.hidden) small {
  color: rgba(72, 55, 18, .84) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer #lobby-start {
  order: 2 !important;
  min-height: 60px !important;
  font-size: clamp(17px, 4.8vw, 23px) !important;
}
#event-banner[data-kind="toy-blocked"] {
  position: fixed !important;
  top: max(72px, calc(env(safe-area-inset-top) + 72px)) !important;
  right: 12px !important;
  bottom: auto !important;
  left: 12px !important;
  z-index: 10020 !important;
  width: auto !important;
  max-width: 420px !important;
  margin: 0 auto !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(247, 211, 103, .72) !important;
  border-radius: 7px !important;
  background: rgba(28, 42, 23, .96) !important;
  color: #fff0bd !important;
  font-size: 11px !important;
  line-height: 1.28 !important;
  pointer-events: none !important;
}
@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 10px !important;
    left: 10px !important;
    width: 126px !important;
    max-width: 126px !important;
    padding: 7px 8px 8px !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 { font-size: 18px !important; }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-skill { font-size: 10px !important; }
  #lobby #character-list.solo-character-picker .solo-character-stage-intro,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
    margin-top: 4px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-portrait,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-portrait {
    top: 5px !important;
    left: 70% !important;
    width: min(54%, 224px) !important;
    height: calc(100% - 6px) !important;
    max-width: 224px !important;
  }
  body.toy-ranked-only #lobby:not(.boss-material-selection) .lobby-footer:has(#toy-coin-reward:not(.hidden)) {
    grid-template-columns: minmax(138px, .95fr) minmax(0, 1.35fr) !important;
    grid-template-rows: minmax(60px, auto) !important;
  }
}

/* v218-final-specificity: last declaration wins against card-era portrait CSS. */
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
  top: 4px !important;
  right: auto !important;
  bottom: 0 !important;
  left: 65% !important;
  width: min(47%, 294px) !important;
  height: calc(100% - 8px) !important;
  max-width: 294px !important;
  object-position: center bottom !important;
}
@media (max-width: 760px) {
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
    top: auto !important;
    bottom: 10px !important;
    left: 62% !important;
    width: min(68%, 260px) !important;
    height: min(64%, 278px) !important;
    max-width: 260px !important;
  }
}

/* v222-stage-visual: quiet showcase surface, larger full-body actor, compact
   copy plaque. The gameplay canvas supplies the real character and VFX. */
#lobby #character-list.solo-character-picker .solo-character-stage,
#multiplayer-lobby.room-active .room-character-select .room-character-stage {
  background: #10251f !important;
  background-image: none !important;
  overflow: hidden !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
  top: 10px !important;
  left: 10px !important;
  width: min(30%, 184px) !important;
  max-width: 184px !important;
  max-height: 88px !important;
  padding: 7px 9px 8px !important;
  border-radius: 7px !important;
  background: rgba(7, 22, 13, .78) !important;
  box-shadow: 0 5px 12px rgba(2, 10, 5, .16) !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
  font-size: clamp(16px, 1.9vw, 21px) !important;
  line-height: 1.05 !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  margin-top: 2px !important;
  font-size: 10px !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  margin-top: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  -webkit-line-clamp: 2 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: min(64%, 368px) !important;
  height: 100% !important;
  max-width: 368px !important;
  transform: translateX(calc(-50% + var(--stage-motion-x, 0px))) scale(var(--stage-motion-scale, 1)) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}
@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 7px !important;
    left: 7px !important;
    width: min(39%, 142px) !important;
    max-width: 142px !important;
    max-height: 74px !important;
    padding: 6px 7px 7px !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 { font-size: 15px !important; }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-skill { font-size: 9px !important; }
  #lobby #character-list.solo-character-picker .solo-character-stage-intro,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
    margin-top: 2px !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
  }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    width: min(76%, 292px) !important;
    height: 100% !important;
    max-width: 292px !important;
  }
}

/* v222-stage-visual-copy-final: the last cascade wins over legacy plaque
   sizing while preserving the stage's responsive layout. */
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
  min-height: 0 !important;
  height: auto !important;
  width: min(30%, 184px) !important;
  max-width: 184px !important;
  max-height: 88px !important;
  padding: 7px 9px 8px !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy h3,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy h3 {
  margin: 0 !important;
  font-size: clamp(16px, 1.9vw, 21px) !important;
  line-height: 1.05 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > strong {
  margin-top: 2px !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy .room-character-stage-description {
  margin-top: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
@media (max-width: 760px) {
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
    width: min(39%, 142px) !important;
    max-width: 142px !important;
    max-height: 74px !important;
    padding: 6px 7px 7px !important;
  }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy h3 { font-size: 15px !important; }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > strong,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > strong { font-size: 9px !important; }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy .room-character-stage-description {
    margin-top: 2px !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
  }
}

/* v219-final: center the full-body stage portrait after all legacy overrides. */
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
  top: 4px !important;
  right: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  width: min(54%, 320px) !important;
  height: calc(100% - 8px) !important;
  max-width: 320px !important;
  transform: translateX(calc(-50% + var(--stage-motion-x, 0px))) scale(var(--stage-motion-scale, 1)) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

/* v219-final: non-character pages are full surfaces; the character stage and
   its map/start footer must never survive a tab switch. */
#lobby.lobby-non-character-tab > #lobby-character-view {
  display: none !important;
}
#lobby.lobby-non-character-tab > #meta-shop {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  width: min(1320px, 100%) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(205, 229, 201, .22) !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, rgba(236, 247, 239, .97), rgba(205, 233, 224, .94)) !important;
  box-shadow: 0 10px 24px rgba(2, 12, 8, .2) !important;
}
#lobby.lobby-non-character-tab > #meta-shop > .shop-content {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  padding: clamp(14px, 2.5vw, 30px) !important;
}
@media (max-width: 760px) {
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
    top: 24px !important;
    bottom: 0 !important;
    left: 50% !important;
    width: min(64%, 244px) !important;
    height: calc(100% - 80px) !important;
    max-width: 244px !important;
  }
}

/* v222-stage-visual-authoritative: final cascade for the focused, solid-color
   character showcase. */
#lobby #character-list.solo-character-picker .solo-character-stage,
#multiplayer-lobby.room-active .room-character-select .room-character-stage {
  background: #10251f !important;
  background-image: none !important;
  overflow: hidden !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
  top: 10px !important;
  right: auto !important;
  bottom: auto !important;
  left: 10px !important;
  width: min(30%, 184px) !important;
  max-width: 184px !important;
  max-height: 88px !important;
  padding: 7px 9px 8px !important;
  border-radius: 7px !important;
  background: rgba(7, 22, 13, .78) !important;
  box-shadow: 0 5px 12px rgba(2, 10, 5, .16) !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 {
  font-size: clamp(16px, 1.9vw, 21px) !important;
  line-height: 1.05 !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-skill {
  margin-top: 2px !important;
  font-size: 10px !important;
}
#lobby #character-list.solo-character-picker .solo-character-stage-intro,
#multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
  margin-top: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  -webkit-line-clamp: 2 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
  top: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  width: min(64%, 368px) !important;
  height: 100% !important;
  max-width: 368px !important;
  transform: translateX(calc(-50% + var(--stage-motion-x, 0px))) scale(var(--stage-motion-scale, 1)) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}
@media (max-width: 760px) {
  #lobby #character-list.solo-character-picker .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage > .room-character-stage-copy {
    top: 7px !important;
    left: 7px !important;
    width: min(39%, 142px) !important;
    max-width: 142px !important;
    max-height: 74px !important;
    padding: 6px 7px 7px !important;
  }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-copy h3 { font-size: 15px !important; }
  #lobby #character-list.solo-character-picker .solo-character-stage-copy > strong,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-skill { font-size: 9px !important; }
  #lobby #character-list.solo-character-picker .solo-character-stage-intro,
  #multiplayer-lobby.room-active .room-character-select .room-character-stage-description {
    margin-top: 2px !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
  }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-portrait,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > #room-character-stage-portrait {
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: min(76%, 292px) !important;
    height: 100% !important;
    max-width: 292px !important;
  }
}

/* v222-stage-visual-final: final plaque sizing after all historical overrides. */
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
  min-height: 0 !important;
  height: auto !important;
  max-height: 88px !important;
  padding: 7px 9px 8px !important;
}

/* v224-final: keep the Toy action dock stable after every legacy override. */
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
  grid-template-rows: 76px !important;
  gap: 8px !important;
  min-height: 76px !important;
  padding: 0 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  min-width: 0 !important;
  min-height: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border: 2px solid rgba(64, 38, 13, .92) !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 rgba(58, 31, 10, .78), 0 8px 16px rgba(14, 12, 5, .18) !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  column-gap: 8px !important;
  align-content: center !important;
  padding: 9px 12px !important;
  overflow: hidden !important;
  text-align: left !important;
  background: linear-gradient(180deg, #ffe99a 0%, #f4c85e 100%) !important;
  color: #5a3b12 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before {
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  background-size: 20px 20px !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span,
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span { color: #5a3b12 !important; font-size: clamp(12px, 1.4vw, 16px) !important; font-weight: 900 !important; line-height: 1.15 !important; }
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small { color: rgba(80, 52, 14, .86) !important; font-size: clamp(9px, 1vw, 11px) !important; line-height: 1.2 !important; }
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 8px 18px !important;
  background: linear-gradient(180deg, #ffc65a 0%, #f28b2e 100%) !important;
  color: #5a2d0b !important;
  font-size: clamp(18px, 2.2vw, 26px) !important;
  font-weight: 950 !important;
}
body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before { content: "" !important; display: block !important; width: 0 !important; height: 0 !important; border-top: 10px solid transparent !important; border-bottom: 10px solid transparent !important; border-left: 15px solid #6b360c !important; }
@media (max-width: 760px) {
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important; grid-template-rows: 64px !important; min-height: 64px !important; gap: 6px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden),
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start { min-height: 64px !important; height: 64px !important; border-radius: 10px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) { grid-template-columns: 23px minmax(0, 1fr) !important; column-gap: 5px !important; padding: 6px 7px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden)::before { width: 22px !important; height: 22px !important; background-size: 16px 16px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) span { font-size: 11px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #toy-coin-reward:not(.hidden) small { font-size: 8px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start { gap: 7px !important; padding: 6px 8px !important; font-size: 17px !important; }
  body.toy-ranked-only #lobby:not(.boss-material-selection) > #lobby-character-view > .lobby-footer[data-toy-reward-visible="true"] > #lobby-start::before { border-top-width: 8px !important; border-bottom-width: 8px !important; border-left-width: 12px !important; }
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy h3,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy h3 {
  margin: 0 !important;
  font-size: clamp(16px, 1.9vw, 21px) !important;
  line-height: 1.05 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > strong,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > strong {
  margin-top: 2px !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
#lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro,
#multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy .room-character-stage-description {
  margin-top: 3px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}
@media (max-width: 760px) {
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy {
    max-height: 74px !important;
    padding: 6px 7px 7px !important;
  }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy h3,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy h3 { font-size: 15px !important; }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy > strong,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy > strong { font-size: 9px !important; }
  #lobby:not(.boss-material-selection) #character-list.solo-character-picker > .solo-character-stage > .solo-character-stage-copy .solo-character-stage-intro,
  #multiplayer-lobby.room-active #room-character-select > .room-character-stage > .room-character-stage-copy .room-character-stage-description {
    margin-top: 2px !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
  }
}

/* 角色解锁提示面板：复用音频设置面板的外观，只补进度与状态行。 */
/* 大厅本身也是 .screen-overlay（z-index 10）且在 DOM 中更靠后，所以这里必须抬高，
   否则面板会被大厅盖住、按钮点不到。 */
#toy-unlock { z-index: 72; padding: 16px; box-sizing: border-box; }
.toy-unlock-panel { width: min(400px, calc(100vw - 32px)); }
.toy-unlock-panel .audio-settings-heading { margin-bottom: 14px; }
.toy-unlock-panel .audio-settings-heading h2 { color: #fff6df; }
.toy-unlock-desc { margin: 0 0 14px; color: #f4ecd8; font-size: 15px; line-height: 1.65; }
/* 金币购买的价格和余额是这个面板的全部信息，单独做成高对比价格卡，
   不再塞进一句话里；售价、余额、差额各有清楚的层级。 */
.toy-unlock-coin { display: grid; gap: 9px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid rgba(255, 214, 106, .45); border-radius: 8px; background: linear-gradient(180deg, rgba(74, 59, 18, .6), rgba(26, 30, 20, .78)); }
.toy-unlock-coin p { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.toy-unlock-coin p span { min-width: 64px; color: #e2d7b4; font-size: 13px; }
.toy-unlock-coin p b { color: #ffd76a; font-size: 25px; font-weight: 800; letter-spacing: .5px; line-height: 1.1; }
.toy-unlock-coin p em { color: #ffd76a; font-size: 13px; font-style: normal; }
.toy-unlock-coin .toy-unlock-coin-balance b { color: #fff3cf; font-size: 19px; }
.toy-unlock-coin[data-short="true"] .toy-unlock-coin-balance b { color: #ff9d86; }
.toy-unlock-coin[data-short="true"] { border-color: rgba(255, 138, 112, .55); }
.toy-unlock-coin-short { margin: 2px 0 0; color: #ffb7a3; font-size: 13px; line-height: 1.5; }
.toy-unlock-progress { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.toy-unlock-progress li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid rgba(235, 226, 194, .26); border-radius: 6px; color: #f0e9d6; font-size: 13px; }
.toy-unlock-progress li[data-done="true"] { border-color: rgba(146, 225, 239, .5); color: #cdf3f7; }
.toy-unlock-progress li b { font-weight: 600; }
.toy-unlock-status { min-height: 20px; margin: 0 0 12px; color: #ffd76a; font-size: 13px; line-height: 1.5; }
.toy-unlock-status[data-tone="ok"] { color: #9ee6a8; }
.toy-unlock-status[data-tone="error"] { color: #f08a7a; }
.toy-unlock-actions { flex-wrap: wrap; }
.toy-unlock-actions button { flex: 1 1 46%; min-height: 40px; }
/* 金币模式只剩一个按钮：让它占满整行，而不是缩在左半边留一块空白。 */
.toy-unlock-actions.is-single { grid-template-columns: 1fr; }
.toy-unlock-actions.is-single button { flex: 1 1 100%; width: 100%; min-height: 48px; font-size: 15px; font-weight: 700; letter-spacing: .5px; }
#toy-unlock-share { border-color: rgba(255, 214, 106, .62); color: #ffe9a8; }
#toy-unlock-share:disabled { border-color: rgba(235, 226, 194, .2); color: #b9b3a1; }
@media (max-width: 520px) {
  .toy-unlock-actions { flex-direction: column; }
  .toy-unlock-actions button { width: 100%; }
}

