/* Keluvi mobile floor v0.6.16 — layout-preserving a11y/iOS floors
   Loaded last (after page CSS). Raises floors; does not redesign layout. */

:root {
  --kf-text-body: 14px;
  --kf-text-meta: 12px;
  --kf-touch: 44px;
  --kf-gutter: 16px;
}

/* ---- P0: inputs 16px (beats class+element via :not specificity) ---- */
.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="range"]),
.map-shell input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="range"]),
.auth-shell input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="range"]),
.fund-shell input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="range"]),
body input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="range"]),
.app-shell textarea,
.map-shell textarea,
.auth-shell textarea,
.fund-shell textarea,
body textarea,
.app-shell select,
.map-shell select,
.auth-shell select,
.fund-shell select,
body select {
  font-size: 16px;
}

/* ---- P0: critical header / icon hit areas (icon glyphs stay small) ---- */
.me-header-action,
.notify-btn,
.notify-link,
.avatar-link,
.back-btn,
.back-link,
.close-btn,
.close-link,
.page-close,
.header-back,
.topbar-back,
.topbar-action,
.guide-topbar a[href],
.fund-header a[href],
.content-topbar a[href],
.mine-topbar a[href],
.detail-topbar a[href],
.deals-topbar a[href],
.merchants-topbar a[href],
.services-topbar a[href],
.notification-topbar a[href],
.snapshot-header a[href],
.tickets-header a[href],
.orders-header a[href],
.points-header a[href],
.vip-header a[href],
.support-header a[href],
.favorites-header a[href],
.history-header a[href],
.coupons-header a[href],
.checkin-header a[href],
.message-header a[href] {
  box-sizing: border-box;
  min-width: var(--kf-touch);
  min-height: var(--kf-touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.region-btn {
  box-sizing: border-box;
  min-height: var(--kf-touch);
}

.map-chip,
.filter-pill,
.guide-filter,
.saved-filter,
.sheet-tab {
  box-sizing: border-box;
  min-height: var(--kf-touch);
}

.bottom-nav .nav-item {
  min-height: max(54px, var(--kf-touch));
}

.bottom-nav .nav-item strong {
  font-size: var(--kf-text-meta);
}

/* ---- P0: safe-area + P1 gutters on common chrome ---- */
.home-city-header,
.me-header,
.map-topbar,
.guide-topbar,
.fund-header,
.content-topbar,
.mine-topbar,
.detail-topbar,
.deals-topbar,
.deals-page-header,
.merchants-topbar,
.services-topbar,
.notification-topbar,
.snapshot-header,
.tickets-header,
.orders-header,
.points-header,
.vip-header,
.support-header,
.favorites-header,
.history-header,
.coupons-header,
.checkin-header,
.message-header {
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  padding-left: max(var(--kf-gutter), 12px);
  padding-right: max(var(--kf-gutter), 12px);
}

.home-city-header {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

.vietnam-home-main,
.me-main,
.fund-main,
.content-main,
.mine-main,
.detail-main,
.guide-main,
.snapshot-main,
.services-main,
.deals-main,
.merchants-main,
.tickets-main,
.orders-main,
.points-main,
.vip-main,
.support-main,
.favorites-main,
.history-main,
.coupons-main,
.checkin-main,
.message-main,
.notification-main {
  padding-left: max(var(--kf-gutter), 12px);
  padding-right: max(var(--kf-gutter), 12px);
}

.vietnam-home-main,
.me-main,
.guide-main,
.snapshot-main,
.services-main {
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

.fund-main,
.content-main,
.mine-main,
.detail-main,
.deals-main,
.merchants-main,
.tickets-main,
.orders-main,
.points-main,
.vip-main,
.support-main,
.favorites-main,
.history-main,
.coupons-main,
.checkin-main,
.message-main,
.notification-main {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav {
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--kf-gutter), 14px);
  padding-right: max(var(--kf-gutter), 14px);
}

.hcm-hero,
.home-service-panel {
  margin-left: max(var(--kf-gutter), 14px);
  margin-right: max(var(--kf-gutter), 14px);
}

.recommend-sheet {
  padding-left: max(var(--kf-gutter), 12px);
  padding-right: max(var(--kf-gutter), 12px);
}

@media (max-width: 374px) {
  .auth-shell,
  .home-city-header,
  .me-header,
  .me-main,
  .map-topbar,
  .recommend-sheet,
  .bottom-nav,
  .fund-header,
  .fund-main,
  .content-topbar,
  .content-main,
  .guide-topbar,
  .guide-main {
    padding-left: max(var(--kf-gutter), 12px);
    padding-right: max(var(--kf-gutter), 12px);
  }
}

/* ---- P1: meta/body floors — lift undersized copy only ---- */
.region-copy small,
.hero-location,
.place-distance,
.place-meta,
.nearby-guide-body p,
.nearby-guide-place,
.nearby-guide-stats,
.saved-mini-row small,
.saved-place-info p,
.saved-place-info small,
.profile-info > small,
.asset-item em,
.order-item strong,
.function-item span,
.after-sale-link,
.me-panel header > a,
.content-grid small,
.premium-card p,
.map-chip,
.filter-pill,
.filter-pill span,
.guide-filter,
.saved-filter,
.sheet-tab,
.place-title span,
.guide-badge,
.saved-title em,
.nearby-guide-thumb time,
.content-grid strong,
.premium-cta,
.asset-item strong {
  font-size: var(--kf-text-meta);
}

.place-title h2,
.nearby-guide-head h2,
.saved-place-head h2,
.saved-title,
.auth-card form > label {
  font-size: var(--kf-text-body);
}

.auth-options,
.auth-card header span,
.auth-status,
.auth-card footer {
  font-size: var(--kf-text-meta);
}

html,
body,
.app-shell,
.map-shell,
.auth-shell,
.fund-shell,
.guides-shell,
.vietnam-home-shell,
.me-shell {
  overflow-x: clip;
}
