/* ============================================================
   ANTI-CHAT — encrypted comms console
   Palette: deep ink + electric violet · green reserved for presence
   ============================================================ */

:root {
  /* type */
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* signature accent (electric violet) — same in both themes, tuned per mode */
  --violet: #6e56f7;
  --violet-soft: #8b78ff;

  /* radii + motion */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- DARK (default) ---------- */
html[data-theme="dark"] {
  --bg: #07080d;
  --bg-2: #0b0d15;
  --surface: #0f121c;
  --surface-2: #141826;
  --surface-3: #1a1f30;
  --border: #232a3d;
  --border-soft: #1a2030;
  --text: #e7e9f2;
  --text-dim: #8b93aa;
  --text-faint: #59607a;
  --accent: var(--violet-soft);
  --accent-ink: #ffffff;
  --cipher: #7fe0dc;              /* base64 mono tint */
  --green: #2ee66d;
  --green-glow: rgba(46, 230, 109, .55);
  --danger: #ff6b7d;
  --glow: 0 0 0 1px rgba(139,120,255,.28), 0 18px 50px -18px rgba(110,86,247,.55);
  --shadow: 0 26px 60px -24px rgba(0,0,0,.75);
  --grid: rgba(255,255,255,.022);
  --bubble-mine: linear-gradient(135deg, #221b52, #191542);
  --bubble-other: #12162200;
  color-scheme: dark;
}

/* ---------- LIGHT (cool, not cream) ---------- */
html[data-theme="light"] {
  --bg: #eef0f6;
  --bg-2: #e7eaf3;
  --surface: #ffffff;
  --surface-2: #f5f6fb;
  --surface-3: #eceef6;
  --border: #d9deec;
  --border-soft: #e6e9f2;
  --text: #131624;
  --text-dim: #5a6178;
  --text-faint: #949bb2;
  --accent: #5a45e6;
  --accent-ink: #ffffff;
  --cipher: #1f8f8a;
  --green: #10b458;
  --green-glow: rgba(16, 180, 88, .45);
  --danger: #d63a52;
  --glow: 0 0 0 1px rgba(90,69,230,.16), 0 20px 44px -20px rgba(90,69,230,.4);
  --shadow: 0 26px 60px -30px rgba(30,40,80,.28);
  --grid: rgba(20,30,80,.03);
  --bubble-mine: linear-gradient(135deg, #6a54f0, #5a45e6);
  --bubble-other: transparent;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 82% -8%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 60%),
    radial-gradient(900px 620px at 6% 108%, color-mix(in srgb, var(--violet) 10%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint mesh grid overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
  z-index: 0;
}

.mono { font-family: var(--f-mono); }

/* ============================================================
   BRAND
   ============================================================ */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display);
  font-weight: 700; letter-spacing: .04em;
  font-size: 1.05rem;
  user-select: none;
}
.brand__name { color: var(--text); }
.brand__name b { color: var(--accent); font-weight: 700; }
.brand__tld { color: var(--text-faint); font-family: var(--f-mono); font-size: .8em; margin-left: 2px; }
.brand__mark {
  width: 20px; height: 20px; border-radius: 6px;
  background: conic-gradient(from 140deg, var(--violet), var(--violet-soft), #34d3ff, var(--violet));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--violet) 50%, transparent), 0 6px 18px -6px var(--violet);
  position: relative;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 5px;
  border-radius: 3px; background: var(--bg);
}
.brand--lg { font-size: 1.55rem; gap: 12px; }
.brand--lg .brand__mark { width: 30px; height: 30px; border-radius: 9px; }
.brand--lg .brand__mark::after { inset: 7px; border-radius: 5px; }

/* ============================================================
   BUTTONS + THEME TOGGLE
   ============================================================ */
.btn {
  --pad-y: .8rem; --pad-x: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--f-display); font-weight: 600; font-size: .95rem;
  letter-spacing: .01em;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s, box-shadow .25s, opacity .18s;
  text-decoration: none; color: var(--text);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--block { width: 100%; }
.btn--sm { --pad-y: .5rem; --pad-x: .8rem; font-size: .85rem; border-radius: var(--r-sm); }

.btn--primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-soft));
  color: #fff;
  box-shadow: 0 10px 30px -12px var(--violet), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn--primary:hover { box-shadow: 0 14px 40px -12px var(--violet), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-1px); }
.btn--primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; filter: grayscale(.3); }

.btn--ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-dim);
}
.btn--ghost:hover { color: var(--text); border-color: var(--accent); background: var(--surface-3); }

.kbd, .field kbd {
  font-family: var(--f-mono); font-size: .78em;
  padding: .05em .45em; border-radius: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: inherit;
}

/* theme toggle */
.theme-toggle { background: none; border: none; padding: 4px; cursor: pointer; display: inline-flex; }
.theme-toggle__track {
  width: 46px; height: 26px; border-radius: 30px;
  background: var(--surface-3); border: 1px solid var(--border);
  display: inline-flex; align-items: center; padding: 2px;
  transition: background .25s;
}
.theme-toggle__thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--violet-soft));
  box-shadow: 0 2px 8px -2px var(--violet);
  transform: translateX(0);
  transition: transform .3s var(--ease);
}
html[data-theme="light"] .theme-toggle__thumb { transform: translateX(20px); background: linear-gradient(135deg, #ffcf5c, #ff9d3c); box-shadow: 0 2px 8px -2px #ff9d3c; }
.theme-toggle--gate { position: absolute; top: 18px; right: 18px; }

/* ============================================================
   LOGIN GATE
   ============================================================ */
.gate {
  position: relative; z-index: 1;
  min-height: 100dvh;
  display: grid; grid-template-rows: 1fr auto;
  place-items: center;
  padding: 24px;
}
.gate__aura {
  position: absolute; z-index: -1; inset: auto;
  width: 520px; height: 520px; top: -120px; left: 50%; translate: -50% 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--violet) 34%, transparent), transparent 62%);
  filter: blur(20px); opacity: .8; pointer-events: none;
}
.gate__card {
  position: relative;
  width: min(440px, 100%);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 32px 30px;
  box-shadow: var(--shadow), var(--glow);
  margin-top: auto;
}
.gate__lead {
  margin: 22px 0 26px; color: var(--text-dim);
  font-size: .96rem; line-height: 1.55;
}
.gate__form { display: grid; gap: 16px; }

.field { display: grid; gap: 8px; }
.field__label {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-faint);
}
.field__input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: .95rem 1rem;
  color: var(--text);
  font-size: 1.05rem; letter-spacing: .14em;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field__input::placeholder { color: var(--text-faint); letter-spacing: .1em; }
.field__input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 22%, transparent);
  background: var(--surface-3);
}
.gate__error {
  margin: -4px 0 0; color: var(--danger);
  font-family: var(--f-mono); font-size: .82rem;
  display: flex; align-items: center; gap: 8px;
}
.gate__error::before { content: "✕"; font-weight: 700; }

.gate__facts { list-style: none; margin: 26px 0 4px; padding: 0; display: grid; gap: 12px; }
.gate__facts li { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--text-dim); line-height: 1.4; }
.gate__facts b { color: var(--text); font-weight: 600; }
.tick { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 5px; background: color-mix(in srgb, var(--violet) 20%, transparent); position: relative; }
.tick::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.gate__footer {
  margin-top: 22px; padding: 10px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .02em;
  color: var(--text-faint); text-align: center;
}

/* ============================================================
   CHAT — app shell
   ============================================================ */
.app {
  position: relative; z-index: 1;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1320px; margin: 0 auto;
}

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(14px, 3vw, 26px);
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(14px);
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.whoami { font-size: .85rem; color: var(--text-dim); }
.whoami b { color: var(--accent); font-family: var(--f-mono); font-weight: 500; }

/* presence pill */
.presence {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: .85rem;
}
.presence__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 var(--green-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--green-glow); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.presence__count { font-family: var(--f-mono); font-weight: 700; color: var(--text); }
.presence__label { color: var(--text-dim); }

/* body: chat + cryptor */
.app__body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: clamp(12px, 2vw, 22px);
  padding: clamp(12px, 2vw, 22px);
  min-height: 0;
}

/* ---- channel / stream ---- */
.channel {
  display: flex; flex-direction: column; min-height: 0;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.channel__head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--f-mono); font-size: .8rem;
  color: var(--text-dim); letter-spacing: .02em;
  display: flex; align-items: center; gap: 6px;
}
.channel__hash { color: var(--accent); font-weight: 700; }
.channel__hint { margin-left: auto; color: var(--text-faint); font-size: .72rem; }

.stream {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 20px clamp(14px, 2.4vw, 26px);
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.stream::-webkit-scrollbar { width: 8px; }
.stream::-webkit-scrollbar-thumb { background: var(--border); border-radius: 20px; }

.stream__empty {
  margin: auto; text-align: center; color: var(--text-faint);
  max-width: 260px; display: grid; gap: 14px; justify-items: center;
}
.stream__empty p { margin: 0; font-size: .9rem; line-height: 1.5; }
.stream__empty-mark {
  width: 54px; height: 54px; border-radius: 16px;
  border: 1px dashed var(--border);
  background: var(--surface-2);
  position: relative;
}
.stream__empty-mark::after {
  content: "</>"; position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--f-mono); color: var(--text-faint); font-size: .85rem;
}

/* ---- message ---- */
.msg { max-width: min(76%, 560px); display: flex; flex-direction: column; gap: 5px; animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg--mine { align-self: flex-end; align-items: flex-end; }

.msg__meta {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; color: var(--text-faint);
  padding: 0 4px;
}
.msg__name { font-family: var(--f-mono); color: var(--accent); font-weight: 500; }
.msg--mine .msg__name { color: var(--violet-soft); }

.bubble {
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .1s;
  position: relative;
}
.bubble:hover { border-color: var(--accent); }
.bubble:active { transform: scale(.995); }
.msg--mine .bubble {
  background: var(--bubble-mine);
  border-color: color-mix(in srgb, var(--violet) 45%, transparent);
  color: #fff;
}
html[data-theme="light"] .msg--mine .bubble { color: #fff; border-color: transparent; }

.bubble__cipher {
  font-family: var(--f-mono); font-size: .82rem; line-height: 1.5;
  color: var(--cipher);
  word-break: break-all;
}
.msg--mine .bubble__cipher { color: rgba(255,255,255,.72); }

.bubble__plain {
  font-family: var(--f-body); font-size: .95rem; line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  display: none;
}
.msg--mine .bubble__plain { color: #fff; }
.bubble.is-decoded .bubble__cipher { display: none; }
.bubble.is-decoded .bubble__plain { display: block; }

.bubble__tag {
  position: absolute; top: 8px; right: 10px;
  font-family: var(--f-mono); font-size: .58rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint);
  opacity: .7; pointer-events: none;
}
.msg--mine .bubble__tag { color: rgba(255,255,255,.6); }
.bubble.is-decoded .bubble__tag::after { content: "PLAIN"; }
.bubble:not(.is-decoded) .bubble__tag::after { content: "B64"; }

/* ============================================================
   CRYPTOR
   ============================================================ */
.cryptor {
  display: flex; flex-direction: column; gap: 14px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  align-self: start;
  position: sticky; top: 0;
}
.cryptor__head { display: flex; align-items: center; gap: 10px; }
.cryptor__title { font-family: var(--f-display); font-weight: 700; letter-spacing: .16em; font-size: .82rem; color: var(--text); }
.cryptor__badge {
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 20px;
  background: color-mix(in srgb, var(--violet) 18%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--violet) 30%, transparent);
}

.cryptor__field { display: grid; gap: 7px; }
.cryptor__label { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.cryptor__sub { text-transform: none; letter-spacing: 0; color: var(--accent); opacity: .85; }

.cryptor__plain {
  width: 100%; resize: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--text); font-family: var(--f-body); font-size: .95rem; line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
}
.cryptor__plain::placeholder { color: var(--text-faint); }
.cryptor__plain:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent);
}

.cryptor__arrow { display: grid; place-items: center; color: var(--text-faint); margin: -4px 0; }

.cryptor__b64 {
  min-height: 62px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: .8rem; line-height: 1.55;
  color: var(--cipher);
  word-break: break-all;
  overflow-y: auto; max-height: 150px;
}
.cryptor__b64:empty::before { content: "— empty —"; color: var(--text-faint); font-style: normal; }

.cryptor__alert {
  font-family: var(--f-mono); font-size: .76rem; line-height: 1.45;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  display: flex; align-items: flex-start; gap: 8px;
}
.cryptor__alert::before { content: "⛔"; }

.cryptor__send { margin-top: 2px; }
.cryptor__send .kbd { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.28); }

/* footer */
.app__footer {
  padding: 10px clamp(14px, 3vw, 26px) 14px;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .02em;
  color: var(--text-faint); text-align: center;
  border-top: 1px solid var(--border-soft);
}

/* toast for flashes */
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: 22px; translate: -50% 0;
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text); font-size: .85rem;
  padding: 10px 16px; border-radius: 30px;
  box-shadow: var(--shadow);
  opacity: 0; transform: translate(-50%, 10px);
  transition: opacity .25s, transform .25s;
  font-family: var(--f-mono);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--err { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .app { height: 100dvh; }
  .app__body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    gap: 12px; padding: 12px;
  }
  .cryptor {
    position: sticky; bottom: 0; top: auto;
    padding: 14px; gap: 10px;
    box-shadow: 0 -18px 40px -20px rgba(0,0,0,.6);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .cryptor__arrow { display: none; }
  .cryptor__b64 { min-height: 42px; max-height: 90px; }
  .cryptor__plain { min-height: 46px; }
  .whoami { display: none; }
  .msg { max-width: 86%; }
  .channel__hint { display: none; }
}

@media (max-width: 480px) {
  .topbar { gap: 10px; padding: 12px 14px; }
  .brand__name { font-size: .95rem; }
  .presence__label { display: none; }
  .btn--sm { --pad-x: .6rem; }
  .app__footer { font-size: .6rem; }
}

/* collapsed cryptor toggle on very small screens is handled by JS focus */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .presence__dot { animation: none; }
}

/* focus visibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ============================================================
   v2 — tabs, gate messages, recovery, vault, seed grid, keys
   ============================================================ */

/* tabs */
.tabs {
  display: flex; gap: 4px; margin: 24px 0 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 4px;
}
.tab {
  flex: 1; padding: .6rem .5rem; border: none; cursor: pointer;
  background: transparent; color: var(--text-dim);
  font-family: var(--f-display); font-weight: 600; font-size: .9rem;
  border-radius: 10px; transition: background .2s, color .2s;
}
.tab.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px -6px rgba(0,0,0,.5); }

.pane { display: none; }
.pane.is-active { display: block; animation: rise .3s var(--ease) both; }
.pane .field { margin-bottom: 14px; }
.pane .btn--primary { margin-top: 4px; }

.gate__msg {
  margin: 10px 0 0; font-family: var(--f-mono); font-size: .8rem; line-height: 1.4;
  color: var(--text-dim);
}
.gate__msg--err { color: var(--danger); }
.gate__msg--err::before { content: "✕ "; font-weight: 700; }

.linkbtn {
  display: block; width: 100%; margin-top: 14px;
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); font-family: var(--f-mono); font-size: .78rem;
  text-align: center; transition: color .2s;
}
.linkbtn:hover { color: var(--accent); }

.recover {
  margin-top: 14px; padding-top: 16px;
  border-top: 1px dashed var(--border);
  display: grid; gap: 10px;
}

/* vault (save keys) */
.vault { display: block; animation: rise .35s var(--ease) both; }
.vault__head { text-align: center; margin: 6px 0 22px; }
.vault__mark {
  display: inline-block; width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, var(--violet), var(--violet-soft));
  box-shadow: 0 10px 30px -10px var(--violet);
  position: relative; margin-bottom: 12px;
}
.vault__mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 14px; height: 12px; top: 4px;
  border: 2.5px solid #fff; border-radius: 5px 5px 0 0; border-bottom: none;
}
.vault__mark::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 11px; margin: auto;
  width: 20px; height: 15px; background: #fff; border-radius: 4px;
}
.vault__head h2 { margin: 0 0 8px; font-family: var(--f-display); font-size: 1.35rem; }
.vault__head p { margin: 0; color: var(--text-dim); font-size: .88rem; line-height: 1.5; }
.vault__head b { color: var(--danger); }

.vault__block { margin-bottom: 16px; }
.vault__label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px;
}
.copybtn {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 8px; cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--accent);
  text-transform: none;
}
.copybtn:hover { border-color: var(--accent); }

.vault__license {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px; font-size: 1.02rem; letter-spacing: .14em; color: var(--cipher);
  word-break: break-all; text-align: center;
}

.seedgrid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  counter-reset: seed;
}
.seedgrid__item {
  counter-increment: seed;
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px;
}
.seedgrid__item::before {
  content: counter(seed);
  font-family: var(--f-mono); font-size: .72rem; color: var(--text-faint);
  min-width: 16px; text-align: right;
}
.seedgrid__word { font-family: var(--f-mono); font-size: .9rem; color: var(--text); }

.vault__ack {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 16px; font-size: .86rem; color: var(--text-dim); cursor: pointer;
}
.vault__ack input { width: 18px; height: 18px; accent-color: var(--violet); cursor: pointer; }

@media (max-width: 420px) { .seedgrid { grid-template-columns: 1fr; } }

/* key button in cryptor */
.keybtn {
  margin-left: auto; display: inline-flex; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text-faint); cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.keybtn:hover { color: var(--accent); border-color: var(--accent); }
.keybtn.is-private { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }

/* self-destruct pill in channel head */
.channel__selfdestruct {
  margin-left: 12px;
  font-family: var(--f-mono); font-size: .64rem; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
