:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #171a1f;
  --muted: #6b7280;
  --border: #e4e7ec;
  --accent: #1e88e5;
  --accent-ink: #ffffff;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #181b20;
    --text: #f2f4f7;
    --muted: #9aa3b2;
    --border: #2b3038;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding: 24px 16px 48px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.card {
  max-width: 480px;
  margin: 0 auto;
}

/* Header */
.hero { text-align: center; margin-bottom: 20px; }
.hero img {
  width: 100%;
  max-width: 480px;
  height: auto;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
  text-wrap: balance;
}
.hero h1 { font-size: 1.5rem; margin: 16px 0 2px; }
.hero .role { color: var(--muted); margin: 0; }

/* Primary actions */
.actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin: 20px 0 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; }

/* Contact groups */
.group { margin-bottom: 24px; }
.group h2 {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 8px 4px;
}
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.row > a {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 14px 16px;
}
.row > a svg {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.row .label { font-size: .8rem; color: var(--muted); }
.row .value {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy {
  flex: 0 0 52px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.copy:hover, .copy:focus-visible { color: var(--accent); }
.copy svg { width: 18px; height: 18px; }

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* QR dialog */
dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
  width: min(92vw, 360px);
  background: var(--surface);
  color: var(--text);
  text-align: center;
}
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog img {
  width: 100%;
  max-width: 260px;
  height: auto;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  image-rendering: pixelated;
}
dialog h2 { margin: 0 0 4px; font-size: 1.1rem; }
dialog p { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
dialog .btn { margin-top: 16px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer {
  margin-top: 32px;
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
}
