:root {
  color-scheme: dark;
  --vs-bg: #0a0a0c;
  --vs-panel: #151519;
  --vs-panel-2: #1c1c22;
  --vs-line: #373740;
  --vs-text: #f4f4ef;
  --vs-muted: #a9a9b2;
  --vs-cyan: #59e7e7;
  --vs-pink: #ff2f70;
  --vs-yellow: #ffe14d;
  --vs-green: #70e88f;
  --vs-pad: #222229;
  --vs-danger: #ff765f;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--vs-bg);
  color: var(--vs-text);
  font-family: Inter, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--vs-bg);
  color: var(--vs-text);
}

button,
input,
select {
  font: inherit;
}

button,
label,
select,
input[type="range"] {
  touch-action: manipulation;
}

a {
  color: inherit;
}

.vs-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 58px;
  border-bottom: 1px solid var(--vs-line);
  background: rgba(10, 10, 12, 0.96);
}

.vs-topbar__back {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--vs-line);
  color: var(--vs-cyan);
  font-size: 32px;
  line-height: 1;
  text-decoration: none;
}

.vs-topbar__brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
}

.vs-topbar__brand strong {
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vs-topbar__brand span,
.vs-topbar__nav a {
  color: var(--vs-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.vs-topbar__nav {
  display: flex;
  align-items: stretch;
}

.vs-topbar__nav a {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--vs-line);
  padding: 0 18px;
  text-decoration: none;
}

.vs-topbar a:hover,
.vs-topbar a:focus-visible {
  color: var(--vs-yellow);
}

html.vs-windows-app .vs-topbar {
  grid-template-columns: 1fr;
}

html.vs-windows-app .vs-topbar__back,
html.vs-windows-app .vs-topbar__nav,
html.vs-windows-app .vs-footer {
  display: none;
}

html.vs-windows-app .vs-topbar__brand {
  justify-content: space-between;
}

html.vs-windows-app .vs-topbar__brand::after {
  content: "WINDOWS / STREAM MODE";
  color: var(--vs-yellow);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

html.vs-windows-app .vs-shell {
  width: min(1680px, calc(100% - 40px));
}

.vs-shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.vs-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: 32px;
  margin-bottom: 26px;
}

.vs-kicker {
  margin: 0 0 8px;
  color: var(--vs-pink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.vs-intro h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 66px);
  line-height: 0.96;
  letter-spacing: 0;
}

.vs-lead {
  max-width: 760px;
  margin: 14px 0 0;
  color: #d1d1d7;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
}

.vs-local-note {
  margin: 0;
  border-left: 3px solid var(--vs-green);
  padding: 12px 0 12px 16px;
  color: var(--vs-muted);
  font-size: 12px;
  line-height: 1.7;
}

.vs-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(330px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

.vs-stage-panel,
.vs-inspector,
.vs-pads-section,
.vs-master {
  border: 1px solid var(--vs-line);
  background: var(--vs-panel);
}

.vs-stage-panel {
  min-width: 0;
  padding: 14px;
}

.vs-inspector {
  min-width: 0;
  padding: 14px;
}

.vs-panel-head {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.vs-panel-head h2 {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.2;
}

.vs-panel-head span {
  overflow: hidden;
  color: var(--vs-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vs-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  overflow: hidden;
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 1px solid #4a4a53;
  outline: 0;
  background: #050506;
}

.vs-stage:focus-visible {
  border-color: var(--vs-cyan);
  box-shadow: inset 0 0 0 2px var(--vs-cyan);
}

.vs-stage img {
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vs-stage.is-contain img {
  object-fit: contain;
}

.vs-stage.is-fill img {
  object-fit: fill;
}

.vs-stage.is-blackout img,
.vs-stage.is-blackout .vs-stage__empty,
.vs-stage.is-blackout .vs-stage__name,
.vs-stage.is-blackout .vs-stage__pad {
  visibility: hidden;
}

.vs-stage__empty {
  display: grid;
  min-height: 100%;
  place-content: center;
  gap: 12px;
  text-align: center;
}

.vs-stage__empty strong {
  color: #4b4b55;
  font-size: clamp(18px, 3vw, 42px);
}

.vs-stage__empty span {
  color: #393942;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.vs-stage__flash {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: var(--vs-yellow);
  opacity: 0;
}

.vs-stage__pad,
.vs-stage__name {
  position: absolute;
  z-index: 4;
  bottom: 12px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  text-shadow: 0 1px 4px #000;
}

.vs-stage__pad {
  left: 12px;
  color: var(--vs-cyan);
}

.vs-stage__name {
  right: 12px;
  max-width: 62%;
  overflow: hidden;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vs-stage.is-fade img {
  animation: vs-fade-in 260ms ease-out;
}

.vs-stage.is-punch img {
  animation: vs-punch-in 260ms cubic-bezier(0.18, 0.82, 0.22, 1);
}

.vs-stage.is-flash .vs-stage__flash {
  animation: vs-flash 170ms steps(2, end);
}

@keyframes vs-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes vs-punch-in {
  from {
    opacity: 0.45;
    transform: scale(1.12);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes vs-flash {
  0% { opacity: 0.86; }
  100% { opacity: 0; }
}

.vs-stage-actions,
.vs-clear-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.vs-button,
.vs-load-button {
  min-height: 38px;
  border: 1px solid #4c4c57;
  border-radius: 2px;
  background: #202026;
  color: var(--vs-text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.vs-button {
  padding: 0 14px;
}

.vs-button:hover,
.vs-button:focus-visible,
.vs-load-button:hover,
.vs-load-button:focus-within {
  border-color: var(--vs-cyan);
  color: var(--vs-cyan);
  outline: 0;
}

.vs-button--primary {
  border-color: var(--vs-cyan);
  color: var(--vs-cyan);
}

.vs-button--danger {
  border-color: #79453f;
  color: var(--vs-danger);
}

.vs-button.is-active {
  border-color: var(--vs-yellow);
  background: var(--vs-yellow);
  color: #111;
}

.vs-load-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vs-load-button {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 12px 8px;
  border-color: var(--vs-cyan);
  color: var(--vs-cyan);
}

.vs-load-button--image {
  border-color: var(--vs-pink);
  color: #ff7da4;
}

.vs-load-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.vs-auto-assign {
  display: grid;
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid #45454f;
  padding: 0 10px;
  color: var(--vs-text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.vs-auto-assign span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vs-auto-assign small {
  overflow: hidden;
  color: #8f8f99;
  font-size: 7px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vs-auto-assign input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--vs-pink);
}

.vs-auto-assign strong {
  min-width: 18px;
  color: var(--vs-green);
  font-size: 9px;
  text-align: right;
}

.vs-auto-assign:has(input:not(:checked)) strong {
  color: #8f8f99;
}

.vs-file-state {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 14px;
}

.vs-file-state span {
  min-width: 0;
  border: 1px solid #303038;
  background: #111114;
  padding: 9px;
}

.vs-file-state small,
.vs-file-state strong {
  display: block;
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, monospace;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vs-file-state small {
  margin-bottom: 4px;
  color: #777781;
  font-size: 8px;
}

.vs-file-state strong {
  color: #dcdce2;
  font-size: 9px;
}

.vs-control-grid,
.vs-master-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vs-control {
  min-width: 0;
}

.vs-control > label,
.vs-mode legend {
  display: flex;
  min-height: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: #a8a8b1;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.vs-control output {
  color: var(--vs-yellow);
}

.vs-control input[type="text"],
.vs-control select {
  width: 100%;
  height: 38px;
  border: 1px solid #45454f;
  border-radius: 0;
  outline: 0;
  background: #101013;
  color: var(--vs-text);
  padding: 0 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.vs-control input[type="text"]:focus,
.vs-control select:focus {
  border-color: var(--vs-cyan);
}

.vs-control input[type="range"] {
  width: 100%;
  height: 30px;
  margin: 0;
  accent-color: var(--vs-cyan);
}

.vs-mode {
  min-width: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.vs-segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2px;
}

.vs-segmented label {
  min-width: 0;
  cursor: pointer;
}

.vs-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vs-segmented span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid #45454f;
  border-right: 0;
  background: #101013;
  color: #a4a4ad;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.vs-segmented label:last-child span {
  border-right: 1px solid #45454f;
}

.vs-segmented input:checked + span {
  border-color: var(--vs-pink);
  background: var(--vs-pink);
  color: #fff;
}

.vs-segmented input:focus-visible + span {
  outline: 2px solid var(--vs-yellow);
  outline-offset: -2px;
}

.vs-clear-actions .vs-button {
  flex: 1 1 90px;
  padding-inline: 8px;
}

.vs-status {
  min-height: 34px;
  margin: 12px 0 0;
  border-top: 1px solid #303038;
  padding-top: 10px;
  color: var(--vs-muted);
  font-size: 11px;
  line-height: 1.6;
}

.vs-pads-section,
.vs-master {
  margin-top: 14px;
  padding: 14px;
}

.vs-pad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.vs-pad {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1.65 / 1;
  border: 1px solid #44444e;
  border-radius: 3px;
  background: var(--vs-pad);
  color: var(--vs-text);
  cursor: pointer;
  text-align: left;
}

.vs-pad::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(8, 8, 10, 0.5);
  content: "";
}

.vs-pad:hover,
.vs-pad:focus-visible {
  border-color: var(--pad-accent);
  outline: 0;
}

.vs-pad.is-selected {
  border-color: var(--pad-accent);
  box-shadow: inset 0 0 0 2px var(--pad-accent);
}

.vs-pad.is-playing {
  background: var(--pad-accent);
  color: #08080a;
  transform: translateY(1px);
}

.vs-pad.is-playing::after {
  background: rgba(255, 255, 255, 0.24);
}

.vs-pad.is-drop-target {
  border-color: var(--vs-yellow);
  box-shadow: inset 0 0 0 3px var(--vs-yellow);
}

.vs-pad__image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vs-pad__key,
.vs-pad__number,
.vs-pad__name,
.vs-pad__media {
  position: absolute;
  z-index: 2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 800;
}

.vs-pad__key {
  top: 9px;
  left: 10px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--pad-accent);
  color: var(--pad-accent);
  font-size: 11px;
}

.vs-pad__number {
  top: 11px;
  right: 10px;
  color: #c0c0c8;
  font-size: 9px;
}

.vs-pad__name {
  right: 10px;
  bottom: 11px;
  left: 10px;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vs-pad__media {
  right: 10px;
  bottom: 31px;
  color: #c0c0c8;
  font-size: 8px;
}

.vs-pad.is-playing .vs-pad__key,
.vs-pad.is-playing .vs-pad__number,
.vs-pad.is-playing .vs-pad__media {
  border-color: #08080a;
  color: #08080a;
}

.vs-master-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr)) minmax(150px, 0.85fr);
  align-items: end;
}

.vs-toggle {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #45454f;
  padding: 0 12px;
  color: #b7b7c0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.vs-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--vs-pink);
}

.vs-footer {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--vs-line);
  padding: 0 max(20px, calc((100% - 1480px) / 2));
  color: #777781;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.vs-footer a {
  color: var(--vs-cyan);
  text-decoration: none;
}

.vs-footer nav {
  display: flex;
  gap: 18px;
}

:fullscreen.vs-stage,
.vs-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
}

@media (max-width: 1040px) {
  .vs-workspace {
    grid-template-columns: 1fr;
  }

  .vs-master-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .vs-topbar {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .vs-topbar__brand {
    display: grid;
    gap: 2px;
    padding: 8px 12px;
  }

  .vs-topbar__nav {
    display: none;
  }

  .vs-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 22px;
  }

  .vs-intro {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .vs-intro h1 {
    font-size: clamp(30px, 10vw, 48px);
  }

  .vs-lead {
    font-size: 14px;
  }

  .vs-local-note {
    padding-block: 8px;
  }

  .vs-stage-panel,
  .vs-inspector,
  .vs-pads-section,
  .vs-master {
    padding: 10px;
  }

  .vs-pad-grid {
    gap: 5px;
  }

  .vs-pad {
    aspect-ratio: 1.18 / 1;
  }

  .vs-pad__key {
    top: 6px;
    left: 6px;
    width: 23px;
    height: 23px;
  }

  .vs-pad__number {
    top: 8px;
    right: 6px;
  }

  .vs-pad__name {
    right: 6px;
    bottom: 7px;
    left: 6px;
    font-size: 9px;
  }

  .vs-pad__media {
    display: none;
  }

  .vs-master-grid {
    grid-template-columns: 1fr 1fr;
  }

  .vs-footer {
    min-height: 56px;
    padding-inline: 12px;
  }
}

@media (max-width: 440px) {
  .vs-control-grid {
    grid-template-columns: 1fr;
  }

  .vs-master-grid {
    grid-template-columns: 1fr;
  }

  .vs-stage-actions .vs-button {
    flex: 1 1 115px;
    padding-inline: 8px;
  }

  .vs-panel-head {
    align-items: flex-start;
    gap: 8px;
  }

  .vs-panel-head span {
    max-width: 54%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vs-stage.is-fade img,
  .vs-stage.is-punch img,
  .vs-stage.is-flash .vs-stage__flash {
    animation-duration: 1ms;
  }
}
