/* DPH Ting —— 听书频道 */

.dph-ting {
    max-width: 820px;
    margin: 0 auto;
    padding: 4px 0 96px;
}

/* ---------- 介绍 ---------- */
.dph-ting-intro {
    padding: 0 2px 18px;
}

.dph-ting-lead {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.7;
    color: #3a4048;
}

.dph-ting-sub {
    margin: 0;
    font-size: 12px;
    color: #9aa0a9;
    letter-spacing: .1px;
}

/* ---------- 分组 ---------- */
.dph-ting-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 2px 16px;
}

.dph-ting-chip {
    padding: 6px 14px;
    font-size: 13px;
    line-height: 1.2;
    color: #6b7280;
    background: #f2f4f7;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background .14s ease, color .14s ease;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-chip:hover {
    background: #e8ebf0;
    color: #2b2f36;
}

.dph-ting-chip.on {
    background: #2b2f36;
    color: #fff;
}

/* ---------- 列表 ---------- */
.dph-ting-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #eceff3;
}

.dph-ting-item {
    display: grid;
    grid-template-columns: 34px 1fr auto 22px;
    align-items: center;
    gap: 10px;
    padding: 13px 8px 13px 6px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    position: relative;
    transition: background .14s ease;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-item:hover {
    background: #fafbfc;
}

.dph-ting-item:hover .dph-ting-t {
    color: #000;
}

.dph-ting-item.on {
    background: #f7f8fa;
}

.dph-ting-item.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #2b2f36;
    border-radius: 2px;
}

.dph-ting-n {
    font-size: 12px;
    color: #b3b8c1;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dph-ting-item.resume .dph-ting-n {
    color: #2b2f36;
    font-weight: 600;
}

.dph-ting-t {
    font-size: 15px;
    line-height: 1.45;
    color: #1f2328;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color .14s ease;
}

.dph-ting-m {
    font-size: 12px;
    color: #9aa0a9;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dph-ting-ic {
    font-size: 10px;
    color: #c9ced6;
    text-align: center;
}

.dph-ting-item:hover .dph-ting-ic,
.dph-ting-item.on .dph-ting-ic {
    color: #2b2f36;
}

.dph-ting-empty {
    padding: 48px 0;
    text-align: center;
    color: #9aa0a9;
    font-size: 14px;
}

/* ---------- 播放条 ---------- */
.dph-ting-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    width: min(760px, calc(100% - 32px));
    transform: translate(-50%, 14px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(17, 24, 39, .10);
    z-index: 9990;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    font-family: inherit;
}

.dph-ting-bar.on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dph-ting-ctl {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #8a8f99;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-ctl:hover {
    background: #f2f4f7;
    color: #2b2f36;
}

.dph-ting-play {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: #f2f4f7;
    color: #2b2f36;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-play:hover {
    background: #e8ebf0;
}

.dph-ting-body {
    flex: 1 1 auto;
    min-width: 0;
}

.dph-ting-track {
    height: 3px;
    background: #eceff3;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    margin-bottom: 7px;
}

.dph-ting-track::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    bottom: -8px;
}

.dph-ting-fill {
    display: block;
    height: 100%;
    width: 0;
    background: #2b2f36;
    border-radius: 2px;
    transition: width .2s linear;
}

.dph-ting-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 12px;
    color: #8a8f99;
    line-height: 1.3;
}

.dph-ting-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #4b5159;
}

.dph-ting-pos {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dph-ting-rate,
.dph-ting-close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #8a8f99;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 4px;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-rate:hover,
.dph-ting-close:hover {
    color: #2b2f36;
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    .dph-ting {
        padding-bottom: 92px;
    }

    .dph-ting-item {
        grid-template-columns: 24px 1fr 50px;
        gap: 8px;
        padding: 11px 4px 11px 2px;
    }

    .dph-ting-ic {
        display: none;
    }

    .dph-ting-t {
        display: block;
        font-size: 15px;
        line-height: 1.45;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: none;
    }

    .dph-ting-m {
        font-size: 11.5px;
    }

    .dph-ting-bar {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: auto;
        transform: translate(0, 14px);
        gap: 6px;
        padding: 9px 10px;
    }

    .dph-ting-bar.on {
        transform: translate(0, 0);
    }

    .dph-ting-meta {
        font-size: 11px;
        gap: 8px;
    }

    .dph-ting-ctl {
        width: 24px;
    }

    .dph-ting-play {
        width: 32px;
        height: 32px;
    }
}

/* ---------- 书架入口 ---------- */
.dph-ting-shelf-link {
    color: #6b7280;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: #d3d7de;
}

.dph-ting-shelf-link:hover {
    color: #2b2f36;
}

/* ---------- 续听条 ---------- */
.dph-ting-resume {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 2px 16px;
    padding: 10px 12px;
    background: #f7f8fa;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5159;
}

.dph-ting-resume[hidden] {
    display: none;
}

.dph-ting-resume-t {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dph-ting-resume-btn {
    flex: 0 0 auto;
    padding: 4px 10px;
    font-size: 12px;
    color: #2b2f36;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.dph-ting-resume-btn:hover {
    background: #eceff3;
}

/* ---------- 定时按钮 ---------- */
.dph-ting-sleep {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #8a8f99;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 5px;
    font-family: inherit;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-sleep:hover,
.dph-ting-sleep.on {
    color: #2b2f36;
}

.dph-ting-sleep.on {
    background: #eef1f5;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .dph-ting-resume {
        font-size: 12.5px;
        padding: 9px 10px;
    }

    .dph-ting-sleep {
        padding: 6px 1px;
        font-size: 11px;
        letter-spacing: -.2px;
    }

    .dph-ting-rate,
    .dph-ting-close {
        padding: 6px 2px;
        font-size: 11px;
    }

    .dph-ting-name {
        min-width: 0;
    }

    .dph-ting-pos {
        font-size: 11px;
    }
}

/* ---------- 最近更新 ---------- */
.dph-ting-new {
    margin: 0 2px 20px;
    padding: 12px 12px 8px;
    border: 1px solid #eceff3;
    border-radius: 6px;
    background: #fcfcfd;
}

.dph-ting-new[hidden] {
    display: none;
}

.dph-ting-new-h {
    font-size: 12px;
    color: #8a8f99;
    letter-spacing: .3px;
    margin-bottom: 4px;
    padding-left: 2px;
}

.dph-ting-new-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 2px;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-new-row:hover {
    background: #f4f6f8;
}

.dph-ting-new-cat {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.4;
    color: #6b7280;
    background: #eef1f5;
    padding: 2px 7px;
    border-radius: 3px;
}

.dph-ting-new-t {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    color: #1f2328;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dph-ting-new-m {
    flex: 0 0 auto;
    font-size: 12px;
    color: #9aa0a9;
    font-variant-numeric: tabular-nums;
}

/* 列表里的新标记 */
.dph-ting-item.is-new .dph-ting-n {
    position: relative;
    color: #2b2f36;
}

.dph-ting-item.is-new .dph-ting-n::after {
    content: "";
    position: absolute;
    right: -7px;
    top: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c0392b;
}

@media (max-width: 640px) {
    .dph-ting-new {
        padding: 10px 10px 6px;
        margin-bottom: 16px;
    }

    .dph-ting-new-t {
        font-size: 13.5px;
    }
}

/* ---------- 专辑 ---------- */
.dph-ting-albums {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 2px 20px;
}

.dph-ting-albums[hidden] {
    display: none;
}

.dph-ting-album {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 14px 12px;
    background: #f7f8fa;
    border: 0;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background .14s ease;
    -webkit-tap-highlight-color: transparent;
}

.dph-ting-album:hover {
    background: #eef1f5;
}

.dph-ting-album-t {
    font-size: 15px;
    font-weight: 600;
    color: #1f2328;
    line-height: 1.4;
}

.dph-ting-album-d {
    font-size: 12px;
    line-height: 1.55;
    color: #7b8188;
}

.dph-ting-album-n {
    margin-top: 2px;
    font-size: 11px;
    color: #a2a8b0;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .dph-ting-albums {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dph-ting-album {
        padding: 12px 12px 10px;
    }

    .dph-ting-album-t {
        font-size: 14px;
    }

    .dph-ting-album-d {
        font-size: 11.5px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
