:root {
  --navy: #0b2545;
  --navy-quiet: #0a2f55;
  --blue: #1677d2;
  --blue-dark: #12558f;
  --blue-soft: #e8f3ff;
  --blue-line: #bdd5eb;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --surface-3: #eef3f8;
  --border: #dde6ef;
  --border-strong: #c3d0dd;
  --text: #0b2545;
  --muted: #5f6c7d;
  --muted-light: #aab5c0;
  --success: #2dbb90;
  --success-bg: #e3f7f1;
  --amber: #8a6100;
  --amber-bg: #fdf1d9;
  --error: #e5484d;
  --error-bg: #fbe7e8;
  --info: #1677d2;
  --info-bg: #e8f3ff;
  --disabled: #aab5c0;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --max-content: 1080px;
  --shadow-card: 0 2px 8px rgb(10 47 85 / 7%);
  --shadow-float: 0 6px 18px rgb(10 47 85 / 10%);
  /* Typography follows the Front Desk Dashboard font stack. */
  --font-body: "Noto Sans Thai", "Noto Sans", sans-serif;
  --font-heading: "Kanit", "Noto Sans Thai", "Noto Sans", sans-serif;
  --font-brand: "Mitr", "Noto Sans Thai", "Noto Sans", sans-serif;
  --font-mono: "IBM Plex Mono", "Noto Sans Thai", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
  color-scheme: light;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-heading);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

.brand-wordmark,
.eyebrow,
.tag,
.section-head__meta,
.next-booking__action,
.openplay-kicker {
  font-family: var(--font-brand);
}

.numeric,
.court-time,
.price strong,
.total-row strong,
.booking-card__no,
.booking-number,
.payment-summary strong,
.hold-alert time,
.qr-card__expiry time,
.openplay-card__top > strong,
.openplay-card__footer > span strong,
.openplay-price > strong {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(21 95 169 / 30%);
  outline-offset: 3px;
}

::selection {
  background: rgb(22 119 210 / 16%);
}

.icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.svg-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.icon--small {
  width: 16px;
  height: 16px;
}

.icon--medium {
  width: 22px;
  height: 22px;
}

.app-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgb(221 230 239 / 88%);
  background: var(--surface);
}

.app-header__inner {
  display: flex;
  width: min(100% - 32px, var(--max-content));
  min-height: 64px;
  align-items: center;
  gap: 13px;
  margin: 0 auto;
}

.brand-lockup {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-wordmark strong {
  color: var(--navy);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.brand-wordmark strong span {
  color: var(--blue);
}

.brand-wordmark small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.header-back {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--navy);
}

.header-back:hover,
.icon-button:hover {
  background: var(--bg);
}

.header-title {
  min-width: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.icon-button {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--navy);
}

.profile-button {
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  gap: 7px;
  padding: 4px 4px 4px 6px;
  border-radius: var(--radius-md);
  color: var(--navy);
}

.profile-button:hover {
  background: var(--bg);
}

.profile-avatar {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.profile-name {
  font-size: 13px;
  font-weight: 700;
}

.app-main {
  width: min(100% - 32px, var(--max-content));
  min-height: calc(100vh - 110px);
  margin: 0 auto;
  padding: 24px 0 118px;
}

.app-main:focus {
  outline: 0;
}

.page-content {
  animation: page-enter 180ms ease-out both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.page-intro h1,
.page-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.page-intro p:not(.eyebrow),
.page-heading p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.member-chip {
  display: flex;
  min-width: 242px;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-md);
  background: var(--blue-soft);
  text-align: left;
}

.member-chip:hover {
  border-color: var(--blue);
}

.member-chip__identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-chip__icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue);
}

.member-chip strong,
.member-chip small {
  display: block;
}

.member-chip strong {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.member-chip small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.member-chip > .icon {
  color: var(--blue);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.booking-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.booking-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 4px;
  border-radius: 0 0 0 8px;
  background: var(--blue);
  content: "";
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2,
.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-head__meta {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.sport-block {
  margin-top: 24px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.muted-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.sport-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sport-card {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.sport-card:hover {
  border-color: var(--blue-line);
}

.sport-card:active {
  transform: scale(0.985);
}

.sport-card[data-active="true"] {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
  color: var(--blue);
}

.sport-card__visual {
  display: block;
  width: 100%;
  height: 78px;
  overflow: hidden;
  background: #e9f0f7;
}

.sport-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sport-card__visual.image-fallback::after {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  content: "ภาพกีฬาไม่พร้อม";
  font-size: 10px;
  font-weight: 800;
}

.sport-card strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.sport-card[data-active="true"] strong {
  color: var(--blue);
}

.sport-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.field__control {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field__control:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(22 119 210 / 10%);
}

.field__control--error,
.field__control--error:focus-within {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgb(229 72 77 / 10%);
}

.field__control > .icon {
  color: var(--muted);
}

.field__control select,
.field__control input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.field__control select {
  appearance: none;
  cursor: pointer;
}

.field__control .select-chevron {
  pointer-events: none;
  color: var(--muted);
}

.booking-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.booking-note .icon {
  color: var(--blue);
}

.field-error {
  margin: -2px 0 0;
  color: var(--error);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.sport-grid[aria-invalid="true"] {
  padding: 3px;
  border: 1px solid var(--error);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 3px rgb(229 72 77 / 10%);
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #f3c6c8;
  border-radius: var(--radius-md);
  background: var(--error-bg);
  color: var(--error);
  font-size: 12px;
  font-weight: 750;
}

.form-alert .icon {
  flex: 0 0 auto;
}

.button-row {
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-button {
  width: 100%;
  background: var(--blue);
  box-shadow: 0 4px 10px rgb(22 119 210 / 18%);
  color: #fff;
}

.primary-button:hover {
  background: var(--blue-dark);
  box-shadow: 0 6px 14px rgb(22 119 210 / 24%);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  background: var(--surface-3);
  box-shadow: none;
  color: var(--disabled);
  cursor: not-allowed;
}

.secondary-button {
  width: 100%;
  border: 1px solid var(--blue);
  background: var(--surface);
  color: var(--blue);
}

.secondary-button:hover {
  background: var(--blue-soft);
}

.ghost-button {
  color: var(--blue);
}

.ghost-button:hover {
  background: var(--blue-soft);
}

.button--compact {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 12px;
}

.availability-section {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.section-heading__count {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.section-heading__count small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.availability-context {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-md);
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 12px;
}

.availability-context .icon {
  color: var(--blue);
}

.availability-context strong {
  color: var(--navy);
  font-weight: 800;
}

.court-list,
.booking-list,
.package-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.court-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 175px;
  gap: 17px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.court-card:hover {
  border-color: var(--blue-line);
  box-shadow: 0 6px 18px rgb(10 47 85 / 10%);
}

.court-photo {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e9f0f7;
}

.court-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 126px;
  object-fit: cover;
}

.court-photo.image-fallback::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  content: "ภาพสนามไม่พร้อม";
  font-size: 11px;
  font-weight: 800;
}

.court-main {
  min-width: 0;
  padding: 5px 0;
}

.court-title-row,
.booking-card__top,
.package-card__top,
.detail-row,
.price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.court-title-row h3,
.booking-card__top h3,
.package-card__top h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-card__top h3,
.package-card__top h3 {
  font-weight: 850;
}

.court-title-row h3 {
  font-weight: 600;
}

.court-description {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.tag--success {
  border-color: transparent;
  background: var(--success-bg);
  color: var(--success);
}

.tag--pending {
  border-color: transparent;
  background: var(--amber-bg);
  color: var(--amber);
}

.tag--error {
  border-color: transparent;
  background: var(--error-bg);
  color: var(--error);
}

.tag--info {
  border-color: transparent;
  background: var(--blue-soft);
  color: var(--blue);
}

.amenity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 17px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  list-style: none;
}

.amenity-list li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.amenity-list .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.court-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: 4px 1px 1px 0;
  text-align: right;
}

.availability-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 12px;
  font-weight: 850;
}

.court-time {
  margin: 1px 0 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 750;
}

.price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price strong {
  color: var(--blue);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.price small {
  color: var(--muted);
  font-size: 10px;
}

.court-side .primary-button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 12px;
}

.next-booking {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 17px 18px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-lg);
  background: var(--blue-soft);
}

.next-booking__icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
}

.next-booking__body {
  min-width: 0;
  flex: 1;
}

.next-booking__body h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 850;
}

.next-booking__body p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-booking__action {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.state-panel {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.state-panel__icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.state-panel h3,
.state-panel p {
  margin: 0;
}

.state-panel h3 {
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
}

.state-panel p {
  max-width: 410px;
  color: var(--muted);
  font-size: 12px;
}

.state-panel--error {
  border-style: solid;
  border-color: #f3c6c8;
  background: var(--error-bg);
}

.state-panel--error .state-panel__icon {
  background: var(--error-bg);
  color: var(--error);
}

.state-panel__actions {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 175px;
  gap: 17px;
  min-height: 152px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.skeleton {
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton--photo {
  min-height: 126px;
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}

.skeleton--line {
  height: 12px;
}

.skeleton--line.wide {
  width: 70%;
}

.skeleton--line.medium {
  width: 46%;
}

.skeleton--line.short {
  width: 30%;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.54;
  }
  50% {
    opacity: 1;
  }
}

.page-heading {
  margin-bottom: 22px;
}

.page-heading--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: min(100%, 300px);
  margin-bottom: 18px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.segmented-control button {
  min-height: 40px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.segmented-control button[data-active="true"] {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 6px rgb(22 119 210 / 16%);
}

.booking-card--list {
  display: flex;
  min-height: 110px;
  align-items: center;
  gap: 14px;
  padding: 16px;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.booking-card--list:hover {
  border-color: var(--blue-line);
}

.booking-card__sport-image {
  display: block;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #e9f0f7;
}

.booking-card__sport-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking-card__sport-image.image-fallback::after {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  content: "ภาพสนามไม่พร้อม";
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.booking-card__body {
  min-width: 0;
  flex: 1;
}

.booking-card__top {
  align-items: center;
}

.booking-card__top h3 {
  font-size: 15px;
}

.booking-card__meta,
.booking-card__no {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.booking-card__no {
  font-family: var(--font-mono);
  font-size: 10px;
}

.booking-card__right {
  display: flex;
  min-width: 104px;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.booking-card__right .price strong {
  font-size: 18px;
}

.booking-card__right .icon {
  color: var(--muted);
}

.dark-membership {
  position: relative;
  overflow: hidden;
  padding: 23px;
  border-radius: var(--radius-xl);
  background: var(--navy);
  color: #fff;
}

.membership-back {
  width: auto;
  min-width: 180px;
  flex: 0 0 auto;
}

.membership-back .svg-icon {
  width: 16px;
}

.dark-membership::after {
  position: absolute;
  right: 18px;
  bottom: -28px;
  width: 145px;
  height: 145px;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 50%;
  content: "";
}

.dark-membership__top,
.dark-membership__dates,
.dark-membership__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dark-membership__top strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  font-weight: 850;
}

.dark-membership__top small,
.dark-membership__date small {
  color: rgb(255 255 255 / 62%);
  font-size: 11px;
}

.dark-membership__dates {
  justify-content: flex-start;
  gap: 38px;
  margin-top: 22px;
}

.dark-membership__date strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 750;
}

.dark-membership__bottom {
  align-items: center;
  margin-top: 22px;
}

.dark-membership__bottom p {
  max-width: 300px;
  margin: 0;
  color: rgb(255 255 255 / 70%);
  font-size: 11px;
}

.dark-membership .secondary-button {
  width: auto;
  min-width: 116px;
  min-height: 44px;
  border-color: #fff;
  background: transparent;
  color: #fff;
  font-size: 12px;
}

.dark-membership .secondary-button:hover {
  background: rgb(255 255 255 / 10%);
}

.packages-section {
  margin-top: 28px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin: 0;
  color: var(--navy);
  font-size: 19px;
  font-weight: 850;
}

.section-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.package-card__visual img,
.package-detail__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.package-card__visual.image-fallback::after,
.package-detail__visual.image-fallback::after {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  content: "ภาพสนามไม่พร้อม";
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.package-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.package-card__visual {
  position: relative;
  width: 132px;
  height: 100px;
  min-height: 100px;
  flex: 0 0 132px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e9f0f7;
}

.package-card__body {
  min-width: 0;
  flex: 1;
}

.package-card__top h3 {
  font-size: 15px;
}

.package-card__body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.package-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 11px;
}

.package-card__action {
  display: flex;
  min-width: 132px;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.package-card__action .price strong {
  font-size: 19px;
}

.package-card__action .primary-button {
  width: auto;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 11px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.contact-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
}

.contact-card__icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--blue);
}

.contact-card h2 {
  margin: 19px 0 5px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 850;
}

.contact-card p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-card .primary-button {
  width: auto;
  min-width: 184px;
  margin-top: 21px;
}

.contact-details {
  padding: 23px;
}

.contact-details h2 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 850;
}

.contact-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}

.contact-detail-row:first-of-type {
  border-top: 0;
}

.contact-detail-row .icon {
  color: var(--blue);
}

.contact-detail-row strong,
.contact-detail-row small {
  display: block;
}

.contact-detail-row strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.contact-detail-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
}

.contact-note .icon {
  color: var(--blue);
}

.flow-page {
  width: min(100%, 720px);
  margin: 0 auto;
}

.flow-page--wide {
  width: min(100%, 920px);
}

.flow-page__intro {
  margin-bottom: 19px;
}

.flow-page__intro h1 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.flow-page__intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.flow-card {
  padding: 20px;
}

.flow-card + .flow-card {
  margin-top: 12px;
}

.flow-card h2 {
  margin: 0 0 15px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 850;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.summary-list > div,
.detail-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.summary-list dt,
.detail-list dt {
  color: var(--muted);
  font-size: 13px;
}

.summary-list dd,
.detail-list dd {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.flow-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--border);
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.total-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.total-row strong {
  color: var(--blue);
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1;
}

.member-price-note {
  margin: 12px 0 0;
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.settlement-picker {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.settlement-picker legend {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
}

.settlement-options {
  display: grid;
  gap: 8px;
}

.settlement-option {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.settlement-option:hover {
  border-color: var(--blue-line);
}

.settlement-option:focus-within {
  outline: 3px solid rgb(21 95 169 / 30%);
  outline-offset: 3px;
}

.settlement-option.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.settlement-option.is-disabled {
  background: var(--surface-2);
  cursor: not-allowed;
  opacity: 0.7;
}

.settlement-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.settlement-option__content {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
  flex: 1;
}

.settlement-option__icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--blue);
}

.settlement-option.is-selected .settlement-option__icon {
  background: var(--surface);
}

.settlement-option__content strong,
.settlement-option__content small {
  display: block;
}

.settlement-option__content strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.settlement-option__content small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.settlement-option__status {
  align-self: flex-start;
  flex: 0 0 auto;
}

.settlement-picker__help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.total-row--credit strong {
  font-size: 24px;
}

.flow-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-md);
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 12px;
}

.flow-note .icon {
  color: var(--blue);
}

.payment-recovery-note > span {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.payment-recovery-note .inline-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: -4px 0 -4px -8px;
  padding: 4px 8px;
}

.sticky-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 25;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 -6px 18px rgb(10 47 85 / 8%);
}

.sticky-footer__inner {
  width: min(100%, 640px);
  margin: 0 auto;
}

.payment-footer-actions {
  display: grid;
  gap: 8px;
}

.hold-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid #efd18b;
  border-radius: var(--radius-lg);
  background: var(--amber-bg);
}

.hold-alert .icon {
  color: var(--amber);
}

.hold-alert strong,
.hold-alert p {
  display: block;
  margin: 0;
}

.hold-alert strong {
  color: var(--amber);
  font-size: 13px;
  font-weight: 850;
}

.hold-alert p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.hold-alert time {
  color: var(--navy);
  font-family: var(--font-mono);
  font-weight: 850;
}

.status-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.status-banner--pending {
  border-color: #efd18b;
  background: var(--amber-bg);
}

.status-banner--success {
  border-color: #b5e5d4;
  background: var(--success-bg);
}

.status-banner--error {
  border-color: #f3c6c8;
  background: var(--error-bg);
}

.status-banner--info {
  border-color: var(--blue-line);
  background: var(--blue-soft);
}

.status-banner__icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--surface);
}

.status-banner--pending .status-banner__icon {
  color: var(--amber);
}

.status-banner--success .status-banner__icon {
  color: var(--success);
}

.status-banner--error .status-banner__icon {
  color: var(--error);
}

.status-banner--info .status-banner__icon {
  color: var(--blue);
}

.status-banner strong,
.status-banner p {
  display: block;
  margin: 0;
}

.status-banner strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
}

.status-banner p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.payment-summary small,
.payment-summary strong {
  display: block;
}

.payment-summary small {
  color: var(--muted);
  font-size: 11px;
}

.payment-summary strong {
  margin-top: 3px;
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 12px;
}

.payment-summary .price strong {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 26px;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.qr-frame {
  display: inline-flex;
  width: 188px;
  height: 188px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #fff;
}

.qr-frame svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.qr-card__expiry {
  color: var(--amber) !important;
}

.qr-card__expiry time {
  color: var(--navy);
  font-family: var(--font-mono);
  font-weight: 850;
}

.slip-upload {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.slip-upload__heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.slip-upload__icon,
.slip-upload__dropzone-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.slip-upload__heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.slip-upload__heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.slip-upload__optional {
  margin-left: 6px;
  vertical-align: middle;
}

.slip-upload__field {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
}

.slip-upload__field:hover {
  border-color: var(--blue-line);
}

.slip-upload__field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(22 119 210 / 15%);
}

.slip-upload__field.is-selected {
  border-style: solid;
  border-color: var(--success);
}

.slip-upload__field.is-selected .slip-upload__dropzone-icon {
  background: var(--success-bg);
  color: var(--success);
}

.slip-upload__copy {
  min-width: 0;
  flex: 1;
}

.slip-upload__copy strong,
.slip-upload__copy small {
  display: block;
}

.slip-upload__copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slip-upload__copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.slip-upload__button {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
}

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

.slip-upload__note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.slip-upload__clear {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  text-decoration: underline;
}

.success-page {
  width: min(100%, 560px);
  margin: 0 auto;
  padding-top: 36px;
  text-align: center;
}

.success-mark {
  display: inline-flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
}

.success-page h1 {
  margin: 18px 0 4px;
  color: var(--navy);
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.success-page__lead {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.success-page .flow-card {
  margin-top: 22px;
  text-align: left;
}

.success-page__actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.detail-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.booking-number {
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 850;
}

.activity-summary {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.activity-summary strong,
.activity-summary p {
  display: block;
  margin: 0;
}

.activity-summary strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.activity-summary p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.package-detail {
  padding: 24px;
}

.package-detail__hero {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 13px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--border);
}

.package-detail__visual {
  position: relative;
  display: block;
  width: 88px;
  height: 66px;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background: #e9f0f7;
}

.package-detail__hero h2,
.package-detail__hero p {
  margin: 0;
}

.package-detail__hero h2 {
  color: var(--navy);
  font-size: 19px;
  font-weight: 850;
}

.package-detail__hero p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.package-detail .detail-list {
  margin-top: 18px;
}

.auth-page {
  display: flex;
  min-height: calc(100vh - 120px);
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(100%, 430px);
  padding: 25px;
}

.auth-card__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.auth-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.auth-card__lead {
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.auth-form input {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: 0;
  background: var(--bg);
  color: var(--navy);
  font-size: 16px;
  font-weight: 750;
}

.auth-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(22 119 210 / 10%);
  background: var(--surface);
}

.otp-input {
  letter-spacing: 0.48em;
  text-align: center;
}

.auth-help {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.auth-help a,
.inline-link {
  color: var(--blue);
  font-weight: 750;
}

.inline-error {
  margin: -3px 0 0;
  color: var(--error);
  font-size: 12px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--border);
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 -6px 18px rgb(10 47 85 / 7%);
}

.bottom-nav__inner {
  display: flex;
  width: min(100%, 680px);
  min-height: 70px;
  align-items: stretch;
  justify-content: space-between;
  gap: 3px;
  margin: 0 auto;
  padding: 3px 8px 1px;
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 64px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 4px 5px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-item:hover {
  background: var(--bg);
}

.nav-item[data-active="true"] {
  color: var(--blue);
}

.nav-item[data-active="true"]::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 44px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--blue);
  content: "";
  transform: translateX(-50%);
}

.nav-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}

.nav-item[data-active="true"] .nav-icon {
  background: var(--blue-soft);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 60;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--navy);
  box-shadow: var(--shadow-float);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .court-card,
  .skeleton-card {
    grid-template-columns: 145px minmax(0, 1fr) 145px;
    gap: 13px;
  }

  .court-photo,
  .court-photo img,
  .skeleton--photo {
    min-height: 115px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-header__inner,
  .app-main {
    width: min(100% - 24px, var(--max-content));
  }

  .app-header__inner {
    min-height: 64px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-wordmark strong {
    font-size: 16px;
  }

  .profile-name,
  .profile-button > .icon {
    display: none;
  }

  .app-main {
    min-height: calc(100vh - 102px);
    padding-top: 22px;
    padding-bottom: 109px;
  }

  .page-intro,
  .page-heading--row {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 19px;
  }

  .page-intro h1,
  .page-heading h1 {
    font-size: 25px;
  }

  .member-chip {
    width: 100%;
    min-width: 0;
  }

  .membership-back {
    width: 100%;
  }

  .booking-card {
    padding: 18px 15px;
  }

  .section-head__meta {
    display: none;
  }

  .sport-card__visual {
    height: 68px;
  }

  .fields-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
  }

  .field__control {
    gap: 6px;
    padding: 0 9px;
  }

  .field__control > .icon {
    width: 17px;
    height: 17px;
  }

  .field__control select {
    font-size: 12px;
  }

  .field-label {
    font-size: 12px;
  }

  .court-card,
  .skeleton-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 11px;
  }

  .court-photo,
  .court-photo img,
  .skeleton--photo {
    min-height: 110px;
  }

  .court-side {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 10px;
    padding: 0 0 2px;
    text-align: left;
  }

  .court-side .availability-label {
    grid-column: 1;
    grid-row: 1;
  }

  .court-side .court-time {
    grid-column: 1;
    grid-row: 2;
  }

  .court-side .price {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-items: flex-end;
  }

  .court-side .primary-button {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    margin-top: 5px;
  }

  .amenity-list {
    margin-top: 12px;
  }

  .court-title-row h3 {
    font-size: 15px;
  }

  .court-description {
    font-size: 11px;
  }

  .price strong {
    font-size: 21px;
  }

  .next-booking {
    align-items: flex-start;
    padding: 14px;
  }

  .next-booking__icon {
    width: 40px;
    height: 40px;
  }

  .next-booking__action {
    align-self: center;
    font-size: 11px;
  }

  .package-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .package-card__visual {
    width: 100%;
    height: 112px;
    min-height: 0;
    flex-basis: auto;
  }

  .package-card__action {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .package-card__action .primary-button {
    min-width: 126px;
  }

  .contact-card {
    min-height: 260px;
    padding: 22px;
  }

  .flow-card,
  .package-detail,
  .auth-card {
    padding: 18px 15px;
  }

  .flow-page__intro h1 {
    font-size: 23px;
  }

  .summary-list > div,
  .detail-list > div {
    gap: 12px;
  }

  .sticky-footer {
    padding-right: 12px;
    padding-left: 12px;
  }

  .success-page {
    padding-top: 16px;
  }

  .success-page h1 {
    font-size: 25px;
  }

  .state-panel__actions {
    width: 100%;
    flex-direction: column;
  }

  .state-panel__actions .secondary-button,
  .state-panel__actions .ghost-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .sport-grid {
    gap: 7px;
  }

  .sport-card {
    min-height: 92px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .sport-card__visual {
    height: 60px;
  }

  .sport-card strong {
    font-size: 12px;
  }

  .sport-card small {
    display: none;
  }

  .fields-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .court-card,
  .skeleton-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .court-photo,
  .court-photo img,
  .skeleton--photo {
    min-height: 96px;
  }

  .court-main {
    padding-top: 2px;
  }

  .amenity-list li:nth-child(3) {
    display: none;
  }

  .booking-card--list {
    align-items: flex-start;
    padding: 13px;
  }

  .booking-card__right {
    min-width: 72px;
  }

  .booking-card__right .tag {
    font-size: 9px;
  }

  .booking-card__top h3 {
    font-size: 13px;
  }

  .booking-card__meta {
    font-size: 11px;
  }

  .dark-membership {
    padding: 19px 16px;
  }

  .dark-membership__dates {
    gap: 22px;
  }

  .dark-membership__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .dark-membership .secondary-button {
    width: 100%;
  }

  .payment-summary .price strong {
    font-size: 22px;
  }

  .qr-frame {
    width: 168px;
    height: 168px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Pickleball Open Play lives inside the existing booking shell. */
.openplay-entry {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 128px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #153f66;
  border-radius: var(--radius-xl);
  background: var(--navy);
  box-shadow: var(--shadow-card);
  color: #fff;
}

.openplay-entry__visual { align-self: stretch; min-height: 128px; overflow: hidden; }
.openplay-entry__visual img { width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.openplay-entry__body { display: grid; gap: 4px; padding: 18px 0; }
.openplay-entry__body strong { font-size: 20px; letter-spacing: -.02em; }
.openplay-entry__body small { max-width: 520px; color: #c6d9eb; font-size: 12px; }
.openplay-kicker { color: #71c4ff; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.openplay-entry__action { display: inline-flex; align-items: center; gap: 7px; margin-right: 20px; padding: 0 16px; border-radius: var(--radius-md); background: #fff; color: var(--navy); font-size: 12px; font-weight: 800; white-space: nowrap; }
.openplay-entry__action .svg-icon { width: 16px; }

.openplay-page { display: grid; gap: 20px; }
.openplay-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 250px); align-items: stretch; gap: 28px; min-height: 230px; padding: 30px 32px 30px 42px; overflow: hidden; border-radius: var(--radius-xl); background: var(--navy); color: #fff; box-shadow: var(--shadow-float); }
.openplay-hero h1 { margin: 4px 0 8px; font-size: clamp(28px, 5vw, 44px); line-height: 1.12; letter-spacing: -.04em; }
.openplay-hero p:not(.eyebrow) { max-width: 590px; margin: 0 0 18px; color: #c6d9eb; }
.openplay-hero__media { position: relative; display: block; width: 100%; height: 170px; align-self: center; overflow: hidden; border-radius: var(--radius-lg); background: var(--navy-quiet); }
.openplay-hero__media::before { position: absolute; inset: 0; z-index: 1; background: rgb(11 37 69 / 28%); content: ""; pointer-events: none; }
.openplay-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.openplay-hero__media.image-fallback::after { position: absolute; inset: 0; display: grid; place-items: center; color: #dbeeff; content: "ภาพสนามไม่พร้อม"; font-size: 11px; font-weight: 700; text-align: center; }
.openplay-filters { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-card); }
.openplay-filters .section-heading { margin-bottom: 16px; }
.openplay-filter-row select { min-height: 44px; padding: 0 38px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); }
.openplay-filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.openplay-filter-row label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }

.openplay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.openplay-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-card); }
.openplay-card__media { position: relative; display: block; height: 154px; overflow: hidden; background: var(--surface-3); }
.openplay-card__media img { width: 100%; height: 100%; object-fit: cover; }
.openplay-card__media .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.25;
}
.openplay-card__body { padding: 18px; }
.openplay-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.openplay-card__top > strong { color: var(--blue-dark); font-size: 12px; letter-spacing: .04em; }
.openplay-card__top > span { padding: 4px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 700; }
.openplay-card h2 { margin: 8px 0 4px; font-size: 19px; }
.openplay-card p { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 12px; }
.openplay-card p .svg-icon { width: 15px; }
.openplay-occupancy { display: grid; gap: 7px; margin: 16px 0; }
.openplay-occupancy > span { display: flex; justify-content: space-between; font-size: 11px; }
.openplay-occupancy > span small { color: var(--muted); }
.openplay-occupancy > i { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.openplay-occupancy > i b { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.openplay-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.openplay-card__footer > span strong { font-size: 18px; }
.openplay-card__footer > span small { color: var(--muted); font-size: 10px; }

.openplay-detail-hero { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); overflow: hidden; border-radius: var(--radius-xl); background: var(--navy); color: #fff; box-shadow: var(--shadow-float); }
.openplay-detail-hero > span { min-height: 300px; }
.openplay-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.openplay-detail-hero > div { display: flex; flex-direction: column; justify-content: center; padding: 34px; }
.openplay-detail-hero h1 { margin: 5px 0 8px; font-size: 34px; }
.openplay-detail-hero p:not(.eyebrow) { margin: 0; color: #c6d9eb; }
.openplay-detail-status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.openplay-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.openplay-facts > div { display: grid; grid-template-columns: auto 1fr; gap: 1px 9px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.openplay-facts .svg-icon { grid-row: 1 / 3; width: 20px; color: var(--blue); }
.openplay-facts small { color: var(--muted); font-size: 10px; }
.openplay-facts strong { font-size: 12px; }
.openplay-detail-panel { padding: 24px; }
.openplay-detail-panel h2 { margin: 0 0 8px; }
.openplay-detail-panel > p { color: var(--muted); }
.openplay-detail-panel ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.openplay-detail-panel li { display: flex; gap: 8px; }
.openplay-detail-panel li .svg-icon { flex: 0 0 auto; width: 18px; color: var(--blue); }
.openplay-price { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.openplay-price span { display: grid; }
.openplay-price small { color: var(--muted); font-size: 10px; }
.openplay-price > strong { font-size: 28px; }
.openplay-result--waitlist { background: var(--amber-bg); color: var(--amber); }

@media (max-width: 720px) {
  .openplay-entry { grid-template-columns: 86px minmax(0, 1fr); gap: 14px; }
  .openplay-entry__visual { min-height: 142px; }
  .openplay-entry__body { padding-right: 14px; }
  .openplay-entry__body strong { font-size: 17px; }
  .openplay-entry__action { grid-column: 2; justify-self: start; min-height: 38px; margin: -13px 0 14px; padding: 0; background: transparent; color: #fff; }
  .openplay-hero { grid-template-columns: 1fr; min-height: 0; padding: 28px 22px 22px; }
  .openplay-hero__media { height: 170px; }
  .openplay-grid { grid-template-columns: 1fr; }
  .openplay-detail-hero { grid-template-columns: 1fr; }
  .openplay-detail-hero > span { min-height: 210px; max-height: 260px; }
  .openplay-detail-hero > div { padding: 24px 20px; }
  .openplay-detail-hero h1 { font-size: 27px; }
  .openplay-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .openplay-filter-row { grid-template-columns: 1fr; }
  .openplay-filters .section-heading { align-items: flex-start; flex-direction: column; }
  .openplay-card__footer { align-items: flex-start; flex-direction: column; }
  .openplay-card__footer .secondary-button { width: 100%; }
  .openplay-facts { grid-template-columns: 1fr; }
  .openplay-price { align-items: flex-start; flex-direction: column; }
}

/* ══ แถบต้นแบบสำหรับ review ══
   ไม่ใช่ส่วนหนึ่งของ Customer PWA จริง ใช้สลับสถานะตอนตรวจงานเท่านั้น */
.prototype-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 9px 18px;
  background: #0b2545;
  color: #e8f0fb;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.prototype-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}
.prototype-bar__label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
}
.prototype-bar__copy { opacity: 0.72; }
.preview-menu { margin-left: auto; position: relative; }
.preview-menu > summary {
  cursor: pointer;
  list-style: none;
  padding: 5px 13px;
  border: 1px solid rgba(232, 240, 251, 0.34);
  border-radius: 999px;
  font-weight: 600;
}
.preview-menu > summary::-webkit-details-marker { display: none; }
.preview-menu[open] > summary { background: rgba(232, 240, 251, 0.14); }
.preview-menu__body {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(300px, calc(100vw - 36px));
  max-height: min(72vh, 560px);
  overflow-y: auto;
  display: grid;
  gap: 6px;
  padding: 15px;
  border-radius: 14px;
  background: #ffffff;
  color: #0b2545;
  box-shadow: 0 18px 44px rgba(11, 37, 69, 0.28);
}
.preview-menu__body p {
  margin: 0 0 6px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #5b6b82;
}
.preview-menu__body label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}
.preview-menu__body select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d3dced;
  border-radius: 9px;
  background: #f7f9fc;
  font: inherit;
  font-size: 13px;
  color: inherit;
}
@media (max-width: 640px) {
  .prototype-bar { gap: 9px; padding: 8px 14px; }
  .prototype-bar__copy { display: none; }
}
