.pb-up[hidden],
.pb-up [hidden],
.pb-updrop:not(.is-on) {
    display: none !important;
}

html.pb-up-open {
    overflow: hidden;
}

.pb-up {
    --pbui-ok-bg: #e8f5ee;
    --pbui-ok-ink: #16683e;
    --pbui-warn-bg: #fff3d6;
    --pbui-warn-ink: #93370d;
    --pbui-err-bg: #fdecea;
    --pbui-err-ink: #b42318;
    align-items: center;
}

.pb-upd {
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: min(780px, calc(100vh - 48px));
    max-height: min(780px, calc(100dvh - 48px));
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(.985);
    transition: opacity .18s ease, transform .22s cubic-bezier(.2, .7, .2, 1);
}

.pb-up.is-in .pb-upd {
    opacity: 1;
    transform: none;
}

.pb-upd__head {
    flex: none;
    padding: 26px 64px 0 28px;
}

.pb-upd__head h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.pb-upd__head p {
    margin: 0;
    color: var(--pbui-muted);
    font: 600 13.5px/1.4 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-upd__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 28px 20px;
    overflow: auto;
    overscroll-behavior: contain;
}

.pb-upd__foot {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px 18px;
    border-top: 1px solid var(--pbui-line);
    background: #fff;
}

.pb-upd .pb-btn {
    gap: 8px;
    white-space: nowrap;
}

.pb-upd .pb-btn:focus-visible,
.pb-upd button:focus-visible {
    outline: 2px solid var(--p55-accent, #e6007e);
    outline-offset: 2px;
}

.pb-upd__bg {
    margin-right: auto;
    color: var(--pbui-muted);
    font: 500 13px/1.4 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-upd__done {
    margin-left: auto;
}

.pb-upd__bg:not([hidden]) + .pb-upd__done {
    margin-left: 0;
}

.pb-upz {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 34px 24px 26px;
    border: 2px dashed #cfd8dc;
    border-radius: 20px;
    background: var(--pbui-soft);
    text-align: center;
    transition: border-color .15s, background-color .15s;
}

.pb-upz.is-over {
    border-color: var(--p55-accent, #e6007e);
    background: rgba(230, 0, 126, .08);
}

.pb-upz__ic {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    color: var(--pbui-primary);
    font-size: 28px;
    box-shadow: 0 6px 18px -8px rgba(13, 27, 34, .35);
}

.pb-upz__t {
    color: var(--pbui-ink);
    font: 800 19px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-upz__btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.pb-upz__btns .pb-btn {
    height: 48px;
    padding: 0 22px;
    font-size: 15px;
}

.pb-upz__f {
    color: var(--pbui-muted);
    font: 500 12px/1.4 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-up.has-items .pb-upz {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 14px;
    padding: 12px 16px;
    border-radius: 16px;
}

.pb-up.has-items .pb-upz__ic {
    width: 40px;
    height: 40px;
    font-size: 18px;
    box-shadow: none;
}

.pb-up.has-items .pb-upz__t {
    flex: 1 1 auto;
    text-align: left;
    font-size: 15px;
}

.pb-up.has-items .pb-upz__btns .pb-btn {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.pb-up.has-items .pb-upz__f {
    flex: 1 1 100%;
    text-align: left;
}

.pb-upl {
    display: none;
    margin-top: 16px;
}

.pb-up.has-items .pb-upl {
    display: block;
}

.pb-upl__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    min-height: 34px;
}

.pb-upl__row b {
    color: var(--pbui-ink);
    font: 800 16px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

#pb-up-x {
    color: var(--pbui-muted);
    font: 600 13px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

#pb-up-x.is-err {
    color: var(--pbui-err-ink);
}

.pb-upl__retry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    margin-left: auto;
    padding: 0 14px;
    border: 1.5px solid var(--pbui-line);
    border-radius: 999px;
    background: #fff;
    color: var(--pbui-ink);
    font: 700 13px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    cursor: pointer;
}

.pb-upl__retry:hover {
    border-color: var(--pbui-primary);
}

.pb-upl__bar {
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    background: #e8ecee;
    overflow: hidden;
}

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

.pb-upl__note {
    margin: 10px 0 0;
    color: var(--pbui-muted);
    font: 500 12.5px/1.4 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-upsk {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--pbui-warn-bg);
    color: var(--pbui-warn-ink);
    font: 600 12.5px/1.45 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-upsk ul {
    max-height: 96px;
    margin: 6px 0 0;
    padding: 0 0 0 16px;
    overflow: auto;
    font-weight: 500;
}

.pb-upl__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.pb-upc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
    padding: 6px;
    border-radius: 14px;
    background: var(--pbui-soft);
}

.pb-upc__m {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #e4e9eb;
}

.pb-upc__m img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pb-upc__m.has-img img {
    display: block;
}

.pb-upc__m.has-img .pb-upc__ph {
    display: none;
}

.pb-upc__ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #7b8b93;
    font-size: 24px;
}

.pb-upc__ph b {
    font: 800 11px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    letter-spacing: .06em;
}

.pb-upc.is-wait .pb-upc__m img {
    opacity: .55;
}

.pb-upc__n {
    overflow: hidden;
    color: var(--pbui-ink);
    font: 700 12px/1.25 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-upc__s {
    display: -webkit-box;
    min-height: 2.5em;
    overflow: hidden;
    color: var(--pbui-muted);
    font: 600 11.5px/1.25 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pb-upc__bar {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: #dde3e5;
    overflow: hidden;
}

.pb-upc__bar i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--pbui-primary);
    transition: width .15s;
}

.pb-upc__a {
    display: flex;
    gap: 4px;
}

.pb-upc__a:empty {
    display: none;
}

.pb-upc__b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1.5px solid var(--pbui-line);
    border-radius: 999px;
    background: #fff;
    color: var(--pbui-ink);
    font: 700 11.5px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    cursor: pointer;
}

.pb-upc__b:hover {
    border-color: var(--pbui-primary);
}

.pb-upc__b--remove {
    width: 28px;
    padding: 0;
    color: var(--pbui-err-ink);
}

.pb-upc.is-done .pb-upc__s {
    color: var(--pbui-ok-ink);
}

.pb-upc.is-done .pb-upc__bar i {
    background: var(--pbui-ok-ink);
}

.pb-upc.is-skip,
.pb-upc.is-dup {
    background: var(--pbui-warn-bg);
}

.pb-upc.is-skip .pb-upc__s,
.pb-upc.is-dup .pb-upc__s {
    color: var(--pbui-warn-ink);
}

.pb-upc.is-skip .pb-upc__bar i,
.pb-upc.is-dup .pb-upc__bar i {
    background: #d9a21b;
}

.pb-upc.is-err {
    background: var(--pbui-err-bg);
}

.pb-upc.is-err .pb-upc__s {
    color: var(--pbui-err-ink);
}

.pb-upc__low,
#sidebar .pb-pg__grid .item.photo .pb-low {
    position: absolute;
    left: 5px;
    bottom: 5px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pbui-warn-bg, #fff3d6);
    color: var(--pbui-warn-ink, #93370d);
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 0 0 1.5px #fff;
}

#sidebar .pb-pg__grid .item.photo .pb-low {
    left: 4px;
    bottom: 4px;
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.pb-upo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    min-width: 0;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(230, 0, 126, .08);
}

.pb-upo__t {
    display: flex;
    flex: 1 1 240px;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pb-upo__t b {
    color: var(--pbui-ink);
    font: 800 14px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-upo__t span {
    color: var(--pbui-muted);
    font: 500 12.5px/1.35 var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-upo__b {
    flex: none;
    background: var(--p55-accent, #e6007e);
    border-color: var(--p55-accent, #e6007e);
}

.pb-updrop {
    position: fixed;
    inset: 0;
    z-index: 1999990;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, .72);
    pointer-events: none;
    font-family: var(--p55h-font, 'Manrope', system-ui, sans-serif);
}

.pb-updrop::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 3px dashed var(--p55-accent, #e6007e);
    border-radius: 26px;
}

.pb-updrop__b {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 38px 52px;
    border-radius: 26px;
    background: #fff;
    color: var(--p55-btn-bg, #0d1b22);
    font: 800 20px/1.3 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    text-align: center;
    box-shadow: 0 30px 70px -24px rgba(13, 27, 34, .5);
}

.pb-updrop__b .fas {
    color: var(--p55-accent, #e6007e);
    font-size: 44px;
}

.pb-upchip {
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .24);
    font: 800 11.5px/1.2 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    letter-spacing: 0;
}

[data-pb="upload"].is-upbusy {
    position: relative;
    overflow: hidden;
}

[data-pb="upload"].is-upbusy::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: var(--pb-up, 0%);
    height: 4px;
    background: rgba(255, 255, 255, .75);
    transition: width .25s;
}

#pb-tabbar [data-pbtab="0"].is-upbusy {
    position: relative;
}

#pb-tabbar [data-pbtab="0"] .pb-upchip {
    position: absolute;
    top: 4px;
    left: calc(50% + 6px);
    margin: 0;
    padding: 2px 6px;
    background: var(--p55-accent, #e6007e);
    color: #fff;
    font-size: 10px;
}

.pb-qt em {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    color: #5b6b73;
    font: 800 10px/1 var(--p55h-font, 'Manrope', system-ui, sans-serif);
    font-style: normal;
    text-align: center;
}

html.pb-phone .pb-up {
    align-items: end;
    padding: 0;
}

html.pb-phone .pb-upd {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    transform: translateY(32px);
    box-shadow: 0 -20px 50px -20px rgba(13, 27, 34, .5);
}

html.pb-phone .pb-up.is-in .pb-upd {
    transform: none;
}

html.pb-phone .pb-upd::before {
    content: "";
    flex: none;
    width: 40px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 999px;
    background: #d3dadd;
}

html.pb-phone .pb-upd__head {
    padding: 10px 56px 0 16px;
}

html.pb-phone .pb-upd__head h2 {
    font-size: 20px;
}

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

html.pb-phone .pb-upd__foot {
    flex-wrap: wrap;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
}

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

html.pb-phone .pb-upz {
    padding: 22px 16px 18px;
}

html.pb-phone .pb-upz__ic {
    width: 52px;
    height: 52px;
    font-size: 24px;
}

html.pb-phone .pb-upz__t {
    font-size: 17px;
}

html.pb-phone .pb-upz__btns {
    flex-direction: column;
    width: 100%;
}

html.pb-phone .pb-upz__btns .pb-btn {
    width: 100%;
}

html.pb-phone .pb-up.has-items .pb-upz {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
}

html.pb-phone .pb-up.has-items .pb-upz__ic,
html.pb-phone .pb-up.has-items .pb-upz__t,
html.pb-phone .pb-up.has-items .pb-upz__f {
    display: none;
}

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

html.pb-phone .pb-upl__retry {
    margin-left: 0;
}

html.pb-phone .pb-upo {
    flex-wrap: wrap;
}

html.pb-phone .pb-upo__b {
    width: 100%;
}

html.pb-phone .pb-toast--act {
    width: calc(100vw - 32px);
}

@media (prefers-reduced-motion: reduce) {
    .pb-upd,
    .pb-upl__bar i,
    .pb-upc__bar i {
        transition: none;
    }
}
