.encore-sr-only,
.encore-a11y-live {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.encore-game-shell :where(button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible,
.encore-audio-settings :where(button, input):focus-visible,
.encore-context-pane :where(button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--encore-color-primary) 75%, white);
    outline-offset: 2px;
}

.encore-game-shell :where(button, a[href], input, select, textarea) {
    min-block-size: 28px;
}

.encore-decision-field[data-encore-field-state="rejected"] .encore-decision-control,
.encore-decision-field[data-encore-field-state="adjusted"] .encore-decision-control,
.encore-decision-field:has([data-encore-field-validation][data-level="error"]:not([hidden])) .encore-decision-control {
    border-style: solid;
    border-width: 2px;
}

.encore-a11y-chart-alternative {
    margin-top: var(--encore-space-sm);
}

@media (prefers-reduced-motion: reduce) {
    .encore-game-shell *,
    .encore-game-shell *::before,
    .encore-game-shell *::after,
    .encore-audio-settings,
    .encore-context-pane {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

@media (forced-colors: active) {
    .encore-status-chip,
    .encore-kpi-chip,
    .encore-adaptive-card,
    .encore-context-pane,
    .encore-audio-settings,
    .encore-decision-control,
    .encore-decision-action {
        forced-color-adjust: auto;
    }
}

/* Accessible browser zoom/text enlargement may reflow. Normal 1366x768 gameplay remains no-scroll. */
@media (max-width: 1024px), (max-height: 640px) {
    html.encore-gameplay-page,
    body.encore-gameplay-page {
        min-height: 100%;
        overflow: auto;
    }

    .encore-game-shell {
        height: auto;
        min-height: 100dvh;
        grid-template-rows: auto auto minmax(420px, auto) auto;
        overflow: visible;
    }

    .encore-game-status {
        grid-template-columns: 1fr;
        min-height: 44px;
        padding-block: 6px;
    }

    .encore-game-status__cluster {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .encore-decision-context {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .encore-critical-indicators {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .encore-gameplay-stage {
        min-height: 420px;
        overflow: visible;
    }

    .encore-primary-workspace {
        overflow: visible;
    }
}


.encore-a11y-chart-alternative > summary {
    cursor: pointer;
    font-size: var(--encore-font-meta);
    font-weight: 700;
}

.encore-a11y-chart-alternative__table-wrap {
    max-width: 100%;
    margin-top: 6px;
    overflow-x: auto;
}

.encore-a11y-chart-alternative table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--encore-font-table);
}

.encore-a11y-chart-alternative caption {
    padding: 4px 0;
    font-weight: 700;
    text-align: left;
}

.encore-a11y-chart-alternative th,
.encore-a11y-chart-alternative td {
    padding: 4px 6px;
    border-bottom: var(--encore-border-width) solid var(--encore-color-border);
    text-align: left;
}
