html.pb-phone .pb-tabbar {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    padding-left: calc(2px + env(safe-area-inset-left, 0px));
    padding-right: calc(2px + env(safe-area-inset-right, 0px));
}

html.pb-phone .pb-tabbar button {
    height: 54px;
    min-width: 0;
    padding: 0;
    gap: 3px;
    font-size: clamp(8.5px, 2.65vw, 10.5px);
    letter-spacing: -.01em;
}

html.pb-phone .pb-tabbar button .pb-ic {
    flex: none;
    font-size: 18px;
}

html.pb-phone .pb-tabbar button > span:not(.pb-upchip) {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.pb-phone #pb-tabbar [data-pbtab="0"] .pb-upchip {
    top: 0;
    left: 50%;
    box-sizing: border-box;
    max-width: calc(100% - 2px);
    padding: 0 4px;
    overflow: hidden;
    transform: translateX(-50%);
    font-size: 9px;
    line-height: 11px;
    white-space: nowrap;
}

html.pb-view.pb-phone #pb-tabbar button[data-more="view"] {
    display: flex !important;
}

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

@media (min-width: 600px) and (min-height: 501px) {
    html.pb-phone {
        --pb-tab-h: 67px;
    }

    html.pb-phone .pb-tabbar button {
        height: 58px;
        gap: 4px;
        font-size: 11.5px;
        letter-spacing: normal;
    }

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

@media (orientation: landscape) and (max-height: 500px) {
    html.pb-phone .pb-tabbar button {
        height: 44px;
        gap: 4px;
        padding: 0 2px;
        font-size: clamp(9px, 1.55vw, 12px);
    }
}

@media (max-width: 319.98px) {
    html.pb-phone .pb-tabbar button > span:not(.pb-upchip) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
}

html.pb-phone #sidebar .pb-tpl {
    --pb-tpl-r: 2;
    --pb-tpl-rp: 1;
}

html.pb-phone #sidebar .pb-tpl__g {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 8px;
}

html.pb-phone #sidebar .pb-tpl__g--wide {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

html.pb-phone #sidebar .pb-tpl__g .layout-item {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: var(--pb-tpl-rp);
    margin: 0;
    border: 1.5px solid var(--pbui-line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

html.pb-phone #sidebar .pb-tpl__g--wide .layout-item {
    aspect-ratio: var(--pb-tpl-r);
}

html.pb-phone #sidebar .pb-tpl__g .layout-item:active {
    border-color: var(--pbui-primary);
}

html.pb-phone #sidebar .pb-tpl__g .layout-item .holder {
    display: block;
    background: #b1efce;
    outline: 1px solid #fff;
}

html.pb-coarse .uk-tooltip,
html.pb-phone .uk-tooltip {
    display: none !important;
}
