:root {
    --pf-tab-h: var(--tb-h, 3.25rem);
}

html,
body {
    background: var(--bg, #ffffff);
    color: var(--text, #ffffff);
}

#app {
    width: 100vw;
    min-height: 100vh;
    background: var(--bg, #ffffff);
}

.pf-root {
    min-height: 100vh;
    padding-bottom: calc(var(--pf-tab-h) + 0.8rem);
    background: var(--bg, #ffffff);
}

.pf-head {
    padding: 1rem 1rem 0;
}

.pf-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: 1rem;
}

.pf-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line, #cbded199);
}

.pf-name {
    color: var(--text, #ffffff);
    font-size: 1.5rem;
    font-weight: 800;
}

.pf-list {
    padding: 0 1rem 1rem;
}

.pf-block {
    border-top: 1px solid var(--line, #cbded199);
}

.pf-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .875rem;
    padding: .9375rem 0;
    margin: 0;
    border-bottom: 1px solid var(--line, #cbded199);
}

.pf-item-left {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.pf-item-ic {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
    flex-shrink: 0;
    opacity: .85;
}

.pf-item-title {
    color: var(--text, #ffffff);
    font-size: 1rem;
    font-weight: 500;
}

.pf-item-arr {
    width: 1.0513rem;
    height: 1.0513rem;
    object-fit: contain;
    opacity: .55;
}

.pf-preview {}

.pf-recent h2 {
    margin: 18px 0 10px;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text, #ffffff);
}

.pf-preview-item {
    display: flex;
    gap: .8125rem;
    padding: .5rem 0;
}

.pf-preview-cover {
    width: 3.5rem;
    height: 5rem;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--raised, #e8f3ec);
}

.pf-preview-meta {
    flex: 1;
    min-width: 0;
    padding-top: .5rem;
}

.pf-preview-title {
    color: var(--text, #ffffff);
    font-size: .875rem;
    font-weight: 600;
}

.pf-preview-sub {
    margin-top: .4375rem;
    color: var(--muted, #52635a);
    font-size: .6875rem;
}

.pf-preview-ep {
    margin-top: .4375rem;
    color: var(--accent, #16845b);
    font-size: .6875rem;
}


.pf-version {
    padding: 0.8rem 0 0.5rem;
    color: var(--muted, #52635a);
    font-size: 0.72rem;
    text-align: center;
}

.pf-copy {
    padding: 0 0 .1875rem;
    color: var(--muted, #52635a);
    font-size: 0.72rem;
    text-align: center;
}

@media (max-width: 899px) {
    .pf-list {
        padding-top: 1.5rem;
    }
}

@media (min-width: 900px) {
    #app, .pf-root {
        width: 100%;
        min-height: 100vh;
    }

    .pf-root {
        padding: 32px max(32px, calc((100vw - 1320px)/2)) 80px;
        background: var(--bg, #ffffff);
    }

    .pf-head {
        padding: 0 0 26px;
    }

    .pf-avatar {
        width: 64px;
        height: 64px;
    }

    .pf-name {
        font-size: 30px;
    }

    .pf-list {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
    }

    .pf-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        margin-bottom: 40px;
    }

    .pf-block {
        border-top: 1px solid var(--line, #cbded199);
    }

    .pf-nav .pf-item {
        min-height: 104px;
        margin: 0;
        padding: 0 24px;
        background: #e8f3ec;
        border: 1px solid var(--line);
        border-radius: 12px;
        cursor: pointer;
    }

    .pf-nav .pf-item:hover {
        background: var(--raised);
        border-color: rgba(22, 132, 91, .4);
    }

    .pf-item:hover {
        background: var(--raised, #e8f3ec);
        border-color: rgba(34,211,238,.4);
    }

    .pf-item:hover .pf-item-title {
        color: var(--accent, #16845b);
    }

    .pf-item-ic {
        width: 22px;
        height: 22px;
    }

    .pf-item-left {
        gap: 14px;
    }

    .pf-item-title {
        font-size: 16px;
    }

    .pf-item-arr {
        width: 18px;
        height: 18px;
    }

    .pf-preview {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
        padding: 0;
    }

    .pf-preview-item {
        min-width: 0;
        margin: 0;
        padding: 14px;
        cursor: pointer;
        border: 1px solid var(--line, #cbded199);
        border-radius: 10px;
        background: #e8f3ec;
        display: flex;
        gap: 14px;
    }

    .pf-preview-item:hover {
        border-color: #ffffff33;
        background: #191922;
    }

    .pf-preview-cover {
        width: 72px;
        height: 100px;
        flex: none;
    }

    .pf-preview-meta {
        min-width: 0;
        padding-top: 4px;
    }

    .pf-preview-title {
        font-size: 15px;
    }

    .pf-preview-sub, .pf-preview-ep {
        font-size: 12px;
    }

    .pf-recent h2 {
        margin: 0 0 18px;
        font-size: 22px;
    }

    .pf-version, .pf-copy {
        text-align: left;
        font-size: 12px;
    }

    .pf-version {
        padding-top: 32px;
    }
}

.tb-tabbar {
    background: var(--bar-bg, #f7f9f7f2);
    border-top: 1px solid var(--line, #cbded199);
}

@supports (min-height: 100dvh) {
    .pf-root {
        min-height: 100dvh;
    }
}

/* PWA 添加到主屏幕引导 */
.pf-pwa-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, .66);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
}

.pf-pwa-card {
    width: 100%;
    max-width: 20rem;
    background: var(--surface, #f7f9f7);
    border: 1px solid var(--line, #cbded199);
    border-radius: 12px;
    padding: 1.5rem 1.25rem 1.125rem;
    text-align: center;
    box-shadow: 0 24px 60px #0008;
}

.pf-pwa-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.pf-pwa-title {
    margin-top: .875rem;
    color: var(--text, #ffffff);
    font-size: 1.125rem;
    font-weight: 700;

}

.pf-pwa-desc {
    margin: .625rem auto 0;
    max-width: 15rem;
    color: var(--muted, #52635a);
    font-size: .8125rem;
    line-height: 1.5;
}

.pf-pwa-btn {
    margin-top: 1.25rem;
    height: 2.75rem;
    border-radius: 6px;
    background: var(--accent, #16845b);
    color: var(--ink, #241112);
    font-size: .9375rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pf-pwa-later {
    margin-top: .875rem;
    color: var(--muted, #52635a);
    font-size: .8125rem;
    cursor: pointer;
}