#wrapper,
.loader {
    --pbui-hue: 326;
    --pbui-primary: var(--p55-hdr-icon, #00838f);
    --pbui-ink: var(--p55-btn-bg, #0d1b22);
    --pbui-on-ink: var(--p55-btn-text, #ffffff);
    --pbui-accent: var(--p55-accent, #e6007e);
    --pbui-accent-soft: rgba(230, 0, 126, .1);
    --pbui-line: var(--p55-hdr-line, #e6e2d9);
    --pbui-soft: var(--p55-hdr-bg, #f6f4ef);
    --pbui-muted: var(--p55-hdr-text, #33454d);
    --pbui-font: var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

#pb-ttb {
    --pbui-ink: var(--p55-btn-bg, #0d1b22);
    --pbui-accent: var(--p55-accent, #e6007e);
}

/* вкладка «Фоны» */
.pb-hint {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--pbui-accent-soft);
    color: var(--pbui-ink);
    font: 600 13px/1.4 var(--pbui-font);
}

.ui-draggable-dragging.background {
    border: 2px solid #fff;
    border-radius: 8px;
    box-shadow: 0 14px 26px -8px rgba(13, 27, 34, .8);
    overflow: hidden;
    opacity: .95;
}

.ui-draggable-dragging.background img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#book-content .element.holder {
    background-color: #e4feed !important;
    background-image: url("../../image/photobook/photo-placeholder.png") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* зоны броска фона */
#book-content .pb-dz {
    position: absolute;
    inset: 0;
    z-index: 2000;
    display: none;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 10px;
    padding: 10px;
}

#book-content .pb-dz.is-on {
    display: grid;
}

#book-content .pb-dz .droppable-sections {
    position: static;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 8px;
    border: 2px dashed rgba(255, 255, 255, .95);
    border-radius: 10px;
    background: rgba(13, 27, 34, .7);
    color: #fff;
    font: 700 13px/1.25 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    text-align: center;
    transition: background .12s;
}

#book-content .pb-dz .droppable-sections.is-over,
#book-content .pb-dz .droppable-sections.ui-droppable-hover {
    border-style: solid;
    background: var(--p55-accent, #e6007e) !important;
    box-shadow: 0 0 0 3px #fff;
}

.pb-dz__t {
    display: grid;
    justify-items: center;
    gap: 6px;
}

.pb-dz__t .fa {
    font-size: 22px;
}

.pb-dz .t-cover,
.pb-on-cover .pb-dz .t-page {
    display: none;
}

.pb-on-cover .pb-dz .t-cover {
    display: inline;
}

/* подписи обложки */
#book-container {
    position: relative;
}

.pb-cvl {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: -28px;
    height: 22px;
    pointer-events: none;
}

.pb-on-cover .pb-cvl {
    display: block;
}

.pb-cvl span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--p55-btn-bg, #0d1b22);
    color: #fff;
    font: 700 11.5px/22px var(--p55h-font, 'Manrope', system-ui, sans-serif);
    white-space: nowrap;
}

.pb-cvl span:nth-child(1) {
    left: 25%;
}

.pb-cvl span:nth-child(2) {
    left: 50%;
}

.pb-cvl span:nth-child(3) {
    left: 75%;
}

/* лента разворотов */
#wrapper #main-content #pages.pb-strip {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "w a b";
    align-items: center;
    gap: 0 10px;
    padding: 0 20px 6px;
    background: #fff;
    border-top: 1px solid var(--pbui-line);
    text-align: left;
}

.pb-strip .pb-strip__h {
    position: absolute;
    left: 372px;
    bottom: calc(100% + 6px);
    z-index: 8;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--pbui-ink);
    color: #fff;
    font: 600 12px/1.2 var(--pbui-font);
    pointer-events: none;
}

.pb-strip:hover .pb-strip__h,
.pb-strip:focus-within .pb-strip__h {
    display: flex;
}

#wrapper #main-content #pages.pb-strip .wrapper {
    grid-area: w;
    display: block;
    width: auto;
    min-width: 0;
    height: 86px;
    min-height: 0;
    padding: 6px 0 4px;
    overflow: hidden;
}

.pb-strip .pb-tip {
    display: none;
    position: absolute;
    z-index: 8;
    left: 20px;
    top: -16px;
    width: 140px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--p55-btn-bg, #0d1b22);
    color: #fff;
    font: 600 12px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    box-shadow: 0 10px 24px -10px rgba(13, 27, 34, .6);
}

.pb-strip.is-hint .pb-tip {
    display: block;
}

#wrapper #main-content #pages.pb-strip .item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: auto;
    min-width: 90px;
    height: auto;
    margin: 0 5px 0 0;
    padding: 6px 8px 4px;
    border: 1.5px solid var(--pbui-line);
    border-radius: 10px;
    background: #fff;
    overflow: visible;
    vertical-align: top;
    cursor: pointer;
    opacity: 1;
}

#wrapper #main-content #pages.pb-strip .item.active {
    height: auto;
    border-color: var(--p55-accent, #e6007e);
}

#wrapper #main-content #pages.pb-strip .item.cover {
    cursor: pointer;
    line-height: normal;
}

#wrapper #main-content #pages.pb-strip .item p,
#wrapper #main-content #pages.pb-strip .item.cover p {
    position: static;
    width: auto;
    margin: 0;
    background: none;
    color: var(--p55-hdr-text, #33454d);
    font: 700 12px/1.2 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

#wrapper #main-content #pages.pb-strip .item.active p {
    background: none;
    color: var(--p55-btn-bg, #0d1b22);
}

#wrapper #main-content #pages.pb-strip .item span {
    position: static;
    height: auto;
    line-height: 1;
    left: auto;
    font-weight: normal;
    color: inherit;
}

#wrapper #main-content #pages.pb-strip .item .th__i {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    width: 72px;
    height: 36px;
    border-radius: 3px;
    overflow: hidden;
    background: #d8dee1;
    box-shadow: 0 2px 6px -2px rgba(13, 27, 34, .27);
}

#wrapper #main-content #pages.pb-strip .item .th__i > span {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 4px;
    background: #fff;
}

#wrapper #main-content #pages.pb-strip .item .th__i > span i {
    background: #e6eaec;
    border-radius: 1px;
}

#wrapper #main-content #pages.pb-strip .item .th__i > span i.f {
    background: #9fb7bf;
}

#wrapper #main-content #pages.pb-strip .item .th__i--cv {
    grid-template-columns: 1fr 6px 1fr;
    background: #e9e1d2;
}

#wrapper #main-content #pages.pb-strip .item .th__i--cv > span {
    background: #f1ebe1;
    padding: 0;
}

#wrapper #main-content #pages.pb-strip .item .th__i--cv > span.sp {
    background: #e0d6c3;
}

#wrapper #main-content #pages.pb-strip .item .th__g,
#wrapper #main-content #pages.pb-strip .item .th__lk {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 2;
    display: grid;
    place-items: center;
    height: 22px;
    line-height: 1;
    font-size: 10px;
    font-weight: normal;
    color: var(--p55-hdr-text, #33454d);
}

#wrapper #main-content #pages.pb-strip .item .th__g {
    width: 14px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 1px 3px rgba(13, 27, 34, .35);
    cursor: grab;
}

#wrapper #main-content #pages.pb-strip .item .th__lk {
    width: 22px;
    border-radius: 50%;
    background: var(--p55-btn-bg, #0d1b22);
    color: #fff;
}

#wrapper #main-content #pages.pb-strip .item .th__w {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fdecc8;
    color: #8a5a00;
    font: 700 11px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

#wrapper #main-content #pages.pb-strip .item .remove {
    top: auto;
    bottom: 0;
    right: 0;
    border-radius: 4px 0 8px 0;
}

#pages.pb-strip .item.ui-sortable-helper {
    z-index: 1000;
    box-shadow: 0 16px 24px -12px rgba(13, 27, 34, .6);
    transform: translateY(-6px) rotate(-3deg);
    cursor: grabbing;
}

#pages.pb-strip .item.ui-sortable-helper .th__i {
    outline: 2px solid var(--p55-accent, #e6007e);
    outline-offset: 2px;
}

.pb-strip .pb-ins {
    display: inline-block;
    position: relative;
    vertical-align: top;
    width: 4px;
    height: 66px;
    margin: 0 10px 0 5px;
    border-radius: 2px;
    background: var(--p55-accent, #e6007e);
}

.pb-strip .pb-ins::before,
.pb-strip .pb-ins::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: var(--p55-accent, #e6007e);
}

.pb-strip .pb-ins::before {
    top: -3px;
}

.pb-strip .pb-ins::after {
    bottom: -3px;
}

.pb-strip .add-page {
    flex: none;
    height: 66px;
    min-width: 120px;
    margin: 0;
    padding: 0 12px;
    border: 1.5px dashed var(--p55-accent, #e6007e);
    border-radius: 12px;
    background: var(--pbui-accent-soft);
    color: var(--p55-btn-bg, #0d1b22);
    font: 700 12.5px/66px var(--p55h-font, 'Manrope', system-ui, sans-serif);
    cursor: pointer;
}

/* панель текста */
.pb-ttb {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    box-sizing: border-box;
    max-width: calc(100vw - 16px);
    padding: 6px;
    border-radius: 12px;
    background: var(--pbui-ink);
    color: #fff;
    box-shadow: 0 12px 30px -10px rgba(13, 27, 34, .6);
    font: 700 13px var(--p55h-font, 'Manrope', system-ui, sans-serif);
    white-space: nowrap;
}

.pb-ttb__main,
.pb-ttb__more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.pb-ttb__more {
    display: none;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.pb-ttb.is-more .pb-ttb__more {
    display: flex;
}

.pb-ttb .text-shadow-size-setting {
    margin: 0;
}

.pb-ttb .text-shadow-size-setting input {
    width: 110px;
}

.pb-ttb .pb-ttb__m .fa {
    font-size: 10px;
    transition: transform .15s;
}

.pb-ttb.is-more .pb-ttb__m .fa {
    transform: rotate(180deg);
}

.pb-ttb button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font: 700 13px var(--p55h-font, 'Manrope', system-ui, sans-serif);
    cursor: pointer;
}

.pb-ttb button:hover {
    background: rgba(255, 255, 255, .12);
}

.pb-ttb .pb-ttb__font {
    width: 150px;
    height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font: 600 13px var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-ttb .pb-ttb__font option {
    background: #fff;
    color: #0d1b22;
}

.pb-ttb .pb-ttb__c i {
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.pb-ttb .pb-ttb__done {
    background: var(--p55-accent, #e6007e);
}

.pb-ttb .pb-ttb__done:hover {
    background: var(--p55-accent, #e6007e);
    filter: brightness(1.1);
}

/* шрифты с образцом */
#sidebar .fonts-list .font-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 6px;
    padding: 8px 10px;
    border: 1px solid var(--pbui-line);
    border-radius: 10px;
    background: #fff;
    color: var(--p55-btn-bg, #0d1b22);
}

#sidebar .fonts-list .font-item span {
    font-size: 22px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

#sidebar .fonts-list .font-item small {
    font: 600 11.5px/1.2 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    color: var(--p55-hdr-text, #33454d);
}

#sidebar .fonts-list .font-item:hover,
#sidebar .fonts-list .font-item.active {
    background: rgba(230, 0, 126, .08);
    color: var(--p55-btn-bg, #0d1b22);
    border-color: var(--p55-accent, #e6007e);
}

/* верх редактора, кнопки, отметка сохранения */
#wrapper .pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: 1.5px solid var(--pbui-primary);
    border-radius: 999px;
    background: var(--pbui-primary);
    color: var(--pbui-on-ink) !important;
    font: 700 14px/1 var(--pbui-font);
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

@media (hover: hover) {
    #wrapper .pb-btn:hover {
        background: var(--pbui-ink);
        border-color: var(--pbui-ink);
    }
}

#wrapper .pb-btn--g {
    background: #fff;
    color: var(--pbui-ink) !important;
    border-color: var(--pbui-line);
}

#wrapper .pb-btn--g:hover {
    background: #fff;
    border-color: var(--pbui-ink);
}

#wrapper .pb-btn--s {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

#wrapper .pb-btn[disabled] {
    opacity: .5;
    cursor: default;
}

.ed__top {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid var(--pbui-line);
    font-family: var(--pbui-font);
    color: var(--pbui-ink);
}

.ed__top .ed__book {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.ed__top .ed__book b {
    overflow: hidden;
    font: 800 16px/1.2 var(--pbui-font);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ed__top .ed__book small {
    flex: 0 100 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--pbui-muted);
    font: 500 13px/1.3 var(--pbui-font);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-toplink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pbui-primary);
    font: 700 13px/1.2 var(--pbui-font);
    text-decoration: none;
    white-space: nowrap;
}

.pb-toplink:hover {
    text-decoration: underline;
}

.pb-toplink__s {
    display: none;
}

.ed__top .grow {
    flex: 1 1 0;
}

.ed__top .saved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--pbui-soft);
    color: var(--pbui-muted);
    font: 600 13px/1.2 var(--pbui-font);
    white-space: nowrap;
}

.ed__top .saved.is-busy .fa {
    animation: pb-spin 1s linear infinite;
}

.ed__top .saved.is-fail {
    background: #fff4dd;
    color: #6b4a1d;
}

.ed__top .saved.is-fail .saved__b {
    border-color: #6b4a1d;
    background: #6b4a1d;
    color: #fff;
}

.ed__top .saved.is-warn {
    background: #fff4dd;
    color: #7a5200;
}

.ed__top .saved__b {
    margin-left: 4px;
    padding: 3px 10px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: 700 12px/1.2 var(--pbui-font);
    cursor: pointer;
}

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

.ed__top .adm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--pbui-ink);
    color: #fff;
    font: 700 13px/1.2 var(--pbui-font);
    white-space: nowrap;
}

.ed__top .pricebar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ed__top .pricebar__sum {
    display: grid;
    justify-items: end;
    text-align: right;
}

.ed__top .pricebar__sum b {
    font: 800 22px/1.1 var(--pbui-font);
    white-space: nowrap;
}

.ed__top .pricebar__sum small {
    color: var(--pbui-muted);
    font: 500 12px/1.3 var(--pbui-font);
    white-space: nowrap;
}

/* плашки над сценой */
#pb-plate:empty {
    display: none;
}

.pb-plate {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 20px 0;
    padding: 8px 12px 8px 16px;
    border: 1px solid var(--pbui-line);
    border-radius: 14px;
    background: var(--pbui-soft);
    color: var(--pbui-ink);
    font: 600 13.5px/1.35 var(--pbui-font);
}

.pb-plate.is-warn {
    border-color: #f0c978;
    background: #fff4dd;
}

.pb-plate > span {
    flex: 1 1 auto;
}

.pb-plate .pb-btn {
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
}

.pb-plate__x {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--pbui-muted);
    font-size: 16px;
    cursor: pointer;
}

/* строка «Разворот N из M» */
.stage__bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
    padding: 0 20px;
    color: var(--pbui-muted);
    font: 600 13px/1.2 var(--pbui-font);
}

.stage__bar .rbtn {
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--pbui-line);
    border-radius: 50%;
    background: #fff;
    color: var(--pbui-ink);
    cursor: pointer;
}

.stage__bar .rbtn:hover {
    border-color: var(--pbui-ink);
}

.stage__bar .rbtn[disabled] {
    opacity: .35;
    cursor: default;
}

/* окна и подсказки */
.pb-modal {
    position: fixed;
    inset: 0;
    z-index: 2000000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(13, 27, 34, .55);
    font-family: var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    color: var(--p55-btn-bg, #0d1b22);
    box-shadow: 0 30px 70px -20px rgba(13, 27, 34, .6);
}

.pb-dlg h2 {
    margin: 0 0 8px;
    font: 800 22px/1.25 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg p {
    margin: 0 0 18px;
    color: var(--p55-hdr-text, #33454d);
    font: 500 14px/1.5 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg label.pb-l {
    display: block;
    margin: 0 0 6px;
    font: 700 13px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg .pb-f {
    margin-bottom: 16px;
}

.pb-dlg .pb-in {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--p55-hdr-line, #e6e2d9);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    font: 500 15px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg .pb-in:focus {
    border-color: var(--p55-accent, #e6007e);
    outline: 0;
}

.pb-dlg .pb-chks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pb-dlg .pb-chk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1.5px solid var(--p55-hdr-line, #e6e2d9);
    border-radius: 999px;
    font: 600 13px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    cursor: pointer;
}

.pb-dlg .pb-chk input {
    margin: 0;
}

.pb-dlg .pb-err {
    margin: 6px 0 0;
    color: #a30058;
    font: 600 13px/1.4 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg .pb-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.pb-dlg .pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border: 1.5px solid var(--p55-hdr-icon, #00838f);
    border-radius: 999px;
    background: var(--p55-hdr-icon, #00838f);
    color: #fff;
    font: 700 14px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    cursor: pointer;
}

.pb-dlg .pb-btn--g {
    background: #fff;
    color: var(--p55-btn-bg, #0d1b22);
    border-color: var(--p55-hdr-line, #e6e2d9);
}

.pb-dlg .pb-btn[disabled] {
    opacity: .5;
    cursor: default;
}

.pb-cvbox {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--p55-hdr-line, #e6e2d9);
    border-radius: 12px;
    background: #fff;
}

.pb-cvbox > div {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
}

.pb-cvbox .page {
    display: block !important;
    position: absolute !important;
    inset: 0;
}

.pb-toasts {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 2000001;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: min(560px, calc(100vw - 32px));
    transform: translateX(-50%);
    pointer-events: none;
}

.pb-toast {
    max-width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--p55-btn-bg, #0d1b22);
    color: #fff;
    font: 600 14px/1.4 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    box-shadow: 0 16px 40px -14px rgba(13, 27, 34, .7);
    pointer-events: auto;
}

.pb-toast.is-err {
    background: #a30058;
}

html.pb-phone .pb-toasts {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

.pb-toast--act {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 10px 10px 18px;
}

.pb-toast__a {
    flex: none;
    height: 32px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font: 700 13px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    cursor: pointer;
}

.pb-toast__a:hover {
    background: rgba(255, 255, 255, .28);
}

.pb-toast__a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* каркас: колонка вкладок, панель, сцена */
@media (min-width: 761px) {
    html.p55-chrome-editor,
    html.p55-chrome-editor body {
        overflow: hidden;
        background: #fff;
    }

    html.p55-chrome-editor body > main#main-content {
        height: 0;
        min-height: 0;
        padding: 0;
        overflow: visible;
    }

    #wrapper.pb-shell {
        position: fixed;
        top: var(--p55-hdr-top, 0px);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 5;
        width: auto;
        display: grid;
        grid-template-columns: 80px 272px minmax(0, 1fr);
        grid-template-rows: 48px minmax(0, 1fr) auto;
        grid-template-areas: "top top top" "rail panel stage" "strip strip strip";
        background: #fff;
        font-family: var(--pbui-font);
    }

    #wrapper.pb-shell > .ed__top {
        grid-area: top;
    }

    #wrapper.pb-shell #sidebar,
    #wrapper.pb-shell #sidebar .tabs {
        display: contents;
    }

    #wrapper.pb-shell .tabs nav {
        grid-area: rail;
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: auto;
        height: auto;
        padding: 10px 4px;
        overflow-y: auto;
        background: var(--pbui-soft);
        border-right: 1px solid var(--pbui-line);
        text-shadow: none;
    }

    #wrapper.pb-shell .tabs nav a {
        display: grid;
        justify-items: center;
        gap: 4px;
        width: auto;
        padding: 10px 2px 8px;
        border-radius: 14px;
        color: var(--pbui-muted);
        font-size: 22px;
        line-height: 1;
        text-shadow: none;
    }

    #wrapper.pb-shell .tabs nav a i {
        font: 700 11.5px/1.2 var(--pbui-font);
        font-style: normal;
        text-align: center;
    }

    #wrapper.pb-shell .tabs nav a:hover {
        background: #fff;
        color: var(--pbui-ink);
    }

    #wrapper.pb-shell .tabs nav a.selected {
        background: var(--pbui-ink);
        color: #fff;
        text-shadow: none;
    }

    #wrapper.pb-shell .tabs nav a.pb-tab--adm {
        order: 9;
    }

    #wrapper.pb-shell .tabs nav a[data-tab="6"] {
        order: 10;
        margin-top: auto;
    }

    html.pb-view #wrapper.pb-shell .tabs nav a[data-tab="6"] {
        margin-top: 0;
    }

    #wrapper.pb-shell .tabs nav a[hidden] {
        display: none;
    }

    #wrapper.pb-shell .tabs nav .pb-rail-x {
        order: 11;
        position: sticky;
        bottom: 0;
        display: grid;
        place-items: center;
        flex: none;
        height: 40px;
        margin-top: 6px;
        padding: 0;
        border: 0;
        border-radius: 14px;
        background: var(--pbui-soft);
        color: var(--pbui-muted);
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    #wrapper.pb-shell .tabs nav .pb-rail-x:hover {
        background: #fff;
        color: var(--pbui-ink);
    }

    #wrapper.pb-shell .tabs nav .pb-rail-x:focus-visible {
        background: #fff;
        color: var(--pbui-ink);
        outline: 2px solid var(--pbui-primary);
        outline-offset: -2px;
    }

    html.pb-rail #wrapper.pb-shell .tabs nav .pb-rail-x .pb-ic {
        transform: rotate(180deg);
    }

    html.pb-rail #wrapper.pb-shell {
        grid-template-columns: 80px 0 minmax(0, 1fr);
    }

    html.pb-rail:not(.pb-rail-over) #wrapper.pb-shell .tabs .content.visible {
        display: none;
    }

    html.pb-rail:not(.pb-rail-over) #wrapper.pb-shell .tabs nav a.selected:not(:hover) {
        background: transparent;
        color: var(--pbui-muted);
    }

    html.pb-rail-over #wrapper.pb-shell .tabs .content.visible {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 3200;
        box-sizing: border-box;
        width: 272px;
        max-width: calc(100vw - 80px);
        box-shadow: 14px 0 32px -12px rgba(13, 27, 34, .38);
        animation: pb-rail-in .16s ease-out;
    }

    @keyframes pb-rail-in {
        from {
            opacity: 0;
            transform: translateX(-18px);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        html.pb-rail-over #wrapper.pb-shell .tabs .content.visible {
            animation: none;
        }
    }

    #wrapper.pb-shell .tabs .content {
        grid-area: panel;
        position: static;
        display: none;
        width: auto;
        height: auto;
        min-height: 0;
        padding: 16px;
        overflow-y: auto;
        opacity: 1;
        background: #fff;
        border-right: 1px solid var(--pbui-line);
        color: var(--pbui-ink);
        text-align: left;
    }

    #wrapper.pb-shell .tabs .content.visible {
        display: block;
        width: auto;
        padding: 16px;
    }

    #wrapper.pb-shell #main-content {
        grid-area: stage;
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        margin: 0;
        position: relative;
        background: #fff;
    }

    #wrapper.pb-shell #main-content #pb-plate {
        order: 1;
    }

    #wrapper.pb-shell #main-content .stage__bar {
        order: 2;
    }

    #wrapper.pb-shell #main-content #host {
        order: 3;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        flex: 1 1 0;
        height: auto !important;
        min-height: 0;
        padding: 42px 12px 0;
        overflow: hidden;
        text-align: center;
    }

    #wrapper.pb-shell #main-content #host > div {
        flex: none;
    }

    html.pb-tplaround #wrapper.pb-shell #main-content #host {
        --pb-bt-h: 76px;
        --pb-bt: calc(var(--pb-bt-h) + 12px);
        --pb-card: 56px;
        --pb-col: 88px;
        --pb-tile: 64px;
    }

    #wrapper.pb-shell #main-content #host #templates-left,
    #wrapper.pb-shell #main-content #host #templates-right {
        width: var(--pb-col);
        height: var(--pb-bh, 400px);
        max-height: none;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
        border: 1px solid var(--pbui-line);
        border-radius: 12px;
        background: #fff;
        box-shadow: none;
        scrollbar-width: thin;
        scrollbar-color: var(--pbui-line) transparent;
    }

    #wrapper.pb-shell #main-content #host #templates-left {
        margin: 0 12px var(--pb-bt, 0px) 0;
    }

    #wrapper.pb-shell #main-content #host #templates-right {
        margin: 0 0 var(--pb-bt, 0px) 12px;
    }

    html.pb-tplaround #wrapper.pb-shell #main-content #host #book-container {
        margin-bottom: var(--pb-bt, 0px);
    }

    #wrapper.pb-shell #main-content #host #templates-left .pb-tp-h,
    #wrapper.pb-shell #main-content #host #templates-right .pb-tp-h {
        position: sticky;
        top: 0;
        z-index: 1;
        margin: 0;
        padding: 8px 4px 6px;
        background: #fff;
        color: var(--pbui-muted);
        font: 700 11px/1.25 var(--pbui-font);
        text-align: center;
    }

    #wrapper.pb-shell #main-content #host #templates-left .layouts,
    #wrapper.pb-shell #main-content #host #templates-right .layouts {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 2px 0 10px;
        white-space: normal;
    }

    #wrapper.pb-shell #main-content #host .templates .layouts .item {
        flex: none;
        display: block;
        width: var(--pb-tile);
        height: var(--pb-tile);
        border: 1.5px solid var(--pbui-line);
        border-radius: 8px;
        background: #fff;
        isolation: isolate;
    }

    #wrapper.pb-shell #main-content #host .templates .layouts .item:hover {
        border-color: var(--pbui-primary);
    }

    html.pb-tplaround #wrapper.pb-shell #book-container #bottom-tools {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        height: var(--pb-bt-h);
        margin-top: 12px;
    }

    #wrapper.pb-shell #book-container #bottom-tools .pb-bt-side {
        flex: none;
    }

    #wrapper.pb-shell #book-container #bottom-tools .pb-bt-pick {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border: 1.5px solid var(--pbui-line);
        border-radius: 50%;
        background: #fff;
        color: var(--pbui-muted);
        cursor: pointer;
    }

    #wrapper.pb-shell #book-container #bottom-tools .pb-bt-pick:hover,
    #wrapper.pb-shell #book-container #bottom-tools .pb-bt-pick:focus-visible {
        border-color: var(--pbui-primary);
        color: var(--pbui-primary);
        outline: 0;
    }

    #wrapper.pb-shell #book-container.pb-on-cover #bottom-tools .pb-bt-side {
        display: none;
    }

    #wrapper.pb-shell #book-container #bottom-tools > .templates {
        flex: 0 1 auto;
        width: auto;
        min-width: 0;
        max-width: 100%;
        height: var(--pb-bt-h);
        margin: 0;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        border: 1px solid var(--pbui-line);
        border-radius: 12px;
        background: #fff;
        box-shadow: none;
        scrollbar-width: thin;
        scrollbar-color: var(--pbui-line) transparent;
    }

    #wrapper.pb-shell #book-container #bottom-tools .pb-tp-h {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    #wrapper.pb-shell #book-container #bottom-tools .templates .layouts {
        display: flex;
        align-items: center;
        gap: 8px;
        width: max-content;
        height: 100%;
        padding: 0 8px;
        white-space: nowrap;
    }

    #wrapper.pb-shell #book-container #bottom-tools #templates-bottom .layouts .item {
        width: calc(var(--pb-card) * 7 / 6);
        height: var(--pb-card);
    }

    #wrapper.pb-shell #book-container #bottom-tools #templates-bottom-cover .layouts .item {
        width: calc(var(--pb-card) * 10 / 6);
        height: var(--pb-card);
    }

    #wrapper.pb-shell #main-content #pages {
        order: 4;
    }

    #wrapper.pb-shell #book-content {
        box-shadow: 0 6px 24px -8px rgba(13, 27, 34, .35);
    }

    #wrapper.pb-shell #book-cover-inner {
        background: transparent;
        box-shadow: none;
    }

    #tools-panel,
    #pb-ttb {
        position: fixed;
    }
}

@media (max-width: 760px) {
    #wrapper.pb-shell > .ed__top {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 12px;
    }

    #wrapper.pb-shell > .ed__top .saved,
    #wrapper.pb-shell > .ed__top .adm,
    #wrapper.pb-shell > .ed__top .pricebar__sum small {
        display: none;
    }

    #wrapper.pb-shell .stage__bar {
        display: none;
    }
}

@media (min-width: 761px) {
    #wrapper.pb-shell .tabs nav {
        background: #fff;
    }

    #wrapper.pb-shell .tabs nav a.selected {
        background: rgba(0, 131, 143, .12);
        color: var(--p55-hdr-icon, #00838f);
    }

    #wrapper.pb-shell #main-content {
        background: var(--pbui-soft);
    }

    #wrapper.pb-shell .tabs nav a:hover {
        background: var(--pbui-soft);
    }

    #wrapper.pb-shell .pb-plate {
        background: #fff;
        box-shadow: 0 8px 22px -16px rgba(13, 27, 34, .5);
    }

    #wrapper.pb-shell .pb-plate.is-warn {
        background: #fff4dd;
    }

    #wrapper #main-content #pages.pb-strip .add-page {
        height: 66px;
        min-width: 120px;
        margin: 0;
        padding: 0 12px;
        border: 1.5px dashed var(--pbui-primary);
        border-radius: 12px;
        background: rgba(0, 131, 143, .08);
        color: var(--pbui-ink);
        font: 700 12.5px/66px var(--pbui-font);
    }

    #wrapper #main-content #pages.pb-strip .add-page:nth-last-child(2) {
        grid-area: a;
    }

    #wrapper #main-content #pages.pb-strip .add-page:last-child {
        display: none;
    }

    #wrapper #main-content #pages.pb-strip .add-page small {
        font-weight: 600;
        color: var(--pbui-muted);
    }
}

.pb-dlg__x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--p55-hdr-bg, #f6f4ef);
    color: var(--p55-btn-bg, #0d1b22);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.pb-cvrow {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pb-cvrow .pb-cvbox {
    flex: none;
    width: auto;
}

.pb-cvrow p {
    margin: 0;
    font-size: 12.5px;
}

@media (min-width: 761px) and (max-height: 800px) {
    html.pb-tplaround #wrapper.pb-shell #main-content #host {
        --pb-bt-h: 64px;
        --pb-card: 46px;
        --pb-col: 72px;
        --pb-tile: 52px;
    }
}

[data-pb][hidden],
.pb-pg[hidden],
.pb-pg__l[hidden],
.pb-ydq[hidden],
.pb-start[hidden],
.pb-start [hidden] {
    display: none !important;
}

#wrapper .pb-phbtns .pb-btn,
#wrapper .pb-start__btns .pb-btn {
    width: 100%;
    height: 48px;
    padding: 0 22px;
    font-size: 15px;
}

#wrapper .pb-phbtns .pb-btn--xl,
#wrapper .pb-start__btns .pb-btn--xl {
    height: 56px;
    padding: 0 28px;
    font-size: 16px;
}

#wrapper .pb-phbtns .pb-btn--g[disabled],
#wrapper .pb-start__btns .pb-btn--g[disabled] {
    border-color: transparent;
}

.pb-photo-cap {
    margin: 0 0 14px;
    color: var(--pbui-muted);
    font: 500 13px/1.45 var(--pbui-font);
}

.pb-phbtns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pb-ydq {
    margin: 14px 0 0;
    padding: 12px;
    border-radius: 14px;
    background: #e3f2f3;
    text-align: left;
}

.pb-ydq b {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00737d;
    font: 700 13.5px/1.3 var(--pbui-font);
}

.pb-ydq p {
    margin: 8px 0 0;
    color: #5b6b73;
    font: 500 12.5px/1.4 var(--pbui-font);
}

.pb-ydq__bar {
    height: 8px;
    margin-top: 10px;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.pb-ydq__bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--pbui-primary);
    transition: width .25s;
}

.pb-pg {
    margin: 16px 0 0;
}

.pb-pg__l {
    margin: 0 0 8px;
    color: #5b6b73;
    font: 700 13px/1.3 var(--pbui-font);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pb-pg__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#sidebar .pb-pg__grid .item.photo {
    display: block;
    width: auto;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: #f1eee7;
    cursor: grab;
}

#sidebar .pb-pg__grid .item.photo.used {
    opacity: .6;
}

#sidebar .pb-pg__grid .item.photo .lds-dual-ring {
    margin-left: -23px;
    margin-top: -23px;
    transform: scale(.6);
}

#sidebar .pb-pg__grid .item.photo .count {
    top: auto;
    left: auto;
    right: 4px;
    bottom: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16683e;
    color: #fff;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
}

#sidebar .pb-pg__grid .item.photo .remove {
    top: 2px;
    right: 2px;
    padding: 4px;
    border-radius: 50%;
}

#sidebar .item.ui-draggable-dragging {
    z-index: 3002 !important;
}

.pb-ydb {
    position: absolute;
    left: 4px;
    top: 4px;
    z-index: 2;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #3d8bff, #8a3dff);
    color: #fff;
    font-size: 9px;
    line-height: 1;
    box-shadow: 0 0 0 1.5px #fff;
    pointer-events: none;
}

.pb-qt {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
}

.pb-qt.is-wait {
    background: repeating-linear-gradient(135deg, #f3f5f6 0 6px, #eceff0 6px 12px);
}

.pb-qt.is-load {
    display: grid;
    place-items: center;
    background: #f1eee7;
}

.pb-qt.is-load i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #cfd8dc;
    border-top-color: var(--pbui-primary);
    animation: pb-spin .9s linear infinite;
}

.pb-qt.is-err {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    background: #fdecea;
    color: #b42318;
    text-align: center;
}

.pb-qt.is-err small {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font: 700 9.5px/1.2 var(--pbui-font);
}

.pb-qt.is-err.is-named {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.pb-qt.is-err.has-again small {
    -webkit-line-clamp: 2;
}

.pb-qt__n {
    max-width: calc(100% - 22px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font: 700 11px/1.3 var(--pbui-font);
}

.pb-qt__r {
    margin-top: 2px;
    padding: 3px 10px;
    border: 1px solid #b42318;
    border-radius: 999px;
    background: #fff;
    color: #b42318;
    font: 700 10.5px/1.2 var(--pbui-font);
    cursor: pointer;
}

.pb-qt__r:hover,
.pb-qt__r:focus-visible {
    background: #b42318;
    color: #fff;
}

.pb-qt__x {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #b42318;
    font-size: 10px;
    cursor: pointer;
}

.pb-start {
    position: absolute;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 12px;
    background: rgba(246, 244, 239, .7);
    text-align: center;
}

.pb-start__box {
    position: relative;
    width: min(460px, 100%);
    max-height: 100%;
    overflow-y: auto;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px -20px rgba(13, 27, 34, .4);
    color: var(--pbui-ink);
}

.pb-start__box h3 {
    margin: 0 0 8px;
    color: var(--pbui-ink);
    font: 700 20px/1.3 var(--p55h-display, var(--pbui-font));
}

.pb-start__box p {
    margin: 0 0 18px;
    color: #5b6b73;
    font: 500 14px/1.45 var(--pbui-font);
}

.pb-start__box ol {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font: 500 14px/1.4 var(--pbui-font);
    text-align: left;
}

.pb-start__box ol li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pb-start__box ol b {
    flex: none;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e3f2f3;
    color: var(--pbui-primary);
    font-size: 12px;
}

.pb-start__btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#host {
    position: relative;
}

.pb-ic {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.ed__back,
.pb-tabbar,
.pb-scrim,
.pb-phhint,
.pb-more,
.pb-tpl,
.pb-sheet-x {
    display: none;
}

.outer-cover-backbone {
    pointer-events: none;
}

.pb-start {
    z-index: 3000;
}

html.pb-phone,
html.pb-phone body {
    height: 100%;
    overflow: hidden;
    background: #fff;
}

html.pb-phone body > main#main-content {
    height: 0;
    min-height: 0;
    padding: 0;
    overflow: visible;
}

html.pb-phone .modal {
    z-index: 2000010;
}

html.pb-phone .modal-backdrop {
    z-index: 2000000;
}

html.pb-phone {
    --pb-tab-h: 67px;
    --pb-bot: calc(var(--p55-cookie-h, 0px) + var(--pb-kb, 0px));
}

html.pb-phone #wrapper.pb-shell {
    grid-template-areas: none;
    position: fixed;
    top: var(--p55-hdr-top, 0px);
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: calc(100dvh - var(--p55-hdr-top, 0px) - var(--pb-bot));
    z-index: 5;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    background: #fff;
    font-family: var(--pbui-font);
}

html.pb-phone #wrapper.pb-shell > .ed__top {
    display: contents;
}

html.pb-phone #wrapper.pb-shell .ed__back {
    grid-row: 1;
    grid-column: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 48px;
    color: var(--pbui-ink);
    font-size: 22px;
    background: #fff;
    border-bottom: 1px solid var(--pbui-line);
}

html.pb-phone #wrapper.pb-shell .ed__book {
    grid-row: 1;
    grid-column: 2;
    align-items: center;
    height: 48px;
    min-width: 0;
    background: #fff;
    border-bottom: 1px solid var(--pbui-line);
}

html.pb-phone #wrapper.pb-shell .ed__book b {
    font-size: 15px;
}

html.pb-phone #wrapper.pb-shell .ed__book small {
    display: none;
}

html.pb-phone #wrapper.pb-shell .ed__top .saved {
    display: inline-flex;
    grid-row: 1;
    grid-column: 3;
    align-self: stretch;
    border-radius: 0;
    background: #fff;
    border-bottom: 1px solid var(--pbui-line);
    padding: 0 12px;
    font-size: 12px;
}

html.pb-phone #wrapper.pb-shell .ed__top .saved .saved__b {
    min-height: 32px;
}

html.pb-phone #wrapper.pb-shell .ed__top .saved:not(.is-fail) {
    display: block;
    min-width: 0;
    max-width: 40vw;
    overflow: hidden;
    line-height: 47px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.pb-phone #wrapper.pb-shell .ed__top .saved:not(.is-fail) > span {
    margin-right: 6px;
}

html.pb-phone #wrapper.pb-shell .ed__top .adm {
    display: inline-flex;
    grid-row: 1;
    grid-column: 4;
    align-self: center;
    margin-right: 8px;
    padding: 4px 8px;
    font-size: 11px;
}

html.pb-phone #wrapper.pb-shell .ed__top .grow,
html.pb-phone #wrapper.pb-shell .ed__top #pb-view {
    display: none;
}

html.pb-phone #wrapper.pb-shell .ed__top .pb-toplink {
    grid-row: 1;
    grid-column: 4;
    align-self: stretch;
    padding: 0 12px;
    background: #fff;
    border-bottom: 1px solid var(--pbui-line);
    font-size: 12.5px;
}

html.pb-phone #wrapper.pb-shell .ed__top .pb-toplink__l {
    display: none;
}

html.pb-phone #wrapper.pb-shell .ed__top .pb-toplink__s {
    display: inline;
}

html.pb-phone #wrapper.pb-shell .ed__top:has(.saved.is-fail) .ed__book {
    display: none;
}

html.pb-phone #wrapper.pb-shell .ed__top .saved.is-fail {
    grid-column: 2 / 4;
    gap: 6px;
    padding: 0 8px;
    font-size: 11.5px;
    line-height: 1.2;
    white-space: normal;
}

html.pb-phone #wrapper.pb-shell .ed__top .saved.is-fail .saved__t {
    flex: 1 1 0;
    min-width: 0;
}

html.pb-phone #wrapper.pb-shell .ed__top .pricebar__sum small {
    display: block;
}

html.pb-phone #wrapper.pb-shell .ed__top .pricebar__sum {
    justify-items: start;
    text-align: left;
}

html.pb-phone #wrapper.pb-shell .ed__top .pricebar {
    grid-row: 3;
    grid-column: 1 / -1;
    justify-content: space-between;
    padding: 8px 16px;
    background: #fff;
    border-top: 1px solid var(--pbui-line);
}

html.pb-phone #wrapper.pb-shell .ed__top .pricebar .pb-btn {
    height: 52px;
    padding: 0 26px;
    font-size: 16px;
    margin-left: auto;
}

html.pb-phone #wrapper.pb-shell #sidebar,
html.pb-phone #wrapper.pb-shell #sidebar .tabs {
    display: contents;
}

html.pb-phone #wrapper.pb-shell .tabs nav {
    display: none;
}

html.pb-phone #wrapper.pb-shell #main-content {
    grid-row: 2;
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--pbui-soft);
}

html.pb-phone:not(#p55-x) #wrapper.pb-shell #main-content {
    padding: 0;
}

html.pb-phone #wrapper.pb-shell #main-content #pb-plate {
    order: 1;
}

html.pb-phone #wrapper.pb-shell #main-content .pb-plate {
    margin: 6px 8px 0;
    padding: 6px 8px 6px 12px;
    font-size: 12.5px;
}

html.pb-phone #wrapper.pb-shell #main-content .pb-plate .pb-btn {
    height: 44px;
}

html.pb-phone #wrapper.pb-shell #main-content .pb-plate__x {
    width: 44px;
    height: 44px;
}

html.pb-phone #wrapper.pb-shell #main-content .stage__bar {
    order: 2;
    display: flex;
    gap: 8px;
    height: auto;
    padding: 4px 8px 0;
    font-size: 13px;
}

html.pb-phone #wrapper.pb-shell #main-content #host {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    height: auto !important;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

html.pb-phone #wrapper.pb-shell #main-content #host > div {
    flex: none;
}

html.pb-phone #wrapper.pb-shell #main-content #host #templates-left,
html.pb-phone #wrapper.pb-shell #main-content #host #templates-right,
html.pb-phone #wrapper.pb-shell #book-container #bottom-tools,
html.pb-phone #wrapper.pb-shell #book-container .pb-cvl {
    display: none;
}

html.pb-phone #wrapper.pb-shell #book-content {
    box-shadow: 0 4px 16px -6px rgba(13, 27, 34, .4);
}

html.pb-phone #wrapper.pb-shell #book-cover-inner {
    background: transparent;
    box-shadow: none;
}

html.pb-phone #book-content .element {
    touch-action: none;
}

html.pb-phone .pb-phhint {
    order: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    color: var(--pbui-muted);
    font: 600 12.5px/1.3 var(--pbui-font);
}

html.pb-phone .pb-phhint.is-pick {
    background: var(--pbui-accent-soft);
    color: var(--pbui-ink);
}

html.pb-phone .pb-phhint.is-done:not(.is-pick) {
    display: none;
}

html.pb-phone .pb-phhint__t {
    flex: 1 1 auto;
}

html.pb-phone .pb-phhint__x {
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--pbui-primary);
    font: 700 13px var(--pbui-font);
    white-space: nowrap;
}

html.pb-coarse:not(.pb-phone) .pb-phhint.is-pick {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 2000;
    max-width: min(520px, calc(100vw - 32px));
    border-radius: 12px;
    background: #fff;
    color: var(--pbui-ink);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
}

html.pb-coarse:not(.pb-phone) .pb-phhint.is-pick,
html.pb-coarse:not(.pb-phone) .pb-phhint__t,
html.pb-coarse:not(.pb-phone) .pb-phhint__x {
    display: flex;
    align-items: center;
}

html.pb-coarse:not(.pb-phone) .pb-phhint.is-pick {
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    font: 600 13px/1.3 var(--pbui-font);
}

html.pb-coarse:not(.pb-phone) .pb-phhint__t {
    flex: 1 1 auto;
}

html.pb-coarse:not(.pb-phone) .pb-phhint__x {
    min-width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--pbui-primary);
    font: 700 13px var(--pbui-font);
}

html.pb-coarse:not(.pb-phone) .pb-phhint__x[hidden],
html.pb-phone .pb-phhint__x[hidden] {
    display: none;
}

html.pb-phone #wrapper.pb-shell #main-content #pages.pb-strip {
    order: 5;
    grid-template-columns: minmax(0, max-content) auto;
    grid-template-areas: "w a";
    justify-content: center;
    padding: 0 8px 6px;
    gap: 0 6px;
}

html.pb-phone .pb-strip .pb-strip__h,
html.pb-phone .pb-strip .pb-tip,
html.pb-phone #wrapper #main-content #pages.pb-strip .add-page:last-child {
    display: none;
}

html.pb-phone #wrapper #main-content #pages.pb-strip .wrapper {
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 6px 0;
    scrollbar-width: none;
}

html.pb-phone #wrapper #main-content #pages.pb-strip .item {
    min-width: 76px;
    min-height: 56px;
}

html.pb-phone #wrapper #main-content #pages.pb-strip .item .th__g {
    min-width: 28px;
    min-height: 28px;
    touch-action: none;
}

html.pb-phone #wrapper #main-content #pages.pb-strip .add-page {
    min-width: 56px;
    height: 56px;
    padding: 0 10px;
    border: 1.5px dashed var(--pbui-primary);
    border-radius: 12px;
    background: rgba(0, 131, 143, .08);
    color: var(--pbui-ink);
    font: 700 12.5px/56px var(--pbui-font);
}

html.pb-phone #wrapper #main-content #pages.pb-strip .add-page .desktop-only {
    display: block !important;
    font-size: 12px;
}

html.pb-phone #wrapper #main-content #pages.pb-strip .add-page .mobile-only {
    display: none !important;
}

html.pb-phone .pb-tabbar {
    grid-row: 4;
    grid-column: 1 / -1;
    position: relative;
    z-index: 2000;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--pbui-line);
}

html.pb-phone .pb-tabbar button {
    height: 58px;
    min-width: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--pbui-muted);
    font: 700 11.5px/1 var(--pbui-font);
}

html.pb-phone .pb-tabbar button .pb-ic {
    font-size: 22px;
}

html.pb-phone .pb-tabbar button[aria-expanded="true"] {
    background: rgba(0, 131, 143, .12);
    color: var(--pbui-primary);
}

html.pb-phone .pb-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(13, 27, 34, .45);
}

html.pb-phone.pb-sheet-open .pb-scrim {
    display: block;
}

html.pb-phone #wrapper.pb-shell .tabs .content {
    display: none;
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: calc(var(--pb-tab-h) + env(safe-area-inset-bottom, 0px) + var(--pb-bot));
    z-index: 1600;
    width: auto;
    height: auto;
    max-height: 56%;
    padding: 28px 16px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 22px 22px 0 0;
    background: #fff;
    box-shadow: 0 -16px 40px -16px rgba(13, 27, 34, .4);
}

html.pb-phone.pb-sheet-open #wrapper.pb-shell .tabs .content.visible {
    display: block;
    width: auto;
    padding: 28px 16px 16px;
}

html.pb-phone .tabs .content::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 50%;
    width: 44px;
    height: 5px;
    margin-left: -22px;
    border-radius: 3px;
    background: #d4dadd;
}

html.pb-phone .pb-sheet-x {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--pbui-muted);
    font-size: 18px;
}

html.pb-phone #sidebar .content .title {
    display: block;
    margin: 0 0 10px;
    font: 700 15px var(--pbui-font);
}

html.pb-phone .pb-phbtns {
    flex-direction: row;
    flex-wrap: wrap;
}

html.pb-phone #wrapper .pb-phbtns .pb-btn {
    flex: 1 1 calc(50% - 4px);
    width: auto;
    height: 52px;
    padding: 0 10px;
    font-size: 14px;
}

html.pb-phone #wrapper .pb-phbtns .pb-btn[data-pb="autofill"] {
    flex-basis: 100%;
}

html.pb-phone #sidebar .pb-pg__grid .item.photo {
    cursor: pointer;
    touch-action: pan-y;
}

html.pb-coarse #sidebar .item.is-pick,
html.pb-coarse #sidebar .frame.is-pick,
html.pb-phone #sidebar .item.is-pick,
html.pb-phone #sidebar .frame.is-pick {
    outline: 3px solid var(--pbui-accent);
    outline-offset: 1px;
}

html.pb-phone #sidebar .pb-pg__grid .item.photo .remove {
    min-width: 28px;
    min-height: 28px;
    padding: 7px;
}

html.pb-phone #sidebar .pb-bgs,
html.pb-phone #sidebar .filter-container,
html.pb-phone #sidebar .frames {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

html.pb-phone #sidebar .pb-bgs .item,
html.pb-phone #sidebar .filter-container .item,
html.pb-phone #sidebar .frames .item {
    width: auto;
    height: auto;
    min-height: 44px;
    aspect-ratio: 1 / 1;
    margin: 0;
}

html.pb-phone #sidebar .filter-container .item img {
    max-width: 100%;
}

html.pb-phone #sidebar .clip-arts .uk-badge.filter {
    display: inline-block;
    min-height: 44px;
    margin: 0 4px 8px 0;
    padding: 12px 14px;
    line-height: 1.2;
}

html.pb-phone .pb-more__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html.pb-phone .pb-more__list button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--pbui-line);
    border-radius: 14px;
    background: #fff;
    color: var(--pbui-ink);
    font: 700 15px var(--pbui-font);
    text-align: left;
}

html.pb-phone .pb-more__list button.is-danger {
    color: #b42318;
}

html.pb-phone .pb-more__list .pb-ic {
    font-size: 20px;
}

html.pb-phone .pb-more__list button.pb-more__strip {
    display: none;
}

html.pb-phone #wrapper #main-content #pages.pb-strip .item .remove::after,
html.pb-phone #wrapper #main-content #pages.pb-strip .item .th__g::after {
    content: "";
    position: absolute;
    inset: -8px;
}

html.pb-phone .pb-tpl h4 {
    margin: 4px 0 8px;
    font: 700 13px var(--pbui-font);
}

html.pb-phone .pb-tpl__g {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

html.pb-phone .pb-tpl__g .layout-item {
    width: auto;
    height: 64px;
    margin: 0;
}

html.pb-phone #sidebar .fonts-list .font-item {
    min-height: 44px;
}

html.pb-phone #sidebar .uk-button {
    min-height: 48px;
}

html.pb-phone #pb-ttb,
html.pb-phone #tools-panel {
    position: fixed;
    left: 8px !important;
    right: 8px;
    top: auto !important;
    bottom: calc(var(--pb-tab-h) + 8px + env(safe-area-inset-bottom, 0px) + var(--pb-bot));
    z-index: 1400;
}

html.pb-phone #tools-panel li {
    width: 44px;
    height: 44px;
    padding: 12px 0;
}

html.pb-phone #pb-ttb button,
html.pb-phone #pb-ttb select {
    min-width: 44px;
    min-height: 44px;
}

html.pb-phone .p55yd {
    padding: 0;
}

html.pb-phone .p55yd__box {
    max-width: none;
    height: 100%;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
}

html.pb-phone .p55yd__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html.pb-phone .pb-start__btns .pb-btn,
html.pb-phone .pb-dlg__x {
    min-height: 44px;
}

html.pb-phone .pb-start {
    z-index: 1400;
    padding: 8px;
}

html.pb-phone.pb-sheet-open .pb-start {
    display: none;
}

html.pb-phone .pb-start__box {
    padding: 20px 16px;
}

html.pb-phone #wrapper.pb-shell #main-content .pb-plate {
    position: relative;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 6px 44px 6px 12px;
}

html.pb-phone #wrapper.pb-shell #main-content .pb-plate > span {
    flex: 1 1 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.pb-phone #wrapper.pb-shell #main-content .pb-plate .pb-plate__x {
    position: absolute;
    top: 0;
    right: 0;
}

html.pb-phone .pb-start__box {
    padding: 16px 14px;
}

html.pb-phone .pb-start__box ol {
    display: none;
}

html.pb-phone .pb-start__box p {
    margin-bottom: 12px;
}

.middle-shadow {
    pointer-events: none;
}

#sidebar .pb-pg__grid .item.photo.pb-flash {
    outline: 3px solid var(--pbui-primary);
    outline-offset: 2px;
}

.swal-overlay {
    z-index: 10300;
}

@media (orientation: landscape) and (max-height: 500px) {
    html.pb-phone {
        --pb-tab-h: 53px;
    }

    html.pb-phone #wrapper.pb-shell {
        grid-template-columns: auto minmax(0, 1fr) auto auto auto;
        grid-template-rows: 44px minmax(0, 1fr) auto;
    }

    html.pb-phone #wrapper.pb-shell .ed__back,
    html.pb-phone #wrapper.pb-shell .ed__book {
        height: 44px;
    }

    html.pb-phone #wrapper.pb-shell .ed__top .saved,
    html.pb-phone #wrapper.pb-shell .ed__top .adm {
        height: 44px;
        align-self: stretch;
        margin: 0;
    }

    html.pb-phone #wrapper.pb-shell .ed__top .pricebar {
        grid-row: 1;
        grid-column: 5;
        gap: 10px;
        padding: 0 8px;
        border-top: 0;
        border-bottom: 1px solid var(--pbui-line);
    }

    html.pb-phone #wrapper.pb-shell .ed__top .pricebar .pb-btn {
        height: 44px;
        padding: 0 18px;
        font-size: 15px;
    }

    html.pb-phone #wrapper.pb-shell .ed__top .pricebar__sum small {
        display: none;
    }

    html.pb-phone .pb-tabbar {
        grid-row: 3;
    }

    html.pb-phone .pb-tabbar button {
        height: 44px;
        flex-direction: row;
        gap: 8px;
    }

    html.pb-phone .pb-phhint:not(.is-pick) {
        display: none;
    }

    html.pb-phone #wrapper.pb-shell #main-content {
        position: relative;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate:not(.is-open) {
        position: absolute;
        top: 4px;
        left: 4px;
        z-index: 3100;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border-radius: 50%;
        overflow: hidden;
        font-size: 0;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate:not(.is-open) > * {
        display: none;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate:not(.is-open)::before {
        content: "!";
        font: 800 20px/1 var(--pbui-font);
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-open {
        position: absolute;
        top: 4px;
        left: 4px;
        right: 4px;
        z-index: 3100;
        margin: 0;
    }

    html.pb-phone #wrapper.pb-shell #main-content .stage__bar {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        z-index: 10;
        justify-content: space-between;
        padding: 0 4px;
        pointer-events: none;
        transform: translateY(-50%);
    }

    html.pb-phone #wrapper.pb-shell #main-content .stage__bar #pb-stagetxt {
        display: none;
    }

    html.pb-phone #wrapper.pb-shell #main-content #pages.pb-strip {
        display: none;
    }

    html.pb-phone.pb-strip-open #wrapper.pb-shell #main-content #pages.pb-strip {
        display: grid;
    }

    html.pb-phone .pb-more__list button.pb-more__strip {
        display: flex;
    }

    html.pb-phone .p55-cookie {
        padding: 6px 10px;
        font-size: 11px;
    }

    html.pb-phone .p55-cookie__buttons {
        flex-direction: row;
    }
}

/* вид по превью: цвета, статус, плашка гостя */
#wrapper,
.pb-modal {
    --pbui-tint: rgba(0, 131, 143, .1);
    --pbui-tint-ink: #00737d;
    --pbui-ok-bg: #e8f5ee;
    --pbui-ok-ink: #16683e;
    --pbui-warn-bg: #fff3d6;
    --pbui-warn-ink: #93370d;
}

.pb-modal {
    --pbui-primary: var(--p55-hdr-icon, #00838f);
    --pbui-ink: var(--p55-btn-bg, #0d1b22);
    --pbui-line: var(--p55-hdr-line, #e6e2d9);
    --pbui-soft: var(--p55-hdr-bg, #f6f4ef);
    --pbui-muted: var(--p55-hdr-text, #33454d);
}

.ed__top .saved.is-ok {
    background: var(--pbui-ok-bg);
    color: var(--pbui-ok-ink);
    font-weight: 700;
}

.pb-stage {
    display: contents;
}

.pb-plate.is-guest .pb-plate__i {
    flex: none;
    color: var(--pbui-primary);
    font-size: 18px;
}

.pb-plate.is-guest .pb-plate__s {
    display: none;
}

#pb-plate .pb-plate.is-guest {
    gap: 10px;
    padding: 4px 6px 4px 14px;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    line-height: 1.3;
}

#pb-plate .pb-plate.is-guest .pb-btn {
    height: 28px;
    padding: 0 12px;
    font-size: 12.5px;
}

#pb-plate .pb-plate.is-guest .pb-plate__x {
    flex: none;
    width: 28px;
    height: 28px;
}

@media (min-width: 761px) {
    html:not(.pb-phone) #wrapper.pb-shell #main-content {
        display: contents;
    }

    html:not(.pb-phone) #wrapper.pb-shell .pb-stage {
        grid-area: stage;
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        position: relative;
        background: var(--pbui-soft);
    }

    html:not(.pb-phone) #wrapper.pb-shell #pages {
        grid-area: strip;
    }

    html:not(.pb-phone) #wrapper.pb-shell #main-content #host {
        align-items: center;
        padding: 30px 12px 36px;
    }

    html:not(.pb-phone) #wrapper.pb-shell #book-content {
        border-radius: 3px;
        box-shadow: 0 24px 40px -18px rgba(13, 27, 34, .53), 0 2px 6px rgba(13, 27, 34, .13);
    }

    html:not(.pb-phone):not(.pb-tplaround) #wrapper.pb-shell #bottom-tools {
        display: none;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3100;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        padding: 0 20px;
        pointer-events: none;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate:empty {
        display: none;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate .pb-plate {
        flex: 0 1 auto;
        gap: 10px;
        min-width: 0;
        max-width: 100%;
        height: 32px;
        margin: 0;
        padding: 0 6px 0 14px;
        border-radius: 999px;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
        pointer-events: auto;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate .pb-plate > span {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate .pb-plate > span > span {
        text-overflow: ellipsis;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate .pb-plate .pb-btn {
        flex: none;
        height: 24px;
        padding: 0 12px;
        font-size: 12.5px;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate .pb-plate .pb-plate__x {
        flex: none;
        width: 24px;
        height: 24px;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate .pb-plate.is-guest .pb-plate__l {
        display: none;
    }

    html:not(.pb-phone) #wrapper.pb-shell #pb-plate .pb-plate.is-guest .pb-plate__s {
        display: inline;
    }

    #wrapper.pb-shell .tabs nav a {
        cursor: pointer;
    }

    #wrapper.pb-shell .tabs nav a.selected {
        background: var(--pbui-tint);
        color: var(--pbui-primary);
    }

    #wrapper.pb-shell .tabs .content.pb-c-photo.visible {
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow: hidden;
    }

    #wrapper.pb-shell .pb-phead {
        flex: none;
        padding: 18px 16px 14px;
        background: #fff;
        border-bottom: 1px solid var(--pbui-line);
    }

    #wrapper.pb-shell .pb-phead .title {
        display: block;
        margin: 0 0 6px;
        color: var(--pbui-ink);
        font: 800 20px/1.2 var(--pbui-font);
    }

    #wrapper.pb-shell .pb-phead .pb-photo-cap {
        margin: 0 0 12px;
    }

    #wrapper.pb-shell .pb-phead .pb-phbtns .pb-btn {
        height: 44px;
        font-size: 14.5px;
    }

    #wrapper.pb-shell .pb-phead .pb-phbtns .pb-btn--xl {
        height: 48px;
        font-size: 15px;
    }

    #wrapper.pb-shell .pb-c-photo .photos {
        flex: 1 1 auto;
        min-height: 0;
        padding: 4px 16px 16px;
        overflow-y: auto;
    }
}

#sidebar .pb-pg__grid .item.photo {
    overflow: hidden;
    border-radius: 10px;
}

#wrapper .pb-btn:focus-visible {
    outline: 2px solid var(--pbui-primary);
    outline-offset: 2px;
}

#sidebar .content .pb-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--pbui-tint);
    color: var(--pbui-tint-ink);
}

#sidebar .content .pb-hint .pb-ic {
    flex: none;
    font-size: 18px;
}

/* лента разворотов */
#wrapper #main-content #pages.pb-strip {
    grid-template-columns: minmax(0, max-content) auto;
    grid-template-areas: "h h" "w a";
    justify-content: center;
    border-top: 1px solid var(--pbui-line);
}

.pb-strip .pb-tip {
    grid-area: w;
    left: 0;
}

#wrapper #main-content #pages.pb-strip .item {
    border-radius: 12px;
    border-color: transparent;
}

#wrapper #main-content #pages.pb-strip .item.active {
    border-color: var(--pbui-primary);
    background: var(--pbui-tint);
}

#wrapper #main-content #pages.pb-strip .item.active p {
    color: var(--pbui-tint-ink);
}

body #wrapper #main-content #pages.pb-strip .item,
body #wrapper #main-content #pages.pb-strip .item.cover {
    background: #fff !important;
}

body #wrapper #main-content #pages.pb-strip .item.active,
body #wrapper #main-content #pages.pb-strip .item.cover.active {
    background: var(--pbui-tint) !important;
}

#wrapper #main-content #pages.pb-strip .item .th__i {
    border-radius: 4px;
}

#wrapper #main-content #pages.pb-strip .item .th__w {
    background: var(--pbui-warn-bg);
    color: var(--pbui-warn-ink);
}

.pb-strip .pb-ins,
.pb-strip .pb-ins::before,
.pb-strip .pb-ins::after {
    background: var(--pbui-primary);
}

@media (min-width: 761px) {
    html:not(.pb-phone) #wrapper #main-content #pages.pb-strip .add-page {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 66px;
        min-width: 100px;
        padding: 0 12px;
        line-height: 1.2;
        text-align: center;
    }

    html:not(.pb-phone) #wrapper #main-content #pages.pb-strip .add-page:last-child {
        display: none;
    }

    html:not(.pb-phone) #wrapper #main-content #pages.pb-strip .add-page > .desktop-only {
        display: grid;
        justify-items: center;
        line-height: 1.15;
    }

    html:not(.pb-phone) #wrapper #main-content #pages.pb-strip .add-page .pb-add__p {
        color: var(--pbui-primary);
        font: 700 18px/1 var(--pbui-font);
    }

    html:not(.pb-phone) #wrapper #main-content #pages.pb-strip .add-page small {
        font-size: 11.5px;
    }
}

/* окно «Сохранить тему в каталог» */
.pb-dlg--theme {
    width: min(520px, 100%);
    padding: 28px 28px 24px;
    border-radius: 24px;
}

.pb-dlg--theme h2 {
    margin: 0 44px 8px 0;
    color: var(--pbui-ink);
    font: 800 22px/1.25 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg--theme > p {
    margin: 0 0 20px;
    color: var(--pbui-muted);
}

.pb-dlg--theme label.pb-l,
.pb-dlg--theme .pb-l {
    margin: 0 0 8px;
    color: var(--pbui-muted);
    font: 700 13px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pb-dlg--theme .pb-in {
    height: 46px;
}

.pb-dlg--theme .pb-in:focus {
    border-color: var(--pbui-primary);
    box-shadow: 0 0 0 3px var(--pbui-tint);
}

.pb-dlg--theme .pb-cvrow {
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: var(--pbui-soft);
}

.pb-dlg--theme .pb-cvrow p {
    color: var(--pbui-muted);
    font-size: 13px;
    line-height: 1.45;
}

.pb-dlg--theme .pb-chks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pb-dlg--theme .pb-chk {
    gap: 10px;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    font: 700 14px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-dlg--theme .pb-chk input {
    width: 18px;
    height: 18px;
    accent-color: var(--pbui-primary);
}

.pb-dlg--theme .pb-chk:has(input:checked) {
    border-color: var(--pbui-primary);
    background: var(--pbui-tint);
    color: var(--pbui-tint-ink);
}

.pb-dlg--theme .pb-chk:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--pbui-tint);
}

.pb-dlg--theme .pb-btns .pb-btn {
    gap: 8px;
    height: 44px;
    padding: 0 22px;
}

.pb-dlg--theme .pb-btns .pb-btn:not(.pb-btn--g) {
    box-shadow: 0 8px 18px -10px rgba(0, 131, 143, .8);
}

@media (max-width: 760px) {
    .pb-modal:has(.pb-dlg--theme) {
        align-items: end;
        padding: 0;
    }

    .pb-dlg--theme {
        width: 100%;
        max-height: 94vh;
        padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
    }

    .pb-dlg--theme .pb-chks {
        grid-template-columns: 1fr 1fr;
    }
}

/* телефон: шторка, плашка гостя */
html.pb-phone #sidebar .content .title {
    text-align: left;
}

html.pb-phone #sidebar .pb-c-photo .pb-phead .title {
    margin: 0 0 6px;
}

html.pb-phone #wrapper .pb-phbtns .pb-btn--xl {
    flex-basis: 100%;
    order: -1;
}

html.pb-phone #wrapper .pb-phbtns .pb-btn--g {
    border-color: var(--pbui-line);
}

html.pb-phone .pb-tabbar button[aria-expanded="true"] {
    background: var(--pbui-tint);
    color: var(--pbui-primary);
}

@media not all and (orientation: landscape) and (max-height: 500px) {
    html.pb-phone #wrapper.pb-shell #main-content #pb-plate.is-over {
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        z-index: 3100;
        transition: top .2s ease;
        pointer-events: none;
    }

    html.pb-phone #wrapper.pb-shell #main-content #pb-plate.is-over .pb-plate {
        pointer-events: auto;
        box-shadow: 0 8px 22px -12px rgba(13, 27, 34, .55);
    }

    html.pb-phone:has(.pb-start:not([hidden])) #wrapper.pb-shell #main-content #pb-plate.is-over {
        top: 6px;
    }

    html.pb-phone:has(#pb-plate.is-over) .pb-start {
        padding-top: 70px;
        transition: padding-top .2s ease;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest {
        position: relative;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 2px 4px 2px 12px;
        border-radius: 999px;
        cursor: pointer;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest > span:nth-child(2) {
        flex: 1 1 0;
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest:not(.is-open) .pb-plate__l,
    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest:not(.is-open) .pb-btn {
        display: none;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest:not(.is-open) .pb-plate__s {
        display: inline;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest.is-open {
        flex-wrap: wrap;
        align-items: center;
        border-radius: 16px;
        padding: 8px 44px 8px 12px;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest.is-open > span:nth-child(2) {
        flex: 1 1 calc(100% - 30px);
        white-space: normal;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest .pb-plate__x {
        position: static;
        width: 44px;
        height: 44px;
        margin-left: auto;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest.is-open .pb-plate__x {
        position: absolute;
        top: 0;
        right: 0;
    }

    html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest .pb-btn {
        height: 44px;
    }
}

.ed__top .saved.is-fail,
.ed__top .saved.is-warn {
    background: var(--pbui-warn-bg);
    color: var(--pbui-warn-ink);
}

.ed__top .saved.is-fail .saved__b {
    border-color: var(--pbui-warn-ink);
    background: var(--pbui-warn-ink);
}

html.pb-phone #sidebar .content .title {
    color: var(--pbui-ink);
}

html.pb-phone #sidebar .pb-photo-cap {
    text-align: left;
}

html.pb-phone #wrapper.pb-shell #main-content .pb-plate.is-guest > .pb-plate__i {
    flex: none;
    display: block;
    overflow: visible;
}

#sidebar .pb-pg__grid .item.photo img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    border-radius: inherit;
}

.pb-dlg h2,
.pb-start__box h3,
html.pb-phone #sidebar .content .title {
    overflow-wrap: anywhere;
}

.pb-dlg h2,
html.pb-phone #sidebar .content .title {
    padding-right: 48px;
}

.pb-dlg--theme h2 {
    padding-right: 0;
}

.pb-start__box h3 {
    padding: 0 48px;
}

body > .item.ui-draggable-dragging:not(.background) {
    box-sizing: border-box;
    position: absolute;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(241, 238, 231, .85);
    box-shadow: 0 10px 22px -8px rgba(13, 27, 34, .7);
    opacity: .92;
    pointer-events: none;
}

body > .item.ui-draggable-dragging:not(.background) img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: contain;
}

body > .item.ui-draggable-dragging:not(.background) .count,
body > .item.ui-draggable-dragging:not(.background) .remove,
body > .item.ui-draggable-dragging:not(.background) .pb-ydb,
body > .item.ui-draggable-dragging:not(.background) .lds-dual-ring {
    display: none !important;
}

#wrapper #main-content #pages .item .remove.is-off {
    background: #8c969b;
    cursor: not-allowed;
}

html.pb-view #pb-order,
html.pb-view #pb-saved,
html.pb-view .tabs nav a:not([data-tab="6"]),
html.pb-view .tabs nav .pb-rail-x,
html.pb-view #pb-tabbar button:not([data-pbtab="8"]),
html.pb-view .pb-more__list button:not([data-more="6"]):not([data-more="strip"]):not([data-more="anim"]),
html.pb-view #pages .add-page.pb-addspread,
html.pb-view #pages .pb-strip__h,
html.pb-view #wrapper #main-content #pages .item .remove,
html.pb-view #wrapper #main-content #pages.pb-strip .item .th__g {
    display: none !important;
}

html.pb-view #book-content {
    pointer-events: none;
    user-select: none;
}

.stage__bar {
    position: relative;
}

.stage__bar .pb-animbtn {
    position: absolute;
    top: 3px;
    right: 12px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    color: var(--pbui-primary);
}

.stage__bar .pb-animbtn[aria-pressed="false"] {
    color: var(--pbui-muted);
    opacity: .55;
}

.stage__bar .pb-animbtn[aria-pressed="false"]::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 50%;
    height: 1.5px;
    background: currentColor;
    transform: rotate(-45deg);
}

html.pb-phone #wrapper.pb-shell #main-content .stage__bar .pb-animbtn {
    display: none;
}

html.pb-phone .pb-more__list .pb-more__anim .pb-sw {
    position: relative;
    flex: none;
    width: 40px;
    height: 24px;
    margin-left: auto;
    border-radius: 12px;
    background: var(--pbui-line);
    transition: background-color .18s;
}

html.pb-phone .pb-more__list .pb-more__anim .pb-sw::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(13, 27, 34, .35);
    transition: transform .18s;
}

html.pb-phone .pb-more__list .pb-more__anim[aria-pressed="true"] .pb-sw {
    background: var(--pbui-primary);
}

html.pb-phone .pb-more__list .pb-more__anim[aria-pressed="true"] .pb-sw::after {
    transform: translateX(16px);
}

::view-transition {
    pointer-events: none;
}

html.pb-vt {
    view-transition-name: none;
}

html.pb-vt #book-container {
    view-transition-name: pb-book;
}

html.pb-vt::view-transition-group(pb-book) {
    animation-duration: 220ms;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
    perspective: 1800px;
}

html.pb-vt::view-transition-image-pair(pb-book) {
    perspective: 1800px;
}

html.pb-vt::view-transition-old(pb-book),
html.pb-vt::view-transition-new(pb-book) {
    mix-blend-mode: normal;
    transform-origin: 50% 50%;
    animation-duration: 220ms;
    animation-fill-mode: both;
}

html.pb-vt::view-transition-old(pb-book) {
    animation-name: pb-vt-out;
    animation-timing-function: cubic-bezier(.3, .5, .4, 1);
}

html.pb-vt::view-transition-new(pb-book) {
    animation-name: pb-vt-in;
    animation-timing-function: cubic-bezier(.3, .5, .4, 1);
}

html.pb-vt.pb-vt-back::view-transition-old(pb-book) {
    animation-name: pb-vt-out-back;
}

html.pb-vt.pb-vt-back::view-transition-new(pb-book) {
    animation-name: pb-vt-in-back;
}

@keyframes pb-vt-out {
    from {
        transform: rotateY(0);
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    to {
        transform: rotateY(-68deg);
        opacity: 0;
    }
}

@keyframes pb-vt-in {
    from {
        transform: rotateY(12deg);
        opacity: 0;
    }

    40% {
        opacity: 0;
    }

    to {
        transform: rotateY(0);
        opacity: 1;
    }
}

@keyframes pb-vt-out-back {
    from {
        transform: rotateY(0);
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    to {
        transform: rotateY(68deg);
        opacity: 0;
    }
}

@keyframes pb-vt-in-back {
    from {
        transform: rotateY(-12deg);
        opacity: 0;
    }

    40% {
        opacity: 0;
    }

    to {
        transform: rotateY(0);
        opacity: 1;
    }
}

html body .flipbook-viewport {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    overflow: hidden;
    background: rgba(8, 14, 18, .97);
    background: color-mix(in srgb, var(--p55-btn-bg, #0d1b22) 97%, transparent);
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

html body .flipbook-viewport .container {
    width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
}

html body .flipbook-viewport .flipbook {
    left: calc(var(--pbv-w, 0px) / -2);
    top: calc(var(--pbv-h, 0px) / -2);
}

html body .flipbook-viewport .flipbook .own-size {
    width: calc(var(--pbv-pw, 0px) * .98);
    height: calc(var(--pbv-h, 0px) * .96);
}

html body .flipbook-viewport .close-flipbook {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    z-index: 5;
}

html body .flipbook-viewport .close-flipbook span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    font-size: 0;
    line-height: 0;
    transition: background-color .15s;
}

html body .flipbook-viewport .close-flipbook span::before {
    content: "\00d7";
    font-size: 30px;
    line-height: 1;
}

html body .flipbook-viewport .close-flipbook span:hover {
    background: rgba(255, 255, 255, .26);
    box-shadow: none;
    text-shadow: none;
}

html body .flipbook-viewport .arrow-navigation {
    top: 50%;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(13, 27, 34, .72);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .28);
    color: #fff;
    text-align: center;
    z-index: 5;
}

html body .flipbook-viewport .arrow-navigation.prev {
    left: max(12px, env(safe-area-inset-left));
    border-radius: 50%;
    text-align: center;
}

html body .flipbook-viewport .arrow-navigation.next {
    right: max(12px, env(safe-area-inset-right));
    left: auto;
    border-radius: 50%;
    text-align: center;
}

html body .flipbook-viewport .arrow-navigation span {
    display: block;
    font-size: 30px;
    line-height: 1;
}

@media (hover: hover) {
    html body .flipbook-viewport .arrow-navigation:hover {
        background: rgba(13, 27, 34, .9);
    }
}

@media (max-width: 600px) {
    html body .flipbook-viewport .arrow-navigation {
        top: auto;
        bottom: max(12px, env(safe-area-inset-bottom));
        margin-top: 0;
    }
}

html body .flipbook-viewport .pagination-holder {
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 50%;
    right: auto;
    width: auto;
    max-width: calc(100% - 140px);
    transform: translateX(-50%);
    z-index: 5;
}

html body .flipbook-viewport #light-pagination ul {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    list-style: none;
}

html body .flipbook-viewport #light-pagination li {
    display: none;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
}

html body .flipbook-viewport #light-pagination li:first-child,
html body .flipbook-viewport #light-pagination li:last-child,
html body .flipbook-viewport #light-pagination li.pb-near {
    display: block;
}

html body .flipbook-viewport #light-pagination li.separator {
    display: block;
    width: 14px;
}

html body .flipbook-viewport #light-pagination li.separator::before {
    content: "\2026";
    display: block;
    color: rgba(255, 255, 255, .5);
    font: 600 13px/32px var(--p55h-font, system-ui, sans-serif);
    text-align: center;
}

html body .flipbook-viewport #light-pagination a.page-link {
    display: block;
    width: auto;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    overflow: visible;
    white-space: nowrap;
    text-overflow: clip;
    border: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 255, 255, .86);
    font: 600 0/32px var(--p55h-font, system-ui, sans-serif);
    text-align: center;
    text-shadow: none;
    cursor: pointer;
}

html body .flipbook-viewport #light-pagination li:first-child a.page-link,
html body .flipbook-viewport #light-pagination li:last-child a.page-link {
    font-size: 12px;
}

html body .flipbook-viewport #light-pagination a.page-link strong {
    font-size: 13px;
    font-weight: 700;
}

html body .flipbook-viewport #light-pagination a.page-link.current {
    background: #fff;
    color: var(--p55-btn-bg, #0d1b22);
}

html body .loader:has(> .radial-progress[style*="display: grid"]) {
    background: rgba(8, 14, 18, .95);
    background: color-mix(in srgb, var(--p55-btn-bg, #0d1b22) 95%, transparent);
}

html body .loader:has(> .radial-progress[style*="display: grid"]) .radial-progress {
    --hue: var(--pbui-hue);
    --track-bg: rgba(255, 255, 255, .16);
    color: #fff;
}

html body .loader:has(> .radial-progress[style*="display: grid"]) .label {
    color: rgba(255, 255, 255, .72);
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-image-pair(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }

    #book-container,
    #book-container *,
    #book-container *::before,
    #book-container *::after {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }

    html body .flipbook-viewport .close-flipbook span,
    html.pb-phone .pb-more__list .pb-more__anim .pb-sw,
    html.pb-phone .pb-more__list .pb-more__anim .pb-sw::after {
        transition: none;
    }
}
