:root { --bg:#07090d; --panel:#10141b; --panel2:#171d27; --line:#232b38; --ink:#eef3fb; --mute:#8f9db3; --acc:#3b8bff; --me:#1f5fd1; }
html, body { margin:0; height:100%; background:var(--bg); color:var(--ink); font-family:Manrope, system-ui, sans-serif; }
#root { height:100%; }
* { box-sizing:border-box; }
.hz-center { display:grid; place-items:center; height:100%; padding:24px; color:var(--mute); }
.hz-logo { font-weight:800; letter-spacing:.18em; color:var(--acc); font-size:18px; }
.hz-input { width:100%; background:var(--panel2); color:var(--ink); border:1px solid var(--line); border-radius:14px; padding:12px 14px; font:inherit; font-size:16px; min-height:46px; }
.hz-input:focus { outline:2px solid var(--acc); outline-offset:1px; }
.hz-field { display:grid; gap:6px; font-size:14px; color:var(--mute); }
.hz-btn { background:var(--acc); color:#1b1405; border:0; border-radius:14px; padding:12px 18px; font:inherit; font-weight:700; min-height:48px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.hz-btn:disabled { opacity:.5; cursor:default; }
.hz-btn-ghost { background:transparent; color:var(--ink); border:1px solid var(--line); }
.hz-link { background:none; border:0; color:var(--mute); font:inherit; padding:10px; cursor:pointer; text-align:center; text-decoration:underline; }
.hz-link.danger { color:#f08a7a; }
.hz-card { background:var(--panel); border:1px solid var(--line); border-radius:22px; padding:24px; display:grid; gap:14px; width:100%; max-width:420px; }
.hz-card h2 { margin:0; }
.hz-ok { color:#7fd6b3; margin:0; }

.hz-auth { min-height:100%; display:grid; gap:32px; padding:32px 20px; align-content:center; justify-items:center; }
.hz-hero { max-width:480px; }
.hz-hero h1 { font-size:clamp(28px, 5vw, 44px); line-height:1.1; margin:14px 0; }
.hz-hero p { color:var(--mute); line-height:1.6; }
.hz-demo { display:flex; flex-direction:column; gap:8px; margin-top:20px; }
@media (min-width:900px) { .hz-auth { grid-template-columns:1fr 1fr; padding:48px; } }

.hz-bubble { max-width:78%; padding:10px 14px; border-radius:18px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.hz-bubble.them { background:var(--panel2); align-self:flex-start; border-bottom-left-radius:6px; }
.hz-bubble.me { background:var(--me); align-self:flex-end; border-bottom-right-radius:6px; }
.hz-bubble time { display:block; font-size:11px; opacity:.6; margin-top:4px; text-align:right; }

.hz-app { height:100dvh; display:grid; grid-template-columns:1fr; }
.hz-side { display:flex; flex-direction:column; min-height:0; background:var(--panel); }
.hz-chat { display:none; flex-direction:column; min-height:0; }
.hz-app.has-active .hz-side { display:none; }
.hz-app.has-active .hz-chat { display:flex; }
@media (min-width:800px) {
  .hz-app { grid-template-columns:minmax(300px, 360px) 1fr; }
  .hz-app .hz-side, .hz-app.has-active .hz-side { display:flex; border-right:1px solid var(--line); }
  .hz-chat { display:flex; }
  .hz-back { display:none !important; }
}
.hz-side-head, .hz-chat-head { display:flex; align-items:center; gap:10px; padding:12px 14px; padding-top:max(12px, env(safe-area-inset-top)); border-bottom:1px solid var(--line); }
.hz-grow { flex:1; }
.hz-dot { width:8px; height:8px; border-radius:50%; background:#c0614f; }
.hz-dot.on { background:#5fd39e; }
.hz-icon-btn { background:none; border:0; color:var(--ink); font-size:22px; min-width:44px; min-height:44px; padding:0; cursor:pointer; display:grid; place-items:center; border-radius:50%; }
.hz-search { padding:10px 12px; }
.hz-list { flex:1; overflow-y:auto; padding:4px 6px 12px; }
.hz-row { width:100%; display:flex; align-items:center; gap:12px; padding:10px; min-height:64px; background:none; border:0; border-radius:14px; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.hz-row:hover, .hz-row.sel { background:var(--panel2); }
.hz-row-main { flex:1; min-width:0; display:grid; gap:2px; }
.hz-row-main small, .hz-row-meta small { color:var(--mute); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hz-row-meta { display:grid; justify-items:end; gap:4px; }
.hz-badge { background:var(--acc); color:#1b1405; border-radius:99px; font-size:12px; font-weight:800; padding:1px 7px; }
.hz-avatar { border-radius:50%; object-fit:cover; flex:none; display:inline-grid; place-items:center; color:#fff; font-weight:700; }
.hz-msgs { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:6px; padding:16px; background:radial-gradient(circle at 20% 0%, #17302a, var(--bg) 60%); }
.hz-compose { display:flex; gap:8px; padding:10px; padding-bottom:max(10px, env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--panel); align-items:flex-end; }
.hz-compose textarea { resize:none; max-height:140px; }
.hz-send { flex:none; }
.hz-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); display:grid; place-items:end center; z-index:10; padding:0; }
.hz-sheet { border-radius:22px 22px 0 0; max-height:92dvh; overflow-y:auto; padding-bottom:max(24px, env(safe-area-inset-bottom)); }
@media (min-width:600px) { .hz-overlay { place-items:center; } .hz-sheet { border-radius:22px; } }
.hz-avatar-edit { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.hz-row-actions { display:flex; justify-content:space-between; flex-wrap:wrap; }
