/* iPhone layout on top of the desktop ui.html: full screen, safe areas, no window chrome */
html, body { background: #101217 !important; }
body.phone {
  height: 100vh; height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
/* the page background is solid on a phone (there's no desktop to see through) */
body.phone { --bg-a: 1 !important; --tile-a: 1 !important; }
body.phone #pinBtn, body.phone #hideBtn, body.phone #grip { display: none !important; }
body.phone .tabs { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
/* inputs at 16px stop iOS zooming in when a field is tapped */
body.phone input, body.phone select, body.phone textarea { font-size: 16px; }
.integration-group [hidden] { display: none !important; }
.integration-group .integration-block { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.integration-group .integration-block:last-child { border-bottom: 0; }
.integration-group .integration-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.integration-group .integration-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0 2px; flex-wrap: wrap; }
.integration-group .integration-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.integration-group .integration-switches .row { padding: 8px 0; }
body.phone.offline .titlebar .brand::after { content: " · reconnecting…"; color: #f0b56a; }

#pairOverlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: #101217; padding: 24px; padding-top: calc(24px + env(safe-area-inset-top));
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: #e9ecf1;
}
#pairOverlay .pair-card { width: 100%; max-width: 360px; text-align: center; }
#pairOverlay .pair-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px;
  background: url(icon-180.png) center/cover; }
#pairOverlay h2 { font-size: 22px; margin-bottom: 8px; }
#pairOverlay p { color: #9aa3b2; margin-bottom: 18px; }
#pairOverlay input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid #2a2f3a;
  background: #171a21; color: #e9ecf1; font-size: 16px; margin-bottom: 10px; }
#pairOverlay button { width: 100%; padding: 13px; border: 0; border-radius: 12px; font-weight: 600; font-size: 16px;
  background: linear-gradient(145deg, #ffc56b, #fb8c4a); color: #2a1606; }
#pairOverlay .desktop-download-link { display: inline-block; margin-top: 16px; color: #ffc46b; font-size: 14px;
  text-decoration: none; border-bottom: 1px solid rgba(255,196,107,.35); }
#pairOverlay .desktop-download-link:hover { color: #ffd99d; border-bottom-color: currentColor; }
