:root {
  color: #202c3d;
  background: #f3f6fb;
  font: 15px/1.55 Inter, 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --blue: #205cf5;
  --line: #e6edf6;
  --muted: #606f84;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { text-decoration: none; color: var(--blue); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, .primary { border: 1px solid transparent; border-radius: 8px; }
:focus-visible { outline: 2px solid #184dd5; outline-offset: 3px; }
.primary { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; background: var(--blue); color: #fff; font-weight: 700; white-space: nowrap; }
.primary:hover { background: #1448d3; }
.primary:disabled { opacity: .55; }
.soft { padding: 6px 12px; background: #f0f3f8; color: #31415a; }
.soft:hover { background: #e5ecf7; }
.green { color: #187449; background: #e6f7ee; }
.blue { color: #134acb; background: #e8efff; }
.muted { color: var(--muted); }
.header { position: sticky; z-index: 2; top: 0; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 61px; max-width: 1440px; margin: auto; padding: 9px 26px; display: flex; gap: 22px; align-items: center; }
.header nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.header nav a { color: #44536a; }
.home { display: flex; align-items: center; gap: 8px; color: #243550; white-space: nowrap; }
.home img, .store-header img { border-radius: 9px; object-fit: cover; }
.query-link { margin-left: auto; border-radius: 999px; }
.shell { width: min(1150px, calc(100% - 48px)); margin: 0 auto; }
.store-header { display: flex; align-items: center; gap: 16px; padding: 25px 20px 12px; }
h1, h2, h3 { line-height: 1.25; }
.store-header h1 { margin: 0 0 8px; font-size: 21px; }
.mode { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 2px 7px; border-radius: 4px; background: #fff0d7; color: #80510c; font-size: 11px; }
.store-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.notice { position: relative; display: grid; gap: 4px; width: 100%; margin: 0 0 12px; padding: 10px 42px 10px 20px; text-align: left; color: inherit; background: transparent; }
.notice:hover { background: #eaf0f8; }
.notice span { color: var(--muted); font-size: 13px; }
.notice .notice-arrow { position: absolute; right: 22px; top: 14px; font-size: 24px; color: var(--blue); }
.panel { border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 6px 22px #2e4a7410; }
.catalog { padding: 24px; }
.catalog-header, .list-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
h2 { font-size: 18px; margin: 0; }
.search { width: min(43%, 250px); }
.search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
input:not([type=radio], [type=checkbox]), textarea { display: block; width: 100%; padding: 9px 11px; border: 1px solid #dce5f0; border-radius: 7px; color: #223149; background: #f7f9fc; }
input::placeholder, textarea::placeholder { color: #66758b; }
.categories { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 24px; }
.category { flex: 1 1 125px; min-width: 0; max-width: 182px; min-height: 66px; display: flex; gap: 8px; align-items: center; padding: 9px 10px; color: #283850; text-align: left; background: #f6f8fc; border-color: var(--line); }
.category[aria-pressed=true] { color: white; background: linear-gradient(112deg,#3986fb,#1756ed); border-color: #2369f6; }
.category-icon { width: 26px; flex: none; text-align: center; font-weight: 800; }
.category strong, .category small { display: block; }
.category small { font-size: 11px; margin-top: 2px; }
.category:not([aria-pressed=true]) small { color: var(--muted); }
.list-header { margin: 0 0 12px; }
.list-header h3 { margin: 0; font-size: 15px; }
.list-header span { color: var(--muted); font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.product-card { min-height: 86px; display: flex; flex-direction: column; justify-content: space-between; gap: 9px; padding: 13px 15px; text-align: left; color: inherit; background: white; border-color: var(--line); box-shadow: 0 2px 6px #2a457c0a; }
.product-card:hover { border-color: #80a3fa; background: #fafcff; }
.product-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product-price { color: var(--blue); font-weight: 800; }
.stock { padding: 2px 6px; border-radius: 4px; background: #edf5ff; color: #1d54b4; font-size: 11px; font-weight: 700; }
.stock.empty { background: #ffede2; color: #9b3c16; }
.empty-results { padding: 24px 0; color: var(--muted); }
.load-more { display: block; margin: 18px auto 0; }
footer { padding: 28px 10px 38px; text-align: center; }
footer a { color: var(--muted); font-size: 13px; }
.float-actions { position: fixed; right: 12px; top: 45%; display: grid; gap: 5px; z-index: 1; }
.float-actions > * { padding: 8px 12px; text-align: center; color: white; background: #1675df; border-radius: 8px; font-size: 13px; }
.float-actions a { background: #d83e44; }

dialog { width: min(510px, calc(100% - 28px)); max-height: calc(100dvh - 26px); padding: 0; border: 0; border-radius: 16px; color: #202c3d; box-shadow: 0 25px 60px #11203440; }
dialog::backdrop { background: #141d30a1; }
.announcement { width: min(420px, calc(100% - 28px)); }
.dialog-header, .dialog-banner { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.dialog-banner { position: relative; justify-content: center; padding: 22px; color: white; background: linear-gradient(115deg,#428af9,#2459e3); }
.dialog-banner .close { position: absolute; right: 13px; top: 12px; }
.close { width: 29px; height: 29px; padding: 0; line-height: 1; font-size: 19px; color: #35455d; background: #f1f4fa; }
.dialog-tools { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.dialog-body { padding: 18px 22px 22px; }
.dialog-body h3 { margin: 0; font-size: 15px; }
.dialog-body ol { padding-left: 21px; color: #435169; }
.dialog-body li { margin-block: 9px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; margin-top: 19px; }
.dialog-actions.centered { justify-content: center; }
.item-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#quantity-tag { color: var(--muted); }
.badges { display: flex; gap: 8px; margin-block: 12px; font-size: 12px; }
.badges span { padding: 2px 6px; border-radius: 4px; color: #1657aa; background: #edf4ff; }
.badges span:first-child { color: #176744; background: #e8f7ee; }
.checkbox { display: flex; align-items: center; gap: 6px; padding-block: 5px; }
input[type=radio], input[type=checkbox] { accent-color: var(--blue); }
.contact-field, #coupon-field { display: grid; gap: 5px; margin-top: 13px; }
.price-line { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 15px 0; border-top: 1px solid var(--line); margin-top: 15px; }
#amount strong { color: var(--blue); font-size: 22px; }
.amount-notes { color: #2455ad; font-size: 12px; }
.stepper { display: flex; align-items: center; gap: 3px; flex: none; }
.stepper button { width: 30px; height: 32px; padding: 0; background: #edf2fa; color: #234d99; }
.stepper button:disabled { opacity: .5; }
.stepper #quantity { width: 50px; text-align: center; padding: 4px 2px; appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
fieldset { padding: 0; border: 0; margin: 0; }
legend { margin-bottom: 7px; color: var(--muted); font-size: 13px; }
.payments { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.payments label { display: flex; justify-content: center; align-items: center; gap: 7px; color: #2655ad; background: #f7f9fd; border: 1px solid var(--line); border-radius: 7px; padding: 9px 7px; cursor: pointer; }
.payments label:has(:checked) { border-color: var(--blue); background: #edf3ff; }
.error { padding: 8px 10px; border-radius: 6px; color: #8c292b; background: #fff0ef; }
.service { max-width: 760px; margin: 36px auto 0; padding: clamp(18px,5vw,38px); }
.service h1 { margin: 0 0 8px; }
.service > p { color: var(--muted); }
.lookup-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 10px; margin: 16px 0 9px; }
.order-note { margin-top: 21px; padding: 14px; background: #f4f7fd; border-radius: 8px; }
.order-note p { margin: 4px 0 0; }
.order-result { margin-top: 20px; border: 1px solid var(--line); border-radius: 9px; padding: 14px; }
.order-result h2 { margin-bottom: 6px; }
.order-result p, #payment-summary p { margin: 7px 0; overflow-wrap: anywhere; }
.codes { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; border-radius: 6px; background: #eef5ff; color: #1f4d9d; }
details { border-bottom: 1px solid var(--line); padding-block: 13px; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: calc(100% - 22px); background: #27374d; color: white; padding: 9px 14px; border-radius: 8px; box-shadow: 0 4px 18px #212c4940; }
@media (max-width: 900px) { .float-actions { top: auto; bottom: 12px; display: flex; } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 530px) {
  .shell { width: calc(100% - 20px); }
  .header-inner { gap: 8px; padding: 8px 10px; font-size: 12px; }
  .header nav { gap: 2px 8px; }
  .home strong { display: none; }
  .query-link { padding-inline: 9px; }
  .store-header { padding-inline: 8px; }
  .store-header h1 { font-size: 17px; }
  .catalog { padding: 12px; }
  .category { flex-basis: 105px; }
  .product-card { padding: 9px; font-size: 13px; }
  .product-grid { gap: 8px; }
  .float-actions > * { padding: 6px 9px; }
}
