/* Share the app's surfaces, type, controls and light/dark theme tokens. */
.display-shortcut-button-arpeggios svg { width: 20px; height: 20px; fill: none; }
.display-shortcut-button-arpeggios .arpeggio-note-stems { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.display-shortcut-button-arpeggios .arpeggio-note-heads { fill: currentColor; stroke: none; }
/* Use the triad trainer's control blocks, shape chips, scale card, and label buttons. */
.arp-layout { display: grid; gap: 10px; width: min(100%, 850px); margin-inline: auto; min-width: 0; }
body:not(.is-native-app).arpeggio-trainer-active .main-view-heading-row { width: min(100%, 850px); }
.arp-main-controls.control-block { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-items: center; min-width: 0; }
.arp-layout .control-block { padding: 10px; gap: 6px; min-width: 0; align-content: center; }
.arp-key-fields { display: grid; grid-template-columns: .55fr 1fr 1.2fr; gap: 10px; }
.arp-field { min-width: 0; gap: 5px; }
.arp-shape-block { display: grid; gap: 5px; min-width: 0; }
.arp-field select { width: 100%; min-width: 0; transition: none; }
:root:not(.keyboard-dropdown-focus) .arp-field select:focus { outline: none; }
.arp-shapes { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; padding: 0; }
.arp-shapes > label, .arp-shapes > label span { min-width: 0; width: 100%; }
.arp-shapes > label span { padding-inline: 0; }
.arp-shapes > label { -webkit-tap-highlight-color: transparent; }
.arp-transport { display: flex; align-items: center; gap: 10px; min-width: 0; }
.arp-transport .arp-play { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 72px; width: auto; flex-shrink: 0; height: 36px; min-height: 36px; padding: 5px 8px; border-radius: var(--action-control-radius); font: 600 12px var(--sans-stack); }
.arp-tempo-slider { display: flex; align-items: center; flex: 1; min-width: 32px; }
#arp-tempo-slider { margin: 0; }
.arp-tempo-number { display: grid; justify-items: center; gap: 1px; flex: 0 0 46px; }
#arp-tempo { width: 46px; min-width: 0; min-height: 28px; padding: 2px; border: 0; border-bottom: 1px solid var(--panel-border); background: transparent; border-radius: 0; box-shadow: none; color: var(--ink); text-align: center; font: 600 14px var(--sans-stack); appearance: textfield; }
#arp-tempo::-webkit-inner-spin-button, #arp-tempo::-webkit-outer-spin-button { appearance: none; margin: 0; }
.arp-tempo-number > span { font-size: 9px; line-height: 1; color: var(--muted); }
.arp-stage.progression-scale-card { position: relative; display: grid; gap: 3px; width: 100%; min-width: 0; padding: 12px; margin: 0; }
.arp-stage-heading { display: flex; align-items: baseline; justify-content: center; gap: 10px; min-height: 26px; padding-inline: 36px; min-width: 0; }
.arp-stage-heading .progression-scale-title { margin: 0; font-size: 18px; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arp-formula { flex: 0 0 auto; font-size: 13px; line-height: 1.2; white-space: nowrap; color: var(--muted); }
.arp-fretboard-wrap { width: min(100%, 570px); margin-inline: auto; aspect-ratio: 432 / 210; }
.arp-fretboard.scale-diagram { pointer-events: auto; display: block; width: 100%; height: 100%; min-width: 0; max-width: none; margin: 0; overflow: visible; }
.arp-fret-number, .arp-string-name { fill: var(--muted); font: 11px var(--sans-stack); text-anchor: middle; }
.arp-fret { stroke-opacity: .23; }
.arp-string { stroke-opacity: .6; }
.arp-note-label { fill: #fff; font: 600 13px var(--sans-stack); text-anchor: middle; pointer-events: none; }
:root[data-theme='dark'] .arp-dot:not(.arp-root) .arp-note-label { fill: #1b1008; }
.arp-note-hitbox { fill: transparent; stroke: none; }
/* Match the scale outline-to-dot ratio: these dots have radius 13, versus 7.5. */
.arp-fretboard {
  --playback-outline-width: 7.8;
  --playback-outline-peak-width: 10.833333;
}
.arp-dot { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.arp-dot:focus-visible .scale-dot:not(.is-practice-active) { stroke: #35a7ff; stroke-width: 3; paint-order: stroke fill; }
.arp-labels { display: flex; justify-content: center; gap: 5px; }
.arp-labels .scale-marker-label-button { width: auto; min-width: 66px; height: 25px; padding: 3px 9px; font-size: 10px; }
.arp-caption { display: grid; grid-template-rows: 15px; text-align: center; font-size: 10px; line-height: 15px; color: var(--muted); }
.arp-position { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arp-options-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; min-width: 0; }
.arp-toggles { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; justify-content: space-between; }
.arp-check { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--ink); min-height: 24px; cursor: pointer; white-space: nowrap; }
.arp-check input { accent-color: var(--accent); margin: 0; }
.arp-transport-block { grid-column: 1 / -1; }
.arp-status { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.arp-status:empty { display: none; }
.arp-layout :is(button, input, select, summary, a) { -webkit-tap-highlight-color: transparent; }
.arp-layout :is(button, input, select, summary, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) and (orientation: portrait) {
  .arp-main-controls.control-block { grid-template-columns: 1fr; gap: 8px; }
  .arp-layout { gap: 7px; }
  .arp-layout .control-block { padding: 10px; }
  .arp-shapes > label span { min-height: 29px; }
}
@media (max-width: 360px) and (orientation: portrait) {
  .arp-main-controls.control-block { gap: 4px; padding: 8px 10px; }
  .arp-field select { min-height: 29px; height: 29px; line-height: normal; padding: 3px 18px 3px 6px; }
  .arp-field { gap: 3px; }
  .arp-key-fields, .arp-options-fields { gap: 6px; }
  .arp-stage.progression-scale-card { padding: 8px; gap: 4px; }
}
@media (orientation: landscape) and (max-height: 540px) and (min-width: 500px) {
  .arp-layout { gap: 6px; }
  .arp-main-controls.control-block { gap: 6px 12px; padding: 8px 10px; }
  .arp-field select { min-height: 28px; height: 28px; line-height: normal; padding: 3px 22px 3px 8px; }
  .arp-field, .arp-shape-block { gap: 3px; }
  .arp-shapes > label span { min-height: 28px; }
  .arp-stage.progression-scale-card { padding: 6px; gap: 2px; }
  .arp-caption { grid-template-rows: 13px; font-size: 9px; line-height: 13px; }
}
@media (hover: none) {
  .arp-layout :is(button, summary, select) { transition: none; }
  .arp-labels .scale-marker-label-button:not(.is-active):hover { background: var(--surface-card-muted); color: var(--ink); }
}
/* Keep the grid item's intrinsic toolbar width from widening a narrow page. */
body.arpeggio-trainer-active .control-deck { min-width: 0; }
.arp-caption > span { grid-area: 1 / 1; }
.arp-caption:has(.arp-position:not(:empty)) > [data-arp-legend] { visibility: hidden; }
@media (max-width: 360px) {
  body.arpeggio-trainer-active .app-header-actions { min-width: 0; max-width: 100%; }
  body.arpeggio-trainer-active .display-shortcut-actions { gap: 3px; }
  body.arpeggio-trainer-active :is(.display-shortcut-actions, .web-app-shortcut-row) :is(.display-shortcut-button, .app-menu-button, .web-app-menu-button) { width: 34px; min-width: 34px; min-height: 34px; height: 34px; }
  body.arpeggio-trainer-active .web-app-shortcut-row { gap: 3px; }
}
@media (orientation: landscape) and (max-height: 540px) and (min-width: 500px) {
  .arp-fretboard-wrap { width: min(100%, 320px); }
}
@media (orientation: landscape) and (max-height: 360px) and (min-width: 500px) {
  .arp-field select { padding: 3px 14px 3px 5px; }
  .arp-field::after { right: 5px; width: 9px; }
  .arp-fretboard-wrap { width: min(100%, 320px); }
  .arp-stage.progression-scale-card { gap: 2px; }
  .arp-stage-heading { gap: 6px; min-height: 16px; }
}

@media (orientation: landscape) and (min-width: 500px) {
  .arp-toggles { grid-column: 2; grid-row: 2; align-self: end; margin-bottom: 2px; }
  .arp-transport-block { grid-column: 1 / -1; grid-row: 3; width: min(100%, 440px); justify-self: center; }
}
/* Longer translated toggle labels may need two lines instead of overflowing. */
:root:not([lang='en']) .arp-toggles { flex-wrap: wrap; justify-content: flex-start; gap: 2px 10px; }
:root:not([lang='en']) .arp-caption { grid-template-rows: minmax(15px, auto); }
