  :root {
  --bg: #f4f3ef;
  --card: #ffffff;
  --ink: #121214;
  --muted: #6b6b70;
  --line: #e6e4de;
  --chip: #f4f3ef;
  --accent: #121214;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10;
    --card: #17171a;
    --ink: #f2f2f0;
    --muted: #9a9aa0;
    --line: #26262b;
    --chip: #1f1f23;
    --accent: #f2f2f0;
    --accent-ink: #0e0e10;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 40px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e10;
  --card: #17171a;
  --ink: #f2f2f0;
  --muted: #9a9aa0;
  --line: #26262b;
  --chip: #1f1f23;
  --accent: #f2f2f0;
  --accent-ink: #0e0e10;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 40px rgba(0,0,0,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { width: 100%; max-width: 420px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px 22px 22px;
  text-align: center;
}
.avatar {
  width: 96px; height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-size: 32px; font-weight: 700; letter-spacing: -.02em;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.role { color: var(--muted); font-size: 15px; margin-top: 4px; }
.loc { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 10px; }
.loc svg { width: 15px; height: 15px; }
.quote { font-size: 14px; font-style: italic; color: var(--muted); margin-top: 16px; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.quick a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px;
  background: var(--chip);
  border-radius: 18px;
  font-size: 13px; font-weight: 500;
  transition: transform .12s ease;
}
.quick a:active { transform: scale(.96); }
.quick svg { width: 22px; height: 22px; }

.save {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px;
  width: 100%;
  padding: 16px;
  border: 0; border-radius: 18px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.save:active { transform: scale(.98); opacity: .9; }

.section-title { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 26px 4px 8px; }

.links { list-style: none; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-align: left; }
.links li + li { border-top: 1px solid var(--line); }
.links a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; transition: background .12s ease; }
.links a:hover, .links a:active { background: var(--chip); }
.links .label { flex: 1; min-width: 0; }
.links .name { display: block; font-size: 15px; font-weight: 500; }
.links .handle { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links .chev { width: 16px; height: 16px; color: var(--muted); }

.foot { display: flex; gap: 10px; margin-top: 16px; }
.foot button {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
}
.foot button:active { background: var(--chip); }
.foot svg { width: 18px; height: 18px; }

.credit { text-align: center; color: var(--muted); font-size: 12px; margin-top: 20px; }

dialog {
  margin: auto;
  border: 0; border-radius: 24px;
  background: var(--card); color: var(--ink);
  padding: 24px;
  width: min(340px, calc(100vw - 32px));
  text-align: center;
}
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
dialog .qr { background: #fff; border-radius: 16px; padding: 14px; }
dialog .qr img { display: block; width: 100%; height: auto; }
dialog p { font-size: 13px; color: var(--muted); margin-top: 12px; }
dialog button { margin-top: 16px; width: 100%; padding: 13px; border: 0; border-radius: 14px; background: var(--chip); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
