/* ===== App layer (PWA) =====
   移动端 PWA 微调，加载在 responsive.css 之后。
   只补充浏览器与原生 App 的差异，不改变现有布局。 */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 关掉下拉刷新与滚动链回弹 */
html,
body {
    overscroll-behavior-y: contain;
}

body {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 交互控件长按不弹出系统菜单，避免误触复制 */
button,
.btn,
.tab-btn,
.chip,
.stats-toggle,
.section-toggle,
.chart-expand-btn,
.modal__close {
    -webkit-touch-callout: none;
}

/* iOS：弹窗与搜索框字号提到 16px，聚焦时页面不会被自动放大。
   表格内的紧凑输入框保持原尺寸，避免撑破列宽。 */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .modal .form-input,
        .modal .form-select,
        .modal textarea,
        .search-input {
            font-size: 1rem;
        }
    }
}

/* 独立窗口：让过滚动区域也使用主题底色 */
@media (display-mode: standalone) {
    html {
        background: var(--color-bg);
    }
}
