/* Uses the existing theme variables and Theme Studio: no fixed theme colors. */
.fb90-personal{display:none}.fb90-personal.active{display:block}.fb90-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.fb90-grid button,.fb90-recentrow{background:var(--fb-panel,var(--card-bg,#242835));color:var(--fb-ink,inherit);border:1px solid var(--fb-edge,#5555);border-radius:12px;text-align:left;padding:12px;min-width:0;cursor:pointer}.fb90-tile{display:flex;flex-direction:column;gap:5px;min-height:82px}.fb90-tile span{font-size:20px}.fb90-tile strong{font-size:14px}.fb90-tile small,.fb90-recentrow small{color:var(--fb-dim,#aaa);font-size:12px;line-height:1.35}.fb90-tile.selected{outline:2px solid var(--fb-accent,#5a9cff);outline-offset:-2px}.fb90-start{margin:12px 0}.fb90-start h2{font-size:17px;margin:14px 0 8px}.fb90-recent{display:grid;gap:6px}.fb90-recentrow{display:flex;justify-content:space-between;align-items:center;gap:12px}.fb90-project-sections{margin-top:16px}.fb90-project-sections h3{margin-bottom:6px}.fb90-section-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.fb90-actions{display:flex;gap:7px;flex-wrap:wrap}.fb90-sectioninfo{margin:12px 0}.fb90-secondary-results{opacity:.8}.fb90-oldnav,.fb90-old-home{display:none!important}.fb90-personal,.fb-projects{padding-bottom:90px}
@media(min-width:800px){.fb90-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.fb90-grid{gap:7px}.fb90-grid button{padding:10px}.fb90-tile strong{font-size:13px}.fb90-tile small{font-size:11px}.modalbg .modal,.modalbg .recordmodal{max-height:100dvh;min-height:100dvh;width:100%;max-width:100%;border-radius:0;display:flex;flex-direction:column;overflow:auto}.modalbg form{min-height:0;flex:1;overflow:auto}.modalbg textarea,.modalbg .rich-editor{min-height:180px;line-height:1.5}.modalbg .rich-editor:focus,.modalbg textarea:focus{min-height:40dvh}.fb90-editing .v6-nav{display:none!important}.fb90-editing .modalbg .footer{position:static!important;flex-shrink:0}.fb90-editing .modalbg .modal{padding-bottom:env(safe-area-inset-bottom)} }

/* v9.1: mobile project-first screen corrections; theme studio remains authoritative */
#fb90Personal,#fb62Projects{position:relative;z-index:2;margin-top:0!important;padding-top:12px!important;min-height:0!important}
#fb90Personal h1,#fb62Projects h1{margin:4px 0 6px!important;font-size:clamp(24px,6vw,31px)!important}
#fb90Personal>p,#fb62Projects>p{margin:0 0 12px!important;font-size:13px!important;line-height:1.35}
.fb90-start{margin:0 0 16px!important}.fb90-start h2{margin:10px 0 7px!important}
.fb90-start .fb90-grid button{display:flex;flex-direction:column;gap:4px;line-height:1.25}
.fb90-start .fb90-grid button span{font-size:17px}.fb90-start .fb90-grid button strong{font-size:14px}.fb90-start .fb90-grid button small{display:block;font-size:12px}
.fb90-grid button,.fb90-recentrow,.fb-project-card,.fb-project-panel{background:var(--fb-panel,#242835)!important;isolation:isolate}
.fb90-tile{min-height:72px!important}.fb90-tile small{overflow-wrap:anywhere}
.fb91-walk-list{display:grid;gap:8px;margin:12px 0}.fb91-walk-list button{width:100%;text-align:left}
.fb91-project-panel{padding:14px!important}.fb91-project-panel>h2{font-size:22px!important;margin:14px 0 5px!important}.fb91-project-panel>p{margin:0 0 10px!important}
.fb91-project-panel>.fb-project-controls{margin-top:8px!important}.fb91-project-panel .fb90-project-sections{margin-top:12px!important}
.fb91-project-panel .fb90-project-sections h3{margin:4px 0!important;font-size:18px!important}
.fb91-project-panel .fb90-sectioninfo{margin:8px 0!important}
.fb91-project-panel .fb90-sectioninfo .muted{font-size:13px;margin:5px 0}
.fb91-project-panel #fb62Results{margin-top:8px}
.fb91-home .v6-hero{display:none!important}
.fb91-home .v6-shortcuts,.fb91-home .v6-capture{display:none!important}
.fb91-home .v6-footer{display:none!important}
#fb90Start ~ #v6HomeDashboard{margin-top:0}
/* Preserve the full animated theme behind pages. */
#fb90Personal,#fb62Projects{background:transparent!important;border-radius:0!important}
@media(max-width:700px){
 #fb90Personal,#fb62Projects{padding:10px 12px 95px!important}
 .fb90-grid{gap:8px!important}.fb90-grid button{padding:10px!important}
 .fb-project-controls{gap:7px!important;margin:10px 0!important}
 .fb-project-controls input{min-width:0!important;flex:1 1 100%!important}
 #fb62Projects>.fb-project-controls button{flex:1 1 auto!important}
 .fb91-project-panel>.fb-project-controls input{flex:1 1 100%!important}
 .fb91-project-panel>.fb-project-controls select{width:100%!important}
 .fb91-project-panel .fb90-grid{gap:7px!important}
 .fb91-project-panel .fb90-tile{min-height:68px!important}
 .fb91-project-panel .fb90-tile strong{font-size:13px!important}
 .fb91-project-panel .fb90-tile small{font-size:11px!important}
 .fb91-project-panel #fb62Back{padding:9px 12px!important}
 .v6-nav{padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
 
}

/* v9.2 unified page placement and compact layout */
#main.app > #fb62Projects,#main.app > #fb90Personal{margin:0!important;padding:0 0 100px!important;max-width:none;width:100%;background:transparent!important;min-height:0!important;position:relative;z-index:1}
#main.app > #fb62Projects:not(.active),#main.app > #fb90Personal:not(.active){display:none!important}
#main.app > #fb62Projects h1,#main.app > #fb90Personal h1{font-size:clamp(24px,5vw,30px)!important;line-height:1.2;margin:0 0 6px!important}
#main.app > #fb62Projects >p,#main.app > #fb90Personal >p{margin:0 0 12px!important;line-height:1.3}
#main.app .v6-head{margin-bottom:16px!important}
#fb62Projects .fb-project-panel{background:transparent!important;box-shadow:none!important;isolation:auto!important}
#fb62Projects .fb-project-panel .fb90-grid{margin-top:8px}
#fb62Projects #fb62ProjectList.hidden{display:none!important}
#fb62Projects:has(#fb62ProjectDetail .fb-project-panel)>h1,#fb62Projects:has(#fb62ProjectDetail .fb-project-panel)>p,#fb62Projects:has(#fb62ProjectDetail .fb-project-panel)>.fb-project-controls{display:none!important}
#fb62Projects .fb91-project-panel{margin-top:0!important;padding:0!important;border:0!important}
#fb62Projects .fb91-project-panel #fb62Back{margin-bottom:10px!important}
#fb62Projects .fb91-project-panel h2{margin:6px 0!important}
#fb90Personal .fb90-grid{margin-top:10px}
#fb90Personal .fb90-grid button,#fb62Projects .fb90-grid button{background:var(--fb-panel,var(--v6-panel))!important}
#swOverlay~.v6-nav{display:none!important}
body:has(#swOverlay) .v6-nav{display:none!important}
.sw-overlay .sw-header{align-items:center!important;gap:8px!important}
.sw-overlay .sw-header>div:first-child{min-width:0;flex:1}
.sw-overlay .sw-header h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sw-overlay .sw-header button{white-space:nowrap}
@media(max-width:700px){#main.app > #fb62Projects,#main.app > #fb90Personal{padding:0 0 90px!important}#main.app .v6-head{margin-bottom:12px!important}#fb62Projects .fb-project-controls{margin:12px 0!important}#fb62Projects .fb-project-card{padding:12px!important}#fb90Personal .fb90-grid button{min-height:74px!important}#fb62Projects .fb90-project-sections{margin-top:12px!important}.sw-overlay .sw-header{padding:9px 12px!important}.sw-overlay .sw-header button{padding:8px 10px!important;font-size:13px!important}}

/* Five primary mobile destinations; use the current Theme Studio palette. */
@media(max-width:950px){.v6-nav button[data-fb-main]{flex:1 1 20%;width:20%;min-width:0;white-space:nowrap;padding-inline:2px}.v6-nav button[data-fb-main="materials"] span{font-size:20px}}

/* Project-owned overview and technical brief; uses the existing theme palette. */
.fb-project-information-card{background:var(--card, var(--panel, #10251e));border:1px solid var(--border, #38564b);border-radius:12px;padding:14px;margin:12px 0;}
.fb-project-information-card h3{font-size:1rem;margin:0 0 12px;}
.fb-project-information-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;}
.fb-project-information-field{min-width:0;overflow-wrap:anywhere;}
.fb-project-information-field small{display:block;opacity:.7;margin-bottom:4px;}
.fb-project-information-toolbar,.fb-project-information-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;}
.fb-project-brief-input{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:.85rem;}
.fb-project-brief-input input,.fb-project-brief-input textarea{width:100%;box-sizing:border-box;background:var(--input-bg,var(--field-bg,#314b43));color:inherit;border:1px solid var(--border,#416359);border-radius:8px;padding:9px;min-height:38px;}
.fb-project-brief-input textarea{min-height:90px;resize:vertical;}
.fb-project-equipment-line{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border,#416359);gap:12px;}
.fb-project-overview-actions{display:flex;gap:8px;flex-wrap:wrap;}
.fb-project-record-controls-hidden{display:none!important;}
@media(max-width:600px){.fb-project-information-grid{grid-template-columns:1fr}.fb-project-information-card{padding:12px}}

/* Phase 1 project workspace: compact controls and opaque theme-aware summaries */
.fb-project-quick-toolbar{display:flex;justify-content:flex-end;padding:7px 0;}
.fb-project-quick-label{font-size:0;}
.fb-project-native-new{min-width:112px;min-height:36px;border-radius:8px;padding:7px 10px;background:var(--card,var(--panel,#10251e));color:inherit;border:1px solid var(--border,#38564b);font-size:13px;}
.fb-project-overview-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:14px;}
.fb-project-overview-count{display:flex;flex-direction:column;align-items:flex-start;gap:5px;background:var(--card,var(--panel,#10251e));border:1px solid var(--border,#38564b);color:inherit;border-radius:9px;padding:12px;text-align:left;}
.fb-project-overview-count strong{font-size:1.4rem;}.fb-project-overview-count small{opacity:.76;}
.fb-project-overview-recent{margin-bottom:12px;}.fb-project-overview-recent h4{font-size:.92rem;margin:8px 0;}
.fb-project-overview-update{display:flex;justify-content:space-between;gap:14px;padding:8px 0;border-bottom:1px solid var(--border,#38564b);}.fb-project-overview-update small{opacity:.7;}
@media(max-width:560px){.fb-project-overview-summary{gap:6px}.fb-project-overview-count{padding:9px}.fb-project-overview-update{flex-direction:column;gap:3px}}

/* Phase 3: project-owned task view, reusing the global record editor */
.fb-project-tasks{display:grid;gap:.65rem;min-width:0}
.fb-project-task-tools{display:flex;align-items:flex-end;justify-content:space-between;gap:.6rem;flex-wrap:wrap}
.fb-project-task-filter{display:grid;gap:.25rem;min-width:165px}
.fb-project-task-filter select{max-width:250px;background:var(--panel, var(--surface, #152720));color:var(--text,inherit);border:1px solid var(--border, #475d54);border-radius:8px;padding:.55rem .7rem}
.fb-project-task-row{background:var(--panel, var(--surface, #152720));border:1px solid var(--border, #475d54);border-radius:9px;padding:.65rem .75rem}
.fb-project-task-preview{margin:.2rem 0 0;font-size:.85rem;opacity:.85;white-space:pre-wrap}
.fb-project-tasks .fb-project-linked-list{display:grid;gap:.4rem}
@media(max-width:600px){.fb-project-task-row{gap:.5rem}.fb-project-task-tools{align-items:stretch}.fb-project-task-filter{flex:1}}

/* Project files: RFDS history uses the existing solid project panel language. */
.fb-project-rfds-revision{margin:8px 0;border:1px solid var(--border,#38564b);border-radius:9px;background:var(--card,var(--panel,#10251e));padding:10px 12px}
.fb-project-rfds-revision>summary{cursor:pointer;font-weight:600;overflow-wrap:anywhere}
.fb-project-rfds-revision-lines{display:grid;gap:6px;max-height:340px;overflow:auto;font-size:.9rem}
.fb-project-rfds-revision-lines>div{padding:5px 0;border-bottom:1px solid var(--border,#38564b);overflow-wrap:anywhere}

/* Project brief: themed, legible expandable RFDS details */
.fb-project-brief-detail{background:var(--card,var(--panel,#10251e));border:1px solid var(--border,#38564b);border-radius:10px;padding:10px 12px;margin:8px 0;color:inherit}
.fb-project-brief-detail>summary{cursor:pointer;font-weight:600;list-style:revert;padding:2px 0}
.fb-project-brief-detail>.fb-project-information-grid,.fb-project-brief-detail>.fb-project-equipment-list{margin-top:12px}
.fb-project-brief-detail .fb-project-information-field{overflow-wrap:anywhere}

/* Project Brief grouped RFDS cell IDs (existing theme colors). */
.fb-project-cellids{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:6px;margin:10px 0 4px}
.fb-project-cellid{border:1px solid var(--border,#38564b);background:var(--card,var(--panel,#10251e));border-radius:6px;padding:7px 10px;font-size:.84rem;overflow-wrap:anywhere}
.fb-project-brief-detail>.fb-project-brief-detail{margin:8px 0 8px 8px}
.fb-project-brief-detail>p.muted{margin:8px 0}

/* Mobile Project Workspace polish: scoped to project content, never the app shell. */
#fb90ProjectSections .fb-project-brief-detail,
#fb90ProjectSections .fb-project-information-card{min-width:0;max-width:100%;box-sizing:border-box;}
#fb90ProjectSections .fb-project-brief-detail>summary{line-height:1.4;overflow-wrap:anywhere;}
#fb90ProjectSections .fb-project-cellid{min-width:0;line-height:1.35;word-break:break-word;}
#fb90ProjectSections .fb-project-information-field{min-width:0;overflow-wrap:anywhere;}
@media(max-width:600px){
 #fb90ProjectSections .fb-project-information-card{padding:11px;margin:9px 0;}
 #fb90ProjectSections .fb-project-brief-detail{padding:9px 10px;margin:7px 0;}
 #fb90ProjectSections .fb-project-brief-detail>.fb-project-brief-detail{margin-left:3px;margin-right:0;padding:8px;}
 #fb90ProjectSections .fb-project-cellids{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:8px;}
 #fb90ProjectSections .fb-project-cellid{font-size:.76rem;padding:7px 6px;}
 #fb90ProjectSections .fb-project-equipment-line{gap:8px;padding:7px 0;align-items:baseline;}
 #fb90ProjectSections .fb-project-equipment-line>*{min-width:0;overflow-wrap:anywhere;}
 #fb90ProjectSections .fb-project-information-toolbar{align-items:flex-start;}
 #fb90ProjectSections .fb-project-overview-actions{gap:6px;}
 #fb90ProjectSections .fb-project-overview-actions button{min-height:36px;}
}
@media(max-width:360px){#fb90ProjectSections .fb-project-cellids{grid-template-columns:minmax(0,1fr);}}

/* Project-scoped audit history uses existing panel variables. */
.fb-project-history{margin-top:12px;padding:10px 12px;border:1px solid var(--border,rgba(255,255,255,.18));border-radius:10px;background:var(--panel,rgba(0,0,0,.85))}.fb-project-history>summary{cursor:pointer;font-weight:600}.fb-project-history-list{padding-top:10px;max-height:360px;overflow:auto}
