:root {
  color-scheme: light;
  --ink: #20241f;
  --muted: rgba(32, 36, 31, 0.62);
  --line: rgba(92, 122, 122, 0.16);
  --green: #5c7a7a;
  --leaf: #7f9b7f;
  --warm: #f7f2e9;
  --paper: rgba(255, 255, 255, 0.92);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(222, 238, 223, 0.68), rgba(247, 242, 233, 0.9) 42%, rgba(235, 243, 241, 0.86)),
    #f7f2e9;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 40px;
  padding: 42px 0 36px;
}

.hero__brand {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(54px, 10vw, 112px);
  line-height: 0.98;
  font-weight: 800;
  color: var(--green);
}

.hero__lead {
  max-width: 640px;
  margin-top: 24px;
  color: rgba(32, 36, 31, 0.74);
  font-size: 20px;
  line-height: 1.8;
}

.identity {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(16px);
}

.identity__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.identity__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.identity__mode,
.refresh {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  font-weight: 800;
}

.identity__mode {
  padding: 0 16px;
  background: rgba(92, 122, 122, 0.1);
  color: var(--green);
}

.identity__mode.is-active {
  background: var(--green);
  color: #fff;
}

.identity__note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.feed {
  margin-top: 24px;
}

.feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

h2 {
  font-family: "Songti SC", "STSong", serif;
  color: var(--green);
  font-size: 32px;
  line-height: 1.2;
}

.refresh {
  padding: 0 18px;
  background: var(--green);
  color: #fff;
}

.status {
  margin: 18px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.food-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 36px rgba(92, 122, 122, 0.08);
}

.food-card__photoButton {
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  display: block;
  cursor: pointer;
  background: #e8eee7;
}

.food-card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #e8eee7;
}

.food-card__photo--share {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  padding: 12px;
  box-sizing: border-box;
  background: #f7f3ec;
}

.food-textPoster {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(246, 244, 238, 0.96), rgba(232, 240, 229, 0.94)),
    #f6f4ee;
  color: var(--ink);
  overflow: hidden;
}

.food-textPoster::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -46px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 28px solid rgba(92, 122, 122, 0.1);
}

.food-textPoster__brand {
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.food-textPoster__title {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 29px;
  line-height: 1.24;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.food-textPoster__text {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: rgba(32, 36, 31, 0.72);
  font-size: 15px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.food-textPoster__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: rgba(32, 36, 31, 0.52);
  font-size: 13px;
  font-weight: 800;
}

.food-textPoster__score {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  color: #38653c;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.food-textPoster--detail {
  min-height: 420px;
  aspect-ratio: auto;
}

.food-textPoster--detail .food-textPoster__title {
  max-width: 680px;
  font-size: 42px;
}

.food-textPoster--detail .food-textPoster__text {
  max-width: 720px;
  font-size: 18px;
}

.food-card__photoScore {
  position: absolute;
  right: 12px;
  top: 12px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #38653c;
  background: rgba(246, 251, 242, 0.92);
  box-shadow: 0 8px 18px rgba(32, 36, 31, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.food-card__body {
  padding: 20px;
}

.food-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.food-card__author {
  min-width: 0;
  font-weight: 800;
  color: rgba(32, 36, 31, 0.72);
}

.food-card__score {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(127, 155, 127, 0.16);
  color: #476c47;
  font-weight: 900;
}

.food-card__title {
  margin-top: 14px;
  font-family: "Songti SC", "STSong", serif;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.28;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.food-card__section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(92, 122, 122, 0.12);
}

.food-card__sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.food-card__sectionTitle {
  color: rgba(32, 36, 31, 0.64);
  font-size: 13px;
  font-weight: 900;
}

.food-card__expand {
  flex-shrink: 0;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  cursor: pointer;
  color: var(--green);
  background: rgba(92, 122, 122, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.food-card__sectionText,
.food-card__text,
.food-card__review {
  margin-top: 10px;
  color: rgba(32, 36, 31, 0.76);
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.food-card__section--review .food-card__sectionText,
.food-card__review {
  color: rgba(71, 108, 71, 0.86);
}

.food-card__time {
  margin-top: 16px;
  color: rgba(32, 36, 31, 0.46);
  font-size: 13px;
}

.food-detail {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.food-detail__mask {
  position: absolute;
  inset: 0;
  background: rgba(32, 36, 31, 0.48);
}

.food-detail__panel {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: auto;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 60px rgba(32, 36, 31, 0.24);
}

.food-detail__close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 2;
  margin: 12px 12px 0 0;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  cursor: pointer;
  color: #ffffff;
  background: var(--green);
  font-weight: 900;
}

.food-detail__images {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #f7f3ec;
}

.food-detail__imageLink {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f3ec;
}

.food-detail__image {
  width: 100%;
  max-height: 78vh;
  display: block;
  object-fit: cover;
  background: #f7f3ec;
}

.food-detail__image--share {
  object-fit: contain;
}

.food-detail__body {
  padding: 24px;
}

.food-detail__title {
  margin-top: 14px;
  font-family: "Songti SC", "STSong", serif;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.28;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.food-detail__section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(92, 122, 122, 0.12);
}

.food-detail__sectionTitle {
  margin: 0;
  color: rgba(32, 36, 31, 0.64);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 900;
}

.food-detail__sectionText {
  margin-top: 12px;
  color: rgba(32, 36, 31, 0.78);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.food-detail__section--review .food-detail__sectionText {
  color: rgba(71, 108, 71, 0.88);
}

.empty {
  grid-column: 1 / -1;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .identity {
    max-width: 520px;
  }

  .food-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page {
    width: min(100% - 24px, 1120px);
    padding-top: 26px;
  }

  .hero {
    gap: 26px;
    padding-bottom: 18px;
  }

  .hero__lead {
    font-size: 17px;
  }

  .feed__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .food-grid {
    grid-template-columns: 1fr;
  }
}
