/*
 * Public Open Play UX extensions.
 * Calendar semantics, accessible helper text, profile tabs, and international
 * sign-up guidance live here so future public-page changes do not add another
 * override layer to the monolithic index.html stylesheet.
 */

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.calendar-day {
  border: 1px solid transparent;
  min-height: 44px;
}

.calendar-day.today {
  border-color: #111827;
  box-shadow: inset 0 0 0 1px #111827;
}

.calendar-day.selected {
  border-color: #bd9410;
  background: var(--spomo-yellow, var(--yellow, #ffd21e));
  color: #111827;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .12);
}

.calendar-day.selected::after {
  background: #111827;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #f6f8fb;
}

.calendar-legend .legend-today {
  border: 2px solid #111827;
}

.calendar-legend .legend-selected {
  border: 1px solid #bd9410;
  background: var(--spomo-yellow, var(--yellow, #ffd21e));
}

.calendar-legend .legend-session {
  position: relative;
  background: #dff4fb;
}

.calendar-legend .legend-session::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  transform: translateX(-50%);
}

.calendar-empty-state {
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px dashed #cbd5df;
  border-radius: 12px;
  background: #fbfcfd;
  color: #465364;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.profile-save-bar {
  position: static;
  bottom: auto;
  z-index: auto;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.profile-save-bar .btn {
  width: 100%;
  min-height: 46px;
}

#profileForm.signup-mode .profile-save-bar,
#profileForm.profile-edit-mode .profile-save-bar {
  position: static;
  bottom: auto;
  z-index: auto;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#profileModal.profile-signup-mode .modal {
  width: min(720px, calc(100vw - 36px));
  max-height: min(860px, calc(100dvh - 36px));
  border: 1px solid rgba(174, 184, 193, .72);
  border-radius: 20px;
}

#profileModal .modal {
  border: 1px solid rgba(174, 184, 193, .72);
  background: #f6f8f9;
}

#profileModal .modal-head,
#profileModal.profile-signup-mode .modal-head {
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 18px;
  border-bottom: 1px solid #dce3e7;
  background: #f6f8f9;
  color: #17212b;
}

#profileModal .modal-head > div,
#profileModal.profile-signup-mode .modal-head > div {
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
}

#profileModal .modal-head h2 {
  color: #17212b;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 900;
  line-height: 1.25;
}

#profileModal .modal-head .close,
#profileModal.profile-signup-mode .modal-head .close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: #e8edef;
  color: #17212b;
}

#profileModal .profile-body,
#profileModal.profile-signup-mode .profile-body {
  padding: 18px 32px 32px;
  background: #f6f8f9;
}

#profileForm.signup-mode,
#profileForm.profile-edit-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 760px);
  margin: 0 auto;
  column-gap: 12px;
  row-gap: 14px;
  justify-content: center;
}

#profileForm.signup-mode {
  width: min(100%, 620px);
}

#profileForm.signup-mode > *,
#profileForm.profile-edit-mode > * {
  min-width: 0;
}

#profileForm.signup-mode label,
#profileForm.profile-edit-mode label {
  gap: 7px;
  color: #4e5968;
  font-size: 12px;
  line-height: 1.25;
}

#profileForm.signup-mode .field,
#profileForm.signup-mode .country-code-trigger,
#profileForm.profile-edit-mode .field,
#profileForm.profile-edit-mode .country-code-trigger {
  min-height: 52px;
  height: 52px;
  border-color: #aeb7c1;
  border-radius: 12px;
  background: #fff;
  padding-inline: 14px;
  color: #17212b;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
}

#profileForm.signup-mode .field:hover,
#profileForm.signup-mode .country-code-trigger:hover,
#profileForm.profile-edit-mode .field:hover,
#profileForm.profile-edit-mode .country-code-trigger:hover {
  border-color: #7f8b96;
}

#profileForm.signup-mode .field:focus,
#profileForm.signup-mode .country-code-trigger:focus-visible,
#profileForm.profile-edit-mode .field:focus,
#profileForm.profile-edit-mode .country-code-trigger:focus-visible {
  outline: 0;
  border-color: #1685ad;
  box-shadow: 0 0 0 3px rgba(22, 133, 173, .12);
}

#profileForm.signup-mode .country-code-trigger {
  gap: 6px;
  padding-inline: 12px 9px;
}

#profileForm.profile-edit-mode .country-code-trigger {
  gap: 6px;
  padding-inline: 12px 9px;
}

#profileForm.signup-mode select.field,
#profileForm.profile-edit-mode select.field {
  padding-top: 0;
  padding-bottom: 0;
}

#profileForm.profile-edit-mode textarea.field {
  height: auto;
  min-height: 104px;
  padding-block: 12px;
}

#profileForm.profile-edit-mode :is(
  .profile-level-verification,
  .account-verification,
  .verification-action-row,
  .account-deletion-panel,
  .signup-consents
) {
  border-color: #d6dee3;
  border-radius: 14px;
  background: #fff;
}

#profileForm.signup-mode .signup-contact-row {
  grid-template-columns: minmax(180px, .82fr) minmax(310px, 1.18fr);
  gap: 12px;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid #e2e6ea;
}

#profileForm.signup-mode .signup-phone-row {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
}

#profileForm.signup-mode #selfLevelField {
  grid-column: 1 / -1;
  width: 100%;
}

.signup-email-request-row {
  grid-template-columns: minmax(220px, 1fr) max-content 204px;
  align-items: end;
  gap: 10px;
}

.signup-email-request-row:not(:has(> #signupTurnstileWrap:not(.hidden):not(.turnstile-idle))) {
  grid-template-columns: minmax(220px, 1fr) max-content;
}

.signup-email-request-row:not(:has(> #requestSignupEmailVerification:not(.hidden))) {
  grid-template-columns: minmax(0, 1fr);
}

.signup-email-request-row > .signup-email-field {
  min-width: 0;
}

.signup-email-request-row > .btn {
  min-height: 52px;
  height: 52px;
  border-radius: 12px;
  padding-inline: 17px;
  font-size: 12px;
}

.signup-email-request-row > #signupTurnstileWrap {
  align-self: end;
  width: 204px;
  min-height: 44px;
  height: 44px;
  overflow: hidden;
}

#signupTurnstile {
  width: 300px;
  height: 65px;
  transform: scale(.677);
  transform-origin: left top;
}

#signupTurnstile > div,
#signupTurnstile iframe {
  width: 300px !important;
  max-width: none !important;
  height: 65px !important;
}

.turnstile-wrap.turnstile-idle {
  position: fixed !important;
  left: -10000px !important;
  bottom: 0 !important;
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

.signup-contact-row {
  display: grid;
  grid-template-columns: minmax(180px, .85fr) minmax(360px, 1.35fr);
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.signup-phone-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.signup-contact-row > label,
.signup-phone-row > label {
  min-width: 0;
}

.country-code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.country-code-field > span {
  color: #596273;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.country-code-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 10px;
  text-align: left;
  cursor: pointer;
}

.country-code-trigger [data-country-code-trigger-label] {
  flex: 1 1 auto;
  min-width: max-content;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

html.profile-modal-open,
body.profile-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

#profileModal {
  overflow: hidden;
  overscroll-behavior: none;
}

#profileModal .modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#profileModal .profile-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#profileForm.signup-mode .signup-email-verification {
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #e0e5e9;
  border-radius: 12px;
  background: #fafbfb;
}

#profileForm.signup-mode .signup-email-verification .verification-action-row {
  min-height: 30px;
}

#profileForm.signup-mode .signup-email-verification .verification-action-row b {
  color: #17212b;
  font-size: 14px;
}

#profileForm.signup-mode > .security-note {
  margin-top: -5px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #687382;
  font-size: 11px;
  line-height: 1.5;
}

#profileForm.signup-mode .signup-consent-list {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid #e2e6ea;
}

#profileForm.signup-mode .profile-save-bar .btn {
  min-height: 54px;
  border-radius: 12px;
  font-size: 15px;
}

#profileForm.signup-mode .signup-recovery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: -4px;
}

#profileForm.signup-mode .signup-recovery-actions.hidden {
  display: none;
}

#profileForm.signup-mode .signup-recovery-actions .btn {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}

.country-picker-open {
  overflow: hidden;
}

.country-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 16, 24, .66);
  backdrop-filter: blur(5px);
}

.country-picker {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(540px, 100%);
  max-height: min(720px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid #d7e0e6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 16, 24, .3);
}

.country-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #e4e9ed;
}

.country-picker-head h2 {
  margin: 0;
  color: #111b24;
  font-size: 20px;
  line-height: 1.25;
}

.country-picker-head p {
  margin: 5px 0 0;
  color: #687684;
  font-size: 13px;
  line-height: 1.5;
}

.country-picker-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid #d7e0e6;
  border-radius: 50%;
  background: #f5f7f8;
  color: #1c2730;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.country-picker-search-wrap {
  padding: 14px 20px;
  background: #f7f9fa;
}

.country-picker-search {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.country-picker-list {
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
}

.country-picker-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #17212a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.country-picker-option:hover,
.country-picker-option:focus-visible {
  background: #eef4f7;
  outline: 2px solid transparent;
}

.country-picker-option.selected {
  background: #fff7cf;
  box-shadow: inset 0 0 0 1px #e6c23a;
}

.country-picker-flag {
  font-size: 22px;
}

.country-picker-name {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-picker-option strong {
  color: #50606d;
  font-size: 14px;
}

.country-picker-empty {
  margin: 18px;
  padding: 24px;
  border: 1px dashed #ccd5dc;
  border-radius: 12px;
  color: #687684;
  text-align: center;
}

.consent-service-notice {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f3f6f8;
  color: #5a6873;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.mobile-more-nav,
.mobile-more-menu {
  display: none;
}

.calendar-grid {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px;
  margin-inline: -2px;
  padding: 2px 2px 9px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: #aab4bf #edf1f4;
  scrollbar-width: thin;
}

/* Keep the wide date rail inside its grid track on tablet-sized screens. */
.intro-grid,
.intro-grid > * {
  min-width: 0;
  max-width: 100%;
}

.calendar-grid::-webkit-scrollbar {
  height: 7px;
}

.calendar-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf1f4;
}

.calendar-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #aab4bf;
}

.calendar-weekday,
.calendar-day-blank {
  display: none !important;
}

.calendar-day {
  flex: 0 0 72px;
  min-width: 72px;
  min-height: 68px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px 10px;
  border-radius: 11px;
  scroll-snap-align: center;
}

.calendar-day-weekday {
  display: block;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  opacity: .72;
}

.calendar-day-number {
  display: block;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.session-member-only-note {
  padding: 12px 14px;
  border: 1px solid #d8e0e5;
  border-radius: 10px;
  background: #f7f9fa;
  color: #53616d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.session-public-policy {
  display: grid;
  gap: 9px;
}

.session-public-policy .session-description + .session-description {
  padding-top: 9px;
  border-top: 1px solid #e1e7ea;
}

@media (max-width: 520px) {
  .country-picker-backdrop {
    place-items: end center;
    padding: 0;
  }

  .country-picker {
    width: 100%;
    max-height: min(82dvh, 720px);
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
  }
}

@media (max-width: 720px) {
  #profileModal {
    place-items: stretch;
    padding: 0;
  }

  #profileModal .modal {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  #profileModal.profile-signup-mode .modal {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  #profileModal .profile-body,
  #profileModal.profile-signup-mode .profile-body {
    padding: 16px clamp(16px, 5vw, 24px) calc(28px + env(safe-area-inset-bottom));
  }

  #profileModal .modal-head,
  #profileModal.profile-signup-mode .modal-head {
    min-height: calc(62px + env(safe-area-inset-top));
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  }

  #profileModal .modal-head h2 {
    font-size: 18px;
  }

  #profileForm.signup-mode,
  #profileForm.profile-edit-mode {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 560px);
  }

  #profileForm.signup-mode .signup-contact-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #profileForm.signup-mode .signup-phone-row {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  #profileForm.signup-mode #selfLevelField {
    width: 100%;
  }

  .signup-email-request-row,
  .signup-email-request-row:not(:has(> #signupTurnstileWrap:not(.hidden):not(.turnstile-idle))) {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .signup-email-request-row:not(:has(> #requestSignupEmailVerification:not(.hidden))) {
    grid-template-columns: minmax(0, 1fr);
  }

  .signup-email-request-row > #signupTurnstileWrap {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .signup-contact-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .signup-phone-row {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .intro-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .intro-grid > * {
    min-width: 0;
  }

  .top-primary-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px !important;
    overflow: visible !important;
    padding: 2px 0 4px !important;
  }

  .top-primary-nav > button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    justify-content: center;
    padding: 0 4px !important;
    overflow: hidden;
    font-size: clamp(11px, 3.25vw, 14px) !important;
    text-overflow: ellipsis;
  }

  .top-primary-nav > button > span:not(.dot):not(.level-menu-caret) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[lang="en"] .top-primary-nav > button {
    padding-inline: 2px !important;
    font-size: clamp(10px, 2.9vw, 12px) !important;
    letter-spacing: -.02em;
  }

  html[lang="en"] .top-primary-nav .level-menu-caret {
    margin-left: 3px;
  }

  .top-primary-nav .nav-mobile-secondary {
    display: none !important;
  }

  .top-primary-nav .mobile-more-nav {
    display: inline-flex !important;
  }

  .mobile-more-menu:not([hidden]) {
    display: grid;
  }

  .calendar-panel {
    margin-bottom: 12px;
    padding: 10px 8px 9px;
    overflow: hidden;
  }

  .calendar-head {
    margin-bottom: 8px;
    padding-inline: 2px;
  }

  .calendar-head .btn {
    width: 38px;
    min-width: 38px;
    min-height: 36px;
    padding: 0;
  }

  .calendar-head b {
    font-size: 14px;
  }

  .calendar-grid {
    gap: 7px;
    margin-inline: -1px;
    padding: 2px 1px 7px;
    scrollbar-width: none;
  }

  .calendar-grid::-webkit-scrollbar {
    display: none;
  }

  .calendar-day {
    flex: 0 0 54px;
    min-width: 54px;
    min-height: 62px;
    gap: 4px;
    padding: 7px 5px 9px;
  }

  .calendar-day-weekday {
    font-size: 10px;
  }

  .calendar-day-number {
    font-size: 17px;
  }

  .calendar-day.has-session::after {
    bottom: 5px;
  }

  .calendar-legend {
    gap: 6px 11px;
    margin-top: 7px;
    padding-inline: 2px;
    font-size: 10px;
  }

  .calendar-legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
  }
}

@media (max-width: 420px) {
  #profileForm.signup-mode .signup-recovery-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  #profileForm.signup-mode .signup-phone-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 6px;
  }

  .signup-email-request-row,
  .signup-email-request-row:not(:has(> #signupTurnstileWrap:not(.hidden):not(.turnstile-idle))) {
    grid-template-columns: minmax(0, 1fr);
  }

  .signup-email-request-row > .btn {
    grid-column: 1;
    width: 100%;
  }

  .signup-email-request-row > #signupTurnstileWrap {
    grid-column: 1;
    width: 204px;
  }

  .signup-phone-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 6px;
  }
}

/* Keep the public session search and both filters in one compact row. */
#apply .session-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(116px, 150px) minmax(116px, 150px);
  gap: 8px;
}

#apply .session-toolbar > .field {
  min-width: 0;
  width: 100%;
  height: 44px;
  margin: 0;
}

@media (max-width: 780px) {
  #apply .session-toolbar {
    grid-template-columns: minmax(0, 1fr) 100px 100px;
    gap: 6px;
  }

  #apply .session-toolbar #search {
    padding-inline: 12px;
    font-size: 13px;
  }

  #apply .session-toolbar select {
    padding: 0 18px 0 7px;
    font-size: 12px;
    letter-spacing: -.025em;
  }
}

@media (max-width: 350px) {
  #apply .session-toolbar {
    grid-template-columns: minmax(0, 1fr) 94px 94px;
    gap: 5px;
  }

  #apply .session-toolbar select {
    padding-right: 16px;
    padding-left: 5px;
    font-size: 11.5px;
  }
}

/*
 * Public card shell cleanup.
 * Keep the existing card palettes and functional status colors, but remove
 * the decorative color strokes from the program intro, date, and session
 * card shells. This block is intentionally isolated for a simple rollback.
 */
#apply .standard-block .guide-intro {
  border-color: rgba(255, 255, 255, .1);
  border-left-width: 1px;
}

#apply .standard-block .guide-intro::before {
  display: none;
}

#apply .public-session-day-header {
  box-shadow: 0 7px 18px rgba(15, 22, 29, .08);
}

#apply .public-session-day-track > .session-card {
  border-top: 1px solid rgba(187, 199, 205, .82) !important;
}

/*
 * Public program and session readability refinement.
 * Increase the three core session facts, keep the mobile guide carousel
 * compact, and use one calm color for booking progress.
 */
#apply .public-session-day-track .session-fact-label {
  font-size: 13px;
  line-height: 1.2;
}

#apply .public-session-day-track .session-fact strong {
  font-size: 17px;
}

#apply .public-session-day-track .session-capacity-meter .bar span {
  background: var(--spomo-cyan, #23a6d5);
}

@media (max-width: 720px) {
  #apply .standard-block .guide-item {
    min-height: 198px;
    padding: 15px 16px;
    gap: 8px;
  }

  #apply .public-session-day-track .session-fact-label {
    font-size: 13px;
  }

  #apply .public-session-day-track .session-fact strong {
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  #apply .standard-block .guide-item {
    min-height: 190px;
    padding: 14px 15px;
  }
}

/* Data-load state: never flash an incorrect empty-session message. */
.public-session-loading {
  display: grid;
  gap: 14px;
}

.public-session-skeleton {
  display: grid;
  gap: 13px;
  min-height: 226px;
  padding: 18px;
  border: 1px solid #d9e1e5;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.public-session-skeleton-line,
.public-session-skeleton-facts i,
.public-session-skeleton-action {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf1f3 25%, #f8fafb 42%, #edf1f3 62%);
  background-size: 280% 100%;
  animation: public-session-skeleton-shimmer 1.2s ease-in-out infinite;
}

.public-session-skeleton-line {
  width: 46%;
  height: 22px;
}

.public-session-skeleton-line.is-short {
  width: 31%;
  height: 18px;
}

.public-session-skeleton-line.is-title {
  width: min(72%, 520px);
  height: 30px;
}

.public-session-skeleton-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e2e7ea;
  border-radius: 12px;
}

.public-session-skeleton-facts i {
  height: 72px;
  border-radius: 0;
}

.public-session-skeleton-action {
  width: 100%;
  height: 58px;
  margin-top: auto;
}

@keyframes public-session-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .public-session-skeleton-line,
  .public-session-skeleton-facts i,
  .public-session-skeleton-action {
    animation: none;
  }
}

/* One primary status plus calm secondary session metadata. */
#apply .session-primary-status {
  order: -2;
}

#apply .session-event-badge {
  order: -1;
}

#apply .session-policy-note {
  align-self: center;
  color: #647381;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.public-session-carousel-position {
  display: none;
}

.application-lifecycle {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: #475467;
  background: #f2f4f7;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.application-lifecycle.wait {
  color: #7a5200;
  background: #fff8e1;
}

.application-lifecycle.payment {
  color: #145b74;
  background: #eaf8fc;
}

.application-lifecycle.refund {
  color: #126348;
  background: #e9f8f1;
}

.application-lifecycle.no-refund {
  color: #9b2c23;
  background: #fff1ef;
}

/* Important controls use the recommended mobile touch target. */
#apply .calendar-head .btn,
.global-topbar .lang-switch button,
.global-topbar .top-primary-nav > button,
.global-topbar .header-utility button {
  min-height: 44px;
}

#apply .calendar-head .btn {
  min-width: 44px;
}

@media (max-width: 720px) {
  #apply .calendar-head .btn {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  #sessionList:not(.is-date-filtered) .public-session-carousel-position {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: rgba(238, 244, 247, .86);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
  }

  #sessionList:not(.is-date-filtered) .public-session-carousel-position[hidden] {
    display: none;
  }

  .public-session-skeleton {
    min-height: 248px;
  }
}

/* My applications keeps the live/past scope and its native date picker together. */
#requests .my-applications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

#requests .my-applications-toolbar h2 {
  margin: 0;
}

#requests .my-applications-controls {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
}

#requests .my-applications-filter {
  position: relative;
  display: block;
  width: min(238px, 100%);
  min-width: 220px;
}

#requests .my-applications-filter select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 52px 0 16px;
  border: 1px solid rgba(28, 28, 30, .12);
  border-radius: 14px;
  color: #1c1c1e;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 247, 249, .96));
  font: inherit;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(17, 24, 32, .07), inset 0 1px 0 rgba(255, 255, 255, .9);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

#requests .my-applications-filter:hover select {
  border-color: rgba(28, 28, 30, .2);
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .05), 0 10px 28px rgba(17, 24, 32, .09), inset 0 1px 0 #fff;
}

#requests .my-applications-filter:focus-within select {
  outline: none;
  border-color: rgba(0, 122, 255, .55);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, .12), 0 8px 24px rgba(17, 24, 32, .08), inset 0 1px 0 #fff;
}

#requests .my-applications-filter-chevron {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  border: 1px solid rgba(28, 28, 30, .06);
  border-radius: 10px;
  color: #636366;
  background: rgba(229, 229, 234, .78);
  pointer-events: none;
}

#requests .my-applications-filter-chevron svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#requests .application-cancellation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #f0d5cf;
  border-radius: 10px;
  color: #74473e;
  background: #fff8f6;
  font-size: 13px;
  line-height: 1.45;
}

#requests .application-cancellation-summary strong {
  color: #a04434;
  font-weight: 900;
}

/* My Applications: put the visit time and counter check-in journey first. */
#requests .my-application-card {
  position: relative;
  gap: 12px;
  padding: 17px;
  overflow: hidden;
  border-color: rgba(60, 60, 67, .18);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(16, 24, 32, .06);
  cursor: pointer;
}

#requests .my-application-card::before {
  display: none;
}

#requests .my-application-card .session-head {
  align-items: flex-start;
  gap: 7px;
}

#requests .my-application-card .session-head h3 {
  flex: 1 1 320px;
  color: #111820;
  font-size: clamp(18px, 2.3vw, 22px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -.025em;
}

#requests .my-application-schedule {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #dbe3e6;
  border-radius: 12px;
  color: #111820;
  background: #f6f8f8;
}

#requests .my-application-schedule-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #1769aa;
  background: #eaf4ff;
  font-size: 17px;
  font-weight: 900;
}

#requests .my-application-schedule strong {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#requests .my-application-payment-meta {
  margin: 0;
  color: #71808b;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

#requests .member-checkin-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(60, 60, 67, .16);
  border-radius: 14px;
  background: #f7f8fa;
}

#requests .member-checkin-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#requests .member-checkin-copy strong {
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.3;
}

#requests .member-checkin-copy span {
  color: #636366;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.5;
  word-break: keep-all;
}

#requests .member-checkin-copy small {
  color: #24745f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

#requests .member-checkin-action {
  display: grid;
  width: 100%;
  place-items: center;
}

#requests .member-checkin-button,
#requests .checkin-status-button {
  width: min(100%, 280px);
  min-height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
}

#requests .member-checkin-button {
  border: 1px solid #1d1d1f;
  color: #fff;
  background: #1d1d1f;
  box-shadow: 0 6px 18px rgba(29, 29, 31, .16);
}

#requests .member-checkin-button:hover,
#requests .member-checkin-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, .14), 0 10px 24px rgba(29, 29, 31, .18);
}

#requests .checkin-status-button,
#requests .checkin-status-button:disabled {
  border: 1px solid #9fd4c4;
  color: #08664f;
  background: #e1f6ef;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

#requests .my-application-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 280px);
  margin-right: 14px;
  margin-left: auto;
  padding-top: 2px;
}

#requests .my-application-primary-actions.is-single {
  grid-template-columns: minmax(0, 1fr);
}

#requests .my-application-primary-actions.has-dupr-result {
  width: min(100%, 560px);
}

#requests .my-application-primary-actions.has-dupr-result.has-cancellation {
  width: min(100%, 720px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#requests .my-application-primary-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  white-space: normal;
  box-shadow: none;
}

#requests .my-application-state-button.is-payment {
  border: 1px solid #007aff;
  color: #fff;
  background: #007aff;
}

#requests .my-application-state-button.is-payment:hover,
#requests .my-application-state-button.is-payment:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, .14), 0 8px 20px rgba(0, 122, 255, .18);
}

#requests .my-application-state-button.is-confirmed,
#requests .my-application-state-button.is-confirmed:disabled {
  border: 1px solid #9fd4c4;
  color: #08664f;
  background: #e1f6ef;
  cursor: default;
  opacity: 1;
}

#requests .my-application-state-button.is-wait,
#requests .my-application-state-button.is-wait:disabled,
#requests .my-application-state-button.is-neutral,
#requests .my-application-state-button.is-neutral:disabled {
  border: 1px solid rgba(60, 60, 67, .18);
  color: #636366;
  background: #f2f2f7;
  cursor: default;
  opacity: 1;
}

#requests .my-application-cancel-button {
  border: 1px solid rgba(215, 0, 21, .32);
  color: #c9342b;
  background: #fff;
}

#requests .my-application-cancel-button:hover,
#requests .my-application-cancel-button:focus-visible {
  outline: none;
  color: #b42318;
  background: #fff5f4;
  box-shadow: 0 0 0 4px rgba(215, 0, 21, .08);
}

#requests .my-application-cancel-button:disabled {
  border-color: rgba(60, 60, 67, .14);
  color: #8e8e93;
  background: #f2f2f7;
  cursor: default;
  opacity: 1;
}

#requests .my-application-dupr-button {
  border: 1px solid #1d1d1f;
  color: #fff;
  background: #1d1d1f;
}

#requests .my-application-dupr-button:hover,
#requests .my-application-dupr-button:focus-visible {
  outline: none;
  color: #fff;
  background: #000;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, .12);
}

/* Court and lesson records use the same booking-card hierarchy as Open Play. */
#requests .member-service-schedule-card {
  position: relative;
  gap: 13px;
  padding: 16px;
  overflow: hidden;
  border-color: rgba(60, 60, 67, .18);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(16, 24, 32, .06);
}

#requests .member-service-schedule-card::before {
  display: none;
}

#requests .member-service-schedule-card--lesson::before,
#requests .member-service-schedule-card--lesson_waitlist::before {
  background: #8d7ac3;
}

#requests .member-service-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

#requests .member-service-card-kind {
  color: #62717c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

#requests .member-service-card-main {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

#requests .member-service-card-date {
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  color: #fff;
  background: #121d25;
  text-align: center;
}

#requests .member-service-card-date strong {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

#requests .member-service-card-date span {
  color: #d8e0e5;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

#requests .member-service-card-copy {
  min-width: 0;
  display: grid;
  gap: 9px;
}

#requests .member-service-card-copy h3 {
  margin: 0;
  color: #111820;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#requests .member-service-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  color: #66747f;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

#requests .member-service-card-meta span {
  position: relative;
}

#requests .member-service-card-meta span + span::before {
  content: "·";
  position: absolute;
  left: -9px;
  color: #a7b0b6;
}

#requests .member-service-card-note {
  margin: 0;
  color: #7b5a16;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

#requests .member-service-card-actions {
  padding-top: 11px;
  border-top: 1px solid #e4e9ec;
}

/* Public page check-in modal. These rules intentionally live in the public
   stylesheet instead of the admin-only shared console stylesheet. */
.checkin-pass-modal {
  width: min(420px, calc(100vw - 28px));
  max-width: 420px;
  max-height: min(680px, calc(100dvh - 28px));
  overflow: hidden;
}

.checkin-pass-body {
  display: grid;
  gap: 11px;
  padding: 16px;
  overflow-y: auto;
  text-align: center;
}

.checkin-pass-code {
  display: grid;
  width: min(100%, 270px);
  aspect-ratio: 1;
  box-sizing: border-box;
  justify-self: center;
  margin-inline: auto;
  padding: 8px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8e0e2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(18, 32, 40, .07);
}

.checkin-pass-code[hidden],
.checkin-pass-group-help[hidden] {
  display: none !important;
}

.checkin-pass-code img {
  display: block;
  width: 100%;
  max-width: 252px;
  height: auto;
  justify-self: center;
  margin-inline: auto;
}

.checkin-pass-help,
.checkin-pass-group-help {
  max-width: 360px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.55;
  word-break: keep-all;
}

.checkin-pass-help {
  color: #66747c;
}

.checkin-pass-group-help {
  padding: 9px 11px;
  border-left: 3px solid #ffd21f;
  color: #26343b;
  background: #f5f7f6;
  font-weight: 800;
  text-align: left;
}

.checkin-pass-body > .status-note {
  width: 100%;
  margin: 0;
  text-align: center;
}

@media (max-width: 640px) {
  #requests .my-applications-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  #requests .my-applications-filter {
    width: 100%;
    min-width: 0;
  }

  #requests .my-applications-controls {
    flex-wrap: wrap;
  }

  #requests .my-applications-controls {
    width: 100%;
  }

  #requests .member-service-schedule-card {
    gap: 11px;
    padding: 14px;
  }

  #requests .my-application-card {
    gap: 10px;
    padding: 14px;
  }

  #requests .my-application-card .session-head h3 {
    flex-basis: 100%;
    font-size: 18px;
  }

  #requests .my-application-schedule {
    min-height: 44px;
    padding: 9px 10px;
  }

  #requests .my-application-schedule strong {
    font-size: 14px;
  }

  #requests .member-checkin-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
    padding: 12px;
  }

  #requests .member-checkin-action,
  #requests .member-checkin-button,
  #requests .checkin-status-button {
    width: 100%;
  }

  #requests .my-application-primary-actions {
    width: calc(100% - 24px);
    margin-right: 12px;
    margin-left: 12px;
  }

  #requests .my-application-primary-actions.has-dupr-result,
  #requests .my-application-primary-actions.has-dupr-result.has-cancellation {
    width: calc(100% - 24px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #requests .my-application-primary-actions.has-dupr-result.has-cancellation .my-application-cancel-button {
    grid-column: 1 / -1;
  }

  #requests .my-application-primary-actions .btn {
    min-height: 48px;
  }

  #requests .member-service-card-main {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
  }

  #requests .member-service-card-date {
    min-height: 64px;
    border-radius: 10px;
  }

  #requests .member-service-card-date strong {
    font-size: 16px;
  }

  #requests .member-service-card-copy h3 {
    font-size: 17px;
  }

  #requests .member-service-card-meta {
    gap: 5px 12px;
    font-size: 12px;
  }

  .checkin-pass-modal {
    width: calc(100vw - 20px);
  }

  .checkin-pass-body {
    gap: 10px;
    padding: 14px;
  }

  .checkin-pass-code {
    width: min(100%, 248px);
    border-radius: 9px;
  }
}

/* iOS Safari/WKWebView zooms the page when a focused form control is below
   16px. Keep every customer-facing mobile control at the safe threshold. */
@media (max-width: 780px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}
