/* Existing palette/background tokens keep every saved workspace theme intact. */
.mobile-header,.mobile-bottom{display:none}
.mobile-home,.mobile-all-menu,.mobile-chat-hub{max-width:880px;margin:auto}
.mobile-home svg,.mobile-all-menu svg,.mobile-chat-hub svg{width:22px;height:22px;flex-shrink:0}
.mobile-welcome{padding:8px 0 26px}.mobile-eyebrow{font-size:calc(10px * var(--font-overall,1) * var(--font-section,1));letter-spacing:2px;font-weight:700;color:var(--muted);margin-bottom:14px}.mobile-welcome h1{font-size:calc(32px * var(--font-overall,1) * var(--font-section,1));line-height:1.4;letter-spacing:-1.4px;font-weight:700}.mobile-welcome h1>span{color:var(--primary)}.mobile-welcome>p:last-child{font-size:calc(13px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);margin-top:12px}
.mobile-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:30px}.mobile-shortcuts button{display:flex;align-items:center;flex-direction:column;gap:10px;min-height:92px;border:1px solid var(--border);border-radius:18px;background:var(--theme-0e1711,#0e1711);padding:16px 2px 13px}.mobile-shortcuts button>span{color:var(--primary);display:grid;place-items:center;width:32px;height:32px}.mobile-shortcuts b{font-size:calc(12px * var(--font-overall,1) * var(--font-section,1));font-weight:600;white-space:nowrap}
.mobile-dashboard-section{margin:0 0 28px}.mobile-dashboard-section>header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 13px}.mobile-dashboard-section h2{font-size:calc(18px * var(--font-overall,1) * var(--font-section,1));letter-spacing:-.5px;line-height:1.5}.mobile-dashboard-section h2 small{font-size:calc(13px * var(--font-overall,1) * var(--font-section,1));font-weight:500;margin-left:5px;color:var(--muted)}.mobile-dashboard-section>header>button{display:inline-flex;gap:2px;align-items:center;min-height:44px;font-size:calc(11px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);padding:0}.mobile-dashboard-section>header>button svg{width:15px;height:15px}.mobile-dashboard-section>header>span{font-size:calc(10px * var(--font-overall,1) * var(--font-section,1));color:var(--muted)}
.mobile-work-list{display:grid;gap:10px}.mobile-work-card{width:100%;text-align:left;border:1px solid var(--border);background:var(--theme-0e1711,#0e1711);border-radius:18px;padding:18px 18px 13px;position:relative;overflow:hidden}.mobile-work-card:before{content:'';position:absolute;top:18px;bottom:18px;left:0;width:3px;border-radius:3px;background:var(--primary)}.mobile-work-mark{display:inline-block;font-size:calc(10px * var(--font-overall,1) * var(--font-section,1));font-weight:600;color:var(--muted);margin-bottom:8px}.mobile-work-mark.attention{color:var(--primary)}.mobile-work-card h3{font-size:calc(16px * var(--font-overall,1) * var(--font-section,1));line-height:1.45;overflow-wrap:anywhere;letter-spacing:-.4px}.mobile-work-card>p{font-size:calc(12px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);margin-top:5px}.mobile-work-card footer,.mobile-project-card footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:16px;color:var(--muted)}.mobile-work-card footer small{font-size:calc(11px * var(--font-overall,1) * var(--font-section,1))}.mobile-work-card footer svg{width:17px;height:17px}
.mobile-project-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mobile-project-card{border-radius:18px;border:1px solid var(--border);border-top:3px solid var(--project-color);padding:15px;text-align:left;min-width:0;background:var(--theme-0e1711,#0e1711)}.mobile-project-label{font-size:calc(10px * var(--font-overall,1) * var(--font-section,1));color:var(--muted)}.mobile-project-card h3{font-size:calc(15px * var(--font-overall,1) * var(--font-section,1));line-height:1.5;margin-top:9px;overflow-wrap:anywhere}.mobile-project-card p{font-size:calc(11px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);margin-top:8px}.mobile-project-card footer small{font-size:calc(10px * var(--font-overall,1) * var(--font-section,1))}.mobile-project-card footer svg{width:15px;height:15px}
.mobile-empty-line{padding:15px 0;border-top:1px solid var(--border);font-size:calc(12px * var(--font-overall,1) * var(--font-section,1));color:var(--muted)}.mobile-state{padding:18px;border:1px dashed var(--border);border-radius:14px;color:var(--muted);font-size:calc(13px * var(--font-overall,1) * var(--font-section,1))}.mobile-error small{display:block;margin:6px 0 12px;overflow-wrap:anywhere}.mobile-error button{min-height:44px}
.mobile-recent{border:1px solid var(--border);border-radius:18px;background:var(--theme-0e1711,#0e1711);overflow:hidden}.mobile-recent button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:15px;min-height:72px}.mobile-recent button+button{border-top:1px solid var(--border)}.mobile-recent button>span:nth-child(2){flex:1;min-width:0}.mobile-recent small{display:block;font-size:calc(10px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);margin-bottom:5px}.mobile-recent b{display:block;font-size:calc(13px * var(--font-overall,1) * var(--font-section,1));font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-recent-icon{color:var(--muted)}.mobile-recent button>svg{width:16px;height:16px;color:var(--muted)}.mobile-home-foot{text-align:center;color:var(--muted);font-size:calc(10px * var(--font-overall,1) * var(--font-section,1));padding:10px 0 20px;letter-spacing:.2px}
.mobile-menu-profile{display:flex;align-items:center;gap:16px;margin:0 0 28px;padding:20px 16px;border:1px solid var(--border);border-radius:20px;background:var(--theme-0e1711,#0e1711)}.mobile-menu-profile h2{font-size:calc(19px * var(--font-overall,1) * var(--font-section,1))}.mobile-menu-profile p{font-size:calc(12px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);margin-top:5px}.mobile-menu-profile .profile-person{flex-shrink:0}.mobile-menu-group{margin-bottom:26px}.mobile-menu-group>h2{font-size:calc(12px * var(--font-overall,1) * var(--font-section,1));letter-spacing:.5px;color:var(--muted);margin:0 6px 12px}.mobile-menu-group>div{border:1px solid var(--border);border-radius:18px;background:var(--theme-0e1711,#0e1711);overflow:hidden}.mobile-menu-item{display:flex;width:100%;align-items:center;gap:13px;text-align:left;min-height:62px;padding:14px 16px;color:inherit;text-decoration:none}.mobile-menu-item+.mobile-menu-item{border-top:1px solid var(--border)}.mobile-menu-item>span{flex:1;min-width:0}.mobile-menu-item b{font-size:calc(14px * var(--font-overall,1) * var(--font-section,1));font-weight:500;display:block}.mobile-menu-item small{font-size:calc(11px * var(--font-overall,1) * var(--font-section,1));display:block;color:var(--muted);margin-top:4px}.mobile-menu-item>svg:first-child{color:var(--muted)}.mobile-menu-item>svg:last-child{width:15px;height:15px;color:var(--muted)}.mobile-screen-intro{margin-bottom:24px}.mobile-screen-intro h2{font-size:calc(25px * var(--font-overall,1) * var(--font-section,1));letter-spacing:-.8px}.mobile-screen-intro p{font-size:calc(12px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);margin-top:9px}.mobile-chat-hub>.mobile-menu-item{border:1px solid var(--border);border-radius:16px;background:var(--theme-0e1711,#0e1711);margin-bottom:28px}.mobile-chat-project{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:16px 4px;min-height:74px;border-bottom:1px solid var(--border)}.mobile-chat-project>span:nth-child(2){flex:1;min-width:0}.mobile-chat-project b{font-size:calc(14px * var(--font-overall,1) * var(--font-section,1));display:block;overflow-wrap:anywhere}.mobile-chat-project small{font-size:calc(11px * var(--font-overall,1) * var(--font-section,1));color:var(--muted);display:block;margin-top:6px}.mobile-chat-dot{width:10px;height:10px;border-radius:4px;flex-shrink:0}.mobile-count{background:var(--primary);color:var(--theme-0e1711,#0e1711)!important;border-radius:20px;padding:3px 7px}.mobile-project-picker{display:grid;gap:10px;margin-top:15px}.mobile-project-picker button{min-height:48px;white-space:normal;text-align:left}
@media(max-width:760px){
 .workspace>.sidebar{display:none!important}.workspace{display:block}.workspace>.main{min-height:0}.main>.topbar{display:none!important}
 .mobile-header{display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:0;z-index:25;padding:14px 20px 12px;background:var(--theme-080b09,#080b09);border-bottom:1px solid var(--border);min-height:74px}.mobile-brand{display:flex;align-items:center;text-align:left;min-height:44px;padding:0;max-width:195px;min-width:0}.mobile-brand .brand-wordmark{display:block;width:100%;max-width:185px;height:auto;max-height:36px;object-fit:contain;object-position:left center}.mobile-header-tools{display:flex;align-items:center;gap:9px}.mobile-header-tools>button{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0}.mobile-header-tools>button svg{width:21px;height:21px}.mobile-header-tools .profile-person{margin:0;min-height:44px;min-width:44px}.mobile-header-tools .profile-avatar{width:37px;height:37px}.mobile-header-tools .profile-handle{display:none}
 .page{padding:22px 20px calc(100px + env(safe-area-inset-bottom))!important}.page-heading{align-items:flex-start;gap:10px;margin-bottom:18px;flex-wrap:wrap}.page-heading h1{font-size:calc(23px * var(--font-overall,1) * var(--font-section,1));overflow-wrap:anywhere}.page-heading .project-actions{flex-wrap:wrap}.page-heading .project-actions button{min-height:44px}.page-heading .eyebrow{font-size:calc(9px * var(--font-overall,1) * var(--font-section,1));letter-spacing:1.5px;margin-bottom:5px}
 body[data-mobile-page=home] .page-heading,body[data-mobile-page=mobile-menu] .page-heading,body[data-mobile-page=chat-hub] .page-heading{display:none}
 .tabs[hidden]{display:none!important}.tabs{gap:6px;margin-bottom:20px;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tabs button{min-height:44px;flex-shrink:0;font-size:calc(12px * var(--font-overall,1) * var(--font-section,1));padding:10px}
 .mobile-bottom{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:35;border-top:1px solid var(--border);background:var(--theme-0e1711,#0e1711);padding:7px 8px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -6px 30px #0000000b}.mobile-bottom>button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:51px;color:var(--muted);padding:4px 0;font-size:calc(10px * var(--font-overall,1) * var(--font-section,1));letter-spacing:.1px}.mobile-bottom svg{width:23px;height:23px}.mobile-bottom>button.active{color:var(--primary);font-weight:700}.mobile-bottom>button.active:before{content:'';position:absolute;top:-8px;left:calc(50% - 11px);width:22px;height:3px;border-radius:0 0 3px 3px;background:var(--primary)}.mobile-tab-badge{position:absolute;top:0;left:calc(50% + 7px);font-size:calc(9px * var(--font-overall,1) * var(--font-section,1));font-weight:700;background:var(--primary);color:var(--theme-0e1711,#0e1711);min-width:15px;border-radius:10px;padding:1px 4px}.mobile-tab-badge:empty,.mobile-tab-badge[hidden]{display:none}
 body.mobile-keyboard .mobile-bottom,body.mobile-dialog-open .mobile-bottom{display:none}body.mobile-keyboard .page{padding-bottom:18px!important}body:has(#app>.login) .mobile-bottom{display:none}
 #toast{bottom:calc(90px + env(safe-area-inset-bottom));max-width:calc(100vw - 32px)}#alarm-banner{bottom:calc(85px + env(safe-area-inset-bottom));max-height:45dvh;overflow:auto}#chat-form{padding-bottom:12px!important}.chat-panel{min-width:0}.messages{min-height:200px;max-height:55dvh}
 .mobile-home .profile-name,.mobile-menu-profile .profile-link{color:inherit}.mobile-home button:focus-visible,.mobile-all-menu button:focus-visible,.mobile-bottom button:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
 .project-directory-controls{display:grid;grid-template-columns:1fr;gap:10px}.project-directory-table thead{display:none}.project-directory-table,.project-directory-table tbody,.project-directory-table tr{display:block;width:100%}.project-directory-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:12px 0;border-bottom:1px solid var(--border)}.project-directory-table td{border:0;padding:0!important;white-space:normal!important}.project-directory-table td:first-child{grid-row:1/3;align-self:center;min-width:0}.project-directory-table td:nth-child(2){font-size:calc(10px * var(--font-overall,1) * var(--font-section,1))}.project-directory-table td:nth-child(3) button{min-height:44px}.project-directory-name{min-height:44px;text-align:left;overflow-wrap:anywhere}
}
@media(max-width:370px){.page{padding-left:16px!important;padding-right:16px!important}.mobile-header{padding-left:16px;padding-right:16px}.mobile-welcome h1{font-size:calc(28px * var(--font-overall,1) * var(--font-section,1))}.mobile-shortcuts{gap:7px}.mobile-shortcuts b{font-size:calc(11px * var(--font-overall,1) * var(--font-section,1))}.mobile-project-card{padding:12px}.mobile-dashboard-section h2{font-size:calc(16px * var(--font-overall,1) * var(--font-section,1))}}
@media(prefers-reduced-motion:no-preference){.mobile-shortcuts button,.mobile-work-card,.mobile-project-card{transition:border-color .15s,transform .15s}.mobile-shortcuts button:active,.mobile-work-card:active,.mobile-project-card:active{transform:scale(.985)}}
