:root {
    --bg: #0a0e17;
    --bg-card: #121a2b;
    --bg-elevated: #1a2540;
    --accent: #00d4aa;
    --accent-dim: #00a884;
    --gold: #f0c14b;
    --danger: #ff4d6d;
    --police: #4dabf7;
    --chor: #ff6b6b;
    --daroga: #ffd43b;
    --dakat: #b197fc;
    --text: #e8edf5;
    --muted: #8b9cb8;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Hind Siliguri', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

select,
.field-select {
    font-family: inherit;
    font-size: 1rem;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -100px;
    right: -100px;
}

.glow-2 {
    width: 350px;
    height: 350px;
    background: #6366f1;
    bottom: -80px;
    left: -80px;
}

.app {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.room-app {
    max-width: 640px;
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
.scoreboard-card--with-voice {
    margin-bottom: 8px;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 32px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card + .card {
    margin-top: 20px;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #041510;
    width: 100%;
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(0, 212, 170, 0.35);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #d4a017);
    color: #1a1200;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.9rem;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
}

.tab.active {
    background: var(--accent);
    color: #041510;
    border-color: var(--accent);
}

.hidden {
    display: none !important;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 10px;
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: var(--danger);
    color: var(--danger);
}

/* Lobby */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 999px;
}

.score-badge {
    font-family: 'Orbitron', sans-serif;
    color: var(--gold);
    font-size: 0.95rem;
}

.friend-list,
.invite-list {
    list-style: none;
}

.friend-list li,
.invite-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.friend-list li:last-child {
    border-bottom: none;
}

/* Room / Game */
.room-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    padding: 8px 0 12px;
    margin: -8px 0 12px;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    min-width: 40px;
    padding: 8px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.room-info-card {
    text-align: center;
}

.room-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 4px;
}

.room-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.meta-pill {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--muted);
}

.meta-pill.accent {
    color: var(--accent);
    border-color: rgba(0, 212, 170, 0.35);
}

.field-label {
    display: block;
    text-align: left;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.field-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.field-input,
.field-select {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
}

.host-settings {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: left;
}

.invite-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: left;
}

.room-full-msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    color: var(--accent);
    font-size: 0.95rem;
}

.room-code {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    letter-spacing: 0.25em;
    text-align: center;
    color: var(--gold);
    margin: 8px 0 4px;
    padding: 12px;
    background: rgba(240, 193, 75, 0.08);
    border-radius: 12px;
    border: 1px dashed rgba(240, 193, 75, 0.35);
}

.section-title {
    text-align: center;
    font-size: 1.1rem;
    color: var(--accent);
    margin: 20px 0 8px;
}

.section-title small {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 400;
}

.section-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.card-hint {
    text-align: center;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.card-role {
    font-size: clamp(1.5rem, 6vw, 2rem);
}

.slot-name,
.opp-name {
    font-size: 0.95rem;
    word-break: break-word;
}

.slot-empty {
    color: var(--muted);
    font-size: 0.9rem;
}

.opp-score {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--gold);
    margin-top: 6px;
}

.round-delta {
    color: var(--accent);
    font-weight: 700;
    margin-top: 4px;
}

.btn-accuse {
    width: 100%;
    margin-top: 12px;
    min-height: 44px;
}

.scoreboard-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scoreboard-card {
    margin-top: 20px;
}

.player-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 16px 0;
}

@media (min-width: 520px) {
    .player-slots {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

.player-slot {
    background: var(--bg-elevated);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, transform 0.3s;
}

.player-slot.filled {
    border-style: solid;
    border-color: var(--accent-dim);
}

.player-slot.is-me {
    box-shadow: 0 0 0 2px var(--accent);
}

.player-slot .seat-num {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.waiting-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Game board */
.game-phase {
    text-align: center;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(0, 212, 170, 0.1), rgba(124, 58, 237, 0.1));
    border: 1px solid var(--border);
}

.my-card-panel {
    margin: 16px auto;
    max-width: min(280px, 85vw);
    perspective: 1000px;
}

.game-card {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    border: 3px solid rgba(255, 255, 255, 0.15);
    transform-style: preserve-3d;
}

.game-card .card-score {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin-top: 12px;
    opacity: 0.9;
}

.game-card.role-chor { background: linear-gradient(145deg, #5c1a1a, var(--chor)); }
.game-card.role-police { background: linear-gradient(145deg, #1a3a5c, var(--police)); }
.game-card.role-daroga { background: linear-gradient(145deg, #5c4a1a, var(--daroga)); color: #1a1200; }
.game-card.role-dakat { background: linear-gradient(145deg, #3d2a5c, var(--dakat)); }

.opponents {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px;
}

@media (min-width: 480px) {
    .opponents {
        grid-template-columns: repeat(3, 1fr);
    }
}

.opponent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.opponent-card.revealed-police { border-color: var(--police); }
.opponent-card.revealed-daroga { border-color: var(--daroga); }

.opponent-card .role-tag {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: var(--bg-elevated);
}

.opponent-card .role-tag.hidden-role {
    color: var(--muted);
    letter-spacing: 2px;
}

.role-tag.tag-police { background: rgba(77, 171, 247, 0.2); color: var(--police); }
.role-tag.tag-daroga { background: rgba(255, 212, 59, 0.2); color: var(--daroga); }
.role-tag.tag-chor { background: rgba(255, 107, 107, 0.2); color: var(--chor); }
.role-tag.tag-dakat { background: rgba(177, 151, 252, 0.2); color: var(--dakat); }

.scoreboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.scoreboard-table th,
.scoreboard-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.scoreboard-table th {
    color: var(--muted);
    font-weight: 600;
}

.scoreboard-table tr.highlight {
    background: rgba(0, 212, 170, 0.08);
}

.invite-link-box {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.invite-link-box input {
    flex: 1;
    font-size: 0.85rem;
}

.result-banner {
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 1.2rem;
    margin: 20px 0;
}

.result-banner.win {
    background: rgba(0, 212, 170, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.result-banner.lose {
    background: rgba(255, 77, 109, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.player-slots.hidden {
    display: none !important;
}

.round-twist-banner {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(240, 193, 75, 0.12));
    border: 1px solid rgba(124, 92, 255, 0.35);
    text-align: center;
}

.round-twist-banner.hidden {
    display: none;
}

.round-twist-banner strong {
    display: block;
    color: var(--gold);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.round-twist-banner .twist-hint {
    font-size: 0.8rem;
    color: var(--muted);
}

.round-countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(5, 10, 20, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(6px);
}

.round-countdown-overlay.hidden {
    display: none;
}

.round-countdown-panel {
    text-align: center;
    max-width: 320px;
    width: 100%;
}

.round-countdown-msg {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.round-countdown-num {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(5rem, 28vw, 8rem);
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 40px rgba(240, 193, 75, 0.45);
    animation: countdown-pulse 0.9s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.winner-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(5, 10, 20, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.winner-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow);
}

.winner-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 24px;
}

.podium {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    min-height: 180px;
}

.podium-place {
    flex: 1;
    min-width: 100px;
    max-width: 140px;
    padding: 16px 12px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.podium-place.rank-1 {
    order: 2;
    transform: scale(1.08);
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(240, 193, 75, 0.2), var(--bg-elevated));
}

.podium-place.rank-2 { order: 1; }
.podium-place.rank-3 { order: 3; }
.podium-place.rank-4 {
    order: 4;
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    margin-top: 8px;
    border-color: var(--muted);
}

.podium-medal {
    font-size: 2rem;
    margin-bottom: 8px;
}

.podium-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.podium-score {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent);
    font-size: 0.85rem;
    margin-top: 4px;
}

.podium-rank {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

.podium-rest {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--muted);
}

@media (max-width: 600px) {
    .card {
        padding: 18px 16px;
    }

    .header-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .room-header {
        flex-direction: row;
        align-items: center;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .field-row {
        flex-direction: column;
    }

    .field-row .btn {
        width: 100%;
    }

    .btn-sm {
        min-height: 44px;
    }

    .game-phase {
        font-size: 0.95rem;
        padding: 14px 12px;
    }

    .result-banner {
        font-size: 1rem;
        padding: 16px;
    }

    .scoreboard-table thead {
        display: none;
    }

    .scoreboard-table tr {
        display: block;
        margin-bottom: 10px;
        padding: 12px;
        background: var(--bg-elevated);
        border-radius: 10px;
        border: 1px solid var(--border);
    }

    .scoreboard-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
    }

    .scoreboard-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.85rem;
    }

    .podium-place.rank-1 {
        transform: none;
    }

    .winner-panel {
        max-height: 90dvh;
        overflow-y: auto;
    }
}

@media (min-width: 601px) {
    .player-slots {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* — Main menu & avatars (web) — */
.web-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--dakat), var(--accent));
    border: 2px solid rgba(255, 255, 255, 0.12);
    object-fit: cover;
}
.web-avatar--sm { width: 32px; height: 32px; font-size: 0.85rem; }
.web-avatar--md { width: 40px; height: 40px; font-size: 1rem; }
.web-avatar--lg { width: 56px; height: 56px; font-size: 1.25rem; }
.web-avatar--xl { width: 88px; height: 88px; font-size: 2rem; }
.web-avatar--initial { font-weight: 800; color: #fff; }

.home-menu-web {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}
.home-menu-web__btn {
    display: block;
    width: 100%;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.home-menu-web__btn--play {
    border-color: rgba(0, 212, 170, 0.4);
    background: rgba(0, 212, 170, 0.1);
}
.home-menu-web__btn--exit {
    border-color: rgba(255, 77, 109, 0.35);
}
.home-user-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.subpage-header-web {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}
.profile-avatar-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0 auto 20px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
}
.settings-row-web {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.friend-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.scoreboard-player-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.player-slot.filled {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.opponent-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* — Voice dock (full width, fixed above content) — */
.voice-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    width: 100%;
    pointer-events: none;
}
.voice-dock__card {
    pointer-events: auto;
    width: 100%;
    max-width: none;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
    text-align: center;
    background: linear-gradient(165deg, rgba(22, 34, 58, 0.98) 0%, rgba(8, 12, 22, 0.99) 100%);
    border: 1px solid rgba(0, 229, 184, 0.35);
    border-bottom: none;
    box-shadow:
        0 -8px 40px rgba(0, 0, 0, 0.55),
        0 0 32px rgba(0, 229, 184, 0.08);
    backdrop-filter: blur(14px);
}
.voice-dock__status {
    margin: 0 0 10px;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--muted);
    font-weight: 600;
}
.voice-dock__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.voice-dock__btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 64px;
    height: 64px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #8fa3c4;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, color 0.2s, background 0.2s;
}
.voice-dock__btn:active {
    transform: scale(0.94);
}
.voice-dock__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.voice-dock__svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}
.voice-dock__label {
    position: relative;
    z-index: 1;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.voice-dock__btn--leave {
    color: #ff8fa3;
    background: rgba(255, 77, 109, 0.1);
}
.voice-dock__btn--leave .voice-dock__ring {
    border-color: rgba(255, 77, 109, 0.45);
}
.voice-dock__btn--mic.is-idle .voice-dock__ring {
    border-color: rgba(255, 255, 255, 0.15);
}
.voice-dock__btn--mic.is-active {
    color: var(--accent);
    background: rgba(0, 229, 184, 0.14);
}
.voice-dock__btn--mic.is-active .voice-dock__ring {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 229, 184, 0.15), 0 0 24px rgba(0, 229, 184, 0.35);
}
.voice-dock__btn--mic.is-muted {
    color: var(--gold);
    background: rgba(255, 201, 71, 0.1);
}
.voice-dock__btn--mic.is-muted .voice-dock__ring {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 201, 71, 0.12);
}
.voice-dock__btn--speaker.is-on {
    color: #c4b5fd;
    background: rgba(124, 92, 255, 0.12);
}
.voice-dock__btn--speaker.is-on .voice-dock__ring {
    border-color: rgba(124, 92, 255, 0.55);
}
.voice-dock__btn--speaker.is-muted {
    color: #ff8fa3;
    background: rgba(255, 77, 109, 0.1);
}
.voice-dock__btn--speaker.is-muted .voice-dock__ring {
    border-color: rgba(255, 77, 109, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.1);
}
.voice-dock__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.voice-dock__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}
.voice-dock__dot--live {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}
.voice-dock__badge {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0, 229, 184, 0.1);
    border: 1px solid rgba(0, 229, 184, 0.25);
}
.voice-dock__error {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: var(--danger);
    line-height: 1.35;
}

/* Presence dot */
.presence-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    flex-shrink: 0;
}
.presence-dot--online {
    background: #23a559;
    box-shadow: 0 0 6px rgba(35, 165, 89, 0.55);
}
.presence-dot--offline {
    background: #5c6470;
}
.friend-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}
.friend-avatar-wrap .presence-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
}

/* Invite FAB + sidebar (web room) */
.invite-fab {
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}
.invite-fab--open {
    color: var(--gold);
    border-color: rgba(240, 193, 75, 0.45);
    background: rgba(240, 193, 75, 0.12);
}
.invite-fab__icon {
    width: 18px;
    height: 18px;
    display: block;
}
#invite-sidebar-root:not(.hidden) {
    display: block;
}
.invite-sidebar__backdrop {
    position: fixed;
    inset: 0;
    z-index: 600;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}
.invite-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 601;
    width: min(300px, 88vw);
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    background: linear-gradient(180deg, #121c30 0%, #080c16 100%);
    border-left: 1px solid rgba(240, 193, 75, 0.35);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
    animation: invite-sidebar-in 0.28s ease-out;
}
@keyframes invite-sidebar-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.invite-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.invite-sidebar__head h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
}
.invite-sidebar__close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
}
.invite-sidebar__hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.invite-sidebar__copy {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid rgba(240, 193, 75, 0.35);
    background: rgba(240, 193, 75, 0.08);
    color: var(--gold);
    font-weight: 600;
    cursor: pointer;
}
.invite-sidebar__msg {
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 8px;
}
.invite-sidebar__scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.invite-sidebar__section { margin-bottom: 16px; }
.invite-sidebar__section--offline { opacity: 0.72; }
.invite-sidebar__section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 8px;
}
.invite-sidebar__count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.65rem;
}
.invite-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.invite-sidebar__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.invite-sidebar__row--online { border-color: rgba(35, 165, 89, 0.2); }
.invite-sidebar__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.invite-sidebar__avatar-wrap .presence-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
}
.invite-sidebar__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.invite-sidebar__name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.invite-sidebar__score {
    font-size: 0.68rem;
    color: var(--muted);
}
.invite-sidebar__invite-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #041510;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}
.invite-sidebar__invite-btn:disabled {
    opacity: 0.55;
    cursor: default;
}
.invite-sidebar__invite-btn.is-sent {
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted);
}
.invite-sidebar__offline-tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}
.invite-sidebar__empty {
    font-size: 0.78rem;
    color: var(--muted);
    padding: 8px 0;
}
