/* Shared density and help affordances for the three terrain editors. */
body.workshop-editor{font-size:13px!important;line-height:1.35!important}
body.workshop-editor main{padding:10px 14px!important}
body.workshop-editor .workshop-shell{padding:8px 14px 0}
body.workshop-editor .workshop-shell .workshop-tabs{margin-top:4px;gap:3px}
body.workshop-editor .workshop-tabs>a{padding:6px 12px!important;font-size:13px}
body.workshop-editor .workshop-page-title{display:block!important;position:sticky;top:var(--workshop-nav-height,76px);z-index:20;background:var(--page)!important;margin:0 0 8px!important;padding:5px 0!important;line-height:1.25}
body.workshop-editor h1{font-size:20px!important;margin:0!important}
body.workshop-editor h2{font-size:15px!important;margin:0 0 8px!important;line-height:1.3}
body.workshop-editor h3{font-size:14px;margin:8px 0 5px}
body.workshop-editor p{font-size:12px;line-height:1.4!important;margin:6px 0}
body.workshop-editor :is(button,input,select,textarea){font-size:12px!important;padding:5px 8px;min-height:28px;border-radius:5px}
body.workshop-editor input[type=range]{padding:0;min-height:22px;height:22px;margin:3px 0!important}
body.workshop-editor :is(input[type=checkbox],input[type=radio]){min-height:0}
body.workshop-editor :is(.workshop-panel,.drawing-panel,#generation-result,#mountain-live-view,#path-live-preview,#contour-live-preview){padding:10px!important;margin-bottom:10px; border-radius:7px}
body.workshop-editor :is(.workspace,.workshop-layout){gap:10px}
body.workshop-editor .workspace{column-gap:5px}
body.workshop-editor :is(#controls-pane,.workshop-sidebar){padding:10px!important}
body.workshop-editor :is(#controls-pane,#settings-divider,.workshop-sidebar){scroll-margin-top:calc(var(--workshop-nav-height,76px) + 38px)}
body.workshop-editor #controls-pane{top:calc(var(--workshop-nav-height,76px) + 38px)!important;max-height:calc(100vh - var(--workshop-nav-height,76px) - 48px)!important}
body.workshop-editor #settings-divider{top:calc(var(--workshop-nav-height,76px) + 38px);height:calc(100vh - var(--workshop-nav-height,76px) - 48px)}
body.workshop-editor :is(.controls,nav,.workshop-preview-controls,.live-toolbar,.preview-toolbar){gap:6px!important;margin-top:6px;margin-bottom:6px}
body.workshop-editor :is(.workshop-sidebar label,#controls-pane .bias-grid label){margin:5px 0;padding:5px 0;font-size:12px}
body.workshop-editor .path-fields{gap:10px}
body.workshop-editor .path-fields label{gap:3px;min-width:130px}
body.workshop-editor .line{padding:5px 7px;margin:4px 0;gap:6px}
body.workshop-editor .generator-part-groups{margin:8px 0;padding:8px}
body.workshop-editor .generator-group-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0 12px;margin-top:6px}
body.workshop-editor .generator-group-grid>div{gap:6px;padding:2px 0}
body.workshop-editor .generator-group-grid .usage-toggle{margin:0!important;padding:0!important}
body.workshop-editor .contour-drawing-tools .line .contour-rise{grid-template-columns:minmax(70px,1fr) auto auto;min-width:150px;gap:3px 6px;align-items:center}
body.workshop-editor .contour-rise>span{display:none}
body.workshop-editor .contour-rise>button{padding:3px 6px;min-height:24px}
/* Shared preview toolbar owns generation; keep existing handlers available. */
body.workshop-editor :is(#quick-preview,#regenerate,#generate-cliff,#generate-path){display:none!important}
body.workshop-editor #advanced-mountain{margin-top:8px}
body.workshop-editor #advanced-mountain>summary{padding:7px;font-size:12px}
body.workshop-editor .drawing-workbench :is(.map-dimensions,.map-drawing-tools,.map-build-actions){gap:6px;margin:6px 0;padding-top:6px}
body.workshop-editor .drawing-workbench .map-drawing-stage{padding:8px}
body.workshop-editor .drawing-workbench .map-mode-help{min-height:0}
body.workshop-editor .slider-example{margin-top:5px}
body.workshop-editor #controls-pane .slider-example figcaption{padding:4px 6px;min-height:0}
body.workshop-editor :is(#status,#job-status,#path-status,#cliff-job-status,#path-job-status){min-height:0}
body.workshop-editor .compact-help-source{display:none!important}
body.workshop-editor .workshop-info{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;border:1px solid #8cabbc;border-radius:50%;width:18px;height:18px;min-height:18px;padding:0;margin:0 4px;color:#d3e9f7;background:transparent;font:bold 12px Georgia,serif!important;cursor:help;flex:none}
.workshop-help-popup{position:fixed;z-index:2000;max-width:min(330px,calc(100vw - 24px));padding:10px 12px;border:1px solid #8cabbc;border-radius:6px;background:#13242e;color:#edf3f7;font:12px/1.45 system-ui;box-shadow:0 5px 22px #0008;pointer-events:none}
.workshop-help-popup[hidden]{display:none}
@media(max-width:600px){body.workshop-editor #controls-pane{position:static!important;max-height:45vh!important}body.workshop-editor .workshop-page-title{position:static}body.workshop-editor main{padding:8px!important}}

/* Dense in CSS pixels; rem text follows browser zoom and OS font scaling. */
body[data-workshop=contours] .contour-drawing-tools{gap:.25rem;margin:0 0 .25rem}
body[data-workshop=contours] .cliff-map-toolbar{display:flex;align-items:end;flex-wrap:wrap;flex:1 0 100%;gap:.25rem;margin:0}
body[data-workshop=contours] .cliff-map-toolbar>label{display:grid;gap:.2rem;margin:0;color:#adc2d0;flex:0 1 4.5rem;min-width:0}
body[data-workshop=contours] .cliff-map-toolbar>label:first-child{flex:1 1 9rem}
body[data-workshop=contours] .cliff-map-toolbar :is(input,select){width:100%;box-sizing:border-box}
body[data-workshop=contours] .cliff-map-toolbar :is(#dimensions,#resize-status){flex-basis:100%;font-size:.6875rem;color:#a6bbc8;margin:0!important}
body[data-workshop=contours] .cliff-import-options{flex:1 0 100%;color:#adc2d0}
body[data-workshop=contours] .cliff-import-body{display:flex;align-items:center;flex-wrap:wrap;gap:.25rem;padding:0 .375rem .25rem}
body[data-workshop=contours] .cliff-import-body>label{display:inline-flex;gap:.25rem;align-items:center;margin:0}
body[data-workshop=contours] .contour-drawing-tools #lines{border:0;padding:0}
body[data-workshop=contours] .contour-drawing-tools p:empty{display:none}
body[data-workshop=contours] #lines .line{border:1px solid #415763;background:#293b46;box-shadow:none}
body[data-workshop=contours] #lines .line:has(button[aria-pressed=true]){border-color:#8298a6;background:#304652}
body[data-workshop=contours] #status{min-height:0;color:#a6bbc8;font-size:.6875rem}
.contour-actions{position:relative;flex:none;margin-left:auto}
.contour-actions>summary{list-style:none;cursor:pointer;border:1px solid #617685;border-radius:.25rem;padding:0 .4rem;font-size:1.2rem;line-height:1.5;min-width:1rem;text-align:center}
.contour-actions>summary::-webkit-details-marker{display:none}
.contour-actions>div{position:absolute;right:0;top:100%;z-index:30;display:flex;gap:.25rem;background:#182a35;border:1px solid #617685;padding:.375rem;border-radius:.25rem;box-shadow:0 4px 12px #0006}
.contour-actions>summary:focus-visible{outline:2px solid #ffc66f}
body[data-workshop=contours] .contour-drawing-tools>nav{padding:0;border:0;margin:0!important}
body[data-workshop]{--dense-gap:.25rem;font-size:.75rem!important;line-height:1.3!important}
body[data-workshop] main{padding:.25rem!important}
body[data-workshop] .workshop-shell{padding:.25rem .375rem 0}
body[data-workshop] .workshop-tabs>a{padding:.25rem .5rem!important}
body[data-workshop] :is(.workshop-panel,.drawing-panel,#mountain-live-view,#path-live-preview,#contour-live-preview,.workshop-card,.profile-manager){padding:.375rem!important;margin-bottom:.25rem;border-radius:.25rem}
body[data-workshop] :is(.workshop-layout,.workspace,.workshop-card-grid){gap:.375rem!important}
body[data-workshop] :is(h1,h2,h3,p){margin-block:.25rem!important}
body[data-workshop] h1{font-size:1.125rem!important}
body[data-workshop] h2{font-size:.9375rem!important}
body[data-workshop] :is(button,input,select,textarea){font-size:.75rem!important;min-height:1.75rem;padding:.125rem .375rem;border-radius:.25rem}
body[data-workshop] :is(input[type=checkbox],input[type=radio]){min-height:0}
body[data-workshop] :is(nav,.controls,.workshop-preview-controls,.preview-toolbar,.live-toolbar,.profile-toolbar){gap:.25rem!important;margin-block:.25rem!important;flex-wrap:wrap}
body[data-workshop] .workshop-page-title{padding:0!important;margin:0 0 .25rem!important}
body[data-workshop] :is(.map-drawing-stage,#controls-pane,.workshop-sidebar){padding:.375rem!important}
body[data-workshop] .line{padding:.25rem!important;margin:.125rem 0!important;gap:.25rem!important}
body[data-workshop] .compact-help-source{display:none!important}
body[data-workshop] .workshop-info{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex:none;width:1.25rem;height:1.25rem;min-height:1.25rem;padding:0;margin:0 .2rem;border:1px solid #8cabbc;border-radius:50%;background:transparent;color:#d3e9f7;font:bold .75rem Georgia,serif!important;cursor:help}
.workshop-help-popup{pointer-events:auto;font-size:.8125rem;max-width:min(25rem,calc(100vw - 1rem));max-height:calc(100dvh - 1rem);overflow:auto;padding:.5rem}
/* One outline and one spacing scale for all expandable option sections. */
body[data-workshop] :is(.lucky-options,.cliff-import-options,.lego-techniques){box-sizing:border-box;min-width:0;border:1px solid #526773;border-radius:.25rem;padding:0;margin:0;background:#293b46}
body[data-workshop] :is(.lucky-options,.cliff-import-options,.lego-techniques)>summary{cursor:pointer;list-style-position:inside;font-size:.75rem;font-weight:600;line-height:1.5;min-height:1.5rem;padding:.125rem .375rem;color:#d6e4ec}
body[data-workshop] :is(.lucky-options,.cliff-import-options,.lego-techniques)>summary:focus-visible{outline:2px solid #ffc66f;outline-offset:1px;border-radius:.25rem}
body[data-workshop] :is(.lucky-options,.cliff-import-options,.lego-techniques)>summary .workshop-info{margin-left:.375rem}
body[data-workshop] .lego-techniques{margin:.25rem 0}
body[data-workshop] :is(.technique-primary,.technique-grid){grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.25rem .75rem;max-width:none;margin:0 .375rem .25rem;padding:0;border:0}
body[data-workshop] .lego-techniques label{grid-template-columns:minmax(0,1fr) minmax(5rem,auto);gap:.25rem;line-height:1.25}
body[data-workshop] .lego-techniques label>select{width:100%;max-width:11rem}
body[data-workshop] .lego-techniques label>span{display:flex;align-items:center;gap:.125rem}
body[data-workshop] .filters{padding:.375rem;gap:.375rem}
body[data-workshop] :is(.part-row,.gallery article){padding:.375rem;border-radius:.25rem}
@media(pointer:coarse){body[data-workshop] :is(button,select,input:not([type=checkbox]):not([type=radio])){min-height:2.25rem}body[data-workshop] .workshop-info{width:2rem;height:2rem;min-height:2rem}}

body[data-workshop] .cliff-option-sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin:.125rem .375rem .375rem;max-width:1100px}
body[data-workshop] .cliff-option-sections>section{min-width:0;border-left:1px solid #526773;padding-left:.5rem;display:flex;flex-direction:column;gap:.25rem}
body[data-workshop] .cliff-option-sections>section:first-child{border-left:0;padding-left:0}
body[data-workshop] .cliff-option-sections h3{font-size:.6875rem;text-transform:uppercase;letter-spacing:.04em;color:#b4c9d5;margin:0 0 .125rem;line-height:1.4}
body[data-workshop] .cliff-option-sections label{grid-template-columns:minmax(0,1fr) 9rem;gap:.375rem}
body[data-workshop] .cliff-option-sections label>select{width:100%;max-width:none}
@container(max-width:850px){body[data-workshop] .cliff-option-sections{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-workshop] .cliff-option-sections>section:last-child{border-left:0;padding-left:0}}
@container(max-width:550px){body[data-workshop] .cliff-option-sections{grid-template-columns:1fr}body[data-workshop] .cliff-option-sections>section{border-left:0;padding-left:0}body[data-workshop] .cliff-option-sections label{grid-template-columns:minmax(0,1fr) 9rem}}

/* Field information belongs beside its caption, above the input. */
body[data-workshop] label:has(>.studio-help-note){position:relative;padding-right:0}
body[data-workshop] label>.studio-help-note{position:absolute;top:0;right:0;margin:0;line-height:16px;z-index:2}
body[data-workshop] label>.studio-help-note>summary{display:inline-flex;align-items:center;justify-content:center;width:18px;height:16px;padding:0;margin:0}
body[data-workshop] label>.studio-help-note>p{left:auto;right:0;max-width:calc(100vw - 32px);box-sizing:border-box}
body[data-workshop] label>span:has(>.workshop-info){display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;box-sizing:border-box}
body[data-workshop] label>span>.workshop-info{margin:0 0 0 auto}
body[data-workshop] label:has(>.workshop-info){position:relative}
body[data-workshop] label>.workshop-info{position:absolute;top:0;right:0;margin:0}
body[data-workshop] :is(h2,h3,h4,summary):has(>.workshop-info){display:flex;align-items:center;gap:6px}
body[data-workshop] :is(h2,h3,h4,summary)>.workshop-info{margin-left:auto;margin-right:0}
