/* Palm Court: the menu shell (src/shell.js). A tab bar (top; bottom on a phone; a rail on a phone on its side), the Play
   page and the frame around the Store, Locker, Challenges, Leaderboard and Settings pages. Loud on purpose: angled
   panels, a colour for every tab, things that bounce. All motion is transform and opacity (the compositor's), nothing
   here blurs what is behind it (the 3D court keeps running behind the menu), and html.calm (Settings > Reduce motion)
   or the system's reduced-motion preference turns every bit of it off. */

/* ---------- a colour per tab ---------- */
:root { --acc: #d6f04a; --acc-ink: #1b2300; --acc-rgb: 214, 240, 74; --sh-bar-h: 64px; --sh-top: 0px; --sh-bottom: 0px; --sh-left: 0px; --sh-dx: 36px; }
body[data-tab="play"] { --acc: #d6f04a; --acc-ink: #1b2300; --acc-rgb: 214, 240, 74; }
body[data-tab="store"] { --acc: #ff5fa8; --acc-ink: #2b0618; --acc-rgb: 255, 95, 168; }
body[data-tab="challenges"] { --acc: #ffb21f; --acc-ink: #2b1a00; --acc-rgb: 255, 178, 31; }
body[data-tab="locker"] { --acc: #a98bff; --acc-ink: #170a3d; --acc-rgb: 169, 139, 255; }
body[data-tab="board"] { --acc: #3fd9e8; --acc-ink: #00262b; --acc-rgb: 63, 217, 232; }
body[data-tab="settings"] { --acc: #7fb8ff; --acc-ink: #04142e; --acc-rgb: 127, 184, 255; }
body.sh-on { --sh-top: calc(var(--sh-bar-h) + env(safe-area-inset-top, 0px)); }
.sh-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }

/* ---------- the backdrop: three slanted bands that drift against the pointer ---------- */
.sh-back { position: fixed; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .4s; }
body.sh-on .sh-back { opacity: 1; }
.sh-back i { position: absolute; display: block; transform: translate3d(calc(var(--px, 0) * var(--m) * 1px), calc(var(--py, 0) * var(--m) * .5px), 0) skewX(-18deg); }
.sh-back .a { left: -10%; top: -5%; bottom: -5%; width: 38%; --m: -16; background: linear-gradient(90deg, rgba(var(--acc-rgb), .22), rgba(var(--acc-rgb), 0)); }
.sh-back .b { right: 14%; top: -10%; bottom: -10%; width: 3.5%; --m: 26; background: rgba(var(--acc-rgb), .16); }
.sh-back .c { right: -8%; top: -5%; bottom: -5%; width: 30%; --m: 12; background: linear-gradient(270deg, rgba(var(--acc-rgb), .2), rgba(var(--acc-rgb), 0)); }

/* ---------- the bar ---------- */
.sh-bar { position: fixed; z-index: 12; top: 0; left: 0; right: 0; height: var(--sh-top); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: linear-gradient(180deg, rgba(5, 11, 18, .96), rgba(5, 11, 18, .8)); border-bottom: 1px solid var(--edge); }
.sh-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--acc), rgba(var(--acc-rgb), 0) 72%); }
.sh-brand { appearance: none; border: 0; background: none; padding: 4px 2px; cursor: pointer; color: var(--chalk); font: 900 27px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; transform: skewX(-8deg); }
.sh-brand:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.sh-word { display: inline-flex; align-items: baseline; }
.sh-logo-ball { display: inline-block; width: .5em; height: .5em; margin: 0 .03em; border-radius: 50%; align-self: baseline; transform-origin: 50% 100%;
  background: radial-gradient(circle at 34% 30%, #f6ffb0, #d6f04a 55%, #a3bd25); box-shadow: inset -.07em -.05em 0 rgba(0, 0, 0, .16); animation: shBounce 1.7s cubic-bezier(.3, 0, .35, 1) infinite; }
@keyframes shBounce { 0%, 100% { transform: translateY(0) scale(1.16, .84); } 14% { transform: translateY(-.02em) scale(.96, 1.05); } 52% { transform: translateY(-.46em) scale(1, 1); } 90% { transform: translateY(-.02em) scale(.98, 1.03); } }
.sh-tabs { display: flex; align-items: center; justify-content: safe center; gap: 6px; min-width: 0; }
.sh-key { display: inline-flex; align-items: center; color: var(--mist); font-size: 12px; }
.sh-key kbd { min-width: 1.9em; }
@media (pointer: coarse) { .sh-key .kb-hint { display: none; } }
.sh-tab { appearance: none; border: 0; background: transparent; color: var(--mist); cursor: pointer; padding: 0; height: 46px; position: relative; font: 900 20px/1 var(--display); text-transform: uppercase; letter-spacing: .06em;
  transform: skewX(-14deg); transition: color .15s, background .15s, transform .18s var(--ease-out); }
.sh-tab-in { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 15px; transform: skewX(14deg); white-space: nowrap; }
.sh-tab .ico { width: 22px; height: 22px; flex: none; }
.sh-tab-l .sm { display: none; }
.sh-tab:hover { color: var(--chalk); background: rgba(242, 245, 238, .09); transform: skewX(-14deg) translateY(-2px); }
.sh-tab:active { transform: skewX(-14deg) translateY(0) scale(.97); }
.sh-tab[aria-current] { background: var(--tab); color: #0b1520; box-shadow: 0 8px 22px -8px var(--tab); animation: shTabPop .38s var(--ease-back); }
@keyframes shTabPop { from { transform: skewX(-14deg) scale(.86); } }
.sh-tab:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sh-badge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: rgba(242, 245, 238, .18); color: var(--chalk); font: 800 11px/19px var(--body); letter-spacing: 0; text-align: center; }
.sh-badge.hot { background: var(--coral); color: #2b0c06; animation: shBadge 2.4s ease-in-out infinite; }
.sh-tab[aria-current] .sh-badge { background: #0b1520; color: var(--tab); animation: none; }
@keyframes shBadge { 0%, 86%, 100% { transform: scale(1); } 92% { transform: scale(1.28); } }
/* The player chip is the old menu's profile card. */
.sh-me { justify-self: end; min-width: 0; }
.sh-me .pg-card-main { width: auto; min-width: 232px; padding: 5px 16px 5px 12px; gap: 3px 11px; border: 0; background: rgba(242, 245, 238, .07); clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.sh-me .pg-card-main:hover { background: rgba(var(--acc-rgb), .2); }
.sh-me .pg-lv { --s: 38px; }
.sh-me .pg-who b { font-size: 19px; }
.sh-me .pg-xpline { gap: 8px; }
.sh-me .pg-card-main:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }

/* Narrower computers: the chip drops its name, then the tabs drop their words (the open one keeps its). */
@media (max-width: 1500px) {
  .sh-key { display: none; }
  .sh-tab { font-size: 18px; }
  .sh-tab-in { padding: 0 12px; gap: 7px; }
  .sh-me .pg-card-main { min-width: 0; padding-right: 22px; }
  .sh-me .pg-who, .sh-me .pg-xpline small { display: none; }
}
@media (max-width: 1360px) {
  .sh-bar { gap: 12px; }
  .sh-tab:not([aria-current]) .sh-tab-l { display: none; }
  .sh-tab-in { padding: 0 13px; }
  .sh-brand { font-size: 23px; }
}
/* A phone: the tabs along the bottom, the name and player chip on a slim bar above. */
@media (max-width: 760px) and (min-height: 521px) {
  :root { --sh-bar-h: 50px; }
  body.sh-on { --sh-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .sh-bar { grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  .sh-brand { font-size: 22px; }
  .sh-tabs { position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; height: var(--sh-bottom); padding: 0 0 env(safe-area-inset-bottom, 0px); gap: 0; justify-content: stretch; background: rgba(5, 11, 18, .97); border-top: 1px solid var(--edge); }
  .sh-tabs::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: linear-gradient(90deg, rgba(var(--acc-rgb), 0), var(--acc), rgba(var(--acc-rgb), 0)); }
  .sh-key { display: none; }
  .sh-tab { flex: 1 1 0; min-width: 0; height: 100%; transform: none; font-size: 11px; letter-spacing: .05em; }
  .sh-tab:hover, .sh-tab:active { transform: none; }
  .sh-tab-in { flex-direction: column; justify-content: center; gap: 3px; padding: 0 2px; transform: none; }
  .sh-tab-in .ico { width: 24px; height: 24px; }
  .sh-tab-l .lg { display: none; }
  .sh-tab-l .sm { display: inline; }
  .sh-tab[aria-current] { box-shadow: none; animation: none; }
  .sh-tab[aria-current] .sh-tab-in .ico { animation: shIconPop .4s var(--ease-back); }
  .sh-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10px; line-height: 17px; }
  .sh-me { min-width: 0; }
  .sh-me .pg-card-main { min-width: 0; padding: 4px 12px 4px 10px; }
  .sh-me .pg-who { display: none; }
  .sh-me .pg-lv { --s: 32px; }
  .sh-me .pg-xpline small { display: none; }
}
@keyframes shIconPop { from { transform: translateY(6px) scale(.8); } }
/* A phone on its side: a rail of tabs down the left edge, so the short screen keeps its height. */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --sh-rail: calc(72px + env(safe-area-inset-left, 0px)); }
  body.sh-on { --sh-top: 0px; --sh-left: var(--sh-rail); }
  .sh-bar { top: 0; bottom: 0; right: auto; left: 0; width: var(--sh-rail); height: auto; display: flex; flex-direction: column; justify-content: center; padding: 6px 0 6px env(safe-area-inset-left, 0px); gap: 0; border-bottom: 0; border-right: 1px solid var(--edge); }
  .sh-bar::after { left: auto; right: -1px; top: 0; bottom: 0; width: 3px; height: auto; background: linear-gradient(180deg, var(--acc), rgba(var(--acc-rgb), 0) 80%); }
  .sh-brand, .sh-me, .sh-key { display: none; }
  .sh-tabs { flex-direction: column; gap: 2px; width: 100%; }
  .sh-tab { width: 100%; height: 48px; transform: none; font-size: 10.5px; letter-spacing: .05em; }
  .sh-tab:hover, .sh-tab:active { transform: none; }
  .sh-tab-in { flex-direction: column; justify-content: center; gap: 2px; padding: 0; transform: none; }
  .sh-tab-in .ico { width: 21px; height: 21px; }
  .sh-tab-l .lg { display: none; }
  .sh-tab-l .sm { display: inline; }
  .sh-tab[aria-current] { box-shadow: none; animation: none; }
  .sh-badge { position: absolute; top: 3px; right: 10px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; }
}

/* ---------- pages sit below / beside the bar ---------- */
body.sh-on .screen { padding-top: calc(var(--sh-top) + 18px); padding-bottom: calc(var(--sh-bottom) + 18px); padding-left: calc(var(--sh-left) + max(16px, env(safe-area-inset-left, 0px))); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
body.sh-on .screen.center { background: linear-gradient(180deg, rgba(4, 10, 16, .6), rgba(4, 10, 16, .4)); }
/* A control focused with the D-pad / arrow keys scrolls into view *clear of* the fixed bar and the bottom tab strip, never under them. */
body.sh-on .screen { scroll-padding: calc(var(--sh-top) + 14px) 12px calc(var(--sh-bottom) + 14px) calc(var(--sh-left) + 12px); }
/* One big panel blurring a live 3D scene behind it costs a frame's work every frame: tab pages use a solid panel instead. */
body.sh-on .slab { background: rgba(8, 18, 29, .95); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.sh-on :is(#hub, #leaders, #board, #options, #training, #tour, #tourEvent) > .slab { position: relative; clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px)); }
body.sh-on :is(#hub, #leaders, #board, #options, #training, #tour, #tourEvent) > .slab::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 5px; background: linear-gradient(100deg, var(--acc) 0 34%, rgba(var(--acc-rgb), 0) 34.1%), repeating-linear-gradient(115deg, rgba(var(--acc-rgb), .55) 0 12px, transparent 12px 18px); background-size: 100% 100%, 36% 100%; background-repeat: no-repeat; pointer-events: none; }
body.sh-on :is(#hub, #leaders, #board, #options, #training, #tour, #tourEvent) .slab :is(.eyebrow) { color: var(--acc); }
body.sh-on :is(#hub, #leaders, #board, #options, #training, #tour, #tourEvent) .slab h2 { transform: skewX(-6deg); transform-origin: left bottom; }
@keyframes shPageIn { from { opacity: 0; transform: translate3d(var(--sh-dx), 0, 0) skewX(-3deg); } }
@keyframes shRise { from { opacity: 0; transform: translate3d(0, 22px, 0); } }
body.sh-on .screen:not([hidden], #menu) > .slab { animation: shPageIn .46s var(--ease-out) backwards; }

/* ---------- the Play page ---------- */
#menu { padding-inline: calc(var(--sh-left) + max(16px, min(4vw, 56px))); background: linear-gradient(180deg, rgba(4, 10, 16, .62), rgba(4, 10, 16, .3) 38%, rgba(4, 10, 16, .78)); }
.sh-page { width: min(1240px, 100%); margin: 0 auto; display: grid; gap: 18px; align-content: start; }
.sh-page > * { min-width: 0; }
.sh-page .gpu-note { order: -2; }
.sh-top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 18px; align-items: stretch; }
.sh-top > *, .sh-modes > .sh-card, .sh-sec, .sh-guide { animation: shRise .55s var(--ease-out) calc(var(--i, 0) * 70ms + 60ms) backwards; }
.sh-quick { --i: 1; }
.sh-modes > .sh-card { animation-delay: calc(var(--i, 0) * 70ms + 200ms); }
.sh-controls { animation-delay: 480ms; }
.sh-setup { animation-delay: 560ms; }

/* the first-run guide */
.sh-guide { list-style: none; margin: 0; padding: 14px 18px 14px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; background: linear-gradient(95deg, rgba(var(--acc-rgb), .24), rgba(9, 19, 29, .92) 70%); clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%); }
.sh-guide-hi { flex: 1 1 100%; font-size: 16px; }
.sh-guide-hi b { font: 900 22px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; margin-right: 6px; }
.sh-guide li:not(.sh-guide-hi) { flex: 0 1 auto; }
.sh-guide button { appearance: none; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1px solid var(--edge); background: rgba(242, 245, 238, .06); color: var(--chalk); cursor: pointer; font: 700 14px/1.2 var(--body); text-align: left;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: background .15s, transform .15s var(--ease-out); }
.sh-guide button:hover { background: rgba(242, 245, 238, .14); transform: translateY(-2px); }
.sh-guide .n { width: 28px; height: 28px; display: grid; place-items: center; background: rgba(242, 245, 238, .16); font: 900 18px/1 var(--display); }
.sh-guide .done .n { background: var(--good); color: var(--ink); }
.sh-guide .done button { opacity: .72; }
.sh-guide .current button { background: var(--optic); color: var(--optic-ink); border-color: var(--optic); animation: shPulse 1.9s ease-in-out infinite; }
.sh-guide .current .n { background: var(--optic-ink); color: var(--optic); }
.sh-guide em { font: 800 11px/1 var(--body); font-style: normal; letter-spacing: .12em; text-transform: uppercase; padding: 4px 6px; background: var(--optic-ink); color: var(--optic); }
.sh-guide small { font-weight: 600; opacity: .75; }
@keyframes shPulse { 50% { transform: scale(1.035); } }
body:not(.sh-first) .sh-num { display: none; }

/* featured banner */
.sh-hero { --hc: 214, 240, 74; position: relative; min-height: 318px; overflow: hidden; padding: 28px 34px 64px; display: grid; align-content: end;
  background: linear-gradient(128deg, rgba(var(--hc), .3), rgba(9, 19, 29, .94) 56%), #0a1622; clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 36px 100%, 0 calc(100% - 36px)); }
.sh-hero[data-art="trophy"] { --hc: 255, 178, 31; }
.sh-hero[data-art="star"] { --hc: 169, 139, 255; }
.sh-hero[data-art="coin"], .sh-hero[data-art="friend"] { --hc: 255, 95, 168; }
.sh-hero[data-art="bolt"] { --hc: 63, 217, 232; }
.sh-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(112deg, rgba(255, 255, 255, .06) 0 26%, transparent 26.1%), repeating-linear-gradient(112deg, rgba(var(--hc), .09) 0 2px, transparent 2px 22px); }
.sh-hero-art { position: absolute; right: -2%; top: -8%; width: 50%; color: rgb(var(--hc)); opacity: .22; pointer-events: none; transform: rotate(-9deg); animation: shFloat 8s ease-in-out infinite; }
.sh-hero-art .ico { width: 100%; height: auto; stroke-width: 1; }
@keyframes shFloat { 50% { transform: rotate(-5deg) translate3d(0, -10px, 0) scale(1.03); } }
.sh-ball3 { position: absolute; right: 8%; bottom: 62px; width: 62px; height: 70px; pointer-events: none; }
.sh-ball3::before { content: ''; position: absolute; left: 50%; bottom: 0; width: 56px; height: 10px; margin-left: -28px; border-radius: 50%; background: rgba(0, 0, 0, .45); animation: shShadow 1.5s cubic-bezier(.3, 0, .35, 1) infinite; }
.sh-ball3 i { position: absolute; left: 50%; bottom: 3px; width: 52px; height: 52px; margin-left: -26px; border-radius: 50%; transform-origin: 50% 100%; animation: shBall 1.5s cubic-bezier(.3, 0, .35, 1) infinite;
  background: radial-gradient(circle at 34% 30%, #f6ffb0, #d6f04a 55%, #a3bd25); box-shadow: inset -7px -6px 0 rgba(0, 0, 0, .14); }
.sh-ball3 i::before, .sh-ball3 i::after { content: ''; position: absolute; top: 4px; width: 100%; height: calc(100% - 8px); border-radius: 50%; border: 2.5px solid rgba(247, 255, 208, .85); }
.sh-ball3 i::before { left: -72%; clip-path: inset(0 0 0 72%); }
.sh-ball3 i::after { right: -72%; clip-path: inset(0 72% 0 0); }
.sh-ball3 { overflow: visible; }
@keyframes shBall { 0%, 100% { transform: translateY(0) scale(1.14, .86); } 12% { transform: translateY(-3px) scale(.96, 1.05); } 50% { transform: translateY(-46px) scale(1, 1) rotate(180deg); } 88% { transform: translateY(-3px) scale(.97, 1.04) rotate(340deg); } }
@keyframes shShadow { 0%, 100% { transform: scaleX(1.1); opacity: .6; } 50% { transform: scaleX(.55); opacity: .25; } }
.sh-slide { position: relative; display: grid; gap: 8px; max-width: 640px; }
.sh-kicker { margin: 0; font: 800 13px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: rgb(var(--hc)); }
.sh-title { margin: 0; font: 900 clamp(40px, 5.3vw, 78px)/.86 var(--display); text-transform: uppercase; letter-spacing: -.005em; transform: skewX(-7deg); transform-origin: left bottom; text-wrap: balance; text-shadow: 0 4px 24px rgba(0, 0, 0, .4); }
.sh-text { margin: 0; max-width: 46ch; font-size: 16px; color: rgba(242, 245, 238, .85); }
.sh-meter { height: 8px; max-width: 360px; background: rgba(242, 245, 238, .14); transform: skewX(-20deg); overflow: hidden; }
.sh-meter i { display: block; height: 100%; width: var(--p, 0%); background: rgb(var(--hc)); transform-origin: left; animation: shGrow .9s var(--ease-out) .3s backwards; }
@keyframes shGrow { from { transform: scaleX(0); } }
.sh-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sh-btn { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 14px 28px 14px 24px; font: 900 22px/1 var(--display); letter-spacing: .05em; text-transform: uppercase;
  background: rgb(var(--hc)); color: #10180a; clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: transform .16s var(--ease-out), filter .16s; }
.sh-btn .ar .ico { width: 22px; height: 22px; display: block; stroke-width: 2.6; transition: transform .18s var(--ease-out); }
.sh-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.sh-btn:hover .ar .ico { transform: translateX(5px); }
.sh-btn:active { transform: translateY(1px) scale(.98); }
.sh-btn.ghost { background: rgba(242, 245, 238, .12); color: var(--chalk); padding-inline: 22px; }
.sh-btn:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
.sh-hero-nav { position: absolute; right: 22px; bottom: 16px; display: flex; align-items: center; gap: 8px; }
.sh-ib { appearance: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--edge); background: rgba(8, 18, 29, .6); color: var(--chalk); cursor: pointer; transition: background .15s, transform .15s var(--ease-out); }
.sh-ib:hover { background: rgba(242, 245, 238, .18); transform: translateY(-2px); }
.sh-ib .ico { width: 18px; height: 18px; display: block; }
.sh-ib:focus-visible, .sh-dot:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sh-dots { display: flex; gap: 2px; }
.sh-dot { appearance: none; position: relative; width: 28px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; }
.sh-dot::before { content: ''; position: absolute; left: 3px; right: 3px; top: 16px; height: 5px; background: rgba(242, 245, 238, .3); transform: skewX(-20deg); transition: background .2s, transform .2s var(--ease-out); }
.sh-dot[aria-current]::before { background: rgb(var(--hc)); transform: skewX(-20deg) scaleY(1.5); }

/* quick play */
.sh-quick { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 16px; background: linear-gradient(180deg, rgba(14, 29, 46, .96), rgba(8, 18, 29, .96));
  clip-path: polygon(36px 0, 100% 0, 100% calc(100% - 36px), calc(100% - 36px) 100%, 0 100%, 0 36px); }
.sh-quick::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: repeating-linear-gradient(115deg, var(--optic) 0 16px, transparent 16px 24px); }
.sh-eyebrow { margin: 0; font: 800 12px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); }
.sh-line { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sh-line li { padding: 7px 13px; background: rgba(242, 245, 238, .09); font: 700 13px/1 var(--body); letter-spacing: .04em; clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.sh-line li[data-k="opp"] { background: rgba(var(--acc-rgb), .2); color: var(--chalk); }
.sh-last { display: grid; gap: 6px; padding: 10px 14px; background: rgba(242, 245, 238, .04); border-left: 3px solid var(--optic); }
.sh-last p { margin: 0; font-size: 15px; }
.sh-last p b { font: 900 22px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.sh-last em { font-style: normal; color: var(--optic); font-weight: 700; }
.sh-last .sh-meter { max-width: none; height: 6px; transform: none; }
.sh-last .sh-meter i { background: var(--optic); }
.sh-last small { color: var(--mist); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.sh-swing { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 1px solid var(--edge); background: rgba(242, 245, 238, .05); color: var(--chalk); cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.sh-swing:hover { background: rgba(242, 245, 238, .12); border-color: rgba(242, 245, 238, .3); }
.sh-swing .ic .ico { width: 28px; height: 28px; display: block; color: var(--optic); }
.sh-swing .tx { flex: 1; font-size: 15px; color: var(--mist); }
.sh-swing .tx b { color: var(--chalk); font-weight: 700; }
.sh-swing .chg { font: 700 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--optic); }
.sh-swing:focus-visible { outline: 2px solid var(--optic); outline-offset: 2px; }
.sh-quick .actions { display: grid; margin-top: auto; }
.sh-quick .status { margin: 0; }
.sh-quick-foot { display: flex; justify-content: center; }
.sh-quick-foot .linkish { font-size: 13px; padding: 6px 4px; }
#menu .sh-play, #menu .actions > .sh-play { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: flex-start; gap: 16px; min-height: 88px; padding: 10px 26px 10px 22px; border: 0; color: var(--optic-ink); background: var(--optic);
  clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%); transition: transform .18s var(--ease-out), filter .18s; text-align: left; }
#menu .actions > .sh-play::after, #menu .actions > .sh-play:is(:hover, :focus-visible)::after { content: none; }
.sh-play::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .6) 50%, transparent 62%); transform: translateX(-130%); animation: shShine 3.8s ease-in-out 1.2s infinite; pointer-events: none; }
@keyframes shShine { 0%, 62%, 100% { transform: translateX(-130%); } 80% { transform: translateX(130%); } }
.sh-play .ic .ico { width: 44px; height: 44px; display: block; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .18)); }
.sh-play .ic svg path { fill: currentColor; }
.sh-play .tx { display: grid; gap: 4px; }
.sh-play .tx b { font: 900 56px/.82 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.sh-play .tx small { font: 800 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; opacity: .78; }
#menu .sh-play:hover { transform: translateY(-3px) scale(1.012); filter: brightness(1.07); background: var(--optic); }
#menu .sh-play:active { transform: translateY(1px) scale(.985); }
#menu .sh-play:focus-visible { outline: 3px solid var(--chalk); outline-offset: 3px; }
body.sh-first .sh-play { animation: shPulse 1.9s ease-in-out infinite; }
.sh-play:disabled { filter: grayscale(.5); opacity: .7; }

/* the four ways to play */
.sh-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; }
.sh-card { --rx: 0deg; --ry: 0deg; --c: #d6f04a; position: relative; appearance: none; border: 0; padding: 20px 20px 18px; min-height: 184px; display: grid; align-content: end; gap: 6px; text-align: left; color: var(--chalk); cursor: pointer; overflow: hidden;
  background: linear-gradient(152deg, rgba(10, 22, 34, .55), rgba(10, 22, 34, .95) 62%), var(--c); background-blend-mode: normal; clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .2s ease-out, filter .2s; }
.sh-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%); transform: translateX(-120%); transition: transform .6s var(--ease-out); }
.sh-card:hover::before, .sh-card:focus-visible::before { transform: translateX(120%); }
.sh-card:hover { filter: brightness(1.12); }
.sh-card:active { transform: perspective(800px) scale(.985); }
.sh-card:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
.sh-card-ico { position: absolute; right: -10px; top: -6px; width: 62%; color: #0a1622; opacity: .5; pointer-events: none; transform: rotate(-9deg); transition: transform .45s var(--ease-out), opacity .2s; }
.sh-card-ico .ico { width: 100%; height: auto; display: block; stroke-width: 1.1; }
.sh-card:hover .sh-card-ico, .sh-card:focus-visible .sh-card-ico { transform: rotate(-3deg) scale(1.1) translate3d(-4px, 4px, 0); opacity: .62; }
.sh-card-t { position: relative; font: 900 34px/.88 var(--display); text-transform: uppercase; letter-spacing: .01em; transform: skewX(-6deg); transform-origin: left bottom; }
.sh-card-d { position: relative; font-size: 14px; line-height: 1.3; color: rgba(242, 245, 238, .86); max-width: 24ch; }
.sh-card-s { position: relative; margin-top: 4px; padding-right: 44px; font: 800 12px/1.25 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--chalk); opacity: .92; }
.sh-card-s b { font-weight: 800; }
.sh-card-go { position: absolute; right: 18px; bottom: 16px; width: 38px; height: 34px; display: grid; place-items: center; background: var(--chalk); color: #0b1520; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: transform .2s var(--ease-out), background .15s; }
.sh-card-go .ico { width: 20px; height: 20px; display: block; stroke-width: 2.6; }
.sh-card:hover .sh-card-go, .sh-card:focus-visible .sh-card-go { transform: translateX(5px); background: var(--c); }
#btnTour .tour-menu-rank { margin: 0; opacity: 1; }

/* sections: how do you swing, match setup */
.sh-sec { position: relative; padding: 22px 26px 24px; background: rgba(9, 19, 29, .93); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%); }
.sh-sec::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--optic); }
.sh-sec-h { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
summary.sh-sec-h { cursor: pointer; list-style: none; margin-bottom: 0; }
summary.sh-sec-h::-webkit-details-marker { display: none; }
.sh-setup[open] > summary.sh-sec-h { margin-bottom: 16px; }
.sh-sec-t { display: grid; gap: 4px; min-width: 0; }
.sh-sec-t .h { font: 900 clamp(28px, 3.4vw, 40px)/.9 var(--display); text-transform: uppercase; transform: skewX(-6deg); transform-origin: left bottom; }
.sh-sec-t .sum { color: var(--mist); font-size: 14px; }
summary.sh-sec-h:hover .sh-toggle { background: rgba(242, 245, 238, .16); }
.sh-sec-h > div { min-width: 0; }
.sh-sec-h h2 { margin: 0; font: 900 clamp(28px, 3.4vw, 40px)/.9 var(--display); text-transform: uppercase; transform: skewX(-6deg); transform-origin: left bottom; }
.sh-sec-h p { margin: 4px 0 0; color: var(--mist); font-size: 14px; }
.sh-num { flex: none; width: 42px; height: 40px; display: grid; place-items: center; background: var(--optic); color: var(--optic-ink); font: 900 26px/1 var(--display); clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); }
.sh-toggle { margin-left: auto; flex: none; }
.sh-ctl-body { display: grid; gap: 16px; }
.sh-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.sh-tile { appearance: none; position: relative; display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 112px; padding: 14px 8px 12px; border: 1px solid var(--edge); background: rgba(242, 245, 238, .05); color: var(--chalk); cursor: pointer; text-align: center;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); transition: background .15s, transform .18s var(--ease-out), color .15s; }
.sh-tile:hover { background: rgba(242, 245, 238, .13); transform: translateY(-3px); }
.sh-tile[aria-checked="true"] { background: var(--optic); color: var(--optic-ink); border-color: var(--optic); animation: shTilePop .35s var(--ease-back); }
@keyframes shTilePop { from { transform: scale(.92); } }
.sh-tile-ico .ico { width: 34px; height: 34px; display: block; }
.sh-tile b { font: 900 21px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.sh-tile small { font: 700 10.5px/1.15 var(--body); letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.sh-tile:focus-visible { outline: 3px solid var(--chalk); outline-offset: -3px; }
.sh-ctl-detail { display: grid; grid-template-columns: minmax(170px, 250px) minmax(0, 1fr); gap: 22px; align-items: center; padding: 16px; background: rgba(242, 245, 238, .045); }
.sh-demo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, rgba(var(--acc-rgb), .2), rgba(5, 12, 20, .9) 70%); border: 1px solid var(--edge); }
.sh-ctl-text { display: grid; gap: 8px; align-content: center; }
.sh-ctl-text h3 { margin: 0; font: 900 30px/.95 var(--display); text-transform: uppercase; transform: skewX(-6deg); transform-origin: left; }
.sh-ctl-line { margin: 0; font-size: 16px; max-width: 56ch; }
.sh-ctl-need { margin: 0; display: flex; align-items: center; gap: 9px; color: var(--mist); font-size: 14px; }
.sh-ctl-need.warn { color: #f5c451; }
.sh-ctl-need .cam { flex: none; width: 20px; height: 14px; border: 2px solid currentColor; border-radius: 3px; position: relative; }
.sh-ctl-need .cam::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: currentColor; }
.sh-ctl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sh-setup-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr); gap: 20px; align-items: start; }
.sh-opp .pp-side { margin: 0; }
.sh-rows .settings { gap: 12px; }
.sh-you { margin: 12px 0 0; color: var(--mist); font-size: 14px; }
.sh-you b { color: var(--chalk); }
.sh-setup-body { animation: shRise .35s var(--ease-out) backwards; }
.sh-setup-body .actions.row { margin-top: 14px; }
#menu .seg label.locked::after { content: attr(data-lock); font-size: .8em; margin-left: .45em; opacity: .85; }
.sh-foot { display: grid; gap: 14px; padding: 4px 4px 10px; }
.sh-foot details.howto { border-top: 0; padding: 12px 16px; background: rgba(9, 19, 29, .85); }
.sh-foot .menu-foot { order: 0; }
.sh-foot .pf-links { border-top: 1px solid var(--line); }
#tutCard { display: none !important; }   /* the featured banner offers the tutorial now */

/* ---------- the Locker: your player ---------- */
.sh-player { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.5fr); gap: 20px; padding: 14px 16px; border: 1px solid var(--edge); background: rgba(242, 245, 238, .04); align-items: start; animation: shRise .4s var(--ease-out) backwards; }
.sh-pl-id { display: grid; gap: 12px; align-content: start; }
.sh-pl-name .field { grid-template-columns: 1fr; gap: 6px; }
.sh-pl-name .field span { font: 800 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.sh-pl-name .field input { font-size: 18px; font-weight: 700; padding: 10px 12px; }
.sh-hand { display: flex; border: 1px solid var(--edge); }
.sh-hand button { flex: 1; appearance: none; border: 0; padding: 10px 8px; background: transparent; color: var(--mist); cursor: pointer; font: 700 14px/1 var(--body); }
.sh-hand button + button { border-left: 1px solid var(--edge); }
.sh-hand button[aria-checked="true"] { background: var(--chalk); color: var(--ink); }
.sh-hand button:focus-visible { outline: 2px solid var(--optic); outline-offset: -2px; }
.sh-pl-pick .pp-side { margin: 0; }
.sh-pl-pick .pp-chips { gap: 4px; }
.sh-pl-pick .pp-chip { width: 30px; height: 30px; }

/* ---------- Store, Challenges (the progress hub) ---------- */
#hub[data-tab="store"] .pg-tabs, #hub[data-tab="locker"] .pg-tabs { display: none; }
#hub[data-tab="challenges"] #pgTab-shop, #hub[data-tab="challenges"] #pgTab-locker { display: none; }
#hub .pg-tab { font-size: 20px; }
.pg-fh { margin: 0 0 8px; font: 800 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.pg-feat { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pg-featcard { position: relative; padding-top: 10px; }
.pg-featcard > .pg-item { height: 100%; }
.pg-why { white-space: nowrap; position: absolute; z-index: 2; left: 8px; top: 0; padding: 5px 9px 4px; font: 800 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; background: var(--acc); color: var(--acc-ink); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.pg-featcard.near .pg-why { background: #ffb21f; color: #2b1a00; }
.pg-featcard.soon .pg-why { background: #93a7bb; color: #09131d; }
.pg-item { transition: transform .18s var(--ease-out), border-color .15s; }
.pg-item:hover { transform: translateY(-3px); border-color: rgba(var(--acc-rgb), .6); }
.sh-goals { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.sh-cap { display: grid; grid-template-columns: 92px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 13px; color: var(--mist); }
.sh-cap small { font: 700 12px/1 var(--body); text-align: right; font-variant-numeric: tabular-nums; }
.sh-goal-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.sh-goal { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--edge); background: rgba(242, 245, 238, .035); }
.sh-goal b { display: block; font: 800 17px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.sh-goal small { font-size: 12px; color: var(--mist); }
.sh-goal-t { margin: 0; font: 800 20px/1.1 var(--display); text-transform: uppercase; }
.sh-goal-t small { font: 600 13px/1 var(--body); color: var(--mist); text-transform: none; letter-spacing: 0; margin-left: 6px; }

/* ---------- Leaderboard ---------- */
.lb-you { margin: 4px 0 0; font-size: 14px; color: var(--chalk); min-height: 1.3em; }
.lb-rec { display: grid; gap: 8px; }
.lb-rh { margin: 0; font: 800 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.lb-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lb-tiles li { position: relative; display: grid; gap: 2px; padding: 11px 12px 10px; background: rgba(242, 245, 238, .05); border-left: 3px solid var(--acc); clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); animation: shRise .45s var(--ease-out) calc(var(--n, 0) * 40ms) backwards; }
.lb-tiles b { font: 900 30px/1 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.lb-tiles span { font: 700 11px/1.15 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.lb-tiles small { font-size: 12px; color: var(--mist); }
.bd-off { padding: 16px 18px; border: 1px dashed rgba(var(--acc-rgb), .5); background: rgba(var(--acc-rgb), .06); display: grid; gap: 8px; }
.bd-off h3 { margin: 0; font: 900 26px/1 var(--display); text-transform: uppercase; }
.bd-off p { margin: 0; color: var(--mist); }
@media (min-width: 1100px) {
  #leaders .lb-slab { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); column-gap: 26px; align-items: start; }
  #leaders .lb-slab > .lb-head, #leaders .lb-slab > .lb-foot { grid-column: 1 / -1; }
  #leaders .lb-slab > .lb-rec { grid-column: 1; grid-row: 2 / span 3; }
  #leaders .lb-slab > :is(.lb-tabs, .lb-body, .lb-name) { grid-column: 2; }
  #leaders .lb-slab > .lb-foot { grid-row: 6; }
  #leaders .lb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #leaders .lb-body { height: min(52vh, 480px); }
}

/* ---------- Settings: the Profile pane ---------- */
.prof { display: grid; gap: 14px; }
.prof-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--edge); background: rgba(242, 245, 238, .04); }
.prof-card > div { display: grid; gap: 3px; min-width: 0; }
.prof-card b { font: 900 26px/1 var(--display); text-transform: uppercase; }
.prof-card small { font-size: 13px; color: var(--mist); }
.prof-card .warn { color: var(--coral); }
.prof-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- small things ---------- */
.sh-confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }
/* Something is loading (the hand tracker, the camera): a ball bounces beside the words. */
.cam-notice:has(#camNoticeBtn:not([hidden]))::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--optic); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .18); animation: shDot .62s cubic-bezier(.3, 0, .6, 1) infinite alternate; }
@keyframes shDot { from { transform: translateY(5px) scale(1.2, .8); } to { transform: translateY(-6px); } }
html.pad .sh-card:focus, html.pad .sh-tile:focus, html.pad .sh-btn:focus, html.pad .sh-play:focus, html.pad .sh-swing:focus, html.pad .sh-tab:focus { outline: 3px solid var(--chalk); outline-offset: 3px; }

/* ---------- narrower screens ---------- */
@media (max-width: 1000px) {
  .sh-top { grid-template-columns: 1fr; }
  .sh-quick { order: -1; }
  .sh-hero { min-height: 270px; }
  .sh-setup-grid { grid-template-columns: 1fr; }
  .sh-player { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sh-page { gap: 14px; }
  .sh-hero { min-height: 250px; padding: 22px 20px 62px; }
  .sh-ball3 { display: none; }
  .sh-hero-art { width: 70%; opacity: .16; }
  .sh-title { font-size: clamp(34px, 11vw, 52px); }
  .sh-text { font-size: 15px; }
  .sh-btn { min-height: 48px; font-size: 20px; padding: 12px 22px 12px 20px; }
  .sh-quick { padding: 22px 18px 12px; }
  .sh-play .tx b { font-size: 50px; }
  .sh-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sh-card { min-height: 164px; padding: 16px 14px 14px; }
  .sh-card-t { font-size: 26px; }
  .sh-card-d { font-size: 13px; }
  .sh-card-s { font-size: 11px; padding-right: 40px; }
  .sh-card-go { right: 12px; bottom: 12px; width: 34px; }
  .sh-sec { padding: 18px 16px 20px; }
  .sh-sec-h h2 { font-size: 28px; }
  .sh-ctl-detail { grid-template-columns: 1fr; gap: 12px; }
  .sh-demo { max-width: 260px; justify-self: center; width: 100%; }
  .sh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sh-tile { min-height: 98px; padding-inline: 4px; }
  .sh-tile b { font-size: 18px; }
  .sh-guide { padding: 12px 14px; clip-path: none; }
  .sh-cap { grid-template-columns: 74px minmax(0, 1fr) 74px; }
}
@media (max-width: 380px) { .sh-modes { grid-template-columns: 1fr; } .sh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-height: 520px) and (orientation: landscape) {
  .sh-top { grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr); }
  .sh-quick { order: 0; padding: 16px 16px 8px; gap: 8px; }
  .sh-hero { min-height: 220px; padding: 16px 22px 54px; }
  .sh-title { font-size: clamp(30px, 6vw, 48px); }
  .sh-text { font-size: 14px; }
  .sh-ball3 { display: none; }
  .sh-play { min-height: 72px; }
  .sh-play .tx b { font-size: 44px; }
  .sh-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .sh-card { min-height: 138px; padding: 12px; }
  .sh-card-t { font-size: 22px; }
  .sh-card-d { display: none; }
  .sh-setup-grid, .sh-player { grid-template-columns: 1fr 1fr; }
  .sh-ctl-detail { grid-template-columns: 170px 1fr; }
  .sh-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sh-tile { min-height: 84px; }
  .sh-tile small { display: none; }
}

/* ---------- the swing demos: ~2.6 s loops; the resting pose (no animation) is the moment of contact ---------- */
.demo-svg { display: block; width: 100%; height: 100%; }
.demo-svg .ball { transform: translate(66px, 52px); animation: demoBall 2.6s linear infinite; }
@keyframes demoBall {
  0% { transform: translate(2px, 6px); opacity: 0; animation-timing-function: ease-in; }
  6% { opacity: 1; }
  22% { transform: translate(28px, 76px); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  47% { transform: translate(66px, 52px); }
  50% { transform: translate(66px, 52px); animation-timing-function: cubic-bezier(.3, .1, .5, 1); }
  92% { transform: translate(118px, 8px); opacity: 1; }
  100% { transform: translate(122px, 4px); opacity: 0; }
}
.demo-svg .bshadow { transform: translate(66px, 0); animation: demoShadow 2.6s linear infinite; }
@keyframes demoShadow {
  0% { transform: translate(2px, 0) scaleX(.5); opacity: 0; }
  22% { transform: translate(28px, 0) scaleX(1.2); opacity: .45; }
  47%, 50% { transform: translate(66px, 0) scaleX(.8); opacity: .3; }
  92% { transform: translate(118px, 0) scaleX(.4); opacity: .12; }
  100% { opacity: 0; }
}
.demo-svg .pop { transform-box: fill-box; transform-origin: center; animation: demoPop 2.6s ease-out infinite; }
@keyframes demoPop { 0%, 46% { transform: scale(.3); opacity: 0; } 48% { transform: scale(.5); opacity: 1; } 62%, 100% { transform: scale(2); opacity: 0; } }
.demo-svg .swing { transform: translate(60px, 60px); }
.demo-svg .arm { transform-origin: 0 10px; transform: rotate(26deg); animation: demoArm 2.6s ease-in-out infinite; }
@keyframes demoArm { 0%, 20% { transform: rotate(-70deg); } 44% { transform: rotate(30deg); } 56% { transform: rotate(34deg); } 76%, 100% { transform: rotate(-70deg); } }
.demo-svg .cursor { transform: translate(0, -14px); animation: demoCursor 2.6s ease-in-out infinite; }
@keyframes demoCursor { 0%, 22% { transform: translate(-48px, 18px); opacity: 0; } 28% { opacity: 1; } 47% { transform: translate(-1px, -14px); opacity: 1; } 70% { opacity: 1; } 90%, 100% { transform: translate(2px, -16px); opacity: 0; } }
.demo-svg .trail { stroke-dasharray: 90; stroke-dashoffset: 0; animation: demoTrail 2.6s ease-out infinite; }
@keyframes demoTrail { 0%, 24% { stroke-dashoffset: 90; opacity: 0; } 30% { opacity: .6; } 48% { stroke-dashoffset: 0; opacity: .6; } 70%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.demo-svg .btn-a { transform-box: fill-box; transform-origin: center; animation: demoBtn 2.6s ease-in-out infinite; }
@keyframes demoBtn { 0%, 14% { transform: scale(1); } 20%, 46% { transform: scale(.78); filter: brightness(.8); } 52%, 100% { transform: scale(1); } }
.demo-svg .meter { transform-box: fill-box; transform-origin: left center; animation: demoMeter 2.6s ease-in-out infinite; }
@keyframes demoMeter { 0%, 14% { transform: scaleX(0); } 46% { transform: scaleX(1); } 52%, 100% { transform: scaleX(0); } }
.demo-svg .pad { transform-box: view-box; }

/* ---------- reduced motion: Settings > Reduce motion, or the system's preference ---------- */
html.calm :is(.sh-bar, .sh-bar *, .sh-page, .sh-page *, .sh-back *, .screen > .slab, .sh-player, .lb-tiles li, .sh-card-ico),
html.calm .sh-card, html.calm .sh-card::before, html.calm .sh-play::before { animation: none !important; transition: none !important; }
html.calm .sh-card { transform: none; }
@media (prefers-reduced-motion: reduce) {
  :is(.sh-bar, .sh-bar *, .sh-page, .sh-page *, .sh-back *, .screen > .slab, .sh-player, .lb-tiles li) { animation: none !important; transition: none !important; }
  .sh-card { transform: none; }
}
