:root {
    color-scheme: dark;
    --page: #090d12;
    --surface: #11171f;
    --surface-2: #151c25;
    --surface-3: #1a222d;
    --surface-glass: rgba(17, 23, 31, 0.9);
    --line: rgba(165, 184, 211, 0.14);
    --line-strong: rgba(165, 184, 211, 0.24);
    --text: #f5f7fb;
    --text-soft: #b8c0cd;
    --text-muted: #7e8999;
    --blue: #315fe8;
    --blue-bright: #4c79ff;
    --violet: #7665ec;
    --aqua: #32d6d1;
    --success: #66dfb0;
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --header-height: 64px;
    --shadow: 0 18px 52px rgba(0, 0, 0, 0.32);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 320px;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 78% -20%, rgba(58, 91, 172, 0.2), transparent 34%),
        var(--page);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button,
select,
input[type="range"] {
    touch-action: manipulation;
}

button,
a,
select,
input {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mobile-only {
    display: none;
}

.app-shell {
    width: 100%;
    max-width: 100vw;
    min-height: 100%;
    height: 100dvh;
    overflow-x: clip;
}

.app-header {
    height: var(--header-height);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 13, 18, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: relative;
    z-index: 30;
}

.brand-mark {
    width: auto;
    max-width: min(470px, 70vw);
    height: 48px;
    padding: 0 9px 0 2px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 13px;
    transition: background-color 160ms ease, transform 160ms ease;
}

.brand-mark:hover {
    background: rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
}

.brand-mark:focus-visible,
.view-surface:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--blue-bright);
    outline-offset: 2px;
}

.brand-mark img {
    display: block;
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-copy {
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    overflow: hidden;
    white-space: nowrap;
}

.brand-copy strong {
    color: #f3f6fb;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.14em;
}

.brand-copy small {
    overflow: hidden;
    color: #98a6b9;
    font-size: 11px;
    text-overflow: ellipsis;
}

.header-note {
    min-height: 34px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.status-dot,
.viewport-badge-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 13px rgba(102, 223, 176, 0.75);
}

.workspace {
    width: 100%;
    max-width: 100vw;
    height: calc(100dvh - var(--header-height));
    min-width: 0;
    min-height: 0;
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 84px;
    grid-template-areas:
        "controls viewer"
        "controls download";
    gap: 10px;
    overflow: hidden;
}

.viewer-panel,
.control-panel,
.download-panel {
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--line);
    background: linear-gradient(155deg, rgba(23, 30, 40, 0.96), rgba(13, 18, 25, 0.98));
    box-shadow: var(--shadow);
}

.viewer-panel {
    grid-area: viewer;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.studio-viewer {
    width: 100%;
    height: 100%;
    min-height: 330px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(77, 94, 120, 0.2), transparent 45%),
        linear-gradient(150deg, #202731 0%, #111720 42%, #090e14 100%);
}

.studio-viewer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.025) 43%, transparent 52%),
        radial-gradient(circle at 17% 16%, rgba(103, 122, 160, 0.11), transparent 31%);
    pointer-events: none;
}

.view-surface {
    min-width: 0;
    min-height: 0;
    position: absolute;
    overflow: hidden;
    background: #0e151e;
    transition:
        width 220ms ease,
        height 220ms ease,
        right 220ms ease,
        bottom 220ms ease,
        border-radius 220ms ease,
        border-color 160ms ease,
        box-shadow 220ms ease,
        transform 180ms ease;
}

.view-surface.is-primary {
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.view-surface.is-thumbnail {
    right: 18px;
    bottom: 18px;
    z-index: 20;
    width: clamp(190px, 24%, 285px);
    height: auto;
    aspect-ratio: 16 / 10;
    border: 1px solid rgba(125, 151, 196, 0.54);
    border-radius: 13px;
    background: #0a1017;
    box-shadow:
        0 20px 46px rgba(0, 0, 0, 0.54),
        0 0 0 4px rgba(48, 65, 89, 0.64);
    cursor: pointer;
}

.view-surface.is-thumbnail:hover {
    border-color: rgba(126, 111, 255, 0.92);
    box-shadow:
        0 24px 54px rgba(0, 0, 0, 0.62),
        0 0 0 4px rgba(92, 76, 210, 0.42);
    transform: translateY(-3px) scale(1.012);
}

.view-surface-3d {
    background:
        radial-gradient(ellipse at 50% 52%, rgba(77, 94, 120, 0.18), transparent 48%),
        #101720;
}

.view-surface-2d {
    background:
        radial-gradient(circle at 70% 22%, rgba(68, 100, 154, 0.16), transparent 34%),
        linear-gradient(145deg, #101924, #091019 72%);
}

.view-thumbnail-action {
    display: none;
}

.view-surface.is-thumbnail .view-thumbnail-action {
    position: absolute;
    inset: 0;
    z-index: 30;
    padding: 11px 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    color: rgba(241, 245, 252, 0.9);
    background: linear-gradient(180deg, transparent 44%, rgba(4, 8, 13, 0.88));
    pointer-events: none;
}

.view-thumbnail-action span {
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.15em;
}

.view-thumbnail-action strong {
    color: #9e96ff;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.05em;
}

.view-surface.is-thumbnail .viewport-help,
.view-surface.is-thumbnail .axis-widget,
.view-surface.is-thumbnail .viewport-badge {
    opacity: 0;
    visibility: hidden;
}

.view-surface-3d.is-primary .viewport-badge {
    right: auto;
    left: 18px;
}

#studio-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    outline: none;
}

.view-surface.is-thumbnail #studio-canvas {
    cursor: pointer;
}

#studio-canvas:active {
    cursor: grabbing;
}

.viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-soft);
    background: rgba(9, 13, 18, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 12;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.viewer-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.viewer-loading.is-error .loading-ring {
    display: none;
}

.loading-ring {
    width: 21px;
    height: 21px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--blue-bright);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.viewport-help {
    position: absolute;
    z-index: 5;
    color: rgba(234, 239, 247, 0.72);
    border: 1px solid rgba(208, 220, 239, 0.11);
    background: rgba(12, 17, 24, 0.62);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    pointer-events: none;
}

.viewport-help-desktop {
    top: 18px;
    left: 18px;
    padding: 10px 13px;
    display: grid;
    gap: 7px;
    border-radius: 11px;
    font-size: 12px;
}

.viewport-help-desktop span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.viewport-help-desktop b {
    width: 15px;
    text-align: center;
    color: var(--text);
    font-weight: 500;
}

.viewport-help-mobile {
    display: none;
}

.axis-widget {
    position: absolute;
    top: 20px;
    right: 22px;
    width: 66px;
    height: 62px;
    z-index: 5;
    font-size: 11px;
    font-weight: 700;
    pointer-events: none;
}

.axis-widget::before,
.axis-widget::after {
    content: "";
    position: absolute;
    left: 31px;
    top: 27px;
    width: 30px;
    height: 2px;
    transform-origin: left center;
    border-radius: 2px;
}

.axis-widget::before {
    background: #ed5159;
    transform: rotate(12deg);
}

.axis-widget::after {
    background: #566dff;
    transform: rotate(150deg);
}

.axis-widget i {
    position: absolute;
    left: 28px;
    top: 24px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd3de;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.axis-widget i::before {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 2px;
    height: 27px;
    background: #73da55;
    border-radius: 2px;
}

.axis {
    position: absolute;
}

.axis-x { right: 0; top: 25px; color: #f2696f; }
.axis-y { left: 27px; top: -1px; color: #83e966; }
.axis-z { left: 0; top: 40px; color: #7181ff; }

.viewport-badge {
    position: absolute;
    right: 18px;
    bottom: 17px;
    z-index: 5;
    min-height: 30px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(227, 234, 244, 0.75);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(10, 14, 20, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 11px;
    pointer-events: none;
}

.viewport-badge-dot {
    width: 6px;
    height: 6px;
}

.design-stage,
.design-svg {
    width: 100%;
    height: 100%;
}

.design-stage {
    position: relative;
    overflow: hidden;
}

.design-svg {
    display: block;
}

.design-side-layer,
.design-top-section {
    transition: opacity 160ms ease, visibility 160ms ease;
}

.design-top-section {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.is-top-section .design-side-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.is-top-section .design-top-section {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.design-section-axis {
    stroke: rgba(111, 124, 146, 0.34);
    stroke-width: 1;
    stroke-dasharray: 7 8;
    vector-effect: non-scaling-stroke;
}

.design-section-fill {
    fill: url(#design-body-gradient);
    stroke: none;
}

.design-section-inner {
    fill: rgba(9, 14, 20, 0.92);
    stroke: rgba(98, 213, 211, 0.64);
    stroke-width: 1.5;
    stroke-dasharray: 5 5;
    vector-effect: non-scaling-stroke;
}

.design-section-outline {
    fill: none;
    stroke: rgba(158, 189, 231, 0.94);
    stroke-width: 2.5;
    stroke-linejoin: round;
    filter: url(#design-glow);
    vector-effect: non-scaling-stroke;
}

.design-section-width-dimension text,
.design-section-depth-dimension text {
    text-anchor: middle;
}

.design-section-depth-dimension text {
    transform-box: fill-box;
    transform-origin: center;
    transform: rotate(-90deg);
}

.design-grid path {
    fill: none;
    stroke: rgba(139, 163, 199, 0.08);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.design-center-line {
    stroke: rgba(111, 124, 146, 0.32);
    stroke-width: 1;
    stroke-dasharray: 7 8;
    vector-effect: non-scaling-stroke;
}

.design-body-fill {
    fill: url(#design-body-gradient);
    stroke: none;
}

.design-body-outline,
.design-inner-path,
.design-base-underside-path {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.design-body-outline {
    stroke: rgba(158, 189, 231, 0.9);
    stroke-width: 2.2;
    filter: url(#design-glow);
}

.design-body-profile-path {
    fill: none;
    stroke: rgba(73, 215, 174, 0.78);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#design-glow);
    pointer-events: none;
    vector-effect: non-scaling-stroke;
}

.design-body-profile-points circle {
    fill: #49d7ae;
    stroke: #effff9;
    stroke-width: 2.6;
    cursor: grab;
    touch-action: none;
    filter: url(#design-glow);
    transition: r 120ms ease, fill 120ms ease, stroke-width 120ms ease;
    vector-effect: non-scaling-stroke;
}

.design-body-profile-points circle:hover,
.design-body-profile-points circle.is-selected {
    r: 9px;
    fill: #66dfb0;
    stroke-width: 3.5;
}

.is-editing-body-profile .design-body-profile-points circle.is-selected {
    cursor: grabbing;
}

.design-inner-path {
    stroke: rgba(98, 213, 211, 0.54);
    stroke-width: 1.25;
    stroke-dasharray: 4 5;
}

.design-base-underside-path {
    stroke: rgba(116, 239, 224, 0.78);
    stroke-width: 1.4;
    stroke-dasharray: 3 4;
}

.design-support-fill {
    fill: url(#design-support-gradient);
    stroke: none;
}

.design-support-outline {
    fill: none;
    stroke: rgba(127, 153, 248, 0.92);
    stroke-width: 2.1;
    stroke-linejoin: round;
    filter: url(#design-glow);
    vector-effect: non-scaling-stroke;
}

.design-rim-profile {
    fill: none;
    stroke: #74efe0;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#design-glow);
    vector-effect: non-scaling-stroke;
}

.design-lid-fill,
.design-top-lid-fill {
    fill: url(#design-lid-gradient);
    stroke: none;
}

.design-lid-outline,
.design-top-lid-outline,
.design-lid-profile-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.design-lid-outline,
.design-top-lid-outline {
    stroke: rgba(255, 190, 103, 0.92);
    stroke-width: 2.5;
    filter: url(#design-glow);
}

.design-lid-profile-path {
    stroke: #ff8bab;
    stroke-width: 3;
    filter: url(#design-glow);
}

.design-lid-points circle {
    fill: #121a25;
    stroke: #ff8bab;
    stroke-width: 2.4;
    cursor: grab;
    touch-action: none;
    vector-effect: non-scaling-stroke;
    transition: r 120ms ease, fill 120ms ease, stroke-width 120ms ease;
}

.design-lid-points circle.is-anchor {
    fill: #ffbd5f;
    stroke: #fff3dd;
    stroke-width: 3;
}

.design-lid-points circle:hover,
.design-lid-points circle.is-selected {
    r: 10px;
    stroke: #ffffff;
    stroke-width: 3.5;
    filter: url(#design-glow);
}

.is-editing-lid .design-lid-points circle.is-selected {
    cursor: grabbing;
}

.design-pattern-lines path,
.design-pattern-lines line {
    fill: none;
    stroke: #7e8df8;
    stroke-width: 1.35;
    vector-effect: non-scaling-stroke;
}

.design-svg-relief-images {
    pointer-events: none;
}

.design-svg-relief-images image {
    filter: drop-shadow(0 0 4px rgba(99, 226, 220, 0.34));
    mix-blend-mode: screen;
}

.design-handle-shadow,
.design-handle-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.design-handle-shadow {
    stroke: rgba(27, 46, 73, 0.78);
}

.design-handle-path {
    stroke: url(#design-handle-gradient);
    filter: url(#design-glow);
}

.design-handle-points circle {
    vector-effect: non-scaling-stroke;
    cursor: grab;
    touch-action: none;
    transition: r 120ms ease, fill 120ms ease, stroke 120ms ease;
}

.design-handle-points circle:hover,
.design-handle-points circle.is-selected {
    r: 10px;
}

.design-handle-points .is-control {
    fill: #111a27;
    stroke: #9d95ff;
    stroke-width: 2;
}

.design-handle-points .is-anchor {
    fill: #47d8d1;
    stroke: rgba(237, 255, 255, 0.92);
    stroke-width: 2.5;
}

.design-handle-points .is-primary {
    fill: #66dfb0;
    stroke: #effff9;
    stroke-width: 3;
}

.design-handle-points .is-secondary {
    fill: #43d4d1;
}

.design-handle-points .is-free {
    fill: #ffb85c;
    stroke: #fff1d8;
    stroke-width: 2.5;
}

.design-handle-points circle.is-selected {
    stroke: #ffffff;
    stroke-width: 3.5;
    filter: url(#design-glow);
}

.is-editing-handle .design-handle-points circle.is-selected {
    cursor: grabbing;
}

.design-spout-shadow,
.design-spout-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.design-spout-shadow {
    stroke: rgba(22, 41, 62, 0.86);
    stroke-width: 10;
}

.design-spout-path {
    stroke: #ffb85c;
    stroke-width: 4;
    filter: url(#design-glow);
}

.design-spout-mirror {
    opacity: 0.52;
    pointer-events: none;
}

.design-spout-points circle {
    fill: #121a25;
    stroke: #ffb85c;
    stroke-width: 2.4;
    cursor: grab;
    touch-action: none;
    vector-effect: non-scaling-stroke;
    transition: r 120ms ease, fill 120ms ease, stroke-width 120ms ease;
}

.design-spout-points circle.is-anchor {
    fill: #ffd166;
    stroke: #fff5dc;
    stroke-width: 3;
}

.design-spout-points circle:hover,
.design-spout-points circle.is-selected {
    r: 10px;
    stroke: #ffffff;
    stroke-width: 3.5;
    filter: url(#design-glow);
}

.is-editing-spout .design-spout-points circle.is-selected {
    cursor: grabbing;
}

.design-dimension line {
    stroke: rgba(170, 187, 214, 0.44);
    stroke-width: 1;
    stroke-dasharray: 3 4;
    vector-effect: non-scaling-stroke;
}

.design-dimension text {
    fill: rgba(183, 198, 220, 0.72);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.design-height-dimension text {
    text-anchor: middle;
    transform-box: fill-box;
    transform-origin: center;
    transform: rotate(-90deg);
}

.design-rim-dimension text {
    text-anchor: middle;
}

.design-belly-dimension text {
    font-size: 12px;
}

.design-view-heading {
    position: absolute;
    top: 17px;
    left: 18px;
    z-index: 4;
    min-height: 34px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(228, 235, 246, 0.84);
    border: 1px solid rgba(150, 174, 212, 0.15);
    border-radius: 999px;
    background: rgba(7, 12, 18, 0.64);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.design-view-heading,
.design-legend,
.design-empty-state,
.component-editor-rail {
    user-select: none;
    -webkit-user-select: none;
}

.design-legend,
.design-empty-state {
    pointer-events: none;
}

.design-view-heading span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.13em;
}

.design-view-heading i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aqua);
    box-shadow: 0 0 12px rgba(50, 214, 209, 0.72);
}

.design-view-heading small {
    color: #707e92;
    font-size: 8px;
    letter-spacing: 0.12em;
}

.design-plane-switch {
    padding: 2px;
    display: none;
    gap: 2px !important;
    border: 1px solid rgba(150, 174, 212, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.has-horizontal-handle .design-plane-switch,
.has-planar-component .design-plane-switch {
    display: inline-flex;
}

.design-plane-switch button {
    min-width: 38px;
    min-height: 22px;
    padding: 0 7px;
    color: #748196;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 7px;
    font-weight: 760;
    letter-spacing: 0.09em;
    cursor: pointer;
}

.design-plane-switch button.is-active {
    color: #e9fffb;
    background: rgba(50, 214, 209, 0.16);
    box-shadow: inset 0 0 0 1px rgba(50, 214, 209, 0.28);
}

.is-top-section .body-profile-reset,
.is-top-section .rim-editor,
.is-top-section .support-editor,
.is-top-section .design-empty-state,
.is-top-section .design-legend {
    display: none !important;
}

.design-handle-instances {
    opacity: 0.38;
    filter: none;
    pointer-events: none;
}

.body-profile-reset {
    min-height: 22px;
    padding: 0 7px;
    color: #82e7c3;
    border: 1px solid rgba(73, 215, 174, 0.28);
    border-radius: 999px;
    background: rgba(73, 215, 174, 0.06);
    font-size: 7px;
    font-weight: 720;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.body-profile-reset:disabled {
    opacity: 0.34;
    cursor: default;
}

.component-editor-rail {
    position: absolute;
    top: 16px;
    right: 14px;
    bottom: 185px;
    z-index: 8;
    width: 320px;
    min-height: 0;
    padding: 0 4px 4px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(118, 101, 236, 0.46) transparent;
    scrollbar-width: thin;
    pointer-events: none;
}

.component-editor-rail > * {
    flex: 0 0 auto;
    pointer-events: auto;
}

.component-editor-rail .handle-editor,
.component-editor-rail .spout-editor,
.component-editor-rail .lid-editor,
.component-editor-rail .rim-editor,
.component-editor-rail .support-editor {
    position: relative;
    inset: auto;
}

.handle-editor {
    position: absolute;
    top: 62px;
    left: 18px;
    z-index: 7;
    width: min(310px, calc(100% - 36px));
    padding: 10px;
    display: none;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    border: 1px solid rgba(139, 155, 255, 0.22);
    border-left: 2px solid rgba(118, 101, 236, 0.84);
    border-radius: 9px;
    background: rgba(7, 12, 18, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.view-surface-2d.is-primary.has-handle .handle-editor {
    display: grid;
}

.handle-editor.is-collapsed,
.spout-editor.is-collapsed,
.lid-editor.is-collapsed {
    width: 230px;
    min-height: 48px;
    padding: 7px 9px;
}

.handle-editor.is-collapsed .handle-edit-action,
.handle-editor.is-collapsed > em,
.spout-editor.is-collapsed .spout-edit-action,
.spout-editor.is-collapsed > em,
.lid-editor.is-collapsed .lid-edit-action,
.lid-editor.is-collapsed > em {
    display: none;
}

.lid-editor.is-collapsed .lid-editor-content {
    display: none;
}

.spout-editor {
    position: absolute;
    top: 62px;
    left: 300px;
    z-index: 7;
    width: min(310px, calc(100% - 36px));
    padding: 10px;
    display: none;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    border: 1px solid rgba(255, 184, 92, 0.26);
    border-left: 2px solid rgba(255, 184, 92, 0.88);
    border-radius: 9px;
    background: rgba(7, 12, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.view-surface-2d.is-primary.has-spout .spout-editor {
    display: grid;
}

.spout-editor-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spout-editor-copy strong {
    color: #f7e8d0;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.12em;
}

.spout-editor-copy small {
    overflow: hidden;
    color: #a58b70;
    font-size: 7px;
    letter-spacing: 0.07em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spout-editor-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spout-editor-actions button {
    min-height: 26px;
    padding: 0 7px;
    color: #ffc477;
    border: 1px solid rgba(255, 184, 92, 0.26);
    border-radius: 6px;
    background: rgba(255, 184, 92, 0.08);
    cursor: pointer;
    font-size: 7px;
    font-weight: 650;
}

.spout-editor-toggle {
    color: #ffd095 !important;
    border-color: rgba(255, 184, 92, 0.5) !important;
    background: rgba(255, 184, 92, 0.12) !important;
}

.spout-editor-actions button:disabled {
    opacity: 0.32;
    cursor: default;
}

.spout-editor em {
    grid-column: 1 / -1;
    color: #897863;
    font-size: 8px;
    font-style: normal;
}

.lid-editor {
    position: absolute;
    top: 62px;
    left: 18px;
    z-index: 7;
    width: min(310px, calc(100% - 36px));
    padding: 10px;
    display: none;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    border: 1px solid rgba(255, 128, 170, 0.26);
    border-left: 2px solid rgba(255, 139, 171, 0.88);
    border-radius: 9px;
    background: rgba(7, 12, 18, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.view-surface-2d.is-primary.has-lid .lid-editor {
    display: grid;
}

.lid-editor-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lid-editor-copy strong {
    color: #ffe1ea;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.12em;
}

.lid-editor-copy small {
    overflow: hidden;
    color: #ac7d8e;
    font-size: 7px;
    letter-spacing: 0.07em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lid-editor-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lid-editor-actions button {
    min-height: 26px;
    padding: 0 7px;
    color: #ffacc4;
    border: 1px solid rgba(255, 139, 171, 0.28);
    border-radius: 6px;
    background: rgba(255, 139, 171, 0.08);
    cursor: pointer;
    font-size: 7px;
    font-weight: 650;
}

.lid-editor-actions button:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(255, 139, 171, 0.62);
    background: rgba(255, 139, 171, 0.2);
}

.lid-editor-actions button:disabled {
    opacity: 0.32;
    cursor: default;
}

.lid-editor-toggle {
    color: #ffd0dd !important;
    border-color: rgba(255, 139, 171, 0.52) !important;
    background: rgba(255, 139, 171, 0.13) !important;
}

.lid-editor-content {
    grid-column: 1 / -1;
    min-width: 0;
}

#lid-profile-svg {
    width: 100%;
    height: 178px;
    margin-top: 3px;
    display: block;
    overflow: visible;
    border: 1px solid rgba(139, 163, 199, 0.1);
    border-radius: 8px;
    background: rgba(15, 24, 36, 0.72);
    touch-action: none;
}

.lid-editor-grid {
    fill: none;
    stroke: rgba(139, 163, 199, 0.08);
    stroke-width: 1;
    pointer-events: none;
}

.lid-editor-envelope {
    fill: rgba(255, 86, 122, 0.025);
    stroke: rgba(255, 91, 124, 0.7);
    stroke-width: 1.3;
    stroke-dasharray: 5 4;
    pointer-events: none;
}

.lid-editor-baseline {
    stroke: rgba(255, 139, 171, 0.28);
    stroke-width: 1.1;
    stroke-dasharray: 4 4;
    pointer-events: none;
}

.lid-profile-exterior,
.lid-profile-exterior-shadow,
.lid-profile-interior {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.lid-profile-exterior-shadow {
    stroke: rgba(18, 34, 58, 0.9);
    stroke-width: 11;
}

.lid-profile-exterior {
    stroke: url(#lid-exterior-gradient);
    stroke-width: 5;
    filter: url(#lid-profile-glow);
}

.lid-profile-interior {
    stroke: rgba(182, 128, 255, 0.9);
    stroke-width: 2.4;
    stroke-dasharray: 4 3;
}

.lid-profile-points circle {
    cursor: grab;
    touch-action: none;
    transition: r 120ms ease, fill 120ms ease, stroke 120ms ease;
}

.lid-profile-points circle:hover,
.lid-profile-points circle.is-selected {
    r: 7.5px;
}

.lid-profile-points .is-control {
    fill: #101a29;
    stroke: #60bfff;
    stroke-width: 2.2;
}

.lid-profile-points .is-anchor {
    fill: #ff8bab;
    stroke: #fff1f5;
    stroke-width: 2.4;
    cursor: not-allowed;
}

.lid-profile-points circle.is-selected {
    stroke: #ffffff;
    stroke-width: 3;
    filter: url(#design-glow);
}

.is-editing-lid .lid-profile-points circle.is-selected {
    cursor: grabbing;
}

.lid-editor-label {
    fill: rgba(163, 182, 207, 0.56);
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-anchor: middle;
}

.lid-editor-content > em {
    margin-top: 7px;
    display: block;
    grid-column: 1 / -1;
    color: #916c79;
    font-size: 8px;
    font-style: normal;
}

.handle-editor-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.handle-editor-copy strong {
    color: #dce5f2;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.12em;
}

.handle-editor-copy small {
    overflow: hidden;
    color: #7f8da2;
    font-size: 7px;
    letter-spacing: 0.07em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.handle-editor-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.handle-editor-actions button {
    min-height: 26px;
    padding: 0 7px;
    color: #aaa3ff;
    border: 1px solid rgba(139, 128, 255, 0.24);
    border-radius: 6px;
    background: rgba(118, 101, 236, 0.08);
    cursor: pointer;
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.handle-editor-toggle {
    color: #c0bbff !important;
    border-color: rgba(139, 128, 255, 0.5) !important;
    background: rgba(118, 101, 236, 0.13) !important;
}

.handle-editor-actions button:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(139, 128, 255, 0.6);
    background: rgba(118, 101, 236, 0.22);
}

.handle-editor-actions button:disabled {
    opacity: 0.32;
    cursor: default;
}

.handle-editor em {
    grid-column: 1 / -1;
    color: #6f7d91;
    font-size: 8px;
    font-style: normal;
}

.rim-editor {
    position: absolute;
    top: 17px;
    right: 18px;
    z-index: 8;
    width: 310px;
    padding: 10px;
    display: none;
    border: 1px solid rgba(71, 216, 209, 0.24);
    border-right: 2px solid rgba(71, 216, 209, 0.82);
    border-radius: 11px;
    background: rgba(7, 12, 18, 0.84);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
}

.rim-editor.is-collapsed {
    width: 230px;
    padding: 7px 9px;
}

.view-surface-2d.is-primary .rim-editor {
    display: block;
}

.rim-editor-heading {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rim-editor.is-collapsed .rim-editor-heading {
    min-height: 34px;
}

.rim-editor-heading > span:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rim-editor-heading strong {
    color: #dce5f2;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.12em;
}

.rim-editor-heading small {
    overflow: hidden;
    color: #6e9d9e;
    font-size: 7px;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rim-editor-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rim-editor-actions button {
    min-height: 25px;
    padding: 0 6px;
    color: #6fe4dc;
    border: 1px solid rgba(71, 216, 209, 0.22);
    border-radius: 6px;
    background: rgba(71, 216, 209, 0.07);
    cursor: pointer;
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.035em;
}

.rim-editor-actions button:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(71, 216, 209, 0.58);
    background: rgba(71, 216, 209, 0.18);
}

.rim-editor-actions button:disabled {
    opacity: 0.3;
    cursor: default;
}

.rim-editor-toggle {
    color: #68ece2 !important;
    border-color: rgba(71, 216, 209, 0.5) !important;
    background: rgba(71, 216, 209, 0.11) !important;
}

.rim-editor-content {
    display: block;
}

.rim-editor.is-collapsed .rim-editor-content,
.rim-editor.is-collapsed .rim-edit-action {
    display: none;
}

#rim-profile-svg {
    width: 100%;
    height: 132px;
    margin-top: 5px;
    display: block;
    overflow: visible;
    border: 1px solid rgba(139, 163, 199, 0.09);
    border-radius: 8px;
    background: rgba(15, 24, 36, 0.7);
    touch-action: none;
}

.rim-editor-grid {
    fill: none;
    stroke: rgba(139, 163, 199, 0.09);
    stroke-width: 1;
}

.rim-editor-baseline {
    stroke: rgba(116, 239, 224, 0.36);
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
}

.rim-profile-shadow,
.rim-profile-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rim-profile-shadow {
    stroke: rgba(18, 43, 54, 0.86);
    stroke-width: 13;
}

.rim-profile-path {
    stroke: url(#rim-profile-gradient);
    stroke-width: 6;
    filter: url(#rim-profile-glow);
}

.rim-profile-points circle {
    cursor: grab;
    touch-action: none;
    transition: r 120ms ease, fill 120ms ease, stroke 120ms ease;
}

.rim-profile-points circle:hover,
.rim-profile-points circle.is-selected {
    r: 8px;
}

.rim-profile-points .is-control {
    fill: #111a27;
    stroke: #a59dff;
    stroke-width: 2;
}

.rim-profile-points .is-anchor {
    fill: #47d8d1;
    stroke: #effff9;
    stroke-width: 2.4;
    cursor: not-allowed;
}

.rim-profile-points circle.is-selected {
    stroke: #ffffff;
    stroke-width: 3;
    filter: url(#design-glow);
}

.is-editing-rim .rim-profile-points circle.is-selected {
    cursor: grabbing;
}

.rim-editor-label {
    fill: rgba(163, 182, 207, 0.54);
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-anchor: middle;
}

.rim-editor-content > em {
    margin-top: 7px;
    display: block;
    color: #6f7d91;
    font-size: 8px;
    font-style: normal;
}

.support-editor {
    position: absolute;
    left: 18px;
    bottom: 58px;
    z-index: 8;
    width: 310px;
    padding: 10px;
    display: none;
    border: 1px solid rgba(125, 112, 255, 0.25);
    border-left: 2px solid rgba(125, 112, 255, 0.86);
    border-radius: 11px;
    background: rgba(7, 12, 18, 0.86);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
}

.support-editor.is-collapsed {
    width: 230px;
    padding: 7px 9px;
}

.view-surface-2d.is-primary.has-support .support-editor {
    display: block;
}

.support-editor-heading {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.support-editor.is-collapsed .support-editor-heading {
    min-height: 34px;
}

.support-editor-heading > span:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.support-editor-heading strong {
    color: #dce5f2;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.12em;
}

.support-editor-heading small {
    overflow: hidden;
    color: #8e89d5;
    font-size: 7px;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-editor-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.support-editor-actions button {
    min-height: 25px;
    padding: 0 6px;
    color: #aaa3ff;
    border: 1px solid rgba(139, 128, 255, 0.25);
    border-radius: 6px;
    background: rgba(118, 101, 236, 0.08);
    cursor: pointer;
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.035em;
}

.support-editor-actions button:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(139, 128, 255, 0.62);
    background: rgba(118, 101, 236, 0.22);
}

.support-editor-actions button:disabled {
    opacity: 0.3;
    cursor: default;
}

.support-editor-toggle {
    color: #b0aaff !important;
    border-color: rgba(139, 128, 255, 0.52) !important;
    background: rgba(118, 101, 236, 0.13) !important;
}

.support-editor-content {
    display: block;
}

.support-editor.is-collapsed .support-editor-content,
.support-editor.is-collapsed .support-edit-action {
    display: none;
}

#support-profile-svg {
    width: 100%;
    height: 182px;
    margin-top: 5px;
    display: block;
    overflow: visible;
    border: 1px solid rgba(139, 163, 199, 0.09);
    border-radius: 8px;
    background: rgba(15, 24, 36, 0.72);
    touch-action: none;
}

.support-editor-grid {
    fill: none;
    stroke: rgba(139, 163, 199, 0.09);
    stroke-width: 1;
}

.support-editor-axis {
    stroke: rgba(116, 239, 224, 0.34);
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
}

.support-profile-shadow,
.support-profile-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.support-profile-shadow {
    stroke: rgba(20, 35, 62, 0.88);
    stroke-width: 13;
}

.support-profile-path {
    stroke: url(#support-profile-gradient);
    stroke-width: 6;
    filter: url(#support-profile-glow);
}

.support-profile-points circle {
    cursor: grab;
    touch-action: none;
    transition: r 120ms ease, fill 120ms ease, stroke 120ms ease;
}

.support-profile-points circle:hover,
.support-profile-points circle.is-selected {
    r: 8px;
}

.support-profile-points .is-control {
    fill: #111a27;
    stroke: #aaa3ff;
    stroke-width: 2;
}

.support-profile-points .is-anchor {
    fill: #47d8d1;
    stroke: #effff9;
    stroke-width: 2.4;
    cursor: ew-resize;
}

.support-profile-points circle.is-selected {
    stroke: #ffffff;
    stroke-width: 3;
    filter: url(#design-glow);
}

.is-editing-support .support-profile-points circle.is-selected {
    cursor: grabbing;
}

.support-editor-label {
    fill: rgba(163, 182, 207, 0.54);
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-anchor: middle;
}

.support-editor-content > em {
    margin-top: 7px;
    display: block;
    color: #6f7d91;
    font-size: 8px;
    font-style: normal;
}

.relief-editor {
    position: absolute;
    bottom: 58px;
    left: 18px;
    z-index: 8;
    width: 310px;
    padding: 10px;
    display: none;
    border: 1px solid rgba(255, 122, 168, 0.25);
    border-left: 2px solid rgba(255, 122, 168, 0.84);
    border-radius: 11px;
    background: rgba(7, 12, 18, 0.86);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
}

.relief-editor.is-collapsed {
    width: 230px;
    padding: 7px 9px;
}

.view-surface-2d.is-primary.is-top-section.has-procedural-relief .relief-editor {
    display: block;
}

.view-surface-2d.is-primary.is-top-section.has-support.has-procedural-relief .relief-editor {
    left: 18px;
}

.relief-editor-heading {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.relief-editor.is-collapsed .relief-editor-heading {
    min-height: 34px;
}

.relief-editor-heading > span:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.relief-editor-heading strong {
    color: #f4e2eb;
    font-size: 9px;
    font-weight: 720;
    letter-spacing: 0.12em;
}

.relief-editor-heading small {
    overflow: hidden;
    color: #b783a1;
    font-size: 7px;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.relief-editor-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.relief-editor-actions button {
    min-height: 25px;
    padding: 0 6px;
    color: #ff9ec0;
    border: 1px solid rgba(255, 122, 168, 0.24);
    border-radius: 6px;
    background: rgba(255, 122, 168, 0.07);
    cursor: pointer;
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.035em;
}

.relief-editor-actions button:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(255, 122, 168, 0.62);
    background: rgba(255, 122, 168, 0.18);
}

.relief-editor-actions button:disabled {
    opacity: 0.3;
    cursor: default;
}

.relief-editor-toggle {
    color: #74efe0 !important;
    border-color: rgba(71, 216, 209, 0.5) !important;
    background: rgba(71, 216, 209, 0.1) !important;
}

.relief-editor-content {
    display: block;
}

.relief-palette-switch {
    margin-top: 6px;
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    border: 1px solid rgba(139, 163, 199, 0.1);
    border-radius: 8px;
    background: rgba(15, 24, 36, 0.64);
}

.relief-palette-switch button {
    min-height: 25px;
    color: #79869a;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 7px;
    font-weight: 720;
    letter-spacing: 0.08em;
}

.relief-palette-switch button.is-active {
    color: #f5e9ef;
    background: linear-gradient(100deg, rgba(255, 122, 168, 0.2), rgba(71, 216, 209, 0.13));
    box-shadow: inset 0 0 0 1px rgba(255, 154, 192, 0.2);
}

.relief-palette[hidden] {
    display: none !important;
}

.relief-editor.is-collapsed .relief-editor-content,
.relief-editor.is-collapsed .relief-edit-action {
    display: none;
}

#relief-profile-svg,
#relief-height-svg {
    width: 100%;
    height: 152px;
    margin-top: 5px;
    display: block;
    overflow: visible;
    border: 1px solid rgba(139, 163, 199, 0.09);
    border-radius: 8px;
    background: rgba(15, 24, 36, 0.72);
    touch-action: none;
}

.relief-editor-grid {
    fill: none;
    stroke: rgba(139, 163, 199, 0.09);
    stroke-width: 1;
}

.relief-editor-baseline {
    stroke: rgba(116, 239, 224, 0.34);
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
}

.relief-height-axis {
    stroke: rgba(116, 239, 224, 0.38);
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
}

.relief-profile-shadow,
.relief-profile-path,
.relief-height-shadow,
.relief-height-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.relief-profile-shadow {
    stroke: rgba(39, 24, 53, 0.9);
    stroke-width: 13;
}

.relief-height-shadow {
    stroke: rgba(27, 33, 58, 0.9);
    stroke-width: 13;
}

.relief-profile-path {
    stroke: url(#relief-profile-gradient);
    stroke-width: 6;
    filter: url(#relief-profile-glow);
}

.relief-height-path {
    stroke: url(#relief-height-gradient);
    stroke-width: 6;
    filter: url(#relief-height-glow);
}

.relief-profile-points circle,
.relief-height-points circle {
    cursor: grab;
    touch-action: none;
    transition: r 120ms ease, fill 120ms ease, stroke 120ms ease;
}

.relief-profile-points circle:hover,
.relief-profile-points circle.is-selected,
.relief-height-points circle:hover,
.relief-height-points circle.is-selected {
    r: 8px;
}

.relief-profile-points .is-control,
.relief-height-points .is-control {
    fill: #111a27;
    stroke: #ff9ec0;
    stroke-width: 2;
}

.relief-profile-points .is-anchor {
    fill: #47d8d1;
    stroke: #effff9;
    stroke-width: 2.4;
    cursor: ns-resize;
}

.relief-height-points .is-height-anchor {
    fill: #47d8d1;
    stroke: #effff9;
    stroke-width: 2.4;
    cursor: ew-resize;
}

.relief-profile-points circle.is-selected,
.relief-height-points circle.is-selected {
    stroke: #ffffff;
    stroke-width: 3;
    filter: url(#design-glow);
}

.is-editing-relief .relief-profile-points circle.is-selected {
    cursor: grabbing;
}

.is-editing-relief-height .relief-height-points circle.is-selected {
    cursor: grabbing;
}

.relief-editor-label {
    fill: rgba(185, 171, 203, 0.6);
    font-size: 7px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-anchor: middle;
}

.relief-palette > em {
    margin-top: 7px;
    display: block;
    color: #796f86;
    font-size: 8px;
    font-style: normal;
}

.design-empty-state {
    position: absolute;
    top: 65px;
    left: 18px;
    z-index: 4;
    max-width: 220px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--text-soft);
    border-left: 2px solid rgba(118, 101, 236, 0.72);
    background: rgba(7, 12, 18, 0.38);
    transition: opacity 140ms ease, visibility 140ms ease;
}

.design-empty-state.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.design-empty-state strong {
    font-size: 9px;
    letter-spacing: 0.13em;
}

.design-empty-state span {
    color: #748196;
    font-size: 9px;
}

.design-legend {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 4;
    min-height: 32px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: #8693a7;
    border: 1px solid rgba(150, 174, 212, 0.12);
    border-radius: 8px;
    background: rgba(7, 12, 18, 0.58);
    font-size: 9px;
}

.design-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.design-legend i {
    width: 14px;
    height: 2px;
    border-radius: 2px;
}

.legend-body { background: #9ebde7; }
.legend-path { background: linear-gradient(90deg, #6f7cff, #43d4d1); }
.legend-spout { background: #ffb85c; }
.legend-rim { background: #74efe0; }
.legend-lid { background: linear-gradient(90deg, #ffbd5f, #ff8bab); }
.legend-support { background: linear-gradient(90deg, #8072ff, #43d4d1); }
.legend-relief { background: linear-gradient(90deg, #ff7aa8, #8072ff, #43d4d1); }

.design-legend small {
    color: #675fc2;
    font-size: 8px;
    letter-spacing: 0.1em;
}

.view-surface.is-thumbnail .design-grid,
.view-surface.is-thumbnail .design-center-line,
.view-surface.is-thumbnail .design-inner-path,
.view-surface.is-thumbnail .design-base-underside-path,
.view-surface.is-thumbnail .design-dimension,
.view-surface.is-thumbnail .design-handle-points,
.view-surface.is-thumbnail .design-spout-points,
.view-surface.is-thumbnail .design-body-profile-path,
.view-surface.is-thumbnail .design-body-profile-points,
.view-surface.is-thumbnail .design-empty-state,
.view-surface.is-thumbnail .design-legend,
.view-surface.is-thumbnail .design-view-heading,
.view-surface.is-thumbnail .spout-editor,
.view-surface.is-thumbnail .lid-editor,
.view-surface.is-thumbnail .rim-editor,
.view-surface.is-thumbnail .support-editor,
.view-surface.is-thumbnail .relief-editor {
    opacity: 0;
    visibility: hidden;
}

.view-surface.is-thumbnail .component-editor-rail {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.is-control-hidden {
    display: none !important;
}

.control-panel {
    grid-area: controls;
    min-height: 0;
    padding: 17px;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 136, 156, 0.35) transparent;
}

.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(122, 136, 156, 0.32);
}

#object-controls {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 14px;
}

.dynamic-controls,
.control-section,
.section-body {
    min-width: 0;
    max-width: 100%;
}

.catalog-selector {
    min-width: 0;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(7, 12, 18, 0.34);
}

.catalog-selector label {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.catalog-selector label > span {
    color: var(--text-soft);
    font-size: 10px;
}

.catalog-selector select {
    min-width: 0;
    min-height: 40px;
    font-size: 12px;
}

.catalog-heading {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.catalog-heading > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.catalog-heading small {
    color: #6f7d92;
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.16em;
}

.catalog-heading strong {
    margin-top: 2px;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-heading > b {
    min-height: 27px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: #9d95f4;
    border: 1px solid rgba(118, 101, 236, 0.27);
    border-radius: 999px;
    background: rgba(118, 101, 236, 0.07);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.preset-section {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.012);
}

.preset-heading {
    margin-bottom: 9px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.preset-heading > span {
    color: var(--text-soft);
    font-size: 11px;
}

.preset-heading small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.preset-button {
    min-width: 0;
    min-height: 33px;
    padding: 0 7px;
    overflow: hidden;
    color: #9ca8b9;
    border: 1px solid rgba(154, 169, 193, 0.15);
    border-radius: 7px;
    background: rgba(5, 9, 14, 0.22);
    cursor: pointer;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.preset-button:hover {
    color: var(--text);
    border-color: rgba(118, 101, 236, 0.42);
}

.preset-button.is-active {
    color: #fff;
    border-color: rgba(128, 115, 255, 0.68);
    background: linear-gradient(110deg, rgba(94, 78, 215, 0.7), rgba(63, 85, 205, 0.72));
    box-shadow: 0 7px 18px rgba(55, 53, 169, 0.2);
}

.dynamic-controls {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.inline-select {
    display: grid;
    gap: 7px;
}

.inline-select > span {
    color: var(--text-soft);
    font-size: 13px;
}

select {
    width: 100%;
    min-height: 40px;
    padding: 0 39px 0 12px;
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background-color: rgba(7, 11, 16, 0.23);
    background-image:
        linear-gradient(45deg, transparent 50%, #cbd3df 50%),
        linear-gradient(135deg, #cbd3df 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 17px,
        calc(100% - 12px) 17px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    appearance: none;
    color-scheme: dark;
    cursor: pointer;
    transition: border-color 140ms ease, background-color 140ms ease;
}

select option,
select optgroup {
    color: #edf3fc;
    background: #141b24;
}

select option:disabled {
    color: #7f8b9d;
}

select option:checked {
    color: #fff;
    background: #315f9f;
}

select:hover {
    border-color: rgba(115, 137, 178, 0.45);
    background-color: rgba(255, 255, 255, 0.025);
}

.control-section {
    min-width: 0;
    border-top: 1px solid var(--line);
}

.control-section summary {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    font-weight: 650;
}

.control-section summary::-webkit-details-marker {
    display: none;
}

.control-section summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid #8e85ee;
    border-bottom: 2px solid #8e85ee;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
}

.control-section[open] summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.section-value {
    overflow: hidden;
    color: var(--text-muted);
    font-weight: 450;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.control-section[open] > summary .section-value:not(.mobile-only) {
    opacity: 0;
}

.section-body {
    padding: 4px 0 8px;
    display: grid;
    gap: 12px;
}

.compact-body {
    padding-bottom: 10px;
}

.parameter-row {
    display: grid;
    grid-template-columns: 68px minmax(70px, 1fr) 91px;
    align-items: center;
    gap: 9px;
}

.parameter-row > label {
    color: var(--text-soft);
    font-size: 12px;
}

.range-control {
    width: 100%;
    height: 20px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
}

.range-control::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--violet) 0 var(--range-progress, 50%), rgba(154, 169, 193, 0.22) var(--range-progress, 50%) 100%);
}

.range-control::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border: 0;
    border-radius: 50%;
    background: #f8f9fc;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.42);
    appearance: none;
}

.range-control::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(154, 169, 193, 0.22);
}

.range-control::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--violet);
}

.range-control::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #f8f9fc;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.42);
}

.number-control {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(48px, 1fr) 27px;
    align-items: center;
    gap: 5px;
}

.number-control input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 5px 0 8px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 7px;
    outline: 0;
    background: rgba(3, 7, 11, 0.2);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.number-control input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(118, 101, 236, 0.12);
}

.number-control span {
    color: var(--text-muted);
    font-size: 11px;
}

.number-control-percent {
    grid-template-columns: minmax(48px, 1fr) 18px;
}

.number-control-no-unit {
    grid-template-columns: minmax(48px, 1fr);
}

.number-control-no-unit span {
    display: none;
}

.inline-select {
    grid-template-columns: 97px minmax(0, 1fr);
    align-items: center;
}

.inline-select select {
    min-height: 38px;
}

.inline-toggle {
    position: relative;
    min-width: 0;
    min-height: 38px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 27px;
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    cursor: pointer;
    font-size: 13px;
}

.inline-toggle > input {
    position: relative;
    z-index: 2;
    width: 42px;
    height: 23px;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    opacity: 0;
    cursor: pointer;
}

.toggle-track {
    width: 42px;
    height: 23px;
    padding: 3px;
    display: block;
    grid-column: 2;
    grid-row: 1;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(7, 11, 16, 0.42);
    transition: border-color 140ms ease, background-color 140ms ease;
}

.toggle-track i {
    width: 15px;
    height: 15px;
    display: block;
    border-radius: 50%;
    background: #909cad;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.38);
    transition: transform 150ms ease, background-color 150ms ease;
}

.inline-toggle > input:checked + .toggle-track {
    border-color: rgba(118, 101, 236, 0.72);
    background: rgba(118, 101, 236, 0.38);
}

.inline-toggle > input:checked + .toggle-track i {
    background: #f6f7ff;
    transform: translateX(19px);
}

.inline-toggle > input:focus-visible + .toggle-track {
    outline: 2px solid rgba(116, 239, 224, 0.78);
    outline-offset: 2px;
}

.inline-toggle output {
    grid-column: 3;
    grid-row: 1;
    color: #8f9caf;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.inline-toggle > input:checked ~ output {
    color: #75e6de;
}

.material-color-control {
    min-width: 0;
    display: grid;
    grid-template-columns: 97px 42px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    font-size: 13px;
}

.material-color-swatch {
    width: 42px;
    height: 38px;
    padding: 3px;
    display: block;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(7, 11, 16, 0.32);
}

.material-color-swatch input {
    width: 100%;
    height: 100%;
    padding: 0;
    display: block;
    border: 0;
    border-radius: 5px;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
}

.material-color-swatch input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.material-color-swatch input::-webkit-color-swatch {
    border: 0;
    border-radius: 4px;
}

.material-color-swatch input::-moz-color-swatch {
    border: 0;
    border-radius: 4px;
}

.material-color-control output {
    min-width: 0;
    color: #8f9caf;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.07em;
}

.material-color-control.is-colorless .material-color-swatch {
    background-color: #111923;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.13) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.13) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.13) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.13) 75%);
    background-position: 0 0, 0 7px, 7px -7px, -7px 0;
    background-size: 14px 14px;
}

.material-color-control.is-colorless .material-color-swatch input {
    opacity: 0;
    cursor: not-allowed;
}

.material-color-control.is-colorless output {
    color: #75e6de;
    font-size: 9px;
    letter-spacing: 0.08em;
}

.material-texture-control {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 7px;
    overflow: hidden;
}

.material-texture-caption {
    color: var(--text-soft);
    font-size: 12px;
}

.material-texture-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 62px;
    padding: 7px;
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
        "preview copy"
        "preview actions";
    align-items: center;
    gap: 5px 9px;
    overflow: hidden;
    border: 1px dashed rgba(122, 139, 171, 0.31);
    border-radius: 10px;
    background: rgba(5, 9, 14, 0.24);
    transition: border-color 150ms ease, background-color 150ms ease;
}

.material-texture-control.has-texture .material-texture-card {
    border-style: solid;
    border-color: rgba(74, 216, 205, 0.35);
    background: rgba(37, 113, 109, 0.055);
}

.material-texture-control.has-error .material-texture-card {
    border-color: rgba(239, 116, 129, 0.48);
}

.material-texture-preview {
    grid-area: preview;
    width: 48px;
    height: 48px;
    position: relative;
    display: block;
    border: 1px solid rgba(145, 163, 192, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background-color: #121a24;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    background-repeat: repeat;
}

.material-texture-preview::after {
    content: "IMG";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #66768b;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.material-texture-control.has-texture .material-texture-preview {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.material-texture-control.has-texture .material-texture-preview::after {
    opacity: 0;
}

.material-texture-copy {
    grid-area: copy;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.material-texture-copy strong,
.material-texture-copy small {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.material-texture-copy strong {
    color: #d5deea;
    font-size: 10px;
    font-weight: 600;
}

.material-texture-copy small {
    color: #6e7d91;
    font-size: 7px;
}

.material-texture-control.has-error .material-texture-copy small {
    color: #ef8792;
}

.material-texture-actions {
    grid-area: actions;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    overflow: hidden;
}

.material-texture-choose,
.material-texture-clear {
    min-width: 0;
    min-height: 25px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.055em;
    white-space: nowrap;
}

.material-texture-choose {
    color: #84eee5;
    border: 1px solid rgba(71, 216, 209, 0.36);
    background: rgba(71, 216, 209, 0.08);
}

.material-texture-clear {
    color: #7c899b;
    border: 1px solid rgba(124, 137, 155, 0.18);
    background: transparent;
}

.material-texture-clear:hover:not(:disabled),
.material-texture-choose:hover {
    color: #fff;
    border-color: rgba(108, 232, 222, 0.58);
}

.material-texture-clear:disabled {
    opacity: 0.28;
    cursor: default;
}

.material-texture-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.material-texture-control.is-loading .material-texture-preview {
    animation: texture-pulse 850ms ease-in-out infinite alternate;
}

.svg-relief-upload-control {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 7px;
    overflow: hidden;
}

.svg-relief-upload-caption {
    color: var(--text-soft);
    font-size: 12px;
}

.svg-relief-upload-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 62px;
    padding: 7px;
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
        "preview copy"
        "preview actions";
    align-items: center;
    gap: 5px 9px;
    overflow: hidden;
    border: 1px dashed rgba(122, 139, 171, 0.31);
    border-radius: 10px;
    background: rgba(5, 9, 14, 0.24);
    transition: border-color 150ms ease, background-color 150ms ease;
}

.svg-relief-upload-control.has-svg .svg-relief-upload-card {
    border-style: solid;
    border-color: rgba(115, 122, 255, 0.42);
    background: rgba(87, 71, 191, 0.07);
}

.svg-relief-upload-control.has-error .svg-relief-upload-card {
    border-color: rgba(239, 116, 129, 0.48);
}

.svg-relief-upload-preview {
    grid-area: preview;
    width: 48px;
    height: 48px;
    position: relative;
    display: block;
    border: 1px solid rgba(145, 163, 192, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background-color: #121a24;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    background-repeat: repeat;
}

.svg-relief-upload-preview::after {
    content: "SVG";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #737f96;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.svg-relief-upload-control.has-svg .svg-relief-upload-preview {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.svg-relief-upload-control.has-svg .svg-relief-upload-preview::after {
    opacity: 0;
}

.svg-relief-upload-copy {
    grid-area: copy;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.svg-relief-upload-copy strong,
.svg-relief-upload-copy small {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.svg-relief-upload-copy strong {
    color: #d5deea;
    font-size: 10px;
    font-weight: 600;
}

.svg-relief-upload-copy small {
    color: #6e7d91;
    font-size: 7px;
}

.svg-relief-upload-control.has-error .svg-relief-upload-copy small {
    color: #ef8792;
}

.svg-relief-upload-actions {
    grid-area: actions;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    overflow: hidden;
}

.svg-relief-upload-choose,
.svg-relief-upload-clear {
    min-width: 0;
    min-height: 25px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.055em;
    white-space: nowrap;
}

.svg-relief-upload-choose {
    color: #aaa3ff;
    border: 1px solid rgba(139, 128, 255, 0.4);
    background: rgba(118, 101, 236, 0.1);
}

.svg-relief-upload-clear {
    color: #7c899b;
    border: 1px solid rgba(124, 137, 155, 0.18);
    background: transparent;
}

.svg-relief-upload-clear:hover:not(:disabled),
.svg-relief-upload-choose:hover {
    color: #fff;
    border-color: rgba(156, 147, 255, 0.66);
}

.svg-relief-upload-clear:disabled {
    opacity: 0.28;
    cursor: default;
}

.svg-relief-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.svg-relief-upload-control.is-loading .svg-relief-upload-preview {
    animation: texture-pulse 850ms ease-in-out infinite alternate;
}

@keyframes texture-pulse {
    from { opacity: 0.42; }
    to { opacity: 1; }
}

.pattern-strength-row {
    margin-top: 1px;
}

.reset-button {
    width: max-content;
    min-height: 36px;
    margin: -2px auto 2px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #a9a0f2;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.reset-button:hover {
    color: #c4bfff;
    background: rgba(118, 101, 236, 0.08);
}

.download-panel {
    grid-area: download;
    min-width: 0;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: var(--radius-lg);
}

.offer-copy {
    min-width: 0;
}

.offer-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.discount-pill {
    min-height: 32px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: linear-gradient(105deg, #6556da, #4c65df);
    box-shadow: 0 8px 22px rgba(70, 77, 204, 0.25);
    font-size: 12px;
    white-space: nowrap;
}

.offer-copy p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 10px;
}

.download-button,
.button {
    min-height: 52px;
    padding: 0 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    border: 1px solid rgba(117, 146, 255, 0.42);
    border-radius: 9px;
    background: linear-gradient(110deg, #2853cf, #345fe5);
    box-shadow: 0 12px 30px rgba(29, 67, 182, 0.28), inset 0 1px rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.015em;
    white-space: nowrap;
    transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.download-button:hover,
.button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 15px 34px rgba(29, 67, 182, 0.38), inset 0 1px rgba(255, 255, 255, 0.14);
}

.download-button:active,
.button:active {
    transform: translateY(0);
}

.download-button:disabled {
    opacity: 0.65;
    cursor: wait;
    filter: saturate(0.65);
}

.download-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 104px;
    z-index: 100;
    max-width: min(90vw, 420px);
    padding: 10px 15px;
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(14, 20, 28, 0.94);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translate(-50%, 14px);
    visibility: hidden;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
}

.error-page {
    min-height: 100dvh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page h1 {
    margin: 20px 0 4px;
}

.error-page p {
    margin: 0 0 22px;
    color: var(--text-soft);
}

.button-primary {
    min-height: 44px;
}

@media (max-width: 1080px) {
    .workspace {
        grid-template-columns: minmax(290px, 320px) minmax(0, 1fr);
    }

    .parameter-row {
        grid-template-columns: 60px minmax(60px, 1fr) 84px;
        gap: 7px;
    }

    .download-panel {
        gap: 12px;
    }

    .offer-copy p {
        display: none;
    }
}

@media (max-width: 760px) {
    :root {
        --header-height: 0px;
    }

    html,
    body {
        height: auto;
        min-height: 100%;
    }

    body {
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: none;
    }

    .mobile-only {
        display: initial;
    }

    .app-shell {
        height: auto;
        min-height: 100dvh;
        padding-bottom: calc(86px + env(safe-area-inset-bottom));
    }

    .app-header {
        display: none;
    }

    .mobile-workspace-brand.mobile-only {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 45;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(139, 163, 199, 0.12);
        border-radius: 13px;
        background: rgba(7, 12, 18, 0.68);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .mobile-workspace-brand img {
        width: 42px;
        height: 42px;
        display: block;
        object-fit: contain;
    }

    .mobile-view-actions.mobile-only {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 45;
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .mobile-view-actions button {
        width: 48px;
        height: 48px;
        padding: 0;
        display: grid;
        place-items: center;
        color: #ffffff;
        border: 1px solid rgba(123, 158, 255, 0.78);
        border-radius: 12px;
        background: linear-gradient(145deg, #2d5fe8, #684be8);
        box-shadow:
            0 9px 22px rgba(0, 0, 0, 0.34),
            0 0 16px rgba(73, 92, 255, 0.3),
            inset 0 1px rgba(255, 255, 255, 0.2);
        cursor: pointer;
        font-size: 16px;
        font-weight: 760;
    }

    .mobile-view-actions .reset-view-button {
        color: #eaf0f8;
        border-color: rgba(139, 128, 255, 0.52);
        background: rgba(12, 20, 30, 0.88);
        box-shadow:
            0 9px 22px rgba(0, 0, 0, 0.34),
            inset 0 0 0 1px rgba(80, 103, 178, 0.15);
    }

    .mobile-view-actions .reset-view-button svg {
        width: 27px;
        height: 27px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .studio-viewer[data-primary-view="3d"] [data-view-switch="3d"],
    .studio-viewer[data-primary-view="2d"] [data-view-switch="2d"],
    .studio-viewer[data-primary-view="2d"] .reset-view-button {
        display: none;
    }

    .workspace {
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 8px;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "viewer"
            "controls";
        gap: 8px;
        overflow: visible;
    }

    .viewer-panel {
        height: clamp(380px, 54svh, 560px);
        position: sticky;
        top: 8px;
        z-index: 30;
        align-self: start;
        border-radius: 15px;
    }

    .studio-viewer {
        min-height: 100%;
    }

    .view-surface.is-thumbnail {
        display: none;
    }

    .view-thumbnail-action {
        display: none !important;
    }

    .view-thumbnail-action span,
    .view-thumbnail-action strong {
        font-size: 7px;
    }

    .viewport-help-desktop {
        display: none;
    }

    .viewport-help-mobile,
    .axis-widget {
        display: none;
    }

    .viewport-badge {
        display: none;
    }

    .component-editor-rail {
        display: contents;
    }

    .component-editor-rail .handle-editor,
    .component-editor-rail .spout-editor,
    .component-editor-rail .lid-editor,
    .component-editor-rail .rim-editor,
    .component-editor-rail .support-editor {
        position: absolute;
        /* Override the desktop rail's equally specific inset:auto. */
        inset: 66px 10px auto auto;
    }

    .design-view-heading {
        top: 12px;
        left: 50%;
        min-height: 30px;
        z-index: 46;
        padding: 3px;
        display: none;
        border-color: rgba(50, 214, 209, 0.24);
        background: rgba(7, 12, 18, 0.78);
        transform: translateX(-50%);
    }

    .view-surface-2d.is-primary.has-planar-component .design-view-heading {
        display: flex;
    }

    .design-view-heading > span:first-child,
    .design-view-heading > small,
    .design-view-heading > .body-profile-reset {
        display: none;
    }

    .design-view-heading .design-plane-switch {
        display: inline-flex;
    }

    .design-plane-switch button {
        min-width: 44px;
        min-height: 40px;
        padding: 0 7px;
        font-size: 10px;
    }

    .handle-editor,
    .spout-editor,
    .lid-editor {
        top: 66px;
        left: 10px;
        width: calc(50% - 15px);
        grid-template-columns: minmax(0, 1fr);
        padding: 8px;
    }

    .handle-editor-toggle,
    .spout-editor-toggle,
    .lid-editor-toggle,
    .rim-editor-toggle,
    .support-editor-toggle {
        display: none;
    }

    .handle-editor-actions,
    .spout-editor-actions,
    .lid-editor-actions,
    .rim-editor-actions,
    .support-editor-actions,
    .relief-editor-actions {
        flex-wrap: wrap;
    }

    .handle-editor em,
    .spout-editor em,
    .lid-editor em,
    .rim-editor-content > em,
    .support-editor-content > em,
    .relief-palette > em {
        display: none;
    }

    .rim-editor {
        top: 66px;
        right: 10px;
        width: calc(50% - 15px);
        padding: 8px;
    }

    .rim-editor:not(.is-collapsed) {
        right: 10px;
        left: 10px;
        width: auto;
    }

    .rim-editor.is-collapsed {
        width: calc(50% - 15px);
    }

    .rim-editor.is-collapsed .rim-editor-heading {
        align-items: center;
        flex-direction: row;
    }

    .rim-editor-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    #rim-profile-svg {
        height: 105px;
    }

    #lid-profile-svg {
        height: 150px;
    }

    .support-editor {
        right: auto;
        bottom: 50px;
        left: 10px;
        width: calc(50% - 15px);
        padding: 8px;
    }

    .support-editor:not(.is-collapsed) {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
    }

    .support-editor.is-collapsed {
        width: calc(50% - 15px);
    }

    .support-editor.is-collapsed .support-editor-heading {
        align-items: center;
        flex-direction: row;
    }

    .support-editor-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    #support-profile-svg {
        height: 150px;
    }

    .relief-editor {
        right: 10px;
        bottom: 50px;
        left: auto;
        width: calc(50% - 15px);
        padding: 8px;
    }

    .view-surface-2d.is-primary.has-relief:not(.has-support) .relief-editor {
        right: auto;
        left: 10px;
    }

    .view-surface-2d.is-primary.has-support.has-relief .relief-editor {
        right: 10px;
        left: auto;
    }

    .relief-editor:not(.is-collapsed) {
        right: 10px;
        bottom: 10px;
        left: 10px !important;
        width: auto;
    }

    .relief-editor.is-collapsed {
        width: calc(50% - 15px);
    }

    .relief-editor.is-collapsed .relief-editor-heading {
        align-items: center;
        flex-direction: row;
    }

    .relief-editor-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    #relief-profile-svg,
    #relief-height-svg {
        height: 130px;
    }

    .design-empty-state {
        display: none !important;
    }

    .design-dimension {
        display: none;
    }

    .view-surface-2d.is-primary.is-editing-body-profile .design-dimension {
        display: inline;
    }

    .design-legend {
        display: none;
    }

    .design-legend small {
        display: none;
    }

    .control-panel {
        padding: 11px;
        gap: 0;
        overflow: visible;
        border-radius: 15px;
    }

    .catalog-selector select {
        min-height: 43px;
        font-size: 12px;
    }

    .catalog-heading {
        display: none;
    }

    .preset-section {
        padding: 9px;
        overflow: hidden;
    }

    .preset-heading {
        margin-bottom: 7px;
    }

    .preset-heading small {
        display: none;
    }

    .preset-grid {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .preset-grid::-webkit-scrollbar,
    .mobile-section-nav::-webkit-scrollbar {
        display: none;
    }

    .preset-button {
        min-width: 94px;
        flex: 0 0 auto;
    }

    .mobile-section-nav.mobile-only {
        min-width: 0;
        padding: 3px 0;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .mobile-section-nav button {
        min-width: 62px;
        min-height: 50px;
        padding: 6px 9px;
        flex: 0 0 auto;
        color: #8996a9;
        border: 1px solid rgba(139, 163, 199, 0.15);
        border-radius: 9px;
        background: rgba(6, 11, 17, 0.28);
        cursor: pointer;
        font-size: 9px;
        font-weight: 620;
        white-space: nowrap;
    }

    .mobile-section-nav button.is-active {
        color: #ffffff;
        border-color: rgba(118, 101, 236, 0.82);
        background: linear-gradient(145deg, rgba(77, 57, 201, 0.68), rgba(42, 66, 166, 0.6));
        box-shadow: 0 0 16px rgba(90, 73, 235, 0.25);
    }

    #object-controls {
        gap: 10px;
    }

    .inline-select > span {
        font-size: 11px;
    }

    select {
        min-height: 45px;
        padding-left: 11px;
        font-size: 14px;
        background-position:
            calc(100% - 16px) 20px,
            calc(100% - 11px) 20px;
    }

    .control-section {
        display: none;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.015);
    }

    .control-section.is-mobile-section-active {
        display: block;
    }

    .control-section summary {
        min-height: 50px;
        padding: 0 13px;
    }

    .control-section summary::after {
        margin-left: 0;
    }

    .section-value {
        margin-left: auto;
    }

    .control-section[open] > summary .section-value.mobile-only {
        display: none;
    }

    .section-body {
        padding: 7px 13px 15px;
        gap: 15px;
    }

    .parameter-row {
        grid-template-columns: 72px minmax(82px, 1fr) 99px;
        gap: 9px;
    }

    .parameter-row > label {
        font-size: 12px;
    }

    .range-control::-webkit-slider-thumb {
        width: 17px;
        height: 17px;
        margin-top: -6.5px;
    }

    .range-control::-moz-range-thumb {
        width: 17px;
        height: 17px;
    }

    .number-control input {
        height: 42px;
        font-size: 15px;
    }

    .inline-select {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .reset-button {
        display: none;
    }

    .download-panel {
        grid-area: auto;
        width: 100%;
        min-height: 0;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        display: flex;
        flex-direction: row;
        gap: 0;
        border-width: 1px 0 0;
        border-radius: 17px 17px 0 0;
        background: rgba(14, 19, 27, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.5);
    }

    .offer-copy {
        display: none;
    }

    .offer-line {
        justify-content: center;
    }

    .offer-copy p {
        display: none;
    }

    .discount-pill {
        min-height: 28px;
        padding: 0 15px;
        font-size: 10px;
    }

    .download-button {
        width: 100%;
        min-height: 56px;
        border-radius: 9px;
        font-size: 14px;
    }

    .toast {
        bottom: 90px;
    }

    .mobile-design-tools.mobile-only {
        display: none;
    }

    .mobile-design-tools:empty {
        display: none !important;
    }

    .view-surface-2d.is-primary .mobile-design-tools.mobile-only {
        position: absolute;
        right: 10px;
        bottom: 10px;
        left: 10px;
        z-index: 15;
        padding: 5px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
        gap: 5px;
        border: 1px solid rgba(113, 139, 180, 0.2);
        border-radius: 11px;
        background: rgba(6, 12, 19, 0.88);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .mobile-design-tools button {
        min-width: 0;
        min-height: 40px;
        padding: 0 5px;
        overflow: hidden;
        color: #8795aa;
        border: 1px solid rgba(138, 159, 193, 0.13);
        border-radius: 7px;
        background: rgba(19, 30, 43, 0.5);
        cursor: pointer;
        font-size: 9px;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-design-tools button.is-active {
        color: #ffffff;
        border-color: rgba(125, 105, 255, 0.88);
        background: linear-gradient(145deg, #5138d1, #2c55c9);
        box-shadow: 0 0 16px rgba(92, 72, 240, 0.4);
    }

    .mobile-design-tools button:disabled {
        opacity: 0.34;
        cursor: default;
    }

    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="handle"]) .handle-editor,
    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="spout"]) .spout-editor,
    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="lid"]) .lid-editor,
    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="rim"]) .rim-editor,
    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="support"]) .support-editor {
        display: none;
    }

    .view-surface-2d.is-primary[data-mobile-editor="handle"].has-handle .handle-editor {
        right: 10px;
        left: auto;
        width: min(235px, calc(100% - 20px));
        display: grid;
    }

    .view-surface-2d.is-primary[data-mobile-editor="spout"].has-spout .spout-editor {
        right: 10px;
        left: auto;
        width: min(260px, calc(100% - 20px));
        display: grid;
    }

    .view-surface-2d.is-primary[data-mobile-editor="lid"].has-lid .lid-editor {
        right: 10px;
        left: auto;
        width: min(320px, calc(100% - 20px));
        display: grid;
    }

    .view-surface-2d.is-primary[data-mobile-editor="rim"] .rim-editor,
    .view-surface-2d.is-primary[data-mobile-editor="support"].has-support .support-editor {
        top: 66px;
        right: 10px;
        bottom: auto;
        left: auto;
        width: min(290px, calc(100% - 20px));
        display: block;
    }

    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="body"]) .design-body-profile-path,
    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="body"]) .design-body-profile-points {
        opacity: 0.2;
        pointer-events: none;
    }

    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="handle"]) .design-handle-points {
        opacity: 0;
        pointer-events: none;
    }

    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="spout"]) .design-spout-points {
        opacity: 0;
        pointer-events: none;
    }

    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="lid"]) .design-lid-points {
        opacity: 0;
        pointer-events: none;
    }

    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="body"]) .body-profile-reset,
    .view-surface-2d.is-primary[data-mobile-editor]:not([data-mobile-editor="body"]) .design-empty-state {
        display: none;
    }
}

@media (max-width: 420px) {
    .viewer-panel {
        height: 50svh;
        min-height: 360px;
    }

    .parameter-row {
        grid-template-columns: 61px minmax(62px, 1fr) 91px;
        gap: 7px;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
