/* Focused music workspace. One responsive layout and one interaction model. */
.tune-editor {
  --ed-bg: #101b2c;
  --ed-panel: #142135;
  --ed-border: #33435b;
  --ed-dim: #a5b3c7;
  --ed-ink: #f3f1e9;
  --ed-gold: #edbc68;
  --ed-mint: #83d8ba;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--ed-bg);
  color: var(--ed-ink);
  font: 14px/1.4 var(--font);
  box-shadow: none;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
.tune-editor[open] {
  display: block;
}
.tune-editor::backdrop {
  background: #0b1220;
  backdrop-filter: none;
}
.tune-editor *,
.tune-editor *::before,
.tune-editor *::after {
  box-sizing: border-box;
}
.tune-editor [hidden] {
  display: none !important;
}
.tune-editor button,
.tune-editor input,
.tune-editor select {
  font: inherit;
  color: inherit;
  letter-spacing: normal;
}
.tune-editor button {
  cursor: pointer;
  touch-action: manipulation;
}
.tune-editor button:disabled {
  opacity: 0.34;
  cursor: default;
}
.tune-editor button:focus-visible,
.tune-editor input:focus-visible,
.tune-editor select:focus-visible,
.tune-editor [tabindex]:focus-visible {
  outline: 2px solid var(--ed-mint);
  outline-offset: -2px;
}
.tune-editor svg {
  flex-shrink: 0;
  display: block;
  pointer-events: none;
}
.tune-editor input,
.tune-editor select {
  background: #0f1a2b;
  border: 1px solid var(--ed-border);
  border-radius: 6px;
  height: 40px;
  padding: 7px 10px;
  min-width: 0;
}
.tune-editor input[type="number"] {
  font-variant-numeric: tabular-nums;
}
.tune-editor input[type="range"] {
  accent-color: var(--ed-gold);
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.tune-editor .ed-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.tune-editor .ed-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.tune-editor .ed-brand {
  font-weight: 700;
  white-space: nowrap;
  padding-right: 12px;
  border-right: 1px solid var(--ed-border);
}
.tune-editor .ed-menubar {
  display: flex;
  align-items: center;
}
.tune-editor .ed-menubar button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 10px 12px;
  min-height: 44px;
}
.tune-editor .ed-menubar button[aria-expanded="true"],
.tune-editor .ed-menubar button:hover {
  background: #24334a;
}
.tune-editor .ed-title {
  flex: 1;
  min-width: 120px;
  margin: 0 auto;
  max-width: 420px;
}
.tune-editor .ed-title input {
  font-size: 17px;
  font-weight: 600;
  width: 100%;
  border-color: transparent;
  background: transparent;
  text-overflow: ellipsis;
}
.tune-editor .ed-title input:hover,
.tune-editor .ed-title input:focus {
  border-color: var(--ed-border);
  background: #0c1626;
}
.tune-editor .ed-save-status {
  font-size: 12px;
  white-space: nowrap;
  color: var(--ed-dim);
}
.tune-editor .ed-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
}
.tune-editor .ed-button:hover:not(:disabled) {
  background: #26364c;
}
.tune-editor .ed-save {
  border-color: var(--ed-border);
}
.tune-editor .ed-game,
.tune-editor .ed-play {
  color: #152131;
  background: var(--ed-gold);
  font-weight: 700;
}
.tune-editor .ed-game:hover:not(:disabled),
.tune-editor .ed-play:hover:not(:disabled) {
  background: #ffd38b;
}
.tune-editor .ed-transport {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.tune-editor .ed-transport-buttons {
  display: flex;
  gap: 4px;
}
.tune-editor .ed-play {
  min-width: 52px;
}
.tune-editor .ed-position {
  color: var(--ed-ink);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 58px;
  text-align: center;
  padding: 0 10px;
}
.tune-editor [aria-pressed="true"]:not(.ed-note) {
  border-color: var(--ed-mint);
  background: #1b3b3e;
  color: #a2eed4;
}
.tune-editor .ed-tempo {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--ed-border);
  border-radius: 6px;
  padding-right: 9px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ed-dim);
}
.tune-editor .ed-tempo input {
  border: 0;
  width: 60px;
  height: 40px;
  padding: 6px;
  text-align: right;
  font-size: 15px;
  color: var(--ed-ink);
  background: transparent;
  appearance: textfield;
  -moz-appearance: textfield;
}
.tune-editor .ed-tempo input::-webkit-inner-spin-button {
  appearance: none;
}
.tune-editor .ed-speed select {
  width: 64px;
}
.tune-editor .ed-time-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.tune-editor .ed-snap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ed-dim);
  white-space: nowrap;
}
.tune-editor .ed-snap select {
  color: var(--ed-ink);
  width: 92px;
}
.tune-editor .ed-zoom-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tune-editor #editor-zoom {
  width: 110px;
}
.tune-editor .ed-overview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px 10px;
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.tune-editor .ed-overview-label {
  width: 116px;
  color: var(--ed-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tune-editor .ed-overview {
  position: relative;
  height: 44px;
  flex: 1;
  min-width: 0;
  background: #0c1727;
  border: 1px solid #32435b;
  border-radius: 6px;
  touch-action: none;
  cursor: pointer;
  overflow: hidden;
}
.tune-editor .ed-overview canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tune-editor .ed-overview-window {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 2px solid var(--ed-mint);
  border-radius: 5px;
  background: #83d8ba0d;
  cursor: grab;
  min-width: 12px;
}
.tune-editor .ed-overview-window span {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 20px;
  cursor: ew-resize;
}
.tune-editor .ed-overview-window span::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  width: 6px;
  border-radius: 3px;
  background: var(--ed-mint);
}
.tune-editor .ed-overview-window span:first-child {
  left: -6px;
}
.tune-editor .ed-overview-window span:first-child::after {
  left: 5px;
}
.tune-editor .ed-overview-window span:last-child {
  right: -6px;
}
.tune-editor .ed-overview-window span:last-child::after {
  right: 5px;
}
.tune-editor .ed-workspace {
  min-height: 0;
  flex: 1;
  display: flex;
  overflow: hidden;
}
.tune-editor .ed-tools {
  width: 68px;
  flex-shrink: 0;
  border-right: 1px solid var(--ed-border);
  padding: 8px 5px;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.tune-editor .ed-tools button {
  min-height: 57px;
  width: 100%;
  padding: 7px 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 10px;
}
.tune-editor .ed-tools button:hover:not(:disabled) {
  background: #24344b;
}
.tune-editor .ed-tools svg {
  width: 24px;
  height: 24px;
}
.tune-editor .ed-tool-divider {
  height: 1px;
  background: var(--ed-border);
  margin: 6px 9px;
  flex-shrink: 0;
}
.tune-editor .ed-tool-spacer {
  flex: 1;
}
.tune-editor .ed-roll-pane {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 34px minmax(0, 1fr);
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.tune-editor .ed-roll-corner {
  color: var(--ed-dim);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--ed-border);
  border-right: 1px solid var(--ed-border);
}
.tune-editor .ed-ruler {
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #5e708b;
  touch-action: none;
  cursor: col-resize;
}
.tune-editor .ed-ruler-content {
  position: relative;
  height: 100%;
  will-change: transform;
}
.tune-editor .ed-ruler-tick {
  position: absolute;
  bottom: 0;
  height: 12px;
  border-left: 1px solid #536780;
  font-size: 10px;
  padding-left: 6px;
  color: #7f91ab;
  pointer-events: none;
}
.tune-editor .ed-ruler-tick.is-bar {
  height: 29px;
  padding-top: 5px;
  font-size: 12px;
  color: #e8e6de;
}
.tune-editor .ed-ruler-cursor {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--ed-mint);
  transform: translateX(-7px);
  pointer-events: none;
}
.tune-editor .ed-loop-band {
  position: absolute;
  inset-block: 0;
  background: #83d8ba20;
  border-top: 3px solid var(--ed-mint);
  pointer-events: none;
}
.tune-editor .ed-loop-marker {
  position: absolute;
  top: 0;
  height: 24px;
  width: 20px;
  transform: translateX(-10px);
  cursor: ew-resize;
  z-index: 2;
}
.tune-editor .ed-loop-marker::after {
  content: "";
  position: absolute;
  top: 0;
  left: 7px;
  height: 11px;
  width: 6px;
  background: var(--ed-mint);
  border-radius: 0 0 2px 2px;
}
.tune-editor .ed-keyboard {
  overflow: hidden;
  border-right: 1px solid #3a4c67;
  position: relative;
  background: #1a2638;
}
.tune-editor .ed-keyboard-content {
  will-change: transform;
}
.tune-editor .ed-key {
  width: 100%;
  display: block;
  border: 0;
  border-bottom: 1px solid #bac1c2;
  border-radius: 0;
  text-align: right;
  padding: 0 10px 0 4px;
  font-size: 12px;
  font-weight: 650;
}
.tune-editor .ed-key.is-white {
  background: #e8e7dd;
  color: #28323f;
}
.tune-editor .ed-key.is-black {
  background: #263953;
  color: #dce1e8;
  border-bottom-color: #142034;
  width: 83%;
  border-right: 4px solid #1b293f;
  border-radius: 0 0 4px 0;
}
.tune-editor .ed-key.is-muted {
  background: #233147;
  color: #8390a3;
  opacity: 1;
  font-weight: 400;
  border-bottom-color: #334257;
}
.tune-editor .ed-key.is-black.is-muted {
  background: #19283c;
  color: #6e7d94;
}
.tune-editor .ed-key.is-playing {
  background: var(--ed-mint);
  color: #0d2a2a;
}
.tune-editor .ed-scroll {
  position: relative;
  overflow: auto;
  min-width: 0;
  min-height: 0;
  overscroll-behavior: none;
  touch-action: none;
  scrollbar-color: #4c607a #101b2c;
  scrollbar-width: thin;
}
.tune-editor .ed-score {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  background: #16243a;
  isolation: isolate;
}
.tune-editor .ed-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, #7894bb35 1px, transparent 1px),
    linear-gradient(to right, #6b84a51f 1px, transparent 1px),
    linear-gradient(to bottom, #7088a92b 1px, transparent 1px);
  background-size:
    var(--bar-width) 100%,
    var(--beat-width) 100%,
    100% var(--row-height);
}
.tune-editor .ed-subdivisions .ed-grid-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #7088a910 1px, transparent 1px) 0 0 /
    var(--snap-width) 100%;
}
.tune-editor .ed-score[data-tool="draw"] {
  cursor: crosshair;
}
.tune-editor .ed-score[data-tool="pan"] {
  cursor: grab;
}
.tune-editor .ed-score[data-tool="pan"]:active {
  cursor: grabbing;
}
.tune-editor .ed-score[data-tool="erase"] {
  cursor: crosshair;
}
.tune-editor .ed-note {
  position: absolute;
  border: 1px solid #fbd290;
  border-radius: 4px;
  background: #e9b966;
  color: #182739;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 750;
  cursor: grab;
  z-index: 2;
  touch-action: none;
}
.tune-editor .ed-note:hover {
  background: #ffd080;
}
.tune-editor .ed-note.is-selected {
  outline: 2px solid var(--ed-mint);
  outline-offset: 1px;
  z-index: 3;
}
.tune-editor .ed-note.is-muted {
  color: #c4ceda;
  border-color: #7c8ba1;
  background: repeating-linear-gradient(
    135deg,
    #536176 0 5px,
    #414f64 5px 10px
  );
}
.tune-editor .ed-note-label {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  pointer-events: none;
  padding: 0 2px;
}
.tune-editor .ed-note.is-narrow .ed-note-label {
  display: none;
}
.tune-editor .ed-resize {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 12px;
  cursor: ew-resize;
  display: none;
}
.tune-editor .ed-resize:first-child {
  left: -6px;
}
.tune-editor .ed-resize:last-child {
  right: -6px;
}
.tune-editor .ed-note.is-selected .ed-resize {
  display: block;
}
.tune-editor .ed-note.is-selected .ed-resize::after {
  content: "";
  width: 3px;
  height: 10px;
  background: #1d6158;
  border-radius: 2px;
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
}
.tune-editor .ed-score[data-tool="pan"] .ed-note {
  cursor: grab;
}
.tune-editor .ed-score[data-tool="erase"] .ed-note {
  cursor: crosshair;
}
.tune-editor .ed-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--ed-mint);
  box-shadow: 1px 0 #83d8ba33;
  pointer-events: none;
  z-index: 5;
}
.tune-editor .ed-song-end {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15px;
  transform: translateX(-7px);
  border-left: 1px dashed #8292a5;
  margin-left: 7px;
  z-index: 1;
  cursor: ew-resize;
}
.tune-editor .ed-song-end span {
  display: block;
  background: #26364d;
  color: #b3bed0;
  padding: 3px 6px;
  font-size: 10px;
  width: max-content;
  border-radius: 0 0 4px 0;
}
.tune-editor .ed-marquee {
  position: absolute;
  background: #83d8ba1e;
  border: 1px solid var(--ed-mint);
  z-index: 6;
  pointer-events: none;
}
.tune-editor .ed-empty {
  position: absolute;
  inset: 34px 0 0 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  text-align: center;
  padding: 24px;
  color: var(--ed-dim);
}
.tune-editor .ed-empty strong {
  font-size: 22px;
  color: var(--ed-ink);
  font-weight: 600;
}
.tune-editor .ed-empty button {
  background: #101b2c;
  border: 1px solid #455a76;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  pointer-events: auto;
  min-height: 44px;
}
.tune-editor .ed-selection {
  min-height: 51px;
  flex-shrink: 0;
  border-top: 1px solid var(--ed-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 16px;
}
.tune-editor .ed-selection > span {
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.tune-editor .ed-selection > div {
  display: flex;
  gap: 6px;
}
.tune-editor .ed-footer {
  min-height: 30px;
  flex-shrink: 0;
  border-top: 1px solid var(--ed-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 15px;
  font-size: 11px;
  color: var(--ed-dim);
}
.tune-editor #editor-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tune-editor #editor-summary {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tune-editor .is-warning {
  color: #f2c57f;
}
.tune-editor .ed-menu-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
.tune-editor .ed-menu {
  position: absolute;
  min-width: 260px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 6px;
  background: #1c2a40;
  border: 1px solid #53657f;
  border-radius: 10px;
  box-shadow: 0 18px 65px #0008;
  pointer-events: auto;
}
.tune-editor .ed-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  width: 100%;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 7px 10px;
  text-align: left;
  font-size: 13px;
}
.tune-editor .ed-menu button:hover:not(:disabled),
.tune-editor .ed-menu button:focus-visible {
  background: #30425c;
}
.tune-editor .ed-menu button span {
  flex: 1;
}
.tune-editor .ed-menu svg {
  width: 19px;
  height: 19px;
  color: #bdc9d9;
}
.tune-editor .ed-menu .is-unchecked svg {
  visibility: hidden;
}
.tune-editor .ed-menu kbd {
  font: 10px var(--font);
  color: #91a3bc;
  margin-left: 16px;
}
.tune-editor .ed-menu hr {
  border: 0;
  border-top: 1px solid #354760;
  margin: 6px 8px;
}
.tune-editor .ed-menu-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 4px 5px 10px;
  color: #ced7e3;
  font-weight: 600;
  border-bottom: 1px solid var(--ed-border);
  margin-bottom: 6px;
}
.tune-editor .ed-menu-heading > span {
  flex: 1;
}
.tune-editor .ed-menu-heading > button {
  width: 44px;
  min-height: 44px;
  padding: 10px;
}
.tune-editor .is-danger,
.tune-editor .is-danger svg {
  color: #ff9b96;
}
.tune-editor .ed-sheet-layer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: #060c17b8;
  z-index: 30;
}
.tune-editor .ed-sheet {
  width: min(580px, 100%);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background: #19273b;
  border: 1px solid #4c607c;
  border-radius: 14px;
  box-shadow: 0 24px 100px #0009;
  overflow: hidden;
}
.tune-editor .ed-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 12px 24px;
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.tune-editor .ed-sheet h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 650;
}
.tune-editor .ed-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  min-height: 44px;
  min-width: 44px;
  border-radius: 6px;
}
.tune-editor .ed-sheet-close:hover {
  background: #30435d;
}
.tune-editor .ed-sheet-body {
  overflow: auto;
  padding: 20px 24px 24px;
  overscroll-behavior: contain;
}
.tune-editor .ed-sheet label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: #c4cfe0;
  margin-bottom: 17px;
}
.tune-editor .ed-sheet input,
.tune-editor .ed-sheet select {
  width: 100%;
  font-size: 16px;
  height: 44px;
  color: var(--ed-ink);
}
.tune-editor .ed-sheet p {
  color: #abbad0;
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 16px;
}
.tune-editor .ed-form-row {
  display: flex;
  gap: 18px;
}
.tune-editor .ed-form-row label {
  flex: 1;
  min-width: 0;
}
.tune-editor .ed-sheet-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 22px;
}
.tune-editor .ed-sheet-actions button {
  min-height: 44px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid #556780;
  border-radius: 6px;
}
.tune-editor .ed-sheet-actions button:hover {
  background: #30435c;
}
.tune-editor .ed-sheet-actions .ed-primary {
  background: var(--ed-gold);
  color: #152131;
  font-weight: 650;
  border-color: var(--ed-gold);
}
.tune-editor .ed-sheet .ed-form-error {
  color: #ffada7;
}
.tune-editor .ed-form-error:empty {
  display: none;
}
.tune-editor .ed-library-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.tune-editor .ed-library-tabs button {
  min-height: 44px;
  border: 1px solid var(--ed-border);
  background: transparent;
  padding: 8px 16px;
  border-radius: 6px;
}
.tune-editor .ed-library-tabs [aria-selected="true"] {
  background: #244442;
  border-color: #73c5ad;
  color: #a5ebd3;
}
.tune-editor .ed-search {
  position: relative;
}
.tune-editor .ed-search svg {
  position: absolute;
  left: 10px;
  top: 11px;
}
.tune-editor .ed-search input {
  padding-left: 40px;
}
.tune-editor .ed-library-list {
  max-height: 50dvh;
  overflow: auto;
}
.tune-editor .ed-library-list h3 {
  font-size: 11px;
  color: #b8c6db;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 20px 0 6px;
}
.tune-editor .ed-library-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  border: 0;
  border-bottom: 1px solid #314259;
  background: transparent;
  text-align: left;
  padding: 10px 4px;
}
.tune-editor .ed-library-list button:hover {
  background: #253850;
}
.tune-editor .ed-library-list button > span {
  flex: 1;
  font-weight: 600;
}
.tune-editor .ed-library-list small {
  font-size: 11px;
  color: #a9b8cd;
  white-space: nowrap;
}
.tune-editor .ed-shortcuts h3 {
  font-size: 14px;
  margin: 24px 0 8px;
  color: var(--ed-ink);
}
.tune-editor .ed-shortcuts h3:first-child {
  margin-top: 0;
}
.tune-editor .ed-shortcuts kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 5px;
  background: #30425a;
  border-radius: 3px;
  text-align: center;
  color: white;
  font: inherit;
}
.tune-editor .ed-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1180px) {
  .tune-editor .ed-brand {
    display: none;
  }
  .tune-editor .ed-header {
    gap: 7px;
  }
  .tune-editor .ed-transport {
    gap: 6px;
  }
  .tune-editor .ed-position {
    padding: 0 3px;
    min-width: 50px;
  }
  .tune-editor #editor-zoom {
    width: 70px;
  }
  .tune-editor .ed-time-tools {
    gap: 5px;
  }
}
@media (max-width: 960px) {
  .tune-editor .ed-save-status {
    display: none;
  }
  .tune-editor .ed-save span,
  .tune-editor .ed-game span {
    display: none;
  }
  .tune-editor .ed-transport {
    flex-wrap: wrap;
  }
  .tune-editor .ed-time-tools {
    margin-left: auto;
  }
  .tune-editor .ed-zoom-controls [data-action="fit-song"] span {
    display: none;
  }
  .tune-editor #editor-zoom {
    width: 56px;
  }
  .tune-editor .ed-position {
    display: none;
  }
}
@media (max-width: 740px) {
  .tune-editor .ed-header {
    padding: 5px 8px;
  }
  .tune-editor .ed-time-tools {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .tune-editor .ed-transport {
    padding: 6px 10px;
    gap: 4px;
  }
  .tune-editor .ed-tempo {
    margin-left: auto;
  }
  .tune-editor .ed-overview-label {
    display: none;
  }
  .tune-editor .ed-overview-row {
    padding: 8px 10px;
  }
  .tune-editor .ed-menubar button {
    padding: 8px 10px;
  }
  .tune-editor .ed-tools {
    width: 60px;
  }
  .tune-editor .ed-roll-pane {
    grid-template-columns: 62px minmax(0, 1fr);
  }
  .tune-editor .ed-empty {
    left: 62px;
  }
  .tune-editor #editor-summary {
    display: none;
  }
}
@media (max-width: 600px) {
  .tune-editor .ed-header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 44px 44px;
    gap: 0 5px;
  }
  .tune-editor .ed-back {
    grid-column: 1;
    grid-row: 1;
  }
  .tune-editor .ed-title {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }
  .tune-editor .ed-title input {
    font-size: 16px;
    padding: 6px 3px;
  }
  .tune-editor .ed-save {
    grid-column: 3;
    grid-row: 1;
    border-color: transparent;
  }
  .tune-editor .ed-game {
    grid-column: 4;
    grid-row: 1;
  }
  .tune-editor .ed-menubar {
    grid-column: 1 / 3;
    grid-row: 2;
  }
  .tune-editor .ed-save-status {
    display: block;
    grid-column: 3 / 5;
    grid-row: 2;
    justify-self: end;
    font-size: 10px;
  }
  .tune-editor .ed-play {
    min-width: 44px;
  }
  .tune-editor .ed-transport-buttons {
    gap: 0;
  }
  .tune-editor .ed-tempo {
    font-size: 10px;
    padding-right: 5px;
    gap: 0;
  }
  .tune-editor .ed-tempo input {
    width: 46px;
  }
  .tune-editor .ed-speed select {
    width: 49px;
    padding: 7px 3px;
    font-size: 12px;
  }
  .tune-editor .ed-snap {
    font-size: 12px;
    gap: 5px;
  }
  .tune-editor .ed-snap select {
    width: 80px;
    padding: 7px;
  }
  .tune-editor .ed-zoom-controls {
    gap: 0;
  }
  .tune-editor #editor-zoom {
    width: 45px;
  }
  .tune-editor .ed-overview {
    height: 38px;
  }
  .tune-editor .ed-tools {
    width: 53px;
    padding: 5px 3px;
    gap: 3px;
  }
  .tune-editor .ed-tools button {
    min-height: 51px;
    font-size: 9px;
  }
  .tune-editor .ed-tools svg {
    width: 22px;
    height: 22px;
  }
  .tune-editor .ed-roll-pane {
    grid-template-columns: 55px minmax(0, 1fr);
    grid-template-rows: 30px minmax(0, 1fr);
  }
  .tune-editor .ed-key {
    font-size: 10px;
    padding-right: 6px;
  }
  .tune-editor .ed-empty {
    top: 30px;
    left: 55px;
    padding: 15px;
  }
  .tune-editor .ed-empty strong {
    font-size: 18px;
  }
  .tune-editor .ed-empty span {
    font-size: 12px;
  }
  .tune-editor .ed-selection {
    padding: 3px 8px;
    gap: 4px;
    min-height: 49px;
  }
  .tune-editor .ed-selection > span {
    font-size: 11px;
  }
  .tune-editor .ed-selection > div {
    gap: 0;
  }
  .tune-editor .ed-selection [data-action="properties"] span {
    display: none;
  }
  .tune-editor .ed-footer {
    padding: 4px 8px;
    min-height: 26px;
    font-size: 10px;
  }
  .tune-editor .ed-menu {
    min-width: 260px;
  }
  .tune-editor .ed-menu button {
    min-height: 44px;
  }
  .tune-editor .ed-menu kbd {
    display: none;
  }
  .tune-editor .ed-touch-menu {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    max-width: none;
    max-height: 65dvh;
    padding: 10px 12px max(14px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }
  .tune-editor .ed-touch-menu button {
    min-height: 50px;
  }
  .tune-editor .ed-sheet-layer {
    padding: 0;
    align-items: flex-end;
  }
  .tune-editor .ed-sheet {
    width: 100%;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
  }
  .tune-editor .ed-sheet > header {
    padding: 12px 12px 10px 18px;
  }
  .tune-editor .ed-sheet-body {
    padding: 16px 18px max(22px, env(safe-area-inset-bottom));
  }
  .tune-editor .ed-library-list small {
    display: none;
  }
}
@media (max-height: 550px) and (min-width: 601px) {
  .tune-editor .ed-header {
    min-height: 48px;
    padding-block: 2px;
  }
  .tune-editor .ed-transport {
    min-height: 48px;
    padding-block: 2px;
  }
  .tune-editor .ed-overview-row {
    padding-block: 4px;
  }
  .tune-editor .ed-overview {
    height: 30px;
  }
  .tune-editor .ed-tools button {
    min-height: 44px;
  }
  .tune-editor .ed-tools button span {
    display: none;
  }
  .tune-editor .ed-selection {
    min-height: 45px;
    padding-block: 0;
  }
  .tune-editor .ed-footer {
    display: none;
  }
}
@media (pointer: coarse) {
  .tune-editor .ed-resize {
    width: 20px;
  }
  .tune-editor .ed-resize:first-child {
    left: -9px;
  }
  .tune-editor .ed-resize:last-child {
    right: -9px;
  }
  .tune-editor .ed-note.is-selected .ed-resize::after {
    left: 8px;
  }
  .tune-editor .ed-menu button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tune-editor * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
