.mobile-only,.section-picker{display:none}
[data-obsolete]{display:none!important}
.setting-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:12px 0;border-bottom:1px solid var(--border)}
.setting-toggle input{width:22px;min-height:22px;height:22px;accent-color:var(--accent)}
#chatForm{align-items:flex-end}#chatText{min-height:44px;max-height:120px}
@media(max-width:800px), (max-width:950px) and (max-height:600px){
 :root{font-size:13px}
 body.app-open{min-height:0;height:var(--app-height,100dvh);overflow:hidden;display:flex;flex-direction:column}
 .app-open>.language-switch,.app-open>header,.app-open>footer{display:none}
 .app-open main{width:100%;max-width:none;min-height:0;flex:1;padding:0;display:flex;overflow:hidden}
 .app-open #dashboard{display:flex;flex-direction:column;width:100%;min-height:0;padding-bottom:calc(54px + env(safe-area-inset-bottom,0px))}
 #dashboard>.heading{flex:none;flex-direction:row;align-items:center;gap:6px;padding:6px 10px;border-bottom:1px solid var(--border);height:47px}
 #dashboard>.heading>div:not(.toolbar){display:none}
 #dashboard>.heading>.toolbar{margin-inline-start:auto;flex-wrap:nowrap}
 #dashboard>.heading>.toolbar>button{display:none}
 #dashboard>.heading>.toolbar>#refresh{display:block;font-size:12px;min-height:34px;padding:5px 9px}
 #mobilePage{display:block;max-width:70%;font-size:14px;min-height:34px;padding:5px 8px;border:none;background:transparent;font-weight:600}
 #navigation{display:none}
 #mobileNav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:auto;top:calc(var(--app-height,100dvh) - 54px - env(safe-area-inset-bottom,0px));inset-inline:0;background:#141d30;border-top:1px solid var(--border);height:calc(54px + env(safe-area-inset-bottom,0px));padding:3px 3px env(safe-area-inset-bottom,0px);z-index:15;gap:2px;margin:0}
 #mobileNav button{border:0;background:transparent;padding:3px;min-height:44px;font-size:10px;display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;color:var(--muted)}
 #mobileNav button .nav-icon{font-size:19px;line-height:20px}
 #mobileNav button[aria-current=page]{color:var(--accent);background:#213e3b;border-radius:9px}
 #notice{margin:0;padding:0 10px;min-height:0;font-size:12px;max-height:48px;overflow:auto;flex:none}
 #notice:not(:empty){padding:5px 10px}
 .page{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:8px 10px;scrollbar-width:thin}
 .page .columns{display:contents}
 .page .card{padding:12px;border-radius:11px;margin:0 0 8px}
 .page .card[data-mobile-pane]:not(.mobile-selected){display:none}
 .section-picker{display:block;position:sticky;top:0;z-index:2;background:#18263c;min-height:38px;font-size:13px;margin:0 0 8px;padding:7px 10px}
 h2{font-size:15px;margin-bottom:10px}h3{font-size:14px;margin-top:12px}p{margin:7px 0;line-height:1.5}small,.muted{font-size:11px;line-height:1.45}
 button{padding:6px 9px;font-size:12px;min-height:38px}input,textarea,select{padding:8px;font-size:14px;min-height:38px}label{font-size:12px;margin:8px 0 5px}
 .full{margin-top:12px}.space{margin-top:10px}.toolbar{gap:6px}li{padding:10px 0}.tag{font-size:10px;padding:4px 6px}
 .metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:8px}
 .metrics .card{display:block;padding:8px;margin:0}.metrics small{display:none}.metrics .number{font-size:23px;margin:5px 0 0;min-height:0}.metrics .number.compact{font-size:12px;line-height:1.4}.metrics .muted{font-size:10px}
 .provider-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.provider-card{padding:9px;border-radius:8px}.provider-card h3{font-size:13px}.provider-card .tag{white-space:normal}.provider-card .balance{font-size:20px}.provider-card p{font-size:11px}.metric{margin:9px 0 5px}.metric span{font-size:10px}progress{height:8px;margin-top:5px}
 #chat{padding:0;overflow:hidden}
 #chat .chat-card{height:100%;display:flex;flex-direction:column;padding:7px 9px 6px;border:0;border-radius:0;margin:0;position:relative}
 #chat .section-heading{margin:0;gap:7px;flex-wrap:nowrap;flex:none}
 #chat .section-heading h2{display:none}
 #chatManager{font-size:10px;margin-inline-start:auto}
 label[for=chatProject]{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}
 #chatProject{font-size:14px;font-weight:600;padding:6px;min-height:34px;margin-top:4px}
 #chat .section-heading.space{margin:5px 0 0}
 #chatProjectLabel{font-size:11px}#chatFiles{font-size:10px;min-height:30px;padding:4px 7px}
 #messages{height:auto;min-height:0;flex:1;overflow-y:auto;margin:5px 0;padding:8px 2px;background:radial-gradient(ellipse at top,#1b353044,transparent);overscroll-behavior:contain}
 .bubble{font-size:12px;line-height:1.5;padding:9px 11px;max-width:88%;margin-bottom:9px;border-radius:12px 12px 3px 12px}.bubble.user{border-radius:12px 12px 12px 3px}
 .bubble small{font-size:9px;margin-bottom:4px}.message-meta{font-size:9px;gap:4px;margin-top:5px}.bubble .message-project{font-size:9px}.bubble audio{height:35px;margin:6px 0}
 #olderMessages{align-self:center;min-height:26px;font-size:10px;padding:3px 8px;flex:none}
 #voicePanel{margin:0;flex:none;font-size:11px}#voicePanel>summary{padding:5px 2px;font-size:11px}
 #voicePanel[open]{position:absolute;bottom:65px;inset-inline:8px;max-height:65%;overflow:auto;z-index:5;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:10px;box-shadow:0 10px 30px #0008}
 #voiceDraftLabel{font-size:10px;flex:none}#chatAttachments{margin:0;max-height:55px;overflow:auto;flex:none;gap:4px}#chatAttachments button{font-size:10px;padding:4px 7px;min-height:28px}
 #chatForm{display:flex;flex-wrap:nowrap;gap:6px;flex:none;padding-top:5px;margin:0}
 #chatText{font-size:14px;line-height:1.4;min-height:40px;height:40px;max-height:100px;resize:none;border-radius:20px;flex:1;flex-basis:auto;padding:9px 12px}
 #chatSend{border-radius:20px;min-height:40px;padding:8px 14px}
 #chatForm~p{display:none}
 .table-wrap table{min-width:0;font-size:11px}.table-wrap th,.table-wrap td{padding:8px 4px}.table-wrap .id{font-size:9px}
 #fileControls>p.muted{display:none}#fileProjectLabel{margin:5px 0;font-size:11px}#fileBreadcrumbs{margin:6px 0;padding-bottom:6px}#folderForm{margin-top:8px}#fileText{height:40vh}#fileList .file-actions button,#fileList .file-actions a{font-size:11px}
 dialog{max-height:85dvh;overflow:auto;padding:16px}.secondary-copy{font-size:11px}#settings .toolbar{align-items:stretch}#settings .toolbar button{flex:1}
}

body:not(.app-open) #mobileNav{display:none}

@media(max-width:800px), (max-width:950px) and (max-height:600px){#overview .mobile-selected>h2{display:none}.provider-card details{font-size:11px;margin-top:8px}.provider-card details p{font-size:10px}#sharedBudget{font-size:11px}#overview .provider-card .balance{margin:7px 0}}

#updateNotice{position:fixed;inset-inline:12px;bottom:76px;z-index:100;background:#213e3b;color:#eef4ff;border:1px solid #80dbcd;border-radius:10px;padding:10px 14px;font-size:13px;max-width:560px;margin:auto;pointer-events:none}

.local-chat-route{display:flex;gap:6px;align-items:center;min-width:0}.local-chat-route select{min-width:0;flex:1;max-width:100%;font-size:12px}.local-chat-route button{flex:none;font-size:11px}#chatRouteHint{display:block;font-size:11px;flex:none}.bubble [data-reply-conversation]{font-size:11px;padding:4px 8px}
#chatLinked{font-size:11px;flex:none;max-height:22vh;overflow:auto;margin:4px 0}
#chatLinkedSummary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;color:var(--accent)}
#chatLinkedPreview,#conversationPreview{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:25vh;overflow:auto;background:var(--surface);padding:8px;border-radius:8px}
#conversationDialog{width:min(680px,94vw);max-height:88dvh;overflow:auto}
#conversationChoice{width:100%;max-width:100%;height:155px;font-size:12px}
#conversationDetails{display:block;overflow-wrap:anywhere;margin-top:8px}
@media(max-width:800px), (max-width:950px) and (max-height:600px){#chatLinked{max-height:18vh}#conversationDialog{padding:12px}#conversationPreview{max-height:18vh;font-size:12px}.local-chat-route button{padding:4px;min-height:30px;font-size:10px}}

#chatApprovalsPanel{flex:none;font-size:12px}#chatApprovalsPanel[open]{position:absolute;inset-inline:12px;bottom:65px;max-height:65%;overflow:auto;z-index:6;background:var(--surface);padding:10px;border:1px solid var(--border);border-radius:12px}#chatLocalApprovals pre{max-height:140px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
