/* V2 chat: leave the reading space to the conversation. */
#chat .v2-files select{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:10px}
#chat .v2-files summary{display:block;line-height:44px;min-height:44px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 12px;border-radius:12px;background:var(--soft);font-size:14px}
#chat .v2-files summary::before{content:'📎 ';font-size:15px}
#chat .v2-files:not([open]){border:0;padding:4px 0 8px;max-height:56px}
#chat .v2-files[open]{padding:8px 0;max-height:min(240px,36dvh)}
@media(max-width:760px){
 #chat .page-head{gap:8px;margin-bottom:12px;flex-wrap:wrap}
 #chat .page-head>div:first-child{flex:1 1 100%;min-width:0}
 #chat .page-head .eyebrow,#chat .page-head .sub{display:none}
 #chat .title{font-size:20px;line-height:1.35;margin:0}
 #chat .chat-actions{gap:8px}
 #chat .chat-actions button{font-size:13px;min-height:44px;padding:8px 14px;box-shadow:none}
 #chat .card.chat{border:0;border-radius:18px;padding:12px;box-shadow:none;background:color-mix(in srgb,var(--card) 78%,transparent)!important;backdrop-filter:none}
 #chat .messages{padding:8px 0 16px;scroll-padding-bottom:12px}
 #chat .bubble.ai{border:0;background:transparent;padding:8px 4px;line-height:1.75;max-width:100%}
 #chat .bubble.user{border-radius:18px 18px 4px 18px;padding:11px 14px;line-height:1.65;max-width:90%}
 #chat .message-group{margin:14px 0 20px}
 #chat .message-time{font-size:11px;opacity:.8;margin-top:6px}
 #chat .composer{gap:6px;padding-top:8px;border-top:0;align-items:center}
 #chat .composer input{border:1px solid var(--line);background:var(--soft);padding:12px 10px;border-radius:16px;min-height:48px;font-size:16px;color:var(--text)}
 #chat .composer input:focus{box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 20%,transparent);border-color:var(--blue)}
 #chat .composer button{border-radius:14px;box-shadow:none;min-height:48px}
 #chat #chatAttach,#chat #micBtn{padding:6px;width:44px;min-width:44px;background:transparent;border:0;font-size:21px}
 #chat #send{padding:10px;min-width:48px;font-size:14px}
 #chat .v2-files p{font-size:12px;line-height:1.55}
 #chat .v2-files .works-actions{gap:6px}
 #chat .v2-files button{font-size:13px;padding:8px 10px;box-shadow:none}
 [data-mode="dark"] #chat{--card:#1c2b40;--soft:#26374e;--line:#3c506b;--muted:#b0bdd0}
 [data-mode="dark"] #chat .bubble.ai{color:#eef3fa;background:transparent}
}
/* Keep the mobile header controls balanced and on one line. */
@media(max-width:760px){
 .shell>.top{gap:10px;padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right))}
 .shell>.top .brand{flex:0 0 auto}
 .shell>.top .logo{width:36px;height:36px;border-radius:12px;box-shadow:none}
 .shell>.top .top-actions{flex:1;min-width:0;justify-content:flex-end;gap:8px}
 .shell>.top #appLanguage{flex:1 1 120px;width:120px;min-width:0;max-width:170px;min-height:48px;font-size:16px;padding:8px;border-radius:12px;text-overflow:ellipsis}
 .shell>.top #newTask{flex:0 1 auto;min-width:0;max-width:140px;height:44px;min-height:44px;padding:0 13px;border-radius:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;line-height:44px;font-weight:600;box-shadow:0 2px 6px rgba(21,94,239,.12)}
 .shell>.top .account-menu{flex:0 0 42px}
}
