:root {
  --bg: #f7f0e8;
  --bg-accent: #f3c98b;
  --surface: rgba(255, 248, 240, 0.74);
  --surface-strong: #fffaf4;
  --surface-warm: #fff0dc;
  --ink: #2f1c12;
  --ink-soft: #735446;
  --border: rgba(92, 55, 33, 0.14);
  --shadow: 0 24px 60px rgba(84, 47, 25, 0.14);
  --accent: #c7562b;
  --accent-deep: #8f2f17;
  --accent-soft: rgba(199, 86, 43, 0.14);
  --success: #356b43;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 153, 0.9), transparent 32%),
    radial-gradient(circle at right 12%, rgba(217, 126, 74, 0.25), transparent 24%),
    linear-gradient(180deg, #fff8f0 0%, var(--bg) 46%, #f0dfd0 100%);
}

img {
  display: block;
  max-width: 100%;
}

.avatar {
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 248, 240, 0.9);
  box-shadow: 0 10px 22px rgba(84, 47, 25, 0.14);
}

.avatar--medium {
  width: 2.8rem;
  height: 2.8rem;
}

.avatar--large {
  width: 3.25rem;
  height: 3.25rem;
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 4rem;
}

.post-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 0.98;
}

h3 {
  font-size: 1.55rem;
}

.post-card__caption,
.post-card__meta,
.foodos-summary__users,
.current-user__label,
.post-card__time,
.foodos-summary__count {
  color: var(--ink-soft);
}

.topbar {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 0;
  margin-bottom: 1.35rem;
  padding: 0 1.25rem;
  overflow: visible;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 248, 240, 0.78);
  box-shadow: 0 18px 40px rgba(84, 47, 25, 0.1);
  backdrop-filter: blur(18px);
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: min(100%, 980px);
  min-height: 4.5rem;
  margin: 0 auto;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  margin-block: -2.2rem;
}

.topbar__logo {
  width: min(100%, 16rem);
  height: 13.2rem;
  object-fit: contain;
  object-position: left center;
}

.current-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--surface-warm);
}

.feed-section {
  margin-top: 0;
}

.post-feed {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 980px);
  margin: 0 auto;
}

.post-card {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 252, 248, 0.92);
}

.post-card__image,
.post-card__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.post-card__image {
  object-fit: cover;
}

.post-card__placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(243, 201, 139, 0.9), rgba(199, 86, 43, 0.55)),
    linear-gradient(180deg, #f6d7b0, #ea8a5b);
}

.post-card__placeholder[hidden] {
  display: none;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: 1.4rem;
}

.post-card__topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.post-card__author-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.post-card__author {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.post-card__meta,
.post-card__caption,
.post-card__time,
.foodos-summary__count,
.foodos-summary__users {
  margin: 0;
}

.post-card__headline {
  display: grid;
  gap: 0.45rem;
}

.post-card__caption {
  font-size: 1rem;
  line-height: 1.6;
}

.post-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.55 / 1;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(243, 201, 139, 0.9), rgba(199, 86, 43, 0.55)),
    linear-gradient(180deg, #f6d7b0, #ea8a5b);
}

.post-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding-top: 0.2rem;
}

.foodos-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.15rem;
  background: var(--accent);
  color: #fff8f3;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
  box-shadow: 0 12px 24px rgba(143, 47, 23, 0.18);
}

.foodos-button:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
}

.foodos-button.is-active {
  background: var(--success);
}

.foodos-button__icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.foodos-summary {
  display: grid;
  gap: 0.25rem;
}

.foodos-summary__topline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.foodos-summary__avatars {
  display: flex;
  align-items: center;
}

.foodos-summary__avatar {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 252, 248, 0.95);
  box-shadow: 0 6px 16px rgba(84, 47, 25, 0.1);
}

.foodos-summary__avatar + .foodos-summary__avatar {
  margin-left: -0.45rem;
}

.foodos-summary__count {
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 860px) {
  .post-feed {
    grid-template-columns: 1fr;
    width: min(100%, 640px);
  }

  .post-card__media {
    aspect-ratio: 1.3 / 1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 0;
  }

  .post-card__body {
    padding: 1.2rem;
  }

  .topbar {
    padding-inline: 0.75rem;
  }

  .topbar__inner {
    width: min(100%, 640px);
  }

  .current-user {
    align-self: flex-end;
  }

  .post-card__topline,
  .post-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card__footer {
    align-items: stretch;
  }

  .foodos-summary {
    text-align: left;
  }
}
