:root {
    --app-bg: #e0e8f8;
    --app-bg-accent: #eef4ff;
    --app-glow-blue: rgba(101, 132, 221, 0.28);
    --app-glow-violet: rgba(162, 132, 223, 0.18);
    --app-surface: rgba(255, 255, 255, 0.92);
    --app-surface-strong: rgba(249, 251, 254, 0.98);
    --app-panel: rgba(250, 252, 255, 0.98);
    --app-panel-soft: rgba(239, 245, 255, 0.96);
    --app-panel-border: rgba(82, 101, 148, 0.18);
    --app-card: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 246, 255, 0.99));
    --app-card-soft: linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(233, 240, 255, 0.98));
    --app-text: #202838;
    --app-text-soft: rgba(37, 48, 66, 0.72);
    --app-text-faint: rgba(61, 75, 103, 0.52);
    --app-blue: #5f7fe0;
    --app-blue-soft: rgba(95, 127, 224, 0.16);
    --app-green: #2eaa72;
    --app-red: #c85d6e;
    --app-yellow: #c7a04b;
    --app-shadow: 0 20px 58px rgba(25, 38, 72, 0.16);
    --app-radius-xl: 28px;
    --app-radius-lg: 20px;
    --app-radius-md: 15px;
    --app-radius-sm: 12px;
    --app-header-height: 72px;
    --app-gap: 14px;
    --tool-rail-width: 78px;
    --tool-panel-width: 300px;
    --chat-panel-width: 332px;
    --app-control-bg: #1f2837;
    --app-control-bg-hover: #273143;
    --app-control-border: rgba(255, 255, 255, 0.1);
    --app-control-text: #f5f7fd;
    --app-control-arrow: rgba(245, 247, 253, 0.86);
    --app-label-bg: rgba(20, 30, 47, 0.72);
    --chat-message-self: linear-gradient(135deg, #6a89f0, #8e6fda);
    --chat-message-other: rgba(244, 247, 253, 0.98);
    --chat-message-private: rgba(238, 220, 178, 0.72);
}

html.dark-theme {
    --app-bg: #0f141d;
    --app-bg-accent: #171d29;
    --app-glow-blue: rgba(90, 119, 208, 0.24);
    --app-glow-violet: rgba(132, 101, 188, 0.18);
    --app-surface: rgba(25, 31, 43, 0.94);
    --app-surface-strong: rgba(31, 38, 52, 0.98);
    --app-panel: rgba(34, 41, 56, 0.95);
    --app-panel-soft: rgba(43, 50, 69, 0.92);
    --app-panel-border: rgba(132, 146, 189, 0.2);
    --app-card: linear-gradient(180deg, rgba(29, 35, 47, 0.99), rgba(19, 24, 35, 0.99));
    --app-card-soft: linear-gradient(180deg, rgba(44, 51, 71, 0.97), rgba(28, 34, 47, 0.99));
    --app-text: #eef2fb;
    --app-text-soft: rgba(221, 228, 243, 0.72);
    --app-text-faint: rgba(180, 191, 215, 0.46);
    --app-blue: #91a8ff;
    --app-blue-soft: rgba(145, 168, 255, 0.18);
    --app-green: #35be7d;
    --app-red: #dd7586;
    --app-yellow: #d6b36d;
    --app-shadow: 0 24px 64px rgba(4, 7, 14, 0.46);
    --app-control-bg: #20293a;
    --app-control-bg-hover: #2a3550;
    --app-control-border: rgba(145, 162, 210, 0.18);
    --app-control-text: #f4f7ff;
    --app-control-arrow: rgba(244, 247, 255, 0.78);
    --app-label-bg: rgba(7, 10, 17, 0.72);
    --chat-message-self: linear-gradient(135deg, #6e8df2, #8a6edf);
    --chat-message-other: rgba(255, 255, 255, 0.078);
    --chat-message-private: rgba(211, 183, 108, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--app-text);
    font-family: "Roboto", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, var(--app-glow-blue), transparent 34%),
        radial-gradient(circle at 82% 16%, var(--app-glow-violet), transparent 24%),
        linear-gradient(135deg, var(--app-bg-accent), var(--app-bg));
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    background: none;
    color: inherit;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--app-text);
    font-size: 0.82rem;
    font-weight: 500;
}

form {
    margin: 0;
}

.hidden,
.invisible {
    display: none !important;
}

.clear {
    clear: both;
}

.error {
    color: #ff9aa7;
    font-weight: 700;
}

.noerror {
    display: none;
}

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: var(--app-gap);
}

.app-header {
    min-height: var(--app-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border: 1px solid var(--app-panel-border);
    border-radius: var(--app-radius-xl);
    background: var(--app-card-soft);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(12px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.header-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(38, 48, 70, 0.94), rgba(31, 38, 58, 0.96));
    border: 1px solid rgba(124, 142, 195, 0.24);
    color: #eef3ff;
    box-shadow: 0 10px 24px rgba(22, 28, 44, 0.2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #79bbff, #8b72dd);
    box-shadow: 0 0 18px rgba(110, 133, 233, 0.6);
}

html.dark-theme .header-kicker {
    background: linear-gradient(135deg, rgba(44, 52, 72, 0.96), rgba(31, 36, 50, 0.98));
    border-color: rgba(138, 151, 196, 0.22);
}

.header-title-wrap {
    min-width: 0;
}

.header-title {
    font-size: 1.24rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.header-action,
.header-chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--app-panel-border);
    background: var(--app-panel-soft);
    color: var(--app-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(20, 27, 44, 0.12);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.header-action:hover,
.header-chat-toggle:hover {
    color: var(--app-text);
    background: rgba(108, 130, 205, 0.18);
    border-color: rgba(121, 142, 209, 0.34);
    transform: translateY(-1px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-success {
    color: #fff;
    background: linear-gradient(135deg, #52e0a0, #1fa36d);
    box-shadow: 0 14px 30px rgba(38, 155, 105, 0.3);
}

.btn-cancel {
    color: #fff;
    background: linear-gradient(135deg, #f18499, #d14a69);
    box-shadow: 0 14px 30px rgba(193, 71, 103, 0.3);
}

.btn-blue {
    color: #fff;
    background: linear-gradient(135deg, #7790ff, #665fe8);
    box-shadow: 0 14px 30px rgba(95, 100, 230, 0.3);
}

.btn-default,
.btn-secondary {
    color: var(--app-text);
    background: var(--app-panel-soft);
    border: 1px solid var(--app-panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(20, 27, 44, 0.1);
}

.btn-link {
    padding: 0;
    color: var(--app-text-soft);
    cursor: pointer;
}

.conference-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: var(--tool-rail-width) auto minmax(0, 1fr) auto;
    gap: var(--app-gap);
    position: relative;
}

.tool-rail {
    width: var(--tool-rail-width);
    align-self: center;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 24px;
    border: 1px solid var(--app-panel-border);
    background: var(--app-card-soft);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(12px);
}

.tool-rail-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 68px;
    padding: 10px 8px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--app-text-soft);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tool-rail-button i {
    font-size: 1rem;
}

.tool-rail-button:hover,
.tool-rail-button.active {
    color: var(--app-text);
    background: linear-gradient(180deg, rgba(132, 154, 232, 0.28), rgba(94, 109, 168, 0.18));
    border-color: rgba(123, 145, 217, 0.32);
    box-shadow: 0 12px 20px rgba(16, 22, 37, 0.14);
    transform: translateY(-1px);
}

.tool-panel {
    width: var(--tool-panel-width);
    min-width: var(--tool-panel-width);
    display: flex;
    flex-direction: column;
    border-radius: var(--app-radius-xl);
    border: 1px solid var(--app-panel-border);
    background: var(--app-card-soft);
    box-shadow: var(--app-shadow);
    overflow: hidden;
    transform: translateX(0);
    will-change: width, opacity, transform;
    transition: width 0.18s ease, min-width 0.18s ease, opacity 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.tool-panel.panel-closed {
    width: 0;
    min-width: 0;
    opacity: 0;
    border-color: transparent;
    transform: translateX(-10px);
    pointer-events: none;
}

.sidenav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 66px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--app-panel-border);
}

.tool-panel-kicker {
    margin-bottom: 6px;
    color: rgba(129, 149, 218, 0.88);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidenav-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.closebtn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--app-text-soft);
    cursor: pointer;
}

.closebtn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--app-text);
}

.sidenav-content {
    flex: 1;
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
}

.tool-section {
    display: none;
}

.tool-section.active {
    display: block;
}

.tool-card {
    margin-bottom: 14px;
    padding: 16px;
    border-radius: var(--app-radius-lg);
    background: var(--app-panel-soft);
    border: 1px solid var(--app-panel-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tool-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-card > p {
    margin-bottom: 16px;
    color: var(--app-text-soft);
    font-size: 0.84rem;
    line-height: 1.45;
}

.media-options,
#background-image-controls {
    display: grid;
    gap: 14px;
}

.sidenav-label,
.sidenav-label-first {
    display: block;
    margin-top: 0;
}

.sidenav form {
    margin-top: 12px;
}

.theme-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 42px;
    border-radius: 999px;
    background: var(--app-panel-soft);
    border: 1px solid var(--app-panel-border);
    color: var(--app-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(20, 27, 44, 0.1);
    cursor: pointer;
}

#theme-toggle:hover {
    color: var(--app-text);
    background: rgba(108, 130, 205, 0.18);
    border-color: rgba(121, 142, 209, 0.34);
}

.form-control,
.form-reply {
    width: 100%;
    border: 1px solid var(--app-panel-border);
    border-radius: 16px;
    background: var(--app-panel-soft);
    color: var(--app-text);
    padding: 0.85rem 1rem;
    outline: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control:focus,
.form-reply:focus {
    border-color: rgba(121, 142, 209, 0.34);
    box-shadow: 0 0 0 4px rgba(108, 130, 205, 0.14);
    background: var(--app-panel);
}

#login-container label,
.no-media-card,
.no-media-card h3,
.no-media-card > p,
.no-media-list li strong,
.no-media-list li span,
.device-card-label,
.device-icon,
.permission-icon {
    color: #edf2ff;
}

#login-container .form-control {
    background: rgba(15, 21, 34, 0.78);
    border-color: rgba(129, 145, 189, 0.18);
    color: #f4f7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#login-container .form-control::placeholder {
    color: rgba(221, 228, 244, 0.44);
}

#login-container .form-control:focus {
    background: rgba(18, 25, 40, 0.94);
    border-color: rgba(130, 146, 210, 0.4);
    box-shadow: 0 0 0 4px rgba(108, 126, 196, 0.16);
}

.select {
    width: 100%;
    appearance: none;
    color-scheme: dark;
    border: 1px solid var(--app-control-border);
    border-radius: 16px;
    background-color: var(--app-control-bg);
    color: var(--app-control-text);
    padding: 0.82rem 3rem 0.82rem 1rem;
    outline: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--app-control-arrow) 50%),
        linear-gradient(135deg, var(--app-control-arrow) 50%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
    background-position:
        calc(100% - 21px) calc(50% - 3px),
        calc(100% - 15px) calc(50% - 3px),
        calc(100% - 40px) 50%;
    background-size: 6px 6px, 6px 6px, 1px 56%;
    background-repeat: no-repeat;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.select:hover {
    background-color: var(--app-control-bg-hover);
}

.select:focus {
    border-color: rgba(151, 136, 195, 0.46);
    box-shadow: 0 0 0 4px rgba(132, 120, 184, 0.16);
    background-color: var(--app-control-bg-hover);
}

.select option,
.select optgroup {
    color: var(--app-control-text);
    background: var(--app-control-bg);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.conference-main-wrap {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-container,
.login-container,
.no-media-message {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    border-radius: var(--app-radius-xl);
    border: 1px solid var(--app-panel-border);
    background: var(--app-card);
    box-shadow: var(--app-shadow);
    overflow: hidden;
    position: relative;
}

.video-container {
    padding: 16px;
}

.conference-stage {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 26px;
}

.stage-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--app-text-soft);
    font-size: 0.78rem;
}

.stage-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #84a9ec, #7e74cf);
    box-shadow: 0 0 18px rgba(118, 134, 224, 0.46);
}

.stage-meta-count {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--app-panel-soft);
    border: 1px solid var(--app-panel-border);
}

.stage-card {
    position: relative;
    flex: 0 1 clamp(230px, 42vh, 410px);
    min-height: clamp(230px, 40vh, 390px);
    max-height: clamp(230px, 44vh, 430px);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(108, 125, 172, 0.1), transparent 30%),
        radial-gradient(circle at 18% 16%, rgba(128, 104, 162, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(30, 35, 47, 0.94), rgba(16, 20, 29, 0.98));
    border: 1px solid rgba(132, 145, 188, 0.14);
    overflow: hidden;
}

.stage-slot {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.stage-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--app-text-soft);
    text-align: center;
    padding: 32px;
}

.stage-empty h3 {
    font-size: 1.25rem;
}

.stage-empty p {
    max-width: 28rem;
    line-height: 1.55;
}

.stage-empty-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.6rem;
    color: var(--app-blue);
}

.stage-local-controls {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 6;
}

.stage-control {
    min-width: 108px;
    height: 50px;
    padding: 8px 13px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(47, 55, 76, 0.9), rgba(28, 34, 49, 0.94));
    border: 1px solid rgba(138, 152, 199, 0.18);
    color: var(--app-text);
    box-shadow: 0 12px 28px rgba(8, 12, 21, 0.34);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.stage-control:hover {
    transform: translateY(-2px);
    border-color: rgba(129, 146, 219, 0.34);
    background: linear-gradient(180deg, rgba(66, 76, 108, 0.96), rgba(38, 46, 66, 0.98));
}

.stage-control span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.stage-control label {
    margin: 0;
    font-size: 0.7rem;
    color: inherit;
    white-space: nowrap;
}

.muted,
.muted label,
.nav-cancel,
.nav-cancel label {
    color: #ff8f9d;
}

.chat-active,
.chat-active label {
    color: #8fbaff;
}

.participant-strip-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.participant-strip-header {
    display: none;
}

.participant-strip-kicker,
.chat-panel-kicker {
    margin-bottom: 6px;
    color: var(--app-text-faint);
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
}

.participant-strip-header h2,
.chat-panel-head h2 {
    font-size: 1.12rem;
    font-weight: 700;
}

.participant-strip-summary {
    color: var(--app-text-soft);
    font-size: 0.84rem;
}

.participant-strip {
    min-height: clamp(212px, 29vh, 320px);
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.participant-strip::-webkit-scrollbar,
#box::-webkit-scrollbar,
#users::-webkit-scrollbar,
.sidenav-content::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.participant-strip::-webkit-scrollbar-thumb,
#box::-webkit-scrollbar-thumb,
#users::-webkit-scrollbar-thumb,
.sidenav-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.peer {
    position: relative;
    flex: 0 0 176px;
    min-width: 176px;
    aspect-ratio: 4 / 5;
    min-height: auto;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 30px rgba(3, 8, 25, 0.24);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    scroll-snap-align: start;
}

.peer:hover {
    transform: translateY(-2px);
    border-color: rgba(93, 157, 255, 0.28);
}

.peer-active {
    border-color: rgba(93, 157, 255, 0.55);
    box-shadow: 0 20px 36px rgba(8, 20, 50, 0.36);
}

.peer-hidden {
    display: none !important;
}

.peer-stage {
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    flex: 1 1 auto;
    aspect-ratio: auto;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.peer-stage:hover {
    transform: none;
}

.media {
    width: 100%;
    height: 100%;
    max-height: none;
    display: block;
    object-fit: cover;
    background: #0c1119;
}

.stage-slot .media {
    object-fit: contain;
}

.media-failed {
    filter: grayscale(0.5) contrast(0.7);
}

.mirror {
    transform: scaleX(-1);
}

.label {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    max-width: calc(100% - 24px);
    padding: 8px 11px;
    border-radius: 999px;
    color: #fff;
    background: var(--app-label-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.2;
}

.label-fallback {
    color: var(--app-text-soft);
}

.video-controls {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.peer:hover > .video-controls,
.peer-stage > .video-controls {
    opacity: 1;
}

.video-controls {
    bottom: 12px;
    padding: 0 12px;
}

.controls-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.video-controls span {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(6, 13, 32, 0.64);
    color: var(--app-text);
    cursor: pointer;
}

.video-controls span:hover {
    background: rgba(12, 23, 53, 0.84);
}

.top-video-controls {
    display: none !important;
}

.video-controls .volume {
    width: auto;
    padding: 0 10px;
    gap: 8px;
}

.volume-mute {
    width: 20px;
    text-align: center;
}

.volume-slider {
    width: 74px;
    accent-color: var(--app-blue);
}

.chat-panel {
    width: var(--chat-panel-width);
    min-width: var(--chat-panel-width);
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: var(--app-radius-xl);
    border: 1px solid var(--app-panel-border);
    background: var(--app-card-soft);
    box-shadow: var(--app-shadow);
    overflow: hidden;
    touch-action: pan-y;
    transform: translateX(0);
    will-change: width, opacity, transform;
    transition: width 0.18s ease, min-width 0.18s ease, opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.chat-panel.chat-panel-closed {
    width: 0;
    min-width: 0;
    opacity: 0;
    border-color: transparent;
    transform: translateX(12px);
    pointer-events: none;
}

#chat {
    height: 100%;
    min-height: 0;
    background: transparent;
}

#chatbox {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--app-panel-border);
}

.close-chat {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--app-panel);
    color: var(--app-text-soft);
    cursor: pointer;
}

.close-chat:hover {
    background: rgba(109, 119, 154, 0.16);
    color: var(--app-text);
}

.chat-users {
    flex: 0 0 clamp(168px, 34vh, 290px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    padding: 12px 16px 0;
}

.users-header {
    display: flex;
    align-items: center;
    min-height: 18px;
    padding: 0 4px 8px;
}

.galene-header {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--app-text-soft);
}

.header-sep {
    display: none;
}

#users {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 18px;
    background: var(--app-panel);
    border: 1px solid var(--app-panel-border);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

#users .user-p,
#users > div {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 44px;
    color: var(--app-text);
    cursor: default;
    overflow: hidden;
    transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

#users > div:last-child {
    border-bottom: 0;
}

.user-presence {
    position: relative;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: var(--app-green);
}

.user-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-audio-icon {
    width: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-text-faint);
    font-size: 0.88rem;
}

#users > div.user-status-online .user-presence {
    background: var(--app-green);
    box-shadow: 0 0 0 4px rgba(53, 190, 125, 0.12);
}

#users > div.user-status-poor .user-presence {
    background: var(--app-yellow);
    box-shadow: 0 0 0 4px rgba(214, 179, 109, 0.14);
}

#users > div.user-status-offline .user-presence {
    background: var(--app-red);
    box-shadow: 0 0 0 4px rgba(221, 117, 134, 0.12);
}

#users > div.user-status-raisehand .user-presence {
    background: none;
    box-shadow: none;
}

#users > div.user-status-raisehand .user-presence::before {
    content: "\f256";
    position: absolute;
    inset: -2px 0 0;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--app-yellow);
    font-size: 0.86rem;
}

#users > div.user-status-speaking {
    background: rgba(114, 136, 230, 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(132, 154, 235, 0.34),
        0 0 0 1px rgba(132, 154, 235, 0.14),
        0 10px 24px rgba(30, 43, 88, 0.12);
}

#users > div.user-status-stale {
    opacity: 0.78;
}

#box {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 16px 8px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.reply {
    flex: 0 0 auto;
    position: relative;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--app-panel-border);
}

#input {
    overflow-y: auto;
}

#inputform {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.composer-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 36px;
    margin-bottom: 8px;
}

.composer-tool {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--app-panel-border);
    background: var(--app-panel);
    color: var(--app-text-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.composer-tool:hover,
.composer-tool.active {
    color: var(--app-text);
    background: rgba(108, 130, 205, 0.16);
    border-color: rgba(121, 142, 209, 0.34);
    transform: translateY(-1px);
}

.emoji-picker {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 12;
    width: min(320px, calc(100vw - 64px));
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--app-panel-border);
    background:
        radial-gradient(circle at top right, rgba(122, 138, 212, 0.16), transparent 34%),
        var(--app-surface-strong);
    box-shadow: 0 18px 40px rgba(10, 16, 28, 0.24);
}

.emoji-group + .emoji-group {
    margin-top: 10px;
}

.emoji-group-title {
    margin-bottom: 8px;
    color: var(--app-text-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.emoji-option {
    min-height: 38px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: var(--app-text);
    font-size: 1.14rem;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.emoji-option:hover {
    background: rgba(114, 136, 230, 0.14);
    border-color: rgba(126, 148, 224, 0.28);
    transform: translateY(-1px);
}

.form-reply {
    min-height: 52px;
    max-height: 132px;
    resize: none;
}

#inputbutton {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 16px;
}

.message-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
}

.message {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    max-width: min(88%, 28rem);
    padding: 11px 14px 8px;
    border-radius: 20px;
    background: var(--chat-message-other);
    color: var(--app-text);
    box-shadow: 0 10px 24px rgba(2, 6, 18, 0.12);
}

.message-row.message-me {
    align-items: flex-end;
}

.message-row.message-me .message {
    background: var(--chat-message-self);
    color: #fff;
}

.message-row.message-other .message,
.message-row:not(.message-me) .message {
    background: var(--chat-message-other);
}

.message-private {
    background: var(--chat-message-private);
}

.message-system {
    padding: 6px 0;
    text-align: center;
    color: var(--app-text-faint);
    font-size: 0.74rem;
    box-shadow: none;
    background: transparent;
}

.message-header {
    margin-bottom: 6px;
    font-size: 0.72rem;
    color: var(--app-text-soft);
    font-weight: 600;
}

.message-row.message-me .message-header {
    display: none;
}

.message-content {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
}

.message-me-prefix {
    font-weight: 700;
}

.message-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    align-self: stretch;
    margin-top: 8px;
    min-height: 16px;
}

.message-time {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 32px;
    font-size: 0.66rem;
    color: var(--app-text-faint);
}

.message-row.message-me .message-time {
    color: rgba(255, 255, 255, 0.76);
}

.reaction-trigger {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: inherit;
    opacity: 0.68;
    cursor: pointer;
    transition: opacity 0.18s ease, background 0.18s ease;
}

.reaction-trigger:hover,
.reaction-trigger.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

.reaction-trigger.has-selection {
    opacity: 1;
}

.message-row:not(.message-me) .reaction-trigger:hover,
.message-row:not(.message-me) .reaction-trigger.active {
    background: rgba(25, 35, 61, 0.08);
}

.message-reactions,
.reaction-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: min(88%, 28rem);
}

.message-row.message-me .message-reactions,
.message-row.message-me .reaction-picker {
    justify-content: flex-end;
}

.reaction-chip,
.reaction-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--app-panel-border);
    background: var(--app-panel);
    color: var(--app-text);
    font-size: 0.82rem;
}

.reaction-chip {
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.reaction-chip:hover {
    transform: translateY(-1px);
}

.reaction-chip.active {
    background: rgba(110, 134, 226, 0.16);
    border-color: rgba(121, 142, 209, 0.32);
}

.reaction-count {
    color: var(--app-text-soft);
    font-size: 0.74rem;
    font-weight: 700;
}

.reaction-picker {
    padding: 8px 0 0;
}

.reaction-option {
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.reaction-option:hover,
.reaction-option.active {
    background: rgba(114, 136, 230, 0.16);
    border-color: rgba(121, 142, 209, 0.34);
    transform: translateY(-1px);
}

.chat-tab {
    display: none !important;
}

.profile {
    width: auto;
}

.header-profile {
    display: flex;
    align-items: center;
}

.profile-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 6px 8px 6px 6px;
    border-radius: 999px;
    background: var(--app-panel);
    border: 1px solid var(--app-panel-border);
}

.profile-logo {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #7f92f7, #9268de);
    box-shadow: 0 12px 24px rgba(88, 100, 220, 0.24);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.profile-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-info span {
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#userspan {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--app-text);
}

#permspan,
#chpwspan a {
    font-size: 0.68rem;
    color: var(--app-text-soft);
    text-decoration: none;
}

.user-logout {
    min-width: 72px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(200, 93, 110, 0.12);
    color: #a75261;
    cursor: pointer;
}

.user-logout:hover {
    background: rgba(255, 95, 114, 0.18);
}

.logout-icon {
    display: inline-flex;
}

.logout-text {
    font-size: 0.82rem;
    font-weight: 600;
}

.login-container,
.no-media-message {
    padding: clamp(24px, 5vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 18px;
}

.login-hero {
    max-width: 34rem;
    text-align: center;
}

.login-kicker {
    margin-bottom: 12px;
    color: rgba(120, 136, 189, 0.88);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.74rem;
}

.login-hero h2 {
    margin-bottom: 12px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.login-hero p {
    color: var(--app-text-soft);
    line-height: 1.6;
}

.login-box {
    width: min(100%, 420px);
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(115, 132, 194, 0.16), transparent 34%),
        radial-gradient(circle at 18% 14%, rgba(145, 112, 198, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(31, 39, 59, 0.96), rgba(21, 27, 41, 0.98));
    border: 1px solid rgba(128, 143, 188, 0.2);
    box-shadow: 0 28px 68px rgba(12, 17, 31, 0.28);
}

.loginform {
    display: grid;
    gap: 16px;
}

.device-selection {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.device-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(18, 24, 37, 0.82);
    border: 1px solid rgba(124, 139, 184, 0.16);
}

.device-card.ok {
    border-color: rgba(28, 201, 135, 0.35);
    background: rgba(28, 201, 135, 0.14);
}

.device-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-icon {
    width: 22px;
    text-align: center;
    color: rgba(225, 233, 251, 0.74);
}

.device-card-label {
    flex: 1;
    color: #edf2ff;
    font-size: 0.9rem;
    font-weight: 500;
}

.permission-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(225, 233, 251, 0.74);
}

.connect {
    margin-top: 8px;
}

#connectbutton {
    width: 100%;
}

.login-version {
    color: rgba(198, 208, 230, 0.56);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.no-media-card {
    width: min(100%, 520px);
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(115, 132, 194, 0.16), transparent 34%),
        radial-gradient(circle at 18% 14%, rgba(145, 112, 198, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(31, 39, 59, 0.96), rgba(21, 27, 41, 0.98));
    border: 1px solid rgba(128, 143, 188, 0.2);
    box-shadow: 0 28px 68px rgba(12, 17, 31, 0.28);
    text-align: center;
}

.no-media-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    color: rgba(225, 233, 251, 0.76);
}

.no-media-card h3 {
    margin-bottom: 10px;
    font-size: 1.18rem;
}

.no-media-card > p {
    color: var(--app-text-soft);
    line-height: 1.55;
}

.no-media-list {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    gap: 10px;
    text-align: left;
}

.no-media-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(18, 24, 37, 0.82);
    border: 1px solid rgba(124, 139, 184, 0.16);
}

.no-media-list li strong {
    display: block;
    margin-bottom: 3px;
}

.no-media-list li span {
    display: block;
    color: var(--app-text-soft);
    font-size: 0.8rem;
}

.no-media-footer {
    margin-top: 16px !important;
    color: var(--app-text-faint) !important;
}

#captions-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 18;
    pointer-events: none;
}

#captions {
    margin: 0 auto;
    max-width: calc(100% - 40px);
    width: max-content;
    padding: 10px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    color: #09142f;
    font-size: 1rem;
}

.bg-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.bg-preset-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    aspect-ratio: 16 / 9;
}

.bg-preset-item:hover,
.bg-preset-item.selected {
    border-color: rgba(93, 157, 255, 0.58);
}

.bg-preset-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#custom-bg-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--app-text-soft);
    font-size: 0.82rem;
}

#sharelinkbutton {
    width: 100%;
}

.close-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: normal 1em/1 Arial, sans-serif;
}

.close-icon::before {
    content: "\2715";
}

#invite-dialog,
#permission-dialog {
    color: var(--app-text);
    background: var(--app-card);
    border: 1px solid var(--app-panel-border);
    border-radius: 24px;
    box-shadow: var(--app-shadow);
    padding: 24px;
}

#permission-dialog::backdrop,
#invite-dialog::backdrop {
    background: rgba(5, 10, 24, 0.6);
}

#permission-dialog h2 {
    margin-bottom: 12px;
}

#permission-dialog p {
    margin-bottom: 12px;
    color: var(--app-text-soft);
    line-height: 1.5;
}

.permission-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

#invite-dialog label,
#invite-dialog input {
    display: block;
    width: 100%;
}

#invite-dialog label {
    margin-top: 12px;
}

#invite-dialog input {
    margin-top: 8px;
}

#invite-dialog button {
    margin-top: 16px;
    margin-right: 10px;
}

.toastify {
    max-width: 420px;
    white-space: pre-line;
    text-align: left;
}

.toastify.error {
    background: linear-gradient(135deg, #e85067, #c92f49);
}

.toastify.warning {
    background: linear-gradient(135deg, #f5c75d, #dfa63b);
    color: #09142f;
}

.toastify.info {
    background: linear-gradient(135deg, #7ab1ff, #5d9dff);
    color: #09142f;
}

.contextualMenu {
    z-index: 4000;
}

#resizer,
.show-video,
.chat-btn,
.collapse-video {
    display: none !important;
}

@media only screen and (max-width: 1400px) {
    :root {
        --tool-panel-width: 300px;
        --chat-panel-width: 320px;
    }

    .header-actions {
        gap: 10px;
    }

    .profile-info {
        max-width: 118px;
    }
}

@media only screen and (max-width: 1200px) {
    .conference-layout {
        grid-template-columns: var(--tool-rail-width) minmax(0, 1fr);
    }

    .tool-panel {
        position: absolute;
        left: calc(var(--tool-rail-width) + var(--app-gap));
        top: 0;
        bottom: 0;
        width: min(var(--tool-panel-width), calc(100vw - 180px));
        z-index: 24;
    }

    .chat-panel {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 24;
    }

    .chat-tab {
        right: 24px;
    }
}

@media only screen and (max-width: 900px) {
    .app-shell {
        padding: 14px;
    }

    .app-header {
        flex-wrap: wrap;
        padding: 12px 14px;
    }

    .header-brand,
    .header-actions {
        width: 100%;
    }

    .header-actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .conference-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
    }

    .tool-rail {
        order: 0;
        width: max-content;
        max-width: 100%;
        align-self: flex-start;
        flex-direction: row;
        padding: 10px;
        overflow-x: auto;
    }

    .tool-rail-button {
        min-height: 60px;
        min-width: 102px;
        flex-direction: row;
    }

    .tool-panel {
        left: 0;
        right: 0;
        width: auto;
    }

    .participant-strip {
        min-height: 184px;
    }

    .peer {
        flex-basis: 168px;
        min-width: 168px;
    }

    .chat-panel {
        left: 10px;
        right: 10px;
        top: 0;
        bottom: 0;
        width: auto;
        min-width: 0;
        height: auto;
        max-height: none;
    }

    .chat-users {
        flex: 0 0 clamp(136px, 24vh, 220px);
        min-height: 120px;
    }

    #users {
        height: 100%;
        min-height: 0;
    }

    #box {
        min-height: 120px;
    }
}

@media only screen and (max-width: 640px) {
    .app-shell {
        padding: 10px;
        gap: 10px;
    }

    .app-header,
    .video-container,
    .login-container,
    .no-media-message,
    .tool-rail,
    .tool-panel,
    .chat-panel {
        border-radius: 22px;
    }

    .header-kicker {
        display: none;
    }

    .header-title {
        font-size: 1.18rem;
    }

    .profile-user {
        width: 100%;
        justify-content: space-between;
    }

    .stage-card {
        min-height: 228px;
    }

    .stage-local-controls {
        bottom: 14px;
        gap: 8px;
    }

    .stage-control {
        min-width: 98px;
        height: 48px;
        padding: 8px 12px;
        border-radius: 16px;
    }

    .stage-control label {
        font-size: 0.67rem;
    }

    .video-controls {
        bottom: 50px;
        padding: 0 12px;
    }

    .label {
        left: 10px;
        top: 10px;
        right: auto;
        bottom: auto;
        max-width: calc(100% - 20px);
        padding: 8px 10px;
    }

    .participant-strip {
        min-height: 172px;
    }

    .peer {
        flex-basis: 150px;
        min-width: 150px;
        border-radius: 18px;
    }

    .reply,
    #box,
    .chat-users,
    .chat-panel-head {
        padding-left: 14px;
        padding-right: 14px;
    }

    #inputform {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .composer-toolbar {
        margin-bottom: 6px;
    }

    .emoji-picker {
        width: min(280px, calc(100vw - 48px));
    }

    #inputbutton {
        min-width: 44px;
        min-height: 44px;
    }

    .message,
    .message-reactions,
    .reaction-picker {
        max-width: min(92%, 20rem);
    }

    .chat-users {
        flex: 0 0 clamp(116px, 22vh, 168px);
        min-height: 108px;
    }

    #users {
        height: 100%;
        min-height: 0;
    }

    #box {
        min-height: 110px;
    }
}
