/* B03（F12）：可读性 / 触控目标 / 放大重排 —— 只做"加法"的最后一层样式。
   加载顺序：base.html 中位于所有样式表与页面资源之后，同优先级下覆盖前面的声明。
   范围：① 关键操作可点面积 ≥44px、文字 ≥14px；② 触屏/窄屏辅助文字下限 12px；
        ③ 放大模式（100%→150%）下结算主按钮吸底，字段不被遮挡。
   不改变任何业务口径、权限、记账与 URL；不含外链、@import 或脚本；
   打印（小票/交班单）恢复静态排版，不跟随屏幕缩放。 */

/* ── 1. 关键操作：可点面积与文字（触屏与鼠标同口径，避免"手机点不准"） ── */
.button { min-height: 44px; font-size: 14px; }
.button.small { min-height: 44px; }  /* style.css 的 34px 特异性更高，须同层覆盖 */
.account-action { min-height: 44px; padding: 0 16px; }
.consume-action { min-height: 44px; }
.dialog-close-form button { min-width: 44px; min-height: 44px; }
.text-size-button { height: auto; min-height: 44px; }
.fullscreen-toggle { min-height: 44px; }
.sale-item-row-action, .sale-item-add { min-height: 44px; }
.card-redeem-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; }
.price-save { min-height: 44px; }  /* style.css 32px，行内改价是高频触屏操作（独立核查补充） */

/* ── 2. 触屏 / 窄屏：行内文字按钮也做成 ≥44px 的可点区域 ── */
@media (max-width: 1100px), (any-pointer: coarse) {
  .text-button, .picker-action, .picker-option, .picker-empty,
  .side-subnav a, .bottom-nav a, .mobile-header-actions a, .mobile-header-actions button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px;
  }
  .text-button { border-radius: 8px; }
  .picker-option, .picker-action, .picker-empty { width: 100%; justify-content: flex-start; }
}

/* ── 3. 触屏 / 窄屏辅助文字下限 12px（清单见下，漂移由测试守卫） ── */
@media (max-width: 1100px), (any-pointer: coarse) {
  /* B03-TOUCH-FLOOR-BEGIN 11.5px 及以下 → 12px；新增选择器请同步 style.css 与本清单 */
  .account-after small { font-size: 12px; }
  .account-after small { font-size: 12px; }
  .account-identity div > span { font-size: 12px; }
  .account-identity small { font-size: 12px; }
  .account-number > span { font-size: 12px; }
  .account-number em { font-size: 12px; }
  .account-number strong small { font-size: 12px; }
  .account-status { font-size: 12px; }
  .audit-list p { font-size: 12px; }
  .audit-list small { font-size: 12px; }
  .backup-tip p { font-size: 12px; }
  .backup-tip strong { font-size: 12px; }
  .birthday-list b { font-size: 12px; }
  .birthday-list small { font-size: 12px; }
  .bottom-nav a { font-size: 12px; }
  .brand small { font-size: 12px; }
  .callback-route-list span { font-size: 12px; }
  .card-ledger-icon { font-size: 12px; }
  .card-ledger-main small { font-size: 12px; }
  .card-ledger-title { font-size: 12px; }
  .card-row-expiry .expiring-soon { font-size: 12px; }
  .card-status { font-size: 12px; }
  .cardtype-card .cardtype-fields label { font-size: 12px; }
  .cardtype-card label.cardtype-deposit { font-size: 12px; }
  .cardtype-edit-button { font-size: 12px; }
  .cardtype-existing-title { font-size: 12px; }
  .cardtype-fields { font-size: 12px; }
  .cardtype-fields .input-affix span { font-size: 12px; }
  .cardtype-summary { font-size: 12px; }
  .category-state { font-size: 12px; }
  .channel-segments legend { font-size: 12px; }
  .choice-card small { font-size: 12px; }
  .consume-amount-row .quick-amounts button { font-size: 12px; }
  .consume-preview { font-size: 12px; }
  .consume-preview-head strong { font-size: 12px; }
  .consume-preview.compact small { font-size: 12px; }
  .consume-split-grid > span { font-size: 12px; }
  .consume-split-grid b { font-size: 12px; }
  .coupon-status { font-size: 12px; }
  .credential-card-title > em { font-size: 12px; }
  .credential-card-title > span { font-size: 12px; }
  .credential-card-title p { font-size: 12px; }
  .credential-fields .secret-input small { font-size: 12px; }
  .credential-fields label { font-size: 12px; }
  .credential-progress span { font-size: 12px; }
  .danger-panel p { font-size: 12px; }
  .data-overview small { font-size: 12px; }
  .data-overview span { font-size: 12px; }
  .data-table th { font-size: 12px; }
  .database-path { font-size: 12px; }
  .download-card > span { font-size: 12px; }
  .download-card b { font-size: 12px; }
  .download-card small { font-size: 12px; }
  .download-card strong { font-size: 12px; }
  .empty-state p { font-size: 12px; }
  .error-page p { font-size: 12px; }
  .eyebrow { font-size: 12px; }
  .field-caption { font-size: 12px; }
  .field-guidance { font-size: 12px; }
  .field-hint { font-size: 12px; }
  .form-panel label { font-size: 12px; }
  .gift-level-grid b { font-size: 12px; }
  .gift-level-grid small { font-size: 12px; }
  .header-actions .button { font-size: 12px; }
  .identity-card > div > span { font-size: 12px; }
  .identity-card p { font-size: 12px; }
  .industry-preset small { font-size: 12px; }
  .industry-preset strong { font-size: 12px; }
  .inline-alert { font-size: 12px; }
  .inventory-edit[open] .field-hint { font-size: 12px; }
  .inventory-edit[open] .inventory-form .inventory-section-title { font-size: 12px; }
  .inventory-edit[open] .inventory-grid label { font-size: 12px; }
  .inventory-edit[open] .inventory-inline label { font-size: 12px; }
  .inventory-filter label { font-size: 12px; }
  .inventory-grid label { font-size: 12px; }
  .inventory-inline label { font-size: 12px; }
  .inventory-table td small { font-size: 12px; }
  .inventory-table td::before { font-size: 12px; }
  .key-upload-grid input[type="file"] { font-size: 12px; }
  .key-upload-grid input[type="file"]::file-selector-button { font-size: 12px; }
  .key-upload-grid label { font-size: 12px; }
  .key-upload-grid small { font-size: 12px; }
  .ledger-count { font-size: 12px; }
  .ledger-filter { font-size: 12px; }
  .level-badge { font-size: 12px; }
  .level-choice small { font-size: 12px; }
  .level-line b { font-size: 12px; }
  .level-line small { font-size: 12px; }
  .level-rule-row .sold-lock { font-size: 12px; }
  .license-line { font-size: 12px; }
  .login-form label { font-size: 12px; }
  .login-tip { font-size: 12px; }
  .member-cell em { font-size: 12px; }
  .member-cell small { font-size: 12px; }
  .member-info-footer p { font-size: 12px; }
  .member-info-metrics dd > span { font-size: 12px; }
  .member-info-preview-labels { font-size: 12px; }
  .member-notes p { font-size: 12px; }
  .member-notes span { font-size: 12px; }
  .member-table td::before { font-size: 12px; }
  .member-wallet-explanation { font-size: 12px; }
  .member-wallet-level { font-size: 12px; }
  .member-wallet-split dd small { font-size: 12px; }
  .member-wallet-split dt { font-size: 12px; }
  .metric-card p { font-size: 12px; }
  .metric-label { font-size: 12px; }
  .metric-strip .strip-item em { font-size: 12px; }
  .metric-strip .strip-item small { font-size: 12px; }
  .metric-strip .strip-item strong small { font-size: 12px; }
  .metric-strip .strip-label { font-size: 12px; }
  .mini-seal { font-size: 12px; }
  .note-cell small { font-size: 12px; }
  .operation-form > label > span { font-size: 12px; }
  .operation-form label { font-size: 12px; }
  .operator small { font-size: 12px; }
  .pagination { font-size: 12px; }
  .password-input { font-size: 12px; }
  .path-text { font-size: 12px; }
  .payment-award { font-size: 12px; }
  .payment-breakdown dl > div { font-size: 12px; }
  .payment-common-card > label { font-size: 12px; }
  .payment-config-locked p { font-size: 12px; }
  .payment-confirm-card label { font-size: 12px; }
  .payment-confirm-card p { font-size: 12px; }
  .payment-methods b { font-size: 12px; }
  .payment-methods legend { font-size: 12px; }
  .payment-methods small { font-size: 12px; }
  .payment-note { font-size: 12px; }
  .payment-provider-row > div small { font-size: 12px; }
  .payment-provider-row > em { font-size: 12px; }
  .payment-provider-row > p { font-size: 12px; }
  .payment-qr-wrap small { font-size: 12px; }
  .payment-redirect { font-size: 12px; }
  .payment-result p { font-size: 12px; }
  .payment-split em { font-size: 12px; }
  .payment-split small { font-size: 12px; }
  .payment-vault-location { font-size: 12px; }
  .payment-waiting { font-size: 12px; }
  .permission-list li { font-size: 12px; }
  .permission-list li span { font-size: 12px; }
  .picker-empty { font-size: 12px; }
  .picker-option small { font-size: 12px; }
  .picker-selected { font-size: 12px; }
  .plain-member small { font-size: 12px; }
  .plugin-history-list small { font-size: 12px; }
  .plugin-name p { font-size: 12px; }
  .plugin-status { font-size: 12px; }
  .preview-strip > span { font-size: 12px; }
  .profile-list > div { font-size: 12px; }
  .profit-legacy { font-size: 12px; }
  .quick-amounts button { font-size: 12px; }
  .recovery-codes .recovery-code { font-size: 12px; }
  .review-history-table td small { font-size: 12px; }
  .review-history-table td::before { font-size: 12px; }
  .review-order .dialog-heading code { font-size: 12px; }
  .review-order h3 small { font-size: 12px; }
  .review-order-amount span { font-size: 12px; }
  .review-password span { font-size: 12px; }
  .review-reason { font-size: 12px; }
  .role-badge { font-size: 12px; }
  .role-hint { font-size: 12px; }
  .role-ribbon { font-size: 12px; }
  .role-stamp small { font-size: 12px; }
  .rule-block small { font-size: 12px; }
  .rule-block strong { font-size: 12px; }
  .sale-item-candidates-more { font-size: 12px; }
  .sale-items-actions-note { font-size: 12px; }
  .section-title p { font-size: 12px; }
  .settings-form > label { font-size: 12px; }
  .settings-nav a > span { font-size: 12px; }
  .settings-nav small { font-size: 12px; }
  .settings-nav strong { font-size: 12px; }
  .settlement-state { font-size: 12px; }
  .sidebar-version { font-size: 12px; }
  .sleep-badge { font-size: 12px; }
  .sleep-days-inline span { font-size: 12px; }
  .soft-label { font-size: 12px; }
  .sold-badge { font-size: 12px; }
  .staff-edit-grid label { font-size: 12px; }
  .staff-main em { font-size: 12px; }
  .staff-main small { font-size: 12px; }
  .status-pill { font-size: 12px; }
  .store-metrics .strip-item em { font-size: 12px; }
  .strategy-example > span { font-size: 12px; }
  .strategy-example p { font-size: 12px; }
  .strategy-formula { font-size: 12px; }
  .strategy-option label.sleep-days-inline span { font-size: 12px; }
  .strategy-option small { font-size: 12px; }
  .strategy-option strong { font-size: 12px; }
  .strategy-sequence { font-size: 12px; }
  .strategy-step-head small { font-size: 12px; }
  .strategy-sub-label { font-size: 12px; }
  .strategy-value { font-size: 12px; }
  .summary-strip span { font-size: 12px; }
  .sv-dir { font-size: 12px; }
  .switch-labeled small { font-size: 12px; }
  .table-meta { font-size: 12px; }
  .toast { font-size: 12px; }
  .today-receipts .strip-item em { font-size: 12px; }
  .transaction-note { font-size: 12px; }
  .transaction-person small { font-size: 12px; }
  .transaction-table td { font-size: 12px; }
  .transaction-value small { font-size: 12px; }
  .trend { font-size: 12px; }
  .type-label { font-size: 12px; }
  .void-dialog-footer > p { font-size: 12px; }
  html.sidebar-collapsed .side-subnav a { font-size: 12px; }
  html.sidebar-collapsed .side-subnav::before { font-size: 12px; }
  .sale-item-multi-badge { font-size: 12px; }
  /* B03-TOUCH-FLOOR-END */
  /* 相对字号补充：<small> 的浏览器默认缩小（约 0.83em）会绕过上面的 px 清单，
     这里按同一 12px 下限补齐；新增此类场景请手工维护本段。 */
  .sale-items-title small,
  .sale-item-candidate small,
  .inventory-stats-panel .top-product-list small { font-size: 12px; }
}

/* ── 4. 放大模式重排：结算主按钮吸底（不遮挡字段），次要内容不再拉长滚动 ── */
html.text-zoomed { scroll-padding-bottom: 104px; }
.account-dialog { scroll-padding-bottom: 104px; }
html.text-zoomed .operation-form > .button[type="submit"],
html.text-zoomed .consume-quick-form > .button[type="submit"] {
  position: sticky; bottom: 8px; z-index: 4;
  box-shadow: 0 10px 28px rgba(15, 35, 35, .18);
}
@media (max-width: 1100px), (any-pointer: coarse) {
  /* 锚点（#cashier）跳转不被吸底按钮 / 底栏遮挡：用目标的 scroll-margin，
     而不是 html 的 scroll-padding —— 后者会连带 JS 聚焦滚动，把初始视口顶起。 */
  #cashier { scroll-margin-bottom: 104px; }
  .operation-form > .button[type="submit"] {
    position: sticky; bottom: 8px; z-index: 4;
    box-shadow: 0 10px 28px rgba(15, 35, 35, .18);
  }
}

/* 放大时压缩纵向留白，让常用操作区更快进入视野（不隐藏任何内容）。 */
html.text-zoomed .operation-form { gap: 14px; padding-bottom: 24px; }
html.text-zoomed .panel-head { margin-bottom: 12px; }

/* ── 5. 可见焦点：新增/调整过的交互目标保持一致的键盘焦点反馈 ── */
.button:focus-visible, .account-action:focus-visible, .sale-item-row-action:focus-visible,
.sale-item-add:focus-visible, .picker-option:focus-visible, .picker-action:focus-visible,
.text-button:focus-visible, .card-redeem-button:focus-visible {
  outline: 3px solid var(--river); outline-offset: 2px;
}
.picker-option:focus-visible, .picker-action:focus-visible { background: var(--river-soft); }

/* ── 6. 打印（小票、交班单）：恢复静态排版，不吸底、不遮挡、不缩放 ── */
@media print {
  html { zoom: 1 !important; }
  html.text-zoomed, .account-dialog { scroll-padding-bottom: 0; }
  html.text-zoomed .operation-form > .button[type="submit"],
  html.text-zoomed .consume-quick-form > .button[type="submit"],
  .operation-form > .button[type="submit"] {
    position: static; box-shadow: none;
  }
  html.text-zoomed .operation-form { gap: 18px; padding-bottom: 36px; }
}

/* ── 7. 文字对比度：把既有声明中低于 4.5:1（WCAG AA 正文）的取值提到达标 ──
   只改颜色取值，不动字号、布局与结构；实测见交付说明的对比度测量记录。 */
.sidebar-version { color: rgba(255, 255, 255, .62); }        /* 3.40 → 5.48 */
.brand small { color: rgba(255, 255, 255, .72); }            /* 4.15 → 6.78 */
.operator small { color: rgba(255, 255, 255, .72); }         /* 3.39 → 6.78 */
.inline-alert { color: #963a2f; }                            /* 4.19 → 5.96（保留警示色相） */
.birthday-list b { color: #8a6520; }                         /* 2.39 → 5.30 */
.consume-dialog .dialog-heading .eyebrow { color: #8a6520; } /* 3.90 → 5.30 */
.transaction-icon.consume { color: #8a5f22; }                /* 3.84 → 4.62（独立核查补充） */
.low-stock-qty { color: #835a20; }                           /* 3.97 → 5.10（独立核查补充） */
.permission-list li span { color: #2f6552; }                 /* 4.35 → 5.71（独立核查补充） */
@media (max-width: 1100px), (any-pointer: coarse) {
  .bottom-nav a { color: var(--muted); }                     /* 3.33 → 6.03（激活项由 .active 覆盖） */
}

/* ── 9. 提示容器不拦截点击：成功提示淡出后，固定定位的空容器仍会挡住右上角
   操作按钮（44px 按钮中心点落入提示区）。容器放行，提示本体保留关闭点击。 */
.toast-stack { pointer-events: none; }

/* ── 8. 触屏/窄屏的可点面积补充：行内链接（正文中的“查看全部”等）按标准豁免，
   其余常用控件统一到 44px；只加成最小高度，不改布局结构。 */
@media (max-width: 1100px), (any-pointer: coarse) {
  .ledger-tabs a { min-height: 44px; }
  .member-cell { min-height: 44px; }
  .mobile-brand { min-height: 44px; }
  .back-link { min-height: 44px; align-items: center; }
  .member-page-navigation a { min-height: 44px; }  /* 覆盖 member-page.css 的 36px */
  details.inventory-edit > summary { min-height: 44px; }  /* 盘点/改价入口，行内高频（独立核查补充） */
  #cashier .payment-code-input input { min-height: 44px; height: 44px; }  /* 覆盖 payment-code.css 的 38px（独立核查补充） */
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select, textarea { min-height: 44px; }
}
