/* Mobile-first layout compatibility layer, shared by player and admin pages. */
html { -webkit-text-size-adjust: 100%; }
.select-field { display: block; position: relative; width: 100%; min-width: 0; }
.select-field select.select-native { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; pointer-events: none; }
.select-trigger { display: block; width: 100%; min-height: 48px; padding: 12px 44px 12px 14px; border: 1px solid #cbd8d1; border-radius: 10px; background: #fff; color: #17211b; font: inherit; font-size: 14px; text-align: left; line-height: 1.5; cursor: pointer; position: relative; overflow-wrap: anywhere; }
.select-trigger::after { content: ''; position: absolute; right: 18px; top: 18px; width: 8px; height: 8px; border-right: 2px solid #0b5d3b; border-bottom: 2px solid #0b5d3b; transform: rotate(45deg); }
.select-trigger[aria-expanded=true] { border-color: #0b5d3b; }
.select-trigger:disabled { background: #f1f4f2; color: #829087; cursor: not-allowed; }
.select-trigger[aria-invalid=true] { border-color: #a33; }
.select-options { position: fixed; z-index: 100; padding: 6px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #cbd8d1; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px #0b5d3b26; }
.select-options[hidden] { display: none; }
.select-option { padding: 12px; min-height: 44px; border-radius: 8px; color: #17211b; font-size: 14px; line-height: 1.5; cursor: pointer; overflow-wrap: anywhere; }
.select-option[aria-selected=true] { background: #eaf7ef; color: #0b5d3b; font-weight: 700; }
.select-option.highlighted, .select-option:hover { background: #eaf7ef; }
.select-option[aria-disabled=true] { color: #829087; opacity: .6; cursor: not-allowed; }
.admin-filters > .select-field { width: auto; flex: 1 1 150px; }
@media(max-width:1023px) { .select-trigger, .select-option { font-size: 16px; } }
img { max-width: 100%; }
main, fieldset, .panel, .admin-card, .booking-info { min-width: 0; }
button, a, input, select { touch-action: manipulation; }

/* Shared native selects retain keyboard support and mobile option pickers. */
.player-page select, .public-page select, .admin-body select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  height: auto;
  padding: 12px 44px 12px 14px;
  border: 1px solid #cbd8d1;
  border-radius: 10px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%230b5d3b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #17211b;
  cursor: pointer;
}
.player-page select:focus-visible, .public-page select:focus-visible, .admin-body select:focus-visible { border-color: #0b5d3b; outline: 2px solid #b7dccc; outline-offset: 2px; }
.player-page select:disabled, .public-page select:disabled, .admin-body select:disabled { background-color: #f1f4f2; color: #829087; opacity: .7; cursor: not-allowed; }
.player-page select[multiple], .admin-body select[multiple], .player-page select[size]:not([size="1"]), .admin-body select[size]:not([size="1"]) { background-image: none; padding-right: 14px; }
@media(forced-colors:active) { .player-page select, .public-page select, .admin-body select { appearance: auto; background-image: none; } }
:focus-visible { outline: 2px solid #0b5d3b; outline-offset: 3px; }
.sidebar, .admin-sidebar { overflow-y: auto; overscroll-behavior: contain; z-index: 30; transform: translateX(-100%); transition: transform .18s ease; }
.sidebar.open, .admin-sidebar.open { transform: none; }
.navigation-drawer-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.navigation-close { width: 44px; height: 44px; border: 1px solid #dce7e0; border-radius: 10px; background: #fff; color: #0b5d3b; font-size: 28px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.sidebar-bottom, .admin-sidebar-bottom { padding-top: 24px; }
.navigation-open { overflow: hidden; }
.navigation-open .menu-toggle, .navigation-open .admin-menu { visibility: hidden; }
.navigation-backdrop { position: fixed; inset: 0; z-index: 20; border: 0; background: #10261c80; }
.navigation-backdrop[hidden] { display: none; }
.menu-toggle { display: block; position: fixed; top: 12px; left: 12px; z-index: 40; width: 44px; height: 44px; border: 1px solid #dce7e0; border-radius: 10px; background: white; color: #0b5d3b; }
.player-page::before { content: ''; position: fixed; inset: 0 0 auto; height: 68px; z-index: 15; background: #f6f8f7; border-bottom: 1px solid #edf1ee; pointer-events: none; }
@media(min-width:1024px) { .player-page::before { display: none; } }
.admin-menu { display: block; min-width: 44px; min-height: 44px; }
.shell { margin-left: 0; padding: 76px 16px 32px; }
.public-page .shell { margin: 0; max-width: none; padding: 0; }
.public-page .auth-wrap { min-height: 100dvh; padding: 20px 0; }
.topbar { padding-left: 0; gap: 12px; }
.topbar h1 { font-size: clamp(24px, 4vw, 30px); overflow-wrap: anywhere; }
.panel { padding: 18px; }
.hero { padding: 26px; }
.hero-content { width: 100%; min-width: 0; }
.hero-actions { display: grid; gap: 12px; margin-top: 18px; }
.hero-actions .btn { width: 100%; margin-top: 0; justify-content: center; }
.hero-art { display: none; }
.court-grid, .flow .court-list, .court-detail, .court-grid-admin, .chart-grid, .schedule-layout, .schedule-management { grid-template-columns: minmax(0, 1fr); }
.court-photo-gallery { min-height: 240px; }
.flow-next { flex-direction: column; align-items: stretch; }
.flow-next .btn { justify-content: center; width: 100%; }
.flow-next.availability-actions { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10; display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; margin: 16px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.availability-back { display: inline-flex; align-items: center; margin-bottom: 16px; }
.availability-actions .btn { width: 100%; justify-content: center; padding-inline: 10px; }
.availability-actions .btn.requires-selection { background: #e7e9e8; color: #66736b; }
.booking-selection-dialog h2 { font-size: 21px; }
.booking-selection-dialog form { margin-top: 20px; }
.btn, .admin-btn, .table-btn, .court-back, .quantity-stepper button, .schedule-calendar-toolbar button { min-height: 44px; }
.quantity-stepper button { min-width: 44px; }
.availability-key { gap: 10px 16px; }
.time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.time-option { padding: 12px 6px; }
.booking-row { flex-wrap: wrap; gap: 12px; }
.booking-row .booking-info { flex-basis: 65%; }
.detail-line strong, .confirm-box strong { overflow-wrap: anywhere; }
.admin-main { margin-left: 0; }
.admin-content { padding: 22px 16px 40px; }
.admin-topbar { padding: 0 12px; gap: 10px; }
.admin-topbar > strong { font-size: 18px; }
.admin-account > span:not(.admin-avatar) { display: none; }
.admin-heading { flex-direction: column; }
.admin-stats { grid-template-columns: minmax(0, 1fr); }
.admin-stat { height: auto; min-height: 104px; }
.admin-table-wrap { max-width: 100%; overscroll-behavior-inline: contain; }
.admin-card-head { flex-wrap: wrap; gap: 12px; }
.admin-filters { display: grid; }
.admin-filters input, .admin-filters select, .admin-filters .admin-btn { width: 100%; min-width: 0; }
.schedule-filters label { width: 100%; }
.schedule-confirm { max-height: calc(100dvh - 32px); overflow-y: auto; }
.open-play-date-calendar { max-width: calc(100vw - 64px); }
@media (max-width: 1023px) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; max-width: 100%; }
}
@media (min-width: 600px) {
  .shell { padding-inline: 28px; }
  .panel { padding: 28px; }
  .court-grid, .flow .court-list, .court-grid-admin, .admin-stats, .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-next { flex-direction: row; align-items: center; }
  .flow-next .btn { width: auto; }
  .time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-art { display: grid; min-width: 120px; font-size: 90px; }
  .admin-heading { flex-direction: row; }
  .admin-filters { display: flex; }
  .admin-filters input { flex: 1; width: auto; }
  .admin-filters select, .admin-filters .admin-btn, .schedule-filters label { width: auto; }
}
@media (min-width: 1024px) {
  .navigation-drawer-actions { display: none; }
  .sidebar, .admin-sidebar { transform: none; }
  .menu-toggle, .admin-menu { display: none; }
  .shell { margin-left: 230px; padding: 40px clamp(24px, 5vw, 72px); }
  .admin-main { margin-left: 248px; }
  .admin-content { padding: 28px 30px 50px; }
  .admin-account > span:not(.admin-avatar) { display: block; }
  .court-grid, .flow .court-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .court-detail { grid-template-columns: minmax(0, 1.35fr) minmax(250px, .85fr); }
  .schedule-management { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-layout { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
}
@media (min-width: 1280px) {
  .court-grid-admin, .admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
