:root {
        --acg-rating-text: var(--acg-ng-rating-engine-text);
        --acg-rating-muted: var(--acg-ng-rating-engine-muted);
        --acg-rating-community: var(--acg-ng-rating-engine-community);
        --acg-rating-user: var(--acg-ng-rating-engine-user);
        --acg-rating-hover: var(--acg-ng-rating-engine-hover);
        --acg-rating-cancel: var(--acg-ng-rating-engine-cancel);
        --acg-rating-neutral: var(--acg-ng-rating-engine-neutral);
        --acg-rating-line: var(--acg-ng-rating-engine-line);
        --acg-rating-surface: var(--acg-ng-rating-engine-surface);
        --acg-rating-shadow: var(--acg-ng-rating-engine-shadow);
    }

    .acg-rating {
        box-sizing: border-box;
        color: var(--acg-rating-text);
        font-family: inherit;
    }

    .acg-rating *,
    .acg-rating *::before,
    .acg-rating *::after {
        box-sizing: inherit;
    }

    .acg-rating-star-svg {
        display: block;
        width: 1em;
        height: 1em;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.65;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .acg-rating-star-svg.is-filled {
        fill: currentColor;
        stroke: currentColor;
    }

    /* Compact loop mode. It never intercepts card clicks. */
    .acg-rating--compact {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        gap: 7px;
        color: var(--acg-rating-muted);
        font-size: 13px;
        line-height: 1.3;
        white-space: nowrap;
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .acg-rating__compact-community,
    .acg-rating__compact-user {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        gap: 4px;
    }

    .acg-rating__compact-community {
        color: var(--acg-rating-muted);
    }

    .acg-rating__compact-community > .acg-rating-star-svg {
        color: var(--acg-rating-community);
    }

    .acg-rating__compact-score {
        color: var(--acg-rating-community);
        font-weight: 680;
        font-variant-numeric: tabular-nums;
    }

    .acg-rating__compact-meta {
        color: var(--acg-rating-muted);
    }

    .acg-rating__compact-user {
        color: var(--acg-rating-muted);
    }

    .acg-rating__compact-user > .acg-rating-star-svg {
        color: var(--acg-rating-user);
    }

    .acg-rating__compact-separator {
        width: 1px;
        height: 12px;
        background: var(--acg-rating-line);
    }

    .acg-rating--compact .acg-rating-star-svg {
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
    }

    .acg-rating__compact-empty {
        color: var(--acg-rating-muted);
    }

    /* Interactive single-post mode. The community score is always below. */
    .acg-rating--interactive,
    .acg-rating--interactive.is-stacked {
        position: relative;
        display: inline-grid;
        justify-items: start;
        align-items: start;
        gap: 6px;
        min-width: 0;
        width: max-content;
        max-width: 100%;
    }

    .acg-rating__stars {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0;
        min-width: 0;
    }

    .acg-rating .acg-rating__star-button,
    .acg-rating .acg-rating__star-button:hover,
    .acg-rating .acg-rating__star-button:focus,
    .acg-rating .acg-rating__star-button:active {
        all: unset;
        box-sizing: border-box;
        display: inline-grid !important;
        place-items: center;
        width: 40px;
        height: 51px;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        color: inherit;
        box-shadow: none !important;
        outline: 0 !important;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }

    .acg-rating__star-visual {
        position: relative;
        display: block;
        width: 46px;
        height: 46px;
        transform-origin: center;
        transition: transform .12s ease;
    }

    .acg-rating__star-visual > .acg-rating-star-svg,
    .acg-rating__star-fill-clip {
        position: absolute;
        inset: 0;
        display: block;
        width: 46px;
        height: 46px;
    }

    .acg-rating__star-fill-clip {
        z-index: 1;
        width: var(--acg-community-fill, 0%);
        overflow: hidden;
        pointer-events: none;
    }

    .acg-rating__star-fill-clip .acg-rating-star-svg {
        display: block;
        width: 46px;
        height: 46px;
        max-width: none;
    }

    .acg-rating__star-community-fill {
        color: var(--acg-rating-community);
        fill: currentColor;
        stroke: currentColor;
        stroke-width: 1.15;
    }

    .acg-rating__star-base-outline {
        z-index: 2;
        color: var(--acg-rating-neutral);
        fill: none;
        stroke: currentColor;
        stroke-width: 1.55;
    }

    .acg-rating__star-user-outline {
        z-index: 3;
        color: transparent;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.15;
        filter: none;
        transition: color .11s ease, stroke-width .11s ease, filter .11s ease;
    }

    /* The community average owns the fill. The user's rating is outline only. */
    .acg-rating__star-button.is-user-marked .acg-rating__star-user-outline {
        color: var(--acg-rating-user);
    }

    /* Hover/focus previews only strengthen the star-shaped outline. */
    .acg-rating__star-button.is-preview .acg-rating__star-user-outline,
    .acg-rating__star-button:focus-visible .acg-rating__star-user-outline {
        color: var(--acg-rating-hover);
        stroke-width: 2.65;
        filter: drop-shadow(0 0 3px rgba(var(--acg-ng-rating-engine-hover-rgb), .20));
    }

    /* Hovering the exact saved score previews cancellation. */
    .acg-rating__star-button.is-cancel-preview .acg-rating__star-user-outline {
        color: var(--acg-rating-cancel);
        stroke-width: 2.45;
        filter: drop-shadow(0 0 2px rgba(var(--acg-ng-rating-engine-cancel-rgb), .12));
    }

    .acg-rating__star-button.is-preview .acg-rating__star-visual,
    .acg-rating__star-button.is-cancel-preview .acg-rating__star-visual,
    .acg-rating__star-button:focus-visible .acg-rating__star-visual {
        transform: scale(1.012);
    }

    .acg-rating__star-button.is-locked {
        pointer-events: none;
    }

    .acg-rating__summary-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
    }

    .acg-rating .acg-rating__summary,
    .acg-rating .acg-rating__summary:hover,
    .acg-rating .acg-rating__summary:focus,
    .acg-rating .acg-rating__summary:active {
        all: unset;
        box-sizing: border-box;
        display: inline-flex !important;
        align-items: center;
        min-height: 32px;
        margin: 0 !important;
        padding: 1px 2px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: var(--acg-rating-muted);
        font: inherit;
        font-size: 18px;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        box-shadow: none !important;
        outline: 0 !important;
        -webkit-tap-highlight-color: transparent;
    }

    .acg-rating__summary:focus-visible .acg-rating__summary-content {
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 4px;
    }

    .acg-rating__summary[disabled] {
        cursor: default;
        opacity: .78;
    }

    .acg-rating__summary-content {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 22px;
        line-height: 1;
    }

    .acg-rating__community-star {
        display: inline-grid;
        place-items: center;
        width: 21px;
        height: 21px;
        color: var(--acg-rating-community);
        flex: 0 0 21px;
    }

    .acg-rating__community-star .acg-rating-star-svg {
        display: block;
        width: 21px;
        height: 21px;
    }

    .acg-rating__summary-score {
        display: inline-flex;
        align-items: center;
        color: var(--acg-rating-community);
        font-size: 19px;
        font-weight: 680;
        font-variant-numeric: tabular-nums;
        line-height: 1;
    }

    .acg-rating__summary-dot,
    .acg-rating__summary-count,
    .acg-rating__summary-empty {
        display: inline-flex;
        align-items: center;
        color: var(--acg-rating-muted);
        font-size: 17px;
        line-height: 1;
    }

    .acg-rating__chevron {
        display: block;
        width: 14px;
        height: 14px;
        margin-left: 6px;
        color: rgba(var(--acg-ng-rating-engine-muted-rgb), .84);
        transition: transform .16s ease;
    }

    .acg-rating__summary-wrap.is-open .acg-rating__chevron {
        transform: rotate(180deg);
    }

    /* The distribution is portalled to <body>, so Elementor overflow cannot crop row 1. */
    .acg-rating__distribution {
        position: fixed;
        z-index: 999999;
        left: 0;
        top: 0;
        display: block;
        width: min(310px, calc(100vw - 24px));
        padding: 13px 14px;
        border: 1px solid var(--acg-rating-line);
        border-radius: 14px;
        background: var(--acg-rating-surface);
        box-shadow: var(--acg-rating-shadow);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-4px);
        transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
    }

    .acg-rating__distribution.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .acg-rating__distribution-row {
        display: grid;
        grid-template-columns: 30px minmax(100px, 1fr) 40px 34px;
        align-items: center;
        gap: 8px;
        min-height: 27px;
        color: var(--acg-rating-muted);
        font-size: 13px;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    .acg-rating__distribution-row + .acg-rating__distribution-row {
        margin-top: 3px;
    }

    .acg-rating__distribution-label {
        color: var(--acg-rating-muted);
    }

    .acg-rating__distribution-track {
        position: relative;
        height: 7px;
        overflow: hidden;
        border-radius: 999px;
        background: var(--acg-ng-rating-engine-track);
    }

    .acg-rating__distribution-fill {
        display: block;
        width: var(--acg-rating-width, 0%);
        height: 100%;
        border-radius: inherit;
        background: var(--acg-rating-community);
        opacity: .78;
        transition: width .2s ease;
    }

    .acg-rating__distribution-percent,
    .acg-rating__distribution-count {
        text-align: right;
    }

    .acg-rating-login-hint {
        position: fixed;
        z-index: 1000000;
        left: 0;
        top: 0;
        display: block;
        padding: 5px 8px;
        border: 1px solid var(--acg-rating-line);
        border-radius: 7px;
        background: var(--acg-ng-rating-engine-tooltip-bg);
        color: var(--acg-rating-text);
        box-shadow: var(--acg-ng-rating-engine-tooltip-shadow);
        font-size: 11px;
        line-height: 1;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate(-50%, calc(-100% - 11px));
        transition: opacity .1s ease, visibility .1s ease;
    }

    .acg-rating-login-hint.is-visible {
        opacity: 1;
        visibility: visible;
    }

    @media (max-width: 520px) {
        .acg-rating .acg-rating__star-button,
        .acg-rating .acg-rating__star-button:hover,
        .acg-rating .acg-rating__star-button:focus,
        .acg-rating .acg-rating__star-button:active {
            width: 37px;
            height: 47px;
        }

        .acg-rating__star-visual,
        .acg-rating__star-visual > .acg-rating-star-svg,
        .acg-rating__star-fill-clip .acg-rating-star-svg {
            width: 42px;
            height: 42px;
        }

        /* Preserve the fractional community-fill width on mobile.
         * Setting this element to 42px makes every star appear fully filled. */
        .acg-rating__star-fill-clip {
            width: var(--acg-community-fill, 0%);
            height: 42px;
        }

        .acg-rating .acg-rating__summary,
        .acg-rating .acg-rating__summary:hover,
        .acg-rating .acg-rating__summary:focus,
        .acg-rating .acg-rating__summary:active {
            font-size: 17px;
        }

        .acg-rating__summary-score {
            font-size: 18px;
        }

        .acg-rating__summary-dot,
        .acg-rating__summary-count,
        .acg-rating__summary-empty {
            font-size: 16px;
        }

        .acg-rating__distribution-row {
            grid-template-columns: 29px minmax(78px, 1fr) 38px 30px;
            gap: 7px;
            font-size: 12px;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .acg-rating *,
        .acg-rating *::before,
        .acg-rating *::after,
        .acg-rating-login-hint {
            transition-duration: .001ms !important;
            animation-duration: .001ms !important;
        }
    }
