/* Shared narrow-screen finishing layer. Keep each site's typography, media and desktop layout. */
@media (max-width: 760px) {
  body button, body summary, body [role="button"] {
    min-width: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box;
  }
  body summary { align-content: center; }
  body .mobile-to-top {
    position: fixed; right: 14px; bottom: 14px; z-index: 90;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid #94a3b8;
    background: var(--bg-card, #fff); color: var(--primary, #185fa5); font-size: 22px;
    box-shadow: 0 2px 10px #16233b22;
  }
  body .mobile-to-top[hidden] { display: none; }
  body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), body select, body textarea {
    font-size: 16px !important;
    min-height: 44px !important;
  }
  body input[type="color"] { min-height: 44px !important; min-width: 44px !important; }
  body .copy-email, body #resetBtn { min-height: 44px; padding: 10px 14px; }
  body .portal-nav, body .nav-links.open, body #tools-nav.open { overscroll-behavior: contain; }
  main :is(h2[id],h3[id],section[id],article[id]), .reading-body :is(h2[id],h3[id]) {
    scroll-margin-top: var(--mobile-anchor-offset, 96px) !important;
  }
  body.main-refresh .portal-header-inner {
    min-height: 64px;
    padding: 9px 0;
    gap: 8px;
  }
  body.main-refresh .portal-brand { font-size: 20px; gap: 8px; }
  body.main-refresh .portal-brand svg { width: 28px; height: 28px; }
  body.main-refresh .portal-menu { padding: 8px 10px; }
  body.main-refresh .portal-nav { max-height: calc(100dvh - 64px); overflow-y: auto; }
  body.hk-refresh .nav-inner { min-height: 64px; }
  body.hk-refresh .nav-toggle { min-width: 44px; min-height: 44px; }
  body.hk-refresh .list-page-hero { padding-block: 24px; }
  body.hk-refresh .list-page-hero h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); line-height: 1.3; }
  body.hk-refresh .reading-toc { position: static; }
  body.hk-refresh #site-nav #langSwitch {
    position: static; width: 44px; height: 44px; margin: 8px 14px;
  }
  body.hk-refresh #trackerBar {
    top: var(--mobile-header-height, 64px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 10px 12px;
  }
  body.hk-refresh #trackerBar .tb-label { font-size: .85rem; }
  body.hk-refresh #trackerBar .tb-pct { font-size: .8rem; text-align: right; }
  body.hk-refresh #trackerBar .tb-bar { min-width: 0; grid-column: 1; grid-row: 2; }
  body.hk-refresh #trackerBar .tb-reset {
    grid-column: 2; grid-row: 2; min-height: 44px; display: inline-flex;
    align-items: center; padding-inline: 4px; font-size: .8rem;
  }
  body.hk-refresh .tracker-item { min-height: 44px; align-items: flex-start; }
  body.hk-refresh .tracker-item input { margin-top: 3px; }
  body.hk-refresh .tracker-item .tk-name { min-width: 0; overflow-wrap: anywhere; }
  body.hk-refresh .tracker-item .tk-zone { flex: 0 0 auto; max-width: 35%; overflow-wrap: anywhere; }
  body.news-refresh .topnav .inner { gap: 4px; align-items: stretch; }
  body.news-refresh .topnav .cats, body.news-refresh .topnav nav[aria-label] {
    width: 100%; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    gap: 6px; padding-bottom: 4px;
  }
  body.news-refresh .topnav .cats .cat, body.news-refresh .topnav nav[aria-label] > a {
    flex: 0 0 auto; min-height: 44px; padding: 8px 12px;
    display: inline-flex; align-items: center; white-space: nowrap;
  }
  body.news-refresh #news-q { font-size: 16px; }
  body.news-refresh .hero { padding: 24px 20px; }
  body.news-refresh .hero h1 { font-size: 28px; line-height: 1.25; }
  body .travel-header .nav-links.open { max-height: calc(100dvh - 71px); overflow-y: auto; }
  body .tp-hero { padding-block: 28px 24px; }
}
@media (max-width: 430px) {
  body .tool-hero { padding-block: 26px 24px; }
  body .page-hero .ph-inner { padding-block: 32px; }
}
/* Keep the same ergonomic targets and input text in a touch phone's landscape viewport. */
@media (min-width: 761px) and (max-width: 960px) and (pointer: coarse) {
  body button, body summary, body [role="button"], body input[type="color"] {
    min-height: 44px !important; min-width: 44px !important;
  }
  body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), body select, body textarea {
    font-size: 16px !important;
    min-height: 44px !important;
  }
  main :is(h2[id],h3[id],section[id],article[id]) { scroll-margin-top: var(--mobile-anchor-offset, 96px) !important; }
}
