/*
 * TeesDeSalida. White and green, light only: generous white space, green for
 * the key action, availability and highlights. Amber and red appear only for
 * warnings and errors, and every status colour comes with a text label.
 */

/* ------------------------------------------------------------ tokens */
:root {
  /* "only": browsers must not auto-darken the page either. */
  color-scheme: only light;

  --bg: #ffffff;
  --surface: #f6f7f4;
  --surface-strong: #eceeea;
  --line: #e1e5df;
  --text: #121614;
  --text-muted: #56605a;
  --text-faint: #5f6862;
  --brand: #127a52;
  --brand-strong: #0c5e3f;
  --brand-tint: #e3f2e9;
  --brand-tint-strong: #c9e7d5;
  --on-brand: #ffffff;
  --warn: #9a5405;
  --warn-tint: #fbefdc;
  --danger: #b3261e;
  --danger-tint: #fbe4e2;
  --segment-on: #ffffff;
  --tab-bar: rgb(255 255 255 / 0.94);
  --scrim: rgb(10 14 12 / 0.4);
  --shadow-colour: rgb(16 24 20 / 0.07);
  --shadow: 0 1px 2px var(--shadow-colour), 0 6px 20px var(--shadow-colour);
  --sheet-shadow: 0 -8px 40px rgb(16 24 20 / 0.18);

  --radius-chip: 8px;
  --radius-row: 12px;
  --radius-card: 16px;
  --radius-sheet: 24px;
  --radius-pill: 999px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;

  --tab-bar-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* ------------------------------------------------------------ base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
}
body {
  color: var(--text);
  font: 400 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
a {
  color: var(--brand);
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.numeric,
time {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--text-muted);
}
.small {
  font-size: 13px;
}
.strong {
  font-weight: 600;
}
.grow {
  flex: 1;
  min-width: 0;
}
.flush {
  margin: 0;
}
.flush-top {
  margin-top: 0;
}
.emoji {
  font-size: 24px;
  line-height: 1;
}
.emoji.large {
  font-size: 40px;
  margin-bottom: 8px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row.top {
  align-items: flex-start;
}
.row.wrap {
  flex-wrap: wrap;
  gap: 6px;
}
.stack > * + * {
  margin-top: 10px;
}
.spaced {
  margin-bottom: 10px;
}
.footnote {
  margin-top: 18px;
}

/* ------------------------------------------------------------ layout */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#view {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 4px 16px calc(var(--tab-bar-height) + var(--safe-bottom) + 32px);
  outline: none;
}
.screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 12px;
}
.screen-header h1 {
  margin: 0;
  font: 800 30px/1.1 var(--font-display);
  letter-spacing: -0.02em;
}
.subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-muted);
}
.back-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
}
.back-header h1 {
  margin: 0;
  font: 800 24px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}
.section-title {
  margin: 24px 0 10px;
  font: 700 13px/1.2 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.month-heading {
  margin: 24px 0 10px;
  font: 800 20px/1.2 var(--font-display);
  letter-spacing: -0.01em;
  text-transform: capitalize;
}

/* ------------------------------------------------------------ tab bar */
.tab-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tab-bar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--tab-bar);
  border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
}
.tab-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-decoration: none;
}
.tab-bar svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab-bar svg .fill {
  fill: currentColor;
  stroke: none;
}
.tab-bar a[aria-current="page"] {
  color: var(--brand-strong);
}
.tab-bar a[aria-current="page"] svg {
  stroke-width: 2.1;
}

/* ------------------------------------------------------------ icons & buttons */
.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button .icon,
.chip .icon,
.tag .icon {
  width: 17px;
  height: 17px;
}
.spinning {
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pull to refresh: a round button that follows the finger down from the top, turning as it comes. */
.pull-indicator {
  --pull: 0px;
  --turn: 0deg;
  position: fixed;
  top: calc(var(--safe-top) - 40px);
  left: 50%;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow);
  color: var(--text-muted);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, var(--pull)) rotate(var(--turn));
}
.pull-indicator.ready,
.pull-indicator.refreshing {
  color: var(--brand);
}
.pull-indicator.refreshing .icon {
  animation: spin 0.9s linear infinite;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    background 0.15s ease;
}
.button:active {
  transform: scale(0.97);
}
.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
.button.primary:hover {
  background: var(--brand-strong);
}
.button.soft {
  border-color: transparent;
  background: var(--brand-tint);
  color: var(--brand-strong);
}
.button.ghost {
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--brand);
}
.button.block {
  width: 100%;
}
.button.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}
.button[disabled] {
  opacity: 0.55;
  pointer-events: none;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.icon-button:active {
  background: var(--surface-strong);
}
.icon-button[disabled] {
  opacity: 0.4;
}

/* ------------------------------------------------------------ segmented control */
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-strong);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--segment-on);
  color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}
.segmented svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}
.controls.sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -16px 8px;
  padding: calc(var(--safe-top) + 8px) 16px 8px;
  background: var(--bg);
}

/* ------------------------------------------------------------ brand */
/* A quiet line above each screen: the icon and the name, then the screen's own title. */
.brand-bar {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) 16px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-strong);
  text-decoration: none;
}
.brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
.wordmark {
  font: 800 17px/1 var(--font-display);
  letter-spacing: -0.01em;
}

/* A club's own logo on a round white badge, with a hairline so white logos keep their edge. */
.club-badge {
  display: block;
  flex: none;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line);
  object-fit: contain;
}

/* ------------------------------------------------------------ chips, pills, tags */
.chips {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}
/* A soft fade at the right edge says the row scrolls. */
.chips {
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  border-color: var(--brand-tint-strong);
  background: var(--brand-tint);
  color: var(--brand-strong);
}
/* A chip led by a club's badge: the badge sits close to the rounded edge, like an avatar. */
.chip.with-mark {
  gap: 7px;
  padding-left: 6px;
}
.chip.with-mark .dot {
  margin-left: 6px;
}
/* A wrapping group of chips, for choices inside sheets. */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
.dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--course, var(--text-faint));
}
.dot.large {
  width: 12px;
  height: 12px;
}
.course-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.course-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--course);
}
.course-pill.plain::before {
  content: none;
}
.course-pill .club-badge {
  margin-left: -5px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.tag.brand {
  background: var(--brand-tint);
  color: var(--brand-strong);
}
.tag.warn {
  background: var(--warn-tint);
  color: var(--warn);
}
.tag.danger {
  background: var(--danger-tint);
  color: var(--danger);
}
.tag.new {
  background: var(--brand-tint);
  color: var(--brand-strong);
}

/* ------------------------------------------------------------ saved searches */
.saved-search {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 0;
}
.saved-search-run {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 4px 10px 16px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.saved-search-run .grow {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.saved-search-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
}
.saved-search-count b {
  font: 800 22px/1.1 var(--font-display);
  color: var(--brand-strong);
}
.saved-search-count small {
  font-size: 12px;
  color: var(--text-muted);
}
.saved-search-preview {
  margin: 12px 0;
}
/* ------------------------------------------------------------ course sheet */
.forecast-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0;
}
.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: var(--radius-row);
  background: var(--surface);
}
.forecast-day .weather {
  margin: 0;
}
.center {
  text-align: center;
}
.course-name-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.plain-list {
  margin: 8px 0 12px;
  padding-left: 18px;
}

/* ------------------------------------------------------------ banners & cards */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-row);
  background: var(--surface);
  font-size: 14px;
}
.banner.info {
  background: var(--brand-tint);
}
.banner.danger {
  background: var(--danger-tint);
  color: var(--danger);
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  box-shadow: var(--shadow);
}
.card.padded {
  padding: 16px;
}
.card.list {
  overflow: hidden;
}
.card.list > * + * {
  border-top: 1px solid var(--line);
}
.skeleton {
  height: 132px;
  border-radius: var(--radius-card);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-strong) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.skeleton.tall {
  height: 170px;
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty h2 {
  margin: 0 0 6px;
  font: 800 20px/1.2 var(--font-display);
  color: var(--text);
}

/* ------------------------------------------------------------ week */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 10px;
}
.week-nav .label {
  font-size: 15px;
  font-weight: 700;
}
.day-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  padding: 14px 14px 14px 12px;
  color: inherit;
  cursor: pointer;
  transition: transform 0.08s ease;
}
.day-card:active {
  transform: scale(0.99);
}
/* Scrolling a day's row presses the card too; it shouldn't shrink under the finger. */
.day-card.with-tee-times:active {
  transform: none;
}
/* A day tee time by tee time: a row that scrolls sideways out to the card's edge. */
.tee-times-row {
  display: flex;
  gap: 6px;
  margin-right: -14px;
  padding: 2px 14px 2px 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}
.tee-times-row::-webkit-scrollbar {
  display: none;
}
.tee-times-row .tee-time {
  display: flex;
  flex: 0 0 68px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}
.tee-time .club {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.tee-time.more {
  display: grid;
  place-content: center;
  border-color: var(--line);
  background: var(--surface);
  text-decoration: none;
}
.day-card.today {
  padding: 13px 13px 13px 11px;
  border: 2px solid var(--brand);
}
.today-over {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--brand);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: start;
  padding: 8px 0;
  border-radius: 12px;
  background: var(--surface);
  line-height: 1;
}
.weekend .date-block {
  background: var(--brand-tint);
}
.date-block .weekday {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.date-block .day {
  margin: 4px 0 3px;
  font: 800 26px/1 var(--font-display);
}
.date-block .month {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}
/* What can be booked fills the card's height, level with the date and its weather. */
.day-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.day-main > .tee-times-row,
.day-main > .day-state {
  flex: 1;
}
/* The day's date (a link to the day) with its weather underneath. */
.day-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.day-side .date-block {
  align-self: stretch;
  color: inherit;
  text-decoration: none;
}
.day-side .weather {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 3px;
  max-width: 100%;
  margin: 0;
  font-size: 13px;
  text-align: center;
}
/* A day with nothing to show says why, in one line where the boxes would be. */
.day-state {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 64px;
  margin: 0;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}
.day-state .icon {
  width: 16px;
  height: 16px;
}
/* A day already on screen being read again. */
.day-refreshing {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--text-faint);
}
.day-refreshing .icon {
  width: 14px;
  height: 14px;
}
/* A forecast badge: symbol, top temperature, rain chance when it matters. */
.weather {
  display: inline-flex;
  flex: none;
  align-items: baseline;
  gap: 3px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.weather small {
  font-size: 12px;
}
.weather.concern {
  color: var(--warn);
}
.warn-text b {
  color: var(--warn);
}
/* A link with an icon inside a line of text. */
.save-search[aria-pressed="true"] .icon {
  fill: currentColor;
  color: var(--brand);
}
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}
.inline-link .icon {
  width: 15px;
  height: 15px;
}
.day-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ------------------------------------------------------------ day */
.day-strip {
  display: flex;
  gap: 6px;
  margin: 0 -16px 8px;
  padding: 4px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.day-strip::-webkit-scrollbar {
  display: none;
}
.day-pill {
  flex: none;
  width: 52px;
  padding: 7px 0 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}
.day-pill .weekday {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-faint);
}
.day-pill .day {
  font: 800 19px/1.3 var(--font-display);
}
.day-pill[aria-current="date"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
.day-pill[aria-current="date"] .weekday {
  color: var(--on-brand);
}
.course-block {
  padding: 14px;
}
.course-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.course-head .name {
  font-size: 16px;
  font-weight: 700;
}
.course-head .meta {
  font-size: 13px;
  color: var(--text-muted);
}
.tee-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin: 12px 0 6px;
}
.tee-time {
  position: relative;
  padding: 7px 4px 6px;
  border: 1px solid var(--brand-tint-strong);
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--text);
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}
.tee-time:active {
  transform: scale(0.97);
}
.tee-time.late {
  border-color: var(--line);
  background: var(--surface);
}
.tee-time.new::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
}
.tee-time .time {
  display: block;
  font: 700 17px/1.2 var(--font);
  font-variant-numeric: tabular-nums;
}
.tee-time .places {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
}
.tee-time .places i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.tee-time .places i.off {
  background: var(--line);
}
.tee-time .price {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
}
.legend .icon {
  width: 16px;
  height: 16px;
}
.state-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status.down {
  color: var(--danger);
}
.tee-time-row {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: var(--bg);
  text-align: left;
  cursor: pointer;
}
.tee-time-row .time {
  font: 700 19px var(--font);
  font-variant-numeric: tabular-nums;
}
.tee-time-row .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tee-time-row small {
  font-size: 13px;
  color: var(--text-muted);
}
.hour-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 14px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ tournaments */
/* The left column: the date, and the club's badge under it. */
.tournament-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tournament-side .date-block {
  align-self: stretch;
}
.tournament {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  padding: 14px;
}
/* Each club's colour, quietly: a tinted date block next to its badge. */
.tournament.club-coloured .date-block {
  background: color-mix(in srgb, var(--course) 12%, var(--bg));
}
.tournament.club-coloured .date-block .weekday,
.tournament.club-coloured .date-block .month {
  /* Darkened so small text keeps its contrast whatever the club's colour. */
  color: color-mix(in srgb, var(--course) 70%, black);
}
.tournament.ineligible {
  background: var(--surface);
  box-shadow: none;
}
.tournament.ineligible .tournament-name {
  color: var(--text-muted);
}
.tournament-name {
  display: -webkit-box;
  margin: 6px 0 4px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tournament-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.registration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: var(--radius-chip);
  font-size: 13px;
  font-weight: 700;
}
.registration .icon {
  width: 16px;
  height: 16px;
}
.registration.soon {
  background: var(--warn-tint);
  color: var(--warn);
}
.registration.open {
  background: var(--brand-tint);
  color: var(--brand-strong);
}
.registration.closed,
.registration.unknown {
  background: var(--surface-strong);
  color: var(--text-muted);
}
.tournament-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* ------------------------------------------------------------ courses & forms */
.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  cursor: pointer;
}
.row-item .title,
.course-item .title {
  display: block;
  font-weight: 700;
}
.row-item .subtitle,
.course-item .subtitle {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}
.checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--brand);
}
.course-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 12px;
  padding: 14px 52px 14px 16px;
}
.course-item > .dot {
  width: 12px;
  height: 12px;
  margin: 6px 10px 0;
}
.star {
  position: absolute;
  top: 6px;
  right: 4px;
  color: var(--text-faint);
}
.star[aria-pressed="true"] {
  color: #d9a400;
}
.star[aria-pressed="true"] .icon {
  fill: currentColor;
}
.field {
  display: block;
  margin: 14px 0;
}
.field.first {
  margin-top: 0;
}
.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  background: var(--surface);
  font-size: 16px;
}
.input:focus {
  border-color: transparent;
  outline: 2px solid var(--brand);
}

/* ------------------------------------------------------------ sheets */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.scrim.open {
  opacity: 1;
}
.sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 41;
  max-width: 640px;
  max-height: 92dvh;
  margin: 0 auto;
  padding: 8px 20px calc(24px + var(--safe-bottom));
  overflow-y: auto;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--bg);
  box-shadow: var(--sheet-shadow);
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.open {
  transform: translateY(0);
}
.sheet-top {
  position: relative;
  height: 28px;
}
.grabber {
  width: 36px;
  height: 4px;
  margin: 4px auto 12px;
  border-radius: 2px;
  background: var(--line);
}
.sheet-close {
  position: absolute;
  top: -4px;
  right: -12px;
  color: var(--text-muted);
}
.sheet h2 {
  margin: 4px 0;
  font: 800 22px/1.2 var(--font-display);
  letter-spacing: -0.01em;
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 16px 0;
  font-size: 15px;
}
.facts dt {
  color: var(--text-muted);
}
.facts dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.hand-off {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-row);
  background: var(--surface);
  font-size: 14px;
}
.check-result {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-row);
  font-weight: 600;
}
.check-result.ok {
  background: var(--brand-tint);
  color: var(--brand-strong);
}
.check-result.gone {
  background: var(--danger-tint);
  color: var(--danger);
}
.check-result.unknown {
  background: var(--warn-tint);
  color: var(--warn);
}

/* ------------------------------------------------------------ toast */
#toast {
  position: fixed;
  bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 16px);
  left: 50%;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: all 0.2s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .spinning,
  .pull-indicator .icon {
    animation: none;
  }
  .sheet,
  .scrim,
  #toast {
    transition: none;
  }
}
@media (min-width: 700px) {
  .brand-bar {
    padding-top: 24px;
  }
}
