:root {
  --bg: #ffffff;
  --text: #000000;
  --blue: #0000ff;
  --red: #ff0000;
  --green: #00eb00;
  --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;
}

a {
  color: inherit;
}

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

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

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

.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: #ff0000;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15.1px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.badge-image {
  position: absolute;
  inset: 19.5%;
  width: 62%;
  height: 62%;
  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;
}

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

.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;
}

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

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

@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;
  }

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

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

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