/* 从对应 Web SCSS 同步，请运行 npm run sync:styles -w web-native。 */
.home-discover {
  --home-tag: #ef6d4f;
  --home-pill-bg: #fff4f4;
  --home-pill-fg: #fb471f;
  --home-muted: #888;
  --home-likes: #999;
  --home-border: #f1f1f1;
  --home-text: #000;
  position: relative;
  z-index: 0;
  width: 100%;
  padding: 8rem 16rem 24rem;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--home-text);
  font-family: var(--font-ui);
  background: #fff;
  overflow: hidden;
}

.home-discover::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  width: 100%;
  height: 400rem;
  opacity: 0.1;
  pointer-events: none;
  background-image: linear-gradient(191.59deg, rgb(251, 71, 31) 13.86%, rgba(213, 82, 117, 0.618) 40.87%, rgba(152, 101, 255, 0) 95.94%);
  background-position-y: -92rem;
  background-repeat: no-repeat;
}

.home-discover__search {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
  height: 36rem;
  border: 1px solid var(--home-border);
  border-radius: 18rem;
  background: #fff;
  padding: 10rem 8rem 10rem 12rem;
  text-align: left;
  font-size: 14rem;
  font-weight: 400;
  line-height: 20rem;
  color: var(--home-muted);
  margin-bottom: 20rem;
  cursor: pointer;
}

.home-discover__search-icon {
  flex-shrink: 0;
  width: 24rem;
  height: 24rem;
  display: block;
}

.home-discover__section {
  margin-bottom: 24rem;
}

.home-discover__section-title {
  margin: 0 0 12rem;
  font-size: 18rem;
  font-weight: 600;
  line-height: 24rem;
  color: var(--home-text);
}

.home-discover__popular-grid {
  --popular-column-width: min(210rem, calc(100vw - 32rem));
  display: grid;
  grid-template-rows: repeat(3, 80rem);
  grid-auto-flow: column;
  grid-auto-columns: var(--popular-column-width);
  gap: 12rem 16rem;
  width: calc(100% + 16rem);
  margin-right: -16rem;
  padding-right: 16rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.home-discover__popular-grid::-webkit-scrollbar {
  display: none;
}

.home-discover__popular-card {
  display: flex;
  gap: 8rem;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  width: 100%;
  max-width: var(--popular-column-width);
  min-width: 0;
  scroll-snap-align: start;
  cursor: pointer;
}

.home-discover__popular-cover {
  position: relative;
  width: 60rem;
  height: 80rem;
  flex-shrink: 0;
  border-radius: 6rem;
  overflow: hidden;
  background: #f3f3f3;
}

.home-discover__popular-cover img {
  object-fit: cover;
}

.home-discover__cover-fallback {
  width: 100%;
  height: 100%;
  background: #f3f3f3;
}

.home-discover__popular-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  min-height: 80rem;
}

.home-discover__popular-title {
  margin: 0;
  font-size: 14rem;
  font-weight: 500;
  line-height: 20rem;
  color: var(--home-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-discover__popular-tags {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4rem;
  min-width: 0;
  overflow: hidden;
}

.home-discover__popular-tag {
  font-size: 12rem;
  font-weight: 400;
  line-height: 16rem;
  color: var(--home-tag);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-discover__popular-tag-sep {
  flex-shrink: 0;
  width: 1px;
  height: 8rem;
  background: #b2b2b2;
}

.home-discover__popular-heat {
  margin: 0;
  font-size: 11rem;
  font-weight: 400;
  line-height: 16rem;
  color: var(--home-likes);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-discover__recommend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24rem 16rem;
}

.home-discover__recommend-card {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  width: 100%;
  min-width: 0;
  cursor: pointer;
}

.home-discover__recommend-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 165/220;
  border-radius: 8rem;
  overflow: hidden;
  background: #f3f3f3;
  margin-bottom: 4rem;
}

.home-discover__recommend-cover img {
  object-fit: cover;
}

.home-discover__recommend-title {
  margin: 0;
  font-size: 14rem;
  font-weight: 500;
  line-height: 20rem;
  color: var(--home-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-discover__recommend-desc {
  margin: 0;
  font-size: 12rem;
  font-weight: 400;
  line-height: 16rem;
  color: var(--home-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32rem;
}

.home-discover__recommend-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 4rem;
  margin-top: 4rem;
  overflow: hidden;
}

.home-discover__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16rem;
  padding: 2rem 6rem;
  border-radius: 4rem;
  background: var(--home-pill-bg);
  color: var(--home-pill-fg);
  font-size: 10rem;
  font-weight: 400;
  line-height: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.home-discover__empty {
  font-size: 14rem;
  color: var(--home-muted);
}

.home-discover__loading {
  font-size: 14rem;
  color: var(--home-muted);
  padding: 16rem 0;
}

.home-discover__story-list {
  display: flex;
  flex-direction: column;
  gap: 12rem;
}

.home-discover__story-card {
  display: flex;
  align-items: center;
  gap: 12rem;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.home-discover__story-cover {
  position: relative;
  flex: 0 0 80rem;
  width: 80rem;
  height: 107rem;
  border-radius: 8rem;
  overflow: hidden;
  background: #f3f3f3;
}

.home-discover__story-meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4rem;
  min-width: 0;
}

.home-discover__story-tags {
  display: flex;
  gap: 4rem;
  margin-top: 8rem;
  overflow: hidden;
}

.home-discover__story-tag {
  padding: 2rem 6rem;
  border-radius: 4rem;
  background: rgba(255, 116, 85, 0.15);
  color: var(--home-pill-fg);
  font-size: 12rem;
  line-height: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-discover__feed-status {
  min-height: 48rem;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12rem 0;
  color: var(--home-muted);
  font-size: 12rem;
  text-align: center;
}

.home-discover__feed-status button {
  border: 0;
  padding: 8rem;
  background: transparent;
  color: var(--home-pill-fg);
  cursor: pointer;
}
