* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --bg: #000; --panel: #0e0e12; --line: rgba(255,255,255,.1); --muted: rgba(255,255,255,.6); --accent: #a78bfa; --accent2: #ec4899; }
html, body { height: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased; }
#app { max-width: 640px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: rgba(0,0,0,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header h1 { flex: 1; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
button, .btn { font: inherit; font-size: 15px; font-weight: 600; border: 0; border-radius: 12px; padding: 12px 16px; min-height: 44px; cursor: pointer; color: #fff; background: linear-gradient(135deg, #7c3aed, var(--accent2)); }
button.ghost { background: transparent; border: 1px solid var(--line); font-weight: 500; }
button.icon { background: transparent; padding: 8px 10px; min-width: 44px; font-size: 20px; }
input, textarea, select { font: inherit; font-size: 16px; width: 100%; color: #fff; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
label { display: block; font-size: 14px; color: var(--muted); margin: 16px 0 6px; }
.pad { padding: 24px 16px; }
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 20px; }
.center h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.center p { color: var(--muted); margin-bottom: 20px; }
.stack > * + * { margin-top: 12px; }
.error { color: #fca5a5; font-size: 14px; min-height: 20px; margin-top: 8px; }
.note { color: var(--muted); font-size: 13px; }
.list { list-style: none; }
.list a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: #fff; text-decoration: none; }
.list a span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .meta { color: var(--muted); font-size: 13px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.toolbar { display: flex; gap: 8px; padding: 12px 16px; }
.toolbar input { flex: 1; }
.msgs { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: #7c3aed; border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #000; border-top: 1px solid var(--line); }
.composer textarea { resize: none; min-height: 44px; max-height: 160px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.row input[type=time] { width: auto; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 4px; }
[hidden] { display: none !important; }
