/* 美食推荐 / 真实美食：网页渲染的信息流，图片是纯照片，文字全部由网页叠加。 */
.feed-screen {
  --feed-green: #2f7a4b;
  position: absolute;
  inset: 0;
  color: var(--ink);
  font-family: SimSun, STSong, serif;
  font-size: clamp(10px, min(0.95vw, 1.69vh), 18px);
  background:
    radial-gradient(rgba(23, 21, 18, 0.16) 0.7px, transparent 0.9px) 0 0 / 6px 6px,
    linear-gradient(160deg, #3d5c4b, #20352b);
}

.feed-screen.is-waiting-media {
  visibility: hidden;
}

.feed-screen button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.feed-button {
  padding: 0.35em 1.1em;
  border: 2px outset #fff;
  border-radius: 0;
  background: var(--system-panel);
}

.feed-button:active { border-style: inset; }
.feed-button:disabled { color: #8a8678; cursor: default; }

.feed-button.is-primary {
  color: #fff;
  font-weight: 700;
  background: var(--print-green);
}

/* 顶部任务条 */
.mission-banner {
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  top: 2.5%;
  z-index: 2;
  padding: 0.7em 1.2em 0.6em;
  background:
    repeating-linear-gradient(0deg, transparent 0 1.9em, rgba(32, 78, 120, 0.16) 1.9em calc(1.9em + 1px)),
    #f3e9a8;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
  transform: rotate(-0.3deg);
}

.mission-head {
  display: flex;
  align-items: center;
  gap: 0.8em;
  font-size: 1.55em;
}

.mission-tag {
  flex: none;
  padding: 0.05em 0.5em;
  color: #fff;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--print-red);
  transform: rotate(-2deg);
}

.mission-progress {
  margin-left: auto;
  color: var(--print-red);
  font-weight: 700;
  font-size: 1.15em;
  white-space: nowrap;
}

.mission-reqs {
  display: flex;
  gap: 0.7em;
  margin: 0.5em 0 0;
  padding: 0;
  list-style: none;
}

.mission-reqs li {
  display: flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.25em 0.8em;
  border: 2px solid var(--ink);
  font-size: 1.3em;
  font-weight: 700;
  background: #fffdf2;
}

.mission-feedback {
  min-height: 1.5em;
  margin: 0.4em 0 0;
  font-size: 1.3em;
}

.mission-feedback.is-bad { color: var(--print-red); font-weight: 700; }
.mission-feedback.is-good { color: var(--print-green); font-weight: 700; }

/* 信息流窗口 */
.feed-browser {
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  top: 22.5%;
  bottom: 2.5%;
  display: flex;
  flex-direction: column;
  border: 2px outset #fff;
  background: var(--system-panel);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.45);
}

.feed-screen.is-real .feed-browser { top: 17%; }

.feed-browser-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.9em;
  padding: 0.1em 0.2em 0.1em 0.6em;
  color: #fff;
  font-weight: 700;
  font-size: 0.85em;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, var(--xp-blue), var(--xp-blue-light));
}

.feed-browser-close {
  width: 1.9em;
  height: 1.6em;
  padding: 0;
  border: 2px outset #fff;
  border-radius: 0;
  color: #fff !important;
  font: 700 1em/1 Tahoma, SimSun, sans-serif !important;
  background: #c8322d;
}

.feed-browser-close:disabled {
  color: #d5d1cb !important;
  background: #8b817b;
  cursor: not-allowed !important;
}

.feed-viewport {
  flex: 1;
  min-height: 0;
  padding: 0.9em 1.2em;
  background: #f6f7f4;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.9em 1em;
  height: 100%;
}

.feed-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  text-align: left;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif !important;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.feed-card:hover { border-color: var(--feed-green); }
.feed-card.is-hint { animation: feed-hint-pulse 0.9s steps(2, end) 3; }

.feed-photo {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 4px 4px 0 0;
  background: #ddd center / cover no-repeat;
}

.feed-title {
  padding: 0.45em 0.6em 0.2em;
  overflow: hidden;
  font-size: 1.05em;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.2em 0.6em 0.5em;
  color: #6d6d6d;
  font-size: 0.85em;
}

.feed-avatar {
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  color: #fff;
  font-size: 0.85em;
  background: var(--feed-green);
}

.feed-author {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0.1em 0.45em;
  border: 3px solid currentColor;
  font-family: SimSun, STSong, serif;
  font-size: 1.6em;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%) rotate(-12deg);
  pointer-events: none;
}

.card-stamp.is-fresh { animation: feed-stamp-in 0.22s steps(3, end) both; }
.card-stamp.is-flaw,
.card-stamp.is-ad { color: var(--print-red); }
.card-stamp.is-skip { color: #6b675c; font-size: 1.1em; }
.card-stamp.is-ad { font-size: 2.3em; }

.feed-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4em 0.6em;
  font-size: 0.95em;
}

/* 帖子详情 */
.feed-detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(10, 12, 10, 0.5);
}

.feed-detail {
  width: 70%;
  border: 2px outset #fff;
  background: var(--system-panel);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.45);
  animation: feed-pop-in 0.2s steps(3, end) both;
}

.feed-detail .xp-title {
  display: flex;
  justify-content: space-between;
  padding: 0.35em 0.6em;
  color: #fff;
  font-weight: 700;
  font-size: 0.85em;
  background: linear-gradient(90deg, var(--xp-blue), var(--xp-blue-light));
}

.feed-detail-body {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 1.3em;
  padding: 1.2em;
  background: #fff;
}

.feed-detail-photo {
  aspect-ratio: 1 / 1;
  border: 1px solid #c9c4b2;
  background: #ddd center / cover no-repeat;
}

.feed-detail-info { font-size: 1.1em; }

.feed-detail-info h3 {
  margin: 0 0 0.2em;
  font-size: 1.45em;
}

.feed-detail-author {
  margin: 0 0 0.8em;
  color: #6b675c;
}

.feed-detail-tip {
  margin: 0.4em 0 0.5em;
  color: var(--print-blue);
  font-size: 0.9em;
}

.feed-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55em 0.9em;
  margin: 0;
  padding: 0.8em 1em;
  border: 1px solid #ddd8c8;
  background: #faf8f1;
}

.feed-facts dt { color: #6b675c; }
.feed-facts dd { margin: 0; font-weight: 700; }

.sign-swatch {
  display: inline-block;
  width: 1.4em;
  height: 0.9em;
  margin-right: 0.4em;
  border: 1px solid rgba(0, 0, 0, 0.35);
  vertical-align: -0.05em;
}

.feed-lines {
  display: grid;
  gap: 0.4em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feed-line {
  width: 100%;
  padding: 0.5em 0.7em;
  border: 1px solid #ddd8c8;
  text-align: left;
  line-height: 1.5;
  background: #faf8f1;
}

.feed-line:hover { border-color: var(--xp-blue-light); background: #eef4fc; }

.feed-line.is-flaw {
  border-color: var(--print-red);
  color: var(--print-red);
  background: #fbeceb;
}

.feed-line.is-shake { animation: feed-shake 0.3s steps(4, end); }

.line-verdict {
  display: block;
  margin-top: 0.15em;
  font-weight: 700;
  font-size: 0.9em;
}

.feed-line.is-ok .line-verdict { color: #6b675c; font-weight: 400; }

.feed-verdict {
  min-height: 1.6em;
  margin: 0.8em 0 0;
  font-weight: 700;
}

.feed-verdict.is-bad { color: var(--print-red); }
.feed-verdict.is-good { color: var(--print-green); }

.feed-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7em;
  padding: 0.6em 1.2em;
  border-top: 1px solid #c9c4b2;
  font-size: 1.1em;
}

/* 真实美食：全部广告现形 */
.feed-reveal-banner {
  position: absolute;
  left: 50%;
  bottom: 6%;
  z-index: 8;
  width: 60%;
  padding: 0.9em 1.2em;
  text-align: center;
  color: #fff;
  font-size: 1.4em;
  font-weight: 700;
  background: var(--print-red);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.45);
  transform: translateX(-50%) rotate(-0.8deg);
}

.feed-reveal-banner.is-fresh { animation: feed-banner-in 0.3s steps(3, end) both; }

.feed-reveal-banner .feed-button { margin-top: 0.7em; color: var(--ink); }

/* 找对面馆后白光一闪，接进店视频的白色首帧 */
.feed-white-flash {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: radial-gradient(circle, #fff 0 30%, #f7f7f5 70%);
  animation: feed-white-flash 0.5s ease-in both;
}

@keyframes feed-white-flash {
  from { opacity: 0; transform: scale(0.4); }
}

@keyframes feed-stamp-in {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(1.8); }
}

@keyframes feed-pop-in {
  from { opacity: 0; transform: translateY(12px); }
}

@keyframes feed-banner-in {
  from { opacity: 0; transform: translateX(-50%) rotate(-0.8deg) translateY(12px); }
}

@keyframes feed-hint-pulse {
  50% { border-color: var(--print-red); box-shadow: 0 0 0 4px rgba(179, 41, 36, 0.35); }
}

@keyframes feed-shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
