:root {
  --bg: #2B2B2E;
  --panel: #34343a;
  --neon-blue: #38bdf8;
  --neon-violet: #A855F7;
  --neon-pink: #EC4899;
  --text: #f3f3f7;
  --muted: #a0a0ad;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 50% 18%, #3a3a40 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  position: sticky; top: 0; z-index: 5;
  background: rgba(20,20,24,.7); backdrop-filter: blur(8px);
}
.logo { width: 34px; height: 34px; border-radius: 50%;
  box-shadow: 0 0 12px var(--neon-violet); }
.title { font-weight: 700; font-size: 1.2rem; letter-spacing: .5px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .icon-btn { margin-left: auto; }

main { padding: 12px 16px; display: flex; flex-direction: column; gap: 14px; }

.panel {
  background: var(--panel);
  border: 1px solid rgba(168,85,247,.25);
  border-radius: 16px;
  padding: 16px;
  margin: 12px 16px;
  box-shadow: 0 0 18px rgba(168,85,247,.12);
}
main .panel { margin: 0; }
.panel.grow { display: flex; flex-direction: column; }
.panel h2 { margin: 0 0 12px; font-size: 1rem; color: var(--neon-violet); }
.hidden { display: none; }

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
input[type=text], input[type=url], input[type=password] {
  width: 100%; margin-top: 4px; padding: 10px 12px;
  background: #1f1f24; border: 1px solid #44444d; border-radius: 10px;
  color: var(--text); font-size: 1rem;
}
input:focus { outline: none; border-color: var(--neon-violet);
  box-shadow: 0 0 0 2px rgba(168,85,247,.3); }

.row { display: flex; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); }

button { cursor: pointer; font-size: 1rem; border-radius: 10px; border: none; }
.neon {
  background: linear-gradient(90deg, var(--neon-violet), var(--neon-pink));
  color: white; padding: 11px 18px; font-weight: 600;
  box-shadow: 0 0 14px rgba(236,72,153,.45);
}
.neon:active { transform: translateY(1px); }
.neon.wide { width: 100%; }
.ghost { background: transparent; color: var(--neon-blue);
  border: 1px solid var(--neon-blue); padding: 11px 18px; }
.icon-btn { background: #1f1f24; color: var(--text);
  border: 1px solid #44444d; width: 44px; height: 44px; font-size: 1.2rem; }

.muted { color: var(--muted); font-size: .85rem; }

.log { flex: 1; min-height: 160px; max-height: 45vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.msg { padding: 9px 13px; border-radius: 14px; max-width: 85%; line-height: 1.35;
  white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; background: #44343f; border: 1px solid var(--neon-pink); }
.msg.elise { align-self: flex-start; background: #2a3340; border: 1px solid var(--neon-blue); }

.composer { display: flex; gap: 8px; align-items: center; }
.composer input { flex: 1; }

.charter { white-space: pre-wrap; font-size: .8rem; line-height: 1.4; }
details summary { cursor: pointer; color: var(--neon-violet); }
.mic-on { box-shadow: 0 0 0 2px var(--neon-pink), 0 0 14px var(--neon-pink); }
