* { box-sizing: border-box; margin: 0; }
body { font-family: system-ui, sans-serif; background: #1a1a2e; color: #eee; height: 100dvh; }
.screen { display: flex; flex-direction: column; height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.hidden { display: none; }
#login { justify-content: center; align-items: center; gap: 12px; }
#login input, #login button { padding: 12px 16px; border-radius: 10px; border: 1px solid #444; background: #24243e; color: #eee; width: 260px; font-size: 16px; }
#login button { background: #0f3460; cursor: pointer; }
.error { color: #ff6b6b; min-height: 1.2em; }
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #16162a; }
header button { background: none; border: none; font-size: 22px; cursor: pointer; }
main { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.bubble.user { align-self: flex-end; background: #0f3460; }
.bubble.claude { align-self: flex-start; background: #24243e; }
.bubble.error { align-self: center; background: #5c2a2a; font-size: 14px; }
.status { align-self: flex-start; color: #888; font-size: 13px; font-style: italic; }
footer { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #16162a; }
footer input { flex: 1; padding: 12px; border-radius: 22px; border: 1px solid #444; background: #24243e; color: #eee; font-size: 16px; }
footer button { width: 46px; height: 46px; border-radius: 50%; border: none; background: #0f3460; color: #eee; font-size: 18px; cursor: pointer; touch-action: none; }
#micBtn.recording { background: #c0392b; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
