/* Schedule workspace. Screen only; document/export styles remain separate. */
@media screen {
 html:root{--map-blue:#365875}
 html:root[data-theme=light]{--ground:#E9EDF1;--panel:#fff;--panel2:#F3F5F7;--line:#D5DEE7;--line2:#B7C6D3;--text:#25313D;--muted:#627181;--gold:#365875;--gold-ink:#fff;color-scheme:light}
 html:root[data-theme=dark]{--ground:#202124;--panel:#29323B;--panel2:#35424F;--line:#526171;--line2:#6B7D8E;--text:#F2F5F8;--muted:#C1CBD5;--gold:#75B9F4;--gold-ink:#203A50;color-scheme:dark}
 html:root body.map-page,html:root body.map-page .app{background:var(--ground)!important;color:var(--text)!important}
 html:root body.map-page .mwc-floating-shelf{display:none!important}
 html:root body.map-page .header.mwc-floating-header{margin:8px 10px 0!important;padding:5px 10px!important;min-height:56px;border-radius:12px!important;box-shadow:none!important}
 html:root body.map-page .header .header-row{flex-wrap:nowrap;gap:8px!important;min-height:44px}
 html:root body.map-page .header .header-title{flex:1!important;order:0!important;font-size:20px!important}
 html:root body.map-page .header .map-home{display:inline-flex!important;align-items:center;text-decoration:none;font-size:12px!important;padding:8px 12px!important;flex:none}
 html:root body.map-page .header .btn-undo{font-size:12px!important;padding:8px 12px!important;min-height:44px}
 html:root body.map-page :is(button,.btn,.chip,summary){font-family:inherit!important;letter-spacing:0!important;text-transform:none!important;touch-action:manipulation;box-shadow:none}
 html:root body.map-page .toolbar{margin:6px 10px 0;padding:8px;gap:8px;border:1px solid #638098;border-radius:12px;background:#365875!important;color:#fff}
 html:root body.map-page .toolbar .wknav{background:transparent;border:0;gap:8px;overflow:visible}
 html:root body.map-page .wklabel b{color:#fff!important;font:650 20px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.3px}
 html:root body.map-page .wklabel span{color:#E2EAF2!important;font-size:11px;letter-spacing:0;text-transform:none}
 html:root body.map-page .toolbar :is(.btn,.wknav button,summary){min-height:44px;padding:8px 12px;border:1px solid #d0dce7!important;border-radius:9px!important;background:#fff!important;color:#273641!important;font-size:12px!important;font-weight:600;justify-content:center}
 html:root body.map-page .wknav button{min-width:44px;font-size:22px!important;padding:4px!important}
 html:root body.map-page .toolbar .count,html:root body.map-page .toolbar .count b{color:#fff!important;text-transform:none;letter-spacing:0;font-size:12px}
 html:root body.map-page .toolbar .count b{font-size:17px}
 html:root body.map-page .toolbar #btn-save{background:#DDEAD2!important;color:#263C2E!important;border-color:#BDCCA9!important}
 html:root body.map-page .toolbar #btn-trays.on{background:#E5EDF5!important;color:#284762!important}
 .map-more{position:relative;flex:none}.map-more summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none}.map-more summary::-webkit-details-marker{display:none}
 .map-more-panel{position:absolute;right:0;top:calc(100% + 8px);width:240px;background:var(--panel);border:1px solid var(--line2);border-radius:14px;padding:10px;box-shadow:0 14px 40px #15253830;display:grid;grid-template-columns:1fr 1fr;gap:8px;z-index:70}
 .map-more .theme{grid-column:1/-1;display:flex;border:0;padding:3px;background:var(--panel2);border-radius:10px;gap:3px}
 html:root body.map-page .theme button{flex:1;min-height:44px;border:0;border-radius:8px;background:transparent;color:var(--text);font-size:12px}
 html:root body.map-page .theme button.on{background:#365875;color:#fff}
 html:root body.map-page .stage{padding:8px 10px 10px;gap:8px}
 html:root body.map-page .floor{gap:8px;grid-template-rows:minmax(0,1.3fr) minmax(0,1fr)}
 html:root body.map-page .bay,html:root body.map-page .bay.empty{background:var(--bc)!important;color:#263442!important;border:1px solid var(--bay-edge)!important;border-radius:12px!important}
 html:root body.map-page .bay-head{background:var(--bc)!important;color:#263442!important;padding:6px 9px;min-height:48px;border-bottom:1px solid var(--bay-edge);gap:7px}
 html:root body.map-page .bay-num{font:650 15px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:0;text-transform:none;flex:1;color:#263442!important}
 html:root body.map-page .bay-num small{display:block;margin:3px 0 0;font-size:10px;letter-spacing:0;text-transform:none;color:#516170}
 html:root body.map-page .pill{color:#405266!important;background:#ffffffc9!important;border:1px solid #ffffff!important;border-radius:7px;font-size:10px;letter-spacing:0;text-transform:none;font-weight:600}
 html:root body.map-page .bay-add{width:36px;min-height:36px;flex:none;border:1px solid var(--bay-edge);border-radius:9px;background:#fff;color:#365875;font-size:23px;line-height:1}
 html:root body.map-page .empty-note{font-size:12px;font-style:normal;color:#516170;opacity:1;padding:12px}
 html:root body.map-page .jobs{padding:8px;gap:8px}
 html:root body.map-page .job{padding:10px!important;background:#fff!important;color:#25313D!important;border:1px solid #B9C7D3;border-radius:10px;display:flex;flex-direction:column;gap:3px}
 html:root body.map-page .job .client{font:650 17px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.2px;text-shadow:none;padding:0;overflow-wrap:anywhere}
 html:root body.map-page .job :is(.van,.prog,.jobnote){font:500 12px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:0;text-transform:none;color:#566676;opacity:1;padding:0}
 html:root body.map-page .job .jobnote{padding:7px;background:#F0F4F7;border-radius:7px}
 html:root body.map-page .bay.dense .job :is(.van,.tag){display:block}
 html:root body.map-page .tile.idle{opacity:1}
 html:root body.map-page .job .job-pill{position:static!important;align-self:flex-start}
 html:root body.map-page .job-tools{position:static;order:10;display:flex;justify-content:flex-end;gap:5px;margin-top:5px}
 html:root body.map-page .job-btn{min-width:36px;width:36px;height:36px;min-height:36px;padding:5px!important;border:1px solid #B9C7D3!important;border-radius:8px!important;background:#F3F6F9!important;color:#365875!important;opacity:1}
 html:root body.map-page .crew{padding:5px 8px;gap:5px}
 html:root body.map-page .tile{background:#fff!important;color:#25313D!important;border:1px solid #b9c7d3!important;border-radius:9px;padding:5px 8px 5px 5px;min-height:36px;font:600 13px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:0;box-shadow:none}
 html:root body.map-page .tile i{border-radius:6px;box-shadow:none}
 html:root body.map-page .task-group{background:#ffffffb8!important;border:1px solid #ffffffbd;border-radius:9px;color:#263442!important;padding:8px;margin:4px 8px}
 html:root body.map-page .task-group :is(.task,.task-who){color:#263442!important;font-size:12px;letter-spacing:0;text-transform:none}
 html:root body.map-page .task{gap:7px;align-items:flex-start;line-height:1.4}
 html:root body.map-page .task input{width:19px;height:19px;accent-color:#365875!important}
 html:root body.map-page .task-del{min-width:28px!important;width:28px;min-height:28px!important;height:28px;padding:0!important;background:#F9EFED!important;color:#914A45!important;border:1px solid #E5C8C4!important;border-radius:7px!important}
 html:root body.map-page .trays{gap:8px;grid-template-columns:1fr 1fr}
 html:root body.map-page .tray{background:var(--panel)!important;border:1px solid var(--line2);border-radius:12px;overflow:hidden}
 html:root body.map-page .tray-title{background:var(--panel2)!important;color:var(--text)!important;width:90px;padding:8px;font-size:13px;letter-spacing:0;text-transform:none}
 html:root body.map-page .tray-title small{color:var(--muted)!important;font-size:10px}
 html:root body.map-page .tray-body{max-height:100px;padding:7px;gap:6px}
 html:root body.map-page .jobcard{background:#F3F6F9!important;color:#263442!important;border:1px solid #B9C7D3!important;padding:8px!important;border-radius:9px;min-width:170px}
 html:root body.map-page .jobcard b{font:650 13px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
 html:root body.map-page .jobcard span{color:#596A7B}.map-page .jobcard .job-tools{margin-top:3px}
 html:root body.map-page :is(.modal,.mcard){background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line2);border-radius:16px!important}
 html:root body.map-page .modal-head{background:#365875!important;color:#fff!important;padding:14px 18px}
 html:root body.map-page .modal-head h2{font:650 21px/1.25 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:0;text-transform:none;color:#fff!important}
 html:root body.map-page .modal-x{min-width:44px;min-height:44px;border:1px solid #cad6e1;border-radius:9px;background:#fff;color:#365875}
 html:root body.map-page .modal .btn{min-height:44px;border-radius:9px!important;font-size:13px!important;background:#fff;color:#263442;border:1px solid #B9C7D3}
 html:root body.map-page .modal .btn.gold{background:#365875!important;color:#fff!important;border-color:#365875!important}
 html:root body.map-page .field label{font-size:13px;letter-spacing:0;text-transform:none;color:var(--text);font-weight:600}
 html:root body.map-page .chips{gap:6px}.map-page .bl-row{gap:10px}
 html:root body.map-page .chip{min-height:44px;font-size:12px;border-radius:9px;background:#fff;color:#365875;border:1px solid #B9C7D3}
 html:root body.map-page .chip.on{background:#365875!important;color:#fff!important;border-color:#365875!important}
 html:root body.map-page #p-move .chip.on{background:var(--tc)!important;color:#263442!important}
 html:root body.map-page .bl-row{border:1px solid #CBD6E0;border-radius:11px;padding:12px;background:#F7F9FB;color:#263442}
 html:root body.map-page .bl-row .who b{font:650 15px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.map-page .bl-row .who span{color:#607080}
 html:root body.map-page .bl-row.on{opacity:1;background:#F7F9FB}
 html:root body.map-page .mcard-head{background:#365875!important;color:#fff;padding:14px;border-bottom:1px solid #638098}
 html:root body.map-page .mcard-head :is(h2,small,.msum){color:#fff!important;font-family:inherit;letter-spacing:0;text-transform:none}
 html:root body.map-page .mcard-foot .btn.gold{background:#365875!important;color:#fff!important}
 html:root body.map-page .modal-foot{border-top:1px solid var(--line);padding:12px 18px;background:var(--panel2)}
 @media(pointer:coarse){html:root body.map-page :is(.job-btn,.bay-add){min-width:44px;width:44px;min-height:44px;height:44px}}
 @media(max-width:1100px){html:root body.map-page .toolbar .count{display:none}}
 @media(max-width:900px){
  html:root body.map-page :is(.job-btn,.bay-add){min-width:44px;width:44px;min-height:44px;height:44px}
  html:root body.map-page{overflow:auto}html:root body.map-page .app{height:auto;min-height:100dvh}
  html:root body.map-page .stage{display:block}
  html:root body.map-page .floor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:minmax(260px,auto)}
  html:root body.map-page .bay{grid-area:auto!important;min-height:260px}.map-page .bay-body{overflow:visible}
  html:root body.map-page .trays{margin-top:8px;grid-template-columns:1fr}
  html:root body.map-page .header .save-indicator{display:none}
  html:root body.map-page .toolbar .wknav{flex:1}.map-page .toolbar .spacer{display:none}
  html:root body.map-page .toolbar #btn-save{margin-left:auto}
 }
 @media(max-width:540px){
  html:root body.map-page .header.mwc-floating-header{margin:6px 8px 0!important;padding:4px 7px!important;min-height:54px}
  html:root body.map-page .header .header-title{font-size:18px!important}
  html:root body.map-page .header :is(.btn-undo,.map-home){font-size:11px!important;padding:6px 9px!important}
  html:root body.map-page .toolbar{margin:5px 8px 0;padding:6px;gap:6px}
  html:root body.map-page .toolbar .wknav{flex:1 1 calc(100% - 94px);justify-content:space-between;gap:4px}
  html:root body.map-page .toolbar .wklabel{padding:0 4px}.map-page .wklabel b{font-size:18px!important}
  html:root body.map-page .toolbar #btn-trays{flex:1}
  html:root body.map-page .toolbar :is(.btn,summary){padding:7px 9px!important;font-size:11px!important}
  html:root body.map-page .floor{grid-template-columns:1fr;grid-auto-rows:auto}
  html:root body.map-page .bay{min-height:230px}.map-page .bay-body{overflow:visible!important}
  html:root body.map-page .stage{padding:8px}
  html:root body.map-page .bl-row{display:grid;grid-template-columns:1fr auto}.map-page .bl-row .who{grid-column:1/-1}
  .map-more-panel{right:-76px;width:230px}.map-page .save-indicator{display:none}
 }
}

/* One toolbar and compact cards: keep space for several jobs and tasks per bay. */
@media screen{
 html:root body.map-page .header.mwc-floating-header{padding:6px 8px!important;min-height:58px!important;margin:6px 8px 0!important}
 html:root body.map-page .header .header-row.toolbar{display:flex!important;flex-wrap:wrap!important;margin:0!important;padding:0!important;gap:6px!important;border:0!important;border-radius:0!important;min-height:44px;box-shadow:none!important}
 html:root body.map-page .header .header-title{flex:0 0 auto!important;width:auto!important;font-size:17px!important;margin:0 12px 0 0!important}
 html:root body.map-page .header .header-line,html:root body.map-page .toolbar .count{display:none!important}
 html:root body.map-page .toolbar .wknav{flex:0 0 auto;gap:3px!important}
 html:root body.map-page .toolbar .wklabel{padding:0 7px;min-width:160px}
 html:root body.map-page .toolbar .wklabel b{font-size:17px!important}
 html:root body.map-page .toolbar .wklabel span{font-size:10px!important}
 html:root body.map-page .toolbar .save-indicator:empty{display:none}
 html:root body.map-page .stage{padding:6px 8px 8px}
 html:root body.map-page .floor{grid-template-rows:minmax(0,1.2fr) minmax(0,1fr)}
 html:root body.map-page .bay-head{min-height:40px;padding:3px 7px}
 html:root body.map-page .bay-add{width:34px;min-width:34px;min-height:34px;height:34px;font-size:21px}
 html:root body.map-page .jobs{padding:5px;gap:5px}
 html:root body.map-page .job{display:block;padding:7px 50px 7px 8px!important;min-height:58px;border-radius:8px}
 html:root body.map-page .bay .job .client{font:650 14px/1.25 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;padding:0!important;text-wrap:wrap;letter-spacing:0;color:#000!important}
 html:root body.map-page .job-meta{font:400 11px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#000!important;margin-top:3px;overflow-wrap:anywhere}
 html:root body.map-page .job .jobnote{font-size:11px;padding:3px 0 0;background:transparent;margin:0;line-height:1.3;color:#000!important}
 html:root body.map-page .jobnote b{display:inline;margin-right:4px;text-transform:none;letter-spacing:0;font-size:inherit}
 html:root body.map-page .job .job-menu{position:absolute;right:4px;top:4px;display:block;margin:0;z-index:2}
 html:root body.map-page .job-menu summary{list-style:none;display:flex;align-items:center;justify-content:center;width:40px;height:44px;border:1px solid #ccd4da;border-radius:7px;background:#f5f6f7;color:#000;font-size:22px;cursor:pointer}
 .job-menu summary::-webkit-details-marker{display:none}
 .job-menu[open]{z-index:10!important}
 .job-action-panel{position:absolute;right:0;top:48px;display:flex;gap:4px;padding:6px;background:#fff;border:1px solid #b9c7d3;border-radius:9px;box-shadow:0 4px 14px #0002}
 html:root body.map-page .job-action-panel .job-btn{width:40px;min-width:40px;height:44px;min-height:44px;color:#000!important}
 html:root body.map-page .job-btn:disabled{opacity:.35}
 html:root body.map-page .bay :is(.bay-num,.bay-num small,.pill,.empty-note,.tile,.none,.task,.task-who,.task-del,.bay-add){color:#000!important}
 html:root body.map-page .bay-num{opacity:1;font-size:14px}
 html:root body.map-page .crew{padding:4px 6px;margin-top:3px;gap:4px}
 html:root body.map-page .tile{min-height:30px;padding:3px 6px 3px 3px;font-size:12px;color:#000!important}
 html:root body.map-page .tile i{background:color-mix(in srgb,var(--tc) 25%,white)!important;color:#000!important}
 html:root body.map-page .tasks{gap:4px;padding:0 6px 6px}
 html:root body.map-page .task-group{padding:5px 6px;margin:0;flex-basis:160px}
 html:root body.map-page .task{line-height:1.25;padding:2px 0}
 html:root body.map-page .task-who{margin-bottom:3px}
 html:root body.map-page .task-del{background:#fff8!important;color:#000!important;border-color:#c7cdd1!important;width:26px;min-width:26px!important;min-height:26px!important;height:26px}
 html:root body.map-page .task.done span{opacity:1}
 html:root body.map-page .map-colours-modal{width:min(640px,96vw);background:#fff!important;color:#000!important}
 .colour-help{font-size:13px;line-height:1.5;margin:0 0 14px;color:#000}
 #bay-colour-rows{display:grid;gap:8px}
 .bay-colour-row{display:grid;grid-template-columns:120px 1fr 44px;gap:10px;align-items:center}
 .bay-colour-preview{padding:10px;border-radius:9px;color:#000;border:1px solid #0002;display:grid;gap:3px;font-size:13px}
 .bay-colour-preview span{font-size:11px}
 .bay-colour-fields{display:grid;gap:4px}
 .bay-colour-fields label{font-size:12px;color:#000;font-weight:600}
 html:root body.map-page .bay-colour-fields select{min-height:44px;background:#fff;color:#000;border:1px solid #b9c7d3;border-radius:8px;padding:8px;font-size:13px;width:100%}
 html:root body.map-page .bay-colour-row input[type=color]{width:44px;height:44px;min-height:44px;padding:3px;background:#fff;border:1px solid #b9c7d3;border-radius:8px;cursor:pointer}
 #colours-error{color:#912e25;font-size:13px;margin:8px 0 0}
 @media(max-width:1100px){html:root body.map-page .toolbar #today{display:none}html:root body.map-page .header .header-title{margin-right:2px!important}html:root body.map-page .toolbar .wklabel{min-width:140px}}
 @media(max-width:900px){
  html:root body.map-page .floor{grid-template-rows:none;grid-auto-rows:minmax(220px,auto)}
  html:root body.map-page .bay{min-height:220px}
  html:root body.map-page .toolbar .spacer{display:block}
  html:root body.map-page .header .header-title{display:none!important}
  html:root body.map-page .toolbar :is(.btn,summary){padding:6px 8px!important;font-size:11px!important}
 }
 @media(max-width:650px){
  html:root body.map-page .toolbar .wknav{flex:1 1 calc(100% - 80px);justify-content:space-between}
  html:root body.map-page .toolbar .wklabel{min-width:0}
  html:root body.map-page .toolbar .spacer{display:none}
  html:root body.map-page .toolbar #btn-trays{flex:1}
  html:root body.map-page .toolbar #btn-save{margin:0}
  html:root body.map-page .map-more-panel{right:-60px}
 }
 @media(max-width:540px){
  html:root body.map-page .floor{grid-template-rows:none;grid-auto-rows:auto}
  html:root body.map-page .bay{min-height:180px}
  .bay-colour-row{grid-template-columns:85px 1fr 44px;gap:8px}
  .bay-colour-preview{padding:8px}
  html:root body.map-page .map-colours-modal .modal-body{padding:12px}
  html:root body.map-page .map-colours-modal .modal-foot{padding:10px;gap:6px;flex-wrap:wrap}
 }
}
@media screen{
 html:root body.map-page #bench .tile.idle{opacity:1!important}
 html:root body.map-page .header .map-more-panel #btn-trays{grid-column:1/-1}
 @media(max-width:650px){
  html:root body.map-page .header .header-row.toolbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px!important}
  html:root body.map-page .header .map-home{grid-column:1;padding:6px!important;justify-content:center}
  html:root body.map-page .header .toolbar .wknav{grid-column:2/-1;min-width:0;width:100%;justify-content:space-between;gap:0!important}
  html:root body.map-page .header .toolbar .wklabel{padding:0 2px}
  html:root body.map-page .header .toolbar .wklabel b{font-size:15px!important}
  html:root body.map-page .header .toolbar .wklabel span{font-size:9px!important}
  html:root body.map-page .header .toolbar :is(.btn,summary){padding:6px!important;min-width:0;white-space:nowrap;font-size:11px!important}
  html:root body.map-page .header .toolbar #btn-save{width:100%}
  html:root body.map-page .header .toolbar .map-more summary{gap:4px}
  html:root body.map-page .header .toolbar .save-indicator{display:none}
  html:root body.map-page .header .toolbar .map-more-panel{right:-80px}
 }
}
@media screen{
 html:root body.map-page .header .map-more-panel #today{display:inline-flex!important}
 html:root body.map-page .jobcard :is(b,span){color:#000!important}
 @media(max-width:900px){
  html:root body.map-page .tray-title{width:100%;min-height:32px;display:flex;align-items:center;gap:10px;padding:6px 8px;font-size:13px}
  html:root body.map-page .tray-title small{display:inline;max-width:none;font-size:11px;line-height:1.3;margin:0}
 }
}
/* Original bay colours, with light label surfaces to keep the requested black text clear. */
@media screen{
 html:root body.map-page .bay-head{background:color-mix(in srgb,var(--bc) 18%,white)!important}
 html:root body.map-page .bay :is(.empty-note,.none){background:#ffffffeb;border-radius:6px;padding:5px 7px;margin:5px;color:#000!important;opacity:1}
 html:root body.map-page .bay-colour-preview b,html:root body.map-page .bay-colour-preview span{background:#ffffffed;border-radius:4px;padding:2px 4px;color:#000}
}
/* Ticking a task with a finger needs a 44px target (audit I20). On a phone every task row is as tall as its
   44px delete button, and the tick and its words fill the row. Not on the iPad or the wall screen: there the
   rows stay small on purpose (CLAUDE.md, Workshop Map density, 13 Sep 2026). */
@media screen and (pointer:coarse) and (max-width:650px){
 html:root body.map-page .task{align-items:stretch}
 html:root body.map-page .task-del{min-height:44px!important}
}
