/* Site-wide polish layer, loaded last by index.html and admin.html.
   To undo: remove its <link> from both pages. It adds no new colours: only existing palette values and tints. */

/* Phones: stop iOS and Android resizing text on their own. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}

/* Thai loses legibility with wide tracking, and tight headings clip its vowels. */
html[lang=th] h1,html[lang=th] h2,html[lang=th] h3{letter-spacing:-.01em;line-height:1.3}
html[lang=th] .hero-copy h1{letter-spacing:-.02em;line-height:1.2}
.eyebrow{font-size:12px;letter-spacing:.12em}
html[lang=th] .eyebrow{font-size:13px;letter-spacing:.02em}

/* Readable minimum sizes: customer pages. */
.announcement{font-size:13px;letter-spacing:.02em}
.language-button{font-size:13px}
.desktop-nav a{font-size:14px}
.hero-photo-label{font-size:11px;letter-spacing:.04em}
.results-toolbar p,.results-toolbar strong,.count-divider{font-size:14px}
.sport-badge{font-size:13px}
.image-tag{font-size:11px}
.location-link,.activity-types span{font-size:13px}
.card-date span{font-size:14px}
.card-price small{font-size:12px;letter-spacing:.02em}
.card-price span{font-size:13px}
.help-note span{font-size:14px}
.how-step p{font-size:14px;line-height:1.55}
.footer-main p,.footer-main a{font-size:13px}
.footer-bottom span{font-size:12px}
.venue-reserve span{font-size:12px;letter-spacing:.02em}
.status-badge{font-size:13px;padding:6px 10px;border-radius:7px}
.history-card p,.booking-id{font-size:14px;line-height:1.55}
.small-text,.small-text strong,.booking-steps li,.booking-calendar-label,.booking-date-card small,.booking-slot-legend span{font-size:13px}
.booking-slot small{font-size:12px}

/* Readable minimum sizes: admin workspace. */
.side-label,.workspace-metric-label,.workspace-inline-link,.workspace-activity,.workspace-table-footer,.workspace-panel>p{font-size:12px}
.side-label{letter-spacing:.08em}
.workspace-eyebrow{font-size:11px;letter-spacing:.1em}
.workspace-metric>span,.workspace-pill{font-size:11px}
.admin-page th{font-size:11px;letter-spacing:.04em}
.workspace-nowrap strong{font-size:12px}

/* Buttons. */
.button{font-size:14px;gap:12px;border-radius:10px;transition:background .18s,border-color .18s,color .18s,box-shadow .18s,transform .12s}
.button-small{font-size:13px;min-height:44px;gap:8px}
.card-bottom .button{font-size:13px;min-height:44px;padding:10px 14px;gap:8px;border-radius:10px}
.button:active,.profile-cta:active,.rebook-button:active{transform:scale(.98)}

/* Soft, consistent surfaces. */
.court-card,.history-card,.profile-card{border-color:#e3e6df;border-radius:16px;box-shadow:0 1px 2px #123d2e0a,0 8px 24px #123d2e0d}
.card-image{overflow:hidden}
.card-image img{transition:transform .45s ease}
.search-panel{border-color:#dce0d5;border-radius:14px;box-shadow:0 1px 2px #123d2e0a,0 8px 24px #123d2e0d;transition:border-color .18s,box-shadow .18s}
.search-panel:focus-within{border-color:var(--green)}
.how-section{border-radius:18px}
.empty-state{border-radius:16px}
.booking-slot,.booking-date-card{transition:background .15s,border-color .15s,box-shadow .15s}
dialog{border-radius:20px;border-color:#dce0d5}
dialog::backdrop{-webkit-backdrop-filter:blur(4px)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--gold);outline-offset:2px}

/* Hover only on devices with a real pointer, otherwise it sticks after a tap on phones. */
@media (hover:hover){
  .button:not(.button-outline):not(.line-button):hover{background:var(--green-dark);border-color:var(--green-dark)}
  .booking-slot:not(:disabled):hover,.booking-date-card:hover{border-color:var(--green);box-shadow:0 2px 10px #123d2e1a}
  .court-card:hover{box-shadow:0 2px 4px #123d2e0f,0 14px 34px #123d2e1a}
}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .court-card:hover{transform:translateY(-3px)}
  .court-card:hover .card-image img{transform:scale(1.04)}
}
@media (prefers-reduced-motion:reduce){
  .button,.court-card,.card-image img{transition:none}
  .button:active,.profile-cta:active,.rebook-button:active{transform:none}
}

/* iPhone and Android: inputs under 16px make iOS zoom the page on focus, and admin rules are specific enough to need !important. */
@media (pointer:coarse){
  input,select,textarea{font-size:16px!important}
}
@media (max-width:600px){
  .announcement{font-size:12px}
  html[lang=th] .hero-copy h1{font-size:clamp(44px,14.5vw,62px)}
  .court-card,.history-card,.profile-card{overflow-wrap:anywhere}
  .desktop-nav a{font-size:13px}
}
