@font-face {
  font-family: "Lanhai Vant";
  src: url("/target-assets/vant-icon.woff2") format("woff2");
  font-display: block;
}

body.lanhai-home-view { margin: 0; min-height: 100vh; background: #f8f8fa; }
body.lanhai-home-view > :not(#lanhai-home):not(script):not(link) { display: none !important; }
#lanhai-home [hidden], #lanhai-home[hidden] { display: none !important; }
#lanhai-home {
  --u: calc(min(100vw, 600px) / 420);
  --gutter: calc(13.44 * var(--u));
  --tab-height: calc(55.98 * var(--u));
  --surface: #fff;
  --raised: #f0f1f4;
  --muted: #858d9d;
  --accent: #5d9dfe;
  --ink: #1a1d24;
  width: min(100%, 600px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 calc(var(--tab-height) + env(safe-area-inset-bottom));
  background: #f6f7fb;
  color: var(--ink);
  font: calc(15.6786 * var(--u))/1.45 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Helvetica,"Segoe UI",Arial,Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
}
#lanhai-home, #lanhai-home *, #lanhai-home *::before, #lanhai-home *::after { box-sizing: border-box; }
#lanhai-home h1, #lanhai-home h2, #lanhai-home h3, #lanhai-home p { margin: 0; color: inherit; letter-spacing: 0; }
#lanhai-home a { color: inherit; text-decoration: none; }
#lanhai-home button { appearance: none; border: 0; margin: 0; padding: 0; font: inherit; color: inherit; background: transparent; cursor: pointer; }
#lanhai-home button::after { border: 0; }
#lanhai-home :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#lanhai-home .lh-icon { display: inline-block; flex: none; font: normal 1em/1 "Lanhai Vant"; white-space: nowrap; text-rendering: auto; }

.lh-header {
  position: sticky; top: 0; z-index: 8; height: calc(51.52 * var(--u) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) calc(18 * var(--u)) 0; display: flex; gap: calc(8 * var(--u));
  align-items: center; justify-content: space-between; background: var(--surface);
}
.lh-brand { display: block; width: calc(154 * var(--u)); height: calc(36 * var(--u)); flex: none; }
.lh-brand img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.lh-mode { margin-left: auto; color: var(--muted); font-size: calc(10.51 * var(--u)); white-space: nowrap; }
#lanhai-home .lh-language {
  display: flex; align-items: center; gap: calc(6 * var(--u)); min-width: max-content;
  height: calc(34 * var(--u)); padding: 0 calc(11 * var(--u)) 0 calc(7 * var(--u));
  border-radius: 99px; background: var(--raised); font-weight: 700; font-size: calc(13.48 * var(--u));
}
.lh-language strong {
  width: calc(22 * var(--u)); height: calc(22 * var(--u)); display: grid; place-items: center;
  border-radius: 50%; background: #f6f7fb; font-size: calc(12.55 * var(--u));
}

.lh-hero {
  position: relative; overflow: hidden; height: calc(168 * var(--u)); margin: calc(8.95 * var(--u)) var(--gutter) 0;
  border-radius: calc(15.68 * var(--u)); background: #a40806; box-shadow: 0 calc(7 * var(--u)) calc(15 * var(--u)) #13172106;
  touch-action: pan-y;
}
.lh-hero.lh-forum { background: #1b418e; }
.lh-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lh-dots { position: absolute; display: flex; bottom: calc(8 * var(--u)); left: 50%; transform: translateX(-50%); }
#lanhai-home .lh-dots button {
  width: calc(13.4 * var(--u)); height: calc(15 * var(--u)); display: grid; place-items: center; color: #ffffff55;
}
#lanhai-home .lh-dots button::after {
  content: ""; display: block; width: calc(7 * var(--u)); height: calc(7 * var(--u)); background: currentColor; border-radius: 50%;
}
#lanhai-home .lh-dots button[aria-pressed=true] { color: #5c9eff; }
.lh-highlight-control { display: flex; justify-content: center; margin: calc(8.95 * var(--u)) 0 calc(13.44 * var(--u)); }
#lanhai-home .lh-highlight-control button {
  width: calc(35.84 * var(--u)); height: calc(35.84 * var(--u)); display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); color: var(--accent); box-shadow: 0 calc(5 * var(--u)) calc(13 * var(--u)) #5298ef36;
}
#lanhai-home .lh-highlight-control .lh-icon { font-size: calc(16 * var(--u)); }
.lh-features-open .lh-hero, .lh-features-open .lh-highlight-control button { visibility: hidden; }
.lh-features-open .lh-highlight-control { margin-bottom: 0; }
.lh-highlights {
  margin: 0 var(--gutter) calc(13.44 * var(--u)); padding: calc(17.92 * var(--u)) calc(13.44 * var(--u)) calc(15.68 * var(--u));
  border-radius: calc(13.44 * var(--u)); text-align: center; background: linear-gradient(150deg, #f1f7ff, #fff);
}
#lanhai-home .lh-highlights h2 { font-size: calc(16.8 * var(--u)); font-weight: 800; }
#lanhai-home .lh-highlights p { margin: calc(8.96 * var(--u)) calc(11.2 * var(--u)); line-height: 1.6; }
.lh-wheel { position: relative; width: min(100%, calc(358.39 * var(--u))); margin: auto; aspect-ratio: 1; }
.lh-wheel::before, .lh-wheel::after { content: ""; position: absolute; inset: 9%; border: 1px dashed #b6d7ff8f; border-radius: 50%; }
.lh-wheel::after { inset: 22%; }
.lh-wheel ul { margin: 0; padding: 0; list-style: none; }
.lh-wheel li { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: calc(4.48 * var(--u)); font-size: calc(12.32 * var(--u)); font-weight: 600; white-space: nowrap; }
.lh-wheel li span { display: grid; place-items: center; width: calc(40.31 * var(--u)); height: calc(40.31 * var(--u)); border-radius: calc(12.32 * var(--u)); background: var(--surface); color: var(--accent); font-size: calc(20 * var(--u)); box-shadow: 0 4px 14px #5596e631; }
.lh-wheel-center { position: absolute; inset: 31%; display: grid; place-items: center; border-radius: 50%; background: #dceaff; color: var(--accent); font-size: calc(44 * var(--u)); box-shadow: 0 8px 21px #4788d73b; }
#lanhai-home .lh-highlights > button { min-height: calc(36.44 * var(--u)); margin-top: calc(13.44 * var(--u)); padding: 0 calc(17.92 * var(--u)); border: 1px dashed #a7c9ff; border-radius: calc(16 * var(--u)); background: #1989fa0d; font-weight: 600; }

.lh-shortcuts { margin-inline: var(--gutter); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: calc(8.96 * var(--u)); }
#lanhai-home .lh-shortcuts > * {
  min-width: 0; min-height: calc(87.35 * var(--u)); display: flex; gap: calc(4 * var(--u)); align-items: center;
  justify-content: center; flex-direction: column; border-radius: calc(15.68 * var(--u)); background: var(--surface);
  box-shadow: 0 calc(6 * var(--u)) calc(14 * var(--u)) #15263709;
}
.lh-shortcuts strong { display: block; font-size: calc(13.48 * var(--u)); font-weight: 700; white-space: nowrap; }
.lh-shortcuts small { display: block; color: var(--muted); font-size: calc(11.45 * var(--u)); white-space: nowrap; }
#lanhai-home[lang=en] .lh-shortcuts > :not(.lh-service) strong { padding-inline: 4px; white-space: normal; text-align: center; }
.lh-shortcut-icon {
  display: grid; place-items: center; flex: none; width: calc(38 * var(--u)); height: calc(38 * var(--u));
  border-radius: calc(11 * var(--u)); font-size: calc(20 * var(--u));
}
.lh-action-deposit .lh-shortcut-icon { color: #9954ff; background: #f2e5fb; }
.lh-action-market .lh-shortcut-icon { color: #ff3b61; background: #f9e1e6; }
.lh-action-orders .lh-shortcut-icon { color: #ff9800; background: #fcf0d7; }
.lh-action-payout .lh-shortcut-icon { color: #0da8ea; background: #daf0f9; }
.lh-action-about .lh-shortcut-icon { color: #0ab991; background: #daf2eb; }
.lh-action-messages .lh-shortcut-icon { color: #ee409f; background: #f9e2ed; }
#lanhai-home .lh-shortcuts .lh-service { grid-column: span 2; flex-direction: row; justify-content: space-between; text-align: left; padding-inline: calc(9 * var(--u)); gap: calc(3 * var(--u)); }
.lh-service .lh-shortcut-icon { width: calc(45 * var(--u)); height: calc(45 * var(--u)); color: #6a66ff; background: #e9e7fb; font-size: calc(24 * var(--u)); }

#lanhai-home .lh-notice {
  width: calc(100% - 2 * var(--gutter)); height: calc(44.8 * var(--u)); margin: calc(13.44 * var(--u)) var(--gutter) 0;
  padding: 0 calc(18 * var(--u)); display: flex; align-items: center; gap: calc(9 * var(--u)); text-align: left;
  border-radius: calc(11 * var(--u)); background: var(--surface); box-shadow: 0 calc(3 * var(--u)) calc(9 * var(--u)) #16283b0b;
}
#lanhai-home .lh-notice .lh-icon { font-size: calc(17.92 * var(--u)); }
.lh-notice .lh-icon:last-child { color: var(--muted); }
.lh-notice > span { flex: 1; overflow: hidden; white-space: nowrap; }
.lh-notice > span > span { display: inline-block; animation: lh-notice-scroll 13s linear infinite; }
@keyframes lh-notice-scroll { from { transform: translateX(125%); } to { transform: translateX(-105%); } }
@media (prefers-reduced-motion: reduce) { .lh-notice > span > span { animation: none; } }

.lh-recommend { --trend-gutter: calc(17.12 * var(--u)); margin-top: calc(13.44 * var(--u)); margin-bottom: calc(28 * var(--u)); }
#lanhai-home .lh-recommend h2 { margin: 0 var(--trend-gutter) calc(11.2 * var(--u)); font-size: calc(15.68 * var(--u)); font-weight: 500; line-height: 1.2; }
.lh-strip { display: flex; gap: calc(10 * var(--u)); margin-inline: var(--trend-gutter) calc(25 * var(--u)); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.lh-strip::-webkit-scrollbar { display: none; }
.lh-product { display: block; min-width: 0; overflow: hidden; border: 1px solid #7d849333; border-radius: calc(13.44 * var(--u)); background: var(--surface); font-variant-numeric: tabular-nums; }
.lh-strip .lh-trend {
  flex: 0 0 calc(113 * var(--u)); min-height: calc(172 * var(--u)); padding: calc(14 * var(--u)) calc(13.44 * var(--u)) calc(13.44 * var(--u));
  display: grid; grid-template-rows: auto auto minmax(calc(59 * var(--u)),1fr) auto auto;
  align-items: center; row-gap: calc(3 * var(--u)); border: 0; border-radius: calc(16 * var(--u)); scroll-snap-align: start;
}
#lanhai-home .lh-trend h3 { font-size: calc(15.68 * var(--u)); font-weight: 650; line-height: 1.45; }
.lh-product h3, .lh-product small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lh-trend .lh-symbol, .lh-trend small { color: var(--muted); font-size: calc(10.75 * var(--u)); line-height: 1.4; }
.lh-trend .lh-plot { color: var(--muted); }
.lh-trend .lh-price { font-size: calc(14 * var(--u)); line-height: 1.35; }

#lanhai-home .lh-category {
  position: relative; min-height: calc(49.28 * var(--u)); display: grid; place-items: center;
  background: var(--surface); font-size: calc(15.68 * var(--u)); font-weight: 600;
}
.lh-category::after { content: ""; position: absolute; bottom: 0; width: calc(23 * var(--u)); height: calc(3 * var(--u)); border-radius: 5px; background: var(--accent); }
.lh-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: calc(14.32 * var(--u)); padding: calc(13.44 * var(--u)) var(--gutter); }
.lh-photo { width: 100%; aspect-ratio: 16/9; background: var(--raised); overflow: hidden; }
.lh-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lh-product-data {
  display: grid; align-items: center; grid-template-columns: minmax(0,1fr) auto;
  grid-template-rows: calc(20.16 * var(--u)) calc(20.16 * var(--u)) calc(24.24 * var(--u));
  gap: calc(4.48 * var(--u)) calc(8.96 * var(--u)); padding: calc(11.20 * var(--u)) calc(13.44 * var(--u)) calc(13.44 * var(--u));
}
#lanhai-home .lh-product-data h3 { font-size: calc(15.68 * var(--u)); font-weight: 700; }
.lh-product-data .lh-symbol { font-size: calc(13.44 * var(--u)); font-weight: 700; text-align: right; white-space: nowrap; }
.lh-product-data .lh-price, .lh-product-data small { grid-column: 1/-1; }
.lh-product-data .lh-price { font-size: calc(16.8 * var(--u)); line-height: 1.2; }
.lh-product-data small { font-size: calc(12.32 * var(--u)); color: var(--muted); }
#lanhai-home .lh-status { padding: calc(14 * var(--u)); text-align: center; }
.lh-footer { margin: calc(16 * var(--u)) var(--gutter) 0; padding-bottom: calc(20 * var(--u)); text-align: center; color: var(--muted); font-size: calc(12.4 * var(--u)); }
.lh-footer div { display: flex; justify-content: space-evenly; gap: 8px; margin-bottom: 10px; }
.lh-footer span { display: flex; align-items: center; gap: 4px; }
.lh-footer .lh-icon { color: var(--accent); }

.lh-tabs {
  position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%,600px);
  height: calc(var(--tab-height) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid #e9ebef; display: grid; grid-template-columns: repeat(3,1fr);
}
#lanhai-home .lh-tabs a {
  display: flex; flex-direction: column; gap: calc(4.47 * var(--u)); align-items: center; justify-content: center;
  min-width: 0; padding-top: calc(1.28 * var(--u)); color: #323233; font-size: calc(13.44 * var(--u)); line-height: 1;
}
#lanhai-home .lh-tabs a[aria-current] { color: var(--accent); }
.lh-tabs span {
  width: calc(24.64 * var(--u)); height: calc(24.64 * var(--u)); flex: none; background-color: currentColor;
  mask-repeat: no-repeat; mask-position: center; mask-size: contain;
}
.lh-tab-home { mask-image: url("/target-assets/tab-home.svg"); }
.lh-tab-products { mask-image: url("/target-assets/tab-products.svg"); }
.lh-tab-profile { mask-image: url("/target-assets/tab-profile.svg"); }

#lanhai-home dialog { color: var(--ink); background: var(--surface); border: 0; }
#lanhai-home dialog::backdrop { background: #000b; }
.lh-dialog { width: min(calc(100% - 50 * var(--u)),calc(370 * var(--u))); margin: auto; padding: calc(18 * var(--u)); border-radius: calc(18 * var(--u)); }
.lh-dialog header { display: flex; align-items: center; justify-content: space-between; margin-bottom: calc(11 * var(--u)); font-size: calc(18 * var(--u)); }
#lanhai-home .lh-dialog header button { width: 36px; height: 36px; color: var(--muted); font-size: 20px; }
#lanhai-home .lh-dialog p { padding: calc(13 * var(--u)); border-radius: calc(12 * var(--u)); background: var(--raised); white-space: pre-wrap; overflow-wrap: anywhere; }
#lanhai-home .lh-language-dialog { position: fixed; inset: auto 0 0; max-width: 600px; width: 100%; margin: 0 auto; padding: calc(20 * var(--u)); border-radius: 18px 18px 0 0; background: #f6f7fb; text-align: center; }
#lanhai-home .lh-language-dialog h2 { font-size: calc(19 * var(--u)); }
#lanhai-home .lh-language-dialog p { margin: calc(7 * var(--u)) 0 calc(19 * var(--u)); color: var(--muted); }
#lanhai-home .lh-language-dialog button[data-language] { display: flex; align-items: center; gap: calc(15 * var(--u)); width: 100%; min-height: calc(72 * var(--u)); margin-top: calc(9 * var(--u)); padding-inline: calc(16 * var(--u)); background: var(--surface); border: 1px solid transparent; border-radius: calc(16 * var(--u)); text-align: left; }
#lanhai-home .lh-language-dialog button[aria-pressed=true] { border-color: var(--accent); background: #f0f6ff; }
.lh-language-dialog button[data-language] > span:first-child { display: grid; place-items: center; width: calc(44 * var(--u)); height: calc(44 * var(--u)); border-radius: 50%; background: var(--raised); font-weight: 700; }
.lh-language-dialog button small { display: block; color: var(--muted); }
#lanhai-home .lh-cancel { width: 100%; min-height: calc(52 * var(--u)); margin-top: calc(14 * var(--u)); background: var(--raised); border-radius: 99px; font-weight: 700; }

html[data-theme="dark"]:has(body.lanhai-home-view),
[data-theme="dark"] body.lanhai-home-view { background: #11141b; color-scheme: dark; }
[data-theme="dark"] #lanhai-home {
  --surface: #202634;
  --raised: #2a3141;
  --muted: #aab4c7;
  --ink: #f1f3f8;
  background: #181d28;
}
[data-theme="dark"] #lanhai-home .lh-tabs { border-top-color: #333c4d; }
[data-theme="dark"] #lanhai-home .lh-tabs a:not([aria-current]) { color: var(--ink); }
[data-theme="dark"] #lanhai-home :is(.lh-language strong, .lh-language-dialog) { background: #181d28; }
[data-theme="dark"] #lanhai-home .lh-language-dialog button[aria-pressed=true] {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
[data-theme="dark"] #lanhai-home .lh-highlights {
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface));
}
