/**
 * ACG Night Glass visual contract 1.3.1
 * Loaded after feature styles. This file deliberately enforces components
 * that must be pixel-consistent everywhere.
 */

html body .acg-ui-tag.acg-ui-tag,
html body .acgsl-tags.acgsl-tags > .acgsl-tag {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: var(--acg-ng-tag-height) !important;
    min-height: var(--acg-ng-tag-height) !important;
    max-height: var(--acg-ng-tag-height) !important;
    margin: 0 !important;
    padding: var(--acg-ng-tag-padding) !important;
    border: var(--acg-ng-border-standard) !important;
    border-radius: var(--acg-ng-radius-control) !important;
    background: var(--acg-ng-tag-bg) !important;
    box-shadow: none !important;
    color: var(--acg-ng-text-primary) !important;
    font: inherit !important;
    font-size: var(--acg-ng-tag-font-size) !important;
    font-weight: 500 !important;
    line-height: var(--acg-ng-line-tight) !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    white-space: nowrap !important;
    transition: color var(--acg-ng-transition-fast), border-color var(--acg-ng-transition-fast), background var(--acg-ng-transition-fast) !important;
}

html body .acg-ui-tag.acg-ui-tag:hover,
html body .acg-ui-tag.acg-ui-tag:focus-visible,
html body .acgsl-tags.acgsl-tags > .acgsl-tag:hover,
html body .acgsl-tags.acgsl-tags > .acgsl-tag:focus-visible {
    border-color: var(--acg-ng-tag-border-hover) !important;
    background: var(--acg-ng-tag-bg-hover) !important;
    color: var(--acg-ng-text-primary) !important;
    box-shadow: var(--acg-ng-shadow-focus) !important;
    outline: none !important;
    transform: none !important;
}

/* Excluded tags keep the canonical geometry and differ only by semantic color. */
html body .acg-ui-tag.acg-ui-tag.acg-ui-tag--exclude {
    border-color: var(--acg-ng-tag-exclude-border) !important;
    background: var(--acg-ng-tag-exclude-bg) !important;
    color: var(--acg-ng-tag-exclude-color) !important;
}

html body .acg-ui-tag.acg-ui-tag.acg-ui-tag--exclude:hover,
html body .acg-ui-tag.acg-ui-tag.acg-ui-tag--exclude:focus-visible {
    border-color: var(--acg-ng-tag-exclude-border) !important;
    background: var(--acg-ng-tag-exclude-bg-hover) !important;
    color: var(--acg-ng-tag-exclude-color) !important;
    box-shadow: var(--acg-ng-shadow-danger-focus) !important;
}

/* Composite tags use the same visible shell while allowing internal controls. */
html body .acg-ui-tag-frame.acg-ui-tag-frame {
    box-sizing: border-box !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: var(--acg-ng-tag-height) !important;
    min-height: var(--acg-ng-tag-height) !important;
    max-height: var(--acg-ng-tag-height) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: var(--acg-ng-border-standard) !important;
    border-radius: var(--acg-ng-radius-control) !important;
    background: var(--acg-ng-tag-bg) !important;
    box-shadow: none !important;
    color: var(--acg-ng-text-primary) !important;
    font: inherit !important;
    font-size: var(--acg-ng-tag-font-size) !important;
    font-weight: 500 !important;
    line-height: var(--acg-ng-line-tight) !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    transition: color var(--acg-ng-transition-fast), border-color var(--acg-ng-transition-fast), background var(--acg-ng-transition-fast), box-shadow var(--acg-ng-transition-fast) !important;
}

html body .acg-ui-tag-frame.acg-ui-tag-frame:hover,
html body .acg-ui-tag-frame.acg-ui-tag-frame:focus-within {
    border-color: var(--acg-ng-tag-border-hover) !important;
    background: var(--acg-ng-tag-bg-hover) !important;
    color: var(--acg-ng-text-primary) !important;
    box-shadow: var(--acg-ng-shadow-focus) !important;
    outline: none !important;
}

html body .acg-ui-tag-frame.acg-ui-tag-frame.acg-ui-tag--exclude {
    border-color: var(--acg-ng-tag-exclude-border) !important;
    background: var(--acg-ng-tag-exclude-bg) !important;
    color: var(--acg-ng-tag-exclude-color) !important;
}

html body .acg-ui-tag-frame.acg-ui-tag-frame.acg-ui-tag--exclude:hover,
html body .acg-ui-tag-frame.acg-ui-tag-frame.acg-ui-tag--exclude:focus-within {
    border-color: var(--acg-ng-tag-exclude-border) !important;
    background: var(--acg-ng-tag-exclude-bg-hover) !important;
    color: var(--acg-ng-tag-exclude-color) !important;
    box-shadow: var(--acg-ng-shadow-danger-focus) !important;
}

:where(.acgsl-tags) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--acg-ng-tag-gap) !important;
}

/*
 * Canonical report control.
 * Context plugins may own size, placement and visibility, but not its color,
 * background, focus treatment or interaction colors.
 */
:where(.acg-ui-report-control) {
    appearance: none !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--acg-ng-report) !important;
    -webkit-text-fill-color: currentColor !important;
    text-decoration: none !important;
    text-shadow: none !important;
    cursor: pointer !important;
    transition: color var(--acg-ng-transition-fast), opacity var(--acg-ng-transition-fast), transform var(--acg-ng-transition-fast) !important;
}

:where(.acg-ui-report-control):hover,
:where(.acg-ui-report-control):focus-visible {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--acg-ng-report-hover) !important;
    -webkit-text-fill-color: currentColor !important;
}

:where(.acg-ui-report-control):active {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--acg-ng-report-active) !important;
    -webkit-text-fill-color: currentColor !important;
    transform: translateY(1px) !important;
}

:where(.acg-ui-report-control):focus {
    outline: none !important;
}

:where(.acg-ui-report-control):focus-visible {
    outline: var(--acg-ng-border-width) solid var(--acg-ng-report-outline) !important;
    outline-offset: var(--acg-ng-focus-offset) !important;
    box-shadow: var(--acg-ng-report-focus-ring) !important;
}

:where(.acg-ui-report-control) :where(svg, span) {
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
}



/*
 * Canonical single-post title header.
 * Game, Comic, Video and Contraction share this complete shell. Feature
 * plugins own their content below the header, but not the title-header
 * surface, spacing, button geometry, typography or metrics placement.
 */
html body .acg-post-single.acg-post-single {
    box-sizing: border-box !important;
    width: min(92vw, 1680px) !important;
    max-width: min(92vw, 1680px) !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    margin-left: calc(50% - min(46vw, 840px)) !important;
    padding-top: clamp(12px, 1vw, 16px) !important;
}

html body .acg-post-hero.acg-post-hero {
    box-sizing: border-box !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 92px !important;
    margin-top: 0 !important;
    padding: clamp(14px, 1.6vw, 24px) clamp(16px, 2vw, 30px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: center !important;
    gap: clamp(18px, 3vw, 52px) !important;
    overflow: hidden !important;
    border: var(--acg-ng-border-standard) !important;
    border-radius: var(--acg-ng-radius-region) !important;
    background: var(--acg-ng-bg-feature) !important;
    box-shadow: var(--acg-ng-shadow-card) !important;
    -webkit-backdrop-filter: var(--acg-ng-backdrop) !important;
    backdrop-filter: var(--acg-ng-backdrop) !important;
    color: var(--acg-ng-text-primary) !important;
}

html body .acg-post-hero.acg-post-hero::after {
    display: none !important;
    content: none !important;
}

html body .acg-post-heading.acg-post-heading {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: clamp(10px, 1.2vw, 18px) !important;
}

html body .acg-post-titles.acg-post-titles {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    margin: 0 !important;
}

html body .acg-post-back.acg-post-back,
html body .acg-post-back.acg-post-back:hover,
html body .acg-post-back.acg-post-back:focus,
html body .acg-post-back.acg-post-back:focus-visible,
html body .acg-post-back.acg-post-back:active,
html body .acg-post-back.acg-post-back:visited {
    box-sizing: border-box !important;
    appearance: none !important;
    flex: 0 0 42px !important;
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: var(--acg-ng-border-standard) !important;
    border-radius: var(--acg-ng-radius-card) !important;
    background: var(--acg-ng-bg-control) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--acg-ng-text-secondary) !important;
    -webkit-text-fill-color: currentColor !important;
    cursor: pointer !important;
    transform: none !important;
    transition: color var(--acg-ng-transition-normal), border-color var(--acg-ng-transition-normal), background var(--acg-ng-transition-normal), transform var(--acg-ng-transition-normal) !important;
}

html body .acg-post-back.acg-post-back:hover,
html body .acg-post-back.acg-post-back:focus-visible {
    border-color: var(--acg-ng-border-accent) !important;
    background: var(--acg-ng-bg-control-hover) !important;
    color: var(--acg-ng-text-primary) !important;
    outline: none !important;
    box-shadow: var(--acg-ng-shadow-focus) !important;
    transform: translateX(-2px) !important;
}

html body .acg-post-back.acg-post-back:active {
    border-color: var(--acg-ng-border-accent) !important;
    background: var(--acg-ng-bg-control-active) !important;
    color: var(--acg-ng-text-primary) !important;
    box-shadow: none !important;
    transform: translate(-1px, 1px) !important;
}

html body .acg-post-back.acg-post-back svg,
html body .acg-post-back.acg-post-back .acg-post-back-icon {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    vector-effect: non-scaling-stroke !important;
    pointer-events: none !important;
}

html body .acg-post-title.acg-post-title {
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--acg-ng-text-primary) !important;
    -webkit-text-fill-color: currentColor !important;
    font-family: inherit !important;
    font-size: var(--acg-ng-font-heading) !important;
    font-weight: 650 !important;
    line-height: 1.22 !important;
    letter-spacing: -.015em !important;
    text-align: left !important;
    text-shadow: var(--acg-ng-text-shadow) !important;
    text-wrap: pretty !important;
    overflow-wrap: anywhere !important;
}

html body .acg-post-subtitle.acg-post-subtitle {
    min-height: 0 !important;
    margin: 4px 0 0 !important;
    color: var(--acg-ng-text-secondary) !important;
    -webkit-text-fill-color: currentColor !important;
    font-family: inherit !important;
    font-size: var(--acg-ng-font-body) !important;
    font-weight: 430 !important;
    line-height: 1.4 !important;
    letter-spacing: .01em !important;
    text-shadow: none !important;
    overflow-wrap: anywhere !important;
}

html body .acg-post-subtitle.acg-post-subtitle.is-empty {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
}

html body .acg-post-metrics.acg-post-metrics {
    box-sizing: border-box !important;
    align-self: center !important;
    justify-self: end !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body .acg-post-metrics.acg-post-metrics .acg-post-metric-bar,
html body .acg-post-metrics.acg-post-metrics .acg-post-metric-bar-lite {
    width: max-content !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    justify-content: flex-start !important;
}

@media (max-width: 900px) {
    html body .acg-post-hero.acg-post-hero {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 12px !important;
    }

    html body .acg-post-metrics.acg-post-metrics {
        justify-self: start !important;
        width: calc(100% - 52px) !important;
        max-width: calc(100% - 52px) !important;
        margin-left: 52px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
    }

    html body .acg-post-metrics.acg-post-metrics::-webkit-scrollbar {
        display: none !important;
    }
}

@media (max-width: 600px) {
    html body .acg-post-single.acg-post-single {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        margin-top: 0 !important;
        margin-right: 0 !important;
        margin-left: calc(50% - 50vw + 8px) !important;
        padding-top: 8px !important;
    }

    html body .acg-post-hero.acg-post-hero {
        min-height: 0 !important;
        padding: 13px 14px !important;
        border-radius: var(--acg-ng-radius-region) !important;
        gap: 10px !important;
    }

    html body .acg-post-heading.acg-post-heading {
        align-items: flex-start !important;
        gap: 10px !important;
    }

    html body .acg-post-back.acg-post-back,
    html body .acg-post-back.acg-post-back:hover,
    html body .acg-post-back.acg-post-back:focus,
    html body .acg-post-back.acg-post-back:focus-visible,
    html body .acg-post-back.acg-post-back:active,
    html body .acg-post-back.acg-post-back:visited {
        flex-basis: 38px !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
    }

    html body .acg-post-back.acg-post-back svg,
    html body .acg-post-back.acg-post-back .acg-post-back-icon {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
    }

    html body .acg-post-title.acg-post-title {
        font-size: var(--acg-ng-font-heading) !important;
        line-height: 1.24 !important;
    }

    html body .acg-post-subtitle.acg-post-subtitle {
        margin-top: 3px !important;
        font-size: var(--acg-ng-font-small) !important;
        line-height: 1.4 !important;
    }

    html body .acg-post-metrics.acg-post-metrics {
        width: calc(100% - 48px) !important;
        max-width: calc(100% - 48px) !important;
        margin-left: 48px !important;
    }
}

/* -------------------------------------------------------------------------
 * Shared internal scrollbar contract
 *
 * Mirrors the established page scrollbar: a 6px pale-blue thumb, transparent
 * track, low opacity at the top, and a fully highlighted thumb after scroll.
 * Feature plugins only add `ccc-widget-scrollbars` and update
 * `--ccc-scrollbar-thumb`; they do not own scrollbar colors or geometry.
 * ---------------------------------------------------------------------- */
html body :is(.ccc-widget-scrollbars, .ccc-widget-scrollbars *) {
    scrollbar-width: thin !important;
    scrollbar-color: var(--ccc-scrollbar-thumb, var(--acg-ng-scrollbar-thumb)) transparent !important;
}

html body :is(.ccc-widget-scrollbars, .ccc-widget-scrollbars *)::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

html body :is(.ccc-widget-scrollbars, .ccc-widget-scrollbars *)::-webkit-scrollbar-track,
html body :is(.ccc-widget-scrollbars, .ccc-widget-scrollbars *)::-webkit-scrollbar-track-piece {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html body :is(.ccc-widget-scrollbars, .ccc-widget-scrollbars *)::-webkit-scrollbar-thumb {
    min-width: 6px !important;
    min-height: 48px !important;
    border: 0 !important;
    border-radius: var(--acg-ng-radius-pill) !important;
    background: var(--ccc-scrollbar-thumb, var(--acg-ng-scrollbar-thumb)) !important;
    background-clip: padding-box !important;
    box-shadow: none !important;
}

html body :is(.ccc-widget-scrollbars, .ccc-widget-scrollbars *)::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

html body :is(.ccc-widget-scrollbars, .ccc-widget-scrollbars *)::-webkit-scrollbar-corner {
    background: transparent !important;
}

