html.viti-builder-active,
html.viti-builder-active body {
    overflow: hidden;
}

.viti-builder-shell {
    --builder-bg: #0f1015;
    --builder-panel: #17181c;
    --builder-panel-soft: #222329;
    --builder-control: #121319;
    --builder-border: #343640;
    --builder-text: #d4d6df;
    --builder-muted: #9a9daa;
    --builder-accent: #a879ff;
    --builder-accent-soft: rgba(168, 121, 255, 0.18);
    position: fixed;
    inset: 0;
    height: 100vh;
    z-index: 99999;
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr);
    background: var(--builder-bg);
    color: var(--builder-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.viti-builder-shell,
.viti-builder-shell * {
    scrollbar-color: var(--builder-panel) var(--builder-panel);
}

.viti-builder-tooltip {
    position: fixed;
    z-index: 100010;
    max-width: 220px;
    padding: 5px 7px;
    border: 1px solid #4a4c56;
    border-radius: 4px;
    background: #2b2c33;
    color: #f2f2f5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: break-word;
    pointer-events: none;
    white-space: normal;
}

.viti-builder-tooltip[hidden] {
    display: none;
}

.viti-builder-shell ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.viti-builder-shell ::-webkit-scrollbar-track,
.viti-builder-shell ::-webkit-scrollbar-thumb,
.viti-builder-shell ::-webkit-scrollbar-corner {
    background: var(--builder-panel);
}

.viti-builder-topbar {
    display: grid;
    grid-template-columns: 328px minmax(0, 1fr) 248px;
    border-bottom: 1px solid var(--builder-border);
    background: #121319;
}

.viti-builder-topbar__left,
.viti-builder-topbar__center,
.viti-builder-topbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 10px;
}

.viti-builder-topbar__left {
    border-right: 1px solid var(--builder-border);
}

.viti-builder-topbar__center {
    justify-content: space-between;
}

.viti-builder-topbar__right {
    justify-content: flex-end;
    border-left: 1px solid var(--builder-border);
}

.viti-builder-page-title {
    overflow: hidden;
    color: var(--builder-text);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viti-builder-breakpoint {
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    color: #d8c3ff;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.viti-builder-body {
    display: grid;
    grid-template-columns: 328px minmax(0, 1fr) 248px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.viti-builder-shell--sidebar-collapsed .viti-builder-topbar {
    grid-template-columns: 0 minmax(0, 1fr) 248px;
}

.viti-builder-shell--sidebar-collapsed .viti-builder-body {
    grid-template-columns: 0 minmax(0, 1fr) 248px;
}

.viti-builder-sidebar,
.viti-builder-inspector {
    height: 100%;
    min-width: 0;
    overflow: hidden;
    background: var(--builder-panel);
}

.viti-builder-sidebar {
    border-right: 1px solid var(--builder-border);
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

.viti-builder-shell--sidebar-collapsed .viti-builder-sidebar {
    border-right: 0;
}

.viti-builder-inspector {
    border-left: 1px solid var(--builder-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.viti-builder-inspector-head {
    display: flex;
    align-items: center;
    height: 39px;
    border-bottom: 1px solid var(--builder-border);
    padding: 0;
    color: var(--builder-text);
}

.viti-builder-inspector-head button {
    flex: 1;
    align-self: stretch;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.viti-builder-inspector-head button.is-active {
    border-bottom-color: var(--builder-accent);
    color: #f0e8ff;
}

.viti-builder-inspector-body {
    min-height: 0;
    overflow: auto;
    padding: 0 0 16px;
}

.viti-builder-selection {
    display: grid;
    gap: 6px;
    border-bottom: 1px solid var(--builder-border);
    padding: 7px 8px;
}

.viti-builder-selection span {
    color: var(--builder-muted);
    font-size: 12px;
}

.viti-builder-selection-tools {
    display: grid;
    grid-template-columns: 24px 24px minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.viti-builder-selection strong {
    overflow: hidden;
    border-radius: 4px;
    background: #ffd2e7;
    color: #57142f;
    padding: 4px 7px;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viti-builder-selection em {
    border-radius: 4px;
    background: #2f7df4;
    color: #fff;
    padding: 4px 7px;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.viti-builder-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--builder-border);
    border-radius: 3px;
    background: #15161c;
    color: var(--builder-muted);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.viti-builder-icon-button img {
    display: block;
    width: 14px;
    height: 14px;
    filter: invert(61%) sepia(7%) saturate(679%) hue-rotate(196deg) brightness(94%) contrast(88%);
}

.viti-builder-icon-button:hover {
    border-color: var(--builder-accent);
    color: #f0e8ff;
}

.viti-builder-icon-button:hover img {
    filter: invert(76%) sepia(65%) saturate(3418%) hue-rotate(210deg) brightness(103%) contrast(101%);
}

.viti-builder-style-section {
    border-bottom: 1px solid var(--builder-border);
}

.viti-builder-style-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    padding: 0 10px;
    background: var(--builder-panel-soft);
    color: var(--builder-text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    list-style: none;
}

.viti-builder-style-section summary::-webkit-details-marker {
    display: none;
}

.viti-builder-style-section summary::after {
    content: "⌄";
    color: var(--builder-muted);
    font-size: 14px;
}

.viti-builder-style-section[open] summary::after {
    content: "⌃";
}

.viti-builder-section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.viti-builder-section-label.is-override {
    color: var(--builder-accent);
}

.viti-builder-section-label i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #f6a623;
}

.viti-builder-section-label i.is-defined-dot {
    background: #f6a623;
}

.viti-builder-section-label i.is-override-dot {
    background: var(--builder-accent);
}

.viti-builder-style-section__body {
    display: grid;
    gap: 8px;
    padding: 8px;
}

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

.viti-builder-inspector-grid .viti-builder-inspector-field:has(textarea),
.viti-builder-inspector-grid .viti-builder-inspector-field:has(input[type="text"][data-builder-hero-attribute*="url"]),
.viti-builder-inspector-grid .viti-builder-inspector-field:has(input[data-builder-hero-attribute="data-background-asset"]) {
    grid-column: 1 / -1;
}

.viti-builder-inspector-field {
    display: grid;
    gap: 4px;
    color: var(--builder-muted);
    font-size: 11px;
    font-weight: 650;
}

.viti-builder-property-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    width: 100%;
}

.viti-builder-property-label__main {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.viti-builder-property-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex: 0 0 auto;
}

.viti-builder-property-label.is-override {
    color: var(--builder-accent);
}

.viti-builder-inspector-field.is-override {
    color: var(--builder-accent);
}

.viti-builder-property-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #f6a623;
    flex: 0 0 auto;
}

.viti-builder-property-dot.is-defined-dot {
    background: #f6a623;
}

.viti-builder-property-dot.is-override-dot {
    background: var(--builder-accent);
}

.viti-builder-property-reset {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-grid;
    width: 12px;
    height: 12px;
    padding: 0;
    place-items: center;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
    margin-left: 1px;
    position: relative;
    top: -1px;
}

.viti-builder-property-reset span {
    display: inline-grid;
    width: 7px;
    height: 12px;
    place-items: center;
}

.viti-builder-property-reset:hover {
    color: #f0e8ff;
}

.viti-builder-inspector-field input,
.viti-builder-inspector-field select,
.viti-builder-inspector-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    color: var(--builder-text);
    min-height: 27px;
    padding: 5px 7px;
    font: inherit;
    font-weight: 650;
    outline: 0;
}

.viti-builder-inspector-field input:focus,
.viti-builder-inspector-field select:focus,
.viti-builder-inspector-field textarea:focus {
    border-color: var(--builder-accent);
    box-shadow: 0 0 0 1px var(--builder-accent);
}

.viti-builder-inspector-field.is-override input:not([type="color"]),
.viti-builder-inspector-field.is-override select,
.viti-builder-inspector-field.is-override textarea,
.viti-builder-inspector-field.is-override .viti-builder-css-value {
    border-color: var(--builder-accent);
    color: var(--builder-accent);
}

.viti-builder-inspector-field.is-override input:not([type="color"]) {
    color: var(--builder-accent);
}

.viti-builder-css-value:focus-within {
    border-color: var(--builder-accent);
    box-shadow: 0 0 0 1px var(--builder-accent);
}

.viti-builder-css-value.is-invalid {
    border-color: #ff5c7a;
    box-shadow: 0 0 0 1px rgba(255, 92, 122, 0.55);
}

.viti-builder-inspector-field.is-invalid .viti-builder-property-label {
    color: #ff8aa0;
}

.viti-builder-css-value input:focus,
.viti-builder-css-value select:focus {
    box-shadow: none;
}

.viti-builder-control {
    position: relative;
    display: block;
}

.viti-builder-control select {
    appearance: none;
    padding-right: 22px;
}

.viti-builder-control::after {
    position: absolute;
    top: 50%;
    right: 8px;
    color: var(--builder-muted);
    content: "⌄";
    pointer-events: none;
    transform: translateY(-50%);
}

.viti-builder-color-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 5px;
}

.viti-builder-color-control input[type="color"] {
    min-height: 27px;
    padding: 2px;
    cursor: pointer;
}

.viti-builder-css-value {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 43px;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    overflow: hidden;
}

.viti-builder-css-value input {
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: ew-resize;
    text-align: right;
}

.viti-builder-css-value input.is-dragging {
    cursor: ew-resize;
    user-select: none;
}

.viti-builder-css-value input.is-hidden,
.viti-builder-css-value .viti-builder-css-token.is-hidden,
.viti-builder-css-mode-toggle.is-hidden {
    display: none;
}

.viti-builder-css-value select {
    border: 0;
    border-left: 1px solid var(--builder-border);
    border-radius: 0;
    background: transparent;
    padding: 5px 2px;
    text-align: center;
}

.viti-builder-css-value .viti-builder-css-token {
    border-left: 0;
    text-align: right;
    padding-right: 7px;
}

.viti-builder-css-value.is-preset-text {
    grid-template-columns: minmax(0, 1fr);
}

.viti-builder-css-value.is-preset-text input {
    cursor: text;
    text-align: left;
}

.viti-builder-css-value.is-preset-text .viti-builder-css-token {
    text-align: left;
    padding: 5px 7px;
}

.viti-builder-css-mode-toggle {
    display: inline-flex;
}

.viti-builder-css-mode-toggle__button {
    appearance: none;
    border: 1px solid var(--builder-border);
    border-radius: 0;
    background: var(--builder-control);
    color: var(--builder-muted);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.02em;
    min-width: 24px;
    min-height: 18px;
    line-height: 1;
    padding: 0 6px;
    white-space: nowrap;
}

.viti-builder-css-mode-toggle__button:hover {
    color: #f0e8ff;
}

.viti-builder-css-mode-toggle__button.is-active {
    background: var(--builder-control);
    color: var(--builder-muted);
}

.viti-builder-css-mode-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -1px;
}

.viti-builder-custom-control {
    display: grid;
    gap: 8px;
}

.viti-builder-custom-control__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 106px;
    gap: 8px;
    align-items: end;
}

.viti-builder-custom-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    min-height: 29px;
}

.viti-builder-custom-switch button {
    display: grid;
    place-items: center;
    border: 0;
    border-right: 1px solid var(--builder-border);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.viti-builder-custom-switch button:last-child {
    border-right: 0;
}

.viti-builder-custom-switch img {
    width: 15px;
    height: 15px;
    filter: invert(69%) sepia(8%) saturate(284%) hue-rotate(190deg) brightness(88%) contrast(89%);
}

.viti-builder-custom-switch button.is-active {
    background: #2a2b32;
}

.viti-builder-custom-switch button.is-active img {
    filter: invert(76%) sepia(65%) saturate(3418%) hue-rotate(210deg) brightness(103%) contrast(101%);
}

.viti-builder-custom-block {
    display: grid;
    grid-template-columns: minmax(74px, 1fr) minmax(74px, 1fr);
    grid-template-areas:
        "top top"
        "left right"
        "bottom bottom";
    gap: 5px 6px;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: #26272c;
    padding: 6px;
}

.viti-builder-custom-block.has-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "left right";
}

.viti-builder-custom-block__cell.is-top,
.viti-builder-custom-block__cell.is-bottom {
    justify-self: center;
    width: min(108px, 100%);
}

.viti-builder-custom-block.is-hidden {
    display: none;
}

.viti-builder-custom-block__cell.is-top {
    grid-area: top;
}

.viti-builder-custom-block__cell.is-left {
    grid-area: left;
}

.viti-builder-custom-block__cell.is-right {
    grid-area: right;
}

.viti-builder-custom-block__cell.is-bottom {
    grid-area: bottom;
}

.viti-builder-segmented {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    overflow: hidden;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
}

.viti-builder-segmented button {
    min-width: 0;
    border: 0;
    border-right: 1px solid var(--builder-border);
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    min-height: 27px;
    padding: 4px 3px;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
}

.viti-builder-segmented-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: inherit;
    line-height: 1;
}

.viti-builder-segmented-icon img {
    display: block;
    width: 15px;
    height: 15px;
    filter: invert(61%) sepia(7%) saturate(679%) hue-rotate(196deg) brightness(94%) contrast(88%);
}

.viti-builder-segmented button:hover .viti-builder-segmented-icon img,
.viti-builder-segmented button.is-active .viti-builder-segmented-icon img {
    filter: invert(82%) sepia(38%) saturate(1144%) hue-rotate(205deg) brightness(102%) contrast(101%);
}

.viti-builder-inspector-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.viti-builder-subsection {
    display: grid;
    gap: 8px;
    margin: 6px -8px -8px;
    border-top: 1px solid var(--builder-border);
    padding: 12px 8px 8px;
}

.viti-builder-subsection h4 {
    margin: 0;
    color: var(--builder-text);
    font-size: 14px;
    font-weight: 700;
}

.viti-builder-mini-button {
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    color: var(--builder-muted);
    cursor: pointer;
    min-height: 24px;
    padding: 3px 6px;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}

.viti-builder-mini-button:hover {
    border-color: var(--builder-accent);
    color: #d8c3ff;
}

.viti-builder-background-list {
    position: relative;
    display: grid;
    gap: 6px;
}

.viti-builder-background-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--builder-muted);
    font-size: 11px;
    font-weight: 750;
}

.viti-builder-background-title-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.viti-builder-background-title button {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.viti-builder-background-title .viti-builder-background-title-remove {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 4px;
    color: var(--builder-muted);
    font-size: 18px;
}

.viti-builder-background-title .viti-builder-background-title-remove:hover {
    color: var(--builder-danger, #ff6b6b);
}

.viti-builder-background-title .viti-builder-property-reset {
    width: 12px;
    height: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 14px;
}

.viti-builder-effect-collection {
    display: grid;
    gap: 6px;
}

.viti-builder-effect-collection__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.viti-builder-effect-collection__remove {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

.viti-builder-effect-collection__body {
    display: grid;
    gap: 4px;
}

.viti-builder-effect-collection__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 5px;
    align-items: center;
}

.viti-builder-effect-collection__item input {
    min-width: 0;
}

.viti-builder-background-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 4px;
    min-height: 44px;
    border: 1px solid var(--builder-border);
    border-radius: 8px;
    background: var(--builder-control);
    padding: 7px;
}

.viti-builder-background-item.is-dragging {
    opacity: .45;
}

.viti-builder-background-item.is-drop-before::before,
.viti-builder-background-item.is-drop-after::after {
    content: "";
    position: absolute;
    right: 4px;
    left: 4px;
    height: 2px;
    border-radius: 999px;
    background: var(--builder-accent);
    pointer-events: none;
}

.viti-builder-background-item.is-drop-before::before {
    top: -5px;
}

.viti-builder-background-item.is-drop-after::after {
    bottom: -5px;
}

.viti-builder-background-drag {
    color: #747782;
    cursor: grab;
    font-size: 16px;
    line-height: 1;
    user-select: none;
}

.viti-builder-background-drag:active {
    cursor: grabbing;
}

.viti-builder-background-row,
.viti-builder-background-remove {
    border: 0;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font: inherit;
}

.viti-builder-background-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
}

.viti-builder-background-swatch {
    display: grid;
    place-items: center;
    width: 24px;
    height: 15px;
    border: 1px solid var(--builder-border);
    border-radius: 5px;
    background:
        linear-gradient(45deg, #555862 25%, transparent 25%) 0 0 / 8px 8px,
        linear-gradient(-45deg, #555862 25%, transparent 25%) 0 4px / 8px 8px,
        linear-gradient(45deg, transparent 75%, #555862 75%) 4px -4px / 8px 8px,
        linear-gradient(-45deg, transparent 75%, #555862 75%) -4px 0 / 8px 8px,
        #2b2d34;
    overflow: hidden;
}

.viti-builder-background-swatch.is-preview {
    background-color: #2b2d34;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.viti-builder-background-swatch img {
    width: 10px;
    height: 10px;
    filter: invert(72%) sepia(8%) saturate(298%) hue-rotate(190deg) brightness(90%) contrast(89%);
}

.viti-builder-background-remove {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.viti-builder-background-popover {
    position: fixed;
    top: var(--builder-background-popover-top, 80px);
    left: var(--builder-background-popover-left, 16px);
    z-index: 9999;
    display: none;
    width: min(320px, calc(100vw - 24px));
    max-height: calc(100vh - 20px);
    overflow: auto;
    gap: 7px;
    border: 1px solid var(--builder-border);
    border-radius: 5px;
    background: #17181d;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    padding: 8px;
}

.viti-builder-background-item.is-open .viti-builder-background-popover,
.viti-builder-background-add-popover.is-open .viti-builder-background-popover {
    display: grid;
}

.viti-builder-background-add-popover {
    position: relative;
}

.viti-builder-background-popover__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--builder-text);
    font-size: 13px;
    font-weight: 800;
}

.viti-builder-background-popover__head button {
    border: 0;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
}

.viti-builder-background-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--builder-border);
    border-radius: 5px;
}

.viti-builder-background-tabs button {
    display: grid;
    place-items: center;
    min-height: 30px;
    border: 0;
    border-right: 1px solid var(--builder-border);
    background: transparent;
    cursor: pointer;
}

.viti-builder-background-tabs button:last-child {
    border-right: 0;
}

.viti-builder-background-tabs img {
    width: 16px;
    height: 16px;
    filter: invert(72%) sepia(8%) saturate(298%) hue-rotate(190deg) brightness(90%) contrast(89%);
}

.viti-builder-background-tabs button.is-active {
    background: #24252b;
}

.viti-builder-background-tabs button.is-active img {
    filter: invert(76%) sepia(65%) saturate(3418%) hue-rotate(210deg) brightness(103%) contrast(101%);
}

.viti-builder-background-pane {
    display: none;
    gap: 6px;
}

.viti-builder-background-pane.is-active {
    display: grid;
}

.viti-builder-background-field-slot {
    display: block;
}

.viti-builder-background-field-slot.is-hidden,
.viti-builder-gradient-radial-fields.is-hidden,
.viti-builder-background-size-custom.is-hidden,
.viti-builder-background-size-custom[hidden] {
    display: none;
}

.viti-builder-background-image-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.viti-builder-background-thumb {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    width: 84px;
    height: 64px;
    border: 1px solid var(--builder-border);
    border-radius: 7px;
    background: #858584;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.viti-builder-background-thumb span {
    position: relative;
    z-index: 1;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(17, 18, 22, 0.76);
    color: rgba(255, 255, 255, 0.95);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.viti-builder-gradient-control {
    display: grid;
    gap: 7px;
}

.viti-builder-gradient-track {
    position: relative;
    height: 38px;
    border: 1px solid var(--builder-border);
    border-radius: 5px;
    background: linear-gradient(0deg, #400919cc 0%, rgba(64, 9, 25, 0) 100%);
    cursor: copy;
}

.viti-builder-gradient-stop {
    position: absolute;
    bottom: -13px;
    width: 18px;
    height: 18px;
    border: 3px solid #343641;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 7px 14px rgba(0, 0, 0, 0.38);
    cursor: grab;
    padding: 0;
    transform: translateX(-50%);
}

.viti-builder-gradient-stop::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 14px;
    width: 2px;
    height: 37px;
    background: rgba(190, 193, 204, 0.78);
    transform: translateX(-50%);
}

.viti-builder-gradient-stop.is-active {
    border-color: var(--builder-accent);
}

.viti-builder-gradient-stop:active {
    cursor: grabbing;
}

.viti-builder-gradient-stop-editors {
    display: grid;
    padding-top: 12px;
}

.viti-builder-gradient-stop-editor {
    display: none;
    grid-template-columns: minmax(0, 1fr) 76px 24px;
    gap: 6px;
    align-items: end;
}

.viti-builder-gradient-stop-editor.is-active {
    display: grid;
}

.viti-builder-gradient-stop-editor label {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: var(--builder-muted);
    font-size: 11px;
    font-weight: 700;
}

.viti-builder-gradient-stop-editor input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    color: var(--builder-text);
    min-height: 28px;
    padding: 4px 6px;
    font: inherit;
}

.viti-builder-gradient-stop-editor input[type="color"] {
    padding: 2px;
}

.viti-builder-gradient-position-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    min-height: 28px;
    overflow: hidden;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
}

.viti-builder-gradient-position-control input {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: ew-resize;
    text-align: right;
}

.viti-builder-gradient-position-control input.is-dragging {
    cursor: ew-resize;
    user-select: none;
}

.viti-builder-gradient-position-control input::-webkit-outer-spin-button,
.viti-builder-gradient-position-control input::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.viti-builder-gradient-position-control input[type="number"] {
    appearance: textfield;
}

.viti-builder-gradient-position-control > span {
    display: grid;
    place-items: center;
    border-left: 1px solid var(--builder-border);
    color: var(--builder-muted);
    font-size: 11px;
    font-weight: 800;
}

.viti-builder-gradient-color-field {
    grid-column: span 1;
}

.viti-builder-background-color-field .viti-builder-gradient-color-picker {
    grid-template-columns: 28px minmax(0, 1fr);
}

.viti-builder-gradient-color-picker {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    min-height: 28px;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    padding: 3px 5px 3px 3px;
}

.viti-builder-gradient-color-picker button {
    width: 24px;
    height: 22px;
    border: 0;
    border-radius: 3px;
    background:
        linear-gradient(45deg, #bbb 25%, transparent 25%) 0 0 / 8px 8px,
        linear-gradient(-45deg, #bbb 25%, transparent 25%) 0 4px / 8px 8px,
        linear-gradient(45deg, transparent 75%, #bbb 75%) 4px -4px / 8px 8px,
        linear-gradient(-45deg, transparent 75%, #bbb 75%) -4px 0 / 8px 8px,
        #fff;
    cursor: pointer;
    padding: 0;
}

.viti-builder-gradient-color-picker button::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: var(--builder-pickr-color, transparent);
}

.viti-builder-gradient-color-picker span {
    color: var(--builder-muted);
    font-size: 10px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcr-app {
    z-index: 100020;
    border: 1px solid var(--builder-border);
    border-radius: 5px;
    background: #17181d;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.pcr-app[data-theme='nano'] {
    width: 292px;
}

.pcr-app .pcr-interaction input {
    background: var(--builder-control);
    color: var(--builder-text);
}

.pcr-app .pcr-interaction input.pcr-type {
    border: 1px solid #4a4c56 !important;
    background: #2b2c33 !important;
    color: #f2f2f5 !important;
    opacity: 1 !important;
}

.pcr-app .pcr-interaction input.pcr-type:not(.active) {
    background: #2b2c33 !important;
    color: #f2f2f5 !important;
}

.pcr-app .pcr-interaction input.pcr-type.active {
    border-color: var(--builder-accent) !important;
    background: var(--builder-accent) !important;
    color: #fff !important;
}

.viti-builder-gradient-stop-editor button {
    display: grid;
    place-items: center;
    width: 24px;
    height: 28px;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.viti-builder-gradient-stop-editor button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.viti-builder-background-toggle-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 20px;
}

.viti-builder-background-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 0;
    text-align: left;
}

.viti-builder-background-toggle i {
    position: relative;
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #454650;
}

.viti-builder-background-toggle i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #17181d;
    transition: transform 120ms ease;
}

.viti-builder-background-toggle.is-active i {
    background: var(--builder-accent);
}

.viti-builder-background-toggle.is-active i::after {
    transform: translateX(18px);
}

.viti-builder-segmented button:last-child {
    border-right: 0;
}

.viti-builder-segmented button:hover,
.viti-builder-segmented button.is-active {
    background: #2a2b32;
    color: #d8c3ff;
}

.viti-builder-inspector-field textarea {
    resize: vertical;
}

.viti-builder-inspector-empty {
    margin: 0;
    color: var(--builder-muted);
    font-size: 11px;
    font-weight: 650;
}

.viti-builder-canvas-wrap {
    position: relative;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    background: #0f1015;
}

.viti-builder-sidebar-reopen {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--builder-border);
    border-radius: 5px;
    background: #15161c;
    cursor: pointer;
}

.viti-builder-sidebar-reopen img {
    display: block;
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.viti-builder-shell--sidebar-collapsed .viti-builder-sidebar-reopen {
    display: inline-flex;
}

.viti-builder-canvas {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.viti-builder-shell .gjs-cv-canvas {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.viti-builder-shell .gjs-cv-canvas-bg {
    background: transparent;
}

.viti-builder-shell .gjs-cv-canvas__frames {
    padding: 0;
    transform-origin: top left;
}

.viti-builder-shell .gjs-frame-wrapper {
    border: 0;
    background: transparent;
    box-shadow: none;
    transition: width 0.2s ease;
}

.viti-builder-shell .gjs-frame {
    border: 0;
    background: transparent;
    box-shadow: none;
    display: block;
}

.viti-builder-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-right: 1px solid var(--builder-border);
    background: #111218;
    padding: 10px 7px;
}

.viti-builder-shell--sidebar-collapsed .viti-builder-rail {
    display: none;
}

.viti-builder-rail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.viti-builder-rail-button img {
    display: block;
    width: 18px;
    height: 18px;
    filter: invert(61%) sepia(7%) saturate(679%) hue-rotate(196deg) brightness(94%) contrast(88%);
}

.viti-builder-rail-button:hover img,
.viti-builder-rail-button.is-active img {
    filter: brightness(0) invert(1);
}

.viti-builder-rail-button:hover {
    background: var(--builder-panel-soft);
    color: #fff;
}

.viti-builder-rail-button.is-active {
    background: var(--builder-accent);
    color: #fff;
}

.viti-builder-sidebar-panels {
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    background: var(--builder-panel);
}

.viti-builder-shell--sidebar-collapsed .viti-builder-sidebar-panels {
    display: none;
}

.viti-builder-sidebar-panel {
    display: none;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.viti-builder-sidebar-panel.is-active {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.viti-builder-sidebar-panel__head,
.viti-builder-sidebar-panel__subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    flex: 0 0 42px;
    border-bottom: 1px solid var(--builder-border);
    padding: 0 12px;
    color: var(--builder-muted);
    font-size: 13px;
    font-weight: 800;
}

.viti-builder-sidebar-panel__head {
    color: var(--builder-text);
}

.viti-builder-sidebar-panel__body {
    min-height: 0;
    overflow: auto;
    padding: 8px;
}

.viti-builder-sidebar-panel__body--pages {
    flex: 0 0 auto;
}

.viti-builder-sidebar-panel__body--layers {
    flex: 1 1 auto;
    padding: 0;
}

.viti-builder-page-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 4px;
    background: #3a3b45;
    color: #f1f1f4;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
}

.viti-builder-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border: 1px solid var(--builder-border);
    border-radius: 4px;
    background: var(--builder-control);
    color: var(--builder-text);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.viti-builder-page-link:hover {
    border-color: var(--builder-accent);
    color: #f0e8ff;
}

.viti-builder-page-link.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.viti-builder-empty-row {
    border: 1px solid var(--builder-border);
    border-radius: 5px;
    color: var(--builder-muted);
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
}

.viti-builder-status {
    overflow: hidden;
    color: var(--builder-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viti-builder-status[data-state="saved"] {
    color: #6ee7a8;
}

.viti-builder-status[data-state="error"] {
    color: #fb7185;
}

.viti-builder-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--builder-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.viti-builder-button:hover,
.viti-builder-button.is-active {
    border-color: var(--builder-border);
    background: var(--builder-panel-soft);
    color: #fff;
}

.viti-builder-button--primary {
    background: var(--builder-accent);
    color: #fff;
}

.viti-builder-button--primary:hover {
    background: #7c3aed;
}

.viti-builder-select {
    height: 30px;
    border: 1px solid var(--builder-border);
    border-radius: 6px;
    background: #101117;
    color: var(--builder-text);
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
}

.viti-builder-shell .gjs-one-bg {
    background-color: var(--builder-panel);
}

.viti-builder-shell .gjs-two-color {
    color: var(--builder-text);
}

.viti-builder-shell .gjs-three-bg {
    background-color: var(--builder-accent);
}

.viti-builder-shell .gjs-four-color,
.viti-builder-shell .gjs-four-color-h:hover {
    color: #c4b5fd;
}

.viti-builder-shell .gjs-block {
    width: 100%;
    min-height: 72px;
    margin: 0 0 8px;
    border: 1px solid var(--builder-border);
    border-radius: 7px;
    background: #20212a;
    box-shadow: none;
}

.viti-builder-shell .gjs-block:hover {
    border-color: var(--builder-accent);
    color: #fff;
}

.viti-builder-shell .gjs-layer {
    background: transparent;
    color: #b9bccb;
    font-size: 13px;
    font-weight: 600;
}

.viti-builder-shell .gjs-layer-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    border: 0;
    background: transparent;
    color: inherit;
    letter-spacing: 0;
    padding: 0 8px 0 12px;
}

.viti-builder-shell .gjs-layer-title:hover {
    background: #20212a;
    color: #eef0f8;
}

.viti-builder-shell .gjs-layer.gjs-selected > .gjs-layer-title {
    background: #0f6f9d;
    color: #fff;
}

.viti-builder-shell .gjs-layer-name {
    padding: 0;
    text-shadow: none;
}

.viti-builder-shell .gjs-layer-caret {
    color: #9ca0b1;
}

.viti-builder-shell .gjs-layer-vis,
.viti-builder-shell .gjs-layer-move,
.viti-builder-shell .gjs-layer-count {
    opacity: 0.62;
}

.viti-builder-shell .gjs-layer-children {
    margin-left: 10px;
}
