/* Let's Talk AI — Bay Area championship palette: violet, black, silver, with
   banner gold for wins. Original marks only; no team names or logos. */
:root {
  --ink: #17121f;
  --ink-2: #4a4458;
  --ink-3: #7c768a;
  --line: #e6e1ee;
  --bg: #f6f4fa;
  --card: #ffffff;
  --black: #0f0b16;
  --navy: #2a1a47;          /* primary dark (buttons, headings accents) */
  --violet: #6b3fc6;
  --violet-2: #8f66e0;
  --violet-soft: #efe8fd;
  --lavender: #c3a8ff;
  --silver: #c9cbd3;
  --gold: #e9b949;
  --gold-soft: #fff5d6;
  --gold-ink: #6e4f00;
  --accent: var(--violet);
  --accent-ink: #4b2a8f;
  --focus: #6b3fc6;
  --danger: #b4232c;
  --ok: #1f7a4d;
  --online: #2fbf71;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 18, 31, .05), 0 2px 10px rgba(23, 18, 31, .05);
  --top-h: 58px;
  --t-prompt: #5b2fc0; --t-prompt-bg: #efe8fd;
  --t-tool: #0f6c8a;   --t-tool-bg: #e3f4fa;
  --t-policy: #285a2a; --t-policy-bg: #e6f3e3;
  --t-deck: #9a3f12;   --t-deck-bg: #fdeee2;
  --t-question: #8a1c4b; --t-question-bg: #fce8f1;
  --t-win: #6e4f00;    --t-win-bg: #fff3c9;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--violet); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.boot { padding: 40vh 0; text-align: center; color: var(--ink-3); }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ── Shell ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--black); color: #fff;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--violet), var(--lavender) 45%, var(--silver) 70%, var(--gold)) 1;
}
.topbar-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.brand b { color: var(--lavender); }
.brand .mark { width: 28px; height: 28px; flex: none; }
.topnav { display: none; gap: 2px; }
.topnav a { color: #cfc8dc; text-decoration: none; padding: 6px 9px; border-radius: 8px; font-size: 14.5px; position: relative; white-space: nowrap; }
.topnav a.active, .topnav a:hover { background: rgba(195, 168, 255, .14); color: #fff; }
.topbar .avatar { width: 32px; height: 32px; font-size: 13px; box-shadow: 0 0 0 2px var(--black), 0 0 0 3px var(--lavender); }
.topbar .new-btn { display: none; }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--gold); color: var(--black); font-size: 11px; font-weight: 800; line-height: 1;
}
.badge:empty { display: none; }
.topnav .badge { margin-left: 4px; vertical-align: 1px; }
.demo-banner { background: var(--violet-soft); color: var(--accent-ink); font-size: 13px; text-align: center; padding: 6px 16px; }
main.page { max-width: 960px; margin: 0 auto; padding: 16px 16px 96px; }
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; position: relative;
  font-size: 11px; color: var(--ink-3); text-decoration: none;
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a.active { color: var(--violet); font-weight: 700; }
.bottomnav .badge { position: absolute; top: 3px; left: calc(50% + 6px); }
.bottomnav a.plus span.ic {
  background: linear-gradient(135deg, var(--violet), var(--navy)); color: #fff; border-radius: 999px; width: 42px; height: 42px;
  display: grid; place-items: center; margin-top: -16px; box-shadow: 0 4px 14px rgba(107, 63, 198, .4); border: 2px solid #fff;
}
@media (min-width: 760px) {
  .topnav { display: flex; }
  .topbar .new-btn { display: inline-flex; }
  .bottomnav { display: none; }
  main.page { padding-bottom: 48px; padding-top: 24px; }
}

/* ── Type & headings ───────────────────────────────────── */
h1 { font-size: 25px; line-height: 1.2; margin: 4px 0 12px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 24px 0 10px; }
h3 { font-size: 16px; margin: 0 0 4px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin-bottom: 0; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); }

/* ── Buttons & inputs ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; padding: 8px 14px; cursor: pointer; text-decoration: none; color: var(--ink);
  font-weight: 600; min-height: 40px;
}
.btn:hover { border-color: #cdc5da; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.accent { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.accent:hover { background: #5c33b1; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.on { background: var(--violet-soft); border-color: var(--violet-2); color: var(--accent-ink); }
.btn svg { flex: none; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
label.field > small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
textarea.mono, pre.prompt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.notice {
  display: flex; gap: 8px; align-items: flex-start; background: var(--gold-soft); border: 1px solid #f0dc9c; color: var(--gold-ink);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px;
}
.notice.violet { background: var(--violet-soft); border-color: #dccdfb; color: var(--accent-ink); }
.error-text { color: var(--danger); font-size: 14px; }

/* ── Chips ─────────────────────────────────────────────── */
.chips { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 14px; white-space: nowrap;
  cursor: pointer; color: var(--ink-2); text-decoration: none;
}
.chip .n { color: var(--ink-3); font-size: 12px; margin-left: 2px; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.active .n { color: var(--lavender); }
.tag { display: inline-block; white-space: nowrap; font-size: 13px; color: var(--ink-2); background: #efecf4; border-radius: 6px; padding: 1px 8px; text-decoration: none; }
.tag:hover { background: #e4dfee; }
.topic { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--violet-soft); border-radius: 999px; padding: 2px 10px; text-decoration: none; }
.type-badge { display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 6px; padding: 2px 8px; }
.type-prompt { color: var(--t-prompt); background: var(--t-prompt-bg); }
.type-tool { color: var(--t-tool); background: var(--t-tool-bg); }
.type-policy { color: var(--t-policy); background: var(--t-policy-bg); }
.type-deck { color: var(--t-deck); background: var(--t-deck-bg); }
.type-question { color: var(--t-question); background: var(--t-question-bg); }
.type-win { color: var(--t-win); background: var(--t-win-bg); }
.status { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: #eef0f5; color: var(--ink-2); text-transform: capitalize; }
.status-building { background: #e3f4fa; color: var(--t-tool); }
.status-piloting { background: var(--violet-soft); color: var(--t-prompt); }
.status-live { background: #e6f3e3; color: var(--ok); }
.status-paused { background: #efecf4; color: var(--ink-3); }

/* ── Cards ─────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.list > .card + .card { margin-top: 10px; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: #cdc5da; }
.post-card h3 { font-size: 17px; line-height: 1.3; margin: 6px 0 4px; }
.post-card p.desc { margin: 0 0 8px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card.win { border-left: 4px solid var(--gold); }
.meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.meta .stat { display: inline-flex; gap: 4px; align-items: center; }
.meta svg { width: 15px; height: 15px; }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--violet); margin-right: 2px; }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 999px; font-weight: 700;
  font-size: 15px; color: #fff; background: var(--navy); position: relative;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.online::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 99px;
  background: var(--online); border: 2px solid #fff;
}
.person { display: flex; gap: 12px; align-items: center; }
.person .who { min-width: 0; }
.person .who b { display: block; }
.person .who span { display: block; color: var(--ink-3); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 640px) { .grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.empty { text-align: center; color: var(--ink-3); padding: 32px 16px; }

/* ── Feed controls ─────────────────────────────────────── */
.search-wrap { position: relative; margin-bottom: 10px; }
.search-wrap input { padding-left: 38px; }
.search-wrap svg { position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; color: var(--ink-3); }
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filters select { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.active-filters .chip { background: var(--violet-soft); border-color: var(--violet-2); color: var(--accent-ink); }

/* ── Post detail ───────────────────────────────────────── */
.post-detail h1 { margin-top: 10px; }
.post-detail .desc { white-space: pre-wrap; color: var(--ink); font-size: 17px; }
pre.prompt { white-space: pre-wrap; background: #f6f2ff; border: 1px solid #e2d6ff; border-radius: 10px; padding: 14px; margin: 0; overflow-x: auto; }
.attachment { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaff; text-decoration: none; color: inherit; }
.attachment svg { width: 28px; height: 28px; color: var(--violet); flex: none; }
.attachment .name { font-weight: 600; word-break: break-all; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: 0; }
.comment .body { white-space: pre-wrap; margin-top: 2px; }
.comment .avatar { width: 32px; height: 32px; font-size: 13px; }
.comment-form textarea { min-height: 72px; }

/* ── Prompt library ────────────────────────────────────── */
.prompt-card { display: flex; flex-direction: column; gap: 8px; }
.prompt-card h3 { font-size: 16.5px; margin: 0; }
.prompt-card h3 a { color: inherit; text-decoration: none; }
.prompt-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.prompt-card pre.prompt { max-height: 132px; overflow: hidden; position: relative; font-size: 13px; padding: 10px 12px; }
.prompt-card pre.prompt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(transparent, #f6f2ff); }
.prompt-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.prompt-tools .btn { min-height: 32px; padding: 4px 10px; font-size: 13.5px; }
.hero {
  border-radius: 18px; padding: 20px 18px; margin-bottom: 16px; color: #fff; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.04) 0 14px, transparent 14px 28px),
    radial-gradient(120% 140% at 100% 0%, #8f66e0 0%, #4b2a8f 45%, #120d1c 100%);
}
.hero h1 { color: #fff; margin: 4px 0 6px; }
.hero p { color: #e2d9f7; margin: 0; max-width: 560px; }
.hero .eyebrow { color: var(--gold); }
.hero .btn { margin-top: 12px; }
.hero::after {
  content: ""; position: absolute; right: -30px; bottom: -40px; width: 180px; height: 180px; border-radius: 999px;
  border: 18px solid rgba(233, 185, 73, .18);
}

/* ── Docs ──────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed #cbbcf0; border-radius: 16px; background: #fbf9ff; padding: 22px 16px; text-align: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone.over { background: var(--violet-soft); border-color: var(--violet); }
.dropzone b { display: block; font-size: 17px; }
.dropzone svg { width: 34px; height: 34px; color: var(--violet); }
.upload-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 0; }
.doc-card { display: flex; gap: 12px; align-items: flex-start; }
.doc-icon { flex: none; width: 44px; height: 52px; border-radius: 8px; background: var(--violet-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 11px; font-weight: 800; text-transform: uppercase; position: relative; }
.doc-icon::before { content: ""; position: absolute; top: 0; right: 0; border-width: 0 12px 12px 0; border-style: solid; border-color: var(--bg) var(--bg) #d8c9fa #d8c9fa; border-radius: 0 8px 0 4px; }
.doc-card h3 { margin: 0; font-size: 16px; }
.doc-card h3 a { color: inherit; text-decoration: none; }
pre.doc-text { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: 60vh; overflow: auto; font: 14px/1.55 ui-sans-serif, -apple-system, "Segoe UI", sans-serif; }
.connect-steps { margin: 8px 0 0; padding-left: 20px; }
.connect-steps li { margin-bottom: 6px; }

/* ── Chat ──────────────────────────────────────────────── */
main.page.chat-mode { max-width: 1120px; padding: 0; height: calc(100dvh - var(--top-h)); display: flex; }
.chat { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; height: 100%; background: #fff; }
@media (min-width: 760px) {
  .chat { grid-template-columns: 280px minmax(0, 1fr); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
.chat-list { overflow-y: auto; border-right: 1px solid var(--line); background: #faf8fd; padding: 12px 8px 90px; }
@media (min-width: 760px) { .chat-list { padding-bottom: 12px; } }
.chat-list h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 14px 10px 6px; display: flex; align-items: center; }
.chat-list h4 button { margin-left: auto; }
.ch-link { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.ch-link:hover { background: #efeaf8; }
.ch-link.active { background: var(--navy); color: #fff; }
.ch-link.unread { color: var(--ink); font-weight: 700; }
.ch-link .hash { color: var(--ink-3); width: 18px; text-align: center; flex: none; }
.ch-link.active .hash { color: var(--lavender); }
.ch-link .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-link .avatar { width: 24px; height: 24px; font-size: 10px; }
.ch-link .avatar.online::after { width: 9px; height: 9px; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-head h2 { margin: 0; font-size: 17px; }
.chat-head .desc { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: #c7c2cf; }
.live.on::before { background: var(--online); box-shadow: 0 0 0 3px rgba(47, 191, 113, .18); }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px 16px; }
.msg { display: flex; gap: 10px; padding: 6px 0; }
.msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg .who { font-weight: 700; font-size: 14.5px; }
.msg .who a { color: inherit; text-decoration: none; }
.msg .when { color: var(--ink-3); font-size: 12px; margin-left: 6px; font-weight: 400; }
.msg .text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .del { opacity: 0; margin-left: 6px; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 12px; }
.msg:hover .del, .msg .del:focus { opacity: 1; }
.msg .attachment { margin-top: 6px; max-width: 420px; }
.msg.mine .who a { color: var(--violet); }
.day { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; font-weight: 700; margin: 12px 0 6px; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.unread-line { display: flex; align-items: center; gap: 10px; color: var(--violet); font-size: 12px; font-weight: 800; margin: 8px 0; }
.unread-line::after { content: ""; flex: 1; height: 1px; background: var(--violet-2); }
.composer { border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; resize: none; padding: 10px 12px; }
.composer .btn { min-height: 44px; }
.composer .pending { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; background: var(--violet-soft); border-radius: 8px; padding: 6px 10px; }
.chat-pane.over { outline: 3px dashed var(--violet); outline-offset: -6px; }
@media (max-width: 759px) {
  body.chat-open .bottomnav { display: none; }
  body.chat-open .demo-banner { display: none; }
  .chat.in-channel .chat-list { display: none; }
  .chat:not(.in-channel) .chat-pane { display: none; }
}
@media (min-width: 760px) { .chat-back { display: none !important; } }

/* ── Builds ────────────────────────────────────────────── */
.build-card .wall { margin-top: 10px; background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; padding: 8px 12px; }
.build-card .wall b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gold-ink); }
.build-card details { margin-top: 10px; }
.build-card summary { cursor: pointer; color: var(--violet); font-size: 14px; font-weight: 700; }

/* ── Digest ────────────────────────────────────────────── */
.week-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.week-nav .label { font-weight: 700; flex: 1; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.stats .card { text-align: center; padding: 12px 8px; }
.stats b { display: block; font-size: 26px; line-height: 1.1; color: var(--violet); }
.stats span { font-size: 13px; color: var(--ink-3); }
.recap { white-space: pre-wrap; }

/* ── Meetings ──────────────────────────────────────────── */
.topic-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.topic-row:first-of-type { border-top: 0; }
.vote { display: flex; flex-direction: column; align-items: center; min-width: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px; background: #fff; cursor: pointer; }
.vote.on { border-color: var(--violet-2); background: var(--violet-soft); }
.vote b { font-size: 16px; line-height: 1; }
.vote span { font-size: 11px; color: var(--ink-3); }
.date-block { text-align: center; min-width: 56px; border-radius: 10px; background: var(--black); color: #fff; padding: 6px 8px; border-bottom: 3px solid var(--violet); }
.date-block b { display: block; font-size: 22px; line-height: 1.1; }
.date-block span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--lavender); }

/* ── Tables (admin) ────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td, .table th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; color: var(--ink-3); border-top: 0; }
.table-wrap { overflow-x: auto; }

/* ── Modal & toast ─────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 11, 22, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .modal-backdrop { align-items: center; } .modal { border-radius: 18px; padding: 24px; } }
.modal h2 { margin-top: 0; }
.pick-list { max-height: 50vh; overflow-y: auto; }
.pick-list button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; border: 0; background: none; padding: 8px; border-radius: 10px; cursor: pointer; }
.pick-list button:hover { background: var(--violet-soft); }
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 60;
  background: var(--black); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; transition: all .2s; pointer-events: none;
  max-width: calc(100vw - 32px); border-left: 3px solid var(--violet-2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 760px) { #toast { bottom: 24px; } }

/* ── Sign-in ───────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 16px, transparent 16px 32px),
    radial-gradient(120% 90% at 85% 0%, #6b3fc6 0%, #2a1a47 45%, #0f0b16 100%);
}
.auth-card { background: #fff; border-radius: 20px; padding: 28px 22px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.4); border-top: 5px solid var(--violet); }
.auth-card h1 { font-size: 22px; }
.auth-card p { color: var(--ink-2); }
.brand-mark { font-weight: 900; font-size: 28px; letter-spacing: -.03em; color: var(--black); display: flex; align-items: center; gap: 10px; }
.brand-mark b { color: var(--violet); }
.brand-mark .mark { width: 40px; height: 40px; }
.tagline { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); margin: 4px 0 14px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.link-box { word-break: break-all; font-size: 13px; background: #f4f1f9; border-radius: 8px; padding: 10px; margin: 8px 0; font-family: ui-monospace, Menlo, monospace; }
