/* ═══════════════════════════════════════════════════════════════════
   CYPH.27 — GUNMETAL LUX MAKEOVER (2026-08-28)
   Final cascade layer: overrides cyph.css + secure-surfaces.
   Design language: neutral GUNMETAL base (blue-grey steel), rounded
   AAA glass geometry, refined cyberpunk neon accents (cyan / magenta /
   phosphor) used sparingly — sleek "tech from the future", not HUD cosplay.
   Supersedes the 2026-08-25 angular CRT pass.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ── gunmetal surfaces — neutral steel greys, matte not obsidian ── */
  --gm-bg: #0B0E13;          /* page backdrop: near-black steel */
  --gm-panel: #13171E;       /* primary panel */
  --gm-panel-2: #171C24;     /* raised panel */
  --gm-panel-3: #1C222B;     /* hover / secondary */
  --gm-raised: #20262F;      /* chips, badges */
  --gm-hover: #232A34;
  --gm-input: #0F1319;

  /* hairlines — neutral white, softened */
  --gm-line: rgba(180, 200, 224, 0.08);
  --gm-line-strong: rgba(190, 210, 235, 0.15);

  /* text — cool neutral greys */
  --gm-text: #EDF1F7;
  --gm-text2: rgba(237, 241, 247, 0.66);
  --gm-text3: rgba(237, 241, 247, 0.40);

  /* cyberpunk accents — refined, restrained */
  --gm-cyan: #4FD9F5;
  --gm-cyan-dim: rgba(79, 217, 245, 0.55);
  --gm-magenta: #F2468A;
  --gm-magenta-dim: rgba(242, 70, 138, 0.55);
  --gm-violet: #9B7BFF;
  --gm-green: #3DDC84;
  --gm-amber: #F5C518;
  --gm-red: #FF5547;

  /* soft glows — bloom, not blast */
  --gm-glow-cyan: 0 0 18px rgba(79, 217, 245, 0.22);
  --gm-glow-cyan-soft: 0 0 10px rgba(79, 217, 245, 0.14);
  --gm-glow-magenta: 0 0 14px rgba(242, 70, 138, 0.20);
  --gm-glow-green: 0 0 10px rgba(61, 220, 132, 0.22);

  /* geometry — the whole point: NO pointy edges */
  --gm-r-sm: 9px;
  --gm-r-md: 13px;
  --gm-r-lg: 18px;
  --gm-r-xl: 24px;
  --gm-r-pill: 999px;

  /* legacy var redirects — anything cyph.css resolves flows to gunmetal */
  --bg: var(--gm-bg);
  --surface: var(--gm-panel);
  --surface2: var(--gm-panel-2);
  --surface3: var(--gm-raised);
  --surface-vibrancy: rgba(19, 23, 30, 0.88);
  --surface-vibrancy-strong: rgba(23, 28, 36, 0.96);
  --line: var(--gm-line);
  --line-strong: var(--gm-line-strong);
  --border: 1px solid var(--gm-line);
  --border-strong: 1px solid var(--gm-line-strong);
  --text: var(--gm-text);
  --text2: var(--gm-text2);
  --text3: var(--gm-text3);
  --muted: var(--gm-text3);
  --cyan: var(--gm-cyan);
  --cyan-hover: #7CE5F8;
  --violet: var(--gm-violet);
  --violet-hover: #B49AFF;
  --purple: var(--gm-violet);
  --green: var(--gm-green);
  --red: var(--gm-red);

  /* radius var redirects */
  --r: var(--gm-r-md);
  --r-sm: var(--gm-r-sm);
  --r-md: var(--gm-r-md);
  --r-lg: var(--gm-r-lg);
  --r-xl: var(--gm-r-xl);
  --radius-sm: var(--gm-r-sm);
  --radius-md: var(--gm-r-md);
  --radius-lg: var(--gm-r-lg);
  --radius-xl: var(--gm-r-xl);

  /* shadows — soft, deep, lux */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 34px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --shadow-lg: 0 18px 56px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

/* ═══ THE ROUNDING ENGINE — kill every clip-path on the app shell ═══ */
body.cyph-shell *,
body.cyph-shell *::before,
body.cyph-shell *::after {
  clip-path: none !important;
}

/* the older passes hard-set border-radius:0 !important — walk them back
   at higher specificity (body.cyph-shell wins over bare selectors) */
body.cyph-shell .sidebar,
body.cyph-shell .main-chat,
body.cyph-shell .right-panel,
body.cyph-shell .buddy-item,
body.cyph-shell .room-item,
body.cyph-shell .enclave-item,
body.cyph-shell .relay-item,
body.cyph-shell .rp-member,
body.cyph-shell .self-profile,
body.cyph-shell .chat-tab,
body.cyph-shell .chat-action-btn,
body.cyph-shell .self-edit-btn,
body.cyph-shell .e2ee-badge,
body.cyph-shell .chat-input,
body.cyph-shell .chat-input-wrap,
body.cyph-shell .chat-send,
body.cyph-shell .add-buddy-bar input,
body.cyph-shell .add-room-bar input,
body.cyph-shell .add-enclave-bar input,
body.cyph-shell .add-buddy-bar button,
body.cyph-shell .add-room-bar button,
body.cyph-shell .add-enclave-bar button,
body.cyph-shell .rp-encryption-key,
body.cyph-shell .rp-pgp-fingerprint,
body.cyph-shell .rp-badge,
body.cyph-shell .rp-terminal-log,
body.cyph-shell .ws-status,
body.cyph-shell .msg-bubble,
body.cyph-shell .msg-system,
body.cyph-shell .chat-tab-badge,
body.cyph-shell .bar-side-btn,
body.cyph-shell .composer-media-btn,
body.cyph-shell .cyph-context-menu,
body.cyph-shell .cyph-modal-card,
body.cyph-shell .command-palette-card,
body.cyph-shell .spectrum-card,
body.cyph-shell .gif-card,
body.cyph-shell .spectrum-input-wrap,
body.cyph-shell .gif-input-wrap,
body.cyph-shell .msg-line-img,
body.cyph-shell .msg-bubble-img,
body.cyph-shell #emoji-pop,
body.cyph-shell .radio-btn,
body.cyph-shell .radio-progress-wrap,
body.cyph-shell .profile-btn--ghost {
  border-radius: var(--gm-r-md) !important;
}

/* avatars — circles, the AAA way */
body.cyph-shell .avatar,
body.cyph-shell .msg-avatar,
body.cyph-shell .rp-dm-avatar,
body.cyph-shell .profile-avatar-lg,
body.cyph-shell .avatar img,
body.cyph-shell .msg-avatar img,
body.cyph-shell .rp-dm-avatar img {
  border-radius: 50% !important;
  clip-path: none !important;
}

/* member status dots — circles again, not diamonds */
body.cyph-shell .rp-member-dot {
  border-radius: 50% !important;
  transform: none !important;
  width: 7px; height: 7px;
}

/* scrollbars — round thumbs */
body.cyph-shell ::-webkit-scrollbar-thumb { border-radius: 999px !important; }

/* corner brackets from the tactical pass — gone */
body.cyph-shell .sidebar::before,
body.cyph-shell .main-chat::before,
body.cyph-shell .sidebar::after,
body.cyph-shell .main-chat::after {
  display: none !important;
  border: none !important;
}

/* ═══ ATMOSPHERE — gunmetal ambience, whisper of neon ═══ */
body.cyph-shell {
  background:
    radial-gradient(ellipse 72% 46% at 50% -12%, rgba(79, 217, 245, 0.05), transparent 62%),
    radial-gradient(ellipse 44% 32% at 92% 14%, rgba(155, 123, 255, 0.05), transparent 58%),
    radial-gradient(ellipse 42% 34% at 4% 82%, rgba(242, 70, 138, 0.03), transparent 60%),
    var(--gm-bg) !important;
  color: var(--gm-text);
}

/* grid: ultra-faint, gunmetal-tinted */
body.cyph-shell::before {
  background:
    linear-gradient(rgba(190, 210, 235, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 210, 235, 0.022) 1px, transparent 1px) !important;
  background-size: 40px 40px !important;
  opacity: 0.45 !important;
  mask-image: radial-gradient(ellipse 78% 64% at 50% 36%, #000 22%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 78% 64% at 50% 36%, #000 22%, transparent 82%);
}

/* CRT scanline overlay — nearly invisible now (suggestion of tech) */
body.cyph-shell::after {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 5px) !important;
  opacity: 0.35 !important;
  mix-blend-mode: multiply;
}

/* slow ambient sweep — cyan whisper instead of phosphor blast */
html::before {
  background: linear-gradient(180deg, transparent, rgba(79, 217, 245, 0.035), transparent) !important;
}

/* ═══ SHELL — floating glass chassis ═══ */
body.cyph-shell .app-shell {
  background: rgba(19, 23, 30, 0.6);
  border: 1px solid var(--gm-line) !important;
  border-top: 1px solid rgba(79, 217, 245, 0.30) !important;
  border-radius: 22px !important;
  box-shadow: var(--shadow-lg), 0 0 44px rgba(79, 217, 245, 0.04);
  overflow: hidden;
  margin: 10px;
  height: calc(100vh - 20px) !important;
  height: calc(100dvh - 20px) !important;
  backdrop-filter: blur(26px) saturate(1.25);
  -webkit-backdrop-filter: blur(26px) saturate(1.25);
}

body.cyph-shell .left-sidebar,
body.cyph-shell .main-chat,
body.cyph-shell .right-panel,
body.cyph-shell .sidebar {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.cyph-shell .left-sidebar { border-right: 1px solid rgba(79,217,245,0.13) !important; box-shadow: 1px 0 0 rgba(79,217,245,0.06), 8px 0 24px rgba(79,217,245,0.04) !important; }
body.cyph-shell .right-panel { border-left: 1px solid rgba(155,123,255,0.13) !important; box-shadow: -1px 0 0 rgba(155,123,255,0.06), -8px 0 24px rgba(155,123,255,0.04) !important; }

/* app-shell cyber frame — thin gradient hairline + outer bloom */
body.cyph-shell .app-shell {
  box-shadow:
    0 0 0 1px rgba(79,217,245,0.10),
    0 0 0 1px rgba(155,123,255,0.06) inset,
    0 18px 56px rgba(0,0,0,0.55),
    0 0 44px rgba(79,217,245,0.06),
    0 0 64px rgba(155,123,255,0.05) !important;
}
body.cyph-shell .chat-header {
  border-bottom: 1px solid rgba(79,217,245,0.14) !important;
  position: relative;
}
body.cyph-shell .chat-header::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79,217,245,0.28) 22%, rgba(155,123,255,0.22) 52%, rgba(242,70,138,0.16) 78%, transparent);
  opacity: 0.55; pointer-events: none;
}
body.cyph-shell .chat-tab-bar {
  border-bottom: 1px solid rgba(155,123,255,0.10) !important;
}
body.cyph-shell .sidebar-header {
  border-bottom: 1px solid rgba(79,217,245,0.12) !important;
}

/* neon spine — soft two-tone beam down the far left edge */
body.cyph-shell .left-sidebar::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gm-cyan), rgba(79, 217, 245, 0.05) 55%, rgba(242, 70, 138, 0.28));
  opacity: 0.5;
  pointer-events: none;
}

/* resizers */
body.cyph-shell .resizer::after { background: rgba(79, 217, 245, 0.08); }
body.cyph-shell .resizer:hover::after,
body.cyph-shell .resizer:active::after {
  background: var(--gm-cyan);
  box-shadow: var(--gm-glow-cyan-soft);
}

/* ═══ SIDEBAR ═══ */
body.cyph-shell .sidebar-header {
  padding: 18px 16px 14px !important;
  border-bottom: 1px solid var(--gm-line) !important;
  background:
    linear-gradient(90deg, rgba(79, 217, 245, 0.055), transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent) !important;
}
/* the old LED watermark — calm it down */
body.cyph-shell .sidebar-header::after {
  content: '◉ SECURE · E2EE';
  color: rgba(61, 220, 132, 0.45);
  animation: gmLed 3.2s ease-in-out infinite;
}
@keyframes gmLed { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

body.cyph-shell .sidebar-logo {
  font-family: 'Syne', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  color: var(--gm-text) !important;
  text-shadow: none !important;
}
body.cyph-shell .sidebar-logo::first-letter { color: var(--gm-cyan); }
body.cyph-shell .sidebar-logo:hover { animation: none !important; }
body.cyph-shell .sidebar-network {
  font-family: 'SF Mono', monospace !important;
  font-size: 8.5px !important;
  letter-spacing: 0.34em !important;
  color: var(--gm-cyan-dim) !important;
}
body.cyph-shell .cyph-logo--sm { filter: drop-shadow(0 0 10px rgba(79, 217, 245, 0.18)); }

body.cyph-shell .self-profile {
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-lg) !important;
  background: linear-gradient(150deg, rgba(32, 38, 47, 0.85), rgba(19, 23, 30, 0.8)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 22px rgba(0, 0, 0, 0.28);
  margin: 10px 10px 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.cyph-shell .self-name { color: var(--gm-text) !important; }
body.cyph-shell .self-status { color: var(--gm-text3) !important; }
body.cyph-shell .self-edit-btn:hover { color: var(--gm-cyan) !important; }

body.cyph-shell .section-label,
body.cyph-shell .partition-label {
  font-family: 'SF Mono', monospace !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.26em !important;
  text-transform: uppercase !important;
  color: var(--gm-text3) !important;
  border-bottom: 1px solid transparent !important;
  padding-left: 12px;
}
body.cyph-shell .section-label::before {
  content: '▸';
  color: var(--gm-cyan);
  opacity: 0.55;
  font-size: 8px;
}

/* nav tabs — iOS-clean, cyan underline glow */
body.cyph-shell .sidebar-nav-tabs {
  gap: 2px !important;
  padding: 0 6px !important;
  border-bottom: 1px solid var(--gm-line) !important;
  background: transparent !important;
}
body.cyph-shell .sidebar-nav-tab {
  border-radius: 10px 10px 0 0 !important;
  color: var(--gm-text3) !important;
  font-family: 'SF Mono', monospace !important;
  font-size: 10.5px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  border-bottom: 2px solid transparent !important;
  transition: color 150ms, border-color 150ms;
}
body.cyph-shell .sidebar-nav-tab:hover { color: var(--gm-text2) !important; }
body.cyph-shell .sidebar-nav-tab.active {
  color: var(--gm-cyan) !important;
  border-bottom-color: var(--gm-cyan) !important;
  text-shadow: 0 0 10px rgba(79, 217, 245, 0.35);
}

/* list rows — rounded pills, gunmetal hover, neon rail on active */
body.cyph-shell .buddy-item,
body.cyph-shell .room-item,
body.cyph-shell .enclave-item,
body.cyph-shell .spectrum-row,
body.cyph-shell .relay-item {
  border-radius: var(--gm-r-md) !important;
  border-left: 2px solid transparent !important;
  margin: 2px 8px !important;
  transition: background 140ms ease, border-color 140ms ease;
}
body.cyph-shell .buddy-item:hover,
body.cyph-shell .room-item:hover,
body.cyph-shell .enclave-item:hover,
body.cyph-shell .spectrum-row:hover,
body.cyph-shell .relay-item:hover {
  background: var(--gm-panel-3) !important;
  border-left-color: rgba(79, 217, 245, 0.4) !important;
  transform: none;
}
body.cyph-shell .buddy-item.active,
body.cyph-shell .room-item.active,
body.cyph-shell .enclave-item.active,
body.cyph-shell .relay-item.active {
  background: linear-gradient(90deg, rgba(79, 217, 245, 0.12), rgba(79, 217, 245, 0.025) 72%) !important;
  border-left-color: var(--gm-cyan) !important;
  box-shadow: inset 0 0 0 1px rgba(79, 217, 245, 0.10), var(--gm-glow-cyan-soft);
}
body.cyph-shell .buddy-name,
body.cyph-shell .room-name,
body.cyph-shell .enclave-name { color: var(--gm-text) !important; }
body.cyph-shell .buddy-node,
body.cyph-shell .room-meta,
body.cyph-shell .buddy-meta,
body.cyph-shell .room-hash,
body.cyph-shell .enclave-partition {
  font-family: 'SF Mono', monospace !important;
  color: var(--gm-text3) !important;
}
body.cyph-shell .room-slug { color: var(--gm-cyan-dim) !important; text-shadow: none !important; }
body.cyph-shell .enclave-count { font-family: 'SF Mono', monospace; color: var(--gm-cyan-dim); }

body.cyph-shell .status-dot.online {
  background: var(--gm-green) !important;
  box-shadow: var(--gm-glow-green) !important;
  animation: gmLed 2.8s ease-in-out infinite;
}
body.cyph-shell .status-dot.away { background: var(--gm-amber) !important; }
body.cyph-shell .status-dot.busy { background: var(--gm-red) !important; box-shadow: 0 0 8px rgba(255, 85, 71, 0.5) !important; }

body.cyph-shell .buddy-unread {
  background: var(--gm-magenta) !important;
  color: #fff !important;
  border-radius: var(--gm-r-pill) !important;
  font-family: 'SF Mono', monospace !important;
  font-size: 9.5px !important;
  box-shadow: var(--gm-glow-magenta);
}

/* add bars + inputs — rounded, gunmetal inset */
body.cyph-shell .add-buddy-bar input,
body.cyph-shell .add-room-bar input,
body.cyph-shell .add-enclave-bar input,
body.cyph-shell .join-room-bar input,
body.cyph-shell .gif-input-wrap input,
body.cyph-shell .command-palette-input-wrap input,
body.cyph-shell .chat-input-wrap textarea,
body.cyph-shell .rp-terminal-input,
body.cyph-shell .profile-field input,
body.cyph-shell .profile-field textarea,
body.cyph-shell .profile-field select,
body.cyph-shell .spectrum-input-wrap input,
body.cyph-shell .chat-input {
  background: var(--gm-input) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-md) !important;
  color: var(--gm-text) !important;
  caret-color: var(--gm-cyan) !important;
  transition: border-color 150ms, box-shadow 150ms;
}
body.cyph-shell .add-buddy-bar input:focus,
body.cyph-shell .add-room-bar input:focus,
body.cyph-shell .add-enclave-bar input:focus,
body.cyph-shell .join-room-bar input:focus,
body.cyph-shell .gif-input-wrap input:focus,
body.cyph-shell .command-palette-input-wrap input:focus,
body.cyph-shell .chat-input-wrap textarea:focus,
body.cyph-shell .rp-terminal-input:focus,
body.cyph-shell .profile-field input:focus,
body.cyph-shell .profile-field textarea:focus,
body.cyph-shell .profile-field select:focus,
body.cyph-shell .spectrum-input-wrap input:focus,
body.cyph-shell .chat-input:focus {
  outline: none !important;
  border-color: rgba(79, 217, 245, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(79, 217, 245, 0.14), inset 0 0 14px rgba(79, 217, 245, 0.04) !important;
}

body.cyph-shell .add-buddy-bar button,
body.cyph-shell .add-room-bar button,
body.cyph-shell .add-enclave-bar button {
  background: var(--gm-panel-3) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-md) !important;
  color: var(--gm-text2) !important;
}
body.cyph-shell .add-buddy-bar button:hover,
body.cyph-shell .add-room-bar button:hover,
body.cyph-shell .add-enclave-bar button:hover {
  color: var(--gm-cyan) !important;
  border-color: rgba(79, 217, 245, 0.4) !important;
  box-shadow: var(--gm-glow-cyan-soft);
}

body.cyph-shell .bar-side-btn {
  background: rgba(79, 217, 245, 0.06) !important;
  border: 1px solid rgba(79, 217, 245, 0.24) !important;
  border-radius: var(--gm-r-md) !important;
  color: var(--gm-cyan) !important;
}
body.cyph-shell .bar-side-btn:hover {
  background: rgba(79, 217, 245, 0.13) !important;
  box-shadow: var(--gm-glow-cyan-soft) !important;
}
body.cyph-shell #create-room-public[aria-pressed="true"] {
  color: var(--gm-green) !important;
  border-color: rgba(61, 220, 132, 0.4) !important;
  background: rgba(61, 220, 132, 0.10) !important;
  box-shadow: var(--gm-glow-green) !important;
}

/* ═══ MAIN CHAT ═══ */
body.cyph-shell .chat-tab-bar {
  background: rgba(23, 28, 36, 0.5) !important;
  border-bottom: 1px solid var(--gm-line) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.cyph-shell .chat-tab {
  border-radius: var(--gm-r-pill) !important;
  color: var(--gm-text3) !important;
  font-family: 'SF Mono', monospace !important;
}
body.cyph-shell .chat-tab:hover {
  color: var(--gm-text2) !important;
  background: var(--gm-panel-3) !important;
  border-color: var(--gm-line) !important;
}
body.cyph-shell .chat-tab.active {
  color: var(--gm-cyan) !important;
  background: linear-gradient(180deg, rgba(79, 217, 245, 0.11), rgba(79, 217, 245, 0.03)) !important;
  border-color: rgba(79, 217, 245, 0.35) !important;
  text-shadow: 0 0 10px rgba(79, 217, 245, 0.3);
}
body.cyph-shell .chat-tab.active::before {
  background: var(--gm-cyan);
  box-shadow: 0 0 10px rgba(79, 217, 245, 0.55);
}
body.cyph-shell .chat-tab-badge {
  background: var(--gm-magenta) !important;
  color: #fff !important;
  border-radius: var(--gm-r-pill) !important;
  box-shadow: var(--gm-glow-magenta);
}

body.cyph-shell .chat-header {
  background: linear-gradient(180deg, rgba(23, 28, 36, 0.92), rgba(19, 23, 30, 0.95)) !important;
  border-bottom: 1px solid rgba(79,217,245,0.14) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
}
body.cyph-shell .chat-peer-name {
  font-family: 'Syne', sans-serif !important;
  letter-spacing: 0.03em !important;
  color: var(--gm-text) !important;
  text-shadow: none !important;
}
body.cyph-shell .chat-peer-name::before { content: '// '; color: var(--gm-cyan); font-family: 'SF Mono', monospace; }
body.cyph-shell .chat-peer-status {
  font-family: 'SF Mono', monospace !important;
  font-size: 10px !important;
  color: var(--gm-cyan-dim) !important;
}

body.cyph-shell .chat-action-btn,
body.cyph-shell .self-edit-btn,
body.cyph-shell .win-btn {
  background: transparent !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-sm) !important;
  color: var(--gm-text2) !important;
  transition: all 140ms ease;
}
body.cyph-shell .chat-action-btn:hover,
body.cyph-shell .self-edit-btn:hover,
body.cyph-shell .win-btn:hover {
  border-color: rgba(79, 217, 245, 0.45) !important;
  color: var(--gm-cyan) !important;
  box-shadow: var(--gm-glow-cyan-soft) !important;
}
body.cyph-shell .chat-action-btn.danger:hover {
  color: var(--gm-magenta) !important;
  border-color: rgba(242, 70, 138, 0.4) !important;
  box-shadow: var(--gm-glow-magenta) !important;
}

body.cyph-shell .e2ee-badge {
  border: 1px solid rgba(61, 220, 132, 0.35) !important;
  color: var(--gm-green) !important;
  border-radius: var(--gm-r-pill) !important;
  background: rgba(61, 220, 132, 0.06) !important;
}

/* messages — soft glass bubbles, cyan rail out / violet rail in */
body.cyph-shell .messages {
  background:
    radial-gradient(ellipse 56% 30% at 50% 0%, rgba(79, 217, 245, 0.035), transparent 72%),
    transparent !important;
}
body.cyph-shell .msg-bubble {
  background: var(--gm-panel-2) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-lg) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22) !important;
}
body.cyph-shell .msg-row.incoming .msg-bubble {
  border-color: rgba(155, 123, 255, 0.20) !important;
  background: linear-gradient(180deg, rgba(155, 123, 255, 0.055), rgba(155, 123, 255, 0.02)), var(--gm-panel-2) !important;
  box-shadow: inset 2px 0 0 rgba(155, 123, 255, 0.35), 0 4px 16px rgba(0, 0, 0, 0.22) !important;
  border-bottom-left-radius: 7px !important;
}
body.cyph-shell .msg-row.outgoing .msg-bubble {
  background: linear-gradient(160deg, rgba(79, 217, 245, 0.11), rgba(79, 217, 245, 0.04)) !important;
  border: 1px solid rgba(79, 217, 245, 0.26) !important;
  box-shadow: inset -2px 0 0 rgba(79, 217, 245, 0.4), 0 4px 16px rgba(0, 0, 0, 0.22) !important;
  border-bottom-right-radius: 7px !important;
}
body.cyph-shell .msg-row.incoming .msg-sender { color: #C2A5FF !important; }
body.cyph-shell .msg-row.outgoing .msg-sender { color: var(--gm-cyan) !important; text-shadow: none !important; }
body.cyph-shell .msg-time,
body.cyph-shell .msg-line-time {
  font-family: 'SF Mono', monospace !important;
  font-size: 9px !important;
  color: var(--gm-text3) !important;
}
body.cyph-shell .msg-system,
body.cyph-shell .msg-line-system {
  border-radius: var(--gm-r-md) !important;
  font-family: 'SF Mono', monospace !important;
  color: rgba(245, 197, 24, 0.85) !important;
  border: 1px solid rgba(245, 197, 24, 0.18) !important;
  background: rgba(245, 197, 24, 0.04) !important;
}
/* the [bracket] decorations read as pointy — drop them */
body.cyph-shell .msg-time::before,
body.cyph-shell .msg-time::after,
body.cyph-shell .msg-row.incoming .msg-sender::before,
body.cyph-shell .msg-row.incoming .msg-sender::after,
body.cyph-shell .msg-row.outgoing .msg-sender::before,
body.cyph-shell .msg-row.outgoing .msg-sender::after,
body.cyph-shell .msg-system::before,
body.cyph-shell .msg-line-system::before {
  content: '' !important;
}

/* composer — rounded transmit bay, soft glow */
body.cyph-shell .chat-input-bar {
  background: rgba(23, 28, 36, 0.85) !important;
  border-top: 1px solid var(--gm-line) !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.cyph-shell .chat-input-bar::before {
  content: '❯';
  font-family: 'SF Mono', monospace;
  color: var(--gm-cyan);
  opacity: 0.7;
  margin-right: 10px;
  align-self: center;
}
body.cyph-shell .chat-input-wrap {
  background: var(--gm-input) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-pill) !important;
}
body.cyph-shell .chat-input-wrap:focus-within {
  border-color: rgba(79, 217, 245, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(79, 217, 245, 0.13) !important;
}
body.cyph-shell .chat-input::placeholder {
  color: var(--gm-text3) !important;
  letter-spacing: 0.14em !important;
}

/* ── Composer mirror — keep custom N27 emoji preview alive ── */
body.cyph-shell .chat-input-mirror {
  padding: 10px 0 10px 0 !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  font-family: 'SF Pro Text', system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--gm-text) !important;
  white-space: pre !important;
  overflow: hidden !important;
  display: block !important;
  opacity: 1 !important;
  pointer-events: none !important;
}
body.cyph-shell .composer-emoji {
  width: 18px !important;
  height: 18px !important;
  vertical-align: -4px !important;
  display: inline-block !important;
  margin: 0 1px !important;
  object-fit: contain !important;
}

/* THE send button — YAGA lux milled hardware */
body.cyph-shell .chat-send,
body.cyph-shell .chat-send:disabled {
  background:
    radial-gradient(120% 140% at 30% 20%, rgba(255,255,255,0.22), transparent 55%),
    linear-gradient(135deg, #5FE0FF 0%, #7A8CFF 38%, #B07AFF 68%, #FF6B9E 100%) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: var(--gm-r-pill) !important;
  color: #081018 !important;
  font-weight: 800 !important;
  font-size: 0 !important; /* hide raw ▶ glyph, we render icon via ::before */
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.18) inset,
    0 8px 22px rgba(95, 224, 255, 0.28),
    0 2px 10px rgba(176, 122, 255, 0.22) !important;
  transition: transform 160ms cubic-bezier(0.16,1,0.3,1), filter 160ms ease, box-shadow 200ms ease !important;
}
body.cyph-shell .chat-send::before {
  content: '';
  position: absolute; inset: 0;
  background: center / 18px 18px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23081018' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E");
  opacity: 0.96;
  pointer-events: none;
}
body.cyph-shell .chat-send::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.42) 50%, transparent 70%);
  transform: translateX(-120%);
  opacity: 0;
  transition: transform 420ms ease, opacity 220ms ease;
  pointer-events: none;
}
body.cyph-shell .chat-send:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 3px 0 rgba(255,255,255,0.20) inset,
    0 12px 30px rgba(95, 224, 255, 0.34),
    0 4px 14px rgba(176, 122, 255, 0.26) !important;
}
body.cyph-shell .chat-send:hover::after {
  transform: translateX(120%);
  opacity: 1;
}
body.cyph-shell .chat-send:active {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.98);
}
body.cyph-shell .chat-send:disabled {
  opacity: 0.32; box-shadow: none !important; transform: none !important;
}
body.cyph-shell .chat-send:disabled::before { opacity: 0.45; }

body.cyph-shell .composer-media-btn {
  background: var(--gm-panel-3) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-sm) !important;
  color: var(--gm-text2) !important;
}
body.cyph-shell .composer-media-btn:hover {
  color: var(--gm-cyan) !important;
  border-color: rgba(79, 217, 245, 0.35) !important;
  box-shadow: var(--gm-glow-cyan-soft);
}

/* ═══ RIGHT PANEL ═══ */
body.cyph-shell .rp-header {
  font-family: 'SF Mono', monospace !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.26em !important;
  text-transform: uppercase !important;
  color: var(--gm-cyan-dim) !important;
  text-shadow: none !important;
}
body.cyph-shell .rp-header::before { content: '▸ '; }
body.cyph-shell .rp-room-name { color: var(--gm-text) !important; }
body.cyph-shell .rp-room-desc { color: var(--gm-text2) !important; }
body.cyph-shell .rp-divider { border-bottom: 1px solid var(--gm-line) !important; }

body.cyph-shell .rp-encryption-key,
body.cyph-shell .rp-pgp-fingerprint {
  background: var(--gm-panel-2) !important;
  border: 1px solid var(--gm-line) !important;
  border-left: 2px solid var(--gm-green) !important;
  border-radius: var(--gm-r-md) !important;
  box-shadow: inset 0 0 16px rgba(61, 220, 132, 0.04);
}
body.cyph-shell .rp-enc-hash { color: var(--gm-green) !important; text-shadow: none !important; }
body.cyph-shell .rp-pgp-hash { color: var(--gm-cyan) !important; }

body.cyph-shell .rp-member { border-radius: var(--gm-r-md) !important; }
body.cyph-shell .rp-member:hover { background: var(--gm-panel-3) !important; }
body.cyph-shell .rp-badge {
  border-radius: var(--gm-r-pill) !important;
  font-family: 'SF Mono', monospace !important;
  background: rgba(155, 123, 255, 0.12) !important;
  color: #C2A5FF !important;
  border: 1px solid rgba(155, 123, 255, 0.3) !important;
}
body.cyph-shell .rp-member-dot.online { background: var(--gm-green) !important; box-shadow: var(--gm-glow-green) !important; }
body.cyph-shell .rp-member-dot.away { background: var(--gm-amber) !important; }
body.cyph-shell .rp-member-dot.offline { background: rgba(237, 241, 247, 0.22) !important; }

/* AI terminal — gunmetal console, green phosphor hint */
body.cyph-shell #rp-ai-terminal {
  background: linear-gradient(180deg, rgba(15, 19, 25, 0.95), rgba(11, 14, 19, 0.98)) !important;
  border-top: 1px solid rgba(61, 220, 132, 0.2) !important;
}
body.cyph-shell #rp-ai-terminal::before {
  content: 'MIKUOS · AI GATEWAY';
  position: absolute; top: 6px; right: 14px;
  font-family: 'SF Mono', monospace; font-size: 7px; letter-spacing: 0.22em;
  color: rgba(61, 220, 132, 0.25);
  pointer-events: none;
}
body.cyph-shell #rp-ai-terminal .rp-header { color: var(--gm-green) !important; text-shadow: none !important; }
body.cyph-shell .rp-terminal-log {
  background: rgba(9, 12, 17, 0.9) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-md) !important;
  font-family: 'SF Mono', monospace !important;
}
body.cyph-shell .rp-terminal-msg.rp-system { color: rgba(61, 220, 132, 0.5) !important; }
body.cyph-shell .rp-terminal-msg.rp-user { color: #CFE8FF !important; }
body.cyph-shell .rp-terminal-msg.rp-ai { color: #7CE5C0 !important; text-shadow: none !important; }
body.cyph-shell .rp-terminal-msg.rp-error { color: var(--gm-red) !important; }
body.cyph-shell .rp-terminal-prompt { color: var(--gm-green); text-shadow: 0 0 8px rgba(61, 220, 132, 0.4); }
body.cyph-shell .rp-terminal-input { caret-color: var(--gm-green) !important; }

/* ═══ MODALS / PALETTE / SCANNER — floating lux glass ═══ */
body.cyph-shell .cyph-modal-card,
body.cyph-shell .cyph-context-menu,
body.cyph-shell .command-palette-card,
body.cyph-shell .spectrum-card,
body.cyph-shell .gif-card,
body.cyph-shell #emoji-pop {
  background: linear-gradient(180deg, rgba(28, 34, 43, 0.97), rgba(19, 23, 30, 0.99)) !important;
  border: 1px solid var(--gm-line-strong) !important;
  border-top: 2px solid rgba(79, 217, 245, 0.45) !important;
  border-radius: var(--gm-r-xl) !important;
  box-shadow: var(--shadow-lg), 0 0 36px rgba(79, 217, 245, 0.05) !important;
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}
body.cyph-shell .cyph-modal-header {
  font-family: 'Syne', sans-serif !important;
  border-bottom: 1px solid var(--gm-line) !important;
}
body.cyph-shell .cyph-modal-footer {
  background: rgba(255, 255, 255, 0.02) !important;
  border-top: 1px solid var(--gm-line) !important;
  border-radius: 0 0 var(--gm-r-xl) var(--gm-r-xl) !important;
}
body.cyph-shell .cyph-modal-close:hover { color: var(--gm-cyan) !important; }

body.cyph-shell .spectrum-head,
body.cyph-shell .gif-head {
  border-bottom: 1px solid var(--gm-line) !important;
  background: linear-gradient(90deg, rgba(79, 217, 245, 0.05), transparent 70%) !important;
}
body.cyph-shell .spectrum-title { color: var(--gm-cyan) !important; text-shadow: 0 0 12px rgba(79, 217, 245, 0.3); }
body.cyph-shell .gif-title { color: var(--gm-violet) !important; text-shadow: 0 0 12px rgba(155, 123, 255, 0.3); }
body.cyph-shell .spectrum-input-wrap,
body.cyph-shell .gif-input-wrap {
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-pill) !important;
  background: var(--gm-input) !important;
}
body.cyph-shell .spectrum-input-wrap:focus-within,
body.cyph-shell .gif-input-wrap:focus-within {
  border-color: rgba(79, 217, 245, 0.42) !important;
  box-shadow: 0 0 0 3px rgba(79, 217, 245, 0.12) !important;
}
body.cyph-shell .spectrum-input-wrap .prompt { color: var(--gm-cyan); }
body.cyph-shell .gif-input-wrap .prompt { color: var(--gm-violet); }
body.cyph-shell .spectrum-row { border-radius: var(--gm-r-md) !important; }
body.cyph-shell .spectrum-row:hover,
body.cyph-shell .spectrum-row:focus-visible {
  background: var(--gm-panel-3) !important;
  border-left-color: rgba(79, 217, 245, 0.4) !important;
}
body.cyph-shell .spectrum-freq { color: var(--gm-cyan) !important; text-shadow: 0 0 8px rgba(79, 217, 245, 0.2); }
body.cyph-shell .spectrum-tuned {
  color: var(--gm-green) !important;
  border-color: rgba(61, 220, 132, 0.3) !important;
  border-radius: var(--gm-r-pill) !important;
}
body.cyph-shell .spectrum-scanline {
  background: linear-gradient(90deg, transparent, var(--gm-cyan), transparent) !important;
  opacity: 0.5;
}
body.cyph-shell .gif-item, body.cyph-shell .emoji-cell { border-radius: 10px !important; }
body.cyph-shell .gif-item:hover {
  border-color: rgba(79, 217, 245, 0.4) !important;
  box-shadow: var(--gm-glow-cyan-soft);
}
body.cyph-shell .emoji-cell:hover { background: var(--gm-hover) !important; }
body.cyph-shell .emoji-cell.emoji-custom:hover { background: rgba(79, 217, 245, 0.13) !important; }

body.cyph-shell .command-palette-result:hover,
body.cyph-shell .command-palette-result.selected,
body.cyph-shell .command-palette-result.active {
  background: var(--gm-panel-3) !important;
  border-left: 2px solid var(--gm-cyan) !important;
  border-radius: var(--gm-r-md);
}
body.cyph-shell .command-palette-input-wrap .prompt { color: var(--gm-cyan); }

body.cyph-shell .cyph-context-menu button:hover { background: var(--gm-hover) !important; }
body.cyph-shell .cyph-context-menu button.danger { color: var(--gm-magenta) !important; }

body.cyph-shell .msg-line-img,
body.cyph-shell .msg-bubble-img {
  border: 1px solid var(--gm-line-strong) !important;
  border-radius: var(--gm-r-md) !important;
  background: var(--gm-input) !important;
}

/* ═══ AUTH SCREEN (index.html) — gunmetal vault, rounded ═══ */
.auth-wrap {
  background:
    radial-gradient(ellipse 68% 42% at 50% -6%, rgba(79, 217, 245, 0.06), transparent 62%),
    radial-gradient(ellipse 44% 32% at 92% 18%, rgba(155, 123, 255, 0.06), transparent 58%),
    radial-gradient(ellipse 38% 30% at 8% 84%, rgba(242, 70, 138, 0.03), transparent 60%),
    var(--gm-bg) !important;
}
.auth-card {
  background: linear-gradient(180deg, rgba(28, 34, 43, 0.96), rgba(19, 23, 30, 0.99)) !important;
  border: 1px solid var(--gm-line-strong) !important;
  border-radius: var(--gm-r-xl) !important;
  clip-path: none !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 44px rgba(79, 217, 245, 0.05) !important;
  overflow: hidden;
}
.auth-card::before {
  background: linear-gradient(90deg, transparent, var(--gm-cyan), var(--gm-violet), transparent);
  height: 2px; opacity: 0.8;
  animation: gmAuthScan 3.6s ease-in-out infinite;
}
@keyframes gmAuthScan { 0%, 100% { transform: translateX(-30%); } 50% { transform: translateX(30%); } }

.auth-logo, .auth-brand-name { font-family: 'Syne', sans-serif !important; text-shadow: none !important; }
.auth-tabs .auth-tab {
  font-family: 'SF Mono', monospace !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  border-radius: var(--gm-r-sm) !important;
}
.auth-tab.active {
  color: var(--gm-cyan) !important;
  border-bottom-color: var(--gm-cyan) !important;
  text-shadow: 0 0 10px rgba(79, 217, 245, 0.3) !important;
}
.auth-field input {
  background: var(--gm-input) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-md) !important;
  clip-path: none !important;
  caret-color: var(--gm-cyan) !important;
}
.auth-field input:focus {
  outline: none !important;
  border-color: rgba(79, 217, 245, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(79, 217, 245, 0.14) !important;
}

.auth-btn:not(.nucleus-btn) {
  background: linear-gradient(135deg, var(--gm-cyan), var(--gm-violet)) !important;
  border: 1px solid transparent !important;
  border-radius: var(--gm-r-pill) !important;
  clip-path: none !important;
  color: #06121A !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  box-shadow: 0 8px 22px rgba(79, 217, 245, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
.auth-btn:not(.nucleus-btn):hover {
  filter: brightness(1.08);
  box-shadow: 0 12px 30px rgba(79, 217, 245, 0.3) !important;
}
.auth-btn.nucleus-btn {
  background: rgba(79, 217, 245, 0.07) !important;
  border: 1px solid rgba(79, 217, 245, 0.28) !important;
  border-radius: var(--gm-r-pill) !important;
  clip-path: none !important;
  color: var(--gm-cyan) !important;
}
.auth-btn.nucleus-btn:hover {
  background: rgba(79, 217, 245, 0.13) !important;
  box-shadow: var(--gm-glow-cyan-soft) !important;
}

/* ═══ PROFILE MODAL ═══ */
body.cyph-shell .profile-btn--primary {
  background: linear-gradient(135deg, var(--gm-cyan), var(--gm-violet)) !important;
  border: 1px solid transparent !important;
  border-radius: var(--gm-r-pill) !important;
  color: #06121A !important;
  font-weight: 800 !important;
}
body.cyph-shell .profile-btn--primary:hover { filter: brightness(1.08); }
body.cyph-shell .profile-btn--ghost {
  background: transparent !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-pill) !important;
  color: var(--gm-text2) !important;
}
body.cyph-shell .profile-btn--ghost:hover {
  border-color: rgba(79, 217, 245, 0.4) !important;
  color: var(--gm-cyan) !important;
}

/* ═══ RADIO ═══ */
body.cyph-shell .radio-bar,
body.cyph-shell .spectrum-card {
  background: var(--gm-panel-2) !important;
  border: 1px solid var(--gm-line) !important;
}
body.cyph-shell .radio-btn {
  border: 1px solid var(--gm-line) !important;
  border-radius: var(--gm-r-pill) !important;
  color: var(--gm-text2) !important;
  background: transparent !important;
}
body.cyph-shell .radio-btn:hover { border-color: rgba(79, 217, 245, 0.4) !important; color: var(--gm-cyan) !important; }
body.cyph-shell .radio-btn.radio-mode.active {
  border-color: var(--gm-cyan) !important;
  color: var(--gm-cyan) !important;
  background: rgba(79, 217, 245, 0.08) !important;
}
body.cyph-shell .radio-progress-wrap { background: var(--gm-input) !important; border-radius: var(--gm-r-pill) !important; }
body.cyph-shell .radio-progress-fill {
  background: linear-gradient(90deg, var(--gm-cyan), var(--gm-magenta)) !important;
  border-radius: var(--gm-r-pill) !important;
  box-shadow: 0 0 8px rgba(79, 217, 245, 0.35);
}
body.cyph-shell .radio-vol-slider { accent-color: var(--gm-cyan); }

/* ═══ EMPTY STATE — calm center ═══ */
body.cyph-shell .empty-chat {
  background:
    radial-gradient(circle at 50% 42%, transparent 118px, rgba(79, 217, 245, 0.04) 119px, transparent 121px),
    radial-gradient(circle at 50% 42%, transparent 150px, rgba(155, 123, 255, 0.03) 151px, transparent 153px),
    radial-gradient(ellipse 55% 40% at 50% 42%, rgba(79, 217, 245, 0.05), transparent 72%);
}
body.cyph-shell .empty-chat::before {
  text-shadow: 0 0 26px rgba(79, 217, 245, 0.25), 0 0 56px rgba(155, 123, 255, 0.12);
  animation: emptyBrandIn 0.5s ease-out;
}
body.cyph-shell .empty-chat::after { color: var(--gm-text3); letter-spacing: 0.18em; }

/* ═══ LOG MODE ═══ */
body.cyph-shell #log-mode-btn.log-on {
  color: var(--gm-green) !important;
  border-color: rgba(61, 220, 132, 0.32) !important;
  background: rgba(61, 220, 132, 0.07) !important;
}

/* ═══ WS STATUS CHIPS ═══ */
body.cyph-shell .ws-status { border-radius: var(--gm-r-pill) !important; letter-spacing: 0.14em; }
body.cyph-shell .ws-status.connected {
  background: rgba(61, 220, 132, 0.10) !important;
  color: var(--gm-green) !important;
  border-color: rgba(61, 220, 132, 0.3) !important;
}
body.cyph-shell .ws-status.connecting {
  background: rgba(245, 197, 24, 0.08) !important;
  color: var(--gm-amber) !important;
  border-color: rgba(245, 197, 24, 0.28) !important;
}
body.cyph-shell .ws-status.disconnected {
  background: rgba(255, 85, 71, 0.08) !important;
  color: var(--gm-red) !important;
  border-color: rgba(255, 85, 71, 0.28) !important;
}

/* ═══ SYSTEM: selection / focus / scrollbars ═══ */
::selection { background: rgba(79, 217, 245, 0.26); color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 1px solid rgba(79, 217, 245, 0.6) !important;
  outline-offset: 2px;
  border-radius: var(--gm-r-sm);
}
body.cyph-shell ::-webkit-scrollbar { width: 8px; height: 8px; }
body.cyph-shell ::-webkit-scrollbar-thumb { background: rgba(190, 210, 235, 0.16); }
body.cyph-shell ::-webkit-scrollbar-thumb:hover { background: rgba(79, 217, 245, 0.32); }

/* danger accents */
body.cyph-shell .room-delete-btn { color: var(--gm-magenta) !important; }
body.cyph-shell .room-delete-btn:hover {
  border-color: var(--gm-magenta) !important;
  box-shadow: var(--gm-glow-magenta) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   USABILITY LAYER — "user friendly" pass (2026-08-28)
   Bigger touch targets, clearer affordances, calmer mono HUD,
   readable sizes, obvious hover/active, generous spacing.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tap targets: nothing interactive under 36px tall ── */
body.cyph-shell .chat-action-btn,
body.cyph-shell .self-edit-btn,
body.cyph-shell .win-btn,
body.cyph-shell .composer-media-btn,
body.cyph-shell .add-buddy-bar button,
body.cyph-shell .add-room-bar button,
body.cyph-shell .add-enclave-bar button,
body.cyph-shell .bar-side-btn {
  min-width: 36px !important;
  min-height: 36px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── List rows: taller, breathe more, obvious hover ── */
body.cyph-shell .buddy-item,
body.cyph-shell .room-item,
body.cyph-shell .enclave-item,
body.cyph-shell .spectrum-row,
body.cyph-shell .relay-item {
  padding: 10px 12px !important;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
body.cyph-shell .buddy-item:hover,
body.cyph-shell .room-item:hover,
body.cyph-shell .enclave-item:hover,
body.cyph-shell .spectrum-row:hover,
body.cyph-shell .relay-item:hover {
  transform: translateX(2px);
  box-shadow: var(--gm-glow-cyan-soft);
}

/* names readable, not whispered */
body.cyph-shell .buddy-name,
body.cyph-shell .room-name,
body.cyph-shell .enclave-name {
  font-size: 13.5px !important;
  font-weight: 600 !important;
}
body.cyph-shell .buddy-node,
body.cyph-shell .room-meta,
body.cyph-shell .buddy-meta,
body.cyph-shell .room-slug {
  font-size: 10.5px !important;
}

/* ── Nav tabs: full-width fingers, obvious active ── */
body.cyph-shell .sidebar-nav-tab {
  padding: 12px 6px 10px !important;
  font-size: 11px !important;
  min-height: 40px;
}

/* ── Composer: the friendliest surface in the app ── */
body.cyph-shell .chat-input-bar {
  padding: 14px 16px !important;
  gap: 10px !important;
}
body.cyph-shell .chat-input-wrap {
  min-height: 46px;
  padding: 0 6px 0 16px;
  align-items: center;
}
body.cyph-shell .chat-input {
  font-size: 14px !important;
  min-height: 44px;
  padding: 10px 0 !important;
}
body.cyph-shell .chat-input::placeholder {
  font-family: 'SF Pro Text', system-ui, sans-serif !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  color: var(--gm-text3) !important;
}
body.cyph-shell .chat-input,
body.cyph-shell .chat-input-mirror {
  font-family: 'SF Pro Text', system-ui, sans-serif !important;
}
/* ❯ prompt glyph is decoration — hide when it crowds the composer */
body.cyph-shell .chat-input-bar::before { display: none; }

/* send button — big, obvious, friendly */
body.cyph-shell .chat-send {
  min-width: 48px !important;
  min-height: 44px !important;
  font-size: 15px !important;
  padding: 0 20px !important;
}

/* ── Inputs everywhere: taller, softer placeholders ── */
body.cyph-shell .profile-field input,
body.cyph-shell .profile-field textarea,
body.cyph-shell .spectrum-input-wrap input,
body.cyph-shell .gif-input-wrap input {
  min-height: 40px !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
}

/* ── Left-menu bottom: tightened Yaga console — inset pill slots ── */
body.cyph-shell .sidebar {
  padding-bottom: 10px !important;
}
body.cyph-shell .add-buddy-bar,
body.cyph-shell .add-room-bar,
body.cyph-shell .add-enclave-bar,
body.cyph-shell .join-room-bar {
  margin: 8px 10px 0 !important;
  padding: 4px 4px 4px 6px !important;
  gap: 6px !important;
  background: var(--gm-input) !important;
  border: 1px solid var(--gm-line) !important;
  border-radius: 999px !important;
  min-height: 40px;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
body.cyph-shell .add-buddy-bar:first-of-type,
body.cyph-shell .join-room-bar {
  margin-top: 10px !important;
}
body.cyph-shell .add-buddy-bar input,
body.cyph-shell .add-room-bar input,
body.cyph-shell .add-enclave-bar input,
body.cyph-shell .join-room-bar input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: 30px !important;
  font-size: 12.5px !important;
  padding: 6px 8px !important;
}
body.cyph-shell .add-buddy-bar input:focus,
body.cyph-shell .add-room-bar input:focus,
body.cyph-shell .add-enclave-bar input:focus,
body.cyph-shell .join-room-bar input:focus {
  border: none !important;
  box-shadow: none !important;
}
body.cyph-shell .add-buddy-bar button,
body.cyph-shell .add-room-bar button,
body.cyph-shell .add-enclave-bar button {
  min-width: 32px !important;
  min-height: 32px !important;
  width: 32px; height: 32px;
  border-radius: 50% !important;
  padding: 0 !important;
  flex-shrink: 0;
  font-size: 13px !important;
  display: inline-flex; align-items: center; justify-content: center;
}
body.cyph-shell .add-buddy-bar button#spectrum-open-btn,
body.cyph-shell .bar-side-btn#spectrum-open-btn {
  width: auto !important;
  min-width: 54px !important;
  border-radius: 999px !important;
  padding: 0 12px !important;
  font-size: 9px !important;
  letter-spacing: 0.12em !important;
  font-weight: 700 !important;
}
body.cyph-shell .join-room-bar:focus-within,
body.cyph-shell .add-room-bar:focus-within,
body.cyph-shell .add-buddy-bar:focus-within,
body.cyph-shell .add-enclave-bar:focus-within {
  border-color: rgba(79,217,245,0.38) !important;
  box-shadow: 0 0 0 3px rgba(79,217,245,0.10) !important;
}
/* placeholders: sentence case, not SHOUTED UPPERCASE */
body.cyph-shell .add-buddy-bar input::placeholder,
body.cyph-shell .add-room-bar input::placeholder,
body.cyph-shell .add-enclave-bar input::placeholder,
body.cyph-shell .join-room-bar input::placeholder,
body.cyph-shell .spectrum-input-wrap input::placeholder,
body.cyph-shell .gif-input-wrap input::placeholder,
body.cyph-shell .command-palette-input-wrap input::placeholder {
  font-family: 'SF Pro Text', system-ui, sans-serif !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
}

/* ── Message text: readable, not terminal-tiny ── */
body.cyph-shell .msg-bubble {
  font-family: 'SF Pro Text', system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  padding: 10px 14px !important;
}
body.cyph-shell .msg-row { padding-inline: 20px !important; }
body.cyph-shell .msg-sender {
  font-size: 11px !important;
  letter-spacing: 0.04em !important;
}

/* ── Section labels: slightly calmer ── */
body.cyph-shell .section-label,
body.cyph-shell .partition-label {
  padding: 10px 14px 6px !important;
  letter-spacing: 0.18em !important;
}

/* ── Right panel: friendlier padding + readable body copy ── */
body.cyph-shell .rp-section { padding: 16px 18px !important; }
body.cyph-shell .rp-header { letter-spacing: 0.18em !important; font-size: 10px !important; }
body.cyph-shell .rp-room-desc { font-size: 12px !important; line-height: 1.55 !important; }
body.cyph-shell .rp-member {
  padding: 6px 8px !important;
  border-radius: var(--gm-r-sm) !important;
  min-height: 32px;
}
body.cyph-shell .rp-member-name { font-size: 12.5px !important; }

/* ── Chat header: breathe ── */
body.cyph-shell .chat-header { padding: 12px 18px !important; }
body.cyph-shell .chat-peer-name { font-size: 16px !important; }
body.cyph-shell .chat-peer-status { font-size: 10.5px !important; margin-top: 2px; }

/* ── Tabs bar: friendlier chips ── */
body.cyph-shell .chat-tab-bar { padding: 8px 10px !important; gap: 6px !important; }
body.cyph-shell .chat-tab {
  padding: 8px 14px !important;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

/* ── Self profile: friendlier card ── */
body.cyph-shell .self-profile {
  padding: 12px 12px !important;
  gap: 12px !important;
}
body.cyph-shell .self-name { font-size: 13px !important; font-weight: 600 !important; }

/* ── Modals: softer headers, bigger close targets ── */
body.cyph-shell .cyph-modal-close {
  min-width: 34px; min-height: 34px;
  border-radius: var(--gm-r-pill) !important;
  display: inline-flex; align-items: center; justify-content: center;
}
body.cyph-shell .cyph-modal-close:hover { background: var(--gm-hover); }

/* ── Context menu: bigger items, friendlier ── */
body.cyph-shell .cyph-context-menu button {
  min-height: 38px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  border-radius: var(--gm-r-sm);
}

/* ── Empty state: welcome, not intimidating ── */
body.cyph-shell .empty-chat::before {
  font-size: 34px !important;
  letter-spacing: 0.12em !important;
}
body.cyph-shell .empty-chat::after {
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  line-height: 1.8 !important;
}

/* ── Cursor: pointers everywhere clickable ── */
body.cyph-shell .buddy-item, body.cyph-shell .room-item, body.cyph-shell .enclave-item,
body.cyph-shell .chat-tab, body.cyph-shell .msg-avatar--clickable,
body.cyph-shell .msg-sender--clickable, body.cyph-shell .self-profile--clickable,
body.cyph-shell .spectrum-row, body.cyph-shell .relay-item {
  cursor: pointer !important;
}

/* ── Smooth everything, springy press feedback ── */
body.cyph-shell .chat-send:active,
body.cyph-shell .auth-btn:not(.nucleus-btn):active,
body.cyph-shell .profile-btn--primary:active {
  transform: scale(0.96) !important;
}
body.cyph-shell .chat-action-btn:active,
body.cyph-shell .composer-media-btn:active,
body.cyph-shell .self-edit-btn:active {
  transform: scale(0.92) !important;
}
body.cyph-shell .buddy-item:active,
body.cyph-shell .room-item:active,
body.cyph-shell .enclave-item:active {
  background: var(--gm-hover) !important;
}

/* embed mode stays untouched (inbox Team Chat) — no overrides here */

@media (max-width: 900px) {
  body.cyph-shell .app-shell {
    margin: 0;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }
  body.cyph-shell .left-sidebar::before { width: 1px; }
}
