#app.ref-surface {
  --page: #f5f5f5;
  --paper: #fff;
  --ink: #333;
  --muted: #666;
  --line: #eee;
  --jade: #ff5142;
  --sage: #ffe9e7;
  --radius: 10px;
  --serif: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  font-family: var(--serif);
  color: var(--ink);
}

#app.ref-surface .topbar {
  position: relative;
  justify-content: center;
  min-height: calc(44px + env(safe-area-inset-top));
  border-bottom: 1px solid #eee;
  background: #fff;
  text-align: center;
}
#app.ref-surface .topbar strong { font-size: 16px; }
#app.ref-surface .topbar .back,
#app.ref-surface .top-action { position: absolute; top: env(safe-area-inset-top); height: 43px; }
#app.ref-surface .topbar .back { left: 7px; margin: 0; }
#app.ref-surface .topbar .back svg { stroke-width: 1.45px; }
#app.ref-surface .top-action { right: 11px; min-width: 43px; padding: 0; border: 0; background: none; font-size: 14px; color: #333; }
#app.ref-surface .bottom-nav { padding: 0 0 env(safe-area-inset-bottom); border-color: #b8b8b8; background: #fff; }
#app.ref-surface .bottom-nav a { min-height: 49px; align-content: center; gap: 3px; border-radius: 0; background: none; color: #666; font-size: 10px; }
#app.ref-surface .bottom-nav a[aria-current='page'] { color: #ff4400; font-weight: 400; }
#app.ref-surface .bottom-nav img { width: 23px; height: 23px; }

#app.ref-home { background: #f5f6fa; }
#app.ref-home .topbar { color: #fff; background: #f45d5c; border: 0; }
#app.ref-home .topbar strong { font-weight: 400; }
#app.ref-home .page { display: block; padding: 0 0 calc(50px + env(safe-area-inset-bottom)); }
#app.ref-home .bottom-nav { border-top: .5px solid #ddd; }
#app.ref-home .bottom-nav a { min-height: 49.5px; align-content: start; padding-top: 6px; gap: .5px; line-height: 14px; }
#app.ref-home .bottom-nav img { width: 24px; height: 24px; }
.ref-home-top { padding: 11px 15px 10px; background: #f45d5c; }
.ref-home-top .hero { margin: 0 4.5px; border-radius: 2px; touch-action: pan-y; }
.ref-home-top .hero-slide img { aspect-ratio: 351 / 127.8; object-fit: cover; object-position: center; }
.ref-home-top .carousel-dots { bottom: 3px; }
.ref-home-top .carousel-dots button { height: 17px; }
.ref-home-top .carousel-dots button::after { width: 6px; height: 4px; }
.ref-home-top .carousel-dots button[aria-pressed='true']::after { width: 11px; }
.ref-notice { display: flex; align-items: center; gap: 12px; padding: 10px 15px; min-height: 44px; margin-top: 10px; border-radius: 5px; background: #fff; }
.ref-notice strong { flex: none; width: 31px; height: 18px; display: grid; place-items: center; background: #f45d5c; color: #fff; border-radius: 8px; font-size: 10px; font-weight: 400; }
.ref-notice p { font-size: 12px; color: #f90; white-space: pre-wrap; overflow-wrap: anywhere; }
.ref-new-products { padding: 16px 15px 10px; margin-top: 10px; background: #fff; }
.ref-more-products { padding: 16px 10px 0; }
.ref-new-products h2, .ref-more-products h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; font-size: 16px; }
.ref-more-products h2 { margin-left: 5px; }
.ref-new-products h2::before, .ref-more-products h2::before { content: ''; width: 3px; height: 15px; border-radius: 1px; background: #f45d5c; }
.ref-featured-list { display: flex; gap: 15px; overflow-x: auto; scrollbar-width: thin; }
.ref-home-featured-item { flex: 0 0 90px; position: relative; overflow: hidden; border-radius: 5px; color: #fff; }
.ref-home-featured-item h3 { position: absolute; inset: auto 0 0; padding: 12px 4px 3px; background: linear-gradient(transparent, #0009); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 400; }
.ref-home-item { min-height: 101px; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 11px 10px; border-radius: 5px; background: #fff; box-shadow: 0 1px 4px #0002; }
.ref-home-item .product-photo { flex: 0 0 70px; width: 70px; border-radius: 5px; }
.ref-home-item h3 { overflow-wrap: anywhere; font-size: 16px; }
.ref-home-item strong { display: block; color: #f54a6c; margin-top: 4px; font-size: 16px; }
.ref-product-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ref-product-tags span { border-radius: 4px; background: #ffe9ea; color: #f54a6c; padding: 2px 5px; font-size: 13px; }
.ref-home-end { display: flex; align-items: center; gap: 18px; min-height: 39px; color: #999; font-size: 12px; }
.ref-home-end::before, .ref-home-end::after { flex: 1; height: 1px; content: ''; background: #e8e8e8; }
.ref-home-footer { min-height: 62px; padding: 10px 15px; background: #fff; text-align: center; color: #999; font-size: 11px; }

#app.ref-market { background: #fff; }
#app.ref-market .page { padding: 0 0 calc(50px + env(safe-area-inset-bottom)); }
.ref-scene { padding: 13px 15px 31px; min-height: 204px; background: #f6f6f6; }
.ref-scene-card { display: block; position: relative; height: 160px; padding: 32px 12px 12px; text-align: center; border-radius: 10px; color: #fff; box-shadow: 0 2px 6px #0001; background: #b82338 url('./assets/reference/scene-bg.svg') center / 100% 100%; }
.ref-scene-card h1 { font-size: 16px; font-weight: 400; }
.ref-scene-card p { margin-top: 12px; font-size: 15px; font-variant-numeric: tabular-nums; }
.ref-scene-card strong { position: absolute; bottom: 10px; right: 10px; min-width: 62px; min-height: 32px; display: grid; place-items: center; padding: 3px 8px; font-size: 14px; font-weight: 400; border-radius: 10px; background: #ff9e00; }
.ref-scene .message { margin-top: 10px; }
#app.ref-catalog { background: #f0f0fa; }
#app.ref-catalog .page { padding: 0; gap: 0; }
.ref-sort { display: grid; grid-template-columns: 1.23fr 1.23fr 1.23fr .74fr; min-height: 64px; align-items: center; border-bottom: 1px solid #e5e5ee; background: #fff; text-align: center; }
.ref-sort a { display: grid; align-items: center; min-height: 44px; white-space: nowrap; font-size: clamp(13px, 3.7vw, 15px); }
.ref-sort a[aria-current='page'] { color: #ff5142; font-weight: 700; }
.ref-catalog-products { padding: 0 9px 16px; }
.ref-catalog-products .product-grid { gap: 10px 17px; }
.ref-lot-card { border: 0; border-radius: 5px; padding: 5px; box-shadow: 0 2px 5px #11112612; }
.ref-lot-card .product-photo { border-radius: 5px; aspect-ratio: 1.08; }
.ref-lot-card .product-copy { padding: 14px 0 8px; gap: 18px; }
.ref-lot-card h3 { font-size: 14px; font-weight: 400; }
.ref-lot-card .product-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.ref-lot-card strong { color: #ff5142; font-size: 16px; overflow-wrap: anywhere; }
.ref-lot-card .product-copy span { border-radius: 18px; background: #ff5142; color: white; padding: 5px 7px; font-size: 12px; white-space: nowrap; }
.ref-catalog-products .pagination { padding-top: 12px; }
.ref-catalog-products .ref-lot-list { grid-template-columns: 1fr; }
.ref-lot-list .ref-lot-card { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 11px; }
.ref-lot-list .ref-lot-card .product-copy { padding-right: 6px; }
#app:is(.ref-product, .ref-recommendation) { background: #f0f0fa; }
#app:is(.ref-product, .ref-recommendation) .page { padding: 0 0 calc(59px + env(safe-area-inset-bottom)); gap: 0; }
#app.ref-recommendation .page { padding-bottom: env(safe-area-inset-bottom); }
.ref-detail-media { background: #fff; padding: 2px 5px 8px; }
.ref-detail-media .detail-photo { border-radius: 5px; aspect-ratio: 1.04; }
.ref-detail-info { display: grid; gap: 10px; padding: 9px 5px; }
.ref-detail-info article { border: 0; border-radius: 6px; padding: 15px; }
.ref-detail-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; }
.ref-detail-name h1, .ref-detail-description h2 { font-size: 16px; }
.ref-detail-name strong, .ref-product-action > strong { color: red; font-size: 18px; white-space: nowrap; }
.ref-detail-description p { padding-top: 12px; color: #777; font-size: 14px; line-height: 1.5; }
.ref-product-action.action-bar { position: fixed; left: 50%; right: auto; bottom: 0; transform: translateX(-50%); display: flex; justify-content: space-between; align-items: center; gap: 8px; width: min(100%, 520px); padding: 10px 15px calc(9px + env(safe-area-inset-bottom)); background: #fff; }
.ref-product-action.action-bar .btn { width: auto; min-height: 36px; min-width: 126px; border: 0; border-radius: 11px; background: #ff0202; color: #fff; font-weight: 700; font-size: 14px; }
.ref-product-action.action-bar .btn:disabled:not([data-countdown]) { background: #aca6a6; }

#app:is(.ref-login, .ref-register, .ref-reset) { color: #000; background: #fff; }
#app.ref-surface .ref-auth-page { display: block; position: relative; padding: 0 20px 32px; background: #fff url('./assets/reference/tab_page_head_bg.png') top center / 100% auto no-repeat; }
.ref-auth-heading { height: 134px; padding-top: 31px; }
.ref-auth-heading h1 { font-size: 24px; line-height: 1.28; color: #000; }
.ref-login .ref-auth-heading { height: 155px; }
.ref-auth-form { display: block; border: 0; padding: 20px; border-radius: 5px; box-shadow: 0 5px 20px #0002; }
.ref-auth-form h2 { display: grid; justify-items: center; margin-bottom: 10px; color: #3b91ea; font-size: 16px; font-weight: 400; }
.ref-auth-form h2::after { content: ''; display: block; width: 31px; height: 2px; border-radius: 1px; margin-top: 9px; background: #3b91ea; }
.ref-login .ref-auth-form h2 { margin-bottom: 10px; }
.ref-auth-form > .field, .ref-auth-form .code-field .field { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 0; min-height: 60px; padding-top: 11px; font-size: 16px; color: #000; }
.ref-auth-form > .field, .ref-auth-form .code-field { border-bottom: 1px solid #e8e8e8; }
.ref-login .ref-auth-form > .field { min-height: 65px; }
.ref-auth-form .field > span { font-weight: 400; white-space: nowrap; }
.ref-auth-form .field input { padding: 0; border: 0; min-height: 38px; background: transparent; color: #000; }
.ref-auth-form .field input::placeholder { color: #b9bec8; opacity: 1; }
.ref-auth-form .code-field { align-items: center; gap: 4px; }
.ref-auth-form .code-field .btn { min-height: 30px; border: 1px solid #00b6ff; background: #fff; color: #00b6ff; padding: 3px 12px; border-radius: 13px; font-size: 12px; font-weight: 400; white-space: nowrap; }
.ref-auth-form .btn.full { min-height: 42px; border: 1px solid #85c9e1; background: linear-gradient(30deg, #93e8f1, #94c1f2 99%); color: white; border-radius: 2.5px; font-size: 16px; font-weight: 700; margin-top: 18px; }
.ref-auth-form .btn.full:disabled { opacity: .65; }
.ref-auth-form .form-links { justify-content: space-between; margin-top: 15px; }
.ref-auth-form :is(a.text-link, .auth-policy a) { color: #3b91ea; text-decoration: none; }
.ref-auth-form .auth-policy { justify-content: center; margin-top: 10px; gap: 9px; font-size: 12.5px; }
.ref-auth-form .auth-policy input { width: 19px; height: 19px; flex-basis: 19px; accent-color: #3b91ea; }
.ref-login .ref-auth-form .auth-policy { position: fixed; z-index: 2; inset: auto 0 calc(10px + env(safe-area-inset-bottom)); width: min(100%, 520px); margin: 0 auto; padding: 4px 7px; background: #fff; }
.ref-login .ref-auth-page { padding-bottom: 49px; }
.ref-auth-note { margin-top: 15px; color: #a5a5a5; font-size: 13px; }
@media (max-width: 365px) {
  .ref-auth-form { padding-inline: 15px; }
  .ref-auth-form > .field, .ref-auth-form .code-field .field { grid-template-columns: 65px minmax(0, 1fr); }
  .ref-auth-form .field input { font-size: 14px; }
  .ref-auth-form .code-field .btn { padding-inline: 6px; }
}

#app.ref-mine { background: #f5f5f5; }
#app.ref-mine .page { padding: 0 15px calc(74px + env(safe-area-inset-bottom)); gap: 10px; }
.ref-user-hero { min-height: calc(117px + env(safe-area-inset-top)); margin-inline: -15px; display: flex; align-items: center; gap: 15px; padding: calc(10px + env(safe-area-inset-top)) 15px 0; background: #f45d5c; color: #fff; }
.ref-user-hero > img { width: 66px; aspect-ratio: 1; flex: 0 0 66px; border-radius: 50%; border: 2px solid #fff4; object-fit: cover; }
.ref-user-hero > div { flex: 1; min-width: 0; }
.ref-user-hero p { font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.ref-user-hero p strong { font-size: 17px; }
.ref-user-hero p span { font-size: 13px; }
.ref-user-hero > a { min-width: 25px; min-height: 44px; display: grid; align-items: center; }
.ref-user-hero > a img { width: 20px; height: 20px; margin-left: auto; }
.ref-mine :is(.order-shortcuts, .ref-pickup-shortcuts, .ref-wallet, .ref-user-menu) { border: 0; box-shadow: 0 1px 5px #0001; }
.ref-mine :is(.order-shortcuts, .ref-pickup-shortcuts) { min-height: 125px; padding: 15px; }
.ref-mine :is(.order-shortcuts, .ref-pickup-shortcuts) header { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 13px; }
.ref-mine :is(.order-shortcuts, .ref-pickup-shortcuts) h2 { font-size: 16px; font-weight: 400; }
.ref-mine .order-shortcuts header a { display: flex; align-items: center; font-size: 16px; color: #999; }
.ref-mine .order-shortcuts header svg { width: 14px; height: 14px; }
.ref-mine .shortcuts a { color: #666; font-size: 16px; gap: 6px; }
.ref-mine .shortcuts img { width: 27px; height: 27px; }
.ref-mine .ref-pickup-shortcuts { min-height: 104px; }
.ref-pickup-shortcuts > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ref-pickup-shortcuts a { display: flex; align-items: center; justify-content: center; min-height: 32px; gap: 4px; color: #666; font-size: 16px; }
.ref-pickup-shortcuts img { width: 27px; height: 27px; }
.ref-wallet { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 10px; }
.ref-wallet a { display: grid; gap: 2px; position: relative; min-height: 77px; padding: 13px 32px 12px 15px; background: #fff5e6; color: #666; }
.ref-wallet a + a { background: #e6f0ff; }
.ref-wallet a img { position: absolute; width: 37px; right: 4px; bottom: 5px; }
.ref-wallet strong { color: #ff9900; font-size: 17px; }
.ref-wallet a + a strong { color: #1890ff; }
.ref-wallet span { font-size: 16px; }
.ref-user-menu.menu { padding: 0; }
.ref-user-menu .menu-row { min-height: 52px; padding-inline: 15px; font-size: 16px; }
.ref-user-menu .menu-row > img { width: 19px; height: 19px; }
.ref-user-menu .chevron svg { width: 15px; height: 15px; }
.ref-user-menu .menu-row small { color: #999; }
