:root {
  --gl-bg: #131a27;
  --gl-bg-deep: #0f1520;
  --gl-card: #1b2638;
  --gl-card-raised: #202d40;
  --gl-card-soft: #233146;
  --gl-paper: #fbfbf7;
  --gl-green: #ff9f1c;
  --gl-green-strong: #e98400;
  --gl-blue: #3da9fc;
  --gl-text: #f7fafc;
  --gl-muted: #aeb7c5;
  --gl-border: #39465d;
  --gl-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--gl-bg) !important;
  color: var(--gl-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif !important;
}

body {
  height: auto !important;
  min-width: 0 !important;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

#grooveLabHeader {
  position: relative;
  z-index: 1200;
  min-height: 82px;
  padding: 14px clamp(16px, 2.2vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid rgba(57, 70, 93, 0.9);
  background: rgba(15, 21, 32, 0.94);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.gl-brand {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1;
}

.gl-brand-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.gl-brand-title {
  color: var(--gl-text);
  font-size: clamp(23px, 2.1vw, 31px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.gl-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gl-header-button {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--gl-text);
  background: rgba(13, 33, 51, 0.75);
  border: 1px solid var(--gl-border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: 150ms ease;
}

.gl-header-button:hover,
.gl-header-button:focus-visible {
  color: #241200;
  background: var(--gl-green);
  border-color: var(--gl-green);
  outline: none;
  transform: translateY(-1px);
}

.gl-mobile-more-button {
  display: none;
}

#GrooveWriter {
  box-sizing: border-box;
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: calc(100vh - 82px);
  padding: clamp(12px, 1.7vw, 24px) clamp(10px, 2vw, 28px) 30px;
  background: transparent !important;
  color: var(--gl-text);
  font-family: inherit !important;
}

#GrooveWriter > .nonPrintable:first-child {
  display: none !important;
}

.gl-workspace {
  width: min(100%, 1000px);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.gl-card {
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  background: var(--gl-card);
  border: 1px solid var(--gl-border);
  border-radius: 16px;
  box-shadow: var(--gl-shadow);
}

.gl-section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gl-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gl-section-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gl-green);
  box-shadow: 0 0 0 5px rgba(255, 159, 28, 0.12);
}

.gl-score-card {
  position: relative;
  padding: 12px 16px 10px;
  background: var(--gl-paper);
  border-color: rgba(255, 255, 255, 0.25);
  color: #101827;
}

#sheetMusicDiv,
.svgTarget {
  width: 100% !important;
  min-height: 150px;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent !important;
}

#sheetMusicDiv {
  padding: 0 !important;
}

.gl-score-card .svgTarget svg,
#sheetMusicDiv .svgTarget svg {
  display: block;
  width: 100% !important;
  min-width: 740px;
  height: auto !important;
  margin: 0 !important;
}

#sheetMusicDiv svg text {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

#sheetMusicTextFields {
  margin: 0 2px 8px;
  padding: 8px 10px !important;
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 10px;
  overflow-x: auto;
  background: #eff2ee !important;
  border: 1px solid #dce2de !important;
  border-radius: 9px;
  white-space: nowrap;
}

.sheetMusicTextField {
  margin: 0 !important;
  color: #405060;
  font-size: 12px;
}

.sheetMusicInputField {
  height: 32px;
  padding: 0 10px;
  color: #101827;
  background: #fff;
  border: 1px solid #cfd8d3;
  border-radius: 7px;
  outline: none;
}

.sheetMusicInputField:focus {
  border-color: var(--gl-green-strong);
  box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.2);
}

#LegendLabel {
  color: #274558 !important;
  background: #fff !important;
  border-color: #cfd8d3 !important;
}

.gl-transport-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.gl-player-card {
  min-height: 92px;
  padding: 14px;
  display: flex;
  align-items: center;
}

#midiPlayer {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.playerControl,
.playerControl.large {
  min-width: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: var(--gl-text);
  font-family: inherit !important;
}

.playerControlsRow {
  min-width: 0;
  align-items: center;
  padding: 0 !important;
}

.midiPlayImage,
.midiRepeatImage {
  width: 54px !important;
  height: 54px !important;
  margin: 0 8px 0 0 !important;
  line-height: 54px !important;
  color: #241200 !important;
  background: var(--gl-green) !important;
  border-radius: 12px !important;
  transition: 140ms ease;
}

.midiRepeatImage {
  color: var(--gl-text) !important;
  background: var(--gl-card-soft) !important;
  border: 1px solid var(--gl-border) !important;
}

.midiPlayImage:hover,
.midiRepeatImage:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.midiRepeatImage.selected {
  color: #241200 !important;
  background: var(--gl-green) !important;
  border-color: var(--gl-green) !important;
}

.MIDIPlayTime {
  width: 90px !important;
  margin: 0 12px 0 0 !important;
  color: var(--gl-text) !important;
  font-size: 24px !important;
  font-variant-numeric: tabular-nums;
}

.midiGSLogo,
.midiExpandImage,
.midiMetronomeMenu {
  color: var(--gl-muted) !important;
}

.midiGSLogo {
  display: none !important;
}

.midiMetronomeImage path {
  fill: var(--gl-muted) !important;
}

.midiMetronomeMenu.selected .midiMetronomeImage path {
  fill: var(--gl-green) !important;
}

.tempoAndProgress {
  min-width: 180px;
}

.tempoLabel,
.swingLabel,
.tempoOutput,
.swingOutput,
.tempoTextField {
  color: var(--gl-muted) !important;
  font-family: inherit !important;
}

.tempoTextField {
  color: var(--gl-text) !important;
  background: transparent !important;
  font-weight: 800;
}

input[type="range"] {
  background: transparent !important;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px !important;
  background: #28445c !important;
}

input[type="range"]::-webkit-slider-thumb {
  width: 17px !important;
  height: 17px !important;
  margin-top: -6px !important;
  background: var(--gl-green) !important;
  border: 2px solid #fff0dc !important;
}

#totalPlayTime {
  display: none !important;
}

.gl-tools-card {
  padding: 12px;
}

.gl-tools-heading {
  padding: 2px 4px 11px;
}

#LeftHandNav,
#TopNav {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

#divisionButtonContainer {
  display: flex;
  align-items: stretch;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 1px 8px;
  scrollbar-width: thin;
}

#logoInSubdivision,
#logoTextUpperLeft {
  display: none !important;
}

#permutationAnchor,
#helpAnchor,
#PermutationOptions {
  display: none !important;
}

.left-button {
  flex: 0 0 auto;
  display: block !important;
  color: var(--gl-muted) !important;
  background: var(--gl-card-soft);
  border: 1px solid var(--gl-border);
  border-radius: 12px;
  overflow: hidden;
  transform: none !important;
}

.left-button-content {
  min-width: 72px;
  height: 46px !important;
  padding: 3px 9px;
  border: 0 !important;
  font-family: inherit;
  font-size: 11px !important;
  letter-spacing: 0.01em;
}

.buttonFraction {
  display: inline-block !important;
  margin-right: 4px;
  font-size: 14px !important;
}

#timeSigLabel,
#timeSubLabel {
  color: inherit !important;
}

#timeSubLabel {
  color: var(--gl-blue) !important;
  font-weight: 800;
}

#subdivision_8ths .buttonFraction,
#subdivision_16ths .buttonFraction,
#subdivision_32ths .buttonFraction {
  margin-right: 0;
}

.left-button:hover {
  color: var(--gl-text) !important;
  background: #2b3a50 !important;
  border-color: #53627a;
}

.left-button.buttonSelected,
.left-button.buttonSelected:hover,
#advancedEditAnchor.buttonSelected {
  color: #241200 !important;
  background: var(--gl-green) !important;
  border-color: var(--gl-green) !important;
  transform: none !important;
}

.left-button.disabled,
.left-button.disabled:hover {
  color: #5f7180 !important;
  background: #0b1b2a !important;
  opacity: 0.55;
}

#TopNav {
  margin-top: 4px !important;
  padding: 10px 4px 1px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(57, 70, 93, 0.72) !important;
}

#upperLeft,
#upperRight {
  float: none !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

#metronomeLabel {
  color: var(--gl-muted) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.metronomeButton,
.rightButtons {
  height: auto !important;
  min-height: 32px;
  padding: 7px 10px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--gl-muted) !important;
  background: rgba(23, 44, 63, 0.72);
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  font-size: 12px;
  font-weight: 700;
}

.metronomeButton:hover,
.rightButtons:hover {
  color: var(--gl-text) !important;
  border-color: var(--gl-border) !important;
  transform: none !important;
}

.metronomeButton.buttonSelected,
.metronomeButton.selected,
.rightButtons.buttonSelected {
  color: #241200 !important;
  background: var(--gl-green) !important;
  border-color: var(--gl-green) !important;
}

.gl-editor-card {
  padding: 14px;
}

.gl-editor-heading {
  padding: 2px 4px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gl-editor-tip {
  color: var(--gl-muted);
  font-size: 12px;
  font-weight: 600;
}

#musicalInput {
  width: 100% !important;
  padding: 12px 10px 8px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: rgba(15, 21, 32, 0.58) !important;
  border: 1px solid var(--gl-border) !important;
  border-radius: 14px;
  text-align: center;
  white-space: nowrap !important;
}

#measureContainer {
  min-width: max-content;
  margin: 0 auto !important;
}

.staff-container {
  color: var(--gl-text);
  background: transparent !important;
  border-radius: 9px;
}

.line-labels {
  width: 112px !important;
  color: var(--gl-text);
  font-family: inherit;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.notes-row-container {
  display: inline-grid !important;
  grid-template-columns: 112px max-content;
  align-items: start;
}

.notes-row-container > .line-labels {
  display: grid !important;
  grid-template-rows: 42px 28px 28px 28px 56px;
  align-items: stretch;
  vertical-align: top;
}

.stickings-label,
.hh-label,
#tom1-label,
.snare-label,
#tom4-label,
.kick-label {
  margin-left: 0 !important;
  padding-right: 13px;
  color: var(--gl-muted);
  text-align: right !important;
}

.notes-row-container > .line-labels .hh-label,
.notes-row-container > .line-labels #tom1-label,
.notes-row-container > .line-labels .snare-label,
.notes-row-container > .line-labels #tom4-label,
.notes-row-container > .line-labels .kick-label {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: 0 !important;
  padding: 0 13px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 1;
}

.notes-row-container > .line-labels .hh-label {
  transform: translateY(10px);
}

.notes-row-container > .line-labels #tom1-label {
  transform: translateY(3px);
}

.notes-row-container > .line-labels .snare-label {
  transform: translateY(5px);
}

.notes-row-container > .line-labels #tom4-label {
  transform: translateY(7px);
}

.notes-row-container > .line-labels .kick-label {
  padding-top: 17px;
  align-items: flex-start;
}

.stickings-row-container > .line-labels {
  height: 32px;
  vertical-align: top;
}

.stickings-row-container .stickings-label {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  margin: 0 !important;
  padding: 0 13px 0 0;
  line-height: 32px;
}

#KeyButton {
  display: none !important;
}

.stickings-label,
.stickings-container {
  background: rgba(255, 159, 28, 0.09) !important;
}

.staff-line-1,
.staff-line-2,
.staff-line-3,
.staff-line-4,
.staff-line-5 {
  border-color: rgba(61, 169, 252, 0.28) !important;
  border-width: 1px !important;
}

.hi-hat,
.tom,
.snare,
.kick,
.sticking {
  margin-right: 3px !important;
  margin-left: 3px !important;
  border-radius: 7px;
  background: var(--gl-card-soft);
  border-color: transparent !important;
  transition: 120ms ease;
}

.hi-hat:hover,
.tom:hover,
.snare:hover,
.kick:hover,
.sticking:hover {
  background: #213d54;
  transform: translateY(-1px);
}

.hi-hat.gl-active,
.tom.gl-active,
.snare.gl-active,
.kick.gl-active,
.sticking.gl-active {
  background: var(--gl-green) !important;
  box-shadow: 0 0 0 1px rgba(255, 226, 190, 0.24), 0 5px 16px rgba(255, 159, 28, 0.2);
}

.gl-active .snare_circle,
.gl-active .kick_circle,
.gl-active .tom_circle {
  border-color: #3a1d00 !important;
}

.snare:not(.gl-active) .snare_circle,
.kick:not(.gl-active) .kick_circle,
.tom:not(.gl-active) .tom_circle {
  background: transparent !important;
  border-color: #607589 !important;
}

.hi-hat.gl-current,
.tom.gl-current,
.snare.gl-current,
.kick.gl-current {
  outline: 2px solid var(--gl-blue);
  outline-offset: 1px;
}

.background-highlight-container {
  opacity: 0.7;
}

#addMeasureButton,
.closeMeasureButton {
  color: var(--gl-blue) !important;
}

.gl-actions-card {
  padding: 0;
}

#bottomButtonRow {
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(94px, 1fr));
  gap: 8px;
  color: var(--gl-muted) !important;
  background: transparent !important;
}

.pageBottomButton {
  min-height: 62px;
  margin: 0 !important;
  padding: 9px 8px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gl-muted);
  background: rgba(23, 44, 63, 0.7);
  border: 1px solid transparent;
  border-radius: 9px;
  transition: 140ms ease;
}

.pageBottomButton:hover {
  color: var(--gl-text) !important;
  background: #1d3850;
  border-color: var(--gl-border);
}

.bottomButtonIcon,
.bottomButtonLabel {
  display: inline-block !important;
  margin: 0 !important;
}

.bottomButtonIcon .fa-2x {
  font-size: 1.25em;
}

.bottomButtonLabel {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#RightHandContent {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
}

.gl-utility-zone {
  display: block;
}

#PermutationOptions,
#midiTextOutput,
#GrooveDB_MetaData,
#debugDisplayArea {
  max-width: 100%;
}

.gl-license {
  width: min(calc(100% - 24px), 1000px);
  margin: 10px auto 28px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8194a6;
  font-size: 12px;
  border-top: 1px solid rgba(40, 68, 92, 0.65);
}

.gl-license a {
  color: var(--gl-green);
  text-decoration: none;
  font-weight: 700;
}

#fullURLPopup,
#metronomeAutoSpeedupConfiguration,
#timeSigPopup {
  position: fixed !important;
  inset: 50% auto auto 50% !important;
  width: min(calc(100vw - 28px), 470px) !important;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 22px !important;
  color: #13202d;
  background: #fbfbf7 !important;
  border: 1px solid #d9e0dc !important;
  border-radius: 14px !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
}

#grooveListWrapper {
  position: fixed !important;
  inset: 90px 18px auto auto !important;
  width: min(calc(100vw - 36px), 360px) !important;
  height: min(560px, calc(100vh - 118px)) !important;
  padding: 10px;
  color: #13202d;
  background: #fbfbf7 !important;
  border: 0 !important;
  border-radius: 12px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.noteContextMenu > ul.list {
  color: #13202d;
  background: #fbfbf7 !important;
  border: 1px solid #d9e0dc !important;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.noteContextMenu > ul.list li {
  border-color: #e3e8e5 !important;
}

.noteContextMenu > ul.list li:hover {
  background: #ffedd4 !important;
}

#fullURLPopupTextField {
  width: 100% !important;
  color: #13202d;
  background: #fff5e8 !important;
  border: 1px solid #e5b36e !important;
}

#fullURLPopupTextFieldContainer,
#fullURLPopupCheckboxes,
#metronomeAutoSpeedupConfigurationSliders {
  width: 100% !important;
}

#timeSigPopupOK,
#fullURLPopupCopyButton,
.sharer-0 label {
  color: #241200 !important;
  background: var(--gl-green) !important;
}

@media (max-width: 900px) {
  #grooveLabHeader {
    min-height: 72px;
    padding: 11px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .gl-brand-title {
    font-size: 22px;
  }

  .gl-brand-logo {
    width: 38px;
    height: 38px;
  }

  .gl-header-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .gl-header-button span {
    display: none;
  }

  #GrooveWriter {
    min-height: calc(100vh - 72px);
    padding: 10px 8px 20px;
  }

  .gl-workspace {
    gap: 10px;
  }

  .gl-score-card {
    padding: 10px 7px 7px;
  }

  #sheetMusicTextFields {
    justify-content: flex-start !important;
    max-width: 100%;
  }

  .gl-transport-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #TopNav {
    align-items: flex-start;
    flex-direction: column;
    overflow: hidden;
  }

  #upperLeft,
  #upperRight {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  #bottomButtonRow {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }

  .gl-editor-tip {
    display: none;
  }
}

@media (max-width: 560px) {
  #grooveLabHeader {
    min-height: 0;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .gl-brand {
    gap: 9px;
  }

  .gl-brand-title {
    font-size: 20px;
  }

  .gl-brand-logo {
    width: 34px;
    height: 34px;
  }

  .gl-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .gl-header-button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
  }

  #GrooveWriter {
    min-height: calc(100vh - 104px);
    padding: 8px 6px 18px;
  }

  .gl-card {
    border-radius: 13px;
  }

  .gl-transport-grid {
    position: sticky;
    top: max(6px, env(safe-area-inset-top));
    z-index: 40;
    width: 100%;
    min-width: 0;
    display: block;
  }

  .gl-player-card {
    position: relative;
    top: auto;
    z-index: auto;
    width: 100%;
    min-height: 58px;
    padding: 7px 8px;
    box-shadow: 0 12px 30px rgba(3, 9, 18, 0.32);
  }

  .playerControlsRow {
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 44px 58px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
  }

  .midiPlayImage {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
  }

  .MIDIPlayTime {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .tempoAndProgress {
    grid-column: 3;
    grid-row: 1;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
  }

  .tempoRow,
  .swingRow {
    width: 100% !important;
    min-width: 0 !important;
    height: 21px !important;
  }

  .tempoInput,
  .swingInput {
    min-width: 0 !important;
    margin: 6px 1px 0 0 !important;
  }

  .midiPlayImage,
  .midiRepeatImage {
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    line-height: 44px !important;
  }

  .tempoLabel,
  .swingLabel {
    width: 40px !important;
    padding: 0 !important;
    font-size: 9px !important;
    line-height: 18px !important;
  }

  .tempoTextField {
    width: 27px !important;
    height: 18px !important;
    margin: 0 3px !important;
    font-size: 12px !important;
  }

  .swingOutput {
    width: 31px !important;
    padding: 0 0 0 3px !important;
    font-size: 10px !important;
    line-height: 18px !important;
  }

  .gl-score-card {
    padding: 6px 5px;
    display: flex;
    flex-direction: column;
  }

  #sheetMusicDiv {
    order: 2;
  }

  #sheetMusicTextFields {
    order: 1;
    margin: 0 0 5px;
    padding: 6px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    overflow: visible;
    white-space: normal;
  }

  .sheetMusicTextField {
    width: 100%;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
  }

  .gl-title-field {
    grid-column: 1;
  }

  .gl-author-field,
  .gl-comment-field {
    display: none !important;
  }

  .sheetMusicInputField {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px;
    font-size: 16px;
  }

  #sheetMusicDiv,
  .svgTarget {
    min-height: 0;
    overflow-x: hidden;
  }

  .gl-score-card .svgTarget svg,
  #sheetMusicDiv .svgTarget svg {
    min-width: 0 !important;
    width: 100% !important;
  }

  .gl-tools-card,
  .gl-editor-card {
    padding: 8px;
  }

  .gl-tools-card {
    overflow: visible;
  }

  .gl-tools-heading {
    padding: 0 2px 7px;
  }

  .gl-tools-heading .gl-section-label,
  .gl-editor-heading .gl-section-label {
    font-size: 10px;
  }

  #divisionButtonContainer {
    gap: 5px;
    padding: 0 0 6px;
  }

  #subdivision_24ths,
  #advancedEditAnchor {
    display: none !important;
  }

  .left-button-content {
    min-width: 64px;
    height: 44px !important;
    padding: 2px 7px;
    font-size: 10px !important;
  }

  #TopNav {
    position: relative !important;
    margin-top: 0 !important;
    padding: 6px 0 0;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 5px;
    overflow: visible;
  }

  #upperLeft {
    grid-column: 1;
    min-width: 0;
    overflow: visible;
  }

  #upperRight {
    display: none !important;
  }

  #upperRight.gl-mobile-more-open {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 60;
    width: max-content;
    max-width: calc(100vw - 24px);
    padding: 6px !important;
    display: flex !important;
    justify-content: center;
    overflow: visible;
    background: #12253a;
    border: 1px solid var(--gl-border);
    border-radius: 11px;
    box-shadow: 0 14px 32px rgba(3, 9, 18, 0.38);
  }

  .gl-mobile-more-button {
    box-sizing: border-box;
    grid-column: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gl-muted);
    background: rgba(23, 44, 63, 0.72);
    border: 1px solid var(--gl-border);
    border-radius: 10px;
    font-size: 18px;
  }

  .gl-mobile-more-button[aria-expanded="true"] {
    color: #241200;
    background: var(--gl-green);
    border-color: var(--gl-green);
  }

  #metronomeLabel {
    font-size: 0;
    letter-spacing: 0;
  }

  #metronomeLabel::after {
    content: "CLICK:";
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .metronomeButton,
  .rightButtons {
    box-sizing: border-box;
    min-height: 44px;
    padding: 6px 9px !important;
    font-size: 11px;
  }

  .gl-editor-heading {
    padding: 1px 2px 8px;
  }

  #divisionButtonContainer,
  #upperLeft,
  #upperRight,
  #musicalInput,
  #bottomButtonRow {
    max-width: 100%;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #divisionButtonContainer::-webkit-scrollbar,
  #upperLeft::-webkit-scrollbar,
  #upperRight::-webkit-scrollbar,
  #musicalInput::-webkit-scrollbar,
  #bottomButtonRow::-webkit-scrollbar {
    display: none;
  }

  #metronomeContainer {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: max-content repeat(5, max-content);
    align-items: center;
    justify-content: space-between;
    gap: 2px;
  }

  .line-labels {
    width: 88px !important;
    font-size: 11px !important;
  }

  .notes-row-container {
    grid-template-columns: 88px max-content;
  }

  #bottomButtonRow {
    display: flex !important;
    overflow-x: auto;
  }

  .pageBottomButton {
    flex: 0 0 104px;
  }

  .gl-license {
    align-items: flex-start;
    flex-direction: column;
  }
}

@page {
  size: auto;
  margin: 0;
}

@media print {
  html,
  body,
  #GrooveWriter {
    min-height: 100% !important;
    background: #fff !important;
  }

  body {
    position: relative;
  }

  body::after {
    content: "suonarelabatteria.com";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 5mm;
    color: #555;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 9pt;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
  }

  #GrooveWriter {
    box-sizing: border-box;
    padding: 12mm 10mm 18mm !important;
  }

  .gl-score-card {
    padding: 0 !important;
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #grooveLabHeader,
  #sheetMusicTextFields,
  .gl-transport-grid,
  .gl-tools-card,
  .gl-editor-card,
  .gl-actions-card,
  .gl-license {
    display: none !important;
  }

  .gl-workspace {
    display: block !important;
  }

  #sheetMusicDiv .svgTarget svg {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
