:root {
    --ink: #07080c;
    --court: #0c0e14;
    --line: #232838;
    --text: #f3efe6;
    --muted: #8a8e84;
    --accent: #d6ff3f;
    --ice: #7ee0ff;
    --led: #f0c14b;
    --board: #12100b;
    --danger: #ff5a3c;
    --panel: #10131b;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    background: var(--ink);
    color: var(--text);
    font-family: Oswald, "Segoe UI Condensed", Impact, sans-serif;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    overscroll-behavior: none;
}

body {
    font-size: 1rem;
}

.shell {
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(214, 255, 63, 0.06), transparent 42%),
        var(--ink);
}

.sponsorBoard {
    height: 4.1rem;
    background: linear-gradient(180deg, #1a160e 0%, var(--board) 40%, #0c0b08 100%);
    border-top: 0.08rem solid #3a3018;
    border-bottom: 0.08rem solid #3a3018;
    overflow: hidden;
    position: relative;
    flex: 0 0 4.1rem;
    z-index: 3;
}

.sponsorBoard::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1.6rem;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg, #0c0b08, transparent);
}

.sponsorTrack {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    gap: 0.55rem;
    padding: 0 12rem 0 0.7rem;
    will-change: transform;
}

.sponsorTrack.isTop {
    animation: marqueeLeft 180s linear infinite;
}

.sponsorTrack.isBottom {
    animation: marqueeRight 180s linear infinite;
}

.sponsorCard {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 10.5rem;
    height: 3.15rem;
    padding: 0 0.55rem;
    border: 0.07rem solid #3a3018;
    background: #16120c;
    color: var(--led);
    text-decoration: none;
    flex: 0 0 auto;
}

.sponsorCard.isAdvertise,
.sponsorCard.isPinned {
    border-color: #5a4a22;
    background: #1c170e;
}

.sponsorCard.isPinned {
    position: absolute;
    top: 0.42rem;
    right: 0.45rem;
    z-index: 4;
    box-shadow: -1.2rem 0 1.2rem #0c0b08;
}

.sponsorLogo {
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 2.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0c0b08;
    border: 0.06rem solid #3a3018;
    overflow: hidden;
}

.sponsorLogo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sponsorLogo.isMark {
    color: var(--led);
    font-size: 1.05rem;
    letter-spacing: 0;
}

.sponsorCopy {
    min-width: 0;
    text-align: left;
}

.sponsorCopy strong,
.sponsorCopy em {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sponsorCopy strong {
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    font-style: normal;
}

.sponsorCopy em {
    margin-top: 0.12rem;
    color: #c4a056;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    font-style: normal;
}

@keyframes marqueeLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes marqueeRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.gameHeader,
.gameFooter {
    display: grid;
    align-items: center;
    width: 100%;
    padding-inline: clamp(0.8rem, 2.4vw, 2rem);
}

.gameHeader {
    grid-template-columns: 1fr auto 1fr;
    min-height: 5.2rem;
    border-bottom: 0.06rem solid rgba(255, 255, 255, 0.06);
}

button {
    font: inherit;
}

.brandBlock,
.brandType,
.headerActions,
.identityCard,
.controlHint,
.matchState {
    display: flex;
    align-items: center;
}

.brandBlock {
    gap: 0.75rem;
}

.brandMark {
    position: relative;
    display: grid;
    grid-template-columns: 0.22rem 0.42rem 0.22rem;
    align-items: center;
    gap: 0.22rem;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0.45rem;
    border: 0.06rem solid #2b3140;
    background: #10131a;
}

.brandMark i {
    display: block;
    width: 0.22rem;
    height: 1.2rem;
    background: var(--accent);
}

.brandMark i:last-child {
    justify-self: end;
    height: 0.85rem;
    background: var(--text);
}

.brandMark b {
    display: block;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--text);
}

.brandType {
    align-items: flex-start;
    flex-direction: column;
}

.brandType strong {
    font-size: 1.08rem;
    letter-spacing: 0.2em;
    line-height: 1;
}

.brandType small,
.scoreSide small,
.sideLabel,
.identityCard small,
.liveStatLabel,
.modalEyebrow,
.profileHero span,
.profileStats small {
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.6rem;
    letter-spacing: 0.11em;
}

.brandType small {
    margin-top: 0.4rem;
}

.liveDot,
.matchState i {
    display: inline-block;
    width: 0.38rem;
    height: 0.38rem;
    margin-right: 0.3rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0.6rem rgba(214, 255, 63, 0.75);
}

.scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 11rem;
}

.scoreSide {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-width: 3.7rem;
}

.scoreSide b {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.05;
}

.scoreDash {
    margin-inline: 0.8rem;
    color: #3a4150;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.headerActions {
    justify-content: flex-end;
    gap: 0.55rem;
}

.leaderChip,
.soundButton,
.shareButton,
.identityCard,
.closeButton,
.tabBar button,
.accountTabs button,
.primaryButton,
.secondaryButton,
.overlayAction,
.shareLink {
    border: 0;
    color: inherit;
    cursor: pointer;
}

.leaderChip {
    min-width: 11.5rem;
    padding: 0.48rem 0.7rem;
    border: 0.06rem solid #303746;
    background: #10131a;
    text-align: left;
    transition: border-color 140ms ease, background 140ms ease;
}

.leaderChip:hover,
.leaderChip:focus-visible {
    border-color: #657331;
    background: #14190f;
}

.leaderChipLabel {
    display: block;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.55rem;
    letter-spacing: 0.13em;
}

.leaderChipName {
    display: block;
    margin-top: 0.16rem;
    color: var(--text);
    font-size: 0.84rem;
    letter-spacing: 0.1em;
}

.leaderChipName i {
    margin-right: 0.25rem;
    color: var(--accent);
    font-style: normal;
}

.shareButton {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-width: 5.6rem;
    min-height: 2.9rem;
    padding: 0.42rem 0.65rem;
    border: 0.06rem solid #303746;
    background: #10131a;
    text-align: left;
}

.shareButton small {
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.52rem;
    letter-spacing: 0.12em;
}

.shareButton span {
    margin-top: 0.12rem;
    color: var(--accent);
    font-size: 0.84rem;
    letter-spacing: 0.12em;
}

.shareButton:hover,
.shareButton:focus-visible {
    border-color: #657331;
}

.soundButton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-width: 6.6rem;
    min-height: 2.9rem;
    border: 0.06rem solid #303746;
    background: transparent;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.58rem;
    letter-spacing: 0.09em;
}

.soundButton.isMuted {
    color: var(--danger);
}

.soundIcon {
    color: var(--accent);
    font-size: 1rem;
}

.arenaWrap {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: min(100%, 100rem);
    min-height: 0;
    margin-inline: auto;
    padding: 0.65rem clamp(0.8rem, 2.4vw, 2rem) 0;
}

.matchBar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    min-height: 3.25rem;
    padding: 0 0.15rem 0.55rem;
}

.playerCard {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.playerCardRight {
    align-items: flex-end;
    text-align: right;
}

.playerCard strong {
    margin: 0.15rem 0 0.05rem;
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    line-height: 1;
}

.playerCard > span:last-child {
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

.matchState {
    align-self: center;
    min-width: 8rem;
    justify-content: center;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
}

.matchState i {
    box-shadow: none;
    animation: pulse 1.1s ease-in-out infinite;
}

.matchState.isLive {
    color: var(--text);
}

.matchState.isLive i {
    box-shadow: 0 0 0.6rem rgba(214, 255, 63, 0.75);
    animation: none;
}

.courtFrame {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-height: 0;
    overflow: hidden;
    border: 0.06rem solid #29303e;
    border-radius: 0.28rem;
    background: #090b10;
    box-shadow:
        0 1.4rem 4rem rgba(0, 0, 0, 0.3),
        0 0 0 0.06rem rgba(0, 0, 0, 0.8);
}

.courtFrame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 18%),
        repeating-linear-gradient(0deg, transparent 0, transparent 0.2rem, rgba(255, 255, 255, 0.009) 0.24rem);
}

#arena {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 20.5rem);
    background: radial-gradient(ellipse at 50% 50%, #141824 0%, var(--court) 70%);
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
    background: radial-gradient(circle at center, rgba(7, 8, 12, 0.58), rgba(7, 8, 12, 0.08) 55%, transparent 72%);
    pointer-events: none;
    text-align: center;
    transition: opacity 120ms ease;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
}

.overlayTitle {
    margin: 0;
    font-size: clamp(2.2rem, 7vw, 5.4rem);
    letter-spacing: 0.075em;
    line-height: 0.94;
    text-shadow: 0 0.4rem 2rem rgba(0, 0, 0, 0.5);
}

.overlayPulse {
    height: 0.65rem;
    margin: 0.9rem 0 0;
}

.overlayPulse span {
    display: inline-block;
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0.8rem var(--accent);
    animation: pulse 1.1s ease-in-out infinite;
}

.overlaySub {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    white-space: pre-wrap;
}

.overlayAction {
    margin-top: 1.1rem;
    padding: 0.65rem 0.95rem;
    border: 0.06rem solid #3b4351;
    background: rgba(12, 15, 21, 0.86);
    color: var(--text);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    pointer-events: auto;
}

.overlayAction[hidden] {
    display: none;
}

.incomingChip {
    position: absolute;
    top: 0.7rem;
    left: 50%;
    z-index: 4;
    padding: 0.4rem 0.7rem;
    border: 0.06rem solid #657331;
    background: rgba(16, 20, 12, 0.92);
    color: var(--accent);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    transform: translateX(-50%);
    pointer-events: none;
}

.incomingChip[hidden] {
    display: none;
}

.shareToast {
    position: fixed;
    bottom: 6.5rem;
    left: 50%;
    z-index: 40;
    padding: 0.7rem 1rem;
    border: 0.06rem solid #657331;
    background: #12160d;
    color: var(--accent);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    transform: translateX(-50%);
}

.shareToast[hidden] {
    display: none;
}

.shareBlock {
    margin: 1rem 1.4rem 0;
}

.shareBlock small {
    display: block;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.56rem;
    letter-spacing: 0.1em;
}

.shareLink {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.7rem 0.75rem;
    border: 0.06rem solid #343c4c;
    background: #10141c;
    color: var(--accent);
    font: 0.68rem "IBM Plex Mono", ui-monospace, monospace;
    letter-spacing: 0.06em;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overlay.isHidden {
    opacity: 0;
}

.overlay.isResult .eyebrow,
.overlay.isResult .overlayTitle {
    color: var(--accent);
}

.overlay.isLoss .eyebrow,
.overlay.isLoss .overlayTitle {
    color: var(--danger);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.62); opacity: 0.42; }
}

.gameFooter {
    grid-template-columns: 1fr auto 1fr;
    min-height: 4.7rem;
    gap: 1rem;
}

.identityCard {
    justify-self: start;
    gap: 0.7rem;
    padding: 0.45rem 0.6rem 0.45rem 0;
    background: transparent;
    text-align: left;
}

.identityBadge {
    min-width: 3.2rem;
    padding: 0.28rem 0.35rem;
    border: 0.06rem solid #3b4351;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    text-align: center;
}

.identityCard.isRegistered .identityBadge {
    border-color: #61702e;
    color: var(--accent);
}

.identityCopy {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.identityCopy strong {
    font-size: 0.94rem;
    letter-spacing: 0.14em;
}

.identityCopy small {
    margin-top: 0.18rem;
}

.identityAction {
    color: var(--accent);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.54rem;
    letter-spacing: 0.08em;
}

.controlHint {
    gap: 0.3rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.54rem;
    letter-spacing: 0.08em;
}

.controlHint > span,
.controlHint kbd {
    padding: 0.28rem 0.38rem;
    border: 0.06rem solid #343b49;
    background: #10131a;
    color: var(--text);
    font: inherit;
}

.controlHint i {
    font-size: 0.46rem;
    font-style: normal;
}

.controlHint small {
    margin-left: 0.2rem;
    color: #626978;
    font-size: 0.5rem;
}

.liveStat {
    justify-self: end;
    min-width: 8rem;
    text-align: right;
}

.liveStatLabel {
    display: block;
}

.liveStatValue {
    display: block;
    margin-top: 0.15rem;
    color: var(--accent);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.92rem;
}

.rotateGate {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background:
        radial-gradient(circle at center, rgba(214, 255, 63, 0.05), transparent 42%),
        var(--ink);
    letter-spacing: 0.22em;
}

.rotateGate[hidden] {
    display: none;
}

.rotateGate p {
    margin: 0;
    font-size: 1.3rem;
}

.rotateGate small {
    margin-top: 0.55rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.52rem;
}

.rotateIcon {
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 3.5rem;
    animation: spinHint 2.8s linear infinite;
}

@keyframes spinHint {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.modalShell {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 4, 7, 0.86);
    backdrop-filter: blur(0.7rem);
    touch-action: auto;
}

.modalShell[hidden] {
    display: none;
}

.modalPanel {
    width: min(48rem, 100%);
    max-height: min(48rem, 90dvh);
    overflow: auto;
    border: 0.06rem solid #323a49;
    background: #0c0f15;
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.55);
    user-select: text;
    -webkit-user-select: text;
}

.modalHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.4rem 1.15rem;
    border-bottom: 0.06rem solid #252b37;
}

.modalHeader h2 {
    margin: 0.22rem 0 0;
    font-size: 1.65rem;
    letter-spacing: 0.14em;
}

.modalHeader p {
    max-width: 34rem;
    margin: 0.38rem 0 0;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.65rem;
    line-height: 1.55;
}

.modalEyebrow {
    color: var(--accent);
}

.closeButton {
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    background: #151923;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 1.25rem;
}

.closeButton:hover {
    color: var(--text);
}

.tabBar,
.accountTabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.8rem 1.4rem 0;
}

.tabBar button,
.accountTabs button {
    padding: 0.48rem 0.65rem;
    border-bottom: 0.12rem solid transparent;
    background: transparent;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
}

.tabBar button.isOn,
.accountTabs button.isOn {
    border-bottom-color: var(--accent);
    color: var(--text);
}

.leaderboardTable {
    padding: 0.8rem 1.4rem 1.4rem;
}

.leaderboardRow,
.leaderboardHead {
    display: grid;
    grid-template-columns: 3.2rem minmax(8rem, 1fr) 5rem 4rem 4.5rem 4rem;
    align-items: center;
    min-height: 2.8rem;
    gap: 0.65rem;
    border-bottom: 0.06rem solid #202632;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.7rem;
}

.leaderboardHead {
    min-height: 2rem;
    color: var(--muted);
    font-size: 0.56rem;
    letter-spacing: 0.09em;
}

.leaderboardRow:first-of-type {
    color: var(--accent);
}

.leaderboardRow.isYou {
    background: rgba(214, 255, 63, 0.08);
    color: var(--accent);
}

.emptyBoard {
    padding: 3.5rem 1rem;
    text-align: center;
}

.emptyBoard strong {
    display: block;
    font-size: 1.4rem;
    letter-spacing: 0.12em;
}

.emptyBoard span {
    display: block;
    margin-top: 0.4rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.64rem;
}

.statePanel {
    width: min(68rem, 100%);
}

.stateHeader,
.stateActions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.stateHeader {
    padding: 1.35rem 1.4rem 1.15rem;
    border-bottom: 0.06rem solid #252b37;
}

.stateHeader h2 {
    margin: 0.22rem 0 0;
    font-size: 1.65rem;
    letter-spacing: 0.14em;
}

.stateHeader p {
    max-width: 34rem;
    margin: 0.38rem 0 0;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.65rem;
    line-height: 1.55;
}

.stateTimer {
    min-width: 7.5rem;
    padding: 0.7rem 0.85rem;
    border: 0.06rem solid #2d3442;
    background: #10141c;
    text-align: right;
}

.stateTimer.isHeld {
    border-color: var(--led);
}

.stateTimer small,
.stateBoardHead h3,
.stateGuestLead,
.stateRankedLead {
    display: block;
}

.stateTimer small {
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.56rem;
    letter-spacing: 0.1em;
}

.stateTimer strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--accent);
    font: 1.7rem "IBM Plex Mono", ui-monospace, monospace;
    line-height: 1;
}

.stateGrid {
    display: grid;
    grid-template-columns: minmax(20rem, 0.9fr) minmax(22rem, 1.15fr);
    min-height: 22rem;
}

.stateResult {
    padding: 1.2rem 1.4rem 1.3rem;
    border-right: 0.06rem solid #252b37;
}

.stateVerdict {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: 0.08em;
    line-height: 0.92;
}

.statePanel.isWin .stateVerdict,
.statePanel.isWin .stateRatingDelta {
    color: var(--accent);
}

.statePanel.isLoss .stateVerdict,
.statePanel.isLoss .stateRatingDelta {
    color: var(--danger);
}

.stateScore {
    margin: 0.55rem 0 0;
    font: 1.35rem "IBM Plex Mono", ui-monospace, monospace;
}

.stateVersus {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
}

.stateStats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 1.1rem;
    border: 0.06rem solid #2d3442;
}

.stateStats > span {
    padding: 0.75rem 0.8rem;
    border-right: 0.06rem solid #2d3442;
}

.stateStats > span:last-child {
    border-right: 0;
}

.stateStats small,
.stateStats strong,
.stateStats em {
    display: block;
}

.stateStats strong {
    margin-top: 0.28rem;
    font: 0.95rem "IBM Plex Mono", ui-monospace, monospace;
}

.stateStats em,
.stateGuestLead,
.stateRankedCopy {
    margin-top: 0.28rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.58rem;
    font-style: normal;
    letter-spacing: 0.06em;
}

.stateGuest,
.stateRanked {
    margin-top: 1.15rem;
}

.stateGuestLead,
.stateRankedLead {
    margin: 0 0 0.7rem;
    color: var(--text);
    letter-spacing: 0.08em;
}

.stateForm {
    padding: 0;
}

.stateRankedCopy {
    margin: 0.35rem 0 0;
}

.stateBoard {
    min-width: 0;
    padding: 1rem 0 0;
}

.stateBoardHead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0 1.4rem 0.2rem;
}

.stateBoardHead h3 {
    margin: 0.2rem 0 0;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
}

.stateBoardTable {
    max-height: 22rem;
    overflow: auto;
}

.ghostButton {
    padding: 0.4rem 0.55rem;
    border: 0.06rem solid #3b4351;
    background: transparent;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
}

.ghostButton:hover,
.stateHold:hover {
    color: var(--text);
}

.stateActions {
    align-items: center;
    padding: 1rem 1.4rem 1.25rem;
    border-top: 0.06rem solid #252b37;
}

.stateHold {
    margin: 0;
}

.stateActions .primaryButton {
    min-width: 14rem;
    grid-column: auto;
}

.accountPanel {
    width: min(35rem, 100%);
}

.accountGuest,
.accountRegistered {
    padding-bottom: 1.35rem;
}

.accountForm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding: 1rem 1.4rem 0;
}

.accountForm[hidden] {
    display: none;
}

.accountForm label {
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.57rem;
    letter-spacing: 0.09em;
}

.accountForm input {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.72rem 0.75rem;
    border: 0.06rem solid #343c4c;
    border-radius: 0;
    outline: none;
    background: #10141c;
    color: var(--text);
    font: 0.78rem "IBM Plex Mono", ui-monospace, monospace;
}

.accountForm input:focus {
    border-color: var(--accent);
}

.primaryButton,
.secondaryButton {
    padding: 0.8rem 1rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

.primaryButton {
    grid-column: 1 / -1;
    background: var(--accent);
    color: #090b08;
    font-weight: 600;
}

.primaryButton:disabled {
    opacity: 0.45;
    cursor: wait;
}

.secondaryButton {
    margin: 1rem 1.4rem 0;
    border: 0.06rem solid #3b4351;
    background: transparent;
    color: var(--muted);
}

.formMessage {
    min-height: 1rem;
    margin: 0.75rem 1.4rem 0;
    color: var(--danger);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.62rem;
    line-height: 1.5;
}

.formMessage.isSuccess {
    color: var(--accent);
}

.profileHero {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    padding: 1.3rem 1.4rem 1rem;
}

.profileHero strong {
    margin-top: 0.25rem;
    font-size: 1.8rem;
    letter-spacing: 0.14em;
}

.profileHero small {
    margin-top: 0.2rem;
    color: var(--muted);
    font: 0.65rem "IBM Plex Mono", ui-monospace, monospace;
}

.profileStats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-inline: 1.4rem;
    border: 0.06rem solid #2d3442;
}

.profileStats > span {
    padding: 0.8rem;
    border-right: 0.06rem solid #2d3442;
}

.profileStats > span:last-child {
    border-right: 0;
}

.profileStats small,
.profileStats strong {
    display: block;
}

.profileStats strong {
    margin-top: 0.25rem;
    font: 1rem "IBM Plex Mono", ui-monospace, monospace;
}

@media (max-width: 48rem) {
    .gameHeader {
        min-height: 3.6rem;
    }

    .brandType,
    .soundButton span:last-child,
    .leaderChipLabel,
    .shareButton small,
    .controlHint small {
        display: none;
    }

    .brandMark {
        transform: scale(0.85);
        transform-origin: left center;
    }

    .headerActions {
        gap: 0.3rem;
    }

    .leaderChip {
        min-width: 7.5rem;
        padding: 0.4rem 0.5rem;
    }

    .leaderChipName {
        font-size: 0.7rem;
    }

    .soundButton,
    .shareButton {
        min-width: 2.5rem;
        min-height: 2.35rem;
    }

    .shareButton {
        align-items: center;
        padding: 0.35rem 0.45rem;
    }

    .scoreboard {
        min-width: 7.5rem;
    }

    .scoreSide {
        min-width: 2.5rem;
    }

    .scoreSide b {
        font-size: 1.35rem;
    }

    .scoreDash {
        margin-inline: 0.35rem;
    }

    .arenaWrap {
        padding: 0.35rem 0.65rem 0;
    }

    .matchBar {
        min-height: 2.55rem;
        padding-bottom: 0.35rem;
    }

    .playerCard strong {
        font-size: 0.82rem;
    }

    .matchState {
        min-width: 5rem;
        font-size: 0.48rem;
    }

    #arena {
        max-height: calc(100dvh - 17rem);
    }

    .gameFooter {
        grid-template-columns: 1fr auto;
        min-height: 3.6rem;
        padding-inline: 0.65rem;
    }

    .identityAction,
    .controlHint {
        display: none;
    }

    .liveStat {
        min-width: 6rem;
    }

    .leaderboardRow,
    .leaderboardHead {
        grid-template-columns: 2.2rem minmax(6rem, 1fr) 3.5rem 2.5rem;
    }

    .leaderboardRow span:nth-child(5),
    .leaderboardRow span:nth-child(6),
    .leaderboardHead span:nth-child(5),
    .leaderboardHead span:nth-child(6) {
        display: none;
    }

    .accountForm {
        grid-template-columns: 1fr;
    }

    .stateGrid {
        grid-template-columns: 1fr;
    }

    .stateResult {
        border-right: 0;
        border-bottom: 0.06rem solid #252b37;
    }

    .stateBoardTable {
        max-height: 14rem;
    }

    .stateActions {
        flex-wrap: wrap;
    }

    .stateActions .primaryButton,
    .stateHold {
        width: 100%;
    }
}

@media (max-height: 38rem) and (orientation: landscape) {
    .gameHeader {
        min-height: 3.2rem;
    }

    .gameFooter {
        min-height: 3.1rem;
    }

    .matchBar {
        min-height: 2.2rem;
    }

    .sideLabel,
    .identityCopy small {
        display: none;
    }

    #arena {
        max-height: calc(100dvh - 16rem);
    }

    .stateHeader h2 {
        font-size: 1.2rem;
    }

    .stateVerdict {
        font-size: 1.6rem;
    }

    .stateStats {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .stateBoardTable {
        max-height: 8rem;
    }
}
}
