:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f7f8fc;
  --ink: #151b2d;
  --ink-2: #5e6987;
  --ink-3: #929cb8;
  --line: #dfe4f0;
  --line-soft: #e9edf5;
  --brand: #3d4fd1;
  --brand-hover: #3142bd;
  --brand-soft: #eef0ff;
  --ok: #07845f;
  --ok-soft: #e6f5ef;
  --warn: #a86200;
  --warn-soft: #fff3df;
  --danger: #c2284b;
  --danger-soft: #fdebf0;
  --price: #c5540a;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(25, 35, 65, .06), 0 4px 12px rgba(25, 35, 65, .035);
  --max-width: 1320px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.shell { width: min(calc(100% - 40px), var(--max-width)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.brand img { width: 30px; height: 30px; }
.brand strong { font-size: 19px; font-weight: 800; }
.brand span { color: var(--ink-3); font-size: 11px; font-weight: 700; }
.header-stats { display: flex; align-items: center; gap: 8px; margin: 0 auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-stat { min-width: 108px; height: 46px; display: grid; grid-template-columns: 26px auto; grid-template-rows: 17px 19px; column-gap: 8px; align-content: center; padding: 4px 11px; border: 1px solid #dce5f2; border-radius: 12px; background: #f5f8fd; box-shadow: 0 4px 12px rgba(37,59,91,.045); }
.header-stat > svg { width: 20px; height: 20px; grid-row: 1 / 3; align-self: center; color: #5877ca; }
.header-stat-label { color: #7c879b; font-size: 10px; line-height: 17px; }
.header-stat-value { color: var(--ink); font-size: 15px; font-weight: 800; line-height: 19px; }
.header-stat-value b { color: inherit; }
.header-stat-value small { margin-left: 2px; color: #7c879b; font-size: 10px; font-weight: 600; }
.header-stat.products { border-color: #d5e8e1; background: #f2f9f6; }
.header-stat.products > svg { color: #249475; }
.header-stat.updated { border-color: #eee0d4; background: #fff8f2; }
.header-stat.updated > svg { color: #cb7b38; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.rules-button, .submit-shop-button { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-weight: 700; }
.submit-shop-button { border-color: #ccd7f5; background: #f7f9ff; color: var(--brand); }
.submit-shop-button:hover { border-color: #aebfe9; background: var(--brand-soft); }
.submit-shop-button svg { width: 16px; height: 16px; }
.rules-button:hover { border-color: var(--brand); color: var(--brand); }
.rules-button span { padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.avatar { width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 15px; }
.member-entry[hidden] { display: none !important; }
.mobile-summary { display: none; }

.account-menu {
  position: fixed;
  z-index: 70;
  top: 58px;
  right: max(20px, calc((100vw - var(--max-width)) / 2));
  width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(25,35,65,.16);
}
.account-menu-head { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-bottom: 1px solid var(--line-soft); }
.account-menu-head span { color: var(--ink-3); font-size: 12px; }
.account-menu button { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.account-menu button:hover { background: var(--surface-soft); color: var(--brand); }

.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(25,33,49,.34); backdrop-filter: blur(3px); }
.modal-overlay[hidden] { display: none; }
.submit-shop-modal { width: min(430px, calc(100vw - 32px)); padding: 22px; border: 1px solid #dfe5ee; border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(26,38,64,.22); }
.modal-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head p { margin: 5px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.modal-close { width: 32px; height: 32px; display: grid; place-items: center; flex: none; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: #f3f5f8; color: var(--ink-2); }
.modal-close:hover { background: #e9edf3; color: var(--ink); }
.modal-close svg { width: 17px; height: 17px; }
.modal-field { display: grid; gap: 7px; margin-top: 15px; }
.modal-field > span { color: #47536a; font-size: 12px; font-weight: 700; }
.modal-field select, .modal-field input { width: 100%; height: 42px; padding: 0 15px; border: 1px solid #d8e0eb; border-radius: 99px; background: #fafbfd; color: var(--ink); outline: none; }
.modal-field select:focus, .modal-field input:focus { border-color: #8fa7ea; background: #fff; box-shadow: 0 0 0 3px #edf2ff; }
.shop-detail[hidden] { display: none; }
.review-note { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 0; padding: 11px 12px; border-radius: 10px; background: #fff8ed; color: #7a5a2c; font-size: 12px; line-height: 1.55; }
.review-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #c57a24; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.modal-actions .button { height: 36px; border-radius: 99px; }
.modal-actions .button:disabled { border-color: #dce2ec; background: #e9edf3; color: #9aa3b3; cursor: not-allowed; }

.page { padding: 16px 0 48px; }
.search-panel { padding: 13px 15px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.search-primary { display: grid; grid-template-columns: minmax(250px, 1.2fr) minmax(190px, .8fr) 104px 104px 78px 66px; gap: 8px; align-items: center; }
.search-input { position: relative; display: flex; align-items: center; min-width: 0; }
.search-input svg { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search-input input { width: 100%; height: 36px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); outline: none; }
.search-input input:focus, .primary-price input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-input input::placeholder, .primary-price input::placeholder { color: var(--ink-3); }
.primary-price { display: block; min-width: 0; }
.primary-price input { width: 100%; height: 36px; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); outline: none; font-variant-numeric: tabular-nums; }
.button { height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid transparent; border-radius: 99px; background: var(--surface); font-weight: 700; white-space: nowrap; }
.button.primary { border-color: var(--brand); background: var(--brand); color: white; }
.button.primary:hover { background: var(--brand-hover); }
.button.secondary { border-color: var(--line); }
.button.secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.quick-row { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: center; margin-top: 10px; }
.quick-row > span { color: var(--ink-3); font-size: 12px; font-weight: 700; }
.chips { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; }
.chip { flex: none; padding: 6px 11px; border: 0; border-radius: 99px; background: #f0f2f8; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.chip:hover { background: var(--brand-soft); color: var(--brand); }
.popular-searches .chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #ddd5ed; background: #f4effa; color: #554a61; }
.popular-searches .chip::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .48; }
.popular-searches .chip:nth-child(3n + 2) { border-color: #ead8b5; background: #fbf3e4; color: #65513b; }
.popular-searches .chip:nth-child(3n) { border-color: #c9dce6; background: #eaf4f8; color: #385967; }
.popular-searches .chip:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.results-section { margin-top: 14px; }
.results-toolbar { position: sticky; top: 68px; z-index: 30; min-height: 42px; display: flex; align-items: center; gap: 16px; padding: 5px 4px; background: var(--bg); }
html[data-mode="products"] .results-toolbar { margin-top: 7px; padding: 5px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--surface); }
.segments { display: inline-flex; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 99px; background: #edf0f5; }
.segments button { min-width: 92px; height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 0; border-radius: 99px; background: transparent; color: var(--ink-2); font-weight: 700; }
.segments button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.result-summary { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.result-summary b { color: var(--ink); }

.merchant-group { margin-top: 10px; overflow: hidden; border: 1px solid #e6b99f; border-radius: 8px; background: #fffaf6; box-shadow: 0 1px 2px rgba(47,37,29,.03), 0 10px 24px rgba(47,37,29,.045); }
.merchant-head { min-height: 58px; display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.merchant-logo { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 6px; background: #eef2ff; color: #3856b9; font-weight: 800; }
.merchant-name { min-width: 0; max-width: 310px; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 0; border-radius: 0; font-size: 11px; font-weight: 700; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.active { color: var(--ok); background: transparent; }
.status.abnormal { color: var(--danger); background: transparent; }
.merchant-stats { display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.merchant-stats b { color: var(--ink); }
.merchant-stats .low b { color: var(--price); }
.merchant-updated { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.view-all { height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.78); color: var(--brand); font-weight: 700; white-space: nowrap; }
.view-all:hover { border-color: var(--brand); color: var(--brand); }
.view-all svg { width: 14px; height: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; padding: 0 16px 10px; }
.product-unit { position: relative; min-width: 0; min-height: 112px; display: flex; flex-direction: column; padding: 12px 17px 11px; border: 1px solid #bfd8e6; border-radius: 22px; background: #f1f7fb; box-shadow: 0 7px 16px rgba(42,71,90,.05); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.product-unit:nth-child(3n + 2) { border-color: #bddfd4; background: #f0f8f5; }
.product-unit:nth-child(3n) { border-color: #edc9b8; background: #fff4ee; }
.product-unit::before { content: attr(data-type); min-height: 17px; padding-right: 24px; color: #687387; font-size: 11px; line-height: 17px; }
.product-unit.clickable-product { cursor: pointer; }
.product-unit.clickable-product:hover, .product-unit.clickable-product:focus-visible { z-index: 2; transform: translateY(-4px); border-color: #aebfdd; box-shadow: 0 13px 25px rgba(42,57,86,.14); outline: none; }
.unit-name { margin-top: 3px; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.unit-bottom { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 9px; }
.unit-price { color: var(--price); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.unit-stock { margin-left: auto; color: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.low-price { color: var(--ok); font-size: 11px; font-weight: 700; }
.card-open { position: absolute; top: 9px; right: 10px; width: 22px; height: 22px; display: grid; place-items: center; color: #6f7786; }
.card-open svg { width: 15px; height: 15px; }
.product-unit:hover .card-open, .product-unit:focus-visible .card-open { color: var(--brand); }
.more-products { height: 28px; margin: 0 16px 13px; padding: 0 10px; border: 0; border-radius: 99px; background: rgba(28,34,46,.045); color: #596274; font-size: 12px; }
.more-products:hover { background: var(--brand-soft); color: var(--brand); }

.product-card { min-width: 0; display: flex; flex-direction: column; padding: 15px 16px 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.product-card.clickable-product { cursor: pointer; }
.product-card.clickable-product:hover, .product-card.clickable-product:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(42,57,86,.12); outline: none; }
.category-tag { align-self: flex-start; padding: 5px 8px; border-radius: 6px; background: #edf3ff; color: #3264c8; font-size: 11px; font-weight: 800; }
.product-name { margin: 10px 0 14px; font-size: 15px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.price small { font-size: 14px; }
.low-tag { padding: 4px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 800; }
.product-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 13px; color: var(--ink-2); font-size: 12px; }
.product-meta span { min-width: 0; display: flex; align-items: center; gap: 6px; }
.product-meta svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.product-meta .stock { color: var(--ink); font-weight: 700; }
.product-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.updated { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12px; }
.updated svg { width: 15px; height: 15px; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink-2); }
.icon-button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.external-link { min-width: 106px; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none; padding: 0 14px; border: 1px solid var(--brand); border-radius: 7px; background: var(--brand); color: white; text-decoration: none; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 5px rgba(61,79,209,.15); transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.external-link:hover { border-color: var(--brand-hover); background: var(--brand-hover); box-shadow: 0 4px 10px rgba(61,79,209,.22); }
.external-link svg { width: 14px; height: 14px; }
.dead-link { height: 38px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: 7px; background: #eef1f7; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.product-foot > .external-link, .product-foot > .dead-link { margin-left: auto; }

.product-table-wrap { margin-top: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px; background: var(--surface); box-shadow: 0 12px 28px rgba(30,42,69,.055); }
.product-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.product-table th { height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #f4f6f9; color: #707b91; font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.product-table td { height: 54px; padding: 8px 16px; border-top: 1px solid var(--line-soft); color: var(--ink-2); vertical-align: middle; font-variant-numeric: tabular-nums; }
.product-table tbody tr { position: relative; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.product-table tbody tr:nth-child(even) { background: #fbfcfe; }
.product-table tbody tr.clickable-product { cursor: pointer; }
.product-table tbody tr.clickable-product:hover, .product-table tbody tr.clickable-product:focus-visible { z-index: 2; transform: translateY(-2px); background: #f6f8fc; box-shadow: 0 8px 20px rgba(42,57,86,.12); outline: none; }
.product-table tbody tr:nth-child(4n + 1) td:first-child { box-shadow: inset 3px 0 #9fc8dc; }
.product-table tbody tr:nth-child(4n + 2) td:first-child { box-shadow: inset 3px 0 #9ed0c1; }
.product-table tbody tr:nth-child(4n + 3) td:first-child { box-shadow: inset 3px 0 #e7b59c; }
.product-table tbody tr:nth-child(4n) td:first-child { box-shadow: inset 3px 0 #b7bde9; }
.product-table th:nth-child(3), .product-table th:nth-child(4), .product-table th:nth-child(5), .product-table td:nth-child(3), .product-table td:nth-child(4), .product-table td:nth-child(5) { text-align: center; }
.product-table .col-name { width: 38%; }
.product-table .col-store { width: 21%; }
.product-table .col-price { width: 10%; }
.product-table .col-stock { width: 9%; }
.product-table .col-update { width: 12%; }
.product-table .col-action { width: 10%; text-align: center; }
.product-table .table-name { padding-left: 19px; color: var(--ink); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.table-store { color: #536079; }
.table-store::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: #9aa9c6; box-shadow: 0 0 0 3px #edf1f7; vertical-align: 1px; }
.product-table .table-price { color: var(--price); font-size: 16px; font-weight: 800; white-space: nowrap; }
.table-stock { color: #283246 !important; font-weight: 700; }
.table-stock::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
.table-updated { color: #7b8599 !important; }
.product-table th:last-child, .product-table td:last-child { text-align: center; }
.table-open { min-width: 78px; height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 12px; border: 1px solid #dfe5ee; border-radius: 99px; background: #fff; color: var(--brand); text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.table-open svg { width: 13px; height: 13px; }
.table-open:hover, .product-table tr:hover .table-open, .product-table tr:focus-visible .table-open { border-color: #bac7eb; background: var(--brand-soft); color: var(--brand-hover); }
.mobile-product-list { display: none; }

.state-card { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.state-card > svg { width: 38px; height: 38px; color: var(--ink-3); }
.state-card strong { font-size: 17px; }
.state-card p { margin: 0; color: var(--ink-2); }
.skeleton { overflow: hidden; position: relative; background: #e9edf5; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-groups { display: grid; gap: 14px; margin-top: 12px; }
.skeleton-group { height: 270px; border-radius: var(--radius); }
.load-more-wrap { display: flex; justify-content: center; padding: 22px; }

.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(18,24,43,.44); }
.rules-drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(410px, 100vw); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg); transform: translateX(102%); transition: transform .25s ease; }
.rules-drawer.open { transform: none; }
.drawer-head { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-head h2 { margin: 0; font-size: 17px; }
.drawer-head h2 span { color: var(--brand); font-size: 13px; }
.drawer-head .icon-button { margin-left: auto; }
.drawer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; }
.drawer-empty > svg { width: 44px; height: 44px; color: var(--ink-3); }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 28px; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 7px; background: var(--ink); color: white; box-shadow: 0 10px 30px rgba(18,24,43,.2); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1080px) {
  .search-primary { grid-template-columns: minmax(220px,1.2fr) minmax(180px,1fr) minmax(110px,.55fr) minmax(110px,.55fr) auto auto; gap: 9px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .brand span { display: none; }
  .header-stat { min-width: 98px; padding-left: 9px; padding-right: 9px; }
  .merchant-stats { gap: 9px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 24px); }
  .topbar { height: 58px; }
  .topbar-inner { gap: 10px; }
  .brand img { width: 29px; height: 29px; }
  .brand strong { font-size: 17px; }
  .header-stats, .rules-button { display: none; }
  .header-actions { margin-left: auto; }
  .submit-shop-button { width: 38px; height: 38px; justify-content: center; padding: 0; }
  .submit-shop-button span { display: none; }
  .avatar { width: 38px; height: 38px; }
  .mobile-summary { display: block; padding: 7px 14px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
  .mobile-summary b { color: var(--ink); }
  .account-menu { top: 54px; right: 12px; }
  .page { padding-top: 12px; }
  .search-panel { padding: 12px; }
  .search-primary { grid-template-columns: minmax(0,1fr) 78px 42px; gap: 7px; }
  .query-input { grid-column: 1; grid-row: 1; }
  .exclude-input { display: none; }
  .primary-price { display: none; }
  .primary-price input { height: 40px; }
  .search-input input { height: 42px; padding-left: 39px; }
  .search-input svg { left: 12px; }
  .search-button { grid-column: 2; grid-row: 1; height: 42px; padding: 0 12px; }
  .icon-command { grid-column: 3; grid-row: 1; width: 42px; height: 42px; padding: 0; }
  .icon-command span { display: none; }
  .quick-row { margin-top: 11px; gap: 9px; }
  .chips { overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { padding: 5px 10px; }
  .results-section { margin-top: 16px; }
  .results-toolbar { top: 58px; flex-wrap: wrap; gap: 10px; padding: 8px 0; }
  .segments button { height: 35px; padding: 0 13px; }
  .result-summary { margin-left: auto; font-size: 12px; }
  .merchant-head { align-items: center; flex-wrap: wrap; padding: 12px 14px; }
  .merchant-name { flex: 1 1 calc(100% - 95px); max-width: none; font-size: 15px; }
  .merchant-stats { order: 5; width: 100%; gap: 8px 13px; flex-wrap: wrap; }
  .merchant-updated { order: 4; margin-left: 0; }
  .view-all { margin-left: auto; }
  .product-grid { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .product-card { padding: 14px; }
  .product-name { font-size: 15px; }
  .product-table-wrap { display: none; }
  .mobile-product-list { display: grid; gap: 12px; margin-top: 12px; }
  .state-card { min-height: 240px; }
  .skeleton-group { height: 380px; }
}

@media (max-width: 380px) {
  .search-primary { grid-template-columns: minmax(0,1fr) 72px 40px; gap: 5px; }
  .search-button { padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
