/* Remove the branding/language header and its entire layout space. */
#sidebar_header {
    display: none !important;
}

#tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px 0;
}
.measurement-button {
    padding: 9px 4px;
    border: 1px solid #71868d;
    border-radius: 4px;
    background: #344b53;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.measurement-button:hover { background: #4b6872; }
.measurement-button[aria-pressed="true"] {
    background: #087acb;
    border-color: #71c8ff;
    color: #fff;
    box-shadow: inset 0 0 0 1px #71c8ff;
}
.measurement-button:focus-visible { outline: 2px solid #8bddff; }

#custom_background_options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px 0;
}

#custom_quality_options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px 0;
}

.shading-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
#shading_defaults { padding: 6px 10px; }

.view-defaults-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}
#view_defaults { padding: 6px 8px; white-space: nowrap; }
#potree_sidebar_container .custom-section-heading > span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: normal;
}

#measurement_magnifier {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    width: 180px;
    border: 2px solid #8acfff;
    border-radius: 50%;
    height: 180px;
    overflow: hidden;
    box-shadow: 0 3px 12px #0009;
    background: #17252b;
    color: #fff;
    font: 11px/24px sans-serif;
    text-align: center;
}
#measurement_magnifier[hidden] { display: none; }
#measurement_magnifier canvas { display: block; width: 180px; height: 180px; }
#measurement_magnifier > div { position: absolute; bottom: 12px; left: 16px; right: 16px; background: #17252bcc; font-size: 10px; line-height: 18px; }
.keyboard-navigation-hint { color: #c0d5df; font-size: 12px; padding: 5px 0 8px; }
#coordinate_registry { position:fixed; left:320px; top:12px; width:min(640px,calc(100vw - 340px)); max-height:45vh; overflow:auto; z-index:1500; background:#263238; color:#fff; padding:12px; border:1px solid #71818a; border-radius:6px; font:13px sans-serif; box-shadow:0 3px 12px #0008; }
#coordinate_registry[hidden] { display:none; }
#coordinate_registry header { display:flex; justify-content:space-between; align-items:center; font-size:16px; margin-bottom:10px; }
#coordinate_registry .coordinate-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
#coordinate_registry input { color:#111; background:#fff; width:80px; padding:4px; }
#coordinate_registry table { width:auto; border-collapse:collapse; font-variant-numeric:tabular-nums; }
#coordinate_registry th, #coordinate_registry td { padding:5px; text-align:right; border-bottom:1px solid #56656b; white-space:nowrap; }
#coordinate_registry .coordinate-table-wrap { max-height:190px; overflow:auto; }
#coordinate_registry small { color:#d1d9dd; }
@media(max-width:700px) { #coordinate_registry { left:8px; width:calc(100vw - 42px); top:8px; max-height:40vh; } }
/* Compact, movable survey point list. */
#coordinate_registry { width:min(410px,calc(100vw - 32px)); padding:6px; font-size:12px; max-height:48vh; }
#coordinate_registry header { background:#40545e; margin:-6px -6px 6px; padding:5px 8px; font-size:14px; cursor:move; user-select:none; touch-action:none; }
#coordinate_registry .coordinate-actions { gap:4px; }
#coordinate_registry .coordinate-action-break { flex-basis:100%; height:0; }
#coordinate_registry input { width:58px; padding:2px; box-sizing:border-box; font-size:12px; }
#coordinate_registry .measurement-button { padding:4px 7px; min-height:0; margin:0; font-size:12px; }
#coordinate_registry th, #coordinate_registry td { padding:2px 4px; }
#coordinate_registry th:first-child, #coordinate_registry td:first-child { text-align:left; width:70px; padding-left:0; }
#coordinate_registry td:first-child input { width:70px; }
#coordinate_registry th:last-child, #coordinate_registry td:last-child { width:32px; }
#coordinate_registry td button { padding:1px 3px; font-size:11px; }
#coordinate_registry p { margin:5px 0; }
#survey_import { margin:6px 0; border:1px solid #71818a; padding:5px; }
#survey_import summary { cursor:pointer; font-weight:bold; }
#survey_import label { display:block; margin:4px 0; }
#survey_import label[hidden], #survey_import p[hidden] { display:none; }
#survey_import input[type=file] { width:100%; color:white; background:transparent; }
#survey_import input[type=checkbox] { width:auto; }
#survey_import [data-layers] label { display:inline; overflow-wrap:anywhere; }
#survey_import [data-layers] button { margin-left:5px; }
#coordinate_registry .coordinate-table-wrap { max-height:220px; }
#coordinate_registry thead { position:sticky; top:0; background:#263238; }
.survey-point-name { position:fixed; z-index:900; transform:translate(-50%,-100%); background:#000c; color:white; border-radius:3px; padding:2px 5px; font:bold 12px sans-serif; white-space:nowrap; }
.survey-point-name[hidden] { display:none; }
.survey-point-details { display:none; position:absolute; left:50%; bottom:100%; transform:translateX(-50%); padding:5px; border-radius:3px; background:#17252b; color:#fff; font:12px sans-serif; }
.survey-point-name:hover .survey-point-details, .survey-point-name:focus .survey-point-details { display:block; }
.survey-rotating .survey-point-name { pointer-events:none; }
.survey-rotating .survey-point-name .survey-point-details { display:none; }
#edge_estimator { position:fixed; left:320px; top:12px; z-index:1600; width:370px; max-width:calc(100vw - 32px); background:#263238; color:white; padding:10px; border:1px solid #71818a; border-radius:5px; font:12px sans-serif; }
#edge_estimator[hidden] { display:none; }
#edge_estimator label { display:inline-block; margin:5px 3px; }
#edge_estimator input[type=number] { width:65px; }
#edge_estimator button { margin:3px; padding:4px; }
#edge_estimator [data-action=close] { float:right; }
#edge_overlay { position:fixed; pointer-events:none; z-index:850; }
@media(max-width:700px) { #edge_estimator { left:8px; } }
.edge-sphere-handle { position:fixed; z-index:1400; transform:translate(-50%,-50%); border:1px solid #fff; border-radius:50%; width:22px; height:22px; padding:0; background:#087b96; color:white; cursor:move; touch-action:none; }
.edge-sphere-handle[hidden] { display:none; }
.edge-rotation-ring { position:fixed; left:0; top:0; pointer-events:none; z-index:1300; overflow:visible; }
.edge-rotation-ring path { fill:none; stroke:#ffd166; stroke-width:9px; stroke-opacity:.65; pointer-events:stroke; cursor:grab; touch-action:none; }
.edge-rotation-handle { background:#66501a; border-color:#ffd166; color:#fff; font-size:18px; }
#waypoint_camera { position:fixed; left:320px; top:12px; width:390px; max-width:calc(100vw - 30px); max-height:85vh; overflow:auto; z-index:1700; background:#263238; color:white; border:1px solid #71818a; border-radius:5px; padding:10px; font:12px sans-serif; }
#waypoint_camera[hidden] { display:none; }
#waypoint_camera header { display:flex; justify-content:space-between; align-items:center; font-size:15px; }
#waypoint_camera label { display:inline-block; margin:6px 2px; }
#waypoint_camera input { width:60px; }
#waypoint_camera [data-field=points] { width:100%; margin:6px 0; }
#waypoint_camera .measurement-button { padding:5px; margin:3px; font-size:12px; }
@media(max-width:700px){#waypoint_camera{left:5px;}}

#workspace_snapshot{padding:8px;background:#222;color:white;font-size:12px} #workspace_snapshot summary{cursor:pointer} #workspace_snapshot input,#workspace_snapshot select{box-sizing:border-box;max-width:100%;margin:3px 0} #workspace_snapshot select{width:100%} #workspace_snapshot button{margin:2px;padding:4px 6px;cursor:pointer} #workspace_snapshot [hidden]{display:none!important} #workspace_snapshot [role=status]{overflow-wrap:anywhere;margin:4px 0}

#workspace_snapshot [data-admin] p{font-size:12px;line-height:1.5;margin:5px 0} #workspace_snapshot [data-new]{margin:9px 0;padding:6px;border:1px solid #71868d} #workspace_snapshot [data-confirm]{padding:8px;border:1px solid #71c8ff;background:#263f49} #workspace_snapshot [data-error]{color:#ffbd95} #workspace_snapshot button:disabled{opacity:.5;cursor:default} #workspace_snapshot [data-action=update]{width:100%;background:#087acb;overflow-wrap:anywhere}
#height_correction { box-sizing:border-box; margin:6px 8px; padding:8px; border:1px solid #71868d; border-radius:3px; background:#20343c; color:#fff; font:12px/1.6 sans-serif; overflow-wrap:anywhere; }
#height_correction[hidden] { display:none; }
#height_correction summary { color:#fff; font-size:14px; font-weight:bold; cursor:pointer; }
#height_correction label { display:block; margin:8px 0; }
#height_correction p { color:#e4edf0; margin:8px 0; }
#height_correction input[type=number] { box-sizing:border-box; max-width:100%; width:130px; color:#17252b; background:#fff; padding:3px 5px; }
#height_correction input[type=checkbox] { vertical-align:middle; margin-right:5px; }
#height_correction button { margin:2px 4px 2px 0; }
/* One scrolling surface for the registry, including long import controls. */
#coordinate_registry { box-sizing:border-box; width:min(470px,calc(100vw - 24px)); max-height:72vh; max-height:72dvh; overflow:auto; }
#coordinate_registry .coordinate-table-wrap { max-height:none; overflow:visible; }
#coordinate_registry header { position:sticky; top:-6px; z-index:2; }
#coordinate_registry thead { position:static; }
#mobile_sidebar_close { display:none; }
@media(max-width:700px), (pointer:coarse) {
 #coordinate_registry { left:8px; width:calc(100vw - 16px); max-height:75vh; max-height:75dvh; }
 #mobile_sidebar_close { display:block; position:absolute; top:4px; right:4px; z-index:2000; width:44px; height:44px; border:1px solid #80949c; border-radius:4px; background:#263e48; color:#fff; font-size:24px; cursor:pointer; }
 #potree_sidebar_container { max-width:calc(100vw - 16px); }
 #workspace_snapshot { padding-right:52px; }
}
@media(max-width:700px), (pointer:coarse) {
 .survey-point-details { box-sizing:border-box; width:min(270px,calc(100vw - 16px)); left:calc(50% + var(--popup-shift,0px)); white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; max-height:40vh; overflow:auto; }
 .survey-point-details[data-below=true] { bottom:auto; top:100%; }
}
#waypoint_camera { box-sizing:border-box; }
#waypoint_camera header { position:sticky; top:-10px; z-index:2; background:#40545e; margin:-10px -10px 8px; padding:5px 8px; cursor:move; user-select:none; touch-action:none; }
#site_notice { position:absolute; right:max(12px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); box-sizing:border-box; max-width:min(420px,calc(100% - 24px)); padding:6px 9px; border-radius:4px; background:#000b; color:#fff; font:12px/1.6 sans-serif; white-space:pre-wrap; overflow-wrap:anywhere; pointer-events:none; z-index:800; }
#site_notice[hidden],#site_notice_editor[hidden] { display:none; }
#site_notice_editor { margin:6px 8px; padding:8px; background:#20343c; border:1px solid #71868d; border-radius:3px; color:#fff; font:12px/1.6 sans-serif; }
#site_notice_editor summary { font-size:14px; font-weight:bold; cursor:pointer; }
#site_notice_editor label { display:block; margin:6px 0; }
#site_notice_editor select,#site_notice_editor textarea { display:block; box-sizing:border-box; width:100%; max-width:100%; color:#17252b; background:white; }
#site_notice_editor textarea { resize:vertical; }
#site_notice_editor p { margin:6px 0; }
@media(max-width:700px), (pointer:coarse) { #site_notice { font-size:13px; } #site_notice_editor textarea,#site_notice_editor select { font-size:16px; } }
#site_heading { position:absolute; top:10px; left:60px; right:100px; display:flex; align-items:flex-start; gap:16px; z-index:1000; pointer-events:none; }
#site_heading #potree_description { position:static; transform:none; text-align:left; flex:0 1 auto; max-width:40%; overflow-wrap:anywhere; }
#site_heading #site_notice { position:static; flex:1 1 0; min-width:0; max-width:700px; margin:0; padding:3px 6px; background:#0008; font-size:12px; }
@media(max-width:700px), (pointer:coarse) { #site_heading #site_notice { display:none; } #site_heading #potree_description { max-width:100%; } }
