/* Phone layouts share the desktop palette and component surfaces. */
@media (max-width: 767px) {
  html, body { max-width: 100%; overflow-x: clip; }
  body { -webkit-text-size-adjust: 100%; }
  main, main > *, .container { min-width: 0; }
  main { overflow-wrap: break-word; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),
  select, textarea { font-size: 16px !important; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),
  select { min-height: 44px; }
  textarea { min-height: 120px; }
  .nw-icon-btn, .nw-burger, .gp-x, .nw-sheet-link { min-width: 44px; min-height: 44px; }
  .nw-sheet {
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overscroll-behavior: contain;
    padding: 16px 16px max(20px, env(safe-area-inset-bottom, 0px));
  }
  .nw-sheet-link { padding-block: 11px; font-size: 15px; }
  .nw-sheet-policies { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .nw-sheet-policies a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }

  /* A fixed tap target is easier to use than a moving marquee on touchscreens. */
  .bear-games .bear-games-viewport {
    overflow-x: auto; overflow-y: hidden; mask-image: none;
    scrollbar-width: none; scroll-snap-type: x proximity;
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  }
  .bear-games-viewport::-webkit-scrollbar { display: none; }
  .bear-games .bear-games-track { animation: none !important; transform: none; }
  .bear-games-track .bear-games-list[aria-hidden=true] { display: none; }
  .bear-games-track .bear-game { scroll-snap-align: start; min-height: 60px; }
  body .vl-nw-hero .vl-nw-title span,
  body .vl-nw-hero .vl-nw-eyebrow,
  body .vl-nw-hero .vl-nw-description,
  body .vl-nw-hero .vl-nw-actions,
  body .vl-nw-hero .vl-nw-preview,
  body .vl-nw-hero .vl-product-showcase {
    animation: bear-phone-entrance .4s cubic-bezier(.22,1,.36,1) both !important;
    filter: none !important; opacity: 1 !important;
  }

  /* Prevent min-content card widths from overflowing the product picker. */
  .gp-overlay { padding: 12px; }
  .gp-overlay .gp-panel {
    width: 100%; max-width: 100%; min-width: 0;
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column;
  }
  .gp-panel .gp-head { flex-shrink: 0; padding: 12px 16px; }
  .gp-panel .gp-title { font-size: 20px; }
  .gp-panel .gp-body[data-pc-grid] {
    min-width: 0; width: 100%; grid-template-columns: minmax(0, 1fr);
    gap: 12px; padding: 12px; overflow-x: hidden; overscroll-behavior: contain;
  }
  .gp-body .gp-cardwrap, .gp-body .vl-solar-product,
  .gp-body .vl-solar-product div, .gp-body .vl-solar-product h3 { min-width: 0; max-width: 100%; }
  .gp-body .vl-solar-product { width: 100%; }
  .gp-body .vl-solar-product h3 { white-space: normal; overflow-wrap: anywhere; font-size: 15px; }

  .bear-product-page { padding-top: 24px; }
  .bear-product-page .bear-product-width { padding: 12px 16px 48px; }
  .bear-product-page .vl-product-breadcrumb { gap: 7px; font-size: 11px; line-height: 1.7; margin-bottom: 20px; }
  .bear-product-buy { min-width: 0; }
  .bear-payment-panel .bear-payment-actions > * { min-height: 48px; }
  .bear-quantity-stepper button { min-width: 48px; min-height: 48px; }
  .bear-product-information .bear-product-section-title { font-size: 26px; }
  .bear-product-information [role=tablist] { max-width: 100%; }
  .bear-product-information [role=tab] { min-height: 44px; }

  .tpl-status ._1tg { padding-top: 36px; }
  .tpl-status ._8tw { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tpl-status ._8tw ._9t5 { grid-column: auto; padding: 13px 10px; min-width: 0; }
  body.tpl-status ._8tw > ._9t5:first-child { grid-column: auto; }
  .tpl-status ._9t5 ._4pt { font-size: 9px; line-height: 1.4; min-height: 25px; overflow-wrap: normal; }
  .tpl-status ._9t5 ._74q { font-size: 22px; }
  .tpl-status ._9t5 ._7fa { font-size: 10px; line-height: 1.5; }
  .tpl-status ._22c { display: flex; flex-direction: column; gap: 10px; }
  .tpl-status ._22c > * { width: 100%; min-width: 0; max-width: 100%; }
  .tpl-status .status-dd-trigger, .tpl-status .status-dd-option { min-height: 44px; }
  .tpl-status ._nf9 { align-items: flex-start; flex-wrap: wrap; }
  .tpl-status .sc-uptime-pct { margin-left: auto; }
  .tpl-status .uptime-history { height: 40px; }
  .vl-extracted [data-vl-reveal] { animation-duration: .45s !important; animation-delay: 0s !important; }

  .bear-comparison-table { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .bear-review-form-panel > summary { min-height: 80px; padding: 18px; }
  #bear-verified-review-form { padding: 0 18px 20px; }
  .bear-review-submit-row button { min-height: 48px; }
  .bear-cart-item, .bear-cart-details { min-width: 0; }
  .bear-cart-details > a { overflow-wrap: anywhere; }

  body #bear-guide-app .result-sidebar nav button { min-height: 46px; font-size: 12px; }
  body #bear-guide-app .result-heading .chips { gap: 7px; flex-wrap: wrap; }
  body #bear-guide-app .chips > button { min-height: 44px; }
  body #bear-guide-app .step-card .complete-button { min-height: 44px; padding: 10px 12px; font-size: 11px; }
  body #bear-guide-app .resource-details summary { min-height: 54px; }
  body #bear-guide-app .download-card { min-width: 0; }
  body #bear-guide-app .result-content .step-card ol,
  body #bear-guide-app .resource-details ol { font-size: 14px; line-height: 1.85; }
  body #bear-guide-app .result-sidebar .progress-help { font-size: 11px; }
}

@keyframes bear-phone-entrance { from { transform: translateY(10px); } to { transform: none; } }

@media (max-width: 480px) {
  body .vl-nw-hero .vl-nw-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  body .vl-nw-hero .vl-nw-actions .vl-nw-link { min-width: 0; width: 100%; min-height: 48px; padding: 12px 16px; font-size: 14px; }
  body .vl-nw-hero .vl-nw-description { font-size: 15px; line-height: 1.65; }
  .bear-plan-option { gap: 9px; }
  .bear-plan-option .bear-plan-name { overflow-wrap: anywhere; }
}

@media (max-width: 359px) {
  .gp-panel .gp-head { padding: 10px 12px; }
  .gp-body .vl-solar-product h3 { font-size: 14px; }
  .bear-product-page .bear-product-width { padding-inline: 12px; }
  .bear-plan-option { padding: 10px; }
  .bear-payment-panel .bear-payment-actions { flex-direction: column; }
  .bear-payment-panel .bear-payment-actions > * { width: 100%; flex-basis: auto; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  body .vl-nw-hero .vl-nw-title span,
  body .vl-nw-hero .vl-nw-eyebrow,
  body .vl-nw-hero .vl-nw-description,
  body .vl-nw-hero .vl-nw-actions,
  body .vl-nw-hero .vl-nw-preview,
  body .vl-nw-hero .vl-product-showcase { animation: none !important; }
}
