/*
   !!! WARNING !!!
   SPAGHETTI BELOW
   !!! WARNING !!!
*/

/* fonts + root sizing
   cause everything looks better bigger
   just throwing a 10% increase on a bunch of base css values */

@font-face {
    font-family: Auditorium;
    font-style: normal;
    font-weight: 300;
    src: url('/assets/apt-theme/fonts/Montserrat-Light.woff2') format('woff2');
}
:root:has(> .apt-theme) {
    font-size: calc(var(--bulma-body-size) * 1.1);
    background: url('/assets/apt-theme/images/tile.png') repeat fixed;
    background-size: 121px 121px;
    --bulma-body-min-width: 330px;
    --bulma-control-border-width: 1.1px;
    --bulma-control-padding-vertical: calc(0.5em - 1.1px);
    --bulma-control-padding-horizontal: calc(0.75em - 1.1px);
    --bulma-burger-gap: 5.5px;
    --bulma-burger-item-height: 2.2px;
    --bulma-burger-item-width: 22px;
    --bulma-hr-height: 2.2px;
    --bulma-focus-offset: 1.1px;
    --bulma-focus-width: 2.2px;
    --radio-border-radius-1: 4.4px;
    --radio-border-radius-2: 6.6px;
}

/* shared components + container widths 'n stuff */

.apt-theme .container { max-width: none; }
.apt-theme .lp-dj-image { border-width: 6.6px; }
.apt-theme .content-border-top { border-radius: 0 0 6.6px 6.6px; }
.apt-theme .block { border-radius: 4.4px; }
.apt-theme .song-info-extra { border-radius: 0 0 4.4px 4.4px; }
.apt-theme .dj-image-name-64 { border-radius: 6.6px; padding: 4.4px 13.2px; }
.apt-theme .dj-image:hover + .dj-image-name-64 { left: calc(100% + 8.8px); }
.apt-theme [aria-description]:hover::before { padding: 4.4px 8.8px; border-width: 1.1px; border-radius: 4.4px; }
@media (min-width: 1126.4px) {
    .apt-theme .container:not(.is-max-tablet) { max-width: 1056px; }
}
@media (min-width: 1337.6px) {
    .apt-theme .container:not(.is-max-tablet):not(.is-max-desktop) { max-width: 1267.2px; }
}
@media (min-width: 1548.8px) {
    .apt-theme .container:not(.is-max-tablet):not(.is-max-desktop):not(.is-max-widescreen) { max-width: 1478.4px; }
}

/* page background + typography */

.apt-theme {
    --apt-accent: #add8e6;
    --apt-panel: rgba(0, 0, 0, .82);
    --bulma-link-text: #add8e6;
    --bulma-body-color: #eee;
    height: auto !important;
    min-height: 100vh;
    background: transparent !important;
    color: #eee;
    font-family: Verdana, sans-serif;
    font-size: 15.4px;
    letter-spacing: 0;
}
.apt-theme #content { margin: 8.8px; scroll-margin-top: 8.8px; }
.apt-theme .title, .apt-theme h1, .apt-theme h2, .apt-theme h3 {
    font-family: Auditorium, sans-serif;
    font-weight: 300;
    letter-spacing: 0;
    color: #fff;
}
.apt-theme a { color: var(--apt-accent); }

/* public and admin navigation
   the admin footer bar overlaps a bunch of our elements by default
   so we take it into account for sizing */

.apt-theme .navbar {
    background: var(--apt-panel);
    border: 4.4px double #aaa;
    border-radius: 8.8px;
    margin-bottom: 8.8px;
    min-height: 52.8px;
}
.apt-theme .navbar-container, .apt-theme .navbar-menu { background: transparent !important; }
.apt-theme .navbar-container { width: 100%; }
.apt-theme #public-navbar, .apt-theme #public-navbar .navbar-container, .apt-theme #public-navbar .navbar-end, .apt-theme #public-navbar form { min-width: 0; }
.apt-theme #public-navbar { flex-shrink: 1; }
.apt-theme #admin-navbar-container {
    background: #202020;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    min-height: var(--bulma-navbar-height);
}
.apt-theme #admin-navbar .navbar-container { background: #202020 !important; }
.apt-theme .navbar-item { font-size: 14.3px; color: #eee; }
.apt-theme .apt-radio-logo { position: relative; display: inline-flex; }
.apt-theme .apt-home-link img { filter: url('#apt-radio-logo-grayscale'); }
.apt-theme .apt-home-link .apt-radio-logo-color { position: absolute; inset: 0; width: 100%; height: 100%; filter: none; opacity: 0; transition: opacity .18s ease; }
.apt-theme .apt-home-link:hover .apt-radio-logo-color { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .apt-theme .apt-home-link .apt-radio-logo-color { transition: none; }
}
.apt-theme .navbar-item:hover, .apt-theme .navbar-item.is-active { background: rgba(255, 255, 255, .08) !important; color: #fff !important; }
.apt-theme .navbar-item.apt-home-link:hover { background: transparent !important; }
.apt-theme #loading-indicator { margin: 0; height: 2.2px; }

/* sections / buttons / form controls */

.apt-theme .section { background: var(--apt-panel); border: 4.4px double #aaa; border-radius: 8.8px; padding: 26.4px; min-height: 70vh; }
.apt-theme .button, .apt-theme .input, .apt-theme .select select, .apt-theme .textarea {
    border-radius: 3.3px;
    border: 1.1px solid #888;
    background: #eee;
    color: #171717;
    box-shadow: none;
    font-family: Verdana, sans-serif;
}
.apt-theme input:invalid { border-width: 3px; }
.apt-theme .button { color: #171717 !important; }
.apt-theme .button.is-primary, .apt-theme .button.is-info, .apt-theme .button.is-success { background: var(--apt-accent); }
.apt-theme .button.is-warning { background: #eed69a; }
.apt-theme .button.is-danger { background: #e8b4b4; }
.apt-theme .button:hover, .apt-theme .button:focus-visible, .apt-theme .dropdown-cbox-parent label.button:hover { background: #c7e8f2; border-color: #add8e6; color: #171717 !important; }
.apt-theme .button:active { background: #91becb; color: #171717 !important; }
.apt-theme .button:focus-visible { outline: 2.2px solid var(--apt-accent); outline-offset: 3.3px; }
.apt-theme .button:disabled, .apt-theme .button[disabled] { background: #474747; border-color: #666; color: #ccc !important; opacity: 1; }

/* navbar search and results */

.apt-theme #public-navbar .navbar-end { padding-right: 3.3px; }
.apt-theme #navbarinput {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .3);
    color: #eee;
}
.apt-theme #navbarinput::placeholder { color: rgba(255, 255, 255, .5); opacity: 1; }
.apt-theme #navbarinput:focus { border-color: var(--apt-accent); box-shadow: none; }
.apt-theme #search-bar-popup {
    background: rgba(48, 48, 48, .92);
    color: #eee;
    border: 1.1px solid rgba(255, 255, 255, .3);
    right: 5.5px;
}
.apt-theme #search-bar-popup > .columns {
    margin: 0;
    padding: 4.4px 8.8px;
    border-top: 1.1px solid #4a4a4a;
    border-radius: 0;
}
.apt-theme #search-bar-popup > .columns:nth-child(even) { background: rgba(255, 255, 255, .05); }

/* notifications */

.apt-theme .notification, .apt-theme .box, .apt-theme .card { background: rgba(255, 255, 255, .08); color: #eee; border-radius: 4.4px; box-shadow: none; }
.apt-theme .notification { background: #202020; }

/* footer
   there's more stuff for deciding how it's sized in playback-state.js */

.apt-theme .footer {
    padding: 8.8px 13.2px;
    margin: 0 8.8px 8.8px;
    background: rgba(255, 255, 255, .9) !important;
    border: 3.3px double #666;
    border-radius: 5.5px;
}
.apt-theme .footer a { color: #555; }
[data-admin-navbar="bottom"] .apt-theme:has(#admin-navbar-container) {
    min-height: 100%;
}
[data-admin-navbar="bottom"] .apt-theme:has(#admin-navbar-container) .footer {
    margin-bottom: calc(var(--bulma-navbar-height) + 8.8px);
}

/* preferences */

.apt-theme .modal-close::before { height: 2.2px; }
.apt-theme .modal-close::after { width: 2.2px; }
.apt-theme .modal-content { background: #202020; border: 4.4px double #aaa; border-radius: 8.8px; }
.apt-theme #prefs-modal .modal-content { background: rgba(32, 32, 32, .92); }
.apt-theme #preferences { background: transparent !important; }

/* staff page */

.apt-theme #page-staff .dj-card-name { color: #808080; }

/* home layout and queue visibility */

.apt-theme .apt-home-layout { display: grid; grid-template-columns: minmax(253px, 25%) minmax(0, 1fr); gap: 8.8px; align-items: start; }
.apt-theme .apt-sidebar-column { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8.8px; min-width: 0; align-self: stretch; }
.apt-theme .apt-sidebar-column > .footer { margin: 0; align-self: end; transform: translateY(-1.1px); }
.apt-theme .apt-sidebar-column > .footer a { display: flex; flex: 1; justify-content: center; min-width: 0; max-width: 105.6px; margin-inline: 0 !important; }
.apt-theme #queue-container { min-width: 0; }
.apt-theme #queue-container:not(:has(#queue)) { display: none; }
.apt-theme #queue-container > h2 { margin-top: 0; }

/* desktop home layout: sidebar, footer and thread placement */

@media (min-width: 771px) {
    .apt-theme:has(.apt-home-layout) { height: 100dvh !important; }
    .apt-theme:has(.apt-home-layout) #content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
    .apt-theme .apt-home-layout { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
    .apt-theme .apt-sidebar-column { grid-template-rows: auto minmax(88px, 1fr) auto; min-height: 0; }
    .apt-theme .apt-sidebar { min-height: 253px; max-height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #555 #181818; }
    .apt-theme .apt-sidebar-column > .footer { width: var(--apt-footer-width, 100%); }
    .apt-theme .apt-home-layout > .apt-broadcast-column { display: flex; flex-direction: column; align-self: stretch; gap: 8.8px; padding: 0; background: none; border: 0; }
    .apt-theme .apt-broadcast-column > .apt-broadcast-panel, .apt-theme .apt-thread-area > #thread-container { background: var(--apt-panel); border: 4.4px double #aaa; border-radius: 8.8px; padding: 28.6px; }
    .apt-theme .apt-broadcast-panel:has(#queue) { min-height: 0; overflow-y: auto; }
    .apt-theme .apt-broadcast-panel > #queue-container { grid-column: 1 / -1; border-top: 1.1px solid #555; padding-top: 17.6px; }
    .apt-theme .apt-broadcast-panel .apt-dj { flex-direction: column; align-items: flex-end; gap: 11px; text-align: right; }
    .apt-theme .apt-broadcast-panel .apt-dj > img { width: 189.2px; height: 189.2px; }
    .apt-theme .apt-dj > div { width: 189.2px; min-width: 0; max-width: 100%; padding-top: 2.2px; text-align: center; overflow-wrap: anywhere; }
    .apt-theme .apt-broadcast-panel .apt-dj #dj-name { font-size: 23.1px; }
    .apt-theme .apt-sidebar-column > .apt-news { background: var(--apt-panel); border: 4.4px double #aaa; border-radius: 8.8px; padding: 13.2px 11px; min-width: 0; min-height: 0; max-height: 100%; align-self: start; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #555 #181818; }
    .apt-theme .apt-broadcast-column > .apt-thread-area { flex: 1; min-height: 0; margin: 0; padding: 0; border: 0; container-type: size; }
    .apt-theme .apt-thread-area > #thread-container { width: fit-content; max-width: 100%; margin-left: auto; }
    .apt-theme .apt-thread-area > #thread-container:not(:has(.apt-thread)) { display: none; }
    .apt-theme .apt-thread-area > #thread-container:has(#thread > img) { padding: 4.4px; }
    .apt-theme #thread > img { max-height: max(23.1px, calc(100cqh - 17.6px)); }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) { grid-template-rows: auto auto minmax(88px, 1fr) auto; min-height: 0; }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) > .apt-sidebar-column,
    .apt-theme .apt-home-layout:not(:has(#thread > img)):not(:has(#queue)) > .apt-broadcast-column { display: contents; }
    .apt-theme .apt-home-layout:has(#queue) > .apt-broadcast-column { grid-column: 2; grid-row: 1 / 4; }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) .apt-sidebar { grid-column: 1; grid-row: 1; }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) .apt-sidebar-column > .footer { grid-column: 1 / -1; grid-row: 4; }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) .apt-broadcast-panel { grid-column: 2; grid-row: 1; }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) .apt-thread-area { grid-column: 1; grid-row: 2; container-type: normal; }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) .apt-thread-area > #thread-container { width: auto; margin: 0; padding: 17.6px 13.2px; text-align: center; }
    .apt-theme .apt-home-layout:not(:has(#thread > img)) .apt-news { grid-column: 1; grid-row: 3; }
    .apt-theme:has(.apt-home-layout) > .footer { display: none !important; }
    [data-admin-navbar="bottom"] .apt-theme:has(#admin-navbar-container) .apt-sidebar-column > .footer { margin-bottom: 0; }
    [data-admin-navbar="bottom"] .apt-theme:has(#admin-navbar-container) .apt-home-layout { margin-bottom: var(--bulma-navbar-height); }
}

/* home panels, player and quick links */

.apt-theme .apt-sidebar, .apt-theme .apt-broadcast-column { background: var(--apt-panel); border: 4.4px double #aaa; border-radius: 8.8px; min-width: 0; }
.apt-theme .apt-sidebar { padding: 17.6px 13.2px; }
.apt-theme .apt-broadcast-column { padding: 28.6px; min-height: 75vh; }
.apt-theme .apt-player-header { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8.8px; align-items: center; }
.apt-theme .apt-player-header > img { width: 88px; height: 88px; object-fit: contain; }
.apt-theme .apt-player-header #stream-play-pause { font-size: 15.4px; padding-inline: 6.6px; }
.apt-theme .apt-player { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13.2px; margin-bottom: 26.4px; }
.apt-theme #stream-play-pause {
    min-height: 48.4px;
    font-size: 17.6px;
    background-color: rgba(255, 255, 255, .1);
    background-image: linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, .65)), url('/assets/apt-theme/images/tile.png');
    background-attachment: fixed;
    background-size: 121px 121px;
    border-color: #888;
    color: #f5f5f5 !important;
}
.apt-theme #stream-play-pause:hover {
    background-color: rgba(255, 255, 255, .2);
    background-image: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)), url('/assets/apt-theme/images/tile.png');
    border-color: #bbb;
    color: #fff !important;
}
.apt-theme .apt-volume { display: flex; align-items: center; gap: 11px; font-size: 13.2px; }
.apt-theme #stream-volume { flex: 1; min-width: 0; accent-color: #df4c3a; }
.apt-theme .apt-player-buttons-n-links { display: flex; justify-content: flex-start; align-items: center; gap: 8.8px; font-size: 13.2px; }
.apt-theme .apt-player-buttons-n-links > :last-child { margin-left: auto; }
.apt-theme .apt-player-buttons-n-links .button { width: 33px; height: 33px; flex-shrink: 0; padding: 5.5px; font-size: 13.2px; background: rgba(255, 255, 255, .1); border-color: #888; color: #f5f5f5 !important; }
.apt-theme .apt-player-buttons-n-links .button:focus-visible { background: rgba(255, 255, 255, .2); border-color: #bbb; color: #fff !important; }
.apt-theme .apt-player-buttons-n-links .svg-icon { width: 17.6px; height: 17.6px; }
.apt-theme .apt-player-buttons-n-links .button:hover .svg-icon { filter: brightness(.65); }
.apt-theme .apt-sidebar h2, .apt-theme .apt-broadcast-column h2 { font-size: 19.8px; margin: 22px 0 13.2px; }

/* broadcast panel, thread area and DJ profile */

.apt-theme .apt-broadcast-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(264px, .5fr);
    align-items: start;
    gap: 30.8px;
}
.apt-theme .apt-broadcast-panel > div { min-width: 0; overflow-wrap: anywhere; }
.apt-theme .apt-thread-area {
    border-top: 1.1px solid #555;
    margin-top: 30.8px;
    padding-top: 22px;
}
.apt-theme .apt-thread-area > div { min-width: 0; overflow-wrap: anywhere; }
.apt-theme .apt-dj { display: flex; align-items: center; justify-content: flex-end; gap: 17.6px; }
.apt-theme .apt-dj img { flex-shrink: 0; }
.apt-theme #page-home-dj-image { margin: 0; max-width: none; }
.apt-theme .apt-dj img { object-fit: cover; border-radius: 3.3px; }
.apt-theme .apt-dj .apt-mobile-logo { display: none; }
.apt-theme .apt-dj #dj-name { font-family: Auditorium, sans-serif; font-size: 26.4px; }

/* now playing, song tags and progress */

.apt-theme .apt-broadcast-column #metadata { font-family: Auditorium, sans-serif; font-size: 28.6px; overflow-wrap: anywhere; margin: 13.2px 0; }
.apt-theme .apt-song-row { display: flex; align-items: center; gap: 13.2px; }
.apt-theme .apt-playback-details { display: contents; }
.apt-theme .apt-song-row #metadata { flex: 1; min-width: 0; }
.apt-theme .apt-tags-toggle { display: inline-flex; align-items: center; justify-content: center; width: 33px; height: 33px; flex-shrink: 0; padding: 5.5px; color: #888; cursor: pointer; }
.apt-theme .apt-tags-toggle:hover { color: #bbb; }
.apt-theme .apt-tags-toggle .svg-icon { pointer-events: none; }
.apt-theme .apt-tags-toggle:focus-visible { outline: 2.2px solid #888; outline-offset: 2.2px; }
.apt-theme #now-playing-tags { display: none; color: #bbb; font-size: 13.2px; margin-bottom: 17.6px; overflow-wrap: anywhere; }
.apt-theme #now-playing:has(#toggle-now-playing-tags:checked) #now-playing-tags { display: block; }
.apt-theme .apt-now-playing-heading { color: var(--apt-accent); font-size: 13.2px; text-transform: uppercase; }
.apt-theme #current-song-progress { height: 6.6px; margin: 22px 0 11px; border-radius: 0; accent-color: var(--apt-accent); }
.apt-theme #toggle-now-playing-tags:not(:checked) ~ #current-song-progress { margin-top: 8.8px; }
.apt-theme #current-song-progress::-webkit-progress-bar { border-radius: 0; }
.apt-theme #current-song-progress::-webkit-progress-value { background: var(--apt-accent); border-radius: 0; }
.apt-theme #current-song-progress::-moz-progress-bar { background: var(--apt-accent); border-radius: 0; }
.apt-theme .apt-playback-status { display: flex; justify-content: space-between; gap: 13.2px; font-size: 15.4px; color: #bbb; }

/* track lists, empty states and news */

.apt-theme .apt-list { margin: 0; padding: 0; list-style: none; }
.apt-theme #lastplayed, .apt-theme #queue, .apt-theme #thread { min-height: 0; }
.apt-theme .apt-list li { display: flex; justify-content: space-between; gap: 17.6px; padding: 9.9px 0; border-bottom: 1.1px solid #444; font-size: 14.3px; }
.apt-theme #lastplayed li { align-items: baseline; }
.apt-theme .apt-list li span { overflow-wrap: anywhere; min-width: 0; }
.apt-theme .apt-list time { white-space: nowrap; color: #aaa; font-family: Tahoma, Verdana, sans-serif; font-size: 13.2px; }
.apt-theme .apt-list .is-request { color: #add8e6; }
.apt-theme .apt-empty-state { color: #aaa; font-size: 14.3px; padding: 13.2px 0; }
.apt-theme .apt-last-played { margin-top: 22px; border-top: 1.1px solid #555; }
.apt-theme .apt-last-played h2 { margin-top: 15.4px; }
.apt-theme .apt-news { border-top: 1.1px solid #555; margin-top: 30.8px; padding-top: 17.6px; }
.apt-theme .apt-sidebar-column > .apt-news { margin-top: 0; }
.apt-theme .apt-news h2 { font-size: 19.8px; margin: 0 0 6.6px; }
.apt-theme .apt-news .apt-list { margin-bottom: 13.2px; }
.apt-theme .apt-news .apt-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6.6px 17.6px; }
.apt-theme .apt-news .apt-list li:first-child { padding-top: 4.4px; }
.apt-theme .apt-news .apt-list a { min-width: 0; overflow-wrap: anywhere; }
.apt-theme .apt-news .apt-list > li > a:visited { color: #b6a0c2; }
.apt-theme .apt-news .apt-list time { color: #888; font-family: monospace; font-size: 12.1px; }
.apt-theme .apt-news-blurb { grid-column: 1 / -1; color: #bbb; overflow-wrap: anywhere; }
.apt-theme .apt-news-blurb > :first-child { margin-top: 0; }
.apt-theme .apt-news-blurb > :last-child { margin-bottom: 0; }

/* thread content */

.apt-theme .button.apt-thread-link { min-height: 48.4px; font-size: 15.4px; background: rgba(255, 255, 255, .05); border-color: #555; color: #ccc !important; }
.apt-theme .button.apt-thread-link:hover, .apt-theme .button.apt-thread-link:focus-visible { background: rgba(255, 255, 255, .12); border-color: #888; color: #f5f5f5 !important; }
.apt-theme .apt-thread img { display: block; width: auto; height: auto; max-width: 100%; }
.apt-theme .apt-thread-empty { color: #aaa; }

/* responsive navigation: burger menu below ~1126px */

@media (max-width: 1126.39px) {
    .apt-theme .navbar { display: block; }
    .apt-theme .navbar-brand.is-hidden-desktop { display: flex !important; }
    .apt-theme .navbar-burger { display: block; }
    .apt-theme #public-navbar:not(.is-active) { display: none; }
    .apt-theme #public-navbar .navbar-start { display: block; }
    .apt-theme #radio-logo, .apt-theme #public-navbar .navbar-end { display: none !important; }
    .apt-theme .navbar-menu.is-active { padding: 8.8px; background: rgba(32, 32, 32, .96) !important; }
    .apt-theme .navbar:has(> #public-navbar.is-active) {
        background: #202020;
        border: 0;
        padding: 4.4px;
        border-radius: 8.8px 8.8px 0 0;
    }
    .apt-theme .navbar:has(> #public-navbar.is-active)::before {
        content: "";
        position: absolute;
        inset: 0;
        border: 4.4px double #aaa;
        border-bottom: 0;
        border-radius: inherit;
        pointer-events: none;
    }
    .apt-theme #public-navbar.is-active {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 0;
        background: #202020 !important;
        border: 4.4px double #aaa;
        border-top: 0;
        border-radius: 0 0 8.8px 8.8px;
        max-height: calc(100dvh - 132px);
        overflow-y: auto;
        z-index: 99;
    }
    .apt-theme #public-navbar.is-active .navbar-container {
        position: static;
        width: auto;
        border: 0;
        background: transparent !important;
    }
    .apt-theme .navbar-container { display: block !important; }
}

/* wide broadcast panel: DJ column and aligned song details */

@media (min-width: 991px) {
    .apt-theme .apt-broadcast-panel { grid-template-rows: minmax(189.2px, auto) auto; row-gap: 11px; }
    .apt-theme .apt-broadcast-panel > #queue-container { grid-row: 3; }
    .apt-theme .apt-broadcast-panel > [sse-swap="streamer"], .apt-theme .apt-broadcast-panel .apt-dj { display: contents; }
    .apt-theme .apt-broadcast-panel #now-playing { display: grid; grid-template-rows: subgrid; grid-column: 1; grid-row: 1 / 3; align-self: stretch; }
    .apt-theme .apt-broadcast-panel .apt-playback-details { display: grid; grid-template-columns: minmax(0, 1fr) 33px; grid-template-rows: minmax(0, 1fr) auto auto auto auto; grid-row: 1; }
    .apt-theme .apt-broadcast-panel .apt-song-row { display: contents; }
    .apt-theme .apt-broadcast-panel .apt-tags-toggle { grid-column: 2; grid-row: 2; align-self: center; }
    .apt-theme .apt-broadcast-panel .apt-tags-toggle .svg-icon { transform: translateY(1.1px); }
    .apt-theme .apt-broadcast-panel #now-playing-tags { grid-column: 1; grid-row: 2; align-self: start; margin: 0; padding-top: 2.2px; }
    .apt-theme .apt-broadcast-panel .apt-dj > img { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; }
    .apt-theme .apt-broadcast-panel .apt-dj > div { grid-column: 2; grid-row: 2; justify-self: end; }
    .apt-theme .apt-broadcast-panel .apt-now-playing-heading { grid-column: 1; grid-row: 2; align-self: center; font-size: 15.4px; }
    .apt-theme .apt-broadcast-panel #metadata { grid-column: 1 / -1; grid-row: 3; font-size: 33px; }
    .apt-theme .apt-broadcast-panel #current-song-progress { grid-column: 1 / -1; grid-row: 4; height: 8.8px; margin-top: 8.8px; }
    .apt-theme .apt-broadcast-panel .apt-playback-status { grid-column: 1 / -1; grid-row: 5; font-size: 17.6px; }
}

/* narrow broadcast panel: stacked content */

@media (max-width: 990px) {
    .apt-theme .apt-broadcast-panel { grid-template-columns: 1fr; gap: 22px; }
    .apt-theme .apt-dj { justify-content: flex-start; }
}

/* mobile home layout and content order (single-column)
   this rearranges the layout to be similar to the default-dark one */

@media (max-width: 770px) {
    .apt-theme .apt-home-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 15.4px; background: var(--apt-panel); border: 4.4px double #aaa; border-radius: 8.8px; }
    .apt-theme .apt-sidebar-column, .apt-theme .apt-sidebar, .apt-theme .apt-broadcast-column, .apt-theme .apt-broadcast-panel { display: contents; }
    .apt-theme .apt-sidebar-column > .footer { display: none !important; }
    .apt-theme .apt-player { order: 1; margin-top: 22px; margin-bottom: 0; }
    .apt-theme .apt-broadcast-panel > [sse-swap="streamer"] { order: 2; margin-top: 17.6px; }
    .apt-theme #now-playing { order: 0; margin-top: 0; }
    .apt-theme .apt-player-header { grid-template-columns: minmax(0, 1fr); }
    .apt-theme .apt-player-header > img { display: none; }
    .apt-theme .apt-dj { gap: 13.2px; }
    .apt-theme .apt-dj > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .apt-theme .apt-dj img { width: 96.8px; height: 96.8px; }
    .apt-theme .apt-dj .apt-mobile-logo { display: block; width: 96.8px; height: 96.8px; object-fit: contain; border-radius: 0; }
    .apt-theme .apt-thread-area { order: 3; }
    .apt-theme .apt-thread-area:not(:has(.apt-thread)) { display: none; }
    .apt-theme #queue-container { order: 4; margin-top: 22px; border-top: 1.1px solid #555; padding-top: 17.6px; }
    .apt-theme .apt-last-played { order: 5; }
    .apt-theme .apt-news { order: 6; }
    .apt-theme .apt-broadcast-column #metadata { font-size: 24.2px; }
    .apt-theme .section { padding: 17.6px; }
}
