/* Hoop Shot: a wooden court seen from behind the shooter, the hoop at the top, fans in the stands and an
   arcade scoreboard over them. Spots and the player are placed in % of the court. */
.game.hoops { background: #d9a066; }
.hoops .court {
  flex: 1; position: relative; min-height: 0; overflow: hidden;
  background: repeating-linear-gradient(90deg, #eab97c 0 64px, #e3ae6d 64px 66px, #e8b474 66px 130px, #dea767 130px 132px);
}
.hoops .hs-stands {
  position: absolute; top: 0; left: 0; right: 0; height: 70px; z-index: 1;
  background: repeating-linear-gradient(180deg, #6f7aa8 0 17px, #646e9c 17px 34px); border-bottom: 4px solid var(--ink);
  display: flex; justify-content: center; align-items: flex-end; gap: 2px; padding-bottom: 2px; overflow: hidden;
}
.hoops .hs-stands span { display: inline-block; }
.hoops .hs-stands .critter-svg { width: 46px; height: 46px; }
.hoops .hs-stands.cheer span { animation: hs-fan .4s ease-out 2; }

.hoops .hs-board {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 14px;
  background: #24203a; border: 4px solid var(--ink); border-radius: 14px; padding: 2px 14px; box-shadow: 0 0 0 3px #575080, var(--shadow);
  color: #ffd23f; font-weight: 800; white-space: nowrap;
}
.hoops .hs-board small { display: block; font-size: 11px; letter-spacing: 1px; color: #b9b3d9; line-height: 1; }
.hoops .hs-board b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.hoops .hs-you, .hoops .hs-them span { text-align: center; }
.hoops .hs-score { color: #7dff8a; }
.hoops .hs-clock { font-size: 36px; color: #ff6a5f; font-variant-numeric: tabular-nums; padding: 0 12px; border-left: 3px solid #575080; border-right: 3px solid #575080; line-height: 1.2; }
.hoops .hs-clock.hurry { animation: hs-hurry .5s steps(2) infinite; }
.hoops .hs-them { display: flex; align-items: center; gap: 6px; }
.hoops .hs-them .critter-svg { width: 38px; height: 38px; }

.hoops .hs-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hoops .hs-hoop { position: absolute; top: 76px; left: 50%; width: min(190px, 24%); transform: translateX(-50%); z-index: 2; }
.hoops .hs-hoop-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hoops .hs-rim { position: absolute; left: 50%; top: 74%; width: 38%; height: 8%; transform: translateX(-50%); }
.hoops .hs-net { transform-box: fill-box; transform-origin: 50% 0; }
.hoops .hs-net.swish { animation: hs-swish .5s ease-out; }
.hoops .court.on-fire .hs-hoop-svg { filter: drop-shadow(0 0 12px #ff8a1f); }

/* the words on the court */
.hoops .hs-spot { position: absolute; z-index: 4; transform: translate(-50%, -50%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.hoops .hs-spot.show { opacity: 1; }
.hoops .hs-spot.show.dim { opacity: .4; }
.hoops .hs-mark { display: block; width: 46px; height: 18px; margin: 0 auto; border-radius: 50%; border: 4px dashed rgba(255, 255, 255, .95); background: rgba(255, 210, 63, .35); }
.hoops .hs-spot.aimed .hs-mark { border-style: solid; border-color: var(--sun); }
/* the word sits just below its spot on the floor, so she doesn't cover it when she runs there */
.hoops .hs-tag { position: absolute; left: 50%; top: 18px; display: flex; width: max-content; transform: translateX(calc(-50% + var(--shift, 0px))); pointer-events: none; }
.hoops .hs-word {
  background: #fff; color: var(--ink); border: 4px solid var(--ink); border-radius: 16px; padding: 0 14px; font-size: var(--hs-word, 34px); font-weight: 800;
  letter-spacing: 2px; box-shadow: var(--shadow); white-space: nowrap; line-height: 1.25;
}
.hoops .hs-spot.aimed .hs-word { background: #fff8d6; box-shadow: 0 0 0 4px var(--sun), var(--shadow); }
.hoops .hs-word span.done { color: var(--good); }
.hoops .hs-word span.now { color: var(--coral-dark); text-decoration: underline 4px var(--coral); text-underline-offset: 6px; }
.hoops .hs-pts {
  align-self: flex-start; margin: -12px 0 0 -14px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); background: #3fa9f5;
  color: #fff; font-style: normal; font-weight: 800; font-size: 18px; line-height: 24px; text-align: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}
.hoops [data-kind="three"] .hs-pts { background: #ff6a1f; width: 34px; height: 34px; font-size: 21px; line-height: 28px; }
.hoops .court.on-fire .hs-pts { background: #ef4655; }

/* her */
.hoops .hs-player { position: absolute; z-index: 5; width: 92px; transform: translate(-50%, -100%) scale(var(--s, 1)); transform-origin: 50% 100%; transition: left .28s ease-out, top .28s ease-out, transform .28s ease-out; }
.hoops .hs-me .avatar-svg { display: block; width: 92px; height: 148px; }
.hoops .hs-player.jump .hs-me { animation: hs-jump .5s ease-out; }
.hoops .hs-dribble { position: absolute; right: -8px; bottom: 22px; width: 34px; height: 34px; animation: hs-dribble .5s ease-in infinite alternate; }
.hoops .hs-player.jump .hs-dribble { visibility: hidden; animation: none; }
.hoops .hs-ball-svg { display: block; width: 100%; height: 100%; }
.hoops .court.on-fire .hs-dribble { filter: drop-shadow(0 0 8px #ff8a1f) drop-shadow(0 0 3px #ffd23f); }
.hoops .hs-fly { position: absolute; left: 0; top: 0; z-index: 3; width: 34px; height: 34px; will-change: transform; pointer-events: none; }
.hoops .hs-fly.fire .hs-ball-svg { filter: drop-shadow(0 0 10px #ff8a1f); }
.hoops .hs-flame { position: absolute; left: 50%; top: 60%; font-size: 30px; transform: translate(-50%, -10%) rotate(180deg); opacity: .9; }

.hoops .hs-pop { position: absolute; left: 50%; top: 150px; z-index: 6; transform: translateX(-50%); font-size: 40px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 var(--ink); opacity: 0; pointer-events: none; }
.hoops .hs-pop.big { font-size: 52px; color: var(--sun); }
.hoops .hs-pop.show { animation: hs-pop 1s ease-out forwards; }

.hoops .hs-banner {
  position: absolute; left: 0; right: 0; top: 36%; z-index: 7; text-align: center; pointer-events: none; opacity: 0;
  font-size: 92px; font-weight: 800; color: var(--sun); text-shadow: 0 6px 0 var(--coral-dark), 0 11px 0 var(--ink);
}
.hoops .hs-banner.count { font-size: 120px; color: #fff; text-shadow: 0 6px 0 #3f7fe0, 0 11px 0 var(--ink); }
.hoops .hs-banner.fire { color: #ffd23f; text-shadow: 0 6px 0 #ef4655, 0 11px 0 var(--ink); }
.hoops .hs-banner.pass { font-size: 48px; color: #7dff8a; text-shadow: 0 4px 0 #2f9a4e, 0 8px 0 var(--ink); }
.hoops .hs-banner.show { animation: hs-banner 1.1s ease-out forwards; }
.hoops .hs-banner.count.show, .hoops .hs-banner.go.show { animation-duration: .7s; }

.hoops .hs-intro {
  position: absolute; left: 50%; top: 52%; z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: min(420px, 90%);
  background: #fff; border: 5px solid var(--ink); border-radius: 26px; padding: 10px 24px 14px; box-shadow: var(--shadow); text-align: center;
  opacity: 0; transform: translate(-50%, -50%) scale(.5); transition: opacity .3s, transform .4s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none;
}
.hoops .hs-intro.show { opacity: 1; transform: translate(-50%, -50%); }
.hoops .hs-intro .critter-svg { width: 96px; height: 96px; }
.hoops .hs-intro p { margin: 0; font-size: 28px; font-weight: 800; color: var(--grape); }
.hoops .hs-intro b { font-size: 19px; color: var(--ink); }

.results .hs-final { display: inline-flex; align-items: center; gap: 8px; }
.results .hs-final .critter-svg { width: 44px; height: 44px; }
.results .hs-final b { font-size: 28px; }
.results .hs-final i { font-style: normal; color: var(--ink-soft); }

/* short windows: a smaller hoop, words and player */
@media (max-height: 760px) {
  .hoops .hs-stands { height: 50px; }
  .hoops .hs-stands .critter-svg { width: 32px; height: 32px; }
  .hoops .hs-board { top: 3px; padding: 0 10px; gap: 10px; }
  .hoops .hs-board b { font-size: 24px; }
  .hoops .hs-clock { font-size: 28px; }
  .hoops .hs-them .critter-svg { width: 30px; height: 30px; }
  .hoops .hs-hoop { top: 54px; width: min(150px, 22%); }
  .hoops .hs-word { font-size: min(var(--hs-word, 34px), 26px); border-width: 3px; border-radius: 13px; padding: 0 10px; }
  .hoops .hs-tag { top: 14px; }
  .hoops .hs-mark { width: 38px; height: 14px; border-width: 3px; }
  .hoops .hs-player { width: 70px; }
  .hoops .hs-me .avatar-svg { width: 70px; height: 112px; }
  .hoops .hs-dribble { width: 26px; height: 26px; bottom: 16px; }
  .hoops .hs-fly { width: 26px; height: 26px; }
  .hoops .hs-pop { top: 100px; }
  .hoops .hs-banner { font-size: 64px; }
  .hoops .hs-banner.count { font-size: 84px; }
}
@media (max-width: 760px) {
  .hoops .hs-board { gap: 8px; padding: 0 8px; }
  .hoops .hs-board small { font-size: 9px; }
  .hoops .hs-hoop { width: 30%; }
  .hoops .hs-word { font-size: min(var(--hs-word, 34px), 22px); letter-spacing: 1px; }
  .hoops .hs-banner { font-size: 56px; }
  .hoops .hs-banner.pass { font-size: 30px; }
}

@keyframes hs-fan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes hs-hurry { 0% { color: #ff6a5f; } 50% { color: #fff; } }
@keyframes hs-swish { 0% { transform: scaleY(1); } 35% { transform: scaleY(1.35) scaleX(.85); } 70% { transform: scaleY(.9); } 100% { transform: none; } }
@keyframes hs-jump { 0% { transform: none; } 40% { transform: translateY(-26px) scale(.97, 1.04); } 100% { transform: none; } }
@keyframes hs-dribble { from { transform: translateY(-14px); } to { transform: translateY(8px); } }
@keyframes hs-pop { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.5); } 25% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
@keyframes hs-banner { 0% { opacity: 0; transform: scale(.3) rotate(-6deg); } 25% { opacity: 1; transform: scale(1.12) rotate(-3deg); } 75% { opacity: 1; transform: scale(1) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.05) translateY(-26px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) {
  .hoops .hs-dribble, .hoops .hs-clock.hurry { animation: none; }
}
