/* v2.2.30: Chat uses the approved continuous translator conversation pattern.
   This stylesheet is strictly scoped to #chatView; translator untouched. */
main:has(> #chatView.active){display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:0 8px 4px}
#chatView.active{display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%!important;min-height:0!important;max-height:100%;overflow:hidden;padding:4px 0 0;gap:0}
#chatView .section-head{display:grid;grid-template-columns:auto minmax(42px,1fr) auto;align-items:center;gap:6px;flex:0 0 auto;margin:0 0 4px;padding:0}
#chatView .section-head h1{font-size:20px;line-height:1.2}
#chatView #clearChatBtn{min-height:42px;padding:6px 10px;font-size:16px;line-height:1.15;max-width:140px}
#chatView .assistant-bar{display:flex;flex-wrap:nowrap;flex:0 0 auto;min-height:52px;gap:6px;margin:0 0 3px}
#chatView .assistant-bar select{height:36px;min-height:36px;padding:5px 9px;font-size:15px}
/* v2.2.39: centered, large and bold saved-information control. */
#chatView #openMemory{display:flex;align-items:center;justify-content:center;gap:10px;width:auto;max-width:100%;min-width:0;flex:0 1 auto;min-height:52px;height:auto;padding:7px 16px;font-size:32px;line-height:1.1;border-radius:13px;background:#193c57;color:#ffe3a0;border:1px solid #d5ae62;box-sizing:border-box}
#chatView #openMemory>span[aria-hidden]{flex:0 0 auto;font-size:32px;line-height:1}
#chatView #openMemory .memory-label{min-width:0;font-size:clamp(20px,5.6vw,24px);font-weight:900;line-height:1.15;white-space:normal;overflow-wrap:anywhere;text-align:center}
#chatView #openMemory:focus-visible{outline:3px solid #ffe3a0;outline-offset:2px}
#chatView .assistant-status{flex:0 0 auto;margin:0 2px 3px;min-height:0;max-height:30px;overflow:auto;font-size:12px;line-height:1.25}
#chatView .chat-conversation-frame{display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;overflow:hidden;border:1px solid #657389;border-radius:18px;background:#071a30}
#chatView .chat-writing-area{width:100%;box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;overflow-y:auto;overscroll-behavior-y:contain;padding:8px;background:#071a30;scrollbar-width:thin;scrollbar-color:#c19d58 #071a30}
#chatView .messages{display:block;flex:0 0 auto;min-height:0!important;max-height:none!important;height:auto;overflow:visible;margin:0;padding:0}
#chatView .message{margin:5px 0 12px;min-width:0}
#chatView .message.ai{margin:5px 0 14px;justify-content:flex-start}
#chatView .message .bubble{overflow-wrap:anywhere;user-select:text;font-size:22px;line-height:1.45;font-weight:480;white-space:normal}
#chatView .message.ai .bubble{width:auto;max-width:100%;padding:10px 12px;background:#0a2239;border:1px solid #3b5976;border-radius:16px;font-size:22px;line-height:1.45}
#chatView .message.user .bubble{max-width:94%;padding:10px 12px;background:#193c57;border:1px solid #3b5976;border-radius:16px;font-size:21px;line-height:1.45}
#chatView .message .meta{font-size:12px;line-height:1.3;color:#acbdcd;margin-top:5px}
#chatView .composer{display:flex;flex-direction:column;align-items:stretch;flex:1 1 0;min-height:0;min-width:0;position:static;bottom:auto!important;z-index:auto;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#chatView .composer textarea{display:block;flex:1 0 auto;width:100%;min-width:0;height:160px;min-height:160px!important;max-height:none!important;padding:12px 10px;margin:0;border:0;border-radius:0;background:transparent;color:#f8f1e5;outline:none;resize:none;overflow:hidden;font-size:22px;font-weight:500;line-height:1.45;box-sizing:border-box;box-shadow:none}
#chatView .chat-conversation-frame:focus-within{border-color:#e3bc72}
#chatView .chat-actions{width:100%;box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;flex:0 0 auto;padding:3px 7px;border-top:1px solid #49617b;background:#071a30}
#chatView .composer .chat-photo,#chatView .composer .chat-video,#chatView .composer .chat-mic,#chatView .composer .send-btn{grid-row:1;display:flex;align-items:center;justify-content:center;width:100%;height:44px;min-height:44px;min-width:0;padding:0;margin:0;flex:0 0 auto;font-size:21px;line-height:1;border-radius:10px;box-shadow:none}
#chatView .composer .chat-photo{grid-column:1}
#chatView .composer .chat-video{grid-column:2}
#chatView .composer .chat-mic{grid-column:3}
#chatView .composer .send-btn{grid-column:4}
#chatView .chat-photo-preview:not([hidden]){flex:0 0 auto;margin:3px 7px}
#chatView .chat-voice-status{flex:0 0 auto;min-height:0;max-height:46px;overflow-y:auto;margin:0 8px 3px;font-size:13px;line-height:1.25}
#chatView .chat-voice-status:empty{display:none}
@media(max-width:359px){
 #chatView .chat-actions{gap:6px;padding:3px 6px}
 #chatView .composer .chat-photo,#chatView .composer .chat-video,#chatView .composer .chat-mic,#chatView .composer .send-btn{width:100%;height:44px;min-height:44px;font-size:22px}
 #chatView .composer textarea{font-size:18px}
 #chatView .message.ai .bubble{font-size:20px}
 #chatView .message.user .bubble{font-size:19px}
}
@media(max-height:510px){#chatView .section-head{margin-bottom:2px}#chatView .assistant-bar{margin-bottom:2px}}

/* Routine save notices do not occupy the chat header. */
#chatView .assistant-status[hidden]{display:none}
#chatView .assistant-bar{justify-content:center}
