﻿:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: #4a4a4a;
  --line: #d5d5d5;
  --button-line: #b6b6b6;
  --selected-bg: #000000;
  --selected-ink: #ffffff;
}

* {
  box-sizing: border-box;
}

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 258px 1fr;
  background: #fff;
}

.site-shell.home-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-face {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  border: 1px solid #cfcfcf;
}

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

.primary-nav .links-button {
  display: none;
}

.links-label {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-dropdown[hidden],
.social-links[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;
}

.nav-button .nav-icon {
  font-size: 12px;
  line-height: 1;
}

.social-button {
  width: 100%;
}

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

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  min-width: 14px;
  font-size: 12px;
}

.icon-svg svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

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

.post-rail.is-hidden {
  display: none;
}

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

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

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

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

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

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

.post-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
}

.post-image-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right center;
  opacity: 0.24;
  filter: saturate(0.95) contrast(1.02);
  transition: opacity 0.12s ease, filter 0.12s ease;
  pointer-events: none;
}

.post-item.has-image:hover .post-image-overlay {
  opacity: 0.16;
}

.post-item.has-image.selected .post-image-overlay {
  opacity: 0.08;
  filter: saturate(0.7) brightness(0.86);
}

.post-item.has-image.selected:hover .post-image-overlay {
  opacity: 0.1;
}

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

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

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

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

.home-content p,
.home-content li,
.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-subtitle {
  display: block;
  text-align: center;
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
}

.home-content ol,
.post-content ol {
  margin: 0 0 8px 18px;
  padding: 0;
}

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

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

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

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

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

.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: translate(1px, 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,
  .site-shell.home-mode {
    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;
  }

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

  .links-label {
    display: none;
  }

  .social-links {
    display: none;
    position: absolute;
    z-index: 42;
    left: 12px;
    right: 12px;
    top: 72px;
    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: 42;
    left: 12px;
    right: 12px;
    top: 72px;
    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;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .mobile-posts-dropdown .post-list::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

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

  .domain-note {
    display: none;
  }

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

}

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

  .social-links,
  .mobile-dropdown {
    left: 14px;
    right: 14px;
    top: 74px;
  }

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

  .reaction-picker {
    max-width: none;
  }

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

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