    /* ══════════════════════════════════════════════════════
   Mini pill — shared base
══════════════════════════════════════════════════════ */

    .mini-pill {
        position: fixed;
        bottom: 16px;
        z-index: 90;
        opacity: 0;
        pointer-events: none;
        /* Mobile default: full-width strip */
        left: 12px;
        right: 12px;
        transform: translateY(120px);
        transition:
            transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease;
        /* Prevent double-tap zoom on iOS Safari */
        touch-action: manipulation;
    }

    .mini-pill.visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mini-pill-inner {
        background: #ffffff;
        border: 1px solid #e8ecf0;
        box-shadow:
            0 4px 24px rgba(0, 0, 0, 0.08),
            0 1px 4px rgba(0, 0, 0, 0.04);
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        border-radius: 20px;
        padding: 14px 16px 7px 16px;
    }

    /* ── Progress bar — scrubbable ── */

    .mini-pill-progress {
        position: absolute;
        top: 10px;
        left: 16px;
        right: 40px;
        height: 16px; /* enlarged touch hit area */
        cursor: pointer;
        overflow: visible;
        z-index: 3;
    }

    /* Visual track */
    .mini-pill-progress::before {
        content: '';
        position: absolute;
        top: 6px;
        left: 0;
        right: 0;
        height: 4px;
        border-radius: 2px;
        background: #e8ecf0;
    }

    .mini-pill-progress-fill {
        position: absolute;
        top: 6px;
        left: 0;
        height: 4px;
        width: 0%;
        background: #2DD4A8;
        border-radius: 2px;
        pointer-events: none;
        transition: width 0.3s linear;
    }

    /* Thumb always visible on mobile */
    .mini-pill-progress-thumb {
        position: absolute;
        top: 6px;
        left: 0%;
        width: 16px;
        height: 16px;
        background: #1D9E75;
        border: 2.5px solid #ffffff;
        border-radius: 50%;
        transform: translate(-50%, -6px);
        opacity: 1;
        pointer-events: none;
        transition: transform 0.1s;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
    }

    .mini-pill-progress.dragging .mini-pill-progress-thumb {
        transform: translate(-50%, -6px) scale(1.2);
    }

    /* ══════════════════════════════════════════════════════
   Desktop info block (title + time) — hidden on mobile
══════════════════════════════════════════════════════ */

    .mini-pill-info {
        display: none;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }

    .mini-pill-title-d {
        font-size: 13px;
        font-weight: 500;
        color: #1a2332;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mini-pill-time {
        font-size: 11px;
        color: #94a3b8;
        font-variant-numeric: tabular-nums;
        margin-top: 1px;
    }

    /* ══════════════════════════════════════════════════════
   Mobile layout
══════════════════════════════════════════════════════ */

    /* ─ Mobile title row ─ */

    .mini-pill-title-row {
        text-align: center;
        padding-top: 5px;
        margin-bottom: 0px;
    }

    .mini-pill-time-m {
        font-size: 10px;
        color: #94a3b8;
        font-variant-numeric: tabular-nums;
        letter-spacing: 0.01em;
    }

    .mini-pill-title {
        font-size: 14px;
        font-weight: 500;
        color: #1a2332;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* ─ Controls row — spacer | center-group | follow-right ─ */

    .mini-pill-controls {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .mini-ctrl-spacer {
        flex: 1;
        display: flex;
        align-items: center;
    }

    /* ─ Share + download action buttons (mobile left side) ─ */

    .mini-action-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mini-action-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 10px;
        background: none;
        border: 1px solid #e8ecf0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #94a3b8;
        transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
        flex-shrink: 0;
        text-decoration: none;
        position: relative;
    }

    .mini-action-btn:hover {
        background: #f8fafb;
        color: #6b7c8d;
        border-color: #d1d9e0;
    }

    .mini-action-btn:active {
        transform: scale(0.82);
    }

    .mini-action-btn svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .mini-action-btn.copied {
        color: #1D9E75;
        border-color: #2DD4A8;
        background: #E1F5EE;
    }

    /* ─ Floating action label (Copied! / ↓) ─ */

    .mini-action-label {
        position: absolute;
        bottom: calc(100% + 5px);
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: #1D9E75;
        pointer-events: none;
        user-select: none;
        white-space: nowrap;
        animation: miniActionFloat 0.7s ease-out forwards;
        z-index: 5;
    }

    @keyframes miniActionFloat {
        0% {
            opacity: 1;
            transform: translateX(-50%) translateY(0px);
        }

        55% {
            opacity: 1;
        }

        100% {
            opacity: 0;
            transform: translateX(-50%) translateY(-14px);
        }
    }

    .mini-ctrl-group {
        display: flex;
        align-items: center;
        gap: 14px;
        flex-shrink: 0;
    }

    .mini-ctrl-right {
        flex: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    /* ─ Skip buttons ─ */

    .mini-ctrl {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        padding: 10px;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6b7c8d;
        transition: background 0.15s, transform 0.1s;
        flex-shrink: 0;
    }

    .mini-ctrl:active {
        transform: scale(0.82);
    }

    .mini-ctrl svg {
        width: 20px;
        height: 20px;
    }

    /* ─ Seek label (−10 / +10) that floats up on skip ─ */

    .mini-seek-label {
        position: absolute;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: #1D9E75;
        pointer-events: none;
        user-select: none;
        white-space: nowrap;
        animation: miniSeekFloat 0.65s ease-out forwards;
        z-index: 5;
    }

    @keyframes miniSeekFloat {
        0% {
            opacity: 1;
            transform: translate(-50%, 0px);
        }

        55% {
            opacity: 1;
        }

        100% {
            opacity: 0;
            transform: translate(-50%, -20px);
        }
    }

    /* ─ Play button ─ */

    .mini-play {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #1D9E75;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s;
        flex-shrink: 0;
    }

    .mini-play:hover {
        background: #0F6E56;
    }

    .mini-play svg {
        width: 18px;
        height: 18px;
        fill: #ffffff;
    }

    /* ─ Follow-along proxy button (overrides the fixed-positioned global style) ─ */

    .mini-follow-btn {
        /* Reset any inherited follow-along-btn fixed positioning */
        position: static !important;
        bottom: auto !important;
        right: auto !important;
        transform: none !important;
        /* Pill shape matching the app's Follow button look */
        height: 38px;
        border-radius: 19px;
        background: #2DD4A8;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 0 14px;
        font-size: 14px;
        font-weight: 500;
        color: #1a2332;
        white-space: nowrap;
        transition: background 0.2s;
        font-family: inherit;
        flex-shrink: 0;
    }

    .mini-follow-btn svg {
        flex-shrink: 0;
    }

    /* Reflects the real button's active state */
    .mini-follow-btn.active {
        background: #1D9E75;
        color: #ffffff;
    }

    .mini-follow-btn.active svg {
        stroke: #ffffff;
    }

    /* Hidden when follow-along is active or audio is paused */
    .mini-follow-btn.btn-hidden {
        visibility: hidden;
        pointer-events: none;
    }

    /* ─ Dismiss — absolute badge on mobile ─ */

    .mini-dismiss {
        position: absolute;
        top: -8px;
        right: -4px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: #ffffff;
        border: 1px solid #e8ecf0;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 2;
        transition: background 0.15s;
        flex-shrink: 0;
    }

    .mini-dismiss svg {
        width: 15px;
        height: 15px;
        stroke: #6b7c8d;
    }

    /* ─ Hide speed button on phones so skip+play+skip stays centered ─ */

    @media (max-width: 430px) {
        #minSpeed {
            display: none;
        }
    }

    /* ─ Very small screens ─ */

    @media (max-width: 320px) {
        .mini-play {
            width: 38px;
            height: 38px;
        }

        .mini-play svg {
            width: 15px;
            height: 15px;
        }

        .mini-ctrl {
            width: 32px;
            height: 32px;
            padding: 8px;
        }

        .mini-ctrl svg {
            width: 16px;
            height: 16px;
        }

        .mini-ctrl-group {
            gap: 10px;
        }

        .mini-pill-title {
            font-size: 11px;
        }

        .mini-follow-btn {
            height: 34px;
            padding: 0 10px;
            font-size: 12px;
        }

        .mini-dismiss {
            width: 26px;
            height: 26px;
        }

        .mini-dismiss svg {
            width: 13px;
            height: 13px;
        }
    }

    /* ══════════════════════════════════════════════════════
   Desktop & Tablet (≥ 641px) — horizontal pill
══════════════════════════════════════════════════════ */

    @media (min-width: 641px) {

        .mini-pill {
            left: 50%;
            right: auto;
            bottom: 24px;
            transform: translateX(-50%) translateY(120px);
        }

        .mini-pill.visible {
            transform: translateX(-50%) translateY(0);
        }

        .mini-pill-inner {
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: center;
            border-radius: 999px;
            padding: 6px 10px 6px 20px;
            gap: 14px;
            min-width: 320px;
            max-width: 500px;
        }

        .mini-pill-progress {
            top: -6px;
            left: 20px;
            right: 20px;
        }

        /* Show desktop info */
        .mini-pill-info {
            display: flex;
        }

        /* Hide mobile-only elements */
        .mini-pill-title-row {
            display: none;
        }

        .mini-ctrl-spacer {
            display: none;
        }

        .mini-ctrl-right {
            display: none;
        }

        /* Follow button hidden on desktop — real one is visible */

        /* Controls: compact inline */
        .mini-pill-controls {
            width: auto;
        }

        .mini-ctrl-group {
            gap: 4px;
        }

        .mini-ctrl:hover {
            background: #f8fafb;
        }

        /* Dismiss: inline at row end */
        .mini-dismiss {
            position: static;
            top: auto;
            right: auto;
            width: 28px;
            height: 28px;
            background: none;
            border: none;
            margin-left: 2px;
            color: #94a3b8;
        }

        .mini-dismiss:hover {
            background: #f8fafb;
            color: #6b7c8d;
        }

        .mini-dismiss svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
        }
    }
