.viewer-country-panel {
    --bg-gold: #f1c232;
    --bg-gold-soft: rgba(241, 194, 50, 0.18);
    --bg-green: #31e37a;
    width: min(1180px, calc(100% - 28px));
    margin: 18px auto 28px;
    border: 1px solid rgba(241, 194, 50, 0.28);
    border-radius: 16px;
    background:
        radial-gradient(circle at 18% 0%, rgba(241, 194, 50, 0.08), transparent 35%),
        linear-gradient(180deg, rgba(20, 20, 18, 0.98), rgba(7, 7, 7, 0.99));
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: #fff;
    overflow: hidden;
}

.viewer-country-inner {
    display: grid;
    grid-template-columns: minmax(270px, 0.8fr) 1px minmax(400px, 1.5fr);
    align-items: center;
    gap: 24px;
    padding: 22px 26px;
}

.viewer-country-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.viewer-country-live-ring {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(49, 227, 122, 0.34);
    border-radius: 50%;
    background: rgba(49, 227, 122, 0.07);
    box-shadow: inset 0 0 18px rgba(49, 227, 122, 0.06);
}

.viewer-country-live-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #31e37a;
    box-shadow:
        0 0 0 5px rgba(49, 227, 122, 0.12),
        0 0 18px rgba(49, 227, 122, 0.65);
    animation: viewer-country-pulse 1.8s ease-in-out infinite;
}

.viewer-country-eyebrow,
.viewer-country-list-title {
    display: block;
    margin-bottom: 4px;
    color: #d8ae2d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.viewer-country-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1;
}

.viewer-country-number {
    color: #fff;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
}

.viewer-country-label {
    color: #fff6d3;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.viewer-country-subtitle {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    line-height: 1.35;
}

.viewer-country-divider {
    width: 1px;
    height: 68px;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(241, 194, 50, 0.38),
        transparent
    );
}

.viewer-country-breakdown {
    min-width: 0;
}

.viewer-country-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.viewer-country-chip {
    display: inline-grid;
    grid-template-columns: auto minmax(0, auto) auto;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 10px 7px 9px;
    border: 1px solid rgba(241, 194, 50, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.viewer-country-flag {
    font-size: 19px;
    line-height: 1;
}

.viewer-country-name {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.77);
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viewer-country-value {
    min-width: 25px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(49, 227, 122, 0.1);
    color: #67f3a1;
    font-size: 11px;
    font-weight: 950;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.viewer-country-empty {
    padding: 9px 12px;
    border: 1px dashed rgba(241, 194, 50, 0.18);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
}

.viewer-country-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 7px 18px;
    border-top: 1px solid rgba(241, 194, 50, 0.12);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.38);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.035em;
    text-align: center;
}

.viewer-country-panel.is-updating {
    opacity: 0.88;
}

.viewer-country-panel.has-error .viewer-country-live-dot {
    background: #ffb648;
    box-shadow: 0 0 0 5px rgba(255, 182, 72, 0.12);
    animation: none;
}

@keyframes viewer-country-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.16); opacity: 0.82; }
}

@media (max-width: 820px) {
    .viewer-country-panel {
        width: calc(100% - 18px);
        margin-top: 12px;
        border-radius: 13px;
    }

    .viewer-country-inner {
        grid-template-columns: 1fr;
        gap: 17px;
        padding: 18px;
    }

    .viewer-country-divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(241, 194, 50, 0.3),
            transparent
        );
    }

    .viewer-country-chip {
        flex: 1 1 145px;
    }
}

@media (max-width: 480px) {
    .viewer-country-summary {
        align-items: flex-start;
    }

    .viewer-country-live-ring {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .viewer-country-total {
        flex-direction: column;
        gap: 4px;
    }

    .viewer-country-number {
        font-size: 30px;
    }

    .viewer-country-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .viewer-country-chip {
        min-width: 0;
    }

    .viewer-country-name {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .viewer-country-live-dot {
        animation: none;
    }
}
