html[data-theme="night"] {
  --bg: #121418;
  --paper: #1c1f27;
  --ink: #f2f3f5;
  --muted: #a7adba;
  --line: #2c313c;
  color-scheme: dark;
}
html[data-theme="night"] body.shop-body,
html[data-theme="night"] .shop-header,
html[data-theme="night"] .storefront-loader {
  background: #121418;
  color: #f2f3f5;
}
html[data-theme="night"] .shop-header { border-bottom-color: #2c313c; }
html[data-theme="night"] body.shop-body :is(
  .store-product-card, .category-directory-card, .notice-unified, .checkout-block,
  .purchase-panel, .wallet-card, .modal-card, .order-query, .cashier-shell,
  .description-panel, .catalog-filter, .category-sidebar, .order-list-card,
  .agent-card, .cs-panel, .shop-footer
) {
  background: #1c1f27;
  color: #f2f3f5;
  border-color: #2c313c;
}
html[data-theme="night"] body.shop-body :is(input, select, textarea) {
  background: #121418;
  color: #f2f3f5;
  border-color: #2c313c;
}
html[data-theme="night"] body.shop-body a,
html[data-theme="night"] body.shop-body button.store-product-name { color: #f2f3f5; }

html[data-theme="paper"] {
  --bg: #f3ead7;
  --paper: #fffaf2;
  --ink: #3a2e22;
  --muted: #7a6856;
  --line: #e4d7c3;
  color-scheme: light;
}
html[data-theme="paper"] body.shop-body,
html[data-theme="paper"] .shop-header,
html[data-theme="paper"] .storefront-loader {
  background: #f3ead7;
  color: #3a2e22;
}
html[data-theme="paper"] .shop-header { border-bottom-color: #e4d7c3; }
html[data-theme="paper"] body.shop-body :is(
  .store-product-card, .category-directory-card, .notice-unified, .checkout-block,
  .purchase-panel, .wallet-card, .modal-card, .order-query, .cashier-shell,
  .description-panel, .catalog-filter, .category-sidebar, .order-list-card,
  .agent-card, .cs-panel, .shop-footer
) {
  background: #fffaf2;
  color: #3a2e22;
  border-color: #e4d7c3;
}

.cs-panel {
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 68px));
  height: min(560px, calc(100vh - 88px));
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}
.cs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  min-height: 56px;
  padding: 0 6px 0 16px;
  background: #111214;
  color: #fff;
}
.cs-head-copy { display: grid; gap: 1px; min-width: 0; }
.cs-head-copy b,
.cs-head b { font-size: 15px; font-weight: 750; line-height: 1.2; }
.cs-head-copy small { color: rgba(255, 255, 255, .72); font-size: 11px; font-weight: 500; }
.cs-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cs-close:hover { background: rgba(255, 255, 255, .12); }
#cs-live {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f6f6f4;
}
.cs-live-log {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 16px 14px;
  background: #f6f6f4;
}
.cs-live-row {
  max-width: min(82%, 280px);
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff;
  color: #111214;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 0 rgba(17, 18, 20, .04);
}
.cs-live-row span { display: block; white-space: pre-wrap; }
.cs-image-link { display: block; margin: 4px 0 6px; max-width: 240px; }
.cs-image { display: block; width: auto; max-width: 100%; max-height: 220px; border-radius: 10px; object-fit: contain; background: rgba(17, 18, 20, .06); }
.cs-compose-tools { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.cs-attach { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border: 1px solid var(--line, #e6e6e3); border-radius: 8px; color: inherit; font-size: 12px; cursor: pointer; }
.cs-attach:hover { background: rgba(17, 18, 20, .05); }
.cs-image-hint { color: #8a8a86; font-size: 11px; }
.cs-image-clear { border: 0; background: transparent; color: #9b3a2f; font-size: 11px; cursor: pointer; }
.cs-upload-preview { display: flex; align-items: center; gap: 8px; min-height: 26px; color: #6f6f6a; font-size: 11px; }
.cs-upload-preview img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; }
.cs-live-row.user { align-self: flex-end; background: #111214; color: #fff; border-bottom-right-radius: 5px; }
.cs-live-row.staff { align-self: flex-start; border: 1px solid #e7e7e4; border-bottom-left-radius: 5px; }
.cs-live-row small { display: block; margin-bottom: 3px; opacity: .62; font-size: 11px; font-weight: 500; }
.cs-live-log .cs-live-empty { margin: auto; max-width: 18em; color: #8a8a86; font-size: 13px; line-height: 1.6; text-align: center; }
.cs-live-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 14px;
  border-radius: 8px;
  background: #111214;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.cs-live-note { flex: none; margin: 0; padding: 0 12px 8px; color: #9b3a2f; font-size: 12px; }
.cs-live-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid #ecece8;
  background: #fff;
}
.cs-compose { display: grid; gap: 4px; min-width: 0; }
.cs-compose p { margin: 0; color: #8a8a86; font-size: 11px; line-height: 1.4; }
.cs-live-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid var(--line, #e6e6e3);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  line-height: 1.45;
}
.cs-live-form .dark-button { min-height: 40px; padding: 0 14px; }
/* 未登录访客：免登录提示 + 选填邮箱，方便客服回信 */
.cs-live-hint { margin: 0; color: #8a8a86; font-size: 11px; line-height: 1.5; }
.cs-live-mail { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cs-live-mail span { flex: none; color: #8a8a86; font-size: 11px; }
.cs-live-mail input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line, #e6e6e3);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 12px;
}
html[data-theme="night"] .cs-live-mail input { background: #1c1f27; border-color: #3a404c; color: #f2f3f5; }
html[data-theme="paper"] .cs-live-mail input { background: #fffaf2; border-color: #e4d7c3; }
html[data-theme="night"] #cs-live,
html[data-theme="night"] .cs-live-log,
html[data-theme="night"] .cs-live-form,
html[data-theme="night"] .cs-live-form textarea { background: #1c1f27; color: #f2f3f5; }
html[data-theme="night"] .cs-live-row.staff { background: #2c313c; color: #f2f3f5; border-color: #3a404c; }
html[data-theme="night"] .cs-live-row.user { background: #f2f3f5; color: #121418; }
html[data-theme="night"] .cs-live-form { border-top-color: #2c313c; }
html[data-theme="night"] .cs-live-form textarea { border-color: #2c313c; }
html[data-theme="night"] .cs-attach { border-color: #3a404c; }
html[data-theme="paper"] #cs-live,
html[data-theme="paper"] .cs-live-log,
html[data-theme="paper"] .cs-live-form,
html[data-theme="paper"] .cs-live-form textarea { background: #fffaf2; }
html[data-theme="paper"] .cs-live-row.staff { background: #fff; border-color: #e4d7c3; color: #3a2e22; }
html[data-theme="paper"] .cs-live-form { border-top-color: #e4d7c3; }
html[data-theme="paper"] .cs-attach { border-color: #e4d7c3; }
@media (max-width: 720px) {
  .cs-dock.is-open .cs-fab { visibility: hidden; }
  .cs-panel {
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    bottom: 16px !important;
    left: 12px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;
    height: min(520px, calc(100vh - 96px));
    margin: 0 !important;
    z-index: 70;
    box-sizing: border-box !important;
    overflow: hidden;
  }
  #cs-live,
  .cs-live-log,
  .cs-live-form,
  .cs-compose { min-width: 0; max-width: 100%; }
  .cs-live-form { grid-template-columns: minmax(0, 1fr); }
  .cs-live-form textarea { max-width: 100%; }
  .cs-live-form .dark-button { justify-self: end; width: auto; }
}

/* Distribution workbench */
:root {
  --agent-bg: #f5f6f8;
  --agent-surface: #fff;
  --agent-surface-soft: #fafbfc;
  --agent-text: #17191d;
  --agent-muted: #6d737d;
  --agent-line: #e3e6eb;
  --agent-blue: #087cf0;
  --agent-blue-soft: #eaf4ff;
  --agent-green: #15966b;
  --agent-red: #c74b54;
  --agent-shadow: 0 8px 24px rgba(25, 38, 62, .05);
}
html[data-agent-theme="dark"] {
  --agent-bg: #171a20;
  --agent-surface: #22262e;
  --agent-surface-soft: #1c2027;
  --agent-text: #f2f4f7;
  --agent-muted: #a9b1be;
  --agent-line: #343b47;
  --agent-blue: #6caeff;
  --agent-blue-soft: #263b55;
  --agent-green: #56c89d;
  --agent-red: #f18d96;
  --agent-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
.agent-page { min-width: 320px; min-height: 100vh; margin: 0; background: var(--agent-bg); color: var(--agent-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
.agent-page *, .agent-page *::before, .agent-page *::after { box-sizing: border-box; }
.agent-page button, .agent-page input, .agent-page textarea, .agent-page select { font: inherit; }
.agent-page button, .agent-page a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.agent-page button { cursor: pointer; }
.agent-page button:disabled { cursor: not-allowed; opacity: .55; }
.agent-page :focus-visible { outline: 3px solid rgba(8, 124, 240, .35); outline-offset: 2px; }
.agent-icon svg, .agent-top-actions svg, .agent-page svg { display: block; width: 18px; height: 18px; }
.agent-skip { position: fixed; z-index: 100; left: 12px; top: -50px; padding: 8px 12px; background: var(--agent-text); color: var(--agent-surface); border-radius: 6px; text-decoration: none; }
.agent-skip:focus { top: 12px; }
.agent-topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 max(24px, calc((100vw - 1260px) / 2)); background: color-mix(in srgb, var(--agent-surface) 94%, transparent); border-bottom: 1px solid var(--agent-line); backdrop-filter: blur(12px); }
.agent-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--agent-text); text-decoration: none; }
.agent-brand-mark { display: grid; width: 28px; height: 28px; overflow: hidden; place-items: center; border-radius: 6px; background: var(--agent-text); }
.agent-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.agent-brand b { display: block; font-size: 16px; font-weight: 750; line-height: 1.1; }
.agent-brand small { display: block; margin-top: 2px; color: var(--agent-muted); font-size: 11px; line-height: 1.1; }
.agent-top-actions { display: flex; align-items: center; gap: 8px; }
.agent-back, .agent-lang, .agent-account, .agent-icon-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; gap: 7px; border: 0; background: transparent; color: var(--agent-muted); text-decoration: none; }
.agent-back { padding: 0 8px; }
.agent-back:hover, .agent-lang:hover, .agent-account:hover, .agent-icon-button:hover { color: var(--agent-text); }
.agent-icon-button, .agent-lang, .agent-account { border-radius: 6px; }
.agent-lang, .agent-account { padding: 0 8px; }
.agent-account svg { width: 17px; height: 17px; }
.agent-avatar { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--agent-text); color: var(--agent-surface); font-size: 11px; font-weight: 750; }
.agent-caret { font-size: 10px; color: var(--agent-muted); }
.agent-account-menu { position: relative; }
.agent-menu, .agent-popup-menu { position: absolute; z-index: 50; min-width: 128px; padding: 5px; border: 1px solid var(--agent-line); border-radius: 6px; background: var(--agent-surface); box-shadow: var(--agent-shadow); }
.agent-menu { top: calc(100% + 6px); right: 0; }
.agent-popup-menu { top: calc(100% + 4px); right: 0; }
.agent-menu button, .agent-popup-menu button { display: flex; width: 100%; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--agent-text); text-align: left; }
.agent-menu button:hover, .agent-popup-menu button:hover, .agent-popup-menu button[aria-current="true"] { background: var(--agent-blue-soft); color: var(--agent-blue); }
.agent-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); width: min(1260px, calc(100% - 48px)); margin: 24px auto 64px; gap: 24px; align-items: start; }
.agent-page .agent-main { width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0; }
.agent-root { width: 100%; max-width: none; min-width: 0; margin: 0; }
.agent-user-label { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.agent-sidebar { position: sticky; top: 88px; display: flex; min-height: 510px; flex-direction: column; padding: 14px 10px; border: 1px solid var(--agent-line); border-radius: 8px; background: var(--agent-surface); box-shadow: var(--agent-shadow); }
.agent-sidebar-head, .agent-sidebar-foot > span, .agent-nav-group-label { padding: 0 10px; color: var(--agent-muted); font-size: 12px; font-weight: 650; }
.agent-sidebar-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.agent-nav { display: grid; gap: 3px; margin-top: 4px; }
.agent-nav-group-label { margin-top: 10px; margin-bottom: 2px; font-size: 11px; }
.agent-nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--agent-muted); text-align: left; font-weight: 580; }
.agent-nav-item:hover { background: var(--agent-bg); color: var(--agent-text); }
.agent-nav-item.is-active { background: var(--agent-bg); color: var(--agent-text); font-weight: 720; }
.agent-nav-item.is-active::before { position: absolute; left: -10px; width: 3px; height: 26px; border-radius: 0 3px 3px 0; background: var(--agent-blue); content: ""; }
.agent-nav-icon { display: grid; width: 20px; height: 20px; flex: none; place-items: center; color: currentColor; }
.agent-nav-icon svg { width: 18px; height: 18px; }
.agent-sidebar-foot { display: grid; gap: 4px; margin-top: auto; padding-top: 14px; }
.agent-sidebar-foot .agent-nav-item { margin-top: 0; }
.agent-mobile-close { display: none; border: 0; background: transparent; color: var(--agent-muted); font-size: 16px; }
.agent-main { min-width: 0; }
.agent-root { min-width: 0; }
.agent-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; min-height: 98px; padding: 0 0 18px; }
.agent-page-heading h1 { margin: 0; color: var(--agent-text); font-size: clamp(24px, 3vw, 32px); font-weight: 780; letter-spacing: -.04em; line-height: 1.15; }
.agent-page-heading p { max-width: 650px; margin: 7px 0 0; color: var(--agent-muted); }
.agent-eyebrow, .agent-section-kicker { margin: 0 0 5px !important; color: var(--agent-muted) !important; font-size: 10px !important; font-weight: 720 !important; letter-spacing: .12em; text-transform: uppercase; }
.agent-refresh, .agent-secondary, .agent-primary, .agent-text-button, .agent-small-primary, .agent-small-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border-radius: 6px; padding: 0 14px; font-weight: 650; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.agent-refresh, .agent-secondary { border: 1px solid var(--agent-line); background: var(--agent-surface); color: var(--agent-text); }
.agent-refresh:hover, .agent-secondary:hover { background: var(--agent-bg); }
.agent-primary { border: 1px solid var(--agent-blue); background: var(--agent-blue); color: #fff; }
.agent-primary:hover { filter: brightness(.95); transform: translateY(-1px); }
.agent-text-button { min-height: 34px; padding: 0 4px; border: 0; background: transparent; color: var(--agent-blue); }
.agent-small-primary, .agent-small-quiet { min-height: 32px; padding: 0 9px; font-size: 12px; }
.agent-small-primary { border: 1px solid var(--agent-blue); background: var(--agent-blue); color: #fff; }
.agent-small-quiet { border: 1px solid transparent; background: transparent; color: var(--agent-muted); }
.agent-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.agent-metric { display: grid; gap: 6px; min-height: 94px; padding: 16px; border: 1px solid var(--agent-line); border-radius: 8px; background: var(--agent-surface); box-shadow: var(--agent-shadow); }
.agent-metric span { color: var(--agent-muted); font-size: 12px; }
.agent-metric strong { color: var(--agent-text); font-size: 23px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.agent-metric strong.is-green, .agent-table .is-green { color: var(--agent-green); }
.agent-metric strong.is-red, .agent-table .is-red { color: var(--agent-red); }
.agent-section, .agent-panel, .agent-access-card, .agent-guard { border: 1px solid var(--agent-line); border-radius: 8px; background: var(--agent-surface); box-shadow: var(--agent-shadow); }
.agent-section { overflow: hidden; }
.agent-section + .agent-section, .agent-panel + .agent-section, .agent-section + .agent-panel { margin-top: 14px; }
.agent-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.agent-section-head h2, .agent-panel h2 { margin: 0; color: var(--agent-text); font-size: 17px; font-weight: 730; }
.agent-section-head p, .agent-panel > p { margin: 4px 0 0; color: var(--agent-muted); }
.agent-table-wrap { overflow-x: auto; }
.agent-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.agent-table th, .agent-table td { padding: 13px 20px; border-bottom: 1px solid var(--agent-line); text-align: left; vertical-align: middle; white-space: nowrap; }
.agent-table th { background: var(--agent-surface-soft); color: var(--agent-muted); font-size: 11px; font-weight: 700; }
.agent-table td { color: var(--agent-text); font-size: 13px; }
.agent-table tr:last-child td { border-bottom: 0; }
.agent-table td small { display: block; margin-top: 2px; color: var(--agent-muted); font-size: 11px; }
.agent-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.agent-status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; background: var(--agent-bg); color: var(--agent-muted); font-size: 11px; font-weight: 700; }
.agent-status-pill.is-live, .agent-status-pill.is-good { background: #e9f8f1; color: #11835d; }
.agent-status-pill.is-pending { background: #fff5db; color: #a66c00; }
.agent-status-pill.is-bad, .agent-status-pill.is-rejected { background: #ffedf0; color: #b13c49; }
html[data-agent-theme="dark"] .agent-status-pill.is-live, html[data-agent-theme="dark"] .agent-status-pill.is-good { background: #1d4639; color: #81e3bb; }
html[data-agent-theme="dark"] .agent-status-pill.is-pending { background: #4a3a19; color: #f4c76e; }
html[data-agent-theme="dark"] .agent-status-pill.is-bad, html[data-agent-theme="dark"] .agent-status-pill.is-rejected { background: #4c2930; color: #ffb0b7; }
.agent-empty { display: grid; place-items: center; min-height: 190px; padding: 24px; color: var(--agent-muted); text-align: center; }
.agent-empty span { display: grid; width: 38px; height: 38px; margin-bottom: 8px; place-items: center; border-radius: 50%; background: var(--agent-bg); }
.agent-empty p { margin: 0; }
.agent-site-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 18px 20px; }
.agent-site-summary h2 { margin: 0; font-size: 18px; }
.agent-site-summary p { margin: 3px 0 0; color: var(--agent-muted); }
.agent-site-status { display: grid; gap: 4px; justify-items: end; text-align: right; }
.agent-site-status small { max-width: 260px; overflow: hidden; color: var(--agent-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agent-access-card { display: grid; max-width: 980px; min-height: 356px; place-items: center; align-content: center; padding: 34px 24px; text-align: center; }
.agent-rocket { display: grid; width: 56px; height: 56px; margin-bottom: 16px; place-items: center; border-radius: 16px; background: var(--agent-blue-soft); color: var(--agent-blue); }
.agent-rocket svg { width: 27px; height: 27px; }
.agent-access-card h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.agent-access-card > p { max-width: 520px; margin: 8px 0 16px; color: var(--agent-muted); }
.agent-benefits { display: grid; gap: 9px; margin: 0 0 22px; padding: 0; color: var(--agent-text); list-style: none; text-align: left; }
.agent-benefits li { display: flex; align-items: center; gap: 9px; }
.agent-check { display: inline-grid; width: 18px; height: 18px; place-items: center; border: 1px solid var(--agent-green); border-radius: 50%; color: var(--agent-green); font-size: 12px; }
.agent-panel { padding: 20px; }
.agent-state-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--agent-muted); }
.agent-panel h2 + p { max-width: 680px; margin: 8px 0 18px; }
.agent-form-panel { padding: 22px; }
.agent-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agent-field { display: grid; gap: 6px; color: var(--agent-text); font-size: 13px; font-weight: 620; }
.agent-field input, .agent-field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--agent-line); border-radius: 6px; outline: 0; background: var(--agent-surface-soft); color: var(--agent-text); }
.agent-field textarea { min-height: 96px; resize: vertical; }
.agent-field input:focus, .agent-field textarea:focus { border-color: var(--agent-blue); box-shadow: 0 0 0 3px rgba(8, 124, 240, .12); }
.agent-field-wide { grid-column: 1 / -1; }
.agent-field-help { align-self: end; margin-top: 26px; color: var(--agent-muted); font-size: 12px; }
.agent-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.agent-inline-message { flex: 1; min-width: 180px; margin: 0; color: var(--agent-green); font-size: 12px; }
.agent-alert { margin-bottom: 14px; padding: 12px 14px; border: 1px solid #edd6a0; border-radius: 6px; background: #fff9e8; color: #8a610b; }
.agent-payout-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.agent-note { color: var(--agent-muted); font-size: 12px; }
.agent-domain-card { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--agent-line); border-radius: 6px; background: var(--agent-surface-soft); }
.agent-domain-card h2 { font-size: 24px; letter-spacing: -.03em; }
.agent-domain-card p { margin: 0; color: var(--agent-muted); }
.agent-domain-card small { color: var(--agent-muted); }
.agent-domain-meta { display: flex; align-items: center; gap: 10px; color: var(--agent-muted); font-size: 12px; }
.agent-theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.agent-theme-choice { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; align-items: center; min-height: 62px; padding: 9px; border: 1px solid var(--agent-line); border-radius: 6px; cursor: pointer; }
.agent-theme-choice:has(input:checked) { border-color: var(--agent-blue); box-shadow: 0 0 0 2px rgba(8, 124, 240, .12); }
.agent-theme-choice input { grid-row: 1 / span 2; accent-color: var(--agent-blue); }
.agent-theme-choice b { font-size: 12px; }
.agent-theme-choice small { color: var(--agent-muted); font-size: 10px; }
.agent-theme-swatch { display: none; }
.agent-guard { display: flex; align-items: center; gap: 18px; padding: 24px; }
.agent-guard-icon { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border-radius: 12px; background: var(--agent-blue-soft); color: var(--agent-blue); }
.agent-guard h2 { margin: 0; font-size: 18px; }
.agent-guard p { margin: 3px 0 0; color: var(--agent-muted); }
.agent-guard .agent-primary { margin-left: auto; flex: none; }
.agent-price-input input { width: 116px; min-height: 34px; padding: 5px 8px; border: 1px solid var(--agent-line); border-radius: 5px; background: var(--agent-surface-soft); color: var(--agent-text); }
.agent-loading, .agent-error { display: grid; min-height: 360px; place-items: center; align-content: center; gap: 10px; color: var(--agent-muted); }
.agent-spinner { width: 22px; height: 22px; border: 2px solid var(--agent-line); border-top-color: var(--agent-blue); border-radius: 50%; animation: agent-spin .8s linear infinite; }
@keyframes agent-spin { to { transform: rotate(360deg); } }
.agent-error { padding: 32px; text-align: center; }
.agent-error h1 { margin: 0; color: var(--agent-text); }
.agent-error p { margin: 0 0 10px; }
.agent-toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 44px)); padding: 11px 14px; border: 1px solid var(--agent-line); border-radius: 6px; background: var(--agent-text); color: var(--agent-surface); box-shadow: var(--agent-shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.agent-toast.is-visible { opacity: 1; transform: translateY(0); }
.agent-toast.is-error { background: var(--agent-red); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) {
  .agent-layout { width: min(100% - 32px, 760px); grid-template-columns: 1fr; margin-top: 16px; }
  .agent-sidebar { position: fixed; z-index: 40; inset: 64px auto 0 0; width: min(290px, calc(100vw - 46px)); min-height: 0; overflow: auto; border-radius: 0 8px 8px 0; transform: translateX(-105%); transition: transform .2s ease; }
  .agent-nav-open .agent-sidebar { transform: translateX(0); }
  .agent-mobile-close { display: block; }
  .agent-sidebar-backdrop { position: fixed; z-index: 30; inset: 64px 0 0; border: 0; background: rgba(12, 17, 25, .32); }
  .agent-nav-open .agent-sidebar-backdrop { display: block; }
  .agent-mobile-open { display: inline-grid; width: 40px; height: 40px; margin-bottom: 8px; place-items: center; border: 1px solid var(--agent-line); border-radius: 6px; background: var(--agent-surface); color: var(--agent-text); }
  .agent-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-payout-form { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .agent-topbar { min-height: 58px; padding: 0 12px; }
  .agent-brand small, .agent-back span:last-child, .agent-lang span:not(.agent-caret):not(.agent-icon), .agent-account span:not(.agent-avatar):not(.agent-caret) { display: none; }
  .agent-top-actions { gap: 2px; }
  .agent-layout { width: calc(100% - 24px); margin: 12px auto 36px; }
  .agent-mobile-open { margin-bottom: 8px; }
  .agent-page-head { align-items: flex-start; flex-direction: column; min-height: 0; padding-bottom: 14px; }
  .agent-page-heading h1 { font-size: 25px; }
  .agent-refresh { align-self: flex-end; margin-top: -44px; }
  .agent-metrics { gap: 8px; }
  .agent-metric { min-height: 80px; padding: 12px; }
  .agent-metric strong { font-size: 19px; }
  .agent-section-head, .agent-panel, .agent-form-panel { padding: 15px; }
  .agent-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .agent-field-wide { grid-column: auto; }
  .agent-form-actions { justify-content: stretch; }
  .agent-form-actions > button { flex: 1; }
  .agent-access-card { min-height: 390px; padding: 26px 16px; }
  .agent-site-summary { grid-template-columns: 1fr; gap: 12px; }
  .agent-site-status { justify-items: start; text-align: left; }
  .agent-guard { align-items: flex-start; flex-wrap: wrap; padding: 17px; }
  .agent-guard .agent-primary { margin-left: 62px; }
  .agent-theme-grid { grid-template-columns: 1fr; }
  .agent-table th, .agent-table td { padding: 11px 13px; }
}
.agent-mobile-open { display: none; }
@media (max-width: 900px) { .agent-mobile-open { display: inline-grid; } }
.agent-layout { width: min(1640px, calc(100% - 48px)); margin: 24px auto 64px; gap: 22px; }
.agent-account-summary { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.agent-wallet-panel { grid-column: span 4; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 216px; padding: 24px; border: 1px solid var(--agent-line); border-top: 3px solid var(--agent-green); border-radius: 8px; background: var(--agent-surface); box-shadow: var(--agent-shadow); }
.agent-wallet-panel h2 { margin: 0; color: var(--agent-text); font-size: 17px; }
.agent-wallet-panel strong { display: block; margin-top: 5px; color: var(--agent-text); font-size: 32px; font-variant-numeric: tabular-nums; }
.agent-wallet-panel p { margin: 4px 0 0; color: var(--agent-muted); font-size: 12px; }
.agent-wallet-action { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border: 1px solid var(--agent-line); border-radius: 6px; color: var(--agent-text); font-size: 13px; font-weight: 650; white-space: nowrap; }
.agent-wallet-action:hover { border-color: var(--agent-blue); color: var(--agent-blue); }
.agent-account-summary .agent-section { min-width: 0; }
.agent-account-ledger { grid-column: span 8; min-height: 216px; }
.agent-account-orders { grid-column: 1 / -1; }
.agent-account-summary .agent-table { min-width: 0; }
.agent-account-summary .agent-empty { min-height: 96px; }
.agent-account-summary .agent-account-ledger .agent-table { max-width: none; }
.agent-account-summary .agent-account-orders .agent-table { min-width: 560px; }
html[data-agent-theme="dark"] .agent-wallet-panel { background: var(--agent-surface); }
@media (max-width: 1100px) {
  .agent-wallet-panel { grid-column: span 5; }
  .agent-account-ledger { grid-column: span 7; }
}
@media (max-width: 900px) {
  .agent-layout { width: min(100% - 32px, 760px); }
  .agent-wallet-panel, .agent-account-ledger { grid-column: 1 / -1; }
  .agent-wallet-panel { min-height: 168px; }
  .agent-account-ledger { min-height: 0; }
}
@media (max-width: 620px) {
  .agent-wallet-panel { align-items: flex-start; flex-direction: column; min-height: 0; padding: 18px; }
  .agent-wallet-panel strong { font-size: 28px; }
  .agent-account-summary .agent-section-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-page *, .agent-page *::before, .agent-page *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.agent-wrap { max-width: 980px; margin: 24px auto 64px; padding: 0 16px; display: grid; gap: 16px; }
.agent-card { background: var(--paper, #fff); border: 1px solid var(--line, #e6e6e3); border-radius: 16px; padding: 16px 18px; }
.agent-card h1, .agent-card h2 { margin: 0 0 8px; }
.agent-grid { display: grid; gap: 10px; }
.agent-grid label { display: grid; gap: 4px; font-size: 13px; }
.agent-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.agent-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.agent-table th, .agent-table td { border-bottom: 1px solid var(--line, #e6e6e3); text-align: left; padding: 8px 6px; vertical-align: middle; }
.agent-table input[type="number"] { width: 96px; }
.theme-choice { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-choice label { border: 1px solid var(--line, #e6e6e3); border-radius: 10px; padding: 8px 10px; }
a.admin-nav { text-decoration: none; }
.admin-main .agent-board { display: grid; gap: 16px; }
.admin-main .agent-card p { line-height: 1.65; max-width: 68em; }
.admin-main .agent-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.admin-main .agent-tabs button[aria-selected="true"] { background: var(--ink, #111); color: #fff; }
.admin-main .agent-table-wrap { overflow-x: auto; }
.admin-chat-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: min(720px, calc(100vh - 240px));
  min-height: 520px;
  border: 1px solid var(--line, #e6e6e3);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.admin-chat-livebar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  margin-bottom: 8px;
  color: #6f6f6a;
  font-size: 12px;
}
.admin-chat-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2d9d68;
  box-shadow: 0 0 0 4px rgba(45, 157, 104, .12);
}
html[data-theme="night"] .admin-chat-livebar { color: #a7adba; }
#chat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  background: #f6f6f4;
  border-right: 1px solid var(--line, #e6e6e3);
}
.admin-chat-item {
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-chat-item:hover { background: rgba(255, 255, 255, .7); }
.admin-chat-item.is-active { background: #fff; box-shadow: 0 1px 2px rgba(17, 18, 20, .06); }
.admin-chat-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-chat-item b { font-size: 13px; font-weight: 750; }
.admin-chat-item small { color: #9b3a2f; font-size: 11px; font-weight: 700; }
.admin-chat-mail, .admin-chat-preview { overflow: hidden; color: #6f6f6a; font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.admin-chat-item.is-unread .admin-chat-preview { color: #111214; font-weight: 650; }
.admin-chat-empty, .admin-chat-placeholder { margin: auto; color: #8a8a86; font-size: 13px; text-align: center; }
#chat-box { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f6f6f4; }
.admin-chat-placeholder { display: grid; gap: 6px; place-items: center; padding: 24px; }
.admin-chat-placeholder b { color: #111214; font-size: 16px; }
.admin-chat-placeholder span { max-width: 28em; line-height: 1.6; }
.admin-chat-head {
  display: flex;
  align-items: center;
  flex: none;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid #ecece8;
  background: #fff;
}
.admin-chat-head div { display: grid; gap: 2px; min-width: 0; }
.admin-chat-head b { font-size: 15px; }
.admin-chat-head span { overflow: hidden; color: #6f6f6a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
#chat-box .cs-live-log { background: #f6f6f4; }
#chat-box .cs-live-form { background: #fff; }
@media (max-width: 800px) {
  .admin-chat-grid { grid-template-columns: 1fr; height: auto; min-height: 0; }
  #chat-list { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line, #e6e6e3); }
  #chat-box { min-height: 460px; }
}
@media (max-width: 720px) {
  .agent-table { display: block; overflow-x: auto; }
  .admin-main .agent-table { display: table; min-width: 760px; }
  .admin-main .agent-apply-table,
  .admin-main .agent-apply-table tbody,
  .admin-main .agent-apply-table tr,
  .admin-main .agent-apply-table td { display: block; width: auto; min-width: 0; }
  .admin-main .agent-apply-table thead { display: none; }
  .admin-main .agent-apply-table tr { padding: 12px 0 14px; border-bottom: 1px solid var(--line, #e6e6e3); }
  .admin-main .agent-apply-table td { border: 0; padding: 4px 0; }
  .admin-main .agent-apply-table td:nth-child(4)::before { content: "状态 "; color: var(--muted, #888); }
  .admin-main .agent-apply-table select { display: block; width: 100%; max-width: 100%; margin: 6px 0; }
  .admin-main .agent-apply-table button { margin: 6px 8px 0 0; }
}

/* Storefront finish: notice, catalog rail, product cards. Chat sheet rules above stay as they are. */
.shop-body {
  --shadow-card: 0 1px 2px rgba(17, 18, 20, .04);
  --shadow-lift: 0 16px 36px rgba(17, 18, 20, .08);
}
.shop-body .shop-header {
  background: rgba(255, 255, 255, .9);
  border-bottom-color: rgba(17, 18, 20, .06);
  box-shadow: none;
}
.shop-body .shop-nav { gap: 2px; }
.shop-body .shop-nav-link {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 620;
}
.shop-body .shop-nav-link.active {
  background: var(--ink);
  color: #fff;
}
.shop-body .round-button,
.shop-body .cart-button,
.shop-body .login-link {
  border-radius: 999px;
  box-shadow: none;
}
.shop-body main { padding-top: 28px; }

.shop-body .store-notice {
  margin-bottom: 28px;
  border: 0;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--line);
}
.shop-body .notice-unified {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .72fr);
  gap: 8px 32px;
  align-items: start;
  padding: 26px 28px 24px;
}
.shop-body .notice-unified-head { grid-column: 1 / -1; gap: 12px; }
.shop-body .notice-unified-icon,
.shop-body .entry-notification-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg, #f7f7f4);
  color: var(--ink);
  box-shadow: none;
}
.shop-body .notice-unified-icon svg,
.shop-body .entry-notification-icon svg { width: 16px; height: 16px; }
.shop-body .notice-unified-head .kicker,
.shop-body .entry-notification-head .kicker {
  margin: 0 0 2px;
  color: var(--muted);
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 650;
}
.shop-body .notice-unified-head h2 { font-size: 20px; letter-spacing: -.03em; }
.shop-body .notice-unified .announcement-highlight {
  grid-column: 1;
  margin: 6px 0 0;
  padding: 0 0 0 14px;
  border: 0;
  border-left: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft, #37383d);
  font-size: 14px;
  line-height: 1.75;
}
.shop-body .notice-unified .announcement-highlight > i { display: none; }
.shop-body .notice-unified .announcement-note {
  grid-column: 1;
  margin: 8px 0 0;
  padding: 0 0 0 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.shop-body .notice-contact-actions {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: stretch;
  margin: 6px 0 0;
}
.shop-body .notice-contact-actions .contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.shop-body .notice-contact-actions .telegram-button,
.shop-body .notice-contact-actions .qq-button {
  min-height: 58px;
  border-radius: 14px;
  background: var(--bg, #f7f7f4);
  border-color: transparent;
}
.shop-body .notice-contact-actions .contact-list > * + * { border: 0; }
.shop-body .notice-contact-actions .telegram-button:hover,
.shop-body .notice-contact-actions .qq-button[href]:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.shop-body .notice-contact-actions .brand-logo { width: 18px; height: 18px; }

.shop-body .modal-layer.entry-notice-open { background: rgba(17, 18, 20, .48); }
.shop-body .entry-notice-open .modal-card {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(17, 18, 20, .22);
}
.shop-body .entry-notice-open .modal-card::before { display: none; }
.shop-body .entry-notice-open .modal-x {
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--bg, #f7f7f4);
  color: var(--muted);
}
.shop-body .entry-notification-head {
  align-items: center;
  padding: 26px 56px 0 26px;
  border-bottom: 0;
}
.shop-body .entry-notification-head h2 {
  font-size: 22px;
  letter-spacing: -.03em;
}
.shop-body .entry-notification-copy {
  margin: 16px 26px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft, #37383d);
  font-size: 15px;
  line-height: 1.8;
}
.shop-body .entry-notification-actions { padding: 22px 26px 26px; }
.shop-body .entry-notification-actions .dark-button {
  min-height: 46px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .02em;
}
.shop-body .entry-notification-actions .dark-button:hover:not(:disabled) {
  border-color: #2a2b30;
  background: #2a2b30;
}

.shop-body .marketplace-section { margin-top: 8px; }
.shop-body .marketplace-layout,
.shop-body .directory-layout { gap: 22px; }
.shop-body .category-sidebar {
  border: 0;
  border-radius: 18px;
  padding: 16px 12px 12px;
  box-shadow: var(--shadow-card), 0 0 0 1px var(--line);
}
.shop-body .category-sidebar-head { padding: 4px 6px 12px; }
.shop-body .category-sidebar-head h2 { font-size: 15px; letter-spacing: -.02em; }
.shop-body .category-side-list { gap: 4px; }
.shop-body .category-side-item {
  min-height: 56px;
  grid-template-columns: 40px minmax(0, 1fr) 14px;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
}
.shop-body .category-side-item:hover { background: var(--bg, #f7f7f4); border-color: transparent; }
.shop-body .category-side-item.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.shop-body .category-side-item img,
.shop-body .category-side-item .mark-fallback {
  width: 40px;
  height: 40px;
  padding: 0;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 18, 20, .06);
}
.shop-body .category-side-item .mark-fallback {
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 720;
}
.shop-body .category-side-item.active img,
.shop-body .category-side-item.active .mark-fallback { background: #fff; }
.shop-body .category-side-item b {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  text-overflow: unset;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 640;
}
.shop-body .category-side-item small { font-size: 11px; }
.shop-body .category-sidebar-link,
.shop-body .category-mobile-toggle { border-radius: 10px; }

.shop-body .section-title,
.shop-body .subpage-head,
.shop-body .catalog-head { margin-bottom: 16px; align-items: flex-end; }
.shop-body .section-title h1,
.shop-body .section-title h2,
.shop-body .subpage-head h1,
.shop-body .catalog-head h1 {
  font-size: 26px;
  letter-spacing: -.035em;
}
.shop-body .product-total {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg, #f7f7f4);
}
.shop-body .home-search { margin: 0 0 16px; }
.shop-body .home-search input {
  width: min(100%, 360px);
  min-height: 42px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.shop-body .store-product-grid,
.shop-body .hot-products,
.shop-body #hot-products,
.shop-body #category-page-products {
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 14px;
}
.shop-body #hot-products .store-product-card,
.shop-body #category-page-products .store-product-card,
.shop-body .store-product-card {
  content-visibility: visible;
  contain-intrinsic-size: none;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.shop-body .store-product-card:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: var(--shadow-lift), 0 0 0 1px var(--line);
}
.shop-body .product-visual {
  display: grid;
  aspect-ratio: 5 / 3;
  place-items: center;
  border: 0;
  background:
    radial-gradient(120% 90% at 50% 18%, #fff 0%, var(--bg, #f4f3f0) 78%);
}
.shop-body .product-visual img {
  width: 100%;
  height: 100%;
  mix-blend-mode: normal;
  object-fit: contain;
  padding: 16px 18px;
  background: transparent;
}
.shop-body .category-sidebar-head .kicker,
.shop-body .marketplace-products .section-title .kicker,
.shop-body .directory-products .subpage-head .kicker,
.shop-body .catalog-head .kicker { display: none; }
.shop-body .product-visual .cover-fallback,
.shop-body .detail-icon.has-cover .cover-fallback {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  height: 100%;
  padding: 14px 14px 16px;
  text-align: left;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, .72), transparent 42%),
    linear-gradient(180deg, #f7f6f3 0%, #ecebe6 100%);
}
.shop-body .product-visual .cover-fallback .mark-fallback,
.shop-body .detail-icon.has-cover .cover-fallback .mark-fallback {
  width: 28px;
  height: 28px;
  margin: 0 0 auto auto;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  box-shadow: none;
}
.shop-body .product-visual .cover-fallback b,
.shop-body .detail-icon.has-cover .cover-fallback b {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  color: var(--ink);
  font-size: 16px;
  font-weight: 720;
  line-height: 1.3;
  letter-spacing: -.03em;
  text-align: left;
  white-space: normal;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.shop-body .detail-icon.has-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  display: grid;
  place-items: stretch;
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 50% 18%, #fff 0%, var(--bg, #f4f3f0) 78%);
}
.shop-body .detail-icon.has-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px 22px;
}
.shop-body .product-visual .mark-fallback {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  font-weight: 720;
  letter-spacing: -.04em;
  box-shadow: inset 0 0 0 1px rgba(17, 18, 20, .06);
}
.shop-body .delivery-badge,
.shop-body .delivery-badge.code,
.shop-body .delivery-badge.review,
.shop-body .delivery-badge.online {
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(17, 18, 20, .88);
  color: #fff;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
}
.shop-body .store-product-info { gap: 6px; padding: 14px 14px 14px; }
.shop-body .store-product-category {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.shop-body .store-product-name,
.shop-body .store-product-name:hover {
  min-height: 0;
  max-height: none;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 680;
  line-height: 1.4;
  text-decoration: none;
}
.shop-body .store-product-card:hover .store-product-name { text-decoration: underline; text-underline-offset: 3px; }
.shop-body .store-product-description,
.shop-body .store-product-info > p {
  min-height: 0;
  max-height: none;
  color: var(--muted);
  font-size: 12px;
}
.shop-body .store-product-footer {
  align-items: flex-end;
  margin-top: 4px;
  padding-top: 10px;
}
.shop-body .store-product-footer strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.shop-body .store-product-stock {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}
.shop-body .store-product-stock.stock-low { color: var(--amber, #9b5a08); }
.shop-body .store-product-stock.stock-soldout { color: var(--red, #b42318); }
.shop-body .product-buy-button {
  width: auto;
  min-width: 72px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}
.shop-body .product-buy-button:hover { background: #2a2b30; border-color: #2a2b30; }
.shop-body .product-buy-button:disabled {
  background: var(--bg, #f1f1ee);
  border-color: var(--line);
  color: var(--muted);
}

.shop-body .trust-row { gap: 12px; margin-top: 28px; }
.shop-body .trust-row article {
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow-card), 0 0 0 1px var(--line);
}
.shop-body .trust-row i,
.shop-body .trust-row article:nth-child(2) i,
.shop-body .trust-row article:nth-child(3) i,
.shop-body .trust-row article:nth-child(4) i { color: var(--ink); }

html[data-theme="night"] .shop-body .shop-header { background: rgba(18, 20, 24, .92); }
html[data-theme="night"] .shop-body .shop-nav-link.active { color: #121418; }
html[data-theme="night"] .shop-body .product-visual {
  background: radial-gradient(120% 90% at 50% 18%, #242833 0%, #171a21 78%);
}
html[data-theme="night"] .shop-body .category-side-item img,
html[data-theme="night"] .shop-body .category-side-item .mark-fallback,
html[data-theme="night"] .shop-body .product-visual .mark-fallback { background: #fff; color: #121418; }
html[data-theme="night"] .shop-body .product-visual .cover-fallback,
html[data-theme="night"] .shop-body .detail-icon.has-cover,
html[data-theme="night"] .shop-body .detail-icon.has-cover .cover-fallback {
  background: linear-gradient(165deg, #2a2e38 0%, #171a21 100%);
}
html[data-theme="night"] .shop-body .product-visual .cover-fallback b,
html[data-theme="night"] .shop-body .detail-icon.has-cover .cover-fallback b { color: #f4f4f1; }
html[data-theme="night"] .shop-body .product-visual .cover-fallback .mark-fallback,
html[data-theme="night"] .shop-body .detail-icon.has-cover .cover-fallback .mark-fallback { background: #fff; color: #121418; }
html[data-theme="night"] .shop-body .product-buy-button { color: #121418; }
html[data-theme="night"] .shop-body .product-buy-button:hover { background: #fff; border-color: #fff; color: #121418; }
html[data-theme="night"] .shop-body .entry-notification-actions .dark-button:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
  color: #121418;
}
html[data-theme="paper"] .shop-body .shop-header { background: rgba(243, 234, 215, .92); }
html[data-theme="paper"] .shop-body .product-visual {
  background: radial-gradient(120% 90% at 50% 18%, #fffaf2 0%, #f3ead7 78%);
}

@media (max-width: 900px) {
  .shop-body .notice-unified { grid-template-columns: 1fr; padding: 20px 18px; }
  .shop-body .notice-contact-actions { grid-column: 1; grid-row: auto; }
  .shop-body .notice-contact-actions .contact-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .shop-body .section-title h1,
  .shop-body .section-title h2,
  .shop-body .subpage-head h1,
  .shop-body .catalog-head h1 { font-size: 22px; }
  .shop-body .store-product-grid,
  .shop-body .hot-products,
  .shop-body #hot-products,
  .shop-body #category-page-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-body .product-visual { aspect-ratio: 1 / 1; }
  .shop-body .product-visual img { padding: 10px; }
  .shop-body .product-visual .cover-fallback { padding: 12px; }
  .shop-body .product-visual .cover-fallback b { font-size: 13px; }
  .shop-body .store-product-info { padding: 10px; }
  .shop-body .store-product-description,
  .shop-body .store-product-info > p { display: none; }
  .shop-body .product-buy-button:not(:disabled) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .shop-body .product-buy-button { min-width: 34px; width: 34px; padding: 0; }
  .shop-body .product-buy-button:disabled { width: auto; min-width: 52px; padding: 0 8px; }
  .shop-body .store-product-footer strong { font-size: 15px; }
  .shop-body .entry-notification-head { padding: 22px 48px 0 18px; }
  .shop-body .entry-notification-copy { margin: 14px 18px 0; font-size: 14px; }
  .shop-body .entry-notification-actions { padding: 18px; }
}


/* Keep specification groups and single products on the same card grid. */
.shop-body .store-product-card .product-visual {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.shop-body .store-product-card .product-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  object-fit: contain;
}
.shop-body .store-product-card .store-product-info {
  flex: 1 1 auto;
  min-width: 0;
}
.shop-body .store-product-card .store-product-name {
  flex: 0 0 auto;
  min-height: 2.8em;
  max-height: 2.8em;
  -webkit-line-clamp: 2;
}
.shop-body .store-product-card .store-product-description {
  flex: 0 0 auto;
  min-height: 3.1em;
  max-height: 3.1em;
  -webkit-line-clamp: 2;
}
.shop-body .store-product-card .store-product-footer {
  flex: 0 0 auto;
  margin-top: auto;
  align-items: flex-end;
}
.shop-body .store-product-card .store-product-footer > div { min-width: 0; }
.shop-body .store-product-card .product-buy-button { flex: 0 0 auto; }
@media (max-width: 720px) {
  .shop-body .store-product-card .store-product-description { display: none; min-height: 0; max-height: none; }
}
