/* Playful motion layers. Animation timing and pause state are owned by motion.js. */
.motion-control {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 17px;
  border: 2px solid var(--ink);
  border-radius: 100px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
  cursor: pointer;
}
.motion-control::before { content: 'Ⅱ'; font-family: Arial, sans-serif; font-size: 16px; }
.motion-control[aria-pressed='true']::before { content: '▶'; font-size: 12px; }
.motion-control:focus-visible { outline: 4px solid #d50064; outline-offset: 5px; }
.motion-control:hover { background: #fff; }

.hero-art { z-index: 0; translate: var(--hero-x, 0px) var(--hero-y, 0px); }
.hero-playfield {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.hero-note { z-index: 3; }
.float-token {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: var(--yellow);
  transform-origin: center;
  pointer-events: none;
  filter: drop-shadow(3px 4px 0 rgb(22 22 92 / 22%));
}
.float-token > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.token-star { color: var(--yellow); }
.token-pad { color: var(--cyan); }
.token-card { color: #fff; }
.token-heart { color: var(--pink); }
.token-badge {
  border: 3px solid var(--ink);
  border-radius: 18px 18px 18px 3px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  filter: none;
  padding: 5px 9px;
  font-family: AsobiRound, Arial, sans-serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .025em;
  white-space: nowrap;
}
.token-badge:nth-child(even) { background: var(--pink); }
.hero h1 .motion-char {
  display: inline-block;
  margin: 0;
  padding: 0;
  font: inherit;
  font-style: normal;
  line-height: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  transform-origin: 50% 80%;
}

.motion-effects {
  position: fixed;
  inset: 0;
  z-index: 55;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
}
.burst-piece, .cursor-spark {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 10px;
  height: 13px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--piece-color, var(--yellow));
  pointer-events: none;
  transform-origin: center;
}
.cursor-spark { width: 10px; height: 10px; border: 0; }
.burst-piece[data-shape='star'], .cursor-spark[data-shape='star'],
.burst-piece.shape-star, .cursor-spark.shape-star {
  border: 0;
  border-radius: 0;
  clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 35%, 39% 34%);
}
.burst-piece[data-shape='heart'], .cursor-spark[data-shape='heart'],
.burst-piece.shape-heart, .cursor-spark.shape-heart {
  border: 0;
  border-radius: 0;
  clip-path: polygon(50% 94%, 6% 51%, 0 29%, 10% 9%, 30% 3%, 50% 20%, 70% 3%, 90% 9%, 100% 29%, 94% 51%);
}
.burst-piece[data-shape='square'], .cursor-spark[data-shape='square'],
.burst-piece.shape-square, .cursor-spark.shape-square { border-radius: 2px; }

.ticker { text-align: left; overflow: hidden; }
.ticker .ticker-track { display: flex; align-items: center; width: max-content; margin: 0; padding: 0; }
.ticker .ticker-copy { display: flex; flex: 0 0 auto; align-items: center; white-space: nowrap; margin: 0; padding: 0; }
.ticker .ticker-copy > span { display: inline-block; flex: 0 0 auto; }
.motion-ready .button::after { transition: rotate .18s ease, scale .18s ease; }
@media (hover: hover) and (pointer: fine) {
  .motion-ready .button:hover::after { rotate: 12deg; scale: 1.25; }
  .motion-ready .play-visual, .motion-ready .welcome-item { transform-style: preserve-3d; }
}

html[data-motion='off'] .hero-playfield,
html[data-motion='off'] .motion-effects { display: none; }
html[data-motion='off'] .hero-art { translate: none !important; }
html[data-motion='off'] .hero h1 .motion-char { transform: none !important; opacity: 1 !important; }
html[data-motion='off'] .button::after { rotate: none; scale: none; }

@media (max-width: 640px) {
  .motion-control { left: 13px; bottom: 15px; min-height: 44px; padding: 9px 13px; font-size: 11px; box-shadow: 3px 3px 0 var(--ink); }
  .hero-art { translate: none; }
  .hero-playfield { top: auto; bottom: 0; height: 66.666vw; }
  .float-token { filter: drop-shadow(2px 3px 0 rgb(22 22 92 / 20%)); }
  .token-badge { font-size: 12px; border-width: 2px; border-radius: 12px 12px 12px 2px; padding: 4px 7px; box-shadow: 3px 3px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-playfield, .motion-effects { display: none; }
  .hero-art { translate: none !important; }
  .hero h1 .motion-char { transform: none !important; opacity: 1 !important; }
  .motion-ready .button::after { transition: none; rotate: none; scale: none; }
}

@media(max-width:640px){.float-token:nth-child(n+9){display:none}.float-token{scale:.67;transform-origin:top left}.token-badge{scale:.8}.float-token:nth-child(8){left:74%!important}}
html[data-motion=off] .hero-art{transform:none!important}
@media(prefers-reduced-motion:reduce){.hero-art{transform:none!important}}
