:root {
  color-scheme: dark;
  --bg: #070708;
  --silver: #c5cad3;
  --silver-2: #e7ebf1;
  --muted: #9399a6;
  --white: #f5f6f8;
  --blue: #6ea2ff;
  --purple: #9b7dff;
  --line: rgba(197, 202, 211, 0.22);
  --ink: #121316;
  font-family: Inter, "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--white); }
body { min-height: 100vh; }
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 280px;
  pointer-events: none;
  background:
    radial-gradient(520px 180px at 12% -10%, rgba(47, 98, 255, 0.22), transparent 70%),
    radial-gradient(420px 160px at 100% 0%, rgba(155, 125, 255, 0.18), transparent 68%);
}
a { color: var(--silver-2); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.shell { position: relative; z-index: 1; width: min(480px, 100%); margin: 0 auto; padding: 18px 16px 112px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand img { height: 34px; width: auto; max-width: 168px; object-fit: contain; object-position: left center; }
.wordmark { display: block; width: min(100%, 360px); height: auto; margin: 16px 0 4px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
h1 { font-size: 32px; line-height: 1.05; letter-spacing: -0.04em; font-weight: 640; margin: 18px 0 8px; }
h2 { font-size: 18px; letter-spacing: -0.03em; margin: 22px 0 10px; }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.lead { color: var(--silver); font-size: 17px; }

.example-banner, .note {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #101014;
  color: var(--silver);
  margin: 14px 0;
}
.note.bad, .note.warn {
  border-color: rgba(155, 125, 255, 0.55);
  background: linear-gradient(180deg, rgba(155, 125, 255, 0.16), rgba(155, 125, 255, 0.05));
  color: #efeaff;
}
.note.info { border-color: rgba(110, 162, 255, 0.45); color: #d5e4ff; }
.flash { border-color: rgba(197, 202, 211, 0.45); }

.card {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 32%, transparent 48%),
    linear-gradient(180deg, #1a1a20, #101014);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 40px rgba(0, 0, 0, 0.28);
  margin: 12px 0;
}
.kicker { color: var(--silver); letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px; margin-bottom: 6px; }
.balance, .money.huge { font-size: 40px; letter-spacing: -0.045em; font-weight: 650; font-variant-numeric: tabular-nums; }
.money.credit, .amt.credit { color: var(--blue); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat strong { display: block; font-size: 22px; letter-spacing: -0.04em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

.field { display: block; margin: 0 0 12px; }
.field span, .check span { display: block; color: var(--silver); font-size: 13px; margin-bottom: 6px; }
.check span { margin: 0; }
input, select, textarea {
  width: 100%;
  background: #0c0c10;
  border: 1px solid rgba(197, 202, 211, 0.28);
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple); border-color: var(--silver); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 16px; }
.check input { width: 22px; height: 22px; margin-top: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 16px;
  text-decoration: none;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.btn.full { width: 100%; }
.btn.silver {
  background: linear-gradient(180deg, #f7f8fa 0%, #c5cad3 48%, #aeb4bf 100%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 8px 18px rgba(0, 0, 0, 0.28);
  font-weight: 680;
}
.btn.accent {
  background: linear-gradient(120deg, #3d6dff, #7a5cff);
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
}
.btn.ghost { background: transparent; color: var(--silver-2); border-color: rgba(197, 202, 211, 0.4); }
.btn.small { padding: 8px 12px; font-size: 14px; }

.chip, .pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--silver);
  margin-left: 6px;
  vertical-align: 2px;
}
.pill.blue { color: #d5e4ff; border-color: rgba(110, 162, 255, 0.5); }
.pill.purple { color: #efeaff; border-color: rgba(155, 125, 255, 0.65); }

.person, .row {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.person strong, .row strong { display: block; }
.person em, .row em { display: block; color: var(--muted); font-style: normal; font-size: 14px; margin-top: 2px; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--silver);
  background: #101014;
}
.initials {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--silver);
  letter-spacing: 0.08em;
  color: var(--silver-2);
}
.hero { display: flex; gap: 14px; align-items: center; }
.qr-card { background: var(--silver-2); padding: 12px; border-radius: 16px; width: fit-content; }
.qr-card svg { width: 168px; height: 168px; display: block; }
.share input { margin-top: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer p { margin: 6px 0; }
.tabbar, .admin-nav {
  display: flex;
  gap: 8px;
}
.admin-nav { flex-wrap: wrap; padding: 12px 0 4px; }
.admin-nav a, .tabbar a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.admin-nav a { flex: 0 0 auto; padding: 8px 10px; border-radius: 999px; border: 1px solid transparent; }
.admin-nav a.active { color: var(--white); border-color: var(--line); }
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  justify-content: space-around;
  background: rgba(7, 7, 8, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 5;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { padding: 14px 8px 16px; }
.tabbar a.active { color: var(--silver-2); box-shadow: inset 0 2px 0 var(--purple); }
.public-links { display: flex; gap: 12px; align-items: center; }
.public-links a { color: var(--silver); text-decoration: none; font-size: 14px; }
.copy { font-variant-numeric: tabular-nums; }

@media (min-width: 880px) {
  .shell { width: min(1080px, calc(100% - 48px)); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }
  .tabbar { position: sticky; top: 0; margin: 0 -16px 8px; }
}
