:root {
  --bg: #0b0c0f;
  --surface: #15171c;
  --surface-2: #1d2027;
  --border: #2a2e37;
  --text: #eceef1;
  --muted: #8b909c;
  --accent: #6f6ff5;
  --accent-2: #4fd1c5;
  --danger: #f56565;
  --radius: 14px;
  font-size: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
#app { max-width: 620px; margin: 0 auto; padding: 20px 16px 80px; }
a { color: inherit; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand .x { color: var(--accent); }
.nav { display: flex; gap: 10px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { background: var(--surface); color: var(--text); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card.sealed { border-style: dashed; border-color: #3a3450; background: #16141f; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
p.muted, .muted { color: var(--muted); font-size: 0.9rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: white; border: none; border-radius: 10px;
  padding: 11px 18px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 6px 12px; font-size: 0.82rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=email], textarea, select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 11px 12px; font-size: 0.95rem;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 70px; }
label { font-size: 0.82rem; color: var(--muted); display: block; margin: 12px 0 5px; }
.field:first-child label { margin-top: 0; }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}
.pill.sealed { background: #2c2540; color: #b6a6ff; }
.pill.committed { background: #163430; color: var(--accent-2); }
.pill.expired { background: #3a2020; color: #ff9b9b; }
.video-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin: 10px 0; }
.video-thumb {
  flex: 0 0 auto; width: 120px; background: var(--surface-2); border-radius: 10px;
  overflow: hidden; border: 1px solid var(--border); cursor: pointer;
}
.video-thumb video { width: 100%; height: 160px; object-fit: cover; display: block; background: #000; }
.video-thumb .label { padding: 6px 8px; font-size: 0.75rem; color: var(--muted); }
.video-thumb .label b { color: var(--text); }
.avatar-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
  border: 2px solid var(--border); font-weight: 700;
}
.avatar.recorded { border-color: var(--accent-2); }
.error { background: #2a1616; border: 1px solid #4a2323; color: #ff9b9b; padding: 10px 12px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 12px; }
.notice { background: #12251f; border: 1px solid #1f4a3d; color: var(--accent-2); padding: 10px 12px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 12px; }
.recorder-frame { width: 100%; aspect-ratio: 3/4; background: #000; border-radius: var(--radius); overflow: hidden; position: relative; margin-bottom: 14px; }
.recorder-frame video { width: 100%; height: 100%; object-fit: cover; }
.timer { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.6); padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9rem; }
.timer.rec { color: #ff6b6b; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.watch-video { width: 100%; border-radius: 10px; background: #000; margin-bottom: 8px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: 0.85em; }
