body {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}
.header { flex-shrink: 0; }
.container {
    flex: 1;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    padding-bottom: 12px;
}
.playlist-section {
    box-sizing: border-box;
    flex: 1;
    min-width: 260px;
    padding-bottom: 10px;
}
.player-section {
    box-sizing: border-box;
    flex: 2;
    min-width: 0;
    padding: 15px;
}
.player-visualizer-group {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 2fr);
    gap: 12px;
}
.audio-card {
    container-type: size;
    display: flex;
    align-items: stretch;
    gap: clamp(12px, 2vw, 24px);
    padding: 14px;
    min-height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.7);
    outline: 1px solid #444;
}
.cover-frame {
    height: min(100cqh, 32cqw);
    aspect-ratio: 1;
    flex: 0 0 auto;
    min-height: 0;
    align-self: center;
}
.track-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 5px;
    background: #000;
}
.track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.track-eyebrow {
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.65rem;
    margin: 0;
}
.track-info h2 {
    margin: 0;
    font-size: clamp(1.1rem, 2.2vw, 2rem);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.225);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.track-details { margin: 0; font-size: 0.8rem; color: #aaa; }
.transport, .seek-row, .volume-row, .spectr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.transport { margin-top: 4px; }
button, select {
    font: inherit;
    color: #eee;
    background: #191919;
    border: 1px solid #444;
    border-radius: 5px;
}
button { cursor: pointer; padding: 6px 10px; }
button:hover { background: #333; border-color: #aaa; }
button:disabled { opacity: 0.4; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, h1:focus-visible, .video-item:focus-visible {
    outline: 1px solid #444;
    outline-offset: 3px;
}
button[aria-pressed="true"] { background: #eee; color: #111; }
#play-toggle { min-width: 65px; background: #eee; color: #000; font-weight: bold; }
.seek-row { font-size: 0.7rem; font-variant-numeric: tabular-nums; }
input[type="range"] { accent-color: #ddd; cursor: pointer; min-width: 0; }
#seek { flex: 1; width: 100%; }
.volume-row { font-size: 0.7rem; color: #aaa; }
#volume { width: 90px; }
#player-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-item.active { background: #303030; }
.video-item.active .video-thumbnail { filter: none; }
.video-item { padding: 8px 10px; }
.video-thumbnail { height: 38.4px; width: 38.4px; }
.spectr-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    background: #05070b;
    outline: 1px solid #444;
    overflow: hidden;
    position: relative;
}
.spectr-toolbar {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #292929;
    background: #111;
}
.spectr-brand { display: flex; gap: 8px; align-items: baseline; }
.spectr-brand strong { letter-spacing: 0.08em; font-size: 0.9rem; }
.spectr-brand span { color: #999; font-size: 0.65rem; }
.spectr-actions { gap: 5px; }
.spectr-actions button { font-size: 0.7rem; padding: 5px 7px; }
.spectr-viewport { flex: 1; min-height: 0; position: relative; touch-action: none; }
#spectr-canvas { display: block; width: 100%; height: 100%; }
.spectr-readout {
    position: absolute;
    right: 12px;
    bottom: 8px;
    color: #ddd;
    background: rgba(0,0,0,0.8);
    font: 0.7rem monospace;
    padding: 4px;
    pointer-events: none;
}
.spectr-status {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px;
    color: #999;
    background: #111;
    font: 0.65rem monospace;
}
.spectr-settings {
    position: absolute;
    top: 45px;
    right: 8px;
    bottom: 30px;
    width: min(280px, calc(100% - 32px));
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 6px;
    background: rgba(18,18,18,0.98);
    z-index: 2;
    box-sizing: border-box;
}
.spectr-settings label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.75rem; margin-bottom: 12px; }
.spectr-settings select { max-width: 150px; padding: 4px; }
.spectr-settings input[type="range"] { width: 120px; }
.spectr-settings p { color: #999; font-size: 0.7rem; line-height: 1.5; }
.footer { position: static; flex-shrink: 0; gap: 10px; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
    .header { gap: 12px; }
    .header-right { gap: 8px; }
    .social-links { flex-wrap: wrap; justify-content: flex-end; }
    .play-counter { font-size: 0.8rem; }
    .track-info { gap: 5px; }
    .audio-card { padding: 10px; }
    .spectr-brand span { display: none; }
}
@media (max-width: 760px) {
    .header { padding: 10px 12px; height: auto; min-height: 50px; flex-wrap: wrap; }
    h1 { font-size: 1.5em; gap: 6px; flex-shrink: 0; }
    .title-name-img { max-width: calc(100vw - 115px); height: auto; max-height: 2em; }
    .header-right { flex-direction: column; align-items: flex-end; gap: 6px; }
    .social-links { gap: 5px; max-width: 220px; }
    .social-icon { width: 13px; height: 13px; }
    .container { flex-direction: column; padding: 0 10px 10px; gap: 10px; }
    .player-section { order: -1; flex: 1; width: 100%; padding: 5px; min-height: 0; }
    .playlist-section { flex: 0 0 23%; width: 100%; min-width: 0; padding: 5px; }
    .player-visualizer-group { grid-template-rows: minmax(160px, 1fr) minmax(180px, 2fr); gap: 10px; }
    .audio-card { gap: 12px; }
    .track-info h2 { font-size: 1.2rem; }
    .track-eyebrow { display: none; }
    .track-details { font-size: 0.7rem; }
    .transport { gap: 5px; margin-top: 0; }
    .transport button { padding: 6px 5px; font-size: 0.7rem; }
    #play-toggle { min-width: 52px; }
    .spectr-toolbar { padding: 6px 8px; }
    .spectr-actions button { font-size: 0.65rem; padding: 5px; }
    .spectr-status { padding: 5px 8px; font-size: 0.6rem; }
    .footer { height: auto; padding: 6px 10px; font-size: 0.55em; }
}
@media (max-height: 700px) {
    body { overflow-y: auto; }
    .container { flex-shrink: 0; min-height: 540px; }
    .player-visualizer-group { grid-template-rows: minmax(175px, 1fr) minmax(220px, 2fr); }
    .playlist-section { max-height: 540px; }
}
