@font-face {
  font-family: "Fiesta Orbitron";
  src: url("/fonts/title.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: auto;
  background: #05060c;
  color: #f4f4f8;
  font-family: "Fiesta Orbitron", Arial, sans-serif;
}

/* The Python renderer always draws to 1280x720 and letterboxes that surface
   into its window. Keep the browser on the same logical pixel grid. */
#stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background: #000;
  transform: translate(-50%, -50%) scale(var(--fiesta-scale, 1));
  transform-origin: center;
}

.bg-video,
#playfield,
#hud,
#prompt {
  position: absolute;
  inset: 0;
  width: 1280px;
  height: 720px;
}

.bg-video {
  object-fit: fill;
  opacity: 0;
  transition: opacity 180ms linear;
  z-index: 0;
}

.bg-video.front { opacity: 1; }

#playfield {
  z-index: 1;
  pointer-events: none;
}

#hud,
#prompt {
  z-index: 2;
  pointer-events: none;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05060c;
  font-size: 28px;
  letter-spacing: 0.12em;
}

#boot.hidden,
#boot[hidden] { display: none; }

.launch-gate {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 43%, rgba(41, 236, 255, 0.18) 0, rgba(43, 91, 255, 0.08) 24%, transparent 52%),
    radial-gradient(circle at 18% 18%, rgba(255, 41, 172, 0.18), transparent 31%),
    radial-gradient(circle at 83% 82%, rgba(255, 211, 40, 0.13), transparent 28%),
    linear-gradient(145deg, #03030b 0%, #08051a 46%, #02020a 100%);
  opacity: 1;
  transition: opacity 420ms ease, filter 420ms ease, transform 520ms cubic-bezier(.2, .75, .2, 1);
}

.launch-gate[hidden] { display: none; }

.launch-gate::before,
.launch-gate::after {
  position: absolute;
  inset: -35%;
  z-index: -2;
  content: "";
  pointer-events: none;
}

.launch-gate::before {
  background: conic-gradient(from 90deg, transparent 0 18%, rgba(0, 235, 255, 0.12) 20%, transparent 23% 47%, rgba(255, 43, 171, 0.1) 49%, transparent 52% 76%, rgba(255, 220, 55, 0.08) 78%, transparent 81%);
  animation: launch-aurora 18s linear infinite;
}

.launch-gate::after {
  inset: 0;
  z-index: 5;
  border: 1px solid rgba(160, 242, 255, 0.15);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.86), inset 0 0 28px rgba(99, 228, 255, 0.08);
}

.launch-gate.dismissed {
  opacity: 0;
  filter: saturate(1.8) brightness(1.7);
  transform: scale(1.035);
  pointer-events: none;
}

.launch-grid {
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: -44%;
  height: 76%;
  background-image:
    linear-gradient(rgba(70, 226, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 226, 255, 0.16) 1px, transparent 1px);
  background-size: 54px 40px;
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000);
  transform: perspective(380px) rotateX(58deg);
  transform-origin: top center;
}

.launch-orbit {
  position: absolute;
  border: 1px solid rgba(98, 239, 255, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  width: 680px;
  height: 680px;
  border-top-color: rgba(255, 53, 184, 0.65);
  border-right-color: rgba(0, 239, 255, 0.54);
  animation: launch-orbit 14s linear infinite;
}

.orbit-two {
  width: 545px;
  height: 545px;
  border-bottom-color: rgba(255, 219, 51, 0.5);
  border-left-color: rgba(116, 83, 255, 0.62);
  animation: launch-orbit 9s linear infinite reverse;
}

.launch-card {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 680px;
  min-height: 530px;
  padding: 22px 48px;
  border: 1px solid rgba(168, 238, 255, 0.22);
  border-radius: 34px;
  background: linear-gradient(155deg, rgba(22, 22, 48, 0.86), rgba(5, 5, 17, 0.76));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 70px rgba(23, 211, 255, 0.08);
  backdrop-filter: blur(18px);
}

.andamiro-mark {
  position: relative;
  width: 282px;
  height: 76px;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.88), 0 9px 28px rgba(0, 0, 0, 0.35), 0 0 28px rgba(255, 137, 37, 0.18);
}

.andamiro-mark img {
  position: absolute;
  top: -33px;
  left: 0;
  width: 282px;
  height: 141px;
  object-fit: cover;
}

.launch-kicker {
  margin: 15px 0 5px;
  color: #7befff;
  font-size: 14px;
  letter-spacing: 0.32em;
  text-shadow: 0 0 16px rgba(62, 229, 255, 0.56);
}

.launch-card h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 52px;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-align: center;
  text-shadow: 0 3px 0 #11142d, 0 0 30px rgba(255, 255, 255, 0.16);
}

.launch-card h1 span {
  color: transparent;
  background: linear-gradient(90deg, #5eeeff 12%, #fff 47%, #ff82cd 87%);
  background-clip: text;
  -webkit-background-clip: text;
}

.launch-card h1 .launch-title-top {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}

.language-picker {
  width: 100%;
  margin: 0 0 14px;
}

.language-label {
  margin-bottom: 7px;
  color: rgba(191, 240, 255, 0.72);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-align: center;
  text-shadow: 0 0 12px rgba(57, 224, 255, 0.45);
}

.language-options {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.language-option {
  position: relative;
  display: grid;
  grid-template-rows: 27px 13px;
  place-items: center;
  width: 84px;
  height: 52px;
  padding: 4px 3px 3px;
  border: 1px solid rgba(142, 219, 242, 0.2);
  border-radius: 12px;
  color: #c8d3df;
  cursor: pointer;
  background: linear-gradient(155deg, rgba(30, 33, 62, 0.78), rgba(8, 9, 24, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 10px rgba(0, 0, 0, 0.28);
  font-family: Arial, sans-serif;
  transition: border-color 120ms ease, color 120ms ease, filter 120ms ease, transform 120ms ease;
}

.language-option:hover,
.language-option:focus-visible {
  outline: none;
  border-color: rgba(83, 235, 255, 0.72);
  color: #fff;
  filter: brightness(1.16);
  transform: translateY(-2px);
}

.language-option.selected {
  border-color: #58efff;
  color: #fff;
  background: linear-gradient(145deg, rgba(26, 99, 137, 0.76), rgba(62, 25, 103, 0.88));
  box-shadow: inset 0 0 16px rgba(61, 235, 255, 0.14), 0 0 0 1px rgba(255, 80, 185, 0.3), 0 0 18px rgba(53, 229, 255, 0.32);
}

.language-option.selected::after {
  position: absolute;
  right: 7px;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6affd0;
  box-shadow: 0 0 8px #6affd0;
  content: "";
}

.language-flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 24px;
  line-height: 27px;
}

.language-name {
  overflow: hidden;
  width: 100%;
  font-size: 10px;
  line-height: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[lang="de"] .launch-card h1 { font-size: 44px; }

.pad-setup-open {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  width: 406px;
  height: 44px;
  margin: -2px 0 10px;
  padding: 3px 13px 3px 7px;
  border: 1px solid rgba(110, 226, 255, 0.34);
  border-radius: 14px;
  color: #b9f6ff;
  cursor: pointer;
  background: linear-gradient(90deg, rgba(13, 40, 66, 0.88), rgba(26, 15, 57, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 5px 15px rgba(0, 0, 0, 0.3);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.13em;
  transition: border-color 120ms ease, filter 120ms ease, transform 120ms ease;
}

.pad-setup-open:hover,
.pad-setup-open:focus-visible {
  outline: none;
  border-color: #63efff;
  filter: brightness(1.16);
  transform: translateY(-1px);
}

.pad-setup-open img { width: 66px; height: 35px; object-fit: contain; }
.pad-setup-open > span { text-align: left; }
.pad-setup-open b {
  padding: 4px 7px;
  border-radius: 8px;
  color: #ffcf66;
  background: rgba(255, 152, 34, 0.12);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.pad-setup-open.configured b { color: #67ffd0; background: rgba(41, 255, 174, 0.1); }

.pad-setup-panel {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  background: rgba(1, 2, 12, 0.82);
  backdrop-filter: blur(16px);
}

.pad-setup-panel[hidden] { display: none; }

.pad-setup-card {
  width: 1100px;
  min-height: 610px;
  padding: 28px 38px 24px;
  border: 1px solid rgba(111, 230, 255, 0.32);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 24%, rgba(44, 211, 255, 0.1), transparent 34%),
    linear-gradient(155deg, rgba(20, 23, 51, 0.98), rgba(5, 6, 19, 0.98));
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 48px rgba(43, 219, 255, 0.1);
}

.pad-setup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 86px;
}

.pad-setup-kicker {
  margin: 0 0 4px;
  color: #ff70c9;
  font-size: 11px;
  letter-spacing: 0.3em;
}

.pad-setup-header h2 {
  margin: 0;
  color: #62efff;
  font-size: 34px;
  line-height: 1.05;
  text-shadow: 0 0 18px rgba(67, 228, 255, 0.34);
}

.pad-setup-header p:last-child {
  margin: 7px 0 0;
  color: #aeb7c9;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.pad-device-status {
  max-width: 390px;
  margin-top: 15px;
  padding: 10px 14px;
  border: 1px solid rgba(103, 255, 207, 0.25);
  border-radius: 12px;
  color: #76ffd5;
  background: rgba(20, 91, 77, 0.14);
  font-family: Arial, sans-serif;
  font-size: 12px;
  text-align: right;
}

.pad-device-status.none { border-color: rgba(255, 197, 94, 0.22); color: #e6bd72; background: rgba(95, 60, 17, 0.13); }

.pad-player-row { margin-top: 12px; }
.pad-player-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.15em;
}
.pad-player-label span {
  padding: 3px 8px;
  border-radius: 10px;
  color: #9da7ba;
  background: rgba(255, 255, 255, 0.06);
  font-family: Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.pad-panel-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.pad-map-slot {
  position: relative;
  display: grid;
  grid-template-columns: 62px 1fr;
  grid-template-rows: 28px 30px;
  align-items: center;
  min-width: 0;
  height: 84px;
  padding: 8px 8px;
  border: 1px solid rgba(131, 160, 188, 0.22);
  border-radius: 16px;
  color: #dfe8f2;
  cursor: pointer;
  background: linear-gradient(145deg, rgba(27, 31, 60, 0.82), rgba(8, 10, 27, 0.9));
  font-family: inherit;
  text-align: left;
  transition: border-color 120ms ease, filter 120ms ease, transform 120ms ease;
}

.pad-map-slot:hover,
.pad-map-slot:focus-visible { outline: none; border-color: rgba(92, 229, 255, 0.68); filter: brightness(1.12); }
.pad-map-slot.active {
  border-color: #ff67c4;
  background: linear-gradient(145deg, rgba(72, 25, 91, 0.9), rgba(14, 37, 68, 0.92));
  box-shadow: 0 0 0 1px rgba(78, 232, 255, 0.38), 0 0 22px rgba(255, 59, 184, 0.23);
  transform: translateY(-2px);
}
.pad-map-slot.captured::after {
  position: absolute;
  top: 7px;
  right: 8px;
  color: #67ffd0;
  content: "●";
  font-size: 10px;
  text-shadow: 0 0 7px #67ffd0;
}

.pad-map-icon {
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
  background-position: left top;
  background-repeat: no-repeat;
  background-size: 300% 200%;
  filter: drop-shadow(0 0 6px rgba(73, 207, 255, 0.32));
}
.pad-map-icon.mirror { transform: scaleX(-1); }
.pad-map-name { align-self: end; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pad-map-binding { align-self: start; overflow: hidden; color: #8d9aaf; font-family: Arial, sans-serif; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pad-map-slot.active .pad-map-binding { color: #ffe0f3; }

.pad-capture-status {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  color: #ffe47a;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-align: center;
}

.pad-setup-actions { display: flex; justify-content: center; gap: 10px; }
.pad-setup-actions button {
  min-width: 150px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(135, 183, 211, 0.3);
  border-radius: 20px;
  color: #c8d4df;
  cursor: pointer;
  background: rgba(20, 25, 48, 0.86);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.09em;
}
.pad-setup-actions button:hover:not(:disabled),
.pad-setup-actions button:focus-visible:not(:disabled) { outline: none; border-color: #63efff; color: #fff; filter: brightness(1.15); }
.pad-setup-actions button.primary { border-color: rgba(63, 238, 255, 0.76); color: #fff; background: linear-gradient(90deg, #185e82, #652667); box-shadow: 0 0 18px rgba(61, 228, 255, 0.2); }
.pad-setup-actions button:disabled { cursor: not-allowed; opacity: 0.35; }

.pump-it {
  position: relative;
  width: 406px;
  height: 104px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 61px;
  color: #fff;
  cursor: pointer;
  background:
    linear-gradient(#0b0c21, #0b0c21) padding-box,
    conic-gradient(from 30deg, #ff3da9, #ffe445, #37efff, #6c57ff, #ff3da9) border-box;
  border: 5px solid transparent;
  box-shadow: 0 17px 30px rgba(0, 0, 0, 0.46), 0 0 26px rgba(48, 229, 255, 0.42), inset 0 0 34px rgba(95, 78, 255, 0.18);
  font-family: inherit;
  transform: translateZ(0);
  transition: transform 150ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.pump-it::before {
  position: absolute;
  inset: 7px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.16), transparent 58%);
}

.pump-it:hover,
.pump-it:focus-visible {
  outline: none;
  filter: saturate(1.22) brightness(1.1);
  transform: scale(1.035);
  box-shadow: 0 19px 38px rgba(0, 0, 0, 0.52), 0 0 18px rgba(255, 59, 171, 0.65), 0 0 46px rgba(45, 231, 255, 0.58), inset 0 0 38px rgba(95, 78, 255, 0.25);
}

.pump-it:active { transform: scale(0.985); }
.pump-it:disabled { cursor: wait; }

.launch-gate:not(.launching) .pump-it:disabled {
  filter: saturate(0.62) brightness(0.78);
  transform: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.44), 0 0 18px rgba(48, 229, 255, 0.22);
}

.pump-it-label,
.pump-it-subtitle {
  position: relative;
  z-index: 2;
  display: block;
}

.pump-it-label {
  font-size: 42px;
  line-height: 48px;
  letter-spacing: 0.035em;
  text-shadow: 0 3px 0 #50165e, 0 0 18px rgba(255, 255, 255, 0.38);
}

.pump-it-subtitle {
  color: #a7f7ff;
  font-size: 11px;
  letter-spacing: 0.26em;
}

.pump-it-glint {
  position: absolute;
  top: -80%;
  left: -30%;
  z-index: 1;
  width: 22%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.74), transparent);
  filter: blur(2px);
  transform: rotate(18deg);
  animation: pump-glint 3.4s ease-in-out infinite;
}

.launching .pump-it { animation: pump-launch 620ms ease-in-out infinite alternate; }

.launch-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #b8b9cc;
  font-family: Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.launching .launch-status { color: #7df5ff; }

.launch-footer {
  position: absolute;
  bottom: 22px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: rgba(189, 220, 235, 0.48);
  font-size: 11px;
  letter-spacing: 0.27em;
}

.launch-footer b { font-weight: 400; }

.launch-footer span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff4dac;
  box-shadow: 0 0 8px #ff4dac;
}

@keyframes launch-aurora { to { transform: rotate(360deg); } }
@keyframes launch-orbit { to { transform: rotate(360deg); } }
@keyframes pump-glint {
  0%, 48% { left: -30%; opacity: 0; }
  55% { opacity: 1; }
  75%, 100% { left: 120%; opacity: 0; }
}
@keyframes pump-launch {
  from { filter: brightness(1.05); }
  to { filter: brightness(1.35); box-shadow: 0 0 60px rgba(50, 233, 255, 0.72); }
}

@media (prefers-reduced-motion: reduce) {
  .launch-gate::before,
  .launch-orbit,
  .pump-it-glint,
  .launching .pump-it,
  .center-start-prompt { animation: none; }
}

.silhouette {
  text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.screen-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.392);
}

.screen-title {
  position: absolute;
  top: 16px;
  left: 0;
  width: 100%;
  color: #00dcff;
  font-size: 42px;
  line-height: 51px;
  text-align: center;
}

.screen-title.mode { top: 58px; }

.selected-label {
  position: absolute;
  left: 40px;
  right: 40px;
  color: #fff;
  font-size: 42px;
  line-height: 51px;
  text-align: center;
}

.mode-option {
  position: absolute;
  top: 195px;
  width: 410px;
  height: 331px;
  text-align: center;
}

.mode-option.home { left: 190px; }
.mode-option.quest { left: 681px; }
.mode-option:not(.selected) { opacity: 0.4; }

.mode-option img {
  position: absolute;
  top: -36px;
  left: 39px;
  width: 332px;
  height: 332px;
  object-fit: contain;
}

.mode-option .mode-name {
  position: absolute;
  top: 225px;
  left: 0;
  width: 100%;
  font-size: 28px;
  line-height: 34px;
}

.mode-option.home .mode-name { color: #50c8ff; }
.mode-option.quest .mode-name { color: #ffb43c; }

.mode-description {
  position: absolute;
  top: 546px;
  left: 0;
  width: 100%;
  color: #b4b4c8;
  font-size: 20px;
  text-align: center;
}

.wheel-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wheel-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wheel-item.song {
  overflow: hidden;
  border-radius: 12px;
  background: #0f0f19;
  box-shadow: 6px 11px 0 rgba(0, 0, 0, 0.35);
}

.wheel-item.song img { object-fit: contain; }

.wheel-item.song.selected::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 5px solid #f4f6f7;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px #68717b, inset 0 0 11px #fff, 0 0 8px rgba(255, 255, 255, 0.55);
}

.wheel-placeholder {
  color: #b4b4b4;
  font-size: 20px;
}

.wheel-arrow {
  position: absolute;
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.78;
  animation: arrow-pulse 2.09s ease-in-out infinite;
}

.wheel-arrow.pack { width: 40px; height: 40px; }

@keyframes arrow-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.86; }
}

.pack-header {
  position: absolute;
  top: 4px;
  left: 50%;
  max-width: 922px;
  width: auto;
  height: 160px;
  object-fit: contain;
  transform: translateX(-50%);
  border-radius: 6px;
}

.chart-label {
  position: absolute;
  top: 586px;
  left: 0;
  width: 100%;
  font-size: 20px;
  text-align: center;
  text-transform: uppercase;
}

.level-badge {
  position: absolute;
  object-fit: contain;
  border-radius: 50%;
}

.level-fallback {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
}

.hint-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 19px;
  height: 24px;
  color: #8c8ca0;
  font-size: 20px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hint img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.hint .arrow-pair { width: 38px; }

.arrow-pair {
  display: inline-flex;
  align-items: center;
  width: 38px;
}

.arrow-pair img {
  width: 19px;
  height: 19px;
}

.step-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background-position: left top;
  background-repeat: no-repeat;
  background-size: 300% 200%;
}

.stage-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.song-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-backdrop-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.47);
}

.song-backdrop-focus {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84%;
  height: 56%;
  object-fit: contain;
  border-radius: 8px;
  transform: translate(-50%, -50%);
}

.command-menu {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 17, 0.96);
}

.command-menu .command-title {
  position: absolute;
  top: 30px;
  left: 0;
  width: 100%;
  color: #00dcff;
  font-size: 42px;
  text-align: center;
}

.command-menu .command-song {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  color: #c8c8dc;
  font-size: 28px;
  text-align: center;
}

.command-list {
  position: absolute;
  top: 130px;
  left: 340px;
  width: 600px;
}

.command-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 600px;
  height: 42px;
  margin-bottom: 4px;
  padding: 0 40px 0 20px;
  color: #9696aa;
  background: rgba(20, 25, 40, 0.47);
  font-size: 28px;
}

.command-row.selected {
  color: #fff;
  background: rgba(40, 60, 100, 0.78);
  border-left: 4px solid #00c8ff;
  padding-left: 16px;
}

.command-value { color: #78b4dc; }
.command-row.selected .command-value { color: #00dcff; }
.command-row.selected .command-value::before { content: "◀  "; }
.command-row.selected .command-value::after { content: "  ▶"; }

.noteskin-name {
  position: absolute;
  top: 614px;
  left: 0;
  width: 100%;
  color: #8c8ca0;
  font-size: 20px;
  text-align: center;
}

.command-menu .hint-bar { bottom: 36px; }

.game-life {
  position: absolute;
  bottom: 46px;
  left: 440px;
  width: 400px;
  height: 24px;
  padding: 2px;
  border: 2px solid #b4b4c8;
  background: #14141e;
}

.game-life > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #dc3232 0%, #e6c828 45%, #5adc78 100%);
}

.game-score {
  position: absolute;
  top: 14px;
  left: 50%;
  display: flex;
  height: 28px;
  transform: translateX(-50%);
}

.game-digit {
  display: block;
  flex: 0 0 auto;
  width: calc(var(--digit-height) * 22 / 18);
  height: var(--digit-height);
  background-image: url("/data/Themes/Fiesta 2/Graphics/ScreenGameplay/N_BM 10x1.png");
  background-repeat: no-repeat;
  background-size: 1000% 100%;
}

.game-score { --digit-height: 28px; }

.stage-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 54px;
  height: 38px;
}

.stage-indicator {
  position: absolute;
  inset: 0;
  width: 54px;
  height: 38px;
  object-fit: contain;
}

.stage-number {
  --digit-height: 18px;
  position: absolute;
  top: 17px;
  left: 50%;
  display: flex;
  height: 18px;
  transform: translateX(-50%);
}

.game-judgment {
  position: absolute;
  top: 296px;
  left: 540px;
  width: 200px;
  height: 56px;
  background-image: url("/data/Themes/Fiesta 2/Graphics/judgelabels 1x5.png");
  background-repeat: no-repeat;
  background-size: 100% 500%;
  transform-origin: center;
}

.game-combo {
  position: absolute;
  top: 410px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 68px;
  color: #ecfff2;
  font-family: "Fiesta Orbitron", Arial, sans-serif;
  font-size: 62px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 68px;
  letter-spacing: -0.055em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  filter: drop-shadow(0 0 7px rgba(55, 255, 83, 0.9)) drop-shadow(0 4px 0 rgba(0, 55, 10, 0.92));
  transform-origin: center;
}

.combo-digit {
  display: inline-block;
  min-width: 0.73em;
  color: transparent;
  background: linear-gradient(180deg, #fff 3%, #caffd2 24%, #41ff5d 52%, #0ed132 64%, #effff1 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-stroke: 1.5px #20ff49;
}

.game-help {
  position: absolute;
  bottom: 8px;
  left: 12px;
  color: #646478;
  font-size: 14px;
}

.results-panel {
  position: absolute;
  top: 60px;
  left: 80px;
  width: 1120px;
  height: 600px;
  padding: 14px 30px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 0 54px rgba(73, 9, 82, 0.24);
}

.results-title {
  color: #00dcff;
  font-size: 42px;
  text-shadow: 0 0 15px rgba(0, 220, 255, 0.42);
}
.results-song { margin-top: 4px; color: #fff; font-size: 28px; text-shadow: 0 2px 7px #000; }
.results-tally { margin-top: 10px; width: 100%; }
.results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 46px;
  padding: 0 170px 0 8px;
  border-left: 4px solid var(--accent);
  font-size: 28px;
  transform: scale(var(--row-scale, 1));
  transform-origin: left center;
  transition: opacity 45ms linear;
  will-change: transform, opacity;
}

.results-row > span:last-child {
  min-width: 170px;
  color: color-mix(in srgb, var(--accent) 72%, white);
  text-align: right;
  text-shadow: 0 0 11px color-mix(in srgb, var(--accent) 52%, transparent);
}

.results-row.pending { visibility: hidden; opacity: 0; }
.results-row.revealed { visibility: visible; opacity: 1; }
.results-score { margin-top: 8px; }

.results-rank-stage {
  position: absolute;
  top: 370px;
  left: 640px;
  z-index: 3;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.results-rank-sprite {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 114px;
  height: 107px;
  background-image: url("/data/Themes/Fiesta 2/Graphics/ScreenEvaluation/RANK_SP.PNG");
  background-repeat: no-repeat;
  background-size: 512px 512px;
  transform-origin: center;
  will-change: transform, opacity;
}

.rank-main {
  z-index: 3;
  filter: drop-shadow(5px 8px 0 rgba(0, 0, 0, 0.66)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.28));
}

.rank-glow,
.rank-bloom {
  z-index: 1;
  mix-blend-mode: screen;
  filter: brightness(1.65) saturate(1.4) drop-shadow(0 0 16px rgba(255, 255, 255, 0.92));
}

.rank-bloom {
  z-index: 0;
  filter: brightness(1.8) blur(2px) drop-shadow(0 0 28px rgba(117, 239, 255, 0.92));
}

.coin-prompt {
  position: absolute;
  bottom: 50px;
  left: 0;
  width: 100%;
  color: #ffe664;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 2px 2px 8px #000;
  animation: arrow-pulse 1.5s ease-in-out infinite;
}

.center-start-prompt {
  position: absolute;
  bottom: 10px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 112px;
  transform: translateX(-50%);
  transform-origin: center bottom;
  animation: center-start-pulse 1.5s ease-in-out infinite;
}

.center-start-tap {
  display: block;
  width: 64px;
  height: 64px;
  background-position: left top;
  background-repeat: no-repeat;
  background-size: 300% 200%;
  filter: drop-shadow(0 0 9px rgba(255, 238, 74, 0.88));
}

.press-center-step {
  display: block;
  width: 76px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(62, 207, 255, 0.7));
}

@keyframes center-start-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.94); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}
