:root{color-scheme:dark;--bg:#0a0a0a;--panel:#151514;--line:#363530;--text:#f1eee7;--muted:#a3a19a;--orange:#d94a2c;--green:#66d394;--warn:#eab86c;--red:#ef795c;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue',Arial,sans-serif;background:var(--bg);color:var(--text)}*{box-sizing:border-box}body{margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}[hidden]{display:none!important}button,input,textarea,select{font:inherit;color:inherit;background:#20201e;border:1px solid var(--line);border-radius:7px;padding:10px 12px;min-height:44px;max-width:100%;min-width:0}button{font-weight:650;cursor:pointer;touch-action:manipulation}button:active{background:#40342e}button:disabled,input:disabled,select:disabled,textarea:disabled{opacity:.55;cursor:default}input,textarea,select{width:100%;font-size:16px}textarea{resize:vertical}button.primary{background:var(--orange);color:white;border-color:var(--orange)}button.ghost{background:transparent;border-color:transparent;text-align:left}button.selected{border-color:var(--orange);background:#32231d}h1,h2,h3,p{margin:0}h1{font-size:clamp(28px,4vw,45px);letter-spacing:-1.4px}h2{font-size:21px}h3{font-size:16px}small,.muted{color:var(--muted);font-size:12px;line-height:1.5}.micro{font-size:10px;font-weight:750;letter-spacing:1.7px;color:var(--orange)}#shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:100dvh}aside{position:sticky;top:0;height:calc(100dvh - env(safe-area-inset-top));display:flex;flex-direction:column;padding:20px 15px;gap:18px;border-right:1px solid var(--line);background:#10100f;overflow-y:auto}.brand img{width:105px;display:block;margin-bottom:12px}.brand h2{font-size:26px;letter-spacing:-.9px;margin:4px 0}.brand h2 span{color:var(--orange)}#projectpicker select{font-size:14px}#nav{display:grid;gap:4px}#nav button{display:flex;gap:11px;align-items:center;padding:12px 10px;background:transparent;border-color:transparent;text-align:left;color:var(--muted)}#nav button.active{border-color:#55382e;background:#2a201c;color:var(--text)}#nav b{width:24px;color:var(--orange);font-size:18px;text-align:center}.sidefoot{display:grid;gap:3px;margin-top:auto}.sidefoot small{padding:8px}main{padding:25px 28px;min-width:0}header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:20px}.header-right,.row,.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row.between{justify-content:space-between}.toolbar{margin-bottom:14px}.grow{flex:1;min-width:120px}.status{font-size:12px;color:var(--muted);font-weight:650}.ok{color:var(--green)!important}.warn{color:var(--warn)!important}.bad{color:var(--red)!important}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px;margin-bottom:14px;min-width:0}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}label{display:grid;gap:6px;font-size:11px;font-weight:700;color:var(--muted);letter-spacing:.7px}label input,label select,label textarea{letter-spacing:0;font-weight:500}label.full{grid-column:1/-1}.metric{background:#0f0f0e;border:1px solid var(--line);padding:16px;border-radius:8px}.metric strong{display:block;font-size:36px;color:var(--text);line-height:1.2}.progress{height:6px;border-radius:4px;background:#333;overflow:hidden;margin:12px 0}.progress i{display:block;height:100%;background:var(--orange)}.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:9px}table{border-collapse:collapse;width:100%;font-size:14px;text-align:left;white-space:nowrap}th{font-size:10px;color:var(--muted);letter-spacing:1px;background:#191918;position:sticky;top:0;z-index:1}td,th{padding:8px;border-bottom:1px solid #30302e}td input,td select{background:#181817;border-color:#34342f;padding:8px;font-size:15px;min-width:76px}td input.desc{min-width:210px}td button{font-size:12px;white-space:nowrap}td .short{width:90px}tr.done td:first-child{box-shadow:inset 3px 0 var(--green)}.empty{color:var(--muted);padding:24px;text-align:center;border:1px dashed var(--line);border-radius:8px}.shotcard{border:1px solid var(--line);border-radius:10px;background:var(--panel);overflow:hidden;min-width:0}.shotcard .inner{padding:12px;display:grid;gap:9px}.shotcard img,.art{width:100%;aspect-ratio:16/9;object-fit:contain;background:#0d0d0d;display:block}.placeholder{aspect-ratio:16/9;display:grid;place-items:center;background:repeating-linear-gradient(135deg,#191918 0 12px,#151514 12px 24px);color:var(--muted);font-size:13px}.thumbs{display:flex;gap:6px;overflow:auto}.thumbs img{width:76px;height:48px;object-fit:cover;border-radius:4px}.block{border:1px solid var(--line);border-left:4px solid var(--orange);border-radius:8px;background:#1b1b19;padding:12px;display:grid;gap:8px;margin-bottom:9px}.block.b{border-left-color:#6a9aa2}.block.finished{border-left-color:var(--green)}.chip{display:inline-block;border:1px solid #494741;background:#242421;border-radius:5px;padding:5px 7px;font-size:12px}.chip.done{color:var(--green)}.schedule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pool{max-height:230px;overflow:auto}.pool button{margin:3px;text-align:left}.dropzone{min-height:80px;border:1px dashed #5a5147;padding:10px;border-radius:8px}.dropzone.over{border-color:var(--orange);background:#2e201b}.note{font-size:13px;color:var(--muted);line-height:1.6;margin:8px 0}.danger{color:var(--red)}#toast{position:fixed;z-index:100;bottom:max(15px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#2e2b27;border:1px solid #62574f;box-shadow:0 6px 30px #0008;color:var(--text);padding:12px 18px;border-radius:9px;max-width:90vw;display:none}dialog{width:min(620px,94vw);max-height:85dvh;overflow:auto;border:1px solid #57534b;background:#191918;color:var(--text);border-radius:13px;padding:18px;z-index:100}dialog::backdrop{background:#000b}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.dialog-head button{min-width:44px;font-size:22px}#dialogBody{display:grid;gap:12px}#stage{position:fixed;inset:0;z-index:30;background:#090909;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:8px;overflow:auto}.slateboard{flex:1;min-height:370px;border:2px solid #eee;border-radius:5px;display:flex;flex-direction:column;color:#f1eee7;background:#0b0b0b;overflow:hidden;user-select:none}.slateboard.white{background:#f1eee7;color:#161616;border-color:#161616}.slateboard.tail{transform:rotate(180deg)}.stripes{height:clamp(42px,9vh,85px);background:repeating-linear-gradient(125deg,#f1eee7 0 8%,#111 8% 16%);touch-action:none;flex-shrink:0;border-bottom:2px solid currentColor;cursor:ew-resize}.boardrow{display:flex;border-bottom:2px solid currentColor;flex:1;min-height:0}.boardcell{flex:1;background:none;border:0;border-radius:0;color:inherit;text-align:left;display:flex;flex-direction:column;justify-content:center;min-width:0;overflow:hidden;padding:8px 14px;min-height:0}.boardcell+.boardcell{border-left:2px solid currentColor}.boardcell span{font-size:clamp(10px,1.6vw,17px);letter-spacing:1.5px;font-weight:700;opacity:.72}.boardcell strong{font-size:clamp(16px,3vw,40px);line-height:1.08;overflow-wrap:anywhere}.boardrow.nums{flex:1.6}.nums .boardcell strong{font-size:clamp(34px,min(10vw,12vh),105px)}.boardrow.prod{flex:1.2}.prod .boardcell strong{font-size:clamp(21px,min(5vw,6vh),55px)}.cover{flex:0 0 25%;border-left:2px solid currentColor;object-fit:contain;min-width:0;max-height:100%;width:25%;background:#191919;border-radius:0}.boardrow.flags .boardcell strong{font-size:clamp(15px,2.8vw,29px)}.timecode{font-family:ui-monospace,monospace;color:#ed694f;font-size:clamp(27px,min(8vw,9vh),80px);font-weight:800;text-align:center;padding:5px;font-variant-numeric:tabular-nums}.slatefoot{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.slatefoot button{font-size:13px}.slatefoot .spacer{flex:1}.result{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(760px,95%);padding:14px;background:#171716;border:1px solid #61564e;box-shadow:0 10px 50px #000b;border-radius:12px;z-index:40;display:grid;gap:10px}.quality{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.quality button.good{color:var(--green)}.quality button.ng{color:var(--red)}.quality button.hold{color:var(--warn)}.quality button.chosen{border:2px solid currentColor;background:#34342f}#flash{position:fixed;inset:0;background:white;pointer-events:none;z-index:90}.printhead{display:none}@media(max-width:850px){#shell{grid-template-columns:168px minmax(0,1fr)}aside{padding:15px 10px}main{padding:19px 15px}.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){#shell{display:block}aside{height:auto;position:static;padding:10px;border-right:none;gap:7px}.brand{display:flex;align-items:center;gap:10px}.brand img{width:70px;margin:0}.brand h2{font-size:19px}.brand .micro,.brand small{display:none}#nav{display:flex;overflow:auto;gap:4px}#nav button{display:block;min-width:66px;text-align:center;font-size:11px;padding:5px}.sidefoot{display:flex;gap:4px}.sidefoot button{font-size:12px;min-height:33px}.sidefoot small{display:none}main{padding:14px 10px}header{align-items:flex-start}.grid2,.fields,.schedule-grid{grid-template-columns:1fr}.metric strong{font-size:27px}.slateboard{min-height:340px}.boardcell{padding:5px 8px}.boardrow.flags{flex-wrap:wrap}.boardrow.flags .boardcell{flex:1 0 23%}}@media print{body{background:white;color:#111;color-scheme:light}aside,header,.toolbar,button,#toast,#stage,dialog{display:none!important}#shell{display:block}main{padding:0}.panel,.tablewrap{background:white;border-color:#ccc}.printhead{display:block}table{white-space:normal;font-size:10px}td,th{color:#111;background:white;border-color:#ccc}.metric{background:white}.muted{color:#444}.grid2{display:block}}
.boardcell:disabled{opacity:1;cursor:default}.slate-brand{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 12px;border-bottom:2px solid currentColor;font-size:12px;font-weight:700;letter-spacing:1px}.slate-brand img{width:86px;max-height:26px;object-fit:contain}.slateboard.white .slate-brand img{background:#111;padding:3px}.slateboard .boardcell:not(:disabled):active{background:#d94a2c33}.cover[data-edit]{cursor:pointer}@media(max-height:520px){.slate-brand{display:none}}@media(max-width:620px){.result{position:fixed;bottom:max(8px,env(safe-area-inset-bottom));max-height:80dvh;overflow:auto}}

.brand-home{padding:0;border:0;background:none;display:block;min-height:36px}.brand-home img{margin-bottom:8px}.project-card{display:grid;gap:8px;align-content:start}.project-card h2{overflow-wrap:anywhere}.project-art{max-height:180px;border-radius:6px}.project-actions{margin-top:8px}.delete-confirm{border-color:var(--red);background:#42251f}.project-card .progress{margin:5px 0}#homeLink{white-space:nowrap}@media(max-width:620px){#nav button{min-width:64px}.brand-home img{margin:0}#homeLink{font-size:12px}}
/* v0.1.3 · location directory and readable daily schedule */
.loc-table td{white-space:normal;min-width:110px;vertical-align:top}.loc-table td:last-child{white-space:nowrap}.loc-existing{padding:10px 0;border-bottom:1px solid var(--line)}.location-select{min-width:155px}.schedule-toolbar{margin-bottom:10px}.schedule-days{display:flex;gap:7px;overflow:auto;padding:3px 0 12px}.schedule-days button{white-space:nowrap}.schedule-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:#151514;border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:14px}.schedule-summary h2{font-size:25px;margin:5px 0}.unit-filters{display:flex;gap:5px}.schedule-list{border:1px solid var(--line);border-radius:10px;overflow:hidden}.schedule-head,.schedule-row{display:grid;grid-template-columns:minmax(105px,.85fr) 70px minmax(120px,1.15fr) minmax(155px,1.8fr) minmax(70px,.55fr) 60px;gap:10px;align-items:start;padding:14px 12px}.schedule-head{background:#20201e;color:var(--muted);font-size:10px;font-weight:750;letter-spacing:.8px}.schedule-row{border-top:1px solid var(--line);background:#151514;border-left:3px solid var(--orange)}.schedule-row:has(.unit-b){border-left-color:#75a6b0}.schedule-row.complete{border-left-color:var(--green)}.sc-time strong{font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}.sc-time small,.sc-activity span,.sc-activity small{display:block;margin-top:5px}.sc-activity strong{font-size:15px;overflow-wrap:anywhere}.sc-activity span{color:var(--muted);font-size:13px;overflow-wrap:anywhere}.unit-tag{font-size:11px;font-weight:800;letter-spacing:.4px;border:1px solid #74412e;padding:6px 7px;border-radius:5px;display:inline-block;background:#33231c;color:#ef997a;white-space:nowrap}.unit-b{border-color:#38565c;background:#203438;color:#9ac6ce}.sc-shots{display:grid;gap:4px}.sc-shot{display:flex;align-items:center;gap:6px;font-size:13px;line-height:1.35}.sc-shot-text{flex:1;min-width:0;overflow-wrap:anywhere}.sc-shot-text b{color:var(--text);margin-right:3px}.sc-dot{color:var(--muted);font-size:15px}.shot-done .sc-dot,.shot-done .sc-shot-text b{color:var(--green)}.sc-slate{font-size:11px;padding:5px 8px;min-height:34px}.sc-progress strong{font-size:19px;font-variant-numeric:tabular-nums}.sc-progress .progress{margin:6px 0;height:4px}.sc-actions button{padding:7px 10px;font-size:12px}.bd-shots{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:7px}.bd-shot{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;padding:10px;border-bottom:1px solid var(--line);font-size:13px;letter-spacing:0;color:var(--text);cursor:pointer}.bd-shot input{width:20px;min-height:20px;height:20px;accent-color:var(--orange)}.bd-shot small{display:block;font-weight:400}.bd-shot>span:last-child{font-size:11px;color:var(--muted)}
@media(max-width:1150px){.schedule-head,.schedule-row{grid-template-columns:105px 60px minmax(100px,1fr) minmax(125px,1.4fr) 64px 52px;gap:7px;padding:12px 8px}.sc-time strong{font-size:13px}.sc-actions button{padding:6px}.sc-slate{padding:5px}}
@media(max-width:850px){.schedule-head{display:none}.schedule-list{border:0;display:grid;gap:8px}.schedule-row{grid-template-columns:1fr 1fr auto;grid-template-areas:'time unit edit' 'activity activity progress' 'shots shots shots';gap:9px;border:1px solid var(--line);border-left:3px solid var(--orange);border-radius:9px;padding:12px}.sc-time{grid-area:time}.sc-unit{grid-area:unit}.sc-activity{grid-area:activity}.sc-shots{grid-area:shots;border-top:1px solid var(--line);padding-top:8px}.sc-progress{grid-area:progress;min-width:80px}.sc-actions{grid-area:edit}.sc-time strong{font-size:15px}.sc-slate{min-height:44px;padding:8px 12px}.sc-actions button{min-width:50px}.schedule-summary{padding:12px}}
@media print{.schedule-head,.schedule-row{grid-template-columns:100px 55px 1fr 1.6fr 65px;gap:7px}.schedule-head span:last-child,.sc-actions,.sc-slate,.schedule-days,.unit-filters{display:none!important}.schedule-row{break-inside:avoid}.schedule-list{overflow:visible}}
/* Location / site plan tools */
.loc-link{background:transparent;color:var(--orange);padding:2px 0;border:0;font-weight:650;text-align:left;min-height:28px}.loc-link:hover{text-decoration:underline}.loc-table td small{display:block;margin-top:4px}.map-suggestions{display:grid;gap:4px}.map-suggestions:empty{display:none}.map-suggestions button{text-align:left;white-space:normal;min-height:42px}.maplink{display:inline-flex;align-items:center;min-height:44px;padding:9px 13px;border:1px solid var(--line);border-radius:7px;color:var(--text);text-decoration:none;font-weight:600}.maplink:hover{border-color:var(--orange)}.street-preview{width:100%;height:auto;max-height:300px;object-fit:contain;border-radius:8px;background:#222}.site-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.site-info>div,.site-item{padding:10px;border:1px solid var(--line);border-radius:7px}.site-info small{display:block;color:var(--muted)}.site-photos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.site-photos button{width:100%}.site-photos img{width:100%;height:85px;object-fit:cover}dialog.site-dialog{width:min(1140px,96vw);max-height:94dvh;padding:14px}.site-tools{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.site-tools button{min-height:44px}.site-tools button.active{background:var(--orange);color:#fff;border-color:var(--orange)}.site-tools select,.site-tools input:not([type=checkbox]){width:auto;max-width:100%;min-width:120px}.site-inline{display:flex;align-items:center;gap:8px;font-size:12px}.site-inline input{width:20px;height:20px;accent-color:var(--orange)}.site-palette{display:flex;gap:5px}.site-palette button{min-width:34px;width:34px;height:34px;min-height:34px;padding:0;border:2px solid #555;border-radius:50%}.site-palette button.active{border-color:white;box-shadow:0 0 0 2px var(--orange)}#siteCanvas{width:100%;height:auto;max-height:65dvh;display:block;background:#171918;border:1px solid #666;border-radius:6px;touch-action:none;user-select:none;-webkit-user-select:none;cursor:crosshair}#siteCustom[hidden]{display:none}#siteCanvas text{pointer-events:none}@media(max-width:600px){.site-info{grid-template-columns:1fr}.site-photos{grid-template-columns:repeat(2,minmax(0,1fr))}.site-tools{gap:5px}.site-tools button{font-size:12px;padding:7px}.site-dialog{max-height:90dvh!important}}

#siteCanvas{max-height:52dvh} .site-dialog #dialogBody>div:last-child{position:sticky;bottom:-14px;background:#191918;padding:10px 0;z-index:2}
/* V0.1.5 time-first schedule and script */
.timeline{border:1px solid var(--line);border-radius:12px;background:#141413;overflow:hidden;margin:12px 0}.tl-header,.tl-body{display:grid;position:relative}.tl-header{align-items:center;background:#1d1d1b;padding:14px 0;border-bottom:1px solid #3d3d39}.tl-header span{font-size:10px;color:var(--muted);padding-left:7px}.tl-header strong{text-align:center;font-size:18px;letter-spacing:.05em}.tl-hours{position:relative;grid-column:1;grid-row:1;z-index:2}.tl-hours span{position:absolute;left:6px;transform:translateY(-50%);color:#aaa9a2;font-size:12px;font-variant-numeric:tabular-nums;background:#141413;padding:0 3px}.tl-body{padding-top:7px}.tl-grid{position:absolute;left:56px;right:0;top:7px;bottom:0;pointer-events:none}.tl-grid i{position:absolute;left:0;right:0;border-top:1px solid #363633}.timeline-unit{position:relative;grid-row:1;border-left:1px solid #272725;min-width:0}.tl-block{position:absolute;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:5px;overflow:hidden;border:0;border-radius:7px;padding:10px 12px;text-align:left;min-height:0;color:#fff;box-shadow:inset 0 0 0 1px #ffffff15}.tl-block.unit-a{background:#85412d}.tl-block.unit-b{background:#34575d}.tl-block.activity{background:#42433f}.tl-block.finished{background:#2c5943}.tl-block.compact{padding:3px 7px;gap:1px}.tl-name{font-size:clamp(13px,1.6vw,19px);font-weight:750;line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-sub,.tl-foot{font-size:13px;line-height:1.15;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f1eee7dd}.tl-foot{margin-top:auto;font-size:11px}.tl-now{position:absolute;left:53px;right:0;margin-top:7px;border-top:2px dashed #ff9272;pointer-events:none;z-index:4}.tl-now span{position:absolute;left:-48px;top:-10px;background:#d94a2c;border-radius:3px;padding:2px;font-size:10px;color:white}.block-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.block-detail-field{display:grid;grid-template-columns:1fr auto;text-align:left;gap:5px;min-height:60px;overflow-wrap:anywhere}.block-detail-field small{grid-column:1/-1}.block-detail-field:disabled{opacity:1}.block-detail-field:first-child,.block-detail-field:last-child{grid-column:1/-1}.block-shot{padding:10px 0;border-bottom:1px solid var(--line)}.script-list{display:grid;gap:12px}.script-card{display:grid;gap:10px}.script-title{font-size:20px;font-weight:700;text-align:left;border:0;padding:2px 0;background:none}.script-preview{white-space:pre-wrap;line-height:1.55;max-height:165px;overflow:hidden;color:var(--text);overflow-wrap:anywhere}.script-body{font-family:ui-monospace,monospace;line-height:1.55}.script-chips{display:flex;gap:5px;flex-wrap:wrap}.script-chips button{min-width:42px;padding:5px 8px}.mud-controls{display:flex;align-items:end;gap:6px;flex-wrap:wrap;margin:8px 0}.mud-controls label{width:100px}.mud-controls button{min-width:42px}.site-dialog #mudStatus{margin:5px 0}.site-dialog #siteCanvas{max-height:54dvh}
@media(max-width:620px){.tl-header strong{font-size:14px}.tl-block{padding:6px}.tl-name{font-size:13px}.tl-sub{font-size:11px}.tl-foot{font-size:10px}.tl-hours span{font-size:11px}.block-detail-field{padding:8px}.script-title{font-size:17px}}
@media print{.timeline{overflow:visible;break-inside:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}.script-preview{max-height:none;overflow:visible}.script-card button:not(.script-title){display:none}.tl-now{display:none}}
/* v0.1.6 · inline maps and call sheet */
.site-inline-preview{margin:12px 0 18px;min-width:0}.site-preview-svg{display:block;width:100%;height:auto;max-height:440px;background:#171918;border:1px solid #444;border-radius:6px;margin-top:8px}.site-view-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:9px 0}.site-view-controls strong,.site-view-controls small{font-size:11px}.site-view-controls button{min-width:42px;min-height:40px}.site-view-controls .active{background:var(--orange);color:#fff}.site-dialog #siteCanvas{max-height:59dvh}.cs-toolbar{align-items:end}.cs-toolbar label{min-width:145px}.cs-editor h3{margin:15px 0 8px}.cs-checks{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.cs-checks label{display:flex;align-items:center;gap:7px;color:inherit}.cs-checks input{width:auto}.cs-people input{min-width:100px}.cs-people td:nth-child(3) input,.cs-people td:nth-child(8) input{min-width:155px}.cs-paper{color-scheme:light;background:#fff;color:#181818;margin:18px auto;padding:26px;max-width:1000px;border-radius:6px;font-family:Arial,system-ui,sans-serif;font-size:13px;line-height:1.4;overflow-wrap:anywhere}.cs-paper *{box-sizing:border-box}.cs-paper h1{font-size:30px;line-height:1.05;margin:8px 0;color:#161616}.cs-paper h3{font-size:12px;color:#fff;background:#222;padding:8px 10px;margin:0 0 8px;letter-spacing:1px}.cs-brand{display:flex;align-items:center;gap:12px;border-bottom:3px solid #d94a2c;padding-bottom:12px;font-size:10px;letter-spacing:1px}.cs-brand img{width:90px;object-fit:contain}.cs-brand b{margin-left:auto}.cs-title{display:flex;align-items:center;gap:12px;padding:17px 0}.cs-title>div:first-child{flex:1;min-width:0}.cs-title>img{width:90px;max-height:90px;object-fit:contain}.cs-kicker{text-transform:uppercase;color:#555;font-size:11px}.cs-call{background:#f4eee9;border-left:4px solid #d94a2c;padding:10px 14px;text-align:center;min-width:130px}.cs-call strong{display:block;font-size:32px;color:#b73920;line-height:1.2}.cs-paper small{color:#555;font-size:10px;display:block}.cs-pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.cs-pairs>div{padding:8px 0;border-bottom:1px solid #ddd;break-inside:avoid}.cs-pairs strong{font-size:13px;white-space:pre-wrap;font-weight:500;display:block;color:#222}.cs-section{margin-top:18px}.cs-warning{padding:8px 10px;border:1px solid #d94a2c;background:#fff2e8;color:#87351e;font-size:12px}.cs-location{border-bottom:1px solid #ddd;padding:7px 0;break-inside:avoid}.cs-paper a{color:#9e391f;text-decoration:underline}.cs-table{width:100%;border-collapse:collapse;white-space:normal;table-layout:auto;font-size:11px}.cs-table th,.cs-table td{color:#222;background:#fff;border:1px solid #d4d4d4;padding:7px 5px;vertical-align:top;white-space:normal;min-width:0}.cs-table th{background:#eee;font-size:10px;text-align:left}.cs-table tr{break-inside:avoid}.cs-script{white-space:pre-wrap;padding:8px 0;border-bottom:1px solid #ddd}.cs-assets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cs-paper figure{margin:0 0 10px;break-inside:avoid}.cs-paper figure img{width:100%;max-height:220px;object-fit:contain;background:#f5f5f5}.cs-paper figcaption{font-size:11px;color:#333;margin:4px 0}.cs-map .site-preview-svg{max-height:330px}.cs-paper footer{border-top:2px solid #d94a2c;margin-top:20px;padding-top:8px;color:#555;font-size:10px}.cs-paper .cs-section h3{break-after:avoid}.cs-paper .cs-table thead{display:table-header-group}.cs-paper .cs-table tbody{display:table-row-group}
@media(max-width:600px){.cs-paper{padding:12px;font-size:12px}.cs-paper h1{font-size:21px}.cs-title{flex-wrap:wrap}.cs-call strong{font-size:26px}.cs-call{min-width:90px;padding:8px}.cs-table{font-size:9px}.cs-table td,.cs-table th{padding:4px 3px}.cs-brand img{width:65px}.cs-title>img{width:65px}}
@media print{@page{size:A4;margin:12mm}body:has(#csPreview) #shell,body:has(#csPreview) main,body:has(#csPreview) #content{display:block!important;overflow:visible!important;height:auto!important;width:auto!important;max-width:none!important;padding:0!important;margin:0!important}body:has(#csPreview) #content>*:not(#csPreview){display:none!important}#csPreview{display:block!important}.cs-paper{padding:0;margin:0;width:100%;max-width:none;border-radius:0;font-size:10px;print-color-adjust:exact;-webkit-print-color-adjust:exact}.cs-paper h3{color:white!important;background:#222!important}.cs-paper h1{font-size:25px}.cs-paper .cs-call strong{font-size:27px}.cs-table{font-size:10px}.cs-paper .cs-section{break-inside:auto}.cs-paper .cs-assets{display:grid}.cs-paper .cs-map{break-inside:avoid}.cs-paper .cs-map svg{max-height:280px}.cs-paper .cs-brand img{display:block}}
@media print{html:has(#csPreview),body:has(#csPreview){background:#fff!important;color:#111!important;color-scheme:light!important}body:has(#csPreview) #shell,body:has(#csPreview) main,body:has(#csPreview) #content{background:#fff!important}}
/* 0.1.7 · touch-first responsive refinement */
@media screen{
 html,body{max-width:100%;overflow-x:clip}
 main,#content,header>div,.panel,.grid2>*,.grid3>*,.fields>*,.row>*,.toolbar>*,.block-detail-grid>*,.cs-section,.cs-title>*{min-width:0}
 h1,h2,h3,.micro,.note,.status,.block-detail-field,.project-card,.site-info>div{overflow-wrap:anywhere}
 header>div:first-child{flex:1 1 180px} .header-right{flex:0 1 auto;justify-content:flex-end}
 .tablewrap{max-width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .row button,.toolbar button,.site-tools button{white-space:normal;overflow-wrap:anywhere}
 .toolbar input,.toolbar select,.toolbar label{max-width:100%}
 input[type=date],input[type=time]{min-width:0;max-width:100%;display:block}
 .dialog-head{gap:12px}.dialog-head h2{min-width:0;overflow-wrap:anywhere}.dialog-head button{flex:none}
 dialog{max-width:calc(100% - 20px);overscroll-behavior:contain}#dialogBody{grid-template-columns:minmax(0,1fr)}
 .site-dialog #siteCanvas{max-height:none;width:100%;height:auto;touch-action:none;overscroll-behavior:none}
 .site-dialog .site-tools{gap:6px}.site-dialog #dialogBody>div:last-child{position:static;padding:0;background:none}
 .main-map-tools button{min-width:58px;min-height:44px}.main-map-tools #siteUndo,.main-map-tools #siteRedo{border-color:#72665a}
 .map-entry{width:100%;display:grid;gap:6px;padding:6px;text-align:left;min-width:0}.map-entry .site-preview-svg{margin:0}.map-entry span{padding:5px 7px;font-size:13px;color:var(--text)}
 .pin-entry{border:1px solid var(--orange);padding:12px;border-radius:8px;display:grid;gap:10px}.pin-entry .row button{flex:1}
 .site-inline-preview .row strong{flex:1 1 120px;overflow-wrap:anywhere}
 .cs-paper{min-width:0;overflow-wrap:anywhere}.cs-table{table-layout:fixed;overflow-wrap:anywhere}.cs-table th,.cs-table td{overflow-wrap:anywhere;word-break:normal}
 .cs-brand{flex-wrap:wrap}.cs-brand b{margin-left:auto}.cs-toolbar label{flex:1 1 140px;min-width:0}
 .result{max-height:calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}.result>*{min-width:0}.quality{grid-template-columns:repeat(3,minmax(0,1fr))}
 .slatefoot{flex:none}.boardcell{flex:1 1 0}.boardrow{min-height:55px}.boardrow.flags{flex-wrap:nowrap}.boardrow.flags .boardcell{flex:1 1 0}.boardcell strong{overflow-wrap:anywhere;word-break:normal}.slateboard{flex-shrink:0;min-height:370px}
}
@media screen and (max-width:1000px){main{padding:16px}.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar{gap:7px}.header-right .status{max-width:180px;text-align:right}.site-dialog{width:calc(100% - 20px)!important}}
@media screen and (max-width:760px){#shell{display:block}aside{height:auto;position:static;padding:10px;border-right:none;gap:8px}.brand{display:flex;align-items:center;gap:10px}.brand img{width:70px;margin:0}.brand h2{font-size:20px}.brand .micro,.brand small{display:none}#nav{display:flex;overflow-x:auto;gap:4px;padding-bottom:3px}#nav button{flex:0 0 auto;min-width:70px;display:flex;flex-direction:column;gap:3px;font-size:11px;min-height:48px;padding:6px 8px}#nav b{font-size:17px}.sidefoot{display:flex;flex-wrap:wrap;gap:4px}.sidefoot button{font-size:12px;min-height:44px}.sidefoot small{display:none}main{padding:12px 10px}header{flex-wrap:wrap;align-items:flex-start;gap:8px;padding-bottom:12px;margin-bottom:12px}.header-right{justify-content:flex-start;flex:1 1 100%}.header-right .status{max-width:none;flex:1;text-align:left}.grid2,.fields,.schedule-grid{grid-template-columns:minmax(0,1fr)}.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}.panel{padding:12px}.toolbar button{font-size:13px}.site-dialog{padding:10px!important}.site-dialog #dialogBody{gap:8px}.site-dialog #siteCanvas{min-height:0}.site-tools select,.site-tools input:not([type=checkbox]){min-width:0}.site-tools button{padding:7px 9px}.site-view-controls{gap:5px}.site-view-controls small{flex-basis:100%}.cs-paper{padding:12px}.boardrow.flags .boardcell{padding:5px 4px}.boardcell span{font-size:9px;letter-spacing:.5px}.boardrow.flags .boardcell strong{font-size:clamp(11px,3.5vw,18px)}.nums .boardcell strong{font-size:clamp(24px,8vw,55px)}.boardrow.prod .boardcell strong{font-size:clamp(18px,5vw,30px)}}
@media screen and (max-width:430px){.grid3{grid-template-columns:minmax(0,1fr)}.metric{padding:10px}.metric strong{font-size:26px}.block-detail-grid{grid-template-columns:minmax(0,1fr)}.bd-shot{grid-template-columns:22px minmax(0,1fr);gap:6px}.bd-shot>span:last-child{grid-column:2}.schedule-summary{padding:10px}.tl-header strong{font-size:12px}.tl-block{padding:4px 5px}.tl-name{font-size:12px}.tl-sub{font-size:10px}.tl-foot{font-size:9px}.cs-paper .cs-pairs{grid-template-columns:minmax(0,1fr)}.cs-paper .cs-assets{grid-template-columns:minmax(0,1fr)}.cs-table{font-size:9px}.cs-paper h1{font-size:22px}.site-palette{flex-wrap:wrap}.site-inline{font-size:11px}.quality button{padding:7px 4px;font-size:13px}}
@media screen and (max-height:500px) and (orientation:landscape){#stage{gap:4px}.slateboard{min-height:300px}.stripes{height:35px}.boardrow{min-height:42px}.boardcell{padding:3px 6px}.nums .boardcell strong{font-size:clamp(25px,9vh,55px)}.prod .boardcell strong{font-size:clamp(18px,5vh,30px)}.timecode{font-size:clamp(22px,7vh,42px)}.slatefoot button{min-height:36px;padding:5px 8px}.result{max-height:88dvh}}
@media screen{.map-advanced{border:1px solid var(--line);border-radius:8px;padding:9px;min-width:0}.map-advanced summary{font-size:13px;cursor:pointer;min-height:28px;color:var(--muted)}.map-advanced[open]>*:not(summary){margin-top:9px}.main-map-tools{position:sticky;top:0;z-index:4;background:#191918;padding:5px 0;box-shadow:0 3px 7px #0004}.main-map-tools button{font-size:13px;padding:8px 10px}.site-dialog #mudStatus{font-size:11px;margin:0}.site-dialog .site-view-controls small{flex-basis:100%}}
@media screen{.main-map-tools{position:static;box-shadow:none}.site-dialog #siteCanvas{max-height:54dvh;aspect-ratio:10/7}.site-dialog #dialogBody{align-content:start}}
@media screen and (max-width:760px){.site-dialog #siteCanvas{max-height:48dvh}}

/* v0.1.8: intentional component alignment, not just overflow prevention. */
#locPreview,.location-map-section,.location-map-previews{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;align-items:start}
.location-map-section{padding:10px;border:1px solid var(--line);border-radius:10px;background:#151514}
.location-section-heading{display:flex;align-items:center;gap:8px;min-width:0;min-height:24px}
.location-section-heading h3{font-size:15px;line-height:1.35;overflow-wrap:anywhere}
.location-map-section .map-entry{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:6px;width:100%;margin:0;align-items:start}
.location-map-section .map-entry img{display:block;width:100%;max-height:none;aspect-ratio:800/420;object-fit:contain}
.location-map-section .map-entry span{display:block;padding:6px 8px;text-align:center;line-height:1.35}
.map-credit{display:block;min-width:0;font-size:11px;line-height:1.4;margin:0;overflow-wrap:break-word}
.location-map-section .map-add-button{display:block;width:100%;min-height:44px;margin:0;text-align:center;color:var(--text);border-color:#755145;background:#2a201c;font-size:14px;line-height:1.35}
.maplinks,.location-photo-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch;width:100%;min-width:0;margin:0}
.maplinks .maplink,.location-photo-actions button{display:flex;justify-content:center;align-items:center;text-align:center;min-height:44px;width:100%;min-width:0;padding:9px 8px;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.site-preview-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
.site-preview-head strong{min-width:0;overflow-wrap:anywhere;line-height:1.35}
.site-preview-head button{min-height:44px;font-size:13px;white-space:nowrap}
.location-map-section .site-inline-preview{margin:0 0 4px}
.location-dialog{scroll-padding-top:80px;scroll-padding-bottom:12px}
.location-dialog>form{position:sticky;top:-18px;z-index:5;background:#191918;margin:-18px -18px 0;padding:12px 18px 9px;border-bottom:1px solid var(--line)}
.location-dialog .dialog-head{margin:0;min-height:44px}
.location-dialog #dialogBody{padding-top:12px}
@media(max-width:620px){.location-map-section{padding:8px;gap:8px}.maplinks .maplink,.location-photo-actions button{font-size:13px}.location-dialog>form{top:-18px}.location-dialog .fields{gap:10px}}
@media(max-width:360px){.maplinks,.location-photo-actions{grid-template-columns:minmax(0,1fr)}}

/* V0.1.9 - consistent location controls and compact mobile directory */
@media screen {
.location-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:stretch;min-width:0}
.location-actions button{flex:1 1 auto;min-height:44px;white-space:normal;line-height:1.3;text-align:center;margin:0}
.loc-table td:last-child{white-space:normal;min-width:165px}.loc-table .location-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.loc-table .location-actions button{padding:8px 7px;font-size:12px;min-width:0}
#dialogBody>.location-actions{margin-top:4px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.dialog-head{gap:12px;align-items:center}.dialog-head h2{min-width:0;overflow-wrap:anywhere}.dialog-head button{flex:0 0 44px;width:44px;height:44px;padding:0;display:grid;place-items:center}
.toolbar{align-items:stretch}.toolbar button{line-height:1.3;white-space:normal;text-align:center}.row.between>div:first-child{min-width:0}.panel h2,.panel h3{overflow-wrap:anywhere}
}
@media screen and (max-width:900px){.loc-table{overflow:visible;border:0}.loc-table table,.loc-table tbody{display:block;white-space:normal}.loc-table thead{display:none}.loc-table tbody{display:grid;gap:10px}.loc-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;background:#191918;border:1px solid var(--line);border-radius:9px;padding:12px}.loc-table td,.loc-table td:last-child{display:block;min-width:0;border:0;padding:0;overflow-wrap:anywhere}.loc-table td:first-child,.loc-table td:nth-child(2),.loc-table td:last-child{grid-column:1/-1}.loc-table td[data-caption]::before{content:attr(data-caption);display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.7px;margin-bottom:4px}.loc-table td:first-child .loc-link{padding-left:0;text-align:left}.loc-table .location-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.loc-table .location-actions button{font-size:12px;padding:6px 3px}.loc-existing{gap:10px;flex-wrap:wrap}.loc-existing>span,.loc-existing>strong{overflow-wrap:anywhere}}
@media screen and (max-width:430px){.loc-table .location-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.loc-table td:first-child .loc-link{font-size:16px}.toolbar{gap:8px}.toolbar button{flex:1 1 135px}.header-right button{flex-shrink:0}}

@media screen and (max-width:620px){#shotSearch{flex:1 1 200px;width:100%;max-width:none!important;min-width:140px}.toolbar:has(#shotSearch)>small{align-self:center;flex:0 0 auto}.toolbar:has(#shotSearch)>button{flex:1 1 40%}}

/* V0.1.10: keep map actions aligned without squeezing long titles. */
.site-preview-head{grid-template-columns:minmax(0,1fr) auto}
.site-preview-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center;min-width:0}
.draft-map-card .map-entry{padding:0;border:0;background:none}
@media(max-width:600px){.site-preview-head{grid-template-columns:minmax(0,1fr)}.site-preview-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);justify-content:stretch}.site-preview-actions button{white-space:normal;width:100%}}

/* V0.1.11 — component baseline and form alignment */
@media screen {
.location-type-section{display:grid;gap:10px;min-width:0;padding:12px;border:1px solid var(--line);border-radius:9px;background:#151514}
.location-type-section label{min-width:0}.location-type-section small{letter-spacing:0;font-weight:400}
.location-search-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,auto);grid-template-rows:auto 44px;gap:6px 8px;align-items:stretch;min-width:0}
.location-search-row>label{grid-column:1/-1;line-height:1.4;display:block}
.location-search-row>select,.location-search-row>button{height:44px;min-height:44px;margin:0;align-self:stretch;box-sizing:border-box}
.location-search-row>button{padding:0 18px;display:flex;align-items:center;justify-content:center;line-height:1.25}
.toolbar:has(>label),.mud-controls{align-items:flex-end}.toolbar>label{min-width:0;flex-shrink:1}.toolbar>label>select,.toolbar>label>input:not([type=checkbox]),.mud-controls select{min-height:44px;height:44px;margin:0}.toolbar:has(>label)>button,.mud-controls>button{min-height:44px;margin:0}
#dialogBody>label,#dialogBody .fields>label{min-width:0;align-content:start}.fields>label{align-content:start}.fields input:not([type=checkbox]),.fields select{min-height:44px}.site-tools button,.site-view-controls button{min-height:44px;line-height:1.3}.site-tools>*{min-width:0}.site-tools select{max-width:100%}.site-view-controls>span{min-width:45px;text-align:center}.site-inline input[type=checkbox]{width:20px;min-height:20px;flex:none}.site-palette button{min-height:32px}.site-preview-actions button{min-height:44px}.dialog-head h2{line-height:1.3}.header-right{align-items:center}.header-right>button{min-height:44px}.loc-table .location-actions{align-items:stretch}.location-actions>button{height:auto}.map-suggestions button{white-space:normal;text-align:left;line-height:1.4}.map-suggestions{min-width:0}
}
@media screen and (max-width:430px){.location-search-row{grid-template-columns:minmax(0,1fr) 90px}.location-search-row>button{padding:0 10px}.main-map-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.main-map-tools>button{width:100%;padding:6px 4px;white-space:normal;line-height:1.3}.location-type-section{padding:9px}}


/* V0.1.12 · shared layout system. Screen rules are isolated from A4 print styles. */
@media screen {
:root{--control-h:44px;--layout-gap:12px;--label-gap:6px}
/* Shared field baseline: one label row + one control row, even if adjacent labels wrap. */
.fields{gap:var(--layout-gap);align-items:stretch;min-width:0;grid-auto-flow:row}
.fields>label{display:grid;grid-template-rows: minmax(16px,auto) auto;align-content:stretch;align-items:end;gap:var(--label-gap);line-height:1.35;min-width:0;overflow-wrap:anywhere}
@supports(grid-template-rows:subgrid){.fields>label{grid-row:span 2;grid-template-rows:subgrid;row-gap:var(--label-gap)}.fields{row-gap:var(--layout-gap)}}
.fields>label>input:not([type=checkbox]):not([type=radio]),.fields>label>select,.fields>label>textarea{align-self:start;margin:0;width:100%}
label{line-height:1.4;min-width:0;overflow-wrap:anywhere}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select{box-sizing:border-box;height:var(--control-h);min-height:var(--control-h);line-height:1.3;vertical-align:middle;margin:0}
textarea{min-height:var(--control-h);line-height:1.45;margin:0;max-width:100%}
input[type=date],input[type=time]{display:block;appearance:none;-webkit-appearance:none;padding:8px 10px;text-align:left;width:100%;min-width:0}
input[type=date]::-webkit-date-and-time-value,input[type=time]::-webkit-date-and-time-value{min-height:1.3em;text-align:left;display:flex;align-items:center}
input::-webkit-datetime-edit{padding:0;line-height:1.3}
input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:20px;min-width:20px;flex:none;accent-color:var(--orange);margin:0;vertical-align:middle}
button{line-height:1.3;overflow-wrap:anywhere}
/* Controls use the same baseline; textual rows remain centered. */
.toolbar,.header-right,.project-actions,.location-actions,.site-preview-actions,.site-view-controls,.unit-filters{gap:8px;align-items:center}
.toolbar>button,.toolbar>input,.toolbar>select,.toolbar>label>input,.toolbar>label>select{height:var(--control-h);min-height:var(--control-h);margin:0}
.toolbar:has(>label){align-items:flex-end}.toolbar>button{display:inline-flex;align-items:center;justify-content:center;text-align:center}
.toolbar>label{display:grid;gap:6px;align-self:end;min-width:0;line-height:1.3}
.cs-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:8px}
.cs-toolbar>label{min-width:0;align-self:stretch;grid-template-rows:1fr var(--control-h)}
.cs-toolbar>button{width:100%;height:var(--control-h);min-height:var(--control-h)}
@media(min-width:1100px){.cs-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto}}
/* Tables have stable row/cell baselines; scrolling remains local to the table. */
.tablewrap{width:100%;max-width:100%;overflow:auto}
.tablewrap table:not(.cs-table){border-spacing:0;border-collapse:collapse}
.tablewrap th,.tablewrap td{vertical-align:middle;text-align:left}
.tablewrap th{line-height:1.35}.tablewrap td{line-height:1.4}
.tablewrap td>input:not([type=checkbox]),.tablewrap td>select,.tablewrap td>button{min-height:var(--control-h);height:var(--control-h);margin:0;vertical-align:middle}
.tablewrap td>input[type=time]{min-width:112px}.tablewrap td>input[type=date]{min-width:142px}
.tablewrap td>button{padding:7px 9px}.tablewrap td>input[type=checkbox]{margin:auto;display:block}
.cs-people td:last-child{width:52px}.cs-people td:last-child button{width:44px;min-width:44px;padding:0}
/* Content cards and detail grids: text can wrap without crowding action controls. */
.grid2,.grid3,.block-detail-grid{align-items:stretch}
.grid2>*,.grid3>*,.block-detail-grid>*,.row>*,.panel>*{min-width:0}
.metric{display:flex;flex-direction:column;justify-content:space-between;gap:6px}.metric small{overflow-wrap:anywhere}
.block-detail-field{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;align-items:center;gap:4px 8px;text-align:left;min-width:0;overflow-wrap:anywhere}
.block-detail-field>small{grid-column:1/-1}.block-detail-field>strong{min-width:0;overflow-wrap:anywhere}.block-detail-field>span{grid-column:2;grid-row:2}
.bd-shot{grid-template-columns:24px minmax(0,1fr) minmax(65px,auto);align-items:center;gap:10px;min-width:0}.bd-shot>span{min-width:0;overflow-wrap:anywhere}.bd-shot>span:last-child{grid-column:auto;text-align:right}
.cs-checks{align-items:center;gap:10px 16px}.cs-checks label{min-height:30px;gap:8px}
.cs-paper .cs-title,.cs-paper .cs-brand{min-width:0;align-items:center}.cs-paper .cs-title>div{min-width:0;overflow-wrap:anywhere}
.cs-paper .cs-table{width:100%;table-layout:fixed}.cs-paper .cs-table td,.cs-paper .cs-table th{vertical-align:top;overflow-wrap:anywhere;word-break:normal}
.cs-paper .cs-pairs>div{min-width:0}.cs-paper .cs-pairs strong{overflow-wrap:anywhere}
/* Dialog header remains readable independently of the scrolling body. */
dialog{padding:18px;max-width:calc(100% - 20px);max-height:min(86dvh,calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));scroll-padding-top:80px;scroll-padding-bottom:14px}
dialog>form{position:sticky;top:-18px;z-index:6;background:#191918;margin:-18px -18px 0;padding:12px 18px;border-bottom:1px solid var(--line)}
dialog .dialog-head{margin:0;min-height:44px;align-items:center}.dialog-head>h2{flex:1;min-width:0}.dialog-head>button{height:44px;min-height:44px;width:44px;flex:0 0 44px}
#dialogBody{padding-top:12px;gap:12px;min-width:0}#dialogBody>.row:last-child{align-items:stretch}#dialogBody>.row:last-child>button{flex:1 1 120px;min-height:44px}
.site-dialog>form{top:-14px;margin:-14px -14px 0;padding:8px 14px}
.site-dialog #dialogBody{padding-top:8px}
/* Calendar-style selection, handles are large touch targets. Native scrolling stays available on empty lane. */
.range-guide{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border:1px solid var(--line);border-radius:9px;background:#171716;margin:12px 0}
.range-guide>div:first-child{flex:1;min-width:0}.range-guide strong,.range-guide small{display:block;line-height:1.4}.range-guide small{margin-top:4px}.range-guide.range-active{border-color:var(--orange)}
.range-actions{display:flex;gap:8px;align-items:center;flex:none}.range-actions button{min-height:44px}
.timeline-unit{touch-action:auto;cursor:crosshair}.tl-block{cursor:pointer}
.range-selection{position:absolute;left:5px;right:5px;border:2px solid #ff967b;background:#d94a2c48;border-radius:6px;z-index:5;pointer-events:none;display:grid;place-items:center;color:#fff}
.range-label{font-size:12px;font-weight:750;text-align:center;line-height:1.1;max-width:100%;overflow:hidden;white-space:nowrap;text-shadow:0 1px 4px #000}
.range-handle{pointer-events:auto;position:absolute;left:50%;width:48px;height:24px;min-height:24px;transform:translateX(-50%);padding:0;border-radius:7px;background:#ff967b;border:1px solid #f1eee7;touch-action:none;cursor:ns-resize;box-shadow:0 1px 5px #0008}
.range-top{top:-12px}.range-bottom{bottom:-12px}.range-handle::after{content:'';display:block;width:18px;height:3px;border-radius:3px;background:#632b1c;margin:auto}
}
@media screen and (max-width:620px){
 .fields{grid-template-columns:minmax(0,1fr)}.fields>label{grid-row:auto;grid-template-rows:auto auto;gap:6px}
 .header-right{justify-content:flex-start;max-width:100%}.header-right .status{overflow-wrap:anywhere}
 .cs-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.cs-toolbar>button{font-size:12px;white-space:normal;padding:6px}
 .bd-shot{grid-template-columns:22px minmax(0,1fr);gap:6px}.bd-shot>span:last-child{grid-column:2;text-align:left}
 .range-guide{flex-wrap:wrap;gap:8px}.range-guide>div:first-child{flex:1 1 100%}.range-actions{width:100%}.range-actions button{flex:1}
 .range-label{font-size:10px}.range-handle{width:42px;height:22px;min-height:22px}.range-top{top:-11px}.range-bottom{bottom:-11px}
 .site-dialog>form{top:-10px;margin:-10px -10px 0;padding:8px 10px}
}
@media print{.range-guide,.range-selection{display:none!important}}

@media screen{.range-guide.range-active{position:sticky;top:max(8px,env(safe-area-inset-top));z-index:8;box-shadow:0 4px 14px #0007}.cs-editor .fields>label:has([data-cs-field="medic"]){grid-column:1/-1}}
