/* Public and participant layouts. Load after the screen styles and saved
   appearance rules. Wide review tables keep their own bounded scroll region. */
@media screen and (max-width: 800px) {
  /* Public production pages have no drawer trigger: keep every navigation
     link available in a wrapping second row. */
  .area-public .public-header,
  .area-auth .public-header { flex-wrap: wrap; gap: 10px 12px; }
  .area-public .public-header > a:first-child,
  .area-auth .public-header > a:first-child { flex: 1 1 150px; min-width: 0; }
  .area-public .public-header > a > img,
  .area-auth .public-header > a > img { width: auto !important; height: 56px !important; max-width: 72px; object-fit: contain; flex: none; }
  .area-public .public-brand-name,
  .area-auth .public-brand-name { display: block; min-width: 0; max-width: 145px; font-size: 12px; overflow-wrap: anywhere; }
  .area-public .public-header > .primary-button,
  .area-auth .public-header > .primary-button { flex: none; min-height: 44px; max-width: 100%; }
  .area-public .public-header nav,
  .area-auth .public-header nav { display: flex; position: static; flex: 1 1 100%; order: 3; min-width: 0; width: 100%; flex-wrap: wrap; align-items: stretch; justify-content: flex-start; gap: 4px 8px; padding: 8px 0 0; border-top: 1px solid #e2e8f0; box-shadow: none; font-size: 11px; }
  .area-public .public-header nav a,
  .area-auth .public-header nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 8px 10px; border-radius: 7px; line-height: 1.45; text-align: center; white-space: normal; overflow-wrap: anywhere; }
  .area-public .public-header nav a:hover,
  .area-auth .public-header nav a:hover { background: #edf5fb; }
  .area-public .public-footer { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .area-public .public-footer > div { min-width: 0; overflow-wrap: anywhere; }
  .area-public .public-footer h2 { font-size: 24px; line-height: 1.3; }

  /* Summary line items and secure-payment notes must be allowed to wrap. */
  body[data-screen="/golf"] .design-main #summary-line-label,
  body[data-screen="/golf"] .design-main .golf-summary-trust { white-space: normal; }
  body[data-screen="/golf"] .golf-summary-trust > div { flex-wrap: nowrap; align-items: flex-start; }
  body[data-screen="/golf"] .golf-summary-trust > div > span:last-child { min-width: 0; }
  .area-public .golf-payment-methods { flex-wrap: wrap; }
  .area-public .golf-payment-methods-label { flex-basis: 100%; margin-right: 0; }
  body[data-screen="/sponsors"] #sponsor-summary-column button,
  body[data-screen="/sponsors"] #sponsor-summary-column #ctaBtnText { white-space: normal !important; height: auto; min-height: 44px; }
  body[data-screen="/sponsors"] #sponsor-summary-column .mt-space-md.flex.items-center.justify-center { flex-wrap: wrap !important; white-space: normal !important; text-align: center; }
  body[data-screen="/golf"] #main-summary-cta,
  body[data-screen="/purchases"] #btn-pay { height: auto; min-height: 48px; padding-block: 12px; white-space: normal; }
  body[data-screen="/purchases"] .purchase-summary-security { flex-wrap: nowrap; align-items: flex-start; white-space: normal; }
  body[data-screen="/purchases"] .purchase-summary-security > span:last-child { min-width: 0; }
  .area-public :is(.golf-roster-table-wrap, .sponsor-review-table-wrap) { max-width: 100%; min-width: 0; overscroll-behavior-x: contain; }

  /* Content already uses responsive columns. Remove the remaining intrinsic
     field widths and prevent iOS from zooming into small text inputs. */
  .area-public .design-main :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea),
  .sp-client :is(.sp-search input, .sp-filter-bottom select, .spl-field input, .spl-field select, .spl-booking-controls select, .spf-field input, .sp-support-field input, .sp-support-field select, .sp-support-field textarea, .sp-support-reply textarea, .sp-payment-filter input, .sp-payment-filter select, .restored-field input, .restored-field select, .restored-field textarea) { min-width: 0; max-width: 100%; font-size: 16px; }
  .sp-client .restored-field input[type=file] { width: 100%; }
  .sp-client .sp-filter-bottom > [role=status] { white-space: normal; }
  .sp-client .sp-topbar { min-width: 0; }
  .sp-client .sp-breadcrumb { flex: 1; min-width: 0; }
  .sp-client .sp-breadcrumb strong { max-width: 100%; }
  .sp-client :is(.sp-booking-title h2, .sp-hub-heading h1, .participant-page-heading h2, .participant-branding-columns h2, .spf-account-summary dd) { overflow-wrap: anywhere; }

  /* Player save controls use the same gutter as their containing workspace. */
  .sp-client .spl-save-bar { margin-inline: -16px; padding-inline: 16px; }
  .sp-client .restored-participant { min-width: 0; padding-inline: 0; }
  .sp-client .participant-branding-columns > section { min-width: 0; }
  .sp-client .participant-artwork .secondary-button { max-width: 100%; white-space: normal; text-align: center; }
}

@media screen and (min-width: 801px) and (max-width: 1100px) {
  /* The profile footer must stay within the content beside the saved sidebar. */
  .sp-client .spf-save-bar { right: 24px; max-width: calc(100vw - var(--portal-sidebar-width, 242px) - 48px); flex-wrap: wrap; }
  .sp-client .spf-save-bar > p { flex: 1 1 100%; max-width: none; }
  .sp-client .spf-save-bar > div { min-width: 0; flex-wrap: wrap; margin-left: auto; }
}

@media screen and (max-width: 600px) {
  /* Keep primary page actions available when the heading stacks. */
  .sp-client .sp-page-heading > .sp-button { display: inline-flex; width: 100%; min-height: 44px; }
  .sp-client .sp-support-heading { flex-wrap: wrap; }
  .sp-client .sp-support-heading > div { flex: 1 1 220px; min-width: 0; }
  .sp-client .sp-support-heading > .sp-support-button { max-width: 100%; min-height: 44px; }
  .sp-client .sp-support-list > header,
  .sp-client .sp-support-conversation > header { flex-wrap: wrap; }
  .sp-client .sp-support-reply .sp-support-submit-row { flex-wrap: wrap; }
  .sp-client .sp-support-reply .sp-support-form-status { flex-basis: 100%; }
  .sp-client .sp-support-message > header > div { min-width: 0; flex: 1 1 150px; }
  .sp-client .sp-support-field > span:first-child { flex-wrap: wrap; }
  .sp-client .sp-support-field small { white-space: normal; }
  .sp-client .participant-save-bar { padding: 16px; gap: 10px; }
  .sp-client .participant-save-bar > :is(a, button) { flex: 1 1 180px; min-width: 0; max-width: 100%; white-space: normal; text-align: center; }
  .sp-client .spf-save-bar > div { min-width: 0; flex-wrap: wrap; }
  .sp-client .spf-save-bar .sp-button { flex: 1 1 112px; min-width: 0; white-space: normal; }

  /* Long names can share the digital-pass header with its schedule. Print
     dimensions are intentionally unaffected by these screen-only rules. */
  .sp-client [data-stitch-entry-passes] :is(.ep-event-brand, .ep-team-identity, .ep-a6-brand, .ep-mobile-person) > div { min-width: 0; }
  .sp-client [data-stitch-entry-passes] .ep-mobile-person { flex-wrap: wrap; }
  .sp-client [data-stitch-entry-passes] .ep-mobile-person h3 { overflow-wrap: anywhere; }
  .sp-client [data-stitch-entry-passes] .ep-heading-actions > .ep-button { flex: 1 1 140px; min-width: 0; white-space: normal; }
  .sp-client [data-stitch-entry-passes] .ep-card-code-area { flex-wrap: wrap; }
  .sp-client [data-stitch-entry-passes] .ep-card-code-area > div:last-child { flex: 1 1 120px; }

  /* Standalone authentication and checkout result pages use this stylesheet
     too; contain vendor CAPTCHA width without scaling its controls. */
  :is(.layout-centered, .layout-split, .layout-hero) .login-form-region { min-width: 0; padding: 16px; }
  :is(.layout-centered, .layout-split, .layout-hero) .login-form-region .card { min-width: 0; padding: 24px; }
  :is(.layout-centered, .layout-split, .layout-hero) .field input,
  .password-reset-card input { width: 100%; min-width: 0; max-width: 100%; font-size: 16px; }
  :is(.layout-centered, .layout-split, .layout-hero) :is(.error, .status),
  .password-reset-card :is(.notice, .reset-error) { overflow-wrap: anywhere; }
  :is(.password-reset-page, .layout-centered, .layout-split, .layout-hero) [data-google-captcha][data-version=v2] { max-width: 100%; overflow-x: auto; padding-bottom: 4px; overscroll-behavior-x: contain; }
  .password-reset-card { min-width: 0; padding: 24px; }
  .checkout-result .cr-site-header { flex-wrap: wrap; padding: 20px 16px; gap: 8px 16px; }
  .checkout-result .cr-back { max-width: 100%; min-height: 44px; }
  .checkout-result .cr-actions { flex-direction: column; }
  .checkout-result .cr-actions .cr-button { min-width: 0; width: 100%; white-space: normal; text-align: center; }
  .checkout-result :is(.cr-message, .cr-summary, .cr-event > div) { min-width: 0; }
  .checkout-result :is(.cr-intro, .cr-event strong, .cr-event span) { overflow-wrap: anywhere; }
}

@media screen and (max-width: 380px) {
  .sp-client .sp-player-grid { grid-template-columns: minmax(0, 1fr); }
  .sp-client .sp-booking-actions > div { grid-template-columns: minmax(0, 1fr); }
  .sp-client .sp-booking-badges,
  .sp-client .sp-dashboard-page .sp-booking-badges { margin-left: 0; }
  .sp-client .spl-rules-banner p { min-width: 0; flex-basis: 100%; }
  .sp-client .spl-rules-banner a { margin-left: 0; white-space: normal; }
}
