/* ========================================
   墨韵幽境 — 无障碍增强
   ======================================== */

/* ── 减少动画偏好 ── */

@media (prefers-reduced-motion: reduce) {
    html:not(.dn-motion-preview) *,
    html:not(.dn-motion-preview) *::before,
    html:not(.dn-motion-preview) *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transform: none !important;
    }

    html:not(.dn-motion-preview) .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        will-change: auto !important;
    }

    html:not(.dn-motion-preview) .ink-bg-wash {
        animation: none !important;
    }
}

body.reduce-motion .scroll-reveal,
body.reduce-motion .scroll-reveal.scroll-reveal--visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
}

body.reduce-motion .ink-bg-wash {
    animation: none !important;
}

body.reduce-motion #global-bg {
    transform: none !important;
    will-change: auto !important;
}

body.reduce-motion .screen:not(#gameplay-screen) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.reduce-motion .scroll-reveal-stagger > .attr-item,
body.reduce-motion .scroll-reveal-stagger > .scroll-reveal-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ── 键盘焦点 ── */

*:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

@media (hover: none) and (pointer: coarse) {
    .option-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* ── GPU 加速 ── */

.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.option-card,
.ink-btn,
.character-panel,
.difficulty-card,
.tone-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}
