/* 2026-09-02 候选终审修复：短横屏、弱操作触控尺寸、反馈焦点与深色导航。 */
.attempt-skip-btn {
    min-height: 44px;
    min-width: max-content;
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 430px) {
    .learn-progress {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 7px;
    }
    .learn-progress-left { flex: 1 0 100%; }
    .learn-progress .arrow-group {
        display: grid;
        grid-template-columns: minmax(96px, 1fr) 44px 44px;
        width: 100%;
    }
    .learn-progress .btn-arrow { min-width: 44px; min-height: 44px; }
    .attempt-actions { flex-wrap: nowrap; }
    .attempt-actions .attempt-hint-btn { min-width: 0; flex: 1 1 auto; }
}

/* 短横屏保持应用壳本身不增长；唯一主面板承担纵向滚动，键盘可滚动到视口内。 */
@media (max-height: 500px) and (max-width: 900px) {
    html, body { height: 100%; min-height: 0; }
    body { height: 100dvh; overflow: hidden; }
    .app { height: 100dvh; min-height: 0; overflow: hidden; }
    #panels { flex: 1 1 0; min-height: 0; overflow: hidden; }
    .panel.mode-panel {
        flex: 1 1 0;
        min-height: 0;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .mode-panel .mode-card { flex: 0 0 auto; min-height: 0; }
    .mode-panel .kb-area { margin-top: 8px; }
    .card-top { min-height: 0; }
}

/* 焦点进入反馈结论时保留清晰可见的非颜色提示。 */
.fb-title[data-modal-initial]:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
    .tabbar .tab-btn { color: #c9d8d3; }
    .tabbar .tab-btn span { color: inherit; }
    .tabbar .tab-btn.active {
        color: #e5eeff;
        background: #26445c;
    }
    .tabbar .tab-btn.active span { color: inherit; }
    .tabbar .tab-btn.active::before { background: #9fc0ff; }
}
