﻿:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: #4a4a4a;
  --line: #d5d5d5;
  --button-line: #b6b6b6;
  --selected-bg: #000000;
  --selected-ink: #ffffff;
  --source-airstrafe-bg: #efefef;
  --source-steam-bg: #17233a;
  --source-steam-ink: #c7d5e0;
}

* {
  box-sizing: border-box;
}

html,
body {
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', Consolas, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.35;
}

.site-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: 188px 280px 1fr;
  background: #fff;
}

.site-shell.section-mode {
  grid-template-columns: 188px 1fr;
}

.column {
  background: #fff;
  border-right: 1px solid var(--line);
}

.left-rail,
.post-rail {
  box-shadow: 12px 0 14px -16px rgba(0, 0, 0, 0.8);
}

.left-rail {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100vh;
}

.brand {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand-icon {
  width: auto;
  height: 24px;
  max-width: 170px;
  border-radius: 0;
  object-fit: contain;
  flex-shrink: 0;
}

.primary-nav,
.social-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.links-button {
  display: none;
}

.nav-emoji {
  line-height: 1;
}

.mobile-dropdown[hidden] {
  display: none !important;
}

.domain-note {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ui-button {
  border: 1px solid var(--button-line);
  border-radius: 4px;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.ui-button:hover {
  background: #ececec;
  border-color: #7b7b7b;
}

.ui-button:active {
  background: #dcdcdc;
  color: #000;
  transform: translate(1px, 1px);
}

.ui-button.selected {
  background: var(--selected-bg);
  color: var(--selected-ink);
}

.ui-button.selected:hover {
  background: #111;
  color: #fff;
}

.ui-button:focus-visible {
  outline: 1px solid #000;
  outline-offset: 1px;
}

.social-button {
  width: 100%;
}

.social-button::after {
  content: "\2197";
  margin-left: auto;
  font-size: 10px;
  line-height: 1;
  opacity: 0.85;
}

@media (min-width: 881px) {
  .links-button .nav-emoji {
    display: none;
  }

  .links-button {
    display: inline-flex;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
    gap: 5px;
    cursor: default;
    pointer-events: none;
  }

  .links-button:hover,
  .links-button:active,
  .links-button.selected {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    transform: none;
  }
}

.icon-image-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  min-width: 14px;
  height: 14px;
}

.icon-image {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.post-rail {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}

.post-item {
  --post-cover-image: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px;
  border: 0;
  border-radius: 3px;
  background: transparent;
}

.post-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--post-cover-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.post-item.has-cover-image::before {
  opacity: 0.45;
}

.post-item.has-cover-image:hover::before {
  opacity: 0.15;
}

.post-item.has-cover-image.selected::before {
  opacity: 0.12;
}

.post-item > * {
  position: relative;
  z-index: 1;
}

.post-item:active {
  transform: translateX(1px);
}

.post-item:hover {
  background: #ececec;
}

.post-item.selected {
  background: #000;
  color: #fff;
}

.post-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

.post-age {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.post-item.selected .post-age {
  color: #d4d4d4;
}

.archive-group {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f9f9f9;
}

.archive-group > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #1f1f1f;
}

.archive-group > summary::-webkit-details-marker {
  display: none;
}

.archive-group > summary::after {
  content: '+';
  margin-left: auto;
  font-size: 12px;
}

.archive-group[open] > summary::after {
  content: '-';
}

.archive-post-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 5px 5px;
}

.content-pane {
  border-right: 0;
  padding: 12px;
}

.post-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.post-content h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.section-tabs {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.section-tab-button {
  padding: 4px 8px;
  font-size: 12px;
}

.section-content > :last-child {
  margin-bottom: 0;
}

.post-content .steam-post-body h1,
.post-content .steam-post-body h2,
.post-content .steam-post-body h3,
.post-content .steam-post-body h4 {
  margin: 14px 0 10px;
  line-height: 1.25;
}

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

.post-content .steam-post-body h2 {
  font-size: 16px;
}

.post-content .steam-post-body h3 {
  font-size: 14px;
}

.post-content .steam-post-body h4 {
  font-size: 13px;
}

.post-content li {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
}

.post-content p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}

.post-content .steam-post-body .steam-spacer {
  margin: 0;
  min-height: 12px;
}

.post-content .steam-post-body .steam-media {
  margin: 12px auto 16px;
  text-align: center;
}

.post-content .steam-video {
  position: relative;
  width: 100%;
  margin: 12px 0 16px;
  padding-top: 56.25%;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.post-content .steam-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-content .steam-original-link {
  margin-top: 14px;
}

.post-content figure {
  margin: 8px auto 16px;
  text-align: center;
}

.post-content img,
.post-content .post-image {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 8px auto 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 4px;
  display: block;
}

.post-content a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 1px;
}

.post-content a:hover {
  color: #3c3c3c;
}

.entry-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.loading,
.empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 14px;
}

.badge {
  border: 1px solid #c5c5c5;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1;
  color: #333;
  background: #f2f2f2;
}

.badge-link {
  text-decoration: none;
}

.badge-link:hover {
  background: #e9e9e9;
}

.badge-source-airstrafe {
  background: var(--source-airstrafe-bg);
}

.badge-source-steam {
  border-color: #2a475e;
  background: var(--source-steam-bg);
  color: var(--source-steam-ink);
}

.meta-badges .badge-source-steam.badge-link,
.meta-badges .badge-source-steam.badge-link:visited,
.meta-badges .badge-source-steam.badge-link:hover,
.meta-badges .badge-source-steam.badge-link:active {
  color: var(--source-steam-ink);
}

.meta-badges .badge-source-steam.badge-link:hover,
.meta-badges .badge-source-steam.badge-link:focus-visible {
  background: #1b2f49;
  border-color: #355f7b;
  color: #ffffff;
}

.badge-source-michaelduan {
  border-color: #8f7a4c;
  background: #f6edd6;
  color: #3a2f1b;
}

.badge-source-host {
  border-style: dashed;
  color: #4f4f4f;
  background: #fafafa;
}

.reactions {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.reactions h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.reaction-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.reaction-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.reaction-chip {
  border: 1px solid var(--button-line);
  border-radius: 12px;
  background: #f3f3f3;
  color: #000;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

.reaction-chip:hover {
  background: #e8e8e8;
}

.reaction-chip:active {
  transform: translate(1px, 1px);
}

.reaction-chip.selected {
  background: #000;
  color: #fff;
  border-color: #000;
}

.reaction-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.reaction-action {
  min-width: 44px;
  justify-content: center;
}

.reaction-thumb {
  min-width: 54px;
}

.reaction-plus {
  min-width: 40px;
  font-weight: 700;
}

.reaction-picker {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  max-width: 320px;
  background: #fafafa;
}

.reaction-search {
  width: 100%;
  border: 1px solid var(--button-line);
  border-radius: 4px;
  padding: 5px 7px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.reaction-search:focus-visible {
  outline: 1px solid #000;
  outline-offset: 1px;
}

.reaction-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 132px;
  overflow-y: auto;
}

.reaction-picker-item {
  border: 1px solid var(--button-line);
  border-radius: 6px;
  background: #fff;
  width: 32px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 17px;
  cursor: pointer;
}

.reaction-picker-item:hover {
  background: #ececec;
}

.reaction-picker-item:active {
  transform: translate(1px, 1px);
}

.post-navigation {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.post-nav-slot {
  flex: 1 1 0;
  min-width: 0;
}

.post-nav-next {
  text-align: right;
}

.post-nav-link {
  border: 0;
  background: transparent;
  color: #000;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  padding: 0;
  text-align: inherit;
  text-decoration: underline;
  text-underline-offset: 1px;
  cursor: pointer;
}

.post-nav-link:hover {
  color: #3c3c3c;
}

.post-nav-link:active {
  transform: translateX(1px);
}

.post-nav-link:focus-visible {
  outline: 1px solid #000;
  outline-offset: 1px;
}

.post-nav-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 880px) {
  .site-shell {
    display: block;
    min-height: 100vh;
  }

  .column {
    border-right: 0;
    box-shadow: none;
  }

  .left-rail {
    position: sticky;
    top: 0;
    z-index: 30;
    overflow: visible;
    background: #fff;
    min-height: 0;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .primary-nav {
    flex-direction: row;
    gap: 5px;
    position: relative;
    z-index: 40;
  }

  .primary-nav .nav-button {
    flex: 1 1 0;
    justify-content: center;
  }

  .links-button {
    display: inline-flex;
  }

  .social-links {
    display: none;
    position: absolute;
    z-index: 35;
    margin-top: 0;
    padding: 6px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 14px -16px rgba(0, 0, 0, 0.85);
    max-height: 56vh;
    overflow-y: auto;
  }

  .site-shell.mobile-links-open .social-links {
    display: flex;
  }

  .mobile-dropdown {
    position: absolute;
    z-index: 35;
    padding: 6px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 14px -16px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-posts-dropdown {
    max-height: 62vh;
  }

  .mobile-posts-dropdown .post-list {
    max-height: calc(62vh - 34px);
    overflow-y: auto;
  }

  .post-rail {
    display: none !important;
  }

  .domain-note {
    display: none;
  }

  .content-pane {
    border-bottom: 0;
    padding: 14px 16px 18px;
  }

  .post-content {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .left-rail {
    padding-left: 14px;
    padding-right: 14px;
  }

  .content-pane {
    padding-left: 18px;
    padding-right: 18px;
  }

  .post-navigation {
    flex-direction: column;
    gap: 8px;
  }

  .post-nav-next {
    text-align: left;
  }
}
