:root {
  --bg: #060810;
  --bg-soft: #0b0e18;
  --panel: rgba(15, 18, 29, 0.68);
  --panel-solid: #10131d;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f7fc;
  --muted: #8c94a6;
  --muted-dim: #596173;
  --ps-blue: #4c8dff;
  --p1: #5ee4ff;
  --p1-rgb: 94, 228, 255;
  --p2: #ff70a8;
  --p2-rgb: 255, 112, 168;
  --p3: #baff6c;
  --p3-rgb: 186, 255, 108;
  --p4: #ffb260;
  --p4-rgb: 255, 178, 96;
  --display: "Bahnschrift", "Segoe UI Variable Display", "Arial Narrow", "Microsoft YaHei UI", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button {
  font: inherit;
}

::selection {
  background: rgba(76, 141, 255, 0.45);
  color: #fff;
}

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 43%, transparent 0, transparent 34%, rgba(3, 5, 10, 0.66) 100%),
    linear-gradient(180deg, rgba(6, 8, 16, 0.18), rgba(6, 8, 16, 0.82));
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.65;
  animation: orb-drift 18s ease-in-out infinite alternate;
}

.ambient-orb-blue {
  width: min(58vw, 760px);
  height: min(58vw, 760px);
  left: -16vw;
  top: -22vw;
  background: radial-gradient(circle, rgba(52, 113, 255, 0.36) 0, rgba(30, 71, 175, 0.13) 38%, transparent 70%);
}

.ambient-orb-pink {
  width: min(48vw, 680px);
  height: min(48vw, 680px);
  right: -15vw;
  bottom: -24vw;
  background: radial-gradient(circle, rgba(255, 66, 150, 0.24) 0, rgba(121, 43, 150, 0.11) 42%, transparent 72%);
  animation-delay: -7s;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(136, 160, 210, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136, 160, 210, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 55% 45%, #000 0, rgba(0, 0, 0, 0.55) 38%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 55% 45%, #000 0, rgba(0, 0, 0, 0.55) 38%, transparent 78%);
}

.ambient-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 4px);
  opacity: 0.34;
  mix-blend-mode: soft-light;
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 0 30px 24px;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 80px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}

.brand-mark {
  position: relative;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #dbe7ff;
  border: 1px solid rgba(111, 157, 255, 0.26);
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 20%, rgba(116, 169, 255, 0.23), transparent 56%),
    linear-gradient(145deg, rgba(19, 36, 76, 0.7), rgba(8, 12, 25, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.35);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1;
}

.brand-copy strong span {
  color: var(--ps-blue);
}

.brand-copy small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.29em;
}

.topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: rgba(166, 179, 203, 0.5);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.34em;
  white-space: nowrap;
}

.topbar-rule {
  width: clamp(24px, 6vw, 100px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16));
}

.topbar-rule:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent);
}

.system {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 0 0 auto;
}

.system-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #9fa9bd;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.system-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #61f2b0;
  box-shadow: 0 0 9px rgba(97, 242, 176, 0.8);
  animation: soft-pulse 2.4s ease-in-out infinite;
}

.system-pill.is-error {
  color: #ff9bad;
  border-color: rgba(255, 91, 119, 0.28);
}

.system-pill.is-error i {
  background: #ff5b77;
  box-shadow: 0 0 9px rgba(255, 91, 119, 0.8);
}

.system-count {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--display);
}

.system-count b {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--text);
}

.system-count span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  gap: 26px;
  padding-top: 24px;
}

.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 5px 8px 3px 3px;
}

.intro {
  flex: 0 0 auto;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #7f8ba2;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.27em;
}

.kicker span {
  color: var(--p1);
}

.kicker i {
  width: 35px;
  height: 1px;
  margin-left: 2px;
  background: linear-gradient(90deg, rgba(94, 228, 255, 0.75), transparent);
}

.intro h1 {
  margin: 19px 0 15px;
  font-family: var(--display);
  font-size: clamp(34px, 3.25vw, 47px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.intro h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(100deg, #ffffff 4%, #8fb8ff 52%, #5ee4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(76, 141, 255, 0.22));
}

.lede {
  margin: 0;
  max-width: 270px;
  color: #8a93a5;
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: 0.015em;
}

.channels {
  flex: 0 0 auto;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 45%),
    rgba(11, 14, 23, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  color: #b2bbcd;
  font-family: var(--display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.panel-head > span {
  color: #677185;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.slot {
  position: relative;
  min-height: 43px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s;
}

.slot::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--slot-color, rgba(255, 255, 255, 0.15));
  opacity: 0.9;
}

.slot.is-empty {
  border-style: dashed;
  background: transparent;
  opacity: 0.67;
}

.slot.is-empty::before {
  background: rgba(255, 255, 255, 0.12);
}

.slot.is-live {
  border-color: rgba(var(--slot-rgb), 0.22);
  background: linear-gradient(90deg, rgba(var(--slot-rgb), 0.085), rgba(var(--slot-rgb), 0.015) 68%);
  opacity: 1;
}

.slot-player {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(var(--slot-rgb, 255, 255, 255), 0.18);
  background: rgba(var(--slot-rgb, 255, 255, 255), 0.07);
  color: var(--slot-color, #8992a4);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.slot.is-empty .slot-player {
  color: #6f7789;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.025);
}

.slot-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-copy strong {
  overflow: hidden;
  color: #c7cedb;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot.is-empty .slot-copy strong {
  color: #747d90;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.slot-copy span {
  overflow: hidden;
  color: #5d6678;
  font-size: 8px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot.is-live .slot-copy span {
  color: rgba(var(--slot-rgb), 0.7);
}

.slot-state {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #353c4c;
}

.slot.is-live .slot-state {
  background: var(--slot-color);
  box-shadow: 0 0 10px rgba(var(--slot-rgb), 0.8);
  animation: soft-pulse 2s ease-in-out infinite;
}

.slot-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 11px 1px 0;
  color: #4f5a6d;
  font-size: 7.5px;
  letter-spacing: 0.03em;
}

.slot-note i {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(186, 255, 108, 0.65);
  box-shadow: 0 0 7px rgba(186, 255, 108, 0.4);
}

.wake-card {
  margin-top: auto;
  display: flex;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(94, 228, 255, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 0, rgba(94, 228, 255, 0.09), transparent 55%),
    rgba(10, 15, 25, 0.55);
}

.wake-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #7cd8ff;
  border: 1px solid rgba(94, 228, 255, 0.17);
  background: rgba(94, 228, 255, 0.055);
}

.wake-icon svg {
  width: 25px;
  height: 25px;
}

.wake-card strong {
  display: block;
  margin: 1px 0 5px;
  color: #cbd7ea;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.wake-card p {
  margin: 0;
  color: #6f7a8e;
  font-size: 9.5px;
  line-height: 1.65;
}

.sidebar-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #4d5669;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.sidebar-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #5ee4ff;
  box-shadow: 0 0 7px rgba(94, 228, 255, 0.8);
}

.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 55% 40%, rgba(55, 77, 138, 0.12), transparent 55%),
    linear-gradient(145deg, rgba(17, 22, 37, 0.64), rgba(7, 10, 18, 0.8));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 30px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(94, 228, 255, 0.06), transparent 17%, transparent 83%, rgba(255, 112, 168, 0.05)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 12%);
}

.stage::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -18%;
  width: 18%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(137, 188, 255, 0.045), transparent);
  transform: skewX(-13deg);
  animation: stage-sweep 10s var(--ease) infinite;
}

.stage-head {
  position: relative;
  z-index: 2;
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.stage-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #bbc5d6;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ee4ff;
  box-shadow: 0 0 10px rgba(94, 228, 255, 0.9);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(94, 228, 255, 0.4);
  animation: sonar 2s ease-out infinite;
}

.ghost-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  margin-left: 4px;
  padding: 0 8px;
  border: 1px solid rgba(186, 255, 108, 0.13);
  border-radius: 999px;
  background: rgba(186, 255, 108, 0.035);
  color: rgba(186, 255, 108, 0.66);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.ghost-filter i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.stage-label.has-ghost .ghost-filter {
  border-color: rgba(255, 178, 96, 0.3);
  background: rgba(255, 178, 96, 0.07);
  color: #ffc17d;
}

.stage-label.has-ghost .ghost-filter i {
  animation: soft-pulse 1.2s ease-in-out infinite;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 17px;
  color: #626c80;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.stage-meta b {
  color: #a8b2c4;
  font-weight: 500;
}

.stage-meta .ghost-stat {
  color: rgba(186, 255, 108, 0.58);
}

.stage-meta .ghost-stat b {
  color: #baff6c;
}

.stage-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 8px;
}

.stage-watermark {
  position: absolute;
  right: 24px;
  bottom: 4px;
  z-index: -1;
  color: rgba(255, 255, 255, 0.018);
  font-family: var(--display);
  font-size: clamp(150px, 20vw, 300px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.08em;
  user-select: none;
}

.empty-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 5vw, 86px);
  padding: 12px 5% 20px;
  transition: opacity 0.35s, transform 0.35s;
}

.empty-stage.is-hidden {
  display: none;
}

.empty-pad {
  position: relative;
  width: min(46%, 510px);
  max-height: 100%;
  display: flex;
  align-items: center;
  opacity: 0.52;
  filter: drop-shadow(0 24px 45px rgba(0, 0, 0, 0.5));
  animation: ghost-float 6s ease-in-out infinite;
}

.empty-pad::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse at center, rgba(94, 228, 255, 0.09), transparent 64%);
  pointer-events: none;
}

.empty-pad svg {
  width: 100%;
  height: auto;
  max-height: min(45vh, 430px);
}

.empty-pad .pad-shell {
  fill: rgba(138, 164, 214, 0.035) !important;
  stroke: rgba(154, 190, 255, 0.26) !important;
  stroke-dasharray: 9 7;
  filter: drop-shadow(0 0 8px rgba(94, 228, 255, 0.07));
}

.empty-pad .pad-trigger-visual,
.empty-pad .pad-bumper {
  fill: rgba(138, 164, 214, 0.02) !important;
  stroke: rgba(154, 190, 255, 0.16) !important;
  stroke-dasharray: 7 7;
}

.empty-pad .pad-internals {
  opacity: 0.5;
}

.empty-copy {
  position: relative;
  z-index: 1;
  max-width: 300px;
}

.empty-code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(94, 228, 255, 0.6);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.26em;
}

.empty-code i {
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.empty-copy h2 {
  margin: 13px 0 11px;
  font-family: var(--display);
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.empty-copy p {
  margin: 0 0 22px;
  color: #7b8599;
  font-size: 11px;
  line-height: 1.9;
}

.demo-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 15px 0 9px;
  border: 1px solid rgba(94, 228, 255, 0.2);
  border-radius: 10px;
  background: rgba(94, 228, 255, 0.045);
  color: #a9dff5;
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.24s, border-color 0.24s, transform 0.24s;
}

.demo-button:hover {
  border-color: rgba(94, 228, 255, 0.45);
  background: rgba(94, 228, 255, 0.1);
  transform: translateY(-1px);
}

.demo-button:active {
  transform: translateY(0) scale(0.98);
}

.demo-button-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(94, 228, 255, 0.13);
  color: #8feaff;
}

.demo-button-icon svg {
  width: 13px;
  height: 13px;
}

.pad-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  align-content: center;
  gap: 14px;
}

.pad-grid:empty {
  display: none;
}

.pad-grid[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  padding: 0 4%;
}

.pad-grid[data-count="2"] {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
}

.pad-grid[data-count="2"] .pad-main {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 225px);
}

.pad-grid[data-count="3"] .pad-card:last-child {
  grid-column: span 2;
}

.demo-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 21px;
  padding: 0 5px 0 9px;
  border: 1px solid rgba(255, 178, 96, 0.25);
  border-radius: 999px;
  background: rgba(255, 178, 96, 0.06);
  color: #ffc786;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.demo-indicator span {
  display: grid;
  place-items: center;
  height: 15px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 178, 96, 0.12);
  font-size: 7px;
}

.pad-card {
  --accent: var(--p1);
  --accent-rgb: var(--p1-rgb);
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 22% 30%, rgba(var(--accent-rgb), 0.065), transparent 52%),
    linear-gradient(150deg, rgba(23, 27, 42, 0.82), rgba(9, 12, 20, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 16px 38px rgba(0, 0, 0, 0.26);
  animation: card-in 0.55s var(--ease) both;
  transition: border-color 0.25s, box-shadow 0.25s;
  isolation: isolate;
}

.pad-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent) 28%, rgba(var(--accent-rgb), 0.25) 70%, transparent);
  opacity: 0.8;
}

.pad-card::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -90px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1), transparent 68%);
  pointer-events: none;
}

.pad-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.43);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(var(--accent-rgb), 0.05),
    0 18px 46px rgba(0, 0, 0, 0.32),
    0 0 38px rgba(var(--accent-rgb), 0.08);
}

.pad-card.is-demo {
  border-style: dashed;
}

.pad-card-top {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px 8px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.pad-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.player-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.08);
}

.player-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.pad-name-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pad-name {
  overflow: hidden;
  color: #dce4f1;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pad-port {
  color: #626d82;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.pad-port b {
  color: rgba(var(--accent-rgb), 0.7);
  font-weight: 500;
}

.pad-live {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(var(--accent-rgb), 0.8);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.pad-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(var(--accent-rgb), 0.9);
  animation: soft-pulse 1.8s ease-in-out infinite;
}

.pad-demo-tag {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255, 178, 96, 0.12);
  color: #ffc17d;
  font-family: var(--display);
  font-size: 6px;
  letter-spacing: 0.17em;
}

.pad-main {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 143px;
  gap: 4px;
  padding: 1px 10px 8px 5px;
}

.pad-grid[data-count="1"] .pad-main {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
}

.pad-render {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.pad-render::before {
  content: "";
  position: absolute;
  width: 64%;
  height: 24%;
  left: 18%;
  bottom: 8%;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.13);
  filter: blur(34px);
  opacity: 0.7;
  pointer-events: none;
}

.pad-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: visible;
}

.pad-grid[data-count="1"] .pad-svg {
  max-height: 430px;
}

.pad-readout {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 5px 4px 3px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.055);
}

.last-input {
  min-height: 36px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.last-input > span {
  color: #566176;
  font-family: var(--display);
  font-size: 6.5px;
  letter-spacing: 0.2em;
}

.last-value {
  overflow: hidden;
  color: var(--accent);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.25);
}

.last-value.is-pop {
  animation: value-pop 0.28s var(--ease);
}

.last-sub {
  overflow: hidden;
  color: #515c70;
  font-family: var(--display);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readout-sticks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.readout-stick {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.stick-scope {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 50%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) center / 100% 50% no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) center / 50% 100% no-repeat,
    rgba(0, 0, 0, 0.12);
}

.stick-scope::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.stick-scope i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(var(--accent-rgb), 0.65);
  transform: translate(calc(var(--x, 0) * 9px), calc(var(--y, 0) * 9px));
  transition: transform 0.06s linear;
}

.stick-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stick-copy span {
  color: #717c91;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.stick-copy b {
  overflow: hidden;
  color: #9ba7bc;
  font-family: var(--display);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trigger-readout {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trigger-row {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 6px;
}

.trigger-row span {
  color: #717c91;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.trigger-row b {
  color: #8793a9;
  font-family: var(--display);
  font-size: 7px;
  font-weight: 400;
  text-align: right;
}

.trigger-bar {
  position: relative;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.trigger-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v, 0) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.3), var(--accent));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
  transition: width 0.05s linear;
}

.pad-mapping {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #4d586c;
  font-family: var(--display);
  font-size: 6px;
  letter-spacing: 0.12em;
}

.pad-mapping::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.55);
}

.stage-foot {
  position: relative;
  z-index: 2;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: #4c5669;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.stage-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.signal-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 9px;
}

.signal-bars b {
  width: 1.5px;
  background: #4c5669;
  border-radius: 2px;
}

.signal-bars b:nth-child(1) { height: 3px; }
.signal-bars b:nth-child(2) { height: 5px; }
.signal-bars b:nth-child(3) { height: 7px; }
.signal-bars b:nth-child(4) { height: 9px; }

.signal-bars.is-live b {
  background: #5ee4ff;
  box-shadow: 0 0 5px rgba(94, 228, 255, 0.45);
}

.signal-bars.is-live b:nth-child(1) { animation: signal 1.3s ease-in-out infinite; }
.signal-bars.is-live b:nth-child(2) { animation: signal 1.3s ease-in-out 0.1s infinite; }
.signal-bars.is-live b:nth-child(3) { animation: signal 1.3s ease-in-out 0.2s infinite; }
.signal-bars.is-live b:nth-child(4) { animation: signal 1.3s ease-in-out 0.3s infinite; }

.toasts {
  position: fixed;
  z-index: 20;
  right: 28px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(var(--toast-rgb, 94, 228, 255), 0.22);
  border-radius: 11px;
  background: rgba(12, 16, 27, 0.92);
  color: #c7d1e1;
  font-size: 10px;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  animation: toast-in 0.35s var(--ease) both;
}

.toast::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgb(var(--toast-rgb, 94, 228, 255));
  box-shadow: 0 0 9px rgba(var(--toast-rgb, 94, 228, 255), 0.8);
}

.toast.is-leaving {
  animation: toast-out 0.3s ease forwards;
}

.toast b {
  color: #f1f5fc;
  font-weight: 600;
}

/* Controller SVG */

.pad-svg .pad-trigger-visual,
.pad-svg .pad-bumper {
  transition: transform 0.08s linear, fill 0.18s, stroke 0.18s, filter 0.18s;
}

.pad-svg .pad-trigger-visual {
  transform: translateY(var(--press-y, 0px));
}

.pad-svg .pad-trigger.is-pressed .pad-trigger-visual {
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.4));
}

.pad-svg .pad-trigger.is-pressed .pad-trigger-visual path:first-child {
  fill: rgba(var(--accent-rgb), 0.46);
  stroke: var(--accent);
}

.pad-svg .pad-bumper.is-pressed {
  transform: translateY(3px);
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.34));
}

.pad-svg .pad-bumper.is-pressed path:first-child {
  fill: rgba(var(--accent-rgb), 0.72);
  stroke: var(--accent);
}

.pad-svg .pad-touchpad {
  transition: transform 0.1s, filter 0.18s;
}

.pad-svg .pad-touchpad.is-pressed {
  transform: translateY(2px);
  filter: brightness(1.3);
}

.pad-svg .pad-touchpad .touchpad-glow {
  transition: opacity 0.15s, filter 0.15s;
}

.pad-svg .pad-touchpad.is-pressed .touchpad-glow,
.pad-svg .pad-card.is-active .touchpad-glow {
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.8));
}

.pad-svg .btn-visual {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.08s var(--ease), filter 0.15s;
}

.pad-svg .face-btn .btn-base,
.pad-svg .ps-btn .ps-base,
.pad-svg .pill-btn .pill-base,
.pad-svg .dpad-key .dpad-base {
  transition: fill 0.12s, stroke 0.12s, filter 0.15s;
}

.pad-svg .face-btn.is-pressed .btn-visual {
  transform: scale(0.9);
}

.pad-svg .face-btn.is-pressed .btn-base {
  fill: var(--accent);
  stroke: var(--accent);
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.65));
}

.pad-svg .face-btn .btn-icon {
  transition: stroke 0.12s, fill 0.12s;
}

.pad-svg .face-btn.is-pressed .btn-icon {
  stroke: #08101d !important;
  fill: #08101d !important;
}

.pad-svg .dpad-key .dpad-visual {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.08s var(--ease);
}

.pad-svg .dpad-key.is-pressed .dpad-visual {
  transform: scale(0.91);
}

.pad-svg .dpad-key.is-pressed .dpad-base {
  fill: var(--accent);
  stroke: var(--accent);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.55));
}

.pad-svg .dpad-key.is-pressed .dpad-arrow {
  fill: #08101d;
}

.pad-svg .ps-btn .btn-visual,
.pad-svg .pill-btn .btn-visual {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.08s var(--ease);
}

.pad-svg .ps-btn.is-pressed .btn-visual,
.pad-svg .pill-btn.is-pressed .btn-visual {
  transform: scale(0.88);
}

.pad-svg .ps-btn.is-pressed .ps-base {
  fill: var(--accent);
  stroke: var(--accent);
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.6));
}

.pad-svg .ps-btn.is-pressed .ps-glyph {
  fill: #08101d;
}

.pad-svg .pill-btn.is-pressed .pill-base {
  fill: var(--accent);
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.5));
}

.pad-svg .pill-btn.is-pressed .pill-glyph {
  stroke: #08101d;
}

.pad-svg .stick-ring {
  transition: stroke 0.15s, opacity 0.15s;
}

.pad-svg .stick.is-active .stick-ring-accent {
  opacity: 0.85;
}

.pad-svg .stick.is-clicked .stick-cap-body {
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.6));
}

.pad-svg .stick-cap {
  transition: transform 0.05s linear;
}

.pad-svg .player-etch {
  transition: fill 0.2s;
}

.pad-svg .lightbar {
  animation: lightbar-breathe 3.5s ease-in-out infinite;
}

/* Responsive */


@media (min-width: 981px) {
  body {
    overflow: hidden;
  }

  .app {
    height: 100vh;
    overflow: hidden;
  }

  .sidebar {
    overflow-y: auto;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 1240px) {
  .layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
  }

  .sidebar {
    gap: 16px;
  }

  .intro h1 {
    font-size: 37px;
  }

  .pad-main {
    grid-template-columns: minmax(0, 1fr) 128px;
  }

  .topbar-center {
    display: none;
  }
}

@media (max-width: 980px) {
  .app {
    padding: 0 18px 20px;
  }

  .topbar {
    height: 70px;
  }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 18px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(270px, 1fr);
    align-items: start;
    gap: 18px;
    padding: 0;
  }

  .intro {
    grid-row: span 2;
    padding-top: 4px;
  }

  .intro h1 {
    font-size: clamp(34px, 5.8vw, 48px);
  }

  .lede {
    max-width: 420px;
  }

  .channels {
    grid-column: 2;
    grid-row: 1;
  }

  .wake-card {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }

  .sidebar-foot {
    display: none;
  }

  .stage {
    min-height: 620px;
  }

  .pad-grid {
    grid-auto-rows: minmax(250px, auto);
  }
}

@media (max-width: 760px) {
  .app {
    padding: 0 14px 18px;
  }

  .topbar {
    height: 64px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand-mark svg {
    width: 28px;
    height: 28px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    font-size: 6.5px;
    letter-spacing: 0.22em;
  }

  .system-pill {
    display: none;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .intro h1 {
    margin-top: 16px;
  }

  .channels,
  .wake-card {
    width: 100%;
  }

  .stage {
    min-height: 0;
  }

  .stage-head {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 9px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .stage-meta {
    gap: 12px;
    font-size: 7px;
  }

  .ghost-filter {
    display: none;
  }

  .stage-body {
    padding: 10px 10px 8px;
  }

  .pad-grid,
  .pad-grid[data-count="1"],
  .pad-grid[data-count="2"] {
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .pad-grid[data-count="3"] .pad-card:last-child {
    grid-column: auto;
  }

  .pad-card {
    flex: 0 0 auto;
    min-height: 290px;
  }

  .pad-grid[data-count="1"] .pad-card {
    min-height: 320px;
  }

  .pad-main,
  .pad-grid[data-count="1"] .pad-main,
  .pad-grid[data-count="2"] .pad-main {
    grid-template-columns: minmax(0, 1fr) 125px;
  }

  .pad-svg,
  .pad-grid[data-count="1"] .pad-svg {
    max-height: 250px;
  }

  .empty-stage {
    flex-direction: column;
    gap: 6px;
    padding: 20px 18px 30px;
    text-align: center;
  }

  .empty-pad {
    width: min(84%, 430px);
  }

  .empty-pad svg {
    max-height: 250px;
  }

  .empty-copy {
    max-width: 330px;
  }

  .empty-copy h2 {
    font-size: 30px;
  }

  .empty-copy p {
    margin-bottom: 18px;
  }

  .stage-foot {
    padding: 0 14px;
    font-size: 6px;
    gap: 8px;
  }

  .stage-foot > span:nth-child(2) {
    display: none;
  }

  .toasts {
    left: 14px;
    right: 14px;
    bottom: 16px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .topbar-center,
  .system {
    gap: 8px;
  }

  .system-count b {
    font-size: 22px;
  }

  .intro h1 {
    font-size: 33px;
  }

  .lede {
    font-size: 11px;
  }

  .stage-meta > span:first-child {
    display: none;
  }

  .pad-main,
  .pad-grid[data-count="1"] .pad-main,
  .pad-grid[data-count="2"] .pad-main {
    grid-template-columns: minmax(0, 1fr) 110px;
    padding-right: 8px;
  }

  .pad-readout {
    gap: 8px;
    padding-left: 8px;
  }

  .stick-copy b {
    font-size: 6.5px;
  }

  .pad-svg,
  .pad-grid[data-count="1"] .pad-svg {
    max-height: 210px;
  }

  .stage-foot > span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes orb-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

@keyframes stage-sweep {
  0%, 68% { transform: translateX(0) skewX(-13deg); opacity: 0; }
  74% { opacity: 1; }
  92% { transform: translateX(780%) skewX(-13deg); opacity: 0.5; }
  100% { transform: translateX(780%) skewX(-13deg); opacity: 0; }
}

@keyframes soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; }
}

@keyframes sonar {
  0% { transform: scale(0.55); opacity: 0.8; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}

@keyframes ghost-float {
  0%, 100% { transform: translateY(0) rotate(-0.25deg); }
  50% { transform: translateY(-9px) rotate(0.25deg); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes value-pop {
  0% { transform: translateY(3px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}

@keyframes signal {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes lightbar-breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
