/* Geist / Geist Mono — SIL OFL 1.1, see assets/fonts/OFL.txt */
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --fg: #09090b;
  --muted: #71717a;
  --border: #e4e4e7;
  --hover: #f4f4f5;
  --primary: #18181b;
  --on-primary: #fafafa;
  --ok: #16a34a;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b; --card: #0c0c0e; --fg: #fafafa; --muted: #a1a1aa;
    --border: #27272a; --hover: #18181b; --primary: #fafafa; --on-primary: #09090b; --ok: #4ade80;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--fg);
  font: 400 14px/1.5 "Geist", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; }
.muted { color: var(--muted); }

.card {
  width: 100%; max-width: 480px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.id { display: flex; align-items: center; gap: 14px; }
.avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; object-fit: cover;
  border: 1px solid var(--border); background: var(--hover);
  font: 500 15px "Geist Mono", monospace; letter-spacing: .02em;
}
h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.role { margin: 0; color: var(--muted); }

.meta { margin: 20px 0 0; display: grid; gap: 8px; }
.meta div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.meta a { text-decoration: none; border-bottom: 1px solid var(--border); transition: border-color .15s; }
.meta a:hover { border-color: var(--fg); }

.actions { display: flex; gap: 8px; margin-top: 20px; }
.btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--fg);
  font: 500 14px "Geist", sans-serif; text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--hover); }
.btn--primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn--primary:hover { background: var(--primary); opacity: .9; }
.btn--icon { flex: none; width: 36px; padding: 0; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.poster { margin-top: 20px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 10px; }
.poster p { margin: 0; }
.poster .poster__title { font-weight: 500; margin: 4px 0 2px; }
.label { font: 500 11px "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin-top: 24px; padding: 3px; border-radius: 9px; background: var(--hover);
}
.tabs button {
  height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font: 500 13px "Geist", sans-serif; cursor: pointer; transition: color .15s, background .15s;
}
.tabs button[aria-selected="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }

.panel { margin-top: 8px; min-height: 236px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--border); }
.list a { display: grid; gap: 2px; padding: 11px 8px; margin: 0 -8px; border-radius: 8px; text-decoration: none; transition: background .15s; }
.list a:hover { background: var(--hover); }
.list__t { font-weight: 500; line-height: 1.4; }
.list__m { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list__m b { font-weight: 500; color: var(--fg); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }

.foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px);
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--fg); font-size: 13px; opacity: 0; pointer-events: none; transition: .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 404 */
.notfound { text-align: center; }
.notfound h1 { margin-bottom: 4px; }
.notfound .btn { margin-top: 16px; flex: none; }

@media (max-width: 420px) {
  body { place-items: start center; padding-top: 16px; }
  .card { padding: 20px; }
  .meta div { grid-template-columns: 76px 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.actions .btn { padding: 0 10px; }
.actions--sub { margin-top: 8px; }
.role span, .nw span { white-space: nowrap; }
.list .item { display: grid; gap: 2px; padding: 11px 0; }
