/* 首页：分类入口 + 异形服务卡 + 商家信息流 */

.home-cats,
.home-ops,
.home-feed {
  padding: 0 16px;
}

/* ---------- 分类：一排横滑，全部固定在左 ---------- */
.home-cats {
  position: relative;
  margin: 6px 0 14px;
  padding-right: 8px;
}
.home-cat-all {
  flex: 0 0 64px;
  width: 64px;
  position: relative;
  z-index: 2;
  align-self: center;
  margin-right: 8px;
  background: none;
}
.home-cat-all::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  right: -8px;
  width: 1px;
  border-radius: 1px;
  background: rgba(60, 60, 67, .28);
}
.home-cats-main {
  min-width: 0;
}
.home-cats-row {
  display: flex;
  align-items: center;
  min-width: 0;
}
.home-cats-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  scrollbar-width: none;
}
.home-cats-scroll::-webkit-scrollbar { display: none; }
.home-cats-grid {
  display: flex;
  align-items: flex-start;
  width: max-content;
  padding: 10px 0 4px;
}
.home-cat {
  position: relative;
  width: 64px;
  border: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-cat-ico {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ios-label);
  background: none;
  border: 0;
}
.home-cat-ico svg { display: block; width: 26px; height: 26px; }
.home-cat-img {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
}
.home-cat-name {
  width: 100%;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ios-label);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-cat:active .home-cat-ico { transform: scale(.92); }

.home-cats-more {
  position: sticky;
  right: 0;
  flex: 0 0 40px;
  width: 40px;
  z-index: 2;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--ios-label);
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #fff 36%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  cursor: pointer;
}
.home-cats-more:active { transform: scale(.96); }
.home-cats-more.is-end {
  opacity: .28;
  pointer-events: none;
}

.home-cats-bubbles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  height: 12px;
  margin-top: 2px;
}
.home-cats-bubbles[hidden] { display: none; }
.home-cats-bubble {
  width: 4px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(60, 60, 67, .22);
  transition: width 180ms ease, background 180ms ease;
}
.home-cats-bubble.is-on {
  width: 5px;
  height: 5px;
  background: #1c1c1e;
}

/* 首页 / 朋友圈。贴在搜索框下，滚的时候留在原地 */
.home-switch {
  position: sticky;
  top: calc(60px + var(--safe-top));
  z-index: 89;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  background: #fff;
  box-shadow: inset 0 -0.5px 0 rgba(60, 60, 67, .16);
}
.home-switch-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(118, 118, 128, .12);
}
.home-switch-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(60, 60, 67, .55);
  font: inherit;
  font-size: 14px;
  font-weight: 560;
  letter-spacing: -0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 280ms ease;
}
.home-switch-tab .icon {
  display: block;
  flex: 0 0 auto;
}
.home-switch-tab.is-on {
  color: #1c1c1e;
  font-weight: 650;
}
.home-moments-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #FF3B30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  letter-spacing: 0;
}
.home-moments-badge[hidden] { display: none; }
.home-switch-mark {
  position: absolute;
  left: 0;
  top: 2px;
  height: 28px;
  width: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .08);
  pointer-events: none;
  transition: none;
}
.home-switch-mark.is-ready {
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1), width 340ms cubic-bezier(0.22, 1, 0.36, 1);
}
.home-switch-tab:active { opacity: .55; }
.home-stage.is-anim {
  position: relative;
  overflow: hidden;
}
.home-stage.is-anim > .ios-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}
.home-stage .is-out-left { animation: homeOutLeft 340ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.home-stage .is-out-right { animation: homeOutRight 340ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.home-stage .is-in-right { animation: homeInRight 340ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.home-stage .is-in-left { animation: homeInLeft 340ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes homeOutLeft {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
}
@keyframes homeOutRight {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(100%, 0, 0); }
}
@keyframes homeInRight {
  from { transform: translate3d(100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes homeInLeft {
  from { transform: translate3d(-100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
.home-moments { background: #fff; }
.moment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px 12px;
  background: #fff;
  box-shadow: inset 0 -0.5px 0 rgba(60, 60, 67, .12);
}
.moment-face {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #E8F8EF center / cover no-repeat;
  color: #07C160;
  font-size: 16px;
  font-weight: 650;
  flex-shrink: 0;
  cursor: pointer;
}
.moment-main { flex: 1; min-width: 0; }
.moment-name {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #007AFF;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.moment-text {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.moment-time {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(60, 60, 67, .45);
}
.home-moments .moments-empty {
  padding: 28px 16px;
  font-size: 13px;
  color: rgba(60, 60, 67, .45);
}

/* 滚过分类栏后，收成一行贴在切换栏下 */
.home-cats-dock {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(60px + var(--safe-top) + 44px);
  z-index: 88;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 -0.5px 0 rgba(60, 60, 67, .16);
  transform: translate3d(0, -110%, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 440ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 240ms ease,
    visibility 0s linear 440ms;
}
.home-cats-dock.is-on {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 460ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 200ms ease,
    visibility 0s;
}
body:not(.tab-home) .home-cats-dock,
body.is-search .home-cats-dock,
body.is-moments .home-cats-dock {
  display: none;
}
.home-cats-dock-bar {
  display: flex;
  align-items: flex-start;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 0 8px;
  max-height: 64px;
  overflow: hidden;
  transition: max-height 420ms cubic-bezier(0.16, 1, 0.3, 1), padding 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.home-cats-dock.is-open .home-cats-dock-bar {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}
.home-cats-dock-sheet {
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.home-cats-dock.is-open .home-cats-dock-sheet {
  max-height: 230px;
  pointer-events: auto;
}
.home-cats-dock-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.home-cats-dock-track::-webkit-scrollbar { display: none; }
.home-cats-dock-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  align-content: start;
  gap: 14px 0;
  box-sizing: border-box;
  padding: 8px 8px 2px;
  scroll-snap-align: start;
}
.home-cats-dock-page .home-dock-chip {
  width: 100%;
  flex: none;
}
.home-cats-dock-bubbles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  height: 16px;
  margin: 0 36px 4px 0;
}
.home-cats-dock-bubbles[hidden] { display: none; }
.home-cats-dock-pin {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  padding: 0 10px 0 6px;
  background: none;
}
.home-cats-dock-pin::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 0;
  width: 1px;
  border-radius: 1px;
  background: rgba(60, 60, 67, .28);
}
.home-cats-dock-row {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0 40px 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  scrollbar-width: none;
}
.home-cats-dock-row::-webkit-scrollbar { display: none; }
.home-dock-chip {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  border: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: inherit;
  color: var(--ios-label);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-dock-chip .home-cat-ico {
  width: 26px;
  height: 26px;
}
.home-dock-chip .home-cat-ico svg,
.home-dock-chip .home-cat-img {
  width: 22px;
  height: 22px;
}
.home-dock-chip .home-cat-img { border-radius: 6px; }
.home-dock-name {
  width: 100%;
  font-size: 10px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-dock-chip:active .home-cat-ico { transform: scale(.92); }
.home-cats-dock-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: rgba(60, 60, 67, .8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-cats-dock-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  border-radius: 1px;
  background: rgba(60, 60, 67, .28);
}
.home-cats-dock.is-open .home-cats-dock-toggle {
  top: auto;
  right: 8px;
  bottom: 6px;
  width: 28px;
  height: 28px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.home-cats-dock.is-open .home-cats-dock-toggle::before { display: none; }
.home-cats-dock-toggle svg {
  display: block;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.home-cats-dock.is-open .home-cats-dock-toggle svg {
  transform: rotate(180deg);
}
.home-cats-dock-toggle:active { opacity: .6; }

/* ---------- 全部页 ---------- */
.all-page { padding-bottom: 8px; }
.all-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 8px;
}
.all-chip {
  border: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  color: var(--ios-label);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.all-chip .home-cat-ico {
  width: 56px;
  height: 56px;
}
.all-chip .home-cat-ico svg,
.all-chip .home-cat-img {
  width: 52px;
  height: 52px;
}
.all-chip .home-cat-img { border-radius: 14px; }
.all-name {
  width: 100%;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.all-enter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: rgba(60, 60, 67, .72);
}
.all-enter svg { display: block; width: 22px; height: 22px; }
.all-chip:active .home-cat-ico,
.all-chip:active .all-enter { transform: scale(.92); }
.all-help {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(60, 60, 67, .72);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.all-help svg {
  flex: 0 0 18px;
  color: var(--ios-label);
}
.all-help-go {
  color: var(--ios-label);
}
.all-help:active { opacity: .6; }
.all-defs { display: flex; flex-direction: column; gap: 14px; }
.all-def-name {
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: var(--ios-label);
}
.all-def-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: rgba(60, 60, 67, .72);
}

/* ---------- 服务卡：左高卡，右上宽卡，右下两张 ---------- */
.home-ops {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  align-items: stretch;
}
.home-op {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-op:active { transform: scale(.985); }
.home-op img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}
.home-op-merchant img { aspect-ratio: 507 / 668; height: auto; }
.home-op-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.home-op-help { flex: 0 0 auto; }
.home-op-help img { aspect-ratio: 696 / 296; height: auto; }
.home-op-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
}
.home-op-idea,
.home-op-fraud {
  min-width: 0;
  min-height: 0;
}
.home-op-idea img,
.home-op-fraud img { object-position: center top; }

/* ---------- 商家信息流。排列由 GoodsBoard 按布局重绘 ---------- */
.home-feed { padding-bottom: 8px; }
.goods-layouts {
  position: fixed;
  right: 0;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: #fff;
  border: 0.5px solid rgba(60, 60, 67, .14);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  overflow: hidden;
}
body:not(.tab-home) .goods-layouts,
body.is-search .goods-layouts,
body.is-moments .goods-layouts { display: none; }
.goods-layouts-panel {
  display: flex;
  flex-direction: column;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease;
}
.goods-layouts.is-open .goods-layouts-panel {
  max-height: 168px;
  opacity: 1;
  pointer-events: auto;
}
.goods-layout,
.goods-layouts-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(60, 60, 67, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.goods-layouts-toggle { color: #007AFF; }
.goods-layouts.is-open .goods-layouts-toggle { color: rgba(60, 60, 67, .55); }
.goods-layout.is-on { color: #007AFF; }
.goods-layout:active,
.goods-layouts-toggle:active { opacity: .45; }
.goods-board { min-width: 0; }
.goods-board[data-layout="seq"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 8px;
  align-items: stretch;
}
.goods-board[data-layout="list"] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.goods-board[data-layout="grid"] {
  display: grid;
  grid-template-columns: repeat(var(--goods-cols, 2), minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.goods-board[data-layout="waterfall"] .goods-board-cols,
.goods-board[data-layout="waterfall"] .goods-board-col {
  gap: 6px;
}
.goods-board-cols {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.goods-board-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-shop {
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #FFFFFF;
  border: 0.5px solid rgba(60, 60, 67, .08);
  background-clip: padding-box;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
  mask-image: radial-gradient(#fff, #000);
}
.home-shop-0 { border-radius: 12px 8px 10px 8px; }
.home-shop-1 { border-radius: 8px 12px 8px 10px; }
.home-shop-2 { border-radius: 10px 8px 12px 8px; }
.home-shop-3 { border-radius: 8px 10px 8px 12px; }
.home-shop-media {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #F2F2F7;
}
.home-shop-0 .home-shop-media { border-radius: 11.5px 7.5px 0 0; }
.home-shop-1 .home-shop-media { border-radius: 7.5px 11.5px 0 0; }
.home-shop-2 .home-shop-media { border-radius: 9.5px 7.5px 0 0; }
.home-shop-3 .home-shop-media { border-radius: 7.5px 9.5px 0 0; }
.home-shop-0 .home-shop-media,
.home-shop-3 .home-shop-media { aspect-ratio: 1; }
.home-shop-1 .home-shop-media { aspect-ratio: 4 / 5; }
.home-shop-2 .home-shop-media { aspect-ratio: 3 / 4; }
.home-shop-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #F2F2F7;
}
.home-shop-seen {
  position: absolute;
  z-index: 1;
  right: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  color: #fff;
  font-size: 9px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.home-shop-body { padding: 10px 10px 12px; }
.home-shop-title {
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.024em;
  line-height: 1.35;
  color: var(--ios-label);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.home-shop-user {
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.home-shop-avatar {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: visible;
  background: var(--ios-fill-3);
}
.home-shop-avatar img,
.home-shop-avatar b {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.home-shop-avatar b {
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  color: var(--ios-label);
}
.home-shop-live {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8E8E93;
  border: 1.5px solid #fff;
  box-sizing: border-box;
}
.home-shop-avatar.is-on .home-shop-live {
  background: var(--ios-green);
}
.home-shop-who {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-shop-name {
  min-width: 0;
  font-size: 12px;
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--ios-label);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-shop-cert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  color: var(--ios-green);
}
.home-shop-cert svg {
  display: block;
  flex: 0 0 auto;
}
.home-shop-cert-text {
  min-width: 0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-shop-stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.home-shop-stat {
  min-width: 0;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ios-label-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-shop-stat b {
  margin-left: 3px;
  font-weight: 650;
  color: var(--ios-label-2);
}
.home-shop-tags {
  display: flex;
  min-width: 0;
  margin-top: 8px;
}
.home-tag-row {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  border-radius: 999px;
  background: var(--ios-fill-3);
  color: var(--ios-label-2);
}
.home-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 0 1 auto;
  padding: 2px 4px 2px 2px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 10px;
  letter-spacing: -0.02em;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.home-tag-sub { padding: 2px 8px 2px 1px; }
.home-tag-arrow {
  flex: 0 0 auto;
  color: rgba(60, 60, 67, .45);
}
.home-tag-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
}
.home-tag-ico svg,
.home-tag-ico img,
.home-tag-ico .home-cat-img {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
}
.home-tag-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-tag:active { opacity: .45; }

/* 分列：左右成对，图和文字底对齐，按行从左读到右 */
.goods-board[data-layout="seq"] .home-shop,
.goods-board[data-layout="grid"] .home-shop,
.goods-board[data-layout="list"] .home-shop {
  border-radius: 10px;
}
.goods-board[data-layout="seq"] .home-shop,
.goods-board[data-layout="grid"] .home-shop {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.goods-board[data-layout="seq"] .home-shop-media,
.goods-board[data-layout="grid"] .home-shop-media,
.goods-board[data-layout="list"] .home-shop-media {
  border-radius: 0;
}
.goods-board[data-layout="seq"] .home-shop-media { aspect-ratio: 4 / 5; }
.goods-board[data-layout="seq"] .home-shop-body,
.goods-board[data-layout="grid"] .home-shop-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.goods-board[data-layout="seq"] .home-shop-title,
.goods-board[data-layout="grid"] .home-shop-title {
  min-height: 2.7em;
}
.goods-board[data-layout="seq"] .home-shop-tags,
.goods-board[data-layout="grid"] .home-shop-tags {
  margin-top: auto;
  padding-top: 8px;
}

/* 等宽网格：方图、同高，像一排目录 */
.goods-board[data-layout="grid"] .home-shop { border-radius: 10px; }
.goods-board[data-layout="grid"] .home-shop-media { aspect-ratio: 1; }
.goods-board[data-layout="grid"] .home-shop-body { padding: 8px 8px 10px; }
.goods-board[data-layout="grid"] .home-shop-title { font-size: 12px; }

/* 瀑布：封面按图片真实宽高撑开，不再裁进固定比例 */
.goods-board[data-layout="waterfall"] .home-shop-media {
  aspect-ratio: auto;
  height: auto;
}
.goods-board[data-layout="waterfall"] .home-shop-cover {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  object-fit: contain;
}
/* 单列：左图右文，横向把信息铺开 */
.goods-board[data-layout="list"] .home-shop {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 124px;
  border-radius: 10px;
}
.goods-board[data-layout="list"] .home-shop-media {
  width: 124px;
  flex: 0 0 124px;
  aspect-ratio: auto;
  align-self: stretch;
}
.goods-board[data-layout="list"] .home-shop-body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title title" "user cert" "tags tags";
  align-items: center;
  column-gap: 8px;
  padding: 12px 12px 12px 10px;
}
.goods-board[data-layout="list"] .home-shop-title {
  grid-area: title;
  font-size: 15px;
  font-weight: 650;
}
.goods-board[data-layout="list"] .home-shop-user {
  grid-area: user;
  margin-top: 8px;
}
.goods-board[data-layout="list"] .home-shop-cert {
  grid-area: cert;
  margin-top: 8px;
}
.goods-board[data-layout="list"] .home-shop-tags { grid-area: tags; }
.goods-board[data-layout="list"] .home-shop-stats {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2px 10px;
}
.goods-board[data-layout="list"] .home-shop-avatar,
.goods-board[data-layout="list"] .home-shop-avatar img,
.goods-board[data-layout="list"] .home-shop-avatar b {
  width: 28px;
  height: 28px;
}
.goods-board[data-layout="list"] .home-shop-avatar { flex-basis: 28px; }
.goods-board[data-layout="list"] .home-shop-avatar b {
  font-size: 13px;
  line-height: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .home-cat:active .home-cat-ico,
  .home-op:active,
  .home-cats-more:active,
  .home-dock-chip:active .home-cat-ico,
  .home-switch-tab:active { transform: none; opacity: 1; }
  .home-switch-mark,
  .home-stage .is-out-left,
  .home-stage .is-out-right,
  .home-stage .is-in-left,
  .home-stage .is-in-right { transition: none; animation: none; }
  .home-cats-dock,
  .home-cats-dock-bar,
  .home-cats-dock-toggle svg,
  .goods-layouts-panel { transition: none; }
  .home-cats-dock-toggle:active { opacity: 1; }
}
