.constructor-page { background: #080907; }
.constructor-page .constructor-layout { padding-top: 14px; }
.constructor-page .workspace-card,
.constructor-page .selection-panel { background: #10110f; border-color: #50432c; box-shadow: none; }
.constructor-page .workspace-toolbar,
.constructor-page .workspace-top,
.constructor-page .workspace-stage,
.constructor-page .selection-footer { background: #10110f; }
.constructor-page .diagram-scroll { background-color: #000; }
.constructor-page .roll-layout { border-top: 1px solid #55472e; background: #0b0c0a; }
.constructor-page .film-choice-inline {
    min-width: 0;
    margin: 0 0 12px;
    padding: 11px;
    border: 1px solid #635033;
    border-radius: 5px;
    background: #181916;
}
.constructor-page .film-choice-inline legend { color: #e9c783; }
.constructor-page .film-choice-inline .film-catalog-picker > span { color: #d5c9ae; }
.constructor-page .film-choice-inline .film-catalog-picker input,
.constructor-page .film-choice-inline .film-catalog-picker select,
.constructor-page .film-choice-inline .film-color-field input {
    box-sizing: border-box;
    width: 100%;
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #6b5a3e;
    border-radius: 4px;
    background: #20221f;
    color: #f7f3e9;
    font-size: 12px;
}
.constructor-page .film-choice-inline .film-catalog-picker option { color: #f7f3e9; background: #20221f; }
.constructor-page .film-choice-inline .film-product-summary {
    max-height: 54px;
    overflow: auto;
    padding: 7px 9px;
    border-color: #5b4a31;
    border-radius: 4px;
    background: #22231f;
    color: #e3d5ba;
    font-size: 11px;
    line-height: 1.35;
}
.constructor-page .film-choice-inline .film-color-field { display: grid; gap: 5px; margin-top: 8px; font-size: 11px; }
.constructor-page .film-choice-inline .film-color-field[hidden] { display: none; }
.constructor-toolbar-actions { display: flex; align-items: center; gap: 6px; }
.constructor-toolbar-actions .toolbar-mobile-icon { display: none; }
.constructor-page .constructor-toolbar-actions #diagram-erase-toggle { display: none; }
.constructor-toolbar-actions button,
.constructor-toolbar-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #725b38;
    border-radius: 4px;
    color: #ead1a0;
    background: #1b1a16;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.constructor-page .constructor-toolbar-actions > button,
.constructor-page .constructor-toolbar-actions > a { box-sizing: border-box; height: 34px; min-height: 34px; gap: 5px; line-height: 1.2; }
.constructor-page .constructor-toolbar-actions svg { width: 15px; height: 15px; flex: 0 0 15px; }
.constructor-page .constructor-toolbar-actions #clear-selection-toolbar { background: #2b1b18; border-color: #805045; color: #edb0a3; }
.constructor-page .constructor-toolbar-actions #clear-selection-toolbar:not(:disabled):hover { background: #3b211c; border-color: #ba7161; color: #ffd0c4; }
@media (max-width: 700px) {
    .lekala-theme.constructor-page .workspace-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 10px; gap: 8px; }
    .constructor-page .instruction { gap: 7px; min-width: 0; }
    .constructor-page .instruction strong { font-size: 12px; line-height: 1.3; }
    .constructor-page .instruction small { display: none; }
    .constructor-page .instruction .pulse-dot { width: 6px; height: 6px; flex: 0 0 6px; box-shadow: none; }
    .constructor-page .constructor-toolbar-actions { display: grid; grid-template-columns: repeat(5, 40px); justify-content: start; gap: 6px; width: 100%; }
    .constructor-page .constructor-toolbar-actions button,
    .constructor-page .constructor-toolbar-actions a { min-width: 0; height: 40px; min-height: 40px; padding: 4px 3px; gap: 3px; border-radius: 3px; border-color: #665336; background: #1b1914; font-size: 11px; line-height: 1.2; }
    .constructor-page .constructor-toolbar-actions #detail-edit-open { border-color: #665336; color: #ead1a0; }
    .constructor-page .constructor-toolbar-actions #detail-edit-open:not(:disabled) { background: #e2bc79; border-color: #e2bc79; color: #17140e; }
    .constructor-page .constructor-toolbar-actions #diagram-erase-toggle { display: inline-flex; }
    .constructor-page .constructor-toolbar-actions #diagram-erase-toggle[aria-pressed="true"] { background: #e2bc79; border-color: #e2bc79; color: #17140e; }
    .constructor-page .diagram-scroll.is-erasing .detail-hit:not(.selected) { pointer-events: auto; }
    .constructor-toolbar-actions .toolbar-mobile-icon { display: block; }
    .constructor-page .constructor-toolbar-actions span { display: none; }
    .constructor-page .constructor-toolbar-actions svg,
    .constructor-page .constructor-toolbar-actions #detail-edit-open svg { width: 18px; height: 18px; flex: 0 0 18px; }
    .lekala-theme.constructor-page .workspace-top .protection-presets-toolbar { padding: 0; margin: 0; gap: 0; border: 0; border-radius: 0; background: transparent; }
    .constructor-page .protection-presets-toolbar-label { display: none; }
    .constructor-page .protection-preset-grid,
    .constructor-page .protection-preset-grid:has(button[data-selection-zone]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
    .constructor-page .protection-preset-grid:not(:has(button[data-selection-zone])) button:last-child { grid-column: 1 / -1; }
    .lekala-theme.constructor-page .workspace-top .protection-preset-grid button { display: flex; flex-direction: row; align-items: center; min-width: 0; height: 44px; min-height: 44px; padding: 6px 8px; gap: 0; border: 1px solid #665336; border-radius: 3px; background: #1b1914; color: #efe0c2; }
    .constructor-page .protection-preset-number { display: none; }
    .constructor-page .protection-preset-copy { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; width: 100%; text-align: left; }
    .constructor-page .protection-preset-grid strong { min-width: 0; font-size: 11px; line-height: 1.2; white-space: normal; }
    .constructor-page .protection-preset-grid small { flex: 0 0 auto; padding: 2px 4px; border-radius: 2px; background: #e4c4841c; font-size: 10px; line-height: 1.2; color: #ddc59b; }
    .constructor-page .preset-count-unit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .lekala-theme.constructor-page .workspace-top .protection-preset-grid button.is-active { background: #e2bc79; border-color: #e2bc79; color: #17140e; }
    .lekala-theme.constructor-page .workspace-top .protection-preset-grid button.is-active small { color: #17140e; background: #00000012; }
    .constructor-page .diagram-caption { min-height: 32px; padding: 6px 10px; gap: 7px; }
    .constructor-page .diagram-caption > span { width: 20px; height: 20px; min-width: 20px; font-size: 12px; }
    .constructor-page .diagram-caption strong { font-size: 11px; line-height: 1.3; }
    .constructor-page .diagram-measure-summary { padding: 6px 10px; gap: 6px 12px; }
    .constructor-page .diagram-measure-summary > span { font-size: 10px; }
    .constructor-page .diagram-measure-summary b { font-size: 12px; }
    .constructor-page .diagram-measure-summary small { display: none; }
}
.constructor-toolbar-actions button:disabled { opacity: .48; cursor: default; }
.constructor-toolbar-actions a:hover,
.constructor-toolbar-actions button:not(:disabled):hover { border-color: #dcb877; background: #2d261b; }
.lekala-theme.constructor-page .selection-footer .purchase-actions { margin: 10px 0 8px; }
.purchase-ozon-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.lekala-theme.constructor-page .purchase-actions .purchase-ozon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    min-height: 44px;
    padding: 3px 7px 3px 3px;
    box-sizing: border-box;
    border: 1px solid #61513a;
    border-radius: 7px;
    background: #191815;
    color: #f0e2ca;
    font-size: 12px;
    line-height: 1.25;
    text-decoration: none;
    touch-action: manipulation;
}
.purchase-ozon svg { width: 13px; height: 13px; flex: 0 0 13px; color: #d8b67e; }
.lekala-theme.constructor-page .purchase-actions .purchase-ozon:hover,
.lekala-theme.constructor-page .purchase-actions .purchase-ozon:focus-visible {
    border-color: #d5ab69;
    background: #29241c;
    color: #fff0d6;
}
.purchase-ozon-mark {
    display: block;
    flex: 0 0 64px;
    width: 64px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
}
.purchase-ozon-copy { display: grid; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.purchase-ozon-copy small { color: #c9b99f; font-size: 10px; }
.lekala-theme.constructor-page .purchase-actions .purchase-ozon:focus-visible { outline: 2px solid #edcd93; outline-offset: 2px; }
.lekala-theme.constructor-page .purchase-actions .purchase-ozon:active { background: #352b1e; transform: translateY(1px); }
.lekala-theme.constructor-page .selection-footer .selection-total { margin-bottom: 6px; }
.lekala-theme.constructor-page .selection-footer .bulk-overlap-compact {
    margin: 0;
    padding: 10px;
    gap: 8px;
    border-radius: 5px;
}
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-head { align-items: center; gap: 6px; }
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-head strong { font-size: 12px; line-height: 1.3; }
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-head > span { padding: 2px 5px; border-radius: 3px; font-size: 9px; }
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-presets button { min-height: 34px; padding: 5px 3px; border-radius: 4px; font-size: 11px; }
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-custom > div { grid-template-columns: 48px 24px minmax(0, 1fr); border-radius: 4px; }
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-custom input { height: 34px; min-height: 34px; font-size: 12px; }
.lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-custom button { min-height: 34px; font-size: 11px; }
@media (max-width: 860px) {
    .lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-presets button,
    .lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-custom input,
    .lekala-theme.constructor-page .bulk-overlap-compact .bulk-overlap-custom button { min-height: 40px; }
}
@media (min-width: 861px) {
    .constructor-page .workspace-toolbar { grid-template-columns: minmax(180px, 1fr) auto minmax(430px, 1fr); }
    .constructor-page .constructor-toolbar-actions { grid-column: 2; grid-row: 1; }
    .constructor-page .protection-presets-toolbar { grid-column: 3; grid-row: 1 / 3; }
    .constructor-page .roll-layout { margin-top: 12px; }
}
@media (max-width: 860px) {
    .constructor-page .constructor-toolbar-actions { width: 100%; flex-wrap: wrap; }
    .constructor-page .roll-layout { margin-top: 10px; }
    .lekala-theme.constructor-page .mobile-selection-bar:not([hidden]) {
        display: block;
        right: max(12px, env(safe-area-inset-right));
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: auto;
        width: auto;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .lekala-theme.constructor-page .mobile-selection-bar .button {
        width: 104px;
        height: 44px;
        min-height: 44px;
        padding: 8px 16px;
        border-radius: 6px;
        font-size: 14px;
        line-height: 1;
        white-space: nowrap;
    }
}
