/* Haven responsive layer: mobile touch sizing and minimum readable UI text. */
@media (max-width: 768px) {
  html body :is(input, select, textarea) { font-size: var(--fs-input) !important; }
  html body :is(
    .btn, .site-btn, .tab, .tb-btn, .fc-act, .mini-btn, .tool-nav-link,
    #btn-manage-mode, #btn-new-diary, #btn-save-diary, #btn-delete-diary,
    #mode-card, #mode-list, #mode-timeline, #btn-batch-toggle, #btn-add-memo,
    .ms-group-actions button, .ms-card-actions button, .ms-card button
  ) { min-height: 44px; }
  html body :is(.mini-btn, #btn-manage-mode, #btn-new-diary, #btn-save-diary, #btn-delete-diary) { min-width: 44px; }
  html body :is(
    .chip.tag, .ms-badge, .ms-status, .ms-meta, .ms-note,
    #st3-chg, #st4-chg, #feed-more, #goal-panel .mono,
    #foot-l, #foot-r, .chart-empty-overlay
  ) { font-size: var(--fs-2xs) !important; }
  html body .update-log-link { display: inline-flex; align-items: center; min-height: 44px; }
  html body #btn-show-register, html body #btn-forgot { min-height: 44px; padding-inline: 8px; }
  html body #remember { width: 24px; height: 24px; }
  html body #themeToggle { width: 44px; height: 44px; }
  html body .menu a { min-height: 44px; display: inline-flex; align-items: center; }
  html body #linkPopInput { min-height: 44px; }
  html body .ed-tags .tag-chip { min-height: 36px; }
  html body .ed-tags .tag-chip button { min-width: 32px; min-height: 32px; }
  html body #btnBack { min-width: 44px !important; min-height: 44px !important; height: 44px !important; display: inline-flex; align-items: center; justify-content: center; }
  html body.notes-page .nc-meta .chip.tag { min-height: 44px; display: inline-flex; align-items: center; }
  html body.notes-page .tag-chip button { min-width: 44px; min-height: 44px; }
  html body.notes-page .nc-prog span { font-size: var(--fs-2xs) !important; }
  html body.notes-page .color-dot { min-width: 44px !important; min-height: 44px !important; width: 44px !important; height: 44px !important; display: inline-flex; align-items: center; justify-content: center; }
  html #toolsPage :is(button, input, select) { min-height: 44px !important; }
  html #toolsPage button { display: inline-flex; align-items: center; justify-content: center; }
  html #toolsPage button.text-\[11px\] { font-size: var(--fs-sm) !important; }
  html body :is(#diary-search, #date-picker-nav, #diary-date, #diary-time, #diary-weather, #diary-mood, #diary-title) { min-height: 44px; }
  html body :is(#memo-search, #memo-sort, #mode-card, #mode-list, #mode-timeline, #btn-batch-toggle, #btn-add-memo) { min-height: 44px; }
  html body #remember { width: 44px; height: 44px; }
  html body #tagFilters .chip.tag-filter { min-height: 44px; display: inline-flex; align-items: center; }
  html body :is(.chart3d h4 .mono, .chart-empty-overlay span) { font-size: var(--fs-2xs) !important; }
  html body :is(.ms-meta-row span, .ms-meta-row strong, .ms-delete-group) { font-size: var(--fs-2xs) !important; }
  html body :is(.brand-sub, .brand-logo text) { font-size: var(--fs-2xs) !important; }
  html body :is(#save-status, #btn-delete-diary, #editor-panel .text-\[11px\]) { font-size: var(--fs-2xs) !important; }
  html body :is(#btn-nav span, #btn-ws span, #btn-set span, .box-empty) { font-size: var(--fs-2xs) !important; }
  html body :is(.phone .bar span, .phone .pbal small) { font-size: var(--fs-2xs) !important; }
  html body #stats .text-\[11px\] { font-size: var(--fs-2xs) !important; }
  html body :is(.hero .float.f2, .hero .float.f3) { display: none !important; }
  html body :is(#search, #auth-view-fab) { min-height: 44px !important; }
  html body #search { font-size: var(--fs-input) !important; }
  html body #status { left: 8px !important; right: 8px !important; overflow: hidden; }
  html body #status { left: 8px !important; right: 8px !important; max-width: calc(100vw - 16px) !important; overflow: hidden; }
  html body #status > * { min-width: 0 !important; max-width: calc(50vw - 14px) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html body #boxes { left: 8px !important; right: 8px !important; width: auto !important; min-width: 0 !important; max-width: calc(100vw - 16px) !important; transform: none !important; }
  html body #manageYearSelect { min-height: 44px !important; }
  html body #btnGlobalSearch { min-width: 44px !important; min-height: 44px !important; }
  html body #heroBanner .hero-eyebrow { font-size: var(--fs-xs) !important; }
  html #toolsPage #selectorInputsContainer button { min-width: 44px !important; min-height: 44px !important; }
  html #notes-demo #colorRow > .color-dot { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; flex: 0 0 44px !important; transform: none !important; }
}