body.mp-mode .h-obj, body.mp-mode .h-cmarks, body.mp-mode .h-prompt,
body.mp-mode .h-wmarks, body.mp-mode .h-relays { display: none !important; }
#multiplayer { position: fixed; inset: 0; z-index: 25; pointer-events: none; color: #e9e6dd; font: 14px/1.5 'Microsoft YaHei', sans-serif; }
#multiplayer [hidden] { display: none !important; }
#multiplayer * { box-sizing: border-box; }
#multiplayer button, #multiplayer input, #multiplayer select { font: inherit; }
#multiplayer button { cursor: pointer; border: 1px solid #67727c; background: #1c252b; color: #e9e6dd; min-height: 42px; padding: 9px 17px; border-radius: 4px; }
#multiplayer button:hover { background: #303d46; }
#multiplayer button:disabled { opacity: .4; cursor: not-allowed; }
#multiplayer button:focus-visible, #multiplayer input:focus-visible, #multiplayer select:focus-visible { outline: 2px solid #ffb347; outline-offset: 3px; }
#multiplayer .mp-primary { background: #edb364; border-color: #edb364; color: #171b1f; font-weight: 700; }
#multiplayer .mp-primary:hover { background: #ffca80; }
#multiplayer input, #multiplayer select { width: 100%; min-height: 43px; background: #111a20; border: 1px solid #53616c; color: #fff; border-radius: 4px; padding: 9px 12px; }
#multiplayer label { display: grid; gap: 7px; margin: 18px 0 12px; color: #b9c3c8; }
#multiplayer h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.1; margin: 18px 0; letter-spacing: .06em; }
#multiplayer h1 span { display: block; color: #edb364; font-size: 21px; letter-spacing: .4em; margin-top: 12px; }
#multiplayer h2 { margin: 10px 0 16px; font-size: 29px; }
#multiplayer h2 span { font: 22px ui-monospace, monospace; color: #edb364; letter-spacing: .12em; }
#multiplayer h3 { font-size: 16px; margin: 12px 0; }
#multiplayer p { color: #b9c3c8; line-height: 1.8; }
#multiplayer small { display: block; color: #96a4ad; font-size: 11px; line-height: 1.8; margin-top: 9px; }
.mp-eyebrow { color: #edb364; font: 11px ui-monospace, monospace; letter-spacing: .18em; }
.mp-screen { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 10, 14, .48); padding: 26px 16px; pointer-events: auto; overflow: auto; backdrop-filter: blur(4px); }
.mp-card { width: min(460px, 100%); background: rgba(12, 20, 27, .95); border: 1px solid #52606a; padding: 30px; box-shadow: 0 22px 80px #0008; border-radius: 8px; }
.mp-lobby-home { width: min(1120px, 100%); margin: auto; }
.mp-lobby-columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.mp-entry { min-width: 0; }
#multiplayer .mp-entry > label { margin-top: 0; }
#multiplayer .mp-entry > button { width: 100%; margin-top: 12px; }
.mp-directory { min-width: 0; }
.mp-room-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#multiplayer .mp-room-title h2 { margin: 0; font-size: 21px; }
#multiplayer .mp-room-title h2 span { font-size: 16px; }
#multiplayer .mp-room-title button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.mp-rooms { display: grid; align-content: start; gap: 8px; max-height: 420px; overflow-y: auto; }
.mp-room-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 12px; background: #111a20; border: 1px solid #39454e; border-radius: 4px; }
.mp-room-details { min-width: 0; }
.mp-room-details b { display: block; overflow-wrap: anywhere; }
#multiplayer .mp-room-details small { margin-top: 4px; }
.mp-room-count { color: #edb364; font: 18px ui-monospace, monospace; white-space: nowrap; }
#multiplayer .mp-room-row button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
#multiplayer .mp-empty { margin: 0; padding: 50px 22px; text-align: center; border: 1px dashed #53616c; border-radius: 4px; }
#multiplayer .mp-invite { font-size: 12px; padding: 10px 12px; border-left: 3px solid #edb364; background: #edb36412; }
.mp-wide { width: min(780px, 100%); }
.mp-card > button { width: 100%; margin-top: 12px; }
.mp-join { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.mp-join input { text-transform: uppercase; letter-spacing: .12em; }
.mp-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 5px; }
.mp-settings input[type=range] { padding: 0; accent-color: #edb364; }
.mp-rosters { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mp-rosters h3 { display: flex; justify-content: space-between; align-items: center; }
#multiplayer .mp-rosters h3 button { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.mp-slot { display: flex; flex-direction: column; min-height: 62px; border-bottom: 1px solid #39454e; padding: 9px 4px; }
#multiplayer .mp-slot small { margin-top: 3px; }
.mp-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.mp-share input { font: 12px ui-monospace, monospace !important; }
.mp-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 22px; min-width: 330px; background: #0a121be6; padding: 8px 22px; border: 1px solid #5a656d; border-radius: 5px; }
.mp-team { text-align: center; min-width: 40px; }
.mp-team b { display: block; font: 700 34px/1 ui-monospace, monospace; }
#multiplayer .mp-team small { margin-top: 3px; color: inherit; }
.mp-clock { text-align: center; }
.mp-clock strong { display: block; font: 22px ui-monospace, monospace; }
.mp-clock span { display: block; font-size: 10px; color: #acb9c2; margin-top: 5px; white-space: nowrap; }
.mp-connection { position: absolute; right: 15px; top: 13px; font: 11px ui-monospace, monospace; background: #09121bcc; padding: 6px 10px; border-radius: 3px; }
.mp-notice { position: absolute; top: 105px; left: 50%; transform: translateX(-50%); max-width: 85vw; text-align: center; background: #172532ed; padding: 10px 18px; border: 1px solid #a97e48; border-radius: 5px; z-index: 5; }
.mp-notice:empty { display: none; }
.mp-feed { position: absolute; right: 18px; top: 112px; max-width: 35vw; font-size: 12px; }
.mp-feed > div { padding: 7px 10px; margin-top: 5px; background: #0a121bd9; border-radius: 3px; overflow-wrap: anywhere; }
.mp-red { color: #ff806e !important; }
.mp-blue { color: #80c4ff !important; }
.mp-name { position: absolute; left: 0; top: 0; display: block; background: #0b141cd9; border: 1px solid currentColor; border-radius: 3px; padding: 2px 7px; font-size: 10px; white-space: nowrap; }
.mp-life { position: absolute; top: 64%; left: 50%; transform: translateX(-50%); background: #101923eb; border: 1px solid #edb364; color: #edb364; padding: 12px 22px; border-radius: 4px; white-space: nowrap; }
.mp-scoreboard { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: #050a0ed9; pointer-events: auto; z-index: 3; overflow: auto; }
.mp-score-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #39454e; padding: 8px 0; }
.mp-score-row b { font-size: 12px; font-weight: 400; }
.mp-bottom { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #d8e0e5; text-shadow: 0 1px 4px #000; white-space: nowrap; }
body.mp-mode .h-compass { top: 96px; }
@media (max-width: 850px) {
  .mp-lobby-columns { grid-template-columns: 1fr; gap: 22px; }
  .mp-entry { display: grid; grid-template-columns: 1fr; }
  .mp-rooms { max-height: 260px; }
}
@media (max-width: 650px) {
  .mp-card { padding: 20px; }
  .mp-rosters { gap: 12px; }
  .mp-top { min-width: 290px; gap: 12px; }
  .mp-feed { top: 170px; max-width: 50vw; }
  .mp-bottom { display: none; }
  .mp-actions button { flex: 1 1 40%; }
  .mp-connection { right: 6px; top: 5px; font-size: 9px; }
  .mp-room-row { gap: 8px; padding: 12px 9px; }
  .mp-room-count { font-size: 15px; }
  #multiplayer .mp-room-row button { padding: 6px 8px; }
}
