:root {
  --black: #000;
  --white: #fff;
  --window: #efefef;
  --grey: #c0c0c0;
  --dark-grey: #808080;
  --inactive: #848484;
  --purple-a: #666699;
  --purple-b: #555588;
  --title-blue: #ceceff;
  --font-chicago: Chicago, "ChicagoFLF", Charcoal, Monaco, "Courier New", monospace;
  --font-geneva: Geneva, "GenevaOrMonaco", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
}

body {
  color: var(--black);
  background: var(--purple-a);
  font-family: var(--font-chicago);
  font-size: 11px;
  -webkit-font-smoothing: none;
  user-select: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

#desktop {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--purple-a);
  background-image:
    linear-gradient(45deg, var(--purple-b) 25%, transparent 25%),
    linear-gradient(-45deg, var(--purple-b) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--purple-b) 75%),
    linear-gradient(-45deg, transparent 75%, var(--purple-b) 75%);
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
  background-size: 4px 4px;
}

#menubar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10000;
  display: flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-bottom: 1px solid var(--black);
  background: var(--white);
  font-size: 11px;
}

.apple-mark {
  position: relative;
  width: 13px;
  height: 15px;
  margin-right: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.apple-mark::before {
  position: absolute;
  left: 2px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 45% 45% 48% 48%;
  background: var(--black);
  content: "";
}

.apple-mark::after {
  position: absolute;
  left: 8px;
  top: 1px;
  width: 4px;
  height: 4px;
  border-radius: 100% 0;
  background: var(--black);
  content: "";
}

.menu-item {
  position: relative;
  height: 19px;
  padding: 1px 10px 0;
  border: 0;
  background: transparent;
  cursor: default;
  font-weight: bold;
  line-height: 18px;
}

.menu-item:hover,
.menu-item.open,
.apple-mark:hover {
  background: var(--black);
  color: var(--white);
}

.dropdown {
  position: absolute;
  top: 19px;
  left: 0;
  display: none;
  min-width: 170px;
  padding: 2px 0;
  border: 1px solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
  background: var(--white);
  color: var(--black);
  font-weight: normal;
  text-align: left;
}

.menu-item.open .dropdown {
  display: block;
}

.dropdown-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 14px;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: var(--black);
  color: var(--white);
}

.dropdown-item.disabled {
  color: var(--inactive);
}

.dropdown-item.disabled:hover {
  background: transparent;
  color: var(--inactive);
}

.dropdown-sep {
  display: block;
  height: 1px;
  margin: 2px 0;
  background: var(--black);
}

#desktop-workspace {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: 20px;
}

.desktop-icon-grid {
  position: fixed;
  top: 30px;
  right: 15px;
  z-index: 5;
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 84px;
}

.desktop-icon,
.desktop-trash {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 84px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  text-align: center;
}

.desktop-icon:hover .icon-label,
.desktop-icon:focus-visible .icon-label {
  background: var(--black);
  color: var(--white);
}

.icon-art,
.folder-art {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 2px;
  image-rendering: pixelated;
}

.goose-art {
  padding: 2px;
  border: 1px solid var(--black);
  background: var(--white);
}

.loop-station-art {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 2px;
  border: 2px solid var(--black);
  background: var(--white);
}

.loop-station-art::before,
.loop-station-art::after {
  position: absolute;
  top: 8px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: var(--grey);
  content: "";
}

.loop-station-art::before {
  left: 2px;
}

.loop-station-art::after {
  right: 2px;
}

.loop-station-art span,
.loop-station-art i {
  position: absolute;
  top: 14px;
  z-index: 1;
  display: block;
  width: 8px;
  height: 3px;
  background: var(--black);
}

.loop-station-art span {
  left: 8px;
}

.loop-station-art i {
  right: 8px;
}

.folder-art {
  position: relative;
  margin-top: 4px;
  border: 2px solid var(--black);
  background: var(--grey);
}

.folder-art::before {
  position: absolute;
  left: 3px;
  top: -7px;
  width: 15px;
  height: 6px;
  border: 2px solid var(--black);
  border-bottom: 0;
  background: var(--grey);
  content: "";
}

.folder-art::after {
  position: absolute;
  inset: 5px 5px 5px 7px;
  border: 1px solid var(--dark-grey);
  content: "";
}

.icon-label {
  max-width: 82px;
  padding: 0 2px;
  color: var(--white);
  font-family: var(--font-geneva);
  font-size: 9px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 1px var(--black);
}

.window {
  position: absolute;
  z-index: 100;
  min-width: 200px;
  border: 1px solid var(--dark-grey);
  border-right-width: 2px;
  border-bottom-width: 2px;
  background: var(--white);
}

.window.focused {
  border-color: var(--black);
}

#player-window {
  top: 50px;
  left: 30px;
  width: 520px;
}

#image-window {
  top: 90px;
  left: 570px;
  width: 340px;
}

#loop-window {
  top: 34px;
  left: 18px;
  width: min(940px, calc(100vw - 130px));
}

#tape-mixer-window {
  top: 34px;
  left: 24px;
  width: min(1000px, calc(100vw - 150px));
  height: min(620px, calc(100vh - 88px));
  overflow: hidden;
}

#tape-mixer-frame {
  display: block;
  width: 100%;
  height: calc(100% - 17px);
  border: 0;
  background: #bdbdb8;
}

.dev-sticker {
  position: absolute;
  z-index: 3;
  top: 1px;
  right: 22px;
  height: 14px;
  padding: 0 4px;
  border: 1px solid var(--black);
  background: #ffe86a;
  color: var(--black);
  font-family: var(--font-geneva);
  font-size: 8px;
  font-weight: bold;
  line-height: 12px;
  letter-spacing: .03em;
  transform: rotate(-1deg);
  box-shadow: 1px 1px 0 var(--black);
  white-space: nowrap;
}

#loop-window > .title-bar,
#loop-window > .status-bar {
  display: none;
}

.window.hidden {
  display: none;
}

.loop-drawer.hidden,
.studio-alert.hidden,
.drive-link.hidden {
  display: none;
}

.title-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 17px;
  padding: 0 4px;
  border-bottom: 1px solid var(--black);
  background: repeating-linear-gradient(to bottom, var(--window) 0, var(--window) 1px, var(--black) 1px, var(--black) 2px);
  cursor: grab;
  touch-action: none;
}

.title-bar:active {
  cursor: grabbing;
}

.title-text {
  position: absolute;
  left: 50%;
  max-width: calc(100% - 60px);
  padding: 0 7px;
  transform: translateX(-50%);
  background: var(--window);
  font-size: 11px;
  font-weight: bold;
  line-height: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-box,
.zoom-box {
  position: relative;
  z-index: 2;
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid var(--black);
  background: var(--window);
  cursor: pointer;
}

.zoom-box {
  margin-left: auto;
}

.zoom-box::after {
  position: absolute;
  inset: 2px;
  border: 1px solid var(--black);
  content: "";
}

.close-box:active,
.zoom-box:active {
  background: var(--black);
}

.player-body {
  padding: 10px;
  background: var(--white);
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.track-name {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-display {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 2px 6px;
  border: 1px solid var(--dark-grey);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  background: var(--window);
  font-family: var(--font-geneva);
  font-size: 10px;
  text-align: center;
}

.waveform-container {
  position: relative;
  display: block;
  width: 100%;
  height: 90px;
  margin: 0 0 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--dark-grey);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  background: var(--white);
  cursor: pointer;
}

#waveform-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.played-region {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(206, 206, 255, 0.25);
  pointer-events: none;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: none;
  width: 1px;
  background: var(--black);
  pointer-events: none;
}

.transport {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sys7-btn {
  padding: 3px 10px;
  border: 1px solid var(--black);
  border-top-color: var(--white);
  border-left-color: var(--white);
  background: var(--grey);
  cursor: pointer;
  font-family: var(--font-chicago);
  font-size: 10px;
  white-space: nowrap;
}

.sys7-btn:active,
.cs-btn:active {
  border-top-color: var(--black);
  border-left-color: var(--black);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  background: #a0a0a0;
}

.sys7-btn:disabled,
.cs-btn:disabled {
  color: var(--inactive);
  cursor: default;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  font-family: var(--font-geneva);
  font-size: 9px;
}

.vol-label {
  color: var(--inactive);
}

#volume-control {
  width: 70px;
  height: 8px;
  accent-color: var(--black);
}

.load-area {
  display: flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 10px;
  border-top: 1px solid var(--dark-grey);
  background: var(--window);
}

.load-hint,
.status-bar {
  color: #555;
  font-family: var(--font-geneva);
  font-size: 9px;
}

.track-list {
  max-height: 254px;
  overflow: auto;
  background: var(--white);
}

.track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 26px;
  border-bottom: 1px solid var(--dark-grey);
}

.track-row.active {
  background: var(--title-blue);
}

.track-select {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 3px 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.track-select:hover,
.track-select:focus-visible {
  outline: 1px dotted var(--black);
  outline-offset: -2px;
}

.track-number {
  font-family: var(--font-geneva);
  font-size: 9px;
  text-align: right;
}

.track-title {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-duration {
  font-family: var(--font-geneva);
  font-size: 9px;
  text-align: right;
}

.track-download {
  align-self: center;
  margin-right: 6px;
  padding: 2px 6px;
  border: 1px solid var(--black);
  border-top-color: var(--white);
  border-left-color: var(--white);
  background: var(--grey);
  color: var(--black);
  font-family: var(--font-geneva);
  font-size: 9px;
  text-decoration: none;
}

.track-download:active {
  background: var(--black);
  color: var(--white);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
  padding: 3px 8px;
  border-top: 1px solid var(--dark-grey);
  background: var(--window);
}

.image-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 6px;
  background: var(--white);
}

#artwork-image {
  display: block;
  width: 100%;
  max-height: 380px;
  border: 1px solid var(--black);
  object-fit: contain;
}

.image-placeholder {
  padding: 30px;
  color: var(--inactive);
  font-family: var(--font-geneva);
  font-size: 9px;
  text-align: center;
}

.loop-body {
  padding: 9px;
  background: var(--white);
}

.loop-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--black);
}

.loop-heading strong,
.loop-heading span {
  display: block;
}

.loop-heading strong {
  font-size: 10px;
}

.loop-heading span:not(.loop-reel) {
  margin-top: 3px;
  color: #555;
  font-family: var(--font-geneva);
  font-size: 9px;
}

.loop-reel {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 38px;
  height: 34px;
  border: 2px solid var(--black);
  background: var(--grey);
}

.loop-reel::before,
.loop-reel::after {
  position: absolute;
  top: 7px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: var(--white);
  content: "";
}

.loop-reel::before {
  left: 2px;
}

.loop-reel::after {
  right: 2px;
}

.loop-reel i,
.loop-reel b {
  position: absolute;
  top: 14px;
  z-index: 1;
  display: block;
  width: 7px;
  height: 3px;
  background: var(--black);
}

.loop-reel i {
  left: 9px;
}

.loop-reel b {
  right: 9px;
}

.loop-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
}

.drive-link {
  color: var(--black);
  font-family: var(--font-geneva);
  font-size: 9px;
}

.loop-list {
  max-height: 255px;
  overflow: auto;
  border: 1px solid var(--dark-grey);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
}

.loop-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 54px auto;
  align-items: center;
  gap: 5px;
  min-height: 29px;
  padding: 3px 5px;
  border-bottom: 1px solid var(--dark-grey);
  background: var(--white);
}

.loop-row:last-child {
  border-bottom: 0;
}

.loop-row.selected,
.loop-row.playing {
  background: var(--black);
  color: var(--white);
}

.loop-row.selected .loop-name,
.loop-row.selected .loop-index,
.loop-row.playing .loop-name,
.loop-row.playing .loop-index {
  color: var(--white);
}

.loop-play,
.loop-stop {
  width: 22px;
  height: 19px;
  padding: 0;
  border: 1px solid var(--black);
  border-top-color: var(--white);
  border-left-color: var(--white);
  background: var(--grey);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 10px;
  line-height: 15px;
}

.loop-play:active,
.loop-stop:active {
  border-top-color: var(--black);
  border-left-color: var(--black);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
}

.loop-name {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loop-index {
  font-family: var(--font-geneva);
  font-size: 9px;
  text-align: right;
}

.loop-meta {
  color: #555;
  font-family: var(--font-geneva);
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.loop-download {
  padding: 2px 5px;
  border: 1px solid var(--black);
  border-top-color: var(--white);
  border-left-color: var(--white);
  background: var(--grey);
  color: var(--black);
  font-family: var(--font-geneva);
  font-size: 9px;
  text-decoration: none;
}

.loop-empty {
  padding: 18px 10px;
  color: #555;
  font-family: var(--font-geneva);
  font-size: 9px;
  line-height: 1.4;
}

.studio-scene {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--black);
  background: var(--white);
}

.studio-window-drag-strip {
  position: absolute;
  left: 5%;
  top: 0;
  z-index: 9;
  width: 90%;
  height: 5.8%;
  cursor: move;
}

.studio-window-image-close {
  position: absolute;
  left: 1.4%;
  top: 1.2%;
  z-index: 12;
  width: 3.2%;
  height: 4.1%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.studio-window-image-close:focus,
.studio-window-image-close:focus-visible {
  outline: none;
}

.studio-image {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.sp12-animation-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sp12-animation-canvas.hidden {
  display: none;
}

.sp12-loop-panel {
  position: absolute;
  left: 47.6%;
  top: 22.9%;
  z-index: 8;
  width: 41.2%;
  pointer-events: auto;
}

.sp12-loop-panel.hidden {
  display: none;
}

.sp12-waveform {
  position: relative;
  display: block;
  width: 100%;
  height: 62px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: 0;
  background: var(--white);
  cursor: crosshair;
}

.sp12-waveform canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.sp12-loop-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--black);
  pointer-events: none;
}

.sp12-loading {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 20px auto;
  grid-template-rows: 1fr 10px;
  align-items: center;
  justify-content: center;
  gap: 0 7px;
  background: var(--white);
  color: var(--black);
  pointer-events: none;
}

.sp12-loading.hidden {
  display: none;
}

.sp12-loading strong {
  font-size: 11px;
}

.system-watch {
  position: relative;
  width: 16px;
  height: 18px;
  border: 2px solid var(--black);
  background: var(--white);
}

.system-watch::before,
.system-watch::after {
  position: absolute;
  left: 4px;
  width: 4px;
  height: 2px;
  background: var(--black);
  content: "";
}

.system-watch::before {
  top: -4px;
}

.system-watch::after {
  bottom: -4px;
}

.system-watch i {
  position: absolute;
  left: 6px;
  top: 3px;
  width: 2px;
  height: 6px;
  background: var(--black);
  transform-origin: 1px 5px;
  animation: system-watch-tick 800ms steps(8, end) infinite;
}

.system-loading-track {
  grid-column: 1 / -1;
  width: 112px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--black);
  background: var(--white);
}

.system-loading-track i {
  display: block;
  width: calc(100% + 12px);
  height: 100%;
  background: repeating-linear-gradient(135deg, var(--black) 0 2px, var(--white) 2px 5px);
  animation: system-loading-march 600ms steps(4, end) infinite;
}

@keyframes system-watch-tick {
  to { transform: rotate(360deg); }
}

@keyframes system-loading-march {
  to { transform: translateX(-10px); }
}

.sp12-loop-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 38px;
  padding-top: 5px;
}

.sp12-control {
  width: 29px;
  height: 27px;
  padding: 0;
  border: 2px solid var(--black);
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-radius: 0;
  background: var(--grey);
  color: var(--black);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  line-height: 21px;
  text-align: center;
}

.sp12-control:active,
.sp12-control.active {
  border-top-color: var(--black);
  border-left-color: var(--black);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  background: var(--black);
  color: var(--white);
}

.studio-hotspot {
  position: absolute;
  z-index: 2;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.studio-hotspot:focus,
.studio-hotspot:focus-visible {
  outline: none;
  box-shadow: none;
}

.synth-one {
  left: 2.3%;
  top: 15.3%;
  width: 41.7%;
  height: 26.5%;
  transform: rotate(1deg);
}

.synth-two {
  left: 0.1%;
  top: 36.5%;
  width: 41.7%;
  height: 29.6%;
  transform: rotate(-1deg);
}

.synth-three {
  left: 0;
  top: 61.8%;
  width: 39.5%;
  height: 32.8%;
  transform: rotate(1deg);
}

.sp12-hotspot {
  left: 47.3%;
  top: 12.1%;
  width: 43.9%;
  height: 52.9%;
  transform: rotate(3deg);
}

.terra-hotspot {
  left: 47.3%;
  top: 61.8%;
  z-index: 3;
  width: 25.3%;
  height: 28.6%;
  transform: rotate(2deg);
}

.loop-drawer {
  position: absolute;
  left: 1%;
  top: 4.7%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 42.8%;
  height: 88.9%;
  min-width: 250px;
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 var(--black);
  background: var(--white);
}

.drawer-title-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  border-bottom: 1px solid var(--black);
  background: repeating-linear-gradient(to bottom, var(--white) 0, var(--white) 1px, var(--black) 1px, var(--black) 2px);
}

.drawer-title-bar strong {
  max-width: calc(100% - 52px);
  padding: 0 7px;
  overflow: hidden;
  background: var(--white);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-close {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 11px;
  height: 11px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--black);
  background: var(--white);
  color: transparent;
  cursor: pointer;
}

.drawer-close:active {
  background: var(--black);
}

.drawer-toolbar,
.drawer-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 4px 6px;
  background: var(--window);
  font-family: var(--font-geneva);
  font-size: 9px;
}

.drawer-toolbar {
  border-bottom: 1px solid var(--dark-grey);
}

.drawer-toolbar #loop-feed-status {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-toolbar .sys7-btn {
  padding: 2px 7px;
  font-size: 9px;
}

.drawer-status {
  justify-content: space-between;
  border-top: 1px solid var(--dark-grey);
  white-space: nowrap;
}

.loop-drawer .loop-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  border: 0;
  background: var(--white);
}

.loop-drawer .loop-row {
  grid-template-columns: 25px minmax(0, 1fr) auto;
  min-height: 25px;
  padding: 2px 4px;
  cursor: pointer;
}

.loop-drawer .loop-meta {
  display: none;
}

.loop-drawer .loop-download {
  padding: 1px 4px;
}

.studio-alert {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: min(250px, calc(100% - 24px));
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 var(--black);
  background: var(--white);
  transform: translate(-50%, -50%);
  text-align: center;
}

.alert-title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 1px 24px;
  border-bottom: 1px solid var(--black);
  background: repeating-linear-gradient(to bottom, var(--white) 0, var(--white) 1px, var(--black) 1px, var(--black) 2px);
  font-weight: bold;
}

.alert-title span {
  padding: 0 7px;
  background: var(--white);
  font-size: 11px;
}

.studio-alert p {
  margin: 15px 12px 12px;
  font-family: var(--font-geneva);
  font-size: 11px;
}

.studio-alert .sys7-btn {
  min-width: 58px;
  margin-bottom: 12px;
}

.scrollbar-track {
  position: relative;
  height: 15px;
  border-top: 1px solid var(--black);
  background: repeating-linear-gradient(45deg, var(--white), var(--white) 1px, var(--grey) 1px, var(--grey) 3px);
}

.scrollbar-btn {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 14px;
  border: 1px solid var(--black);
  background: var(--grey);
  font-family: Arial, sans-serif;
  font-size: 8px;
}

.scrollbar-btn.left {
  left: 0;
}

.scrollbar-btn.right {
  right: 0;
}

.desktop-trash {
  position: fixed;
  right: 15px;
  bottom: 23px;
  z-index: 5;
  cursor: default;
}

.trash-art {
  position: relative;
  display: block;
  width: 25px;
  height: 29px;
  margin: 4px auto 2px;
  border: 2px solid var(--black);
  border-radius: 0 0 4px 4px;
  background: var(--white);
}

.trash-art::before {
  position: absolute;
  top: -7px;
  left: -2px;
  width: 25px;
  height: 5px;
  border: 2px solid var(--black);
  border-radius: 2px 2px 0 0;
  background: var(--grey);
  content: "";
}

.trash-art::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 2px;
  height: 14px;
  background: var(--black);
  box-shadow: 5px 0 0 var(--black), 10px 0 0 var(--black);
  content: "";
}

#control-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  height: 18px;
  max-width: calc(100vw - 10px);
  border-top: 1px solid var(--black);
  border-right: 2px solid var(--black);
  background: var(--grey);
  font-family: var(--font-geneva);
  font-size: 9px;
}

.cs-toggle {
  width: 14px;
  height: 17px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--black);
  background: var(--grey);
  font-size: 8px;
}

.cs-module {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
  padding: 0 6px;
  border-right: 1px solid var(--dark-grey);
  white-space: nowrap;
}

#strip-track {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-btn {
  height: 12px;
  padding: 0 4px;
  border: 1px solid var(--black);
  border-top-color: var(--white);
  border-left-color: var(--white);
  background: var(--grey);
  cursor: pointer;
  font-family: var(--font-geneva);
  font-size: 8px;
  line-height: 10px;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  #desktop {
    min-height: 100dvh;
    overflow: visible;
    padding-bottom: 24px;
  }

  #menubar {
    position: sticky;
    top: 0;
    overflow-x: auto;
    white-space: nowrap;
  }

  #desktop-workspace {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-height: auto;
    padding: 10px 0 34px;
  }

  .desktop-icon-grid {
    position: static;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 0 10px 2px;
    overflow-x: auto;
  }

  .desktop-icon {
    flex: 0 0 78px;
    width: 78px;
  }

  .window,
  #player-window,
  #image-window,
  #loop-window,
  #tape-mixer-window {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% - 20px);
    margin: 0 10px;
  }

  #image-window {
    order: 2;
  }

  #player-window {
    order: 1;
  }

  #loop-window {
    order: 3;
  }

  #tape-mixer-window {
    order: 4;
    height: 620px;
  }

  .loop-drawer {
    left: 3%;
    top: 4%;
    width: 94%;
    height: 92%;
    min-width: 0;
  }

  .loop-drawer .loop-row {
    min-height: 23px;
  }

  .sp12-loop-panel {
    display: none;
  }

  .title-bar {
    cursor: default;
  }

  .track-list {
    max-height: 300px;
  }

  .transport {
    flex-wrap: wrap;
  }

  .volume-container {
    width: 100%;
    margin: 3px 0 0;
  }

  #control-strip {
    max-width: 100vw;
    overflow-x: auto;
  }

  .desktop-trash {
    display: none;
  }
}
.tape-mixer-art {
  position: relative;
  display: block;
  width: 48px;
  height: 38px;
  margin: 0 auto 4px;
  border: 2px solid #000;
  background: #fff;
  box-shadow: inset 0 -7px #ccc;
}

.tape-mixer-art i {
  position: absolute;
  top: 6px;
  width: 18px;
  height: 18px;
  border: 2px solid #000;
  border-radius: 50%;
  background: repeating-conic-gradient(#000 0 8deg, #fff 8deg 42deg);
}

.tape-mixer-art i:first-child { left: 4px; }
.tape-mixer-art i:last-child { right: 4px; }
