.halo-gp-shell {
  --gp-bg: #f6f5f1;
  --gp-surface: #ffffff;
  --gp-panel: #202427;
  --gp-panel-2: #2d3338;
  --gp-panel-3: #3a4248;
  --gp-line: #d7d3c9;
  --gp-text: #202427;
  --gp-muted: #697178;
  --gp-accent: #2f855a;
  --gp-accent-2: #d39a2f;
  color: var(--gp-text);
  background: var(--gp-bg);
  border: 1px solid var(--gp-line);
  border-radius: 8px;
  overflow: hidden;
  margin: 1.25rem 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 10px 30px rgba(30, 32, 34, .08);
}

.halo-gp-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--gp-panel);
  color: white;
}

.halo-gp-title-wrap {
  min-width: 0;
}

.halo-gp-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}

.halo-gp-subtitle {
  margin-top: 2px;
  color: #b9c0c5;
  font-size: 12px;
}

.halo-gp-header-actions,
.halo-gp-transport,
.halo-gp-options,
.halo-gp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.halo-gp-row {
  padding: 9px 12px;
  background: #f5f3ed;
  border-bottom: 1px solid var(--gp-line);
}

.halo-gp-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #ece9e1;
  border-bottom: 1px solid var(--gp-line);
}

.halo-gp-options {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.halo-gp-button,
.halo-gp-select,
.halo-gp-input {
  height: 32px;
  border: 1px solid #c7c2b7;
  border-radius: 6px;
  background: white;
  color: var(--gp-text);
  font-size: 13px;
}

.halo-gp-button {
  min-width: 36px;
  padding: 0 10px;
  cursor: pointer;
  font-weight: 650;
}

.halo-gp-button:hover {
  border-color: #9d9689;
  background: #faf9f5;
}

.halo-gp-button[disabled] {
  cursor: wait;
  opacity: .55;
}

.halo-gp-button-primary {
  border-color: var(--gp-accent);
  background: var(--gp-accent);
  color: white;
}

.halo-gp-button-primary:hover {
  background: #28744e;
}

.halo-gp-header .halo-gp-button {
  border-color: #4b545b;
  background: var(--gp-panel-2);
  color: white;
}

.halo-gp-header .halo-gp-button:hover {
  background: var(--gp-panel-3);
}

.halo-gp-select {
  max-width: 170px;
  padding: 0 8px;
}

.halo-gp-input {
  width: min(320px, 100%);
  padding: 0 10px;
}

.halo-gp-field {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.halo-gp-label {
  color: #50575d;
  font-size: 12px;
  font-weight: 650;
}

.halo-gp-body {
  position: relative;
  min-height: 360px;
  background: var(--gp-surface);
}

.halo-gp-score {
  min-height: 360px;
  overflow: auto;
  padding: 20px 16px 72px;
}

.halo-gp-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--gp-muted);
  border-top: 1px solid var(--gp-line);
  font-size: 13px;
}

.halo-gp-error {
  color: #a3362d;
}

.halo-gp-progress {
  height: 4px;
  background: #dfdbd1;
}

.halo-gp-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gp-accent), var(--gp-accent-2));
  transition: width .1s linear;
}

.halo-gp-custom-soundfont {
  display: none;
}

.halo-gp-custom-soundfont.is-visible {
  display: inline-flex;
}

.halo-gp-shell.halo-gp-collapsed .halo-gp-toolbar,
.halo-gp-shell.halo-gp-collapsed .halo-gp-row,
.halo-gp-shell.halo-gp-collapsed .halo-gp-progress,
.halo-gp-shell.halo-gp-collapsed .halo-gp-body,
.halo-gp-shell.halo-gp-collapsed .halo-gp-status {
  display: none;
}

.halo-gp-score .at-cursor-bar {
  background: rgba(211, 154, 47, .22);
}

.halo-gp-score .at-cursor-beat {
  background: rgba(219, 64, 50, .9);
  width: 3px;
}

.halo-gp-score .at-selection div {
  background: rgba(47, 133, 90, .12);
}

@media (max-width: 760px) {
  .halo-gp-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .halo-gp-toolbar {
    grid-template-columns: 1fr;
  }

  .halo-gp-transport,
  .halo-gp-options,
  .halo-gp-row {
    flex-wrap: wrap;
  }

  .halo-gp-select {
    max-width: 100%;
  }

  .halo-gp-field {
    width: 100%;
  }

  .halo-gp-select,
  .halo-gp-input {
    flex: 1;
  }
}
