* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { background: #091016; color: #ecf0e9; font-family: Arial, Helvetica, sans-serif; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 1px solid #34414a; background: #15212a; color: #ecf0e9; border-radius: 7px; min-height: 44px; padding: 10px 16px; }
button:disabled { cursor: default; opacity: .45; }
button:focus, a:focus, input:focus { outline: 2px solid #d6ef8b; outline-offset: 4px; }
button:hover { border-color: #98a8ad; }
a { color: inherit; }
[hidden] { display: none !important; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 100px; padding: 25px 36px; z-index: 4; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; }
.brand { text-decoration: none; letter-spacing: -3px; font-size: 38px; font-weight: bold; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.brand img { width: 44px; height: 44px; margin-right: 10px; }
.brand span { color: #d4ed8a; }
.round-info { text-align: center; position: absolute; left: 43%; width: 14%; }
.round-info span { display: block; font-size: 10px; letter-spacing: 2px; color: #8b9b9e; margin-bottom: 4px; }
.round-info strong { font-size: 28px; font-weight: normal; font-family: Consolas, monospace; letter-spacing: 2px; }
.round-info.urgent strong { color: #ff8a91; }
.tools { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.tools button { margin-left: 8px; width: 44px; height: 44px; padding: 10px; }
.tools svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tools button[aria-pressed="true"] { color: #d4ed8a; border-color: #8aa45a; }
.resume-icon, #pause[data-paused="true"] .pause-icon, .sound-waves { display: none; }
#pause[data-paused="true"] .resume-icon, #sound[aria-pressed="true"] .sound-waves { display: block; }
#sound[aria-pressed="true"] .sound-muted { display: none; }
#connection { position: absolute; top: 100%; right: 25px; font-size: 11px; color: #9dadad; }
#arena { position: absolute; top: 105px; bottom: 180px; left: 29%; right: 22px; overflow: hidden; }
#scene, #labels { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#labels { pointer-events: none; }
.graphics-error { position: absolute; top: 35%; left: 10%; width: 80%; padding: 24px; background: #17252d; color: #e4ebe3; border: 1px solid #45616b; font-size: 14px; line-height: 1.6; text-align: center; }
.welcome { position: absolute; top: 21%; left: 5%; width: 31%; max-width: 460px; z-index: 2; }
.eyebrow { font-size: 10px; font-weight: bold; letter-spacing: 2.5px; color: #cce492; margin: 0 0 22px; }
h1 { font-size: 72px; line-height: .98; letter-spacing: -4px; margin: 0 0 25px; font-weight: bold; }
h1 em { font-style: normal; color: #d4ed8a; }
.intro { font-size: 16px; line-height: 1.7; color: #a3b3b7; margin: 0 0 28px; }
.rule-strip { display: -webkit-flex; display: flex; margin: 0 0 28px; font-size: 12px; }
.rule-strip span { margin-right: 21px; }
.rule-strip b { font-size: 10px; color: #6d858a; display: block; margin-bottom: 8px; }
.primary { background: #d4ed8a; color: #172118; font-weight: bold; border: 0; padding: 16px 28px; min-width: 180px; font-size: 15px; }
.small { color: #81969c; font-size: 11px; line-height: 1.5; }
.local-join { margin-top: 14px; max-width: 360px; }
.local-join label { font-size: 10px; display: block; color: #8b9b9e; margin-bottom: 7px; }
.local-join input { background: #0f1a22; color: #dde5df; border: 1px solid #34414a; border-radius: 5px; width: 52%; height: 40px; padding: 9px; font-size: 12px; }
.local-join button { font-size: 12px; min-height: 40px; padding: 9px 13px; margin-left: 6px; }
#nameStatus { max-width: 310px; }
.bottom-bar { position: absolute; bottom: 22px; left: 36px; right: 155px; z-index: 3; }
.score-heading { display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; color: #91a4a9; font-size: 10px; letter-spacing: 1.3px; margin-bottom: 14px; }
.scores { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.score { width: 16.666%; min-width: 0; padding-right: 14px; }
.score-inner { border-top: 2px solid #2b3d43; padding-top: 11px; }
.score-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: #b3bfc0; margin-bottom: 4px; }
.score-name b { margin-right: 7px; }
.score strong { font-size: 24px; font-weight: normal; letter-spacing: -.5px; }
.score small { font-size: 10px; color: #71868e; margin-left: 5px; }
.score.empty { opacity: .35; }
.score.away { opacity: .45; }
#hint { margin: 13px 0 0; letter-spacing: 1px; font-size: 9px; }
.invite { position: absolute; bottom: 25px; right: 25px; width: 100px; height: 148px; z-index: 5; }
#qrPanel { position: absolute; bottom: 0; right: 0; -webkit-transform: scale(.6); transform: scale(.6); -webkit-transform-origin: bottom right; transform-origin: bottom right; width: 166px; }
.invite-link { display: block; padding: 16px; border: 2px solid #d4ed8a; border-radius: 8px; color: #d4ed8a; font-size: 22px; line-height: 1.6; text-align: center; }
.rcRoomQrCodeLink, .rcRoomQrCodeLink * { box-sizing: content-box; }
.rcRoomQrCodeLink { display: block; width: 150px; margin-left: auto; margin-right: auto; border: solid 8px #fff; border-radius: 8px; color: #fff; background-color: #fff; text-align: center; text-decoration: none; }
.rcTechLabel { background-color: #000; color: #fff; font-family: monospace; font-size: 13px; font-weight: bold; margin: 0 0 8px 0; padding: 4px; letter-spacing: .2em; border-radius: 8px 8px 0 0; }
.rcRoomQrCode { width: 150px; height: 150px; }
.rcRoomId { background-color: #000; color: #fff; font-family: monospace; font-size: 16px; padding: 4px; margin: 8px 0 0 0; letter-spacing: .25em; border-radius: 0 0 8px 8px; }
.capture { position: absolute; left: 50%; top: 112px; -webkit-transform: translateX(-50%); transform: translateX(-50%); padding: 12px 22px; border-radius: 8px; background: #d4ed8a; color: #122118; font-size: 16px; font-weight: bold; z-index: 6; max-width: 85%; text-align: center; }
.pause-notice { position: absolute; top: 45%; left: 20%; width: 60%; padding: 24px; background: #111e27; border: 1px solid #415460; text-align: center; font-size: 24px; z-index: 7; }
.map-panel { position: absolute; bottom: 190px; left: 30px; width: 116px; opacity: .85; }
.map-panel canvas { display: block; width: 115px; height: 95px; border: 1px solid #3d5157; }
.map-panel span { font-size: 8px; letter-spacing: 1px; color: #8b9b9e; display: block; margin-top: 8px; text-align: center; }
body[data-phase="playing"] #arena { left: 160px; right: 30px; bottom: 180px; touch-action: none; -ms-touch-action: none; -webkit-user-select: none; user-select: none; }
body[data-phase="playing"] .welcome { display: none; }
body[data-phase="over"] .welcome { background: #091016; padding: 28px; border: 1px solid #33424b; border-radius: 12px; top: 20%; }
body[data-phase="over"] h1 { font-size: 42px; letter-spacing: -2px; overflow-wrap: break-word; word-wrap: break-word; }
body[data-phase="over"] .rule-strip, body[data-phase="over"] .local-join { display: none; }
.lean * { box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; }
@media (min-width: 1500px) { h1 { font-size: 100px; } .intro { font-size: 20px; } .welcome { top: 25%; } .score strong { font-size: 32px; } .bottom-bar { bottom: 30px; } }
@media (max-height: 650px) and (min-width: 701px) {
    .topbar { height: 75px; padding: 15px 25px; } .brand { font-size: 31px; } .brand img { width: 36px; height: 36px; }
    .welcome { top: 90px; left: 30px; width: 300px; } .eyebrow { margin-bottom: 12px; font-size: 8px; } h1 { font-size: 38px; margin-bottom: 15px; letter-spacing: -2px; }
    h1 br { display: none; }
    .intro { font-size: 12px; margin-bottom: 16px; } .rule-strip { display: none; } .local-join { margin-top: 10px; }
    .primary { padding: 12px 20px; min-height: 42px; font-size: 13px; } .small { font-size: 10px; }
    .bottom-bar { bottom: 15px; left: 25px; } .score-heading { margin-bottom: 9px; } .score-inner { padding-top: 8px; }
    .score strong { font-size: 20px; } .score-name { font-size: 10px; } #hint { font-size: 8px; margin-top: 9px; }
    #arena { top: 75px; bottom: 120px; left: 35%; right: 140px; } body[data-phase="playing"] #arena { top: 75px; bottom: 120px; left: 100px; right: 140px; }
    .map-panel { left: 15px; bottom: 168px; width: 78px; } .map-panel canvas { width: 78px; height: 65px; } .map-panel span { font-size: 6px; }
    body[data-phase="over"] .welcome { top: 85px; padding: 18px; } body[data-phase="over"] h1 { font-size: 28px; max-height: 110px; overflow-y: auto; }
    #nameStatus { position: absolute; left: 0; top: 100%; margin: 2px 0; } .capture { top: 80px; }
}
@media (orientation: portrait) {
    .topbar { padding: 23px 25px; } .round-info { left: 46%; width: 17%; } #connection { max-width: 90px; text-align: right; }
    #arena { left: 10px; right: 10px; top: 115px; height: 36%; bottom: auto; }
    .welcome { left: 8%; top: 48%; width: 76%; max-width: none; } h1 { font-size: 64px; }
    h1 br { display: none; } .intro { margin-bottom: 16px; }
    .rule-strip { position: absolute; top: 74px; right: 0; display: block; } .rule-strip span { display: block; margin-bottom: 13px; }
    .rule-strip b { display: inline; margin-right: 8px; } .intro { max-width: 70%; } .local-join { margin-top: 14px; }
    .bottom-bar { left: 8%; right: 170px; bottom: 28px; } .score { width: 33.333%; margin-bottom: 10px; }
    .score-heading { margin-bottom: 12px; } #floorCount { display: none; } #hint { max-width: 310px; }
    .invite { bottom: 36px; right: 36px; } body[data-phase="playing"] #arena { left: 10px; right: 10px; top: 130px; bottom: 235px; height: auto; }
    .map-panel { left: 8%; bottom: 235px; } body[data-phase="over"] .welcome { top: 45%; }
}
@media (max-width: 1100px) {
    .tools { position: absolute; top: 15px; right: 25px; -webkit-justify-content: flex-end; justify-content: flex-end; }
}
@media (max-width: 600px) {
    .topbar { height: 94px; padding: 18px 18px; } .brand { font-size: 29px; letter-spacing: -2px; } .brand img { width: 32px; height: 32px; margin-right: 6px; }
    .round-info { left: 43%; width: 20%; } .round-info strong { font-size: 23px; } .round-info span { font-size: 8px; letter-spacing: 1px; }
    .tools { top: 73px; left: 18px; right: 18px; width: auto; } .tools button { min-height: 44px; padding: 9px; font-size: 10px; margin: 0 0 0 6px; }
    #connection { top: 120px; right: 18px; max-width: none; font-size: 9px; } #arena { top: 128px; height: 27%; }
    .welcome { left: 7%; top: 43%; width: 86%; } .eyebrow { font-size: 8px; margin-bottom: 14px; letter-spacing: 1.6px; }
    h1 { font-size: 40px; letter-spacing: -2px; margin-bottom: 17px; } .intro { font-size: 12px; line-height: 1.6; max-width: 73%; }
    .rule-strip { top: 90px; right: 0; font-size: 10px; } .rule-strip span { margin-right: 0; margin-bottom: 9px; } .rule-strip b { font-size: 8px; }
    .primary { font-size: 13px; padding: 13px 22px; } .local-join { margin-top: 14px; max-width: 315px; } .local-join label { font-size: 9px; }
    .local-join input { height: 44px; font-size: 16px; } .local-join button { min-height: 44px; } .small { font-size: 10px; }
    .bottom-bar { bottom: 17px; left: 7%; right: 135px; } .score-heading { font-size: 8px; margin-bottom: 10px; } .score { padding-right: 9px; margin-bottom: 8px; }
    .score-inner { padding-top: 7px; } .score-name { font-size: 9px; } .score strong { font-size: 19px; } .score small { display: none; } #hint { font-size: 7px; margin-top: 4px; }
    .invite { right: 17px; bottom: 17px; } .map-panel { width: 80px; bottom: 208px; }
    .map-panel canvas { width: 80px; height: 66px; } .map-panel span { font-size: 6px; }
    body[data-phase="playing"] #arena { top: 145px; bottom: 210px; } body[data-phase="over"] .welcome { top: 37%; padding: 22px; }
    body[data-phase="over"] h1 { font-size: 36px; } .capture { top: 128px; font-size: 12px; padding: 9px 14px; }
}
@media (max-width: 600px) and (max-height: 740px) and (orientation: portrait) {
    body[data-phase="lobby"] #arena { display: none; }
    .welcome, body[data-phase="over"] .welcome { top: 132px; }
    h1 { font-size: 34px; margin-bottom: 12px; }
    .eyebrow { margin-bottom: 10px; } .intro { max-width: 100%; margin-bottom: 12px; }
    .rule-strip { display: none; } .local-join { margin-top: 10px; }
}
@media (max-width: 360px) {
    .brand { font-size: 25px; } .brand img { width: 28px; height: 28px; }
    .round-info { left: 39%; width: 27%; }
    .tools { right: 14px; }
}
@media (min-width: 601px) and (max-height: 450px) {
    .welcome { top: 80px; width: 34%; }
    h1 { font-size: 30px; margin-bottom: 12px; }
    .eyebrow, .intro, .rule-strip, #lobbyHint { display: none; }
    .primary, .local-join button { min-height: 44px; }
    .local-join input { height: 44px; font-size: 16px; }
}
/* Keep the lobby in its own region above the scores, including browser zoom. */
body[data-phase="lobby"] .welcome { top: 110px; bottom: 160px; left: 4%; width: 32%; max-width: 460px; overflow-x: hidden; overflow-y: auto; padding: 4px 8px 8px 4px; }
body[data-phase="lobby"] #arena { left: 38%; }
body[data-phase="lobby"] h1 { font-size: 68px; margin-bottom: 18px; }
body[data-phase="lobby"] .eyebrow { margin-bottom: 16px; }
body[data-phase="lobby"] .intro, body[data-phase="lobby"] .rule-strip { margin-bottom: 18px; }
body[data-phase="lobby"] #nameStatus { position: static; margin: 6px 0 0; }
body[data-phase="lobby"] .local-join input, body[data-phase="lobby"] .local-join button { min-height: 44px; }
@media (orientation: landscape) and (max-height: 900px) {
    body[data-phase="lobby"] h1 { font-size: 42px; letter-spacing: -2px; }
    body[data-phase="lobby"] h1 br { display: none; }
    body[data-phase="lobby"] .rule-strip { display: none; }
    body[data-phase="lobby"] .intro { font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
}
@media (orientation: landscape) and (max-height: 650px) {
    body[data-phase="lobby"] .welcome { top: 80px; bottom: 120px; }
    body[data-phase="lobby"] h1 { font-size: 36px; }
}
@media (orientation: portrait) {
    body[data-phase="lobby"] #arena { left: 10px; top: 120px; height: 26%; }
    body[data-phase="lobby"] .welcome { top: 40%; bottom: 220px; left: 8%; width: 84%; max-width: none; }
    body[data-phase="lobby"] h1 { font-size: 54px; }
    body[data-phase="lobby"] .rule-strip { display: none; }
    body[data-phase="lobby"] .intro { max-width: none; }
}
@media (orientation: portrait) and (max-width: 600px) {
    body[data-phase="lobby"] .welcome { left: 7%; width: 86%; bottom: 195px; }
    body[data-phase="lobby"] h1 { font-size: 36px; }
}
@media (orientation: portrait) and (max-height: 740px) {
    body[data-phase="lobby"] #arena { display: none; }
    body[data-phase="lobby"] .welcome { top: 128px; }
    body[data-phase="lobby"] h1 { font-size: 28px; margin-bottom: 10px; }
    body[data-phase="lobby"] .eyebrow, body[data-phase="lobby"] #lobbyHint { display: none; }
    body[data-phase="lobby"] .intro { margin-bottom: 10px; }
}
@media (orientation: landscape) and (max-height: 450px) {
    body[data-phase="lobby"] .eyebrow, body[data-phase="lobby"] #lobbyHint { display: none; }
    body[data-phase="lobby"] h1 { font-size: 28px; margin-bottom: 10px; }
}
