/* SânNhanh – hệ giao diện dùng chung.
   Biến ở :root là nguồn duy nhất cho màu, chữ, khoảng cách, bo góc; component chỉ dùng biến. */
@import url('/fonts/fonts.css');

:root {
  /* Màu: đen mực + trắng ngà, một màu nhấn duy nhất (vàng chanh, chỉ dùng làm nền với chữ mực) */
  --pitch-950: #0d0e0b;
  --pitch-900: #17180f;
  --pitch-800: #23241c;
  --pitch-700: #2f3027;
  --pitch-600: #1a6b43;
  --pitch-500: #1f8a57;
  --pitch-100: #e3f3ea;
  --lime-400: #d9f23d;
  --lime-300: #e6f77a;
  --lime-100: #f5fbd0;

  /* Nền và chữ */
  --bg: #f6f4ee;
  --surface: #fffefa;
  --surface-2: #f0ede4;
  --line: #dedacd;
  --line-strong: #c4bfaf;
  --text: #15150f;
  --text-2: #46463c;
  --muted: #5d5d51;
  --on-dark: #f6f4ee;
  --on-dark-muted: #c9c6b9;

  /* Trạng thái */
  --ok: #176b44;
  --ok-bg: #e3f3ea;
  --warn: #8a5a0b;
  --warn-strong: #f5a524;
  --warn-bg: #fff4dc;
  --danger: #b9272b;
  --danger-bg: #fdeceb;
  --info: #1d4ed8;
  --info-bg: #e8effd;
  --violet: #5b3ae0;
  --violet-bg: #efebff;
  --neutral-bg: #ebe8de;
  --sale: var(--lime-400); /* giảm giá = màu nhấn duy nhất, luôn là nền với chữ mực */
  --sale-strong: var(--lime-400);
  --sale-text: var(--text);
  --sale-bg: var(--lime-100);
  --peak: var(--text-2);

  /* Chữ */
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: var(--font-body);
  --stretch-cond: 68%; /* chữ hẹp cho tiêu đề và số */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: clamp(4.25rem, 22vw, 5.25rem); /* mobile: tiêu đề vẫn là chữ to nhất trang, vừa khít một dòng 'ĐÁ Ở ĐÂU?' */

  /* Khoảng cách (bội số 4px) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Bo góc, bóng, chuyển động */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 8px;
  --r-xl: 8px;
  --r-full: 8px;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 16px 40px -12px rgb(13 14 11 / 0.35);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 180ms;

  --container: 1180px;
  --header-h: 60px;
}

/* ---------- Nền tảng ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
}
p {
  margin: 0;
  text-wrap: pretty;
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
::selection {
  background: var(--lime-400);
  color: var(--pitch-950);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
@media (min-width: 768px) {
  .container {
    padding-inline: var(--sp-6);
  }
}
.stack > * + * {
  margin-top: var(--sp-4);
}
.row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Chữ ---------- */
[hidden] {
  display: none !important;
}
.display,
.h1,
.h2 {
  text-wrap: balance;
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}
.display {
  font-size: var(--fs-3xl);
  /* Chữ hoa có dấu chồng (Ố, Ặ, Ệ): dưới ~1.04 dấu của dòng dưới chạm dòng trên */
  line-height: 1.04;
}
.h1,
.h2 {
  line-height: 1.08;
}
.h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.h1 {
  font-size: var(--fs-2xl);
}
.h2 {
  font-size: var(--fs-xl);
}
.h3 {
  font-size: var(--fs-lg);
}
.eyebrow {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}
.num {
  font-variant-numeric: tabular-nums;
}
.text-lime {
  color: var(--lime-400);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--pitch-950);
  border-bottom: 1px solid rgb(246 244 238 / 0.14);
  color: var(--on-dark);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--sp-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--on-dark);
}
.brand b {
  color: var(--on-dark-muted);
  font-weight: 400;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.nav {
  display: none;
  gap: var(--sp-1);
  margin-left: var(--sp-4);
}
.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--on-dark-muted);
  transition: color var(--dur) var(--ease);
}
.nav a:hover {
  color: var(--on-dark);
}
.nav a[aria-current='page'] {
  color: var(--on-dark);
  box-shadow: inset 0 -2px 0 var(--lime-400);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.icon-btn:hover {
  background: rgb(255 255 255 / 0.08);
}
.icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-full);
  background: var(--lime-400);
  color: var(--pitch-950);
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  background: var(--pitch-700);
  color: var(--on-dark);
  font-weight: 700;
  font-size: var(--fs-sm);
}
.menu-btn {
  display: inline-grid;
}
@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
}

/* Menu trên mobile */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 39;
  padding: var(--sp-3) var(--sp-4) var(--sp-5);
  background: var(--pitch-950);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-1);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.mobile-nav.open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav a {
  padding: 12px 14px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 600;
  color: var(--on-dark);
}
.mobile-nav a[aria-current='page'] {
  box-shadow: inset 3px 0 0 var(--lime-400);
}

/* Công tắc vai trò của prototype: trên mobile nằm trong menu (nút nổi sẽ đè nội dung), từ 900px là nút tròn ở góc */
.mobile-role {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid rgb(255 255 255 / 0.12);
  color: var(--on-dark-muted);
  font-size: var(--fs-xs);
}
.mobile-role .role-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--sp-2);
}
.mobile-role .role-switch button {
  text-align: center;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .mobile-nav {
    display: none;
  }
}
/* Nút góc chỉ khi lề trang đủ rộng (≥ 48px mỗi bên); khổ 900–1279px dùng khối trong footer */
@media (max-width: 1279.98px) {
  .role-dock {
    display: none;
  }
}
.footer-role {
  display: none;
  flex-basis: 100%;
}
.footer-role .role-switch {
  display: inline-flex;
  margin-left: var(--sp-3);
}
@media (min-width: 900px) and (max-width: 1279.98px) {
  .footer-role {
    display: block;
  }
}
.role-dock {
  position: fixed;
  left: var(--sp-3);
  bottom: var(--sp-3);
  z-index: 60;
  font-size: var(--fs-xs);
}
body:has(.booking-bar) .role-dock {
  bottom: calc(var(--sp-3) + 84px);
}
.role-dock summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 50%;
  background: var(--pitch-950);
  color: var(--on-dark);
  cursor: pointer;
  list-style: none;
}
.role-dock summary::-webkit-details-marker {
  display: none;
}
.role-dock[open] summary {
  background: var(--on-dark);
  color: var(--pitch-950);
}
.role-dock-panel {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  display: grid;
  gap: var(--sp-2);
  min-width: 220px;
  padding: var(--sp-2);
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: var(--r-md);
  background: var(--pitch-950);
}
.role-dock-panel .role-switch {
  display: flex;
  flex-direction: column;
  border: 0;
  padding: 0;
}
.proto-tools {
  display: grid;
  gap: 2px;
  padding-top: var(--sp-2);
  border-top: 1px solid rgb(255 255 255 / 0.15);
}
.proto-tools button,
.mobile-logout {
  border: 0;
  background: transparent;
  color: var(--on-dark-muted);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.proto-tools button:hover,
.mobile-logout:hover {
  background: rgb(255 255 255 / 0.08);
  color: var(--on-dark);
}
.footer-role .proto-tools {
  display: inline-grid;
  grid-auto-flow: column;
  margin-left: var(--sp-3);
  border: 0;
  padding: 0;
}
.mobile-logout {
  font-size: var(--fs-md);
  padding: 12px 14px;
  color: var(--on-dark);
}
.user-menu {
  position: relative;
}
.user-menu > summary {
  list-style: none;
  cursor: pointer;
}
.user-menu > summary::-webkit-details-marker {
  display: none;
}
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: var(--sp-3);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: var(--r-md);
}
.user-menu-panel span {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
.user-menu-panel button {
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 10px 0 2px;
  cursor: pointer;
}
.role-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-md);
  border: 1px solid rgb(255 255 255 / 0.3);
}
.role-switch button {
  border: 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--on-dark-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.role-switch button[aria-pressed='true'] {
  background: var(--on-dark);
  color: var(--pitch-950);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--sp-16);
  padding: var(--sp-10) 0 var(--sp-12);
  background: var(--pitch-950);
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
}
.site-footer:has(.footer-wordmark) {
  padding-bottom: 0;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  align-items: flex-start;
  justify-content: space-between;
}
.site-footer p + p {
  margin-top: var(--sp-2);
}
/* Chữ thương hiệu tràn ngang; padding-top chừa chỗ cho dấu mũ của Â ở cỡ lớn */
.site-footer .footer-wordmark {
  margin: var(--sp-8) 0 0;
  padding: 0.16em 0 0.04em;
  font-size: 22.5vw; /* SÂNNHANH rộng 4,4em ở stretch 68% → vừa khít chiều ngang */
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  line-height: 0.82;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--on-dark);
  /* clip cả hai trục: với line-height < 1 phần mực chữ tràn xuống dưới hộp và làm trang dài thêm một dải ngà dưới footer */
  overflow: clip;
  user-select: none;
}

/* ---------- Nút ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: var(--fs-md);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover {
  border-color: var(--text-2);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}
.btn-primary {
  --btn-bg: var(--pitch-950);
  --btn-fg: var(--on-dark);
  --btn-bd: var(--pitch-950);
}
.btn-primary:hover {
  --btn-bg: var(--pitch-700);
  border-color: var(--pitch-700);
}
.btn-lime {
  --btn-bg: var(--lime-400);
  --btn-fg: var(--pitch-950);
  --btn-bd: var(--lime-400);
}
.btn-lime:hover {
  --btn-bg: var(--lime-300);
  border-color: var(--lime-300);
}
.btn-dark {
  --btn-bg: var(--pitch-950);
  --btn-fg: var(--on-dark);
  --btn-bd: var(--pitch-950);
}
.btn-dark:hover {
  --btn-bg: var(--pitch-800);
  border-color: var(--pitch-800);
}
.btn-ghost {
  --btn-bg: transparent;
  --btn-bd: transparent;
}
.btn-ghost:hover {
  --btn-bg: var(--neutral-bg);
  border-color: transparent;
}
.btn-danger {
  --btn-bg: var(--surface);
  --btn-fg: var(--danger);
  --btn-bd: #f2c4c5;
}
.btn-danger:hover {
  --btn-bg: var(--danger-bg);
  border-color: var(--danger);
}
.btn-sm {
  min-height: 34px;
  padding: 6px 12px;
  font-size: var(--fs-sm);
}
.btn-lg {
  min-height: 54px;
  padding: 14px 26px;
  font-size: var(--fs-lg);
}
.btn-block {
  width: 100%;
}

/* ---------- Chip ---------- */
.chips {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 2px;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover {
  border-color: var(--text-2);
}
.chip[aria-pressed='true'] {
  background: var(--pitch-950);
  border-color: var(--pitch-950);
  color: var(--on-dark);
}
.chip .x {
  opacity: 0.6;
}

/* Chip ngày: Hôm nay / Mai / T7 */
.day-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
}
.day-chip {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.day-chip .dow {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
}
.day-chip .dnum {
  font-stretch: var(--stretch-cond);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
}
.day-chip .dsub {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.day-chip:hover {
  border-color: var(--text-2);
}
.day-chip[aria-pressed='true'] {
  background: var(--pitch-950);
  border-color: var(--pitch-950);
  color: var(--on-dark);
}
.day-chip[aria-pressed='true'] .dow,
.day-chip[aria-pressed='true'] .dsub {
  color: var(--on-dark-muted);
}

/* Segmented: Sân 5 / Sân 7 */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--r-full);
  background: var(--neutral-bg);
}
.segmented button {
  border: 0;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: var(--r-full);
  background: transparent;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* ---------- Badge & tag ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--neutral-bg);
  color: var(--text-2);
  white-space: nowrap;
}
.badge-pending {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge-confirmed,
.badge-paid {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-rejected,
.badge-no_show {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-cancelled,
.badge-expired,
.badge-unpaid {
  background: var(--neutral-bg);
  color: var(--muted);
}
.badge-completed {
  background: var(--info-bg);
  color: var(--info);
}
.badge-offered {
  background: var(--violet-bg);
  color: var(--violet);
}

.tag-sale {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--lime-400);
  color: var(--pitch-950);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tag-peak {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--peak);
}
.tag-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--lime-100);
  color: var(--text);
}
.tag-mode.approval {
  background: var(--warn-bg);
  color: var(--warn);
}
.price-old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.85em;
}
.price {
  font-stretch: var(--stretch-cond);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.price.sale {
  color: var(--sale-text);
}

/* ---------- Thẻ ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card-pad {
  padding: var(--sp-5);
}
.card-hover {
  transition: border-color var(--dur) var(--ease);
}
.card-hover:hover {
  border-color: var(--text);
}

/* Thẻ sân trong danh sách */
.venue-card {
  display: grid;
  overflow: hidden;
}
.venue-card .media {
  position: relative;
  aspect-ratio: 16 / 8;
  background: var(--pitch-800);
  overflow: hidden;
}
.venue-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.venue-card .media .tags {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  display: flex;
  gap: var(--sp-2);
}
.venue-card .body {
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  display: grid;
  gap: var(--sp-2);
}
.venue-card .title {
  font-weight: 850;
  font-stretch: var(--stretch-cond);
  text-transform: uppercase;
  line-height: 1.1;
  font-size: var(--fs-xl);
  text-decoration: none;
}
[data-icon] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.venue-card .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.venue-card .slot-row-label {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
}
@media (min-width: 720px) {
  .venue-card.horizontal {
    grid-template-columns: 300px 1fr;
  }
  .venue-card.horizontal .media {
    aspect-ratio: auto;
    min-height: 100%;
  }
}

/* Nút giờ trống trên thẻ sân */
.slot-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.slot-pill {
  display: inline-grid;
  justify-items: center;
  min-width: 74px;
  padding: 6px 10px;
  border: 1px solid var(--text);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.slot-pill .t {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.slot-pill .p {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-2);
}
.slot-pill.sale {
  background: var(--lime-400);
}
.slot-pill.sale .p {
  color: var(--text);
}
.slot-pill:hover {
  background: var(--pitch-950);
  color: var(--on-dark);
}
.slot-pill:hover .p {
  color: var(--on-dark-muted);
}
.slot-pill.more {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--text-2);
}

/* ---------- Lưới slot ---------- */
.slot-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.slot-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* Mẫu trong chú thích dùng đúng class trạng thái của ô thật, nên luôn khớp màu */
.slot-legend .slot {
  display: block;
  flex: none;
  width: 20px;
  min-height: 0;
  height: 20px;
  padding: 0;
  border-radius: 5px;
  animation: none;
  box-shadow: none;
}
.slot-legend .slot[aria-pressed='true'] {
  box-shadow: none;
}

.slot {
  position: relative;
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  text-align: left;
  font-size: var(--fs-sm);
  cursor: default;
  transition: all var(--dur) var(--ease);
}
.slot .t {
  font-stretch: var(--stretch-cond);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-lg);
}
.slot .s {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.slot .corner {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
}
/* trống */
.slot-available {
  border-color: var(--pitch-500);
  cursor: pointer;
}
.slot-available .s {
  color: var(--pitch-600);
}
.slot-available:hover {
  background: var(--pitch-100);
}
.slot-available.sale {
  border-color: var(--text);
  background: var(--lime-100);
}
.slot-available.sale .s {
  color: var(--text);
}
/* đang chọn */
.slot[aria-pressed='true'] {
  background: var(--pitch-950);
  border-color: var(--pitch-950);
  color: var(--on-dark);
  outline: 2px solid var(--lime-400);
  outline-offset: 2px;
}
.slot[aria-pressed='true'] .s {
  color: var(--on-dark-muted);
}
/* đã đặt */
.slot-booked {
  background: #e1e6df;
  border-color: #c3ccc0;
  color: var(--text-2);
}
/* đang giữ (chờ duyệt) */
.slot-held {
  background: var(--warn-bg);
  border-color: #f3dca6;
  color: var(--warn);
}
.slot-held .s {
  color: var(--warn);
}
/* bị chặn */
.slot-blocked {
  border-color: var(--line-strong);
  color: var(--text-2);
  background: repeating-linear-gradient(-45deg, #fff 0 5px, #dfe5dc 5px 10px);
}
/* đã qua */
.slot-past {
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
  color: #607068;
}
.slot-past .s {
  color: #607068;
}
/* đang giữ cho người khác trong danh sách chờ */
.slot-offered {
  background: var(--violet-bg);
  border-color: #d8cfff;
  color: var(--violet);
}
.slot-offered .s {
  color: var(--violet);
}
/* đang giữ cho bạn */
.slot-for-you {
  border-color: var(--violet);
  background: var(--surface);
  cursor: pointer;
}
.slot-for-you .s {
  color: var(--violet);
}
.slot .wait-btn {
  margin-top: 4px;
  justify-self: start;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: var(--r-full);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.slot .s {
  white-space: nowrap;
}

/* Bố cục mobile: theo buổi */
.slot-period + .slot-period {
  margin-top: var(--sp-5);
}
.slot-period-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.slot-period-head h4 {
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
}
.slot-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: var(--sp-2);
}

/* Bố cục desktop: mỗi cột một sân con */
.slot-board {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.slot-board table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 6px;
  min-width: 560px;
}
.slot-board th:first-child,
.slot-board td.time {
  width: 64px;
}
.slot-board th {
  position: sticky;
  top: 0;
  padding: 10px 6px 4px;
  background: var(--surface);
  text-align: left;
  font-size: var(--fs-sm);
}
.slot-board th small {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--muted);
}
.slot-board td.time {
  width: 64px;
  padding-right: 4px;
  font-weight: 700;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  vertical-align: middle;
}
.slot-board .slot {
  width: 100%;
  min-height: 50px;
}

/* ---------- Thanh đặt dính dưới ---------- */
.booking-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: var(--sp-6);
  padding: var(--sp-3) 0 calc(var(--sp-3) + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.booking-bar .container {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.booking-bar .summary {
  min-width: 0;
}
.booking-bar .summary .what {
  font-size: var(--fs-sm);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booking-bar .summary .total {
  font-size: var(--fs-2xl);
  font-stretch: var(--stretch-cond);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.booking-bar .btn {
  margin-left: auto;
}

/* ---------- Form ---------- */
.field {
  display: grid;
  gap: 6px;
}
.field label,
.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.textarea {
  min-height: 96px;
  resize: vertical;
}
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7a71' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--muted);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--pitch-500);
  box-shadow: 0 0 0 3px rgb(31 138 87 / 0.18);
}
.field .hint {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.field.error .input {
  border-color: var(--danger);
}
.field.error .hint {
  color: var(--danger);
}

/* Ô tìm kiếm lớn trên hero */
.search-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  color: var(--text);
}
.search-panel .cell {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  background: var(--surface);
}
.search-panel .cell span {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
}
.search-panel .cell select,
.search-panel .cell input {
  border: 0;
  padding: 0;
  background: transparent;
  font-weight: 600;
  font-size: var(--fs-lg);
  appearance: none;
  width: 100%;
}
.search-panel .cell:focus-within {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}
.search-panel .btn {
  grid-column: 1 / -1;
  border-radius: 0;
  min-height: 52px;
}
@media (min-width: 860px) {
  .search-panel {
    grid-template-columns: 1.1fr 1fr 0.9fr 1fr auto;
  }
  .search-panel .btn {
    grid-column: auto;
    padding-inline: 32px;
  }
}

/* ---------- Hộp thoại ---------- */
dialog.modal {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
dialog.modal::backdrop {
  background: rgb(13 14 11 / 0.6);
}
dialog.modal[open] {
  animation: modal-in 220ms var(--ease);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}
.modal-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) 0;
}
.modal-body {
  padding: var(--sp-4) var(--sp-5);
}
.modal-foot {
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
  padding: 0 var(--sp-5) var(--sp-5);
}
@media (max-width: 560px) {
  dialog.modal {
    margin: auto 0 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
}

/* Danh sách cặp nhãn – giá trị (tóm tắt booking, thông tin chuyển khoản) */
.kv {
  display: grid;
  gap: 10px;
}
.kv > div {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}
.kv dt {
  color: var(--muted);
  font-size: var(--fs-sm);
}
.kv dd {
  margin: 0 0 0 auto;
  font-weight: 600;
  text-align: right;
}
.kv .total dd {
  font-size: var(--fs-xl);
  font-weight: 700;
}
.divider {
  height: 1px;
  margin: var(--sp-4) 0;
  background: var(--line);
  border: 0;
}

/* Khung chính sách hủy */
.policy {
  display: grid;
  gap: 8px;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--lime-100);
  font-size: var(--fs-sm);
}
.policy .step {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
}
.policy .step b {
  min-width: 46px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Thanh toán VietQR ---------- */
.qr-card {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--pitch-950);
  color: var(--on-dark);
}
.qr-card .qr {
  justify-self: center;
  width: min(260px, 100%);
  padding: var(--sp-3);
  border-radius: var(--r-lg);
  background: #fff;
}
.qr-card .amount {
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--lime-400);
}
.copy-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 0.06);
}
.copy-row .k {
  font-size: var(--fs-xs);
  color: var(--on-dark-muted);
}
.copy-row .v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.copy-row button {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--on-dark);
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
}
.copy-row button:hover {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--pitch-950);
}

/* Đồng hồ đếm ngược giữ chỗ */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--warn-bg);
  color: var(--warn);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Bảng ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.table th {
  padding: 12px 16px;
  background: var(--surface-2);
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
.table tbody tr:hover {
  background: var(--surface-2);
}

/* ---------- Tab ---------- */
.tabs {
  display: flex;
  gap: var(--sp-6);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs button {
  position: relative;
  padding: 12px 0;
  border: 0;
  background: transparent;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}
.tabs button[aria-selected='true'] {
  color: var(--text);
}
.tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--text);
}
.tabs .count {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--neutral-bg);
  font-size: var(--fs-xs);
}

/* ---------- Thông báo nhanh, trạng thái rỗng, khung chờ ---------- */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: var(--sp-6);
  z-index: 80;
  display: grid;
  gap: var(--sp-2);
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
}
.booking-bar ~ .toast-stack,
body:has(.booking-bar) .toast-stack {
  bottom: calc(var(--sp-6) + 84px);
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--pitch-950);
  color: var(--on-dark);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
  animation: modal-in 220ms var(--ease);
}
.toast .ic {
  color: var(--lime-400);
}
.toast.error .ic {
  color: #ff8a8d;
}
.empty {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-12) var(--sp-6);
  text-align: center;
  color: var(--muted);
}
.empty .art {
  width: 72px;
  height: 72px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: var(--pitch-100);
  color: var(--pitch-600);
}
.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--neutral-bg) 0%, #f7f9f6 50%, var(--neutral-bg) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  background: var(--info-bg);
  color: #1e40af;
}
.notice.warn {
  background: var(--warn-bg);
  color: #8a5a12;
}
.notice.violet {
  background: var(--violet-bg);
  color: #4b2fd6;
}

/* ---------- Trang chủ (editorial) ----------
   Ảnh thật là phần chủ đạo; lớp phủ trên ảnh là một màu phẳng (không gradient) để chữ đọc được.
   Khoảng cách giữa các khu lớn hơn thang 4–40px của khối trong app: cố ý, để trang thoáng như báo. */
.footer-note {
  margin-top: var(--sp-3);
  max-width: 340px;
}
.hero-photo {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: min(720px, 100svh - var(--header-h));
  padding-block: var(--sp-16) var(--sp-8);
  background: var(--pitch-950);
  color: var(--on-dark);
}
.hero-photo > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 60%;
}
.hero-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(13 14 11 / 0.66);
}
.hero-photo .display {
  max-width: 11ch;
}
.hero-photo .lead {
  max-width: 34ch;
  margin: var(--sp-5) 0 var(--sp-8);
  font-size: var(--fs-lg);
  color: var(--on-dark);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-6);
  margin-top: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--on-dark);
}

/* ---------- Trang chủ: tờ chương trình trận đấu ----------
   Chia ô bằng đường kẻ 1px như báo in; cái "nghệ thuật" nằm ở cách chia khối và chữ hẹp viết hoa, không ở hiệu ứng.
   Mobile là một cột; khối vuốt ngang luôn để lộ mép thẻ kế tiếp để biết còn nội dung. */
.page-home .site-footer {
  margin-top: 0;
}
.rule-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-6);
  margin-bottom: var(--sp-8);
}
.rule-head .h1 {
  font-size: clamp(2.75rem, 8vw, 5rem);
}
.rule-head p {
  max-width: 46ch;
}
.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.swipe-hint {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
}
@media (min-width: 900px) {
  .swipe-hint {
    display: none;
  }
}

/* Hero: ảnh + tiêu đề + tìm kiếm (trái), cột "Tối nay" kẻ dòng như bảng tỉ số (phải) */
.match-hero {
  border-bottom: 1px solid var(--text);
}
.hero-main {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  padding: var(--sp-10) var(--sp-4) var(--sp-5);
  background: var(--pitch-950);
  color: var(--on-dark);
}
.hero-main img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0; /* bản cắt dọc: đầu cầu thủ nằm phía trên eyebrow */
}
@media (max-width: 639.98px) {
  .hero-main {
    padding-top: 144px; /* chừa vùng ảnh có mặt cầu thủ, chữ bắt đầu bên dưới */
  }
}
.hero-main::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(13 14 11 / 0.66);
}
.hero-main .eyebrow {
  color: var(--on-dark);
}
.hero-main .display {
  margin: var(--sp-8) 0 var(--sp-5); /* dấu của Ố dòng đầu nhô lên trên eyebrow */
}
.hero-main .lead {
  display: none;
  max-width: 36ch;
  margin-bottom: var(--sp-6);
  font-size: var(--fs-lg);
}
.tonight {
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
}
.tonight-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--text);
}
.tonight-head .h2 {
  font-size: 1.75rem;
}
.tonight-head span {
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.tonight-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-3);
  min-height: 64px;
  border-bottom: 1px solid var(--line-strong);
  text-decoration: none;
}
.tonight-row:hover {
  background: var(--surface-2);
}
.tonight-row .t {
  font-size: 2.25rem;
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tonight-row .what b {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}
.tonight-row .what span {
  white-space: nowrap;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.tonight-row .cost {
  display: grid;
  justify-items: end;
  gap: 2px;
  font-size: var(--fs-lg);
}
.tonight .link-more {
  margin-top: var(--sp-2);
}
@media (min-width: 640px) {
  .hero-main .lead {
    display: block;
  }
  .hero-main {
    padding-block: var(--sp-16) var(--sp-8);
  }
}
@media (min-width: 960px) {
  .match-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(400px, 30vw, 520px);
    min-height: min(720px, 100svh - var(--header-h));
  }
  .hero-main {
    overflow: clip;
    padding-left: clamp(var(--sp-4), 5vw, 80px);
    padding-right: var(--sp-8);
  }
  /* Ảnh phóng 140% và neo trái để cầu thủ dịch sang phải, không nằm sau tiêu đề */
  .hero-main img {
    width: 140%;
    max-width: none;
    object-position: 0% 40%;
  }
  .hero-main .display {
    font-size: clamp(5.5rem, 7.6vw, 7rem); /* 97 / 109 / 112px ở 1280 / 1440 / 1920: chiếm nửa trái ảnh, chừa chỗ cho cầu thủ */
    margin-top: max(var(--sp-8), 0.22em); /* dấu Ố nhô lên ~0,2em trên dòng đầu */
  }
  .hero-main .lead {
    max-width: 48ch;
  }
  .hero-main .search-panel {
    max-width: 820px;
  }
  .tonight {
    padding: var(--sp-8) var(--sp-8) var(--sp-6);
    border-left: 1px solid var(--text);
  }
  .tonight-row {
    grid-template-columns: 84px minmax(0, 1fr) auto;
  }
  .tonight-row .t {
    font-size: 2.25rem;
  }
  .tonight-row .cost {
    font-size: var(--fs-lg);
  }
}
@media (max-width: 959px) {
  .tonight-row.extra {
    display: none;
  }
}
.tonight-row .what {
  min-width: 0;
}
.tonight-row .what b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dải chữ chạy: chỉ CSS, đứng yên khi người dùng tắt chuyển động */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid rgb(255 255 255 / 0.22);
  background: var(--pitch-950);
  color: var(--lime-400);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 60s linear infinite;
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker span {
  padding: 10px var(--sp-5);
  font-stretch: var(--stretch-cond);
  font-weight: 800;
  font-size: var(--fs-md);
  text-transform: uppercase;
  white-space: nowrap;
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticker {
    overflow-x: auto;
  }
  .ticker-track {
    animation: none;
  }
  .ticker-track [aria-hidden='true'] {
    display: none;
  }
}

/* Dải đen: thẻ lịch thi đấu */
.band-dark {
  padding-block: var(--sp-12) var(--sp-16);
  background: var(--pitch-950);
  color: var(--on-dark);
}
.band-dark .rule-head p {
  color: var(--on-dark-muted);
}
.swipe {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-inline: calc(-1 * var(--sp-4));
  padding-inline: var(--sp-4);
  scroll-padding-inline: var(--sp-4);
  overscroll-behavior-x: contain;
}
.fixture {
  flex: 0 0 80%;
  scroll-snap-align: start;
  display: grid;
  align-content: start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid rgb(255 255 255 / 0.28);
  margin-right: -1px;
  color: inherit;
  text-decoration: none;
}
.fixture-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--on-dark-muted);
}
.fixture .time {
  font-size: 4.5rem;
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.fixture b {
  font-weight: 700;
}
.fixture .where {
  font-size: var(--fs-sm);
  color: var(--on-dark-muted);
}
.fixture .cost {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-block: var(--sp-2);
}
.fixture .price {
  font-size: 2.25rem;
}
.fixture .price-old {
  color: var(--on-dark-muted);
}
.fixture .btn {
  width: 100%;
}
.fixture:hover {
  border-color: var(--lime-400);
}
@media (min-width: 900px) {
  .swipe {
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  .fixture {
    flex: 1 1 0;
    padding: var(--sp-8);
  }
  .fixture .time {
    font-size: 5.5rem;
  }
}

/* Lưới sân: thẻ đánh số, kẻ dọc giữa các cột, tên sân chữ hẹp */
.venues {
  padding-block: var(--sp-12) var(--sp-16);
}
.venues .swipe {
  border-block: 1px solid var(--text);
}
.venue {
  flex: 0 0 82%;
  scroll-snap-align: start;
  display: grid;
  align-content: start;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-8);
  border-right: 1px solid var(--text);
}
.venue:first-child {
  padding-left: 0;
}
.venue .no {
  font-size: 3rem;
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  line-height: 1;
  color: var(--text);
}
.venue .photo {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.venue .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.venue .photo:hover img {
  transform: scale(1.03);
}
.venue h3 {
  font-size: 1.75rem;
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  text-transform: uppercase;
  line-height: 1.08;
  letter-spacing: 0;
}
.venue h3 a {
  text-decoration: none;
}
.venue .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.venue .meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
@media (max-width: 400px) {
  /* thẻ rộng ~270px: ba mục (khu vực, loại sân, kiểu duyệt) phải nằm một dòng */
  .venue .meta {
    column-gap: var(--sp-2);
    font-size: var(--fs-xs);
  }
  .venue .meta span {
    gap: 4px;
  }
}
.venue .from {
  font-size: var(--fs-md);
}
.venue .slot-row-label {
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-strong);
  font-size: var(--fs-sm);
  color: var(--muted);
}
@media (min-width: 900px) {
  .venues .swipe {
    overflow: visible;
  }
  .venue {
    flex: 1 1 0;
    padding-inline: var(--sp-8);
  }
  .venue:last-child {
    border-right: 0;
    padding-right: 0;
  }
}

/* Dải chanh ghép nửa ảnh: ba con số to */
.stats {
  display: grid;
  border-block: 1px solid var(--text);
}
.stats-photo {
  position: relative;
  min-height: 220px;
  background: var(--pitch-950);
}
.stats-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--lime-400);
  color: var(--pitch-950);
}
.stats-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--sp-4);
  padding: var(--sp-5) var(--sp-4);
  border-top: 1px solid var(--pitch-950);
}
.stats-list li:first-child {
  border-top: 0;
}
.stats-list b {
  font-size: clamp(3.5rem, 15vw, 4.5rem);
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  line-height: 1;
}
.stats-list span {
  font-size: var(--fs-lg);
  font-weight: 600;
}
@media (min-width: 900px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats-list li {
    padding: var(--sp-8) max(var(--sp-4), calc((100vw - var(--container)) / 2 + var(--sp-4))) var(--sp-8) var(--sp-8);
    padding-left: var(--sp-8);
  }
  .stats-list b {
    font-size: clamp(4.5rem, 6vw, 5.5rem);
  }
}

.ticker[hidden],
[hidden].swipe {
  display: none;
}
.empty-note {
  margin: var(--sp-6) 0 0;
  color: var(--on-dark-muted);
  max-width: 60ch;
}

/* ---------- Đăng nhập / đăng ký ---------- */
.auth {
  display: grid;
  min-height: calc(100svh - var(--header-h));
}
.auth-visual {
  display: none;
}
.auth-panel {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  padding: var(--sp-8) var(--sp-4) var(--sp-12);
  align-self: start;
}
.auth-panel .eyebrow {
  margin: 0 0 var(--sp-2);
}
.auth-panel .h1 {
  margin: var(--sp-6) 0 var(--sp-6);
  font-size: clamp(2.75rem, 11vw, 4.5rem);
  line-height: 1.04;
}
.auth-panel form {
  display: grid;
  gap: var(--sp-4);
}
.form-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--danger);
  font-weight: 600;
}
.form-error[hidden] {
  display: none;
}
.auth-alt {
  margin: var(--sp-5) 0 0;
  color: var(--text-2);
}
.auth-alt a {
  font-weight: 700;
}
.demo-accounts {
  margin-top: var(--sp-8);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-strong);
}
.demo-accounts[hidden] {
  display: none;
}
.demo-accounts div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.demo-accounts button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--text);
  border-radius: var(--r-md);
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.demo-accounts button:hover {
  background: var(--text);
  color: var(--on-dark);
}
@media (min-width: 900px) {
  .auth {
    grid-template-columns: minmax(0, 1fr) minmax(480px, 40vw);
  }
  .auth-visual {
    position: relative;
    display: grid;
    align-content: end;
    isolation: isolate;
    padding: var(--sp-10);
    background: var(--pitch-950);
    color: var(--on-dark);
    overflow: clip;
  }
  .auth-visual img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgb(13 14 11 / 0.55);
  }
  .auth-visual .display {
    margin: 0;
    font-size: clamp(5rem, 8vw, 8rem);
  }
  .auth-panel {
    max-width: none;
    margin: 0;
    padding: var(--sp-12) clamp(var(--sp-8), 5vw, 80px);
  }
}

/* ---------- Luồng khách: tìm sân, chi tiết sân, booking, thông báo ---------- */
.page {
  padding-block: var(--sp-6) var(--sp-12);
}
.page-head {
  display: grid;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.page-head .sub {
  color: var(--muted);
}
.crumb {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}
.crumb a {
  text-decoration: none;
}
.filter-bar {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.filter-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.filter-row .select {
  width: auto;
  min-width: 132px;
}
.filter-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.card-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.venue-card .media img {
  display: block;
}
.venue-card .slot-pills .slot-pill {
  text-decoration: none;
}
.venue-card .none {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* chi tiết sân */
.venue-top {
  display: grid;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}
.venue-top .photo {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--pitch-800);
}
.venue-top .photo-note {
  position: absolute;
  left: var(--sp-2);
  bottom: var(--sp-2);
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.venue-top .photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.venue-top .info {
  display: grid;
  gap: var(--sp-3);
  align-content: start;
}
.venue-top .source-note {
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.venue-top .addr {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--sp-3);
  align-items: center;
}
.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.amenities span {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
}
.rules-grid {
  display: grid;
  gap: var(--sp-4);
}
.rules-grid h3 {
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: 4px;
}
.rules-grid p {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
@media (min-width: 900px) {
  .venue-top {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
  .rules-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.pick-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.slot-mobile {
  display: block;
}
.slot-mobile .court-switch {
  margin-bottom: var(--sp-4);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.slot-mobile .court-switch::-webkit-scrollbar {
  display: none;
}
.slot-mobile .court-switch button {
  flex: 0 0 auto;
}
.slot-desktop {
  display: none;
}
@media (min-width: 900px) {
  .slot-mobile {
    display: none;
  }
  .slot-desktop {
    display: block;
  }
}
.slot-board td .slot {
  display: grid;
  align-content: center;
}
.picked-note {
  margin-bottom: var(--sp-4);
}
dialog.modal .total dd {
  font-size: var(--fs-xl);
}
.dlg-error {
  color: var(--danger, #b42318);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* booking */
.booking-layout {
  display: grid;
  gap: var(--sp-5);
  align-items: start;
}
@media (min-width: 900px) {
  .booking-layout.has-side {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}
.booking-code {
  font-size: var(--fs-2xl);
  font-stretch: var(--stretch-cond);
  font-weight: 850;
  letter-spacing: 0;
}
.history {
  display: grid;
  gap: 0;
  list-style: none;
  padding: 0;
}
.history li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: var(--sp-3);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.history li:first-child {
  border-top: 0;
}
.history time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.history small {
  display: block;
  color: var(--muted);
}
.refund-box {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}

/* danh sách booking của tôi */
.booking-list {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.booking-item {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
}
.booking-item .when {
  font-size: var(--fs-xl);
  font-stretch: var(--stretch-cond);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.booking-item .where {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.booking-item .top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.booking-item .badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.booking-item.offer {
  border: 2px solid var(--violet);
  background: var(--violet-bg);
}
.booking-item .actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  align-items: center;
}
.offer-banner {
  margin-top: var(--sp-5);
  border: 2px solid var(--violet);
}

/* thông báo */
.notif-list {
  display: grid;
  list-style: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.notif-list li + li {
  border-top: 1px solid var(--line);
}
.notif-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: var(--sp-3);
  align-items: start;
  padding: var(--sp-4);
  text-decoration: none;
  color: inherit;
}
.notif-item:hover {
  background: var(--surface-2);
}
.notif-item .pip {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
}
.notif-item.unread .pip {
  background: var(--text);
  border-color: var(--text);
}
.notif-item.unread .msg {
  font-weight: 700;
}
.notif-item time {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.notif-item .tag-unread {
  display: inline-block;
  margin-right: 6px;
  font-size: var(--fs-xs);
  font-weight: 800;
}

.filter-bar .chips {
  flex-wrap: wrap;
  overflow: visible;
}
.venue-top .addr a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  align-items: end;
}
.filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.filter-field .select {
  width: 100%;
}
.filter-field.type {
  grid-column: 1 / -1;
}
.filter-field .segmented {
  width: 100%;
}
.filter-field .segmented button {
  flex: 1;
}
@media (min-width: 720px) {
  .filter-grid {
    grid-template-columns: 160px 200px auto;
    justify-content: start;
  }
  .filter-field.type {
    grid-column: auto;
  }
  .filter-field .segmented {
    width: auto;
  }
}
.filter-bar > .filter-row {
  display: grid;
  justify-content: start;
  gap: 6px;
}
.filter-bar > .filter-row .chips {
  display: flex;
}
.segmented button {
  white-space: nowrap;
}
.filter-bar > .filter-row > .chip {
  justify-self: start;
}

.booking-layout.has-side {
  grid-template-areas: 'sum' 'qr' 'rest';
}
.booking-layout.has-side > .area-sum { grid-area: sum; }
.booking-layout.has-side > .qr-card { grid-area: qr; }
.booking-layout.has-side > .area-rest { grid-area: rest; }
@media (min-width: 900px) {
  .booking-layout.has-side {
    grid-template-areas: 'sum qr' 'rest qr';
    grid-template-rows: auto 1fr;
  }
}

/* Sân chưa có ảnh: khung trống thay vì ảnh khác */
.no-photo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--pitch-800);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
}
.venue .photo .no-photo {
  aspect-ratio: 4 / 3;
}
.venue-top a.photo-note {
  text-decoration: none;
}
.venue-top a.photo-note:hover {
  text-decoration: underline;
}
