/* 超级助手首页 · 薄荷青轻盈视觉层
 * 仅由 web/index.html 引用，不影响其他页面。
 * 分类和品牌复用同一外框；内容绝对定位，避免文字撑高 1:1 方卡。
 */
.home-page {
  --home-primary: #00bca9;
  --home-primary-ink: #00bca9;
  --home-text: #1b2c30;
  --home-muted: #7f8c90;
  --home-line: #e8eff0;
  --home-gutter: 48px;
  --home-gap: 32px;
  margin: 0;
  padding: 0;
  color: var(--home-text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }
.home-page button, .home-page input { font: inherit; }
.home-page a, .home-page button, .home-page input { -webkit-tap-highlight-color: transparent; }
.home-page a:focus-visible, .home-page button:focus-visible, .home-page input:focus-visible { outline: 3px solid var(--home-primary-ink); outline-offset: 4px; }
.home-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.home-shell { max-width: 896px; margin: 0 auto; padding: 0 var(--home-gutter); background: radial-gradient(ellipse 440px 220px at 85% 170px, #eeedfa80, transparent), radial-gradient(ellipse 490px 350px at 18% 200px, #edfaf7, transparent), #fff; }
.home-page .safe-padding { padding: 0; }
.home-page .header { position: relative; height: 94px; padding-top: env(safe-area-inset-top); border: 0; background: transparent; color: var(--home-text); gap: 18px; }
.home-page .header h1 { font-size: 31px; line-height: 1.2; font-weight: 650; }
.home-identity { display: flex; align-items: center; gap: 13px; }
.home-mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 36%; color: #fff; background: var(--home-primary); font-size: 33px; }
.home-page .mobile-menu, .home-page .pc-nav { color: var(--home-primary-ink); gap: 20px; font-size: 19px; }
.home-page .pc-nav a, .home-page .mobile-menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
.home-page .pc-nav a.active { border-bottom: 2px solid var(--home-primary); }
.home-welcome { position: relative; min-height: 210px; display: flex; align-items: center; margin-bottom: 8px; }
.home-welcome-copy { position: relative; z-index: 1; width: 100%; }
.home-welcome h2 { font-size: 30px; font-weight: 650; line-height: 1.4; color: #00bca9; margin: 0 0 13px; }
.home-subtitle { font-size: 18px; line-height: 1.7; color: var(--home-muted); }
.home-welcome-art { position: absolute; right: -7px; top: 1px; width: 295px; height: auto; mix-blend-mode: multiply; pointer-events: none; }
.home-page .notice-bar { max-width: 470px; margin-top: 13px; padding: 0; background: transparent; border: 0; }
.home-page .notice-wrap { display: flex; gap: 8px; align-items: center; }
.notice-label { flex: none; font-size: 11px; line-height: 20px; border-radius: 999px; color: var(--home-primary-ink); background: #dff4ef; padding: 1px 9px; }
.home-page .notice-track, .home-page .notice-list { height: 24px; line-height: 24px; min-width: 0; }
.home-page .notice-item { font-size: 13px; font-weight: 400; color: var(--home-primary-ink); line-height: 24px; }
.home-page .notice-item { visibility: hidden; pointer-events: none; }
.home-page .notice-item.active { visibility: visible; pointer-events: auto; }
.home-page .notice-item.leave { visibility: visible; }
.home-page .main { padding: 0; }
.home-page .search-box { padding: 27px 28px 30px; border-radius: 36px; border: 1px solid #f1f6f5; box-shadow: 0 10px 28px #234d460d; background: #fffffff2; margin-bottom: 28px; }
.home-page .title { font-size: 24px; font-weight: 600; line-height: 1.4; color: var(--home-text); margin: 0; }
.home-page .search-box .title { margin-bottom: 20px; }
.home-page .search-row { gap: 16px; align-items: stretch; }
.home-search-field { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; padding: 0 20px; border: 1.5px solid #e1e9ec; border-radius: 999px; background: #fff; }
.home-search-field svg { flex: none; width: 23px; height: 23px; fill: none; stroke: #939ea5; stroke-width: 2; stroke-linecap: round; }
.home-search-field:focus-within { border-color: var(--home-primary); box-shadow: 0 0 0 3px #00beaa0d; }
.home-page .search-input { height: 60px; min-width: 0; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--home-text); font-size: 18px; }
.home-page .search-input::placeholder { color: #89969c; }
.home-page .search-btn { min-width: 136px; padding: 12px 24px; border-radius: 999px; font-size: 20px; background: var(--home-primary); color: #fff; }
.home-page .search-btn:hover { background: #00aa97; }
.home-page .section-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; margin: 0 0 28px; }
.home-section-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.home-page .more-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 17px; color: var(--home-primary-ink); white-space: nowrap; }
.home-page .more-link span { font-size: 23px; }
.home-page .cate-grid, .home-page .tag-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--home-gap); margin: 0; }
.home-page .cate-item, .home-page .brand-tag { display: block; position: relative; width: 100%; min-width: 0; height: auto; aspect-ratio: 1 / 1; padding: 0; border: 1px solid var(--home-line); border-radius: 14%; overflow: hidden; background: #ffffffdb; box-shadow: none; transition: border-color .18s, box-shadow .18s; }
.home-page .cate-item:hover, .home-page .brand-tag:hover { border-color: #b7e6db; box-shadow: 0 7px 23px #315d5008; }
.home-square-inner { position: absolute; inset: 8%; display: grid; grid-template-rows: 54% 30% 16%; align-items: center; justify-items: center; text-align: center; }
.home-category-media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.home-page .cate-img { width: 58%; height: 100%; object-fit: contain; border-radius: 24%; padding: 5%; background: linear-gradient(145deg,#effbf8,#e5f7f2); margin: 0; }
.home-page .cate-item:nth-child(3n+2) .cate-img { background: linear-gradient(145deg,#f6f3ff,#edebfa); }
.home-page .cate-item:nth-child(3n) .cate-img { background: linear-gradient(145deg,#fff8f0,#fff0e0); }
.home-page .cate-name { min-height: 0; margin: 0; max-width: 100%; font-size: clamp(11px, 3vw, 19px); line-height: 1.35; font-weight: 500; color: var(--home-text); overflow-wrap: anywhere; }
.home-page .cate-desc { display: block; min-height: 0; margin: 0; font-size: clamp(10px, 2.5vw, 15px); line-height: 1.25; color: var(--home-muted); }
.home-page .brand-tag .home-square-inner { inset: 12% 8%; grid-template-rows: 67% 33%; }
.home-brand-media { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.home-page .brand-tag img { width: auto; height: auto; max-width: 78%; max-height: 75%; border-radius: 0; object-fit: contain; background: transparent; }
.home-page .brand-tag .brand-logo { display: grid; place-items: center; width: 45%; height: auto; aspect-ratio: 1; border-radius: 30%; color: var(--home-primary-ink); font-size: 28px; background: #eaf8f3; }
.home-page .brand-tag .brand-tag-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; white-space: normal; line-height: 1.4; color: var(--home-text); font-size: clamp(12px,3.1vw,20px); overflow-wrap: anywhere; }
.home-page .prod-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 2); gap: 24px; padding: 0 0 12px; margin: 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #d0e9e2 transparent; }
.home-page .prod-card { min-width: 0; width: 100%; border-radius: 28px; border: 1px solid var(--home-line); background: #fff; box-shadow: none; scroll-snap-align: start; }
.home-page .prod-img { display: block; width: 100%; height: auto; aspect-ratio: 1.94 / 1; object-fit: cover; object-position: center; border-radius: 20px; background: #f4f8f7; }
.home-image-placeholder { display: grid!important; place-items: center; color: var(--home-muted); font-size: 14px; }
.home-page .prod-info { padding: 16px 18px 18px; }
.home-page .prod-title { font-size: 16px; font-weight: 500; line-height: 1.5; min-height: 3em; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.home-page .prod-brand { min-height: 3em; font-size: 13px; color: var(--home-muted); margin-bottom: 8px; overflow-wrap: anywhere; }
.home-page .prod-btn { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 5px 14px; border-radius: 999px; background: #eaf8f4; color: var(--home-primary-ink); font-size: 14px; }
.home-page .prod-danger-tag { z-index: 1; top: 12px; left: 12px; max-width: calc(100% - 24px); border-radius: 999px; padding: 5px 10px; background: #fff0ee; color: #b44336; line-height: 1.4; }
.home-page .loading-tip, .home-page .empty-tip { grid-column: 1 / -1; padding: 30px 16px; border-radius: 22px; color: var(--home-muted); background: #f5faf8; font-size: 14px; }
.home-page .footer { position: static; border: 0; padding: 28px 6px calc(26px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--home-muted); background: transparent; line-height: 1.8; }
/* 旧 WebView 不支持 aspect-ratio 时，同样用正方形占位建立外框高度。 */
@supports not (aspect-ratio: 1 / 1) {
  .home-page .cate-item::before, .home-page .brand-tag::before { content: ""; display: block; padding-top: 100%; }
  .home-page .prod-img { height: 180px; }
}
@media (max-width: 640px) {
  .home-page { --home-gutter: 20px; --home-gap: 14px; }
  .home-page .header { height: 76px; }
  .home-page .header h1 { font-size: 25px; }
  .home-identity { gap: 10px; }
  .home-mark { width: 34px; height: 34px; font-size: 27px; }
  .home-page .mobile-menu { font-size: 15px; gap: 12px; }
  .home-welcome { min-height: 159px; }
  .home-welcome h2 { font-size: 24px; margin-bottom: 9px; }
  .home-subtitle { font-size: 13px; }
  .home-welcome-art { width: 186px; opacity: .4; top: 7px; }
  .home-page .notice-bar { max-width: 100%; margin-top: 8px; }
  .home-page .notice-item { font-size: 11px; }
  .home-page .notice-label { font-size: 10px; }
  .home-page .search-box { padding: 21px 20px 23px; border-radius: 24px; margin-bottom: 23px; }
  .home-page .title { font-size: 19px; }
  .home-page .search-box .title { margin-bottom: 15px; }
  .home-page .search-row { gap: 10px; }
  .home-search-field { gap: 9px; padding: 0 13px; }
  .home-search-field svg { width: 19px; height: 19px; }
  .home-page .search-input { height: 39px; font-size: 13px; }
  .home-page .search-btn { min-width: 72px; padding: 10px 17px; font-size: 16px; }
  .home-section-head { gap: 8px; margin-bottom: 10px; }
  .home-page .section-card { margin-bottom: 23px; }
  .home-page .more-link { font-size: 13px; gap: 4px; }
  .home-page .more-link span { font-size: 19px; }
  .home-page .prod-scroll { grid-auto-columns: calc((100% - 16px) / 2); gap: 16px; }
  .home-page .prod-card { border-radius: 20px; }
  .home-page .prod-img { border-radius: 14px; }
  .home-page .prod-info { padding: 12px; }
  .home-page .prod-title { font-size: 13px; }
  .home-page .prod-brand { font-size: 11px; }
  .home-page .prod-btn { font-size: 12px; padding: 5px 10px; }
  .home-page .prod-danger-tag { font-size: 10px; padding: 3px 7px; top: 8px; left: 8px; }
  .home-page .footer { font-size: 11px; padding-top: 24px; }
}
@media (max-width: 400px) {
  .home-page { --home-gutter: 16px; --home-gap: 10px; }
  .home-page .header h1 { font-size: 23px; }
  .home-page .mobile-menu { font-size: 14px; gap: 10px; }
  .home-welcome { min-height: 145px; }
  .home-welcome h2 { font-size: 22px; }
  .home-subtitle { font-size: 12px; }
  .home-welcome-art { width: 155px; opacity: .3; }
  .home-page .search-box { padding: 18px 15px 20px; }
  .home-search-field { padding: 0 10px; gap: 7px; }
  .home-page .search-input { font-size: 12px; }
  .home-page .search-btn { min-width: 63px; padding: 10px 14px; }
  .home-page .title { font-size: 17px; }
  .home-page .more-link { font-size: 11px; }
  .home-page .prod-scroll { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; }
  .home-page .prod-info { padding: 10px; }
  .home-page .prod-title { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-page *, .home-page *::before, .home-page *::after { transition: none!important; scroll-behavior: auto!important; }
}
