/* Skate Park: a half-pipe from the side, a graffiti wall with her score behind it, fans up on both
   sides. She's placed by her wheels (the bottom middle of .sk-me) and turned to the ramp; the trick
   cards float in the middle and the column of air-time stars stands beside her when she's flying. */
.game.skate { background: #8fa3c7; }
.skate .skpark {
  flex: 1; position: relative; min-height: 0; overflow: hidden;
  background:
    linear-gradient(180deg, transparent 38%, #9fb6d6 38%, #9fb6d6 50%, transparent 50%),
    radial-gradient(ellipse at 50% 120%, #ffe7b8 0, transparent 60%),
    linear-gradient(180deg, #ffb48a 0%, #ffd9a8 40%, #fff1d6 70%);
}
.skate .sk-wall {
  position: absolute; left: 50%; top: 13%; width: min(46%, 520px); height: 30%; transform: translateX(-50%); z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; border: 4px solid var(--ink); border-radius: 8px 8px 0 0;
  background: repeating-linear-gradient(0deg, #c9726a 0 18px, #b9625a 18px 20px), #c9726a;
}
.skate .sk-big { font-size: 64px; font-weight: 800; line-height: 1; color: #ffd23f; text-shadow: 3px 3px 0 #ff5a8a, 6px 6px 0 var(--ink); transform: rotate(-4deg); font-variant-numeric: tabular-nums; }
.skate .sk-big.pop { animation: sk-pop .5s ease-out; }
.skate .sk-wall small { font-size: 15px; font-weight: 800; letter-spacing: 3px; color: #fff; text-shadow: 2px 2px 0 var(--ink); transform: rotate(-4deg); }
.skate .sk-pipe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.skate .sk-deck { position: absolute; top: calc(50% - 44px); z-index: 2; display: flex; gap: 0; font-size: 40px; line-height: 0; }
.skate .sk-deck.left { left: 6%; top: 18%; }
.skate .sk-deck.right { right: 6%; top: 18%; }

/* her */
.skate .sk-me { --w: 96px; position: absolute; left: 0; top: 0; z-index: 4; width: var(--w); margin-left: calc(var(--w) / -2); margin-top: calc(var(--w) * -246 / 140); transform-origin: 50% 100%; will-change: transform; }
.skate .sk-me-svg { display: block; width: 100%; height: auto; overflow: visible; }
.skate .sk-trick { transform-origin: 50% 60%; }
.skate .sk-trick.tr-spin { animation: sk-spin .5s ease-out; }
.skate .sk-trick.tr-flip .sk-board { animation: sk-flip .45s ease-out; }
.skate .sk-trick.tr-grab .sk-body { animation: sk-grab .5s ease-out; }
.skate .sk-board, .skate .sk-body { transform-box: fill-box; transform-origin: 50% 50%; }
.skate .sk-me.land .sk-trick { animation: sk-land .35s ease-out; }
.skate .sk-me.bail .sk-trick { animation: sk-bail 1.25s ease-in-out; }

/* air time */
.skate .sk-stars { position: absolute; bottom: 50%; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0; opacity: 0; transition: opacity .2s; pointer-events: none; }
.skate .sk-stars.show { opacity: 1; }
.skate .sk-stars.right { right: calc(4% + 150px); }
.skate .sk-stars.left { left: calc(4% + 150px); }
.skate .sk-stars i { font-style: normal; font-size: 24px; line-height: 1; color: #ffd23f; text-shadow: 0 0 2px var(--ink), 0 0 2px var(--ink), 0 2px 0 var(--ink); transition: opacity .2s, transform .2s; }
.skate .sk-stars i.low { color: #ff7a59; }
.skate .sk-stars i.out { opacity: .15; transform: scale(.6); }

/* the trick cards */
.skate .sk-cards { position: absolute; left: 50%; top: 55%; z-index: 6; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.skate .sk-row { display: flex; gap: 12px; align-items: center; }
.skate .sk-cards.stack { top: 9%; }
.skate .sk-cards.stack .sk-row { flex-direction: column; gap: 8px; }
.skate .sk-cards.show { opacity: 1; }
.skate .sk-pending { min-height: 26px; font-size: 18px; font-weight: 700; color: var(--ink); background: rgba(255, 255, 255, .85); border-radius: 12px; padding: 0 12px; white-space: nowrap; }
.skate .sk-pending:empty { visibility: hidden; }
.skate .sk-pending b { color: var(--grape); }
.skate .sk-card {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 4px solid var(--ink); border-radius: 16px; padding: 0 8px 0 16px;
  box-shadow: var(--shadow); white-space: nowrap; transition: opacity .2s;
}
.skate .sk-card b { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: 2px; line-height: 1.3; }
.skate .sk-card b span.done { color: var(--good); }
.skate .sk-card b span.now { color: var(--coral-dark); text-decoration: underline 4px var(--coral); text-underline-offset: 6px; }
.skate .sk-card i { font-style: normal; font-weight: 800; font-size: 16px; color: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 0 8px; line-height: 1.4; }
.skate .sk-card[data-size="small"] i { background: #3fbf6a; }
.skate .sk-card[data-size="medium"] i { background: #3f7fd6; }
.skate .sk-card[data-size="big"] i { background: #ff6a1f; font-size: 19px; }
.skate .sk-card[data-size="big"] { box-shadow: 0 0 0 4px #ffb020, var(--shadow); }
.skate .sk-card.dim { opacity: .38; }
.skate .sk-card.aimed { background: #fff8d6; box-shadow: 0 0 0 4px var(--sun), var(--shadow); }

.skate .sk-banner { position: absolute; left: 0; right: 0; top: 24%; z-index: 7; text-align: center; pointer-events: none; opacity: 0; line-height: 1; }
.skate .sk-banner b { display: block; font-size: 54px; font-weight: 800; color: #fff; text-shadow: 0 5px 0 #3f7fd6, 0 9px 0 var(--ink); }
.skate .sk-banner small { display: block; margin-top: 8px; font-size: 24px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 var(--ink); }
.skate .sk-banner.combo b, .skate .sk-banner.huge b { color: var(--sun); text-shadow: 0 5px 0 var(--coral-dark), 0 9px 0 var(--ink); }
.skate .sk-banner.huge b { font-size: 76px; }
.skate .sk-banner.landed b { font-size: 66px; color: #7dff8a; text-shadow: 0 5px 0 #2f9a4e, 0 9px 0 var(--ink); }
.skate .sk-banner.bail b { font-size: 66px; text-shadow: 0 5px 0 #8a8fa8, 0 9px 0 var(--ink); }
.skate .sk-banner.show { animation: sk-banner 1.2s ease-out forwards; }

.skate .sk-intro {
  position: absolute; left: 50%; top: 50%; z-index: 9; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: min(460px, 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;
}
.skate .sk-intro.show { opacity: 1; transform: translate(-50%, -50%); }
.skate .sk-intro-me { width: 70px; }
.skate .sk-intro p { margin: 0; font-size: 30px; font-weight: 800; color: var(--grape); }
.skate .sk-intro b { font-size: 18px; color: var(--ink); }
.skate .sk-intro small { margin-top: 4px; font-size: 16px; font-weight: 700; color: var(--ink-soft); }

.skate .hud span { white-space: nowrap; }
.skate .hud em { font-style: normal; }
.skate .hud b { font-weight: inherit; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .skate .hud em { display: none; } }
@media (max-width: 560px) { .skate .game-top h2 { font-size: 20px; } }

@media (max-height: 760px) {
  .skate .sk-cards { gap: 4px; }
  .skate .sk-cards.stack { top: 4%; }
  .skate .sk-card b { font-size: 26px; }
  .skate .sk-card { border-width: 3px; }
  .skate .sk-me { --w: 76px; }
  .skate .sk-stars i { font-size: 19px; }
  .skate .sk-stars.right { right: calc(4% + 120px); }
  .skate .sk-stars.left { left: calc(4% + 120px); }
  .skate .sk-big { font-size: 46px; }
  .skate .sk-deck { font-size: 30px; }
  .skate .sk-banner b { font-size: 42px; }
  .skate .sk-banner.landed b, .skate .sk-banner.bail b { font-size: 50px; }
  .skate .sk-banner.huge b { font-size: 58px; }
}
@media (max-width: 760px) {
  .skate .sk-card b { font-size: min(26px, 6.5vw); letter-spacing: 1px; }
  .skate .sk-me { --w: 72px; }
  .skate .sk-stars.right { right: 2px; }
  .skate .sk-stars.left { left: 2px; }
  .skate .sk-wall { width: 70%; }
  .skate .sk-deck { display: none; }
  .skate .sk-banner b { font-size: 38px; }
  .skate .sk-banner.landed b, .skate .sk-banner.bail b, .skate .sk-banner.huge b { font-size: 46px; }
}

@keyframes sk-pop { 0% { transform: rotate(-4deg) scale(1); } 40% { transform: rotate(-4deg) scale(1.3); } 100% { transform: rotate(-4deg) scale(1); } }
@keyframes sk-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes sk-flip { 0% { transform: scaleY(1); } 25% { transform: scaleY(-1) translateY(10px); } 50% { transform: scaleY(1) translateY(16px); } 75% { transform: scaleY(-1) translateY(10px); } 100% { transform: scaleY(1); } }
@keyframes sk-grab { 0%, 100% { transform: none; } 40% { transform: translateY(8%) scaleY(.88); } }
@keyframes sk-land { 0%, 100% { transform: none; } 40% { transform: scaleY(.88) scaleX(1.06); } }
@keyframes sk-bail { 0% { transform: none; } 25% { transform: rotate(-70deg) translateX(-20%); } 70% { transform: rotate(-90deg) translate(-10%, 10%); opacity: .9; } 100% { transform: none; } }
@keyframes sk-banner { 0% { opacity: 0; transform: scale(.3) rotate(-6deg); } 20% { opacity: 1; transform: scale(1.1) rotate(-3deg); } 75% { opacity: 1; transform: scale(1) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.05) translateY(-22px) rotate(-3deg); } }
