:root {
  color-scheme: light;
  --ink: #182332;
  --muted: #536273;
  --line: #d6dee7;
  --surface: #ffffff;
  --canvas: #f3f6f9;
  --brand: #174ea6;
  --brand-dark: #123d82;
  --brand-soft: #eff5fe;
  --brand-soft-strong: #e2edfd;
  --brand-line: #cadbf5;
  --brand-line-strong: #a9c6ef;
  --section-bg: #f8fafd;
  --section-line: #e3eaf3;
  --success-bg: #e8f5ed;
  --success-ink: #155b36;
  --danger: #a1261b;
  --shadow: 0 8px 24px rgba(25, 40, 60, .055);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.55; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(24px, calc((100vw - 1200px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-decoration: none;
}
.header-tools { display: flex; align-items: center; gap: 20px; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav > a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.site-header nav > a, .link-button {
  color: #465365;
  font-size: 14px;
  text-decoration: none;
}
.site-header nav > a:hover, .link-button:hover, .text-link:hover { color: var(--brand); }
.user-label { color: var(--muted); font-size: 13px; }
.inline-form { display: inline; }
.link-button {
  min-height: 40px;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.site-footer { padding: 22px; color: #536273; text-align: center; font-size: 12px; }
.page {
  width: min(1200px, calc(100% - 40px));
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  padding: 38px 0 60px;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 4vw, 36px); letter-spacing: -.035em; line-height: 1.2; }
h2 { margin-bottom: 16px; font-size: 19px; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 8px; color: #536273; font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.text-link {
  color: var(--brand);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover { color: #123d82; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading p { margin-bottom: 0; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button:active { filter: brightness(.92); }
.button-primary { color: white; background: var(--brand); }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { color: #344054; background: white; border-color: #b9c5d2; }
.button-secondary:hover, .button-quiet:hover { background: #f3f6f9; }
.button-quiet { color: #465365; background: transparent; border-color: #cbd4de; }
.button-danger { color: var(--danger); background: white; border-color: #f0b5b1; }
.button-danger:hover { background: #fff4f2; }
.full-button { width: 100%; }

.panel {
  padding: 24px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.messages { display: grid; gap: 8px; margin-bottom: 20px; }
.notice { padding: 11px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 14px; }
.notice-success { color: var(--success-ink); background: var(--success-bg); border-color: #b8ddc7; }
.notice-error { color: #8b2118; background: #fff0ed; border-color: #e9b7b0; }
.notice-info { color: #234b85; background: #edf4ff; border-color: #c2d6f3; }
.error-state { max-width: 700px; margin: 28px auto; }
.empty-state {
  grid-column: 1 / -1;
  padding: 44px 24px;
  text-align: center;
  background: white;
  border: 1px dashed #b8c5d3;
  border-radius: 14px;
}
.empty-state h1, .empty-state h2 { margin-bottom: 10px; }
.empty-state p { color: var(--muted); }
.empty-state p:last-child { margin-bottom: 0; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 7px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
#main-content:focus-visible { outline: 3px solid #174ea6; outline-offset: 4px; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #174ea6;
  outline-offset: 3px;
}

.auth-card {
  width: min(430px, 100%);
  margin: 8vh auto;
  padding: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 24px; font-size: 28px; }
.stack-form { display: grid; gap: 16px; }
.stack-field { display: grid; gap: 7px; }
.product-form { display: grid; gap: 24px; counter-reset: form-step; }
.form-section {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: var(--section-bg);
  border: 1px solid var(--section-line);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
}
.form-section h2 { margin: 0; font-size: 17px; }

/* 方案 A：步骤序号徽章（纯 CSS counter 自动编号） */
.product-form .form-section > h2,
.detail-layout .panel h2 {
  display: flex;
  align-items: center;
  gap: 0;
}
.product-form .form-section > h2::before { counter-increment: form-step; content: counter(form-step); }
.detail-layout .panel h2::before { counter-increment: detail-step; content: counter(detail-step); }
.product-form .form-section > h2::before,
.detail-layout .panel h2::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.form-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.field label { margin: 0; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: white;
  border: 1px solid #b8c5d3;
  border-radius: 8px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 78, 166, .16);
}
input[type="checkbox"] { width: 17px; min-height: 17px; height: 17px; accent-color: var(--brand); }
input[type="file"] { min-height: 44px; padding: 7px; }
textarea { resize: vertical; }
small { color: #536273; font-size: 12px; font-weight: 400; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.form-grid h2 { grid-column: 1 / -1; }
.field-wide { grid-column: 1 / -1; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
#product-form .form-actions .button-primary { padding: 11px 22px; font-size: 15px; }
.checkbox-field {
  min-height: 44px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  align-self: center;
}
.checkbox-field input { flex: 0 0 auto; }
.inline-settings { display: flex; align-items: center; gap: 12px; max-width: 530px; }
.inline-settings label { min-width: 145px; }
.inline-settings input { max-width: 190px; }

.section-heading { display: flex; justify-content: space-between; align-items: center; }
.section-heading h2 { margin-bottom: 0; }
.account-list { margin-top: 18px; border-top: 1px solid var(--line); }
.account-item { border-bottom: 1px solid var(--line); }
.account-item summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}
.account-item summary::-webkit-details-marker { display: none; }
.account-item summary::after {
  content: "+";
  grid-column: 4;
  grid-row: 1;
  color: var(--muted);
  font-size: 20px;
}
.account-item[open] summary::after { content: "\2212"; }
.account-edit { padding: 12px 0 20px; }
.badge {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  color: #43536a;
  background: #f0f3f7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(25, 40, 60, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.product-card:hover { border-color: #b8c5d3; box-shadow: 0 8px 22px rgba(25, 40, 60, .09); }
.product-image {
  min-height: 260px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  background: #eef1f5;
}
.product-image img { width: 100%; height: 260px; object-fit: contain; }
.image-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #334155;
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.card-body { display: grid; gap: 6px; padding: 12px 13px; }
.card-body > p { margin-bottom: 0; }
.card-topline, .metric-row, .card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.sku { font-size: 15px; font-weight: 750; }
.metric-row {
  align-items: stretch;
  padding: 13px 0;
  margin: 8px 0 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric-row > div, .profit-summary > div { display: grid; gap: 4px; }
.metric-row > div { min-width: 0; }
.metric-row strong { font-size: 17px; }
.metric-label { color: #536273; font-size: 12px; }
.card-actions { justify-content: flex-start; gap: 18px; }

/* 卡片页（我的资料 / 公海目录）：图片更大、文字更紧凑（仅作用域到 .product-card） */
.product-card .metric-row { padding: 8px 0; margin: 4px 0 8px; }
.product-card .metric-row strong { font-size: 15px; }
.product-card .sku { font-size: 14px; }
.product-card .muted.small-text { font-size: 12px; }

/* 我的选品：列表行布局 */
.product-list { display: grid; gap: 12px; }
.product-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(25, 40, 60, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.product-row:hover { border-color: #b8c5d3; box-shadow: 0 6px 18px rgba(25, 40, 60, .09); }
.product-row.is-incomplete { border-color: #e9b7b0; box-shadow: 0 2px 10px rgba(161, 38, 27, .12); }
.row-thumb { width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #eef1f5; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { display: grid; gap: 6px; min-width: 0; }
.row-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-head .sku { font-size: 15px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-metrics { display: flex; gap: 24px; }
.row-metrics > div { display: grid; gap: 2px; min-width: 0; }
.row-metrics .metric-label { font-size: 12px; }
.row-metrics strong { font-size: 16px; }
.row-actions { display: flex; gap: 14px; }
@media (max-width: 900px) {
  .product-row { grid-template-columns: 72px minmax(0, 1fr); row-gap: 10px; }
  .row-thumb { width: 72px; height: 72px; }
  .row-metrics, .row-actions { grid-column: 1 / -1; }
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 22px;
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.filter-bar label { min-width: 120px; }
.filter-bar select { max-width: 300px; }
.filter-field { width: min(320px, 100%); display: grid; gap: 7px; }
.filter-field label { margin: 0; }
.clear-filter { min-height: 44px; display: inline-flex; align-items: center; }

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  counter-reset: detail-step;
}
/* 方案 A：详情页面板改为浅底子卡片（左 3px 品牌蓝竖条） */
.detail-layout > .panel {
  background: var(--section-bg);
  border: 1px solid var(--section-line);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
}
.detail-main > h2 { margin-top: 30px; }
.hero-preview {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 18px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}
.hero-preview img {
  width: 140px;
  height: 120px;
  padding: 8px;
  object-fit: contain;
  border-radius: 10px;
  background: #eef1f5;
}
.spec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; }
.spec-list > div {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f3;
}
.spec-list dt { color: var(--muted); font-size: 13px; }
.spec-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}
.spec-list .field-wide { display: block; }
.spec-list .field-wide dd { margin-top: 5px; text-align: left; font-weight: 400; white-space: pre-wrap; }
.profit-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
  background: #f1f6ff;
  border: 1px solid #d9e7ff;
  border-radius: 11px;
}
.profit-summary span { color: #40536b; font-size: 11px; }
.profit-summary strong { font-size: 19px; }
.cost-list { grid-template-columns: 1fr; }

.selection-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.selection-form-layout > .product-form { margin-bottom: 0; }
.calc-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  align-items: start;
  gap: 22px;
  padding: 18px 20px;
  background: var(--brand-soft-strong);
  border: 1px solid var(--brand-line-strong);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
}
/* 计算区内的单体卡片浮起，避免卡片套卡片显得杂乱 */
.calc-workbench .form-section { background: var(--surface); border-color: var(--brand-line); }
.calc-workbench .profit-side .panel { background: var(--surface); border-color: var(--brand-line); }
.calc-params { display: grid; gap: 24px; }
.profit-side { display: grid; gap: 18px; position: sticky; top: 20px; }
.profit-side .panel { margin-bottom: 0; }
.profit-controls { display: grid; gap: 12px; }
.profit-controls .section-heading { gap: 12px; }
.commission-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.preset-button {
  min-height: 36px;
  padding: 6px 12px;
  color: #344054;
  background: #f0f3f7;
  border: 1px solid #cdd7e2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.preset-button:hover { background: #e5ebf3; }
.profit-output-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.badge-loss { color: #8b2118; background: #fbe4e1; }
.profit-summary.loss { background: #fff4f2; border-color: #f0c9c4; }
.profit-price-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 13px 16px;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.profit-price-facts > div { display: grid; gap: 4px; }
.profit-price-facts span { color: #536273; font-size: 11px; }
.profit-price-facts strong { font-size: 16px; }
.profit-output-panel .cost-list { margin-top: 12px; }
.profit-simulator {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.profit-simulator .form-section-grid { gap: 14px 18px; }
.profit-simulator-actions { display: flex; justify-content: flex-end; }
.calc-workbench .profit-simulator { margin: 0; }
.image-panel { position: static; }
.image-version { padding: 13px 0; border-top: 1px solid var(--line); }
.version-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.evidence-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #f1f3f6;
  border-radius: 9px;
}
.image-action { padding: 12px 0; border-top: 1px solid var(--line); }
.image-action summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.image-action .stack-form { margin-top: 12px; }
.delete-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

/* 顶部主导航按钮化入口 */
.site-header nav > a.nav-cta {
  min-height: 40px;
  padding: 7px 16px;
  color: var(--brand);
  background: #eef3fb;
  border: 1px solid #c6d6ef;
  border-radius: 999px;
  font-weight: 650;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.site-header nav > a.nav-cta:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.site-header nav > a.nav-cta.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(23, 78, 166, .3);
}

/* 批量粘贴解析区 */
.paste-section .paste-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.paste-result { color: var(--success-ink); font-size: 13px; font-weight: 650; }
.product-image-preview-wrap {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.product-image-preview-wrap > p { margin-bottom: 8px; }
.product-image-preview, .product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}
.product-image-preview-item { min-width: 0; margin: 0; }
.product-image-preview-item img, .product-gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.product-image-preview-item figcaption {
  padding-top: 5px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.product-gallery { margin: 20px 0; }
.product-gallery h2 { margin-bottom: 12px; }
.product-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.accessible-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
}
.accessible-dialog::backdrop { background: rgba(15, 23, 42, .58); }
.dialog-content { display: grid; gap: 14px; padding: 24px; }
.dialog-content h2, .dialog-content p { margin: 0; }
.dialog-content p { line-height: 1.55; }
.dialog-content .button { justify-self: end; }

/* 无有效截图：资料不完整 */
.product-card.is-incomplete { border-color: #e9b7b0; box-shadow: 0 4px 16px rgba(161, 38, 27, .12); }
.incomplete-flag {
  margin: 0;
  padding: 6px 10px;
  color: #8b2118;
  background: #fff0ed;
  border: 1px solid #e9b7b0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.notice-incomplete { color: #8b2118; background: #fff0ed; border-color: #e9b7b0; font-weight: 650; }

/* 提交校验失败：顶部缺失项汇总 + 就地标记错误字段 */
.field-error-title { margin: 0 0 6px; font-weight: 700; }
.missing-list { margin: 0; padding-left: 20px; }
.missing-list li { margin: 2px 0; }
.field-error {
  border-color: #d6453b !important;
  background: #fff8f7;
  box-shadow: 0 0 0 3px rgba(209, 61, 47, .14) !important;
}

/* 资料状态徽标：草稿 / 已提交 */
.badge-draft { color: #7a4a00; background: #fdf1dc; }
.badge-submitted { color: #155b36; background: #e8f5ed; }
.hero-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }

/* 隐藏数字输入框上下箭头，避免误改 */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .detail-layout { grid-template-columns: 1fr; }
  .selection-form-layout { grid-template-columns: 1fr; }
  .calc-workbench { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .form-section { padding: 16px; }
  .profit-side { position: static; }
  .product-image, .product-image img { min-height: 190px; height: 190px; }
}

@media (max-width: 620px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 10px; padding: 14px 20px; }
  .header-tools { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 8px 16px; }
  .site-header nav { width: auto; flex-wrap: wrap; gap: 13px; }
  .page { width: min(100% - 28px, 560px); padding-top: 26px; padding-bottom: 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-heading > .button, .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .product-grid { grid-template-columns: 1fr; }
  .product-image, .product-image img { min-height: 220px; height: 220px; }
  .form-grid, .form-section-grid, .spec-list { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .inline-settings, .filter-bar { align-items: stretch; flex-direction: column; }
  .inline-settings label, .inline-settings input, .filter-bar select { max-width: none; }
  .filter-field { width: 100%; }
  .clear-filter { justify-content: center; }
  .account-item summary { grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; }
  .account-item summary::after { display: none; }
  .product-form { padding: 19px; }
  .hero-preview { grid-template-columns: minmax(90px, 120px) minmax(0, 1fr); }
  .hero-preview img { width: 100%; height: 110px; }
  .spec-list > div { align-items: flex-start; }
  .profit-summary { grid-template-columns: 1fr; }
  .profit-price-facts { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; }
  .delete-row { align-items: flex-start; flex-direction: column; }
  .auth-card { margin: 5vh auto; padding: 25px; }
}

@media (max-width: 380px) {
  .card-topline { align-items: flex-start; flex-direction: column; }
  .profit-summary { padding: 13px; }
  .auth-card { padding: 20px; }
}

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