/* ios.css — iPad / iOS polish for the practice app.

   Shared by every page in this folder. Concerns:
   - kill the iOS 300ms tap delay on interactive elements
   - remove the gray tap-highlight box on touch
   - safe-area insets for installed-PWA mode on iPhone/iPad
   - widen the 520px app shell when there's room (iPad landscape)
   - bigger pad hit targets on coarse pointers (touch)
   - no rubber-band scroll when running fullscreen
*/

button, a, [role="button"], input, select, label, summary,
.pad, .city, .city-cube, .pattern-row, .kit-row,
.midi-cell, .tab, .nav-tab, .practice-nav-tab,
.practice-nav-home, .deck, .deck-control,
.play-btn, .stop-btn, .bpm-btn, .knob, .pattern-cell {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Drum pads + drag knobs need to swallow gestures so multi-finger play +
   knob-drag don't trigger page scroll. */
.pad, [data-pad], .knob, .drag-target {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Safe-area insets when launched from Home Screen. */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* No bounce / overscroll inside the installed-PWA shell. */
@media (display-mode: standalone), (display-mode: fullscreen) {
  html, body { overscroll-behavior: none; }
  /* Hint that this is the installed app: pads sit above the home indicator. */
  .pads, .transport, footer {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

/* iPad landscape — the practice shell is 520px wide by design (phone-first),
   but on a big screen that wastes space. Widen modestly without breaking the
   pad math. */
@media (min-width: 820px) and (orientation: landscape) {
  .app { max-width: min(840px, 90vw); }
}

/* Coarse pointer = touch. Make the four finger-drum pads taller so they
   feel like real pads under a thumb. */
@media (pointer: coarse) {
  .pad { min-height: 84px; }
}

/* When the app is installed on home screen, hide the in-page nav home
   link (you're already inside the app — no need to go "back" to a URL).
   Falls back to showing it in plain Safari. */
html.standalone .practice-nav-home-label { display: none; }
