/* Inspection-specific surfaces share the cabinet palette. */
html[data-ui-theme=dark] :is(.body-type-option,.equipment-option,.signature-action-secondary){background:#293438;color:#edf1f2;border-color:#59676d}
html[data-ui-theme=dark] .inspect-main label:has(input[type=checkbox]){color:#edf1f2;background:#242b2e;border-color:#59676d}
html[data-ui-theme=dark] :is(.body-type-option,.equipment-option):has(input:checked){background:#154d40;color:#c6f5e7;border-color:#27c9a0}
html[data-ui-theme=dark] :is(.body-type-option,.equipment-option) input{accent-color:#27c9a0;color-scheme:dark}
html[data-ui-theme=dark] .signature-fullscreen{background:#242b2e}
html[data-ui-theme=dark] .table-action{background:#293438;color:#edf1f2;border-color:#59676d}
html[data-ui-theme=dark] .expert-mobile-header{background:#242b2e;border-color:#465155}
html[data-ui-theme=dark] .expert-mobile-brand{color:#edf1f2}
html[data-ui-theme=dark] .expert-mobile-menu-button{background:#293438;color:#edf1f2;border-color:#59676d}
#signatureFullscreen,html[data-mobile-interactions] #signatureFullscreen.signature-fullscreen{box-sizing:border-box;position:fixed;top:var(--mobile-view-top,0px);left:0;bottom:auto;margin:0;border:0;width:100%;height:var(--mobile-view-height,100dvh);max-height:none;min-width:0;max-width:100%;overflow:hidden}
.signature-fullscreen-pad{position:relative;display:flex;align-items:center;justify-content:center;background:transparent;border:0;box-shadow:none;min-width:0}
.signature-fullscreen-pad canvas{position:absolute;inset:0;width:100%;height:100%;max-height:100%;background:#fff;border:1px solid #cbd5e1;border-radius:6px;box-sizing:border-box}
body.signature-mode-open :is(.inspect-bottom-nav,.expert-mobile-header){visibility:hidden}
.signature-fullscreen-footer{min-width:0;position:relative;z-index:2;isolation:isolate}
.signature-fullscreen-footer button{min-width:0;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
.signature-fullscreen .signature-rotate-hint{display:none}
#profileSignatureCanvas{width:100%;height:auto;aspect-ratio:3 / 1}
.mobile-field-hint{margin:6px 0 10px;color:var(--muted,#667585);font-size:14px;line-height:1.45;overflow-wrap:anywhere;white-space:normal}
.mobile-field-hint[hidden]{display:none}
.choice-scroll-controls{display:flex;align-items:center;gap:0;min-width:0;width:100%}
.choice-scroll-controls[hidden]{display:none}
.choice-scroll-controls .choice-scroll-arrow{display:grid;place-items:center;flex:0 0 16px;width:16px;height:16px;min-height:16px;padding:0;border:0;border-radius:3px;background:transparent;color:#888;cursor:pointer;touch-action:none}
.choice-scroll-arrow svg{width:12px;height:12px;stroke-width:3}
.choice-scroll-arrow:focus-visible{outline:2px solid #008774;outline-offset:-2px}
.choice-scroll-controls .mobile-choice-scroll{display:block;appearance:none;flex:1;min-width:0;width:100%;height:18px;margin:0;padding:0;border:0;background:transparent;touch-action:pan-y}
.mobile-choice-scroll::-webkit-slider-runnable-track{height:5px;border-radius:3px;background:#e0e0e0}
.mobile-choice-scroll::-webkit-slider-thumb{appearance:none;height:5px;width:var(--choice-thumb,30px);border:0;border-radius:3px;background:#888}
.mobile-choice-scroll::-moz-range-track{height:5px;background:#e0e0e0}
.mobile-choice-scroll::-moz-range-thumb{height:5px;width:var(--choice-thumb,30px);border:0;border-radius:3px;background:#888}
.body-type-grid,.equipment-scroll{scrollbar-width:none}
.body-type-grid::-webkit-scrollbar,.equipment-scroll::-webkit-scrollbar{display:none}
@media(any-pointer:coarse){.choice-scroll-controls .choice-scroll-arrow{flex-basis:24px;width:24px;height:24px;min-height:24px}}
.address-scroll-controls{display:none}
.package-cancel-button{display:block;min-height:36px;margin:12px auto 0;padding:6px 16px;border:1px solid #aebbc1;border-radius:6px;background:var(--panel,#fff);color:var(--text,#47545b);font-size:14px;cursor:pointer}
.package-cancel-button[hidden]{display:none}
.package-cancel-button:disabled{opacity:.65;cursor:wait}
.package-cancel-button:focus-visible{outline:2px solid #647078;outline-offset:2px}
.opinion-control .field-input{width:100%}
.inspection-upload-grid .upload-add-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:none;align-self:center;min-height:30px;margin-top:6px;padding:4px 8px;border:1px solid #b8c4c9;border-radius:5px;background:var(--panel,#fff);color:var(--text,#36454c);font-size:12px;line-height:18px;cursor:pointer}
.upload-add-button svg{width:14px;height:14px;flex:none}
.inspection-upload-grid .drop-zone #photoPreview{flex:1;min-height:0;overflow:auto}
.upload-add-button:focus-visible{outline:2px solid #647078;outline-offset:2px}
@media(any-pointer:coarse){
 .inspect-main .opinion-control{display:flex;align-items:stretch;gap:8px;min-width:0}
 .inspect-main .opinion-control .field-input{flex:1;min-width:0;height:96px;min-height:96px;margin:0;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain}
 .inspect-main .opinion-control .address-scroll-controls{height:96px}
 html,body{max-width:100%;overflow-x:clip}
 .inspect-main{min-width:0;max-width:100%;box-sizing:border-box}
 .inspect-main :is(form,section,fieldset,.grid,.field-input){min-width:0;max-width:100%;box-sizing:border-box}
 .inspect-main :is(input:not([type=checkbox],[type=radio]),select,textarea){font-size:max(16px,1rem);min-width:0;max-width:100%;box-sizing:border-box}
 .inspect-main label{overflow-wrap:anywhere}
 .inspect-main section > .flex{flex-wrap:wrap}
 .inspect-main section > .flex > div{min-width:0;max-width:100%}
 .inspect-main .location-control{align-items:center}
 .inspect-main .location-input{height:76px;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain}
 .inspect-main .location-button{height:76px;min-height:0;margin:0;box-sizing:border-box}
 .inspect-main .address-scroll-controls{display:flex;flex-direction:column;align-items:center;flex:0 0 24px;width:24px;height:76px}
 .inspect-main .address-scroll-controls button{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;min-height:0;margin:0;padding:0;border:0;border-radius:3px;background:transparent;color:#777;touch-action:manipulation}
 .address-scroll-controls button:disabled{opacity:.35}
 .address-scroll-controls button:active:not(:disabled){transform:scale(.97)}
 .address-scroll-controls button:focus-visible{outline:2px solid #008774;outline-offset:-2px}
 .address-scroll-controls svg{width:16px;height:16px}
 .address-scroll-track{position:relative;display:block;width:4px;flex:1;background:#e0e0e0;border-radius:3px}
 .address-scroll-thumb{display:block;width:4px;background:#888;border-radius:3px}
 .equipment-grid{grid-auto-flow:column;grid-template-rows:repeat(6,minmax(56px,auto));grid-template-columns:none;grid-auto-columns:245px;min-width:max-content}
 .equipment-option{min-width:0;min-height:44px;height:auto;line-height:1.4}
 .equipment-option input,.body-type-option input{flex:0 0 17px;width:17px;height:17px}
 .equipment-scroll{overflow-x:auto;touch-action:pan-x pan-y}
 .body-type-grid{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,minmax(48px,auto));grid-template-columns:none;grid-auto-columns:160px;overflow-x:auto;touch-action:pan-x pan-y;padding-bottom:8px}
 html[data-mobile-interactions] #signatureFullscreen.signature-fullscreen{top:0;bottom:auto;height:100dvh;max-height:100dvh}
 /* Native modal already isolates the page; a fixed body can offset iOS hit testing on rotation. */
 html[data-mobile-scroll-lock] body.signature-mode-open{position:static;top:auto}
 .mobile-choice-scroll{display:block;appearance:none;width:100%;height:18px;margin:0;padding:0;border:0;background:transparent;touch-action:pan-y}
 .mobile-choice-scroll[hidden]{display:none}
 .mobile-choice-scroll::-webkit-slider-runnable-track{height:5px;border-radius:3px;background:#e0e0e0}
 .mobile-choice-scroll::-webkit-slider-thumb{appearance:none;height:5px;width:var(--choice-thumb,30px);border:0;border-radius:3px;background:#888}
 .mobile-choice-scroll::-moz-range-track{height:5px;background:#e0e0e0}
 .mobile-choice-scroll::-moz-range-thumb{height:5px;width:var(--choice-thumb,30px);border:0;border-radius:3px;background:#888}
 .signature-fullscreen{padding: max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
}
@media(max-width:480px){
 .expert-mobile-brand{font-size:calc(16px * var(--ui-text-scale,1));white-space:nowrap}
 .expert-mobile-menu-button{width:44px;height:44px;flex:none;padding:0;justify-content:center}
 .expert-mobile-menu-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}
@media(orientation:landscape) and (max-height:500px){
 .signature-fullscreen-header{padding:0 0 4px}
 .signature-fullscreen-subtitle{display:block}
 .signature-fullscreen-footer{grid-template-columns:auto auto minmax(0,1fr);gap:6px;padding-top:6px}
 .signature-fullscreen-footer .signature-save-button{grid-column:auto;grid-row:auto}
 .signature-fullscreen-footer button{padding:8px;min-height:40px;font-size:14px}
}
.inspect-bottom-nav a{font-size:calc(11px * var(--ui-text-scale,1));min-width:0;overflow-wrap:anywhere}
.inspect-bottom-nav svg{width:calc(19px * var(--ui-text-scale,1));height:calc(19px * var(--ui-text-scale,1));flex-shrink:0}
.inspect-bottom-nav{min-height:calc(72px * var(--ui-text-scale,1))}
.inspect-bottom-nav .inspect-create{justify-content:flex-end;padding-bottom:4px;color:#08775d;line-height:1.12}
.inspect-bottom-nav .inspect-create svg{width:calc(36px * var(--ui-text-scale,1));height:calc(36px * var(--ui-text-scale,1));margin-top:-24px;padding:8px;border:4px solid #f3f7f7;border-radius:50%;color:#fff;background:#00a77f;box-sizing:content-box}
html[data-ui-theme=dark] .inspect-bottom-nav .inspect-create{color:#69dfbd}
html[data-ui-theme=dark] .inspect-bottom-nav .inspect-create svg{border-color:#242b2e;background:#27c9a0}
@media(max-width:600px){
 .inspection-upload-grid .drop-zone{padding:8px;aspect-ratio:1;min-height:0;height:auto;contain:size}
 .inspection-upload-grid .drop-zone:not(.has-files)>span:nth-of-type(3){display:none}
 @media(any-pointer:coarse){
  .inspection-upload-grid .drop-zone{min-height:calc(180px * var(--ui-text-scale,1))}
  .inspection-upload-grid .drop-zone #photoPreview{flex:1;min-height:0;overflow:auto}
  .inspection-upload-grid .drop-zone:not(.has-files){justify-content:safe center;overflow:auto}
  .inspection-upload-grid .drop-zone:not(.has-files)>span:nth-of-type(3){display:block}
 }
 .inspection-upload-grid .drop-zone.has-files .multi-file-preview{min-height:0;overflow:auto}
 .inspection-upload-grid .drop-zone.has-files>span:nth-of-type(2){font-size:12px}
}
