[data-view-controls-open], .stage-top-actions [data-view-controls-open] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #425638;
  border-radius: 8px;
  color: #d3e4c2;
  font-size: 12px;
  white-space: nowrap;
}

.cloud-app.has-view-controls .main-app {
  padding-bottom: var(--view-toolbar-height, 132px);
}

.cloud-app.has-view-controls.stage-mode .main-app { padding: 0; }

.cloud-app.has-view-controls.stage-mode .sheet-scroll {
  top: var(--view-sheet-top, 66px);
  bottom: var(--view-toolbar-height, 132px);
}

.has-view-controls.view-hide-navigation #playbackBar > :not(#stageSoundTools),
.has-view-controls.view-hide-sound #stageSoundTools,
.has-view-controls.view-hide-navigation.view-hide-sound #playbackBar {
  display: none !important;
}

.has-view-controls:is(.view-hide-navigation, .view-hide-sound) #playbackBar {
  min-height: 0;
}

.has-view-controls.view-hide-navigation #stageSoundTools {
  padding-top: 0;
  border-top: 0;
}

.cloud-app.has-view-controls.stage-mode.view-hide-header .stage-top {
  height: auto;
  min-height: 44px;
  padding: 6px clamp(12px, 2.4vw, 30px);
  border-bottom-color: #293522;
}

.stage-mode.view-hide-header .stage-top :is(.brand-small, #stageKey, .stage-top-actions) {
  display: none !important;
}

.stage-mode.view-hide-header .stage-song-heading { width: 100%; }

.stage-mode.view-hide-header .stage-song-heading #stageTitle {
  display: -webkit-box;
  width: 100%;
  max-width: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 15px;
  line-height: 1.35;
}

#stageTitle[role="button"] { cursor: pointer; }
#stageTitle[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.stage-mode.is-stage-focus #harmonicField,
.stage-mode.is-stage-focus .view-controls-restore {
  display: none !important;
}

.cloud-app.has-view-controls.stage-mode.is-stage-focus .sheet-scroll { bottom: 0; }

.view-controls-restore {
  position: fixed;
  z-index: 12;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--view-toolbar-height, 0px) + 10px + env(safe-area-inset-bottom));
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #647c4b;
  background: #23341ded;
  color: #e0f1c9;
  font-size: 12px;
  box-shadow: 0 4px 16px #0006;
}

.view-controls-restore[hidden] { display: none !important; }
.is-landing .view-controls-restore, .is-dashboard .view-controls-restore { display: none !important; }

.has-view-controls .toast { bottom: calc(var(--view-toolbar-height, 0px) + 16px); }

.view-controls-dialog {
  width: min(480px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #526945;
  border-radius: 16px;
  background: #192216;
  color: #e7eedf;
}

.view-controls-dialog .dialog-heading h2 { margin: 0; font-size: 23px; }
.view-controls-help, .view-controls-focus-help { color: #b7c5ac; font-size: 13px; line-height: 1.6; }
.view-controls-help { margin: 14px 0 18px; }
.view-controls-options { display: grid; gap: 9px; }
.view-controls-choice {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #3e5134;
  border-radius: 9px;
  background: #141d11;
  cursor: pointer;
}
.view-controls-choice[hidden] { display: none !important; }
.view-controls-choice:has(input:checked) { border-color: #748b53; background: #26331e; }
.view-controls-choice input { flex: none; width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.view-controls-choice strong, .view-controls-choice small { display: block; }
.view-controls-choice strong { font-size: 14px; color: #e2ecd8; font-weight: 600; }
.view-controls-choice small { margin-top: 4px; font-size: 12px; color: #acbea0; line-height: 1.5; }
.view-controls-dialog .view-stage-focus { width: 100%; min-height: 42px; margin-top: 20px; font-size: 14px; }
.view-stage-focus[hidden], .view-controls-focus-help[hidden] { display: none !important; }
.view-controls-focus-help { margin: 8px 0 0; font-size: 12px; }
.view-controls-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 20px; }
.view-controls-actions button { min-height: 40px; padding: 8px 13px; font-size: 13px; }

@media (max-width: 600px) {
  .cloud-app.has-view-controls.stage-mode .stage-top-actions .stage-arrow-button { display: none; }
  [data-view-controls-open], .stage-top-actions [data-view-controls-open] { min-height: 36px; padding: 6px 8px; }
  .view-controls-dialog { padding: 19px; }
}

@media (max-width: 360px) {
  .cloud-app.has-view-controls.stage-mode .stage-top { flex-wrap: wrap; height: auto; gap: 8px; padding-block: 8px; }
  .stage-top .stage-song-heading { flex-basis: 100%; }
  .stage-top .stage-top-actions { width: 100%; }
  .stage-top-actions #exitStage { margin-left: auto; }
}

@media print {
  .view-controls-dialog, .view-controls-restore, [data-view-controls-open] { display: none !important; }
  .cloud-app.has-view-controls .main-app { padding-bottom: 0; }
}
