:root {
  --ink: #27231f;
  --muted: #817a73;
  --line: #ebe7e2;
  --paper: #fffdfa;
  --surface: #f7f5f1;
  --accent: #ff5b45;
  --accent-dark: #e94532;
  --accent-soft: #fff0eb;
  --green: #1f9d68;
  --green-soft: #e8f7f0;
  --amber: #e19a25;
  --amber-soft: #fff5de;
  --blue: #4a79d8;
  --shadow: 0 18px 50px rgba(71, 49, 35, .08);
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--surface); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(255,91,69,.25); outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.side-rail { position: sticky; top: 0; height: 100vh; padding: 28px 18px 20px; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); z-index: 20; }
.brand, .mobile-brand { border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; gap: 11px; text-align: left; }
.brand-mark, .mobile-brand span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px 14px 14px 5px; color: white; background: var(--accent); box-shadow: 0 8px 18px rgba(255,91,69,.28); font-weight: 700; }
.brand-mark svg, .mobile-brand span svg { width: 31px; height: 31px; }
.logo-basket { fill: rgba(255,255,255,.16); stroke: white; stroke-width: 2.4; stroke-linejoin: round; }
.logo-handle, .logo-leaf { fill: none; stroke: white; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.logo-spark { fill: #ffe090; stroke: none; }
.brand b, .brand small, .rail-footer b, .rail-footer small { display: block; }
.brand b { font-size: 17px; }
.brand small, .rail-footer small { margin-top: 3px; font-size: 11px; color: var(--muted); }
.rail-nav { margin-top: 42px; display: grid; gap: 8px; }
.nav-section { margin: 20px 12px 5px; font-size: 10px; letter-spacing: .12em; color: #aca59d; }
.nav-item { width: 100%; border: 0; background: transparent; border-radius: 13px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; color: #6c655e; }
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav-item.active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 600; }
.nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--accent); font-size: 11px; }
.rail-footer { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.rail-footer > div:last-child { min-width: 0; }
.rail-footer b { max-width: 140px; overflow: hidden; display: block; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.store-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #48785f; background: #dff1e7; font-weight: 700; }
.store-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.main-stage { min-width: 0; }
.topbar { height: 74px; padding: 0 4.2%; display: flex; align-items: center; gap: 18px; position: sticky; top: 0; background: rgba(247,245,241,.88); backdrop-filter: blur(16px); z-index: 15; border-bottom: 1px solid rgba(235,231,226,.65); }
.mobile-brand { display: none; font-weight: 700; }
.mobile-brand span { width: 32px; height: 32px; border-radius: 10px 10px 10px 4px; }
.page-title { flex: 1; }
.page-title h1 { margin: 0; font-size: 20px; }
.page-title p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.mode-switch { padding: 4px; background: #ebe7e2; border-radius: 12px; display: flex; }
.mode-switch button { border: 0; padding: 7px 13px; border-radius: 9px; background: transparent; font-size: 12px; cursor: pointer; color: var(--muted); }
.mode-switch button.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(52,45,39,.1); font-weight: 600; }
.cart-button { width: 40px; height: 40px; display: grid; place-items: center; position: relative; border: 1px solid var(--line); background: white; border-radius: 12px; cursor: pointer; }
.cart-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-button span { position: absolute; right: -5px; top: -6px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: white; font-size: 10px; font-weight: 700; }
.page-wrap { width: min(1180px, 92%); margin: 0 auto; padding: 28px 0 90px; }
.hero { min-height: 315px; position: relative; border-radius: 28px; overflow: hidden; background: #f5d8c5 url("./assets/daily-deal-hero.png") center/cover no-repeat; box-shadow: var(--shadow); display: flex; align-items: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,250,242,.98) 0%, rgba(255,250,242,.88) 34%, rgba(255,250,242,0) 64%); }
.hero-copy { width: 51%; padding: 38px 45px; position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-size: 10px; letter-spacing: .16em; font-weight: 700; color: var(--accent-dark); }
.hero h1 { margin: 12px 0 10px; font-size: clamp(34px, 4.2vw, 58px); letter-spacing: -.04em; line-height: 1.03; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { max-width: 350px; margin: 0 0 22px; color: #6e6257; line-height: 1.7; font-size: 14px; }
.deal-timer { display: flex; gap: 7px; margin-bottom: 22px; }
.time-box { min-width: 43px; padding: 8px 7px; border-radius: 10px; background: rgba(255,255,255,.82); box-shadow: 0 4px 14px rgba(83,56,38,.08); text-align: center; }
.time-box b, .time-box small { display: block; }
.time-box b { font-size: 17px; }
.time-box small { color: var(--muted); font-size: 9px; }
.primary, .secondary, .text-button { border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer; font-weight: 600; }
.primary { color: white; background: var(--accent); box-shadow: 0 8px 18px rgba(255,91,69,.22); }
.primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.secondary { color: var(--ink); background: #f1eeea; }
.text-button { color: var(--accent-dark); background: transparent; padding-inline: 0; }
.wide { width: 100%; }
.section { margin-top: 32px; }
.section-head { margin-bottom: 17px; display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; }
.section-head h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.product-section-head { display: block; }
.product-section-head .category-tabs { width: 100%; margin-top: 14px; padding-bottom: 2px; }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.category-tabs button { flex: none; border: 1px solid var(--line); background: white; padding: 8px 14px; border-radius: 18px; cursor: pointer; font-size: 12px; }
.category-tabs button.active { background: var(--ink); color: white; border-color: var(--ink); }
.category-filter-wrap { width: 100%; margin-top: 14px; }
.product-section-head .category-tabs-primary { width: 100%; margin-top: 0; overflow: visible; }
.category-tabs-primary > button:not(.category-more-toggle) { min-width: 0; flex: 1; padding-inline: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-tabs-primary .category-more-toggle { width: 34px; padding: 8px 0; color: var(--green); font-size: 16px; font-weight: 800; }
.category-tabs-primary .category-more-toggle.expanded { transform: rotate(180deg); }
.category-overflow-panel { margin-top: 8px; padding: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 12px 28px rgba(34,44,39,.08); }
.category-overflow-panel button { min-width: 0; padding: 8px 5px; overflow: hidden; border: 0; border-radius: 10px; background: var(--paper); cursor: pointer; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 300px; align-items: stretch; gap: 17px; }
.product-card { height: 300px; min-width: 0; position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--paper); border-radius: 19px; border: 1px solid rgba(235,231,226,.75); transition: transform .25s, box-shadow .25s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-visual { height: 185px; min-height: 185px; flex: 0 0 185px; overflow: hidden; display: grid; place-items: center; position: relative; font-size: 76px; background: var(--card-bg); }
.product-visual::before { content: ""; width: 115px; height: 26px; position: absolute; bottom: 25px; border-radius: 50%; background: rgba(70,45,30,.08); filter: blur(8px); }
.product-visual.photo::before { display: none; }
.product-visual img { display: block; width: 100%; height: 100%; min-width: 100%; min-height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-visual img { transform: scale(1.045); }
.product-emoji { position: relative; z-index: 1; filter: drop-shadow(0 12px 10px rgba(67,41,25,.13)); }
.discount-tag { position: absolute; z-index: 2; left: 12px; top: 12px; padding: 5px 8px; border-radius: 8px 8px 8px 2px; color: white; background: var(--accent); font-size: 10px; font-weight: 700; }
.quality-corner { position: absolute; z-index: 2; right: 10px; top: 10px; padding: 5px 8px; border-radius: 8px; color: #286448; background: rgba(240,255,247,.9); backdrop-filter: blur(5px); font-size: 9px; font-weight: 700; }
.product-info { min-height: 0; flex: 1; padding: 13px 15px 14px; display: flex; flex-direction: column; background: var(--paper); }
.product-name { min-height: 20px; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; font-size: 14px; line-height: 20px; }
.product-meta { display: flex; justify-content: space-between; margin: 7px 0 11px; font-size: 10px; color: var(--muted); }
.stock-low { color: var(--accent-dark); }
.price-row { margin-top: auto; display: flex; align-items: center; gap: 6px; }
.price { color: var(--accent-dark); font-size: 20px; font-weight: 700; }
.price small { font-size: 12px; }
.old-price { color: #aaa29a; text-decoration: line-through; font-size: 11px; }
.add-button { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 11px; color: white; background: var(--ink); font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.add-button:hover { background: var(--accent); }
.mini-banner { padding: 22px 25px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #273d32; color: white; border-radius: 20px; }
.mini-banner h3 { margin: 0 0 5px; }
.mini-banner p { margin: 0; color: #bcd2c5; font-size: 12px; }
.mini-banner .primary { background: #f5b444; color: #382b15; box-shadow: none; }
.filter-bar { margin: -2px 0 16px; padding: 11px 13px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.7); }
.filter-label { margin-right: 2px; color: var(--muted); font-size: 11px; font-weight: 600; }
.filter-bar select { padding: 8px 30px 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 11px; }
.custom-price { height: 34px; padding: 0 5px 0 9px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.custom-price span { color: var(--muted); font-size: 10px; }
.custom-price i { color: #aaa29a; font-style: normal; }
.custom-price input { width: 65px; min-width: 0; padding: 6px 2px; border: 0; outline: 0; background: transparent; font-size: 10px; }
.custom-price input::-webkit-inner-spin-button { appearance: none; }
.custom-price button { border: 0; padding: 6px 9px; border-radius: 7px; color: white; background: var(--ink); cursor: pointer; font-size: 9px; }
.quality-assurance { margin-left: auto; color: var(--green); font-size: 10px; }
.no-products { grid-column: 1/-1; min-height: 260px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.no-products span { font-size: 40px; }
.bottom-nav { display: none; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(31,27,24,.34); opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(2px); }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; right: 0; top: 0; z-index: 50; width: min(440px, 100%); height: 100vh; background: var(--paper); padding: 26px; transform: translateX(105%); transition: transform .3s ease; display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(30,25,20,.15); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; }
.drawer h2 { margin: 5px 0 0; }
.icon-btn { border: 0; background: #f3f0ec; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 22px 0; }
.cart-empty { height: 100%; min-height: 260px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.cart-empty span { font-size: 50px; filter: grayscale(.2); }
.cart-line { padding: 13px 0; display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; background: var(--card-bg); }
.cart-line b { display: block; font-size: 13px; }
.cart-line small { color: var(--muted); }
.qty-control { margin-top: 7px; display: flex; align-items: center; gap: 9px; }
.qty-control button { border: 0; width: 23px; height: 23px; border-radius: 7px; cursor: pointer; background: #f0ece8; }
.line-price { color: var(--accent-dark); font-weight: 700; }
.cart-footer { border-top: 1px solid var(--line); padding-top: 18px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 15px; }
.cart-total strong { font-size: 27px; }
.cart-total small { color: var(--muted); }
.dialog { width: min(430px, calc(100% - 30px)); border: 0; border-radius: 24px; padding: 0; box-shadow: 0 30px 80px rgba(34,28,24,.28); background: var(--paper); }
.dialog::backdrop { background: rgba(35,29,24,.45); backdrop-filter: blur(3px); }
.dialog form { padding: 34px; text-align: center; position: relative; }
.dialog-close { position: absolute; right: 18px; top: 18px; }
.success-orb { width: 62px; height: 62px; margin: 5px auto 18px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green); font-size: 28px; box-shadow: 0 10px 25px rgba(31,157,104,.24); }
.dialog h2 { margin: 8px 0; }
.dialog p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.order-summary { margin: 20px 0; padding: 15px; border-radius: 14px; background: var(--surface); text-align: left; }
.order-summary div { display: flex; justify-content: space-between; margin: 7px 0; font-size: 12px; }
.orders-list { display: grid; gap: 14px; }
.order-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.order-head, .order-foot { display: flex; justify-content: space-between; align-items: center; }
.order-head small { color: var(--muted); }
.status-pill { padding: 5px 9px; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 600; }
.status-pill.received { color: var(--blue); background: #edf3ff; }
.order-products { margin: 16px 0; display: flex; gap: 8px; }
.order-product { width: 50px; height: 50px; display: grid; place-items: center; font-size: 28px; border-radius: 12px; background: var(--card-bg); }
.order-foot span { font-size: 12px; color: var(--muted); }
.order-product-lines { margin: 15px 0; display: grid; gap: 9px; }
.order-product-line { padding: 9px; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; border-radius: 13px; background: var(--surface); }
.order-product-line img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.order-product-line b, .order-product-line small { display: block; }
.order-product-line b { font-size: 11px; }
.order-product-line small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.order-product-line button { padding: 7px 10px; font-size: 9px; }
.reviewed-button { border: 0; border-radius: 9px; color: var(--muted); background: #ebe7e2; }
.order-actions { margin-top: 14px; padding-top: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.order-actions small { color: var(--muted); font-size: 9px; }
.order-actions .primary { flex: none; padding: 8px 13px; font-size: 10px; }
.payment-record { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.payment-record span { padding: 5px 7px; border-radius: 7px; color: #526b5f; background: var(--green-soft); font-size: 8px; }
.profile-card { padding: 28px; border-radius: 22px; background: linear-gradient(135deg, #2e3f37, #19231f); color: white; display: flex; align-items: center; gap: 16px; }
.profile-face { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #f2c4a9; font-size: 28px; }
.profile-card h2 { margin: 0 0 5px; }
.profile-card p { margin: 0; color: #b9cac2; font-size: 12px; }
.profile-register { margin-left: auto; background: #f5b444; color: #342815; box-shadow: none; }
.menu-list { margin-top: 18px; overflow: hidden; border-radius: 18px; background: white; }
.menu-row { width: 100%; padding: 17px 18px; display: flex; align-items: center; gap: 13px; border: 0; border-bottom: 1px solid var(--line); background: white; cursor: pointer; text-align: left; }
.menu-row:last-child { border-bottom: 0; }
.menu-row span:first-child { font-size: 21px; }
.menu-row i { margin-left: auto; color: var(--muted); font-style: normal; }
.menu-row i { max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* merchant */
.merchant-header { margin-bottom: 23px; display: flex; justify-content: space-between; align-items: flex-end; }
.merchant-header h1 { margin: 0; font-size: 27px; }
.merchant-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.date-chip { padding: 9px 13px; background: white; border: 1px solid var(--line); border-radius: 11px; font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.metric-card { padding: 19px; border-radius: 17px; background: white; border: 1px solid var(--line); }
.metric-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.metric-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); }
.metric-value { margin: 14px 0 8px; font-size: 25px; font-weight: 700; letter-spacing: -.03em; }
.metric-change { font-size: 10px; color: var(--green); }
.metric-change.down { color: var(--accent-dark); }
.dashboard-grid { margin-top: 16px; display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.panel { padding: 21px; border-radius: 18px; background: white; border: 1px solid var(--line); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head p { margin: 4px 0 0; font-size: 10px; color: var(--muted); }
.panel-head select { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 6px 8px; font-size: 10px; }
.chart-wrap { height: 225px; position: relative; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.grid-line { stroke: #eeeae5; stroke-width: 1; }
.area-fill { fill: url(#chartGradient); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: white; stroke: var(--accent); stroke-width: 2; }
.chart-label { fill: #918981; font-size: 9px; }
.chart-tooltip { padding: 8px 10px; position: absolute; left: 57%; top: 15%; border-radius: 9px; background: var(--ink); color: white; font-size: 10px; box-shadow: 0 7px 18px rgba(32,27,23,.18); }
.chart-tooltip::after { content: ""; position: absolute; bottom: -5px; left: 50%; border: 5px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.rank-list { display: grid; gap: 17px; }
.rank-row { display: grid; grid-template-columns: 27px 1fr auto; gap: 10px; align-items: center; }
.rank-num { font-size: 11px; color: var(--muted); font-weight: 700; }
.rank-name { font-size: 12px; font-weight: 600; }
.rank-name small { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; }
.progress { height: 5px; margin-top: 7px; border-radius: 3px; background: #eeeae6; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.rank-value { text-align: right; font-size: 11px; }
.rank-value b, .rank-value small { display: block; }
.rank-value small { margin-top: 4px; color: var(--green); }
.health-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.health-card { padding: 18px; display: flex; gap: 14px; align-items: center; border-radius: 16px; background: white; border: 1px solid var(--line); }
.health-ring { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring-color) var(--ring-value), #eeeae5 0); position: relative; }
.health-ring::after { content: ""; position: absolute; inset: 5px; background: white; border-radius: 50%; }
.health-ring b { position: relative; z-index: 1; font-size: 11px; }
.health-card h4 { margin: 0 0 4px; font-size: 12px; }
.health-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.insight-list { display: grid; gap: 14px; }
.insight-card { padding: 20px; display: grid; grid-template-columns: 42px 1fr auto; gap: 15px; align-items: flex-start; background: white; border-radius: 18px; border: 1px solid var(--line); }
.insight-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; font-size: 19px; background: var(--amber-soft); }
.insight-icon.danger { background: var(--accent-soft); }
.insight-icon.good { background: var(--green-soft); }
.insight-body h3 { margin: 0 0 6px; font-size: 14px; }
.insight-body p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.insight-evidence { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.evidence-chip { padding: 6px 9px; border-radius: 8px; background: var(--surface); font-size: 10px; }
.insight-action { min-width: 100px; text-align: right; }
.impact { display: block; margin-bottom: 9px; font-size: 10px; color: var(--green); }
.impact b { display: block; font-size: 14px; }
.product-table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); background: white; }
.product-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.product-table th { padding: 13px 16px; background: #faf8f5; color: var(--muted); font-size: 10px; text-align: left; font-weight: 500; }
.product-table td { padding: 14px 16px; border-top: 1px solid var(--line); font-size: 11px; }
.table-product { display: flex; align-items: center; gap: 10px; }
.table-thumb { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; font-size: 23px; background: var(--card-bg); overflow: hidden; }
.table-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-product b, .table-product small { display: block; }
.table-product small { color: var(--muted); margin-top: 3px; }
.inventory-bar { width: 90px; }
.inventory-bar .progress span { background: var(--green); }
.inventory-bar.low .progress span { background: var(--accent); }
.table-actions { display: flex; gap: 6px; }
.table-actions button { border: 0; padding: 6px 9px; border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 10px; }
.action-dialog { width: min(520px, calc(100% - 30px)); }
.action-dialog form { text-align: left; }
.action-fields { margin: 20px 0; }
.field { margin-top: 13px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.field input, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.product-dialog { width: min(980px, calc(100% - 32px)); max-height: calc(100vh - 32px); border: 0; padding: 0; border-radius: 26px; background: var(--paper); box-shadow: 0 30px 90px rgba(35,28,23,.3); overflow-x: hidden; }
.product-dialog::backdrop { background: rgba(35,29,24,.48); backdrop-filter: blur(4px); }
.product-detail-close { position: sticky; z-index: 5; float: right; right: 20px; top: 18px; margin: 18px 18px -52px 0; background: rgba(255,255,255,.9); box-shadow: 0 4px 14px rgba(40,30,25,.12); }
.detail-layout { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 570px; }
.detail-gallery { position: relative; min-height: 500px; background: #f2eee8; overflow: hidden; }
.detail-gallery img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.detail-image-note { position: absolute; left: 20px; bottom: 18px; padding: 6px 10px; border-radius: 9px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); color: var(--muted); font-size: 10px; }
.detail-content { padding: 48px 40px 30px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-badges span { padding: 5px 8px; border-radius: 8px; color: #4e6659; background: var(--green-soft); font-size: 9px; font-weight: 600; }
.detail-content h2 { margin: 16px 0 8px; font-size: 28px; letter-spacing: -.03em; }
.rating-line { display: flex; align-items: center; gap: 8px; }
.rating-line b { font-size: 17px; }
.rating-line span, .review-meta span { color: #f2a72e; letter-spacing: 1px; font-size: 11px; }
.rating-line small { color: var(--muted); font-size: 10px; }
.detail-description { margin: 20px 0; color: #6f6861; font-size: 13px; line-height: 1.8; }
.detail-price { display: flex; align-items: center; gap: 10px; padding: 15px; border-radius: 13px; background: var(--accent-soft); }
.detail-price strong { color: var(--accent-dark); font-size: 28px; }
.detail-price del { color: #a59c94; font-size: 12px; }
.detail-price span { padding: 4px 7px; border-radius: 7px; color: white; background: var(--accent); font-size: 9px; }
.detail-spec { margin: 17px 0; display: flex; align-items: center; gap: 18px; font-size: 11px; }
.detail-spec span { color: var(--muted); }
.detail-spec b { padding: 8px 11px; border: 1px solid var(--accent); border-radius: 9px; color: var(--accent-dark); background: #fff; }
.detail-quantity { margin: -4px 0 17px; display: flex; align-items: center; gap: 18px; font-size: 11px; }
.detail-quantity > span { color: var(--muted); }
.detail-quantity > small { margin-left: auto; color: var(--muted); }
.detail-quantity-control { display: grid; grid-template-columns: 34px 42px 34px; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.detail-quantity-control button { height: 34px; border: 0; background: #f7f4f0; cursor: pointer; font-size: 17px; }
.detail-quantity-control button:disabled, .detail-add:disabled { opacity: .45; cursor: not-allowed; }
.detail-quantity-control b { text-align: center; font-size: 12px; }
.quality-panel { padding: 14px; border-radius: 13px; background: #f2f8f4; }
.quality-title { display: flex; align-items: center; gap: 9px; }
.quality-title > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.quality-title b, .quality-title small { display: block; }
.quality-title b { font-size: 11px; }
.quality-title small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.quality-panel p { margin: 10px 0 0; color: #587063; font-size: 10px; line-height: 1.6; }
.merchant-contact-panel { margin-top: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.merchant-contact-avatar { width: 35px; height: 35px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 11px; color: #237354; background: var(--green-soft); font-weight: 700; }
.merchant-contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.merchant-contact-panel > div:nth-child(2) { min-width: 0; flex: 1; }
.merchant-contact-panel b, .merchant-contact-panel small { display: block; }
.merchant-contact-panel b { font-size: 11px; }
.merchant-contact-panel small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.merchant-contact-panel button { flex: none; padding: 8px 11px; }
.merchant-contact-actions { display: flex; gap: 7px; }
.merchant-contact-actions .map-button { border: 1px solid #b9d7ca; border-radius: 9px; color: var(--green); background: var(--green-soft); cursor: pointer; }
.detail-stock { margin: 15px 0; display: flex; justify-content: space-between; color: var(--green); font-size: 10px; }
.detail-stock small { color: var(--muted); }
.review-section { padding: 28px 36px 34px; border-top: 1px solid var(--line); }
.review-head { display: flex; justify-content: space-between; align-items: flex-start; }
.review-head h3 { margin: 0; font-size: 17px; }
.review-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.review-head > span { color: var(--muted); font-size: 9px; }
.review-head > span b { color: var(--green); font-size: 18px; }
.review-list { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-card { padding: 15px; display: grid; grid-template-columns: 34px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 14px; }
.review-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #f0e8df; color: #79695c; font-weight: 700; }
.review-meta { display: flex; align-items: center; gap: 7px; font-size: 9px; }
.review-meta small { margin-left: auto; color: var(--muted); }
.review-card p { margin: 8px 0; font-size: 11px; line-height: 1.55; }
.review-tags { display: flex; gap: 5px; }
.review-tags span { padding: 4px 6px; border-radius: 6px; color: var(--muted); background: var(--surface); font-size: 8px; }
.product-editor-dialog { width: min(600px, calc(100% - 28px)); }
.product-editor-dialog form { text-align: left; }
.editor-image-row { margin: 20px 0; display: grid; grid-template-columns: 150px 1fr; gap: 17px; align-items: center; }
.editor-image-row img { width: 150px; height: 120px; object-fit: cover; border-radius: 14px; background: var(--surface); }
.editor-image-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.editor-image-row small { flex-basis: 100%; color: var(--muted); font-size: 9px; }
.upload-button { padding: 9px 12px; border-radius: 10px; color: white; background: var(--ink); cursor: pointer; font-size: 10px; font-weight: 600; }
.field textarea { width: 100%; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; line-height: 1.55; }
.field-hint { display: block; margin-top: 4px; text-align: right; color: var(--muted); font-size: 9px; }
.register-dialog { width: min(620px, calc(100% - 28px)); }
.register-dialog form, .review-dialog form { text-align: left; }
.register-grid { margin: 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.register-grid .field input, .register-grid .field select, .review-dialog .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.agreement { margin: 5px 0 18px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.agreement label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.agreement-link { padding: 2px 0; border: 0; background: transparent; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.terms-content { max-height: min(58vh, 520px); margin-top: 16px; padding: 2px 8px 8px 2px; overflow-y: auto; text-align: left; }
.terms-content section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.terms-content section:last-child { border-bottom: 0; }
.terms-content h3 { margin: 0 0 7px; font-size: 14px; }
.terms-content p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.terms-note { margin-top: 14px; padding: 12px; border-radius: 12px; color: var(--green); background: var(--green-soft); font-size: 11px; line-height: 1.6; }
.review-dialog { width: min(500px, calc(100% - 28px)); }
.payment-dialog { width: min(500px, calc(100% - 28px)); }
.payment-dialog form { text-align: left; }
.account-dialog, .info-dialog, .chat-dialog { width: min(520px, calc(100% - 28px)); }
.account-dialog form, .info-dialog form, .chat-dialog form { text-align: left; }
.account-list { display: grid; gap: 8px; margin-top: 18px; }
.account-option { width: 100%; padding: 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: left; cursor: pointer; }
.account-option.active { border-color: var(--green); background: var(--green-soft); }
.account-option > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--green); font-weight: 700; }
.account-option div { flex: 1; }
.account-option b, .account-option small { display: block; }
.account-option small { margin-top: 3px; color: var(--muted); }
.account-option i { color: var(--green); font-style: normal; font-size: 10px; }
.account-empty { padding: 24px; border-radius: 13px; color: var(--muted); background: var(--surface); text-align: center; }
.danger-button { padding: 10px 14px; border: 1px solid #efc2ba; border-radius: 10px; color: var(--accent-dark); background: #fff5f3; cursor: pointer; }
.store-account-bar { margin-top: 16px; padding: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: 12px; background: var(--surface); }
.store-account-bar span, .store-account-bar b { display: block; }
.store-account-bar span { margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.store-account-bar b { font-size: 11px; }
.coupon-list { display: grid; gap: 10px; margin-top: 18px; }
.coupon-list article { padding: 14px; display: flex; align-items: center; gap: 13px; border: 1px solid #ffd5cd; border-radius: 14px; background: var(--accent-soft); }
.coupon-list strong { color: var(--accent-dark); font-size: 25px; }
.coupon-list div { flex: 1; }
.coupon-list b, .coupon-list small { display: block; }
.coupon-list small { margin-top: 4px; color: var(--muted); }
.coupon-list article > span { padding: 4px 7px; border-radius: 7px; color: var(--accent-dark); background: white; font-size: 9px; }
.store-info-dialog { margin-top: 18px; padding: 20px; border-radius: 16px; background: var(--surface); text-align: center; }
.store-dialog-avatar { width: 58px; height: 58px; margin: 0 auto 10px; display: grid; place-items: center; overflow: hidden; border-radius: 18px; color: white; background: var(--green); font-size: 23px; font-weight: 700; }
.store-dialog-avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-info-dialog h3 { margin: 0 0 12px; }
.store-info-dialog p { margin: 7px 0; }
.service-wechat-card { margin: 18px 0 14px; padding: 16px; display: flex; gap: 13px; border-radius: 15px; background: var(--green-soft); }
.service-wechat-card > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: white; background: #20b86a; font-weight: 700; }
.service-wechat-card small, .service-wechat-card strong { display: block; }
.service-wechat-card strong { margin-top: 3px; font-size: 18px; }
.service-wechat-card p { margin: 7px 0 0; font-size: 10px; }
.chat-messages { min-height: 220px; max-height: 360px; margin: 14px 0; padding: 13px; overflow-y: auto; border-radius: 14px; background: var(--surface); }
.chat-welcome { padding: 16px; border-radius: 12px; background: white; }
.chat-welcome b, .chat-welcome small { display: block; }
.chat-welcome small { margin-top: 5px; color: var(--muted); }
.chat-bubble { max-width: 82%; margin-bottom: 10px; }
.chat-bubble.buyer { margin-left: auto; text-align: right; }
.chat-bubble small { color: var(--muted); }
.chat-bubble p { margin: 3px 0 0; padding: 9px 11px; border-radius: 11px; background: white; text-align: left; }
.chat-bubble.buyer p { color: white; background: var(--green); }
.chat-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-compose input { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.merchant-message-panel { margin-top: 16px; }
.merchant-message-list { display: grid; gap: 8px; }
.merchant-message-list article { padding: 12px 13px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; }
.merchant-message-list article > div { min-width: 0; flex: 1; }
.merchant-message-list b { font-size: 10px; }
.merchant-message-list p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.merchant-message-list button { flex: none; }
.pickup-map-dialog { width: min(1080px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 24px; background: var(--paper); box-shadow: 0 30px 90px rgba(35,28,23,.3); overflow: hidden; }
.pickup-map-dialog::backdrop { background: rgba(35,29,24,.5); backdrop-filter: blur(4px); }
.pickup-map-shell { position: relative; padding: 28px; }
.pickup-map-head { padding-right: 42px; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.pickup-map-head h2 { margin: 7px 0 4px; font-size: 25px; }
.pickup-map-head p { margin: 0; color: var(--muted); font-size: 11px; }
.locate-button { flex: none; }
.pickup-map-layout { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr); gap: 16px; }
.pickup-map-stage { min-height: 520px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #e8ece8; }
#pickupMap { width: 100%; height: 520px; z-index: 1; }
.location-status { position: absolute; z-index: 500; left: 12px; top: 12px; max-width: calc(100% - 24px); padding: 8px 11px; border-radius: 9px; color: #31564a; background: rgba(255,255,255,.92); box-shadow: 0 6px 18px rgba(33,44,39,.16); backdrop-filter: blur(8px); font-size: 9px; pointer-events: none; }
.pickup-point-panel { min-height: 0; display: flex; flex-direction: column; }
.pickup-point-panel-head { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.pickup-point-panel-head b { font-size: 14px; }
.pickup-point-panel-head small { color: var(--muted); font-size: 9px; }
.pickup-point-list { min-height: 0; max-height: 430px; padding-right: 4px; display: grid; align-content: start; gap: 9px; overflow-y: auto; }
.pickup-point-card { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; transition: .2s; }
.pickup-point-card:hover { transform: translateY(-1px); border-color: #a9cbbd; }
.pickup-point-card.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(35,115,84,.1); background: var(--green-soft); }
.pickup-point-title { display: flex; align-items: center; gap: 9px; }
.pickup-point-title > span { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--green); font-size: 10px; font-weight: 700; }
.pickup-point-title > div { min-width: 0; flex: 1; }
.pickup-point-title b, .pickup-point-title small { display: block; }
.pickup-point-title b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pickup-point-title small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.pickup-point-title i { color: var(--green); font-style: normal; font-size: 9px; }
.pickup-point-card > p { margin: 9px 0; color: #716a64; font-size: 9px; line-height: 1.5; }
.pickup-point-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 8px; }
.pickup-point-meta button { padding: 4px 8px; border: 0; border-radius: 7px; color: var(--green); background: white; cursor: pointer; }
.pickup-point-panel > .primary { margin-top: auto; }
.pickup-map-marker-wrap { background: transparent; border: 0; }
.pickup-map-marker { width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid white; border-radius: 50% 50% 50% 10px; color: white; background: var(--green); box-shadow: 0 6px 16px rgba(31,63,50,.32); transform: rotate(-45deg); font-size: 10px; font-weight: 700; }
.pickup-map-marker i { transform: rotate(45deg); font-style: normal; }
.pickup-map-marker.selected { background: var(--accent); box-shadow: 0 7px 20px rgba(255,91,69,.38); }
.marketplace-search-strip { margin-bottom: 18px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #dfe9e3; border-radius: 17px; background: linear-gradient(135deg, #f4faf6, #fff); }
.marketplace-search-strip > div:first-child span, .marketplace-search-strip > div:first-child small { display: block; }
.marketplace-search-strip > div:first-child span { font-size: 12px; font-weight: 700; }
.marketplace-search-strip > div:first-child small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.marketplace-search-box { min-width: 340px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; overflow: hidden; border: 1px solid #b8d4c8; border-radius: 999px; background: white; }
.marketplace-search-box > span { padding-left: 14px; color: var(--muted); font-size: 18px; }
.marketplace-search-box input { min-width: 0; padding: 11px 9px; border: 0; outline: 0; background: transparent; }
.marketplace-search-box button { align-self: stretch; padding: 0 18px; border: 0; border-radius: 999px; color: white; background: var(--green); cursor: pointer; font-weight: 700; }
.merchant-market-head { padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-radius: 22px; color: white; background: linear-gradient(135deg, #2e493d, #16231e); }
.merchant-market-head h1 { margin: 7px 0; font-size: 28px; }
.merchant-market-head p { margin: 0; color: #bdcec6; font-size: 11px; }
.merchant-market-head .marketplace-search-box { width: min(430px, 48%); background: white; }
.market-filter-chips { margin: 16px 0; display: flex; gap: 8px; overflow-x: auto; }
.market-filter-chips button { padding: 8px 13px; flex: none; border: 1px solid var(--line); border-radius: 999px; background: white; cursor: pointer; }
.market-filter-chips button.active { color: white; border-color: var(--green); background: var(--green); }
.market-store-list { display: grid; gap: 14px; }
.market-store-card { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 8px 25px rgba(40,34,29,.04); }
.market-store-main { width: 100%; padding: 0; display: flex; align-items: center; gap: 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.market-store-logo { width: 78px; height: 78px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 17px; color: white; background: var(--green); font-size: 26px; font-weight: 800; }
.market-store-logo img { width: 100%; height: 100%; object-fit: cover; }
.market-store-summary { min-width: 0; flex: 1; }
.market-store-title { display: flex; align-items: center; gap: 8px; }
.market-store-title h3 { margin: 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.market-store-title span, .market-store-hero > div:nth-child(2) > span { padding: 4px 7px; border-radius: 7px; color: #91621a; background: var(--amber-soft); font-size: 8px; }
.market-store-rating { margin-top: 6px; color: var(--muted); font-size: 10px; }
.market-store-rating b { color: var(--accent); font-size: 13px; }
.market-store-summary p { margin: 7px 0 4px; color: #6e6862; font-size: 10px; }
.market-store-summary small { color: var(--muted); font-size: 9px; }
.market-store-main > i { color: var(--muted); font-size: 22px; font-style: normal; }
.market-product-preview { margin: 14px 0 0 92px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.market-product-preview button { min-width: 0; padding: 0 0 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: left; cursor: pointer; }
.market-product-preview img { width: 100%; height: 86px; display: block; object-fit: cover; }
.market-product-preview span, .market-product-preview b { display: block; padding: 0 9px; }
.market-product-preview span { margin-top: 7px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.market-product-preview b { margin-top: 4px; color: var(--accent); font-size: 11px; }
.merchant-back-button { margin-bottom: 12px; padding: 8px 11px; border: 0; border-radius: 9px; color: var(--green); background: var(--green-soft); cursor: pointer; }
.market-store-hero { padding: 24px; display: flex; align-items: center; gap: 17px; border-radius: 20px; background: white; }
.market-store-logo.large { width: 92px; height: 92px; }
.market-store-hero > div:nth-child(2) { min-width: 0; flex: 1; }
.market-store-hero h1 { margin: 8px 0; font-size: 24px; }
.market-store-hero p { margin: 0 0 6px; color: var(--muted); font-size: 10px; }
.market-store-products { margin-top: 16px; }
.directory-product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.directory-product-grid article { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; }
.directory-product-grid img { width: 100%; height: 180px; object-fit: cover; }
.directory-product-grid article > div { padding: 13px; }
.directory-product-grid h3 { margin: 0; font-size: 13px; }
.directory-product-grid p { color: var(--muted); font-size: 9px; }
.directory-product-grid b { color: var(--accent); font-size: 17px; }
.directory-product-grid button { float: right; }
.market-product-dialog img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; }
.market-product-dialog b { display: block; margin-top: 13px; color: var(--accent); font-size: 24px; }
.secondhand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.secondhand-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }
.secondhand-card > img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; background: var(--surface); }
.secondhand-card > div { padding: 15px; }
.secondhand-card h3 { margin: 5px 0; font-size: 16px; }
.secondhand-card p, .secondhand-card small { display: block; margin: 4px 0; color: var(--muted); line-height: 1.5; }
.secondhand-price { color: var(--accent); font-size: 22px; font-weight: 800; }
.secondhand-seller { margin: 13px 0; display: flex; align-items: center; gap: 8px; }
.secondhand-seller span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--green); background: var(--green-soft); font-weight: 700; }
.secondhand-seller i { margin-left: auto; color: var(--green); font-style: normal; font-size: 11px; }
.message-thread-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }
.message-thread-list button { width: 100%; padding: 16px; display: flex; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.message-thread-list button:last-child { border-bottom: 0; }
.message-thread-list button > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--green-soft); }
.message-thread-list button > div { min-width: 0; flex: 1; }
.message-thread-list b, .message-thread-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-thread-list small { margin-top: 4px; color: var(--muted); }
.message-thread-list i { color: var(--accent); font-style: normal; font-size: 11px; }
.payment-method-tabs { margin: 18px 0 14px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 12px; background: var(--surface); }
.payment-method-tabs button { padding: 8px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 10px; }
.payment-method-tabs button.active { background: white; box-shadow: 0 3px 10px rgba(45,35,29,.09); font-weight: 700; }
.payment-qr-area { min-height: 215px; display: grid; grid-template-columns: 180px 1fr; gap: 13px; align-items: center; }
.payment-qr-area > img { width: 180px; height: 180px; padding: 7px; object-fit: contain; border: 1px solid var(--line); border-radius: 13px; background: white; }
.payment-security-card { padding: 13px; border-radius: 12px; background: var(--green-soft); }
.payment-security-card > span { color: var(--green); font-size: 9px; font-weight: 700; }
.payment-security-card dl { margin: 9px 0; }
.payment-security-card dl div { margin: 6px 0; display: flex; justify-content: space-between; gap: 8px; }
.payment-security-card dt { color: var(--muted); font-size: 8px; }
.payment-security-card dd { margin: 0; max-width: 120px; text-align: right; font-size: 9px; font-weight: 700; }
.payment-security-card p { margin: 8px 0 0; color: #47705b; font-size: 8px; line-height: 1.55; }
.payment-unavailable { grid-column: 1/-1; padding: 30px; text-align: center; border-radius: 14px; background: var(--surface); }
.payment-unavailable > span { width: 38px; height: 38px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--amber); font-weight: 700; }
.payment-unavailable h3 { margin: 0; font-size: 12px; }
.payment-unavailable p { margin: 6px 0 0; font-size: 9px; }
.payment-amount { margin: 14px 0; padding: 12px; display: flex; justify-content: space-between; align-items: center; border-radius: 11px; background: var(--accent-soft); }
.payment-amount span { font-size: 10px; }
.payment-amount strong { color: var(--accent-dark); font-size: 24px; }
.payment-note { display: block; margin-top: 10px; color: var(--muted); text-align: center; font-size: 8px; line-height: 1.5; }
#completePaymentButton:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.editor-category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.store-settings-panel { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.store-avatar-editor { padding-bottom: 22px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.store-avatar-editor h3 { margin: 0 0 5px; font-size: 14px; }
.store-avatar-editor p { margin: 0 0 10px; color: var(--muted); font-size: 10px; }
.store-avatar-preview { width: 92px; height: 92px; flex: none; display: grid; place-items: center; overflow: hidden; border: 4px solid white; border-radius: 26px; background: var(--green-soft); color: var(--green); box-shadow: 0 8px 24px rgba(40,80,57,.12); font-size: 30px; font-weight: 700; }
.store-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.store-avatar-actions { display: flex; gap: 10px; align-items: center; }
.payment-settings { margin: 22px 0; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.payment-settings-head { margin-bottom: 14px; display: flex; justify-content: space-between; gap: 14px; }
.payment-settings-head h3 { margin: 0 0 4px; font-size: 14px; }
.payment-settings-head p { margin: 0; color: var(--muted); font-size: 10px; }
.payment-settings-head > span { color: var(--amber); font-size: 9px; }
.payment-qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.merchant-qr-card { padding: 13px; display: grid; grid-template-columns: 105px 1fr; gap: 13px; border: 1px solid var(--line); border-radius: 14px; }
.merchant-qr-preview { width: 105px; height: 105px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 10px; }
.merchant-qr-preview img { width: 100%; height: 100%; object-fit: contain; background: white; }
.merchant-qr-card b, .merchant-qr-card small { display: block; }
.merchant-qr-card b { font-size: 11px; }
.merchant-qr-card small { margin: 5px 0 7px; color: var(--muted); font-size: 8px; }
.merchant-qr-card .text-button { margin-left: 7px; font-size: 9px; }
.wechat-dot, .alipay-dot { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 7px; color: white; background: #20b86a; font-style: normal; font-size: 10px; }
.alipay-dot { background: #1677ff; }
.payee-input { width: 100%; margin-bottom: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 9px; }
.payment-security-tip { margin-top: 12px; padding: 11px 13px; border-radius: 10px; background: var(--amber-soft); }
.payment-security-tip b { font-size: 10px; }
.payment-security-tip p { margin: 4px 0 0; color: #806332; font-size: 9px; line-height: 1.5; }
.store-form-grid { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.store-form-grid .field input, .editor-category-grid .field input, .editor-category-grid .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.full-field { grid-column: 1/-1; }
.store-preview-card { margin-top: 20px; padding: 16px; border-radius: 14px; background: var(--surface); }
.store-preview-card > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.store-preview-line { display: flex; align-items: center; gap: 12px; }
.store-preview-line b, .store-preview-line small { display: block; }
.store-preview-line small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.store-save-row { margin-top: 20px; display: flex; justify-content: flex-end; gap: 9px; }
.action-timeline { position: relative; padding-left: 25px; display: grid; gap: 16px; }
.action-timeline::before { content: ""; position: absolute; left: 7px; top: 7px; bottom: 7px; width: 1px; background: var(--line); }
.timeline-card { position: relative; padding: 18px; border-radius: 16px; background: white; border: 1px solid var(--line); }
.timeline-card::before { content: ""; position: absolute; left: -23px; top: 23px; width: 11px; height: 11px; border: 3px solid var(--surface); border-radius: 50%; background: var(--green); }
.timeline-card.pending::before { background: var(--amber); }
.timeline-top { display: flex; justify-content: space-between; gap: 10px; }
.timeline-top h3 { margin: 0; font-size: 13px; }
.timeline-card p { margin: 8px 0 12px; color: var(--muted); font-size: 11px; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.result-cell { padding: 10px; border-radius: 10px; background: var(--surface); }
.result-cell small, .result-cell b { display: block; }
.result-cell small { color: var(--muted); font-size: 9px; }
.result-cell b { margin-top: 4px; font-size: 12px; }
.positive { color: var(--green); }

.toast { position: fixed; z-index: 2147483647; inset: 22px auto auto 50%; width: max-content; max-width: min(440px, calc(100vw - 30px)); margin: 0; padding: 12px 17px 12px 38px; border: 0; border-radius: 12px; color: white; background: var(--ink); box-shadow: 0 14px 38px rgba(30,25,22,.34); transform: translate(-50%, -22px); opacity: 0; pointer-events: none; transition: .22s; font-size: 12px; line-height: 1.5; text-align: left; }
.toast::before { content: "!"; position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: white; transform: translateY(-50%); font-size: 10px; font-weight: 800; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.empty-state { min-height: 350px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-state span { font-size: 50px; }

@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .secondhand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pickup-map-dialog { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .pickup-map-shell { padding: 22px 18px 90px; overflow-y: auto; }
  .pickup-map-head { align-items: stretch; flex-direction: column; }
  .pickup-map-layout { grid-template-columns: 1fr; }
  .pickup-map-stage, #pickupMap { min-height: 360px; height: 360px; }
  .pickup-point-list { max-height: none; }
  .pickup-point-panel > .primary { margin-top: 12px; }
  .merchant-market-head { align-items: stretch; flex-direction: column; }
  .merchant-market-head .marketplace-search-box { width: 100%; }
  .marketplace-search-strip { align-items: stretch; flex-direction: column; }
  .marketplace-search-box { width: 100%; min-width: 0; }
  .directory-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-shell { display: block; }
  .side-rail { display: none; }
  .topbar { height: 62px; padding: 0 16px; }
  .mobile-brand { display: flex; margin-right: auto; }
  .page-title { display: none; }
  .mode-switch button { padding: 6px 9px; font-size: 10px; }
  .page-wrap { width: calc(100% - 28px); padding-top: 16px; }
  .hero { min-height: 340px; align-items: flex-end; background-position: 62% center; }
  .hero::after { background: linear-gradient(0deg, rgba(255,250,242,.98) 0%, rgba(255,250,242,.92) 43%, rgba(255,250,242,.15) 100%); }
  .hero-copy { width: 100%; padding: 25px; }
  .hero-copy p { display: none; }
  .hero h1 { font-size: 38px; margin: 8px 0 12px; }
  .deal-timer { margin-bottom: 15px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 280px; gap: 11px; }
  .product-card { height: 280px; }
  .product-visual { height: 150px; min-height: 150px; flex-basis: 150px; font-size: 62px; }
  .product-info { padding: 12px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; height: 67px; padding: 6px 8px 7px; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,253,250,.95); border-top: 1px solid var(--line); backdrop-filter: blur(15px); }
  .bottom-nav button { border: 0; background: transparent; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 9px; cursor: pointer; }
  .bottom-nav button.active { color: var(--accent); }
  .bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr; }
  .merchant-header { margin-top: 4px; }
  .insight-card { grid-template-columns: 40px 1fr; }
  .insight-action { grid-column: 2; text-align: left; display: flex; align-items: center; gap: 12px; }
  .impact { margin: 0; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-gallery { min-height: 410px; }
  .detail-gallery img { position: absolute; }
  .detail-content { padding: 28px 25px; }
  .review-section { padding: 24px 25px 30px; }
}
@media (max-width: 520px) {
  .toast { inset: 12px auto auto 50%; max-width: calc(100vw - 24px); }
  .payment-qr-area { grid-template-columns: 1fr; }
  .payment-qr-image, .payment-unavailable { margin-inline: auto; }
  .payment-qr-grid { grid-template-columns: 1fr; }
  .payment-qr-card { min-width: 0; }
  .payment-method-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-quantity { gap: 10px; }
  .detail-quantity > small { font-size: 8px; }
  .merchant-contact-panel { align-items: flex-start; flex-wrap: wrap; }
  .merchant-contact-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .merchant-contact-panel button { width: auto; }
  .store-account-bar { align-items: stretch; flex-direction: column; }
  .store-account-bar button { width: 100%; }
  .account-actions { align-items: stretch; flex-direction: column; }
  .chat-compose { grid-template-columns: 1fr; }
  .pickup-map-head .locate-button { width: 100%; }
  .pickup-map-stage, #pickupMap { min-height: 320px; height: 320px; }
  .market-store-card { padding: 14px; }
  .market-store-logo { width: 62px; height: 62px; }
  .market-product-preview { margin-left: 0; }
  .market-product-preview img { height: 72px; }
  .market-store-hero { align-items: flex-start; flex-wrap: wrap; }
  .market-store-hero > button { width: 100%; }
  .market-store-logo.large { width: 72px; height: 72px; }
  .directory-product-grid { grid-template-columns: 1fr; }
  .topbar { gap: 9px; }
  .mobile-brand { margin-right: 0; font-size: 13px; }
  .mobile-brand span { width: 30px; height: 30px; }
  .mode-switch { position: static; margin-left: auto; flex: none; }
  .mode-switch button { padding: 6px 8px; }
  .cart-button { margin-left: auto; }
  .hero { border-radius: 22px; }
  .hero-copy { padding: 21px; }
  .hero h1 { font-size: 34px; }
  .section { margin-top: 25px; }
  .product-grid { grid-auto-rows: 260px; gap: 9px; }
  .product-card { height: 260px; }
  .product-visual { height: 128px; min-height: 128px; flex-basis: 128px; font-size: 53px; }
  .product-name { min-height: 34px; -webkit-line-clamp: 2; font-size: 12px; line-height: 17px; }
  .product-meta { margin: 5px 0 8px; gap: 4px; font-size: 9px; }
  .price { font-size: 17px; }
  .old-price { font-size: 9px; }
  .mini-banner { align-items: flex-start; flex-direction: column; }
  .metric-grid { gap: 9px; }
  .metric-card { padding: 15px; }
  .metric-value { font-size: 21px; }
  .panel { padding: 16px; }
  .result-grid { grid-template-columns: 1fr; }
  .dialog form { padding: 30px 22px 22px; }
  .filter-bar { overflow-x: auto; padding: 9px; }
  .filter-label, .quality-assurance { display: none; }
  .filter-bar select { flex: none; }
  .quality-corner { display: none; }
  .product-dialog { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .detail-gallery { min-height: 330px; }
  .detail-content h2 { font-size: 24px; }
  .review-list { grid-template-columns: 1fr; }
  .editor-image-row { grid-template-columns: 110px 1fr; }
  .editor-image-row img { width: 110px; height: 100px; }
  .editor-category-grid, .store-form-grid, .register-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .store-settings-panel { padding: 18px; }
  .store-avatar-editor { align-items: flex-start; }
  .store-avatar-preview { width: 72px; height: 72px; border-radius: 20px; }
  .order-product-line { grid-template-columns: 44px 1fr auto; }
  .order-product-line img { width: 44px; height: 44px; }
}
