:root {
  --bg: #f8f8f8;
  --panel: #ffffff;
  --text-main: #333333;
  --text-soft: #666666;
  --text-light: #999999;
  --red: #ff4d4f;
  --red-light: #fff0f0;
  --border: #f0f0f0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--bg); color: var(--text-main); font-family: sans-serif; }
body { padding-bottom: 140px; }
button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; }
input, textarea { width: 100%; border: 0; outline: none; background: transparent; font: inherit; color: var(--text-main); }
img { display: block; max-width: 100%; }

.app-shell { max-width: 430px; margin: 0 auto; position: relative; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* Header */
.zz-header { display: flex; align-items: center; justify-content: center; height: 44px; font-size: 16px; font-weight: bold; position: relative; background: #fff; }
.zz-header__logo { position: absolute; left: 12px; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; padding: 0; background: none; border: none; cursor: pointer; }
.zz-header__logo-img { max-height: 24px; max-width: 80px; object-fit: contain; }
.zz-header__logo-text { font-size: 18px; font-weight: bold; color: var(--red); }

/* Search */
.zz-search-wrap { padding: 8px 12px; background: #fff; }
.zz-search { display: flex; align-items: center; background: #f5f5f5; border-radius: 20px; padding: 8px 16px; height: 36px; }
.zz-search input { flex: 1; font-size: 14px; margin-left: 8px; }
.zz-search__btn { font-size: 14px; color: var(--red); font-weight: bold; padding-left: 12px; border-left: 1px solid #e0e0e0; margin-left: 8px; }

/* Banner */
.zz-banner { margin: 12px; height: 84px; border-radius: 12px; background: linear-gradient(90deg, #9b7afe, #785cff); color: #fff; padding: 16px; position: relative; }
.zz-banner__title { font-size: 18px; font-weight: bold; margin-bottom: 6px; }
.zz-banner__sub { font-size: 12px; background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 10px; display: inline-block; }

/* Category Grid */
.zz-cat-box { margin: 12px; background: #fff; border-radius: 12px; overflow: hidden; }
.zz-cat-row { display: flex; border-bottom: 1px solid #f9f9f9; }
.zz-cat-row:last-child { border-bottom: none; }
.zz-cat-left { width: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: bold; padding: 16px 0; position: relative; line-height: 1.4; }
.zz-cat-left--1 { background: linear-gradient(135deg, #ff7a68, #ff4d4f); }
.zz-cat-left--2 { background: linear-gradient(135deg, #6ab5ff, #4d88ff); }
.zz-cat-left--3 { background: linear-gradient(135deg, #9b7afe, #785cff); }
.zz-cat-left span { font-size: 10px; border: 1px solid rgba(255,255,255,0.6); border-radius: 50%; width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.zz-cat-right { flex: 1; display: flex; flex-wrap: wrap; padding: 8px 0; }
.zz-cat-item { width: 25%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; }
.zz-cat-item img { width: 32px; height: 32px; margin-bottom: 4px; object-fit: contain; }
.zz-cat-item span { font-size: 11px; color: #333; }
.zz-cat-more { text-align: center; font-size: 12px; color: #999; padding: 12px; border-top: 1px solid #f9f9f9; }

/* Valuation */
.zz-val-box { margin: 12px; background: #fff; border-radius: 12px; overflow: hidden; }
.zz-val-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #fffdf8; font-weight: bold; font-size: 15px; border-bottom: 1px solid #fcf0e5; }
.zz-val-header span { color: var(--red); font-size: 14px; }
.zz-val-body { display: flex; padding: 12px; gap: 8px; }
.zz-val-card { flex: 1; background: #fcfcfc; border-radius: 8px; padding: 12px; display: flex; position: relative; }
.zz-val-card__tag { position: absolute; top: 0; left: 0; background: #f0f0f0; color: #999; font-size: 10px; padding: 2px 6px; border-radius: 8px 0 8px 0; }
.zz-val-card img { width: 48px; height: 48px; object-fit: contain; margin-right: 8px; margin-top: 12px; }
.zz-val-card__info { display: flex; flex-direction: column; justify-content: center; margin-top: 8px; }
.zz-val-card__name { font-size: 12px; margin-bottom: 4px; color: #666; }
.zz-val-card__price { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 6px; }
.zz-val-card__btn { font-size: 11px; color: var(--red); border: 1px solid var(--red); border-radius: 12px; padding: 2px 8px; text-align: center; }

.zz-val-add { width: 100px; background: #fcfcfc; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.zz-val-add__icon { width: 32px; height: 32px; background: #f0f0f0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #666; margin-bottom: 8px; }
.zz-val-add__text { font-size: 12px; color: #333; }
.zz-val-add__sub { font-size: 10px; color: #999; margin-top: 4px; }

/* Home Brand Sections */
.home-brand-sections { padding: 12px 0 0; }
.home-brand-section { margin-bottom: 12px; background: #fff; }
.home-brand-section__header { display: flex; justify-content: space-between; align-items: center; padding: 16px 12px 12px; }
.home-brand-section__title { font-size: 16px; font-weight: bold; color: #333; }
.home-brand-section__more { font-size: 13px; color: #999; }

/* Sticky CTA */
.sticky-cta-wrap { position: fixed; bottom: 60px; left: 12px; right: 12px; z-index: 100; display: none; }
.sticky-cta-wrap.is-visible { display: block; }
.sticky-cta { width: 100%; background: var(--red); color: #fff; line-height: 48px; border-radius: 24px; font-size: 18px; font-weight: bold; text-align: center; box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3); }

/* Tabbar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 50px; background: #fff; display: flex; box-shadow: 0 -1px 4px rgba(0,0,0,0.05); z-index: 90; padding-bottom: env(safe-area-inset-bottom); }
.tabbar__item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999; }
.tabbar__item.is-active { color: var(--red); }
.tabbar__icon { font-size: 18px; margin-bottom: 2px; }
.tabbar__icon--special { width: 28px; height: 28px; background: transparent; border: 2px solid #999; color: #999; border-radius: 50%; font-size: 16px; font-weight: bold; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.tabbar__item.is-active .tabbar__icon--special { border-color: var(--red); color: var(--red); }
.tabbar__label { font-size: 10px; }

/* Category Tabs & Brands */
.category-tab-row { display: flex; overflow-x: auto; padding: 12px 16px; background: #fff; margin-bottom: 8px; border-bottom: 1px solid #f5f5f5; }
.category-tab-row::-webkit-scrollbar { display: none; }
.category-tab { padding: 6px 16px; font-size: 14px; color: #666; white-space: nowrap; flex-shrink: 0; }
.category-tab.is-active { font-weight: bold; color: #333; position: relative; }
.category-tab.is-active::after { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 16px; height: 3px; background: var(--red); border-radius: 2px; }

.brand-grid { display: flex; flex-wrap: wrap; background: #fff; padding: 8px; margin-bottom: 8px; }
.brand-grid__item { width: 25%; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.brand-grid__item.is-active { background: #f9f9f9; border-radius: 8px; }
.brand-grid__logo { width: 44px; height: 44px; margin-bottom: 8px; }
.brand-grid__logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-grid__logo span { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: #f5f5f5; border-radius: 8px; font-size: 14px; color: #999; }
.brand-grid__name { font-size: 13px; color: #333; margin-bottom: 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.brand-grid__count { display: none; }

/* Hot Goods Layout */
.hot-section-title { padding: 16px 16px 8px; background: #fff; font-size: 15px; font-weight: bold; color: #333; }
.hot-scroll { display: flex; overflow-x: auto; padding: 8px 16px 16px; background: #fff; margin-bottom: 8px; gap: 12px; }
.hot-scroll::-webkit-scrollbar { display: none; }
.hot-card { width: 120px; flex-shrink: 0; border: 1px solid #f0f0f0; border-radius: 8px; padding: 12px; text-align: center; position: relative; }
.hot-card__rank { position: absolute; top: 0; left: 12px; width: 20px; height: 26px; background: #fadb14; color: #fff; font-size: 12px; font-weight: bold; display: flex; justify-content: center; padding-top: 4px; border-radius: 0 0 2px 2px; }
.hot-card__rank::after { content: ""; position: absolute; bottom: -6px; left: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 6px solid #fadb14; }
.hot-card:nth-child(1) .hot-card__rank { background: #fadb14; border-top-color: #fadb14; }
.hot-card:nth-child(2) .hot-card__rank { background: #a5b4fc; border-top-color: #a5b4fc; }
.hot-card:nth-child(3) .hot-card__rank { background: #fca5a5; border-top-color: #fca5a5; }
.hot-card__media { width: 64px; height: 64px; margin: 0 auto 12px; }
.hot-card__media img { width: 100%; height: 100%; object-fit: contain; }
.hot-card__name { font-size: 12px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.hot-card__price { display: none; }
.hot-card__button { display: none; }

/* Series Tabs */
.series-row { display: flex; overflow-x: auto; padding: 12px 16px; background: #fff; gap: 8px; }
.series-row::-webkit-scrollbar { display: none; }
.series-pill { padding: 6px 12px; font-size: 13px; color: #666; background: #f5f5f5; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.series-pill.is-active { color: var(--red); background: var(--red-light); }

/* Model List */
.model-section-title { padding: 16px 16px 8px; background: #fff; font-size: 15px; font-weight: bold; color: #333; border-top: 1px solid #f5f5f5; }
.model-section-subtitle { padding: 0 16px 8px; background: #fff; font-size: 14px; font-weight: bold; color: #333; }
.goods-list { background: #fff; padding: 0 16px; }
.goods-row--recycle { display: flex; align-items: center; padding: 16px 0; border-bottom: 1px solid #f5f5f5; }
.goods-row--recycle:last-child { border-bottom: none; }
.goods-row--recycle .goods-row__media { width: 48px; height: 48px; margin-right: 16px; }
.goods-row--recycle .goods-row__media img { width: 100%; height: 100%; object-fit: contain; }
.goods-row--recycle .goods-row__body { flex: 1; display: flex; align-items: center; justify-content: space-between; }
.goods-row--recycle .goods-row__title { font-size: 15px; color: #333; flex: 1; }
.goods-row--recycle .goods-row__meta { display: none; }
.goods-row--recycle .goods-row__price { display: none; }
.goods-row--recycle .goods-row__actions { margin: 0; }
.goods-row--recycle .ghost-button { display: none; }

.empty-card { text-align: center; color: #999; padding: 32px 16px; font-size: 14px; }
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.7); color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px; z-index: 1000; display: none; }
.toast.is-visible { display: block; }
.ghost-button { border: 1px solid var(--border); border-radius: 14px; padding: 4px 12px; font-size: 12px; color: var(--text-main); }
.wide-button { width: 100%; background: var(--red); color: #fff; line-height: 44px; border-radius: 22px; font-size: 16px; text-align: center; margin-top: 12px; }
.wide-button--ghost { background: transparent; color: var(--text-main); border: 1px solid var(--border); }
.field { display: flex; align-items: center; border-bottom: 1px solid var(--border); padding: 12px 0; }
.field__label { width: 80px; font-size: 14px; color: var(--text-main); }

.submit-wrap { padding: 12px; }
.estimate-hero { text-align: center; padding: 24px 0 16px; }
.estimate-hero__title { font-size: 20px; font-weight: bold; color: #333; }
.form-card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.field { display: flex; align-items: center; border-bottom: 1px solid #f5f5f5; padding: 16px 0; }
.field:last-child { border-bottom: none; }
.field__label { width: 100px; font-size: 14px; color: #333; }
.field input, .field textarea { flex: 1; border: none; font-size: 14px; color: #333; outline: none; background: transparent; }
.field textarea { height: 60px; resize: none; }
.field-group { padding: 16px 0; border-bottom: 1px solid #f5f5f5; }
.field-group:last-child { border-bottom: none; }
.field-group .field__label { margin-bottom: 12px; width: auto; font-weight: bold; }
.category-pick-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.category-pick { flex: 1; min-width: 30%; background: #f8f8f8; border-radius: 8px; padding: 12px 0; text-align: center; border: 1px solid transparent; }
.category-pick.is-active { background: #fff0f0; border-color: var(--red); color: var(--red); }
.category-pick__title { display: block; font-size: 14px; margin-bottom: 4px; }
.category-pick__meta { display: block; font-size: 12px; color: #999; }
.category-pick.is-active .category-pick__meta { color: var(--red); }
.option-pick { display: inline-block; padding: 6px 16px; background: #f8f8f8; border-radius: 16px; font-size: 13px; color: #333; margin: 0 8px 8px 0; border: 1px solid transparent; }
.option-pick.is-active { background: #fff0f0; border-color: var(--red); color: var(--red); }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: #fff; border-radius: 12px; margin-bottom: 12px; }
.stepper__step { flex: 1; text-align: center; position: relative; }
.stepper__circle { width: 24px; height: 24px; line-height: 24px; border-radius: 50%; background: #f0f0f0; color: #999; font-size: 12px; margin: 0 auto 6px; font-weight: bold; }
.stepper__step.is-active .stepper__circle { background: var(--red); color: #fff; }
.stepper__step.is-done .stepper__circle { background: #ffe5e5; color: var(--red); }
.stepper__label { font-size: 12px; color: #999; }
.stepper__step.is-active .stepper__label { color: #333; font-weight: bold; }
.stepper__step.is-done .stepper__label { color: #333; }
.stepper__line { position: absolute; top: 12px; right: -50%; width: 100%; height: 1px; background: #f0f0f0; z-index: 0; }
.stepper__step:last-child .stepper__line { display: none; }
.stepper__step.is-done .stepper__line { background: #ffe5e5; }
.footer-actions { padding: 16px; }

.goods-row { display: flex; padding: 12px 0; border-bottom: 1px solid var(--border); }
.goods-row__media { width: 80px; height: 80px; margin-right: 12px; }
.goods-row__body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.goods-row__title { font-size: 14px; font-weight: bold; margin-bottom: 4px; }
.goods-row__meta { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.goods-row__price { font-size: 16px; color: var(--red); font-weight: bold; }
.goods-row__actions { margin-top: 8px; text-align: right; }

/* Mall Shared */
.mall-section { margin-bottom: 12px; background: #fff; }
.mall-section__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 12px; }
.mall-section__title { font-size: 16px; font-weight: bold; color: #333; }
.mall-section__link { font-size: 13px; color: #999; }

.goods-grid { display: flex; flex-wrap: wrap; padding: 0 12px 12px; }
.goods-card { width: 50%; padding: 4px; }
.goods-card__touch { display: block; width: 100%; background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; overflow: hidden; }
.goods-card__media { width: 100%; aspect-ratio: 1/1; background: #f9f9f9; }
.goods-card__media img { width: 100%; height: 100%; object-fit: contain; }
.goods-card__body { padding: 8px; text-align: left; }
.goods-card__title { display: block; font-size: 13px; color: #333; line-height: 1.4; height: 36px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 6px; }
.goods-card__price { display: block; font-size: 16px; font-weight: bold; color: var(--red); }

.goods-row--mall { display: flex; padding: 12px 16px; border-bottom: 1px solid #f5f5f5; align-items: center; }
.goods-row--mall .goods-row__media { width: 80px; height: 80px; margin-right: 12px; border-radius: 8px; overflow: hidden; background: #f9f9f9; }
.goods-row--mall .goods-row__media img { width: 100%; height: 100%; object-fit: contain; }
.goods-row--mall .goods-row__body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; height: 80px; padding: 4px 0; }
.goods-row--mall .goods-row__title { font-size: 14px; color: #333; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-row--mall .goods-row__price { font-size: 16px; font-weight: bold; color: var(--red); }

/* Mine Shared */
.mine-section { margin: 12px; background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.mine-auth { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.mine-auth__logo { width: 64px; height: 64px; margin-bottom: 12px; }
.mine-auth__title { font-size: 18px; font-weight: bold; color: #333; }
.mine-form { padding-top: 8px; }
.agreement-note { font-size: 11px; color: #999; text-align: center; margin-top: 16px; }
.agreement-note__link { color: var(--red); text-decoration: none; }

.mine-user { display: flex; align-items: center; }
.mine-user__avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin-right: 16px; background: #f0f0f0; }
.mine-user__avatar--fallback { display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: bold; color: #999; }
.mine-user__meta { flex: 1; }
.mine-user__name { font-size: 18px; font-weight: bold; color: #333; margin-bottom: 4px; }
.mine-user__line { font-size: 13px; color: #999; margin-bottom: 2px; }

.mine-menu { display: flex; flex-direction: column; }
.mine-menu__item { display: flex; align-items: center; padding: 16px 0; border-bottom: 1px solid #f5f5f5; }
.mine-menu__item:last-child { border-bottom: none; }
.mine-menu__icon { font-size: 20px; margin-right: 12px; width: 24px; text-align: center; }
.mine-menu__text { flex: 1; text-align: left; font-size: 15px; color: #333; }
.mine-menu__arrow { font-size: 14px; color: #ccc; font-family: monospace; }
.mine-actions { margin: 24px 12px; }

/* Remove old shortcut grid */
.shortcut-grid, .shortcut-card { display: none; }
.stepper__item { display: flex; flex-direction: column; align-items: center; color: #999; }
.stepper__item.is-active { color: var(--red); }
.stepper__dot { width: 24px; height: 24px; border-radius: 50%; background: #eee; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.stepper__item.is-active .stepper__dot { background: var(--red); color: #fff; }

.option-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.option-chip { background: #f5f5f5; padding: 6px 12px; border-radius: 4px; font-size: 12px; }
.option-chip.is-active { background: var(--red-light); color: var(--red); }
