/* Shared translucent pill controls, including controls created during rendering.
   Important declarations override the older inline and hover-handler colors. */
:is(button:not(.tab):not(.canvas-tools button),
#refreshButton, #backgroundToggle, #zoomAllButton, #zoomIndicator, #depthZoomIndicator,
#summaryZoomAllButton, #summaryLockButton, #summaryExportSVGButton,
#summaryDepthZoomAllButton, #summaryDepthLockButton, #summaryDepthExportButton) {
    background: rgb(255 255 255 / 72%) !important;
    color: #191919 !important;
    border: 1px solid rgb(230 230 230 / 75%) !important;
    border-radius: 999px !important;
    box-shadow: 0 3px 12px #0000000b !important;
    transition: transform 140ms ease !important;
}
:is(button:not(.tab):not(.canvas-tools button),
#refreshButton, #backgroundToggle, #zoomAllButton, #zoomIndicator, #depthZoomIndicator,
#summaryZoomAllButton, #summaryLockButton, #summaryExportSVGButton,
#summaryDepthZoomAllButton, #summaryDepthLockButton, #summaryDepthExportButton):hover:not(:disabled):not(:where(#zoomIndicator, #depthZoomIndicator)) {
    background: rgb(255 255 255 / 72%) !important;
    transform: scale(1.05) !important;
}
:is(button:not(.tab):not(.canvas-tools button),
#refreshButton, #backgroundToggle, #zoomAllButton, #zoomIndicator, #depthZoomIndicator,
#summaryZoomAllButton, #summaryLockButton, #summaryExportSVGButton,
#summaryDepthZoomAllButton, #summaryDepthLockButton, #summaryDepthExportButton):focus-visible {
    outline: 2px solid #333;
    outline-offset: 3px;
}
button:disabled:not(.tab):not(.canvas-tools button) { color: #999 !important; cursor: default; }
@media (prefers-reduced-motion: reduce) {
    :is(button:not(.tab):not(.canvas-tools button),
#refreshButton, #backgroundToggle, #zoomAllButton, #zoomIndicator, #depthZoomIndicator,
#summaryZoomAllButton, #summaryLockButton, #summaryExportSVGButton,
#summaryDepthZoomAllButton, #summaryDepthLockButton, #summaryDepthExportButton) { transition: none !important; }
}

/* Context actions float independently, with no surrounding menu card. */
#contextMenu, #depthContextMenu, #webFileMenu .web-actions {
    background: transparent !important; border: 0 !important;
    box-shadow: none !important; border-radius: 0 !important; padding: 0 !important;
}
#webFileMenu { border: 0 !important; padding: 0 !important; margin: 0 !important; }
#contextMenu hr, #depthContextMenu hr { display: none; }
#contextMenu button, #depthContextMenu button { margin-top: 5px; margin-bottom: 5px; }

/* Each view has one shared pill instead of separate control capsules. */
.view-control-pill {
    display: flex; align-items: center; gap: 0; padding: 5px 8px;
    border: 1px solid rgb(230 230 230 / 75%); border-radius: 999px;
    background: rgb(255 255 255 / 72%); box-shadow: 0 4px 18px #0000000b;
    position: absolute; right: 15px; bottom: 20px; z-index: 1000;
    max-width: calc(100% - 30px); box-sizing: border-box;
}
.view-control-pill[hidden] { display: none; }
#diagramControlPill { position: fixed; bottom: 22px; }
#depthControlPill { bottom: 22px; z-index: 200; }
.view-control-pill > :is(div, button) {
    position: relative !important; inset: auto !important; margin: 0 !important;
    background: transparent !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; color: #191919 !important;
    padding: 6px 12px !important; white-space: nowrap;
}
.view-control-pill > :is(div, button):hover {
    background: transparent !important; transform: scale(1.05) !important;
}
.view-control-pill > :is(div, button) + :is(div, button) { border-left: 1px solid rgb(70 70 70 / 22%) !important; }
@media (max-width: 600px) {
    .view-control-pill { right: 8px; max-width: calc(100% - 16px); }
    .view-control-pill > :is(div, button) { padding: 6px 8px !important; font-size: 11px !important; }
}

/* Override the legacy per-ID pill rules: only the shared container is a pill. */
body :is(#diagramControlPill, #depthControlPill, #summaryControlPill, #summaryDepthControlPill).view-control-pill > :is(div, button),
body :is(#diagramControlPill, #depthControlPill, #summaryControlPill, #summaryDepthControlPill).view-control-pill > :is(div, button):hover {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body :is(#diagramControlPill, #depthControlPill, #summaryControlPill, #summaryDepthControlPill).view-control-pill > :is(div, button) + :is(div, button)::before {
    content: ''; position: absolute; left: 0; top: 50%;
    width: 1px; height: 14px; transform: translateY(-50%);
    background: rgb(70 70 70 / 28%); pointer-events: none;
}


/* Start and layout notice share the same translucent surface. */
#launchPrompt, #matrixLayoutPrompt {
    background: rgb(255 255 255 / 78%);
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: 36px;
    box-shadow: 0 12px 40px #00000012;
    padding: 30px;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
}
#matrixLayoutPrompt {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    box-sizing: border-box; width: 860px; max-width: calc(100vw - 32px);
    font-family: 'Roboto Mono', monospace; text-align: center; z-index: 2200;
}
#matrixLayoutPrompt p {
    margin: 10px 0 24px; font-size: 14px; line-height: 1.6; color: #333;
}
#launchPrompt .launch-actions {
    display: flex; align-items: center; justify-content: center;
    width: max-content; max-width: 100%; box-sizing: border-box;
    margin: 30px auto 20px; padding: 6px;
    background: rgb(255 255 255 / 72%);
    border: 1px solid rgb(230 230 230 / 75%);
    border-radius: 999px; box-shadow: 0 3px 12px #0000000b;
}
#launchPrompt .launch-actions button,
#launchPrompt .launch-actions button:hover {
    position: relative; flex: 1 1 auto; min-width: 0;
    background: transparent !important; border: 0 !important;
    border-radius: 0 !important; box-shadow: none !important;
    padding: 10px 18px !important;
}
#launchPrompt .launch-actions button + button::before {
    content: ''; position: absolute; left: 0; top: 50%;
    width: 1px; height: 16px; transform: translateY(-50%);
    background: rgb(70 70 70 / 28%); pointer-events: none;
}
@media (max-width: 600px) {
    #launchPrompt, #matrixLayoutPrompt { padding: 22px 16px; border-radius: 28px; }
    #launchPrompt .launch-actions button { padding: 10px 9px !important; font-size: 11px !important; }
}

/* Context menus use one shared card; only their labels magnify. */
#contextMenu, #depthContextMenu, #webFileMenu .web-actions {
    background: rgb(255 255 255 / 72%) !important;
    border: 1px solid rgb(230 230 230 / 75%) !important;
    border-radius: 22px !important;
    box-shadow: 0 4px 18px #0000000b !important;
    padding: 8px 0 !important;
}
body :is(#contextMenu, #depthContextMenu) button,
body :is(#contextMenu, #depthContextMenu) button:hover:not(:disabled) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}
.context-menu-label {
    display: inline-block;
    transform-origin: left center;
    transition: transform 140ms ease;
}
:is(#contextMenu, #depthContextMenu) button:hover .context-menu-label,
:is(#contextMenu, #depthContextMenu) button:focus-visible .context-menu-label {
    transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) { .context-menu-label { transition: none; } }


/* Reserved canvas menu: magnify the lines, keeping the circular shell fixed. */
body #canvasMenuButton,
body #canvasMenuButton:hover:not(:disabled) {
    position: fixed; right: 22px; top: auto; bottom: 22px; transform: none !important;
    width: 54px; height: 54px; padding: 13px; box-sizing: border-box;
    display: grid; place-items: center; z-index: 900;
    border-radius: 50% !important; cursor: pointer;
}
body #canvasMenuButton[hidden] { display: none; }
#canvasMenuButton svg {
    width: 26px; height: 26px; background: none; border: 0; fill: none;
    stroke: #191919; stroke-width: 1.7; stroke-linecap: round;
    pointer-events: none; transition: transform 140ms ease;
}
#canvasMenuButton:hover svg, #canvasMenuButton:focus-visible svg { transform: scale(1.1); }
@media (max-width: 600px), (max-height: 560px) { body #canvasMenuButton, body #canvasMenuButton:hover:not(:disabled) { right: 10px; } }
@media (prefers-reduced-motion: reduce) { #canvasMenuButton svg { transition: none; } }

body[data-canvas-settings-open="true"] #canvasMenuButton { display: none; }
#defaultsPanel > .collapse-canvas-settings,
#propertyEditor > .collapse-canvas-settings {
    display: grid; place-items: center; width: 30px; height: 30px;
    margin: 0 0 8px auto; padding: 4px;
}
.collapse-canvas-settings svg {
    width: 20px; height: 20px; background: none; border: 0;
    fill: none; stroke: #191919; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}

/* One continuous settings surface; section adapters retain their existing inputs. */
#canvasSettingsPanel {
    position: fixed; right: 22px; top: 80px; bottom: 22px; z-index: 1000;
    width: min(340px, calc(100vw - 32px)); display: flex; flex-direction: column;
    box-sizing: border-box; background: rgb(255 255 255 / 72%);
    border: 1px solid rgb(230 230 230 / 75%); border-radius: 28px;
    box-shadow: 0 4px 18px #0000000b; overflow: hidden;
    font-family: 'Roboto Mono', monospace;
}
/* Discrete display transitions preserve existing panel visibility and focus behavior
   while allowing both opening and closing to finish their motion. */
#canvasSettingsPanel {
    opacity: 1;
    transform: translateX(0) scale(1);
    transform-origin: right center;
    transition: opacity 180ms ease, transform 180ms ease, display 180ms allow-discrete;
}
#canvasSettingsPanel[hidden] {
    display: none;
    opacity: 0;
    transform: translateX(12px) scale(.98);
    pointer-events: none;
}
@starting-style {
    #canvasSettingsPanel:not([hidden]) {
        opacity: 0;
        transform: translateX(12px) scale(.98);
    }
}
@media (prefers-reduced-motion: reduce) {
    #canvasSettingsPanel { transition: none; }
}
.canvas-settings-header { display: flex; justify-content: flex-end; padding: 10px 14px 4px; flex: 0 0 auto; }
.canvas-settings-scroll { overflow-y: auto; min-height: 0; padding: 0 18px 20px; overscroll-behavior: contain; }
#canvasSettingsPanel :is(#propertyEditor, #zoneAttributesPanel, #defaultsPanel) {
    display: block !important; position: static !important; inset: auto !important;
    width: 100% !important; max-height: none !important; box-sizing: border-box;
    background: transparent !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; padding: 12px 0 18px !important; margin: 0 !important;
    overflow: visible !important;
}
#canvasSettingsPanel #defaultsPanel { border-top: 1px solid #00000015 !important; min-height: 100%; }
#canvasSettingsPanel[data-kind="line"] #zoneAttributesPanel { display: none !important; }
#canvasSettingsPanel .collapse-canvas-settings { width: 30px; height: 30px; display: grid; place-items: center; padding: 4px; }
@media (max-width: 600px) { #canvasSettingsPanel { right: 10px; top: 72px; bottom: 22px; } }

/* Keep view controls clear of the settings panel on the right. */
.view-control-pill { left: 22px; right: auto; }
@media (max-width: 600px) { .view-control-pill { left: 10px; right: auto; } }

/* Color fields share one row: label on the left, color pill on the right. */
div:has(> label + input[type="color"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(80px, 38%);
    align-items: center;
    gap: 12px;
}
div:has(> label + input[type="color"]) > label { margin: 0; }
div:has(> label + input[type="color"]) > input[type="color"] {
    width: 100% !important;
    margin: 0;
}

/* Mode remains internal state; omit its canvas badge. */
#modeIndicator { display: none !important; }

/* Bubble entry shares the centered placement instruction position. */
#commandPrompt {
    display: none; position: fixed; right: auto; bottom: auto;
    left: 50%; top: 50%; transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: min(470px, calc(100vw - 24px)); padding: 10px 16px;
    background: rgb(255 255 255 / 72%); color: #191919;
    border: 1px solid rgb(230 230 230 / 75%); border-radius: 999px;
    box-shadow: 0 4px 18px #0000000b; z-index: 2300;
    gap: 12px;
}
#commandPrompt.floating-command-open { display: flex; }
#commandText { font-size: 12px; line-height: 1.4; margin: 0; flex: 0 1 auto; max-width: 55%; }
#commandInput {
    width: 0; flex: 1 1 100px; padding: 6px 0;
    border: 0; border-radius: 0; background: transparent; color: #191919;
    font: 13px/1.4 'Roboto Mono', monospace;
}
#commandInput::placeholder { color: #888; }
#commandInput:focus-visible { outline: none; box-shadow: 0 1px 0 #777; }

/* Bubble text visibility controls: a circle with one outline, no inset frame. */
#zoneAttributesPanel :is(#showZoneName, #showZoneArea, #showZoneElevation, #editZoneEntrance) {
    appearance: none; -webkit-appearance: none;
    border-radius: 50% !important;
    border: 1px solid #777 !important;
    background: transparent !important;
    box-shadow: none !important;
}
#zoneAttributesPanel :is(#showZoneName, #showZoneArea, #showZoneElevation, #editZoneEntrance):checked {
    background: #191919 !important;
}
#zoneAttributesPanel :is(#showZoneName, #showZoneArea, #showZoneElevation, #editZoneEntrance):focus-visible {
    outline: 2px solid #555; outline-offset: 3px;
}

/* Consistent circular swatches for every color picker. */
input[type="color"] {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    justify-self: end;
    flex: 0 0 28px;
    margin-left: auto;
}
input[type="color"]::-webkit-color-swatch { border-radius: 50%; }
input[type="color"]::-moz-color-swatch { border-radius: 50%; }
div:has(> label + input[type="color"]) > input[type="color"] { width: 28px !important; }

/* A slimmer settings surface now that color controls are compact circles. */
#canvasSettingsPanel { width: min(290px, calc(100vw - 32px)); }
.canvas-settings-scroll { padding-left: 14px; padding-right: 14px; }
#canvasSettingsPanel div:has(> label + input[type="color"]) {
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 10px;
}
#canvasSettingsPanel input:not([type="checkbox"]):not([type="color"]),
#canvasSettingsPanel select { box-sizing: border-box; max-width: 100%; }
#canvasSettingsPanel #defaultsPanel > div:last-child {
    display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px;
}
#canvasSettingsPanel #defaultsPanel > div:last-child > div { display: flex; gap: 8px; }
#depthModificationPanel { display: none !important; }
#depthVisualization .depth-bubble { cursor: grab; }
.canvas-selection-overlay { pointer-events: none; }
#summaryDiagramContent .canvas-selection-overlay,
#summaryDepthContent .canvas-selection-overlay { display: none; }

/* Main settings headings are larger than their subsections. */
#canvasSettingsPanel #bubbleSettingsHeading,
#canvasSettingsPanel #defaultsPanel > h3 {
    font-size: 18px !important; font-weight: 700; line-height: 1.35;
    margin: 8px 0 16px !important; padding-bottom: 10px !important;
    border-bottom: 1px solid rgb(0 0 0 / 10%);
}
#canvasSettingsPanel #propertyEditor > h3,
#canvasSettingsPanel #zoneAttributesPanel > h4,
#canvasSettingsPanel #defaultsPanel h4 {
    font-size: 14px !important; line-height: 1.4;
    margin-top: 4px !important; margin-bottom: 12px !important;
}
#canvasSettingsPanel #propertyEditor > h3 { border-bottom: 0 !important; }

.canvas-settings-footer {
    display: flex; justify-content: flex-end;
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid rgb(0 0 0 / 10%);
}

/* Compact typography across the right-click menu and File submenu. */
#contextMenu button { font-size: 12px !important; }


/* Action instructions stay centered and let clicks pass through to the canvas. */
#canvasInstruction, #fileNotification {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    z-index: 1100; max-width: calc(100vw - 40px); box-sizing: border-box;
    padding: 13px 22px; border-radius: 999px;
    background: rgb(255 255 255 / 72%); color: #191919;
    border: 1px solid rgb(230 230 230 / 75%);
    box-shadow: 0 4px 18px #0000000b;
    font: 14px/1.5 'Roboto Mono', monospace; text-align: center;
    pointer-events: none;
}
#canvasInstruction[hidden], #fileNotification[hidden] { display: none; }

/* The entrance toggle shares the swatch column, with a smaller circular control. */
#zoneAttributesPanel .entrance-toggle-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 28px;
    align-items: center; gap: 10px; margin-bottom: 12px;
}
#zoneAttributesPanel #editZoneEntrance {
    width: 18px; height: 18px; box-sizing: border-box; justify-self: center;
    padding: 0 !important; margin: 0 !important; cursor: pointer;
}
#canvasSettingsPanel[data-kind="bubble"][data-bubble-disabled="true"] :is(#bubbleSettingsHeading, #propertyEditor, #zoneAttributesPanel) {
    opacity: .4;
}

/* Entrance state uses an inset dot rather than an extra focus ring. */
#zoneAttributesPanel #editZoneEntrance:checked {
    background: radial-gradient(circle, #191919 0 55%, transparent 58%) !important;
    outline: none;
}
#zoneAttributesPanel #editZoneEntrance:focus-visible {
    outline: none; box-shadow: none !important;
}

/* Editable cluster names reveal their affordance only on hover. */
.cluster-name--editable { cursor: text; transition: background-color 140ms; }
.cluster-name--editable:hover { background-color: rgb(0 0 0 / 4%); }

/* Global attribute switches match the entrance toggle. */
.general-attribute-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 10px; margin: 12px 0; }
#defaultsPanel .bubble-attribute-toggle {
    appearance: none; -webkit-appearance: none; width: 18px; height: 18px;
    box-sizing: border-box; justify-self: center; border-radius: 50%;
    border: 1px solid #777; background: transparent; padding: 0 !important; margin: 0 !important;
    box-shadow: none; outline: none; cursor: pointer;
}
#defaultsPanel .bubble-attribute-toggle:checked { background: radial-gradient(circle, #191919 0 55%, transparent 58%); }
body[data-bubble-name-visible="false"] :is(#depthDiagram, #summaryDiagramContent) g[id] > text:nth-of-type(1),
body[data-bubble-name-visible="false"] :is(#depthVisualization, #summaryDepthContent) .depth-bubble > text:nth-of-type(1),
body[data-bubble-name-visible="false"] .cluster-bubble-entry figcaption > div:nth-child(1) { display: none !important; }
body[data-bubble-area-visible="false"] :is(#depthDiagram, #summaryDiagramContent) g[id] > text:nth-of-type(2),
body[data-bubble-area-visible="false"] :is(#depthVisualization, #summaryDepthContent) .depth-bubble > text:nth-of-type(2),
body[data-bubble-area-visible="false"] .cluster-bubble-entry figcaption > div:nth-child(2) { display: none !important; }
body[data-bubble-elevation-visible="false"] :is(#depthDiagram, #summaryDiagramContent) g[id] > text:nth-of-type(3),
body[data-bubble-elevation-visible="false"] :is(#depthVisualization, #summaryDepthContent) .depth-bubble > text:nth-of-type(3),
body[data-bubble-elevation-visible="false"] .cluster-bubble-entry figcaption > div:nth-child(3) { display: none !important; }

.bubble-text-size-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 38px; align-items: center; gap: 8px; margin: -4px 0 18px; font-size: 11px; }
.bubble-text-size-row input { width: 100%; min-width: 0; }
.bubble-text-size-row span { text-align: right; }
:is(#depthDiagram, #summaryDiagramContent) g[id] > text:nth-of-type(1),
:is(#depthVisualization, #summaryDepthContent) .depth-bubble > text:nth-of-type(1) { font-size: var(--bubble-name-font-size, 16px); }
:is(#depthDiagram, #summaryDiagramContent) g[id] > text:nth-of-type(2),
:is(#depthVisualization, #summaryDepthContent) .depth-bubble > text:nth-of-type(2) { font-size: var(--bubble-area-font-size, 12px); }
:is(#depthDiagram, #summaryDiagramContent) g[id] > text:nth-of-type(3),
:is(#depthVisualization, #summaryDepthContent) .depth-bubble > text:nth-of-type(3) { font-size: var(--bubble-elevation-font-size, 12px); }

.bubble-text-spacing-row { margin-top: 8px; }
.cluster-bubble-entry figcaption { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 1px; }

/* Pointer-adjacent feedback for a blocked matrix-layout drag. */
.matrix-lock-warning {
    position: fixed; z-index: 2400; pointer-events: none;
    box-sizing: border-box; max-width: calc(100vw - 16px);
    padding: 10px 16px; border-radius: 999px;
    background: rgb(255 255 255 / 88%); color: #79500b;
    border: 1px solid rgb(194 145 55 / 40%);
    box-shadow: 0 4px 18px #0000000b; backdrop-filter: blur(12px);
    font: 12px/1.4 Arial, sans-serif;
}

/* Keep transient file feedback clear of an active creation instruction. */
#fileNotification { top: calc(50% + 66px); }

/* Settings actions sit directly on the shared translucent panel. */
body #canvasSettingsPanel button,
body #canvasSettingsPanel button:is(:hover, :focus, :focus-visible, :active) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}
/* Toolbar actions use their existing text/icon feedback without focus rings. */
body :is(#canvasMenuButton, #sceneToolbar button, .view-control-pill button, .view-control-pill > div):is(:focus, :focus-visible, :active) {
    outline: none !important;
    box-shadow: none !important;
}

/* Override shared pill hover rules as well as legacy inline hover colors. */
body #canvasSettingsPanel button:hover:not(:disabled) {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transform: scale(1.05) !important;
}
body #canvasSettingsPanel .collapse-canvas-settings {
    transform: scale(1) !important;
    transition: transform 140ms ease !important;
}
body #canvasSettingsPanel .collapse-canvas-settings:hover:not(:disabled) {
    transform: scale(1.1) !important;
}
@media (prefers-reduced-motion: reduce) {
    body #canvasSettingsPanel .collapse-canvas-settings { transition: none !important; }
}

/* Draw every track with the same crisp black stroke, independent of row layout. */
input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #000;
    cursor: pointer;
}
input[type="range"],
input[type="range"]:is(:hover, :focus, :focus-visible, :active) {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 20px;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10H100' fill='none' stroke='%23000' stroke-width='1' vector-effect='non-scaling-stroke' shape-rendering='crispEdges'/%3E%3C/svg%3E") center / 100% 20px no-repeat;
}
input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border: 0;
    border-radius: 50%;
    background: #000;
    box-shadow: none;
}
input[type="range"]::-moz-range-track {
    height: 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10H100' fill='none' stroke='%23000' stroke-width='1' vector-effect='non-scaling-stroke' shape-rendering='crispEdges'/%3E%3C/svg%3E") center / 100% 20px no-repeat;
}
input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: #000;
    box-shadow: none;
}
input[type="range"]:disabled { opacity: .35; cursor: default; }

/* Buttons use text/icon feedback without focus boxes throughout the app. */
html body button,
html body button:is(:focus, :focus-visible, :active) {
    outline: none !important;
}
html body button:is(:focus, :focus-visible, :active) {
    box-shadow: none !important;
}

/* Keep settings scrollable without a visible scrollbar. */
#canvasSettingsPanel .canvas-settings-scroll {
    scrollbar-width: none;
}
#canvasSettingsPanel .canvas-settings-scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* All controls in the bottom toolbars share one type style. */
.view-control-pill > :is(div, button) { font: 12px Arial, sans-serif !important; }
@media (max-width: 600px) {
    .view-control-pill > :is(div, button) { font-size: 11px !important; }
}
