/* Mobile remote page. Sized for a phone first; the desktop rules only keep it
   from looking broken when opened on a laptop for debugging. */

:root {
  --bg: #f8f8f8;
  --fg: #262626;
  --muted: #737373;
  --card: #ffffff;
  --border: rgba(13, 13, 13, 0.1);
  --accent: #0d9488;
  --error: #e03131;
  --radius-lg: 0.75rem;
  --page-margin: 20px;
  --text-base: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --fg: #e5e5e5;
    --muted: #a3a3a3;
    --card: #2b2b2b;
    --border: rgba(250, 250, 250, 0.1);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: var(--text-base) / 1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: max(var(--page-margin), env(safe-area-inset-top)) var(--page-margin) max(var(--page-margin), env(safe-area-inset-bottom));
}

#app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100dvh;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

h1 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }

.muted { color: var(--muted); font-size: 13px; margin: 0; }

button {
  appearance: none;
  border: none;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  min-height: 40px;
  margin-top: 12px;
  cursor: pointer;
}

button:active { opacity: 0.85; }

#app[data-state="error"] #connect { display: none; }
