:root {
    --bg: #ffffff;
    --text: #000000;
    --blue: #0000ff;
    --red: #ff0000;
    --green: #00eb00;
    --yellow: #ffff00;
    --light-grey: #efefef;
    --max-width: 880px;
    --meta-size: 14px;
    --accent: var(--blue);
}

body.tab-music {
    --accent: var(--blue);
}

body.tab-film {
    --accent: var(--red);
}

body.tab-junk {
    --accent: var(--green);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
}

body {
    line-height: 1.45;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid var(--accent);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px;
}

.header-layout {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-badge-button {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.header-badge {
    width: 148px;
    flex: 0 0 148px;
}

.badge-spin {
    position: relative;
    width: 148px;
    height: 148px;
}

.badge-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    animation: spin 11s linear infinite;
    transform-origin: center;
}

.badge-ring-text {
    fill: #ff5a4f;
    font-family: "Space Grotesk", sans-serif;
    font-size: 15.1px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.badge-image {
    position: absolute;
    inset: 20%;
    width: 60%;
    height: 60%;
    object-fit: contain;
    display: block;
    transform-origin: center;
    image-rendering: auto;
}

.header-content {
    min-width: 0;
    flex: 1 1 auto;
}

.site-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
}

.tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tab {
    display: inline-block;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    padding: 10px 14px 12px;
    border: 1px solid currentColor;
    transition:
        background-color 120ms ease,
        color 120ms ease;
    cursor: pointer;
}

.tab[data-tab="music"] {
    color: var(--blue);
}

.tab[data-tab="film"] {
    color: var(--red);
}

.tab[data-tab="junk"] {
    color: var(--green);
}

.tab.active[data-tab="music"] {
    background: var(--blue);
    color: #ffffff;
}

.tab.active[data-tab="film"] {
    background: var(--red);
    color: #ffffff;
}

.tab.active[data-tab="junk"] {
    background: var(--green);
    color: #ffffff;
}

.site-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.site-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.site-menu-dialog {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    pointer-events: none;
}

.site-menu-circle {
    position: relative;
    width: min(72vw, 520px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--yellow);
    display: grid;
    place-items: center;
    pointer-events: auto;
    box-shadow: 0 0 0 1px var(--accent);
}

.site-menu-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.site-menu-ring-spin {
    transform-origin: 150px 150px;
    animation: spin 18s linear infinite;
}

.site-menu-ring-link {
    cursor: pointer;
}

.site-menu-ring-text {
    fill: #000000;
    font-family: "Space Grotesk", sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.site-menu-ring-link:hover .site-menu-ring-text,
.site-menu-ring-link:focus .site-menu-ring-text {
    opacity: 0.65;
}

.site-menu-close {
    appearance: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    border: 0;
    background: transparent;
    color: #ff0000;
    font: inherit;
    font-size: 80px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    z-index: 2;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 108px;
}

.status-message {
    font-size: 14px;
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.subfilter-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#subfilterLabel {
    font-size: 14px;
    background: var(--light-grey);
    border: 1px solid var(--accent);
    padding: 2px 6px;
}

#clearSubfilterButton {
    appearance: none;
    border: 1px solid var(--accent);
    background: #ffffff;
    color: var(--accent);
    font: inherit;
    padding: 4px 8px;
    cursor: pointer;
}

#clearSubfilterButton:hover {
    background: var(--accent);
    color: #ffffff;
}

.feed {
    display: grid;
    gap: 22px;
}

.post {
    border-top: 1px solid var(--accent);
    padding-top: 18px;
}

.post:first-child {
    border-top: 0;
    padding-top: 0;
}

.post-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.post-media-column {
    width: 33.333%;
    flex: 0 0 33.333%;
}

.post-text-column {
    width: 66.667%;
    flex: 1 1 auto;
    min-width: 0;
}

.post-image-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.post-image-button img,
.post-image-stack button img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--accent);
}

.post-image-stack {
    display: grid;
    gap: 10px;
}

.post-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.post-date-link {
    font-size: var(--meta-size);
    text-decoration: none;
    color: #000000;
}

.post-tag {
    display: inline-block;
    font-size: var(--meta-size);
    line-height: 1.2;
    background: var(--light-grey);
    padding: 2px 6px;
}

.post-content {
    font-size: 20px;
    word-break: break-word;
}

.post-content p {
    margin: 0 0 1em 0;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.empty {
    font-size: 18px;
}

.grid-header {
    margin-bottom: 18px;
}

.plain-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #000000;
    font: inherit;
    padding: 0;
    cursor: pointer;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.grid-tile {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.grid-tile img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid var(--accent);
}

.pagination {
    margin-top: 28px;
}

.load-more-button {
    appearance: none;
    border: 1px solid var(--accent);
    background: #ffffff;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    padding: 10px 14px 12px;
    cursor: pointer;
}

.load-more-button:hover {
    background: var(--accent);
    color: #ffffff;
}

.load-more-button:disabled {
    opacity: 0.65;
    cursor: default;
}

.bottom-ticker {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    background: var(--accent);
    height: 42px;
    display: flex;
    align-items: center;
}

.bottom-ticker-window {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.bottom-ticker-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.bottom-ticker-item {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 0.8rem;
    line-height: 1.1;
    font-family: "Space Grotesk", sans-serif;
    background: var(--accent);
    transform: translateY(100%);
    opacity: 0;
    transition:
        transform 420ms ease,
        opacity 420ms ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bottom-ticker-item.is-active {
    transform: translateY(0%);
    opacity: 1;
}

.bottom-ticker-item.is-exit {
    transform: translateY(-100%);
    opacity: 0;
}

.bottom-ticker-item-current {
    color: #ffffff;
    font-style: bold;
}

.bottom-ticker-item-playing {
    color: #ffffff;
    font-style: normal;
    font-weight: 700;
}

.bottom-ticker-item strong {
    font-weight: 700;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@media (max-width: 720px) {
    .header-layout {
        align-items: flex-start;
    }

    .header-badge {
        width: 108px;
        flex: 0 0 108px;
    }

    .badge-spin {
        width: 108px;
        height: 108px;
    }

    .badge-ring-text {
        font-size: 15.5px;
        letter-spacing: 1.6px;
    }

    .site-title {
        margin: 0 0 24px 0;
    }

    .tab {
        font-size: 20px;
    }

    .site-menu-circle {
        width: min(86vw, 420px);
    }

    .site-menu-ring-text {
        font-size: 22px;
    }

    .site-menu-close {
        font-size: 64px;
    }

    .post-layout {
        flex-direction: column;
    }

    .post-media-column,
    .post-text-column {
        width: 100%;
        flex: none;
    }

    .post-content {
        font-size: 18px;
    }

    .bottom-ticker {
        height: 38px;
    }

    .bottom-ticker-item {
        height: 38px;
        font-size: 0.72rem;
        padding: 0 10px;
    }

    main {
        padding-bottom: 96px;
    }
}
