:root {
  --bg: #faf5ec;
  --card: #ffffff;
  --text: #2e2a26;
  --muted: #8b8378;
  --green: #4c8c3c;
  --green-dark: #3a6b2e;
  --green-soft: #e8f2e2;
  --bacon: #d4595e;
  --bacon-dark: #b23a44;
  --bacon-soft: #fbe9e7;
  --leather: #8a6d4b;
  --radius: 18px;
  --shadow: 0 2px 12px rgba(70, 50, 20, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 14px; }

/* ---------- шапка ---------- */
.site-header {
  background: var(--card);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--green) 0 50%, var(--bacon) 50% 100%) 1;
  position: sticky; top: 0; z-index: 10;
  box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-img { height: 40px; width: auto; }
.brand-name { font-weight: 800; font-size: 17px; color: var(--text); white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--bacon); font-size: 13px; vertical-align: 2px; }
.nav { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 15px; }
.nav a.active { color: var(--bacon-dark); }

.btn-max {
  background: linear-gradient(135deg, #6b4df5, #9a4df5);
  color: #fff !important;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-max:hover { text-decoration: none; filter: brightness(1.08); }
.btn-max-big { display: inline-block; padding: 12px 26px; font-size: 17px; }

/* ---------- hero ---------- */
.hero {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 4px 8px;
}
.hero-img { width: 240px; height: auto; flex-shrink: 0; }
.hero-text h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.hero-text .vs { font-style: normal; color: var(--bacon); }
.hero-text p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- рубрики ---------- */
.chips-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  background: var(--card); border: 1.5px solid var(--green-soft);
  color: var(--green-dark);
  padding: 6px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.chip:hover { text-decoration: none; border-color: var(--green); }
.chip-active { background: var(--green); border-color: var(--green); color: #fff; }
.chip-n { opacity: .65; font-size: 12px; }
.chip-sm { padding: 3px 10px; font-size: 13px; background: var(--green-soft); border: 0; }

/* ---------- карточки ленты ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { border-radius: 50%; width: 44px; height: 44px; object-fit: cover; background: var(--green-soft); }
.card-channel { font-weight: 700; font-size: 15px; }
.card-date { color: var(--muted); font-size: 13px; }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; }
.card-title { margin: 0 0 10px; font-size: 19px; line-height: 1.3; }
.card-link:hover .card-title { color: var(--green-dark); }
.card-text { margin: 10px 0 0; color: #4b453e; }
.post-chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.card-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0ebe1;
  font-weight: 600; font-size: 14px;
}
.read-more { color: var(--bacon-dark); }
.max-link { color: var(--muted); font-weight: 500; }

/* ---------- галерея ---------- */
.gallery { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; }
.gallery-1 { grid-template-columns: 1fr; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery-3 { grid-template-columns: 1fr 1fr; }
.gallery-3 .g-item:first-child { grid-column: 1 / -1; }
.gallery-4 { grid-template-columns: 1fr 1fr; }
.g-item { position: relative; }
.g-item img, .g-item video { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery-1 .g-item img, .gallery-1 .g-item video { aspect-ratio: auto; max-height: 640px; object-fit: contain; background: #14110d; }
.gallery-1 .g-item img { background: transparent; }
.post-full .g-item img.zoomed { object-fit: contain; max-height: none; cursor: zoom-out; }
.g-video-stub { width: 100%; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #3a352e, #14110d); }
.play-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 22px; pointer-events: none;
}
.play-badge::before {
  content: ""; position: absolute; width: 58px; height: 58px;
  background: rgba(0,0,0,.55); border-radius: 50%;
}

/* ---------- пагинация ---------- */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 2px 8px; gap: 8px;
}
.page-btn {
  background: var(--card); box-shadow: var(--shadow);
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.page-btn:hover { text-decoration: none; color: var(--bacon-dark); }
.page-num { color: var(--muted); font-size: 13px; }

/* ---------- страница поста ---------- */
.post-full { margin-top: 18px; }
.post-title { font-size: 24px; line-height: 1.25; margin: 4px 0 14px; }
.post-text { margin-top: 14px; }
.post-text p { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: break-word; }
.hashtags { margin-top: 10px; color: var(--green); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-cta { margin-top: 18px; text-align: center; }
.post-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.back-link { text-align: center; padding: 14px 0 6px; }

/* ---------- о канале / пустые состояния ---------- */
.about h2 { font-size: 19px; margin-top: 22px; }
.about-img { display: block; margin: 10px auto; }
.about-list { padding-left: 4px; list-style: none; }
.about-list li { margin: 8px 0; }
.about-note { color: var(--muted); font-size: 14px; }
.empty-state { text-align: center; padding: 44px 10px; color: var(--muted); }
.empty-state img { opacity: .95; }

/* ---------- подвал ---------- */
.site-footer {
  margin-top: 34px; background: var(--card);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--green) 0 50%, var(--bacon) 50% 100%) 1;
  padding: 26px 0 20px; text-align: center;
}
.footer-socials p { color: var(--muted); margin: 0 0 12px; }
.footer-copy { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---------- мобильная ---------- */
@media (max-width: 560px) {
  .hero { flex-direction: column; text-align: center; padding-top: 16px; }
  .hero-img { width: 200px; }
  .hero-text h1 { font-size: 22px; }
  .brand-name { display: none; }
  .nav { gap: 10px; font-size: 14px; }
  .card { padding: 13px; border-radius: 14px; }
  .card-title { font-size: 17px; }
}
