.ai-page { background: #fff; overflow: hidden; }
.ai-page .app { background: #fff; height: var(--chat-viewport-height, 100dvh); min-height: 0; overflow: hidden; }
.ai-header, .assistant-card, .chat-controls { flex-shrink: 0; }
.ai-page .bottom-navigation { position: relative; bottom: auto; margin-top: 0; }
.ai-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 8px; }
.ai-header h1 { font-size: 20px; line-height: 1.25; letter-spacing: -.45px; }
.ai-page svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.history-button { display: flex; align-items: center; gap: 6px; color: #7669ad; background: none; min-height: 44px; font-size: 13px; }
.history-button svg { width: 24px; height: 24px; }
.ai-main { padding: 0 16px; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.assistant-card { display: flex; align-items: center; gap: 10px; margin-inline: 6px; padding: 4px 10px; min-height: 80px; background: #f6f0ff; border-radius: 18px; }
.assistant-art { flex-shrink: 0; width: 64px; height: 64px; object-fit: cover; border-radius: 14px; }
.assistant-card h2 { font-size: 14px; line-height: 18px; letter-spacing: -.2px; margin-bottom: 0; }
.assistant-card p { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: #393456; }
.assistant-card p svg { width: 17px; height: 17px; color: #9863ff; }
.purple-heart { color: #9c59f6; font-size: 20px; }
.pink-heart { color: #da91e8; font-size: 19px; }
.conversation { display: flex; flex-direction: column; gap: 10px; padding: 15px 0 8px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.message { flex-shrink: 0; display: flex; gap: 12px; align-items: flex-start; }
.bot-avatar { width: 40px; height: 43px; flex-shrink: 0; border-radius: 50%; background: url('assets/doctor-lara.jpg') center 30% / cover no-repeat; }
.message-content { max-width: min(68%, 480px); min-width: 0; }
.bubble { background: #f6f0ff; border-radius: 17px; padding: 11px 14px; color: #393456; font-size: 14px; line-height: 1.28; overflow-wrap: anywhere; }
.bubble p + p { margin-top: 9px; }
.message time { display: block; margin: 4px 3px 0; color: #8273b2; font-size: 10px; line-height: 13px; }
.user-message { justify-content: flex-end; }
.user-message .bubble { background: linear-gradient(115deg, #9b6aff, #8c63ff); color: #fff; }
.user-message .message-content { max-width: 80%; }
.message-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 5px; color: #eee4ff; }
.message-meta time { margin: 0; color: inherit; }
.read-mark { color: inherit; font-size: 10px; line-height: 13px; }
.chat-controls { padding: 12px 0 8px; }
.help-label { color: #7968ac; font-size: 12px; margin-bottom: 3px; }
.suggestions { display: flex; gap: 4px; }
.suggestions button { display: flex; align-items: center; justify-content: center; gap: 5px; flex: 1; min-height: 44px; background: none; border-radius: 22px; font-size: 10px; white-space: nowrap; position: relative; isolation: isolate; }
.suggestions button::before { content: ''; position: absolute; inset: 6px 0; border-radius: inherit; background: var(--chip); z-index: -1; }
.suggestions svg { width: 17px; height: 17px; }
.symptoms { --chip: #fff0fc; }.symptoms svg { color: #b452a7; }
.materials { --chip: #ecf9f5; }.materials svg { color: #409e98; }
.reminders { --chip: #fff7e9; }.reminders svg { color: #ed9b30; }
.doctor { --chip: #f5efff; }.doctor svg { color: #8a4dff; }
.composer { display: flex; gap: 8px; margin-top: 7px; }
.attachment-button { width: 44px; height: 44px; display: grid; place-items: center; background: white; border: 1px solid #ece3fc; border-radius: 50%; color: #8073a8; flex-shrink: 0; }
.attachment-button svg { width: 23px; height: 23px; }
.input-wrap { flex: 1; min-width: 0; display: flex; align-items: center; border: 1px solid #ece3fc; border-radius: 28px; padding: 2px; }
.input-wrap:focus-within { outline: 2px solid #9a71ea; outline-offset: 2px; }
.input-wrap input { width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; padding: 10px 13px; outline: none; color: #393456; }
.input-wrap input::placeholder { color: #8b7eb5; }
.send-button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(140deg, #b071ff, #7934ff); color: white; flex-shrink: 0; }
.send-button svg { fill: currentColor; stroke: none; width: 40px; height: 40px; display: block; }
#chat-status { font-size: 12px; line-height: 1.4; color: #685882; padding: 8px 4px 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#history-dialog { width: min(90vw, 420px); border: 1px solid #eee4ff; border-radius: 22px; padding: 20px; color: #393456; font-size: 15px; line-height: 1.5; }
#history-dialog::backdrop { background: #21173555; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dialog-heading h2 { font-size: 20px; }
#history-close { width: 44px; height: 44px; text-align: center; font-size: 28px; background: #f6f0ff; border-radius: 50%; }
#return-chat { padding: 12px 18px; margin-top: 18px; background: #f6f0ff; color: #7542c6; border-radius: 22px; }
@media (max-width: 374px) { .ai-header { padding-left: 14px; padding-right: 14px; }.ai-header h1 { font-size: 17px; }.history-button { font-size: 11px; gap: 3px; }.ai-main { padding: 0 12px; }.assistant-card { gap: 8px; padding: 4px 7px; }.assistant-card h2 { font-size: 12px; }.bubble { font-size: 13px; }.message { gap: 8px; }.suggestions { flex-wrap: wrap; }.suggestions button { flex-basis: 45%; } }

@media (max-height: 500px) { .assistant-art { width: 48px; height: 48px; border-radius: 10px; }.assistant-card { min-height: 0; }.assistant-card p { display: none; }.suggestions { flex-wrap: nowrap; overflow-x: auto; }.suggestions button { flex: 1 0 auto; padding: 0 8px; }.ai-header { padding-top: env(safe-area-inset-top, 0px); }.chat-controls { padding-top: 4px; } }
