body.page-piano {
  overflow: hidden;
  background: #07080c;
}
body.page-piano .noise,
body.page-piano .announce,
body.page-piano .top,
body.page-piano .foot,
body.page-piano .help-fab,
body.page-piano .flash {
  display: none !important;
}
body.page-piano .stage {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  min-height: 100dvh;
}

.vp {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #07080c;
  color: #eef3f8;
  font-family: Outfit, system-ui, sans-serif;
}
.vp button,
.vp input,
.vp select,
.vp textarea {
  font-family: inherit;
}
.vp svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.vp-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 8px 14px;
  background: #1b2030;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.vp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.vp-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0c121c;
}
.vp-brand strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
}
.vp-brand small {
  display: block;
  margin-top: 2px;
  color: #5ee0d0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.vp-inst {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 196px;
  padding: 8px 14px 10px;
  background: rgba(10, 14, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.vp-vol {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: #3ddec8;
  cursor: pointer;
}
.vp-inst-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.vp-inst-current,
.vp-inst-next {
  border: 0;
  background: transparent;
  color: #f4f7fb;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.vp-inst-current {
  font-size: 13px;
  font-weight: 650;
}
.vp-inst-next {
  color: rgba(238, 243, 248, 0.42);
  font-size: 12px;
}

.vp-tools {
  display: flex;
  gap: 6px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.vp-tools::-webkit-scrollbar { display: none; }
.vp-tool {
  flex: 0 0 auto;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 4px 7px;
  border-radius: 14px;
  border: 1px solid rgba(125, 204, 196, 0.22);
  background: rgba(255, 255, 255, 0.02);
  color: #9ee8df;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.vp-tool:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 236, 220, 0.7);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}
.vp-ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(94, 234, 212, 0.08);
  transition: transform 0.18s ease, background 0.18s ease;
}
.vp-tool:hover .vp-ico { transform: scale(1.08); background: rgba(94, 234, 212, 0.16); }
.vp-ico svg { width: 18px; height: 18px; }
.vp-tool > span:last-child {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #d5dde6;
}
.vp-tool.is-on,
.vp-tool[aria-pressed="true"] {
  background: rgba(61, 222, 200, 0.14);
  border-color: rgba(140, 236, 220, 0.9);
  color: #f3fffc;
}
.vp-tool.is-on .vp-ico { background: rgba(94, 234, 212, 0.22); }
.vp-tool[data-sustain].is-on {
  animation: vp-pulse 2.2s ease-in-out infinite;
}
.vp-tool.is-rec {
  color: #ff8d8d;
  border-color: rgba(255, 120, 120, 0.8);
  background: rgba(180, 40, 40, 0.2);
}

.vp-side {
  display: flex;
  gap: 6px;
}
.vp-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #c9d3de;
  text-decoration: none;
  cursor: pointer;
}
.vp-icon svg { width: 18px; height: 18px; }
.vp-icon {
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.vp-icon:hover { transform: translateY(-1px); color: #fff; border-color: rgba(140, 236, 220, 0.55); }
.vp-icon.is-on {
  color: #9ff3e8;
  border-color: rgba(140, 236, 220, 0.7);
  background: rgba(61, 222, 200, 0.12);
}
.vp-icon.is-scan::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  border: 1px solid rgba(94, 234, 212, 0.7);
  animation: vp-ping 1.4s ease-out infinite;
}

.vp-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: radial-gradient(90% 70% at 50% 0%, #161616, #050505 68%);
}
.vp-hint {
  margin: auto;
  max-width: 34rem;
  padding: 0 16px;
  text-align: center;
  color: #8b939e;
  line-height: 1.5;
}
.vp-hint[hidden],
.vp-player[hidden],
.vp-panel[hidden],
.vp-midi-scan[hidden] {
  display: none !important;
}
.vp-midi-scan {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 16%;
  width: min(340px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 22px 18px 16px;
  text-align: center;
  border-radius: 22px;
  background: rgba(14, 18, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  animation: vp-scan-in 0.35s ease;
}
.vp-midi-scan strong { display: block; font-size: 15px; }
.vp-midi-scan p { margin: 6px 0 0; color: #9aa6b2; font-size: 13px; }
.vp-midi-scan.is-leave { animation: vp-leave 0.35s ease forwards; }
.vp-radar {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  color: #9ff3e8;
}
.vp-radar span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(94, 234, 212, 0.55);
  animation: vp-ping 1.7s ease-out infinite;
}
.vp-radar span:nth-child(2) { animation-delay: 0.4s; }
.vp-radar span:nth-child(3) { animation-delay: 0.8s; }
.vp-radar svg { position: relative; z-index: 1; width: 28px; height: 28px; }
.vp-midi-scan.is-found { border-color: rgba(94, 234, 212, 0.45); }
.vp-midi-scan.is-found .vp-radar span,
.vp-midi-scan.is-miss .vp-radar span { animation: none; opacity: 0.35; }
.vp-stage:has(.vp-panel:not([hidden])) .vp-midi-scan { opacity: 0; pointer-events: none; }

.vp-player {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(720px, calc(100% - 24px));
  margin: 12px auto 0;
  padding: 10px 12px;
  background: #161922;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.vp-play {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #3ddec8;
  color: #06221e;
  font-size: 16px;
  cursor: pointer;
}
.vp-player-main { flex: 1; min-width: 0; }
.vp-player-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.vp-player-title span { color: #9aa6b2; }
.vp-player input[type="range"],
.vp-form input[type="range"] {
  width: 100%;
  accent-color: #3ddec8;
}

.vp-panel {
  width: min(820px, calc(100% - 24px));
  margin: 12px auto;
  overflow: auto;
  padding: 18px 18px 16px;
  background: rgba(16, 20, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  animation: vp-rise 0.28s ease;
}
.vp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vp-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.vp-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c9d3de;
  font-size: 22px;
  cursor: pointer;
}
.vp-lead {
  margin: 6px 0 12px;
  color: #9aa6b2;
  font-size: 14px;
}
.vp-search,
.vp-notes,
.vp-form select,
.vp-bpm input,
.vp-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0e1218;
  color: #eef3f8;
  border-radius: 10px;
}
.vp-search,
.vp-notes,
.vp-form select,
.vp-bpm input {
  padding: 8px 10px;
}
.vp-search { width: 100%; margin-bottom: 10px; }
.vp-notes {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  line-height: 1.45;
}
.vp-song-list,
.vp-sounds,
.vp-tracks {
  display: grid;
  gap: 8px;
}
.vp-sounds { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.vp-sounds { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.vp-song,
.vp-sound,
.vp-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.vp-sound {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  min-height: 108px;
}
.vp-song:hover,
.vp-sound:hover,
.vp-track:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}
.vp-song.is-on,
.vp-sound.is-on,
.vp-track.is-arm {
  border-color: #67ddd0;
  background: linear-gradient(180deg, rgba(61, 222, 200, 0.16), rgba(61, 222, 200, 0.05));
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.25);
}
.vp-num {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #7ee8dc;
  font-weight: 650;
}
.vp-song strong,
.vp-sound strong,
.vp-track strong,
.vp-song small,
.vp-sound small,
.vp-track small { display: block; }
.vp-sound strong { font-size: 15px; line-height: 1.25; }
.vp-song small,
.vp-sound small,
.vp-track small { color: #9aa6b2; margin-top: 2px; }
.vp-song-copy { flex: 1; min-width: 0; }
.vp-song-mark,
.vp-track-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.12);
  color: #bff8f0;
  font-size: 13px;
}
.vp-song-time { color: #9aa6b2; font-size: 12px; }
.vp-track { cursor: default; }
.vp-track-copy { flex: 1; min-width: 0; }
.vp-track button {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  border-radius: 999px;
  padding: 6px 10px;
}
.vp-row,
.vp-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.vp-form { flex-direction: column; align-items: stretch; }
.vp-form label,
.vp-bpm,
.vp-check {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.vp-check { flex-direction: row; align-items: center; }
.vp-row .vp-check { margin: 0; }
.vp-bpm { flex-direction: row; align-items: center; }
.vp-bpm input { width: 4.5rem; }
.vp-btn {
  padding: 8px 12px;
  cursor: pointer;
  background: #1a6f66;
  border-color: transparent;
}
.vp-btn.ghost { background: transparent; }
.vp-help { margin: 0; color: #9aa6b2; font-size: 13px; line-height: 1.45; }
.vp-manual {
  animation: vp-rise 0.45s ease;
}

.vp-manual {
  display: flex;
  height: 248px;
  background: #0c0c0e;
}
.vp-oct {
  width: 34px;
  flex: 0 0 auto;
  border: 0;
  background: #141418;
  color: #b7c0ca;
  font-size: 26px;
  cursor: pointer;
}
.vp-oct:hover { color: #fff; }
.vp-keys {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.vp-felt {
  height: 5px;
  background: linear-gradient(#f05a5a, #9d2424 55%, #5a1010);
}
.vp-keybed {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
  background:
    linear-gradient(#1a1a1a, #0e0e0e 18px, transparent 18px),
    #101012;
  touch-action: pan-x;
  user-select: none;
}
.vp-keys-inner {
  --n: 36;
  position: relative;
  display: flex;
  height: 100%;
  min-width: 100%;
  align-items: stretch;
}
.vp-white,
.vp-black { touch-action: pan-x; }
.vp-white {
  flex: 1 0 34px;
  position: relative;
  z-index: 1;
  height: auto;
  background: linear-gradient(#fff 0%, #f7f7f7 58%, #dedede 100%);
  border-right: 1px solid #c5c5c5;
  border-bottom: 5px solid #b5b5b5;
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0 -12px 14px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: background 0.08s linear, transform 0.06s ease;
}
.vp-white:last-of-type { border-right: 0; }
.vp-white.is-down,
.vp-white.is-song {
  background: linear-gradient(#f4fffc, #b7f3e6);
  border-bottom-color: #5ecbbd;
}
.vp-black {
  position: absolute;
  z-index: 5;
  top: 0;
  height: 62%;
  width: calc(100% / var(--n) * 0.58);
  left: calc((var(--i) + 1) * (100% / var(--n)) - (100% / var(--n) * 0.29));
  background: linear-gradient(#3c3c3c 0%, #141414 55%, #050505 100%);
  border: 1px solid #000;
  border-radius: 0 0 5px 5px;
  box-shadow:
    inset 0 -8px 8px rgba(0, 0, 0, 0.45),
    0 8px 10px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background 0.08s linear, filter 0.08s linear;
}
.vp-black.is-down,
.vp-black.is-song {
  background: linear-gradient(#6fe0d2, #1d3a36 70%, #0c1615);
  filter: brightness(1.05);
}
.vp-keybed.is-scroll {
  overflow-x: auto;
  scrollbar-gutter: stable;
}
.vp-keybed.is-scroll .vp-keys-inner { width: max-content; min-width: max-content; }
.vp-keybed.is-scroll .vp-white { flex: 0 0 46px; }
.vp-labels {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}
.vp-black .vp-labels { bottom: 6px; }
.vp-note {
  font-size: 11px;
  font-weight: 650;
  color: #5c6570;
  line-height: 1;
}
.vp-black .vp-note { color: #ececec; font-size: 9px; }
.vp-sc { display: flex; gap: 2px; }
.vp-sc kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 4px;
  border-radius: 6px;
  background: #d5d8de;
  color: #2a2e36;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
}
.vp-black .vp-sc kbd {
  min-width: 1.05rem;
  height: 1.05rem;
  background: rgba(255, 255, 255, 0.16);
  color: #f4f4f4;
  font-size: 11px;
}

@keyframes vp-scan-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%); }
}
@keyframes vp-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes vp-leave {
  to { opacity: 0; transform: translate(-50%, -8px); }
}
@keyframes vp-ping {
  0% { transform: scale(0.45); opacity: 0.75; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes vp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 222, 200, 0.28); }
  50% { box-shadow: 0 0 0 7px rgba(61, 222, 200, 0); }
}

@media (max-width: 980px) {
  .vp-top { flex-wrap: wrap; padding: 8px; }
  .vp-tools { order: 5; width: 100%; }
  .vp-brand strong { font-size: 11px; }
  .vp-manual { height: 168px; }
  .vp-inst { min-width: 0; }
}
