:root {
  color-scheme: light;
  --bg: #f3eddd;
  --surface: #fffdf6;
  --surface-soft: #f8f1df;
  --line: #ded0ad;
  --line-strong: #c2ae73;
  --text: #183826;
  --muted: #7b7a64;
  --muted-strong: #52634f;
  --blue: #4b2e83;
  --blue-strong: #321957;
  --blue-soft: #efe6ff;
  --busy: #ebe3d2;
  --green: #006b3f;
  --green-strong: #004b2c;
  --green-soft: #e2f0e5;
  --gold: #bda36a;
  --cream: #fff8e8;
  --shadow: 0 18px 46px rgba(0, 67, 42, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app-shell::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -12%, rgba(75, 46, 131, 0.12), transparent 34%),
    linear-gradient(180deg, #fbf5e5 0%, var(--bg) 100%);
  color: var(--text);
  overscroll-behavior-y: contain;
  -ms-overflow-style: none;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, system-ui,
    sans-serif;
}

button {
  font: inherit;
  color: inherit;
}

.app-shell {
  width: min(560px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 18px;
  background: var(--surface);
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  box-shadow: 0 0 0 1px rgba(0, 75, 44, 0.07);
}

.date-rail,
.venue-list,
.slot-court-scroll {
  overflow-x: auto;
  scrollbar-width: none;
}

.date-rail::-webkit-scrollbar,
.venue-list::-webkit-scrollbar,
.slot-court-scroll::-webkit-scrollbar {
  display: none;
}

.date-rail {
  display: flex;
  gap: 7px;
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 107, 63, 0.06), rgba(75, 46, 131, 0.04)),
    var(--surface);
}

.date-rail.is-hidden {
  display: none;
}

.date-chip {
  flex: 0 0 52px;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  padding: 7px 4px;
}

.date-chip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 560;
}

.date-chip small {
  display: none;
}

.date-chip strong {
  display: block;
  margin: 5px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.date-chip.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(75, 46, 131, 0.26);
}

.date-chip.is-active span {
  color: rgba(255, 255, 255, 0.76);
}

.sport-switch {
  padding: 8px 14px 9px;
  border-bottom: 1px solid var(--line);
  background: #fbf6e8;
}

.venue-rail {
  padding: 8px 14px 9px;
  border-bottom: 1px solid var(--line);
  background: #fbf6e8;
}

.venue-rail.is-hidden {
  display: none;
}

.mode-nav {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0;
}

.mode-nav::-webkit-scrollbar {
  display: none;
}

.mode-sport-label {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.mode-sport-label {
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 600;
  padding: 0 2px 0 4px;
}

.mode-sport-label.is-active {
  color: var(--green-strong);
}

.mode-sport-label-padel.is-active {
  color: var(--blue-strong);
}

.mode-divider {
  width: 1px;
  height: 28px;
  flex: 0 0 1px;
  background: var(--line);
  margin: 0 4px;
}

.activity-tab {
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(194, 174, 115, 0.6);
  border-radius: 9px;
  background: rgba(255, 253, 246, 0.76);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 560;
  line-height: 1;
  padding: 0 11px;
}

.activity-tab.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-strong);
  box-shadow: inset 0 0 0 1px rgba(0, 107, 63, 0.08);
}

.activity-tab[data-activity="tournaments"].is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.mode-sport-label-padel + .activity-tab.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.activity-tab:disabled {
  cursor: default;
  opacity: 0.38;
}

.venue-list {
  display: flex;
  gap: 8px;
  margin: 0 -14px;
  padding: 0 14px;
}

.venue-chip {
  flex: 0 0 204px;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
  padding: 8px 10px;
  overflow: hidden;
  text-align: left;
}

.club-copy {
  min-width: 0;
  display: block;
}

.club-copy strong,
.club-copy span {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.club-copy strong {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, system-ui,
    sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.14;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-chip.is-active {
  border-color: var(--green-strong);
  background: var(--green-strong);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 75, 44, 0.22);
}

.venue-chip.is-active .club-copy span {
  color: rgba(255, 255, 255, 0.68);
}

.empty-courts {
  min-height: 38px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.schedule {
  min-height: 420px;
  background:
    linear-gradient(180deg, rgba(0, 107, 63, 0.04), transparent 80px),
    var(--bg);
}

.schedule-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
  color: var(--muted-strong);
}

.schedule-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.schedule-head strong {
  display: block;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 600;
}

.schedule-head span {
  display: block;
  margin-top: 3px;
  max-width: 270px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#daySummary {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: none;
  margin-top: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 13px;
}

.map-button,
.track-button,
.weather-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 0 10px;
  text-decoration: none;
}

.map-button {
  width: 34px;
  padding: 0;
}

.track-button,
.weather-button {
  cursor: pointer;
}

#daySummary .track-button span,
#daySummary .weather-button span {
  display: inline-flex;
  align-items: center;
  max-width: none;
  margin-top: 0;
  overflow: visible;
  color: inherit;
  font-size: inherit;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.track-button.is-tracking {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.track-button.is-tracking,
.track-button.is-tracking span,
.track-button.is-tracking svg {
  color: #ffffff;
  stroke: #ffffff;
}

.tracking-active-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes tracking-spin {
  to {
    transform: rotate(360deg);
  }
}

.rail-loader {
  width: 100%;
  display: flex;
  gap: 10px;
  padding: 0 26px;
}

.rail-loader span {
  width: 68px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(90deg, #eee3c8 0%, #fff8e8 45%, #eee3c8 100%);
  background-size: 220% 100%;
  animation: loader-shimmer 1.2s ease-in-out infinite;
}

.loading-state {
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.loading-state strong {
  color: var(--text);
  font-size: 18px;
}

.loader-ring {
  width: 32px;
  height: 32px;
  border: 3px solid #e5d5b4;
  border-top-color: var(--green);
  border-radius: 999px;
  animation: tracking-spin 0.9s linear infinite;
}

.auth-state {
  min-height: 360px;
}

body.is-public-web {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 107, 63, 0.15), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(75, 46, 131, 0.16), transparent 30%),
    linear-gradient(180deg, #fbf6e8 0%, #eee5cf 100%);
}

.web-header {
  display: grid;
  gap: 14px;
  padding: 18px 14px 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(0, 107, 63, 0.12), transparent 52%),
    linear-gradient(315deg, rgba(75, 46, 131, 0.12), transparent 48%),
    var(--surface);
}

.web-header-copy {
  display: grid;
  gap: 9px;
}

.web-kicker {
  width: fit-content;
  border: 1px solid rgba(194, 174, 115, 0.78);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.82);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 9px;
}

.web-header h1 {
  max-width: 660px;
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 8vw, 44px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0;
}

.web-header p {
  max-width: 620px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.45;
}

.web-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.web-primary-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 0 14px;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0, 107, 63, 0.22);
}

body.is-public-landing {
  background: #f4eddb;
}

body.is-public-landing .app-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  background: #f4eddb;
  box-shadow: none;
}

.public-landing {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 34px 18px calc(34px + env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 107, 63, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 46, 131, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 85% 12%, rgba(75, 46, 131, 0.14), transparent 28%),
    #f4eddb;
  background-size: 34px 34px, 34px 34px, auto;
}

.landing-copy {
  max-width: 520px;
  display: grid;
  gap: 16px;
  text-align: left;
}

.landing-kicker {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 10px;
}

.landing-copy h1 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 9vw, 48px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0;
}

.landing-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.42;
}

.landing-cta {
  width: fit-content;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 0 18px;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(0, 107, 63, 0.24);
}

.landing-visual {
  display: grid;
  place-items: center;
  perspective: 900px;
}

.landing-phone {
  width: min(340px, 94vw);
  border: 1px solid rgba(194, 174, 115, 0.72);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 67, 42, 0.18);
  padding: 14px;
  transform: rotateX(7deg) rotateZ(-1deg);
  animation: landing-float 4s ease-in-out infinite;
}

.landing-phone-top,
.landing-days,
.landing-clubs,
.landing-slots {
  display: grid;
  gap: 7px;
}

.landing-phone-top {
  grid-template-columns: 28px 1fr 44px;
  margin-bottom: 10px;
}

.landing-phone-top span {
  height: 9px;
  border-radius: 999px;
  background: #e8ddc2;
}

.landing-days {
  grid-template-columns: repeat(3, 1fr);
}

.landing-days span,
.landing-clubs span,
.landing-slots span {
  border-radius: 10px;
  background: var(--surface-soft);
}

.landing-days span {
  min-height: 54px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 7px 4px;
}

.landing-days strong {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1;
}

.landing-days .is-on {
  background: var(--blue);
  color: rgba(255, 255, 255, 0.75);
}

.landing-days .is-on strong {
  color: #ffffff;
}

.landing-clubs {
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.landing-clubs span {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.landing-clubs span:first-child {
  background: var(--green-strong);
  color: #ffffff;
}

.landing-clubs span:last-child {
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.landing-slots {
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.landing-slots span {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  animation: landing-slot 2.4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.landing-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-points span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.84);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 560;
  line-height: 1;
  padding: 8px 10px;
}

.creator-footer {
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: #9b9177;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.creator-footer a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.landing-footer {
  padding: 0;
  background: transparent;
}

@keyframes landing-float {
  50% {
    transform: rotateX(7deg) rotateZ(1deg) translateY(-6px);
  }
}

@keyframes landing-slot {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(75, 46, 131, 0.16);
  }
  50% {
    transform: translateY(-3px);
    box-shadow: 0 13px 26px rgba(75, 46, 131, 0.24);
  }
}

@keyframes loader-shimmer {
  to {
    background-position: -220% 0;
  }
}

.weather-button {
  color: var(--text);
  padding: 0 8px;
}

.weather-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-logo-img {
  width: 18px;
  height: 18px;
  display: block;
}

.timeline {
  padding: 0 14px 22px;
}

.tournament-list {
  display: grid;
  gap: 9px;
  padding-bottom: 4px;
}

.tournament-card {
  min-height: 94px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(0, 107, 63, 0.06), transparent 46%),
    var(--surface);
  color: inherit;
  padding: 10px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 75, 44, 0.07);
}

.tournament-card:active {
  transform: translateY(1px);
}

.tournament-date {
  min-height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 9px;
  background: var(--green-strong);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1;
}

.tournament-date strong {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
}

.tournament-date span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.tournament-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tournament-kicker,
.tournament-division {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-kicker {
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.tournament-kicker em {
  color: var(--muted);
  font-style: normal;
  font-weight: 560;
  text-transform: none;
}

.tournament-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-details {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tournament-division {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
  line-height: 1;
  padding: 5px 7px;
}

.tournament-arrow {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  line-height: 1;
}

.tournament-loading {
  min-height: 300px;
}

.slot-table-wrap {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0;
  padding: 0 0 4px;
}

.slot-time-grid {
  display: grid;
  gap: 5px;
  align-items: stretch;
}

.slot-court-scroll {
  min-width: 0;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}

.slot-grid {
  min-width: calc(var(--court-count) * 112px);
  display: grid;
  grid-template-columns: repeat(var(--court-count), minmax(104px, 1fr));
  gap: 5px;
  align-items: stretch;
}

.slot-corner,
.slot-court-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 75, 44, 0.08);
}

.slot-corner {
  z-index: 5;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
  box-shadow: 0 1px 0 rgba(0, 75, 44, 0.08);
}

.slot-court-head {
  min-width: 104px;
  display: grid;
  align-content: center;
  padding: 6px 7px;
  color: var(--text);
  line-height: 1.12;
  scroll-snap-align: start;
  border-top: 2px solid rgba(189, 163, 106, 0.7);
}

.slot-court-top {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.slot-court-head strong,
.slot-court-meta {
  min-width: 0;
  overflow: hidden;
}

.slot-court-head strong {
  display: -webkit-box;
  color: #16251c;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, system-ui,
    sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.12;
  text-overflow: clip;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.slot-court-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-badge {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
}

.icon-badge svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.venue-chip.is-active .icon-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.slot-time,
.slot-cell,
.slot-range {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
}

.slot-time {
  z-index: 4;
  background: var(--bg);
  color: var(--muted-strong);
  font-weight: 560;
}

.slot-time.is-range {
  min-height: 42px;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.slot-time.is-range strong {
  color: var(--muted-strong);
  font-size: 12px;
}

.slot-time.is-range span {
  color: #a99f84;
}

.slot-cell {
  min-width: 104px;
  border: 1px solid transparent;
  text-decoration: none;
}

.slot-cell.is-free {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  box-shadow:
    inset 0 -2px 0 rgba(189, 163, 106, 0.35),
    0 8px 16px rgba(75, 46, 131, 0.18);
}

.slot-cell.is-busy {
  background: var(--busy);
  color: #aaa086;
}

.slot-range {
  grid-column: span var(--court-count);
  min-width: 104px;
  min-height: 42px;
  flex-direction: column;
  gap: 4px;
  background: var(--busy);
  color: #8e886f;
  font-size: 11px;
  font-weight: 560;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.26) 0,
    rgba(255, 255, 255, 0.26) 6px,
    transparent 6px,
    transparent 12px
  );
}

.slot-range strong {
  color: var(--muted-strong);
  font-size: 12px;
}

.slot-range span {
  color: #9b9177;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.72);
  color: var(--muted);
  text-align: center;
  padding: 22px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  background: rgba(0, 45, 28, 0.38);
  padding: 18px 14px;
}

.modal-sheet {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.preference-sheet {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 107, 63, 0.08), transparent 42%),
    linear-gradient(315deg, rgba(75, 46, 131, 0.09), transparent 36%),
    var(--surface);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-sheet h2 {
  margin: 0 34px 8px 0;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, system-ui,
    sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.modal-lead {
  margin: 0 0 16px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.45;
}

.preference-intro {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.preference-intro h2 {
  margin-bottom: 0;
}

.preference-kicker {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.78);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 9px;
}

.preference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.preference-card {
  min-height: 112px;
  display: grid;
  align-content: end;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  color: var(--text);
  line-height: 1.16;
  overflow: hidden;
  padding: 14px;
  position: relative;
  text-align: left;
}

.preference-card::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  opacity: 0.9;
}

.preference-card.is-tennis {
  background:
    linear-gradient(135deg, rgba(0, 107, 63, 0.14), transparent 62%),
    var(--surface);
}

.preference-card.is-tennis::before {
  background: var(--green);
  box-shadow: inset 0 0 0 9px #ffffff, 0 0 0 1px var(--green);
}

.preference-card.is-padel {
  background:
    linear-gradient(135deg, rgba(75, 46, 131, 0.14), transparent 62%),
    var(--surface);
}

.preference-card.is-padel::before {
  background:
    linear-gradient(90deg, transparent 42%, var(--blue) 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, var(--blue) 42% 58%, transparent 58%),
    var(--blue-soft);
  box-shadow: 0 0 0 1px rgba(75, 46, 131, 0.28);
}

.preference-card span {
  position: relative;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.preference-card small {
  position: relative;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.25;
}

.preference-card:disabled {
  cursor: wait;
  opacity: 0.68;
}

.modal-note {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.track-form {
  display: grid;
  gap: 12px;
}

.track-field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.track-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.track-field input[type="date"],
.track-field select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  padding: 0 9px;
}

.track-field select[multiple] {
  height: auto;
  min-height: 104px;
  padding: 6px;
}

.track-field select[multiple] option {
  border-radius: 7px;
  padding: 7px 8px;
}

.track-checks {
  display: grid;
  gap: 5px;
}

.track-court-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  max-height: 178px;
  overflow: auto;
  padding-right: 2px;
}

.track-court-option {
  min-width: 0;
  cursor: pointer;
}

.track-court-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.track-court-option span {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  padding: 8px 9px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-court-option input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(75, 46, 131, 0.2);
}

.track-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.track-check {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 9px;
  font-size: 12px;
  font-weight: 580;
}

.track-check input {
  flex: 0 0 auto;
}

.track-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-actions.has-danger {
  grid-template-columns: 1fr 1fr 1fr;
}

.modal-primary,
.modal-secondary,
.modal-danger {
  min-height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.modal-primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.modal-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted-strong);
}

.modal-danger {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #dc2626;
}

.modal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green);
}

.modal-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bot-promo-sheet {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 107, 63, 0.12), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(75, 46, 131, 0.14), transparent 32%),
    var(--surface);
}

.bot-promo-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(75, 46, 131, 0.2);
  border-radius: 16px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(75, 46, 131, 0.24);
}

.bot-promo-icon .tracking-active-icon {
  width: 23px;
  height: 23px;
}

.bot-promo-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.bot-promo-list span {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(0, 107, 63, 0.12);
  border-radius: 10px;
  background: rgba(255, 253, 246, 0.62);
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
  padding: 8px 10px 8px 30px;
}

.bot-promo-list span::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 107, 63, 0.1);
}

.bot-promo-actions {
  margin-top: 2px;
}

.bot-promo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.weather-details {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.weather-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.weather-details dt,
.weather-details dd {
  margin: 0;
  font-size: 13px;
}

.weather-details dt {
  color: var(--muted);
}

.weather-details dd {
  color: var(--text);
  font-weight: 600;
}

.empty-state strong {
  color: var(--text);
}

@media (min-width: 720px) {
  body {
    padding: 20px 0;
  }

  .app-shell {
    min-height: calc(100vh - 40px);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }
}

@media (min-width: 920px) {
  body.is-public-web {
    padding: 28px 0;
  }

  body.is-public-web .app-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 56px);
    border-radius: 26px;
    overflow: hidden;
    box-shadow:
      0 28px 90px rgba(0, 67, 42, 0.18),
      0 0 0 1px rgba(194, 174, 115, 0.42);
  }

  body.is-public-web .web-header {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: end;
    gap: 28px;
    padding: 30px 30px 28px;
  }

  body.is-public-web .web-header h1 {
    font-size: 44px;
  }

  body.is-public-web .web-header p {
    font-size: 15px;
  }

  body.is-public-web .web-header-actions {
    justify-content: flex-end;
    text-align: right;
  }

  body.is-public-web .web-primary-link {
    min-height: 44px;
    padding: 0 18px;
  }

  body.is-public-web .sport-switch,
  body.is-public-web .venue-rail {
    padding: 14px 30px;
  }

  body.is-public-web .date-rail {
    gap: 9px;
    padding: 14px 30px;
  }

  body.is-public-web .date-chip {
    flex-basis: 60px;
    min-height: 62px;
  }

  body.is-public-web .date-chip strong {
    font-size: 23px;
  }

  body.is-public-web .mode-nav {
    min-height: 40px;
    gap: 9px;
  }

  body.is-public-web .activity-tab {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }

  body.is-public-web .mode-sport-label {
    font-size: 16px;
  }

  body.is-public-web .venue-list {
    gap: 10px;
    margin: 0 -30px;
    padding: 0 30px;
  }

  body.is-public-web .venue-chip {
    flex-basis: 244px;
    min-height: 62px;
    border-radius: 10px;
    padding: 10px 12px;
  }

  body.is-public-web .club-copy strong {
    font-size: 14px;
  }

  body.is-public-web .club-copy span {
    font-size: 12px;
  }

  body.is-public-web .schedule-head {
    min-height: 68px;
    padding: 20px 30px 12px;
  }

  body.is-public-web .schedule-head strong {
    font-size: 20px;
  }

  body.is-public-web .schedule-head span {
    max-width: 560px;
    font-size: 14px;
  }

  body.is-public-web .timeline {
    padding: 0 30px 34px;
  }

  body.is-public-web .slot-table-wrap {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  body.is-public-web .slot-grid {
    min-width: calc(var(--court-count) * 152px);
    grid-template-columns: repeat(var(--court-count), minmax(144px, 1fr));
    gap: 7px;
  }

  body.is-public-web .slot-time-grid {
    gap: 7px;
  }

  body.is-public-web .slot-corner,
  body.is-public-web .slot-court-head {
    min-height: 58px;
    border-radius: 10px;
  }

  body.is-public-web .slot-court-head {
    min-width: 144px;
    padding: 8px 10px;
  }

  body.is-public-web .slot-court-head strong {
    font-size: 13px;
  }

  body.is-public-web .slot-court-meta {
    font-size: 11px;
  }

  body.is-public-web .slot-cell,
  body.is-public-web .slot-time,
  body.is-public-web .slot-range {
    min-height: 40px;
    border-radius: 10px;
    font-size: 13px;
  }

  body.is-public-web .slot-cell {
    min-width: 144px;
  }

  body.is-public-web .tournament-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.is-public-web .creator-footer {
    padding: 18px 30px 22px;
  }
}
