:root {
  --ink: #e7eef8;
  --mute: rgba(231, 238, 248, 0.58);
  --ember: #ff5a6a;
  --gold: #7ee7ff;
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --index: 248px;
  --bar: 78px;
  --glass: linear-gradient(180deg, rgba(16, 28, 48, 0.72), rgba(6, 10, 18, 0.58) 46%, rgba(10, 16, 28, 0.64));
  --glass-dark: linear-gradient(180deg, rgba(8, 14, 26, 0.7), rgba(4, 8, 16, 0.5));
  --edge: rgba(160, 210, 255, 0.28);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  background: #05070d;
  -webkit-font-smoothing: antialiased;
}
button, a { color: inherit; }
button {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
::selection { background: rgba(94, 210, 255, 0.85); color: #041018; }

.field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 0% 0%, #10243a 0%, transparent 58%),
    radial-gradient(60% 50% at 100% 100%, #1a1040 0%, transparent 52%),
    #05070d;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.9;
}
.orb--ember {
  width: 46vw;
  height: 46vw;
  left: -8vw;
  top: -10vw;
  background: radial-gradient(circle, rgba(94, 210, 255, 0.85) 0%, rgba(94, 210, 255, 0) 68%);
  animation: drift 22s ease-in-out infinite;
}
.orb--gold {
  width: 36vw;
  height: 36vw;
  right: -6vw;
  top: 18vh;
  background: radial-gradient(circle, rgba(90, 120, 255, 0.7) 0%, rgba(90, 120, 255, 0) 70%);
  animation: drift 28s ease-in-out infinite reverse;
}
.orb--rose {
  width: 40vw;
  height: 40vw;
  left: 30vw;
  bottom: -16vw;
  background: radial-gradient(circle, rgba(255, 90, 106, 0.45) 0%, rgba(255, 90, 106, 0) 68%);
  animation: drift 26s ease-in-out infinite;
}

.glass,
.bar,
.index,
.instrument,
.piece,
.shelf__empty,
.meter,
.time {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}
.glass--dark {
  background: var(--glass-dark);
  backdrop-filter: blur(36px) saturate(160%);
  -webkit-backdrop-filter: blur(36px) saturate(160%);
}

.house {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--index) minmax(0, 1fr);
  grid-template-rows: var(--bar) minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--index) 1fr auto;
  align-items: center;
  padding: 0 22px;
  border-radius: 22px;
}
.mark {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 560;
}
.mark em { font-style: italic; color: var(--gold); }
.bar__line {
  margin: 0;
  color: var(--mute);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.bar__domain {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.index {
  border-radius: 28px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.room {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 12px 12px;
  border-radius: 16px;
  color: var(--mute);
  border: 1px solid transparent;
}
.room__no { font-size: 11px; letter-spacing: 0.16em; }
.room__name { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.room.is-on {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(126, 231, 255, 0.22), rgba(16, 28, 48, 0.35));
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 24px rgba(0, 0, 0, 0.16);
}
.room.is-on .room__no { color: var(--ember); }
.index__note {
  margin: auto 12px 8px;
  color: rgba(231, 238, 248, 0.5);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 4px 0 6px;
}
.stage__kicker {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 12px;
}
.stage__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(52px, 6.4vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.stage__title em { font-style: italic; font-weight: 500; color: var(--gold); }
.stage__lead {
  margin: 0 0 6px;
  max-width: 36rem;
  color: var(--mute);
  font-size: 17px;
  line-height: 1.45;
}

.instrument {
  position: relative;
  min-height: 0;
  border-radius: 32px;
  overflow: hidden;
}
.instrument::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.28), transparent 32%, transparent 60%, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

.shelf {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.piece {
  flex: 0 0 220px;
  min-height: 118px;
  text-align: left;
  border-radius: 22px;
  padding: 16px;
  color: var(--ink);
}
.piece.is-on {
  background: linear-gradient(180deg, rgba(126, 231, 255, 0.2), rgba(12, 20, 36, 0.4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 28px rgba(0, 0, 0, 0.2);
}
.piece__no { display: block; color: var(--ember); font-size: 11px; letter-spacing: 0.16em; }
.piece__name { display: block; margin-top: 20px; font-family: var(--serif); font-size: 20px; line-height: 1.15; }
.piece__meta {
  display: block;
  margin-top: 8px;
  color: var(--mute);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.shelf__empty {
  margin: 0;
  align-self: center;
  padding: 16px 18px;
  border-radius: 999px;
  color: var(--ink);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}

.disc, .gate, .plate, .column, .frame, .lens {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 18px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.disc {
  position: absolute;
  width: min(42vh, 380px);
  aspect-ratio: 1;
  right: 8%;
  top: 50%;
  translate: 0 -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(20, 14, 12, 0.2) 0 9%, transparent 10%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.22) 0 1px, rgba(255, 255, 255, 0.02) 2px 8px),
    linear-gradient(160deg, rgba(126, 231, 255, 0.28), rgba(90, 120, 255, 0.12));
  animation: spin 80s linear infinite;
}
.disc::after {
  content: "";
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff4, var(--gold), var(--ember) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.meter {
  position: absolute;
  left: 7%;
  bottom: 14%;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 42%;
  padding: 14px 16px;
  border-radius: 18px;
}
.meter i {
  display: block;
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(to top, var(--ember), #fff);
  transform-origin: bottom;
  animation: pulse 2.8s ease-in-out infinite;
}
.time {
  position: absolute;
  left: 7%;
  top: 12%;
  padding: 10px 16px;
  border-radius: 16px;
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: 0.06em;
}

.gate {
  position: absolute;
  inset: 11% 7%;
  border-radius: 28px;
  overflow: hidden;
}
.gate__beam {
  position: absolute;
  inset: -20% auto -20% -30%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: sweep 9s ease-in-out infinite;
}
.gate__caption {
  position: absolute;
  left: 22px;
  bottom: 18px;
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}

.wall {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 7%;
}
.plate {
  flex: 1;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.plate strong { font-family: var(--serif); font-size: 30px; font-weight: 500; }
.plate span { letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px; color: var(--gold); }

.column {
  position: absolute;
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: min(24vh, 220px);
  translate: -50% 0;
  border-radius: 36px;
  overflow: hidden;
}
.column__shine {
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: fall 7.5s ease-in-out infinite;
}

.staff {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 0 8%;
}
.staff i {
  display: block;
  height: 10px;
  border-radius: 99px;
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.staff i::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--ember));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  animation: travel 8s linear infinite;
}
.staff i:nth-child(2)::after { animation-delay: -1.6s; }
.staff i:nth-child(3)::after { animation-delay: -3.1s; }
.staff i:nth-child(4)::after { animation-delay: -4.4s; }
.staff i:nth-child(5)::after { animation-delay: -6s; }

.stack { position: absolute; inset: 0; }
.frame {
  position: absolute;
  top: 12%;
  width: 20%;
  height: 74%;
  border-radius: 28px;
}
.frame:nth-child(1) { left: 16%; transform: rotate(-8deg); }
.frame:nth-child(2) { left: 39%; }
.frame:nth-child(3) { left: 62%; transform: rotate(7deg); }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(3vw, 2vh, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
@keyframes sweep {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(340%); }
}
@keyframes fall {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(280%); opacity: 0; }
}
@keyframes travel {
  0% { left: 4px; }
  100% { left: calc(100% - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .disc, .meter i, .gate__beam, .column__shine, .staff i::after { animation: none; }
}
