/* Page scaffold + responsive grid — UI v2 */
.wrap { max-width: 1160px; margin: 0 auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.topBar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0 12px; position: relative;
}
.appGrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.appGrid > * { min-width: 0; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px; position: relative;
}
.transport { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 16px; }
.layersPanel { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wFull { width: 100%; }
.grow { flex: 1 1 220px; min-width: 200px; }
/* Tablet: una columna, layers debajo */
@media (max-width: 1023px) {
  .appGrid { grid-template-columns: 1fr; }
}
/* Mobile: fullscreen transport + bottom sheet */
@media (max-width: 599px) {
  .wrap { padding: 8px 12px 0; }
  h1 { margin: 4px 0 0; font-size: 11px; }
  .topBar { flex-wrap: wrap; justify-content: center; }
  .transport { min-height: calc(100dvh - 210px); justify-content: center; }
  .dialStack { --orb: min(58vw, 42vh); }
  .appGrid { display: block; }
  .layersPanel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: none;
    padding: 6px 16px calc(12px + env(safe-area-inset-bottom));
    max-height: 64px; overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .layersPanel.expanded { max-height: min(60vh, 420px); overflow: auto; }
  .sheetHandle {
    display: flex; justify-content: center; width: 100%;
    background: none; border: none; padding: 4px 0 8px;
  }
  .sheetHandle span { width: 42px; height: 4px; border-radius: 2px; background: #3a4258; display: block; }
  .shortcutsHint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .layersPanel { transition: none; } }
/* Touch targets */
@media (pointer: coarse) {
  .layerBtn { min-width: 44px; min-height: 44px; }
  .pill, .toggle { min-height: 44px; }
  .tempoBar { min-height: 44px; }
  .layerRow { padding: 12px; }
}
