.thespl-player {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    border: 0;
    border-radius: 10px;
    padding: 14px;
    background: var(--thespl-bg, #111);
    color: var(--thespl-text, #eee);
}

.thespl-player .thespl-player__header {
    margin-bottom: 12px;
}

.thespl-player .thespl-player__display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    margin-bottom: 8px;
}

.thespl-player[data-template-slug="default"] .thespl-player__display .thespl-player__status {
    text-align: center;
    margin: 0;
}

.thespl-player .thespl-player__infotext {
    display: block;
    width: 100%;
    margin: 2px 0 0;
    text-align: center;
    font-size: 12px;
    opacity: 0.85;
    overflow: hidden;
}

.thespl-player .thespl-player__infotext .thespl-infotext-text {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap !important;
    word-break: normal;
    overflow-wrap: normal;
    word-wrap: normal;
}

.thespl-player .thespl-player__infotext .thespl-infotext-link,
.thespl-player .thespl-player__infotext .thespl-infotext-tail {
    white-space: nowrap !important;
}

.thespl-player .thespl-player__infotext .thespl-infotext-link,
.thespl-player .thespl-player__infotext .thespl-infotext-link:visited,
.thespl-player .thespl-player__infotext .thespl-infotext-link:hover,
.thespl-player .thespl-player__infotext .thespl-infotext-link:focus {
    color: inherit;
    text-decoration: underline;
}

.thespl-player .thespl-player__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.thespl-player .thespl-player__subtitle {
    font-size: 13px;
    opacity: 0.75;
    margin-top: 4px;
}

.thespl-player .thespl-player__variants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
    justify-content: center;
}

.thespl-player .thespl-player__variant {
    appearance: none;
    border: 1px solid var(--thespl-chip-br, rgba(255, 255, 255, 0.16));
    background: var(--thespl-chip-bg, rgba(255, 255, 255, 0.06));
    color: inherit;
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.thespl-player .thespl-player__variant[aria-selected="true"] {
    border-color: var(--thespl-accent, rgba(34, 211, 238, 0.7));
    background: var(--thespl-accent-2, rgba(34, 211, 238, 0.18));
}

.thespl-player .thespl-player__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.thespl-player .thespl-player__canvas-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.thespl-player .thespl-player__canvas {
    display: block;
    max-width: 100%;
    height: auto;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.thespl-player .thespl-player__btn {
    appearance: none;
    border: 1px solid var(--thespl-chip-br, rgba(255, 255, 255, 0.16));
    background: var(--thespl-button-bg, rgba(255, 255, 255, 0.06));
    color: var(--thespl-button-text, inherit);
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.thespl-player .thespl-player__btn[aria-pressed="true"] {
    background: var(--thespl-button-active-bg, var(--thespl-button-bg, rgba(255, 255, 255, 0.06)));
    color: var(--thespl-button-active-text, var(--thespl-button-text, inherit));
}

.thespl-player .thespl-player__time {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 12px;
}

.thespl-player .thespl-player__playlist {
    display: grid;
    gap: 10px;
}

.thespl-player .thespl-player__track {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--thespl-panel-br, rgba(255, 255, 255, 0.12));
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    background: var(--thespl-panel-bg, rgba(255, 255, 255, 0.03));
}

.thespl-player .thespl-player__track--unplayable {
	opacity: 0.45;
}

.thespl-player .thespl-player__track--unplayable .thespl-player__cover {
	filter: grayscale(1);
}

.thespl-player .thespl-player__track[aria-current="true"] {
	border-color: var(--thespl-accent, rgba(34, 211, 238, 0.7));
}

.thespl-player .thespl-player__cover {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.thespl-player .thespl-player__track-title {
    font-size: 13px;
    font-weight: 600;
}

.thespl-player .thespl-player__track-artist {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 3px;
}

.thespl-player .thespl-player__audio-info {
    margin-top: 12px;
    border: 1px solid var(--thespl-panel-br, rgba(255, 255, 255, 0.12));
    border-radius: 12px;
    padding: 10px;
    background: var(--thespl-panel-bg, rgba(255, 255, 255, 0.03));
    font-size: 12px;
    line-height: 1.25;
}

.thespl-player .thespl-player__audio-info-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.thespl-player .thespl-player__audio-info-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.9;
}

.thespl-player .thespl-player__audio-info-build {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    opacity: 0.85;
}

.thespl-player .thespl-player__audio-info-build-item {
    white-space: nowrap;
}

.thespl-player .thespl-player__audio-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
}

.thespl-player .thespl-player__audio-info-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.thespl-player .thespl-player__audio-info-key {
    opacity: 0.7;
}

.thespl-player .thespl-player__audio-info-val {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    white-space: nowrap;
    text-align: right;
}

.thespl-player .thespl-player__audio-info-levels {
    margin-top: 10px;
    border-top: 1px solid var(--thespl-panel-br, rgba(255, 255, 255, 0.1));
    padding-top: 10px;
    display: grid;
    gap: 6px;
}

.thespl-player .thespl-player__audio-info-level-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    row-gap: 10px;
    column-gap: 20px;
    align-items: center;
    border: 1px solid var(--thespl-panel-br, rgba(255, 255, 255, 0.09));
    border-radius: 10px;
    padding: 7px 9px;
    background: var(--thespl-panel-bg, rgba(255, 255, 255, 0.02));
    box-sizing: border-box;
}

.thespl-player .thespl-player__audio-info-level-row[data-active="1"] {
	border-color: var(--thespl-accent, rgba(34, 211, 238, 0.7));
	background: var(--thespl-accent-2, rgba(34, 211, 238, 0.08));
}

.thespl-player .thespl-player__audio-info-level-label {
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thespl-player .thespl-player__audio-info-level-val {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    white-space: nowrap;
    opacity: 0.9;
    text-align: left;
    width: auto;
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
}

.thespl-player .thespl-player__audio-info-level-key {
    flex: 0 0 auto;
    opacity: 0.9;
    white-space: nowrap;
}

.thespl-player .thespl-player__metafoot {
    margin-top: 10px;
    font-size: 11px;
    opacity: 0.8;
    text-align: right;
    display: block;
}

.thespl-player__metafoot-prefix,
.thespl-player__metafoot-version,
.thespl-player__metafoot-build,
.thespl-player__metafoot-copy,
.thespl-player__metafoot-sep {
    white-space: nowrap;
}

.thespl-player__audio-info-level-num {
    flex: 0 0 auto;
    text-align: right;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: clamp(11px, 1.5vw + 8px, 14px);
    width: 6ch;
    min-width: 6ch;
}

.thespl-player__audio-info-level-unit {
    flex: 0 0 auto;
    white-space: nowrap;
    opacity: 0.9;
}

@media (max-width: 520px) {
    .thespl-player__audio-info-grid {
        grid-template-columns: 1fr;
    }
    .thespl-player__audio-info-level-row {
        grid-template-columns: minmax(0, 1fr) max-content max-content;
        grid-auto-rows: auto;
        column-gap: clamp(10px, 4.5vw, 24px);
    }
    .thespl-player__audio-info-level-val {
        width: auto;
        min-width: 0;
    }
    .thespl-player__audio-info-level-num {
        font-size: clamp(10px, 1.7vw + 7px, 13px);
        width: 6ch;
        min-width: 6ch;
    }
}

.thespl-player__audio {
    display: none;
}

.thespl-hide-playlist .thespl-player__playlist{display:none}
.thespl-hide-audio-info .thespl-player__audio-info{display:none}
