/* Phone workspace, navigation sheet and task/editor layouts. */
.mobile-navigation-toggle,.mobile-workbench-button { display:none; }
.mobile-navigation-drawer:not([open]) { display:none; }
.mobile-navigation-drawer { position:fixed; inset:0 auto 0 0; width:min(360px,calc(100vw - 20px)); height:100dvh; height:var(--product-viewport-height,100dvh); max-width:100%; max-height:100%; margin:0; padding:0; border:0; border-right:1px solid var(--border-subtle); border-radius:0 20px 20px 0; background:var(--surface-subtle); color:var(--text-primary); box-shadow:12px 0 48px #17171217; overflow:hidden; }
.mobile-navigation-drawer[open] { animation:mobile-navigation-enter 180ms var(--interaction-ease); }
.mobile-navigation-drawer::backdrop { background:#15151150; }
.portal-page.has-mobile-navigation { overflow:hidden; }
.mobile-navigation-frame { height:100%; display:flex; flex-direction:column; }
.mobile-navigation-heading { display:flex; justify-content:space-between; align-items:center; padding:24px 20px 20px; padding-top:max(24px,env(safe-area-inset-top)); gap:16px; flex-shrink:0; }
.mobile-navigation-brand { font-size:18px; font-weight:650; letter-spacing:-.025em; }
.mobile-navigation-heading h2 { margin:12px 0 0; font-size:var(--font-reading); font-weight:500; }
.mobile-navigation-heading .portal-icon-button { align-self:flex-start; font-size:26px; }
.mobile-navigation-scroll { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 12px 20px; }
.mobile-create-agent { display:block; width:calc(100% - 16px); min-height:44px; margin:0 8px 20px; padding:12px; border:1px solid var(--border-default); border-radius:12px; background:#fff; color:var(--text-primary); font-size:var(--font-body); text-align:left; }
.mobile-create-agent:hover { border-color:#b9b9aa; background:var(--surface-hover); }
.mobile-agent-list { display:flex; flex-direction:column; gap:4px; }
.mobile-contact-row { display:flex; align-items:center; gap:4px; border-radius:12px; }
.mobile-contact-row:hover { background:var(--border-subtle); }
.mobile-contact { display:flex; align-items:center; gap:12px; flex:1; min-width:0; min-height:68px; padding:12px; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--text-primary); text-align:left; }
.mobile-contact[aria-current="page"] { border-color:var(--border-default); background:#fff; }
.mobile-contact-avatar { flex-shrink:0; width:38px; height:38px; }
.mobile-contact-copy { display:flex; flex-direction:column; gap:5px; min-width:0; }
.mobile-contact-copy strong { font-size:var(--font-body); font-weight:500; line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mobile-contact-copy small { font-size:var(--font-small); line-height:1.5; color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mobile-contact-delete { display:grid; place-items:center; flex-shrink:0; width:40px; height:44px; padding:12px; border:0; border-radius:8px; background:none; color:var(--text-secondary); }
.mobile-contact-delete svg { width:16px; height:16px; }
.mobile-contact-delete:not(:disabled):hover { color:#a83d28; background:#f8e8e1; }
.mobile-directory-empty,.mobile-directory-error { padding:12px; font-size:var(--font-body); line-height:1.8; color:var(--text-secondary); }
.mobile-directory-error { border:1px solid #e7d5cb; border-radius:10px; background:#fff6f0; color:#97472c; }
.mobile-directory-error p { margin:0 0 8px; }
.mobile-business-navigation { margin:24px 8px 0; padding-top:16px; border-top:1px solid var(--border-subtle); }
.mobile-business-navigation>summary { padding:12px 0; font-size:var(--font-body); color:var(--text-secondary); cursor:pointer; }
.mobile-business-navigation nav { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-top:8px; }
.mobile-business-navigation button,.mobile-navigation-footer button { min-height:44px; padding:12px; border:0; border-radius:8px; background:none; color:var(--text-secondary); text-align:left; font-size:var(--font-body); }
.mobile-business-navigation button:hover,.mobile-navigation-footer button:hover { background:var(--border-subtle); }
.mobile-business-navigation button[aria-current="page"] { color:var(--text-primary); background:var(--border-subtle); }
.mobile-navigation-footer { display:flex; justify-content:space-between; gap:16px; padding:12px 20px max(12px,env(safe-area-inset-bottom)); border-top:1px solid var(--border-default); flex-shrink:0; }
@keyframes mobile-navigation-enter { from {opacity:.8;transform:translateX(-24px);} to {opacity:1;transform:translateX(0);} }
@media(max-width:760px) {
 .app-sidebar { display:none; }
 .dashboard-page .app-layout { display:block; min-height:100dvh; background:#fff; }
 body.agent-conversation-open .app-layout { display:flex; flex-direction:column; height:var(--product-viewport-height,100dvh); min-height:0; }
 body.agent-conversation-open .app-content { flex:1; min-height:0; }
 .app-topbar { position:sticky; top:0; display:flex; align-items:center; gap:8px; width:100%; height:auto; min-height:56px; padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left)); padding-top:max(8px,env(safe-area-inset-top)); }
 .mobile-navigation-toggle { display:grid; place-items:center; width:40px; height:40px; padding:9px; border:0; border-radius:10px; background:transparent; color:var(--text-primary); flex-shrink:0; }
 .mobile-navigation-toggle:hover { background:var(--surface-hover); }
 .mobile-navigation-toggle svg { width:22px; height:22px; }
 .mobile-workbench-button { display:flex; align-items:center; gap:6px; min-height:40px; padding:8px 10px; border:1px solid var(--border-default); border-radius:9px; background:#fff; color:var(--text-secondary); font-size:var(--font-small); flex-shrink:0; }
 .mobile-workbench-button svg { width:16px; height:16px; }
 .app-topbar-title { flex:1; min-width:0; overflow:hidden; font-size:var(--font-body); }
 .app-topbar-title>span:not(:last-child) { display:none; }
 .app-topbar-title>span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 .app-topbar .app-topbar-right,.app-topbar .app-mobile-brand { display:none; }
 .dashboard-main { padding:24px max(16px,env(safe-area-inset-right)) 32px max(16px,env(safe-area-inset-left)); }
 .dashboard-title { flex-wrap:wrap; gap:16px; }
 .dashboard-title h1 { font-size:25px; }
 .dashboard-title p { font-size:var(--font-body); line-height:1.8; }
 .dashboard-actions { display:flex; gap:8px; flex-wrap:wrap; width:100%; }
 .dashboard-actions>.portal-button { flex:1; }
 .workspace-data-navigation { margin-top:0; gap:4px; overflow-x:auto; overscroll-behavior-x:contain; padding-bottom:12px; margin-bottom:20px; scrollbar-width:none; }
 .workspace-data-navigation>button { min-height:40px; padding:8px 12px; font-size:var(--font-small); flex-shrink:0; }
 .workspace-more { display:none; }
 .agent-chat-header { padding:12px 16px; gap:10px; }
 .agent-chat-header>.agent-contact-avatar { width:32px; height:32px; }
 .agent-chat-header h1 { font-size:var(--font-body); }
 .agent-chat-header p,.agent-header-state { display:none; }
 .agent-profile-toggle { min-height:40px; padding:8px; }
 .agent-thread { padding:24px 16px 12px; }
 .agent-message { margin-bottom:24px; }
 .agent-message.is-welcome .agent-message-text { font-size:23px; line-height:1.65; }
 .agent-message.is-welcome .agent-message-mark { width:46px; height:46px; }
 .agent-message-mark { width:28px; height:28px; }
 .agent-suggestions { gap:8px; padding:0 16px 12px; }
 .agent-suggestion { min-height:44px; padding:10px 12px; }
 .agent-compose-area { padding:8px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
 .agent-composer { padding:12px 12px 8px; border-radius:20px; }
 .agent-composer textarea { min-height:44px; max-height:min(160px,24dvh); }
 .agent-composer-tools { margin-top:4px; }
 .agent-attach,.agent-send { min-width:40px; min-height:40px; }
 .agent-compose-note { font-size:var(--font-caption); line-height:1.6; margin-top:8px; }
 .agent-card-actions>.agent-card-action { flex:1 1 110px; min-height:44px; text-align:center; }
 .agent-result-card { margin-top:16px; border-radius:14px; }
 .agent-card-heading { flex-wrap:wrap; }
 .agent-card-status { max-width:none; }
 .agent-jump { min-height:40px; }
 .mobile-keyboard-open.agent-conversation-open .agent-chat-header,.mobile-keyboard-open.agent-conversation-open .agent-suggestions,.mobile-keyboard-open.agent-conversation-open .agent-compose-note { display:none!important; }
 .mobile-keyboard-open .agent-profile-panel { max-height:28vh; }
 .panel-toolbar { flex-wrap:wrap; gap:12px; padding:16px; }
 .panel-toolbar>.filter-tabs { flex-basis:100%; overflow-x:auto; }
 .filter-tabs button { min-height:40px; padding:8px 12px; font-size:var(--font-small); white-space:nowrap; }
 .panel-toolbar>.portal-button { flex:1; }
 .buyer-task-source { flex-direction:column; gap:12px; align-items:stretch; }
 .buyer-task-source>div:last-child { display:flex; gap:12px; flex-wrap:wrap; }
 .company-layout,.skill-grid { grid-template-columns:1fr; }
 .company-file-zone { padding:20px 16px; overflow-wrap:anywhere; }
 .company-save-row { flex-wrap:wrap; gap:12px; }
 .settings-row { flex-wrap:wrap; gap:12px; }
 .record-list li { flex-wrap:wrap; gap:8px; }
 .task-board-toolbar { flex-direction:column; align-items:stretch; gap:12px; }
 .task-board-search { width:100%; }
 .task-board-filters { flex-wrap:nowrap; overflow-x:auto; }
 .task-board-filters button { min-height:40px; flex-shrink:0; }
 .strategy-list-toolbar { flex-wrap:wrap; gap:12px; }
 .strategy-list-toolbar input { width:100%; max-width:none; }
 .strategy-grid { grid-template-columns:minmax(0,1fr); }
 .strategy-editor-heading { flex-wrap:wrap; gap:12px; }
 .strategy-editor-heading h2 { font-size:22px; }
 .strategy-visual-layout { grid-template-columns:minmax(0,1fr); }
 .strategy-board { grid-template-columns:minmax(0,1fr); gap:24px; padding:20px 16px; }
 .strategy-board-scroll { max-height:none; overflow:visible; }
 .strategy-connections,.strategy-product-node:after,.strategy-buyer-node:before { display:none; }
 .strategy-inspector { padding:20px 16px; scroll-margin-top:80px; }
 .strategy-inspector-empty { min-height:120px; }
 .strategy-preset-shelf { padding:16px; }
 .strategy-presets { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .strategy-product-actions button,.strategy-term-tag button,.strategy-profile-actions button { min-width:40px; min-height:40px; }
 .strategy-card-actions .portal-button { flex:1 1 100px; }
 .strategy-editor-footer { position:sticky; bottom:0; z-index:12; align-items:stretch; flex-direction:column; gap:8px; margin-top:16px; padding:12px 0 max(12px,env(safe-area-inset-bottom)); background:#fff; }
 .strategy-editor-footer>div { display:flex; flex-wrap:wrap; gap:8px; }
 .strategy-editor-footer .portal-button { flex:1; }
 .mobile-keyboard-open .strategy-editor-footer { position:static; }
 .strategy-run-panel { padding:20px 16px; }
 .strategy-run-scope { grid-template-columns:minmax(0,1fr); gap:0; }
 .market-map-surface { height:clamp(240px,42svh,360px); }
 .market-workspace.is-expanded { height:var(--product-viewport-height,100dvh); }
 .market-workspace.is-expanded .market-map-surface { min-height:44svh; }
 .market-toolbar { padding:8px 12px; min-height:0; gap:8px; }
 .market-toolbar-actions { gap:8px; }
 .market-fullscreen,.map-controls button { min-width:44px; min-height:44px; }
 .country-search-results button { min-height:44px; }
 .country-search-results small,.country-metrics dt,.country-detail-heading { font-size:var(--font-small); }
 .country-detail-heading button { min-width:44px; min-height:44px; }
 .country-metrics dd { font-size:26px; }
 .country-empty p,.country-section-heading h3 { font-size:var(--font-small); }
 .market-mode-tabs { height:auto; min-height:44px; }
 .market-mode-label,.market-mode-tabs button { min-height:40px; }
 .country-search { min-height:44px; }
 .country-detail { padding:16px; }
 .country-detail>.portal-button { min-height:44px; font-size:var(--font-body); }
 .country-selection { padding:12px; }
 .country-selection-tabs { max-width:100%; overflow-x:auto; }
 .country-selection-tabs button { min-height:40px; }
 .country-selected-filter,.country-selection-heading>button,.country-selection-list-heading>button { min-height:40px; }
 .country-choice-name>span,.country-group-row>button { font-size:var(--font-small); }
 .selected-country-chip button { min-width:36px; min-height:36px; }
 .country-selection-footer { flex-wrap:wrap; gap:12px; }
 .country-selection-footer>.portal-button { min-height:44px; }
}
@media(max-width:360px) {
 .mobile-workbench-button { padding:8px; }
 .mobile-workbench-button>span { display:none; }
 .agent-profile-toggle { font-size:var(--font-caption); }
 .agent-message.is-welcome .agent-message-text { font-size:21px; }
 .agent-card-actions>.agent-card-action { flex-basis:100%; }
}
