/* KEYLAB 23 front panel (Nov 18 2026): one transport, one BPM, and ASR-style soft-key pages. */
.klp-hidden { display: none !important; }

/* ---- Transport: PLAY · REC · STOP ALL, then TEMPO ---- */
.transport-section .klp-transport { display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; width: auto !important; }
.console > *, .master-section > * { min-width: 0; }
.klp-bpm input { min-width: 0; }
.klp-transport button { min-height: 58px; padding: 7px 4px !important; font-size: 11px !important; letter-spacing: .06em; }
.klp-transport button span { display: block !important; font-size: 17px !important; margin: 0 0 4px !important; }
.klp-transport button small { display: block; margin-top: 3px; font-size: 8px; letter-spacing: .1em; opacity: .75; }
.klp-transport .klp-rec { background: linear-gradient(#5b3434, #3a2020); border-color: #9a5a52; color: #ffd9d2; }
.klp-transport .klp-rec span { color: #ff6b5b; }
.klp-transport #klp-play[aria-pressed="true"] { background: linear-gradient(#d6f2b8, #8fbf72); box-shadow: 0 0 14px #b9f99877, inset 0 1px 0 #fff8; }
.klp-transport .klp-rec[aria-pressed="true"] { background: linear-gradient(#ff8a78, #c0392b); color: #fff; box-shadow: 0 0 14px #ff6b5b88; }
.klp-bpm { margin-top: 14px; }
.klp-bpm input { width: 100%; background: #102d23 !important; color: #bff6bc !important; font: 700 20px 'Courier New', monospace !important; text-align: center; border: 4px solid #131619 !important; box-shadow: inset 0 0 10px #0009 !important; }
.transport-section .toggle { display: none; }

/* ---- LOAD SAMPLE beside the Sound menu ---- */
.klp-load { width: 100%; margin-top: 8px; min-height: 38px; font-size: 11px !important; letter-spacing: .12em; background: linear-gradient(#e2bd7e, #ad7844) !important; border-color: #f2d19c !important; color: #1b1c1b !important; }

/* ---- Progression PLAY and LOOP sit by the pads ---- */
.bank-section .section-strip { flex-wrap: wrap; gap: 10px; }
.klp-prog-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.klp-prog-tools #progPlay { min-height: 36px; padding: 6px 14px; font-size: 11px; letter-spacing: .08em; }
.klp-prog-tools #progPlay[aria-pressed="true"] { background: linear-gradient(#d6f2b8, #8fbf72); color: #152213; }
.klp-prog-tools .toggle { margin: 0; }

/* ---- Soft keys (sticky, like the buttons under an ASR-10 display) ---- */
.klp-pages { margin-top: 18px; }
.klp-softkeys { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px; border: 2px solid #4b4d52; border-radius: 8px; background: linear-gradient(#2c2d32, #1d1e22); box-shadow: 0 10px 24px #0008, inset 0 1px 0 #5c5e64; }
.klp-softkeys button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 58px; padding: 9px 12px 9px 30px; text-align: left; border-radius: 5px; border: 1px solid #5d5f66; background: linear-gradient(#4a4c53, #303237); box-shadow: 0 3px 0 #111216, inset 0 1px 0 #77777c; color: #e9e6df; }
.klp-softkeys button b { font-size: 13px; letter-spacing: .14em; }
.klp-softkeys button small { font-size: 10px; font-weight: 400; color: #aeb2b8; letter-spacing: .02em; }
.klp-softkeys button i { position: absolute; left: 11px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; background: #1d2a1f; box-shadow: inset 0 0 2px #000; }
.klp-softkeys button[aria-pressed="true"] { background: linear-gradient(#5a5c63, #3b3d43); border-color: #c8aa7e; color: #fff; }
.klp-softkeys button[aria-pressed="true"] b { color: #f1d39d; }
.klp-softkeys button[aria-pressed="true"] i { background: #b9f998; box-shadow: 0 0 8px #b9f998; }
.klp-softkeys button.klp-flash i { animation: klp-flash 1.6s ease-out; }
@keyframes klp-flash { 0%, 30%, 60% { background: #ffcf86; box-shadow: 0 0 10px #ffcf86; } 15%, 45%, 100% { background: #1d2a1f; box-shadow: inset 0 0 2px #000; } }

.klp-page { padding-top: 18px; }
.klp-page > section, .klp-page > .panel { margin-top: 0 !important; }
.klp-page > * + * { margin-top: 22px !important; }
.klp-page[data-page="chords"] > .bank-section { border-top: 0; padding-top: 0; }
.klp-page[data-page="sample"] > .sample-panel { max-width: 980px; margin: 0 auto !important; }
.klp-page[data-page="sample"] .sample-play-control { margin: 16px 0; }

/* ---- Sequencer: the top transport runs it; its readout stays ---- */
.kl-transport-actions { display: none !important; }
.kl-grid:has(.kl-empty-pads) { height: auto !important; min-height: 150px; contain: none !important; }

/* ---- Note repeat: one compact strip under the keys ---- */
.note-repeat-panel { padding: 12px 0 18px !important; }

/* ---- Phones ---- */
@media (max-width: 700px) {
  .klp-softkeys { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 6px; }
  .klp-softkeys button { min-height: 48px; padding: 18px 4px 6px; align-items: center; text-align: center; }
  .klp-softkeys button b { font-size: 10px; letter-spacing: .06em; }
  .klp-softkeys button small { display: none; }
  .klp-softkeys button i { left: 50%; top: 8px; margin: 0 0 0 -4px; width: 7px; height: 7px; }
  .transport-section { flex-direction: column; align-items: stretch !important; }
  .transport-section .klp-transport { width: 100% !important; }
  .klp-transport button { min-height: 48px; }
  .klp-bpm { margin-top: 0; }
  .klp-prog-tools { width: 100%; margin-left: 0; justify-content: space-between; }
}
