@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi-3-35-Thin.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi-3-55-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi-3-85-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3eee6;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #162332;
  --muted: #61707d;
  --line: rgba(22, 35, 50, 0.12);
  --line-strong: rgba(22, 35, 50, 0.22);
  --brand: #133f6f;
  --brand-soft: #e4eef8;
  --accent: #d3702a;
  --accent-soft: #fff0e2;
  --success-soft: #e8f5ec;
  --danger: #b24646;
  --shadow: 0 16px 50px rgba(19, 63, 111, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-sans: "Alibaba PuHuiTi", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Alibaba PuHuiTi", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --bg-gradient-start: #f7f3ec;
  --bg-gradient-end: #efe6da;
  --bg-radial: rgba(211, 112, 42, 0.16);
  --surface-glass: rgba(255, 253, 248, 0.92);
  --surface-soft: rgba(19, 63, 111, 0.04);
  --surface-card: rgba(255, 255, 255, 0.96);
  --surface-card-strong: rgba(255, 255, 255, 0.98);
  --field-bg: rgba(255, 253, 248, 0.96);
  --overlay: rgba(22, 35, 50, 0.54);
  --table-head: rgba(236, 241, 247, 0.98);
  --table-first: rgba(255, 253, 248, 0.98);
  --button-ghost: rgba(19, 63, 111, 0.08);
  --button-ghost-hover: rgba(228, 238, 248, 0.92);
  --legend-image-blend: multiply;
  --legend-image-filter: grayscale(1) contrast(1.14) brightness(0.95);
  --legend-image-filter-strong: grayscale(1) contrast(1.2) brightness(0.91);
  --legend-image-opacity: 0.97;
}

body.theme-dark {
  --bg: #0f1824;
  --paper: #121d2c;
  --paper-strong: #162233;
  --ink: #ebf1f8;
  --muted: #95a6bb;
  --line: rgba(229, 239, 255, 0.12);
  --line-strong: rgba(229, 239, 255, 0.22);
  --brand: #96bee9;
  --brand-soft: rgba(53, 84, 126, 0.38);
  --accent: #f2a768;
  --accent-soft: rgba(211, 112, 42, 0.18);
  --success-soft: rgba(52, 128, 90, 0.18);
  --danger: #ff8d8d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  --bg-gradient-start: #0f1824;
  --bg-gradient-end: #0a111a;
  --bg-radial: rgba(105, 152, 217, 0.12);
  --surface-glass: rgba(15, 24, 36, 0.86);
  --surface-soft: rgba(150, 190, 233, 0.08);
  --surface-card: rgba(18, 29, 44, 0.96);
  --surface-card-strong: rgba(22, 34, 51, 0.98);
  --field-bg: rgba(13, 20, 31, 0.96);
  --overlay: rgba(5, 8, 13, 0.72);
  --table-head: rgba(33, 48, 68, 0.98);
  --table-first: rgba(18, 29, 44, 0.98);
  --button-ghost: rgba(150, 190, 233, 0.12);
  --button-ghost-hover: rgba(53, 84, 126, 0.42);
  --legend-image-blend: lighten;
  --legend-image-filter: invert(1) grayscale(1) brightness(1.02) contrast(1.06) sepia(0.08) saturate(1.34) hue-rotate(176deg);
  --legend-image-filter-strong: invert(1) grayscale(1) brightness(1.08) contrast(1.12) sepia(0.1) saturate(1.48) hue-rotate(176deg);
  --legend-image-opacity: 0.95;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, var(--bg-radial), transparent 26rem),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

button,
input,
textarea,
table {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
}

.hero h1,
.hero h2,
.series-block__header h3,
.modal-header h3,
.section-heading h3 {
  margin: 0;
  font-family: var(--font-serif);
}

.hero-text,
.series-block__header p,
.modal-header p,
.section-empty {
  color: var(--muted);
  line-height: 1.65;
}

.customer-page .app-shell {
  min-height: 100vh;
}

.brand-block h1 {
  margin: 0;
  font-size: 28px;
}

.admin-filter label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.admin-filter input,
.form-grid input,
.form-grid select,
.field-grid input,
.admin-editor textarea {
  width: 100%;
  border: 1px solid rgba(19, 63, 111, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--field-bg);
  color: var(--ink);
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-card-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: 380px;
  overflow: auto;
}

.search-result-item {
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.search-result-item:hover {
  transform: translateX(4px);
  background: var(--button-ghost-hover);
  box-shadow: 0 10px 24px rgba(19, 63, 111, 0.1);
}

.search-result-item.is-active {
  transform: translateX(4px);
  background: var(--button-ghost-hover);
  box-shadow: 0 10px 24px rgba(19, 63, 111, 0.1);
}

.search-result-label {
  display: block;
  font-weight: 700;
}

.search-result-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.search-result-empty {
  padding: 12px;
  color: var(--muted);
}

.admin-series-nav {
  margin-top: 24px;
}

.admin-series-nav {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 250px);
  overflow: auto;
}

.admin-series-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(19, 63, 111, 0.05);
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
}

.admin-series-item {
  text-align: left;
  cursor: pointer;
}

.admin-series-item strong {
  display: block;
}

.admin-series-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.admin-series-item:hover,
.admin-series-item.active {
  border-color: rgba(19, 63, 111, 0.22);
  background: var(--brand-soft);
}

.main-panel,
.admin-main {
  padding: 24px;
  min-width: 0;
}

.customer-page .main-panel {
  width: 100%;
  max-width: none;
}

.hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -45% 30%;
  height: 240px;
  background: radial-gradient(circle, rgba(19, 63, 111, 0.12), transparent 62%);
  pointer-events: none;
}

.hero-compact {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 28px;
}

.hero-compact h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.hero-metrics {
  display: grid;
  gap: 12px;
  min-width: 180px;
}

.metric-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(19, 63, 111, 0.96), rgba(22, 35, 50, 0.98));
  color: white;
  box-shadow: 0 12px 28px rgba(19, 63, 111, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(19, 63, 111, 0.22);
}

.metric-card span {
  display: block;
  opacity: 0.72;
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.series-sections {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.series-block,
.admin-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: visible;
}

.series-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(19, 63, 111, 0.06), transparent 28rem),
    linear-gradient(135deg, rgba(211, 112, 42, 0.05), transparent 35%);
  pointer-events: none;
}

.series-block > *,
.admin-card > * {
  position: relative;
  z-index: 1;
}

.series-block__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.series-block__intro {
  flex: 0 1 280px;
  min-width: 0;
}

.series-block__aside {
  flex: 1 1 auto;
  min-width: 420px;
  display: grid;
  gap: 12px;
  justify-items: end;
  align-content: start;
}

.series-block__header h3 {
  margin-top: 10px;
  font-size: 30px;
}

.series-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.series-stats span,
.spec-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.series-code {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  width: fit-content;
  max-width: min(100%, 42rem);
  white-space: normal;
  line-height: 1.3;
}

.series-legend-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 12px;
  width: 100%;
  justify-content: flex-end;
}

.series-legend-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  flex: 0 1 210px;
  min-width: 168px;
  min-height: 244px;
  padding: 0;
  border: 0;
  background: transparent;
  transition: transform 180ms ease;
}

.series-legend-card:hover {
  transform: translateY(-3px);
}

.series-legend-card img {
  width: 100%;
  height: 214px;
  object-fit: contain;
  display: block;
  background: transparent;
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.series-legend-card:hover img {
  transform: scale(1.04);
  filter: var(--legend-image-filter-strong);
}

img[data-legend-processed="1"] {
  mix-blend-mode: normal !important;
  filter: none !important;
  opacity: 1 !important;
}

.series-legend-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.series-legend-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 214px;
  color: var(--muted);
  font-size: 13px;
}

.table-scroll-shell {
  position: relative;
}

.table-scroll-btn {
  position: absolute;
  top: 48%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--brand);
  box-shadow: 0 12px 24px rgba(19, 63, 111, 0.14);
}

.table-scroll-btn.left {
  left: -14px;
}

.table-scroll-btn.right {
  right: -14px;
}

.table-scroll-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.table-scroll-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  opacity: 0;
  transition: opacity 180ms ease;
}

.table-scroll-shell.is-scrollable .table-scroll-hint {
  opacity: 1;
}

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding-bottom: 6px;
  scrollbar-gutter: stable both-edges;
}

.table-wrap.is-scrollable {
  cursor: grab;
}

.table-wrap.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.table-wrap::-webkit-scrollbar {
  height: 12px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(19, 63, 111, 0.08);
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(19, 63, 111, 0.34);
  border-radius: 999px;
}

.catalog-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.catalog-table th,
.catalog-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.catalog-table th {
  color: var(--brand);
  background: rgba(19, 63, 111, 0.06);
  position: sticky;
  top: 0;
  z-index: 1;
}

.customer-table th:first-child,
.customer-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--paper);
  box-shadow: 12px 0 18px -18px rgba(22, 35, 50, 0.26);
}

.customer-table th:first-child {
  z-index: 4;
  background: rgba(244, 245, 247, 0.96);
}

.compact-table th,
.compact-table td,
.nowrap-cell {
  white-space: nowrap;
}

.compact-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.customer-table td {
  font-size: 14px;
  line-height: 1.25;
}

.product-row {
  cursor: pointer;
  transition: background 140ms ease;
}

.product-row:hover,
.admin-product-row:hover,
.admin-product-row.active {
  background: rgba(19, 63, 111, 0.05);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  overscroll-behavior: contain;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 35, 50, 0.54);
  backdrop-filter: blur(3px);
}

.modal-dialog {
  position: relative;
  width: min(1560px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  margin: 10px auto;
  background: var(--paper-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 100px rgba(22, 35, 50, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: center top;
  overflow-anchor: none;
}

body.modal-open {
  overflow: hidden;
  height: 100dvh;
  overscroll-behavior: none;
}

body.modal-open .app-shell,
body.modal-open .main-panel {
  height: 100dvh;
  overflow: hidden;
}

.modal:not(.hidden) .modal-backdrop {
  animation: modal-fade-in 220ms ease both;
}

.modal:not(.hidden) .modal-dialog {
  animation: modal-sheet-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.988);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.legend-viewer {
  display: grid;
  place-items: center;
  min-height: 32vh;
  padding: 4px 0 8px;
}

.legend-viewer img {
  width: min(100%, 720px);
  max-height: 34vh;
  object-fit: contain;
  display: block;
  background: transparent;
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
}

.modal-close {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 149;
  margin: 0;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: 0 12px 26px rgba(22, 35, 50, 0.18);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 220ms ease, background 180ms ease;
}

body.modal-open .modal-close {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.modal-body {
  padding: 28px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  overflow-anchor: none;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.modal-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

.modal-legend,
.detail-block,
.admin-card,
.legend-slot,
.section-empty {
  border-radius: var(--radius-lg);
}

.modal-legend {
  display: grid;
  align-content: start;
  justify-items: center;
  min-height: 360px;
  padding: 6px 0 0;
}

.modal-legend img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  align-self: start;
  display: block;
  background: transparent;
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
}

.modal-specs {
  display: grid;
  gap: 16px;
}

.detail-block {
  border: 1px solid var(--line);
  padding: 16px;
  background: rgba(19, 63, 111, 0.03);
}

.detail-block h4,
.field-group h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 9px 0;
  border-bottom: 1px solid rgba(22, 35, 50, 0.08);
  text-align: left;
  vertical-align: middle;
}

.detail-table th {
  width: 150px;
  color: var(--muted);
  font-weight: 700;
}

.detail-meta-cell {
  white-space: nowrap;
}

.compare-block,
.similar-block {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(19, 63, 111, 0.03);
}

.compare-header,
.similar-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.compare-header h4,
.similar-block h4 {
  margin: 0;
}

.compare-header p,
.similar-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.compare-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(19, 63, 111, 0.08);
}

.compare-chip.active {
  background: var(--brand-soft);
}

.chip-main,
.chip-remove {
  padding: 8px 12px;
  border-radius: 999px;
}

.chip-main {
  background: transparent;
  color: var(--brand);
}

.chip-remove {
  min-width: 34px;
  padding-inline: 10px;
  background: rgba(19, 63, 111, 0.08);
  color: var(--brand);
}

.compare-section + .compare-section {
  margin-top: 14px;
}

.compare-section h5 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--brand);
}

.compare-table,
.similar-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td,
.similar-table th,
.similar-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.compare-table thead th,
.similar-table thead th {
  background: rgba(19, 63, 111, 0.06);
  color: var(--brand);
}

.compare-table tbody tr {
  cursor: pointer;
}

.compare-table tbody tr:hover {
  background: rgba(19, 63, 111, 0.04);
}

.compare-row-selected {
  background: rgba(19, 63, 111, 0.08);
}

.compare-product-heading {
  min-width: 140px;
}

.compare-baseline-col {
  background: rgba(19, 63, 111, 0.1) !important;
}

.compare-baseline-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
}

.compare-baseline-btn.active {
  color: var(--ink);
}

.baseline-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(211, 112, 42, 0.14);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.compare-cell-main {
  white-space: nowrap;
}

.compare-baseline-cell {
  background: rgba(19, 63, 111, 0.04);
}

.compare-cell-delta {
  margin-top: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.compare-cell-range {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.similar-actions {
  display: flex;
  gap: 8px;
}

.similar-actions button {
  white-space: nowrap;
}

.admin-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(73, 141, 227, 0.12), transparent 34rem),
    linear-gradient(180deg, rgba(255, 251, 246, 0.94), rgba(248, 250, 253, 0.98));
}

.admin-auth-card {
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(19, 63, 111, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 64px rgba(19, 63, 111, 0.12);
}

.admin-auth-card h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 34px;
}

.admin-auth-form {
  grid-template-columns: 1fr;
}

.admin-auth-error,
.admin-auth-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(19, 63, 111, 0.06);
  color: var(--brand);
  font-weight: 700;
}

.admin-auth-error,
.admin-auth-message.is-error {
  background: rgba(184, 72, 72, 0.08);
  color: var(--danger);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  overflow: auto;
}

.admin-sidebar h1 {
  margin: 0;
  font-size: 30px;
  font-family: var(--font-serif);
}

.admin-session-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  padding: 12px 16px;
  cursor: pointer;
}

button.ghost {
  background: var(--button-ghost);
  color: var(--brand);
}

button.danger {
  color: var(--danger);
}

.admin-filter {
  margin-top: 18px;
}

.admin-auth-settings {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(19, 63, 111, 0.03);
}

.admin-account-list {
  display: grid;
  gap: 12px;
}

.admin-account-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.admin-account-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-account-card__head strong,
.admin-account-card__head span {
  display: block;
}

.admin-account-card__head span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.admin-account-form {
  display: grid;
  gap: 10px;
}

.admin-account-create {
  display: grid;
  gap: 12px;
}

.admin-account-toggle {
  display: grid;
  gap: 8px;
}

.admin-account-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin-top: 24px;
}

.admin-card {
  min-width: 0;
}

.admin-editor-card {
  grid-column: 1 / -1;
}

.admin-branding-card {
  grid-column: 1 / -1;
}

.admin-audit-card {
  grid-column: 1 / -1;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading.compact h3 {
  font-size: 24px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.admin-legend-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.legend-slot {
  display: grid;
  gap: 12px;
  padding: 14px;
  min-height: 214px;
  border: 1px dashed rgba(19, 63, 111, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(228, 238, 248, 0.42)),
    linear-gradient(135deg, rgba(211, 112, 42, 0.08), transparent 60%);
}

.legend-slot.has-image {
  border-style: solid;
  background: var(--paper-strong);
}

.legend-slot__inner {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 130px;
  text-align: center;
}

.legend-slot__label {
  color: var(--brand);
  font-weight: 800;
}

.legend-slot__hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.legend-slot img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}

.legend-slot__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-product-list-wrap {
  max-height: 560px;
  overflow: auto;
}

.admin-product-row {
  cursor: pointer;
}

.admin-editor {
  display: grid;
  gap: 16px;
}

.form-grid,
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label,
.field-grid label,
.admin-editor .full-row {
  display: grid;
  gap: 6px;
}

.form-grid span,
.field-grid span,
.admin-editor .full-row span {
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
}

.admin-editor textarea {
  resize: vertical;
}

.admin-field-groups {
  display: grid;
  gap: 16px;
}

.field-group {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(19, 63, 111, 0.03);
}

.field-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.field-group__head h4 {
  margin: 0;
}

.admin-editor-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-branding-panel {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-branding-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-branding-slot {
  display: grid;
  gap: 10px;
}

.admin-branding-slot__label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.admin-branding-preview {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 16px;
  border-radius: 20px;
  border: 1px dashed var(--line-strong);
  background: rgba(19, 63, 111, 0.03);
}

.admin-branding-preview--dark {
  border-color: rgba(220, 232, 246, 0.26);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(17, 24, 35, 0.96), rgba(29, 39, 54, 0.96));
}

.admin-branding-preview img {
  display: block;
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

.admin-branding-preview__empty {
  color: var(--muted);
  text-align: center;
}

.admin-branding-preview--dark .admin-branding-preview__empty {
  color: rgba(232, 239, 248, 0.82);
}

.admin-branding-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-branding-actions--inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-audit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-audit-note {
  margin: 8px 0 0;
}

.admin-audit-wrap {
  max-height: 460px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.admin-audit-table {
  min-width: 100%;
}

.admin-audit-table th,
.admin-audit-table td {
  white-space: nowrap;
}

.admin-audit-table td:last-child {
  min-width: 340px;
  white-space: normal;
}

.admin-audit-action {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.admin-audit-target {
  color: var(--muted);
  font-weight: 700;
}

.admin-audit-empty {
  padding: 18px 14px;
  color: var(--muted);
  text-align: center;
}

.section-empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  background: rgba(19, 63, 111, 0.03);
}

.tol-sym,
.tol-asym {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  line-height: 1;
  white-space: nowrap;
}

.tol-base {
  display: inline-block;
}

.tol-sep {
  display: inline-block;
  opacity: 0.82;
}

.tol-value {
  display: inline-block;
}

.tol-stack {
  display: inline-grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  justify-items: start;
  min-width: 4.9em;
  font-size: 0.66em;
  line-height: 1;
  transform: translateY(-0.04em);
}

.tol-plus,
.tol-minus {
  display: block;
  line-height: 1;
}

.tol-plus {
  align-self: end;
}

.tol-minus {
  align-self: start;
}

@media (max-width: 1100px) {
  .customer-page .app-shell,
  .admin-shell,
  .admin-grid,
  .modal-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
  }

  .hero-compact,
  .series-block__header,
  .modal-header,
  .compare-header,
  .similar-header {
    flex-direction: column;
  }

  .series-block__aside {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  .series-legend-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
  }

  .series-legend-card {
    flex-basis: 164px;
    min-width: 140px;
    min-height: 208px;
  }

  .series-legend-card img,
  .series-legend-empty {
    height: 176px;
  }
}

@media (max-width: 760px) {
  .main-panel,
  .admin-main {
    padding: 16px;
  }

  .hero-compact,
  .series-block,
  .admin-card,
  .modal-body {
    padding: 18px;
  }

  .form-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .catalog-table {
    min-width: 760px;
  }

  .table-scroll-btn.left {
    left: -6px;
  }

  .table-scroll-btn.right {
    right: -6px;
  }
}

/* Customer Page Rebuild */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.customer-page .main-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 28px 40px;
}

.global-toolbar {
  order: 2;
  position: sticky;
  top: 16px;
  z-index: 140;
  display: block;
  width: min(100%, 860px);
  margin: -58px auto 18px;
  min-height: 72px;
  isolation: isolate;
}

.global-toolbar > .theme-toggle {
  display: none !important;
}

.global-search {
  position: relative;
  width: min(760px, calc(100vw - 220px));
  max-width: 100%;
  margin: 0 auto;
  transition: width 220ms ease, transform 220ms ease;
}

.global-search__toggle {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 2;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 22px;
  border: 1px solid rgba(19, 63, 111, 0.12);
  background: var(--field-bg);
  color: var(--brand);
  box-shadow: 0 12px 28px rgba(19, 63, 111, 0.08);
  font-size: 28px;
  font-weight: 800;
}

.global-search input {
  width: 100%;
  height: 72px;
  padding: 16px 140px 16px 84px;
  border: 1px solid rgba(19, 63, 111, 0.14);
  border-radius: 22px;
  background: var(--field-bg);
  box-shadow: 0 12px 28px rgba(19, 63, 111, 0.08);
  color: var(--ink);
  caret-color: var(--brand);
  font-size: 18px;
  font-weight: 800;
  opacity: 1;
  pointer-events: auto;
  text-align: center;
  transition: opacity 180ms ease;
}

.global-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.global-search input::-webkit-search-cancel-button,
.global-search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.global-search__clear {
  position: absolute;
  inset: 50% 14px auto auto;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(19, 63, 111, 0.1);
  background: rgba(19, 63, 111, 0.06);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(19, 63, 111, 0.08);
  font-size: 24px;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.global-search__clear:hover {
  background: rgba(19, 63, 111, 0.1);
  color: var(--brand);
}

.global-search__clear:active {
  transform: translateY(-50%) scale(0.96);
}

.global-search:focus-within input {
  text-align: left;
}

.global-toolbar .search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  min-width: min(360px, calc(100vw - 40px));
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(19, 63, 111, 0.12);
  background: var(--surface-card-strong);
  box-shadow: 0 20px 44px rgba(19, 63, 111, 0.16);
  backdrop-filter: blur(14px);
}

.global-toolbar.has-results .search-results {
  position: absolute;
  margin-top: 0;
}

body.modal-open .global-toolbar {
  position: fixed;
  top: 16px;
  left: 50%;
  right: auto;
  width: calc(100vw - 32px);
  max-width: 860px;
  margin: 0;
  min-height: 72px;
  transform: translateX(-50%);
  z-index: 146;
  pointer-events: none;
}

body.modal-open .global-toolbar::before {
  display: none;
}

body.modal-open .global-toolbar > .global-search {
  z-index: 1;
  pointer-events: auto;
}

body.modal-open .theme-toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.94);
}

body.modal-open #themeToggle {
  opacity: 0;
  pointer-events: none;
}

body.modal-open .global-search {
  width: 100%;
  max-width: 760px;
}

body.modal-open .modal-dialog {
  margin-top: 104px;
  max-height: calc(100vh - 120px);
}

.global-toolbar .search-result-item {
  border: 1px solid rgba(19, 63, 111, 0.08);
  border-radius: 18px;
  background: var(--surface-card);
  padding: 14px 16px;
  color: var(--ink);
}

.global-toolbar .search-result-item:hover {
  background: var(--button-ghost-hover);
  box-shadow: 0 12px 28px rgba(19, 63, 111, 0.12);
}

.global-toolbar .search-result-item.is-active {
  background: var(--button-ghost-hover);
  border-color: rgba(19, 63, 111, 0.16);
  box-shadow: 0 12px 28px rgba(19, 63, 111, 0.12);
}

.global-toolbar .search-result-label {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
}

.global-toolbar .search-result-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

.global-toolbar .search-result-empty {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-card);
  color: var(--muted);
}

.theme-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: 18px;
  z-index: 180;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin-right: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(19, 63, 111, 0.1);
  font-weight: 800;
}

.theme-toggle__icon {
  color: var(--brand);
  font-size: 20px;
}

.theme-toggle__label {
  display: none;
}

.catalog-export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(19, 63, 111, 0.14);
  background: linear-gradient(135deg, rgba(19, 63, 111, 1), rgba(34, 82, 136, 0.92));
  color: #fff;
  box-shadow:
    0 16px 34px rgba(19, 63, 111, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.catalog-export-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 20px 40px rgba(19, 63, 111, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.catalog-export-button:disabled,
.catalog-export-button.is-loading {
  cursor: progress;
  opacity: 0.78;
}

body.theme-dark .admin-sidebar,
body.theme-dark .catalog-hero,
body.theme-dark .catalog-series,
body.theme-dark .catalog-tile-group,
body.theme-dark .catalog-table-layout,
body.theme-dark .catalog-mobile-tools,
body.theme-dark .catalog-mobile-table-shell,
body.theme-dark .catalog-series-compare-float__bar,
body.theme-dark .catalog-detail,
body.theme-dark .similar-panel,
body.theme-dark .compare-panel,
body.theme-dark .catalog-legend-spotlight,
body.theme-dark .compare-picker,
body.theme-dark .compare-legend-showcase,
body.theme-dark .compare-legend-card,
body.theme-dark .legend-products-panel,
body.theme-dark .modal-dialog,
body.theme-dark .admin-card,
body.theme-dark .admin-auth-card,
body.theme-dark .admin-auth-settings,
body.theme-dark .admin-account-card,
body.theme-dark .legend-slot,
body.theme-dark .section-empty {
  border-color: var(--line);
  background: var(--surface-card);
  box-shadow: var(--shadow);
}

body.theme-dark .admin-auth-gate {
  background:
    radial-gradient(circle at top, rgba(73, 141, 227, 0.14), transparent 34rem),
    linear-gradient(180deg, rgba(9, 15, 24, 0.98), rgba(12, 19, 29, 0.98));
}

body.theme-dark .catalog-tile-group--name {
  background:
    linear-gradient(180deg, rgba(18, 27, 40, 0.98), rgba(13, 20, 31, 0.98)),
    radial-gradient(circle at 0 0, rgba(218, 145, 57, 0.14), transparent 24rem);
}

body.theme-dark .catalog-tile-group--shape {
  background:
    linear-gradient(180deg, rgba(18, 27, 40, 0.98), rgba(13, 20, 31, 0.98)),
    radial-gradient(circle at 100% 0, rgba(73, 141, 227, 0.16), transparent 24rem);
}

body.theme-dark .catalog-tile-group__head h3,
body.theme-dark .catalog-modal-head h3,
body.theme-dark .catalog-legend-spotlight__title,
body.theme-dark .catalog-series-tile__body h3 {
  color: var(--ink);
}

body.theme-dark .catalog-tile-group__head p,
body.theme-dark .catalog-modal-head p,
body.theme-dark .catalog-legend-spotlight__tip,
body.theme-dark .catalog-series-tile__suffix {
  color: var(--muted);
}

body.theme-dark .admin-series-item,
body.theme-dark .search-result-item,
body.theme-dark .catalog-mobile-spec,
body.theme-dark .compare-chip,
body.theme-dark .catalog-modal-chip,
body.theme-dark .series-stats span,
body.theme-dark .spec-pill,
body.theme-dark .catalog-series__stats span {
  background: var(--button-ghost);
  border-color: var(--line);
}

body.theme-dark .catalog-legend-tile__badge,
body.theme-dark .catalog-legend-tile__name,
body.theme-dark .catalog-legend-tile__meta {
  background: rgba(18, 29, 44, 0.88);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(229, 239, 255, 0.08);
}

body.theme-dark .catalog-legend-tile__badge,
body.theme-dark .catalog-legend-tile__meta {
  color: var(--brand);
}

body.theme-dark .catalog-legend--active {
  background:
    linear-gradient(180deg, rgba(24, 36, 53, 0.96), rgba(18, 28, 42, 0.98)),
    radial-gradient(circle at top right, rgba(73, 141, 227, 0.18), transparent 12rem);
  border-color: rgba(150, 190, 233, 0.2);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

body.theme-dark .catalog-legend:hover {
  background: rgba(150, 190, 233, 0.06);
}

body.theme-dark .admin-filter input,
body.theme-dark .form-grid input,
body.theme-dark .form-grid select,
body.theme-dark .field-grid input,
body.theme-dark .admin-editor textarea,
body.theme-dark .global-search__toggle,
body.theme-dark .global-search__clear,
body.theme-dark .global-search input,
body.theme-dark .theme-toggle {
  border-color: var(--line-strong);
  background: var(--field-bg);
  color: var(--ink);
}

body.theme-dark .admin-audit-wrap {
  border-color: var(--line);
}

body.theme-dark .catalog-table th,
body.theme-dark .compare-table thead th,
body.theme-dark .similar-table thead th,
body.theme-dark .catalog-mobile-table thead th,
body.theme-dark .legend-products-group,
body.theme-dark .legend-products-subhead {
  background: var(--table-head) !important;
  color: var(--brand);
}

body.theme-dark .customer-table th:first-child,
body.theme-dark .customer-table td:first-child,
body.theme-dark .catalog-mobile-table th:first-child,
body.theme-dark .catalog-mobile-table td:first-child,
body.theme-dark .legend-products-table th:first-child,
body.theme-dark .legend-products-table td:first-child,
body.theme-dark .catalog-table--frozen .catalog-cell-action,
body.theme-dark .catalog-table--frozen .catalog-row-hit {
  background: var(--table-first) !important;
  color: var(--ink);
}

body.theme-dark .catalog-table--scroll .catalog-table-row.is-selected td,
body.theme-dark .catalog-table--frozen .catalog-table-row.is-selected td {
  background: rgba(150, 190, 233, 0.12) !important;
}

body.theme-dark .catalog-table--scroll .catalog-table-row.is-search-target td,
body.theme-dark .catalog-table--frozen .catalog-table-row.is-search-target td {
  background: rgba(84, 140, 204, 0.24) !important;
}

body.theme-dark .catalog-table--frozen .catalog-table-row.is-selected .catalog-cell-action,
body.theme-dark .catalog-table--frozen .catalog-table-row.is-selected .catalog-row-hit {
  background: rgba(150, 190, 233, 0.16) !important;
}

body.theme-dark .catalog-table--frozen .catalog-table-row.is-search-target .catalog-cell-action,
body.theme-dark .catalog-table--frozen .catalog-table-row.is-search-target .catalog-row-hit {
  background: rgba(84, 140, 204, 0.3) !important;
}

body.theme-dark .legend-products-table td {
  background: rgba(18, 29, 44, 0.94);
  color: var(--ink);
  border-right-color: rgba(229, 239, 255, 0.08);
  border-bottom-color: rgba(229, 239, 255, 0.08);
}

body.theme-dark .legend-products-table tbody tr:hover td {
  background: rgba(33, 48, 68, 0.94);
}

body.theme-dark .legend-products-table td .compare-cell-hit,
body.theme-dark .legend-products-model .compare-cell-hit,
body.theme-dark .legend-products-table td .compare-cell-value,
body.theme-dark .legend-products-model {
  color: var(--ink);
}

body.theme-dark .legend-products-model .compare-cell-hit:hover,
body.theme-dark .legend-products-table td .compare-cell-hit:hover .compare-cell-value {
  color: var(--brand);
}

body.theme-dark .catalog-table-frozen,
body.theme-dark .compare-col-baseline,
body.theme-dark .compare-cell-baseline,
body.theme-dark .catalog-mobile-row.is-selected td,
body.theme-dark .legend-products-row--selected td {
  background: rgba(150, 190, 233, 0.12) !important;
}

body.theme-dark .catalog-mobile-row.is-selected td:first-child,
body.theme-dark .legend-products-row--selected td:first-child {
  background: rgba(150, 190, 233, 0.16) !important;
}

body.theme-dark .catalog-mobile-row.is-search-target td {
  background: rgba(84, 140, 204, 0.24) !important;
}

body.theme-dark .catalog-mobile-row.is-search-target td:first-child {
  background: rgba(84, 140, 204, 0.3) !important;
}

body.theme-dark .catalog-legend__empty,
body.theme-dark .series-legend-empty {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(150, 190, 233, 0.08), rgba(150, 190, 233, 0.03));
}

body.theme-dark .series-legend-card img,
body.theme-dark .catalog-legend img,
body.theme-dark .catalog-modal-legend img,
body.theme-dark .legend-viewer img,
body.theme-dark .compare-legend-card img,
body.theme-dark .modal-legend img {
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
}

body.theme-dark .global-toolbar .search-results,
body.theme-dark .search-results {
  border-color: var(--line);
  background: var(--surface-card-strong);
}

body.theme-dark .global-toolbar .search-result-item,
body.theme-dark .global-toolbar .search-result-empty {
  background: var(--surface-card);
  border-color: var(--line);
}

body.theme-dark .global-toolbar .search-result-item:hover,
body.theme-dark .global-toolbar .search-result-item.is-active,
body.theme-dark .search-result-item:hover,
body.theme-dark .search-result-item.is-active,
body.theme-dark .admin-series-item:hover,
body.theme-dark .admin-series-item.active {
  background: var(--button-ghost-hover);
}

body.theme-dark .modal-backdrop {
  background: var(--overlay);
}

body.theme-dark .modal-close {
  background: rgba(31, 44, 63, 0.88);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  color: var(--ink);
}

.catalog-hero {
  order: 1;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.72fr);
  align-items: start;
  gap: 26px 42px;
  padding: 30px 34px 34px;
  border-radius: 32px;
  border: 1px solid rgba(22, 35, 50, 0.07);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 242, 0.94) 56%, rgba(243, 248, 255, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(19, 63, 111, 0.1), transparent 28rem),
    radial-gradient(circle at 0% 100%, rgba(211, 112, 42, 0.08), transparent 24rem);
  box-shadow:
    0 24px 64px rgba(19, 63, 111, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  text-align: left;
}

.catalog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 86% 18%, rgba(19, 63, 111, 0.09), transparent 18rem);
  pointer-events: none;
}

.catalog-hero::after {
  content: "";
  position: absolute;
  left: 34px;
  right: 34px;
  top: 0;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(19, 63, 111, 0.96), rgba(65, 110, 164, 0.82) 56%, rgba(211, 112, 42, 0.56));
}

.catalog-hero > * {
  position: relative;
  z-index: 1;
}

.catalog-hero__logo {
  display: grid;
  place-items: center;
  justify-self: end;
  min-height: 0;
}

.catalog-hero__logo img {
  display: block;
  max-width: min(224px, 22vw);
  max-height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(19, 63, 111, 0.08));
}

.catalog-hero__content {
  min-width: 0;
  padding-right: 0;
  align-self: start;
  display: grid;
  gap: 10px;
}

.catalog-hero__content h2 {
  margin: 0;
  font-family: var(--font-sans);
  max-width: 9.5em;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--ink) 90%, var(--brand) 10%);
}

.catalog-hero__actions {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 10px;
}

.catalog-hero__aside {
  display: grid;
  justify-items: stretch;
  align-content: start;
  gap: 14px;
  min-width: 220px;
  padding-left: 24px;
  border-left: 1px solid rgba(19, 63, 111, 0.1);
}

.catalog-hero__slogan {
  margin: 0;
  max-width: min(320px, 24vw);
  color: color-mix(in srgb, var(--brand) 88%, white 12%);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.theme-dark .catalog-hero__slogan {
  color: #d2e6ff !important;
  text-shadow:
    0 1px 0 rgba(8, 16, 28, 0.42),
    0 8px 20px rgba(8, 20, 36, 0.24);
}

.catalog-hero__hint {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.catalog-hero__metrics {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.metric-card--subtle {
  min-width: 108px;
  padding: 11px 13px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 248, 252, 0.94)),
    rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(19, 63, 111, 0.1);
  color: var(--muted);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 8px 20px rgba(19, 63, 111, 0.04);
}

.metric-card--subtle:hover {
  transform: none;
  box-shadow: none;
}

.metric-card--subtle span {
  opacity: 0.72;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metric-card--subtle strong {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}

body.theme-dark .metric-card--subtle {
  background:
    linear-gradient(180deg, rgba(20, 34, 52, 0.96), rgba(18, 29, 44, 0.9)),
    rgba(150, 190, 233, 0.08);
  border-color: rgba(150, 190, 233, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

body.theme-dark .catalog-hero {
  background:
    linear-gradient(135deg, rgba(18, 29, 44, 0.98), rgba(15, 24, 36, 0.95) 56%, rgba(20, 36, 56, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(150, 190, 233, 0.12), transparent 28rem),
    radial-gradient(circle at 0% 100%, rgba(242, 167, 104, 0.1), transparent 20rem);
  border-color: rgba(150, 190, 233, 0.12);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.theme-dark .catalog-hero::before {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 86% 18%, rgba(150, 190, 233, 0.12), transparent 18rem);
}

body.theme-dark .catalog-hero__aside {
  border-left-color: rgba(150, 190, 233, 0.14);
}

.catalog-sections {
  order: 3;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 6px;
  align-items: start;
}

.catalog-home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.catalog-home-tabs {
  display: none;
}

.catalog-home-tab {
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  background: rgba(19, 63, 111, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.catalog-home-tab.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(19, 63, 111, 0.18);
}

.catalog-home-columns > .catalog-tile-group {
  grid-column: auto;
}

.catalog-tile-group {
  display: grid;
  align-content: start;
  align-items: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(22, 35, 50, 0.07);
  box-shadow: 0 18px 40px rgba(19, 63, 111, 0.05);
}

.catalog-tile-group--name {
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.94), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 0 0, rgba(218, 145, 57, 0.08), transparent 24rem);
}

.catalog-tile-group--shape {
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.94), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 100% 0, rgba(73, 141, 227, 0.08), transparent 24rem);
}

.catalog-tile-group__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.catalog-tile-group__head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.4vw, 34px);
}

.catalog-tile-group__head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.catalog-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 16px;
  align-items: start;
}

.catalog-series-load-more {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 14px 26px;
}

.catalog-series-load-more__button {
  min-width: 188px;
}

.catalog-series-load-more__meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-series {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 246, 0.98)),
    radial-gradient(circle at 100% 0, rgba(19, 63, 111, 0.06), transparent 24rem);
  box-shadow: 0 18px 48px rgba(19, 63, 111, 0.08);
  min-width: 0;
  transition:
    transform 180ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    padding 220ms ease;
}

.catalog-series::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.16), transparent 18rem),
    radial-gradient(circle at 90% 12%, rgba(19, 63, 111, 0.05), transparent 20rem);
  opacity: 0.42;
  pointer-events: none;
}

.catalog-series > * {
  position: relative;
  z-index: 1;
}

.catalog-series.is-expanded {
  grid-column: 1 / -1;
  min-height: 0;
}

.catalog-series:not(.is-expanded) {
  aspect-ratio: 1 / 1;
  min-height: 208px;
  padding: 18px;
  border-color: rgba(19, 63, 111, 0.1);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96)),
    radial-gradient(circle at 86% 4%, rgba(73, 141, 227, 0.06), transparent 24rem);
}

.catalog-series:not(.is-expanded):hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(19, 63, 111, 0.12);
}

.catalog-series--legend-tile {
  aspect-ratio: 1 / 1;
  min-height: 216px;
  padding: 0;
  border-color: rgba(19, 63, 111, 0.1);
  overflow: hidden;
}

.catalog-series--name-tile {
  aspect-ratio: 2 / 1;
  min-height: 108px;
  padding: 0;
  border-color: rgba(19, 63, 111, 0.1);
  overflow: hidden;
}

.catalog-series--legend-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(19, 63, 111, 0.12);
}

.catalog-series--name-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(19, 63, 111, 0.12);
}

.catalog-legend-tile-hit {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.catalog-series-tile-hit {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.catalog-legend-tile__top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  pointer-events: none;
}

.catalog-legend-tile__badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.84);
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(19, 63, 111, 0.04);
}

.catalog-legend-tile__media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px 12px 24px;
}

.catalog-series-tile__body {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 30px 22px 40px;
}

.catalog-series--name-tile .catalog-series-tile__body {
  gap: 8px;
  padding: 18px 20px;
}

.catalog-series--name-tile .catalog-series-tile__body h3 {
  font-size: clamp(22px, 1.8vw, 32px);
  line-height: 0.96;
}

.catalog-series--name-tile .catalog-series-tile__body p {
  font-size: 12px;
}

.catalog-series-tile__body h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 2.2vw, 44px);
  line-height: 0.94;
  display: grid;
  justify-items: start;
  gap: 2px;
}

.catalog-series-tile__suffix {
  display: block;
  font-size: 0.42em;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.catalog-series-tile__body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.catalog-legend-tile__media img,
.catalog-legend-tile__media .catalog-legend__empty {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.catalog-legend-tile__footer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  pointer-events: none;
}

.catalog-legend-tile__footer--name {
  justify-content: flex-end;
}

.catalog-legend-tile__footer--compact {
  justify-content: flex-end;
}

.catalog-legend-tile__name,
.catalog-legend-tile__meta {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.84);
  backdrop-filter: blur(4px);
}

.catalog-legend-tile__name {
  max-width: calc(100% - 52px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-legend-tile__name--top {
  max-width: 76%;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.catalog-legend-tile__meta {
  flex: 0 0 auto;
  color: var(--brand);
}

.catalog-legend-tile__meta--count {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.catalog-legend-tile__count-value {
  font-weight: 900;
  line-height: 1;
}

.catalog-legend-tile__count-unit {
  font-size: 0.68em;
  line-height: 1;
  opacity: 0.9;
}

.catalog-legend-tile__meta--alias {
  max-width: 100%;
}

.catalog-series__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 0;
}

.catalog-series__head--accordion {
  cursor: pointer;
  position: relative;
  padding: 2px 0;
  transition: transform 180ms ease;
}

.catalog-series__head--accordion:active {
  transform: scale(0.996);
}

.catalog-series:not(.is-expanded) .catalog-series__head {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  height: 100%;
  gap: 10px;
}

.catalog-series__intro h3 {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: 34px;
}

.catalog-series__intro p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.catalog-series__side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.catalog-series:not(.is-expanded) .catalog-series__intro {
  display: grid;
  align-content: start;
  gap: 10px;
}

.catalog-series:not(.is-expanded) .catalog-series__intro h3 {
  margin: 0;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.04;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-series:not(.is-expanded) .catalog-series__intro p {
  display: none;
}

.catalog-series:not(.is-expanded) .catalog-series__side {
  grid-template-columns: 1fr auto;
  align-items: end;
  justify-items: stretch;
  align-self: end;
}

.catalog-series__body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0.42;
  margin-top: 0;
  transition:
    grid-template-rows 260ms ease,
    opacity 220ms ease,
    margin-top 220ms ease;
  overflow: hidden;
}

.catalog-series__body-inner {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 14px;
}

.catalog-series__body.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 14px;
}

.catalog-series__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.catalog-series__stats span {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(19, 63, 111, 0.08);
  color: var(--brand);
  font-weight: 800;
}

.catalog-series:not(.is-expanded) .catalog-series__stats {
  justify-content: flex-start;
  gap: 8px;
}

.catalog-series:not(.is-expanded) .catalog-series__stats span {
  padding: 7px 10px;
  font-size: 12px;
}

.catalog-series__accordion-hint {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(19, 63, 111, 0.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.catalog-series:not(.is-expanded) .catalog-series__accordion-hint {
  min-height: 36px;
  padding: 0 12px;
  justify-self: end;
}

@media (min-width: 761px) {
  .catalog-home-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .catalog-tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(216px, 216px));
    justify-content: center;
    gap: 18px;
  }

  .catalog-tile-grid--name {
    grid-template-columns: repeat(auto-fit, minmax(216px, 216px));
  }

  .catalog-series:not(.is-expanded) {
    min-height: 216px;
    height: 216px;
    padding: 18px;
  }

  .catalog-series:not(.is-expanded) .catalog-series__head {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .catalog-series:not(.is-expanded) .catalog-series__intro {
    min-height: 0;
  }

  .catalog-series:not(.is-expanded) .catalog-series__side {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px;
    align-self: end;
  }

  .catalog-series:not(.is-expanded) .catalog-series__stats {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: start;
    align-content: end;
    gap: 8px;
    min-height: 58px;
    grid-column: 1 / -1;
  }

  .catalog-series:not(.is-expanded) .catalog-series__accordion-hint {
    justify-self: start;
    align-self: end;
  }

  .catalog-series:not(.is-expanded) .catalog-series__accordion-icon {
    align-self: end;
  }

  .catalog-tile-grid--shape {
    grid-template-columns: repeat(auto-fit, minmax(216px, 216px));
  }

  .catalog-tile-group--shape .catalog-tile-grid {
    align-content: start;
  }

  .catalog-tile-group--shape .catalog-series--legend-tile {
    min-height: 216px;
  }

  .catalog-tile-grid--name .catalog-series--name-tile {
    min-height: 108px;
    height: 108px;
    aspect-ratio: 2 / 1;
  }

  .catalog-tile-grid--name .catalog-series-tile__body {
    gap: 8px;
    padding: 18px 20px;
  }

  .catalog-tile-grid--name .catalog-series-tile__body h3 {
    font-size: clamp(22px, 1.8vw, 32px);
    line-height: 0.96;
  }

  .catalog-tile-grid--name .catalog-series-tile__body p {
    font-size: 12px;
  }

  .catalog-tile-group--shape .catalog-legend-tile__media {
    padding: 24px 10px 22px;
  }

  .catalog-home-columns > .catalog-tile-group {
    grid-column: auto !important;
  }

}

.catalog-series__accordion-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(19, 63, 111, 0.12), rgba(19, 63, 111, 0.04));
  box-shadow: inset 0 0 0 1px rgba(19, 63, 111, 0.08);
}

.catalog-series__accordion-icon::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
  transition: transform 220ms ease, top 220ms ease;
}

.catalog-series__head[aria-expanded="true"] .catalog-series__accordion-icon::before {
  top: 17px;
  transform: rotate(225deg);
}

.catalog-legend-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  justify-content: flex-end;
  gap: 10px 12px;
  width: 100%;
  max-width: none;
}

.catalog-legend {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px 10px 8px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: transparent;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.catalog-legend:hover {
  background: rgba(19, 63, 111, 0.04);
}

.catalog-legend--active {
  transform: translateY(-2px);
  border-color: rgba(19, 63, 111, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 244, 255, 0.98)),
    radial-gradient(circle at top right, rgba(73, 141, 227, 0.16), transparent 12rem);
  box-shadow: 0 14px 28px rgba(19, 63, 111, 0.12);
}

.catalog-legend--muted {
  opacity: 0.58;
}

.catalog-legend--active::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(19, 63, 111, 0.12);
}

.catalog-legend img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  display: block;
  background: transparent;
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
}

.catalog-legend__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  text-align: center;
}

.catalog-legend__label {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.catalog-legend__state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(19, 63, 111, 0.12);
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.catalog-legend--active .catalog-legend__label {
  color: var(--brand);
}

.catalog-legend-strip--compact {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px 10px;
}

.catalog-legend-strip--compact .catalog-legend {
  gap: 4px;
  padding: 8px 8px 6px;
}

.catalog-legend-strip--compact .catalog-legend img,
.catalog-legend-strip--compact .catalog-legend__empty {
  height: 112px;
}

.catalog-legend-strip--compact .catalog-legend__label {
  font-size: 11px;
}

.catalog-legend-strip--compact .catalog-legend__state {
  min-height: 18px;
  padding: 0 6px;
  font-size: 10px;
}

@media (min-width: 761px) {
  .catalog-legend-strip {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 12px 14px;
    align-items: start;
  }

  .catalog-legend {
    gap: 6px;
  }

  .catalog-legend img,
  .catalog-legend__empty {
    height: 188px;
  }
}

.catalog-legend__empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 240px;
  color: var(--muted);
  border-radius: 20px;
  border: 1px dashed rgba(19, 63, 111, 0.18);
  background: linear-gradient(180deg, rgba(19, 63, 111, 0.03), rgba(19, 63, 111, 0.01));
}

.catalog-legend__empty[data-legend-lazy="1"] {
  background:
    linear-gradient(90deg, rgba(19, 63, 111, 0.03), rgba(19, 63, 111, 0.08), rgba(19, 63, 111, 0.03));
  background-size: 220% 100%;
  animation: legend-loading-sheen 1.6s linear infinite;
}

.catalog-legend--placeholder .catalog-legend__label {
  color: var(--muted);
}

@keyframes legend-loading-sheen {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.catalog-table-card {
  position: relative;
}

.catalog-mobile-panel {
  display: grid;
  gap: 14px;
}

.catalog-mobile-tools {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(19, 63, 111, 0.04);
  border: 1px solid rgba(19, 63, 111, 0.08);
}

.catalog-mobile-tools__copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.catalog-mobile-tools__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-mobile-table-shell {
  border-radius: 22px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background: rgba(255, 255, 255, 0.92);
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.catalog-mobile-table-frame {
  --catalog-mobile-sticky-top: 0px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background: rgba(255, 255, 255, 0.92);
  overflow: visible;
}

.catalog-mobile-table-head-shell {
  position: sticky;
  top: var(--catalog-mobile-sticky-top);
  z-index: 8;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border-bottom: 1px solid rgba(22, 35, 50, 0.08);
  border-radius: 22px 22px 0 0;
  background: rgba(236, 241, 247, 0.98);
}

.catalog-mobile-table-shell--body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 0;
  border-radius: 0 0 22px 22px;
  background: transparent;
}

.catalog-mobile-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.catalog-mobile-table th,
.catalog-mobile-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(22, 35, 50, 0.08);
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}

.catalog-mobile-table thead th:not(:first-child),
.catalog-mobile-table tbody td:not(:first-child) {
  text-align: center;
}

.catalog-mobile-table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: var(--catalog-mobile-sticky-top);
  z-index: 2;
  background: rgba(236, 241, 247, 0.98);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.catalog-mobile-table th:first-child,
.catalog-mobile-table td:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 3;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 12px 0 18px -18px rgba(22, 35, 50, 0.28);
}

.catalog-mobile-table thead th:first-child {
  z-index: 4;
  background: rgba(236, 241, 247, 0.98);
}

.catalog-mobile-table--head th,
.catalog-mobile-table--head td {
  position: static !important;
  left: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

.catalog-mobile-table--body td {
  background: rgba(255, 255, 255, 0.92);
}

.catalog-mobile-table-frame .catalog-mobile-row.is-selected td {
  background: rgba(228, 238, 248, 0.84);
}

.catalog-mobile-table-frame .catalog-mobile-row.is-search-target td {
  background: rgba(214, 233, 255, 0.94);
}

.catalog-mobile-table-frame .catalog-mobile-row.is-selected td:first-child {
  background: rgba(228, 238, 248, 0.96);
}

.catalog-mobile-table-frame .catalog-mobile-row.is-search-target td:first-child {
  background: rgba(198, 223, 252, 0.98);
}

body.theme-dark .catalog-mobile-table-frame {
  border-color: var(--line);
  background: var(--surface-card-strong);
}

body.theme-dark .catalog-mobile-table-head-shell {
  border-bottom-color: var(--line);
  background: var(--table-head);
}

body.theme-dark .catalog-mobile-table-shell--body {
  background: transparent;
}

body.theme-dark .catalog-mobile-table--body td {
  background: var(--surface-card);
  border-bottom-color: var(--line);
}

body.theme-dark .catalog-mobile-table-frame .catalog-mobile-row.is-selected td {
  background: rgba(150, 190, 233, 0.12);
}

body.theme-dark .catalog-mobile-table-frame .catalog-mobile-row.is-search-target td {
  background: rgba(84, 140, 204, 0.24);
}

body.theme-dark .catalog-mobile-table-frame .catalog-mobile-row.is-selected td:first-child {
  background: rgba(150, 190, 233, 0.16);
}

body.theme-dark .catalog-mobile-table-frame .catalog-mobile-row.is-search-target td:first-child {
  background: rgba(84, 140, 204, 0.3);
}

.catalog-mobile-row.is-selected td {
  background: rgba(228, 238, 248, 0.84);
}

.catalog-mobile-row.is-search-target td {
  background: rgba(214, 233, 255, 0.94);
}

.catalog-mobile-row.is-selected td:first-child {
  background: rgba(228, 238, 248, 0.96);
}

.catalog-mobile-row.is-search-target td:first-child {
  background: rgba(198, 223, 252, 0.98);
}

.catalog-mobile-model-cell {
  min-width: 150px;
}

.catalog-mobile-model-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-mobile-model-wrap .catalog-row-hit {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  text-align: left;
}

.catalog-mobile-model-wrap .catalog-row-model {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}

.catalog-mobile-table .catalog-row-hit {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.catalog-mobile-table td:not(:first-child) .catalog-row-hit {
  text-align: center;
}

.catalog-mobile-table .catalog-row-hit:hover {
  color: var(--brand);
}

.catalog-table-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.catalog-table-card--with-floating-compare,
.catalog-mobile-panel--with-floating-compare {
  padding-bottom: 96px;
}

.catalog-series-compare-float {
  position: fixed;
  left: 50%;
  bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 18px));
  z-index: 148;
  transform: translateX(-50%);
  pointer-events: none;
}

.catalog-series-compare-float__bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(19, 63, 111, 0.14);
  background: rgba(255, 252, 247, 0.92);
  box-shadow: 0 20px 42px rgba(22, 35, 50, 0.18);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.catalog-series-compare-float__bar button {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.catalog-series-compare-float__bar .catalog-modal-chip {
  white-space: nowrap;
}

.catalog-table-title {
  color: var(--brand);
  font-weight: 800;
}

.catalog-table-layout {
  --catalog-table-sticky-top: 104px;
  --catalog-table-frozen-width: 164px;
  display: grid;
  grid-template-columns: var(--catalog-table-frozen-width) minmax(0, 1fr);
  gap: 0;
  border: 1px solid rgba(22, 35, 50, 0.08);
  border-radius: 22px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.9);
}

.catalog-table-frozen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid rgba(22, 35, 50, 0.08);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 244, 236, 0.92));
}

.catalog-table-scroll-area {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  min-width: 0;
  overflow: visible;
}

.catalog-table-head {
  position: sticky;
  top: var(--catalog-table-sticky-top);
  z-index: 9;
}

.catalog-table-frozen-head {
  z-index: 12;
}

.catalog-table-scroll-head {
  z-index: 10;
  overflow: hidden;
}

.catalog-table-scroll-head-pane {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  cursor: grab;
}

.catalog-table-scroll-head-pane.is-dragging {
  cursor: grabbing;
}

.catalog-table-body {
  min-width: 0;
}

.catalog-table-scroll-pane {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-gutter: stable both-edges;
  cursor: grab;
  overscroll-behavior-x: contain;
}

.catalog-table-scroll-pane.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.catalog-table-scroll-pane::-webkit-scrollbar,
.x-scroll::-webkit-scrollbar {
  height: 12px;
}

.catalog-table-scroll-pane::-webkit-scrollbar-track,
.x-scroll::-webkit-scrollbar-track {
  background: rgba(19, 63, 111, 0.08);
  border-radius: 999px;
}

.catalog-table-scroll-pane::-webkit-scrollbar-thumb,
.x-scroll::-webkit-scrollbar-thumb {
  background: rgba(19, 63, 111, 0.28);
  border-radius: 999px;
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.catalog-table--scroll {
  width: max-content;
  min-width: max(100%, 880px);
  table-layout: fixed;
}

.catalog-table--frozen {
  width: var(--catalog-table-frozen-width);
  min-width: var(--catalog-table-frozen-width);
  max-width: var(--catalog-table-frozen-width);
  table-layout: fixed;
}

.catalog-table--scroll th,
.catalog-table--scroll td {
  min-width: 138px;
  width: 138px;
  text-align: center;
}

.catalog-table--frozen th,
.catalog-table--frozen td {
  width: var(--catalog-table-frozen-width);
  min-width: var(--catalog-table-frozen-width);
  max-width: var(--catalog-table-frozen-width);
}

.catalog-table--scroll .col-legend {
  min-width: 56px;
  width: 56px;
}

.catalog-table--scroll th.col-legend,
.catalog-table--scroll td.col-legend {
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.catalog-table--scroll .col-legend .catalog-row-hit {
  min-height: 36px;
  padding: 8px 6px;
  text-align: center;
}

.catalog-table--scroll .col-weight {
  min-width: 132px;
  width: 132px;
}

.catalog-table--scroll .col-note {
  min-width: 220px;
  width: 220px;
}

.catalog-table th,
.catalog-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(22, 35, 50, 0.08);
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}

.catalog-table th {
  color: var(--brand);
  background: rgba(236, 241, 247, 0.98);
  font-size: 15px;
  font-weight: 800;
}

.catalog-table-group-head {
  position: relative;
  padding-top: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(19, 63, 111, 0.08);
  background:
    linear-gradient(180deg, rgba(232, 239, 247, 0.98), rgba(244, 247, 251, 0.98));
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: none;
}

.catalog-table--scroll .catalog-table-group-head,
.catalog-table--scroll .catalog-table-subhead,
.catalog-table--scroll td {
  text-align: center;
}

.catalog-table-group-head::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(19, 63, 111, 0.12), rgba(19, 63, 111, 0.34), rgba(19, 63, 111, 0.12));
}

.catalog-table-group-head--empty {
  color: transparent;
  letter-spacing: 0;
}

.catalog-table-group-head--empty::after {
  display: none;
}

.catalog-table-group-head--frozen {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(249, 244, 236, 0.92));
  color: var(--brand);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.catalog-table-subhead {
  padding-top: 10px;
  padding-bottom: 9px;
  background: rgba(236, 241, 247, 0.98);
  color: var(--brand);
  font-size: 15px;
  font-weight: 800;
  border-left: 1px solid rgba(19, 63, 111, 0.06);
}

.catalog-table-subhead--frozen {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(249, 244, 236, 0.92));
  border-left: 0;
}

.catalog-table--frozen th,
.catalog-table--frozen td {
  position: sticky;
  left: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 244, 236, 0.92));
  background-clip: padding-box;
  overflow: visible;
}

.catalog-table-row {
  cursor: pointer;
}

.catalog-table-row:hover {
  background: rgba(19, 63, 111, 0.04);
}

.catalog-table--scroll .catalog-table-row.is-selected td,
.catalog-table--frozen .catalog-table-row.is-selected td {
  background: rgba(228, 238, 248, 0.88);
}

.catalog-table--scroll .catalog-table-row.is-search-target td,
.catalog-table--frozen .catalog-table-row.is-search-target td {
  background: rgba(214, 233, 255, 0.96);
}

.catalog-table--frozen .catalog-table-row.is-selected .catalog-cell-action,
.catalog-table--frozen .catalog-table-row.is-selected .catalog-row-hit {
  background: rgba(228, 238, 248, 0.96);
}

.catalog-table--frozen .catalog-table-row.is-search-target .catalog-cell-action,
.catalog-table--frozen .catalog-table-row.is-search-target .catalog-row-hit {
  background: rgba(198, 223, 252, 0.98);
}

.catalog-table--scroll .catalog-table-row:hover td,
.catalog-table--frozen .catalog-table-row:hover td {
  background: rgba(19, 63, 111, 0.04);
}

.catalog-row-hit {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 1;
  border-radius: 0;
}

.catalog-table--scroll .catalog-row-hit {
  text-align: center;
}

.catalog-row-hit:hover {
  color: var(--brand);
}

.catalog-cell-action {
  padding: 0 !important;
  overflow: visible;
}

.catalog-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.catalog-row-main .catalog-row-hit {
  flex: 1 1 auto;
}

.catalog-row-model {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-check--inline {
  flex: 0 0 auto;
}

.catalog-table--frozen .catalog-cell-action,
.catalog-table--frozen .catalog-row-hit {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 244, 236, 0.92));
  color: var(--ink);
  opacity: 1;
  visibility: visible;
  -webkit-text-fill-color: currentColor;
}

.catalog-table--scroll th.col-note,
.catalog-table--scroll td.col-note,
.catalog-table--scroll .col-note .catalog-row-hit {
  text-align: left;
}

.catalog-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.catalog-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.catalog-modal-head h3 {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: 30px;
}

.catalog-alias-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.catalog-modal-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(19, 63, 111, 0.08);
  color: var(--brand);
  font-weight: 800;
}

.catalog-modal-chip--compact {
  padding: 8px 12px;
  font-size: 13px;
}

.catalog-modal-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.catalog-modal-legend {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 360px;
}

.catalog-modal-legend img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  display: block;
  background: transparent;
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
}

.catalog-modal-detail {
  display: grid;
  gap: 16px;
}

.modal-dialog--compare {
  width: min(1760px, calc(100vw - 12px));
}

.modal-dialog--series {
  width: min(1760px, calc(100vw - 12px));
}

.catalog-series-modal {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.catalog-series-browser .catalog-table-layout {
  --catalog-table-sticky-top: 0px;
}

.catalog-legend-spotlight {
  padding: 18px 20px 12px;
  border-radius: 26px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.98)),
    radial-gradient(circle at top right, rgba(19, 63, 111, 0.05), transparent 22rem);
}

.catalog-legend-spotlight__head {
  display: grid;
  gap: 16px;
  margin-bottom: 8px;
}

.catalog-legend-spotlight__title {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand);
}

.catalog-legend-spotlight__tip {
  color: var(--muted);
  font-size: 13px;
}

.catalog-legend-spotlight__viewer {
  min-height: 34vh;
  padding: 4px 0 0;
}

.catalog-detail {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background: rgba(19, 63, 111, 0.03);
}

.catalog-detail h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.catalog-detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.catalog-detail-col-label {
  width: 150px;
}

.catalog-detail-col-value {
  width: auto;
}

.catalog-detail-table th,
.catalog-detail-table td {
  padding: 9px 0;
  border-bottom: 1px solid rgba(22, 35, 50, 0.08);
  text-align: left;
  vertical-align: middle;
}

.catalog-detail-table th {
  width: 150px;
  color: var(--muted);
}

.compare-panel,
.similar-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background: rgba(19, 63, 111, 0.03);
}

.similar-panel--with-floating-compare {
  padding-bottom: 104px;
}

.compare-panel__head,
.similar-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.compare-panel__head h4,
.similar-panel__head h4 {
  margin: 0;
}

.compare-panel__head p,
.similar-panel__head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.compare-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compare-chip--adder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px dashed rgba(19, 63, 111, 0.22);
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand);
  font-size: 24px;
  font-weight: 500;
  cursor: pointer;
}

.compare-chip--adder:hover {
  background: rgba(228, 238, 248, 0.92);
}

.compare-panel--standalone {
  padding: 24px;
  scroll-margin-top: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 253, 0.98));
}

.compare-picker {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.compare-picker--page {
  margin-top: 0;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.98));
}

.compare-picker__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.compare-picker__head h5 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
}

.compare-picker__head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.compare-check {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.compare-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compare-check span {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(19, 63, 111, 0.24);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.compare-check input:checked + span {
  border-color: rgba(19, 63, 111, 0.6);
  background:
    linear-gradient(180deg, rgba(19, 63, 111, 0.9), rgba(33, 82, 142, 0.96));
  box-shadow: 0 0 0 3px rgba(19, 63, 111, 0.1);
}

.compare-check input:checked + span::after {
  content: "";
  display: block;
  width: 6px;
  height: 10px;
  margin: 2px 0 0 5px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.compare-legend-showcase {
  margin-top: 20px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.98)),
    radial-gradient(circle at 100% 0, rgba(19, 63, 111, 0.06), transparent 24rem);
}

.compare-legend-showcase__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.compare-legend-showcase__head h4 {
  margin: 0;
  color: var(--brand);
  font-size: 20px;
}

.compare-legend-showcase__head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.compare-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.compare-legend-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(19, 63, 111, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.compare-legend-card.is-baseline {
  box-shadow: inset 0 0 0 2px rgba(19, 63, 111, 0.12);
}

.compare-legend-card img,
.compare-legend-card .catalog-legend__empty {
  width: 100%;
  height: 280px;
  object-fit: contain;
}

.compare-legend-card img {
  display: block;
  background: transparent;
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
}

.compare-legend-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.compare-legend-meta strong {
  color: var(--brand);
}

.compare-section + .compare-section {
  margin-top: 14px;
}

.compare-section h5 {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 15px;
}

.x-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.compare-table,
.similar-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.compare-table {
  table-layout: fixed;
}

.compare-col-field {
  width: 140px;
}

.compare-col-product {
  width: 220px;
}

.compare-table th,
.compare-table td,
.similar-table th,
.similar-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(22, 35, 50, 0.08);
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}

.compare-table thead th,
.similar-table thead th {
  background: rgba(236, 241, 247, 0.96);
  color: var(--brand);
}

.compare-baseline-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.compare-col-baseline,
.compare-cell-baseline {
  background: rgba(19, 63, 111, 0.1);
  box-shadow: inset 0 0 0 1px rgba(19, 63, 111, 0.08);
}

.baseline-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(211, 112, 42, 0.14);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.compare-row-selected {
  background: rgba(19, 63, 111, 0.06);
}

.compare-row-different:not(.compare-row-selected) {
  background: rgba(211, 112, 42, 0.06);
}

.compare-row-different > th {
  color: var(--accent);
}

.compare-cell-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-cell-hit {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.compare-cell-hit:hover .compare-cell-value {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.compare-cell-delta {
  margin-top: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.compare-cell-range,
.compare-cell-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.compare-panel--standalone .compare-chip-list {
  gap: 8px;
}

.compare-panel--standalone .compare-chip {
  padding: 2px;
}

.compare-panel--standalone .chip-main,
.compare-panel--standalone .chip-remove {
  padding: 7px 10px;
}

.compare-panel--standalone .chip-main {
  font-size: 13px;
}

.compare-panel--standalone .baseline-tag {
  padding: 3px 7px;
  font-size: 11px;
}

.compare-panel--standalone .compare-section h5 {
  margin-bottom: 8px;
  font-size: 14px;
}

.compare-panel--standalone .compare-col-field {
  width: 104px;
}

.compare-panel--standalone .compare-col-product {
  width: 172px;
}

.compare-panel--standalone .compare-table {
  font-size: 14px;
}

.compare-panel--standalone .compare-table th,
.compare-panel--standalone .compare-table td {
  padding: 8px 10px;
}

.compare-panel--standalone .compare-table thead th {
  font-size: 13px;
}

.compare-panel--standalone .compare-baseline-btn {
  gap: 6px;
  font-size: 13px;
}

.compare-panel--standalone .compare-cell-value {
  font-size: 13px;
  line-height: 1.22;
}

.compare-panel--standalone .compare-cell-delta {
  margin-top: 3px;
  font-size: 11px;
}

.compare-panel--standalone .compare-cell-range,
.compare-panel--standalone .compare-cell-note {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}

.legend-viewer img {
  mix-blend-mode: var(--legend-image-blend);
  filter: var(--legend-image-filter);
  opacity: var(--legend-image-opacity);
}

.legend-products-panel {
  margin-top: 2px;
  padding: 18px 20px 20px;
  border-radius: 24px;
  border: 1px solid rgba(22, 35, 50, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.98)),
    radial-gradient(circle at 100% 0, rgba(19, 63, 111, 0.05), transparent 22rem);
}

.legend-products-panel__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.legend-products-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.legend-products-status {
  min-width: 78px;
  justify-content: center;
}

.legend-products-panel__head h4 {
  margin: 0;
  color: var(--brand);
  font-size: 18px;
}

.legend-products-panel__head p {
  margin: 3px 0 0;
  color: var(--muted);
}

.legend-products-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.legend-products-table th,
.legend-products-table td {
  padding: 8px 10px;
  border-right: 1px solid rgba(22, 35, 50, 0.06);
  border-bottom: 1px solid rgba(22, 35, 50, 0.08);
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.88);
}

.legend-products-table th:first-child,
.legend-products-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 12px 0 18px -18px rgba(22, 35, 50, 0.26);
}

.legend-products-table thead th:first-child {
  z-index: 4;
}

.legend-products-table thead tr:first-child th {
  padding-top: 12px;
  padding-bottom: 12px;
}

.legend-products-table thead tr:last-child th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.legend-products-row--selected td {
  background: rgba(228, 238, 248, 0.88);
}

.legend-products-row--selected td:first-child {
  background: rgba(228, 238, 248, 0.96);
}

.legend-products-group {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(228, 238, 248, 0.94) !important;
}

.legend-products-subhead {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: rgba(244, 246, 249, 0.98) !important;
}

.legend-products-select {
  width: 58px;
  min-width: 58px;
  text-align: center !important;
}

.legend-products-select .compare-check {
  margin: 0 auto;
}

.legend-products-model {
  min-width: 128px;
  font-weight: 800;
  color: var(--brand);
}

.legend-products-table td .compare-cell-hit {
  display: block;
}

.legend-products-model .compare-cell-hit {
  display: block;
}

.legend-products-model .compare-cell-hit:hover {
  color: var(--ink);
}

@media (max-width: 1100px) {
  .catalog-hero,
  .catalog-series__head,
  .catalog-modal-head,
  .catalog-modal-layout,
  .compare-panel__head,
  .similar-panel__head,
  .compare-legend-showcase__head,
  .legend-products-panel__head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .catalog-series__side {
    justify-items: start;
  }

  .catalog-legend-strip {
    justify-content: flex-start;
    max-width: none;
  }

  .catalog-table-layout {
    grid-template-columns: 152px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .customer-page .main-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 24px;
  }

  .global-toolbar {
    order: 2;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: auto;
    right: auto;
    width: min(100%, 760px);
    max-width: min(95vw, 760px);
    min-height: 0;
    margin: 2px auto 8px;
    display: block;
    pointer-events: auto;
    z-index: 24;
    transition: width 220ms ease, max-width 220ms ease, margin 220ms ease, transform 220ms ease, opacity 220ms ease;
  }

  .global-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    transform: none;
    transform-origin: right top;
    transition: width 220ms ease, max-width 220ms ease, transform 220ms ease, opacity 180ms ease;
  }

  .global-search__toggle {
    inset: 0 auto auto 0;
    width: 58px;
    height: 60px;
    border-radius: 20px;
    font-size: 21px;
  }

  .global-search input {
    height: 60px;
    padding: 0 70px 0 66px;
    border: 1px solid rgba(19, 63, 111, 0.34);
    border-radius: 20px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow:
      0 0 0 1px rgba(19, 63, 111, 0.12),
      0 12px 28px rgba(19, 63, 111, 0.12);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
    font-size: 17px;
    font-weight: 800;
    text-align: left;
  }

  .global-search__clear {
    right: 9px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 20px;
  }

  .global-toolbar .search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    right: auto;
    width: min(92vw, 620px);
    min-width: 0;
    max-height: min(56dvh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 24px;
    transform: translateX(-50%);
    z-index: 148;
  }

  .theme-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 12px;
    z-index: 180;
    min-height: 42px;
    min-width: 42px;
    padding: 0;
    margin-right: 0;
    justify-content: center;
    border-radius: 16px;
    opacity: 0.92;
    background: rgba(15, 24, 36, 0.56);
    border-color: rgba(229, 239, 255, 0.22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  }

  body.modal-open .theme-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92);
  }

  .theme-toggle__label {
    display: none;
  }

  .theme-toggle__icon {
    font-size: 16px;
  }

  body.theme-light .theme-toggle,
  body:not(.theme-dark) .theme-toggle {
    background: rgba(255, 253, 248, 0.88);
    border-color: rgba(19, 63, 111, 0.18);
    box-shadow: 0 12px 26px rgba(19, 63, 111, 0.14);
  }

  .catalog-hero,
  .catalog-series,
  .compare-panel,
  .similar-panel,
  .modal-body {
    padding: 16px;
  }

  .catalog-hero__metrics {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 320px;
    margin: 0 auto;
  }

  .catalog-hero {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 14px;
    padding: 20px 18px 24px;
    min-height: 0;
  }

  .catalog-hero::after {
    left: 18px;
    right: 18px;
  }

  .catalog-hero__content {
    width: 100%;
    padding-right: 0;
    order: 2;
    gap: 10px;
  }

  .catalog-hero__actions {
    width: 100%;
    justify-items: center;
    margin-top: 6px;
  }

  .catalog-hero__aside {
    width: 100%;
    order: 1;
    justify-items: center;
    gap: 12px;
    padding-left: 0;
    border-left: 0;
  }

  .catalog-hero__logo {
    width: 100%;
    justify-self: center;
  }

  .catalog-hero__logo img {
    max-width: min(232px, 62vw);
    max-height: 64px;
  }

  .catalog-hero__content h2 {
    max-width: none;
    font-size: 24px;
    line-height: 1.16;
    text-align: center;
  }

  .catalog-hero__slogan {
    max-width: none;
    padding: 0 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.12em;
    color: var(--brand) !important;
    opacity: 0.96;
  }

  .catalog-hero__hint {
    max-width: 22rem;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
  }

  .catalog-export-button {
    min-height: 42px;
    width: auto;
    min-width: min(62vw, 240px);
    padding: 0 22px;
    border-radius: 14px;
    font-size: 15px;
    box-shadow: 0 10px 22px rgba(19, 63, 111, 0.14);
  }

  .catalog-home-columns {
    gap: 10px;
  }

  .catalog-home-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-home-columns[data-home-tile-mode="name"] > .catalog-tile-group--shape {
    display: none;
  }

  .catalog-home-columns[data-home-tile-mode="shape"] > .catalog-tile-group--name {
    display: none;
  }

  .catalog-tile-group {
    gap: 10px;
    padding: 14px;
    border-radius: 24px;
  }

  .catalog-tile-group__head {
    padding: 0;
  }

  .catalog-tile-group__head h3 {
    font-size: 17px;
  }

  .catalog-tile-group__head p {
    font-size: 11px;
    line-height: 1.45;
  }

  .catalog-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .catalog-tile-grid--name {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-series--name-tile,
  .catalog-series--legend-tile,
  .catalog-series:not(.is-expanded) {
    min-height: 102px;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
  }

  .catalog-series:not(.is-expanded) {
    padding: 10px;
  }

  .catalog-series-tile__body {
    gap: 5px;
    padding: 16px 12px 18px;
  }

  .catalog-series-tile__body h3 {
    font-size: clamp(14px, 6vw, 20px);
    gap: 1px;
  }

  .catalog-tile-grid--name .catalog-series--name-tile {
    min-height: 54px;
    aspect-ratio: 2 / 1;
    border-radius: 18px;
  }

  .catalog-tile-grid--name .catalog-series-tile__body {
    gap: 2px;
    padding: 9px 10px;
  }

  .catalog-tile-grid--name .catalog-series-tile__body h3 {
    font-size: clamp(11px, 3.4vw, 14px);
    line-height: 1.02;
  }

  .catalog-series-tile__suffix {
    font-size: 0.5em;
  }

  .catalog-legend-tile__top {
    top: 6px;
    left: 6px;
    right: 6px;
  }

  .catalog-legend-tile__name,
  .catalog-legend-tile__meta {
    font-size: 9px;
    padding: 2px 4px;
  }

  .catalog-legend-tile__media {
    padding: 14px 6px 18px;
  }

  .catalog-legend-tile__footer {
    left: 6px;
    right: 6px;
    bottom: 6px;
  }

  .catalog-hero__metrics {
    justify-content: center;
    max-width: 240px;
  }

  .hero-text {
    font-size: 14px;
    line-height: 1.5;
  }

  body.theme-dark .catalog-hero__slogan {
    color: #a9caf2 !important;
    text-shadow: 0 1px 10px rgba(13, 35, 63, 0.26);
  }

  .catalog-series__intro h3 {
    font-size: 26px;
    margin-top: 6px;
  }

  .catalog-series__intro p {
    margin-top: 8px;
    font-size: 14px;
  }

  .admin-branding-panel {
    grid-template-columns: 1fr;
  }

  .admin-branding-previews {
    grid-template-columns: 1fr;
  }

  .catalog-series__stats {
    justify-content: flex-start;
  }

  .catalog-sections {
    order: 3;
    margin-top: 4px;
    gap: 12px;
  }

  .catalog-series--mobile .catalog-series__head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 0;
    align-items: center;
    cursor: pointer;
  }

  .catalog-series--mobile .catalog-series__head--accordion {
    position: relative;
    padding: 2px 0;
    transition: transform 180ms ease;
  }

  .catalog-series--mobile .catalog-series__head--accordion:active {
    transform: scale(0.992);
  }

  .catalog-series--mobile .catalog-series__intro p {
    margin-top: 8px;
  }

  .catalog-series--mobile .catalog-series__side {
    justify-items: start;
  }

  .catalog-series--mobile:not(.is-expanded) {
    min-height: 152px;
    padding: 14px;
    border-radius: 22px;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__head {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    align-items: stretch;
    height: 100%;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__intro {
    gap: 6px;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__intro h3 {
    margin-top: 0;
    font-size: 22px;
    line-height: 1.06;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__side {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__stats {
    gap: 6px;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__stats span {
    padding: 6px 8px;
    font-size: 11px;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__accordion-hint {
    min-height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__accordion-icon {
    width: 32px;
    height: 32px;
  }

  .catalog-series--mobile:not(.is-expanded) .catalog-series__accordion-icon::before {
    top: 10px;
    left: 10px;
    width: 9px;
    height: 9px;
  }

  .catalog-series--legend-tile {
    min-height: 178px;
  }

  .catalog-legend-tile-hit {
    padding: 0;
  }

  .catalog-legend-tile__media {
    padding: 22px 8px 18px;
  }

  .catalog-legend-tile__media img,
  .catalog-legend-tile__media .catalog-legend__empty {
    max-height: 100%;
  }

  .catalog-legend-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-inline: -2px;
    scroll-snap-type: x proximity;
  }

  .catalog-legend {
    flex: 0 0 128px;
    scroll-snap-align: start;
  }

  .catalog-mobile-table-frame--page {
    --catalog-mobile-sticky-top: 0px;
  }

  .catalog-table-layout {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .catalog-legend {
    min-width: 132px;
  }

  .catalog-legend img,
  .catalog-legend__empty {
    height: 176px;
  }

  .modal-dialog {
    width: 100vw;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  body.modal-open .global-toolbar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 14px;
    left: auto;
    width: 58px;
    max-width: 58px;
    margin: 0;
    min-height: 58px;
    transform: none;
    z-index: 146;
  }

  body.modal-open .global-search {
    width: 58px;
    max-width: 58px;
    margin-left: 0;
  }

  body.modal-open .global-search.is-expanded,
  body.modal-open .global-search:focus-within {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    transform: none;
    margin: 0;
    z-index: 147;
  }

  body.modal-open .global-search:not(.is-expanded):not(:focus-within) input {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-12px);
  }

  body.modal-open .global-search:not(.is-expanded):not(:focus-within) .global-search__clear {
    opacity: 0;
    pointer-events: none;
  }

  body.modal-open .modal-dialog {
    margin-top: calc(env(safe-area-inset-top, 0px) + 72px);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 72px);
  }

  body.modal-open .catalog-mobile-table-frame {
    --catalog-mobile-sticky-top: 0px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    margin: 10px 10px 0 0;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.88);
  }

  .modal-body {
    padding: 16px 16px 28px;
  }

  .catalog-modal-head-actions,
  .compare-chip-list,
  .legend-products-actions {
    width: 100%;
  }

  .compare-chip-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .compare-chip {
    flex: 0 0 auto;
  }

  .compare-panel--standalone,
  .compare-legend-showcase,
  .legend-products-panel {
    padding: 16px;
  }

  .compare-col-field {
    width: 96px;
  }

  .compare-col-product {
    width: 148px;
  }

  .compare-table th,
  .compare-table td,
  .similar-table th,
  .similar-table td {
    padding: 8px 9px;
    font-size: 13px;
  }

  .catalog-mobile-table th,
  .catalog-mobile-table td {
    padding: 9px 9px;
    font-size: 13px;
  }

  .catalog-mobile-model-cell {
    min-width: 132px;
  }

  .catalog-series__toggle {
    min-height: 40px;
    min-width: 92px;
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .catalog-series__stats {
    gap: 8px;
  }

  .catalog-series__stats span {
    padding: 8px 12px;
    font-size: 12px;
  }

  .catalog-series__accordion-hint {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(19, 63, 111, 0.07);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .catalog-series__accordion-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(19, 63, 111, 0.12), rgba(19, 63, 111, 0.04));
    box-shadow: inset 0 0 0 1px rgba(19, 63, 111, 0.08);
  }

  .catalog-series__accordion-icon::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 13px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: rotate(45deg);
    transition: transform 220ms ease, top 220ms ease;
  }

  .catalog-series--mobile .catalog-series__head[aria-expanded="true"] .catalog-series__accordion-icon::before {
    top: 16px;
    transform: rotate(225deg);
  }

  body.mobile-search-docked .global-toolbar {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    width: 58px;
    max-width: 58px;
    margin: 0 0 8px auto;
    transform: translateY(0) scale(0.98);
    z-index: 146;
  }

  body.mobile-search-docked .global-search {
    width: 58px;
    max-width: 58px;
  }

  body.mobile-search-docked .global-search.is-expanded,
  body.mobile-search-docked .global-search:focus-within {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    transform: translateY(0) scale(1);
    margin: 0;
    z-index: 147;
  }

  body.mobile-search-docked .global-toolbar .search-results,
  body.modal-open .global-toolbar .search-results {
    top: calc(env(safe-area-inset-top, 0px) + 74px);
    position: fixed;
  }

  body.mobile-search-docked .global-search__toggle {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(19, 63, 111, 0.16);
  }

  body.mobile-search-docked .global-search.is-expanded input,
  body.mobile-search-docked .global-search:focus-within input {
    text-align: left;
  }

  body.mobile-search-docked .global-search:not(.is-expanded):not(:focus-within) input {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-12px);
  }

  body.mobile-search-docked .global-search:not(.is-expanded):not(:focus-within) .global-search__clear {
    opacity: 0;
    pointer-events: none;
  }

  body.mobile-search-docked .catalog-mobile-table-frame--page {
    --catalog-mobile-sticky-top: 0px;
  }

  body.modal-open.mobile-search-docked .global-toolbar {
    width: auto;
    max-width: none;
    margin: 0;
    transform: none;
  }
}

@media (max-width: 420px) {
  .catalog-sections {
    gap: 10px;
  }

  .catalog-series:not(.is-expanded) {
    min-height: 144px;
    padding: 13px;
  }

  .catalog-series:not(.is-expanded) .catalog-series__intro h3 {
    font-size: 20px;
  }

  .catalog-series:not(.is-expanded) .catalog-series__stats span {
    padding: 5px 7px;
    font-size: 10px;
  }

  .catalog-series:not(.is-expanded) .catalog-series__accordion-hint {
    min-height: 30px;
    padding: 0 9px;
    font-size: 10px;
  }
}

/* Customer Layout Final Override */
body.customer-page .main-panel {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}

body.customer-page .main-panel > * {
  width: 100%;
  max-width: none;
}

body.customer-page .catalog-sections,
body.customer-page .catalog-series,
body.customer-page .catalog-table-card,
body.customer-page .catalog-table-layout,
body.customer-page .catalog-table-scroll-area {
  min-width: 0;
}

@media (max-width: 760px) {
  body.customer-page {
    --mobile-safe-top: calc(env(safe-area-inset-top, 0px) + 10px);
    --mobile-safe-bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
    --mobile-gutter: 14px;
    --mobile-radius-xl: 26px;
    --mobile-radius-lg: 20px;
    --mobile-radius-md: 16px;
  }

  body.customer-page .main-panel {
    gap: 12px;
    padding: var(--mobile-safe-top) var(--mobile-gutter) var(--mobile-safe-bottom);
  }

  .global-toolbar,
  .global-search {
    will-change: transform, width, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .global-toolbar {
    max-width: calc(100vw - (var(--mobile-gutter) * 2));
    margin: 0 auto 6px;
  }

  .global-search {
    transform-origin: right top;
  }

  .global-search__toggle {
    background: var(--surface-card-strong);
    box-shadow: 0 12px 28px rgba(19, 63, 111, 0.12);
  }

  .global-search input {
    background: var(--surface-card-strong);
    box-shadow: 0 12px 28px rgba(19, 63, 111, 0.12);
    font-size: 16px;
    letter-spacing: 0.01em;
  }

  .global-search__clear {
    background: rgba(19, 63, 111, 0.08);
  }

  .global-toolbar .search-results {
    top: calc(100% + 10px);
    padding: 10px;
    border-radius: 22px;
    background: rgba(255, 253, 248, 0.92);
    box-shadow: 0 20px 44px rgba(19, 63, 111, 0.18);
    backdrop-filter: blur(18px);
  }

  .theme-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 12px;
  }

  .catalog-hero {
    gap: 14px;
    padding: 20px 16px 22px;
    border-radius: var(--mobile-radius-xl);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 244, 237, 0.96)),
      radial-gradient(circle at top right, rgba(19, 63, 111, 0.08), transparent 20rem);
    box-shadow: 0 16px 36px rgba(19, 63, 111, 0.1);
  }

  .catalog-hero__aside {
    gap: 10px;
    padding-left: 0;
    border-left: 0;
  }

  .catalog-hero__logo img {
    max-width: min(220px, 58vw);
    max-height: 56px;
  }

  .catalog-hero__content {
    display: grid;
    gap: 10px;
  }

  .catalog-hero__content h2 {
    max-width: none;
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.14;
  }

  .catalog-hero__slogan {
    letter-spacing: 0.12em;
  }

  .catalog-hero__actions {
    gap: 8px;
    margin-top: 0;
  }

  .catalog-export-button {
    min-height: 40px;
    min-width: 0;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 14px;
  }

  .catalog-hero__hint {
    max-width: 18rem;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.9;
  }

  .catalog-hero__metrics {
    max-width: 220px;
    gap: 8px;
  }

  .metric-card--subtle {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .metric-card--subtle span {
    font-size: 10px;
  }

  .metric-card--subtle strong {
    font-size: 14px;
  }

  .catalog-home-tabs {
    gap: 6px;
    padding: 4px;
    border-radius: 18px;
    background: rgba(19, 63, 111, 0.06);
  }

  .catalog-home-tab {
    min-height: 44px;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
  }

  .catalog-home-tab.is-active {
    background: var(--surface-card-strong);
    color: var(--brand);
    box-shadow: 0 8px 20px rgba(19, 63, 111, 0.12);
  }

  .catalog-tile-group {
    gap: 12px;
    padding: 14px;
    border-radius: var(--mobile-radius-xl);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 253, 0.96));
    box-shadow: 0 16px 36px rgba(19, 63, 111, 0.08);
  }

  .catalog-tile-group__head h3 {
    font-size: 18px;
  }

  .catalog-tile-group__head p {
    font-size: 12px;
    line-height: 1.5;
  }

  .catalog-tile-grid {
    gap: 10px;
  }

  .catalog-tile-grid--name {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-series--name-tile,
  .catalog-series--legend-tile {
    border-radius: 22px;
    overflow: hidden;
  }

  .catalog-series--name-tile {
    min-height: 56px;
    aspect-ratio: 2 / 1;
  }

  .catalog-series--legend-tile {
    min-height: 156px;
    aspect-ratio: 1 / 1.06;
  }

  .catalog-series-tile__body {
    align-content: end;
    justify-items: start;
    gap: 4px;
    padding: 12px 10px 14px;
    background: linear-gradient(180deg, transparent 24%, rgba(17, 30, 44, 0.08) 100%);
  }

  .catalog-series--name-tile .catalog-series-tile__body {
    align-content: center;
    gap: 2px;
    padding: 8px 34px 16px 10px;
    background: linear-gradient(180deg, transparent 18%, rgba(17, 30, 44, 0.06) 100%);
  }

  .catalog-series--name-tile .catalog-legend-tile__footer--name {
    left: auto;
    right: 5px;
    bottom: 5px;
    width: auto;
    max-width: calc(100% - 10px);
  }

  .catalog-series--name-tile .catalog-legend-tile__footer--name .catalog-legend-tile__meta {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    min-width: 20px;
    min-height: 16px;
    padding: 0 4px 1px;
    font-size: 7px;
    line-height: 1;
    border-radius: 999px;
    background: rgba(19, 63, 111, 0.08);
    color: var(--brand);
    border: 1px solid rgba(19, 63, 111, 0.1);
    box-shadow: none;
    letter-spacing: 0.01em;
  }

  .catalog-series--name-tile .catalog-legend-tile__count-value {
    font-size: 1em;
    font-weight: 800;
  }

  .catalog-series--name-tile .catalog-legend-tile__count-unit {
    font-size: 0.6em;
    transform: none;
    opacity: 0.78;
  }

  .catalog-series-tile__body h3 {
    font-size: clamp(12px, 4.4vw, 16px);
    line-height: 1.04;
  }

  .catalog-series--name-tile .catalog-series-tile__body h3 {
    font-size: clamp(11px, 3.5vw, 14px);
    line-height: 1.02;
  }

  .catalog-legend-tile__media {
    padding: 18px 8px 20px;
  }

  .catalog-legend-tile__name,
  .catalog-legend-tile__meta {
    font-size: 9px;
  }

  .catalog-series {
    padding: 16px;
    border-radius: var(--mobile-radius-xl);
    box-shadow: 0 16px 34px rgba(19, 63, 111, 0.08);
  }

  .catalog-series__head {
    gap: 10px;
    align-items: start;
  }

  .catalog-series__intro h3 {
    margin-top: 4px;
    font-size: 24px;
    line-height: 1.08;
  }

  .catalog-series__intro p {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
  }

  .catalog-series__side {
    gap: 8px;
  }

  .catalog-series__stats {
    gap: 6px;
  }

  .catalog-series__stats span {
    min-height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .catalog-series__accordion-hint {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .catalog-series__body.is-expanded {
    margin-top: 12px;
  }

  .catalog-mobile-panel {
    gap: 12px;
  }

  .catalog-mobile-tools {
    gap: 8px;
    padding: 12px;
    border-radius: var(--mobile-radius-lg);
    background: rgba(19, 63, 111, 0.05);
  }

  .catalog-mobile-tools__copy {
    font-size: 12px;
    line-height: 1.45;
  }

  .catalog-mobile-tools__actions {
    gap: 8px;
  }

  .catalog-mobile-tools__actions button,
  .catalog-table-actions button,
  .catalog-modal-head-actions button,
  .legend-products-actions button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
  }

  .catalog-series-compare-float {
    left: 14px;
    right: 14px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    transform: none;
  }

  .catalog-series-compare-float__bar {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: var(--mobile-radius-lg);
  }

  .catalog-series-compare-float__bar button {
    min-width: 0;
    padding: 0 12px;
  }

  .catalog-mobile-table-frame,
  .catalog-mobile-table-shell {
    border-radius: var(--mobile-radius-lg);
  }

  .catalog-mobile-table-head-shell {
    border-radius: var(--mobile-radius-lg) var(--mobile-radius-lg) 0 0;
    backdrop-filter: blur(10px);
  }

  .catalog-mobile-table-shell--body {
    border-radius: 0 0 var(--mobile-radius-lg) var(--mobile-radius-lg);
  }

  .catalog-mobile-table th,
  .catalog-mobile-table td {
    padding: 10px 10px;
    font-size: 12.5px;
  }

  .catalog-mobile-model-cell {
    min-width: 128px;
  }

  .catalog-mobile-model-wrap {
    gap: 8px;
  }

  .catalog-mobile-model-wrap .catalog-row-model {
    font-size: 14px;
    line-height: 1.2;
  }

  .modal-dialog {
    border-radius: 0;
    background: var(--paper-strong);
  }

  .modal-close {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: 14px;
    margin: 0;
    width: 44px;
    height: 44px;
    z-index: 148;
    transform: none;
  }

  .modal-body {
    padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 24px);
  }

  .catalog-modal-head {
    display: grid;
    gap: 10px;
  }

  .catalog-modal-head h3 {
    margin: 4px 0 0;
    font-size: 24px;
    line-height: 1.12;
  }

  .catalog-modal-head p {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
  }

  .catalog-alias-note {
    margin-top: 6px;
    font-size: 12px;
  }

  .catalog-modal-head-actions {
    justify-content: flex-start;
    gap: 8px;
  }

  .catalog-modal-chip {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .catalog-series-modal {
    gap: 14px;
    margin-top: 14px;
  }

  .catalog-legend-strip {
    gap: 10px;
    padding-bottom: 6px;
  }

  .catalog-legend {
    flex: 0 0 118px;
    min-width: 118px;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(19, 63, 111, 0.04);
  }

  .catalog-legend img,
  .catalog-legend__empty {
    height: 132px;
  }

  .catalog-legend__meta {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-legend-spotlight,
  .catalog-detail,
  .compare-panel,
  .similar-panel,
  .legend-products-panel,
  .compare-picker,
  .compare-legend-showcase {
    padding: 14px;
    border-radius: 22px;
  }

  .catalog-legend-spotlight__head,
  .compare-panel__head,
  .similar-panel__head,
  .legend-products-panel__head {
    display: grid;
    gap: 8px;
  }

  .catalog-legend-spotlight__title,
  .compare-panel__head h4,
  .similar-panel__head h4,
  .legend-products-panel__head h4 {
    font-size: 16px;
  }

  .catalog-legend-spotlight__tip,
  .compare-panel__head p,
  .similar-panel__head p,
  .legend-products-panel__head p {
    font-size: 12px;
    line-height: 1.45;
  }

  .catalog-detail-table {
    table-layout: auto;
  }

  .catalog-detail-col-label,
  .catalog-detail-table th {
    width: 96px;
    font-size: 12px;
  }

  .catalog-detail-table td {
    font-size: 13px;
    word-break: break-word;
  }

  .compare-chip-list {
    gap: 8px;
    padding-bottom: 6px;
  }

  .compare-chip,
  .compare-chip--adder {
    min-height: 38px;
  }

  .chip-main,
  .chip-remove {
    padding: 7px 10px;
  }

  .compare-panel--standalone {
    padding: 16px;
  }

  .compare-panel--standalone .compare-col-field,
  .compare-col-field {
    width: 88px;
  }

  .compare-panel--standalone .compare-col-product,
  .compare-col-product {
    width: 140px;
  }

  .compare-table th,
  .compare-table td,
  .similar-table th,
  .similar-table td {
    padding: 8px;
    font-size: 12px;
  }

  body.mobile-search-docked .global-toolbar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 14px;
    left: auto;
    width: 56px;
    max-width: 56px;
    min-height: 56px;
    margin: 0;
    z-index: 146;
    transform: translateZ(0);
  }

  body.modal-open .global-toolbar::before {
    display: none;
  }

  body.modal-open .global-toolbar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 14px;
    right: 66px;
    width: auto;
    max-width: none;
    min-height: 56px;
    margin: 0;
    z-index: 146;
    transform: translateZ(0);
  }

  body.mobile-search-docked .global-search {
    width: 56px;
    max-width: 56px;
  }

  body.modal-open .global-search {
    position: relative;
    width: 100%;
    max-width: none;
  }

  body.mobile-search-docked .global-search__toggle {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  body.modal-open .global-search__toggle {
    top: 7px;
    left: 7px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
    box-shadow: none;
  }

  body.mobile-search-docked .global-search.is-expanded,
  body.mobile-search-docked .global-search:focus-within,
  body.modal-open .global-search {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 14px;
    right: 66px;
    width: auto;
    max-width: none;
    margin: 0;
    z-index: 147;
  }

  body.mobile-search-docked .global-search.is-expanded .global-search__toggle,
  body.mobile-search-docked .global-search:focus-within .global-search__toggle {
    top: 7px;
    left: 7px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
    box-shadow: none;
  }

  body.mobile-search-docked .global-search.is-expanded input,
  body.mobile-search-docked .global-search:focus-within input,
  body.modal-open .global-search input {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 58px;
    border-color: rgba(19, 63, 111, 0.38);
    border-radius: 18px;
    box-shadow:
      0 0 0 1px rgba(19, 63, 111, 0.14),
      0 14px 30px rgba(19, 63, 111, 0.14);
    text-align: left;
  }

  body.mobile-search-docked .global-search:not(.is-expanded):not(:focus-within) input {
    opacity: 0;
    pointer-events: none;
    width: 56px;
    padding: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: translateX(-8px) scale(0.96);
  }

  body.mobile-search-docked .global-search:not(.is-expanded):not(:focus-within) .global-search__clear {
    opacity: 0;
    pointer-events: none;
  }

  body.modal-open .global-search input {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    border-color: rgba(19, 63, 111, 0.38);
    background: var(--surface-card-strong);
    box-shadow:
      0 0 0 1px rgba(19, 63, 111, 0.14),
      0 14px 30px rgba(19, 63, 111, 0.14);
  }

  body.theme-dark .global-search input,
  body.theme-dark.mobile-search-docked .global-search.is-expanded input,
  body.theme-dark.mobile-search-docked .global-search:focus-within input,
  body.theme-dark.modal-open .global-search input {
    border-color: rgba(150, 190, 233, 0.68);
    box-shadow:
      0 0 0 1px rgba(150, 190, 233, 0.24),
      0 14px 30px rgba(6, 12, 20, 0.34);
  }

  body.modal-open .global-search__clear {
    right: 9px;
  }

  body.mobile-search-docked .global-toolbar .search-results,
  body.modal-open .global-toolbar .search-results {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 70px);
    left: 14px;
    right: 14px;
    width: auto;
    transform: none;
  }

  body.modal-open .modal-dialog {
    margin-top: 0;
    max-height: 100dvh;
    padding-top: calc(env(safe-area-inset-top, 0px) + 68px);
  }

  body.modal-open .modal-body {
    padding-top: 8px;
  }
}

@media (max-width: 420px) {
  .catalog-home-tab {
    font-size: 14px;
  }

  .catalog-series--name-tile {
    min-height: 52px;
  }

  .catalog-series--legend-tile {
    min-height: 146px;
  }

  .catalog-series__intro h3,
  .catalog-modal-head h3 {
    font-size: 22px;
  }
}

@media (max-width: 760px) {
  .catalog-tile-grid--name .catalog-series--name-tile,
  .catalog-tile-grid--name .catalog-series--name-tile.catalog-series--mobile {
    height: 72px;
    min-height: 72px;
    aspect-ratio: auto;
  }

  .catalog-tile-grid--name .catalog-series--name-tile .catalog-series-tile__body,
  .catalog-tile-grid--name .catalog-series--name-tile.catalog-series--mobile .catalog-series-tile__body {
    gap: 2px;
    padding: 8px 10px;
    align-content: center;
  }

  .catalog-tile-grid--name .catalog-series--name-tile .catalog-series-tile__body h3,
  .catalog-tile-grid--name .catalog-series--name-tile.catalog-series--mobile .catalog-series-tile__body h3 {
    font-size: clamp(11px, 3.4vw, 14px);
    line-height: 1.02;
  }
}
