/* Interaction references: Watermelon UI Show QR and Dialog Stack.
   Original, framework-free implementation using RoomMate's shared tokens. */
html { scrollbar-gutter: stable; }
.pilot-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.24);
  overscroll-behavior: contain;
}
.pilot-dialog::backdrop { background: rgb(0 0 0 / 0.58); }
.pilot-dialog[open] { animation: pilot-enter 200ms ease-out; }
html[data-pilot-open="true"] { overflow: hidden; }
.pilot-surface { padding: 24px 28px 28px; }
.pilot-surface [hidden] { display: none !important; }
.pilot-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.pilot-bar__label { display: flex; align-items: center; gap: 10px; font: 500 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.pilot-bar__label img { width: 24px; height: 24px; }
.pilot-close, .pilot-back {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 8px;
  border: 1px solid var(--divider); border-radius: var(--radius-1);
  color: var(--text-secondary); background: var(--surface);
  transition: background-color 150ms, color 150ms;
}
.pilot-close:hover, .pilot-back:hover { color: var(--text-primary); background: var(--surface-elevated); }
.pilot-back { gap: 8px; padding-inline: 12px; font-size: 14px; }
.pilot-heading { font-size: 30px; line-height: 1.12; letter-spacing: -0.025em; }
.pilot-heading:focus { outline: none; }
.pilot-description { margin-top: 12px; color: var(--text-secondary); font-size: 16px; line-height: 1.6; }
.pilot-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.pilot-platform {
  display: flex; position: relative; flex-direction: column; align-items: flex-start;
  min-width: 0; padding: 22px 20px 18px; min-height: 168px; text-align: left;
  border: 1px solid var(--divider); border-radius: var(--radius-3);
  background: var(--canvas); color: var(--text-primary); text-decoration: none;
  transition: border-color 150ms, background-color 150ms, transform 150ms;
}
.pilot-platform:hover, .pilot-platform:focus-visible { border-color: var(--brand-text); background: var(--brand-subtle); color: var(--text-primary); }
.pilot-platform:active { transform: scale(0.96); }
.pilot-platform__icon { margin-bottom: 24px; color: var(--brand-text); }
.pilot-platform strong { font-size: 20px; font-weight: 500; line-height: 1.3; }
.pilot-platform small { margin-top: 2px; font-size: 13px; color: var(--text-secondary); }
.pilot-platform__arrow { position: absolute; right: 16px; top: 22px; color: var(--text-secondary); transition: transform 150ms; }
.pilot-platform:hover .pilot-platform__arrow { transform: translateX(3px); }
.pilot-footnote { margin-top: 24px; font-size: 13px; color: var(--text-secondary); }
.pilot-detail:not([hidden]), .pilot-choose:not([hidden]) { animation: pilot-enter 180ms ease-out; }
.pilot-detail .pilot-heading { margin-top: 22px; font-size: 28px; }
.pilot-code { width: 224px; max-width: 100%; margin: 24px auto; background: #fff; border-radius: 12px; overflow: hidden; }
.pilot-code svg { width: 100%; height: auto; display: block; }
.pilot-direct { width: 100%; text-align: center; }
.pilot-destination { margin-top: 12px; font: 500 11px/1.5 var(--font-mono); color: var(--text-secondary); text-align: center; overflow-wrap: anywhere; }
.pilot-pending { display: grid; justify-items: center; gap: 12px; margin-block: 24px; padding: 28px 16px; border: 1px dashed var(--divider); border-radius: var(--radius-3); background: var(--canvas); text-align: center; }
.pilot-pending svg { color: var(--brand-text); }
.pilot-pending p { max-width: 28ch; color: var(--text-secondary); font-size: 14px; }
.pilot-qr-error { margin-block: 24px; color: var(--text-secondary); font-size: 14px; }
.pilot-page { padding-block: 64px 80px; }
.pilot-page > .page-shell { max-width: 640px; }
.pilot-page h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 24px; }
.pilot-page .pilot-surface { border: 1px solid var(--divider); border-radius: 16px; background: var(--surface); }
.pilot-page__fallback { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--divider); }
.pilot-page__fallback h2 { font-size: 24px; margin-bottom: 12px; }
.pilot-page__fallback p + p { margin-top: 12px; }
@keyframes pilot-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 420px) {
  .pilot-surface { padding: 20px; }
  .pilot-bar { margin-bottom: 20px; }
  .pilot-heading { font-size: 28px; }
  .pilot-platform { padding: 20px 16px 16px; min-height: 156px; }
  .pilot-platform__arrow { right: 12px; }
  .pilot-page { padding-block: 36px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .pilot-dialog[open], .pilot-detail:not([hidden]), .pilot-choose:not([hidden]) { animation: none; }
  .pilot-platform, .pilot-platform__arrow, .pilot-close, .pilot-back { transition: none; }
  .pilot-platform:active, .pilot-platform:hover .pilot-platform__arrow { transform: none; }
}
