.voice-arcade {
  --va-ink: #f4f9ff;
  --va-faint: #c8d8ef;
  --va-lime: #e0fb83;
  --va-accent: #a4e9ff;
  --va-route-dark: #153b57;
  --va-bottom: #101728;
  min-width: 0;
  padding: clamp(.72rem, 2.4vw, 1.22rem);
  border: 1px solid #718eb8;
  border-radius: 15px;
  background: linear-gradient(158deg, #203354 0%, #111d37 75%);
  color: var(--va-ink);
  box-shadow: 0 .3rem 0 #080e20;
}

.voice-arcade[data-scene='rocks'] { --va-accent: #ffca9a; --va-route-dark: #56435e; }
.voice-arcade[data-scene='gates'] { --va-accent: #a6ecff; }
.voice-arcade[data-scene='islands'] { --va-accent: #a8ffd3; --va-route-dark: #174951; }
.voice-arcade[data-level='2'] { border-color: #a6d3f8; }
.voice-arcade[data-level='3'] { border-color: #d3f28d; }
.voice-arcade [hidden] { display: none; }

.va-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: .45rem 1rem;
}
.va-heading > div { min-width: 0; }
.va-heading h2 {
  margin: 0;
  font-size: clamp(1.38rem, 3.8vw, 2.1rem);
  line-height: 1.1;
}
.va-heading p {
  margin: .38rem 0 .1rem;
  color: var(--va-faint);
  font-size: 1rem;
  line-height: 1.42;
}
.va-difficulty {
  padding: .11rem .57rem;
  border: 1px solid #91b4c98a;
  border-radius: 6px;
  background: #152a47;
  color: var(--va-accent);
  font-size: .86rem;
  font-weight: 800;
  white-space: nowrap;
}

.va-hud {
  display: grid;
  grid-template-columns: minmax(5.2rem, 1fr) auto minmax(6.1rem, 1fr);
  align-items: center;
  gap: .45rem .55rem;
  margin: .85rem 0 .53rem;
  padding: .49rem clamp(.55rem, 2vw, .84rem);
  border: 1px solid #6387b0;
  border-radius: 9px;
  background: #0f203a;
  line-height: 1.18;
}
.va-clock-wrap, .va-hits-wrap, .va-level-wrap { display: grid; gap: .19rem; }
.va-hits-wrap { text-align: center; }
.va-level-wrap { justify-self: end; text-align: center; }
.va-hud small { color: #c9ddf3; font-size: .81rem; font-weight: 750; }
.va-clock, .va-hits { font-size: clamp(1.04rem, 3.65vw, 1.28rem); font-variant-numeric: tabular-nums; }
.va-clock { color: var(--va-ink); }
.va-hits { color: var(--va-lime); text-align: center; }
.va-route-progress { display: flex; gap: .25rem; }
.va-route-progress span {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.37rem;
  border: 1px solid #54749b;
  border-radius: 5px;
  background: #1a2f48;
  color: #dae8fb;
  font-size: .82rem;
  font-weight: 900;
}
.va-route-progress .va-current { border-color: #acf0fd; color: #c1f4ff; }
.va-route-progress .va-cleared { border-color: var(--va-lime); background: var(--va-lime); color: #17232a; }

.va-stage {
  --va-place: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-items: start;
  min-height: clamp(13rem, 37vw, 17.8rem);
  padding: clamp(.7rem, 2.5vw, 1.05rem) .63rem 5.65rem;
  overflow: hidden;
  border: 1px solid #7797b7;
  border-radius: 10px;
  background-color: var(--va-bottom);
  background-image: linear-gradient(180deg, #090f2773 0%, #0c233366 55%, var(--va-bottom) 100%), var(--va-planet);
  background-position: center, center 56%;
  background-size: cover;
}
.voice-arcade[data-scene='gates'] .va-stage {
  background-image: radial-gradient(ellipse at 50% 94%, #97c4fa10, #0b1331c9 71%),
    repeating-linear-gradient(140deg, #24395f55 0 1px, transparent 2px 16px), var(--va-planet);
}
.voice-arcade[data-scene='islands'] .va-stage {
  background-image: linear-gradient(180deg, #08273c60 8%, #12314655 42%, #0b3b43 95%), var(--va-planet);
}
.va-card {
  z-index: 2;
  display: grid;
  gap: .18rem;
  justify-items: center;
  min-width: min(100%, 15rem);
  max-width: min(100%, 39rem);
  padding: .51rem clamp(.65rem, 3vw, 1.5rem) .66rem;
  border: 2px solid var(--va-accent);
  border-radius: 11px;
  background: #0c1b35;
  box-shadow: 0 .23rem 0 #080f20b8, 0 0 2rem #161e33af;
  text-align: center;
}
.va-prompt-label {
  color: var(--va-accent);
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.28;
}
.va-prompt {
  color: #fff;
  font-size: clamp(1.36rem, 4.55vw, 2.17rem);
  line-height: 1.14;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.va-space { position: absolute; inset: 0; pointer-events: none; }
.va-track {
  position: absolute;
  inset: auto 0 .55rem;
  display: grid;
  grid-template-columns: repeat(5,minmax(0, 1fr));
  place-items: end center;
  height: 2.7rem;
}
.va-track i {
  display: block;
  width: min(79%,5.6rem);
  height: 1.65rem;
  background: linear-gradient(180deg,#967b99 0 27%,#55405c 28% 66%,#392e49 67%);
  clip-path: polygon(12% 12%,79% 0,100% 34%,91% 72%,70% 91%,18% 100%,1% 71%,0 38%);
}
.va-track i:nth-child(even) { margin-block-end: .41rem; }
.va-track .va-lit { background: linear-gradient(180deg,#fbca9f 0 22%,#a06157 25% 59%,#665069 60%); }

.voice-arcade[data-scene='gates'] .va-track {
  inset-block-end: .41rem;
  background: linear-gradient(180deg, transparent 37%, #72adc34a 44%, transparent 47%);
}
.voice-arcade[data-scene='gates'] .va-track i {
  width: min(74%,4.6rem);
  height: 3rem;
  margin: 0;
  border: 2px solid #6aaacb;
  border-radius: 47% 47% 12% 12%;
  background: radial-gradient(ellipse at 50% 100%, #4c93bf66, #0b1b43cc 67%);
  clip-path: none;
  box-shadow: inset 0 0 .55rem #2d96c8;
}
.voice-arcade[data-scene='gates'] .va-track .va-lit {
  border-color: #b8f3ff;
  background: radial-gradient(ellipse at 50% 89%, #b7effb9d, #0b233aba 73%);
  box-shadow: 0 0 .75rem #69c9e97e, inset 0 0 .65rem #8ce9f3c2;
}

.voice-arcade[data-scene='islands'] .va-track {
  inset-block-end: .46rem;
  background: repeating-linear-gradient(172deg, transparent 0 8px, #98ddfa29 9px 10px, transparent 11px 24px);
}
.voice-arcade[data-scene='islands'] .va-track i {
  height: 1.42rem;
  border-top: 4px solid #779d65;
  border-radius: 51% 45% 36% 32%;
  background: linear-gradient(180deg,#ab925d,#655c53);
  clip-path: none;
  box-shadow: 0 .34rem .35rem #062e36c9;
}
.voice-arcade[data-scene='islands'] .va-track .va-lit { border-color: #b4f698; background: linear-gradient(180deg,#bfb678,#61784f); }

.va-runner {
  position: absolute;
  z-index: 1;
  inset: auto auto 1.56rem calc(10% + var(--va-place) * 20%);
  width: clamp(2.8rem,9vw,4.24rem);
  height: clamp(2.8rem,9vw,4.24rem);
  transform: translateX(-50%);
  transition: left 380ms cubic-bezier(.2,.68,.35,1);
}
.va-actor {
  display: grid;
  place-items: end center;
  width: 100%;
  height: 100%;
  font-size: clamp(1.82rem,6vw,2.9rem);
  line-height: 1;
  filter: drop-shadow(0 2px 4px #07172bcf);
}
.va-actor img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.voice-arcade[data-scene='gates'] .va-runner { inset-block-end: 1.12rem; }
.voice-arcade[data-scene='islands'] .va-runner { inset-block-end: 1.15rem; }
.va-burst .va-card { animation: va-react 430ms ease-out both; }
.va-burst .va-actor { animation: va-hop 430ms ease-in-out both; }
.voice-arcade[data-scene='gates'] .va-burst .va-actor { animation: va-dash 430ms ease-out both; }
.voice-arcade[data-scene='islands'] .va-burst .va-actor { animation: va-sail 430ms ease-out both; }
@keyframes va-react { 35% { box-shadow: 0 .24rem #080f20, 0 0 1.1rem #bee97dbc; } }
@keyframes va-hop { 48% { transform: translateY(-1.65rem) rotate(-11deg); } }
@keyframes va-dash { from { transform: translateX(-.45rem) scale(.9); } 55% { transform: translateX(.4rem) scale(1.13); } }
@keyframes va-sail { 44% { transform: translateY(-.76rem) rotate(13deg); } }

.va-actions, .va-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .5rem;
  margin-top: .74rem;
}
.va-button {
  min-height: 44px;
  padding: .42rem .74rem;
  border: 1px solid #779dc3;
  border-radius: 7px;
  background: #1a324e;
  color: var(--va-ink);
  font-weight: 800;
  line-height: 1.23;
}
.va-button[data-va='voice'], .va-button[data-va='replay'], .va-entry .va-button {
  border-color: var(--va-lime);
  background: var(--va-lime);
  color: #152239;
}
.va-button:hover { filter: brightness(1.18); }
.va-entry label {
  display: grid;
  flex: 1 1 12rem;
  gap: .22rem;
  color: var(--va-faint);
  font-size: .9rem;
  font-weight: 750;
}
.va-entry input {
  min-width: 0;
  min-height: 44px;
  padding: .38rem .59rem;
  border: 1px solid #85aadd;
  border-radius: 6px;
  background: #0f223b;
  color: #fff;
  font-size: 1rem;
}
.va-message {
  min-height: 1.45rem;
  margin: .55rem 0 .16rem;
  color: #e8f4ff;
  font-size: .96rem;
  line-height: 1.45;
}
.va-note { display: block; color: var(--va-faint); font-size: .86rem; line-height: 1.42; }
.va-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 370px) {
  .va-hud { grid-template-columns: minmax(4.45rem,1fr) auto minmax(4.8rem,1fr); }
  .va-route-progress { gap: .15rem; }
  .va-route-progress span { width: 1.36rem; }
  .va-actions .va-button { flex-grow: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .va-runner { transition: none; }
  .va-stage .va-card, .va-stage .va-actor { animation: none !important; }
}
