/* Jam layout (new). Desktop and tablet only; phones keep the classic layout.
   Uses the app's theme variables so every appearance works. */
@media (min-width: 701px) {
  html.jam-b #practice .loop-panel { display: none; }
  html.jam-b #practice .fret-panel > .panel-heading {
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  /* Once scrolled past, the heading becomes a full-width toolbar fixed to the
     top of the window, aligned with the panel; a spacer keeps its place. */
  html.jam-b #practice .fret-panel > .panel-heading.jamb-stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    margin: 0;
    padding: calc(10px + env(safe-area-inset-top, 0px)) var(--jamb-pr, 24px) 10px var(--jamb-pl, 24px);
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 10px 24px -14px #000a;
  }
  html.jam-b #practice .fret-panel > .panel-heading.jamb-stuck h2 { display: none; }
  html.jam-b #practice .fret-panel > .panel-heading h2 { font-size: 1.15rem; margin: 2px 0 0; }
  html.jam-b .jamb-band { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  html.jam-b .jamb-label { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  html.jam-b #jambBand { min-height: 40px; font-size: .875rem; }
  html.jam-b .jamb-surprise { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--accent); background: transparent; color: var(--accent); font-size: .85rem; font-weight: 600; cursor: pointer; }
  html.jam-b .jamb-surprise:hover { background: var(--accent-soft); border-style: solid; }
  html.jam-b .jamb-surprise.is-rolling svg { animation: jamb-roll .45s ease-out; }
  @keyframes jamb-roll { from { transform: rotate(-200deg) scale(.7); } to { transform: none; } }
  html.jam-b .jamb-chip-wrap { position: relative; }
  html.jam-b .jamb-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font-size: .875rem; cursor: pointer; }
  html.jam-b .jamb-chip i { font-style: normal; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  html.jam-b .jamb-chip[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
  html.jam-b .jamb-chip.is-off span:not(.jamb-caret) { color: var(--muted); }
  html.jam-b .jamb-caret { font-size: .7rem; color: var(--muted); }
  html.jam-b .jamb-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: 320px; max-width: calc(100vw - 32px); max-height: min(70vh, 560px); overflow-y: auto; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 18px 50px #0007; display: grid; gap: 14px; }
  html.jam-b .jamb-pop[hidden] { display: none; }
  html.jam-b .jamb-pop-right { left: auto; right: 0; }
  html.jam-b .jamb-pop > * { margin: 0; padding: 0; border: 0; min-width: 0; }
  html.jam-b .jamb-pop select { width: 100%; }
  html.jam-b .jamb-pop .saved-loops > summary { display: none; }
  html.jam-b .jamb-pop .saved-loops-body { padding: 0; }
  html.jam-b .jamb-switch { margin-left: auto; font-size: .82rem; color: var(--muted); }
  html.jam-b .jamb-switch:hover { color: var(--text); }
}
@media (prefers-reduced-motion: reduce) { html.jam-b .jamb-chip { transition: none; } html.jam-b .jamb-surprise.is-rolling svg { animation: none; } }
@media (max-width: 700px) { html.jam-b .jamb-band { display: none; } }
/* Shown only in the classic layout. */
.jam-layout-try { margin-left: auto; font-size: .82rem; color: var(--muted); }
.jam-layout-try:hover { color: var(--text); }
@media (max-width: 700px) { .jam-layout-try { display: none; } }
