/* All Aboard: app-mode styles. Link after style.css. */

/* Installed app: no rubber-band scrolling, no text selection, no long-press callouts,
   and keep content clear of the iPad's rounded corners and home bar. */
html.is-app, html.is-app body {
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* the bottom card tray sits above the home indicator */
html.is-app #tray {
  padding-bottom: calc(env(safe-area-inset-bottom) + 6px);
}
input, textarea { -webkit-user-select: text; user-select: text; }
button, a, [role="button"] { touch-action: manipulation; } /* no double-tap zoom delay */

/* Offline strip */
html.is-offline body::before {
  content: "Offline: reconnecting…";
  position: fixed; z-index: 9999; top: env(safe-area-inset-top); left: 50%; transform: translateX(-50%);
  background: #a8322d; color: #fff; font: 600 14px/1 system-ui, sans-serif;
  padding: 8px 14px; border-radius: 0 0 10px 10px;
}

/* Install chip */
.aa-install-chip {
  position: fixed; z-index: 9000; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  background: #16324f; color: #f4ebd9; border-radius: 14px; padding: 8px 8px 8px 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.3); font: 15px/1.2 system-ui, sans-serif;
  animation: aa-up .3s ease-out;
}
.aa-install-chip img { width: 34px; height: 34px; border-radius: 8px; }
.aa-install-chip .go {
  font: inherit; font-weight: 700; background: #d8a840; color: #16324f; border: 0;
  border-radius: 10px; padding: 8px 14px; cursor: pointer;
}
.aa-install-chip .x {
  font: 22px/1 system-ui; background: none; border: 0; color: #f4ebd9; opacity: .7;
  padding: 4px 8px; cursor: pointer;
}
@keyframes aa-up { from { transform: translateY(20px); opacity: 0; } }

/* iPad "Add to Home Screen" help */
.aa-ios-help {
  position: fixed; inset: 0; z-index: 9500; background: rgba(10,20,32,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.aa-ios-help .card {
  background: #f4ebd9; color: #1e2a3a; border-radius: 18px; padding: 26px 28px; max-width: 420px;
  font: 16px/1.5 system-ui, sans-serif; text-align: center;
}
.aa-ios-help img { width: 72px; height: 72px; border-radius: 16px; }
.aa-ios-help h3 { margin: 10px 0 12px; font-size: 21px; }
.aa-ios-help ol { text-align: left; margin: 0 0 12px; padding-left: 22px; }
.aa-ios-help .share { display: inline-block; transform: rotate(-90deg); }
.aa-ios-help button {
  font: inherit; font-weight: 700; background: #16324f; color: #f4ebd9; border: 0;
  border-radius: 10px; padding: 10px 24px; cursor: pointer;
}

/* Toast */
.aa-toast {
  position: fixed; z-index: 9600; left: 50%; top: calc(14px + env(safe-area-inset-top));
  transform: translateX(-50%); background: #1e2a3a; color: #f4ebd9;
  font: 600 15px/1 system-ui, sans-serif; padding: 11px 18px; border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: aa-up .25s ease-out;
}
