:root {
  --bg: #fff;
  --surface: #fff;
  --surface-border: #dbdbdb;
  --text: #262626;
  --text-soft: #737373;
  --feed-width: 450px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.feed {
  width: min(100%, calc(var(--feed-width) + 24px));
  margin: 0 auto;
  padding: 24px 12px 120px;
}

.post {
  margin: 0 0 26px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  overflow: hidden;
}

.post-media {
  position: relative;
}

.post-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: #fff;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #dbdbdb;
  background: rgba(255, 255, 255, 0.92);
  color: #8e8e8e;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  font-size: 1rem;
  padding: 0;
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}

.post-text {
  padding: 12px;
  border-top: 1px solid var(--surface-border);
}

.post-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.post-subtitle {
  margin: 4px 0 8px;
  font-size: 0.9rem;
  color: #737373;
}

.post-meta {
  margin: 0;
  font-size: 1rem;
  color: var(--text-soft);
}

.sentinel {
  height: 1px;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  z-index: 20;
}

.lightbox.hidden {
  display: none;
}

.lightbox-content {
  width: min(1120px, 100%);
  max-height: min(90vh, 860px);
  background: #fff;
  border: 1px solid #cfd1d4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  position: relative;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
}

.lightbox-media {
  margin: 0;
  background: #fafafa;
  display: grid;
  place-items: center;
  position: relative;
}

.lightbox-media img {
  width: 100%;
  height: 100%;
  max-height: min(90vh, 860px);
  object-fit: contain;
}

.lightbox-nav {
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
}

.lightbox-info {
  padding: 22px 18px;
  overflow: auto;
  border-left: 1px solid #dbdbdb;
}

.lightbox-info h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.lightbox-subtitle {
  margin: 4px 0 12px;
  color: #737373;
  font-size: 0.9rem;
}

.lightbox-info p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.45;
}

.lightbox-info a {
  color: #8e8e8e;
  text-decoration: none;
}

.lightbox-info a:hover {
  color: #737373;
}

.lightbox-details {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--text-soft);
}

.lightbox-close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #262626;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

@media (max-width: 900px) {
  .lightbox-content {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .lightbox-info {
    border-left: 0;
    border-top: 1px solid #dbdbdb;
  }
}

.post.no-subtitle .post-meta {
  margin-top: 8px;
}

.lightbox-link-wrap {
  margin: 0 0 16px;
}
