.feed-page {
  --max-width: 1120px;
}

.feed-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  gap: 16px;
  align-items: end;
  padding: clamp(18px, 2.4vw, 26px);
  margin-bottom: 22px;
}

.feed-toolbar label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.feed-count {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  min-height: 52px;
}

.feed-list {
  display: grid;
  gap: clamp(14px, 2vw, 18px);
}

.feed-card {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 22px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(10, 14, 28, 0.76);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 22px 60px rgba(0,0,0,0.32);
  backdrop-filter: blur(18px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.feed-card:focus-visible {
  outline: 3px solid rgba(255, 87, 51, 0.7);
  outline-offset: 4px;
}

.feed-card:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255,87,51,0.08), transparent 44%),
    rgba(12, 17, 34, 0.84);
}

.feed-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,87,51,.22), transparent 34%),
    linear-gradient(135deg, rgba(29,30,61,.9), rgba(10,10,21,.88));
  border: 1px solid var(--line);
}

.feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.feed-card-body {
  min-width: 0;
}

.feed-card h2 {
  margin: 12px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.feed-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 14px;
}

.feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.feed-empty {
  padding: 28px;
  text-align: center;
}

.to-top-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(13, 19, 38, 0.82);
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.to-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top-button:hover {
  border-color: rgba(255, 87, 51, 0.65);
  background:
    linear-gradient(135deg, rgba(255, 87, 51, 0.16), transparent 56%),
    rgba(13, 19, 38, 0.9);
}

@media (hover: hover) {
  .feed-card:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 860px) {
  .feed-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .feed-count {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .feed-card {
    grid-template-columns: 150px 1fr;
    gap: 18px;
  }

  .feed-card h2 {
    font-size: clamp(23px, 4vw, 30px);
  }
}

@media (max-width: 760px) {
  .feed-toolbar {
    grid-template-columns: 1fr;
  }

  .feed-count {
    min-height: 0;
  }

  .feed-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
  }

  .feed-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
  }

  .feed-card h2 {
    margin-top: 10px;
    font-size: clamp(25px, 7vw, 34px);
    line-height: 1.04;
  }

  .feed-card p {
    font-size: 15px;
    line-height: 1.5;
  }
}

@media (max-width: 420px) {
  .feed-card {
    padding: 16px;
  }

  .feed-card h2 {
    font-size: clamp(23px, 7.5vw, 30px);
    letter-spacing: -0.035em;
  }

  .feed-meta {
    font-size: 13px;
  }

  .feed-tags {
    gap: 6px;
  }

  .to-top-button {
    width: 44px;
    height: 44px;
    right: 14px;
    bottom: 14px;
    font-size: 21px;
  }
}
