/**
 * 📹 VIDEO CALL MODULE — RadimCare brand (v1.0)
 * =========================================================================
 * Tokenized, mobile-first, Kafánek-centric.
 * Replaces scattered calls-module.css + video-call.css + phone-call.css.
 * Co-exists: legacy classes still work; new .vc-* classes layer on top.
 */

#module-calls {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 8px;
    /* Tokens */
    --vc-accent: var(--radim-primary);
    --vc-accent-deep: #2d6a64;
    --vc-accent-soft: #eaf3ef;
    --vc-accent-glow: color-mix(in srgb, var(--radim-primary) 35%, transparent);
    --vc-warm: #c4a77d;
    --vc-danger: #d4574e;
    --vc-danger-deep: #a83d35;
    --vc-good: #86c5a0;
    --vc-soso: #e8c87c;
    --vc-heavy: #c893c0;
    --vc-ink: #2a3328;
    --vc-ink-mute: #6b7568;
    --vc-parchment: #faf7f0;
    --vc-border: rgba(91, 140, 127, 0.18);
    --vc-shadow: 0 2px 10px rgba(42, 51, 40, 0.06);
    --vc-shadow-lg: 0 12px 40px rgba(42, 51, 40, 0.18);
    --vc-serif: Georgia, 'Garamond', 'Times New Roman', serif;
    color: var(--vc-ink);
}

#module-calls.vc-night {
    --vc-accent: #9fc7bb;
    --vc-accent-deep: #b4d4c9;
    --vc-accent-soft: #253532;
    --vc-ink: #e9ece4;
    --vc-ink-mute: #a0aa9a;
    --vc-parchment: #1e2521;
    --vc-border: rgba(159, 199, 187, 0.22);
    --vc-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ─── MASTHEAD (Kafánek) ──────────────────────────────────────── */
.vc-masthead {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--vc-accent) 14%, var(--vc-parchment)) 0%,
        var(--vc-parchment) 100%);
    border: 2px solid color-mix(in srgb, var(--vc-accent) 22%, transparent);
    border-radius: 22px;
    margin-bottom: 14px;
}

.vc-avatar {
    flex-shrink: 0;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        color-mix(in srgb, var(--vc-accent) 25%, #fff),
        color-mix(in srgb, var(--vc-accent) 10%, #fff));
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(42, 51, 40, 0.12);
    object-fit: cover;
    object-position: center 18%;
    animation: vcBreathe 4s ease-in-out infinite;
}

@keyframes vcBreathe {
    0%, 100% { transform: scale(1.0); }
    50% { transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
    .vc-avatar { animation: none; }
}

.vc-masthead-text { flex: 1; min-width: 0; }

.vc-headline {
    margin: 0 0 4px 0;
    font-family: var(--vc-serif);
    font-size: 1.3rem;
    color: var(--vc-accent-deep);
    font-weight: 700;
    line-height: 1.35;
}

.vc-tagline {
    margin: 0;
    color: var(--vc-ink-mute);
    font-size: 0.95rem;
    font-style: italic;
}

/* ─── SETTINGS BAR ────────────────────────────────────────────── */
.vc-settings-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.vc-setting-btn {
    min-height: 48px;
    padding: 10px 18px;
    background: var(--vc-parchment);
    border: 2px solid var(--vc-border);
    border-radius: 14px;
    color: var(--vc-ink);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.vc-setting-btn:hover,
.vc-setting-btn:focus-visible {
    border-color: var(--vc-accent);
    background: var(--vc-accent-soft);
    outline: none;
}

.vc-setting-btn[aria-pressed="true"] {
    background: var(--vc-accent);
    color: #fff;
    border-color: var(--vc-accent);
}

/* ─── CARDS ───────────────────────────────────────────────────── */
.vc-card {
    background: var(--vc-parchment);
    border: 1px solid var(--vc-border);
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 14px;
    box-shadow: var(--vc-shadow);
}

.vc-card h3 {
    margin: 0 0 12px 0;
    font-family: var(--vc-serif);
    font-size: 1.2rem;
    color: var(--vc-accent-deep);
    font-weight: 700;
}

.vc-empty {
    padding: 24px 16px;
    text-align: center;
    background: var(--vc-accent-soft);
    border-radius: 14px;
    color: var(--vc-ink-mute);
    line-height: 1.55;
}

/* ─── CONTACT GRID ────────────────────────────────────────────── */
.vc-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.vc-contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--vc-parchment);
    border: 2px solid var(--vc-border);
    border-radius: 18px;
    transition: all 0.2s ease;
    position: relative;
}

.vc-contact-card:hover,
.vc-contact-card:focus-within {
    border-color: var(--vc-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--radim-primary) 15%, transparent);
}

.vc-contact-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        color-mix(in srgb, var(--vc-accent) 25%, #fff),
        color-mix(in srgb, var(--vc-accent) 12%, #fff));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--vc-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--vc-accent-deep);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(42, 51, 40, 0.1);
    position: relative;
}

.vc-contact-avatar.vc-emergency {
    background: radial-gradient(circle at 30% 30%, #f4a4a0, #d4574e);
    color: #fff;
}

.vc-safe-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.vc-safe-green { background: var(--vc-good); }
.vc-safe-yellow { background: var(--vc-soso); }
.vc-safe-red { background: var(--vc-heavy); }

.vc-contact-body {
    flex: 1;
    min-width: 0;
}

.vc-contact-name {
    font-family: var(--vc-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--vc-ink);
    line-height: 1.2;
    margin-bottom: 4px;
}

.vc-contact-app-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vc-good);
    margin-left: 6px;
    vertical-align: middle;
    animation: vcAppPulse 2s ease-in-out infinite;
}

@keyframes vcAppPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.vc-contact-meta {
    font-size: 0.88rem;
    color: var(--vc-ink-mute);
}

.vc-contact-badges {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.vc-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.vc-badge-sos {
    background: var(--vc-danger);
    color: #fff;
}

.vc-badge-primary {
    background: var(--vc-accent-soft);
    color: var(--vc-accent-deep);
}

.vc-contact-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.vc-action-btn {
    min-width: 54px;
    min-height: 54px;
    border-radius: 50%;
    border: 2px solid;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.vc-action-audio {
    background: var(--vc-accent);
    color: #fff;
    border-color: var(--vc-accent);
}

.vc-action-audio:hover,
.vc-action-audio:focus-visible {
    filter: brightness(1.1);
    transform: scale(1.08);
    outline: 3px solid var(--vc-accent-soft);
    outline-offset: 2px;
}

.vc-action-video {
    background: var(--vc-parchment);
    color: var(--vc-accent-deep);
    border-color: var(--vc-accent);
}

.vc-action-video:hover,
.vc-action-video:focus-visible {
    background: var(--vc-accent);
    color: #fff;
    transform: scale(1.08);
    outline: none;
}

/* ─── QUICK ACTIONS (add contact, group call) ────────────────── */
.vc-quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.vc-btn-primary, .vc-btn-secondary {
    min-height: 48px;
    padding: 10px 20px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid;
    transition: all 0.18s ease;
}

.vc-btn-primary {
    background: var(--vc-accent);
    color: #fff;
    border-color: var(--vc-accent);
}

.vc-btn-primary:hover,
.vc-btn-primary:focus-visible {
    filter: brightness(1.08);
    outline: 3px solid var(--vc-accent-soft);
    outline-offset: 2px;
    transform: translateY(-1px);
}

.vc-btn-secondary {
    background: var(--vc-parchment);
    color: var(--vc-accent-deep);
    border-color: var(--vc-accent);
}

.vc-btn-secondary:hover,
.vc-btn-secondary:focus-visible {
    background: var(--vc-accent-soft);
    outline: none;
}

.vc-btn-danger {
    background: var(--vc-danger);
    color: #fff;
    border: 2px solid var(--vc-danger);
    min-height: 56px;
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.vc-btn-danger:hover {
    background: var(--vc-danger-deep);
    border-color: var(--vc-danger-deep);
}

/* ─── ACTIVE CALL (fullscreen-feel) ───────────────────────────── */
.vc-active-call {
    position: fixed;
    inset: 0;
    background: #0f1412;
    z-index: 9500;
    display: flex;
    flex-direction: column;
}

.vc-active-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: linear-gradient(180deg, rgba(15, 20, 18, 0.95), rgba(15, 20, 18, 0.85));
    color: #fff;
    z-index: 2;
}

.vc-active-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.08));
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: vcListenPulse 1.8s ease-in-out infinite;
}

@keyframes vcListenPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--vc-accent-glow); }
    50%      { box-shadow: 0 0 0 10px color-mix(in srgb, var(--radim-primary) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
    .vc-active-avatar { animation: none; }
}

.vc-active-title {
    flex: 1;
    min-width: 0;
}

.vc-active-title strong {
    display: block;
    font-family: var(--vc-serif);
    font-size: 1.05rem;
    font-weight: 700;
}

.vc-active-title span {
    font-size: 0.82rem;
    opacity: 0.8;
}

.vc-active-timer {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
}

.vc-jitsi-frame {
    flex: 1;
    width: 100%;
    background: #0f1412;
    position: relative;
}

.vc-jitsi-frame iframe {
    border: none;
    width: 100%;
    height: 100%;
}

.vc-active-controls {
    padding: 16px 22px;
    background: linear-gradient(0deg, rgba(15, 20, 18, 0.95), rgba(15, 20, 18, 0.85));
    display: flex;
    justify-content: center;
    gap: 14px;
    z-index: 2;
}

/* ─── INCOMING CALL OVERLAY ──────────────────────────────────── */
.vc-incoming-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 18, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vc-incoming-card {
    background: var(--vc-parchment);
    border-radius: 22px;
    padding: 32px 28px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--vc-shadow-lg);
    position: relative;
}

.vc-incoming-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 18px;
    object-fit: cover;
    object-position: center 18%;
    background: radial-gradient(circle at 30% 30%,
        color-mix(in srgb, var(--vc-accent) 30%, #fff),
        color-mix(in srgb, var(--vc-accent) 12%, #fff));
    border: 4px solid #fff;
    box-shadow: 0 6px 24px rgba(42, 51, 40, 0.2);
    animation: vcIncomingPulse 1.1s ease-in-out infinite;
}

@keyframes vcIncomingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--vc-accent-glow),
                    0 6px 24px rgba(42, 51, 40, 0.2);
    }
    50% {
        box-shadow: 0 0 0 18px color-mix(in srgb, var(--radim-primary) 0%, transparent),
                    0 6px 24px rgba(42, 51, 40, 0.2);
    }
}

.vc-incoming-title {
    font-family: var(--vc-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--vc-accent-deep);
    margin: 0 0 8px 0;
}

.vc-incoming-kind {
    color: var(--vc-ink-mute);
    margin: 0 0 24px 0;
    font-size: 1rem;
}

.vc-incoming-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.vc-btn-accept {
    background: var(--vc-good);
    color: #fff;
    border: 2px solid var(--vc-good);
    min-height: 58px;
    padding: 12px 26px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    min-width: 140px;
}

.vc-btn-accept:hover {
    filter: brightness(1.1);
    transform: scale(1.03);
}

.vc-btn-reject {
    background: var(--vc-danger);
    color: #fff;
    border: 2px solid var(--vc-danger);
    min-height: 58px;
    padding: 12px 26px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    min-width: 140px;
}

.vc-btn-reject:hover {
    background: var(--vc-danger-deep);
}

/* ─── HISTORY TIMELINE ───────────────────────────────────────── */
.vc-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vc-history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--vc-border);
}

.vc-history-item:last-child { border-bottom: none; }

.vc-history-icon {
    font-size: 1.4rem;
    width: 38px;
    text-align: center;
}

.vc-history-body {
    flex: 1;
    min-width: 0;
}

.vc-history-name {
    font-family: var(--vc-serif);
    font-weight: 700;
    color: var(--vc-ink);
}

.vc-history-meta {
    font-size: 0.85rem;
    color: var(--vc-ink-mute);
}

.vc-history-duration {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.88rem;
    color: var(--vc-accent-deep);
    padding: 3px 10px;
    background: var(--vc-accent-soft);
    border-radius: 10px;
}

/* ─── TOAST ───────────────────────────────────────────────────── */
.vc-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    background: var(--vc-accent-deep);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(42, 51, 40, 0.35);
    font-size: 1rem;
    z-index: 10001;
    max-width: 92vw;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.vc-toast-warning { background: var(--vc-warm); }
.vc-toast-success { background: var(--vc-accent-deep); }
.vc-toast-out { opacity: 0; transform: translateX(-50%) translateY(14px); }

/* ─── SLOW MODE ───────────────────────────────────────────────── */
#module-calls.vc-slow * { transition-duration: 0.5s !important; }

/* ─── MOBILE (priority!) ──────────────────────────────────────── */
@media (max-width: 640px) {
    #module-calls { padding: 0 6px; }
    .vc-masthead {
        flex-direction: column;
        text-align: center;
        padding: 16px 14px;
    }
    .vc-avatar { width: 68px; height: 68px; }
    .vc-headline { font-size: 1.15rem; }

    .vc-contacts-grid { grid-template-columns: 1fr; gap: 10px; }
    .vc-contact-card { padding: 14px; gap: 12px; }
    .vc-contact-avatar { width: 56px; height: 56px; font-size: 1.5rem; }
    .vc-action-btn { min-width: 52px; min-height: 52px; font-size: 1.4rem; }

    .vc-active-header {
        padding: 10px 14px;
        gap: 10px;
    }
    .vc-active-avatar { width: 34px; height: 34px; }
    .vc-active-timer { font-size: 1.3rem; padding: 3px 10px; }

    .vc-active-controls {
        padding: 14px 10px 20px;
        gap: 10px;
    }
    .vc-btn-danger {
        min-height: 60px;
        padding: 14px 20px;
        font-size: 1.08rem;
        width: 100%;
        max-width: 420px;
    }

    .vc-incoming-card {
        padding: 24px 18px;
        max-width: 96vw;
    }
    .vc-incoming-avatar { width: 100px; height: 100px; }
    .vc-incoming-title { font-size: 1.3rem; }
    .vc-incoming-actions {
        flex-direction: column;
        gap: 10px;
    }
    .vc-btn-accept, .vc-btn-reject {
        width: 100%;
        min-width: 0;
    }

    .vc-quick-actions { flex-direction: column; }
    .vc-quick-actions .vc-btn-primary,
    .vc-quick-actions .vc-btn-secondary { width: 100%; }

    .vc-history-item { padding: 10px 6px; gap: 10px; }
}

/* Very small phones */
@media (max-width: 380px) {
    .vc-contact-card { gap: 10px; padding: 12px; }
    .vc-contact-avatar { width: 48px; height: 48px; font-size: 1.3rem; }
    .vc-contact-name { font-size: 1rem; }
    .vc-action-btn { min-width: 48px; min-height: 48px; font-size: 1.25rem; }
}

/* ═════════════════════════════════════════════════════════════════
   NATIVE WEBRTC VIDEO — fullscreen, Kafánek-branded, no iframe
   ═════════════════════════════════════════════════════════════════ */

.vc-native-active {
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: #0a0e0c;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.vc-native-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: linear-gradient(180deg,
        rgba(10, 14, 12, 0.95) 0%,
        rgba(10, 14, 12, 0.6) 70%,
        rgba(10, 14, 12, 0) 100%);
    z-index: 3;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

.vc-native-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0a0e0c;
}

.vc-native-remote-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0a0e0c;
}

.vc-native-local-video {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 140px;
    height: 186px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    z-index: 4;
    background: #0a0e0c;
    transition: opacity 0.3s ease;
}

.vc-native-audio-only {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: radial-gradient(circle at 50% 35%, #2d3e3a 0%, #0a0e0c 100%);
}

.vc-native-audio-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    background: radial-gradient(circle at 30% 30%, var(--radim-primary), #2d6a64);
    border: 4px solid rgba(255, 255, 255, 0.2);
    animation: vcAudioPulse 2s ease-in-out infinite;
}

@keyframes vcAudioPulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--radim-primary) 50%, transparent); }
    50%      { box-shadow: 0 0 0 30px color-mix(in srgb, var(--radim-primary) 0%, transparent); }
}

.vc-native-audio-only p {
    color: #fff;
    font-family: var(--vc-serif, Georgia, serif);
    font-size: 1.3rem;
    margin: 0;
}

.vc-native-controls {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 20px 20px 30px;
    background: linear-gradient(0deg,
        rgba(10, 14, 12, 0.95) 0%,
        rgba(10, 14, 12, 0.6) 70%,
        rgba(10, 14, 12, 0) 100%);
    z-index: 3;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

.vc-native-ctrl {
    min-width: 64px;
    min-height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.7rem;
    cursor: pointer;
    transition: all 0.18s ease;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vc-native-ctrl:hover,
.vc-native-ctrl:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    outline: none;
    transform: scale(1.08);
}

.vc-native-ctrl-off {
    background: rgba(220, 80, 80, 0.25);
    border-color: rgba(220, 80, 80, 0.55);
}

.vc-native-hangup {
    background: #d4574e;
    border-color: #d4574e;
    min-width: 72px;
    min-height: 72px;
    font-size: 1.9rem;
}

.vc-native-hangup:hover {
    background: #a83d35;
    border-color: #a83d35;
    transform: scale(1.1);
}

/* Mobile optimizations — priority */
@media (max-width: 640px) {
    .vc-native-header {
        padding: 10px 14px;
    }
    .vc-native-local-video {
        top: 70px;
        right: 12px;
        width: 100px;
        height: 132px;
    }
    .vc-native-audio-avatar {
        width: 140px;
        height: 140px;
    }
    .vc-native-audio-only p {
        font-size: 1.1rem;
    }
    .vc-native-controls {
        padding: 16px 14px 24px;
        gap: 14px;
    }
    .vc-native-ctrl {
        min-width: 56px;
        min-height: 56px;
        font-size: 1.5rem;
    }
    .vc-native-hangup {
        min-width: 64px;
        min-height: 64px;
        font-size: 1.7rem;
    }
}

/* Sprint D: Connection quality indicator */
.vc-native-quality {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: help;
    white-space: nowrap;
}

.vc-native-quality.vc-quality-good {
    background: rgba(134, 197, 160, 0.35);
    border: 1px solid rgba(134, 197, 160, 0.6);
}

.vc-native-quality.vc-quality-fair {
    background: rgba(232, 200, 124, 0.35);
    border: 1px solid rgba(232, 200, 124, 0.6);
}

.vc-native-quality.vc-quality-poor {
    background: rgba(232, 170, 100, 0.35);
    border: 1px solid rgba(232, 170, 100, 0.6);
}

.vc-native-quality.vc-quality-very_poor {
    background: rgba(212, 87, 78, 0.35);
    border: 1px solid rgba(212, 87, 78, 0.6);
    animation: vcQualityPulse 1.5s ease-in-out infinite;
}

@keyframes vcQualityPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* Sprint D: Reconnecting banner */
.vc-native-reconnecting {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 14px 24px;
    background: rgba(232, 200, 124, 0.95);
    color: #2a3328;
    font-family: var(--vc-serif, Georgia, serif);
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 5;
    animation: vcReconnectPulse 1.2s ease-in-out infinite;
}

@keyframes vcReconnectPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.05); }
}

@media (max-width: 640px) {
    .vc-native-quality { font-size: 0.75rem; padding: 3px 8px; }
    .vc-native-reconnecting { font-size: 1rem; padding: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .vc-native-quality.vc-quality-very_poor,
    .vc-native-reconnecting { animation: none; }
}

/* Sprint E — Live transcript overlay */
.vc-native-transcript {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 110px;
    padding: 12px 18px;
    background: rgba(10, 14, 12, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    color: #fff;
    font-family: var(--vc-serif, Georgia, serif);
    font-size: 1.15rem;
    line-height: 1.5;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.vc-native-transcript.hidden {
    opacity: 0;
    pointer-events: none;
}

.vc-transcript-interim {
    opacity: 0.6;
    font-style: italic;
}

/* Sprint E — CC button active state */
.vc-native-ctrl.vc-native-ctrl-on {
    background: rgba(134, 197, 160, 0.4);
    border-color: rgba(134, 197, 160, 0.8);
}

/* Sprint E — Recording indicator */
.vc-native-ctrl.vc-native-ctrl-rec {
    background: rgba(212, 87, 78, 0.6);
    border-color: rgba(212, 87, 78, 0.9);
    animation: vcRecPulse 1.5s ease-in-out infinite;
}

@keyframes vcRecPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 87, 78, 0.6); }
    50%      { box-shadow: 0 0 0 10px rgba(212, 87, 78, 0); }
}

/* Sprint E — Post-call feedback row */
.vc-feedback-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 18px 0 8px;
    flex-wrap: wrap;
}

.vc-feedback-btn {
    min-height: 52px;
    padding: 10px 16px;
    background: var(--vc-parchment, #faf7f0);
    color: var(--vc-ink, #2a3328);
    border: 2px solid var(--vc-border, rgba(91, 140, 127, 0.18));
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.15s ease;
    font-family: inherit;
}

.vc-feedback-btn:hover,
.vc-feedback-btn:focus-visible {
    background: var(--vc-accent-soft, #eaf3ef);
    border-color: var(--vc-accent, var(--radim-primary));
    outline: none;
    transform: scale(1.04);
}

@media (max-width: 640px) {
    .vc-native-transcript {
        bottom: 100px;
        font-size: 1.05rem;
        padding: 10px 14px;
    }
    .vc-feedback-row { flex-direction: column; }
    .vc-feedback-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .vc-native-ctrl.vc-native-ctrl-rec { animation: none; }
}

/* Sprint E2 — Recording save choice dialog */
.vc-save-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 8px;
}

.vc-save-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    background: var(--vc-parchment, #faf7f0);
    border: 2px solid var(--vc-border, rgba(91, 140, 127, 0.18));
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
    min-height: 86px;
}

.vc-save-choice:hover,
.vc-save-choice:focus-visible {
    border-color: var(--vc-accent, var(--radim-primary));
    background: var(--vc-accent-soft, #eaf3ef);
    outline: none;
    transform: translateY(-1px);
}

.vc-save-choice .vc-save-emoji {
    font-size: 1.8rem;
    line-height: 1.2;
}

.vc-save-choice strong {
    font-family: var(--vc-serif, Georgia, serif);
    font-size: 1.1rem;
    color: var(--vc-accent-deep, #2d6a64);
    margin-top: 2px;
}

.vc-save-choice span:not(.vc-save-emoji) {
    font-size: 0.88rem;
    color: var(--vc-ink-mute, #6b7568);
}

@media (max-width: 640px) {
    .vc-save-choice { padding: 12px 14px; min-height: 78px; }
    .vc-save-choice .vc-save-emoji { font-size: 1.5rem; }
    .vc-save-choice strong { font-size: 1rem; }
}

/* Safe area insets (iOS notch) */
@supports (padding: env(safe-area-inset-top)) {
    .vc-native-header {
        padding-top: calc(14px + env(safe-area-inset-top));
    }
    .vc-native-controls {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }
}

@media print {
    .vc-settings-bar, .vc-contact-actions,
    .vc-active-call, .vc-incoming-overlay,
    .vc-native-active, .vc-toast,
    .vc-call-chip, .vc-pip { display: none !important; }
}

/* ==========================================================================
   Sprint F — WhatsApp/Meta-inspired speed & functionality polish
   ========================================================================== */

/* PiP (Picture-in-Picture) floating call window */
.vc-native-active.vc-pip {
    position: fixed !important;
    inset: auto !important;
    top: auto;
    left: auto;
    right: 16px;
    bottom: 96px;
    width: min(44vw, 280px);
    height: min(62vw, 380px);
    max-height: 380px;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(20, 30, 28, 0.45), 0 0 0 1px rgba(255,255,255,0.08);
    overflow: hidden;
    z-index: 9000;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: grab;
    background: #0a0e0d;
}

.vc-native-active.vc-pip .vc-native-header,
.vc-native-active.vc-pip .vc-native-controls,
.vc-native-active.vc-pip .vc-native-transcript,
.vc-native-active.vc-pip .vc-native-quality { display: none !important; }

.vc-native-active.vc-pip .vc-native-video-area {
    padding: 0 !important;
    gap: 0 !important;
    height: 100% !important;
}

.vc-native-active.vc-pip .vc-native-remote,
.vc-native-active.vc-pip .vc-native-local {
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.vc-native-active.vc-pip .vc-native-local {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 38% !important;
    height: 34% !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
    border: 1.5px solid rgba(255,255,255,0.4);
}

.vc-native-active.vc-pip-dragging {
    cursor: grabbing !important;
    transition: none !important;
    box-shadow: 0 24px 64px rgba(20, 30, 28, 0.6), 0 0 0 2px var(--vc-accent, var(--radim-primary));
}

.vc-native-active.vc-pip::after {
    content: "⊡";
    position: absolute;
    top: 6px;
    right: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 22px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 640px) {
    .vc-native-active.vc-pip {
        width: min(50vw, 200px);
        height: min(72vw, 280px);
        right: 12px;
        bottom: 84px;
    }
}

/* PiP toggle button in active header */
.vc-native-pip-btn {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.1s ease;
    z-index: 3;
}

.vc-native-pip-btn:hover,
.vc-native-pip-btn:focus-visible {
    background: rgba(255,255,255,0.26);
    outline: none;
    transform: scale(1.05);
}

.vc-native-pip-btn:active { transform: scale(0.94); }

/* Persistent in-call chip (shown when PiP is minimized elsewhere) */
.vc-call-chip {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 14px;
    background: linear-gradient(135deg, #2d6a64 0%, var(--radim-primary) 100%);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(45, 106, 100, 0.4);
    font-family: var(--vc-sans, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 600;
    z-index: 8800;
    cursor: pointer;
    border: none;
    animation: vc-chip-in 0.25s ease-out;
    max-width: min(88vw, 360px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc-call-chip:hover,
.vc-call-chip:focus-visible {
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 12px 32px rgba(45, 106, 100, 0.5);
    outline: none;
}

.vc-call-chip .vc-chip-pulse {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff5a5f;
    box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.7);
    animation: vc-pulse-dot 1.6s infinite;
    flex-shrink: 0;
}

.vc-call-chip .vc-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.vc-call-chip .vc-chip-time {
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
    font-weight: 500;
    font-size: 13px;
    margin-left: 4px;
}

@keyframes vc-chip-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes vc-pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(255, 90, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); }
}

/* Clickable history rows with one-tap redial */
.vc-history-item.vc-history-clickable {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vc-history-item.vc-history-clickable:hover,
.vc-history-item.vc-history-clickable:focus-visible {
    background: var(--vc-accent-soft, color-mix(in srgb, var(--radim-primary) 12%, transparent));
    outline: none;
    transform: translateX(2px);
}

.vc-history-item.vc-history-clickable:active { transform: translateX(1px) scale(0.99); }

.vc-history-redial {
    margin-left: auto;
    font-size: 18px;
    opacity: 0.55;
    transition: opacity 0.15s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.vc-history-item.vc-history-clickable:hover .vc-history-redial {
    opacity: 1;
    transform: rotate(-45deg);
}

/* Screen-share button highlight when active */
.vc-native-ctrl.vc-ctrl-sharing {
    background: #ff9500 !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.25);
    animation: vc-share-pulse 2.2s ease-in-out infinite;
}

@keyframes vc-share-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 149, 0, 0.10); }
}

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
    .vc-call-chip,
    .vc-call-chip .vc-chip-pulse,
    .vc-native-ctrl.vc-ctrl-sharing,
    .vc-history-item.vc-history-clickable,
    .vc-history-item.vc-history-clickable .vc-history-redial,
    .vc-native-active.vc-pip { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Sprint G — Důstojnost, dostupnost, jistota
   (blur · quality bars · reactions · auto-answer · big captions)
   ========================================================================== */

/* Quality bars — replace text-only indicator with visual signal-strength bars */
.vc-native-quality {
    display: inline-flex !important;
    align-items: flex-end;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    background: rgba(0,0,0,0.32);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: 1;
    font-size: 11px;
    color: #fff;
    transition: background 0.2s ease;
}

.vc-qbars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 22px;
}

.vc-qbar {
    width: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.22);
    display: inline-block;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.vc-qbar.vc-qbar-on { background: #4ade80; }

.vc-quality-fair .vc-qbar.vc-qbar-on { background: #facc15; }
.vc-quality-poor .vc-qbar.vc-qbar-on { background: #fb923c; }
.vc-quality-very_poor .vc-qbar.vc-qbar-on {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.vc-quality-very_poor { background: rgba(127, 29, 29, 0.55); }

.vc-qbar-label {
    font-weight: 600;
    letter-spacing: 0.2px;
    margin-left: 2px;
}

/* Proactive audio-only banner */
.vc-audio-only-banner {
    position: fixed;
    bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(127, 29, 29, 0.92);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    z-index: 9100;
    font-family: var(--vc-sans, system-ui, sans-serif);
    font-size: 14px;
    max-width: 92vw;
    animation: vc-aob-in 0.25s ease-out;
}

.vc-audio-only-banner button {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

.vc-audio-only-banner .vc-aob-yes {
    background: #fff;
    color: #7f1d1d;
}

.vc-audio-only-banner .vc-aob-no {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.vc-audio-only-banner .vc-aob-yes:hover { background: #fef2f2; }
.vc-audio-only-banner .vc-aob-no:hover { background: rgba(255,255,255,0.28); }

@keyframes vc-aob-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Emoji reactions — floating up animation */
.vc-reaction-fly {
    position: absolute;
    bottom: 130px;
    font-size: 56px;
    pointer-events: none;
    z-index: 50;
    animation: vc-react-fly 2.4s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
    text-shadow: 0 4px 16px rgba(0,0,0,0.55);
    user-select: none;
    will-change: transform, opacity;
}

@keyframes vc-react-fly {
    0%   { opacity: 0; transform: translate(var(--vc-jx, 0), 30px) scale(0.5); }
    20%  { opacity: 1; transform: translate(var(--vc-jx, 0), -10px) scale(1.15); }
    60%  { opacity: 1; transform: translate(calc(var(--vc-jx, 0px) * 1.5), -180px) scale(1); }
    100% { opacity: 0; transform: translate(calc(var(--vc-jx, 0px) * 2), -340px) scale(0.85); }
}

/* Reaction picker */
.vc-reaction-picker {
    position: absolute;
    bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(20, 24, 28, 0.88);
    border-radius: 999px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
    z-index: 60;
    animation: vc-picker-in 0.18s ease-out;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@keyframes vc-picker-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.92); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.vc-reaction-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.06);
    font-size: 26px;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vc-reaction-btn:hover,
.vc-reaction-btn:focus-visible {
    background: rgba(255,255,255,0.16);
    transform: scale(1.15);
    outline: none;
}

.vc-reaction-btn:active { transform: scale(0.92); }

/* Big captions overlay (accessibility) */
.vc-native-transcript.vc-transcript-big {
    font-size: 28px !important;
    line-height: 1.35 !important;
    padding: 18px 22px !important;
    bottom: 120px !important;
    background: rgba(0, 0, 0, 0.78) !important;
    max-width: 92vw !important;
    font-weight: 600;
    letter-spacing: 0.3px;
}

@media (max-width: 640px) {
    .vc-native-transcript.vc-transcript-big {
        font-size: 22px !important;
        padding: 14px 16px !important;
    }
}

/* Auto-answer countdown banner (in incoming card) */
.vc-auto-answer-banner {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--vc-accent-soft, color-mix(in srgb, var(--radim-primary) 18%, transparent));
    border: 1px solid var(--vc-accent, var(--radim-primary));
    color: var(--vc-accent-deep, #2d6a64);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.95rem;
    animation: vc-aab-pulse 1s ease-in-out infinite alternate;
}

@keyframes vc-aab-pulse {
    from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--radim-primary) 0%, transparent); }
    to   { box-shadow: 0 0 0 6px color-mix(in srgb, var(--radim-primary) 18%, transparent); }
}

.vc-auto-answer-banner strong {
    font-variant-numeric: tabular-nums;
    font-size: 1.2rem;
    color: var(--vc-accent-deep, #2d6a64);
}

.vc-auto-cancel {
    background: #fff;
    color: var(--vc-accent-deep, #2d6a64);
    border: 1px solid var(--vc-accent, var(--radim-primary));
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.vc-auto-cancel:hover,
.vc-auto-cancel:focus-visible {
    background: var(--vc-accent-soft, color-mix(in srgb, var(--radim-primary) 12%, transparent));
    outline: none;
}

/* Trusted-contact star button + badge */
.vc-action-btn.vc-action-trust {
    background: rgba(255, 200, 80, 0.08) !important;
    color: #c4912a !important;
    font-size: 1.4rem;
    transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.vc-action-btn.vc-action-trust:hover,
.vc-action-btn.vc-action-trust:focus-visible {
    background: rgba(255, 200, 80, 0.18) !important;
    transform: scale(1.06);
    outline: none;
}

.vc-action-btn.vc-action-trust.vc-action-trust-on {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.vc-badge.vc-badge-trust {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.vc-contact-card.vc-contact-trusted {
    border-color: rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15);
}

/* Auto-answer setting button (when ON) */
.vc-setting-btn.vc-setting-on {
    background: linear-gradient(135deg, var(--vc-accent, var(--radim-primary)) 0%, var(--vc-accent-deep, #2d6a64) 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* Background-blur button when active — frosted glow */
.vc-native-ctrl#vcNativeBlurBtn.vc-native-ctrl-on {
    background: rgba(178, 207, 255, 0.22) !important;
    box-shadow: 0 0 0 3px rgba(178, 207, 255, 0.18), inset 0 0 12px rgba(178, 207, 255, 0.4);
}

@media (prefers-reduced-motion: reduce) {
    .vc-reaction-fly,
    .vc-reaction-picker,
    .vc-audio-only-banner,
    .vc-auto-answer-banner { animation: none !important; }
    .vc-reaction-fly { transform: translate(var(--vc-jx, 0), -150px); }
}

@media print {
    .vc-reaction-fly,
    .vc-reaction-picker,
    .vc-audio-only-banner,
    .vc-auto-answer-banner { display: none !important; }
}

/* ==========================================================================
   Sprint H — Group calls (P2P mesh, up to 6 participants)
   ========================================================================== */

/* Group active overlay reuses .vc-native-active base; the grid replaces
   the single remote-video area. */
.vc-native-active.vc-group-active {
    background: linear-gradient(180deg, #0a0e0d 0%, #141a18 100%);
}

.vc-group-grid {
    position: absolute;
    top: calc(80px + env(safe-area-inset-top, 0px));
    bottom: calc(110px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    overflow: hidden;
}

/* 2 participants — side by side on landscape, stacked on portrait */
.vc-group-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
@media (orientation: portrait) and (max-width: 640px) {
    .vc-group-grid[data-count="2"] { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
}

/* 3 participants — first row 2, second row 1 (featured) */
.vc-group-grid[data-count="3"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.vc-group-grid[data-count="3"] .vc-tile:first-child {
    grid-column: 1 / span 2;
}

/* 4 participants — 2×2 */
.vc-group-grid[data-count="4"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* 5–6 — 3×2 */
.vc-group-grid[data-count="5"],
.vc-group-grid[data-count="6"] {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.vc-tile {
    position: relative;
    background: #1a1f1d;
    border-radius: 14px;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.vc-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0a0e0d;
}

.vc-tile-self video { transform: scaleX(-1); }  /* mirror self for natural feel */

.vc-tile-overlay {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    max-width: calc(100% - 16px);
}

.vc-tile-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.vc-tile-muted { color: #ff5a5f; font-size: 13px; }

.vc-tile-status {
    background: color-mix(in srgb, var(--radim-primary) 35%, transparent);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #fff;
    font-weight: 500;
}

.vc-tile-connecting {
    background: linear-gradient(135deg, #1a1f1d 0%, #252c2a 100%);
    animation: vc-tile-connecting-pulse 1.4s ease-in-out infinite alternate;
}

@keyframes vc-tile-connecting-pulse {
    from { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--radim-primary) 15%, transparent); }
    to   { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--radim-primary) 45%, transparent); }
}

.vc-tile[data-state="connected"] {
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25);
}

.vc-tile[data-state="failed"],
.vc-tile[data-state="disconnected"] {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5);
}

/* Group picker */
.vc-group-picker-card {
    max-width: 480px;
    text-align: left;
}

.vc-group-picker-card .vc-incoming-avatar,
.vc-group-picker-card .vc-incoming-title,
.vc-group-picker-card .vc-incoming-kind { text-align: center; }

.vc-group-pick-list {
    max-height: 340px;
    overflow-y: auto;
    margin: 14px 0;
    border: 1px solid var(--vc-border, rgba(91, 140, 127, 0.18));
    border-radius: 14px;
    padding: 6px;
    background: var(--vc-parchment, #faf7f0);
    -webkit-overflow-scrolling: touch;
}

.vc-group-pick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.vc-group-pick-item:hover,
.vc-group-pick-item:focus-within {
    background: var(--vc-accent-soft, color-mix(in srgb, var(--radim-primary) 12%, transparent));
}

.vc-group-pick-cb {
    width: 22px;
    height: 22px;
    accent-color: var(--vc-accent, var(--radim-primary));
    flex-shrink: 0;
    cursor: pointer;
}

.vc-group-pick-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vc-accent, var(--radim-primary)) 0%, var(--vc-accent-deep, #2d6a64) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    font-family: var(--vc-serif, Georgia, serif);
    flex-shrink: 0;
}

.vc-group-pick-name {
    flex: 1;
    font-weight: 600;
    color: var(--vc-ink, #2d3a36);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vc-group-pick-rel {
    font-size: 0.82rem;
    color: var(--vc-ink-mute, #6b7568);
    font-style: italic;
    flex-shrink: 0;
}

.vc-group-pick-type {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 0 4px;
    font-size: 0.95rem;
}

.vc-group-pick-type label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--vc-ink, #2d3a36);
}

.vc-group-pick-type input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--vc-accent, var(--radim-primary));
    cursor: pointer;
}

@media (max-width: 640px) {
    .vc-group-grid { left: 6px; right: 6px; gap: 6px; }
    .vc-tile-name { max-width: 90px; }
    .vc-group-pick-list { max-height: 48vh; }
}
