:root {
    --bg: #0b0d0e;
    --bg-2: #0f1214;
    --panel: #14181a;
    --panel-2: #1b2023;
    --line: #2a3034;
    --line-2: #394146;
    --text: #e8e4dc;
    --dim: #8a9199;
    --faint: #5b6368;
    --teal: #5fd3c8;
    --teal-soft: rgba(95, 211, 200, .1);
    --teal-ink: #052a27;
    --amber: #f0a63a;
    --amber-soft: rgba(240, 166, 58, .08);
    --red: #e5484d;
    --red-soft: rgba(229, 72, 77, .1);
    --font-display: 'Rajdhani', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    --font-body: 'IBM Plex Sans', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(1200px 800px at 92% -12%, rgba(95, 211, 200, .08), transparent 55%),
        radial-gradient(900px 700px at -15% 110%, rgba(240, 166, 58, .06), transparent 50%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .5) 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .5) 55%, transparent 100%);
}

.scan {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
    opacity: .32;
}

::selection {
    background: rgba(95, 211, 200, .3);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--line-2);
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--faint);
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.icon-lg {
    width: 34px;
    height: 34px;
}

/* ---------- 顶栏 ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px clamp(16px, 4vw, 48px);
    border-bottom: 1px solid var(--line);
    background: rgba(11, 13, 14, .86);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--teal);
    background: var(--teal-soft);
    color: var(--teal);
    box-shadow: 0 0 18px rgba(95, 211, 200, .18);
}

.brand-mark .icon {
    width: 18px;
    height: 18px;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1;
}

.brand-slash {
    color: var(--teal);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
    flex: none;
}

.dot.live {
    background: var(--teal);
    box-shadow: 0 0 0 3px rgba(95, 211, 200, .18), 0 0 12px rgba(95, 211, 200, .75);
    animation: pulse 2.6s ease-in-out infinite;
}

.dot.warn {
    background: var(--amber);
    box-shadow: 0 0 0 3px rgba(240, 166, 58, .16), 0 0 12px rgba(240, 166, 58, .6);
}

.dot.bad {
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .16), 0 0 12px rgba(229, 72, 77, .6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .45;
    }
}

.identity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--dim);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.identity:hover {
    border-color: var(--line-2);
    color: var(--text);
}

.identity .icon {
    width: 15px;
    height: 15px;
}

/* ---------- 视图 ---------- */

.view {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 46px) clamp(16px, 4vw, 48px) 90px;
}

.lobby-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 40px;
    align-items: end;
    margin-bottom: 38px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .32em;
    text-transform: uppercase;
}

.lobby-intro h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 84px);
    font-weight: 700;
    line-height: .92;
    letter-spacing: .01em;
}

.lede {
    margin: 0 0 6px auto;
    max-width: 34ch;
    padding-left: 22px;
    border-left: 1px solid var(--line-2);
    color: var(--dim);
    font-size: 14px;
    line-height: 1.85;
}

.lobby-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

/* ---------- 面板 ---------- */

.panel {
    position: relative;
    padding: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 34%), var(--panel);
}

.lobby-side .panel + .panel,
.room-side .panel + .panel {
    margin-top: 16px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head h2 {
    display: flex;
    align-items: center;
    margin: 0;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.tick {
    display: inline-block;
    width: 12px;
    height: 2px;
    margin-right: 9px;
    background: var(--teal);
}

.panel-note {
    margin: 12px 0 0;
    color: var(--faint);
    font-size: 12px;
    line-height: 1.6;
}

/* ---------- 表单 ---------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--dim);
    font-size: 12px;
    letter-spacing: .06em;
}

.field-hint {
    color: var(--faint);
    font-size: 11px;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: .02em;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 1px rgba(95, 211, 200, .25);
}

input::placeholder {
    color: var(--faint);
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 16px;
    color: var(--dim);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-box {
    position: relative;
    width: 34px;
    height: 18px;
    border: 1px solid var(--line-2);
    background: var(--bg-2);
    transition: border-color .15s, background .15s;
}

.switch-box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--dim);
    transition: transform .15s, background .15s;
}

.switch-row input:checked + .switch-box {
    border-color: var(--teal);
    background: var(--teal-soft);
}

.switch-row input:checked + .switch-box::after {
    transform: translateX(16px);
    background: var(--teal);
}

/* ---------- 按钮 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1px solid transparent;
    background: var(--panel-2);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    cursor: pointer;
    transition: filter .15s, border-color .15s, color .15s, background .15s;
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.btn:hover:not(:disabled) {
    filter: brightness(1.15);
}

.btn:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12px;
}

.btn-primary {
    background: var(--teal);
    color: var(--teal-ink);
}

.btn-ghost {
    border-color: var(--line-2);
    background: transparent;
    color: var(--dim);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--text);
    color: var(--text);
}

.btn-danger {
    border-color: var(--red);
    background: transparent;
    color: var(--red);
}

.btn-danger:hover:not(:disabled) {
    background: var(--red-soft);
}

/* ---------- 大厅 ---------- */

.device-line {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--dim);
    font-size: 13px;
}

.hall {
    min-width: 0;
}

.hall-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.hall-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hall-count {
    color: var(--faint);
    font-size: 12px;
    letter-spacing: .12em;
}

.hall-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

.room-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    transition: border-color .15s, transform .15s;
}

.room-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--line-2);
}

.room-card.live::before {
    background: var(--teal);
    box-shadow: 0 0 10px rgba(95, 211, 200, .6);
}

.room-card:hover {
    border-color: var(--line-2);
    transform: translateY(-2px);
}

.room-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.room-card-name {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .05em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-lock {
    width: 14px;
    height: 14px;
    color: var(--amber);
}

.room-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--dim);
    font-size: 12px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.meta-item .icon {
    width: 13px;
    height: 13px;
    color: var(--faint);
}

.room-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .1em;
}

.tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tag.ok {
    color: var(--teal);
}

.tag.warn {
    color: var(--amber);
}

.tag.bad {
    color: var(--red);
}

.hall-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 70px 20px;
    border: 1px dashed var(--line-2);
    color: var(--faint);
    text-align: center;
}

.hall-empty p {
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
}

/* ---------- 房间 ---------- */

.room-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.room-title-line {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.room-heading h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: .01em;
}

.room-code {
    padding: 3px 9px;
    border: 1px dashed var(--line-2);
    color: var(--teal);
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: .3em;
}

.room-actions {
    display: flex;
    gap: 8px;
}

.room-grid {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid var(--line-2);
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .12em;
}

.chip.ok {
    border-color: rgba(95, 211, 200, .45);
    background: var(--teal-soft);
    color: var(--teal);
}

.chip.bad {
    border-color: rgba(229, 72, 77, .5);
    background: var(--red-soft);
    color: var(--red);
}

.big-readout {
    color: var(--teal);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* ---------- 滑条 ---------- */

.range {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 8px;
    margin: 4px 0;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, var(--teal) 0 var(--fill, 0%), transparent var(--fill, 0%)),
        repeating-linear-gradient(90deg, transparent 0 9px, rgba(255, 255, 255, .06) 9px 10px),
        var(--bg-2);
    cursor: pointer;
}

.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 24px;
    border: 1px solid #a9f2ea;
    background: var(--teal);
    box-shadow: 0 0 12px rgba(95, 211, 200, .55);
}

.range::-moz-range-thumb {
    width: 14px;
    height: 24px;
    border: 1px solid #a9f2ea;
    border-radius: 0;
    background: var(--teal);
}

.range:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.range-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--faint);
    font-size: 10px;
    letter-spacing: .1em;
    font-variant-numeric: tabular-nums;
}

/* ---------- 急停 ---------- */

#estop-panel {
    border-color: rgba(229, 72, 77, .3);
    background-image: repeating-linear-gradient(135deg, rgba(229, 72, 77, .05) 0 12px, transparent 12px 24px);
}

.btn-estop {
    width: 100%;
    padding: 20px 16px;
    border: 1px solid #ff7074;
    background: var(--red);
    color: #fff;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25);
}

.btn-estop .icon {
    width: 22px;
    height: 22px;
}

.btn-estop:hover {
    filter: brightness(1.08);
}

.btn-estop.active {
    background: var(--red-soft);
    border-color: var(--red);
    color: var(--red);
    box-shadow: none;
}

/* ---------- 成员 ---------- */

.member-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}

.member-row:last-child {
    border-bottom: none;
}

.member-name {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-role {
    margin-left: auto;
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .14em;
}

/* ---------- 横幅 ---------- */

.banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    font-size: 12px;
    letter-spacing: .12em;
}

.banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
    flex: none;
}

.banner.good {
    border-color: rgba(95, 211, 200, .35);
    background: var(--teal-soft);
    color: var(--teal);
}

.banner.warn {
    border-color: rgba(240, 166, 58, .35);
    background: var(--amber-soft);
    color: var(--amber);
}

.banner.bad {
    border-color: rgba(229, 72, 77, .4);
    background: var(--red-soft);
    color: var(--red);
}

/* ---------- 控制台 ---------- */

.console {
    padding: 22px;
}

.readout {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 4px 0 8px;
}

.readout-value {
    color: var(--teal);
    font-family: var(--font-display);
    font-size: clamp(72px, 9vw, 112px);
    font-weight: 700;
    line-height: .85;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 34px rgba(95, 211, 200, .22);
}

.readout-unit {
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .3em;
}

.console .range {
    height: 10px;
}

.wave-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 16px 0 12px;
}

.wave-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 9px 6px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--faint);
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}

.wave-card:hover:not(:disabled) {
    border-color: var(--line-2);
    color: var(--dim);
}

.wave-card.active {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--teal);
}

.wave-card:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.wave-svg {
    width: 100%;
    height: 20px;
}

.wave-svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wave-name {
    font-size: 11px;
    letter-spacing: .12em;
}

.rhythm-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 8px;
}

.rhythm-label {
    color: var(--dim);
    font-size: 12px;
    letter-spacing: .1em;
}

.rhythm-switch {
    display: inline-flex;
    border: 1px solid var(--line);
}

.rhythm-switch button {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--dim);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: .08em;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.rhythm-switch button.active {
    background: var(--teal-soft);
    color: var(--teal);
}

.rhythm-switch button:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.rhythm-value {
    margin-left: auto;
    color: var(--teal);
    font-family: var(--font-display);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.interval-range {
    margin: 4px 0 16px;
}

.duration-field {
    margin-top: 12px;
}

.duration-field input {
    width: 100%;
}

.console-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.console-actions .btn {
    padding: 15px 16px;
    font-size: 14px;
    letter-spacing: .1em;
}

/* ---------- 对话 ---------- */

.chat-panel {
    margin-top: 16px;
}

.chat-log {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 90px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--bg-2);
}

.chat-msg {
    padding: 6px 9px;
    border-left: 2px solid var(--line-2);
    background: rgba(255, 255, 255, .015);
    font-size: 12px;
    line-height: 1.5;
}

.chat-msg.shockee {
    border-left-color: var(--amber);
}

.chat-msg.controller {
    border-left-color: var(--teal);
}

.chat-who {
    margin-right: 8px;
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .06em;
}

.chat-text {
    color: var(--text);
}

.chat-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
}

.chat-presets .btn {
    padding: 7px 10px;
    font-size: 12px;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.chat-input-row input {
    flex: 1;
}

/* ---------- 模态 ---------- */

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 6, .72);
    backdrop-filter: blur(4px);
}

.modal {
    position: relative;
    width: min(430px, 100%);
    padding: 22px;
    border: 1px solid var(--line-2);
    background: var(--panel);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    animation: modal-in .18s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.modal-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--dim);
    cursor: pointer;
}

.icon-btn:hover {
    border-color: var(--line-2);
    color: var(--text);
}

.modal-body .field {
    margin-bottom: 8px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

/* ---------- toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 60;
    max-width: min(82vw, 520px);
    padding: 12px 18px;
    border: 1px solid var(--line-2);
    background: var(--panel-2);
    color: var(--text);
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity .2s, transform .2s;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1040px) {
    .lobby-intro {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .lede {
        margin: 0;
        padding-left: 18px;
    }

    .lobby-grid,
    .room-grid {
        grid-template-columns: 1fr;
    }

    .room-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        align-items: stretch;
    }

    .room-side .panel + .panel {
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .room-side {
        grid-template-columns: 1fr;
    }

    .wave-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .console-actions {
        grid-template-columns: 1fr;
    }

    .brand-text {
        font-size: 18px;
    }
}
