.lc-community-rating {
    --lc-rating-accent: #ff6a1e;
    --lc-rating-accent-soft: rgba(255, 106, 30, .48);
    --lc-rating-border: rgba(255, 106, 30, .28);
    --lc-rating-glow: rgba(255, 106, 30, .28);
    --lc-rating-surface: rgba(255, 106, 30, .08);
    --lc-rating-muted: #8d8d98;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.lc-community-rating[data-rating-theme="voice"] {
    --lc-rating-accent: #a78bfa;
    --lc-rating-accent-soft: rgba(167, 139, 250, .5);
    --lc-rating-border: rgba(139, 92, 246, .36);
    --lc-rating-glow: rgba(139, 92, 246, .3);
    --lc-rating-surface: rgba(139, 92, 246, .1);
}

.lc-community-rating[data-rating-mode="compact"] {
    align-items: center;
    display: inline-flex;
    min-height: 24px;
}

.lc-rating-compact {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    color: #d4d4d8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.lc-rating-compact-star {
    color: var(--lc-rating-accent);
    filter: drop-shadow(0 0 7px var(--lc-rating-glow));
    font-size: 14px;
}

.lc-rating-compact-count {
    color: var(--lc-rating-muted);
    font-weight: 700;
}

.lc-rating-panel {
    border: 1px solid var(--lc-rating-border);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--lc-rating-surface), rgba(12, 12, 12, .92) 48%);
    padding: 14px 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.lc-community-rating[data-rating-mode="full"] .lc-rating-panel {
    padding: 18px;
}

.lc-rating-heading {
    color: #a1a1aa;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.lc-rating-summary {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}

.lc-rating-average {
    color: #fff;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
}

.lc-rating-out-of,
.lc-rating-count {
    color: var(--lc-rating-muted);
    font-size: 11px;
    font-weight: 700;
}

.lc-rating-stars {
    align-items: center;
    display: flex;
    gap: 3px;
}

.lc-rating-star {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #4a4a50;
    cursor: pointer;
    display: inline-flex;
    font-size: 25px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: color .16s ease, filter .16s ease, transform .16s ease;
    width: 30px;
}

.lc-rating-star.is-average {
    color: var(--lc-rating-accent-soft);
}

.lc-rating-star.is-selected,
.lc-rating-star:hover,
.lc-rating-star:focus-visible,
.lc-rating-star:hover ~ .lc-rating-star.is-average {
    color: var(--lc-rating-accent);
}

.lc-rating-star:hover,
.lc-rating-star:focus-visible {
    filter: drop-shadow(0 0 8px var(--lc-rating-glow));
    outline: 1px solid var(--lc-rating-accent-soft);
    transform: translateY(-1px);
}

.lc-rating-star:disabled {
    cursor: wait;
    opacity: .55;
}

.lc-rating-foot {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    min-height: 18px;
}

.lc-rating-status,
.lc-rating-signin {
    color: var(--lc-rating-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.lc-rating-signin,
.lc-rating-clear {
    color: var(--lc-rating-accent);
}

.lc-rating-clear {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace;
    padding: 0;
}

.lc-rating-panel.is-saving {
    opacity: .72;
}

.lc-rating-panel.is-highlighted {
    border-color: var(--lc-rating-accent);
    box-shadow: 0 0 0 3px var(--lc-rating-surface), 0 0 24px var(--lc-rating-glow);
}

@media (hover: hover) {
    .lc-rating-stars:hover .lc-rating-star {
        color: #4a4a50;
    }

    .lc-rating-stars .lc-rating-star:hover,
    .lc-rating-stars .lc-rating-star:has(~ .lc-rating-star:hover) {
        color: var(--lc-rating-accent);
    }
}

@media (max-width: 560px) {
    .lc-rating-star {
        font-size: 23px;
        height: 38px;
        width: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lc-rating-panel,
    .lc-rating-star {
        transition: none;
    }
}

html.light .lc-community-rating {
    --lc-rating-accent: #c92f28;
    --lc-rating-accent-soft: rgba(201, 47, 40, .44);
    --lc-rating-border: rgba(201, 47, 40, .24);
    --lc-rating-glow: rgba(201, 47, 40, .18);
    --lc-rating-surface: rgba(201, 47, 40, .07);
    --lc-rating-muted: #64748b;
    color: #111827;
}

html.light .lc-community-rating[data-rating-theme="voice"] {
    --lc-rating-accent: #7c3aed;
    --lc-rating-accent-soft: rgba(124, 58, 237, .42);
    --lc-rating-border: rgba(124, 58, 237, .24);
    --lc-rating-glow: rgba(124, 58, 237, .16);
    --lc-rating-surface: rgba(124, 58, 237, .07);
}

html.light .lc-rating-compact {
    color: #334155;
}

html.light .lc-rating-panel {
    background: linear-gradient(135deg, var(--lc-rating-surface), #fff 52%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

html.light .lc-rating-heading,
html.light .lc-rating-status,
html.light .lc-rating-signin,
html.light .lc-rating-out-of,
html.light .lc-rating-count {
    color: var(--lc-rating-muted);
}

html.light .lc-rating-signin,
html.light .lc-rating-clear {
    color: var(--lc-rating-accent);
}

html.light .lc-rating-average {
    color: #111827;
}

html.light .lc-rating-star {
    color: #cbd5e1;
}

@media (hover: hover) {
    html.light .lc-rating-stars:hover .lc-rating-star {
        color: #cbd5e1;
    }
}
