*,
*::before,
*::after {
    box-sizing: border-box;
    border-radius: 0 !important;
}

:root {
    color-scheme: dark;
    --auth-terminal-font-size: 15px;
    --bg: #020403;
    --bg-panel: rgba(4, 10, 7, 0.96);
    --bg-panel-strong: rgba(2, 7, 4, 0.985);
    --bg-soft: rgba(27, 78, 40, 0.14);
    --bg-soft-hover: rgba(39, 116, 60, 0.24);
    --line: rgba(69, 167, 94, 0.18);
    --line-strong: rgba(88, 214, 120, 0.38);
    --text: #d8ffe2;
    --muted: #78a182;
    --accent: #78ff8a;
    --accent-strong: #9dffab;
    --accent-faint: rgba(120, 255, 138, 0.12);
    --stream-watching: #69b9ff;
    --stream-watching-strong: #96d0ff;
    --danger: #f15b5b;
    --danger-faint: rgba(241, 91, 91, 0.16);
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
    --radius-xl: 0;
    --radius-lg: 0;
    --radius-md: 0;
    --radius-sm: 0;
}

html,
body {
    margin: 0;
    height: 100%;
    min-height: 100%;
    background:
        radial-gradient(circle at 20% 10%, rgba(120, 255, 138, 0.08), transparent 26%),
        radial-gradient(circle at 82% 18%, rgba(120, 255, 138, 0.04), transparent 24%),
        linear-gradient(180deg, #010201 0%, #020503 50%, #041008 100%);
    color: var(--text);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

body {
    overflow: hidden;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 255, 138, 0.32) transparent;
}

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

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    background: linear-gradient(180deg, rgba(120, 255, 138, 0.5), rgba(120, 255, 138, 0.2));
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(120, 255, 138, 0.72), rgba(120, 255, 138, 0.3));
    background-clip: padding-box;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.hidden {
    display: none !important;
}

.eyebrow,
.console-tag,
.terminal-status-line,
.status-chip,
.section-meta,
.identity-label {
    font-family: "IBM Plex Mono", Consolas, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 0.66rem;
}

.auth-screen {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 100vh;
    padding: 24px;
    overflow: hidden;
}

.auth-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(145, 255, 181, 0.045) 0,
            rgba(145, 255, 181, 0.045) 1px,
            transparent 1px,
            transparent 3px
        );
    opacity: 0.4;
    mix-blend-mode: screen;
    pointer-events: none;
}

.matrix-rain-canvas,
.matrix-grid,
.matrix-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.matrix-rain-canvas {
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 0.92;
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.98) 46%,
        rgba(0, 0, 0, 0.7) 62%,
        rgba(0, 0, 0, 0.26) 82%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.98) 46%,
        rgba(0, 0, 0, 0.7) 62%,
        rgba(0, 0, 0, 0.26) 82%,
        rgba(0, 0, 0, 0) 100%
    );
}

.matrix-grid {
    z-index: 0;
    background:
        radial-gradient(circle at center, rgba(144, 255, 179, 0.05), transparent 55%),
        linear-gradient(rgba(120, 255, 138, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 255, 138, 0.02) 1px, transparent 1px);
    background-size: auto, 22px 22px, 22px 22px;
    opacity: 0.75;
}

.matrix-glow {
    z-index: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(120, 255, 138, 0.11), transparent 30%),
        radial-gradient(circle at 14% 18%, rgba(120, 255, 138, 0.08), transparent 20%),
        radial-gradient(circle at 85% 20%, rgba(120, 255, 138, 0.05), transparent 18%);
    opacity: 0.75;
}

.auth-rail {
    display: none;
}

.auth-console {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: min(600px, calc(100vw - 48px));
    min-width: 0;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    padding: 18px;
    border: 1px solid rgba(120, 255, 138, 0.12);
    background: #000;
    box-shadow:
        inset 0 0 0 1px rgba(120, 255, 138, 0.04),
        0 16px 40px rgba(0, 0, 0, 0.32);
    display: flex;
    flex-direction: column;
}

.auth-console__head,
.server-card__head,
.section-head,
.workspace-header,
.stream-stage__head,
.settings-panel__header,
.message-row__head,
.status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-console__head h1,
.server-card h2,
.section-head h3,
.workspace-header h2,
.stream-stage h3,
.settings-panel h3,
.modal-card h3 {
    margin: 0;
    font-family: "IBM Plex Mono", Consolas, monospace;
    letter-spacing: -0.03em;
}

.auth-console__head,
.terminal-status-line {
    display: none;
}

.auth-terminal-output {
    display: grid;
    align-content: end;
    gap: 8px;
    margin: 0;
    padding: 0 0 10px;
    border: 0;
    background: transparent;
    color: #8dffbb;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: var(--auth-terminal-font-size);
    line-height: 1.28;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    text-shadow: none;
}

.terminal-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terminal-line::before {
    content: ">";
    color: var(--accent);
    flex: 0 0 auto;
    line-height: 1.28;
}

.terminal-line__content {
    white-space: pre-wrap;
    word-break: break-word;
}

.auth-form,
.modal-card,
.settings-group,
.quality-card {
    display: grid;
    gap: 14px;
}

.auth-form {
    margin: 0;
    flex: 1 1 auto;
}

.auth-form--terminal {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
}

.auth-form--terminal > .terminal-button {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.auth-terminal-shell {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 10px 4px 6px;
    cursor: text;
}

.auth-terminal-entry {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0;
    padding: 0;
    border: 0;
    width: 100%;
    max-width: none;
    cursor: text;
}

.auth-terminal-entry__prompt {
    min-width: 0;
    padding-right: 8px;
    color: var(--accent);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: var(--auth-terminal-font-size);
    letter-spacing: 0;
    white-space: pre;
    text-shadow: none;
}

.auth-terminal-entry__input-shell {
    position: relative;
    min-width: 0;
    width: 100%;
}

.auth-terminal-entry input,
.auth-terminal-entry__measure {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: var(--auth-terminal-font-size);
    line-height: 1.28;
    letter-spacing: 0.03em;
    text-shadow: none;
    white-space: pre;
}

.auth-terminal-entry input {
    border: 0;
    background: transparent;
    color: var(--text);
    outline: none;
    box-shadow: none;
    caret-color: transparent;
}

.auth-terminal-entry input:focus {
    background: transparent;
    box-shadow: none;
}

.auth-terminal-entry input::selection {
    background: rgba(120, 255, 138, 0.16);
    color: var(--text);
}

.auth-terminal-entry__measure {
    position: absolute;
    inset: 0 auto auto 0;
    visibility: hidden;
    pointer-events: none;
    width: auto;
    color: transparent;
}

.auth-terminal-entry__cursor {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0.72em;
    height: 1.12em;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(120, 255, 138, 0.45);
    animation: authCaretBlink 1s steps(1) infinite;
    transform: translate(0, -50%);
    pointer-events: none;
}

.auth-terminal-entry--disabled {
    opacity: 0.5;
}

.auth-console .message {
    display: none !important;
}

.auth-form--terminal > input[type="password"] {
    display: none !important;
}

@keyframes authCaretBlink {
    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.terminal-field--auth {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(120, 255, 138, 0.08);
}

.terminal-field--auth > span {
    margin: 0;
}

.terminal-field--auth input {
    padding: 10px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.terminal-field--auth input:focus {
    background: transparent;
    box-shadow: none;
}

.terminal-prompt {
    color: var(--accent);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: none;
}

.terminal-prompt__type {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: terminalPromptType 0.7s steps(var(--chars)) forwards;
}

@keyframes terminalPromptType {
    from {
        width: 0;
    }

    to {
        width: calc(var(--chars) * 1ch);
    }
}

.terminal-field {
    display: grid;
    gap: 8px;
}

.terminal-field span {
    color: var(--muted);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.76rem;
    text-transform: lowercase;
    letter-spacing: 0.08em;
}

.terminal-field input,
.terminal-field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(1, 4, 2, 0.88);
    color: var(--text);
    outline: none;
}

.terminal-field input,
.terminal-field select {
    padding: 12px 14px;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.terminal-field input:focus,
.terminal-field select:focus {
    border-color: var(--line-strong);
    background: rgba(5, 16, 8, 0.95);
    box-shadow: 0 0 0 4px rgba(120, 255, 138, 0.08);
}

.terminal-button,
.ghost-button,
.ghost-icon-button,
.dock-icon-button,
.terminal-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    transition: transform 0.16s ease, opacity 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.terminal-button {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(120, 255, 138, 0.18), rgba(120, 255, 138, 0.28));
    border: 1px solid var(--line-strong);
    color: #e4ffe8;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-weight: 600;
}

.terminal-switch,
.ghost-button,
.ghost-icon-button,
.dock-icon-button {
    border: 1px solid var(--line);
    background: rgba(8, 20, 11, 0.78);
    color: var(--text);
}

.terminal-switch {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.88rem;
}

.ghost-button {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.87rem;
}

.ghost-button--full {
    width: 100%;
}

.ghost-button--active {
    background: rgba(120, 255, 138, 0.16);
    border-color: rgba(120, 255, 138, 0.36);
    color: var(--accent);
}

.ghost-icon-button,
.dock-icon-button {
    width: 34px;
    height: 34px;
    border-radius: 0;
}

.dock-icon-button {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
}

.dock-icon-button i {
    font-size: 1rem;
}

.dock-icon-button span {
    display: none;
}

.dock-icon-button.is-active {
    color: var(--accent);
}

.dock-icon-button.is-danger {
    color: #ff9b9b;
}

.terminal-button:hover,
.ghost-button:hover,
.ghost-icon-button:hover,
.terminal-switch:hover {
    transform: translateY(-1px);
    background-color: var(--bg-soft-hover);
}

.dock-icon-button:hover {
    transform: none;
    background: transparent;
    color: var(--accent);
}

.terminal-button:disabled,
.ghost-button:disabled,
.ghost-icon-button:disabled,
.dock-icon-button:disabled,
.terminal-switch:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.message {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(241, 91, 91, 0.34);
    background: var(--danger-faint);
    color: #ffdede;
}

.app-screen {
    position: relative;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 0;
    height: 100%;
    min-height: 100%;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
}

.sidebar-shell,
.workspace-shell,
.settings-panel,
.modal-card {
    min-height: 0;
}

.sidebar-shell,
.workspace-shell {
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: var(--radius-xl);
}

.settings-panel,
.modal-card {
    border: 1px solid var(--line);
    background: var(--bg-panel);
    box-shadow: var(--shadow);
}

.app-screen > .sidebar-shell,
.app-screen > .workspace-shell {
    position: relative;
    z-index: 1;
}

.matrix-rain-canvas--app,
.matrix-grid--app,
.matrix-glow--app {
    inset: 0;
    z-index: 0;
}

.matrix-rain-canvas--app {
    opacity: 0.52;
}

.sidebar-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: var(--bg-panel);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overflow-x: hidden;
}

.server-card,
.rooms-panel,
.presence-panel,
.quality-card,
.stream-stage,
.modal-card,
.settings-group {
    border: 0;
    background: transparent;
}

.server-card,
.presence-panel,
.quality-card,
.stream-stage {
    padding: 4px 0;
}

.section-head {
    margin-bottom: 12px;
}

.section-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.status-chip,
.section-meta {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-size: 0.69rem;
}

.rooms-panel {
    min-height: auto;
    display: block;
    padding: 4px 0;
}

.messages-list {
    min-height: 0;
    overflow: auto;
}

.rooms-list,
.participants-list {
    min-height: auto;
    overflow: visible;
}

.rooms-list,
.messages-list {
    padding-right: 4px;
}

.rooms-list {
    display: grid;
    gap: 10px;
}

.channel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
}

.channel-button,
.channel-watch {
    border-radius: 16px;
    border: 1px solid rgba(120, 255, 138, 0.04);
    background: rgba(255, 255, 255, 0.01);
    color: var(--text);
}

.channel-button {
    display: grid;
    gap: 8px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.channel-button--empty {
    gap: 4px;
}

.channel-button:hover,
.channel-button:focus-visible {
    border-color: rgba(120, 255, 138, 0.18);
    background: rgba(120, 255, 138, 0.045);
}

.channel-row.is-current .channel-button {
    border-color: var(--line-strong);
    background: rgba(120, 255, 138, 0.05);
    box-shadow: inset 3px 0 0 rgba(120, 255, 138, 0.45);
}

.channel-name-line {
    display: flex;
    width: 100%;
    gap: 8px;
    align-items: center;
}

.channel-name-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.channel-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: rgba(120, 255, 138, 0.7);
    font-size: 0.72rem;
}

.channel-lock.is-unlocked {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(120, 255, 138, 0.3);
}

.channel-bracket,
.channel-watch {
    color: var(--accent);
}

.channel-bracket {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.98rem;
    font-weight: 600;
}

.channel-name {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.98rem;
    font-weight: 600;
}

.channel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(120, 255, 138, 0.24);
    background: rgba(120, 255, 138, 0.08);
    font-size: 0.72rem;
}

.channel-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.channel-button > .channel-meta {
    display: none;
}

.channel-members {
    display: grid;
    gap: 6px;
}

.channel-member {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 0.83rem;
}

.channel-member--empty {
    grid-template-columns: 1fr;
}

.channel-member.is-speaking,
.participant-row--speaking .participant-name {
    color: var(--accent);
}

.channel-member.is-speaking .channel-member__name {
    color: var(--accent);
}

.channel-member.is-muted,
.participant-row--muted .participant-name {
    color: #98a19a;
}

.channel-member.is-muted .channel-member__name {
    color: #98a19a;
}

.participant-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.participant-state__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(180, 188, 184, 0.45);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.02);
}

.participant-row--speaking .participant-state__dot {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(120, 255, 138, 0.5);
}

.channel-member__name {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.14rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.05;
}

.channel-member__copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.channel-member__volume {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
    line-height: 1.1;
    color: var(--muted);
    font-family: "IBM Plex Mono", Consolas, monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.channel-member__flags {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.channel-member__icon,
.channel-member__stream {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(180, 195, 184, 0.92);
}

.channel-member__stream {
    color: var(--accent);
    cursor: pointer;
}

.channel-member__stream--loading {
    cursor: default;
    color: var(--accent);
}

.channel-member__stream--watching {
    color: var(--stream-watching);
}

.channel-member__stream--cancel {
    cursor: pointer;
}

.channel-member__stream:hover,
.channel-member__stream:focus-visible {
    color: var(--accent-strong);
}

.channel-member__stream--watching:hover,
.channel-member__stream--watching:focus-visible {
    color: var(--stream-watching-strong);
}

.channel-member__icon i,
.channel-member__stream i {
    font-size: 0.84rem;
}

.channel-member__icon--deafened::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 2px;
    background: rgba(180, 195, 184, 0.92);
    transform: rotate(-42deg);
    transform-origin: center;
}

.channel-member__icon--muted {
    color: rgba(160, 170, 163, 0.92);
}

.presence-panel {
    display: none !important;
}

.status-list {
    display: grid;
    gap: 8px;
}

.status-line {
    padding: 10px 12px;
    border-radius: 14px;
    border: 0;
    border-bottom: 1px solid rgba(120, 255, 138, 0.08);
    background: transparent;
}

.status-line span {
    color: var(--muted);
    font-size: 0.84rem;
}

.status-line strong {
    font-size: 0.83rem;
    text-align: right;
}

.range-field {
    display: grid;
    gap: 8px;
}

.range-field span {
    color: var(--muted);
    font-size: 0.86rem;
}

.range-field input {
    width: 100%;
    accent-color: var(--accent);
}

.range-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
}

.range-foot strong {
    color: var(--accent);
    font-family: "IBM Plex Mono", Consolas, monospace;
}

.participants-list {
    display: grid;
    gap: 8px;
}

.participant-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(120, 255, 138, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.participant-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--accent);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-weight: 700;
}

.participant-copy {
    min-width: 0;
}

.participant-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.participant-meta {
    color: var(--muted);
    font-size: 0.77rem;
}

.participant-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.73rem;
}

.sidebar-dock {
    display: grid;
    gap: 10px;
    padding-top: 6px;
    border-top: 0;
    background: transparent;
}

.dock-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    gap: 6px;
}

#stop-share-button {
    display: none !important;
}

.quality-card {
    padding: 0;
}

.terminal-field--compact span {
    font-size: 0.68rem;
}

.hint-box {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(120, 255, 138, 0.06);
    background: rgba(255, 255, 255, 0.015);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.identity-dock {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 4px 0 0;
    border-radius: var(--radius-lg);
    border: 0;
    background: transparent;
}

.identity-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--accent);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-weight: 700;
}

.identity-copy {
    min-width: 0;
}

.identity-label {
    color: var(--muted);
    font-size: 0.64rem;
}

.identity-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.94rem;
}

.workspace-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.workspace-header {
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg-panel);
}

.workspace-header h2 {
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.workspace-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.workspace-actions,
.view-toggle,
.message-form,
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.workspace-body,
.chat-view,
.stream-view {
    min-height: 0;
}

.workspace-body {
    display: flex;
}

.chat-view,
.stream-view {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    height: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.messages-empty,
.messages-list,
.message-form,
.stream-stage {
    border-radius: var(--radius-lg);
}

.chat-view {
    padding: 0;
    border: 0;
    background: #000;
    overflow: hidden;
    box-shadow: none;
}

.messages-empty,
.messages-list,
.message-form {
    border: 0;
    background: #000;
}

.messages-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.messages-list {
    display: flex;
    flex-direction: column;
    align-content: start;
    gap: 8px;
    padding: 16px 18px 0;
    overflow: auto;
}

.message-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: "IBM Plex Mono", Consolas, monospace;
}

.message-row--self {
    color: var(--accent-strong);
}

.message-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    line-height: 1.5;
    flex-wrap: nowrap;
}

.message-prefix {
    color: var(--accent);
    white-space: nowrap;
}

.message-row--self .message-prefix {
    color: var(--accent-strong);
}

.message-body {
    margin-top: 0;
    color: #d8ecd8;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1 1 auto;
    min-width: 0;
}

.message-body a {
    color: var(--accent-strong);
    text-decoration: underline;
    text-decoration-color: rgba(120, 255, 138, 0.32);
    text-underline-offset: 2px;
}

.message-body a:hover,
.message-body a:focus-visible {
    color: #d9ffe2;
    text-decoration-color: var(--accent);
}

.message-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    white-space: nowrap;
    padding-left: 2px;
    min-height: 1.5em;
}

.message-time {
    color: var(--muted);
    font-size: 0.74rem;
    font-family: "IBM Plex Mono", Consolas, monospace;
}

.message-delete-button {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-top: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.74rem;
}

.message-delete-button:hover {
    color: var(--danger);
}

.message-delete-button span {
    display: none;
}

.message-form {
    justify-content: space-between;
    padding: 0 18px 18px;
    border: 0;
    background: #000;
}

.message-input-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: text;
}

.message-input-shell--disabled {
    opacity: 0.42;
}

.message-input-prompt {
    color: var(--accent);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.9rem;
    white-space: nowrap;
}

.message-input-track {
    position: relative;
    min-width: 0;
    width: 100%;
}

.message-input-shell input,
.message-input-measure {
    width: 100%;
    min-width: 0;
    padding: 0;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.45;
    letter-spacing: 0.02em;
    white-space: pre;
}

.message-input-shell input {
    background: transparent;
    border: 0;
    color: var(--text);
    outline: none;
    box-shadow: none;
    caret-color: transparent;
}

.message-input-shell input::selection {
    background: rgba(120, 255, 138, 0.16);
    color: var(--text);
}

.message-input-measure {
    position: absolute;
    inset: 0 auto auto 0;
    visibility: hidden;
    pointer-events: none;
    width: auto;
    color: transparent;
}

.message-input-cursor {
    position: absolute;
    top: 50%;
    left: 0;
    display: none;
    width: 0.72em;
    height: 1.08em;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(120, 255, 138, 0.42);
    transform: translate(0, -50%);
    animation: authCaretBlink 1s steps(1) infinite;
    animation-play-state: paused;
    pointer-events: none;
    opacity: 0;
}

.message-input-shell--focused .message-input-cursor {
    display: block;
    opacity: 1;
    animation-play-state: running;
}

.message-input-shell--disabled .message-input-cursor {
    display: none;
}

.stream-view {
    grid-template-rows: minmax(0, 1fr);
    padding: 15px;
    background: rgba(0, 0, 0, 0.78);
}

.stream-stage {
    display: grid;
    gap: 12px;
    height: 100%;
    padding: 0;
    background: transparent;
}

.share-state {
    color: var(--muted);
    line-height: 1.6;
}

#view-stream-button {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

#view-chat-button {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

#close-stream-button {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

#view-chat-button span,
#view-stream-button span {
    display: none;
}

.video-shell {
    position: relative;
    display: grid;
    min-height: 0;
    border-radius: 18px;
    border: 1px solid rgba(120, 255, 138, 0.06);
    background: #010201;
    overflow: hidden;
}

.share-video {
    width: 100%;
    height: min(70vh, 100%);
    min-height: 360px;
    object-fit: contain;
    background: #000;
}

.stream-player-controls {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(120, 255, 138, 0.08);
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.stream-player-control-button {
    flex: 0 0 auto;
}

.stream-player-volume {
    width: 100%;
    min-width: 0;
    accent-color: var(--accent);
}

.stream-player-controls.is-disabled {
    opacity: 0.56;
}

.stream-player-controls.is-disabled .stream-player-control-button,
.stream-player-controls.is-disabled .stream-player-volume {
    pointer-events: none;
}

.settings-panel {
    position: static;
    width: min(620px, 100%);
    max-height: min(78vh, 760px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

#settings-modal {
    z-index: 55;
}

#settings-modal .settings-panel {
    border: 1px solid var(--line);
    background: var(--bg-panel);
    box-shadow: var(--shadow);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    min-width: 0;
}

.settings-group__title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.settings-group__title h4 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.settings-group__title small {
    color: var(--muted);
    line-height: 1.45;
}

.settings-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 0;
    color: var(--text);
    min-width: 0;
}

.settings-toggle > span {
    min-width: 0;
}

.settings-toggle input {
    margin-top: 4px;
    accent-color: var(--accent);
}

.settings-toggle small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.55;
}

.hotkeys-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.hotkey-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(120, 255, 138, 0.04);
    background: rgba(255, 255, 255, 0.015);
}

.hotkey-card__copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.hotkey-card__copy small {
    color: var(--muted);
    line-height: 1.45;
}

.hotkey-bind-button {
    min-width: 176px;
    padding: 10px 12px;
    border: 1px solid rgba(120, 255, 138, 0.16);
    background: rgba(4, 10, 7, 0.88);
    color: var(--accent);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.8rem;
    cursor: pointer;
}

.hotkey-bind-button:hover,
.hotkey-bind-button:focus-visible {
    border-color: var(--accent);
    background: rgba(11, 29, 16, 0.96);
}

.hotkey-bind-button.is-capturing {
    border-color: var(--accent-strong);
    background: rgba(12, 39, 20, 0.96);
    box-shadow: 0 0 0 1px rgba(120, 255, 138, 0.12);
}

.hotkey-card--ptt {
    margin-top: -2px;
}

.admin-tools-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(120, 255, 138, 0.08);
    background: rgba(255, 255, 255, 0.015);
}

.admin-tools-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-tools-copy strong {
    font-size: 0.86rem;
}

.admin-tools-copy small {
    color: var(--muted);
    line-height: 1.45;
}

.admin-tools-card .ghost-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.create-room-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.modal-card {
    width: min(420px, 100%);
    padding: 16px;
    border-radius: 24px;
}

.admin-db-panel {
    width: min(1100px, 100%);
    max-height: min(86vh, 860px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.admin-db-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-db-panel__head h3 {
    margin: 0;
}

.admin-db-panel__body {
    min-height: 0;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
}

.admin-db-sidebar,
.admin-db-main {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-db-sidebar {
    padding-right: 4px;
    border-right: 1px solid rgba(120, 255, 138, 0.08);
}

.admin-db-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-db-section-head h4 {
    margin: 0;
    font-size: 0.98rem;
    letter-spacing: -0.02em;
}

.admin-db-table-list {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.admin-db-table-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: rgba(8, 20, 11, 0.72);
    color: var(--text);
    text-align: left;
}

.admin-db-table-item small {
    color: var(--muted);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.69rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-db-table-item.is-selected {
    border-color: var(--line-strong);
    background: rgba(120, 255, 138, 0.11);
    color: var(--accent);
}

.admin-db-table-item--empty {
    cursor: default;
    opacity: 0.76;
}

.admin-db-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-db-empty {
    padding: 14px;
    border: 1px dashed rgba(120, 255, 138, 0.18);
    background: rgba(255, 255, 255, 0.012);
    color: var(--muted);
    line-height: 1.45;
}

.admin-db-table-shell {
    min-height: 0;
    overflow: auto;
    border: 1px solid rgba(120, 255, 138, 0.08);
    background: rgba(0, 0, 0, 0.34);
}

.admin-db-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.74rem;
}

.admin-db-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(4, 10, 7, 0.98);
}

.admin-db-table th,
.admin-db-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(120, 255, 138, 0.08);
    vertical-align: top;
    text-align: left;
    white-space: nowrap;
}

.admin-db-table th {
    color: var(--accent);
    text-transform: lowercase;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.admin-db-table tbody tr:hover {
    background: rgba(120, 255, 138, 0.04);
}

.admin-db-cell {
    display: inline-block;
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
}

.admin-db-actions-cell {
    width: 56px;
    text-align: right;
}

.admin-db-row-delete-button {
    width: 28px;
    height: 28px;
}

.admin-db-row-delete-button i {
    font-size: 0.8rem;
}

.confirm-modal {
    display: grid;
    gap: 14px;
}

.confirm-modal__copy {
    display: grid;
    gap: 8px;
}

.confirm-modal__copy p,
.confirm-modal__copy h3 {
    margin: 0;
}

.confirm-modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

#settings-modal .modal-card {
    width: min(560px, 100%);
    max-height: min(78vh, 760px);
}

.modal-card__head {
    margin-bottom: 14px;
}

.modal-card__head--compact {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.modal-close-button {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
}

.modal-close-button:hover,
.modal-close-button:focus-visible {
    background: transparent;
    color: var(--accent);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 60;
    max-width: min(90vw, 560px);
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(120, 255, 138, 0.2);
    background: rgba(4, 12, 7, 0.96);
    color: var(--text);
    box-shadow: var(--shadow);
}

.danger {
    color: #ffd2d2;
    border-color: rgba(241, 91, 91, 0.26);
    background: var(--danger-faint);
}

.hidden#audio-elements {
    display: none;
}

.server-card {
    padding: 0;
}

.server-title-block {
    display: grid;
    gap: 0;
}

.server-title-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.server-status-dot {
    width: 10px;
    height: 20px;
    border: 1px solid rgba(120, 255, 138, 0.26);
    background: rgba(120, 255, 138, 0.18);
    box-shadow: 0 0 0 3px rgba(120, 255, 138, 0.05);
}

.server-status-dot.is-online {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(120, 255, 138, 0.42);
}

.server-status-dot.is-offline {
    background: rgba(241, 91, 91, 0.82);
    border-color: rgba(241, 91, 91, 0.36);
    box-shadow: 0 0 12px rgba(241, 91, 91, 0.28);
}

.server-head-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.status-chip {
    min-height: 24px;
    padding: 0 8px;
    gap: 6px;
    font-size: 0.72rem;
}

.status-chip--users i {
    color: var(--accent);
    font-size: 0.75rem;
}

.server-card h2 {
    font-size: 1.02rem;
}

.quality-card {
    gap: 8px;
}

.mic-test-card {
    display: grid;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(120, 255, 138, 0.08);
    background: rgba(0, 0, 0, 0.42);
}

.mic-test-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mic-test-copy {
    display: grid;
    gap: 4px;
}

.mic-test-copy strong {
    font-size: 0.86rem;
}

.mic-test-copy small {
    color: var(--muted);
    line-height: 1.4;
}

.mic-test-meter {
    position: relative;
    height: 10px;
    overflow: hidden;
    border: 1px solid rgba(120, 255, 138, 0.12);
    background: rgba(7, 14, 9, 0.92);
}

.mic-test-meter__fill {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, rgba(120, 255, 138, 0.25), rgba(120, 255, 138, 0.92));
    box-shadow: 0 0 14px rgba(120, 255, 138, 0.22);
}

.hint-box.hidden {
    display: none !important;
}

.terminal-button--icon-only {
    width: 46px;
    min-width: 46px;
    padding: 0;
}

.terminal-button--icon-only span {
    display: none;
}

.message-row__head {
    gap: 10px;
}

.message-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.message-delete-button {
    margin-top: 0;
    width: 18px;
    height: 18px;
    justify-content: center;
    font-size: 0.75rem;
}

.message-delete-button span {
    display: none;
}

.participant-menu {
    position: fixed;
    z-index: 70;
    width: 260px;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    background: rgba(4, 10, 7, 0.98);
    box-shadow: var(--shadow);
}

.participant-menu__title {
    font-family: "IBM Plex Mono", Consolas, monospace;
    color: var(--accent);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.participant-menu__actions {
    display: grid;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(120, 255, 138, 0.08);
}

.participant-menu__action {
    justify-content: flex-start;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
}

#open-create-room-button {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    padding: 0;
}

#open-create-room-button i {
    font-size: 0.56rem;
}

.create-room-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.create-room-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.create-room-toggle input {
    accent-color: #78ff8a;
}

.create-room-password-field {
    margin-top: 10px;
}

#room-rename-button,
#room-delete-button,
#leave-room-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
}

#room-rename-button span,
#room-delete-button span,
#leave-room-button span {
    display: none;
}

.create-room-inline__field {
    margin: 0;
}

.create-room-inline__submit {
    align-self: end;
}

.channel-member[data-participant-menu="1"] {
    cursor: pointer;
}

.channel-member[data-participant-menu="1"]:hover {
    color: var(--text);
}

@media (max-width: 1180px) {
    body {
        overflow: auto;
    }

    .app-screen {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        min-height: 100dvh;
        height: auto;
    }

    .sidebar-shell,
    .workspace-shell {
        min-height: auto;
    }

    .sidebar-shell {
        gap: 10px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .server-card__head,
    .workspace-header,
    .stream-stage__head,
    .settings-panel__header {
        align-items: flex-start;
    }

    .server-card__head,
    .workspace-header {
        flex-direction: column;
    }

    .server-head-tools,
    .workspace-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .workspace-shell {
        min-height: 62dvh;
    }

    .workspace-body,
    .chat-view,
    .stream-view {
        min-height: 52dvh;
    }

    .settings-panel {
        width: min(680px, calc(100vw - 28px));
        max-height: min(88dvh, 820px);
    }

    .modal {
        padding: 14px;
    }

    .participant-menu {
        width: min(280px, calc(100vw - 24px));
    }

    .share-video {
        min-height: 280px;
        height: min(52dvh, 100%);
    }

    .stream-player-controls {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 8px 10px;
    }
}

@media (max-width: 760px) {
    :root {
        --auth-terminal-font-size: 14px;
    }

    .auth-screen {
        padding: 12px;
    }

    .app-screen {
        min-height: 100dvh;
    }

    .matrix-rain-canvas--app,
    .matrix-grid--app,
    .matrix-glow--app {
        inset: 0;
    }

    .auth-console {
        width: min(600px, calc(100vw - 24px));
        height: min(300px, calc(100dvh - 24px));
        min-height: 250px;
        max-height: min(300px, calc(100dvh - 24px));
        padding: 14px;
    }

    .sidebar-shell,
    .workspace-shell {
        padding: 10px;
    }

    .server-card h2,
    .workspace-header h2 {
        font-size: 1.1rem;
    }

    .workspace-subtitle,
    .share-state {
        font-size: 0.82rem;
    }

    .status-chip {
        min-height: 22px;
        padding: 0 7px;
        font-size: 0.66rem;
    }

    .section-head {
        margin-bottom: 10px;
    }

    .rooms-list,
    .messages-list {
        padding-right: 0;
    }

    .channel-button {
        padding: 10px;
    }

    .channel-member {
        gap: 6px;
    }

    .channel-member__name {
        font-size: 1rem;
    }

    .channel-member__volume {
        font-size: 0.6rem;
    }

    .dock-actions {
        gap: 4px;
    }

    .dock-icon-button {
        height: 40px;
    }

    .identity-dock {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .identity-avatar {
        width: 34px;
        height: 34px;
    }

    .workspace-header {
        padding: 12px 10px;
        gap: 10px;
    }

    .workspace-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, max-content));
        gap: 8px;
        align-items: stretch;
    }

    .view-toggle {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .view-toggle .ghost-button {
        width: 100%;
    }

    .message-form,
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .message-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .message-meta {
        justify-content: flex-start;
    }

    .messages-list {
        padding: 12px 12px 0;
    }

    .message-form {
        padding: 0 12px 12px;
    }

    .message-input-shell {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .message-input-prompt {
        font-size: 0.78rem;
        white-space: normal;
    }

    .message-input-shell input,
    .message-input-measure {
        font-size: 0.86rem;
    }

    .stream-stage {
        gap: 10px;
    }

    .stream-stage__head {
        gap: 8px;
    }

    .share-video {
        min-height: 220px;
        height: min(46dvh, 360px);
    }

    .stream-player-controls {
        left: 8px;
        right: 8px;
        bottom: 8px;
        gap: 8px;
        padding: 8px;
    }

    .settings-panel {
        width: min(calc(100vw - 20px), 620px);
        max-height: min(92dvh, 860px);
        padding: 14px;
        gap: 12px;
    }

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

    .hotkey-card {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .hotkey-bind-button {
        width: 100%;
        min-width: 0;
    }

    .create-room-actions {
        flex-direction: column;
    }

    .create-room-actions > button {
        width: 100%;
    }

    .modal {
        padding: 10px;
    }

    .modal-card {
        width: min(calc(100vw - 20px), 420px);
        padding: 14px;
    }

    .confirm-modal__actions {
        width: 100%;
    }

    .confirm-modal__actions .ghost-button,
    .confirm-modal__actions .terminal-button {
        width: 100%;
    }

    .participant-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .participant-state,
    .participant-badge {
        display: none;
    }

    .participant-menu {
        left: 10px !important;
        right: 10px;
        top: auto !important;
        bottom: 10px;
        width: auto;
        max-width: none;
    }

    .admin-db-panel__body {
        grid-template-columns: 1fr;
    }

    .admin-tools-card {
        flex-direction: column;
    }

    .admin-db-sidebar {
        padding-right: 0;
        padding-bottom: 12px;
        border-right: 0;
        border-bottom: 1px solid rgba(120, 255, 138, 0.08);
    }

    .admin-db-table-shell {
        max-height: 52vh;
    }
}

@media (max-width: 520px) {
    .server-head-tools,
    .workspace-actions {
        gap: 6px;
    }

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

    .workspace-actions > .ghost-button,
    .workspace-actions > .ghost-icon-button {
        width: 100%;
        justify-content: center;
    }

    #close-stream-button {
        grid-column: 1 / -1;
    }

    .channel-name,
    .channel-bracket {
        font-size: 0.92rem;
    }

    .channel-member__flags {
        gap: 6px;
    }

    .message-line {
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .message-body {
        width: 100%;
    }

    .stream-stage__head,
    .mic-test-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .create-room-inline {
        grid-template-columns: 1fr;
    }

    .create-room-inline__submit,
    .terminal-button--icon-only {
        width: 100%;
        min-width: 0;
    }

    .admin-db-actions .ghost-button,
    .admin-tools-card .ghost-button {
        width: 100%;
        justify-content: center;
    }

    .admin-db-panel {
        max-height: 92dvh;
        padding: 12px;
    }

    .admin-db-table {
        font-size: 0.69rem;
    }

    .admin-db-cell {
        max-width: 220px;
    }
}
