/* A screen per primary customer step. Intrinsic overflow remains available for
   enlarged text, the software keyboard, long notices and expanded details. */
@media (max-width: 700px) {
  #customer-view {
    --customer-header: 56px;
    --screen-gap: 10px;
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
  }
  #customer-view[hidden] { display: none; }
  #customer-view > header {
    flex: 0 0 var(--customer-header);
    height: var(--customer-header);
    padding: 10px 17px;
  }
  #customer-view .prepaid-shell {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    width: calc(100% - 20px);
    min-height: calc(100svh - var(--customer-header) - var(--screen-gap) - 8px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - var(--customer-header) - var(--screen-gap) - max(8px, env(safe-area-inset-bottom, 0px)) - env(safe-area-inset-top, 0px));
    margin: var(--screen-gap) auto 0;
    padding-bottom: 20px;
  }
  .prepaid-shell > .station-summary,
  .prepaid-shell > .station-facts,
  .prepaid-shell > details,
  .prepaid-shell > .charge-pane { flex-shrink: 0; }
  #customer-view .prepaid-shell > .member-journey {
    position: relative;
    bottom: auto;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 14px;
    border-top: 0;
  }
  .prepaid-shell > .charge-pane { padding-bottom: 15px; }
  .prepaid-shell > .member-journey:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 1px solid var(--line);
  }
  #registration-form input, #member-budget { font-size: 16px; }
  #customer-view .prepaid-shell #member-cancel,
  #customer-view .prepaid-shell #budget-presets-back,
  #customer-view .prepaid-shell #member-signout,
  #customer-view .prepaid-shell #phone-back { min-height: 40px; }
  .prepaid-shell #customer-details:not([open]) summary { min-height: 32px; }
  .prepaid-shell #customer-notice summary { min-height: 24px; }
  .prepaid-shell #member-start-reason { overflow-wrap: anywhere; }
  .prepaid-shell #member-greeting { margin-bottom: 0; }
  .prepaid-shell .custom-mode .member-welcome { display: none; }
  #customer-view .prepaid-shell #custom-budget-label { margin-bottom: 4px; }
  .prepaid-shell #budget-presets-back { margin: 0; }
  .prepaid-shell .custom-mode .credit-card { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 5px; flex-wrap: wrap; }
  .prepaid-shell .custom-mode .credit-card > strong { font-size: 22px; }
  .prepaid-shell .custom-mode .credit-card > span { max-width: 54%; text-align: left; }
  .prepaid-shell .custom-mode .credit-card > small { flex-basis: 100%; }
}
@media (max-width: 700px) and (max-height: 700px) {
  #customer-view .prepaid-shell { padding: 13px 14px 18px; }
  #customer-view .prepaid-shell > .member-journey { padding-top: 11px; }
  .prepaid-shell > .charge-pane { padding-bottom: 12px; }
  .prepaid-shell #funding-panel { margin-top: 6px; }
  .prepaid-shell .member-welcome { min-height: 32px; }
  .prepaid-shell .credit-card { margin-top: 5px; margin-bottom: 9px; padding: 8px 12px; }
  .prepaid-shell .credit-card > strong { font-size: 25px; }
  .prepaid-shell .prepaid-power { width: 128px; height: 128px; margin: 12px auto; }
  .prepaid-shell .prepaid-power > strong { font-size: 36px; }
}
@media (max-width: 700px) and (max-height: 600px) {
  #customer-view { --screen-gap: 6px; }
  #customer-view .prepaid-shell { padding: 12px 14px 17px; }
  .prepaid-shell .charge-pane { margin-top: 8px; padding-bottom: 10px; }
  .prepaid-shell .prepaid-power { width: 112px; height: 112px; margin: 10px auto; }
  .prepaid-shell .live-stats { margin: 8px 0; }
  .prepaid-shell .credit-card { padding: 6px 12px; margin: 4px 0 7px; }
  .prepaid-shell .credit-card > strong { font-size: 24px; }
  .prepaid-shell .budget-choice { min-height: 40px; }
  .prepaid-shell .budget-presets { margin: 6px 0; }
  .prepaid-shell #funding-summary { margin: 6px 0 10px; }
}

/* Help occupies the existing header row, preserving the one-screen primary journey. */
#customer-help{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:48px;border:1px solid #dce6d6;border-radius:12px;padding:6px 12px;background:#f7faf4;color:#194e3c;font:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}#customer-help .ui-icon{width:20px;height:20px}#customer-help:focus-visible{outline:3px solid #8eaf6f;outline-offset:2px}

/* Contextual back controls occupy the existing top-left brand slot. */
#customer-view>header .customer-top-back{display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;min-height:48px;padding:6px 8px 6px 0;margin:0;font-size:15px;font-weight:600;color:#194e3c;line-height:1.5;white-space:nowrap}#customer-view>header .customer-top-back .ui-icon{width:21px;height:21px}#customer-view>header .customer-top-back[hidden],#customer-view>header .brand[hidden]{display:none!important}
