/* One layout for the inspector, independent of screen-height overrides in
   the production styles. Labels and fields share columns at every width. */
.screen-ready.persistent-sidebar .sidebar-sections{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:8px;container-type:inline-size;width:100%;box-sizing:border-box}
.screen-ready.persistent-sidebar .sidebar-sections :is(#panel-draw,#panel-pose,#panel-video,#panel-moments){grid-column:1/-1;display:block;padding:10px;border-radius:8px;min-width:0}
.screen-ready.persistent-sidebar .sidebar-sections .section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 6px;min-height:28px}
.screen-ready.persistent-sidebar .sidebar-sections .section-heading h2{font-size:18px;line-height:1.3;margin:0;flex:none}
.sidebar-sections button,.sidebar-sections select{font-family:inherit}
.screen-ready.persistent-sidebar .sidebar-sections button{min-height:34px;font-size:14px;padding:5px 8px;line-height:1.25}
.screen-ready.persistent-sidebar .sidebar-sections select{height:34px;min-height:34px;min-width:0;max-width:none;width:100%;padding:4px 6px;font-size:14px;line-height:1.25}
.sidebar-sections input[type=checkbox]{width:17px;height:17px;flex:none;margin:0;accent-color:#354f3d}
.sidebar-sections input[type=range]{accent-color:#416746;min-width:0;margin:0;height:34px}
.screen-ready.persistent-sidebar .sidebar-sections label{font-size:14px;line-height:1.3}
.screen-ready.persistent-sidebar .sidebar-sections .screen-panel-help{line-height:1.4;margin:0 0 10px;font-size:14px}

/* Drawing appearance, then actions: the palette never competes with selects. */
.screen-ready.persistent-sidebar #panel-draw .drawing-footer{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:6px;margin:0;min-width:0;font-size:14px}
.screen-ready.persistent-sidebar #panel-draw .drawing-target{display:flex;align-items:center;gap:6px;margin:0 0 10px}
.screen-ready.persistent-sidebar #panel-draw .drawing-target>span{min-width:48px}
.screen-ready.persistent-sidebar #drawingSettings,.screen-ready.persistent-sidebar #drawingActions{margin:0;min-width:0}
.screen-ready.persistent-sidebar .drawing-context{display:block}
.screen-ready.persistent-sidebar #drawingSettings .drawing-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:6px 12px}
.screen-ready.persistent-sidebar #drawingSettings .drawing-settings>label{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:4px}
.inspector-label{font-size:14px;line-height:1.3;color:#405747}
.inspector-colors{grid-column:1/-1;display:flex;align-items:center;gap:10px;min-width:0}
.screen-ready.persistent-sidebar #drawingSettings .drawing-colors{display:flex;align-items:center;justify-content:flex-start;gap:4px;flex:none;grid-column:auto}
.screen-ready.persistent-sidebar #drawingSettings .drawing-colors button{box-sizing:border-box;display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;min-width:34px;min-height:34px;max-width:34px;max-height:34px;padding:4px;border:2px solid transparent;border-radius:50%;aspect-ratio:1}
.screen-ready.persistent-sidebar #drawingSettings .drawing-colors button[aria-pressed=true]{border-color:#354f3d}
.screen-ready.persistent-sidebar #drawingSettings .drawing-colors span{box-sizing:border-box;width:22px;height:22px;min-width:22px;min-height:22px;border-radius:50%;aspect-ratio:1}
.screen-ready.persistent-sidebar #drawingCustomColor{box-sizing:border-box;flex:0 0 34px;width:34px;height:34px;min-width:34px;min-height:34px;margin:0;padding:4px;border:1px solid #aab9a0;border-radius:6px}
.screen-ready.persistent-sidebar #drawingActions{padding-top:8px}
.screen-ready.persistent-sidebar #drawingActions .drawing-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
.screen-ready.persistent-sidebar #drawingActions .drawing-actions>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.screen-ready.persistent-sidebar #drawingActions .drawing-actions>div:nth-child(2){grid-template-columns:repeat(2,minmax(0,1fr))}
.screen-ready.persistent-sidebar #drawingActions .drawing-actions>div:nth-child(2):has(#drawingCopy[hidden]){grid-template-columns:minmax(0,1fr)}
.screen-ready.persistent-sidebar #drawingActions .drawing-link{display:flex;align-items:center;gap:8px;line-height:1.4;margin:2px 0 0}

/* Tracking controls and measured values use explicit rows, not loose wrapping. */
.screen-ready.persistent-sidebar #panel-pose .setting-row{display:grid;grid-template-columns:60px minmax(0,1fr);align-items:center;gap:8px;margin:0 0 10px}
.screen-ready.persistent-sidebar #panel-pose .setting-row select{max-width:none}
.screen-ready.persistent-sidebar #panel-pose .overlay-options{display:grid;gap:6px;margin:0;padding:0;border:0}
.screen-ready.persistent-sidebar #panel-pose .review-checks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.screen-ready.persistent-sidebar #panel-pose .review-checks label{display:flex;align-items:center;gap:5px;min-height:26px;white-space:nowrap}
.screen-ready.persistent-sidebar #panel-pose .path-checks{grid-template-columns:46px repeat(3,minmax(0,1fr));align-items:center}
.screen-ready.persistent-sidebar #panel-pose .review-size{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
.screen-ready.persistent-sidebar #panel-pose .review-size label{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;align-items:center}
.screen-ready.persistent-sidebar #panel-pose .review-size input{width:100%;min-width:0}
.screen-ready.persistent-sidebar #panel-pose .review-size select{max-width:none}
.screen-ready.persistent-sidebar #panel-pose .review-metrics{display:block;margin:8px 0 0}
.screen-ready.persistent-sidebar .review-tables{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.screen-ready.persistent-sidebar .review-tables table{table-layout:fixed;width:100%;font-size:14px}
.screen-ready.persistent-sidebar .review-tables th,.screen-ready.persistent-sidebar .review-tables td{padding:2px 4px;line-height:19px;vertical-align:middle}
.screen-ready.persistent-sidebar .review-tables th:first-child{width:70%;font-weight:400}
.screen-ready.persistent-sidebar .review-tables td{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.screen-ready.persistent-sidebar .review-coverage{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;margin-top:8px;font-size:14px}
.screen-ready.persistent-sidebar .review-coverage strong{font-size:14px}
.screen-ready.persistent-sidebar #sampleCount{margin-left:auto}
.screen-ready.persistent-sidebar.is-compare .review-tables{grid-template-columns:minmax(0,1fr);gap:0}
.screen-ready.persistent-sidebar.is-compare .review-tables th:first-child{width:46%}
.screen-ready.persistent-sidebar.is-compare .review-tables table+table thead{visibility:collapse}

/* Video settings have the same alignment as drawing settings. */
.screen-ready.persistent-sidebar #panel-video .screen-video-settings{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;width:100%}
.inspector-video-view{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px}
.screen-ready.persistent-sidebar #panel-video .inspector-video-view h3{display:block;grid-column:1;min-width:0;margin:0;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.screen-ready.persistent-sidebar #panel-video .review-video-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;grid-column:1}
.screen-ready.persistent-sidebar #panel-video .review-video-options label{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;align-items:stretch}
.screen-ready.persistent-sidebar #panel-video .ghost-options{display:grid;gap:8px;margin-top:12px;padding-top:8px;border-top:1px solid #dde5d5}
.screen-ready.persistent-sidebar #panel-video .ghost-options label{display:flex;align-items:center;gap:8px}
.screen-ready.persistent-sidebar #panel-video .ghost-options input[type=range]{flex:1;width:auto;max-width:none}
.screen-ready.persistent-sidebar #panel-moments .tempo{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;font-size:14px}
.screen-ready.persistent-sidebar #panel-moments .tempo strong{font-size:18px;white-space:nowrap}
.screen-ready.persistent-sidebar #panel-moments .metric-note{margin:8px 0 10px;font-size:14px;line-height:1.4}
.screen-ready.persistent-sidebar #panel-moments .export-button{width:100%;min-height:36px;margin:0}

@container (max-width:350px){
  .inspector-colors{display:grid;gap:4px}
  .screen-ready.persistent-sidebar #panel-pose .review-checks{grid-template-columns:repeat(2,minmax(0,1fr))}
  .screen-ready.persistent-sidebar #panel-pose .path-checks{grid-template-columns:repeat(3,minmax(0,1fr))}
  .screen-ready.persistent-sidebar #panel-pose .path-checks>span{grid-column:1/-1}
  .screen-ready.persistent-sidebar .review-tables{grid-template-columns:minmax(0,1fr);gap:0}
  .screen-ready.persistent-sidebar .review-tables table+table thead{visibility:collapse}
}

/* Compact wide inspectors without compressing labels or swatch circles. */
.screen-ready.persistent-sidebar #panel-pose .section-heading{display:grid;grid-template-columns:minmax(0,1fr) auto}
.screen-ready.persistent-sidebar #panel-pose .section-heading>.setting-row{grid-column:1/-1;grid-row:2;margin:0}
.screen-ready.persistent-sidebar #poseVisibility{grid-column:2;grid-row:1}
@container (min-width:420px){
  .screen-ready.persistent-sidebar:not(.is-compare) #drawingActions .drawing-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
  .screen-ready.persistent-sidebar:not(.is-compare) #drawingActions .drawing-actions>div{display:contents}
  .screen-ready.persistent-sidebar:not(.is-compare) #drawingActions .drawing-actions button{height:44px}
}
