:root {
  --bg: #0d1117;
  --panel: #161b22;
  --border: #2b3440;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #ff4f1f;
  --accent-hover: #ff6a41;
  --error: #f85149;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2430 0%, var(--bg) 60%);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.shell { width: 100%; max-width: 460px; }

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

h1 { font-size: 1.35rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0 0 6px; font-weight: 600; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel.error { border-color: #5c2626; }

.muted { color: var(--muted); margin: 0 0 18px; }
.small { font-size: 0.85rem; margin: 16px 0 0; }

button { font: inherit; cursor: pointer; }

.primary {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: background 0.15s ease;
}
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.primary:disabled { opacity: 0.6; cursor: default; }

.link {
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  padding: 0;
  font-size: 0.9rem;
}
.link:hover { color: var(--text); }

.tile {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #1b222c;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.08s ease;
}
.tile:hover:not(:disabled) { border-color: var(--accent); }
.tile:active:not(:disabled) { transform: translateY(1px); }
.tile:disabled { opacity: 0.65; cursor: progress; }

.tile-seat { font-size: 1.2rem; font-weight: 650; }
.tile-host {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.tile-cta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

/* Sized for inline use next to the tile's CTA text. The loading page
   painted into the pre-opened tab (see app.js) is a separate document with
   no access to this stylesheet, so it inlines its own larger copy of the
   same rule rather than depending on this one. */
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#error-text { color: var(--error); margin: 0 0 18px; }
