/**
 * pages/voice.css — вынесено 1:1 из style.css (C.3.8).
 * Pure .voice-* (+ потомки). Overrides pages-* не трогались.
 * friends-popup / mini-profile / @media / @keyframes оставлены в style.css.
 */

.voice-status-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 12px;
    background: rgba(88, 101, 242, 0.15);
    border-radius: 6px;
    margin-bottom: var(--space-2);
    font-size: 0.9rem;
}

.voice-call-modal {
    background: var(--va-bg, #1b2838);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 280px;
}

.voice-call-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: var(--space-4);
}

.voice-participants-list {
    margin-top: var(--space-3);
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.voice-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.voice-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    text-align: center;
    position: relative;
}

.voice-tile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3ba55d;
    background: var(--va-bg-elevated, #202225);
}

.voice-tile.mine .voice-tile-avatar {
    border-color: var(--va-accent, #5865f2);
}

.voice-tile-name {
    font-size: 0.72rem;
    color: var(--va-text-muted, #b9bbbe);
    margin-top: var(--space-1);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-tile-mic {
    position: absolute;
    top: 40px;
    right: 2px;
    font-size: 0.75rem;
    background: var(--va-bg-card, #2f3136);
    border-radius: 50%;
    padding: 2px 4px;
}

.voice-participant-ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--va-text-muted, #b9bbbe);
}

.voice-remote-audio {
    display: none;
}

.voice-settings-grid {
    display: grid;
    gap: 14px;
    max-width: 100%;
}

.voice-settings-grid--devices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.voice-settings-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.voice-settings-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.voice-settings-card .security-card-body {
    padding-top: var(--space-1);
}

.voice-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.voice-field--wide {
    grid-column: 1 / -1;
}

.voice-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--va-text, #c7d5e0);
}

.voice-slider-val {
    min-width: 44px;
    text-align: right;
    font-size: 12px;
    color: var(--va-muted, #8d8d8d);
    flex-shrink: 0;
}

.voice-mode-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.voice-mode-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--va-border, #2a475e);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.voice-mode-card.is-active {
    border-color: var(--va-accent, #66c0f4);
    background: color-mix(in srgb, var(--va-accent, #66c0f4) 12%, transparent);
}

.voice-mode-card input {
    margin-top: 3px;
    flex-shrink: 0;
}

.voice-mode-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-processing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.voice-processing-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.voice-processing-item span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-processing-item small {
    font-size: 11px;
    line-height: 1.35;
}

.voice-settings-section {
    margin-top: 20px;
    padding: 16px 18px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
}

.voice-settings-section-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
}

.voice-settings-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voice-toggle-row {
    align-items: flex-start;
    gap: 10px;
}

.voice-toggle-row span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-toggle-row small {
    font-size: 12px;
    line-height: 1.35;
}

.voice-settings-sensitivity {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}

.voice-settings-actions {
    margin: 12px 0 0;
}

.voice-test-meter {
    flex: 1;
    height: 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    min-width: 120px;
}

.voice-test-meter span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3ba55d, #faa61a);
    transition: width 0.08s linear;
}

.voice-mic-test {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: var(--space-3);
}

.voice-call-incoming-extras {
    width: 100%;
    max-width: 420px;
    margin-top: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.voice-call-shell .voice-call-incoming-extras .voltark-incoming-reply-input {
    width: 100%;
}

.voice-call-shell .voltark-incoming-mute-panel {
    max-width: none;
}

.voice-quick-settings .voice-settings-grid {
    max-width: 100%;
    min-width: 0;
}

.voice-settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.voice-quick-settings label {
    overflow: hidden;
}

.voice-quick-settings select,
.voice-settings-grid select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.voice-quick-settings select {
    font-size: 12px;
    padding: 6px 8px;
}

.voice-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.voice-slider-row input[type="range"] {
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
    max-width: 100%;
}

.voice-user-volume {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    max-width: 200px;
    margin-top: 6px;
    padding: 0 4px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.voice-user-volume-slider {
    flex: 1 1 auto;
    width: 100%;
    min-width: 72px;
    height: 8px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    --vol-pct: 50%;
}

.voice-user-volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: linear-gradient(
        to right,
        var(--va-accent, #66c0f4) 0%,
        var(--va-accent, #66c0f4) var(--vol-pct, 50%),
        color-mix(in srgb, var(--va-text, #c7d5e0) 22%, transparent) var(--vol-pct, 50%),
        color-mix(in srgb, var(--va-text, #c7d5e0) 22%, transparent) 100%
    );
}

.voice-user-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--va-accent, #66c0f4);
    border: 2px solid #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.voice-user-volume-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--va-text, #c7d5e0) 22%, transparent);
}

.voice-user-volume-slider::-moz-range-progress {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--va-accent, #66c0f4);
}

.voice-user-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--va-accent, #66c0f4);
    border: 2px solid #fff;
    cursor: pointer;
}

.voice-user-volume-val {
    font-size: 10px;
    color: var(--muted, #8b949e);
    min-width: 32px;
    flex-shrink: 0;
    text-align: right;
}

.voice-screen-inline {
    flex: 0 0 auto;
    margin-left: 6px;
    font-size: 0.82rem;
    line-height: 1;
    opacity: 0.95;
    color: var(--va-accent, #66c0f4);
}

.voice-screen-sharing-row .voice-channel-user-name {
    color: var(--va-accent, #66c0f4);
}

.voice-channel-user-avatar-wrap {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
}

.voice-quick-settings {
    z-index: var(--z-toast);
    width: 360px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow: hidden;
    background: var(--va-bg, #1b2838);
    border: 1px solid var(--va-border, #2a475e);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.voice-quick-settings .voice-slider-row span {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--muted, #8b949e);
    min-width: 36px;
    text-align: right;
}

.voice-quick-settings-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.voice-settings-compact {
    gap: 10px;
}

.voice-quick-link {
    margin: 8px 0 0;
    text-align: center;
}

.voice-mic-test {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.voice-call-shell.voice-call-in-chat .guild-voice-control-bar {
    margin: 12px auto 8px;
    background: #1a1b1e;
    border-color: rgba(88, 101, 242, 0.45);
}

.voice-ptt-key-row.hidden {
    display: none;
}

.voice-media-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-3);
    min-height: 0;
}

.voice-media-focus {
    background: #0d1117;
    border: 1px solid #2a475e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    max-height: min(78vh, 900px);
}

.voice-media-focus.hidden {
    display: none;
}

.voice-media-focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.voice-media-focus-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.voice-media-focus:-webkit-full-screen {
    max-height: none;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
}

.voice-media-focus:fullscreen {
    max-height: none;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
}

.voice-media-focus:-webkit-full-screen .voice-media-focus-video {
    min-height: 0;
    max-height: none;
}

.voice-media-focus:fullscreen .voice-media-focus-video {
    min-height: 0;
    max-height: none;
}

.voice-media-focus-label {
    font-size: 0.9rem;
    color: #c7d5e0;
}

.voice-media-focus-video {
    flex: 1;
    width: 100%;
    min-height: 220px;
    object-fit: contain;
    background: #000;
}

.voice-watch-screen-btn {
    margin-top: 6px;
    width: 100%;
    font-size: 11px;
    padding: 4px 8px;
}

.voice-call-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.voice-call-shell .guild-voice-stage {
    flex: 0 0 auto;
    min-height: 0;
}

.voice-call-shell:not(.voice-call-in-chat) .guild-voice-stage {
    min-height: 280px;
}

.voice-call-status {
    text-align: center;
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.voice-call-shell .guild-voice-control-bar {
    margin-top: auto;
}

.voice-participant-row-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.voice-participant-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.voice-participant-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding-left: 0;
    box-sizing: border-box;
}

.voice-participant-controls .voice-user-volume {
    flex: 1 1 auto;
    margin-top: 0;
    max-width: none;
    min-width: 0;
}

.voice-user-mute-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--va-text-muted, #b9bbbe);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.voice-user-mute-btn:hover {
    border-color: var(--va-accent, #5865f2);
    color: #fff;
}

.voice-user-mute-btn.muted-active {
    border-color: #f23f43;
    background: rgba(242, 63, 67, 0.2);
    color: #f23f43;
}

.voice-call-shell.voice-call-in-chat {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    background: transparent;
    border-radius: 0;
}

.voice-call-in-chat .guild-voice-stage {
    flex: 0 0 auto;
    min-height: 0;
    padding: 12px 16px 8px;
    gap: 10px;
}

.voice-call-in-chat .guild-voice-tiles-wrap {
    flex: 0 0 auto;
    min-height: 0;
}

.voice-call-in-chat .guild-voice-tiles {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.voice-call-in-chat .guild-voice-tile {
    min-height: 120px;
    padding: 12px 10px 10px;
}

.voice-call-in-chat .guild-voice-tile-avatar-wrap {
    width: 64px;
    height: 64px;
}

.voice-call-in-chat .guild-voice-tile-avatar {
    width: 64px;
    height: 64px;
}

.voice-call-in-chat .voice-call-status {
    margin: 0;
    padding: 4px 0;
}

.voice-connected-banner {
    margin-top: auto;
    padding: 0;
    background: color-mix(in srgb, var(--va-bg-card, #161922) 92%, #000);
    border-top: 1px solid color-mix(in srgb, var(--va-border, #2a475e) 80%, transparent);
    font-size: 0.85rem;
    position: relative;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 0;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--va-accent) 18%, transparent);
}

.voice-connected-banner .voice-banner-compact {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.voice-connected-banner .voice-banner-hover-zone {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 54px;
    padding: 10px 12px;
    cursor: default;
    box-sizing: border-box;
}

.voice-banner-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.voice-banner-title-row .voice-connected-dot {
    flex-shrink: 0;
}

.voice-banner-title-row .voice-banner-ping {
    flex-shrink: 0;
    margin-left: auto;
}

.voice-banner-channel-link {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    color: #f2f3f5;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-connected-banner .voice-banner-status {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--va-text-muted, #8f98a0);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-banner-channel-link:hover {
    color: var(--va-accent, #66c0f4);
    text-decoration: underline;
}

.voice-banner-channel-link:focus-visible {
    outline: 2px solid var(--va-accent, #66c0f4);
    outline-offset: 2px;
    border-radius: 2px;
}

.voice-connected-banner .voice-banner-channel,
.voice-connected-banner #voice-banner-meta {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.15em;
    line-height: 1.15;
}

.voice-connected-banner .voice-banner-actions {
    width: 100%;
    padding: 8px 12px 10px;
    justify-content: flex-start;
    gap: var(--space-2);
    flex-wrap: wrap;
    flex: 0 0 auto;
    box-sizing: border-box;
    border-top: 1px solid color-mix(in srgb, var(--va-border, #2a475e) 70%, transparent);
    min-width: 0;
}

.voice-banner-icon-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid color-mix(in srgb, var(--va-border) 80%, transparent) !important;
    background: color-mix(in srgb, var(--va-bg) 55%, transparent) !important;
    color: var(--va-text) !important;
    display: grid !important;
    place-items: center;
    padding: 0 !important;
}

.voice-banner-icon-btn:hover {
    border-color: var(--va-accent) !important;
    color: var(--va-accent) !important;
}

.voice-banner-icon-btn.is-off,
.voice-banner-icon-btn.muted-on {
    background: color-mix(in srgb, #e10600 28%, transparent) !important;
    border-color: #e10600 !important;
    color: #ffb4b0 !important;
}

.voice-banner-leave {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: var(--radius-full) !important;
    border: 1px solid color-mix(in srgb, var(--va-accent) 45%, var(--va-border)) !important;
    background: color-mix(in srgb, var(--va-accent) 12%, transparent) !important;
    color: var(--va-text) !important;
    font-weight: 600;
}

.voice-banner-leave:hover {
    background: color-mix(in srgb, var(--va-accent) 24%, transparent) !important;
    border-color: var(--va-accent) !important;
}

.voice-connected-banner .voice-banner-actions .btn-outline,
.voice-connected-banner .voice-banner-actions .voice-banner-leave {
    margin-left: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-connected-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #23a559;
    box-shadow: 0 0 10px rgba(35, 165, 89, 0.7);
}

.voice-connected-banner .voice-banner-channel-link {
    color: var(--va-text, #f2f3f5);
    font-family: var(--va-display, Syne, sans-serif);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.voice-connected-banner .voice-banner-status {
    color: color-mix(in srgb, var(--va-accent) 70%, var(--va-text-muted));
}

.voice-connected-banner .voice-banner-ping {
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
}

.voice-connected-banner .voice-participant-controls {
    padding-left: 0;
    width: 100%;
}

.voice-connected-banner .voice-participant-row {
    gap: 6px;
}

.voice-banner-compact {
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
}

.voice-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px 10px 0;
    flex: 0 0 auto;
}

.voice-banner-actions .vc-btn {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    padding: 0;
}

.voice-banner-expand {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 12px;
    border-top: 1px solid transparent;
    transition: max-height var(--transition-base), opacity var(--transition-base), padding var(--transition-base), border-color var(--transition-base);
}

.voice-banner-expand.open {
    max-height: 280px;
    opacity: 1;
    padding: 0 12px 12px;
    border-top-color: #2b2d31;
    overflow-y: auto;
}

.voice-banner-expand-title {
    margin: 8px 0 6px;
    font-size: 0.75rem;
}

.voice-banner-participants {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.voice-banner-participant {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    padding: 4px 0;
}

.voice-banner-participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.voice-banner-ping {
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: auto;
    min-width: 3.2em;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.voice-banner-ping.ping-good {
    color: #23a559;
}

.voice-banner-ping.ping-warn {
    color: #f0b232;
}

.voice-banner-ping.ping-bad {
    color: #f23f43;
}

.voice-banner-status {
    font-weight: 500;
}

.voice-connected-banner.voice-banner-hovered {
    background: #232428;
}

.voice-connected-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #23a559;
}

.voice-channel-block {
    margin-bottom: 2px;
}

.voice-channel-users {
    padding: 0 8px 6px 28px;
}

.voice-channel-user {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 0.82rem;
    color: var(--va-text-muted, #b9bbbe);
}

.voice-channel-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.voice-invite-modal .voice-invite-modal-card {
    width: min(440px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
}

.voice-invite-modal .voice-invite-hint {
    margin: 0 0 var(--space-2);
    font-size: 0.88rem;
    line-height: 1.45;
}

.voice-inv-friends-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-2);
    min-height: 0;
    flex: 1;
}

.voice-inv-friends-list .fp-wrap {
    gap: 10px;
}

.voice-inv-friends-list .fp-list {
    max-height: min(340px, 42vh);
}

.voice-inv-friends-list .fp-search {
    border-radius: var(--va-radius-pill, 999px);
    background: rgba(0, 0, 0, 0.25);
}

.voice-inv-friend-fallback {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--va-border, #2a475e);
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
}

.voice-inv-friend-fallback:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* --- Голосовые сообщения --- */
.voice-msg-btn {
    flex-shrink: 0;
}

.voice-recorder-panel {
    position: fixed;
    left: 50%;
    bottom: 88px;
    transform: translateX(-50%);
    z-index: 1300;
    min-width: min(320px, calc(100vw - 24px));
    max-width: min(420px, calc(100vw - 24px));
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--va-bg, #1b2838);
    border: 1px solid var(--va-border, #2a475e);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    isolation: isolate;
    overflow: hidden;
}

.voice-recorder-panel .game-card-discount-pct,
.voice-recorder-panel .card-discount,
.voice-recorder-panel .badge-discount {
    display: none !important;
}

.voice-recorder-panel.hidden {
    display: none;
}

.voice-recorder-main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.voice-recorder-wave {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-recorder-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e34c26;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(227, 76, 38, 0.45);
    animation: voice-rec-pulse 1.2s ease-out infinite;
}

.voice-recorder-timer {
    margin-left: 0;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    color: var(--va-text-muted, #8f98a0);
    flex-shrink: 0;
    min-width: 2.5em;
    text-align: right;
}

.voice-recorder-level {
    flex: 1;
    min-width: 0;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px;
    padding: 0 2px;
}

.voice-recorder-level::after {
    display: none;
}

.voice-recorder-level i {
    flex: 1;
    display: block;
    height: var(--bar-h, 18%);
    min-height: 3px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--va-accent, #66c0f4) 35%, transparent);
    transition: height 0.08s linear, background 0.08s linear;
}

.voice-recorder-level i.on {
    background: var(--va-accent, #66c0f4);
}

.voice-recorder-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-shrink: 0;
    margin-top: 0;
}

.voice-recorder-send,
.voice-recorder-cancel {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    transition: filter var(--transition-fast), background var(--transition-fast);
}

.voice-recorder-send {
    background: var(--va-accent, #66c0f4);
    color: var(--va-bg, #1b2838);
    font-weight: 700;
}

.voice-recorder-send:hover:not(:disabled) {
    filter: brightness(1.08);
}

.voice-recorder-send:disabled {
    opacity: 0.55;
    cursor: wait;
}

.voice-recorder-cancel {
    background: transparent;
    color: var(--va-text, #c7d5e0);
    border: 1px solid var(--va-border, #2a475e);
}

.voice-recorder-cancel:hover {
    border-color: #ed4245;
    color: #ed4245;
}

.voice-recorder-hint {
    margin: 8px 0 0;
    font-size: 0.8rem;
}

.voice-recorder-hint.hidden {
    display: none;
}

.voice-recorder-preview,
.voice-recorder-options,
.voice-recorder-status {
    display: none !important;
}

.voice-recorder-preview.hidden {
    display: none !important;
}

.voice-player {
    display: block;
    width: 220px;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
    line-height: 1.2;
    /* chat-msg-body наследует white-space: pre-wrap — иначе отступы в HTML раздувают высоту */
    white-space: normal;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
}

.voice-player-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    height: 22px;
    max-height: 22px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.voice-play-btn {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #1b1e28;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.voice-play-icon {
    display: block;
    font-size: 0.55rem;
    line-height: 1;
    transform: translateX(1px);
}

.voice-wave-block {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.voice-seek-host {
    position: relative;
    width: 100%;
    height: 10px;
    cursor: pointer;
    overflow: hidden;
}

.voice-wave-canvas {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    display: block;
    pointer-events: none;
}

.voice-progress-playhead {
    position: absolute;
    top: 1px;
    bottom: 1px;
    left: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: var(--z-base);
    border-radius: 1px;
}

.voice-time-compact {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    cursor: pointer;
    -webkit-user-select: none;
            user-select: none;
}

.voice-transcript-compact {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.55rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.voice-transcript-compact:disabled {
    opacity: 0.55;
    cursor: wait;
}

.voice-player-extra {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-1);
}

.voice-player-extra.hidden {
    display: none !important;
}

.voice-transcript-row {
    margin: 0;
    padding: 0;
    width: 100%;
}

.voice-transcript-row.hidden,
.voice-transcript-row:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: hidden;
}

.voice-transcript-row:not(.hidden):not(:empty) {
    white-space: normal;
}

.voice-transcript-text {
    margin: 4px 0 0;
    font-size: 0.8rem;
    line-height: 1.3;
    color: inherit;
    opacity: 0.92;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.voice-transcript-text--error {
    color: #ffb4b4;
    opacity: 1;
}

.voice-player-loading {
    min-height: 36px;
    display: flex;
    align-items: center;
    color: inherit;
    opacity: 0.8;
    font-size: 0.85rem;
}

.voice-transcript-btn {
    align-self: flex-start;
    border: none;
    background: transparent;
    color: var(--va-accent, #66c0f4);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
}

.voice-transcript-btn.hidden {
    display: none;
}

.voice-speed-control {
    display: flex;
    gap: var(--space-1);
    flex-shrink: 0;
}

.voice-speed-btn {
    border: 1px solid var(--va-border, #2a475e);
    background: transparent;
    color: var(--va-muted, #8f98a0);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    cursor: pointer;
}

.voice-speed-btn:hover,
.voice-speed-btn.active {
    background: var(--va-accent, #66c0f4);
    border-color: var(--va-accent, #66c0f4);
    color: #0b1622;
}

.voice-recorder-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: 10px 0;
    font-size: 0.85rem;
}

.voice-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--va-muted, #8f98a0);
}

.voice-toggle input {
    accent-color: var(--va-accent, #66c0f4);
}
