/* Mobile-first: 360px base, no horizontal scroll, >=44px tap targets. */
:root {
  --bg: #0f172a;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0ea5e9;
  --brand-ink: #ffffff;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: #f1f5f9;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  background: var(--bg);
  color: #fff;
}

.brand { font-weight: 700; }

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 12px 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 16px;
  min-width: 0;
}

h1 { font-size: 1.25rem; margin: 0 0 8px; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }

.muted { color: var(--muted); font-weight: 400; }
small.muted { font-size: 0.8rem; }

.status { margin: 4px 2px 12px; color: var(--muted); }

.error { color: var(--danger); margin: 8px 0 0; overflow-wrap: anywhere; }

.hidden { display: none !important; }

.field { display: block; margin: 0 0 12px; }
.field > span { display: block; margin-bottom: 6px; font-weight: 600; }

input[type="text"] {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  font-size: 16px; /* prevents iOS zoom */
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

select {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dns-out { margin-top: 12px; }

.dns-card {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 8px;
}

.dns-card code {
  display: block;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px;
  margin: 6px 0;
}

.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.row .btn { flex: 1 1 140px; width: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
}

.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: #334155;
  width: auto;
  padding: 8px 14px;
}

.list { list-style: none; margin: 0; padding: 0; }

.list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  margin-left: 8px;
  vertical-align: middle;
}

.meta { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }

#gsi-button { min-height: 44px; }

@media (min-width: 768px) {
  .btn { width: auto; }
  h1 { font-size: 1.5rem; }
}
