:root {
  --tg-bg-color: #f6f8fb;
  --tg-text-color: #17212b;
  --tg-hint-color: #74808c;
  --tg-link-color: #2481cc;
  --tg-button-color: #2481cc;
  --tg-button-text-color: #ffffff;
  --surface: #ffffff;
  --surface-alt: #edf4f1;
  --line: rgba(23, 33, 43, 0.11);
  --green: #1f9d73;
  --blue: #2481cc;
  --amber: #d99116;
  --coral: #d65a4a;
  --shadow: 0 8px 24px rgba(23, 33, 43, 0.08);
  --soft-shadow: 0 14px 34px rgba(23, 33, 43, 0.1);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(237, 244, 241, 0.9) 0, var(--tg-bg-color) 280px),
    var(--tg-bg-color);
  color: var(--tg-text-color);
  font: 15px/1.42 "Manrope", "Onest", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv05" 1, "cv08" 1;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.theme-transition {
  transition:
    background 260ms var(--ease-premium),
    color 220ms ease;
}

body.theme-transition .app-shell,
body.theme-transition .bottom-nav,
body.theme-transition .card,
body.theme-transition .visual-hero,
body.theme-transition .field,
body.theme-transition .segment,
body.theme-transition .tag,
body.theme-transition .pill,
body.theme-transition .top-control,
body.theme-transition .primary,
body.theme-transition .secondary,
body.theme-transition .ghost,
body.theme-transition .slot,
body.theme-transition .date-chip,
body.theme-transition .mini-stat,
body.theme-transition .event-progress.detailed,
body.theme-transition .booking-format,
body.theme-transition .format-option,
body.theme-transition .people-chip,
body.theme-transition .agreement-sheet,
body.theme-transition .agreement-summary,
body.theme-transition .agreement-check,
body.theme-transition .booking-place-sheet,
body.theme-transition .booking-place-hero,
body.theme-transition .rating-grid div,
body.theme-transition .rating-model div,
body.theme-transition .achievement-icon,
body.theme-transition .top-player-row {
  transition:
    background 260ms var(--ease-premium),
    color 220ms ease,
    border-color 220ms ease,
    box-shadow 260ms ease,
    opacity 180ms ease,
    filter 220ms ease;
}

body.theme-transition .app-shell,
body.theme-transition .bottom-nav {
  animation: theme-soften 260ms var(--ease-premium) both;
}

body[data-theme="dark"] {
  --tg-bg-color: #0f171d;
  --tg-text-color: #edf4f1;
  --tg-hint-color: #98a7b3;
  --tg-link-color: #67b7ff;
  --tg-button-color: #318bd6;
  --tg-button-text-color: #ffffff;
  --surface: #17222b;
  --surface-alt: #21313b;
  --line: rgba(237, 244, 241, 0.12);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  --soft-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  background:
    linear-gradient(180deg, rgba(31, 157, 115, 0.14) 0, var(--tg-bg-color) 300px),
    var(--tg-bg-color);
}

button,
input,
select,
textarea {
  font: inherit;
}

#app,
.bottom-nav,
.card,
.visual-hero,
.primary,
.secondary,
.ghost,
.segment,
.tag,
.card-kicker,
.nav-label,
.nav-icon,
.field {
  font-family: "Manrope", "Onest", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 140ms var(--ease-premium),
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

button:active {
  transform: scale(0.975);
}

.app-shell {
  min-height: 100vh;
  padding: calc(16px + env(safe-area-inset-top)) 14px calc(140px + env(safe-area-inset-bottom));
}

.app-shell[data-motion="page"] > * {
  animation: screen-in 260ms var(--ease-premium) both;
}

.app-shell[data-motion="page"] > *:nth-child(2) {
  animation-delay: 18ms;
}

.app-shell[data-motion="page"] > *:nth-child(3) {
  animation-delay: 32ms;
}

.app-shell[data-motion="page"] > *:nth-child(n + 4) {
  animation-delay: 44ms;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand strong {
  font-size: 22px;
  line-height: 1.1;
}

.brand span,
.muted {
  color: var(--tg-hint-color);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31, 157, 115, 0.16);
  background: color-mix(in srgb, var(--surface) 82%, var(--surface-alt));
  color: var(--tg-text-color);
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
  min-width: 0;
}

.top-control {
  min-width: 38px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, var(--surface-alt));
  color: var(--tg-text-color);
  font-size: 12px;
  font-weight: 800;
}

.hero-strip {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.visual-hero {
  min-height: 176px;
  display: grid;
  align-content: end;
  margin-bottom: 14px;
  border-radius: 8px;
  padding: 17px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(8, 21, 29, 0.76), rgba(8, 21, 29, 0.3) 54%, rgba(8, 21, 29, 0.1)),
    linear-gradient(180deg, rgba(8, 21, 29, 0.06), rgba(8, 21, 29, 0.62)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
}

.hero-home {
  --hero-image: url("/static/assets/hero-home.jpg");
}

.hero-events {
  --hero-image: url("/static/assets/hero-events.jpg");
  background-position: center;
}

.hero-trainers {
  --hero-image: url("/static/assets/hero-trainers.jpg");
  background-position: center;
}

.hero-profile {
  --hero-image: url("/static/assets/hero-profile-v2.jpg");
  background-position: center;
}

.hero-social {
  --hero-image: url("/static/assets/hero-social.jpg");
  background-position: center;
}

.visual-hero-copy {
  display: grid;
  gap: 7px;
  max-width: 29rem;
  text-shadow: 0 2px 14px rgba(8, 21, 29, 0.42);
}

.visual-hero-copy > span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
}

.visual-hero-copy h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.04;
}

.visual-hero-copy p {
  margin: 0;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.88);
}

.visual-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.visual-hero-meta span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  text-shadow: none;
}

.event-banner {
  min-height: 148px;
  border-radius: 8px;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 157, 115, 0.95), rgba(36, 129, 204, 0.82) 58%, rgba(214, 90, 74, 0.82)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.13) 0 2px, transparent 2px 14px);
  color: #ffffff;
  box-shadow: var(--soft-shadow);
}

.event-banner h1 {
  margin: 2px 0 8px;
  font-size: 24px;
  line-height: 1.08;
}

.event-banner p {
  margin: 0;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.86);
}

.events-hero {
  min-height: 148px;
  display: grid;
  align-content: end;
  gap: 7px;
  margin-bottom: 12px;
  border-radius: 8px;
  padding: 18px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(9, 24, 36, 0.05), rgba(9, 24, 36, 0.74)),
    var(--court-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
}

.events-hero span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.events-hero h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.05;
}

.events-hero p {
  margin: 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.86);
}

.segments.event-scope {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-bottom: 14px;
}

.filters {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr;
}

.field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-alt));
  color: var(--tg-text-color);
  padding: 0 12px;
}

.segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-alt));
}

.date-presets {
  background: var(--surface-alt);
}

.segment {
  min-width: 0;
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: var(--tg-hint-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment.active {
  background: linear-gradient(135deg, var(--tg-button-color), var(--green));
  color: var(--tg-button-text-color);
  box-shadow: 0 5px 14px rgba(36, 129, 204, 0.18);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 9px;
}

.section-title.stacked {
  align-items: end;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.section-title > .muted {
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: right;
}

.section-title p {
  margin: 4px 0 0;
  max-width: 27rem;
  color: var(--tg-hint-color);
  font-size: 13px;
  line-height: 1.3;
}

.list {
  display: grid;
  gap: 10px;
}

.card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 98%, var(--surface-alt));
  padding: 12px;
  box-shadow: 0 7px 22px rgba(23, 33, 43, 0.045);
}

.app-shell[data-motion="page"] .list > *,
.app-shell[data-motion="page"] .profile-grid > *,
.app-shell[data-motion="page"] .info-grid > *,
.app-shell[data-motion="page"] .quick-list > * {
  animation: card-rise 280ms var(--ease-premium) both;
}

.app-shell[data-motion="page"] .list > *:nth-child(2),
.app-shell[data-motion="page"] .profile-grid > *:nth-child(2),
.app-shell[data-motion="page"] .info-grid > *:nth-child(2),
.app-shell[data-motion="page"] .quick-list > *:nth-child(2) {
  animation-delay: 18ms;
}

.app-shell[data-motion="page"] .list > *:nth-child(3),
.app-shell[data-motion="page"] .profile-grid > *:nth-child(3),
.app-shell[data-motion="page"] .info-grid > *:nth-child(3),
.app-shell[data-motion="page"] .quick-list > *:nth-child(3) {
  animation-delay: 32ms;
}

.app-shell[data-motion="page"] .list > *:nth-child(n + 4),
.app-shell[data-motion="page"] .profile-grid > *:nth-child(n + 4),
.app-shell[data-motion="page"] .info-grid > *:nth-child(n + 4),
.app-shell[data-motion="page"] .quick-list > *:nth-child(n + 4) {
  animation-delay: 44ms;
}

.sport-tennis {
  --court-image: url("/static/assets/court-tennis.svg");
  --sport-accent: #1f9d73;
  --sport-accent-2: #2481cc;
}

.sport-football {
  --court-image: url("/static/assets/court-football.svg");
  --sport-accent: #27945b;
  --sport-accent-2: #d99116;
}

.sport-volleyball {
  --court-image: url("/static/assets/court-volleyball.svg");
  --sport-accent: #d99116;
  --sport-accent-2: #d65a4a;
}

.sport-default {
  --court-image: linear-gradient(135deg, rgba(31, 157, 115, 0.9), rgba(36, 129, 204, 0.82));
  --sport-accent: var(--green);
  --sport-accent-2: var(--blue);
}

.court-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.court-media {
  position: relative;
  min-height: 118px;
  background:
    linear-gradient(180deg, rgba(9, 24, 36, 0.02), rgba(9, 24, 36, 0.28)),
    var(--court-image);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(23, 33, 43, 0.08);
}

.court-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46px;
  background: linear-gradient(180deg, transparent, rgba(9, 24, 36, 0.42));
}

.court-badge {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(9, 24, 36, 0.18);
  font-size: 19px;
}

.court-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.18;
}

.card-kicker {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: none;
}

.event-list {
  gap: 12px;
}

.event-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.event-cover {
  position: relative;
  min-height: 106px;
  background:
    linear-gradient(180deg, rgba(9, 24, 36, 0.02), rgba(9, 24, 36, 0.34)),
    var(--court-image);
  background-size: cover;
  background-position: center;
}

.event-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 54px;
  background: linear-gradient(180deg, transparent, rgba(9, 24, 36, 0.46));
}

.event-date {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  min-width: 54px;
  display: grid;
  place-items: center;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #17212b;
  box-shadow: 0 8px 20px rgba(9, 24, 36, 0.16);
}

.event-date strong {
  color: #17212b;
  font-size: 18px;
  line-height: 1;
}

.event-date span {
  color: #50606c;
  font-size: 11px;
  font-weight: 800;
}

.event-date.large {
  position: static;
  width: 62px;
  margin-bottom: 12px;
}

.event-sport-badge {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(9, 24, 36, 0.18);
  font-size: 19px;
}

.event-body,
.event-detail {
  display: grid;
  gap: 12px;
}

.event-body {
  padding: 12px;
}

.event-description,
.event-copy p {
  margin: 0;
  color: var(--tg-hint-color);
}

.event-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-progress {
  display: grid;
  gap: 7px;
}

.event-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--tg-hint-color);
  font-size: 13px;
}

.event-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.08);
}

.event-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sport-accent), var(--sport-accent-2));
}

.event-progress.detailed {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-alt));
}

.event-detail-hero {
  min-height: 230px;
  display: grid;
  align-content: end;
  padding: 18px;
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(9, 24, 36, 0.04), rgba(9, 24, 36, 0.78)),
    var(--court-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
}

.event-detail-hero h1 {
  margin: 0 0 9px;
  max-width: 34rem;
  font-size: 28px;
  line-height: 1.05;
}

.event-detail-hero .meta {
  color: rgba(255, 255, 255, 0.86);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mini-stat {
  display: grid;
  gap: 5px;
  min-height: 76px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-alt));
}

.mini-stat span {
  color: var(--tg-hint-color);
  font-size: 12px;
}

.mini-stat strong {
  font-size: 14px;
  line-height: 1.15;
}

.event-copy {
  gap: 8px;
}

.quick-list {
  gap: 8px;
}

.slot-card {
  position: relative;
  border-left: 4px solid var(--green);
  overflow: hidden;
}

.court-ambient {
  border-left-color: var(--sport-accent);
}

.court-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.74)),
    var(--court-image);
  background-size: cover;
  background-position: center;
  opacity: 0.72;
}

body[data-theme="dark"] .court-ambient::before {
  background:
    linear-gradient(90deg, rgba(9, 20, 26, 0.9), rgba(9, 20, 26, 0.74)),
    var(--court-image);
  background-size: cover;
  background-position: center;
  opacity: 0.96;
}

.court-ambient > * {
  position: relative;
  z-index: 1;
}

body[data-theme="dark"] .court-ambient h3,
body[data-theme="dark"] .court-ambient .card-kicker {
  color: #ffffff;
}

body[data-theme="dark"] .court-ambient .meta {
  color: rgba(237, 244, 241, 0.82);
}

body[data-theme="dark"] .court-ambient .tag {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 23, 31, 0.82);
  color: #ffffff;
}

body[data-theme="dark"] .court-ambient .price {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(237, 244, 241, 0.93);
}

body[data-theme="dark"] .court-ambient .price small {
  color: #50606c;
}

.slot-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto auto;
  width: 96px;
  height: 5px;
  background: linear-gradient(90deg, var(--sport-accent), var(--sport-accent-2), var(--coral));
}

.slot-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--tg-hint-color);
  font-size: 13px;
}

.tag {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--tg-text-color);
}

.price {
  display: inline-grid;
  justify-items: end;
  gap: 1px;
  min-width: max-content;
  padding: 5px 8px;
  border: 1px solid rgba(31, 157, 115, 0.2);
  border-radius: 8px;
  background: rgba(31, 157, 115, 0.1);
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.price small {
  color: var(--tg-hint-color);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.price strong {
  color: var(--green);
  font-size: 14px;
  line-height: 1.1;
}

.primary,
.secondary,
.ghost {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.42;
}

.primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, var(--tg-button-color), var(--green));
  color: var(--tg-button-text-color);
  box-shadow: 0 8px 18px rgba(36, 129, 204, 0.18);
}

.primary::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -55%;
  bottom: -55%;
  left: -75%;
  width: 52%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  opacity: 0.76;
  animation: cta-shine 4.8s ease-in-out infinite;
  pointer-events: none;
}

.primary::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%);
  pointer-events: none;
}

.primary:disabled,
.secondary:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.primary:disabled::before {
  animation: none;
  opacity: 0;
}

.secondary {
  background: var(--surface-alt);
  color: var(--tg-text-color);
  border: 1px solid rgba(23, 33, 43, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.ghost {
  background: transparent;
  color: var(--tg-link-color);
}

@media (hover: hover) {
  .primary:hover,
  .secondary:hover,
  .nav-item:hover {
    transform: translateY(-1px);
  }

  .primary:hover {
    box-shadow: 0 11px 24px rgba(36, 129, 204, 0.22);
  }
}

.actions,
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.slot-card .actions .primary,
.slot-card .actions .secondary,
.booking-choice .primary,
.booking-choice .secondary {
  min-height: 38px;
  border-radius: 6px;
}

.court-detail {
  display: grid;
  gap: 14px;
}

.detail-head {
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.9), rgba(237,244,241,0.96)),
    linear-gradient(90deg, rgba(31,157,115,0.2), rgba(217,145,22,0.15));
  border: 1px solid var(--line);
}

.court-hero {
  min-height: 190px;
  display: grid;
  align-content: end;
  overflow: hidden;
  color: #ffffff;
  border: 0;
  background:
    linear-gradient(180deg, rgba(9, 24, 36, 0.06) 0%, rgba(9, 24, 36, 0.46) 58%, rgba(9, 24, 36, 0.78) 100%),
    var(--court-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
}

.detail-head h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.12;
}

.court-hero h1 {
  text-shadow: 0 2px 14px rgba(9, 24, 36, 0.42);
}

.court-hero .meta {
  color: rgba(255, 255, 255, 0.86);
}

.date-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82px, 1fr);
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.date-chip {
  min-height: 48px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--tg-text-color);
  border: 1px solid var(--line);
}

.date-chip.active {
  border-color: var(--blue);
  background: rgba(36, 129, 204, 0.12);
}

.slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.slot {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--tg-text-color);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.slot.active {
  border-color: var(--green);
  background: rgba(31, 157, 115, 0.12);
  color: var(--green);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(31, 157, 115, 0.2);
}

.slot:active,
.date-chip:active {
  transform: none;
}

.slot:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.booking-choice {
  gap: 12px;
  border-color: rgba(31, 157, 115, 0.36);
  background: linear-gradient(180deg, var(--surface), rgba(237, 244, 241, 0.72));
}

.booking-summary,
.receipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.booking-summary-main h3 {
  margin: 0 0 4px;
}

.booking-format {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--surface-alt));
}

.format-option,
.people-chip {
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: var(--tg-hint-color);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.42;
}

.format-option.active,
.people-chip.active {
  background: linear-gradient(135deg, var(--tg-button-color), var(--green));
  color: var(--tg-button-text-color);
  box-shadow: 0 5px 14px rgba(36, 129, 204, 0.16);
}

.people-block {
  display: grid;
  gap: 8px;
}

.booking-caption {
  color: var(--tg-hint-color);
  font-size: 13px;
}

.people-chips {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.confirm-booking {
  min-height: 44px;
}

.agreement-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
  background: rgba(9, 24, 36, 0.44);
  backdrop-filter: blur(10px);
  animation: fade-in 160ms ease both;
}

.agreement-sheet {
  width: min(760px, 100%);
  max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: 0 auto;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(23, 33, 43, 0.1);
  border-radius: 8px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 244, 241, 0.98)),
    var(--surface);
  box-shadow: 0 22px 56px rgba(23, 33, 43, 0.22);
  animation: sheet-in 220ms var(--ease-premium) both;
}

body[data-theme="dark"] .agreement-sheet {
  border-color: rgba(237, 244, 241, 0.14);
  background:
    linear-gradient(180deg, rgba(28, 42, 51, 0.98), rgba(15, 23, 29, 0.99)),
    var(--surface);
  color: var(--tg-text-color);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

.agreement-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.agreement-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.08;
  color: var(--tg-text-color);
}

.agreement-close {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  color: var(--tg-hint-color);
  font-size: 24px;
  line-height: 1;
}

body[data-theme="dark"] .agreement-close {
  background: rgba(237, 244, 241, 0.06);
  color: rgba(237, 244, 241, 0.74);
}

.agreement-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(31, 157, 115, 0.09);
  color: var(--tg-text-color);
}

body[data-theme="dark"] .agreement-summary {
  border: 1px solid rgba(31, 157, 115, 0.18);
  background: rgba(31, 157, 115, 0.12);
}

.agreement-summary strong {
  font-size: 16px;
  color: var(--tg-text-color);
}

.agreement-summary span {
  color: var(--tg-hint-color);
  font-size: 13px;
}

body[data-theme="dark"] .agreement-summary span {
  color: rgba(237, 244, 241, 0.74);
}

.agreement-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--tg-text-color);
  font-size: 14px;
}

body[data-theme="dark"] .agreement-list {
  color: rgba(237, 244, 241, 0.9);
}

.agreement-list li::marker {
  color: var(--green);
}

.agreement-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--tg-text-color);
  font-size: 14px;
  line-height: 1.35;
}

body[data-theme="dark"] .agreement-check {
  border-color: rgba(237, 244, 241, 0.12);
  background: rgba(23, 34, 43, 0.94);
  color: rgba(237, 244, 241, 0.94);
}

.agreement-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

body[data-theme="dark"] .agreement-check input {
  color-scheme: dark;
}

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

body[data-theme="dark"] .agreement-actions .secondary {
  border-color: rgba(237, 244, 241, 0.14);
  background: #21313b;
  color: #edf4f1;
  box-shadow: none;
}

.success {
  display: grid;
  gap: 12px;
  min-height: 56vh;
  align-content: center;
}

.booking-success {
  min-height: auto;
  align-content: start;
}

.success-card {
  min-height: 190px;
  align-content: end;
  border: 0;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(9, 24, 36, 0.05), rgba(9, 24, 36, 0.74)),
    url("/static/assets/hero-booking.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
}

.success-card h1 {
  margin: 4px 0 6px;
  font-size: 28px;
  line-height: 1.04;
}

.success-card .muted,
.success-card .card-kicker {
  color: rgba(255, 255, 255, 0.86);
}

.booking-receipt {
  gap: 0;
  padding: 0 12px;
}

.receipt-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.receipt-row:last-child {
  border-bottom: 0;
}

.receipt-row span {
  color: var(--tg-hint-color);
}

.receipt-row strong {
  text-align: right;
}

.success-actions {
  grid-template-columns: 1.25fr 1fr;
}

.onboarding {
  min-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto auto auto;
  gap: 18px;
  padding: 4px 0 10px;
}

.onboarding-stage {
  display: grid;
  place-items: center;
  min-height: 300px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(31, 157, 115, 0.14), rgba(36, 129, 204, 0.12)),
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.38));
  border: 1px solid rgba(23, 33, 43, 0.08);
}

.preview-phone {
  width: min(250px, 78vw);
  min-height: 330px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(23, 33, 43, 0.08);
  box-shadow: var(--soft-shadow);
}

.preview-topline {
  width: 74px;
  height: 7px;
  margin: 0 auto 4px;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.12);
}

.preview-card {
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 14px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.preview-card.compact {
  min-height: 82px;
  color: var(--tg-text-color);
  background: var(--surface-alt);
}

.preview-card span,
.preview-card small {
  opacity: 0.82;
}

.preview-card strong {
  font-size: 17px;
  line-height: 1.15;
}

.accent-coral {
  background: linear-gradient(135deg, var(--coral), var(--blue));
}

.accent-amber {
  background: linear-gradient(135deg, var(--amber), var(--green));
}

.preview-tabs,
.preview-share-row,
.preview-list {
  display: grid;
  gap: 8px;
}

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

.preview-share-row {
  grid-template-columns: 1fr 1fr 1fr;
}

.preview-tabs span,
.preview-share-row span,
.preview-list span,
.preview-button {
  height: 34px;
  border-radius: 8px;
  background: rgba(36, 129, 204, 0.11);
}

.preview-list span {
  height: 42px;
  background: rgba(31, 157, 115, 0.12);
}

.preview-button {
  height: 44px;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.onboarding-copy {
  display: grid;
  gap: 8px;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.onboarding-copy h1 {
  margin: 0;
  max-width: 24rem;
  font-size: 30px;
  line-height: 1.05;
}

.onboarding-copy p {
  margin: 0;
  max-width: 31rem;
  color: var(--tg-hint-color);
  font-size: 15px;
}

.onboarding-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.16);
}

.dot.active {
  width: 24px;
  background: var(--green);
}

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

.success-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  font-size: 28px;
}

.profile-grid {
  display: grid;
  gap: 10px;
}

.profile-user-card {
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(31, 157, 115, 0.22);
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 157, 115, 0.18);
  font-size: 22px;
  font-weight: 900;
}

.profile-avatar.fallback {
  text-transform: uppercase;
}

.profile-booking-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.profile-booking-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--sport-accent, var(--green));
  opacity: 0.86;
}

.profile-booking-card:hover {
  border-color: color-mix(in srgb, var(--sport-accent, var(--green)) 38%, var(--line));
  box-shadow: 0 12px 30px rgba(23, 33, 43, 0.09);
}

.booking-ticket-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-color: color-mix(in srgb, var(--sport-accent, var(--green)) 28%, var(--line));
  background:
    radial-gradient(circle at 84px 50%, transparent 0 10px, var(--surface) 11px),
    linear-gradient(135deg, color-mix(in srgb, var(--sport-accent, var(--green)) 10%, var(--surface)), var(--surface));
}

.booking-ticket-card::before {
  width: 5px;
}

.booking-ticket-card::after {
  content: "";
  position: absolute;
  inset: 12px auto 12px 86px;
  width: 1px;
  background-image: linear-gradient(to bottom, color-mix(in srgb, var(--sport-accent, var(--green)) 48%, transparent) 45%, transparent 0);
  background-size: 1px 9px;
  opacity: 0.64;
}

.booking-ticket-date {
  position: relative;
  z-index: 1;
  min-height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--sport-accent, var(--green)) 34%, var(--line));
  background: #ffffff;
  color: #17212b;
  box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--sport-accent, var(--green)) 86%, var(--blue));
}

.booking-ticket-date strong {
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
}

.booking-ticket-date span {
  color: #50606c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.booking-ticket-body {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.booking-ticket-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.booking-ticket-status {
  min-width: 0;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sport-accent, var(--green)) 14%, transparent);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.booking-ticket-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.08;
}

.booking-ticket-location {
  color: var(--tg-hint-color);
  font-size: 13px;
}

.booking-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.booking-ticket-meta span {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-alt) 82%, transparent);
  color: var(--tg-text-color);
  font-size: 12px;
  font-weight: 800;
}

.booking-ticket-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--tg-hint-color);
  font-size: 12px;
  font-weight: 800;
}

.booking-ticket-footer strong {
  color: var(--tg-link-color);
}

.booking-card-more {
  width: max-content;
  color: var(--tg-link-color);
  font-size: 13px;
  font-weight: 800;
}

.booking-place-backdrop {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  align-items: end;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
  background: rgba(9, 24, 36, 0.5);
  backdrop-filter: blur(12px);
  animation: fade-in 160ms ease both;
}

.booking-place-sheet {
  width: min(760px, 100%);
  max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: 0 auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-y: auto;
  background: color-mix(in srgb, var(--surface) 98%, var(--surface-alt));
  box-shadow: 0 24px 60px rgba(23, 33, 43, 0.24);
  animation: sheet-in 220ms var(--ease-premium) both;
}

.booking-place-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.booking-place-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.08;
}

.booking-place-hero {
  min-height: 190px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(9, 24, 36, 0.06), rgba(9, 24, 36, 0.78)),
    var(--court-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
}

.booking-place-hero h3 {
  margin: 4px 0 6px;
  font-size: 25px;
  line-height: 1.05;
}

.booking-place-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.booking-place-hero .price {
  justify-self: start;
  background: rgba(255, 255, 255, 0.92);
}

.booking-place-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

body[data-theme="dark"] .booking-place-sheet {
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-alt));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
}

.social-orb-card {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 178px;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 30%, rgba(245, 226, 94, 0.34), transparent 31%),
    linear-gradient(135deg, #0f7f63, #1f6fa8 55%, #d99116);
  box-shadow: 0 18px 42px rgba(23, 33, 43, 0.18);
}

.social-orb-card.locked {
  background:
    radial-gradient(circle at 18% 30%, rgba(245, 226, 94, 0.22), transparent 31%),
    linear-gradient(135deg, #344652, #1b5f83 55%, #8a742e);
}

.social-orb {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.7), transparent 18%),
    radial-gradient(circle at 50% 50%, #e6f15f, #a8d929 58%, #4c9b28 100%);
  box-shadow:
    inset -16px -18px 28px rgba(29, 79, 34, 0.26),
    0 18px 36px rgba(8, 21, 29, 0.34);
}

.social-orb::before,
.social-orb::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.82);
  transform: rotate(34deg);
}

.social-orb::after {
  inset: 16px;
  border-color: transparent rgba(255, 255, 255, 0.72) transparent transparent;
  transform: rotate(-26deg);
}

.social-orb-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.social-orb-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.04;
}

.social-orb-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.social-orb-card .card-kicker,
.social-orb-card .secondary,
.social-orb-card .primary {
  color: #ffffff;
}

.social-orb-card .secondary {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.18);
}

.social-unlock-steps {
  display: grid;
  gap: 7px;
}

.unlock-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.unlock-dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.unlock-step.done .unlock-dot {
  background: #ffffff;
  color: var(--green);
}

.unlock-step strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.unlock-step small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.rating-card {
  gap: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, var(--surface-alt)), rgba(31, 157, 115, 0.11));
}

.rating-card h3 {
  margin: 2px 0 5px;
  font-size: 24px;
}

.rating-card p {
  margin: 0;
  color: var(--tg-hint-color);
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rating-grid div {
  display: grid;
  gap: 3px;
  min-height: 62px;
  align-content: center;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-alt);
}

.rating-grid span {
  color: var(--tg-hint-color);
  font-size: 12px;
}

.rating-grid strong {
  font-size: 18px;
}

.achievement-list {
  display: grid;
  gap: 8px;
}

.achievement-card {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  opacity: 0.78;
}

.achievement-card.done {
  opacity: 1;
  border-color: rgba(31, 157, 115, 0.28);
  background: linear-gradient(180deg, var(--surface), rgba(31, 157, 115, 0.07));
}

.achievement-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-alt);
  font-size: 19px;
}

.achievement-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.achievement-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.achievement-title h3 {
  margin: 0;
  font-size: 15px;
}

.achievement-title span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.achievement-card p,
.achievement-card small {
  margin: 0;
  color: var(--tg-hint-color);
  font-size: 12px;
}

.achievement-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-alt) 84%, var(--line));
}

.achievement-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.achievement-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.social-page {
  display: grid;
  gap: 12px;
}

.social-lock-panel {
  gap: 14px;
}

.social-lock-panel p {
  margin: 0;
  color: var(--tg-hint-color);
}

.social-lock-panel .unlock-dot {
  background: var(--surface-alt);
  color: var(--tg-hint-color);
}

.social-lock-panel .unlock-step.done .unlock-dot {
  background: var(--green);
  color: #ffffff;
}

.social-lock-panel .unlock-step small {
  color: var(--tg-hint-color);
}

.social-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.top-players-card {
  gap: 0;
  padding: 6px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 157, 115, 0.13), transparent 44%),
    color-mix(in srgb, var(--surface) 96%, var(--surface-alt));
}

.top-player-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 8px;
  border-radius: 7px;
  position: relative;
  overflow: hidden;
}

.top-player-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--rank-color, var(--green));
  opacity: 0.9;
}

.top-player-row + .top-player-row {
  border-top: 1px solid var(--line);
}

.top-player-rank {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rank-bg, linear-gradient(135deg, var(--green), var(--blue)));
  color: var(--rank-text, #ffffff);
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 9px 18px var(--rank-shadow, rgba(31, 157, 115, 0.22));
}

.top-player-row.rank-gold {
  --rank-color: #d99116;
  --rank-bg:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.9), transparent 26%),
    linear-gradient(135deg, #ffe08a, #d99116);
  --rank-text: #5e3a00;
  --rank-shadow: rgba(217, 145, 22, 0.28);
  background: rgba(217, 145, 22, 0.08);
}

.top-player-row.rank-silver {
  --rank-color: #9aa9b7;
  --rank-bg:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.92), transparent 26%),
    linear-gradient(135deg, #f2f6f8, #9aa9b7);
  --rank-text: #394653;
  --rank-shadow: rgba(154, 169, 183, 0.24);
}

.top-player-row.rank-bronze {
  --rank-color: #b9723b;
  --rank-bg:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.86), transparent 26%),
    linear-gradient(135deg, #e6af7c, #a95c2b);
  --rank-text: #4b2411;
  --rank-shadow: rgba(185, 114, 59, 0.26);
}

.top-player-row strong,
.top-player-row small {
  display: block;
}

.top-player-row small {
  color: var(--tg-hint-color);
  font-size: 12px;
}

.top-rating,
.score-pill {
  min-width: 58px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(31, 157, 115, 0.13);
  color: var(--green);
  font-weight: 900;
}

.top-rating {
  background: rgba(217, 145, 22, 0.16);
  color: #9a6408;
}

body[data-theme="dark"] .top-rating,
body[data-theme="dark"] .score-pill {
  color: #ffd27a;
  background: rgba(217, 145, 22, 0.2);
}

.social-person-card {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
}

.person-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #ffffff;
  font-weight: 900;
}

.social-person-card p {
  margin: 6px 0 10px;
  color: var(--tg-hint-color);
}

.rating-model {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rating-model div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-alt);
}

.rating-model span {
  color: var(--tg-hint-color);
  font-size: 12px;
}

.trainer-form {
  display: grid;
  gap: 8px;
}

.status-line {
  min-height: 42px;
  display: grid;
  align-items: center;
  color: var(--tg-hint-color);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
  min-height: 82px;
  padding: 12px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 0;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 -14px 34px rgba(23, 33, 43, 0.1);
}

.nav-item {
  min-height: 56px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 8px;
  background: transparent;
  color: var(--tg-hint-color);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 2px 4px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-icon {
  position: relative;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 129, 204, 0.1);
  box-shadow: inset 0 0 0 1px rgba(36, 129, 204, 0.08);
  font-size: 15px;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav-label {
  line-height: 1.08;
}

.nav-item[data-view="home"] .nav-icon {
  background: linear-gradient(135deg, rgba(31, 157, 115, 0.18), rgba(36, 129, 204, 0.13));
}

.nav-item[data-view="events"] .nav-icon {
  background: linear-gradient(135deg, rgba(217, 145, 22, 0.2), rgba(214, 90, 74, 0.13));
}

.nav-item[data-view="social"] {
  position: relative;
  z-index: 2;
  min-height: 74px;
  margin-top: -28px;
  color: var(--green);
  font-weight: 800;
}

.nav-item[data-view="social"] .nav-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 1px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.7), transparent 17%),
    radial-gradient(circle at 50% 50%, #d9ff38, #9be928 58%, #58b51f 100%);
  color: #0f3d24;
  font-size: 25px;
  box-shadow:
    inset -9px -11px 18px rgba(31, 80, 24, 0.24),
    0 11px 24px rgba(31, 157, 115, 0.35);
}

.nav-item[data-view="social"] .nav-icon::before,
.nav-item[data-view="social"] .nav-icon::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.74);
  transform: rotate(34deg);
}

.nav-item[data-view="social"] .nav-icon::after {
  inset: 13px;
  border-color: transparent rgba(255, 255, 255, 0.65) transparent transparent;
  transform: rotate(-26deg);
}

.nav-item[data-view="social"] .nav-label {
  margin-top: -2px;
  color: inherit;
  font-size: 11px;
}

.nav-item[data-view="trainers"] .nav-icon {
  background: linear-gradient(135deg, rgba(31, 157, 115, 0.18), rgba(217, 145, 22, 0.15));
}

.nav-item[data-view="profile"] .nav-icon {
  background: linear-gradient(135deg, rgba(36, 129, 204, 0.18), rgba(31, 157, 115, 0.12));
}

.nav-item.active {
  color: var(--tg-link-color);
  background: rgba(36, 129, 204, 0.09);
  font-weight: 650;
}

.nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.06);
  background: linear-gradient(135deg, rgba(36, 129, 204, 0.22), rgba(31, 157, 115, 0.18));
  box-shadow: 0 7px 16px rgba(36, 129, 204, 0.16);
}

.nav-item[data-view="social"].active {
  background: transparent;
  color: var(--green);
}

.nav-item[data-view="social"].active .nav-icon {
  transform: translateY(-3px) scale(1.08);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.78), transparent 17%),
    radial-gradient(circle at 50% 50%, #e7ff5a, #a8f12b 58%, #5fbd20 100%);
  box-shadow:
    inset -9px -11px 18px rgba(31, 80, 24, 0.22),
    0 14px 30px rgba(31, 157, 115, 0.44);
}

.loader {
  min-height: 80vh;
  display: grid;
  place-items: center;
  color: var(--tg-hint-color);
}

.empty {
  padding: 20px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--tg-hint-color);
  text-align: center;
}

.app-shell[data-motion="page"] .event-banner,
.app-shell[data-motion="page"] .visual-hero,
.app-shell[data-motion="page"] .events-hero,
.app-shell[data-motion="page"] .court-hero,
.app-shell[data-motion="page"] .event-detail-hero,
.app-shell[data-motion="page"] .onboarding-stage {
  animation: hero-reveal 300ms var(--ease-premium) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-reveal {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cta-shine {
  0%,
  56% {
    left: -80%;
  }
  74%,
  100% {
    left: 128%;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes theme-soften {
  from {
    opacity: 0.94;
    filter: saturate(0.94) brightness(0.98);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

@media (max-width: 430px) {
  .topbar {
    gap: 8px;
  }

  .top-actions {
    gap: 4px;
  }

  .top-control {
    min-width: 34px;
    padding: 0 6px;
  }

  .top-actions .pill {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .social-orb-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .social-orb {
    width: 82px;
  }

  .social-orb-copy h2 {
    font-size: 21px;
  }

  .rating-model {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (min-width: 720px) {
  .app-shell {
    max-width: 760px;
    margin: 0 auto;
  }

  .bottom-nav {
    left: 50%;
    width: min(760px, 100%);
    transform: translateX(-50%);
  }

  .list.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
