/* Shared small-screen layout. Keep content reachable instead of hiding overflow. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { overflow-wrap: anywhere; }
.wrap { max-width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
img, video, svg { max-width: 100%; }
button, input, select, textarea { max-width: 100%; }
input, select, textarea { min-width: 0; }
button, .btn { white-space: normal; text-align: center; line-height: 1.4; }
.btn, .google-btn, .full { padding-block: 12px; }
.brand img, .google-btn img { flex-shrink: 0; }
.wrap, .nav > *, .shell > *, .main, .card, .login-card,
.hero-grid > *, .grid-2 > *, .grid-3 > *, .field-grid > *,
.phone-grid > *, .download-panel > *, .coverage-grid > * { min-width: 0; }
.field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check input { flex: 0 0 20px; width: 20px; height: 20px; }
.check { min-height: 44px; padding-block: 6px; }
.hidden-field { display: none; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--cyan, #28d9e9);
  outline-offset: 3px;
}
summary { min-height: 44px; padding-block: 10px; }
.badge, .pill, .choice-mark { max-width: 100%; }
body.page-scroll-locked {
  position: fixed;
  top: var(--page-scroll-top, 0px);
  inset-inline: 0;
  width: 100%;
  overflow: hidden;
}
.signup-modal, .download-screen {
  top: var(--visible-top, 0px);
  bottom: auto;
  height: 100vh;
  height: var(--visible-height, 100dvh);
  min-height: 0;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.signup-dialog {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.signup-head { position: relative; flex: 0 0 auto; }
.signup-head > div { min-width: 0; }
.signup-head h3:focus { outline: none; }
.signup-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-block: 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--ink);
  cursor: pointer;
}
.download-box {
  position: relative;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.download-close { display: flex; justify-content: flex-end; margin: -12px -8px 8px 0; }
.download-box h2 { font-size: clamp(26px, 5vw, 40px); }
.footer { display: flex; flex-wrap: wrap; gap: 18px; }
.footer > div:last-child { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 0; }

@media (max-width: 980px) {
  input, select, textarea { font-size: 16px; }
  .mobile-menu { visibility: hidden; pointer-events: none; }
  .mobile-menu.open {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - var(--nav-height, 78px));
    max-height: calc(var(--visible-height, 100dvh) - var(--nav-height, 78px));
    padding: 8px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: #081223;
    border-bottom: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }
  .mobile-menu a { flex-shrink: 0; min-height: 48px; }
}
@media (max-width: 720px) {
  .signup-modal { padding: 0; }
  .signup-dialog { height: 100%; max-height: 100%; border-radius: 0; }
  .signup-head {
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
    align-items: flex-start;
  }
  .signup-body { padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  .notice { border-radius: 16px; font-size: 14px; line-height: 1.5; }
  .nav { gap: 12px; }
  .nav .row { gap: 8px; }
  .center-page { padding: 16px; min-height: 100svh; }
  .login-card { padding: 24px 20px; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 84px; }
  .wrap { width: calc(100% - 32px); }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .phone-grid { grid-template-columns: minmax(0, 1fr); }
  .nav { height: auto; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
  .nav > .row { margin-left: auto; }
  .nav .brand { font-size: 18px; }
  .nav .brand img { width: 40px; height: 40px; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(36px, 12vw, 54px); }
  .actions { gap: 10px; }
  .actions .btn { min-height: 48px; height: auto; padding: 12px 16px; }
  .download-box { padding: 22px 18px; border-radius: 18px; }
  .signup-body .btn { height: auto; min-height: 48px; padding: 12px 14px; }
  .card { padding: 18px; }
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toggle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 480px) {
  .signup-head p { display: none; }
  .signup-head { padding-block: 8px; }
  .signup-head h3 { font-size: 18px; }
  .signup-body { padding-top: 12px; }
  .center-page { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
