/* Конфигуратор ландшафта: слева сцена (план участка / 3D), справа компактная панель; на мобильных — друг под другом */
.landcfg {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
    color: var(--color-whte, #fff);
}

/* Сцена: в 3D — небо, на плане — светлая «бумага» с сеткой (рисует SVG) */
/* Липкая колонка, высота сцены и плашка итога — общие (configurator-kit/kit.css: .cfg-view, .cfg-stage, .cfg-deal) */
.landcfg__stage {
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(180deg, #b9d4e6 0%, #dde9ee 60%, #e9f0ef 100%);
    border: 1px solid rgba(0, 0, 0, .06);
}

.landcfg__stage.is-plan {
    background: #f4f7f0;
}

/* Вечер: тёмное небо */
.landcfg__stage.is-night:not(.is-plan) {
    background: linear-gradient(180deg, #0b1220 0%, #16202e 60%, #1d2836 100%);
}

.landcfg__stage.is-night:not(.is-plan) .landcfg__hint {
    color: rgba(255, 255, 255, .6);
}

.landcfg__stage canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    cursor: grab;
    touch-action: none;
}

.landcfg__stage canvas:active {
    cursor: grabbing;
}

.landcfg__plan {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    touch-action: none;
    user-select: none;
    font-family: inherit;
}

.landcfg__stage.is-plan .landcfg__plan {
    display: block;
}

.landcfg__stage.is-plan canvas {
    visibility: hidden;
}

.landcfg__v {
    cursor: grab;
    transition: r .15s;
}

.landcfg__v:hover {
    filter: drop-shadow(0 0 4px rgba(79, 125, 51, .6));
}

.landcfg__mid {
    cursor: copy;
    opacity: .75;
}

.landcfg__mid:hover {
    opacity: 1;
}

.landcfg__plan.is-dragging,
.landcfg__plan.is-dragging * {
    cursor: grabbing;
}

/* Курсоры плана — с !important и повышенной специфичностью: сайт глушит курсоры кастомным (site-cursor.css) */
html.has-site-cursor .landcfg__plan .landcfg__v,
html.has-site-cursor .landcfg__plan .landcfg__v * {
    cursor: grab !important;
}

html.has-site-cursor .landcfg__plan .landcfg__mid,
html.has-site-cursor .landcfg__plan .landcfg__mid * {
    cursor: copy !important;
}

html.has-site-cursor .landcfg__plan.is-dragging,
html.has-site-cursor .landcfg__plan.is-dragging * {
    cursor: grabbing !important;
}

.landcfg__item,
.landcfg__area-shape {
    cursor: grab;
}

.landcfg__h {
    cursor: grab;
}

.landcfg__h--move {
    cursor: move;
}

.landcfg__plan.is-drawing,
.landcfg__plan.is-drawing * {
    cursor: crosshair;
}

html.has-site-cursor .landcfg__plan .landcfg__item,
html.has-site-cursor .landcfg__plan .landcfg__item *,
html.has-site-cursor .landcfg__plan .landcfg__area-shape,
html.has-site-cursor .landcfg__plan .landcfg__h {
    cursor: grab !important;
}

html.has-site-cursor .landcfg__plan .landcfg__h--move {
    cursor: move !important;
}

html.has-site-cursor .landcfg__plan.is-drawing,
html.has-site-cursor .landcfg__plan.is-drawing * {
    cursor: crosshair !important;
}

.landcfg__loader {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background: #f4f7f0;
    transition: opacity .4s;
}

.landcfg__loader span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, .1);
    border-top-color: var(--color-alt, #97bf74);
    animation: landcfg-spin 1s linear infinite;
}

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

.landcfg--ready .landcfg__loader {
    opacity: 0;
    pointer-events: none;
}

.landcfg__nogl {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    place-items: center;
    padding: 24px;
    text-align: center;
    color: #2d3a24;
}

.landcfg--nogl .landcfg__nogl {
    display: grid;
}

/* Панель инструментов на сцене */
.landcfg__tools {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
}

.landcfg--nogl .landcfg__tools {
    display: none;
}

.landcfg__tool {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: rgba(29, 31, 29, .78);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background .2s, color .2s, opacity .2s;
}

.landcfg__tool:hover:not(:disabled) {
    background: #1d1f1d;
}

.landcfg__tool.is-active,
.landcfg__tool.is-active:hover:not(:disabled) {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

/* День/вечер: одна иконка — куда переключит (днём луна, вечером солнце) */
.landcfg__tool--night .landcfg__icon-sun,
.landcfg__tool--night[aria-pressed="true"] .landcfg__icon-moon {
    display: none;
}

.landcfg__tool--night[aria-pressed="true"] .landcfg__icon-sun {
    display: block;
}

.landcfg__tool:disabled {
    opacity: .3;
    cursor: default;
}

.landcfg__mode {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(29, 31, 29, .78);
    backdrop-filter: blur(6px);
}

.landcfg__mode button {
    min-width: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.landcfg__mode button.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.landcfg__hint {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 16px;
    z-index: 2;
    font-size: 13px;
    color: rgba(45, 58, 36, .7);
    pointer-events: none;
}

.landcfg__hint[hidden] {
    display: none;
}

/* Панель */
.landcfg__panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: #1d1f1d;
}

.landcfg__group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.landcfg__label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--color-alt, #97bf74);
}

.landcfg__label output {
    color: var(--color-whte, #fff);
}

.landcfg__meta {
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
}

.landcfg__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.landcfg__split {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
}

.landcfg__split > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Плитки «иконка + подпись» */
.landcfg__tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.landcfg__tiles--4 {
    grid-template-columns: repeat(4, 1fr);
}

.landcfg__tiles--5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Типы покрытия — плитки фиксированной ширины (подпись переносится) одной строкой, что не влезло — листается */
.landcfg__tiles--fixed {
    display: flex;
    margin: -2px;
    padding: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.landcfg__tiles--fixed::-webkit-scrollbar {
    display: none;
}

.landcfg__tiles--fixed .landcfg__tile {
    flex: 0 0 80px;
    width: 80px;
    scroll-snap-align: start;
}

.landcfg__tiles--fixed .landcfg__tile svg {
    width: 34px;
    height: 28px;
}

.landcfg__tiles--fixed .landcfg__tile small {
    white-space: normal;
    text-align: center;
}

.landcfg__tiles--5 .landcfg__tile svg {
    width: 34px;
    height: 28px;
}

.landcfg__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px 7px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.landcfg__tile svg {
    width: 40px;
    height: 32px;
}

.landcfg__tile small {
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: .75;
}

.landcfg__tile:hover {
    border-color: var(--color-alt, #97bf74);
}

.landcfg__tile.is-active {
    background: var(--color-alt, #97bf74);
    border-color: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.landcfg__tile.is-active small {
    opacity: 1;
}

/* Сегменты */
.landcfg__seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
}

.landcfg__opt {
    flex: 1 1 auto;
    padding: 7px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.landcfg__opt:hover {
    background: rgba(255, 255, 255, .08);
}

.landcfg__opt.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.landcfg__range {
    width: 100%;
    height: 30px;
    margin: 0;
    accent-color: var(--color-alt, #97bf74);
    cursor: pointer;
}

.landcfg__area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Цвета */
.landcfg__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.landcfg__swatch {
    width: 26px;
    height: 26px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--sw);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), inset -3px -5px 7px rgba(0, 0, 0, .3);
    outline: 2px solid transparent;
    outline-offset: 2px;
    cursor: pointer;
    transition: outline-color .2s, transform .15s;
}

.landcfg__swatch--wood {
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 4px),
        var(--sw);
}

.landcfg__swatch:hover {
    transform: scale(1.1);
}

.landcfg__swatch.is-active {
    outline-color: var(--color-alt, #97bf74);
}

/* Кнопка «+» (карточки каталога) */
.landcfg__addons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.landcfg__addon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .2s;
}

.landcfg__addon:hover {
    border-color: var(--color-alt, #97bf74);
}

.landcfg__addon.is-shake {
    animation: landcfg-shake .35s;
}

@keyframes landcfg-shake {
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.landcfg__plus {
    position: relative;
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 50%;
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.landcfg__plus::before,
.landcfg__plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 2px;
    margin: -1px 0 0 -4.5px;
    border-radius: 1px;
    background: currentColor;
}

.landcfg__plus::after {
    transform: rotate(90deg);
}

.landcfg__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    white-space: nowrap;
}

.landcfg__chip.is-bad {
    opacity: .5;
    text-decoration: line-through;
}

.landcfg__chip button {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.landcfg__chip button:hover {
    background: #c8453b;
}

/* Название выбранного цвета — только в окне на телефоне */
.landcfg__swatch-name {
    display: none;
}

/* Смета: материалы из той же раскладки, что 3D */
.landcfg__spec {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    margin: 0;
    font-size: 13px;
}

.landcfg__spec dt {
    color: rgba(255, 255, 255, .6);
}

.landcfg__spec dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Низ широкой сцены занят плашкой итога — подсказка уходит наверх, влево от инструментов */
@container (min-width: 900px) {
    .landcfg__hint {
        top: 24px;
        bottom: auto;
        right: 330px;
        line-height: 1.35;
    }
}

@media (max-width: 1024px) {
    .landcfg {
        grid-template-columns: 1fr;
    }
}

/* Телефон: сцена, кнопки разделов и итог — в один экран; панель — окном поверх кнопок (kit.css: .cfg-panel) */
@media (max-width: 600px) {
    .landcfg__stage {
        border-radius: 20px;
    }

    /* В окне: плитки и кружки — одной строкой от края до края (листаются свайпом), кружки крупнее */
    .landcfg__panel .landcfg__tile:not(.landcfg__tiles--fixed > *) {
        width: 96px;
    }

    .landcfg__panel .landcfg__swatches {
        gap: 12px;
        margin-block: -9px;
        padding-block: 9px;
    }

    .landcfg__panel .landcfg__swatch {
        width: 52px;
        height: 52px;
        outline-offset: 3px;
    }

    .landcfg__tools {
        top: 10px;
        right: 10px;
        gap: 4px;
    }

    .landcfg__tool {
        width: 36px;
        height: 36px;
    }

    .landcfg__hint {
        display: none;
    }

    .landcfg__split {
        grid-template-columns: 1fr;
    }
}

/* Пока рисуется дорожка: подсказка и кнопки поверх сцены, слева сверху */
.landcfg__drawbar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 260px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
    color: #2d3a24;
}

.landcfg__drawbar[hidden] {
    display: none;
}

.landcfg__drawbar span {
    flex: 1 1 100%;
    max-width: 420px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.landcfg__drawbtn {
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(29, 31, 29, .78);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.landcfg__drawbtn--ok {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

/* Заголовок группы с переключателем или выпадающим фильтром справа (как у декоров стола) */
.landcfg__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.landcfg__seg--small .landcfg__opt {
    padding: 5px 10px;
    font-size: 12px;
}

.landcfg__opt:disabled {
    opacity: .35;
    cursor: default;
}

.landcfg__opt:disabled:hover {
    background: transparent;
}

.landcfg__seg--wide {
    width: 100%;
}

.landcfg__filter select {
    height: 28px;
    padding: 0 28px 0 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2397bf74' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") right 11px center no-repeat;
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.landcfg__filter select:focus-visible {
    outline: 2px solid var(--color-alt, #97bf74);
    outline-offset: 2px;
}

.landcfg__filter option {
    background: #1d1f1d;
    color: #fff;
}

.landcfg__swatch[hidden],
.landcfg__card[hidden] {
    display: none !important;
}

/* Каталог: карточки «снимок + название» в один ряд, что не влезло — листается свайпом */
.landcfg__cards {
    display: flex;
    gap: 8px;
    margin: -2px;
    padding: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.landcfg__cards::-webkit-scrollbar {
    display: none;
}

/* Стрелка прокрутки каталога — на середине снимка (kit.css: .cfg-arrow) */
.cfg-rail:has(> .landcfg__cards) {
    --cfg-arrow-top: 26px;
}

.landcfg__card {
    flex: 0 0 104px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    scroll-snap-align: start;
    cursor: pointer;
}

.landcfg__card-img {
    position: relative;
    display: block;
    aspect-ratio: 6 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #dfe9ec, #f1f4ee);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transition: box-shadow .2s;
}

.landcfg__card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landcfg__card-img img[hidden] {
    display: none;
}

.landcfg__card-img .landcfg__plus {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(29, 31, 29, .75);
    color: #fff;
}

.landcfg__card-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.landcfg__card:hover .landcfg__card-img {
    box-shadow: inset 0 0 0 2px var(--color-alt, #97bf74);
}

.landcfg__card:hover .landcfg__plus {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.landcfg__card.is-shake {
    animation: landcfg-shake .35s;
}

@keyframes landcfg-shake {
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Выбранный на плане экземпляр */
.landcfg__pick {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
}

.landcfg__pick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.landcfg__pick-head > span {
    display: flex;
    gap: 4px;
}

.landcfg__iconbtn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.landcfg__iconbtn:hover {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.landcfg__iconbtn--del:hover {
    background: #c8453b;
    color: #fff;
}

.landcfg__note {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .55);
}

/* Нарисованные дорожки и площадки */
.landcfg__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.landcfg__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s;
}

.landcfg__chip:hover {
    background: rgba(255, 255, 255, .14);
}

.landcfg__chip.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.landcfg__chip-sw {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--sw);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.landcfg__chip button {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.landcfg__chip button:hover {
    background: #c8453b;
    color: #fff;
}

.landcfg__row[hidden],
.landcfg__area[hidden] {
    display: none;
}

@container (min-width: 900px) {
    .landcfg__drawbar {
        right: 330px;
    }
}

@media (max-width: 600px) {
    .landcfg__panel .landcfg__card {
        flex-basis: 112px;
    }

    /* Шапка раздела с фильтром — левее крестика окна */
    .landcfg__panel .landcfg__head {
        padding-right: 44px;
    }

    .landcfg__panel .landcfg__head [data-cfg-title] {
        padding-right: 0;
    }

    .landcfg__drawbar {
        top: 56px;
        left: 10px;
        right: 10px;
    }

    .landcfg__drawbar span {
        font-size: 12px;
    }
}

/* 3D: над растением или формой — «рука», пока тащим — «сжатая рука» */
.landcfg__stage.is-grab canvas,
html.has-site-cursor .landcfg__stage.is-grab canvas {
    cursor: grab !important;
}

.landcfg__stage.is-grabbing canvas,
html.has-site-cursor .landcfg__stage.is-grabbing canvas {
    cursor: grabbing !important;
}
