.hmt-track-gallery {
    grid-area: tracks;
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 22px;
    min-width: 0;
}

.hmt-track-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: #fff;
}

.hmt-track-card.is-disabled {
    opacity: 0.54;
}

.hmt-track-play-button {
    min-width: 0;
    padding: 0;
    appearance: none;
    background: transparent;
    border: 0;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.hmt-track-play-button[disabled],
.hmt-favorite[disabled] {
    cursor: not-allowed;
}

.hmt-track-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background: #080808;
    box-shadow:
        0 22px 54px rgba(0, 0, 0, 0.76),
        0 12px 26px rgba(18, 18, 18, 0.62);
}

.hmt-track-cover img,
.hmt-cover-fallback {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hmt-track-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.18) 76%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.2));
    opacity: 0.34;
    transition: opacity 160ms ease, box-shadow 160ms ease;
}

.hmt-track-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 66px;
    height: 66px;
    box-sizing: border-box;
    border: 4px solid rgba(200, 170, 106, 0.9);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0.86;
    transform: translate(-50%, -50%) scale(0.96);
    transition: opacity 160ms ease, transform 160ms ease;
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.58);
}

.hmt-track-play::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 24px;
    transform: translate(-38%, -50%);
    border: 0;
    background: rgba(200, 170, 106, 0.96);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.hmt-track-play::after {
    content: "";
    position: absolute;
    display: none;
}

.hmt-track-play-button.is-playing .hmt-track-play::before,
.hmt-track-card.is-playing .hmt-track-play::before {
    left: 50%;
    top: 50%;
    width: 22px;
    height: 26px;
    transform: translate(-50%, -50%);
    background: linear-gradient(
        90deg,
        rgba(200, 170, 106, 0.96) 0 32%,
        transparent 32% 68%,
        rgba(200, 170, 106, 0.96) 68% 100%
    );
    clip-path: none;
}

.hmt-track-play-button.is-playing .hmt-track-play::after,
.hmt-track-card.is-playing .hmt-track-play::after {
    display: none;
}

.hmt-track-play-button:hover .hmt-track-cover,
.hmt-track-play-button:focus-visible .hmt-track-cover,
.hmt-track-card.is-active .hmt-track-cover {
    outline: 0;
    box-shadow:
        0 30px 78px rgba(0, 0, 0, 0.84),
        0 16px 36px rgba(24, 24, 24, 0.72);
}

.hmt-track-play-button:hover .hmt-track-cover::after,
.hmt-track-play-button:focus-visible .hmt-track-cover::after,
.hmt-track-card.is-active .hmt-track-cover::after {
    opacity: 0.48;
    box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.36);
}

.hmt-track-play-button:hover .hmt-track-play,
.hmt-track-play-button:focus-visible .hmt-track-play,
.hmt-track-card.is-active .hmt-track-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hmt-track-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: start;
    min-width: 0;
}

.hmt-track-lyrics,
.album-primary-lyrics,
.hstw-lyrics-link {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 2px auto 1px;
    color: #35ef68;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.hmt-track-lyrics:hover,
.hmt-track-lyrics:focus-visible,
.album-primary-lyrics:hover,
.album-primary-lyrics:focus-visible,
.hstw-lyrics-link:hover,
.hstw-lyrics-link:focus-visible {
    color: #78ff94;
    text-decoration: underline;
}

.album-scene > .album-primary-lyrics {
    grid-area: cover;
    z-index: 3;
    align-self: end;
    justify-self: center;
    margin: 0;
    transform: translateY(25px);
}

.hmf-cover-stack .album-primary-lyrics {
    grid-area: auto;
    justify-self: center;
    margin: 0 auto;
    transform: none;
}

.album-primary-lyrics[hidden] {
    display: none !important;
}

.hmt-track-title {
    display: -webkit-box;
    overflow: hidden;
    min-width: 0;
    min-height: 15px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.12;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.hmt-track-meta time {
    justify-self: end;
    color: #2aff58;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.hmt-track-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px 24px;
    gap: 8px;
    align-items: center;
    min-height: 18px;
}

.hmt-track-tools:has(.hmt-remove-form) {
    grid-template-columns: minmax(0, 1fr) 24px 24px auto;
}

.hmt-remove-form {
    margin: 0;
}

.hmt-remove-track {
    padding: 4px 7px;
    border: 1px solid #8f3138;
    border-radius: 3px;
    background: #111;
    color: #ff858d;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}

.hmt-nonstop {
    overflow: hidden;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hmp-nonstop-active .hmt-nonstop,
.hmt-nonstop.is-nonstop-active {
    color: #e21b2d;
}

.hmt-favorite {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    appearance: none;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
}

.hmt-favorite svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.hmt-favorite:hover,
.hmt-favorite:focus-visible {
    color: #c8aa6a;
}

.hmt-favorite[aria-pressed="true"] {
    color: #e21b2d;
}

.hmt-share {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    appearance: none;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.hmt-share svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.hmt-share:hover,
.hmt-share:focus-visible {
    color: #c8aa6a;
    transform: scale(1.08);
}

.hmt-cover-fallback {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 18px;
    text-align: center;
    background:
        radial-gradient(circle at 26% 20%, rgba(226, 27, 45, 0.24), transparent 36%),
        linear-gradient(135deg, #101010, #202020);
}

.hmt-cover-fallback strong {
    max-width: 90%;
    font-size: 18px;
    line-height: 1.05;
}

.hmt-cover-fallback small {
    color: #c8aa6a;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.hmt-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.28);
    color: #b9b9b9;
}

@media (max-width: 980px) {
    .hmt-track-gallery {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 560px) {
    .hmt-track-gallery {
        gap: 12px;
    }

    .hmt-track-title {
        font-size: 12px;
    }

    .hmt-track-meta time {
        font-size: 11px;
    }
}
