/* Compact field-work interface: existing personal theme remains the color source. */
.science-mobile-header{display:none}
.editable-record-detail .detail-save-bar{display:flex;align-items:center;gap:12px;padding:8px 16px;font-size:12px;border-bottom:1px solid var(--line);color:var(--muted);background:var(--surface-tint)}
.detail-save-bar [data-state=error]{color:var(--danger)}.editable-record-detail .dialog-header{padding:12px 16px}.editable-record-detail .dialog-body{padding:14px 16px}.editable-record-detail .dialog-footer{justify-content:flex-end}
.detail-attachments{margin-top:18px;padding-top:12px;border-top:1px solid var(--line)}.detail-attachment-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.detail-attachment-heading h3{font-size:14px}.detail-attachment-heading button{font-size:12px}.detail-attachments .attachment-grid{display:flex;flex-direction:column;gap:8px}
.attachment.attachment-compact{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:4px;background:var(--white)}
.attachment-compact>.attachment-image{width:52px;height:52px;min-width:52px;border-radius:3px;object-fit:cover;cursor:pointer}.attachment-compact>.document-icon{display:flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:0;font-size:12px;background:var(--surface-tint);border-radius:3px;color:var(--muted)}
.attachment-compact .attachment-body{flex:1;min-width:0;padding:0}.attachment-compact .attachment-name{font-size:13px;overflow-wrap:anywhere}.attachment-compact .attachment-body>small{font-size:11px}.attachment-compact .attachment-actions{gap:14px;margin-top:4px;align-items:center}.attachment-compact .attachment-actions button,.attachment-compact .attachment-actions a{font-size:12px;min-height:30px;display:inline-flex;align-items:center;padding:0}
.detail-compression{font-size:12px;margin-top:8px}.editable-record-detail .detail-add-field{margin-top:8px;font-size:12px}
#editor[open]:has(> #science-name-form){position:fixed;inset:0;margin:auto;width:min(340px,calc(100vw - 40px));max-width:calc(100vw - 40px);height:fit-content;min-height:0;max-height:calc(var(--mobile-height,100dvh) - 32px);border-radius:8px;overflow-y:auto}
#editor:has(> #science-name-form) .dialog-header{position:static;min-height:0;padding:10px 14px}
#editor:has(> #science-name-form) .dialog-header h2{font-size:15px}
#editor:has(> #science-name-form) .dialog-body{padding:14px;min-height:0}
#editor:has(> #science-name-form) .dialog-footer{position:static;padding:10px 14px;gap:8px}
@media(max-width:760px){
 :root{--ui-space-1:4px;--ui-space-2:8px;--ui-space-3:12px;--ui-space-4:16px;--ui-radius:4px;--ui-control:40px;--ui-touch:44px;--ui-font-caption:12px;--ui-font-body:14px;--ui-font-title:16px;--ui-popup-shadow:0 6px 18px #00000014}
 .mobile-bottom-layout{font-variant-numeric:tabular-nums}
 .mobile-bottom-layout .workspace>header{display:none}
 .mobile-bottom-layout #main{padding-top:12px}
 .editable-record-detail .form-grid{gap:12px;grid-template-columns:1fr}.editable-record-detail .field>label{font-size:12px;margin-bottom:4px;font-weight:500}.editable-record-detail input:not([type=checkbox]),.editable-record-detail textarea,.editable-record-detail select{font-size:16px;min-height:38px;padding:7px 8px}.editable-record-detail textarea{min-height:72px}.editable-record-detail .dialog-header h2{font-size:16px}.editable-record-detail .dialog-footer button{min-height:40px;font-size:13px}
 .mobile-bottom-layout .workspace,.mobile-bottom-layout #main,.mobile-bottom-layout #mobile-screen{min-width:0}
 .mobile-bottom-layout .panel,.mobile-library-list{border-radius:var(--ui-radius)}
 .mobile-bottom-layout #main{padding-left:var(--ui-space-3);padding-right:var(--ui-space-3)}
 .mobile-bottom-layout button:focus-visible,.mobile-bottom-layout summary:focus-visible,.mobile-bottom-layout select:focus-visible,.mobile-bottom-layout input:focus-visible,.mobile-bottom-layout textarea:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}
 .mobile-bottom-layout button:active:not(:disabled){filter:brightness(.96)}
 .mobile-bottom-layout button:disabled{cursor:default}
 .mobile-bottom-layout .science-switch{gap:var(--ui-space-1);margin-bottom:var(--ui-space-2);padding-bottom:var(--ui-space-1)}
 .mobile-bottom-layout .science-switch button{min-height:var(--ui-control);white-space:nowrap;border-radius:var(--ui-radius);font-size:var(--ui-font-caption)}
 .mobile-bottom-layout .science-switch [aria-pressed=true]{font-weight:600}
 .mobile-bottom-layout .mobile-category-toggle{min-height:var(--ui-control);font-size:var(--ui-font-caption);padding:var(--ui-space-2) var(--ui-space-3);border-radius:var(--ui-radius)}
 .mobile-bottom-layout .science-records{overflow:visible}
 .mobile-bottom-layout #main>.science-switch{display:none}
 .mobile-bottom-layout .science-layout>.science-tree{display:block;padding:var(--ui-space-2);min-width:0}
 .mobile-bottom-layout .science-tree>.science-node-heading{display:none}
 .mobile-bottom-layout .science-mobile-header{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-space-2);min-height:var(--ui-touch)}
 .mobile-bottom-layout .science-mobile-header select{width:auto;max-width:calc(100% - 52px);min-height:var(--ui-control);font-size:14px;font-weight:600;border:0;background-color:transparent;padding:var(--ui-space-2) 28px var(--ui-space-2) var(--ui-space-1);box-shadow:none}
 .mobile-bottom-layout .science-mobile-add{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-left:auto;width:var(--ui-touch);min-height:var(--ui-touch);border:0;background:transparent;color:var(--accent-ink);font-size:25px;padding:0}
 .mobile-bottom-layout .science-layout:not(.mobile-categories-open)>.science-tree>:not(.science-mobile-header):not(.mobile-category-toggle){display:none}
 .mobile-bottom-layout .science-tree>.mobile-category-toggle{width:100%;margin:var(--ui-space-1) 0 0;border:0;background:var(--surface-tint);font-weight:400;text-align:left}
 .mobile-bottom-layout .science-tree>.science-new-team{margin-top:var(--ui-space-2)}
 .mobile-bottom-layout .toolbar{align-items:center;gap:var(--ui-space-2);padding:var(--ui-space-2)}
 .mobile-bottom-layout .toolbar>[data-action=record-new],.mobile-bottom-layout .mobile-view-toggle,.mobile-bottom-layout .mobile-team-create{min-height:var(--ui-control);font-size:var(--ui-font-caption);padding:var(--ui-space-2);border-radius:var(--ui-radius)}
 .mobile-record-controls{gap:var(--ui-space-1);flex-wrap:wrap;min-width:0}
 .mobile-record-sort>summary{min-height:var(--ui-control);display:flex;align-items:center;padding:var(--ui-space-2);font-size:var(--ui-font-caption);white-space:nowrap}
 .mobile-record-more>summary{width:var(--ui-control);min-height:var(--ui-control)}
 .mobile-record-sort>div,.mobile-record-more>div{border-radius:var(--ui-radius);padding:var(--ui-space-1);box-shadow:var(--ui-popup-shadow);max-width:calc(100vw - 32px)}
 .mobile-record-sort>div>button,.mobile-record-more>div>button{min-height:var(--ui-touch);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-body)}
 .mobile-record-sort button:hover,.mobile-record-more button:hover{background:var(--accent-soft)}
 .mobile-record-item{padding:var(--ui-space-3) 30px var(--ui-space-3) var(--ui-space-3);min-height:64px}
 .mobile-record-title{line-height:1.45;font-size:var(--ui-font-body);overflow-wrap:anywhere}
 .mobile-record-meta,.mobile-record-result{line-height:1.5;font-size:var(--ui-font-caption)}
 .mobile-bottom-layout #record-search{font-size:16px;min-height:var(--ui-control);padding:var(--ui-space-2);border-radius:var(--ui-radius)}
 .mobile-bottom-layout .mobile-profile .my-menu-items>button{min-height:var(--ui-touch);font-size:13px}
 .mobile-bottom-layout .mobile-profile.panel{border:0;background:transparent;box-shadow:none;overflow:visible}
 .mobile-bottom-layout .mobile-profile .my-profile{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:28px 12px 24px;border:0;background:transparent}
 .mobile-bottom-layout .mobile-profile .my-profile>div{width:100%;min-width:0}
 .mobile-bottom-layout .mobile-profile .my-profile strong{display:block;font-size:18px;line-height:1.45;font-weight:600;overflow-wrap:anywhere}
 .mobile-bottom-layout .mobile-profile .my-profile small{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
 .mobile-bottom-layout .mobile-profile .my-profile>.avatar-default,.mobile-bottom-layout .mobile-profile .my-profile>.avatar-photo{width:68px;height:68px;flex-shrink:0;border-radius:50%}
 .mobile-bottom-layout .mobile-profile .my-profile>.avatar-default{display:flex;align-items:center;justify-content:center;overflow:hidden}
 .mobile-bottom-layout .mobile-profile .my-profile>.avatar-default svg{width:54px;height:54px;margin:6px 0 0}
 .mobile-bottom-layout .mobile-profile .my-menu-items{padding:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--white)}
 .mobile-bottom-layout .mobile-profile .my-menu-items>button{display:block;width:100%;min-height:46px;padding:12px 14px;text-align:left;background:transparent;color:var(--ink);font-size:13px;line-height:1.5;border:0;border-bottom:1px solid var(--line);border-radius:0}
 .mobile-bottom-layout .mobile-profile .my-menu-items>button.danger{color:var(--danger)}
 .mobile-bottom-layout .mobile-profile .my-menu-items>button:last-child{border-bottom:0}
 .mobile-bottom-layout .mobile-profile .menu-separator{height:8px;margin:0;background:var(--bg);border-bottom:1px solid var(--line)}
 .mobile-bottom-layout .mobile-profile .my-menu-items>button::after{font-size:17px;line-height:1.2;margin-top:1px}
 .mobile-project-settings .project-popover-form label{font-weight:500}
 .mobile-project-settings .popover-types label{min-height:var(--ui-control);gap:var(--ui-space-2);margin:0}
 .mobile-project-settings .popover-types input{width:18px;height:18px;min-height:18px}
 .mobile-project-settings .popover-form-actions{padding-top:var(--ui-space-3);border-top:1px solid var(--line)}
 .mobile-project-settings .popover-form-actions button{min-height:var(--ui-control)}
 .mobile-bottom-layout #editor .dialog-header h2{font-size:var(--ui-font-title);line-height:1.4}
 .mobile-bottom-layout #editor .dialog-body{padding:var(--ui-space-3)}
 .mobile-bottom-layout #editor .form-grid{gap:var(--ui-space-3)}
 .mobile-bottom-layout #editor .field>label{font-size:13px;font-weight:500}
 .mobile-bottom-layout #editor input:not([type=checkbox]):not([type=radio]):not([type=color]),.mobile-bottom-layout #editor textarea,.mobile-bottom-layout #editor select{font-size:16px;border-radius:var(--ui-radius)}
 .mobile-bottom-layout #editor .dialog-footer button{min-height:var(--ui-control)}
 .science-inline-actions button{min-height:var(--ui-control);font-size:var(--ui-font-caption)}
 .mobile-bottom-layout .form-error:not(:empty){font-size:13px;line-height:1.5;margin-top:var(--ui-space-2);padding:var(--ui-space-2);border-left:2px solid currentColor}
 .mobile-bottom-layout .table-footer{font-size:var(--ui-font-caption);padding:var(--ui-space-2) var(--ui-space-3)}
 .mobile-bottom-layout .mobile-tabs button{min-height:var(--ui-touch)}
}
@media(max-width:360px){.mobile-record-controls{gap:2px}.mobile-bottom-layout .toolbar{gap:var(--ui-space-1)}.mobile-record-sort>summary{padding:var(--ui-space-1)}.mobile-bottom-layout .mobile-view-toggle{padding:var(--ui-space-1)}}
@media(prefers-reduced-motion:reduce){.mobile-bottom-layout *, .mobile-bottom-layout *::before,.mobile-bottom-layout *::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
