/* Qingniao redesign: Swiss editorial storefront + operations console. */
:root {
  --ink: #111214;
  --ink-soft: #37383d;
  --muted: #70727a;
  --muted-soft: #a2a4ab;
  --line: #e6e6e3;
  --line-soft: #f0f0ed;
  --bg: #f7f7f4;
  --paper: #ffffff;
  --blue: #1e56e8;
  --blue-hover: #1746c3;
  --blue-wash: #eef3ff;
  --blue-line: #c9d6ff;
  --green: #15754f;
  --green-wash: #edf8f2;
  --amber: #9b5a08;
  --amber-wash: #fff6e7;
  --red: #b42318;
  --red-wash: #fff0ef;
  --violet: #7249c6;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --r-sm: 5px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 18, 20, .04);
  --shadow: 0 8px 24px rgba(17, 18, 20, .06);
  --shadow-lg: 0 20px 52px rgba(17, 18, 20, .14);
  --sidebar-w: 248px;
  --header-h: 68px;
  --max-w: 1360px;
}

:root,
html,
body {
  color-scheme: only light;
}

html { scroll-behavior: auto; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); }
h1, h2, h3, h4 { letter-spacing: 0; color: var(--ink); }
button, a, .pay-option, .mode-choice, .shop-nav-link, .product-buy-button, .dark-button, .outline-button, .round-button, .cart-button, .login-link {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(30, 86, 232, .35); outline-offset: 2px; }

/* Hide the empty homepage until storefront data is ready, so visitors do not see the shell and then a jump. */
.storefront-loading { overflow: hidden; }
.storefront-loading > .shop-header,
.storefront-loading > main,
.storefront-loading > .shop-footer,
.storefront-loading > .modal-layer,
.storefront-loading > .toast { visibility: hidden; }
.storefront-loader { position: fixed; z-index: 200; inset: 0; height: auto; display: grid; place-items: center; overflow: hidden; background: #f7f7f4; pointer-events: none; }
.storefront-loader > span { display: block; width: 28px; height: 28px; margin: 0; border: 2px solid #e6e6e3; border-top-color: #111214; border-radius: 50%; background: transparent; animation: spin .7s linear infinite; }

/* Storefront */
.shop-body { padding-top: var(--header-h); background: var(--bg); }
.shop-header { height: var(--header-h); padding: 0 clamp(18px, 4vw, 56px); gap: 30px; background: #f7f7f4; border-bottom: 1px solid var(--line); box-shadow: none; }
.shop-logo { gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.shop-logo small { display: block; margin-top: -1px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .03em; }
.logo-glyph { width: 48px; height: 48px; border-radius: 50%; background: transparent; overflow: hidden; }
.logo-glyph img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.shop-nav { gap: 4px; }
.shop-nav-link { min-height: 40px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.shop-nav-link:hover { background: #ecece8; color: var(--ink); }
.shop-nav-link.active { background: var(--ink); color: #fff; box-shadow: none; }
.header-tools { gap: 8px; }
.round-button, .cart-button { width: 38px; height: 38px; border-color: var(--line); border-radius: 7px; background: var(--paper); color: var(--ink-soft); }
.round-button:hover, .cart-button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.cart-button > span { border-color: var(--bg); background: var(--blue); }
.login-link { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.login-link:hover { border-color: var(--ink); color: var(--ink); }

@media (min-width: 901px) {
  .shop-body .shop-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 24px;
  }
  .shop-body .shop-logo { justify-self: start; }
  .shop-body .shop-nav { justify-self: center; margin: 0; }
  .shop-body .header-tools { justify-self: end; }
}

.shop-body main { max-width: var(--max-w); margin: 0 auto; padding: 34px clamp(18px, 4vw, 56px) 70px; }
.shop-page.active { animation: none; }
.kicker { color: var(--muted); letter-spacing: .12em; font-size: 10px; }
.section-title, .catalog-head, .subpage-head { margin-bottom: 24px; }
.section-title h1, .section-title h2, .subpage-head h1, .catalog-head h1 { color: var(--ink); letter-spacing: -.025em; }
.section-title h1, .subpage-head h1, .catalog-head h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.15; }
.section-title p:not(.kicker), .subpage-head p:not(.kicker), .catalog-head p:not(.kicker) { max-width: 620px; margin-top: 9px; color: var(--muted); font-size: 14px; }
.text-button { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 12px; }
.text-button:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.store-notice { margin-bottom: 48px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); }
.notice-unified { padding: 26px 28px 24px; }
.notice-unified-head { gap: 13px; }
.notice-unified-icon { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: #fff; }
.notice-unified-head h2 { font-size: 19px; }
.notice-unified-head > div > p:last-child { color: var(--muted); }
.notice-contact-actions { margin-top: 24px; }
.notice-contact-actions .contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.telegram-button, .qq-button { min-height: 62px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fbfbf9; }
.telegram-button:hover, .qq-button:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.telegram-button small, .qq-button small { color: var(--muted); }
.telegram-button:hover small, .qq-button:hover small { color: #c8c8c5; }
.announcement-highlight, .announcement-note { border-radius: 8px; }
.announcement-highlight { margin-top: 18px; padding: 14px 16px; background: #f4f4f1; border: 1px solid var(--line); }
.announcement-note { margin-top: 8px; padding: 12px 16px; color: var(--muted); font-size: 12px; }

.home-section { margin-top: 50px; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 42px;
}
.home-hero-copy {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  justify-content: center;
  padding: 34px 8px 28px 4px;
}
.home-hero-copy h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.04; letter-spacing: -.045em; }
.home-hero-lead { margin: 14px 0 0; color: var(--ink-soft); font-size: 20px; font-weight: 700; }
.home-hero-note { max-width: 560px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.home-quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 640px; margin-top: 26px; }
.home-quick-action { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-soft); font-size: 13px; font-weight: 700; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.home-quick-action:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.home-quick-action.is-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.home-quick-action.is-primary:hover { border-color: var(--blue); background: var(--blue); }
.home-quick-action svg { width: 17px; height: 17px; }
.home-hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin-top: 30px; border-top: 1px solid var(--line); }
.home-hero-metrics span { display: grid; gap: 3px; padding: 14px 16px 0 0; border-right: 1px solid var(--line); }
.home-hero-metrics span + span { padding-left: 16px; }
.home-hero-metrics span:last-child { border-right: 0; }
.home-hero-metrics b { color: var(--ink); font-size: 15px; }
.home-hero-metrics small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.home-hero .store-notice { display: flex; min-height: 390px; flex-direction: column; margin: 0; }
.home-hero .notice-unified { height: 100%; box-sizing: border-box; }
.category-grid, .store-product-grid, .hot-products { gap: 14px; }
.category-directory-card { min-height: 82px; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: none; }
.category-directory-card:hover { border-color: var(--ink); background: #fcfcfa; box-shadow: var(--shadow); }
.category-directory-card > img, .category-grid.large .category-directory-card > img { width: 42px; height: 42px; border-radius: 8px; }
.category-directory-copy { padding: 0; gap: 1px; }
.category-directory-copy b { color: var(--ink); font-size: 14px; }
.category-directory-copy small { display: block; max-width: 240px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.category-directory-copy em { margin-top: 2px; color: var(--blue); font-size: 10px; }
.category-enter { color: var(--muted-soft); }
.category-directory-card:hover .category-enter { color: var(--ink); }
.store-product-card { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: none; overflow: hidden; }
.store-product-card:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.product-visual { background: #ecece8; }
.product-visual img { mix-blend-mode: multiply; }
.delivery-badge { top: 10px; left: 10px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 10px; }
.store-product-info { gap: 8px; padding: 15px 16px 16px; }
.store-product-category { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.store-product-name { min-height: 43px; color: var(--ink); font-size: 15px; line-height: 1.4; }
.store-product-name:hover { color: var(--blue); }
.store-product-description, .store-product-info > p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.store-product-stats { gap: 12px; padding: 10px 0; border-top-color: var(--line-soft); }
.store-product-stats > span { padding: 0; border: 0; background: transparent; }
.store-product-stats small { color: var(--muted-soft); }
.store-product-stats b { color: var(--ink-soft); font-family: var(--mono); font-size: 12px; }
.store-product-footer { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.store-product-footer small { color: var(--muted); }
.store-product-footer strong { color: var(--ink); font-family: var(--mono); font-size: 18px; }
.product-buy-button { min-height: 34px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: #fff; font-size: 11px; }
.product-buy-button:hover { border-color: var(--blue); background: var(--blue); }

.dark-button, .admin-primary { border-color: var(--ink); border-radius: 7px; background: var(--ink); box-shadow: none; }
.dark-button:hover:not(:disabled), .admin-primary:hover:not(:disabled) { border-color: var(--blue); background: var(--blue); }
.outline-button, .admin-outline { border-color: var(--line); border-radius: 7px; }
.outline-button:hover:not(:disabled), .admin-outline:hover:not(:disabled) { border-color: var(--ink); background: var(--ink); color: #fff; }
input, select, textarea { border-color: var(--line); border-radius: 7px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.modal-layer { background: rgba(17,18,20,.42); backdrop-filter: none; }
.modal-card { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.toast { border-radius: 8px; background: var(--ink); }

/* Admin console */
.admin-body { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); background: var(--bg); }
.admin-sidebar { padding: 22px 14px 16px; background: var(--paper); border-right: 1px solid var(--line); }
.admin-sidebar > p { margin: 26px 10px 8px; color: var(--muted-soft); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.admin-nav { min-height: 42px; margin: 2px 0; padding: 0 11px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.admin-nav:hover { background: #f0f0ed; color: var(--ink); }
.admin-nav.active { background: var(--ink); color: #fff; box-shadow: none; }
.admin-nav.active span { background: rgba(255,255,255,.16); color: #fff; }
.admin-side-bottom { border-top-color: var(--line); }
.admin-side-bottom a, .admin-side-bottom button { color: var(--muted); }
.admin-main { min-width: 0; background: var(--bg); }
.admin-top { height: var(--header-h); padding: 0 clamp(18px, 3vw, 42px); background: rgba(247,247,244,.94); border-bottom: 1px solid var(--line); }
.admin-top > div:first-of-type { color: var(--muted); font-size: 12px; }
.admin-top > div:first-of-type b { color: var(--ink); }
.admin-top > div:last-child a { color: var(--muted); font-size: 12px; }
.admin-page { max-width: 1500px; padding: 34px clamp(20px, 3vw, 46px) 70px; }
.admin-heading { margin-bottom: 28px; }
.admin-heading h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.02em; }
.admin-heading p:not(.kicker) { margin-top: 8px; color: var(--muted); }
.admin-metrics { gap: 12px; margin-bottom: 18px; }
.admin-metrics > article { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: none; }
.admin-metrics > article::before { display: none; }
.admin-metrics > article span { color: var(--muted); font-size: 11px; }
.admin-metrics > article b { margin-top: 8px; color: var(--ink); font-family: var(--mono); font-size: 24px; }
.admin-metrics > article small { margin-top: 6px; color: var(--muted-soft); }
.admin-grid { gap: 16px; }
.admin-card, .table-card, .settings-card, .quick-actions-card, .stock-alert-card { border-color: var(--line); border-radius: 10px; box-shadow: none; }
.admin-card { padding: 20px; }
.admin-card-head { margin-bottom: 18px; }
.admin-card-head h2 { color: var(--ink); font-size: 16px; }
.admin-card-head p { color: var(--muted); }
.quick-actions button { border-color: var(--line); border-radius: 8px; background: #fbfbf9; }
.quick-actions button:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.admin-table-wrap { border-radius: 8px; }
thead th { background: #f1f1ee; color: var(--muted); }
tbody td { border-bottom-color: var(--line-soft); }
tbody tr:hover { background: #fbfbf9; }
.admin-tabs { border-bottom-color: var(--line); }
.admin-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); }
.admin-info-band { border-color: var(--line); border-radius: 9px; background: #f1f1ee; }
.announcement-editor-form, .editor-panel, .inventory-import-card { border-radius: 10px; }
.admin-body .badge.ok { background: var(--green-wash); color: var(--green); }
.admin-body .badge.wait { background: var(--amber-wash); color: var(--amber); }

/* Auth pages */
.auth-body { background: var(--bg); }
.auth-shell { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.auth-aside, .user-auth-aside { background: var(--ink); }
.auth-panel, .auth-form-wrap { background: var(--paper); }
.auth-tabs { background: #f1f1ee; }
.auth-tab.active { color: var(--ink); }

@media (max-width: 900px) {
  .shop-header { gap: 12px; }
  .shop-nav { margin-left: auto; }
  .shop-nav-link { padding: 0 9px; }
  .login-link { width: 38px; padding: 0; justify-content: center; font-size: 0; }
  .login-link svg { width: 17px; height: 17px; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; z-index: 80; width: min(286px, 86vw); transform: translateX(-100%); transition: transform .2s ease; }
  .admin-sidebar.open { transform: translateX(0); }
}
@media (max-width: 720px) {
  .home-hero { grid-template-columns: 1fr; gap: 16px; margin-bottom: 30px; }
  .home-hero-copy { min-height: 0; padding: 10px 0 4px; }
  .home-hero-copy h1 { font-size: 42px; }
  .home-hero-lead { font-size: 17px; }
  .home-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; margin-top: 20px; }
  .home-hero-metrics { max-width: none; margin-top: 22px; }
  .home-hero-metrics span { padding-top: 11px; }
  .home-hero-metrics span + span { padding-left: 10px; }
  .home-hero .store-notice { min-height: 0; }
  .shop-body main { padding: 24px 14px 50px; }
  .logo-glyph { width: 40px; height: 40px; }
  .shop-header { padding: 0 14px; }
  .shop-logo > span:last-child { font-size: 13px; }
  .shop-nav-link { font-size: 12px; }
  .notice-unified { padding: 20px 16px; }
  .notice-contact-actions .contact-list { grid-template-columns: 1fr; }
  .section-title h1, .section-title h2, .subpage-head h1, .catalog-head h1 { font-size: 28px; }
  .category-grid, .category-grid.large, .store-product-grid, .hot-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .category-directory-card { grid-template-columns: 32px minmax(0, 1fr); min-height: 66px; padding: 9px; gap: 8px; }
  .category-directory-card > img, .category-grid.large .category-directory-card > img { width: 32px; height: 32px; }
  .category-directory-copy small, .category-enter { display: none; }
  .category-directory-copy b { font-size: 12px; }
  .store-product-info { padding: 10px; gap: 6px; }
  .store-product-name { min-height: 42px; font-size: 13px; }
  .store-product-description, .store-product-info > p { display: none; }
  .store-product-footer strong { font-size: 15px; }
  .product-buy-button { padding: 0 7px; font-size: 10px; }
  .admin-page { padding: 22px 14px 52px; }
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Override the legacy dark storefront block, which uses body-scoped selectors. */
.shop-body {
  --ink: #111214;
  --ink-soft: #37383d;
  --muted: #70727a;
  --muted-soft: #a2a4ab;
  --line: #e6e6e3;
  --line-soft: #f0f0ed;
  --bg: #f7f7f4;
  --bg-sunken: #f1f1ee;
  --paper: #ffffff;
  --blue: #1e56e8;
  --blue-hover: #1746c3;
  --blue-wash: #eef3ff;
  --blue-line: #c9d6ff;
  --green: #15754f;
  --green-wash: #edf8f2;
  --amber: #9b5a08;
  --amber-wash: #fff6e7;
  --red: #b42318;
  --red-wash: #fff0ef;
  --violet: #7249c6;
  --r-sm: 5px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  color-scheme: only light;
  background: var(--bg);
  background-image: none;
  font-size: 14px;
}
.shop-body .storefront-loader { inset: 0; height: auto; background: #f7f7f4; }
.shop-body .storefront-loader > span { width: 28px; height: 28px; border: 2px solid #e6e6e3; border-top-color: #111214; border-radius: 50%; background: transparent; animation: spin .7s linear infinite; }
.shop-body .shop-header { background: rgba(247,247,244,.94); border-bottom-color: var(--line); box-shadow: none; }
.shop-body .logo-glyph { border-radius: 50%; background: transparent; box-shadow: none; overflow: hidden; }
.shop-body .logo-glyph img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.shop-body .shop-logo > span:last-child { color: var(--ink); font-size: 15px; }
.shop-body .shop-logo small { color: var(--muted); }
.shop-body .shop-nav-link { color: var(--muted); border-radius: 6px; font-size: 13px; }
.shop-body .shop-nav-link:hover { color: var(--ink); background: #ecece8; }
.shop-body .shop-nav-link.active { color: #fff; background: var(--ink); box-shadow: none; }
.shop-body .round-button,
.shop-body .cart-button,
.shop-body .login-link { color: var(--ink-soft); background: var(--paper); border-color: var(--line); }
.shop-body .round-button:hover,
.shop-body .cart-button:hover { color: #fff; background: var(--ink); border-color: var(--ink); }
.shop-body .login-link:hover { color: var(--ink); background: var(--paper); border-color: var(--ink); }
.shop-body .cart-button > span { border-color: var(--bg); background: var(--blue); }
.shop-body main { padding-top: 34px; }
.shop-body .kicker { color: var(--muted); font-weight: 650; }
.shop-body .section-title h1,
.shop-body .section-title h2,
.shop-body .subpage-head h1,
.shop-body .catalog-head h1 { color: var(--ink); }
.shop-body .section-title h1,
.shop-body .section-title h2 { font-size: clamp(28px, 3vw, 40px); }
.shop-body .section-title p,
.shop-body .catalog-head p,
.shop-body .subpage-head p { color: var(--muted); font-size: 14px; }
.shop-body .text-button { min-height: 38px; color: var(--ink); }
.shop-body .text-button:hover { color: #fff; }

.shop-body .store-notice { margin-bottom: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-sm); }
.shop-body .store-notice::before { height: 0; background: none; }
.shop-body .notice-unified { padding: 26px 28px 24px; }
.shop-body .notice-unified-icon { width: 38px; height: 38px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; box-shadow: none; }
.shop-body .notice-unified-head h2 { color: var(--ink); font-size: 19px; }
.shop-body .notice-unified-head > div > p:last-child { color: var(--muted); }
.shop-body .notice-contact-actions .contact-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 24px 0 18px; padding: 0; }
.shop-body .notice-contact-actions .telegram-button,
.shop-body .notice-contact-actions .qq-button { min-height: 62px; justify-content: flex-start; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fbfbf9; }
.shop-body .notice-contact-actions .contact-list > * + * { border-left: 1px solid var(--line); }
.shop-body .notice-contact-actions .telegram-button:hover,
.shop-body .notice-contact-actions .qq-button[href]:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.shop-body .notice-contact-actions b { color: var(--ink); font-size: 13px; }
.shop-body .notice-contact-actions small { color: var(--muted); }
.shop-body .notice-contact-actions .telegram-button:hover b,
.shop-body .notice-contact-actions .qq-button:hover b { color: #fff; }
.shop-body .notice-contact-actions .telegram-button:hover small,
.shop-body .notice-contact-actions .qq-button:hover small { color: #c8c8c5; }
.shop-body .notice-unified .announcement-highlight { margin: 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f4f4f1; color: var(--ink-soft); }
.shop-body .notice-unified .announcement-note { margin-top: 8px; padding: 12px 16px; border: 0; border-radius: 8px; background: #fbfbf9; color: var(--muted); }

.shop-body .category-grid,
.shop-body .category-grid.large { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.shop-body .category-directory-card { grid-template-columns: 42px minmax(0, 1fr) auto; min-height: 82px; padding: 12px; border-color: var(--line); border-radius: 9px; background: var(--paper); box-shadow: none; }
.shop-body .category-directory-card:nth-child(3n + 2),
.shop-body .category-directory-card:nth-child(3n) { border-color: var(--line); }
.shop-body .category-directory-card:hover { border-color: var(--ink); background: #fcfcfa; box-shadow: var(--shadow); }
.shop-body .category-directory-card > img,
.shop-body .category-grid.large .category-directory-card > img { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #f1f1ee; }
.shop-body .category-directory-copy,
.shop-body .category-grid.large .category-directory-copy { gap: 1px; padding: 0; }
.shop-body .category-directory-copy b,
.shop-body .category-grid.large .category-directory-copy b { color: var(--ink); font-size: 14px; }
.shop-body .category-directory-copy em { color: var(--blue); }
.shop-body .store-product-grid,
.shop-body .hot-products { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.shop-body .store-product-card,
.shop-body .store-product-card:nth-child(3n + 2),
.shop-body .store-product-card:nth-child(3n) { border-color: var(--line); border-radius: 10px; background: var(--paper); box-shadow: none; }
.shop-body .store-product-card:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.shop-body .product-visual { border-bottom-color: var(--line); background: #ecece8; }
.shop-body .product-visual::after { display: none; }
.shop-body .product-visual img { mix-blend-mode: multiply; }
.shop-body .store-product-info { gap: 8px; padding: 15px 16px 16px; }
.shop-body .store-product-category { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.shop-body .store-product-name { min-height: 43px; color: var(--ink); font-size: 15px; font-weight: 650; line-height: 1.4; }
.shop-body .store-product-stats { gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.shop-body .store-product-stats > span,
.shop-body .store-product-stats > span:first-child { padding: 0; border: 0; border-radius: 0; background: transparent; }
.shop-body .store-product-stats small,
.shop-body .store-product-stats > span:nth-child(2) small { color: var(--muted-soft); }
.shop-body .store-product-stats b { color: var(--ink-soft); font: 600 12px/1.3 var(--mono); }
.shop-body .store-product-description,
.shop-body .store-product-info > p { min-height: 57px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.shop-body .store-product-footer { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.shop-body .store-product-footer small { color: var(--muted); }
.shop-body .store-product-footer strong { color: var(--ink); font-size: 18px; }
.shop-body .delivery-badge,
.shop-body .delivery-badge.code,
.shop-body .delivery-badge.review,
.shop-body .delivery-badge.online { padding: 4px 8px; border: 0; border-radius: 5px; background: var(--ink); color: #fff; box-shadow: none; }
.shop-body .product-buy-button { width: 36px; height: 36px; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: #fff; box-shadow: none; }
.shop-body .product-buy-button:hover { border-color: var(--blue); background: var(--blue); }

.shop-body .catalog-filter,
.shop-body .detail-main,
.shop-body .purchase-panel,
.shop-body .checkout-block,
.shop-body .checkout-summary,
.shop-body .account-orders,
.shop-body .order-query,
.shop-body .sms-config,
.shop-body .sms-session { border-color: var(--line); border-radius: 10px; background: var(--paper); box-shadow: none; }
.shop-body .detail-info article,
.shop-body .filter-note,
.shop-body .query-result,
.shop-body .multi-order-line,
.shop-body .sms-cost { border-color: var(--line); background: #f7f7f4; }
.shop-body .mode-choice,
.shop-body .pay-option,
.shop-body .search-results button { border-color: var(--line); border-radius: 8px; background: var(--paper); }
.shop-body .mode-choice:hover,
.shop-body .pay-option:hover,
.shop-body .search-results button:hover { border-color: var(--ink); background: #f7f7f4; }
.shop-body .mode-choice.active,
.shop-body .pay-option.active { border-color: var(--blue); background: var(--blue-wash); }
.shop-body input,
.shop-body select,
.shop-body textarea { border-color: var(--line); background-color: var(--paper); color: var(--ink); }
.shop-body input:hover,
.shop-body select:hover,
.shop-body textarea:hover { border-color: var(--muted-soft); }
.shop-body input:focus,
.shop-body select:focus,
.shop-body textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.shop-body .dark-button { border-color: var(--ink); border-radius: 7px; background: var(--ink); box-shadow: none; }
.shop-body .dark-button:hover:not(:disabled) { border-color: var(--blue); background: var(--blue); }
.shop-body .outline-button { border-color: var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }
.shop-body .outline-button:hover:not(:disabled) { border-color: var(--ink); background: var(--ink); color: #fff; }
.shop-body .trust-row article { border-color: var(--line); border-radius: 9px; background: var(--paper); }
.shop-body .shop-footer { border-top-color: var(--line); background: var(--paper); }
.shop-body .shop-footer a { color: var(--blue); }
.shop-body .modal-layer { background: rgba(17,18,20,.42); backdrop-filter: none; }
.shop-body .modal-card { border-color: var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.shop-body .modal-x { color: var(--muted); }
.shop-body .modal-x:hover { background: #f1f1ee; color: var(--ink); }
.shop-body .toast { background: var(--ink); color: #fff; }

/* Homepage entry notice: match store-notice paper cards, not leftover navy modal. */
.shop-body .modal-layer.entry-notice-open { background: rgba(17, 18, 20, .44); backdrop-filter: none; }
.shop-body .entry-notice-open .modal-card {
  width: min(440px, 100%);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.shop-body .entry-notice-open .modal-card::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--ink);
}
.shop-body .entry-notice-open .modal-x {
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--muted);
}
.shop-body .entry-notice-open .modal-x:hover { background: #f1f1ee; color: var(--ink); }
.shop-body .entry-notification-modal { display: grid; gap: 0; }
.shop-body .entry-notification-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 48px 16px 22px;
  border-bottom: 1px solid var(--line);
}
.shop-body .entry-notification-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}
.shop-body .entry-notification-icon svg { width: 18px; height: 18px; }
.shop-body .entry-notification-head .kicker { margin: 0 0 3px; color: var(--muted); letter-spacing: .12em; font-size: 10px; font-weight: 650; }
.shop-body .entry-notification-head h2 { margin: 0; color: var(--ink); font-size: 18px; letter-spacing: -.02em; }
.shop-body .entry-notification-copy {
  margin: 16px 22px 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f4f1;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}
.shop-body .entry-notification-copy p { margin: 0; }
.shop-body .entry-notification-copy p + p { margin-top: 8px; }
.shop-body .entry-notification-copy ul,
.shop-body .entry-notification-copy ol { margin: 8px 0 0; padding-left: 18px; }
.shop-body .entry-notification-copy li { margin: 4px 0; }
.shop-body .entry-notification-copy a { color: var(--blue); }
.shop-body .entry-notification-copy strong { color: var(--ink); font-weight: 700; }
.shop-body .entry-notification-actions {
  margin: 0;
  padding: 16px 22px 20px;
}
.shop-body .entry-notification-actions .dark-button {
  min-height: 42px;
  border-radius: 7px;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: none;
}
.shop-body .entry-notification-actions .dark-button:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue);
}

@media (max-width: 720px) {
  .shop-body .shop-nav { border-top-color: var(--line); background: rgba(247,247,244,.97); backdrop-filter: none; }
  .shop-body .store-notice { border-radius: 10px; }
  .shop-body .notice-contact-actions .contact-list { grid-template-columns: 1fr; gap: 8px; }
  .shop-body .notice-contact-actions .contact-list > * + * { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .shop-body .section-title h1,
  .shop-body .section-title h2 { font-size: 28px; }
  .shop-body .category-grid,
  .shop-body .category-grid.large { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shop-body .category-directory-card { grid-template-columns: 32px minmax(0, 1fr); min-height: 66px; padding: 9px; }
  .shop-body .category-directory-card > img,
  .shop-body .category-grid.large .category-directory-card > img { width: 32px; height: 32px; }
  .shop-body .store-product-grid,
  .shop-body .hot-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .shop-body .store-product-card { border-radius: 9px; }
  .shop-body .store-product-info { padding: 10px; }
  .shop-body .store-product-name { font-size: 13px; }
  .shop-body .store-product-description,
  .shop-body .store-product-info > p { display: none; }
  .shop-body .entry-notice-open .modal-card { border-radius: 10px; }
  .shop-body .entry-notification-head { padding: 18px 42px 14px 16px; }
  .shop-body .entry-notification-copy { margin: 14px 16px 0; }
  .shop-body .entry-notification-actions { padding: 14px 16px 16px; }
}

/* Product directory: shared category rail for home, directory and catalog. */
.shop-body .marketplace-section { margin-top: 50px; }
.shop-body .marketplace-layout,
.shop-body .directory-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.shop-body .marketplace-products,
.shop-body .directory-products { min-width: 0; }
.shop-body .category-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.shop-body .category-sidebar-head,
.shop-body .catalog-filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.shop-body .category-sidebar-head { margin-bottom: 12px; padding: 2px 2px 12px; border-bottom: 1px solid var(--line-soft); }
.shop-body .category-sidebar-head .kicker { margin-bottom: 2px; }
.shop-body .category-sidebar-head h2 { font-size: 16px; }
.shop-body .category-sidebar-actions { display: flex; gap: 6px; }
.shop-body .category-sidebar-link,
.shop-body .category-mobile-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--muted);
}
.shop-body .category-sidebar-link:hover,
.shop-body .category-mobile-toggle:hover { border-color: var(--ink); color: var(--ink); }
.shop-body .category-mobile-toggle { display: none; }
.shop-body .category-side-list { display: grid; gap: 4px; }
.shop-body .category-side-item {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.shop-body .category-side-item:hover { border-color: var(--line); background: #f4f4f1; }
.shop-body .category-side-item.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.shop-body .category-side-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.shop-body .category-side-item > span { min-width: 0; }
.shop-body .category-side-item b {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-body .category-side-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.shop-body .category-side-item.active small { color: #bfc1c7; }
.shop-body .category-side-item > svg { width: 14px; height: 14px; color: var(--muted-soft); }
.shop-body .category-side-item.active > svg { color: #fff; }
.shop-body .marketplace-products .section-title,
.shop-body .directory-products .subpage-head { position: relative; }
.shop-body .product-total {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.shop-body .product-total b { color: var(--ink); font: 700 16px/1 var(--mono); }
.shop-body .directory-products .subpage-head { margin-bottom: 24px; }
.shop-body .directory-products .subpage-head .product-total { margin-top: 16px; }
.shop-body #hot-products,
.shop-body #category-page-products { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.shop-body #hot-products .store-product-card,
.shop-body #category-page-products .store-product-card { content-visibility: auto; contain-intrinsic-size: auto 430px; }

.shop-body .catalog-filter {
  top: calc(var(--header-h) + 20px);
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.shop-body .catalog-categories-block,
.shop-body .catalog-filter-block { display: grid; gap: 12px; padding: 15px; }
.shop-body .catalog-categories-block { border-bottom: 1px solid var(--line); }
.shop-body .catalog-filter > .catalog-categories-block { display: grid; }
.shop-body .catalog-filter-title h3 { font-size: 14px; }
.shop-body .catalog-filter-title #reset-filter { min-height: 32px; }
.shop-body .catalog-filter .category-side-item { min-height: 50px; grid-template-columns: 30px minmax(0, 1fr) 14px; padding: 6px; }
.shop-body .catalog-filter .category-side-item img { width: 30px; height: 30px; }
.shop-body .catalog-filter-block > label { margin-top: 2px; }

@media (max-width: 1040px) {
  .shop-body .marketplace-layout,
  .shop-body .directory-layout { grid-template-columns: 196px minmax(0, 1fr); gap: 16px; }
  .shop-body #hot-products,
  .shop-body #category-page-products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 720px) {
  .shop-body .marketplace-section { margin-top: 34px; }
  .shop-body .marketplace-layout,
  .shop-body .directory-layout { grid-template-columns: 1fr; gap: 20px; }
  .shop-body .category-sidebar { position: static; padding: 12px; }
  .shop-body .category-sidebar-head { margin-bottom: 0; padding-bottom: 2px; border-bottom: 0; }
  .shop-body .category-sidebar-link { display: none; }
  .shop-body .category-mobile-toggle { width: 44px; height: 44px; display: grid; }
  .shop-body .category-mobile-toggle svg { transition: transform .18s ease; }
  .shop-body .category-sidebar.mobile-open .category-mobile-toggle svg { transform: rotate(180deg); }
  .shop-body .category-sidebar > .category-side-list { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
  .shop-body .category-sidebar.mobile-open > .category-side-list { display: grid; }
  .shop-body .marketplace-products .section-title { align-items: flex-end; }
  .shop-body #hot-products,
  .shop-body #category-page-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .shop-body .catalog-filter.mobile-open { display: grid; }
  .shop-body .catalog-filter .category-side-list { display: grid; }
}

/* Keep transparent mobile surfaces from being darkened by force-dark browsers. */
@media (max-width: 720px) {
  html,
  body,
  body.shop-body,
  .shop-body main,
  .shop-body .shop-page,
  .shop-body .home-section,
  .shop-body .marketplace-section,
  .shop-body .marketplace-layout,
  .shop-body .marketplace-products,
  .shop-body .directory-layout,
  .shop-body .directory-products {
    background-color: #fff !important;
    background-image: none !important;
  }

  body.shop-body {
    --bg: #fff;
  }
}

.subcategory-tabs { margin-bottom: 4px; }
.subcategory-tab {
  border-radius: 999px;
  background: #fff;
  border-color: rgba(28, 25, 23, .12);
}
.subcategory-tab.active {
  background: #1c1917;
  border-color: #1c1917;
}

.payment-fee-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #f0d7a6;
  border-radius: 8px;
  background: #fff6e7;
  color: #9b5a08;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.storefront-loading > .cs-dock { visibility: hidden; }
.cs-dock {
  position: fixed;
  z-index: 55;
  right: 0;
  left: auto;
  width: max-content;
  margin: 0;
  color: var(--ink);
  transition: none;
}
.cs-dock[data-side="right"] { margin-right: env(safe-area-inset-right); }
.cs-dock[data-side="left"] { margin-left: env(safe-area-inset-left); }
.cs-dock.is-dragging { margin: 0; }
.cs-fab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 46px;
  min-height: 118px;
  margin: 0;
  padding: 14px 0 12px;
  border: 1px solid var(--line);
  border-right-width: 0;
  border-radius: 14px 0 0 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: -6px 10px 28px rgba(17, 18, 20, .1);
  list-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
}
.cs-fab::-webkit-details-marker { display: none; }
.cs-fab::marker { content: ""; }
.cs-fab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cs-fab span {
  writing-mode: vertical-rl;
  letter-spacing: .22em;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.cs-dock[data-side="left"] .cs-fab {
  border-right-width: 1px;
  border-left-width: 0;
  border-radius: 0 14px 14px 0;
  box-shadow: 6px 10px 28px rgba(17, 18, 20, .1);
}
.cs-dock.is-dragging .cs-fab {
  border-width: 1px;
  border-radius: 14px;
  cursor: grabbing;
}
.cs-dock.is-open .cs-fab { background: var(--ink); color: #fff; border-color: var(--ink); }
.cs-panel[hidden] { display: none !important; }
@media (hover: hover) {
  .cs-fab:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
}
.cs-panel {
  position: absolute;
  top: 0;
  right: calc(100% + 10px);
  width: min(240px, calc(100vw - 72px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.cs-dock[data-side="left"] .cs-panel { right: auto; left: calc(100% + 10px); }
.cs-panel-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.cs-panel-title { margin: 2px 0 8px; font-size: 15px; font-weight: 800; }
.cs-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.cs-link + .cs-link { margin-top: 4px; }
.cs-link b { font-size: 13px; font-weight: 700; }
.cs-link small { color: var(--muted); font-size: 12px; }
.cs-link:hover { background: #f4f4f1; }
@media (max-width: 720px) {
  .cs-fab { width: 44px; min-height: 112px; padding: 12px 0 10px; }
  .cs-fab span { font-size: 12px; letter-spacing: .16em; }
  .cs-panel { width: min(232px, calc(100vw - 68px)); }
}

.home-search { display: block; margin: 0 0 14px; }
.home-search input { width: min(100%, 420px); min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.home-search input:focus { outline: 2px solid rgba(17, 18, 20, .12); border-color: var(--ink); }
.was-price { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; text-decoration: line-through; }
.product-buy-button svg { display: block; }

.admin-body .table-actions { flex-wrap: wrap; gap: 6px; }
.admin-body .table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.admin-body .table-link:hover { border-color: var(--ink); background: #f4f4f1; text-decoration: none; }
.admin-body .table-link.danger { color: var(--red); }
.admin-body td small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.toolbar-note { color: var(--muted); font-size: 12px; }
.member-price-input { width: 120px; min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; }
.admin-sidebar > p { margin-top: 18px; }

.product-name-button { display: grid; gap: 2px; padding: 0; border: 0; background: none; text-align: left; color: inherit; cursor: pointer; }
.product-name-button:hover b { text-decoration: underline; }
tr.is-low-stock td:nth-child(3) b, tr.is-low-stock td:nth-child(3) .table-link { color: #9a3412; }
tr.is-off-shelf { opacity: .62; }
#admin-product-kind { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.inventory-layout { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); }
.inventory-import-card { min-height: 0; }
.inventory-import-card textarea { height: 180px; min-height: 140px; max-height: 320px; resize: vertical; }
.inventory-current { min-height: 0; }
.inventory-tools { display: grid; gap: 8px; margin-bottom: 10px; }
.inventory-tools input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.inventory-status-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.inventory-status-tabs button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); }
.inventory-status-tabs button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.inventory-items { height: min(68vh, 720px); min-height: 360px; }
.inventory-item-actions button { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; }
.inventory-item-actions button.danger { color: var(--red); }
@media (max-width: 960px) {
  .inventory-layout { grid-template-columns: 1fr; }
  .inventory-items { height: 52vh; min-height: 280px; }
}

#admin-catalog .admin-table-wrap table { min-width: 1040px; }
#admin-catalog td, #admin-catalog th { vertical-align: middle; }
#admin-catalog td:nth-child(6), #admin-catalog th:nth-child(6),
#admin-catalog td:nth-child(7), #admin-catalog th:nth-child(7) { white-space: nowrap; }
.drag-handle { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); cursor: grab; }
tr.drag-over td { background: #f4f4f1; }
.inventory-batch-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inventory-batch-actions button, .inventory-tools textarea { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.inventory-batch-actions button { min-height: 34px; padding: 0 12px; }
.inventory-batch-actions button.danger { color: var(--red); }
.inventory-tools textarea { width: 100%; min-height: 84px; padding: 8px 10px; font: 12px/1.5 var(--mono); resize: vertical; }
.inventory-table { width: 100%; border-collapse: collapse; }
.inventory-table th, .inventory-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.inventory-cell-value { font: 13px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
.modal-card.modal-desk { width: min(1120px, calc(100vw - 48px)); max-width: 1120px; }
.order-desk-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
.order-desk-meta h2, .order-desk-work h2 { margin-bottom: 12px; }
.order-desk-work textarea { width: 100%; }
.fulfill-list { display: grid; gap: 16px; }
.fulfill-card { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fulfill-card textarea { width: 100%; }
.fulfill-meta p { margin: 6px 0; color: var(--muted); }
@media (max-width: 900px) {
  .order-desk-grid, .fulfill-card { grid-template-columns: 1fr; }
}

#admin-orders table { min-width: 1080px; }
#admin-orders .order-no { white-space: nowrap; }
.user-toolbar { width: 100%; }
.user-toolbar .user-search { flex: 1; min-width: 240px; }
.user-toolbar .user-search input { width: 100%; min-width: 0; }
#admin-user-status { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#admin-users table { min-width: 920px; }
#admin-users .user-balance { font-size: 16px; font-weight: 700; white-space: nowrap; }
#admin-users .user-actions { flex-wrap: nowrap; }

.product-category-bar {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.product-category-bar .product-cat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 14px;
  border: 1px solid #e4e4e0;
  border-radius: 999px;
  background: #fff;
  color: #1c1c1a;
  font-size: 13px;
  line-height: 1;
}
.product-category-bar .product-cat b { font-weight: 650; white-space: nowrap; }
.product-category-bar .product-cat em {
  font-style: normal;
  font-size: 11px;
  color: #8a8a84;
}
.product-category-bar .product-cat span {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f2f2ee;
  color: #5c5c56;
  font: 650 12px/22px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}
.product-category-bar .product-cat:hover { border-color: #111; }
.product-category-bar .product-cat.active {
  background: #111214;
  border-color: #111214;
  color: #fff;
}
.product-category-bar .product-cat.active em { color: rgba(255,255,255,.72); }
.product-category-bar .product-cat.active span { background: rgba(255,255,255,.16); color: #fff; }
.product-category-bar .product-cat.is-hidden:not(.active) { color: #6f6f68; background: #fafaf8; }
#admin-catalog .admin-toolbar { display: flex; align-items: center; gap: 12px; }
#admin-catalog .admin-toolbar > label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
#admin-catalog .admin-toolbar input { flex: 1; width: auto; min-width: 0; }
#admin-product-kind { width: 168px; flex: 0 0 168px; }
#admin-catalog td:nth-child(3), #admin-catalog th:nth-child(3) { white-space: nowrap; }
.inventory-batch-actions { align-items: center; }
.inventory-batch-actions button.danger { border-color: #f0c2c2; background: #fff7f7; }

.shop-body .store-product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.8em;
  max-height: 2.8em;
}
.shop-body .store-product-description,
.shop-body .store-product-info > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.4em;
  max-height: 2.4em;
}
@media (max-width: 720px) {
  html, body.shop-body { overflow-x: hidden; }
  .shop-body .modal-layer { padding: 12px; }
  .shop-body .modal-card {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-width: 0;
    box-sizing: border-box;
  }
  .shop-body .entry-notification-copy,
  .shop-body .announcement-copy,
  .shop-body .store-notice,
  .shop-body .notice-unified { max-width: 100%; overflow-wrap: anywhere; }
  .shop-body .contact-list { display: grid; grid-template-columns: 1fr; }
  .shop-body .shop-nav { left: 0; right: 0; width: 100%; box-sizing: border-box; }
  .shop-body .shop-nav-link {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 0;
    font-size: 12px;
    white-space: nowrap;
  }
  .shop-body .store-product-description,
  .shop-body .store-product-info > p { display: none; min-height: 0; max-height: none; }
}

@media (max-width: 720px) {
  .shop-body .modal-card {
    width: min(520px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
  }
  .shop-body main, .shop-body .shop-page, .shop-body .marketplace-layout, .shop-body .store-notice { min-width: 0; max-width: 100%; }
  .shop-body .shop-nav { width: auto; }
}

.shop-body .modal-layer.entry-notice-open {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.shop-body .entry-notice-open .modal-card {
  width: 100% !important;
  max-width: 440px !important;
  min-width: 0 !important;
}
.shop-nav [hidden] { display: none !important; }


/* catalog-side-rail */
#admin-catalog .catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
#admin-catalog .product-category-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 96px);
  position: sticky;
  top: 12px;
  border: 1px solid #e4e4e0;
  border-radius: 12px;
  background: #fff;
}
#admin-catalog .product-category-bar .product-cat {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 38px;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 8px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}
#admin-catalog .product-category-bar .product-cat b {
  white-space: normal;
  text-align: left;
  flex: 1;
  line-height: 1.35;
}
@media (max-width: 860px) {
  #admin-catalog .catalog-layout { grid-template-columns: 1fr; }
  #admin-catalog .product-category-bar {
    position: static;
    max-height: 240px;
  }
}


.detail-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 16px; }
.detail-specs-label { grid-column: 1 / -1; margin: 0; color: #6f6f68; font-size: 13px; letter-spacing: .04em; }
.detail-spec { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; width: 100%; min-height: 74px; padding: 12px 14px; border: 1px solid #e4e4e0; border-radius: 12px; background: #fff; color: #1c1c1a; text-align: left; }
.detail-spec b { font-size: 14px; font-weight: 650; line-height: 1.35; }
.detail-spec span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.detail-spec strong { font-size: 15px; font-weight: 700; }
.detail-spec small { color: #6f6f68; font-size: 12px; }
.detail-spec:hover { border-color: #111; }
.detail-spec.active { border-color: #111214; background: #111214; color: #fff; }
.detail-spec.active small { color: rgba(255,255,255,.72); }
.detail-spec.is-soldout { opacity: .55; }
@media (max-width: 720px) {
  .detail-specs { grid-template-columns: 1fr; }
}
#product-editor-host { display: flex; flex-direction: column; gap: 16px; }
#spec-manager { order: -1; }
.admin-spec-add { display: grid; grid-template-columns: 1.4fr .7fr .9fr .7fr auto; gap: 10px; align-items: end; margin: 4px 0 14px; }
.admin-spec-add label { display: grid; gap: 6px; margin: 0; font-size: 13px; }
.admin-spec-add input, .admin-spec-add select { width: 100%; min-height: 40px; }
.admin-spec-add small { color: #6f6f68; }
.admin-spec-add .admin-primary { min-height: 40px; white-space: nowrap; }
.admin-spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-spec-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; padding: 14px; border: 1px solid #e4e4e0; border-radius: 12px; background: #fff; }
.admin-spec-card-heading { display: grid; gap: 3px; width: 100%; }
.admin-spec-card-heading span { color: #6f6f68; font-size: 12px; }
.admin-spec-quick-edit { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(100px, .7fr) minmax(140px, 1fr) auto; gap: 8px; align-items: end; width: 100%; padding: 10px; border: 1px solid #dbeafe; border-radius: 8px; background: #f8fbff; }
.admin-spec-quick-edit label { display: grid; gap: 5px; margin: 0; color: #45453f; font-size: 12px; }
.admin-spec-quick-edit input, .admin-spec-quick-edit select { width: 100%; min-height: 36px; }
.admin-spec-quick-edit .admin-primary { min-height: 36px; white-space: nowrap; }
.admin-spec-card b { font-size: 15px; line-height: 1.35; }
.admin-spec-card .spec-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; color: #6f6f68; font-size: 12px; }
.admin-spec-card .spec-meta strong { color: #1c1c1a; font-size: 14px; }
.admin-spec-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-spec-actions button { min-height: 30px; padding: 0 10px; border: 1px solid #e4e4e0; border-radius: 8px; background: #fafaf8; }
.admin-spec-actions button.danger { color: #b42318; border-color: #f0c2c2; background: #fff7f7; }
.spec-child-row td { background: #fafaf8; }
@media (max-width: 900px) {
  .admin-spec-add, .admin-spec-list { grid-template-columns: 1fr; }
}


@media (max-width: 960px) {
  .detail-specs { grid-template-columns: 1fr; }
  .detail-layout, .detail-main, .purchase-panel, .detail-specs, .detail-spec { min-width: 0; max-width: 100%; }
  .detail-spec { box-sizing: border-box; }
  .detail-spec b, .detail-spec small, .detail-spec strong { overflow-wrap: anywhere; }
  .admin-spec-add, .admin-spec-list { grid-template-columns: 1fr; }
}

/* mobile-product-stack */
@media (max-width: 960px) {
  .detail-layout { display: flex; flex-direction: column; gap: 12px; width: 100%; }
  .detail-main { display: contents; }
  .detail-icon { order: 0; margin-bottom: 0; }
  .product-category { order: 1; }
  #detail-name { order: 2; margin: 0; }
  #detail-specs { order: 3; width: 100%; }
  .detail-desc { order: 4; margin-top: 4px; }
  .detail-specs { grid-template-columns: 1fr; margin: 4px 0 0; }
  .detail-spec { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .detail-spec b, .detail-spec small, .detail-spec strong { overflow-wrap: anywhere; }
  .purchase-panel {
    order: 5;
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    gap: 12px;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
  }
  .purchase-top,
  .purchase-panel > label,
  .purchase-total,
  .purchase-panel > .dark-button,
  .purchase-panel > .outline-button,
  .purchase-note {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }
  .purchase-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 12px; }
  .purchase-top strong { font-size: 32px; }
  .wholesale-tiers { display: grid; gap: 4px; width: 100%; }
  .purchase-total { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
  .purchase-panel > .dark-button,
  .purchase-panel > .outline-button { min-height: 48px; }
  .detail-info { order: 6; width: 100%; }
  .description-panel { order: 7; width: 100%; }
  .cs-dock { top: auto; bottom: 86px; }
  .shop-header { background: #fff; }
  main { padding-bottom: 104px; overflow-x: hidden; }
}

.admin-spec-add { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.spec-attach { margin-top: 4px; }

.detail-description-image {
  display: block;
  width: min(100%, 760px);
  height: auto;
  max-height: 720px;
  object-fit: contain;
  margin: 20px auto 0;
  border-radius: 8px;
  background: #f7f7f5;
}

.product-image-preview-wrap { display: grid; gap: 10px; margin: 4px 0 12px; }
.product-image-preview {
  display: grid;
  place-items: center;
  min-height: 120px;
  overflow: hidden;
  border: 1px solid #e6e6e1;
  border-radius: 8px;
  background: #fafaf8;
  color: #777;
  font-size: 13px;
}
.product-image-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; }

.shop-body .home-hero { grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); gap: 24px; margin: 0 0 42px; }
.shop-body .home-hero-copy { min-height: 390px; padding: 34px 8px 28px 4px; }
.shop-body .home-hero-copy h1 { margin: 0; font-size: 56px; line-height: 1.04; }
.shop-body .home-hero-lead { margin: 14px 0 0; font-size: 20px; }
.shop-body .home-hero-note { max-width: 560px; margin: 12px 0 0; line-height: 1.8; }
.shop-body .home-quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 640px; margin-top: 26px; }
.shop-body .home-quick-action { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-soft); font-size: 13px; font-weight: 700; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.shop-body .home-quick-action:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.shop-body .home-quick-action.is-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.shop-body .home-quick-action.is-primary:hover { border-color: var(--blue); background: var(--blue); }
.shop-body .home-quick-action svg { width: 17px; height: 17px; }
.shop-body .home-hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin-top: 30px; border-top: 1px solid var(--line); }
.shop-body .home-hero-metrics span { display: grid; gap: 3px; padding: 14px 16px 0 0; border-right: 1px solid var(--line); }
.shop-body .home-hero-metrics span + span { padding-left: 16px; }
.shop-body .home-hero-metrics span:last-child { border: 0; }
.shop-body .home-hero-metrics b { font-size: 15px; }
.shop-body .home-hero-metrics small { font-size: 11px; line-height: 1.5; }
.shop-body .home-hero .store-notice { min-height: 390px; margin: 0; }
.shop-body .home-hero .notice-unified { height: 100%; box-sizing: border-box; }
.shop-body .home-hero + .marketplace-section { margin-top: 0; }
/* Homepage follows the supplied reference: brand/actions left, announcement right,
   with configured contact channels directly below the shopping actions. */
.shop-body .home-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.shop-body .home-hero-copy { min-width: 0; min-height: 0; }
.shop-body .home-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-body .home-contact-actions { display: block; min-width: 0; max-width: 640px; margin-top: 22px; }
.shop-body .home-contact-actions[hidden] { display: none !important; }
.shop-body .home-contact-title { margin: 0 0 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.shop-body .home-contact-actions .contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shop-body .home-contact-actions .telegram-button,
.shop-body .home-contact-actions .qq-button { display: flex; min-width: 0; min-height: 54px; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); text-decoration: none; }
.shop-body .home-contact-actions .telegram-button:hover,
.shop-body .home-contact-actions .qq-button[href]:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.shop-body .home-contact-actions .brand-logo { width: 20px; height: 20px; flex: 0 0 20px; }
.shop-body .home-contact-actions .telegram-button > span,
.shop-body .home-contact-actions .qq-button > span { display: grid; min-width: 0; gap: 2px; }
.shop-body .home-contact-actions b,
.shop-body .home-contact-actions small { overflow-wrap: anywhere; }
.shop-body .home-contact-actions b { color: inherit; font-size: 12px; }
.shop-body .home-contact-actions small { color: var(--muted); font-size: 11px; }
.shop-body .home-contact-actions .telegram-button:hover small,
.shop-body .home-contact-actions .qq-button[href]:hover small { color: #d1d5db; }
.shop-body .home-hero .store-notice { display: block; min-width: 0; min-height: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.shop-body .notice-heading { display: flex; min-width: 0; align-items: center; gap: 11px; padding-bottom: 15px; border-bottom: 1px solid var(--line-soft); }
.shop-body .notice-heading-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.shop-body .notice-heading-icon svg { width: 18px; height: 18px; }
.shop-body .notice-heading .kicker { margin: 0 0 2px; }
.shop-body .notice-heading h2 { margin: 0; font-size: 18px; }
.shop-body .notice-status { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--green); font-size: 11px; white-space: nowrap; }
.shop-body .notice-status svg { width: 15px; height: 15px; }
.shop-body .notice-content { min-width: 0; padding-top: 15px; overflow-wrap: anywhere; }
.shop-body .notice-content > :first-child { margin-top: 0; }
.shop-body .notice-content > :last-child { margin-bottom: 0; }
.shop-body .notice-content p { line-height: 1.8; }
.shop-body .notice-content .announcement-highlight { margin: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink-soft); }
.shop-body .notice-content .announcement-note { margin-top: 9px; padding: 11px 14px; border: 1px solid var(--line-soft); border-radius: 8px; background: transparent; color: var(--muted); }
.shop-body .notice-content .announcement-empty { color: var(--muted); }
.shop-body.home-active .home-hero-metrics,
.shop-body.home-active .trust-row { display: none !important; }
.shop-body .home-hero + .marketplace-section { margin-top: 0; }
@media (max-width: 900px) {
  .shop-body .home-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; }
  .shop-body .home-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shop-body .home-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 30px; }
  .shop-body .home-hero-copy { min-height: 0; padding: 10px 0 4px; }
  .shop-body .home-hero-copy h1 { font-size: 42px; }
  .shop-body .home-hero-lead { font-size: 17px; }
  .shop-body .home-contact-actions { margin-top: 18px; }
  .shop-body .home-contact-actions .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-body .home-hero .store-notice { padding: 17px 15px; }
  .shop-body .notice-heading { gap: 9px; }
  .shop-body .notice-heading h2 { font-size: 16px; }
  .shop-body .notice-status { font-size: 10px; }
  .shop-body .notice-content .announcement-highlight,
  .shop-body .notice-content .announcement-note { padding: 11px 12px; }
  .shop-body .home-quick-actions { margin-top: 20px; }
  .shop-body .home-hero .store-notice { min-height: 0; }
  .shop-body .marketplace-products,
  .shop-body .marketplace-products .section-title,
  .shop-body #hot-products,
  .shop-body #hot-products > * { min-width: 0; max-width: 100%; }
  .shop-body .store-product-card,
  .shop-body .store-product-info,
  .shop-body .store-product-footer { min-width: 0; }
  .shop-body .store-product-name,
  .shop-body .store-product-footer strong { overflow-wrap: anywhere; }
  .shop-body .store-product-footer { gap: 6px; }
  .shop-body .product-buy-button { min-height: 40px; white-space: nowrap; }
}
@media (max-width: 390px) {
  .shop-body .home-contact-actions .contact-list { grid-template-columns: minmax(0, 1fr); }
  .shop-body .home-contact-actions .telegram-button,
  .shop-body .home-contact-actions .qq-button { min-height: 48px; }
  .shop-body .home-hero-copy h1 { font-size: 36px; }
  .shop-body .home-quick-action { min-height: 48px; padding-inline: 8px; font-size: 12px; }
  .shop-body .marketplace-products .section-title { align-items: flex-start; }
  .shop-body .marketplace-products .section-title > div { min-width: 0; }
  .shop-body .product-total { flex: none; white-space: nowrap; }
  .shop-body #hot-products,
  .shop-body #category-page-products { gap: 7px; }
  .shop-body .store-product-info { padding: 8px; }
}

/* Reference layout: compact hero, horizontal categories and a full-width catalog. */
#home { max-width: 1140px; margin-inline: auto; }
#home .home-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 42px; margin-bottom: 48px; padding: 20px 0 32px; border-bottom: 1px solid var(--line); }
#home .home-hero-copy { min-height: 0; padding: 8px 0 0; }
#home .home-hero-copy h1 { font-size: clamp(36px, 4vw, 56px); line-height: 1.15; }
#home .home-hero-lead { margin-top: 16px; font-size: 19px; }
#home .home-hero-note { margin-top: 9px; }
#home .home-quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 26px; max-width: none; }
#home #home-contact-actions, #home #home-contact-actions .contact-list { display: contents; }
#home #home-contact-actions[hidden] { display: none !important; }
#home .home-quick-action, #home #home-contact-actions .contact-list > * { min-width: 0; min-height: 58px; margin: 0; padding: 10px 8px; gap: 7px; justify-content: center; border-radius: 12px; box-sizing: border-box; }
#home #home-contact-actions .contact-list > * > span { gap: 0; }
#home #home-contact-actions b { font-size: 12px; }
#home #home-contact-actions small { display: none; }
#home .home-hero-metrics { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
#home .home-hero-metrics span { padding: 0 10px; gap: 5px; }
#home .home-hero-metrics span:first-child { padding-left: 0; }
#home .home-hero-metrics b { font-size: 16px; }
#home .home-hero-metrics small { color: var(--muted); font-size: 11px; }
#home .home-hero .store-notice { align-self: start; min-height: 0; margin: 0; padding: 22px; }
#home .marketplace-section { margin-top: 0; }
#home .home-products-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
#home .home-products-heading .kicker { margin: 0 0 6px; }
#home .home-products-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0; font-size: 26px; }
#home .home-products-heading > div > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
#home .product-total { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
#home .home-product-tools { display: flex; gap: 10px; align-items: center; }
#home .home-search { display: flex; align-items: center; gap: 8px; width: 250px; margin: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
#home .home-search svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--muted); }
#home .home-search input { min-width: 0; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 12px; }
#home .home-search:focus-within { outline: 2px solid var(--ink-soft); outline-offset: 2px; }
#home .home-product-tools select { width: 150px; min-height: 46px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink-soft); font-size: 12px; }
#home .home-category-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; padding: 0; }
#home .home-category-pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); color: var(--ink-soft); font-size: 13px; font-weight: 650; }
#home .home-category-pill img { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; }
#home .home-category-pill:hover { border-color: var(--ink-soft); }
#home .home-category-pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#home #hot-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
#home .home-products-empty { grid-column: 1 / -1; padding: 32px 0; }
#product #detail-icon.has-banner { display: block; width: 100%; height: auto; min-height: 0; aspect-ratio: auto; padding: 0; background: transparent; }
#product #detail-icon.has-banner img { display: block; width: 100%; height: auto; max-height: none; padding: 0; object-fit: contain; }
@media (max-width: 1100px) {
  #home .home-hero { gap: 24px; }
  #home .home-quick-action, #home #home-contact-actions .contact-list > * { font-size: 12px; }
  #home #hot-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  #home .home-product-tools { flex-shrink: 0; }
  #home .home-search { width: 210px; }
}
@media (max-width: 800px) {
  #home .home-hero { grid-template-columns: 1fr; gap: 24px; padding-top: 0; margin-bottom: 30px; }
  #home .home-hero-copy { padding: 0; }
  #home .home-hero-copy h1 { font-size: 40px; }
  #home .home-products-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  #home .home-search { width: auto; flex: 1; }
  #home .home-product-tools select { width: 145px; }
  #home #hot-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  #home .home-hero-copy h1 { font-size: 36px; }
  #home .home-hero-lead { font-size: 17px; }
  #home .home-quick-actions { gap: 8px; margin-top: 22px; }
  #home .home-quick-action, #home #home-contact-actions .contact-list > * { padding: 9px 4px; gap: 5px; font-size: 11px; }
  #home #home-contact-actions b { font-size: 11px; }
  #home #home-contact-actions .brand-logo { width: 16px; height: 16px; flex-basis: 16px; }
  #home .home-hero-metrics span { padding: 0 6px; }
  #home .home-hero-metrics b { font-size: 13px; }
  #home .home-hero-metrics small { font-size: 10px; }
  #home .home-products-heading h2 { font-size: 24px; }
  #home .home-product-tools { gap: 8px; }
  #home .home-product-tools select { width: 132px; }
  #home .home-category-pills { gap: 7px; }
  #home .home-category-pill { padding: 7px 12px; font-size: 12px; }
}

/* Homepage revision: original category rail; refine only the upper presentation. */
#home .marketplace-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 24px; align-items: start; }
#home .marketplace-products { min-width: 0; }
#home .category-sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
#home .category-side-list { margin: 0; padding: 0; }
#home .category-side-item .mark-fallback svg { width: 20px; height: 20px; }
#home #hot-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#home .home-products-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
#home .home-products-heading h2 { font-size: 24px; }
#home .home-products-heading .kicker { display: none; }
#home .home-product-tools { flex: 1 1 280px; justify-content: flex-end; }
#home .home-search { flex: 1 1 180px; max-width: 250px; width: auto; }
#home .home-product-tools select { flex: 0 0 140px; width: 140px; }
#home .home-hero { gap: 40px; padding: 8px 0 32px; margin-bottom: 32px; align-items: stretch; }
#home .home-hero-copy { padding: 8px 0; }
#home .home-hero-copy h1 { font-size: clamp(36px, 3.4vw, 48px); letter-spacing: -.035em; }
#home .home-hero-lead { margin-top: 14px; font-size: 18px; }
#home .home-hero-note { font-size: 13px; }
#home .home-quick-actions { gap: 8px; margin-top: 24px; }
#home .home-quick-action { min-height: 46px; border-radius: 9px; }
#home #home-contact-actions { display: block; grid-column: 1 / -1; margin-top: 4px; }
#home #home-contact-actions .contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#home #home-contact-actions .contact-list > * { min-height: 40px; padding: 8px 4px; background: transparent; border-color: transparent; border-radius: 8px; }
#home #home-contact-actions .contact-list > *:hover { background: var(--paper); border-color: var(--line); color: var(--ink); }
#home #home-contact-actions .brand-logo { width: 18px; height: 18px; flex-basis: 18px; }
#home #home-contact-actions b { font-size: 11px; white-space: nowrap; }
#home .home-hero-metrics { display: none !important; }
#home .home-hero .store-notice { padding: 22px 24px; border-radius: 14px; height: 100%; box-sizing: border-box; }
#home .notice-heading { padding-bottom: 14px; }
#home .notice-heading .kicker { display: none; }
#home .notice-heading h2 { font-size: 17px; }
#home .notice-content .announcement-highlight { display: block; margin: 0; padding: 0; border: 0; background: transparent; font-size: 13px; line-height: 1.85; }
#home .notice-content .announcement-highlight p + p { margin-top: 10px; }
@media (max-width: 1100px) {
  #home .marketplace-layout { grid-template-columns: 208px minmax(0, 1fr); gap: 20px; }
  #home #hot-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home .home-product-tools { justify-content: flex-start; }
  #home .home-search { max-width: none; }
}
@media (max-width: 800px) {
  #home .home-hero { gap: 20px; }
  #home .marketplace-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #home .category-sidebar { position: static; }
  #home .category-mobile-toggle { display: grid; }
  #home .category-sidebar > .category-side-list { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
  #home .category-sidebar.mobile-open > .category-side-list { display: grid; }
  #home .home-product-tools { flex: auto; }
}
@media (max-width: 480px) {
  #home .home-hero { padding-bottom: 24px; margin-bottom: 24px; }
  #home .home-hero-copy h1 { font-size: 36px; }
  #home .home-hero .store-notice { padding: 18px; }
  #home .home-quick-action { font-size: 12px; }
  #home #home-contact-actions b { font-size: 10px; }
  #home .home-products-heading { margin-bottom: 16px; }
}

/* Reference composition: six consistent action tiles and a compact order feed. */
#home .home-hero { align-items: start; gap: 40px; padding-top: 16px; }
#home .home-hero-copy { padding-top: 8px; }
#home .home-hero-copy h1 { font-size: clamp(40px, 4vw, 58px); line-height: 1.15; }
#home .home-hero-lead { margin-top: 20px; }
#home .home-quick-actions { gap: 12px; margin-top: 28px; }
#home #home-contact-actions, #home #home-contact-actions .contact-list { display: contents; }
#home .home-quick-action,
#home #home-contact-actions .contact-list > * {
  display: flex; align-items: center; justify-content: center; min-height: 58px;
  padding: 10px 8px; gap: 9px; margin: 0; border: 1px solid var(--line);
  border-radius: 15px; background: var(--paper); color: var(--ink);
  font-size: 13px; font-weight: 700; box-shadow: 0 1px 2px rgba(17,18,20,.03);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
#home .home-quick-action.is-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#home #home-contact-actions b { font-size: 12px; }
#home .home-quick-action svg,
#home #home-contact-actions .brand-logo { box-sizing: content-box; width: 17px; height: 17px; flex: 0 0 17px; padding: 7px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); }
#home .home-quick-action.is-primary svg { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.1); }
#home .home-quick-action:hover,
#home #home-contact-actions .contact-list > *:hover { transform: translateY(-2px); border-color: var(--muted-soft); box-shadow: var(--shadow-sm); }
#home .home-quick-action.is-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
#home .home-hero-metrics { display: grid !important; margin-top: 30px; padding-top: 20px; }
#home .home-hero-metrics b { font-size: 15px; }
#home .home-hero .store-notice { height: auto; padding: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
#home .notice-heading { padding: 18px 22px; margin: 0; background: var(--bg); }
#home .notice-heading-icon { display: none; }
#home .notice-heading h2 { font-size: 15px; }
#home .notice-content { padding: 18px 22px 0; }
#home .notice-content .announcement-highlight { font-size: 12px; line-height: 1.85; }
#home .home-order-demo { margin: 16px 22px 18px; padding-top: 10px; border-top: 1px dashed var(--line); min-width: 0; }
#home .demo-orders-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#home .demo-orders-heading h3 { margin: 0; font-size: 12px; font-weight: 650; color: var(--ink-soft); }
#home .demo-orders-heading h3 span { margin-left: 4px; color: var(--muted); }
#home .demo-orders-disclosure { margin: 0 0 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
#home #home-order-demo-list { margin: 0; padding: 0; list-style: none; overflow: hidden; height: 150px; }
#home .demo-order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 30px; min-width: 0; color: var(--muted); font-size: 11px; }
#home .demo-order-copy { display: flex; align-items: center; gap: 6px; min-width: 0; }
#home .demo-order-user { flex: 0 0 auto; }
#home .demo-order-product { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#home .demo-order-row time { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
#home .demo-order-row.is-new { animation: demo-order-enter .28s ease-out both; }
#home .demo-orders-empty { padding-top: 12px; font-size: 12px; color: var(--muted); }
@keyframes demo-order-enter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) {
  #home .home-quick-actions { gap: 8px; }
  #home .home-quick-action, #home #home-contact-actions .contact-list > * { gap: 6px; font-size: 12px; }
  #home #home-contact-actions b { font-size: 11px; }
  #home .home-quick-action svg, #home #home-contact-actions .brand-logo { padding: 5px; width: 15px; height: 15px; flex-basis: 15px; }
}
@media (max-width: 800px) {
  #home .home-hero { padding-top: 0; gap: 24px; }
  #home .home-hero-copy h1 { font-size: 44px; }
  #home .home-hero .store-notice { width: 100%; }
}
@media (max-width: 480px) {
  #home .home-hero-copy h1 { font-size: 38px; }
  #home .home-hero-lead { font-size: 16px; margin-top: 14px; }
  #home .home-quick-actions { margin-top: 22px; }
  #home .home-quick-action, #home #home-contact-actions .contact-list > * { flex-direction: column; min-height: 76px; gap: 6px; padding: 9px 4px; border-radius: 12px; font-size: 12px; }
  #home #home-contact-actions b { font-size: 11px; }
  #home .home-hero-metrics { margin-top: 22px; padding-top: 16px; }
  #home .home-hero-metrics b { font-size: 12px; }
  #home .notice-heading { padding: 16px; }
  #home .notice-content { padding: 16px 16px 0; }
  #home .home-order-demo { margin: 14px 16px 16px; }
  #home .demo-order-row { gap: 8px; }
  #home .demo-order-copy { gap: 4px; }
  #home .demo-order-row time { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #home .demo-order-row.is-new { animation: none; }
  #home .home-quick-action, #home #home-contact-actions .contact-list > * { transition: none; transform: none; }
}

#home .demo-order-row { margin: 0; padding: 0; }

/* Center contact icons and labels together, matching the quick action buttons. */
#home #home-contact-actions .contact-list > * > span:not(.brand-logo) {
  flex: 0 1 auto;
  width: auto;
  text-align: center;
  justify-items: center;
}
/* ============================================================
   北斗工作室 · 品牌与首屏改版 v3
   header: agent-1 方案（六档位实测）/ hero: agent-2 版式
   ============================================================ */

:root {
  --header-h: 84px;
  --header-pad: clamp(18px, 4vw, 56px);
  --brand-plate: 56px;
  --brand-radius: 14px;
}

.admin-body { --header-h: 68px; }

/* ---- 1. 容器：浅色玻璃 + 发丝线 ---- */
.shop-body .shop-header {
  height: var(--header-h);
  padding: 0 var(--header-pad);
  gap: 26px;
  background: rgba(247, 247, 244, .86);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(17, 18, 20, .08);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .55);
}

/* ---- 2. 品牌区：完整方形 logo ---- */
.shop-body .shop-header .shop-logo {
  gap: 13px;
  min-width: 0;
  color: var(--ink);
}

.shop-body .shop-header .logo-glyph {
  width: var(--brand-plate);
  height: var(--brand-plate);
  flex: 0 0 auto;
  border-radius: var(--brand-radius);
  background: #000209;
  box-shadow:
    0 1px 2px rgba(17, 18, 20, .12),
    0 10px 22px -12px rgba(17, 18, 20, .55),
    0 0 0 1px rgba(17, 18, 20, .06);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s ease;
}

.shop-body .shop-header .logo-glyph img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

.shop-body .shop-header .shop-logo:hover .logo-glyph {
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(17, 18, 20, .14),
    0 16px 28px -14px rgba(17, 18, 20, .60),
    0 0 0 1px rgba(17, 18, 20, .10);
}

.shop-body .shop-header .shop-logo > span:last-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .005em;
  white-space: nowrap;
}

.shop-body .shop-header .shop-logo small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .14em;
}

.shop-body .shop-header .shop-logo small::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(30, 86, 232, .12);
}

/* ---- 3. 导航 ---- */
.shop-body .shop-header .shop-nav { gap: 2px; }

.shop-body .shop-header .shop-nav-link {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.shop-body .shop-header .shop-nav-link:hover {
  background: rgba(17, 18, 20, .055);
  color: var(--ink);
}

.shop-body .shop-header .shop-nav-link.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(17, 18, 20, .16), inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* ---- 4. 工具区：一颗白色胶囊 ---- */
.shop-body .shop-header .header-tools {
  gap: 4px;
  padding: 4px;
  flex: 0 0 auto;
  border: 1px solid rgba(17, 18, 20, .075);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 2px rgba(17, 18, 20, .05);
}

.shop-body .shop-header .round-button,
.shop-body .shop-header .cart-button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  transition: background-color .16s ease, color .16s ease;
}

.shop-body .shop-header .round-button:hover,
.shop-body .shop-header .cart-button:hover {
  background: var(--ink);
  color: #fff;
}

.shop-body .shop-header .round-button svg,
.shop-body .shop-header .cart-button svg,
.shop-body .shop-header .login-link svg {
  width: 17px;
  height: 17px;
}

.shop-body .shop-header .cart-button > span {
  top: -2px;
  right: -1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #fdfdfb;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 700 10px/1 var(--font);
}

.shop-body .shop-header .login-link {
  min-height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 18, 20, .05);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: background-color .16s ease, color .16s ease;
}

.shop-body .shop-header .login-link:hover {
  background: var(--ink);
  color: #fff;
}

/* ---- 5. focus-visible ---- */
.shop-body .shop-header .shop-nav-link:focus-visible,
.shop-body .shop-header .round-button:focus-visible,
.shop-body .shop-header .cart-button:focus-visible,
.shop-body .shop-header .login-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.shop-body .shop-header .shop-logo:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 10px;
}

/* ---- 6. 品牌与导航之间的竖发丝线 ---- */
@media (min-width: 1025px) {
  .shop-body .shop-header { gap: 30px; }

  .shop-body .shop-header .shop-nav::before {
    content: "";
    width: 1px;
    height: 26px;
    margin-right: 12px;
    flex: 0 0 auto;
    background: rgba(17, 18, 20, .10);
  }
}

/* ============================================================
   7. Hero 首屏（agent-2 版式）
   ============================================================ */
.home-hero-copy {
  min-height: 400px;
  padding: 20px 8px 24px 4px;
}

.home-hero-copy .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-hero-copy .kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ink);
  opacity: .55;
}

.home-hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
}

.home-hero-lead {
  margin: 16px 0 0;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.45;
  color: var(--ink);
}

.home-hero-note {
  margin: 10px 0 0;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}

.home-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 660px;
  margin-top: 28px;
}

.home-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-contact-actions[hidden] { display: none; }

.home-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.home-quick-action svg { width: 16px; height: 16px; stroke-width: 1.75; }

.home-quick-action:hover {
  border-color: rgba(17, 18, 20, .32);
  background: #fff;
  transform: translateY(-1px);
}

.home-quick-action.is-primary {
  padding-left: 20px;
  padding-right: 16px;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.home-quick-action.is-primary::after {
  content: "→";
  margin-left: 6px;
  font-size: 15px;
  line-height: 1;
  transition: transform .22s ease;
}

.home-quick-action.is-primary:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.home-quick-action.is-primary:hover::after { transform: translateX(3px); }

.home-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 660px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.home-hero-metrics > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 14px 0 0;
  min-width: 0;
  border-right: 0;
}

.home-hero-metrics > span + span {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.home-hero-metrics b {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink);
}

.home-hero-metrics small {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--muted);
}

/* ============================================================
   8. 页脚 / 登录页 / 分销台的品牌小图统一成方形圆角
   ============================================================ */
.shop-footer .logo-glyph,
.legal-header .logo-glyph,
.auth-aside .logo-glyph,
.user-auth-aside .logo-glyph {
  border-radius: 12px;
  background: #000209;
  overflow: hidden;
}

.shop-footer .logo-glyph { width: 40px; height: 40px; }
.shop-footer .logo-glyph img,
.legal-header .logo-glyph img,
.auth-aside .logo-glyph img,
.user-auth-aside .logo-glyph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.agent-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #000209;
}

.agent-brand-mark img { width: 100%; height: 100%; object-fit: contain; }

/* ============================================================
   9. 断点
   ============================================================ */
@media (min-width: 721px) and (max-width: 1024px) {
  :root { --header-h: 76px; --brand-plate: 48px; --brand-radius: 12px; }

  .shop-body .shop-header { gap: 18px; }
  .shop-body .shop-header .shop-logo { gap: 11px; }
  .shop-body .shop-header .shop-logo > span:last-child { font-size: 14px; }
  .shop-body .shop-header .shop-nav-link { min-height: 36px; padding: 0 11px; font-size: 12.5px; }

  .shop-body .shop-header .round-button,
  .shop-body .shop-header .cart-button { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }

  .shop-body .shop-header .login-link { min-height: 34px; padding: 0 12px; }
}

@media (max-width: 920px) {
  .home-hero { grid-template-columns: 1fr; gap: 18px; }
  .home-hero-copy { min-height: 0; padding: 26px 0 8px; }
  .home-hero-metrics { max-width: none; }
  .home-hero .store-notice { min-height: 0; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; --brand-plate: 40px; --brand-radius: 11px; --header-pad: 14px; }

  .shop-body .shop-header {
    gap: 10px;
    background: rgba(247, 247, 244, .97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .shop-body .shop-header .shop-logo { gap: 9px; }
  .shop-body .shop-header .shop-logo > span:last-child { font-size: 13px; }
  .shop-body .shop-header .shop-logo small { display: none; }

  .shop-body .shop-header .header-tools { padding: 3px; gap: 2px; }
  .shop-body .shop-header .round-button,
  .shop-body .shop-header .cart-button { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
  .shop-body .shop-header .login-link { min-height: 40px; min-width: 40px; padding: 0 11px; }
  .shop-body .shop-header .login-link span { display: none; }

  .home-hero-copy { padding: 20px 0 6px; }
  .home-hero-copy .kicker { font-size: 10px; letter-spacing: .26em; margin-bottom: 13px; }
  .home-hero-copy h1 { font-size: clamp(30px, 8.4vw, 42px); letter-spacing: -.025em; }
  .home-hero-lead { margin-top: 13px; font-size: 16px; }
  .home-hero-note { font-size: 13px; max-width: none; }
  .home-quick-actions { gap: 8px; margin-top: 20px; }
  .home-quick-action { min-height: 44px; padding: 0 14px; font-size: 12.5px; }
  .home-quick-action.is-primary { padding-left: 16px; padding-right: 13px; }
  .home-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
  .home-hero-metrics > span { padding: 13px 10px 0 0; }
  .home-hero-metrics > span + span { padding-left: 0; border-left: 0; }
  .home-hero-metrics > span:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .home-hero-metrics > span:nth-child(odd) { padding-left: 0; border-left: 0; }
  .home-hero-metrics > span:nth-child(n+3) { padding-top: 13px; }
}

@media (max-width: 400px) {
  .shop-body .shop-header { padding: 0 12px; gap: 8px; }
  .shop-body .shop-header .shop-logo > span:last-child { font-size: 12px; }
  .home-quick-action { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-body .shop-header .logo-glyph,
  .shop-body .shop-header .shop-nav-link,
  .home-quick-action,
  .home-quick-action.is-primary::after { transition: none !important; }
  .home-quick-action:hover,
  .shop-body .shop-header .shop-logo:hover .logo-glyph { transform: none; }
}
/* ============================================================
   北斗工作室 · v3.1 移动端收敛（覆盖 #home 的 ID 级规则）
   ============================================================ */
@media (max-width: 720px) {
  #home .home-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
  }
  #home .home-quick-action {
    min-height: 52px;
    border-radius: 11px;
  }
  #home .home-quick-action.is-primary::after { content: ""; margin: 0; }

  #home .home-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 22px;
    padding-top: 14px;
  }
  #home .home-hero-metrics span {
    padding: 12px 10px 0 0;
    border-right: 0;
    border-left: 0;
  }
  #home .home-hero-metrics span:nth-child(even) {
    padding-left: 12px;
    border-left: 1px solid var(--line);
  }
  #home .home-hero-metrics span:nth-child(n+3) { padding-top: 12px; }
  #home .home-hero-metrics b { font-size: 13px; }
  #home .home-hero-metrics small { font-size: 10.5px; }

  #home .home-hero { gap: 20px; }
  #home .home-hero-copy h1 { font-size: clamp(30px, 8.2vw, 40px); letter-spacing: -.03em; }
}

@media (max-width: 400px) {
  #home .home-quick-actions { grid-template-columns: 1fr; }
  #home .home-hero-metrics { grid-template-columns: 1fr !important; }
  #home .home-hero-metrics span:nth-child(even) { padding-left: 0; border-left: 0; }
}
/* ============================================================
   北斗工作室 · v3.2 移动端按钮/指标排版修正
   ============================================================ */
@media (max-width: 720px) {
  #home .home-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #home .home-quick-action,
  #home #home-contact-actions .contact-list > * {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }
  #home .home-quick-action svg { width: 15px; height: 15px; flex: 0 0 auto; }
  #home #home-contact-actions b { font-size: 11.5px; }

  #home .home-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #home .home-hero-metrics span { padding: 11px 8px 0 0; }
  #home .home-hero-metrics span:nth-child(even) {
    padding-left: 10px;
    border-left: 1px solid var(--line);
  }
  #home .home-hero-metrics span:nth-child(n+3) { padding-top: 11px; }
}

@media (max-width: 400px) {
  #home .home-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home .home-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #home .home-hero-metrics span:nth-child(even) {
    padding-left: 8px;
    border-left: 1px solid var(--line);
  }
  #home .home-quick-action { font-size: 11.5px; padding: 0 6px; gap: 5px; }
}
/* ============================================================
   北斗工作室 · v3.3 品牌图放大一档（64px 底板 / 88px 头部）
   ============================================================ */
:root {
  --header-h: 88px;
  --brand-plate: 64px;
  --brand-radius: 15px;
}

.shop-body .shop-header .shop-logo > span:last-child { font-size: 16px; }

@media (min-width: 721px) and (max-width: 1024px) {
  :root { --header-h: 78px; --brand-plate: 54px; --brand-radius: 13px; }
  .shop-body .shop-header .shop-logo > span:last-child { font-size: 15px; }
}

@media (max-width: 720px) {
  :root { --header-h: 66px; --brand-plate: 44px; --brand-radius: 11px; }
  .shop-body .shop-header .shop-logo > span:last-child { font-size: 13.5px; }
}

@media (max-width: 400px) {
  :root { --brand-plate: 40px; }
  .shop-body .shop-header .shop-logo > span:last-child { font-size: 12.5px; }
}
/* ============================================================
   v3.4 · 仅把 logo 改成「圆形 + 内容完整」
   （其余版式保持 v3.3：方形底板那套已回滚为实际生效状态）
   ============================================================ */
.shop-body .shop-header .logo-glyph{
  width:72px;
  height:72px;
  border-radius:50%;
  background:#0a0d18;
  box-shadow:
    0 1px 2px rgba(17,18,20,.10),
    0 0 0 1px rgba(17,18,20,.06);
  overflow:hidden;
}
.shop-body .shop-header .logo-glyph img{
  display:block;
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
}
.shop-body .shop-header .shop-logo:hover .logo-glyph{
  transform:translateY(-1px);
  box-shadow:0 2px 6px rgba(17,18,20,.12), 0 0 0 1px rgba(17,18,20,.10);
}

@media (min-width:721px) and (max-width:1024px){
  .shop-body .shop-header .logo-glyph{ width:60px; height:60px; }
}
@media (max-width:720px){
  .shop-body .shop-header .logo-glyph{ width:44px; height:44px; }
}
@media (max-width:400px){
  .shop-body .shop-header .logo-glyph{ width:40px; height:40px; }
}
