:root {
  --bg: #f4f2ec;
  --ink: #14171c;
  --soft: rgba(20, 23, 28, 0.56);
  --line: rgba(20, 23, 28, 0.12);
  --court: #2b63e3;
  --accent: #d6f24a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 8px 14px;
}

.pc { width: min(318px, 100%, 76vh); }

.pc__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pc__club { display: flex; flex-direction: column; min-width: 0; }
.pc__club b { font-size: 14.5px; line-height: 18px; font-weight: 680; font-stretch: 104%; white-space: nowrap; }
.pc__club span { font-size: 11.5px; line-height: 16px; font-weight: 540; color: var(--soft); white-space: nowrap; }
.pc__hour { font-size: clamp(30px, 9vh, 38px); line-height: 0.95; font-weight: 400; letter-spacing: -0.04em; font-variation-settings: "wght" 660, "wdth" 92; }

/* the hours are radios: a pill slides under the chosen one */
.pc__hours { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 30px; margin-top: clamp(6px, 2vh, 10px); padding: 3px; border-radius: 15px; background: rgba(20, 23, 28, 0.06); }
.pc__pill { position: absolute; left: 3px; top: 3px; width: calc((100% - 6px) / 5); height: 24px; border-radius: 12px; background: #ffffff; box-shadow: 0 1px 2px rgba(20, 23, 28, 0.12), 0 4px 10px -4px rgba(20, 23, 28, 0.2); }
.pc__h { position: relative; border: 0; background: none; color: var(--soft); font: inherit; font-size: 11.5px; font-weight: 660; cursor: pointer; outline: none; border-radius: 12px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: color 0.25s ease; }
.pc__h[aria-checked="true"] { color: var(--ink); }
.pc__h:focus-visible { box-shadow: 0 0 0 2px var(--court); }

.pc__courts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: clamp(6px, 2.200vh, 12px); }
.pc__court { position: relative; }
/* the playing surface: the child takes the colour and the shadow, the parent is the one GSAP lifts */
.pc__turf { position: relative; aspect-ratio: 84 / 150; border-radius: 9px; box-shadow: 0 1px 2px rgba(20, 23, 28, 0.14), 0 16px 26px -16px color-mix(in srgb, var(--court) 80%, transparent); }
/* the colour is a layer of its own: a full court fades its surface, not the players on it */
.pc__turf::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--court); transition: filter 0.4s ease; }
.pc__court.is-full .pc__turf::before { filter: saturate(0.25) brightness(1.12); }
.pc__turf svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.400; stroke-linecap: round; stroke-linejoin: round; }
.pc__net { stroke: #ffffff; stroke-width: 2.400; }

.pc__place { position: absolute; width: 34%; aspect-ratio: 1; margin: -17% 0 0 -17%; padding: 0; border: 0; border-radius: 30%; background: none; font: inherit; cursor: default; outline: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pc__place b { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: #ffffff; color: var(--ink); font-size: 10px; font-weight: 720; letter-spacing: 0.01em; box-shadow: 0 2px 5px -1px rgba(10, 20, 60, 0.4); }
.pc__place.is-free { cursor: pointer; }
.pc__place.is-free b { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1.300px rgba(255, 255, 255, 0.7); color: #ffffff; }
.pc__place.is-you b { background: var(--accent); color: #1a2200; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 3px 8px -2px rgba(10, 20, 60, 0.5); }
.pc__place svg { position: static; width: 46%; height: 46%; stroke: currentColor; stroke-width: 2; }
.pc__place:focus-visible b { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }

.pc__name { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin-top: 5px; font-size: 11.5px; line-height: 16px; font-weight: 660; white-space: nowrap; }
.pc__left { font-weight: 600; color: var(--soft); }
.pc__court:not(.is-full) .pc__left { color: var(--court); }

.pc__foot { margin-top: clamp(4px, 1.600vh, 9px); font-size: 12.5px; line-height: 18px; font-weight: 600; color: var(--soft); text-align: center; }
.pc__roll { display: block; height: 18px; overflow: hidden; }
.pc__roll > span { display: block; white-space: nowrap; }
.pc__foot.is-in { color: var(--ink); }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #14171c;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(20, 23, 28, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (hover: hover) {
  .pc__h:hover { color: var(--ink); }
  .pc__place.is-free:hover b { background: rgba(255, 255, 255, 0.3); }
}

/* on a large screen the scene is drawn bigger, so the poster and the preview video are not small in a big room */
@media (min-width: 900px) and (min-height: 680px) {
  .pc { zoom: 1.5; }
}
@media (min-width: 1100px) and (min-height: 800px) {
  .pc { zoom: 2; }
}
