/* photobookEditor */
.constructor-editor-stage {
    width: 100%;
}
.constructor-editor-back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    color: #c9a497;
    font-size: 20px;
    text-decoration: none;
    border-bottom: 1px solid #c9a497;
}
.constructor-editor-back:hover {
    text-decoration: none;
    color: #c9a497;
    border-bottom-color: transparent;
}
.constructor-editor-heading {
    margin-bottom: 28px;
}
.constructor-editor-heading h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1.1;
}
.constructor-editor-heading p {
    max-width: 760px;
    margin: 0;
    color: #af8b7e;
    font-size: 18px;
    line-height: 1.5;
}
.fbk-editor {
    --fbk-editor-bg: #211916;
    --fbk-editor-panel: #2b2226;
    --fbk-editor-panel-soft: #352722;
    --fbk-editor-line: #4e3627;
    --fbk-editor-accent: #c48770;
    --fbk-editor-accent-light: #eeaf88;
    --fbk-editor-text: #ffffff;
    --fbk-editor-muted: #af8b7e;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 300px;
    gap: 18px;
    min-height: 720px;
    padding: 18px;
    border: 2px solid var(--fbk-editor-line);
    border-radius: 18px;
    background: var(--fbk-editor-bg);
}
.fbk-editor button,
.fbk-editor input {
    font: inherit;
}
.fbk-editor-sidebar,
.fbk-editor-settings {
    min-width: 0;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 14px;
    background: var(--fbk-editor-panel);
}
.fbk-editor-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.fbk-editor-sidebar-head {
    padding: 18px;
    border-bottom: 1px solid var(--fbk-editor-line);
}
.fbk-editor-sidebar-head h3,
.fbk-editor-settings h3 {
    margin: 0 0 12px;
    color: var(--fbk-editor-text);
    font-size: 18px;
    line-height: 1.3;
}
.fbk-editor-count {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
}
.fbk-editor-count button,
.fbk-editor-count input {
    height: 38px;
    border: 1px solid #6b4638;
    border-radius: 9px;
    background: #1e1615;
    color: #ffffff;
    text-align: center;
}
.fbk-editor-count button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.fbk-editor-count button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.fbk-editor-count button:hover:not(:disabled) {
    border-color: var(--fbk-editor-accent);
    color: var(--fbk-editor-accent-light);
}
.fbk-editor-count button:disabled {
    opacity: .35;
    cursor: default;
}
.fbk-editor-spread-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 1 656px;
    min-height: 0;
    max-height: 656px;
    padding: 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8e695c #382821;
}
.fbk-editor-spread-list::-webkit-scrollbar {
    width: 9px;
}
.fbk-editor-spread-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #382821;
}
.fbk-editor-spread-list::-webkit-scrollbar-thumb {
    border: 2px solid #382821;
    border-radius: 999px;
    background: #8e695c;
}
.fbk-editor-spread-list::-webkit-scrollbar-thumb:hover {
    background: var(--fbk-editor-accent);
}
.fbk-editor-spread-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--fbk-editor-text);
    text-align: left;
    cursor: pointer;
}
.fbk-editor-spread-item:hover {
    background: var(--fbk-editor-panel-soft);
}
.fbk-editor-spread-item.is-active {
    border-color: var(--fbk-editor-accent);
    background: #3b2a24;
}
.fbk-editor-spread-item.is-empty:not(.is-active) {
    opacity: .68;
}
.fbk-editor-spread-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1e1615;
    color: var(--fbk-editor-accent-light);
    font-weight: 700;
}
.fbk-editor-spread-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
}
.fbk-editor-spread-info > span:last-child {
    color: var(--fbk-editor-muted);
    font-size: 12px;
    font-weight: 400;
}
.fbk-editor-spread-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--fbk-editor-text);
    font-size: 14px;
    font-weight: 700;
}
.fbk-editor-spread-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #e9b56c;
    cursor: help;
}
.fbk-editor-spread-warning svg {
    width: 100%;
    height: 100%;
    fill: rgba(233, 181, 108, .15);
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-editor-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.fbk-editor-main-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    margin-bottom: 12px;
}
.fbk-editor-main-head h3 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
}
.fbk-editor-save-status {
    color: #8fa68a;
    font-size: 13px;
}
.fbk-editor-save-status.is-error {
    color: #ef8e8e;
}
.fbk-editor-canvas {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 560px;
    padding: 28px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 14px;
    background: #382821;
    overflow: hidden;
}
.fbk-editor-canvas.is-drag-over::after {
    content: "Отпустите фотографии здесь";
    position: absolute;
    inset: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--fbk-editor-accent-light);
    border-radius: 14px;
    background: rgba(33, 25, 22, .9);
    color: #ffffff;
    font-size: 22px;
    pointer-events: none;
}
.fbk-editor-page {
    position: relative;
    width: min(100%, 800px);
    aspect-ratio: var(--fbk-editor-page-aspect, 4 / 3);
    padding: 22px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}
.fbk-editor-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px;
    text-align: center;
}
.fbk-editor-empty[hidden] {
    display: none;
}
.fbk-editor-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #f1e7e1;
    color: #8e695c;
}
.fbk-editor-empty-icon svg {
    display: block;
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    aspect-ratio: 1 / 1;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-editor-empty h4 {
    margin: 0 0 8px;
    color: #2b2226;
    font-size: 26px;
}
.fbk-editor-empty p {
    max-width: 420px;
    margin: 0 0 20px;
    color: #7c5443;
    font-size: 15px;
    line-height: 1.45;
}
.fbk-editor-primary,
.fbk-editor-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--fbk-editor-accent);
    border-radius: 10px;
    cursor: pointer;
}
.fbk-editor-primary {
    background: var(--fbk-editor-accent);
    color: #ffffff;
}
.fbk-editor-primary:hover {
    background: #da9f7d;
}
.fbk-editor-secondary {
    background: transparent;
    color: var(--fbk-editor-accent-light);
}
.fbk-editor-secondary:hover:not(:disabled) {
    background: #3b2a24;
}
.fbk-editor-secondary:disabled {
    opacity: .4;
    cursor: default;
}
.fbk-editor-grid {
    display: grid;
    width: 100%;
    height: 100%;
    gap: var(--fbk-editor-gap, 12px);
}
.fbk-editor-grid[hidden] {
    display: none;
}
.fbk-editor-photo {
    position: relative;
    min-width: 0;
    min-height: 0;
    border-radius: 7px;
    background: #ece4df;
    overflow: hidden;
    cursor: grab;
}
.fbk-editor-photo.is-dragging {
    opacity: .35;
}
.fbk-editor-photo.is-drop-target {
    outline: 3px solid var(--fbk-editor-accent);
    outline-offset: -3px;
}
.fbk-editor-photo.is-missing::after {
    content: "Файл недоступен";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4eeee;
    color: #8d4c4c;
}
.fbk-editor-photo img {
    position: absolute;
    display: block;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
}
.fbk-editor-photo img.is-loading {
    opacity: 0;
}
.fbk-editor-photo-controls {
    position: absolute;
    z-index: 7;
    top: 8px;
    right: 8px;
    left: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.fbk-editor-photo-controls button {
    pointer-events: auto;
}
.fbk-editor-photo-controls button[data-action='crop'] {
    margin-right: auto;
}
.fbk-editor-photo:hover .fbk-editor-photo-controls,
.fbk-editor-photo:focus-within .fbk-editor-photo-controls {
    opacity: 1;
    transform: translateY(0);
}
.fbk-editor-photo-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(30, 22, 21, .88);
    color: #ffffff;
    line-height: 0;
    cursor: pointer;
}
.fbk-editor-photo-controls button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.fbk-editor-photo-controls button:hover:not(:disabled) {
    background: #c48770;
}
.fbk-editor-photo-controls button:disabled {
    display: none;
}
.fbk-editor-meta {
    min-height: 22px;
    padding-top: 10px;
    color: var(--fbk-editor-muted);
    font-size: 13px;
    text-align: center;
}
.fbk-editor-settings {
    align-self: stretch;
    padding: 18px;
    overflow-y: auto;
}
.fbk-editor-settings-block + .fbk-editor-settings-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--fbk-editor-line);
}
.fbk-editor-layouts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    max-height: 520px;
    padding-right: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8e695c #382821;
}
.fbk-editor-layouts::-webkit-scrollbar {
    width: 7px;
}
.fbk-editor-layouts::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #382821;
}
.fbk-editor-layouts::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #8e695c;
}
.fbk-editor-layouts::-webkit-scrollbar-thumb:hover {
    background: var(--fbk-editor-accent);
}
.fbk-editor-layout-thumb {
    aspect-ratio: var(--fbk-editor-page-aspect, 4 / 3);
    padding: 7px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 9px;
    background: #1e1615;
    cursor: pointer;
}
.fbk-editor-layout-thumb:hover,
.fbk-editor-layout-thumb.is-active {
    border-color: var(--fbk-editor-accent-light);
}
.fbk-editor-layout-thumb.is-active {
    box-shadow: 0 0 0 1px var(--fbk-editor-accent-light);
}
.fbk-editor-layout-grid {
    display: grid;
    width: 100%;
    height: 100%;
    gap: 3px;
}
.fbk-editor-layout-grid i {
    display: block;
    border-radius: 2px;
    background: #8e695c;
}
.fbk-editor-layout-thumb.is-active .fbk-editor-layout-grid i {
    background: #eeaf88;
}
.fbk-editor-layout-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--fbk-editor-muted);
    font-size: 13px;
    line-height: 1.4;
}
.fbk-editor-range-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--fbk-editor-muted);
}
.fbk-editor-range-label label {
    margin: 0;
    color: inherit;
}
.fbk-editor-range-label span {
    font-size: 13px;
}
.fbk-editor-gap-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: center;
    gap: 12px;
}
.fbk-editor-range {
    width: 100%;
    accent-color: var(--fbk-editor-accent);
}
.fbk-editor-gap-value {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    height: 38px;
    padding: 0 9px;
    border: 1px solid #6b4638;
    border-radius: 9px;
    background: #1e1615;
    color: var(--fbk-editor-muted);
}
.fbk-editor-gap-value:focus-within {
    border-color: var(--fbk-editor-accent);
}
.fbk-editor-gap-value input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
    text-align: right;
    appearance: textfield;
}
.fbk-editor-gap-value input::-webkit-inner-spin-button,
.fbk-editor-gap-value input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}
.fbk-editor-gap-value span {
    font-size: 13px;
}
.fbk-editor-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fbk-editor-tip {
    margin: 12px 0 0;
    color: var(--fbk-editor-muted);
    font-size: 12px;
    line-height: 1.45;
}
.constructor-editor-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    margin-top: 24px;
    padding: 20px 22px;
    border: 1px solid #4e3627;
    border-radius: 14px;
    background: linear-gradient(135deg, #211916 0%, #281d19 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.constructor-editor-footer-copy {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.constructor-editor-footer-icon {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(196, 135, 112, .55);
    border-radius: 50%;
    background: rgba(196, 135, 112, .1);
}
.constructor-editor-footer-icon::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 15px;
    width: 11px;
    height: 17px;
    border-right: 2px solid #eeaf88;
    border-bottom: 2px solid #eeaf88;
    transform: rotate(45deg);
}
.constructor-editor-footer strong {
    display: block;
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.25;
}
.constructor-editor-footer p {
    max-width: 520px;
    margin: 0;
    color: #af8b7e;
    font-size: 14px;
    line-height: 1.45;
}
.constructor-editor-footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(184px, 1fr));
    gap: 10px;
}
.constructor-editor-footer-actions button,
.constructor-editor-footer-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 54px;
    padding: 0 20px;
    border: 1px solid #c48770;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.constructor-editor-footer-actions a {
    background: transparent;
    color: #eeaf88;
}
.constructor-editor-footer-actions a:hover {
    background: rgba(196, 135, 112, .1);
    color: #ffffff;
}
.constructor-editor-footer-actions button {
    background: #c48770;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(196, 135, 112, .16);
}
.constructor-editor-footer-actions button:hover {
    border-color: #d69980;
    background: #d69980;
}
.constructor-editor-footer-actions button:active,
.constructor-editor-footer-actions a:active {
    transform: translateY(1px);
}
.fbk-order-upload-status {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #4e3627;
    border-radius: 10px;
    background: #211916;
}
.fbk-order-upload-status[hidden] {
    display: none;
}
.fbk-order-upload-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 14px;
}
.fbk-order-upload-status-track {
    height: 8px;
    border-radius: 999px;
    background: #382821;
    overflow: hidden;
}
.fbk-order-upload-status-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #c48770;
    transition: width .2s ease;
}
.fbk-order-upload-status.is-interrupted {
    border-color: #9b674d;
    background: #291d18;
}
.fbk-order-upload-status.is-interrupted .fbk-order-upload-status-bar {
    background: #dfa07f;
}
.fbk-order-upload-resume {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 40px;
    margin: 14px 0 0 !important;
    padding: 9px 16px !important;
    border: 1px solid #c48770 !important;
    border-radius: 8px !important;
    background: #c48770 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.2 !important;
    cursor: pointer;
}
.fbk-order-upload-resume:hover {
    border-color: #d69980 !important;
    background: #d69980 !important;
}
.fbk-order-upload-resume[hidden] {
    display: none !important;
}
@media (max-width: 1280px) {
    .fbk-editor {
        grid-template-columns: 190px minmax(0, 1fr);
    }
    .fbk-editor-settings {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 24px;
    }
    .fbk-editor-settings-block + .fbk-editor-settings-block {
        margin-top: 0;
        padding-top: 0;
        padding-left: 24px;
        border-top: 0;
        border-left: 1px solid var(--fbk-editor-line);
    }
}
@media (max-width: 767px) {
    .constructor-editor-heading h2 {
        font-size: 34px;
    }
    .constructor-editor-heading p {
        font-size: 16px;
    }
    .fbk-editor {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 12px;
    }
    .fbk-editor-sidebar {
        overflow: visible;
    }
    .fbk-editor-sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px;
    }
    .fbk-editor-sidebar-head h3 {
        margin: 0;
    }
    .fbk-editor-count {
        width: 150px;
    }
    .fbk-editor-spread-list {
        flex: 0 0 auto;
        flex-direction: row;
        max-height: none;
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .fbk-editor-spread-list::-webkit-scrollbar {
        width: auto;
        height: 7px;
    }
    .fbk-editor-spread-item {
        flex: 0 0 auto;
        width: auto;
        min-width: 126px;
    }
    .fbk-editor-main-head {
        margin-top: 2px;
    }
    .fbk-editor-canvas {
        min-height: 0;
        padding: 12px;
    }
    .fbk-editor-page {
        width: 100%;
        padding: 10px;
        border-radius: 10px;
    }
    .fbk-editor-photo-controls {
        inset: 0;
        display: block;
        opacity: 1;
        transform: none;
        pointer-events: none;
    }
    .fbk-editor-photo-controls button {
        position: absolute;
        width: 27px;
        height: 27px;
        margin: 0;
        pointer-events: auto;
    }
    .fbk-editor-photo-controls button[data-action='crop'] {
        top: 4px;
        left: 4px;
    }
    .fbk-editor-photo-controls button[data-action='remove'] {
        top: 4px;
        right: 4px;
    }
    .fbk-editor-photo-controls button[data-action='left'] {
        bottom: 4px;
        left: 4px;
    }
    .fbk-editor-photo-controls button[data-action='right'] {
        right: 4px;
        bottom: 4px;
    }
    .fbk-editor-settings {
        display: block;
        padding: 14px;
        overflow: visible;
    }
    .fbk-editor-settings-block + .fbk-editor-settings-block {
        margin-top: 20px;
        padding-top: 20px;
        padding-left: 0;
        border-top: 1px solid var(--fbk-editor-line);
        border-left: 0;
    }
    .fbk-editor-layouts {
        grid-template-columns: none;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: 92px;
        max-height: none;
        padding-right: 0;
        padding-bottom: 5px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .fbk-editor-layout-note,
    .fbk-editor-single-presets {
        grid-row: 1 / -1;
    }
    .constructor-editor-footer {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }
    .constructor-editor-footer-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .constructor-editor-footer-actions button,
    .constructor-editor-footer-actions a {
        width: 100%;
        padding: 0 14px;
        white-space: normal;
    }
}
@media (max-width: 680px) and (max-height: 650px) {
    .fbk-editor-crop-head p,
    .fbk-editor-crop-touch-hint {
        display: none;
    }
    .fbk-editor-crop-body {
        gap: 8px;
        margin-top: 10px;
    }
    .fbk-editor-crop-stage {
        min-height: 220px;
    }
    .fbk-editor-crop-controls {
        gap: 5px;
    }
    .fbk-editor-crop-controls label {
        padding-top: 4px;
        padding-bottom: 4px;
    }
}
@media (max-width: 480px) {
    .fbk-editor-sidebar-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .fbk-editor-count {
        width: 100%;
    }
    .fbk-editor-main-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    .fbk-editor-empty {
        padding: 20px;
    }
    .fbk-editor-empty-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 10px;
    }
    .fbk-editor-empty-icon svg {
        flex-basis: 22px;
        width: 22px;
        min-width: 22px;
        height: 22px;
        min-height: 22px;
    }
    .fbk-editor-empty h4 {
        font-size: 20px;
    }
    .fbk-editor-empty p {
        margin-bottom: 14px;
        font-size: 13px;
    }
    .fbk-editor-primary,
    .fbk-editor-secondary {
        min-height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }
    .constructor-editor-footer-copy {
        align-items: flex-start;
    }
    .constructor-editor-footer-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }
    .constructor-editor-footer-icon::before {
        top: 9px;
        left: 13px;
    }
    .constructor-editor-footer strong {
        font-size: 17px;
    }
    .constructor-editor-footer-actions {
        grid-template-columns: 1fr;
    }
    .constructor-editor-footer-actions button {
        order: -1;
    }
}
/* photobookEditor */
.constructor-wrap.is-editor-stage .constructor-left {
    display: none;
}
.constructor-wrap.is-editor-stage .constructor-right {
    width: 100%;
}

/* photobookEditorAdvanced */
.fbk-editor-toolbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 12px;
    background: var(--fbk-editor-panel);
}
.fbk-editor-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fbk-editor-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #6b4638;
    border-radius: 9px;
    background: #1e1615;
    color: var(--fbk-editor-text);
    cursor: pointer;
}
.fbk-editor-tool svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-editor-tool:hover:not(:disabled) {
    border-color: var(--fbk-editor-accent);
    color: var(--fbk-editor-accent-light);
}
.fbk-editor-tool:disabled {
    opacity: .35;
    cursor: default;
}
.fbk-editor-guides-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--fbk-editor-muted);
    font-size: 14px;
    cursor: pointer;
}
.fbk-editor-guides-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--fbk-editor-accent);
}
.fbk-editor-cover-nav {
    margin: 10px 10px 0;
    border-style: dashed;
}
.fbk-editor-cover-nav .fbk-editor-spread-number svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-editor-save-status {
    display: block;
    max-width: 100%;
    color: var(--fbk-editor-muted);
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
}
.fbk-editor-save-status.is-error {
    color: #ffb09b;
}
.fbk-editor-canvas {
    position: relative;
}
.fbk-editor-print-guides {
    position: absolute;
    z-index: 8;
    inset: 22px;
    pointer-events: none;
}
.fbk-editor-page:not(.is-guides-visible) .fbk-editor-print-guides {
    display: none;
}
.fbk-editor-guide-bleed,
.fbk-editor-guide-safe,
.fbk-editor-guide-fold {
    position: absolute;
    pointer-events: none;
}
.fbk-editor-guide-bleed {
    top: var(--fbk-guide-bleed-y, 1.5%);
    right: var(--fbk-guide-bleed-x, 1.5%);
    bottom: var(--fbk-guide-bleed-y, 1.5%);
    left: var(--fbk-guide-bleed-x, 1.5%);
    border: 1px dashed rgba(255, 119, 103, .85);
    border-radius: 6px;
}
.fbk-editor-guide-safe {
    top: var(--fbk-guide-safe-y, 4.5%);
    right: var(--fbk-guide-safe-x, 4.5%);
    bottom: var(--fbk-guide-safe-y, 4.5%);
    left: var(--fbk-guide-safe-x, 4.5%);
    border: 1px dashed rgba(255, 229, 148, .85);
    border-radius: 6px;
}
.fbk-editor-guide-fold {
    top: var(--fbk-guide-bleed-y, 1.5%);
    bottom: var(--fbk-guide-bleed-y, 1.5%);
    left: 50%;
    border-left: 1px dashed rgba(255, 255, 255, .72);
}
.fbk-editor-photo {
    position: relative;
    overflow: hidden;
}
.fbk-editor-photo > img {
    position: absolute;
    display: block;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
}
.fbk-editor-inline-quality {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    padding: 4px 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}
.fbk-editor-inline-quality--good {
    background: rgba(43, 125, 84, .92);
}
.fbk-editor-inline-quality--warning {
    background: rgba(174, 111, 31, .94);
}
.fbk-editor-inline-quality--low {
    background: rgba(157, 56, 56, .94);
}
.fbk-editor-photo > .fbk-editor-quality {
    position: absolute;
    z-index: 6;
    bottom: 6px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    color: #fff;
    cursor: help;
    transform: translateX(-50%);
}
.fbk-editor-photo > .fbk-editor-quality[hidden] {
    display: none;
}
.fbk-editor-photo > .fbk-editor-quality svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-editor-photo > .fbk-editor-quality::before {
    display: none;
}
.fbk-editor-photo > .fbk-editor-quality--warning {
    background: rgba(174, 111, 31, .94);
}
.fbk-editor-photo > .fbk-editor-quality--low {
    background: rgba(157, 56, 56, .94);
}
.fbk-editor-cover-canvas {
    position: absolute;
    z-index: 4;
    inset: 22px;
    overflow: hidden;
    border-radius: 12px;
    background: #efe1da;
}
.fbk-editor-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
}
.fbk-editor-cover-canvas::after {
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .6));
    content: '';
    pointer-events: none;
}
.fbk-editor-cover-canvas > div {
    position: absolute;
    z-index: 2;
    right: 7%;
    bottom: 8%;
    left: 7%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
.fbk-editor-cover-title-preview {
    font-size: clamp(26px, 4vw, 54px);
    line-height: 1.08;
}
.fbk-editor-cover-title-preview.is-placeholder {
    opacity: .65;
}
.fbk-editor-cover-subtitle-preview {
    margin-top: 8px;
    font-size: clamp(14px, 1.7vw, 23px);
}
.fbk-editor-actions--compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.fbk-editor-danger {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #8b4c43;
    border-radius: 10px;
    background: transparent;
    color: #ff9f8d;
    cursor: pointer;
}
.fbk-editor-danger:hover {
    border-color: #d16c5d;
    background: rgba(209, 108, 93, .08);
}
.fbk-editor-field {
    display: block;
    margin-bottom: 13px;
}
.fbk-editor-field > span {
    display: block;
    margin-bottom: 6px;
    color: var(--fbk-editor-muted);
    font-size: 13px;
}
.fbk-editor-field input[type='text'] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #6b4638;
    border-radius: 9px;
    outline: 0;
    background: #1e1615;
    color: #fff;
}
.fbk-editor-field input[type='text']:focus {
    border-color: var(--fbk-editor-accent);
}
.fbk-editor-color-field input {
    width: 100%;
    height: 42px;
    padding: 4px;
    border: 1px solid #6b4638;
    border-radius: 9px;
    background: #1e1615;
    cursor: pointer;
}
.fbk-editor-modal-open {
    overflow: hidden;
}
.fbk-editor-crop-modal {
    position: fixed;
    z-index: 100001;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 13, 12, .85);
    backdrop-filter: blur(5px);
}
.fbk-editor-crop-modal[hidden] {
    display: none;
}
.fbk-editor-crop-dialog {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 28px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 18px;
    background: var(--fbk-editor-panel);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}
.fbk-editor-crop-close {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #6b4638;
    border-radius: 50%;
    background: #1e1615;
    color: #fff;
    cursor: pointer;
}
.fbk-editor-crop-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}
.fbk-editor-crop-head {
    padding-right: 50px;
}
.fbk-editor-crop-head h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 26px;
}
.fbk-editor-crop-head p {
    margin: 0;
    color: var(--fbk-editor-muted);
    line-height: 1.5;
}
.fbk-editor-crop-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 24px;
    margin-top: 24px;
}
.fbk-editor-crop-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 440px;
    overflow: hidden;
    border: 1px solid rgba(196, 135, 112, .28);
    border-radius: 14px;
    background: #120c0b;
    isolation: isolate;
}
.fbk-editor-crop-backdrop {
    position: absolute;
    z-index: 0;
    display: block;
    max-width: none;
    opacity: .3;
    filter: brightness(.45) saturate(.68);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.fbk-editor-crop-stage-note {
    position: absolute;
    z-index: 3;
    right: 12px;
    bottom: 10px;
    left: 12px;
    padding: 6px 9px;
    border-radius: 7px;
    background: rgba(18, 12, 11, .78);
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
}
.fbk-editor-crop-viewport {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .88);
    border-radius: 12px;
    background: #160f0e;
    box-shadow: 0 0 0 999px rgba(12, 8, 7, .38), 0 14px 38px rgba(0, 0, 0, .45);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: contain;
}
.fbk-editor-crop-viewport:active {
    cursor: grabbing;
}
.fbk-editor-crop-viewport img {
    position: absolute;
    display: block;
    max-width: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.fbk-editor-crop-safe {
    position: absolute;
    top: var(--fbk-crop-safe-y, 5%);
    right: var(--fbk-crop-safe-x, 5%);
    bottom: var(--fbk-crop-safe-y, 5%);
    left: var(--fbk-crop-safe-x, 5%);
    border: 1px dashed rgba(255, 229, 148, .9);
    border-radius: 6px;
    pointer-events: none;
}
.fbk-editor-crop-viewport.is-guides-disabled .fbk-editor-crop-safe {
    display: none;
}
.fbk-editor-crop-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.fbk-editor-crop-controls label > span {
    display: block;
    margin-bottom: 5px;
    color: var(--fbk-editor-muted);
    font-size: 13px;
}
.fbk-editor-crop-control-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.fbk-editor-crop-control-head output {
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.fbk-editor-crop-controls input[type='range'] {
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    touch-action: none;
}
.fbk-editor-crop-controls input[type='range']::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: #4a3631;
}
.fbk-editor-crop-controls input[type='range']::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -9px;
    border: 2px solid #f3ded6;
    border-radius: 50%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--fbk-editor-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.fbk-editor-crop-controls input[type='range']::-moz-range-track {
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: #4a3631;
}
.fbk-editor-crop-controls input[type='range']::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--fbk-editor-accent);
}
.fbk-editor-crop-controls input[type='range']::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: 2px solid #f3ded6;
    border-radius: 50%;
    background: var(--fbk-editor-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.fbk-editor-crop-controls input[type='range']:focus-visible {
    outline: 2px solid rgba(225, 160, 134, .9);
    outline-offset: 3px;
}
.fbk-editor-crop-controls input[type='range']:disabled {
    opacity: .28;
    cursor: not-allowed;
}
.fbk-editor-crop-touch-hint {
    margin: -2px 0 0;
    color: rgba(215, 183, 172, .78);
    font-size: 12px;
    line-height: 1.45;
}
.fbk-editor-crop-quality {
    padding: 11px 12px;
    border-radius: 9px;
    background: #1e1615;
    color: var(--fbk-editor-muted);
    font-size: 13px;
    line-height: 1.45;
}
.fbk-editor-crop-quality--good {
    color: #84c89f;
}
.fbk-editor-crop-quality--warning {
    color: #e9b56c;
}
.fbk-editor-crop-quality--low {
    color: #ff9a86;
}
.fbk-editor-crop-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}
.constructor-review-stage {
    width: 100%;
}
.fbk-review-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.fbk-review-summary.is-quality-check-disabled {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.fbk-review-summary > div {
    display: flex;
    flex-direction: column;
    min-height: 96px;
    padding: 18px;
    border: 1px solid #4e3627;
    border-radius: 13px;
    background: #2b2226;
}
.fbk-review-summary strong {
    color: #fff;
    font-size: 25px;
    line-height: 1.1;
}
.fbk-review-summary span {
    margin-top: 7px;
    color: #af8b7e;
    font-size: 13px;
}
.fbk-review-warnings {
    margin-bottom: 22px;
    padding: 17px 19px;
    border: 1px solid #8c6339;
    border-radius: 12px;
    background: rgba(158, 103, 38, .12);
    color: #e9c58e;
}
.fbk-review-warnings strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}
.fbk-review-warnings ul {
    margin: 0;
    padding-left: 20px;
}
.fbk-review-warnings li + li {
    margin-top: 4px;
}
.fbk-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.fbk-review-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #4e3627;
    border-radius: 14px;
    background: #2b2226;
}
.fbk-review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.fbk-review-card-head strong {
    color: #fff;
    font-size: 16px;
}
.fbk-review-card-head span {
    color: #af8b7e;
    font-size: 12px;
    text-align: right;
}
.fbk-review-page {
    position: relative;
    display: grid;
    aspect-ratio: var(--fbk-editor-page-aspect, 4 / 3);
    overflow: hidden;
    padding: 12px;
    border-radius: 10px;
    background: #1d1614;
}
.fbk-review-page > div {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}
.fbk-review-page img {
    position: absolute;
    display: block;
    max-width: none;
}
.fbk-review-cover {
    display: block;
    padding: 0;
}
.fbk-review-cover > img {
    position: absolute;
    inset: 0;
}
.fbk-review-cover::after {
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .62));
    content: '';
}
.fbk-review-cover > div {
    position: absolute;
    z-index: 2;
    right: 7%;
    bottom: 8%;
    left: 7%;
    display: flex;
    flex-direction: column;
    color: #fff;
    text-align: center;
}
.fbk-review-cover strong {
    font-size: clamp(20px, 3vw, 38px);
}
.fbk-review-cover span {
    margin-top: 5px;
}
.fbk-review-quality {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 3;
    padding: 4px 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}
.fbk-review-quality--warning {
    background: rgba(174, 111, 31, .94);
}
.fbk-review-quality--low {
    background: rgba(157, 56, 56, .94);
}
.fbk-review-confirm {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #4e3627;
    border-radius: 14px;
    background: #211916;
}
.fbk-review-confirm > label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #e7d9d4;
    line-height: 1.55;
    cursor: pointer;
}
.fbk-review-confirm input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #c48770;
}
.fbk-review-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}
.fbk-review-confirm-actions button:disabled {
    opacity: .45;
    cursor: default;
}
@media (max-width: 991px) {
    .fbk-editor-toolbar {
        order: -1;
    }
    .fbk-editor-cover-nav {
        flex: 0 0 auto;
        width: auto;
        min-width: 150px;
        margin: 10px 0 0 10px;
    }
    .fbk-editor-print-guides,
    .fbk-editor-cover-canvas {
        inset: 12px;
    }
    .fbk-editor-crop-body {
        grid-template-columns: 1fr;
    }
    .fbk-editor-crop-stage {
        min-height: 400px;
    }
    .fbk-editor-crop-controls {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }
    .fbk-editor-crop-touch-hint,
    .fbk-editor-crop-quality {
        grid-column: 1 / -1;
    }
    .fbk-review-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 680px) {
    .fbk-editor-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .fbk-editor-tool span {
        display: none;
    }
    .fbk-editor-crop-modal {
        align-items: flex-end;
        padding: 6px 6px 0;
    }
    .fbk-editor-crop-dialog {
        width: 100%;
        max-height: calc(100dvh - 6px);
        padding: 20px 15px 16px;
        border-radius: 18px 18px 0 0;
        overscroll-behavior: contain;
    }
    .fbk-editor-crop-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }
    .fbk-editor-crop-head {
        padding-right: 48px;
    }
    .fbk-editor-crop-head h3 {
        font-size: 22px;
    }
    .fbk-editor-crop-head p {
        font-size: 13px;
    }
    .fbk-editor-crop-body {
        gap: 14px;
        margin-top: 16px;
    }
    .fbk-editor-crop-stage {
        min-height: min(390px, 48dvh);
    }
    .fbk-editor-crop-stage-note {
        right: 8px;
        bottom: 7px;
        left: 8px;
        font-size: 10px;
    }
    .fbk-editor-crop-controls {
        display: flex;
        gap: 8px;
    }
    .fbk-editor-crop-controls label {
        padding: 7px 10px;
        border: 1px solid rgba(196, 135, 112, .18);
        border-radius: 10px;
        background: rgba(30, 22, 21, .65);
    }
    .fbk-editor-crop-controls input[type='range'] {
        height: 40px;
    }
    .fbk-editor-crop-controls input[type='range']::-webkit-slider-thumb {
        width: 30px;
        height: 30px;
        margin-top: -12px;
    }
    .fbk-editor-crop-controls input[type='range']::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
    .fbk-editor-crop-touch-hint {
        margin-top: 0;
        text-align: center;
    }
    .fbk-editor-crop-footer {
        position: sticky;
        z-index: 5;
        bottom: calc(-16px - env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 16px -5px calc(-16px - env(safe-area-inset-bottom));
        padding: 12px 5px calc(16px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, rgba(43, 31, 30, 0), var(--fbk-editor-panel) 18%);
    }
    .fbk-editor-crop-footer button {
        min-height: 48px;
    }
    .fbk-editor-crop-footer .fbk-editor-primary {
        grid-column: 1 / -1;
        order: -1;
    }
    .fbk-review-grid {
        grid-template-columns: 1fr;
    }
    .fbk-review-confirm-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .fbk-review-confirm-actions .fbk-editor-primary {
        order: -1;
    }
}
@media (max-width: 480px) {
    .fbk-review-summary {
        grid-template-columns: 1fr 1fr;
    }
    .fbk-review-summary > div {
        min-height: 82px;
        padding: 14px;
    }
    .fbk-review-summary strong {
        font-size: 21px;
    }
}
/* photobookEditorAdvanced */
.order-modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 14px;
    padding: 0 22px;
    border-radius: 10px;
    background: #c48770;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}
.order-modal-link[hidden] {
    display: none;
}

.fbk-editor-count-note { display: block; margin: -8px 0 10px; color: #927b72; font-size: 12px; line-height: 1.25; }
.fbk-editor-print-guides.is-page-layout .fbk-editor-guide-fold { display: none; }

/* orderSuccessModal */
.order-modal {
    width: min(100%, 540px);
    max-width: 540px;
    padding: 52px 44px 40px;
    border: 1px solid #5b3d2d;
    border-radius: 18px;
    background: linear-gradient(145deg, #251b18 0%, #1f1715 100%);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
    overflow: visible;
    text-align: center;
}
.order-modal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.order-modal-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    border: 1px solid rgba(207, 142, 116, 0.55);
    border-radius: 50%;
    background: rgba(196, 135, 112, 0.12);
    color: #d8987f;
}
.order-modal-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.order-modal h2 {
    max-width: 430px;
    margin: 0 0 14px;
    color: #fff;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.18;
    text-align: center;
}
.order-modal p {
    max-width: 430px;
    margin: 0;
    color: #c9a497;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.55;
    text-align: center;
}
.order-modal-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 28px;
}
.order-modal-link {
    min-width: 220px;
    min-height: 52px;
    margin: 0;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(132, 76, 55, 0.2);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.order-modal-link:hover {
    background: #d2947c;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(132, 76, 55, 0.28);
}
.order-modal-link:focus-visible {
    outline: 2px solid #edb39a;
    outline-offset: 3px;
}
.order-modal .modal-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    right: 14px;
    top: 14px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #af8b7e !important;
    opacity: 1;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.order-modal .modal-close:hover {
    border-color: rgba(201, 164, 151, 0.25);
    background: rgba(201, 164, 151, 0.08);
    color: #fff !important;
}
.order-modal .modal-close:focus-visible {
    outline: 2px solid #edb39a;
    outline-offset: 2px;
}
.order-modal .modal-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
@media (max-width: 600px) {
    .order-modal {
        width: calc(100vw - 24px);
        padding: 46px 22px 28px;
        border-radius: 16px;
    }
    .order-modal-icon {
        width: 62px;
        height: 62px;
        margin-bottom: 18px;
    }
    .order-modal-icon svg {
        width: 30px;
        height: 30px;
    }
    .order-modal h2 {
        font-size: 28px;
    }
    .order-modal p {
        font-size: 18px;
        line-height: 1.5;
    }
    .order-modal-actions {
        margin-top: 24px;
    }
    .order-modal-link {
        width: 100%;
        max-width: 300px;
    }
    .order-modal .modal-close {
        right: 8px;
        top: 8px;
    }
}
/* orderSuccessModal */

/* photobookMethod */
.constructor-method-stage,
.constructor-assist-stage {
    width: 100%;
}
.fbk-method-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.fbk-method-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
    min-height: 440px;
    padding: 30px;
    border: 1px solid #4e3627;
    border-radius: 18px;
    outline: 0;
    background: linear-gradient(145deg, #2b2226 0%, #241b19 100%);
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.fbk-method-card:hover,
.fbk-method-card:focus-visible,
.fbk-method-card.is-selected {
    border-color: #c48770;
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
}
.fbk-method-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(196, 135, 112, .22), 0 18px 44px rgba(0, 0, 0, .2);
}
.fbk-method-card-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    border: 1px solid rgba(196, 135, 112, .45);
    border-radius: 16px;
    background: rgba(196, 135, 112, .1);
    color: #eeaf88;
}
.fbk-method-card-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-method-card-kicker {
    margin-bottom: 9px;
    color: #c48770;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.fbk-method-card > strong {
    display: block;
    margin-bottom: 13px;
    color: #ffffff;
    font-size: 26px;
    line-height: 1.2;
}
.fbk-method-card-text {
    color: #c9a497;
    font-size: 16px;
    line-height: 1.55;
}
.fbk-method-card-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 22px 0 28px;
    color: #e9d9d2;
    font-size: 14px;
    line-height: 1.4;
}
.fbk-method-card-list i {
    position: relative;
    padding-left: 23px;
    font-style: normal;
}
.fbk-method-card-list i::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 2px;
    width: 7px;
    height: 12px;
    border-right: 2px solid #c48770;
    border-bottom: 2px solid #c48770;
    transform: rotate(45deg);
}
.fbk-method-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #eeaf88;
    font-size: 16px;
    font-weight: 700;
}
.fbk-method-card-action svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}
.fbk-method-card:hover .fbk-method-card-action svg {
    transform: translateX(3px);
}
.fbk-method-note {
    margin: 18px 0 0;
    color: #af8b7e;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}
.fbk-assist {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 20px;
}
.fbk-assist-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid #4e3627;
    border-radius: 16px;
    background: #2b2226;
}
.fbk-assist-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.fbk-assist-card-head span {
    display: block;
    margin-bottom: 4px;
    color: #c48770;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.fbk-assist-card-head h3 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.25;
}
.fbk-assist-counter {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #211916;
}
.fbk-assist-counter strong {
    color: #ffffff;
    font-size: 17px;
}
.fbk-assist-counter span {
    margin: 0;
    color: #af8b7e;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.fbk-assist-dropzone {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
    padding: 30px 20px;
    border: 2px dashed #6b4638;
    border-radius: 14px;
    outline: 0;
    background: #211916;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.fbk-assist-dropzone:hover,
.fbk-assist-dropzone:focus-visible,
.fbk-assist-dropzone.is-drag-over {
    border-color: #c48770;
    background: #291e1a;
}
.fbk-assist-dropzone:focus-visible {
    box-shadow: 0 0 0 3px rgba(196, 135, 112, .18);
}
.fbk-assist-dropzone.is-drag-over {
    box-shadow: inset 0 0 0 1px #c48770;
}
.fbk-assist-dropzone-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: rgba(196, 135, 112, .13);
    color: #eeaf88;
}
.fbk-assist-dropzone-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-assist-dropzone > strong {
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 20px;
}
.fbk-assist-dropzone > span:not(.fbk-assist-dropzone-icon) {
    margin-bottom: 18px;
    color: #af8b7e;
    font-size: 14px;
}
.fbk-assist-dropzone > small {
    margin-top: 14px;
    color: #8f756d;
    font-size: 11px;
    line-height: 1.4;
}
.fbk-assist-files-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    color: #af8b7e;
    font-size: 13px;
}
.fbk-assist-files-head[hidden] {
    display: none;
}
.fbk-assist-files-head strong {
    color: #ffffff;
}
.fbk-assist-files-head button {
    padding: 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
    color: #c48770;
    cursor: pointer;
}
.fbk-assist-files {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    max-height: 360px;
    margin-top: 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8e695c #382821;
}
.fbk-assist-files::-webkit-scrollbar {
    width: 8px;
}
.fbk-assist-files::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #382821;
}
.fbk-assist-files::-webkit-scrollbar-thumb {
    border: 2px solid #382821;
    border-radius: 999px;
    background: #8e695c;
}
.fbk-assist-file {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid #4e3627;
    border-radius: 10px;
    background: #211916;
}
.fbk-assist-file-preview {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 7px;
    background: #382821;
}
.fbk-assist-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fbk-assist-file-placeholder {
    color: #c9a497;
    font-size: 11px;
    font-weight: 700;
}
.fbk-assist-file-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.fbk-assist-file-info strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fbk-assist-file-info span {
    margin-top: 3px;
    color: #8f756d;
    font-size: 10px;
}
.fbk-assist-file > button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #af8b7e;
    cursor: pointer;
}
.fbk-assist-file > button:hover {
    background: rgba(196, 135, 112, .12);
    color: #ffffff;
}
.fbk-assist-file > button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}
.fbk-assist-field {
    display: block;
}
.fbk-assist-field + .fbk-assist-field {
    margin-top: 20px;
}
.fbk-assist-field > span {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}
.fbk-assist-field input,
.fbk-assist-field textarea {
    width: 100%;
    border: 1px solid #6b4638;
    border-radius: 10px;
    outline: 0;
    background: #211916;
    color: #ffffff;
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.fbk-assist-field input {
    height: 48px;
    padding: 0 14px;
}
.fbk-assist-field textarea {
    min-height: 150px;
    padding: 13px 14px;
    resize: vertical;
}
.fbk-assist-field input:focus,
.fbk-assist-field textarea:focus {
    border-color: #c48770;
    box-shadow: 0 0 0 3px rgba(196, 135, 112, .12);
}
.fbk-assist-field input::placeholder,
.fbk-assist-field textarea::placeholder {
    color: #7f6860;
}
.fbk-assist-field small {
    display: block;
    margin-top: 7px;
    color: #8f756d;
    font-size: 11px;
    line-height: 1.45;
}
.fbk-assist-info {
    margin-top: 22px;
    padding: 15px 16px;
    border: 1px solid rgba(196, 135, 112, .24);
    border-radius: 11px;
    background: rgba(196, 135, 112, .07);
}
.fbk-assist-info strong {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 14px;
}
.fbk-assist-info p {
    margin: 0;
    color: #c9a497;
    font-size: 13px;
    line-height: 1.5;
}
.fbk-assist-footer {
    margin-top: 20px;
}
@media (max-width: 991px) {
    .fbk-method-card {
        min-height: 420px;
        padding: 24px;
    }
    .fbk-assist {
        grid-template-columns: 1fr;
    }
    .fbk-assist-files {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .fbk-method-choice {
        grid-template-columns: 1fr;
    }
    .fbk-method-card {
        min-height: 0;
    }
    .fbk-assist-card {
        padding: 18px;
    }
    .fbk-assist-files {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .fbk-method-card {
        padding: 20px;
    }
    .fbk-method-card-icon {
        width: 54px;
        height: 54px;
        margin-bottom: 18px;
    }
    .fbk-method-card > strong {
        font-size: 22px;
    }
    .fbk-method-card-text {
        font-size: 14px;
    }
    .fbk-method-card-list {
        margin: 18px 0 22px;
        font-size: 13px;
    }
    .fbk-assist-card-head {
        flex-direction: column;
    }
    .fbk-assist-dropzone {
        min-height: 250px;
        padding: 24px 14px;
    }
    .fbk-assist-files {
        grid-template-columns: 1fr;
    }
    .fbk-assist-file {
        grid-template-columns: 48px minmax(0, 1fr) 30px;
    }
    .fbk-assist-file-preview {
        width: 48px;
        height: 48px;
    }
}
/* photobookMethod */

/* photobookFoldGuide */
.fbk-editor-toolbar-options {
    flex-wrap: wrap;
    justify-content: flex-end;
}
.fbk-editor-toolbar-options .fbk-editor-guides-toggle {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(107, 70, 56, .72);
    border-radius: 9px;
    background: #1e1615;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.fbk-editor-toolbar-options .fbk-editor-guides-toggle:hover {
    border-color: var(--fbk-editor-accent);
    background: #2a1d1a;
    color: #d7b1a2;
}
.fbk-editor-fold-guide {
    position: absolute;
    z-index: 8;
    top: 0;
    bottom: 0;
    left: 50%;
    display: none;
    width: 1px;
    pointer-events: none;
    transform: translateX(-50%);
}
.fbk-editor-page.is-fold-visible .fbk-editor-fold-guide {
    display: block;
}
.fbk-editor-fold-guide::before {
    position: absolute;
    inset: 0;
    width: 1px;
    background: repeating-linear-gradient(to bottom, rgba(87, 61, 50, .72) 0 7px, rgba(87, 61, 50, 0) 7px 12px);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .36);
    content: '';
}
.fbk-editor-fold-guide-label {
    position: absolute;
    top: 7px;
    left: 0;
    padding: 3px 7px;
    border: 1px solid rgba(107, 70, 56, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: #76584c;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(43, 34, 38, .08);
}
.fbk-editor.is-page-mode .fbk-editor-fold-guide {
    display: none !important;
}
@media (max-width: 680px) {
    .fbk-editor-toolbar-options {
        width: 100%;
        justify-content: flex-start;
    }
    .fbk-editor-toolbar-options .fbk-editor-guides-toggle {
        min-height: 40px;
        padding: 0 12px;
    }
    .fbk-editor-fold-guide-label {
        top: 5px;
        padding: 3px 6px;
        font-size: 8px;
    }
}
/* photobookFoldGuide */

/* photobookEmptyState */
.fbk-editor-page.is-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    aspect-ratio: auto !important;
}
.fbk-editor-page.is-empty-state .fbk-editor-empty {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 296px;
}
.fbk-editor-page.is-empty-state .fbk-editor-print-guides,
.fbk-editor-page.is-empty-state .fbk-editor-fold-guide {
    display: none !important;
}
.fbk-editor-empty-icon {
    flex: 0 0 68px;
    width: 68px;
    min-width: 68px;
    height: 68px;
    min-height: 68px;
    aspect-ratio: 1 / 1;
}
@media (max-width: 767px) {
    .fbk-editor-page.is-empty-state {
        min-height: 320px;
    }
    .fbk-editor-page.is-empty-state .fbk-editor-empty {
        min-height: 300px;
    }
}
@media (max-width: 480px) {
    .fbk-editor-page.is-empty-state {
        min-height: 300px;
    }
    .fbk-editor-page.is-empty-state .fbk-editor-empty {
        min-height: 280px;
    }
    .fbk-editor-empty-icon {
        flex-basis: 52px;
        width: 52px;
        min-width: 52px;
        height: 52px;
        min-height: 52px;
    }
}
/* photobookEmptyState */


/* cropEdgeResize */
.fbk-editor-crop-resize {
    position: absolute;
    z-index: 6;
    display: block;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.fbk-editor-crop-resize::before {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    content: '';
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fbk-editor-crop-resize--top,
.fbk-editor-crop-resize--bottom {
    left: 50%;
    width: 88px;
    height: 30px;
    transform: translateX(-50%);
    cursor: ns-resize;
}
.fbk-editor-crop-resize--top {
    top: 0;
}
.fbk-editor-crop-resize--bottom {
    bottom: 0;
}
.fbk-editor-crop-resize--top::before,
.fbk-editor-crop-resize--bottom::before {
    top: 7px;
    left: 50%;
    width: 42px;
    height: 4px;
    transform: translateX(-50%);
}
.fbk-editor-crop-resize--bottom::before {
    top: auto;
    bottom: 7px;
}
.fbk-editor-crop-resize--left,
.fbk-editor-crop-resize--right {
    top: 50%;
    width: 30px;
    height: 88px;
    transform: translateY(-50%);
    cursor: ew-resize;
}
.fbk-editor-crop-resize--left {
    left: 0;
}
.fbk-editor-crop-resize--right {
    right: 0;
}
.fbk-editor-crop-resize--left::before,
.fbk-editor-crop-resize--right::before {
    top: 50%;
    left: 7px;
    width: 4px;
    height: 42px;
    transform: translateY(-50%);
}
.fbk-editor-crop-resize--right::before {
    right: 7px;
    left: auto;
}
.fbk-editor-crop-resize:hover::before,
.fbk-editor-crop-viewport.is-edge-resizing .fbk-editor-crop-resize::before {
    background: #eeaf88;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .45), 0 0 0 2px rgba(238, 175, 136, .18);
}
.fbk-editor-crop-viewport.is-edge-resizing {
    cursor: default;
}

.fbk-editor-crop-resize--corner {
    z-index: 7;
    width: 42px;
    height: 42px;
}
.fbk-editor-crop-resize--corner::before,
.fbk-editor-crop-resize--corner::after {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    content: '';
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fbk-editor-crop-resize--corner::before {
    width: 20px;
    height: 4px;
}
.fbk-editor-crop-resize--corner::after {
    width: 4px;
    height: 20px;
}
.fbk-editor-crop-resize--top-left {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}
.fbk-editor-crop-resize--top-left::before { top: 7px; left: 7px; }
.fbk-editor-crop-resize--top-left::after { top: 7px; left: 7px; }
.fbk-editor-crop-resize--top-right {
    top: 0;
    right: 0;
    cursor: nesw-resize;
}
.fbk-editor-crop-resize--top-right::before { top: 7px; right: 7px; }
.fbk-editor-crop-resize--top-right::after { top: 7px; right: 7px; }
.fbk-editor-crop-resize--bottom-right {
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
}
.fbk-editor-crop-resize--bottom-right::before { right: 7px; bottom: 7px; }
.fbk-editor-crop-resize--bottom-right::after { right: 7px; bottom: 7px; }
.fbk-editor-crop-resize--bottom-left {
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
}
.fbk-editor-crop-resize--bottom-left::before { bottom: 7px; left: 7px; }
.fbk-editor-crop-resize--bottom-left::after { bottom: 7px; left: 7px; }
.fbk-editor-crop-resize--corner:hover::before,
.fbk-editor-crop-resize--corner:hover::after,
.fbk-editor-crop-viewport.is-edge-resizing .fbk-editor-crop-resize--corner::before,
.fbk-editor-crop-viewport.is-edge-resizing .fbk-editor-crop-resize--corner::after {
    background: #eeaf88;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .45), 0 0 0 2px rgba(238, 175, 136, .18);
}
@media (max-width: 680px) {
    .fbk-editor-crop-resize--top,
    .fbk-editor-crop-resize--bottom {
        width: 104px;
        height: 38px;
    }
    .fbk-editor-crop-resize--left,
    .fbk-editor-crop-resize--right {
        width: 38px;
        height: 104px;
    }
    .fbk-editor-crop-resize--corner {
        width: 52px;
        height: 52px;
    }
    .fbk-editor-crop-resize--corner::before {
        width: 22px;
        height: 5px;
    }
    .fbk-editor-crop-resize--corner::after {
        width: 5px;
        height: 22px;
    }
    .fbk-editor-crop-resize--top::before,
    .fbk-editor-crop-resize--bottom::before {
        width: 48px;
        height: 5px;
    }
    .fbk-editor-crop-resize--left::before,
    .fbk-editor-crop-resize--right::before {
        width: 5px;
        height: 48px;
    }
}
/* cropEdgeResize */

/* singlePhotoPlacement */
.fbk-editor-grid.is-single-photo-layout {
    overflow: hidden;
    border-radius: 7px;
}
.fbk-editor-photo.is-single-photo-placement {
    cursor: move;
    touch-action: none;
    will-change: transform;
}
.fbk-editor-photo.is-single-photo-placement.is-placement-dragging {
    z-index: 6;
    cursor: grabbing;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
}
.fbk-editor-photo.is-single-photo-placement.is-offset::after {
    position: absolute;
    z-index: 5;
    right: 8px;
    bottom: 8px;
    width: 7px;
    height: 7px;
    border: 2px solid rgba(255, 255, 255, .82);
    border-radius: 50%;
    background: rgba(196, 135, 112, .92);
    box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
    content: '';
    pointer-events: none;
}
.fbk-editor-photo-controls button[data-action='center'] svg {
    width: 16px;
    height: 16px;
}
.fbk-review-page.is-single-photo-layout {
    overflow: hidden;
    background: #fff;
}
.fbk-review-page.is-single-photo-layout > .is-single-photo-placement {
    will-change: transform;
}
@media (max-width: 767px) {
    .fbk-editor-photo-controls button[data-action='center'] {
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
    }
}
/* singlePhotoPlacement */

/* singlePhotoFreeFrame */
.fbk-editor-grid.is-single-photo-layout {
    position: relative;
    overflow: hidden;
}
.fbk-editor-photo.fbk-editor-photo--single-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    cursor: default;
}
.fbk-editor-single-frame {
    position: absolute;
    z-index: 2;
    /* Размеры задаются в процентах от внутренней области листа.
       Пиксельный минимум мог выталкивать маленькую рамку за границу на телефонах. */
    min-width: 0;
    min-height: 0;
    overflow: visible;
    cursor: move;
    touch-action: none;
    will-change: left, top, width, height;
}
.fbk-editor-single-crop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 1px solid rgba(196, 135, 112, .18);
    border-radius: 7px;
    background: #ece4df;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
}
.fbk-editor-single-frame.is-placement-dragging {
    z-index: 6;
    cursor: grabbing;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
}
.fbk-editor-single-frame.is-frame-resizing {
    z-index: 7;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
}
.fbk-editor-single-frame.is-offset::after {
    position: absolute;
    z-index: 5;
    right: 8px;
    bottom: 8px;
    width: 7px;
    height: 7px;
    border: 2px solid rgba(255, 255, 255, .82);
    border-radius: 50%;
    background: rgba(196, 135, 112, .92);
    box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
    content: '';
    pointer-events: none;
}
.fbk-editor-photo--single-shell .fbk-editor-photo-controls {
    z-index: 20;
}
.fbk-editor-photo--single-shell:hover .fbk-editor-photo-controls,
.fbk-editor-photo--single-shell:focus-within .fbk-editor-photo-controls {
    opacity: 1;
    transform: translateY(0);
}
.fbk-editor-single-crop > .fbk-editor-quality {
    position: absolute;
    z-index: 8;
    bottom: 6px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    color: #fff;
    cursor: help;
    transform: translateX(-50%);
}
.fbk-editor-single-crop > .fbk-editor-quality[hidden] {
    display: none;
}
.fbk-editor-single-crop > .fbk-editor-quality svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fbk-editor-single-crop > .fbk-editor-quality--warning {
    background: rgba(174, 111, 31, .94);
}
.fbk-editor-single-crop > .fbk-editor-quality--low {
    background: rgba(157, 56, 56, .94);
}
.fbk-editor-single-resize {
    position: absolute;
    z-index: 12;
    display: block;
    opacity: .72;
    touch-action: none;
    transition: opacity .15s ease;
}
.fbk-editor-single-frame:hover .fbk-editor-single-resize,
.fbk-editor-single-frame.is-frame-resizing .fbk-editor-single-resize {
    opacity: 1;
}
.fbk-editor-single-resize::before {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(255, 255, 255, .95);
    background: #c48770;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
    content: '';
    transform: translate(-50%, -50%);
}
.fbk-editor-single-resize--top,
.fbk-editor-single-resize--bottom {
    right: 26px;
    left: 26px;
    height: 18px;
    cursor: ns-resize;
}
.fbk-editor-single-resize--top { top: 0; }
.fbk-editor-single-resize--bottom { bottom: 0; }
.fbk-editor-single-resize--top::before,
.fbk-editor-single-resize--bottom::before {
    width: 34px;
    height: 5px;
    border-radius: 999px;
}
.fbk-editor-single-resize--left,
.fbk-editor-single-resize--right {
    top: 26px;
    bottom: 26px;
    width: 18px;
    cursor: ew-resize;
}
.fbk-editor-single-resize--left { left: 0; }
.fbk-editor-single-resize--right { right: 0; }
.fbk-editor-single-resize--left::before,
.fbk-editor-single-resize--right::before {
    width: 5px;
    height: 34px;
    border-radius: 999px;
}
.fbk-editor-single-resize--top-left,
.fbk-editor-single-resize--top-right,
.fbk-editor-single-resize--bottom-right,
.fbk-editor-single-resize--bottom-left {
    width: 28px;
    height: 28px;
}
.fbk-editor-single-resize--top-left { top: 0; left: 0; cursor: nwse-resize; }
.fbk-editor-single-resize--top-right { top: 0; right: 0; cursor: nesw-resize; }
.fbk-editor-single-resize--bottom-right { right: 0; bottom: 0; cursor: nwse-resize; }
.fbk-editor-single-resize--bottom-left { bottom: 0; left: 0; cursor: nesw-resize; }
.fbk-editor-single-resize--top-left::before,
.fbk-editor-single-resize--top-right::before,
.fbk-editor-single-resize--bottom-right::before,
.fbk-editor-single-resize--bottom-left::before {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
.fbk-editor-single-presets {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
}
.fbk-editor-single-preset {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    padding: 7px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 9px;
    background: #1e1615;
    color: var(--fbk-editor-muted);
    cursor: pointer;
}
.fbk-editor-single-preset-canvas {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--fbk-editor-page-aspect, 4 / 3);
    overflow: hidden;
    border-radius: 5px;
    background: #f2ebe7;
}
.fbk-editor-single-preset-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    min-width: 3px;
    min-height: 3px;
    border-radius: 2px;
    background: #8e695c;
    transform: translate(-50%, -50%);
}
.fbk-editor-single-preset-label {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fbk-editor-single-preset:hover,
.fbk-editor-single-preset.is-active {
    border-color: var(--fbk-editor-accent-light);
    color: #fff;
}
.fbk-editor-single-preset:hover .fbk-editor-single-preset-frame,
.fbk-editor-single-preset.is-active .fbk-editor-single-preset-frame {
    background: #eeaf88;
}
.fbk-editor-single-preset.is-active {
    box-shadow: 0 0 0 1px var(--fbk-editor-accent-light);
}
.fbk-review-page.is-single-photo-layout {
    position: relative;
    display: block;
}
.fbk-review-page.is-single-photo-layout > .is-single-photo-placement {
    position: absolute;
    overflow: hidden;
}
@media (max-width: 767px) {
    .fbk-editor-photo--single-shell .fbk-editor-photo-controls {
        z-index: 30;
    }
    .fbk-editor-single-resize--top,
    .fbk-editor-single-resize--bottom {
        right: 22px;
        left: 22px;
        height: 28px;
    }
    .fbk-editor-single-resize--top { top: 0; }
    .fbk-editor-single-resize--bottom { bottom: 0; }
    .fbk-editor-single-resize--left,
    .fbk-editor-single-resize--right {
        top: 22px;
        bottom: 22px;
        width: 28px;
    }
    .fbk-editor-single-resize--left { left: 0; }
    .fbk-editor-single-resize--right { right: 0; }
    .fbk-editor-single-resize--top-left,
    .fbk-editor-single-resize--top-right,
    .fbk-editor-single-resize--bottom-right,
    .fbk-editor-single-resize--bottom-left {
        width: 38px;
        height: 38px;
    }
    .fbk-editor-single-resize--top-left { top: 0; left: 0; }
    .fbk-editor-single-resize--top-right { top: 0; right: 0; }
    .fbk-editor-single-resize--bottom-right { right: 0; bottom: 0; }
    .fbk-editor-single-resize--bottom-left { bottom: 0; left: 0; }
    .fbk-editor-single-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* singlePhotoFreeFrame */

/* squarePhotoCorners */
.fbk-editor-photo,
.fbk-editor-layout-grid i,
.fbk-editor-single-crop,
.fbk-editor-grid.is-single-photo-layout,
.fbk-editor-crop-viewport,
.fbk-editor-crop-safe,
.fbk-review-page > div,
.fbk-review-page.is-single-photo-layout > .is-single-photo-placement,
.fbk-editor-single-preset-frame {
    border-radius: 0;
}
/* squarePhotoCorners */

/* editorHorizontalWorkspace */
.fbk-editor {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
}
.fbk-editor-toolbar {
    grid-column: 1;
    order: 0;
}
.fbk-editor-main {
    grid-column: 1;
    order: 1;
    min-width: 0;
}
.fbk-editor-sidebar {
    grid-column: 1;
    order: 2;
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    align-items: stretch;
    min-height: 118px;
    overflow: hidden;
}
.fbk-editor-sidebar-head {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    border-right: 1px solid var(--fbk-editor-line);
    border-bottom: 0;
}
.fbk-editor-sidebar-head h3 {
    margin-bottom: 2px;
}
.fbk-editor-count-note {
    margin: 0;
}
.fbk-editor-count {
    width: 100%;
}
.fbk-editor-spread-list {
    flex: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: 0;
    max-height: none;
    padding: 12px;
    overflow-x: auto;
    overflow-y: hidden;
}
.fbk-editor-spread-list::-webkit-scrollbar {
    width: auto;
    height: 8px;
}
.fbk-editor-spread-item {
    flex: 0 0 148px;
    width: 148px;
    min-height: 72px;
    padding: 10px 12px;
}
.fbk-editor-main-head {
    min-height: 36px;
    margin: 0 2px 10px;
}
.fbk-editor-main-head h3 {
    font-size: 24px;
}
.fbk-editor-canvas {
    flex: none;
    min-height: 640px;
    padding: 34px;
}
.fbk-editor-page {
    width: min(100%, 1180px);
}
.fbk-editor-page.is-empty-state {
    width: min(100%, 920px);
}
.fbk-editor-settings {
    grid-column: 1;
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: auto;
    gap: 16px;
    padding: 18px;
    overflow: visible;
}
.fbk-editor-settings-block {
    min-width: 0;
    padding: 0;
}
.fbk-editor-settings-block:first-child {
    grid-column: 1 / -1;
}
.fbk-editor-settings-block + .fbk-editor-settings-block {
    margin-top: 0;
    padding-top: 0;
    padding-left: 0;
    border-top: 0;
    border-left: 0;
}
.fbk-editor-settings-block:nth-child(2),
.fbk-editor-settings-block:nth-child(3) {
    padding: 18px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 12px;
    background: rgba(30, 22, 21, .34);
}
.fbk-editor-settings h3 {
    margin-bottom: 12px;
}
.fbk-editor-layouts {
    grid-template-columns: none;
    grid-template-rows: repeat(2, 92px);
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    gap: 10px;
    max-height: none;
    padding: 2px 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
}
.fbk-editor-layouts::-webkit-scrollbar {
    width: auto;
    height: 8px;
}
.fbk-editor-layout-thumb {
    width: 150px;
    height: 92px;
    aspect-ratio: auto;
}
.fbk-editor-layout-note {
    grid-row: 1 / -1;
    align-self: center;
    width: 230px;
    padding-right: 12px;
}
.fbk-editor-single-presets {
    grid-column: auto;
    grid-row: 1 / -1;
    display: flex;
    gap: 10px;
    width: max-content;
}
.fbk-editor-single-preset {
    flex: 0 0 132px;
    width: 132px;
}
.fbk-editor-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fbk-editor-tip {
    max-width: 680px;
}
.fbk-editor-fullscreen.is-active {
    border-color: var(--fbk-editor-accent-light);
    background: #3b2a24;
    color: #fff;
}
html.fbk-editor-focus-lock,
body.fbk-editor-focus-lock {
    overflow: hidden !important;
}
.fbk-editor:fullscreen,
.fbk-editor:-webkit-full-screen,
.fbk-editor.is-focus-mode {
    width: 100vw;
    max-width: none;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 14px;
    border: 0;
    border-radius: 0;
    background: #1b1412;
    overflow: hidden;
}
.fbk-editor.is-focus-mode {
    position: fixed;
    z-index: 100000;
    inset: 0;
}
.fbk-editor:fullscreen .fbk-editor-sidebar,
.fbk-editor:fullscreen .fbk-editor-settings,
.fbk-editor:-webkit-full-screen .fbk-editor-sidebar,
.fbk-editor:-webkit-full-screen .fbk-editor-settings,
.fbk-editor.is-focus-mode .fbk-editor-sidebar,
.fbk-editor.is-focus-mode .fbk-editor-settings {
    display: none;
}
.fbk-editor:fullscreen .fbk-editor-toolbar,
.fbk-editor:-webkit-full-screen .fbk-editor-toolbar,
.fbk-editor.is-focus-mode .fbk-editor-toolbar {
    flex: 0 0 auto;
}
.fbk-editor:fullscreen .fbk-editor-main,
.fbk-editor:-webkit-full-screen .fbk-editor-main,
.fbk-editor.is-focus-mode .fbk-editor-main {
    min-height: 0;
    height: calc(100vh - 82px);
}
.fbk-editor:fullscreen .fbk-editor-main-head,
.fbk-editor:-webkit-full-screen .fbk-editor-main-head,
.fbk-editor.is-focus-mode .fbk-editor-main-head {
    flex: 0 0 auto;
}
.fbk-editor:fullscreen .fbk-editor-canvas,
.fbk-editor:-webkit-full-screen .fbk-editor-canvas,
.fbk-editor.is-focus-mode .fbk-editor-canvas {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 24px;
}
.fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
.fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
.fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) {
    width: min(96%, calc((100vh - 190px) * var(--fbk-editor-page-aspect-value, 1.333333)));
    max-width: 1380px;
}
.fbk-editor:fullscreen .fbk-editor-page.is-empty-state,
.fbk-editor:-webkit-full-screen .fbk-editor-page.is-empty-state,
.fbk-editor.is-focus-mode .fbk-editor-page.is-empty-state {
    width: min(92%, 920px);
}
@media (max-width: 1280px) {
    .fbk-editor {
        grid-template-columns: minmax(0, 1fr);
    }
    .fbk-editor-sidebar {
        grid-template-columns: 235px minmax(0, 1fr);
    }
    .fbk-editor-settings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .fbk-editor-settings-block + .fbk-editor-settings-block {
        margin-top: 0;
        padding-top: 0;
        padding-left: 0;
        border-top: 0;
        border-left: 0;
    }
    .fbk-editor-canvas {
        min-height: 580px;
        padding: 26px;
    }
    .fbk-editor-page {
        width: min(100%, 1050px);
    }
}
@media (max-width: 900px) {
    .fbk-editor-sidebar {
        display: block;
        min-height: 0;
        overflow: visible;
    }
    .fbk-editor-sidebar-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: 0;
        border-bottom: 1px solid var(--fbk-editor-line);
    }
    .fbk-editor-count {
        width: 190px;
    }
    .fbk-editor-settings {
        grid-template-columns: minmax(0, 1fr);
    }
    .fbk-editor-settings-block:first-child,
    .fbk-editor-settings-block:nth-child(2),
    .fbk-editor-settings-block:nth-child(3) {
        grid-column: 1;
    }
    .fbk-editor-layouts {
        grid-template-rows: repeat(2, 84px);
        grid-auto-columns: 136px;
    }
    .fbk-editor-layout-thumb {
        width: 136px;
        height: 84px;
    }
    .fbk-editor-canvas {
        min-height: 500px;
        padding: 20px;
    }
}
@media (max-width: 767px) {
    .fbk-editor {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    .fbk-editor-toolbar {
        order: 0;
    }
    .fbk-editor-main {
        order: 1;
    }
    .fbk-editor-sidebar {
        order: 2;
    }
    .fbk-editor-settings {
        order: 3;
        display: block;
        padding: 14px;
    }
    .fbk-editor-sidebar-head {
        align-items: center;
        flex-direction: row;
    }
    .fbk-editor-spread-list {
        max-height: none;
    }
    .fbk-editor-settings-block:nth-child(2),
    .fbk-editor-settings-block:nth-child(3) {
        padding: 14px;
    }
    .fbk-editor-settings-block + .fbk-editor-settings-block {
        margin-top: 14px;
    }
    .fbk-editor-layouts {
        grid-template-rows: repeat(2, 76px);
        grid-auto-columns: 122px;
        padding-bottom: 6px;
    }
    .fbk-editor-layout-thumb {
        width: 122px;
        height: 76px;
    }
    .fbk-editor-layout-note {
        width: 190px;
    }
    .fbk-editor-single-preset {
        flex-basis: 112px;
        width: 112px;
    }
    .fbk-editor-canvas {
        min-height: 390px;
        padding: 14px;
    }
    .fbk-editor-page {
        width: 100%;
    }
    .fbk-editor-actions {
        grid-template-columns: minmax(0, 1fr);
    }
    .fbk-editor-fullscreen span {
        display: inline;
    }
    .fbk-editor:fullscreen,
    .fbk-editor:-webkit-full-screen,
    .fbk-editor.is-focus-mode {
        padding: 8px;
    }
    .fbk-editor:fullscreen .fbk-editor-main,
    .fbk-editor:-webkit-full-screen .fbk-editor-main,
    .fbk-editor.is-focus-mode .fbk-editor-main {
        height: calc(100dvh - 122px);
    }
    .fbk-editor:fullscreen .fbk-editor-canvas,
    .fbk-editor:-webkit-full-screen .fbk-editor-canvas,
    .fbk-editor.is-focus-mode .fbk-editor-canvas {
        padding: 10px;
    }
    .fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) {
        width: min(100%, calc((100dvh - 210px) * var(--fbk-editor-page-aspect-value, 1.333333)));
    }
}
@media (max-width: 480px) {
    .fbk-editor-sidebar-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .fbk-editor-count {
        width: 100%;
    }
    .fbk-editor-main-head h3 {
        font-size: 20px;
    }
    .fbk-editor-canvas {
        min-height: 330px;
        padding: 10px;
    }
    .fbk-editor-layouts {
        grid-template-rows: repeat(2, 70px);
        grid-auto-columns: 112px;
    }
    .fbk-editor-layout-thumb {
        width: 112px;
        height: 70px;
    }
    .fbk-editor-toolbar-options {
        gap: 7px;
    }
    .fbk-editor-fullscreen {
        min-height: 40px;
        padding: 0 10px;
    }
    .fbk-editor-fullscreen span {
        display: none;
    }
}
/* editorHorizontalWorkspace */

/* photobookHorizontalSwipe */
.fbk-editor-toolbar-options .js-fbk-editor-fold-toggle-wrap {
    margin-bottom: 0;
}
.fbk-editor-spread-list,
.fbk-editor-layouts {
    cursor: grab;
    touch-action: pan-y pinch-zoom;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.fbk-editor-spread-list.is-drag-scrolling,
.fbk-editor-layouts.is-drag-scrolling {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}
.fbk-editor-spread-list.is-drag-scrolling *,
.fbk-editor-layouts.is-drag-scrolling * {
    cursor: grabbing !important;
    user-select: none;
}
/* photobookHorizontalSwipe */

/* editorLayoutSelectionAndFullscreen v32 */
/* Плоский лист: реальные страницы и развороты не имеют декоративного скругления. */
.fbk-editor-page {
    border-radius: 0;
}

/* Native swipe on touch devices; mouse drag is managed separately in JS. */
.fbk-editor-spread-list,
.fbk-editor-layouts {
    touch-action: auto;
}

/* В полноэкранном режиме оставляем одну компактную ленту раскладок внизу,
   вместо скрытия всех настроек. Используется ОДИН и тот же блок кнопок,
   поэтому выбранный вариант и фото всегда синхронизированы. */
.fbk-editor:fullscreen,
.fbk-editor:-webkit-full-screen,
.fbk-editor.is-focus-mode {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 9px;
    height: 100dvh;
    min-height: 0;
}
.fbk-editor:fullscreen .fbk-editor-toolbar,
.fbk-editor:-webkit-full-screen .fbk-editor-toolbar,
.fbk-editor.is-focus-mode .fbk-editor-toolbar {
    grid-column: 1;
    grid-row: 1;
}
.fbk-editor:fullscreen .fbk-editor-main,
.fbk-editor:-webkit-full-screen .fbk-editor-main,
.fbk-editor.is-focus-mode .fbk-editor-main {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    height: auto;
    overflow: hidden;
}
.fbk-editor:fullscreen .fbk-editor-canvas,
.fbk-editor:-webkit-full-screen .fbk-editor-canvas,
.fbk-editor.is-focus-mode .fbk-editor-canvas {
    height: auto;
    min-height: 0;
}
.fbk-editor:fullscreen > .fbk-editor-settings,
.fbk-editor:-webkit-full-screen > .fbk-editor-settings,
.fbk-editor.is-focus-mode > .fbk-editor-settings {
    grid-column: 1;
    grid-row: 3;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 10px 12px 8px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 12px;
    background: var(--fbk-editor-panel);
    overflow: hidden;
}
.fbk-editor:fullscreen > .fbk-editor-settings > .fbk-editor-settings-block,
.fbk-editor:-webkit-full-screen > .fbk-editor-settings > .fbk-editor-settings-block,
.fbk-editor.is-focus-mode > .fbk-editor-settings > .fbk-editor-settings-block {
    display: none;
}
.fbk-editor:fullscreen > .fbk-editor-settings > .fbk-editor-settings-block:first-child,
.fbk-editor:-webkit-full-screen > .fbk-editor-settings > .fbk-editor-settings-block:first-child,
.fbk-editor.is-focus-mode > .fbk-editor-settings > .fbk-editor-settings-block:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child > h3,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child > h3,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child > h3 {
    flex: 0 0 auto;
    max-width: 180px;
    margin: 0;
    color: var(--fbk-editor-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}
.fbk-editor:fullscreen .fbk-editor-layouts,
.fbk-editor:-webkit-full-screen .fbk-editor-layouts,
.fbk-editor.is-focus-mode .fbk-editor-layouts {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: none;
    grid-template-rows: 64px;
    grid-auto-flow: column;
    grid-auto-columns: 102px;
    gap: 8px;
    padding: 2px 0 5px;
    overflow-x: auto;
    overflow-y: hidden;
}
.fbk-editor:fullscreen .fbk-editor-layout-thumb,
.fbk-editor:-webkit-full-screen .fbk-editor-layout-thumb,
.fbk-editor.is-focus-mode .fbk-editor-layout-thumb {
    width: 102px;
    height: 64px;
    min-width: 0;
    padding: 5px;
}
.fbk-editor:fullscreen .fbk-editor-single-presets,
.fbk-editor:-webkit-full-screen .fbk-editor-single-presets,
.fbk-editor.is-focus-mode .fbk-editor-single-presets {
    grid-row: 1;
    align-self: center;
    width: max-content;
}
.fbk-editor:fullscreen .fbk-editor-single-preset,
.fbk-editor:-webkit-full-screen .fbk-editor-single-preset,
.fbk-editor.is-focus-mode .fbk-editor-single-preset {
    flex-basis: 102px;
    width: 102px;
    min-height: 64px;
}
.fbk-editor:fullscreen .fbk-editor-layout-note,
.fbk-editor:-webkit-full-screen .fbk-editor-layout-note,
.fbk-editor.is-focus-mode .fbk-editor-layout-note {
    grid-row: 1;
    width: 180px;
    font-size: 12px;
}
.fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
.fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
.fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) {
    width: min(96%, calc((100dvh - 275px) * var(--fbk-editor-page-aspect-value, 1.333333)));
    max-width: 1380px;
}
@media (max-width: 767px) {
    .fbk-editor:fullscreen,
    .fbk-editor:-webkit-full-screen,
    .fbk-editor.is-focus-mode {
        display: grid;
        gap: 6px;
    }
    .fbk-editor:fullscreen > .fbk-editor-settings,
    .fbk-editor:-webkit-full-screen > .fbk-editor-settings,
    .fbk-editor.is-focus-mode > .fbk-editor-settings {
        padding: 7px 8px;
    }
    .fbk-editor:fullscreen > .fbk-editor-settings > .fbk-editor-settings-block:first-child,
    .fbk-editor:-webkit-full-screen > .fbk-editor-settings > .fbk-editor-settings-block:first-child,
    .fbk-editor.is-focus-mode > .fbk-editor-settings > .fbk-editor-settings-block:first-child {
        display: block;
    }
    .fbk-editor:fullscreen .fbk-editor-settings-block:first-child > h3,
    .fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child > h3,
    .fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child > h3 {
        max-width: none;
        margin: 0 0 5px;
        font-size: 12px;
    }
    .fbk-editor:fullscreen .fbk-editor-layouts,
    .fbk-editor:-webkit-full-screen .fbk-editor-layouts,
    .fbk-editor.is-focus-mode .fbk-editor-layouts {
        grid-template-rows: 56px;
        grid-auto-columns: 88px;
        gap: 6px;
    }
    .fbk-editor:fullscreen .fbk-editor-layout-thumb,
    .fbk-editor:-webkit-full-screen .fbk-editor-layout-thumb,
    .fbk-editor.is-focus-mode .fbk-editor-layout-thumb {
        width: 88px;
        height: 56px;
    }
    .fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) {
        width: min(100%, calc((100dvh - 270px) * var(--fbk-editor-page-aspect-value, 1.333333)));
    }
}
/* editorLayoutSelectionAndFullscreen v32 */

/* layoutLibraryCurated: сохранённые варианты предыдущей библиотеки */
.fbk-editor-layout-thumb--saved {
    position: relative;
    cursor: default;
}
.fbk-editor-layout-thumb--saved::after {
    content: 'старый';
    position: absolute;
    right: 2px;
    bottom: 2px;
    padding: 1px 3px;
    border-radius: 3px;
    background: rgba(30, 22, 21, .9);
    color: #eeaf88;
    font-size: 9px;
    line-height: 1.2;
    pointer-events: none;
}


/* editorLayoutsCompactRow v34 */
/* Каталог 2–8 фото и пресеты для 1 фото всегда занимают только ОДИН ряд. */
.fbk-editor-settings-block:first-child > .fbk-editor-layout-hint {
    margin: -2px 0 13px;
    color: var(--fbk-editor-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}
.fbk-editor-settings-block > .fbk-editor-layout-hint[hidden] {
    display: none !important;
}
.fbk-editor-settings-block:first-child .fbk-editor-layouts {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 10px;
    min-height: 0;
    max-height: none;
    padding: 3px 2px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}
.fbk-editor-settings-block:first-child .fbk-editor-layout-thumb {
    display: block;
    flex: 0 0 144px;
    width: 144px;
    height: 88px;
    min-width: 0;
    min-height: 0;
    padding: 7px;
    aspect-ratio: auto;
}
/* Один вариант одиночной фотографии = одна компактная карточка. */
.fbk-editor-settings-block:first-child .fbk-editor-single-presets {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    align-items: stretch;
    gap: 10px;
    width: max-content;
    margin: 0;
    padding: 0;
}
.fbk-editor-settings-block:first-child .fbk-editor-single-preset {
    display: flex;
    flex: 0 0 144px;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    width: 144px;
    height: 122px;
    min-height: 0;
    padding: 9px 8px 7px;
}
.fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: min(66px, calc(126px / var(--fbk-editor-page-aspect-value, 1.333333)));
    max-width: 126px;
    aspect-ratio: var(--fbk-editor-page-aspect, 4 / 3);
    margin: 0 auto;
    border-radius: 2px;
}
.fbk-editor-settings-block:first-child .fbk-editor-single-preset-label {
    display: -webkit-box;
    flex: 1 1 auto;
    align-self: stretch;
    min-height: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #c9aaa0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-overflow: clip;
    white-space: normal;
}
.fbk-editor-settings-block:first-child .fbk-editor-single-preset.is-active .fbk-editor-single-preset-label,
.fbk-editor-settings-block:first-child .fbk-editor-single-preset:hover .fbk-editor-single-preset-label {
    color: #fff;
}
.fbk-editor-settings-block:first-child .fbk-editor-layout-thumb:focus-visible,
.fbk-editor-settings-block:first-child .fbk-editor-single-preset:focus-visible {
    outline: 2px solid var(--fbk-editor-accent-light);
    outline-offset: 2px;
}
/* В полноэкранном режиме такая же однорядная лента, только ещё компактнее. */
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-layouts,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-layouts,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-layouts {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 2px 2px 6px;
    overflow-x: auto;
    overflow-y: hidden;
}
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb {
    flex: 0 0 104px;
    width: 104px;
    height: 64px;
    padding: 5px;
}
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-single-preset,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-single-preset,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-single-preset {
    flex-basis: 108px;
    width: 108px;
    height: 99px;
    padding: 6px;
    gap: 4px;
}
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas {
    height: min(53px, calc(94px / var(--fbk-editor-page-aspect-value, 1.333333)));
    max-width: 94px;
}
/* Подсказка нужна в обычном режиме, но не съедает высоту fullscreen. */
.fbk-editor:fullscreen .fbk-editor-layout-hint,
.fbk-editor:-webkit-full-screen .fbk-editor-layout-hint,
.fbk-editor.is-focus-mode .fbk-editor-layout-hint {
    display: none !important;
}
@media (max-width: 767px) {
    .fbk-editor-settings-block:first-child .fbk-editor-layouts {
        gap: 8px;
        padding-bottom: 9px;
    }
    .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb {
        flex-basis: 124px;
        width: 124px;
        height: 76px;
        padding: 6px;
    }
    .fbk-editor-settings-block:first-child .fbk-editor-single-presets {
        gap: 8px;
    }
    .fbk-editor-settings-block:first-child .fbk-editor-single-preset {
        flex-basis: 128px;
        width: 128px;
        height: 115px;
        padding: 7px;
    }
    .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas {
        height: min(63px, calc(112px / var(--fbk-editor-page-aspect-value, 1.333333)));
        max-width: 112px;
    }
}
@media (max-width: 480px) {
    .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb {
        flex-basis: 112px;
        width: 112px;
        height: 70px;
    }
    .fbk-editor-settings-block:first-child .fbk-editor-single-preset {
        flex-basis: 120px;
        width: 120px;
        height: 112px;
    }
    .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas {
        height: min(60px, calc(104px / var(--fbk-editor-page-aspect-value, 1.333333)));
        max-width: 104px;
    }
}
/* editorLayoutsCompactRow v34 */

/* photobookLibrary v35 */
.fbk-editor-library {
    grid-column: 1;
    order: 2;
    min-width: 0;
    padding: 15px 17px 13px;
    border: 1px solid var(--fbk-editor-line);
    border-radius: 13px;
    background: var(--fbk-editor-panel);
}
.fbk-editor-library-head, .fbk-editor-library-heading, .fbk-editor-library-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fbk-editor-library-head { justify-content: space-between; flex-wrap: wrap; }
.fbk-editor-library-heading h3 { margin: 0; color: #fff; font-size: 17px; line-height: 1.25; }
.fbk-editor-library-heading span { color: var(--fbk-editor-muted); font-size: 13px; }
.fbk-editor-library-actions { gap: 8px; }
.fbk-editor-library-upload, .fbk-editor-library-toggle {
    min-height: 35px;
    padding: 6px 13px;
    border-radius: 8px;
    border: 1px solid #755141;
    background: #251b18;
    color: #eeaf88;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.fbk-editor-library-upload { background: #c48770; border-color: #c48770; color: #fff; }
.fbk-editor-library-upload:hover { background: #d69980; }
.fbk-editor-library-toggle:hover { color: #fff; border-color: #c48770; }
.fbk-editor-library-empty { margin: 13px 0 2px; color: var(--fbk-editor-muted); font-size: 13px; line-height: 1.5; }
.fbk-editor-library-empty[hidden] { display: none; }
.fbk-editor-library-list {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
    margin-top: 12px;
    padding: 1px 1px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #8e695c #382821;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.fbk-editor-library-list:empty { display: none; }
.fbk-editor-library-photo {
    position: relative;
    flex: 0 0 110px;
    width: 110px;
    height: 94px;
    overflow: hidden;
    padding: 0;
    border: 2px solid #624434;
    border-radius: 8px;
    background: #1e1615;
    cursor: grab;
    touch-action: pan-x;
}
.fbk-editor-library-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fbk-editor-library-photo img.is-loading { opacity: .3; }
.fbk-editor-library-photo:hover, .fbk-editor-library-photo:focus-visible { border-color: #eeaf88; outline: none; }
.fbk-editor-library.is-collapsed .fbk-editor-library-list,
.fbk-editor-library.is-collapsed .fbk-editor-library-empty { display: none; }
.fbk-editor-library.is-collapsed { padding-bottom: 15px; }
.fbk-editor-canvas.is-library-drop-target,
.fbk-editor-spread-list.is-library-drop-target { outline: 2px dashed #eeaf88; outline-offset: -5px; }
.fbk-editor-spread-item.is-library-hover { outline: 2px solid #eeaf88; outline-offset: -3px; }
.fbk-editor-sidebar { order: 3; }
.fbk-editor-settings { order: 4; }
@media (max-width: 767px) {
    .fbk-editor-library { order: 2; padding: 12px; }
    .fbk-editor-library-head { align-items: flex-start; }
    .fbk-editor-library-heading { flex-wrap: wrap; gap: 4px 9px; }
    .fbk-editor-library-actions { width: 100%; }
    .fbk-editor-library-upload { flex: 1; }
    .fbk-editor-library-photo { flex-basis: 86px; width: 86px; height: 80px; }
    .fbk-editor-sidebar { order: 3; }
    .fbk-editor-settings { order: 4; }
}
/* Fullscreen: compact library between the canvas and the layout strip. */
.fbk-editor:fullscreen, .fbk-editor:-webkit-full-screen, .fbk-editor.is-focus-mode {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}
.fbk-editor:fullscreen > .fbk-editor-library,
.fbk-editor:-webkit-full-screen > .fbk-editor-library,
.fbk-editor.is-focus-mode > .fbk-editor-library {
    grid-column: 1;
    grid-row: 3;
    display: block;
    padding: 7px 12px 5px;
    overflow: hidden;
}
.fbk-editor:fullscreen > .fbk-editor-settings,
.fbk-editor:-webkit-full-screen > .fbk-editor-settings,
.fbk-editor.is-focus-mode > .fbk-editor-settings { grid-row: 4; }
.fbk-editor:fullscreen .fbk-editor-library-heading h3,
.fbk-editor:-webkit-full-screen .fbk-editor-library-heading h3,
.fbk-editor.is-focus-mode .fbk-editor-library-heading h3 { font-size: 13px; }
.fbk-editor:fullscreen .fbk-editor-library-photo,
.fbk-editor:-webkit-full-screen .fbk-editor-library-photo,
.fbk-editor.is-focus-mode .fbk-editor-library-photo { flex-basis: 74px; width: 74px; height: 64px; }
.fbk-editor:fullscreen .fbk-editor-library-list,
.fbk-editor:-webkit-full-screen .fbk-editor-library-list,
.fbk-editor.is-focus-mode .fbk-editor-library-list { margin-top: 5px; padding-bottom: 3px; }
.fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
.fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
.fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) {
    width: min(96%, calc((100dvh - 385px) * var(--fbk-editor-page-aspect-value, 1.333333)));
}
@media (max-width: 767px) {
    .fbk-editor:fullscreen .fbk-editor-library-photo,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-photo,
    .fbk-editor.is-focus-mode .fbk-editor-library-photo { flex-basis: 62px; width: 62px; height: 56px; }
    .fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) { width: min(100%, calc((100dvh - 360px) * var(--fbk-editor-page-aspect-value, 1.333333))); }
}
/* photobookLibrary v35 */
/* Компактный пустой холст в полноэкранном режиме на небольшом телефоне. */
@media (max-width: 767px) {
    .fbk-editor:fullscreen .fbk-editor-page.is-empty-state,
    .fbk-editor:-webkit-full-screen .fbk-editor-page.is-empty-state,
    .fbk-editor.is-focus-mode .fbk-editor-page.is-empty-state {
        min-height: min(265px, 36dvh);
        max-height: 100%;
        overflow: auto;
    }
    .fbk-editor:fullscreen .fbk-editor-page.is-empty-state .fbk-editor-empty,
    .fbk-editor:-webkit-full-screen .fbk-editor-page.is-empty-state .fbk-editor-empty,
    .fbk-editor.is-focus-mode .fbk-editor-page.is-empty-state .fbk-editor-empty {
        min-height: 0;
        padding: 12px;
    }
    .fbk-editor:fullscreen .fbk-editor-empty-icon,
    .fbk-editor:-webkit-full-screen .fbk-editor-empty-icon,
    .fbk-editor.is-focus-mode .fbk-editor-empty-icon {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        flex-basis: 40px;
        margin-bottom: 8px;
    }
    .fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) {
        width: min(100%, calc((100dvh - 465px) * var(--fbk-editor-page-aspect-value, 1.333333)));
    }
}
.fbk-editor-library.is-file-drag-over { border-color: #eeaf88; outline: 2px dashed #eeaf88; outline-offset: -5px; }
.fbk-editor-library-item { position: relative; flex: 0 0 110px; width: 110px; height: 94px; }
.fbk-editor-library-item > .fbk-editor-library-photo { width: 100%; height: 100%; }
.fbk-editor-library-photo-remove {
    position: absolute;
    z-index: 2;
    top: 4px;
    right: 4px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(30, 22, 21, .86);
    color: #fff;
    box-sizing: border-box;
    cursor: pointer;
    opacity: .85;
}
.fbk-editor-library-photo-remove svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}
.fbk-editor-library-photo-remove:hover, .fbk-editor-library-photo-remove:focus-visible { opacity: 1; background: #8b4c43; }
.fbk-editor:fullscreen .fbk-editor-library-item,
.fbk-editor:-webkit-full-screen .fbk-editor-library-item,
.fbk-editor.is-focus-mode .fbk-editor-library-item { flex-basis: 74px; width: 74px; height: 64px; }
@media (max-width: 767px) {
    .fbk-editor-library-item { flex-basis: 86px; width: 86px; height: 80px; }
    .fbk-editor:fullscreen .fbk-editor-library-item,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-item,
    .fbk-editor.is-focus-mode .fbk-editor-library-item { flex-basis: 62px; width: 62px; height: 56px; }
}

/* editorWorkspaceFit v36: single compact workspace and scrollable fullscreen controls */
/* Ordinary editor: panels follow the real document flow. No grid row stretches the
   main workspace and leaves hundreds of empty pixels between sections. */
.fbk-editor {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-height: 0;
}
.fbk-editor-toolbar,
.fbk-editor-main,
.fbk-editor-extras {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}
.fbk-editor-main {
    height: auto;
    align-self: auto;
}
.fbk-editor-canvas {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    padding: clamp(12px, 2.3vw, 28px);
}
.fbk-editor-page:not(.is-empty-state) {
    flex: 0 0 auto;
}
.fbk-editor-extras {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.fbk-editor-extras > .fbk-editor-library,
.fbk-editor-extras > .fbk-editor-sidebar,
.fbk-editor-extras > .fbk-editor-settings {
    width: 100%;
    min-width: 0;
    order: initial;
}
.fbk-editor-main-head { margin-bottom: 10px; }
.fbk-editor-meta { padding-top: 7px; }
.fbk-editor-library { padding: 12px 15px; }
.fbk-editor-library-list { margin-top: 8px; padding-bottom: 6px; }
.fbk-editor-library-photo, .fbk-editor-library-item { height: 82px; }
.fbk-editor-library.is-collapsed { padding-bottom: 12px; }
.fbk-editor-sidebar { min-height: 100px; }
.fbk-editor-settings { align-self: auto; }

/* In fullscreen, the sheet always fits the *actual* canvas rectangle.
   The secondary panel has its own vertical scroll instead of squeezing
   or clipping the sheet whenever lists and photo library are expanded. */
.fbk-editor:fullscreen,
.fbk-editor:-webkit-full-screen,
.fbk-editor.is-focus-mode {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
}
.fbk-editor:fullscreen > .fbk-editor-toolbar,
.fbk-editor:-webkit-full-screen > .fbk-editor-toolbar,
.fbk-editor.is-focus-mode > .fbk-editor-toolbar {
    flex: 0 0 auto;
    width: 100%;
}
.fbk-editor:fullscreen > .fbk-editor-main,
.fbk-editor:-webkit-full-screen > .fbk-editor-main,
.fbk-editor.is-focus-mode > .fbk-editor-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: auto;
    overflow: hidden;
}
.fbk-editor:fullscreen .fbk-editor-main-head,
.fbk-editor:-webkit-full-screen .fbk-editor-main-head,
.fbk-editor.is-focus-mode .fbk-editor-main-head,
.fbk-editor:fullscreen .fbk-editor-meta,
.fbk-editor:-webkit-full-screen .fbk-editor-meta,
.fbk-editor.is-focus-mode .fbk-editor-meta {
    flex: 0 0 auto;
}
.fbk-editor:fullscreen .fbk-editor-canvas,
.fbk-editor:-webkit-full-screen .fbk-editor-canvas,
.fbk-editor.is-focus-mode .fbk-editor-canvas {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: auto;
    padding: 12px;
    overflow: hidden;
}
.fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
.fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
.fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) {
    flex: 0 0 auto;
    width: min(100%, var(--fbk-fullscreen-page-width, 1180px));
    max-width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: var(--fbk-editor-page-aspect, 4 / 3);
}
.fbk-editor:fullscreen .fbk-editor-page.is-empty-state,
.fbk-editor:-webkit-full-screen .fbk-editor-page.is-empty-state,
.fbk-editor.is-focus-mode .fbk-editor-page.is-empty-state {
    width: min(100%, 820px);
    min-height: min(280px, 100%);
    max-height: 100%;
    overflow: auto;
}
.fbk-editor:fullscreen > .fbk-editor-extras,
.fbk-editor:-webkit-full-screen > .fbk-editor-extras,
.fbk-editor.is-focus-mode > .fbk-editor-extras {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-height: min(34dvh, 310px);
    min-height: 0;
    padding: 0 3px 3px 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #8e695c #382821;
}
.fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-library,
.fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-library,
.fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-library {
    display: block;
    flex: 0 0 auto;
    padding: 8px 10px;
    margin: 0;
    overflow: visible;
}
.fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-sidebar,
.fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-sidebar,
.fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-sidebar {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 205px minmax(0, 1fr);
    min-height: 84px;
    margin: 0;
    overflow: hidden;
}
.fbk-editor:fullscreen .fbk-editor-sidebar-head,
.fbk-editor:-webkit-full-screen .fbk-editor-sidebar-head,
.fbk-editor.is-focus-mode .fbk-editor-sidebar-head {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 9px 11px;
}
.fbk-editor:fullscreen .fbk-editor-sidebar-head h3,
.fbk-editor:-webkit-full-screen .fbk-editor-sidebar-head h3,
.fbk-editor.is-focus-mode .fbk-editor-sidebar-head h3 { font-size: 14px; margin: 0; }
.fbk-editor:fullscreen .fbk-editor-count-note,
.fbk-editor:-webkit-full-screen .fbk-editor-count-note,
.fbk-editor.is-focus-mode .fbk-editor-count-note { font-size: 10px; }
.fbk-editor:fullscreen .fbk-editor-count,
.fbk-editor:-webkit-full-screen .fbk-editor-count,
.fbk-editor.is-focus-mode .fbk-editor-count { width: 120px; }
.fbk-editor:fullscreen .fbk-editor-count button,
.fbk-editor:fullscreen .fbk-editor-count input,
.fbk-editor:-webkit-full-screen .fbk-editor-count button,
.fbk-editor:-webkit-full-screen .fbk-editor-count input,
.fbk-editor.is-focus-mode .fbk-editor-count button,
.fbk-editor.is-focus-mode .fbk-editor-count input { height: 30px; }
.fbk-editor:fullscreen .fbk-editor-spread-list,
.fbk-editor:-webkit-full-screen .fbk-editor-spread-list,
.fbk-editor.is-focus-mode .fbk-editor-spread-list { display: flex; padding: 6px 9px; overflow-x: auto; overflow-y: hidden; }
.fbk-editor:fullscreen .fbk-editor-spread-item,
.fbk-editor:-webkit-full-screen .fbk-editor-spread-item,
.fbk-editor.is-focus-mode .fbk-editor-spread-item { flex-basis: 125px; width: 125px; min-height: 60px; padding: 7px; }
.fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-settings,
.fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-settings,
.fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-settings {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    min-height: 0;
    margin: 0;
    padding: 9px;
    overflow: visible;
}
.fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-settings > .fbk-editor-settings-block,
.fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-settings > .fbk-editor-settings-block,
.fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-settings > .fbk-editor-settings-block {
    display: block;
    margin: 0;
    min-width: 0;
}
.fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-settings > .fbk-editor-settings-block:first-child,
.fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-settings > .fbk-editor-settings-block:first-child,
.fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-settings > .fbk-editor-settings-block:first-child {
    display: block;
    grid-column: 1 / -1;
}
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child > h3,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child > h3,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child > h3 {
    max-width: none;
    margin: 0 0 6px;
    font-size: 13px;
}
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-layouts,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-layouts,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-layouts {
    display: flex;
    width: 100%;
    min-width: 0;
    height: unset;
    padding: 10px 6px 6px;
}
.fbk-editor:fullscreen .fbk-editor-library-photo,
.fbk-editor:-webkit-full-screen .fbk-editor-library-photo,
.fbk-editor.is-focus-mode .fbk-editor-library-photo,
.fbk-editor:fullscreen .fbk-editor-library-item,
.fbk-editor:-webkit-full-screen .fbk-editor-library-item,
.fbk-editor.is-focus-mode .fbk-editor-library-item { flex-basis: 62px; width: 62px; height: 55px; }
.fbk-editor:fullscreen .fbk-editor-library-list,
.fbk-editor:-webkit-full-screen .fbk-editor-library-list,
.fbk-editor.is-focus-mode .fbk-editor-library-list { margin-top: 5px; padding-bottom: 4px; }
@media (max-width: 767px) {
    .fbk-editor { gap: 10px; }
    .fbk-editor-extras { gap: 10px; }
    .fbk-editor:fullscreen,
    .fbk-editor:-webkit-full-screen,
    .fbk-editor.is-focus-mode { gap: 6px; padding: 6px; }
    .fbk-editor:fullscreen .fbk-editor-canvas,
    .fbk-editor:-webkit-full-screen .fbk-editor-canvas,
    .fbk-editor.is-focus-mode .fbk-editor-canvas { padding: 6px; }
    .fbk-editor:fullscreen > .fbk-editor-extras,
    .fbk-editor:-webkit-full-screen > .fbk-editor-extras,
    .fbk-editor.is-focus-mode > .fbk-editor-extras { max-height: min(39dvh, 285px); gap: 6px; }
    .fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-sidebar,
    .fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-sidebar,
    .fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-sidebar { grid-template-columns: minmax(0, 1fr); }
    .fbk-editor:fullscreen .fbk-editor-sidebar-head,
    .fbk-editor:-webkit-full-screen .fbk-editor-sidebar-head,
    .fbk-editor.is-focus-mode .fbk-editor-sidebar-head { border-right: 0; border-bottom: 1px solid var(--fbk-editor-line); }
    .fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-settings,
    .fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-settings,
    .fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-settings { grid-template-columns: minmax(0,1fr); }
    .fbk-editor:fullscreen .fbk-editor-spread-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-spread-list,
    .fbk-editor.is-focus-mode .fbk-editor-spread-list { min-height: 67px; }
    .fbk-editor:fullscreen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor:-webkit-full-screen .fbk-editor-page:not(.is-empty-state),
    .fbk-editor.is-focus-mode .fbk-editor-page:not(.is-empty-state) { width: min(100%, var(--fbk-fullscreen-page-width, 1180px)); }
}
/* editorWorkspaceFit v36 */
/* Maintain DOM order across flex/grid rules inherited from earlier layouts. */
.fbk-editor, .fbk-editor * { box-sizing: border-box; }
.fbk-editor > .fbk-editor-toolbar { order: 0; }
.fbk-editor > .fbk-editor-main { order: 1; }
.fbk-editor > .fbk-editor-extras { order: 2; }


/* editorSpacingAndCount v37 */
/* Normal editing mode must follow its content height - no reserved empty row
   between the spread and the photo library. */
.fbk-editor {
    align-content: flex-start;
    justify-content: flex-start;
}
.fbk-editor:not(:fullscreen):not(:-webkit-full-screen):not(.is-focus-mode) {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: 0;
}
.fbk-editor:not(:fullscreen):not(:-webkit-full-screen):not(.is-focus-mode) > .fbk-editor-main {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
}
.fbk-editor:not(:fullscreen):not(:-webkit-full-screen):not(.is-focus-mode) .fbk-editor-canvas {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
}
.fbk-editor:not(:fullscreen):not(:-webkit-full-screen):not(.is-focus-mode) > .fbk-editor-extras {
    flex: 0 0 auto;
    align-self: stretch;
    height: auto;
    margin: 0;
    gap: 12px;
}
/* In fullscreen the additional controls may scroll independently; never
   enlarge their block with an implicit minimum height. */
.fbk-editor:fullscreen > .fbk-editor-extras,
.fbk-editor:-webkit-full-screen > .fbk-editor-extras,
.fbk-editor.is-focus-mode > .fbk-editor-extras {
    flex-grow: 0;
    align-content: flex-start;
    justify-content: flex-start;
}
/* The previous 120px column left only ~28px for the number field. */
.fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-sidebar,
.fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-sidebar,
.fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-sidebar {
    grid-template-columns: 220px minmax(0, 1fr);
}
.fbk-editor:fullscreen .fbk-editor-count,
.fbk-editor:-webkit-full-screen .fbk-editor-count,
.fbk-editor.is-focus-mode .fbk-editor-count {
    width: 174px;
    max-width: 100%;
    grid-template-columns: 34px minmax(58px, 1fr) 34px;
    gap: 6px;
}
.fbk-editor:fullscreen .fbk-editor-count input,
.fbk-editor:-webkit-full-screen .fbk-editor-count input,
.fbk-editor.is-focus-mode .fbk-editor-count input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0 4px;
    font-size: 14px;
    text-align: center;
}
@media (max-width: 767px) {
    .fbk-editor:fullscreen .fbk-editor-extras > .fbk-editor-sidebar,
    .fbk-editor:-webkit-full-screen .fbk-editor-extras > .fbk-editor-sidebar,
    .fbk-editor.is-focus-mode .fbk-editor-extras > .fbk-editor-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
    .fbk-editor:fullscreen .fbk-editor-count,
    .fbk-editor:-webkit-full-screen .fbk-editor-count,
    .fbk-editor.is-focus-mode .fbk-editor-count {
        width: 174px;
    }
}
/* editorSpacingAndCount v37 */

/* editorPhotoLibraryPolish v38 */
.fbk-editor-library {
    margin: 0;
}
/* Скрытые настройки не должны занимать ячейку сетки даже в fullscreen. */
.fbk-editor-settings .js-fbk-editor-gap-settings[hidden] {
    display: none !important;
}
.fbk-editor-settings.is-single-photo > .fbk-editor-settings-block:last-child {
    grid-column: 1 / -1;
    width: 100%;
}
/* В полноэкранном режиме ширину ленты сохраняем, увеличивая именно карточки.
   Если выставить width:120px на .fbk-editor-layouts, прокрутка сожмётся до одного шаблона. */
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-layouts,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-layouts,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-layouts {
    width: 100%;
    height: unset;
    padding: 10px 6px 6px;
}
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-layout-thumb {
    flex: 0 0 120px;
    width: 120px;
    height: 72px;
    padding: 6px;
}
.fbk-editor:fullscreen .fbk-editor-library-item,
.fbk-editor:-webkit-full-screen .fbk-editor-library-item,
.fbk-editor.is-focus-mode .fbk-editor-library-item {
    flex: 0 0 200px;
    width: 200px;
    height: unset;
    aspect-ratio: 16 / 9;
}
.fbk-editor:fullscreen .fbk-editor-library-item > .fbk-editor-library-photo,
.fbk-editor:-webkit-full-screen .fbk-editor-library-item > .fbk-editor-library-photo,
.fbk-editor.is-focus-mode .fbk-editor-library-item > .fbk-editor-library-photo {
    position: absolute;
    inset: 0;
    flex: none;
    width: 100%;
    height: 100%;
}


/* editorCardSizing v39 */
/* One-photo presets: same compact 115px cards in regular/fullscreen editor.
   Canvas follows page aspect; card height follows canvas and text automatically. */
.fbk-editor-settings-block:first-child .fbk-editor-single-presets,
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-single-presets,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-single-presets,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-single-presets {
    align-items: flex-start;
}
.fbk-editor-settings-block:first-child .fbk-editor-single-preset,
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-single-preset,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-single-preset,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-single-preset {
    flex: 0 0 115px;
    width: 115px;
    height: auto;
    min-height: 0;
    align-self: flex-start;
    gap: 5px;
    padding: 7px 6px;
}
.fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas,
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-single-preset-canvas {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: var(--fbk-editor-page-aspect, 4 / 3);
}
.fbk-editor-settings-block:first-child .fbk-editor-single-preset-label,
.fbk-editor:fullscreen .fbk-editor-settings-block:first-child .fbk-editor-single-preset-label,
.fbk-editor:-webkit-full-screen .fbk-editor-settings-block:first-child .fbk-editor-single-preset-label,
.fbk-editor.is-focus-mode .fbk-editor-settings-block:first-child .fbk-editor-single-preset-label {
    display: block;
    flex: 0 0 auto;
    align-self: stretch;
    height: auto;
    min-height: 0;
    overflow: visible;
    -webkit-line-clamp: unset;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
/* Photo library: identical 200px, 16:9 thumbnails in both modes. */
.fbk-editor-library-item,
.fbk-editor:fullscreen .fbk-editor-library-item,
.fbk-editor:-webkit-full-screen .fbk-editor-library-item,
.fbk-editor.is-focus-mode .fbk-editor-library-item {
    flex: 0 0 200px;
    width: 200px;
    height: auto;
    aspect-ratio: 16 / 9;
}
.fbk-editor-library-item > .fbk-editor-library-photo,
.fbk-editor:fullscreen .fbk-editor-library-item > .fbk-editor-library-photo,
.fbk-editor:-webkit-full-screen .fbk-editor-library-item > .fbk-editor-library-photo,
.fbk-editor.is-focus-mode .fbk-editor-library-item > .fbk-editor-library-photo {
    position: absolute;
    inset: 0;
    flex: none;
    width: 100%;
    height: 100%;
}
/* editorCardSizing v39 */

/* photoLibraryGrid v41: one visible row by default, all photos in a grid on expand */
.fbk-editor-library-list,
.fbk-editor:fullscreen .fbk-editor-library-list,
.fbk-editor:-webkit-full-screen .fbk-editor-library-list,
.fbk-editor.is-focus-mode .fbk-editor-library-list {
    --fbk-library-card-width: 200px;
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--fbk-library-card-width));
    grid-auto-rows: calc(var(--fbk-library-card-width) * 9 / 16);
    align-items: stretch;
    justify-content: start;
    gap: 10px;
    min-height: 0;
    max-height: none;
    margin: 12px 0 0;
    padding: 1px;
    overflow: visible;
    touch-action: pan-y;
}
.fbk-editor-library.is-collapsed .fbk-editor-library-list,
.fbk-editor:fullscreen .fbk-editor-library.is-collapsed .fbk-editor-library-list,
.fbk-editor:-webkit-full-screen .fbk-editor-library.is-collapsed .fbk-editor-library-list,
.fbk-editor.is-focus-mode .fbk-editor-library.is-collapsed .fbk-editor-library-list {
    display: grid;
    max-height: calc(var(--fbk-library-card-width) * 9 / 16 + 2px);
    overflow: hidden;
}
.fbk-editor-library-list > .fbk-editor-library-item,
.fbk-editor:fullscreen .fbk-editor-library-list > .fbk-editor-library-item,
.fbk-editor:-webkit-full-screen .fbk-editor-library-list > .fbk-editor-library-item,
.fbk-editor.is-focus-mode .fbk-editor-library-list > .fbk-editor-library-item {
    flex: none;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 16 / 9;
}
.fbk-editor-library-list > .fbk-editor-library-item.is-library-row-hidden { visibility: hidden; }
.fbk-editor-library-list > .fbk-editor-library-item > .fbk-editor-library-photo { touch-action: pan-y; }
.fbk-editor-library.is-collapsed .fbk-editor-library-empty:not([hidden]) { display: block; }
.fbk-editor-library-toggle[hidden] { display: none !important; }
@media (max-width: 767px) {
    .fbk-editor-library-list,
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list {
        --fbk-library-card-width: 140px;
    }
}
/* photoLibraryGrid v41 */


/* photoLibraryFluidGrid v42: responsive columns instead of fixed 200px thumbs.
   Container-based breakpoints reflect the *actual* library width, including
   normal theme containers and fullscreen/focus workspaces. */
.fbk-editor-library {
    container: fbk-photo-library / inline-size;
}
.fbk-editor-library-list,
.fbk-editor:fullscreen .fbk-editor-library-list,
.fbk-editor:-webkit-full-screen .fbk-editor-library-list,
.fbk-editor.is-focus-mode .fbk-editor-library-list {
    --fbk-library-columns: 5;
    --fbk-library-row-height: 120px;
    display: grid;
    grid-template-columns: repeat(var(--fbk-library-columns), minmax(0, 1fr));
    grid-auto-rows: auto;
    align-items: start;
    justify-content: stretch;
    column-gap: 10px;
    row-gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}
.fbk-editor:fullscreen .fbk-editor-library-list,
.fbk-editor:-webkit-full-screen .fbk-editor-library-list,
.fbk-editor.is-focus-mode .fbk-editor-library-list {
    --fbk-library-columns: 8;
}
.fbk-editor-library-list > .fbk-editor-library-item,
.fbk-editor:fullscreen .fbk-editor-library-list > .fbk-editor-library-item,
.fbk-editor:-webkit-full-screen .fbk-editor-library-list > .fbk-editor-library-item,
.fbk-editor.is-focus-mode .fbk-editor-library-list > .fbk-editor-library-item {
    width: 100%;
    height: auto;
    min-width: 0;
    align-self: start;
    aspect-ratio: 16 / 9;
}
.fbk-editor-library.is-collapsed .fbk-editor-library-list,
.fbk-editor:fullscreen .fbk-editor-library.is-collapsed .fbk-editor-library-list,
.fbk-editor:-webkit-full-screen .fbk-editor-library.is-collapsed .fbk-editor-library-list,
.fbk-editor.is-focus-mode .fbk-editor-library.is-collapsed .fbk-editor-library-list {
    max-height: calc(var(--fbk-library-row-height) + 2px);
    overflow: hidden;
}
/* Standard editor: five cards per row on roomy screens, scaling down
   smoothly without forcing horizontal overflow or tiny image cards. */
@container fbk-photo-library (max-width: 1050px) {
    .fbk-editor-library-list { --fbk-library-columns: 4; }
}
@container fbk-photo-library (max-width: 800px) {
    .fbk-editor-library-list { --fbk-library-columns: 3; }
}
@container fbk-photo-library (max-width: 540px) {
    .fbk-editor-library-list { --fbk-library-columns: 2; }
}
/* Fullscreen gets more columns; keep at least two on narrow phones. */
@container fbk-photo-library (max-width: 1600px) {
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list { --fbk-library-columns: 7; }
}
@container fbk-photo-library (max-width: 1350px) {
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list { --fbk-library-columns: 6; }
}
@container fbk-photo-library (max-width: 1100px) {
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list { --fbk-library-columns: 5; }
}
@container fbk-photo-library (max-width: 850px) {
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list { --fbk-library-columns: 4; }
}
@container fbk-photo-library (max-width: 650px) {
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list { --fbk-library-columns: 3; }
}
@container fbk-photo-library (max-width: 440px) {
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list { --fbk-library-columns: 2; }
}
/* Mobile toolbar: keep action labels on one line and out of the photo area. */
@media (max-width: 767px) {
    .fbk-editor-library {
        padding: 12px;
    }
    .fbk-editor-library-head {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .fbk-editor-library-heading {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 3px 9px;
    }
    .fbk-editor-library-heading h3 { font-size: 16px; }
    .fbk-editor-library-heading span { font-size: 12px; }
    .fbk-editor-library-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }
    .fbk-editor-library-upload,
    .fbk-editor-library-toggle {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        min-height: 40px;
        min-width: 0;
        margin: 0;
        padding: 7px 10px;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }
    .fbk-editor-library-list,
    .fbk-editor:fullscreen .fbk-editor-library-list,
    .fbk-editor:-webkit-full-screen .fbk-editor-library-list,
    .fbk-editor.is-focus-mode .fbk-editor-library-list {
        column-gap: 8px;
        row-gap: 8px;
    }
    .fbk-editor-library-photo-remove {
        width: 27px;
        height: 27px;
    }
}
@media (max-width: 359px) {
    .fbk-editor-library-actions { grid-template-columns: minmax(0, 1fr); }
}
/* photoLibraryFluidGrid v42 */
