/* 声迹 SPECTRA — a small six-note audio observatory */

:root {
  color-scheme: dark;
  --bg: #070910;
  --bg-soft: #0b0e18;
  --panel: rgba(15, 19, 30, 0.72);
  --panel-solid: #121624;
  --text: #f1eee6;
  --text-soft: #d7d4ca;
  --muted: #82899d;
  --muted-deep: #596074;
  --line: rgba(231, 235, 255, 0.1);
  --line-strong: rgba(231, 235, 255, 0.18);
  --warm: #ffd18a;
  --warm-hot: #ff9b6b;
  --coral: #ff7188;
  --teal: #6fe7d6;
  --blue: #89a6ff;
  --violet: #c193ff;
  --lime: #d7f07c;
  --note-color: #ffcc85;
  --active-color: #ffcc85;
  --radius: 26px;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", "SF Mono", Consolas, monospace;
  --orb-size: clamp(104px, 12vw, 142px);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(91, 112, 190, 0.2), transparent 70%),
    linear-gradient(180deg, #080a12 0%, #070910 60%, #06080d 100%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(255, 202, 132, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(255, 209, 138, 0.85);
  outline-offset: 3px;
}

/* Background atmosphere -------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient__glow {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0.38;
}

.ambient__glow--one {
  top: -16vh;
  left: 38%;
  width: 52vw;
  height: 38vw;
  background: radial-gradient(circle, rgba(97, 121, 213, 0.34), transparent 68%);
}

.ambient__glow--two {
  top: 28%;
  left: -20vw;
  width: 44vw;
  height: 44vw;
  background: radial-gradient(circle, rgba(47, 190, 181, 0.15), transparent 68%);
}

.ambient__glow--three {
  right: -18vw;
  bottom: -26vh;
  width: 54vw;
  height: 42vw;
  background: radial-gradient(circle, rgba(255, 110, 100, 0.12), transparent 68%);
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 72% 68% at 50% 48%, #000 0%, transparent 78%);
  opacity: 0.35;
}

@keyframes ambientDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(0.96); }
  to { transform: translate3d(3%, 4%, 0) scale(1.06); }
}

/* Main layout ------------------------------------------------------------ */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(500px, 1fr) auto;
  gap: 14px;
  width: min(1480px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 18px clamp(18px, 3vw, 42px) max(20px, env(safe-area-inset-bottom));
}

/* Masthead --------------------------------------------------------------- */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 46px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  color: var(--warm);
}

.brand__core {
  fill: var(--warm);
}

.brand__nodes {
  fill: rgba(241, 238, 230, 0.58);
}

.brand__words {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}

.brand__words strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand__words span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.23em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.tagline::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}

.masthead__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.local-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px rgba(111, 231, 214, 0.85);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.button--ghost:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.button--folder {
  padding-inline: 12px;
}

.button--primary {
  border-color: rgba(255, 231, 199, 0.42);
  background: linear-gradient(135deg, #ffe0ae 0%, #ffc47d 52%, #ff9e76 100%);
  color: #1b130d;
  box-shadow: 0 7px 24px rgba(255, 150, 96, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-weight: 650;
}

.button--primary:hover {
  background: linear-gradient(135deg, #fff0cf 0%, #ffd296 52%, #ffb18a 100%);
  box-shadow: 0 9px 28px rgba(255, 150, 96, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

/* Stage ------------------------------------------------------------------ */
.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 56% 58% at 50% 49%, rgba(105, 132, 232, 0.12), transparent 70%),
    radial-gradient(ellipse 42% 50% at 86% 88%, rgba(255, 105, 100, 0.07), transparent 72%),
    radial-gradient(ellipse 40% 48% at 11% 9%, rgba(81, 207, 197, 0.055), transparent 72%),
    linear-gradient(145deg, rgba(14, 18, 31, 0.94), rgba(7, 10, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -80px 120px rgba(0, 0, 0, 0.22),
    0 28px 80px rgba(0, 0, 0, 0.28);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(190, 205, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 205, 255, 0.034) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 68% 78% at 50% 50%, #000 0%, transparent 84%);
  opacity: 0.56;
  pointer-events: none;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 55% 55% at 50% 50%, transparent 48%, rgba(3, 5, 10, 0.44) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.16));
  pointer-events: none;
}

.stage__frame {
  position: absolute;
  inset: 12px;
  z-index: 8;
  border-radius: calc(var(--radius) - 9px);
  pointer-events: none;
}

.stage__corner {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0.45;
}

.stage__corner--tl {
  top: 0;
  left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  border-top-left-radius: 5px;
}

.stage__corner--tr {
  top: 0;
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-right: 1px solid rgba(255, 255, 255, 0.32);
  border-top-right-radius: 5px;
}

.stage__corner--bl {
  bottom: 0;
  left: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom-left-radius: 5px;
}

.stage__corner--br {
  right: 0;
  bottom: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom-right-radius: 5px;
}

.stage__meta {
  position: absolute;
  top: 19px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  line-height: 1.4;
  pointer-events: none;
}

.stage__meta--left {
  left: 24px;
}

.stage__meta--right {
  right: 24px;
  align-items: flex-end;
  text-align: right;
}

.stage__meta span:first-child {
  color: rgba(215, 221, 239, 0.44);
}

/* Drifting song lyrics --------------------------------------------------- */
.lyric-ghost {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.lyric-ghost__row {
  position: absolute;
  left: 0;
  width: 100%;
  padding: 0 clamp(18px, 5vw, 80px);
  text-align: center;
}

.lyric-ghost__row--current {
  top: 20%;
}

.lyric-ghost__row--next {
  top: 76%;
}

.lyric-ghost__float {
  display: inline-block;
  max-width: 100%;
  animation: lyricFloat 18s ease-in-out infinite alternate;
  will-change: transform;
}

.lyric-ghost__float--reverse {
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

.lyric-ghost__text {
  display: block;
  max-width: min(1120px, 86vw);
  margin: 0 auto;
  color: rgba(255, 224, 179, 0.18);
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 48px);
  font-weight: 500;
  letter-spacing: 0.055em;
  line-height: 1.22;
  text-wrap: balance;
  white-space: normal;
}

.lyric-ghost__row--next .lyric-ghost__text {
  color: rgba(158, 196, 255, 0.08);
  font-size: clamp(18px, 2.3vw, 32px);
  font-weight: 400;
}

@keyframes lyricFloat {
  from { transform: translate3d(-12px, 0, 0); }
  to { transform: translate3d(12px, 0, 0); }
}

/* Decorative orbit rings -------------------------------------------------- */
.orbit-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: clamp(360px, 46vw, 660px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbit-deco__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-deco__ring--outer {
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(208, 219, 255, 0.095);
}

.orbit-deco__ring--mid {
  width: 68%;
  height: 68%;
  border: 1px solid rgba(208, 219, 255, 0.07);
}

.orbit-deco::before,
.orbit-deco::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-deco::before {
  width: 46%;
  height: 46%;
  border: 1px solid rgba(255, 213, 148, 0.075);
}

.orbit-deco::after {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 209, 138, 0.3);
  background: rgba(255, 209, 138, 0.08);
  box-shadow: 0 0 14px rgba(255, 189, 107, 0.18);
}

.orbit-deco__dash {
  position: absolute;
  display: block;
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 209, 138, 0.26));
  opacity: 0.7;
}

.orbit-deco__dash--one {
  top: 18%;
  left: 8%;
  transform: rotate(-48deg);
}

.orbit-deco__dash--two {
  right: 7%;
  bottom: 20%;
  transform: rotate(-44deg) scaleX(-1);
}

@keyframes slowSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Six pads --------------------------------------------------------------- */
.pad-field {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.pad {
  --note-color: #99a2b9;
  --hit-color: rgba(255, 255, 255, 0.3);
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 200px;
  height: 88px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 255, 0.11);
  border-radius: 17px;
  background:
    linear-gradient(152deg, rgba(255, 255, 255, 0.047), rgba(255, 255, 255, 0.012) 55%, rgba(255, 255, 255, 0.022)),
    rgba(12, 16, 27, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -18px 30px rgba(0, 0, 0, 0.17),
    0 15px 40px rgba(0, 0, 0, 0.16);
  color: var(--text);
  font: inherit;
  text-align: left;
  transform: translate(-50%, -50%);
  transform-origin: center;
  cursor: default;
  pointer-events: none;
  opacity: 0.68;
  contain: layout;
  transition:
    left 360ms cubic-bezier(0.22, 1, 0.36, 1),
    top 360ms cubic-bezier(0.22, 1, 0.36, 1),
    width 360ms cubic-bezier(0.22, 1, 0.36, 1),
    height 360ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease,
    opacity 260ms ease;
  -webkit-tap-highlight-color: transparent;
}

.pad::-moz-focus-inner {
  border: 0;
}

.pad:disabled {
  opacity: 0.58;
}

.pad.is-live {
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  border-color: color-mix(in srgb, var(--note-color) 18%, rgba(226, 232, 255, 0.1));
}

.pad.is-live::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 120% at 18% 100%, color-mix(in srgb, var(--note-color) 11%, transparent), transparent 68%),
    linear-gradient(128deg, transparent 20%, color-mix(in srgb, var(--note-color) 3.5%, transparent) 100%);
  pointer-events: none;
}

.pad.is-live:hover {
  border-color: color-mix(in srgb, var(--note-color) 38%, rgba(226, 232, 255, 0.1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -18px 30px rgba(0, 0, 0, 0.15),
    0 18px 44px rgba(0, 0, 0, 0.22),
    0 0 24px color-mix(in srgb, var(--note-color) 8%, transparent);
}

.pad__top {
  position: absolute;
  top: 12px;
  right: 14px;
  left: 15px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pad__index {
  color: color-mix(in srgb, var(--note-color) 58%, #81889b);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.pad__tag {
  color: rgba(218, 224, 242, 0.3);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.pad__meter {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 9px;
  opacity: 0.62;
}

.pad__meter i {
  display: block;
  width: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--note-color) 64%, transparent);
}

.pad__meter i:nth-child(1) { height: 4px; }
.pad__meter i:nth-child(2) { height: 8px; }
.pad__meter i:nth-child(3) { height: 6px; }
.pad__meter i:nth-child(4) { height: 9px; }

.pad__note {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 2;
  color: color-mix(in srgb, var(--note-color) 90%, #f4f0e5);
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-shadow: 0 0 24px color-mix(in srgb, var(--note-color) 20%, transparent);
  transition: color 300ms ease, text-shadow 300ms ease;
}

.pad:disabled .pad__note {
  color: rgba(216, 220, 233, 0.4);
  text-shadow: none;
}

.pad__sub {
  position: absolute;
  right: 14px;
  bottom: 13px;
  z-index: 2;
  max-width: 55%;
  overflow: hidden;
  color: rgba(217, 222, 238, 0.42);
  font-size: clamp(8px, 0.82vw, 10px);
  letter-spacing: 0.04em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pad__glow {
  position: absolute;
  inset: -40%;
  z-index: 1;
  background: radial-gradient(circle at 20% 100%, color-mix(in srgb, var(--hit-color) 40%, transparent), transparent 48%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.pad__ripple {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid color-mix(in srgb, var(--hit-color) 68%, transparent);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.pad.is-hit {
  border-color: color-mix(in srgb, var(--hit-color) 58%, rgba(255, 255, 255, 0.25));
  background:
    linear-gradient(152deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 55%, rgba(255, 255, 255, 0.045)),
    color-mix(in srgb, var(--note-color) 7%, rgba(12, 16, 27, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -20px 36px color-mix(in srgb, var(--note-color) 10%, transparent),
    0 0 34px color-mix(in srgb, var(--note-color) 18%, transparent),
    0 18px 44px rgba(0, 0, 0, 0.22);
  animation: padHitPulse 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pad.is-hit .pad__glow {
  opacity: 1;
}

.pad.is-hit .pad__ripple {
  animation: padRipple 560ms cubic-bezier(0.2, 0.7, 0.25, 1);
}

.pad.is-hit .pad__note {
  color: #fffaef;
  text-shadow: 0 0 28px color-mix(in srgb, var(--note-color) 72%, transparent);
}

@keyframes padHitPulse {
  0% { filter: brightness(1.05); }
  28% { filter: brightness(1.42); }
  100% { filter: brightness(1); }
}

@keyframes padRipple {
  0% { opacity: 0.78; transform: scale(0.97); }
  100% { opacity: 0; transform: scale(1.09); }
}

/* Center instrument ------------------------------------------------------ */
.orb {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: var(--orb-size);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orb__halo {
  position: absolute;
  inset: -42%;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--active-color) 16%, transparent) 0%, rgba(95, 119, 205, 0.09) 34%, transparent 70%);
  opacity: 0.9;
  transition: background 500ms ease;
}

.orb__ring {
  position: absolute;
  inset: -8%;
  border: 1px solid rgba(222, 230, 255, 0.12);
  border-top-color: rgba(255, 218, 156, 0.36);
  border-radius: 50%;
}

.orb__ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--active-color);
  box-shadow: 0 0 10px var(--active-color);
}

.orb__ring--inner {
  inset: 6%;
  border-color: rgba(222, 230, 255, 0.07);
  border-bottom-color: rgba(111, 231, 214, 0.22);
}

.orb__ring--inner::before {
  top: auto;
  right: 2px;
  bottom: 50%;
  left: auto;
  width: 3px;
  height: 3px;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.orb__plane {
  position: absolute;
  top: 53%;
  left: 50%;
  width: 134%;
  height: 34%;
  border: 1px solid rgba(223, 231, 255, 0.09);
  border-right-color: rgba(255, 207, 138, 0.24);
  border-left-color: rgba(111, 231, 214, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
}

.orb__plane::after {
  content: "";
  position: absolute;
  inset: 16% 7%;
  border: 1px solid rgba(223, 231, 255, 0.04);
  border-radius: 50%;
}

.orb__core {
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(255, 229, 187, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 244, 217, 0.16), transparent 16%),
    radial-gradient(circle at 50% 68%, color-mix(in srgb, var(--active-color) 20%, transparent), transparent 70%),
    radial-gradient(circle, rgba(255, 225, 183, 0.05), transparent 66%);
  box-shadow:
    inset 0 0 38px rgba(255, 205, 143, 0.05),
    0 0 34px color-mix(in srgb, var(--active-color) 9%, transparent);
  transition: box-shadow 450ms ease, background 500ms ease;
}

.orb__scan {
  position: absolute;
  inset: 15%;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.4;
}

.orb__scan::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: conic-gradient(from 220deg, transparent 0deg, transparent 292deg, rgba(255, 223, 171, 0.07) 330deg, transparent 360deg);
  transform-origin: 0 100%;
}

.orb.is-active .orb__core {
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, 0.42),
    0 0 42px color-mix(in srgb, var(--active-color) 26%, transparent);
}

.orb.is-active .orb__halo {
  opacity: 1;
}

@keyframes haloBreathe {
  0%, 100% { transform: scale(0.96); opacity: 0.7; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes scanSpin {
  to { transform: rotate(360deg); }
}

/* Ball */
.ball {
  --ball-color: var(--warm);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: 38px;
  height: 38px;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  pointer-events: none;
}

.ball__aura {
  position: absolute;
  inset: -25px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--ball-color) 42%, transparent) 0%, color-mix(in srgb, var(--ball-color) 16%, transparent) 34%, transparent 68%);
  opacity: 0.88;
}

.ball__skin {
  position: absolute;
  inset: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 244, 219, 0.64);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 25%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 245, 218, 0.9) 13%, transparent 31%),
    radial-gradient(circle at 62% 67%, color-mix(in srgb, var(--ball-color) 94%, #fff) 0%, #ffad71 50%, #ed617e 100%);
  box-shadow:
    0 0 17px color-mix(in srgb, var(--ball-color) 55%, transparent),
    0 0 38px rgba(255, 128, 104, 0.24),
    inset -6px -8px 12px rgba(99, 22, 55, 0.36),
    inset 4px 5px 8px rgba(255, 255, 255, 0.28);
  transition: background 300ms ease;
}

.ball__skin::after {
  content: "";
  position: absolute;
  right: 17%;
  bottom: 13%;
  width: 6px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 238, 206, 0.45);
}

.ball.is-hit .ball__skin {
  animation: ballTap 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ball.is-hovering .ball__aura {
  opacity: 1;
}

@keyframes ballAura {
  0%, 100% { transform: scale(0.93); opacity: 0.66; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes ballTap {
  0% { transform: scale(0.88); }
  38% { transform: scale(1.14, 0.9); }
  100% { transform: scale(1); }
}

.core-readout {
  --readout-color: var(--warm);
  position: absolute;
  top: calc(50% + 86px);
  left: 50%;
  z-index: 6;
  width: min(300px, 55%);
  transform: translateX(-50%);
  color: var(--text);
  text-align: center;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.core-readout__eyebrow {
  display: block;
  overflow: hidden;
  color: rgba(203, 210, 230, 0.46);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.core-readout__main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  white-space: nowrap;
}

.core-readout__main strong {
  color: var(--readout-color);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 29px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 0 22px color-mix(in srgb, var(--readout-color) 20%, transparent);
  transition: color 280ms ease, text-shadow 280ms ease;
}

.core-readout__main span {
  overflow: hidden;
  max-width: 230px;
  color: rgba(210, 215, 231, 0.48);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
}

.stage.is-playing .core-readout__eyebrow {
  color: color-mix(in srgb, var(--readout-color) 55%, rgba(203, 210, 230, 0.3));
}

/* Floating canvas -------------------------------------------------------- */
.fx-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Stage state / drop zone ------------------------------------------------ */
.drop-veil {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 14, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.drop-veil.is-visible {
  opacity: 1;
  visibility: visible;
}

.drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 40px;
  border: 1px dashed rgba(255, 214, 151, 0.36);
  border-radius: 22px;
  background: rgba(18, 22, 35, 0.76);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.drop-card__icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 4px;
  place-items: center;
  border: 1px solid rgba(255, 213, 148, 0.24);
  border-radius: 50%;
  color: var(--warm);
  background: rgba(255, 204, 128, 0.06);
}

.drop-card__icon svg {
  width: 24px;
  height: 24px;
}

.drop-card strong {
  font-size: 16px;
  font-weight: 560;
  letter-spacing: 0.03em;
}

.drop-card span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

/* Analysis overlay ------------------------------------------------------- */
.analysis-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 13, 0.8);
}

.analysis-card {
  position: relative;
  width: min(376px, 100%);
  overflow: hidden;
  padding: 28px 28px 22px;
  border: 1px solid rgba(230, 236, 255, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 100% 100% at 50% 0%, rgba(255, 205, 138, 0.075), transparent 66%),
    linear-gradient(155deg, rgba(24, 29, 46, 0.98), rgba(11, 14, 24, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 36px 90px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: cardEnter 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.analysis-card::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 21px;
  left: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}

.analysis-visual {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 20px;
}

.analysis-visual__ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 214, 151, 0.22);
  border-top-color: rgba(255, 210, 139, 0.76);
  border-radius: 50%;
  animation: slowSpin 3.6s linear infinite;
}

.analysis-visual__ring--two {
  inset: 13px;
  border-color: rgba(111, 231, 214, 0.1);
  border-bottom-color: rgba(111, 231, 214, 0.58);
  animation-duration: 2.3s;
  animation-direction: reverse;
}

.analysis-visual__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, #ffd39b 40%, #ff8b78 100%);
  box-shadow: 0 0 28px rgba(255, 192, 117, 0.5);
  transform: translate(-50%, -50%);
}

.analysis-visual__bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.analysis-visual__bars i {
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 221, 170, 0.7);
  animation: analysisBars 900ms ease-in-out infinite alternate;
}

.analysis-visual__bars i:nth-child(1) { height: 7px; animation-delay: -600ms; }
.analysis-visual__bars i:nth-child(2) { height: 12px; animation-delay: -200ms; }
.analysis-visual__bars i:nth-child(3) { height: 17px; animation-delay: -420ms; }
.analysis-visual__bars i:nth-child(4) { height: 11px; animation-delay: -80ms; }
.analysis-visual__bars i:nth-child(5) { height: 6px; animation-delay: -330ms; }

@keyframes analysisBars {
  from { transform: scaleY(0.45); opacity: 0.5; }
  to { transform: scaleY(1.4); opacity: 1; }
}

.analysis-card__kicker {
  display: block;
  color: rgba(255, 215, 155, 0.55);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
}

.analysis-card h2 {
  margin: 7px 0 3px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 450;
  letter-spacing: 0.02em;
}

.analysis-card__file {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-progress {
  height: 3px;
  margin: 24px 2px 9px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.075);
}

.analysis-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67e3d5, #ffd18a 58%, #ff7f8e);
  box-shadow: 0 0 12px rgba(255, 186, 118, 0.38);
  transition: width 300ms ease;
}

.analysis-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
}

.analysis-status strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

.text-button {
  margin-top: 17px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 180ms ease;
}

.text-button:hover {
  color: var(--text);
}

.text-button:disabled {
  opacity: 0.35;
  cursor: default;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Transport -------------------------------------------------------------- */
.transport {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 16px 11px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.035), transparent 36%),
    rgba(13, 17, 28, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 20px 54px rgba(0, 0, 0, 0.24);
}

.play-button {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 229, 190, 0.5);
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe8bd, #ffc37d 52%, #ff9d7a);
  color: #21160e;
  box-shadow:
    0 10px 26px rgba(255, 151, 98, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.play-button:hover:not(:disabled) {
  transform: scale(1.045);
  box-shadow:
    0 12px 32px rgba(255, 151, 98, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.play-button:active:not(:disabled) {
  transform: scale(0.98);
}

.play-button:disabled {
  opacity: 0.28;
  cursor: default;
  box-shadow: none;
}

.play-button svg {
  width: 22px;
  height: 22px;
}

.play-button__pause,
.play-button.is-playing .play-button__play {
  display: none;
}

.play-button.is-playing .play-button__pause {
  display: block;
}

.transport__body {
  min-width: 0;
}

.transport__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
}

.track-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.track-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.track-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 570;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lyric-button {
  flex: none;
  height: 21px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.lyric-button::before {
  content: "♪";
  margin-right: 3px;
  color: var(--warm);
  opacity: 0.75;
}

.lyric-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.lyric-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.track-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.035em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics {
  display: flex;
  flex: none;
  align-items: center;
  gap: 18px;
  padding-top: 1px;
}

.metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.metric span {
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.metric strong {
  color: rgba(234, 236, 243, 0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.timeline {
  position: relative;
  height: 43px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 9px;
  background: rgba(4, 7, 13, 0.52);
  cursor: pointer;
  touch-action: none;
  transition: border-color 180ms ease;
}

.timeline:hover,
.timeline:focus-visible {
  border-color: rgba(255, 255, 255, 0.14);
}

.timeline canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.timeline__grid {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 12.5%
  );
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}

.timeline__played {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-right: 1px solid rgba(255, 218, 158, 0.5);
  background: linear-gradient(90deg, rgba(255, 201, 127, 0.045), rgba(255, 124, 130, 0.09));
  pointer-events: none;
}

.timeline__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(255, 227, 184, 0.82);
  box-shadow: 0 0 10px rgba(255, 193, 115, 0.4);
  pointer-events: none;
}

.timeline__playhead i {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffe3b4;
  box-shadow: 0 0 9px rgba(255, 193, 115, 0.7);
  transform: translateX(-50%);
}

.timeline__hint {
  position: absolute;
  bottom: 5px;
  z-index: 3;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(7, 10, 17, 0.88);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  pointer-events: none;
  transform: translateX(-50%);
}

.timeline.is-seekable {
  cursor: pointer;
}

.timeline:not(.is-seekable) {
  cursor: default;
}

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.timecode {
  min-width: 32px;
  font-variant-numeric: tabular-nums;
}

.timecode:last-child {
  text-align: right;
}

.timeline-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(126, 134, 155, 0.58);
  font-family: var(--font-ui);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.timeline-legend i {
  width: 12px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--warm), var(--coral));
}

.transport__side {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0 4px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.transport__status {
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.volume {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(202, 208, 225, 0.45);
}

.volume svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.volume input {
  width: 68px;
  height: 16px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.volume input::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 207, 138, 0.56), rgba(255, 255, 255, 0.12));
}

.volume input::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.volume input::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: #f8e6c7;
  box-shadow: 0 0 8px rgba(255, 200, 130, 0.36);
}

.volume input::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #f8e6c7;
}

/* Toast ------------------------------------------------------------------ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 100;
  max-width: min(460px, calc(100vw - 32px));
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(18, 22, 35, 0.94);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-color: rgba(255, 119, 135, 0.32);
  color: #ffd9dd;
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  padding: 14px;
  border: 1px solid rgba(255, 119, 135, 0.3);
  border-radius: 12px;
  background: #1a1017;
  color: #ffd9dd;
  text-align: center;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1180px) {
  .tagline {
    display: none;
  }

  .masthead {
    grid-template-columns: 1fr auto;
  }

  .local-badge {
    display: none;
  }
}

@media (max-width: 980px) {
  .app {
    padding: 14px 16px 16px;
  }

  .metrics {
    gap: 12px;
  }

  .transport {
    gap: 13px;
    padding: 12px 13px 10px;
  }

  .transport__side {
    padding-left: 10px;
  }

  .volume input {
    width: 54px;
  }

  .transport__status {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --radius: 20px;
    --orb-size: clamp(94px, 24vw, 116px);
  }

  .app {
    grid-template-rows: auto minmax(520px, 1fr) auto;
    gap: 10px;
    min-height: 100svh;
    padding: 12px 12px max(14px, env(safe-area-inset-bottom));
  }

  .masthead {
    min-height: 42px;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
  }

  .brand__words strong {
    font-size: 17px;
  }

  .brand__words span {
    display: none;
  }

  .button {
    height: 35px;
    padding: 0 12px;
    font-size: 11px;
  }

  .button svg {
    width: 14px;
    height: 14px;
  }

  .button--folder {
    width: 35px;
    padding: 0;
  }

  .button--folder .button__label {
    display: none;
  }

  .stage__meta {
    top: 15px;
    font-size: 7px;
  }

  .stage__meta--left {
    left: 18px;
  }

  .stage__meta--right {
    right: 18px;
  }

  .lyric-ghost__row--current {
    top: 17.5%;
  }

  .lyric-ghost__row--next {
    top: 73%;
  }

  .lyric-ghost__text {
    font-size: clamp(22px, 5.5vw, 34px);
  }

  .lyric-ghost__row--next .lyric-ghost__text {
    font-size: clamp(17px, 4.2vw, 26px);
  }

  .orbit-deco {
    width: clamp(310px, 80vw, 520px);
  }

  .pad {
    border-radius: 13px;
  }

  .pad__top {
    top: 9px;
    right: 10px;
    left: 11px;
  }

  .pad__index {
    font-size: 7px;
  }

  .pad__tag {
    display: none;
  }

  .pad__note {
    bottom: 9px;
    left: 10px;
    font-size: clamp(26px, 7vw, 35px);
  }

  .pad__sub {
    right: 10px;
    bottom: 10px;
    max-width: 50%;
    font-size: 8px;
  }

  .core-readout {
    top: calc(50% + 72px);
    width: min(230px, 46%);
  }

  .core-readout__eyebrow {
    font-size: 7px;
    letter-spacing: 0.16em;
  }

  .core-readout__main {
    gap: 6px;
  }

  .core-readout__main strong {
    font-size: 21px;
  }

  .core-readout__main span {
    max-width: 150px;
    font-size: 9px;
  }

  .transport {
    grid-template-columns: 47px minmax(0, 1fr);
    gap: 11px;
    padding: 11px 12px 9px;
    border-radius: 17px;
  }

  .play-button {
    width: 47px;
    height: 47px;
  }

  .play-button svg {
    width: 19px;
    height: 19px;
  }

  .transport__topline {
    margin-bottom: 6px;
  }

  .track-title {
    font-size: 12.5px;
  }

  .track-sub {
    font-size: 8.5px;
  }

  .lyric-button {
    height: 20px;
    padding: 0 7px;
    font-size: 8px;
  }

  .metrics {
    display: none;
  }

  .transport__side {
    display: none;
  }

  .timeline {
    height: 38px;
  }

  .timeline-meta {
    font-size: 7px;
  }

  .timeline-legend {
    font-size: 7px;
  }

  .drop-card {
    width: min(320px, calc(100% - 24px));
    padding: 27px 20px;
  }

  .analysis-card {
    padding: 24px 22px 18px;
  }

  .stage__corner {
    width: 13px;
    height: 13px;
  }

  .stage__frame {
    inset: 9px;
  }

  .toast {
    bottom: 14px;
  }
}

@media (max-width: 520px) {
  .stage__meta {
    display: none;
  }

  .pad__sub {
    display: none;
  }

  .pad__meter {
    opacity: 0.45;
  }

  .core-readout__main span {
    display: none;
  }

  .core-readout {
    top: calc(50% + 68px);
    width: 118px;
  }

  .core-readout__eyebrow {
    white-space: normal;
  }

  .core-readout__main strong {
    font-size: 22px;
  }

  .orbit-deco {
    width: 84vw;
  }

  .analysis-card h2 {
    font-size: 19px;
  }

  .analysis-visual {
    width: 70px;
    height: 70px;
    margin-bottom: 17px;
  }
}

@media (max-width: 760px) and (max-height: 760px) {
  .app {
    grid-template-rows: auto minmax(480px, 1fr) auto;
  }

  .core-readout {
    display: none;
  }
}

@media (max-width: 380px) {
  .app {
    padding-right: 9px;
    padding-left: 9px;
  }

  .brand__words strong {
    font-size: 16px;
  }

  .masthead__actions {
    gap: 6px;
  }

  .button {
    padding: 0 10px;
    font-size: 10px;
  }

  .button--ghost .button__label {
    display: none;
  }

  .button--ghost {
    width: 35px;
    padding: 0;
  }

  .transport {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .play-button {
    width: 44px;
    height: 44px;
  }

  .timeline-legend {
    display: none;
  }
}

/* Low-power mode is enabled from JS on small screens / low-core devices.
   It removes continuous compositor work and the brightness pulse while
   keeping the static art direction intact. */
.low-power .ambient__glow,
.low-power .orb__halo,
.low-power .orb__ring,
.low-power .orb__scan,
.low-power .ball__aura,
.low-power .orbit-deco__ring--outer {
  animation: none !important;
}

.low-power .ambient__glow {
  opacity: 0.26;
}

.low-power .orb__scan {
  display: none;
}

.low-power .lyric-ghost__row--next {
  display: none;
}

.low-power .lyric-ghost__float {
  animation-duration: 28s;
}

.low-power .pad.is-hit {
  animation: none;
}

.low-power .stage::before {
  opacity: 0.35;
}

.low-power .pad {
  transition-duration: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .lyric-ghost__float {
    animation: none !important;
    transform: none;
  }
}
