/* List-first taskbar player for 廿一史弹词. */
#tanci-btn {
    min-width: 68px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font: 12px/1 inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
#tanci-btn:hover,
#tanci-btn.active {
    background: rgba(224, 196, 140, 0.2);
    border-color: rgba(224, 196, 140, 0.62);
    color: #f2deb4;
}
.tanci-task-icon {
    width: 15px;
    height: 15px;
    fill: currentColor;
}
#tanci-btn.is-playing .tanci-task-icon {
    filter: drop-shadow(0 0 5px rgba(247, 206, 116, 0.8));
    animation: tanciTaskPulse 1.7s ease-in-out infinite;
}
@keyframes tanciTaskPulse {
    50% { opacity: 0.58; transform: scale(0.88); }
}

.tanci-player {
    position: fixed;
    right: 12px;
    bottom: 52px;
    z-index: 30000;
    width: min(410px, calc(100vw - 24px));
    height: min(650px, calc(100vh - 68px));
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: hidden;
    border: 1px solid rgba(221, 191, 126, 0.43);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(69, 42, 27, 0.985), rgba(25, 17, 14, 0.99));
    color: #f3e8d3;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 239, 202, 0.13);
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
}
.tanci-player[hidden] { display: none; }
.tanci-head {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(225, 198, 145, 0.2);
}
.tanci-kicker {
    margin: 0 0 2px;
    color: #cbb282;
    font-size: 10px;
    letter-spacing: 0.24em;
}
.tanci-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.1em;
}
.tanci-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #d7c4a1;
    font: 23px/1 sans-serif;
    cursor: pointer;
}
.tanci-close:hover,
.tanci-close:focus-visible { background: rgba(255, 255, 255, 0.1); }

.tanci-now {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    padding: 11px 3px 9px;
}
.tanci-now-indicator {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border: 2px solid #d4b66f;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(212, 182, 111, 0.1);
}
.tanci-playing .tanci-now-indicator {
    border-color: #f0c86b;
    background: #f0c86b;
    box-shadow: 0 0 0 4px rgba(240, 200, 107, 0.15), 0 0 12px rgba(240, 200, 107, 0.45);
}
.tanci-titles {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tanci-titles strong {
    overflow: hidden;
    color: #fff5e4;
    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tanci-titles span {
    overflow: hidden;
    color: #bca783;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tanci-list-head {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    padding: 0 3px 6px;
    color: #bda981;
    font: 11px/1.3 sans-serif;
}
.tanci-list {
    min-height: 180px;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(225, 198, 145, 0.17);
    border-radius: 9px;
    background: rgba(9, 7, 6, 0.3);
    scrollbar-color: rgba(199, 168, 108, 0.55) transparent;
    scrollbar-width: thin;
}
.tanci-track-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 47px;
    border-bottom: 1px solid rgba(225, 198, 145, 0.09);
}
.tanci-track-row:last-child { border-bottom: 0; }
.tanci-track-row:hover { background: rgba(255, 255, 255, 0.055); }
.tanci-track-row.active { background: rgba(197, 154, 74, 0.17); }
.tanci-track {
    min-width: 0;
    min-height: 50px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.tanci-track:hover { background: rgba(255, 255, 255, 0.025); }
.tanci-track:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #d7b873;
    outline-offset: -2px;
}
.tanci-track.active { background: transparent; }
.tanci-track-number {
    color: #876f4d;
    font: 10px/1 sans-serif;
    text-align: center;
}
.tanci-track.active .tanci-track-number { color: #e2c98f; }
.tanci-track-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tanci-track-copy strong,
.tanci-track-copy span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tanci-track-copy strong {
    color: #eadcc2;
    font-size: 13px;
    font-weight: 600;
}
.tanci-track-copy span {
    color: #9f8e70;
    font: 10px/1.25 sans-serif;
}
.tanci-track-marker {
    color: transparent;
    font: 10px/1 sans-serif;
    text-align: center;
}
.tanci-track.active .tanci-track-marker { color: #d8ba75; }
.tanci-track.is-playing .tanci-track-marker { animation: tanciMarkerPulse 1.25s ease-in-out infinite; }
@keyframes tanciMarkerPulse { 50% { opacity: 0.35; } }
.tanci-download {
    display: grid;
    place-items: center;
    border-left: 1px solid rgba(225, 198, 145, 0.09);
    color: #a99572;
    font: 10px/1 sans-serif;
    text-decoration: none;
}
.tanci-download:hover {
    background: rgba(215, 184, 115, 0.12);
    color: #f0d9a7;
}
.tanci-download:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid #d7b873;
    outline-offset: -2px;
}

.tanci-mode-row {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 9px;
}
.tanci-mode {
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid rgba(225, 198, 145, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    color: #aa9878;
    font: 11px/1.2 sans-serif;
    cursor: pointer;
}
.tanci-mode:hover { background: rgba(255, 255, 255, 0.08); }
.tanci-mode.active {
    border-color: rgba(215, 184, 115, 0.65);
    background: rgba(197, 154, 74, 0.2);
    color: #f0d9a7;
}
.tanci-mode:focus-visible { outline: 2px solid #d7b873; outline-offset: 1px; }

.tanci-transport {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 9px 0 6px;
}
.tanci-transport button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: #decaa4;
    cursor: pointer;
}
.tanci-transport button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.15); }
.tanci-transport button:disabled { opacity: 0.35; cursor: default; }
.tanci-transport svg { width: 17px; height: 17px; fill: currentColor; }
.tanci-transport .tanci-play {
    width: 42px;
    height: 42px;
    border: 1px solid #d7b873;
    background: #b18a40;
    color: #20150f;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.34);
}
.tanci-icon-pause { display: none; }
.tanci-playing .tanci-icon-play { display: none; }
.tanci-playing .tanci-icon-pause { display: block; }
.tanci-progress-row,
.tanci-volume-row {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: #b9a783;
    font: 10px/1 sans-serif;
}
.tanci-progress-row input,
.tanci-volume-row input {
    min-width: 0;
    flex: 1;
    accent-color: #c39b50;
}
.tanci-volume-row { margin-top: 6px; }
.tanci-volume-row svg { width: 16px; height: 16px; fill: currentColor; }
.tanci-volume-row input { max-width: none; }
.tanci-range-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.tanci-lyrics {
    flex: 0 0 auto;
    margin-top: 8px;
    border: 1px solid rgba(225, 198, 145, 0.14);
    border-radius: 7px;
    background: rgba(12, 9, 8, 0.31);
}
.tanci-lyrics summary {
    padding: 7px 10px;
    color: #cdb98e;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}
.tanci-lyrics p {
    max-height: 120px;
    margin: 0;
    padding: 0 10px 9px;
    overflow-y: auto;
    color: #e5d7bc;
    font-size: 12px;
    line-height: 1.75;
    white-space: pre-line;
}
.tanci-status {
    min-height: 14px;
    flex: 0 0 auto;
    margin: 5px 1px -3px;
    color: #c7b48c;
    font: 11px/1.3 sans-serif;
}
.tanci-status:empty { min-height: 0; margin-top: 0; }
.tanci-status.is-error { color: #f0a697; }
#tanci-audio { display: none; }

@media (max-width: 700px) {
    #tanci-btn {
        min-width: 34px;
        width: 34px;
        padding: 4px;
    }
    .tanci-task-label { display: none; }
    .tanci-player {
        right: 8px;
        bottom: 50px;
        width: calc(100vw - 16px);
        height: min(620px, calc(100vh - 62px));
        padding: 13px;
    }
    .tanci-list { min-height: 135px; }
}

@media (prefers-reduced-motion: reduce) {
    #tanci-btn.is-playing .tanci-task-icon,
    .tanci-track.is-playing .tanci-track-marker { animation: none; }
}
