/* DPH TTS 听读 —— 克制风，与站点浅灰体系一致 */

.dph-tts-entry {
    margin: 10px 0 14px;
    display: flex;
    align-items: center;
}

.dph-tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px 7px 12px;
    font-size: 13px;
    line-height: 1.2;
    color: #2b2f36;
    background: #f2f4f7;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background .16s ease, color .16s ease;
    -webkit-tap-highlight-color: transparent;
}

.dph-tts-btn:hover {
    background: #e8ebf0;
}

.dph-tts-btn:active {
    background: #dfe3ea;
}

.dph-tts-btn .dph-tts-ic {
    font-size: 10px;
    color: #6b7280;
    transform: translateY(-.5px);
}

/* ---------- 播放条 ---------- */
.dph-tts-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    width: min(680px, calc(100% - 32px));
    transform: translate(-50%, 14px);
    display: flex;
    align-items: center;
    gap: 12px;
    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-tts-bar.on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dph-tts-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-tts-play:hover,
.dph-tts-play.on {
    background: #e8ebf0;
}

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

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

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

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

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

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

.dph-tts-pos {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
}

.dph-tts-rate,
.dph-tts-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-tts-rate:hover,
.dph-tts-close:hover {
    color: #2b2f36;
}

@media (max-width: 560px) {
    .dph-tts-bar {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: auto;
        transform: translate(0, 14px);
        gap: 9px;
        padding: 9px 11px;
    }

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

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

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