:root {
  color-scheme: light;

  /* Brand Deep Forest Master Palette */
  --brand: #004c3f;
  --brand-hover: #075f4f;
  --brand-active: #00382e;
  --brand-soft: #eaf4f0;
  --brand-soft-border: #b6dcd0;
  --brand-glow: rgba(0, 76, 63, 0.12);
  --brand-text: #ffffff;

  /* Ink & Typography Palette */
  --ink: #0b1511;
  --ink-secondary: #22332c;
  --ink-tertiary: #475a51;
  --muted: #647a70;
  --muted-light: #90a59c;

  /* Backgrounds & Surfaces */
  --paper: #f0f4f2;
  --surface: #ffffff;
  --surface-subtle: #f7faf8;
  --surface-sunken: #e9f0ec;
  --surface-hover: #e5ede8;
  --header-bg: #ffffff;
  --header-border: #d4e0da;

  /* Lines & Borders */
  --line: #d8e4de;
  --line-subtle: #e5ede8;
  --line-strong: #bacdc4;
  /* Functional Accents */
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;

  /* Shadows (crisp, subtle, professional) */
  --shadow-xs: 0 1px 2px rgba(11, 21, 17, 0.04);
  --shadow-sm: 0 1px 3px rgba(11, 21, 17, 0.05), 0 1px 2px rgba(11, 21, 17, 0.03);
  --shadow-md: 0 4px 14px -2px rgba(11, 21, 17, 0.06), 0 2px 6px -1px rgba(11, 21, 17, 0.04);
  --shadow-xl: 0 20px 48px -8px rgba(11, 21, 17, 0.12), 0 8px 20px -4px rgba(11, 21, 17, 0.06);
  --shadow-card-hover: 0 8px 30px -4px rgba(13, 95, 77, 0.14), 0 4px 12px -2px rgba(11, 21, 17, 0.06);

  /* Shared surface radii: restrained, but visibly intentional across viewports. */
  --radius-sharp: 4px;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #22b594;
  --brand-hover: #1aa082;
  --brand-active: #158b71;
  --brand-soft: #0d2820;
  --brand-soft-border: #184c3d;
  --brand-glow: rgba(34, 181, 148, 0.15);
  --brand-text: #ffffff;

  --ink: #f4fdf8;
  --ink-secondary: #cde2d7;
  --ink-tertiary: #92b0a1;
  --muted: #809c8e;
  --muted-light: #526b5e;

  --paper: #08110d;
  --surface: #101c17;
  --surface-subtle: #13211b;
  --surface-sunken: #0b1511;
  --surface-hover: #182b23;
  --header-bg: #0c1612;
  --header-border: #182a22;

  --line: #1a2d24;
  --line-subtle: #14231c;
  --line-strong: #274336;
  --amber: #f59e0b;
  --amber-soft: #2e1d05;
  --danger: #ef4444;
  --danger-soft: #300e0e;
  --danger-border: #5a1a1a;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 24px 56px -8px rgba(0, 0, 0, 0.85);
  --shadow-card-hover: 0 8px 30px -4px rgba(34, 181, 148, 0.22), 0 4px 16px -2px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
.site-footer {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--ink-tertiary);
  font-size: 12px;
  text-align: center;
}
.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  color: inherit;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.site-footer a::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
  content: "";
}
.site-footer a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* SVG Icons */
.svg-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.svg-icon-sm { width: 14px; height: 14px; }
.svg-icon-md { width: 18px; height: 18px; }
.svg-icon-lg { width: 22px; height: 22px; }

/* Top Announcement & Header Container */
.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(280px, 460px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2)) 0 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--shadow-xs);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 4px 24px 4px max(24px, calc((100vw - 1320px) / 2));
  background: #ffffff;
  text-decoration: none;
  height: 100%;
}

.brand-logo {
  width: 163px;
  height: 64px;
  flex: 0 0 auto;
  object-fit: contain;
}

.header-search-slot { width: 100%; }

/* Navigation Bar */
#primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  overflow-x: auto;
}
#primary-nav a,
#primary-nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--ink-secondary);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}
#primary-nav a:hover,
#primary-nav button:hover {
  color: var(--brand);
  background: var(--brand-soft);
}
#primary-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand-soft-border);
  font-weight: 800;
}
.nav-count-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 6px;
  border: 1px solid transparent !important;
  border-radius: var(--radius-xs);
  color: var(--muted) !important;
  background: transparent !important;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.theme-toggle-btn:hover {
  color: var(--brand) !important;
  background: var(--brand-soft) !important;
}
.account-button,
.login-link {
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}
.account-button:hover,
.login-link:hover {
  border-color: var(--brand-soft-border) !important;
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

/* App Main Stage */
#app {
  width: min(1320px, calc(100vw - 48px));
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: 24px 0 80px;
  outline: none;
}

/* ==========================================================================
   Home Editorial Layout & Hero Banner (Brand Presentation & Selection Aside)
   ========================================================================== */
.home-editorial-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-masthead {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(350px, 2fr);
  min-height: 344px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: #004c3f;
}

.home-masthead-image {
  position: relative;
  min-height: 344px;
  overflow: hidden;
  background: #16342a;
}

.home-masthead-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 36%;
}

.home-masthead-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 42px 32px;
  background: #004c3f;
  color: #ffffff;
}

.home-masthead-kicker {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.home-masthead-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.home-masthead-scope {
  margin: 16px 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.home-masthead-action {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid #ffffff;
  border-radius: var(--radius-xs);
  background: #ffffff;
  color: #004c3f;
  font-size: 13px;
  font-weight: 850;
}

.home-masthead-action:hover,
.home-masthead-action:focus-visible {
  background: #edf7f3;
}

.home-masthead-action:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.48);
  outline-offset: 3px;
}

.home-masthead-permit {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.55;
}

/* ==========================================================================
   Editorial Animal Mosaic Grid (Asymmetric Editorial Photo Showcase)
   ========================================================================== */
.editorial-mosaic-section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 28px;
  align-items: start;
}

.mosaic-intro-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 6px 0 0;
}

.editorial-rail-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editorial-col-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}

.editorial-col-desc {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.editorial-action-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--brand);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 14px;
  transition: transform var(--transition-fast);
}

.editorial-action-link:hover {
  transform: translateX(3px);
}

.mosaic-grid-col {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
  gap: 8px;
  min-height: 290px;
}

.mosaic-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mosaic-card {
  position: relative;
  width: 100%;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  background: #0b1511;
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.mosaic-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-soft-border);
  box-shadow: var(--shadow-card-hover);
}

.mosaic-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease-out;
}

.mosaic-card:hover img {
  transform: scale(1.018);
}

.mosaic-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: rgba(11, 21, 17, 0.78);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mosaic-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.mosaic-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.mosaic-link {
  font-size: 10.5px;
  font-weight: 700;
  color: #3ee0bb;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  transition: transform var(--transition-fast);
}

.mosaic-card:hover .mosaic-link {
  transform: translateX(3px);
}

/* ==========================================================================
   Editorial Featured Products (Catalog Grid)
   ========================================================================== */
.editorial-catalog-section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  align-items: start;
}

.catalog-intro-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 6px 0 0;
}

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

.catalog-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.catalog-product-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.product-card-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  height: 20px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 0 0 var(--radius-xs) 0;
  letter-spacing: 0.04em;
  background: var(--brand);
  color: #ffffff;
}

.product-media-wrap {
  position: relative;
  width: 100%;
  height: 164px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-subtle);
  padding: 12px;
  border-bottom: 1px solid var(--line-subtle);
}

.product-media-wrap .media-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-media-wrap img {
  max-width: 130px;
  max-height: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease-out;
}

.catalog-product-card:hover .product-media-wrap img {
  transform: scale(1.02);
}

.product-info-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 4px;
  padding: 11px 12px 12px;
}

.product-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  min-height: 35px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.product-sku-hint {
  font-size: 11px;
  color: var(--muted);
}

.product-purpose,
.product-match-snippet {
  display: -webkit-box;
  margin: 1px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ink-secondary);
  font-size: 10.5px;
  line-height: 1.45;
}

.product-purpose {
  padding-left: 7px;
  border-left: 2px solid var(--brand-soft-border);
}

.product-match-reason {
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.product-match-snippet { color: var(--ink-tertiary); }

.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.product-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--brand);
  font-weight: 800;
  font-size: 11px;
  transition: transform var(--transition-fast);
}

.catalog-product-card:hover .product-view-btn {
  transform: translateX(2px);
}

@media (max-width: 1100px) {
  .home-masthead { grid-template-columns: minmax(0, 1.45fr) minmax(330px, 1fr); }
  .editorial-mosaic-section,
  .editorial-catalog-section {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .catalog-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header {
    grid-template-columns: 1fr;
    padding: 10px 16px;
    min-height: auto;
  }
  .brand {
    padding: 10px 14px;
    border-radius: var(--radius-xs);
  }
  .home-masthead { grid-template-columns: 1fr; }
  .home-masthead-image { min-height: 240px; }
  .home-masthead-copy { padding: 30px 32px; }
  .mosaic-grid-col {
    grid-template-columns: 1fr;
  }
}

/* Category Filtered View Breadcrumb & Top Bar */
.category-view-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.back-to-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.back-to-home-btn:hover {
  border-color: var(--brand-soft-border);
  background: var(--brand-soft);
}

/* Global Search Bar */
.catalog-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}
.search-icon-prefix {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}
.catalog-search input {
  width: 100%;
  min-height: 38px;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink);
  background: var(--surface);
  font-size: 13.5px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.catalog-search input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 2px var(--brand-glow);
}
.catalog-search .button.search-button {
  min-height: 38px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  background: var(--brand);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.catalog-search .button.search-button:hover {
  background: var(--brand-hover);
}
.catalog-search .clear-button {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
}

/* Taxonomy / Animal Categories */
.taxonomy-mobile-toggle {
  display: none;
}

.catalog-taxonomy {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.group-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
}
.button.group-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink-secondary);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.button.group-filter:last-child { border-right: 0; }
.button.group-filter:hover {
  color: var(--brand);
  background: var(--surface-hover);
}
.button.group-filter.active {
  color: var(--brand);
  background: var(--surface);
  font-weight: 800;
  box-shadow: inset 0 -3px 0 var(--brand);
}

.series-panel {
  min-height: 0;
  padding: 14px 16px 16px;
  background: var(--surface);
}
.series-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.series-panel-heading strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.series-panel-heading span {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-border);
  font-size: 12px;
  font-weight: 700;
}
.series-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.series-filter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  text-align: left;
  background: var(--surface-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.series-filter strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.series-filter small {
  color: var(--muted);
  font-size: 11px;
}
.series-filter:hover {
  color: var(--brand);
  border-color: var(--brand-soft-border);
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.series-filter.active {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 800;
}
.series-empty { margin: 20px 0; color: var(--muted); text-align: center; font-size: 14px; }

/* Catalog Main & Aside Layout */
.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}
.catalog-main { min-width: 0; }

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.section-title h1, .section-title h2, .section-title p { margin: 0; }
.section-title h1, .section-title h2 { font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.section-title p, .muted { color: var(--muted); }
.section-title p { margin-top: 5px; font-size: 13px; line-height: 1.5; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.product-grid .catalog-product-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 840px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Product Card (High-End PRO) */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-soft-border);
  box-shadow: var(--shadow-card-hover);
}
.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: auto;
  text-decoration: none;
  color: inherit;
}
.product-grid .product-media-wrap {
  position: relative;
  width: 100%;
  height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sunken);
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.product-grid .product-media-wrap .media-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.product-grid .product-media-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: transform var(--transition-smooth);
}
.product-grid .catalog-product-card:hover .product-media-wrap img {
  transform: scale(1.04);
}
.product-grid .product-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--brand-soft-border);
  box-shadow: var(--shadow-xs);
}
.product-grid .product-info-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 6px;
  padding: 11px 12px 12px;
}
.product-grid .product-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}
.product-grid .catalog-product-card:hover .product-title {
  color: var(--brand);
}
.product-grid .product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.product-grid .product-sku-hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.product-grid .product-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
  opacity: 0.85;
  transition: transform var(--transition-fast);
}
.product-grid .catalog-product-card:hover .product-view-btn {
  opacity: 1;
  transform: translateX(2px);
}

mark {
  padding: 0 1px;
  border-radius: 3px;
  color: inherit;
  background: var(--amber-soft);
}
.product-card-actions {
  display: flex;
  min-height: 56px;
  align-items: center;
  padding: 6px 10px 10px;
  border-top: 1px solid var(--line-subtle);
  background: var(--surface);
}
.button.product-quick-add { width: 100%; min-height: 40px; padding: 7px 10px; font-size: 12px; }
.batch-product-choice {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--brand-soft-border);
  border-radius: var(--radius-md);
  color: var(--brand);
  background: var(--brand-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.batch-product-choice input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }
.batch-product-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.media-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.media-frame .fallback {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.media-fallback-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  padding: 14px 10px;
  background: var(--surface-subtle);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  user-select: none;
  box-sizing: border-box;
}

.fallback-icon-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 2px;
}

.fallback-icon-ring svg {
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

.fallback-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.fallback-subtitle {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.2;
}

:root[data-theme="dark"] .media-fallback-card {
  background: var(--surface-sunken);
  border-color: var(--brand-soft-border);
}

:root[data-theme="dark"] .fallback-icon-ring {
  background: var(--surface);
  border-color: var(--brand-soft-border);
  color: var(--brand);
}

.detail-media-stage .media-fallback-card {
  padding: 28px 16px;
  gap: 10px;
  border-radius: var(--radius-lg);
}
.detail-media-stage .fallback-icon-ring {
  width: 56px;
  height: 56px;
}
.detail-media-stage .fallback-icon-ring svg {
  width: 28px;
  height: 28px;
}
.detail-media-stage .fallback-title {
  font-size: 15px;
}
.detail-media-stage .fallback-subtitle {
  font-size: 12px;
}

.selection-item-media .media-fallback-card {
  padding: 4px;
  gap: 2px;
  border-radius: var(--radius-xs);
}
.selection-item-media .fallback-icon-ring {
  width: 26px;
  height: 26px;
  margin-bottom: 0;
}
.selection-item-media .fallback-icon-ring svg {
  width: 14px;
  height: 14px;
}
.selection-item-media .fallback-title {
  font-size: 10px;
  font-weight: 500;
}
.selection-item-media .fallback-subtitle {
  display: none;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 32px 0 16px;
}
.catalog-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.catalog-heading-row > .section-title { margin-bottom: 18px; }
.catalog-batch-toolbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}
.catalog-batch-toolbar.active {
  padding: 6px;
  border: 1px solid var(--brand-soft-border);
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
}
.catalog-batch-toolbar > span { color: var(--ink-secondary); font-size: 12px; white-space: nowrap; }
.catalog-batch-toolbar > span strong { color: var(--brand); }
.catalog-batch-toolbar .button { min-height: 40px; padding: 7px 12px; }
.catalog-empty-state { display: grid; justify-items: start; gap: 8px; }
.catalog-empty-state p { margin: 0; }
.catalog-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.recent-viewed-section {
  min-height: 56vh;
  padding: 12px 0 48px;
}
.recent-viewed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.recent-viewed-heading h1,
.recent-viewed-heading p { margin: 0; }
.recent-viewed-heading h1 { font-size: 28px; font-weight: 900; letter-spacing: -0.035em; }
.recent-viewed-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.recent-viewed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.recent-viewed-status > .muted { margin: 0; }
.recent-viewed-loading { display: grid; min-height: 180px; place-items: center; }
.recent-viewed-loading p { margin: 0; }
.recent-viewed-empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 9px;
  text-align: center;
}
.recent-viewed-empty h2,
.recent-viewed-empty p { margin: 0; }
.recent-viewed-empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.recent-viewed-empty .button { margin-top: 8px; }

/* Sidebar Selection Summary Card (Desktop) */
.catalog-aside { position: sticky; top: 100px; }
.selection-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.selection-summary-desktop { padding: 20px; }
.selection-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.selection-summary-heading strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.selection-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.selection-preview {
  display: grid;
  margin: 16px 0;
  border-top: 1px solid var(--line-subtle);
}
.selection-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 13px;
  color: var(--ink-secondary);
}
.selection-preview-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.selection-preview-item small { flex: 0 0 auto; color: var(--muted); font-weight: 700; }
.selection-summary-desktop > .muted { margin: 16px 0; font-size: 13px; }
.selection-summary-totals { margin: 14px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.catalog-selection-mobile { display: none; }

/* Buttons & Interactive Controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-md);
  color: var(--brand-text);
  background: var(--brand);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  transition: all var(--transition-fast);
}
.button:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: 0 4px 12px var(--brand-glow);
}
.button:active {
  background: var(--brand-active);
  transform: scale(0.98);
}
.button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand-glow);
  outline-offset: 2px;
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}
.button.secondary {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
}
.button.secondary:hover {
  color: var(--brand);
  border-color: var(--brand-soft-border);
  background: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}
.button.danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}
.button.danger:hover {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}
.button.block { width: 100%; }
.button.small {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Stepper Component */
.quantity-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 42px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.stepper-btn:hover {
  color: var(--brand);
  background: var(--brand-soft);
}
.quantity-stepper input {
  width: 54px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  font-weight: 800;
  background: transparent;
}
.quantity-stepper input:focus {
  outline: none;
  box-shadow: none;
}

/* Cards & Generic Layout */
.card, .state-card {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.state-card {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 48px 24px;
}
.state-card.error {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}
.list { display: grid; gap: 14px; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 800; color: var(--ink); }
.field small { color: var(--muted); font-size: 12px; }

input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.error-text { margin: 6px 0; color: var(--danger); font-size: 13px; font-weight: 700; }
.success-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid var(--brand-soft-border);
  border-radius: var(--radius-sm);
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
}
.text-link {
  color: var(--brand);
  font-weight: 800;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
}
.count { color: var(--brand); font-weight: 900; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumbs > *:not(:last-child)::after {
  margin-left: 8px;
  color: var(--muted-light);
  content: "/";
}
.breadcrumbs button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}
.breadcrumbs a:hover, .breadcrumbs button:hover { color: var(--brand); }

/* Product Detail Page Layout (PRO Stage) */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(420px, 1.05fr);
  grid-template-areas:
    "media overview"
    "media purchase"
    "media record";
  grid-template-rows: auto auto 1fr;
  gap: 32px;
  align-items: start;
}
.detail-overview { grid-area: overview; }
.detail-media-column {
  grid-area: media;
  position: sticky;
  top: 100px;
  min-width: 0;
}
.detail-purchase { grid-area: purchase; min-width: 0; }
.detail-record { grid-area: record; min-width: 0; }
.detail-media-stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
  box-shadow: var(--shadow-sm);
}
.detail-media-stage > .media-frame,
.detail-main-media .media-frame {
  height: clamp(420px, calc(100vh - 176px), 620px);
  min-height: 420px;
  padding: 24px;
}
.detail-main-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.zoom-label {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.detail-thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding: 2px;
}
.detail-thumbnail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 104px;
  min-height: 104px;
  flex: 0 0 auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.detail-thumbnail:hover { border-color: var(--brand-soft-border); }
.detail-thumbnail[aria-current="true"] {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--brand);
}
.detail-thumbnail .media-frame { width: 100%; height: 68px; background: transparent; }
.thumbnail-caption {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}
.detail-thumbnail[aria-current="true"] .thumbnail-caption {
  color: var(--brand);
}

.product-detail-copy { min-width: 0; padding: 2px 0 24px; }
.detail-labels { display: flex; flex-wrap: wrap; gap: 8px; }
.product-series {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sharp);
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-border);
}
.product-detail-copy > h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.detail-summary {
  margin: 5px 0 0;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.detail-purpose {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--brand-soft);
}
.detail-purpose > span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
}
.detail-quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.detail-quick-facts > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.detail-quick-facts dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.detail-quick-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.detail-data-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--amber-soft);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  background: color-mix(in srgb, var(--amber-soft) 42%, var(--surface));
  font-size: 12px;
  line-height: 1.55;
}
.detail-record > .detail-section:first-child { border-top: 0; }
.detail-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.detail-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.detail-section p { margin: 0 0 10px; line-height: 1.7; font-size: 14px; }

/* Product Facts Structured List */
.product-facts { display: grid; gap: 0; margin: 0; }
.product-fact {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line-subtle);
  font-size: 14px;
}
.product-fact:first-child { padding-top: 4px; border-top: 0; }
.product-fact dt {
  color: var(--brand);
  font-weight: 800;
  line-height: 1.7;
}
.product-fact dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-secondary);
  line-height: 1.7;
  white-space: pre-line;
}
.detail-copy { white-space: pre-line; font-size: 14px; color: var(--ink-secondary); line-height: 1.7; }

/* SKU Selection Option Cards */
.sku-list { display: flex; flex-wrap: wrap; gap: 10px; }
.sku-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 150px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sku-option:hover {
  border-color: var(--brand-soft-border);
  background: var(--brand-soft);
}
.sku-option:has(input:checked) {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}
.sku-option input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--brand);
}
.sku-option span { display: grid; gap: 2px; }
.sku-option strong { font-size: 14px; font-weight: 800; }
.sku-option small { color: var(--muted); font-size: 12px; }

/* Detail Add-to-Selection Panel */
.detail-add-panel {
  display: grid;
  grid-template-columns: 132px 140px minmax(180px, 1fr) 86px;
  align-items: end;
  gap: 10px;
  margin: 2px 0 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
  box-shadow: var(--shadow-sm);
}
.detail-share-button { min-height: 48px; border-color: var(--brand); color: var(--brand); }
.detail-primary-specs { margin: -6px 0 4px; color: var(--ink-secondary); font-size: 13px; font-weight: 700; }
.detail-related-link { width: fit-content; margin-top: 8px; }
.detail-quantity-field { display: grid; gap: 6px; }
.detail-quantity-field label { color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-add-button {
  min-height: 48px;
  padding-inline: 14px;
  border-radius: var(--radius-md);
}
.detail-selection-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 86px;
  min-height: 48px;
  padding: 4px 8px;
  border: 1px solid var(--brand-soft-border);
  border-radius: var(--radius-md);
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 11px;
  font-weight: 800;
  transition: all var(--transition-fast);
}
.detail-selection-link:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.detail-selection-link strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--brand-text);
  background: var(--brand);
  font-size: 11px;
}

/* Lightbox Modal */
.lightbox {
  width: min(1040px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }
.lightbox-content { position: relative; width: 100%; height: 100%; padding: 24px; }
.lightbox-content .media-frame {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  place-items: start;
}
.lightbox-content .media-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin-inline: auto;
}
.lightbox-close { position: absolute; z-index: 2; top: 16px; right: 16px; }

.sku-picker-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-xl);
  color: var(--ink);
  background: transparent;
  box-shadow: var(--shadow-xl);
}
.sku-picker-dialog::backdrop { background: rgba(3, 16, 12, 0.62); backdrop-filter: blur(2px); }
.sku-picker-card { display: grid; gap: 16px; padding: 20px; background: var(--surface); }
.sku-picker-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.sku-picker-heading small { color: var(--brand); font-weight: 800; }
.sku-picker-heading h2 { margin: 2px 0 0; font-size: 20px; }
.sku-picker-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sku-picker-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* Selection, Inbox, Draft Items */
.selection-item, .inbox-item, .draft-item {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.selection-item h3, .inbox-item h3, .draft-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.selection-page-heading {
  align-items: center;
  margin-bottom: 14px;
}
.selection-workspace {
  display: grid;
  gap: 18px;
  align-items: start;
}
.selection-list { gap: 10px; }
.selection-list .selection-item {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 8px 16px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
}
.selection-list .selection-item h3 {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.4;
}
.selection-item-media {
  grid-column: 1;
  grid-row: 1;
  width: 72px;
  height: 72px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.selection-item-media .media-frame { width: 100%; height: 100%; }
.selection-item-copy { display: grid; grid-column: 2; grid-row: 1; align-content: center; gap: 7px; min-width: 0; }
.selection-item-copy > a:hover h3 { color: var(--brand); }
.selection-item-spec { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.selection-item-spec > label { color: var(--muted); font-size: 11px; font-weight: 700; }
.selection-item-spec select { min-width: 0; min-height: 40px; padding: 7px 30px 7px 9px; }
.selection-item-actions {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  grid-template-columns: 96px auto;
  align-items: end;
  justify-content: end;
  gap: 8px;
}
.selection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.selection-toolbar .button { min-height: 42px; padding: 8px 13px; }
.selection-warning {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #f2cf83;
  border-radius: var(--radius-md);
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 12px;
  font-weight: 700;
}
.selection-item-quantity { gap: 4px; }
.selection-item-quantity label { color: var(--muted); font-size: 11px; line-height: 1.2; }
.selection-item-quantity input {
  width: 96px;
  min-height: 44px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 800;
}
.button.selection-remove-button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 12px;
}
.selection-auth-card,
.selection-form {
  gap: 12px;
  margin: 0;
  padding: 18px;
}
.selection-auth-card h2,
.selection-auth-card p { margin: 0; }
.selection-auth-card h2 { font-size: 18px; line-height: 1.35; }
.selection-auth-card p { font-size: 13px; line-height: 1.6; }
.selection-form > .section-title { margin-bottom: 2px; }
.selection-form .form-grid { gap: 12px; }
.selection-form .field { gap: 5px; }
.selection-form .error-text:empty { display: none; }
.inbox-item:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.totals {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-border);
}
.totals .final {
  padding-top: 12px;
  border-top: 1px solid var(--brand-soft-border);
  font-size: 20px;
  font-weight: 900;
  color: var(--brand);
}

.report-text {
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  white-space: pre-wrap;
  background: var(--surface-subtle);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}
.report-image-pages { display: grid; gap: 20px; }
.report-image-page { margin: 0; display: grid; gap: 12px; justify-items: start; }
.report-image-page img {
  display: block;
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}
.report-image-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Auth Layout */
.auth-layout {
  display: grid;
  gap: 18px;
  width: min(480px, 100%);
  margin: clamp(24px, 6vh, 60px) auto 0;
}
.auth-card {
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
}
.auth-card h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.demo-card {
  padding: 18px;
  border: 1px dashed var(--amber);
  border-radius: var(--radius-lg);
  color: var(--amber);
  background: var(--amber-soft);
}
.demo-card p { margin: 0; line-height: 1.5; font-size: 13px; }
.demo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }

.account-summary { display: flex; align-items: center; gap: 16px; }
.account-summary p { margin: 4px 0 0; }
.assignment-card h2 { margin: 0 0 6px; }
.assignment-status {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
}
.assignment-status p { margin: 0; }
.assignment-pending { color: var(--amber); font-weight: 700; }
.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  color: var(--brand-text);
  background: var(--brand);
  font-size: 22px;
  font-weight: 900;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  background: #0f1c16;
  border: 1px solid #233e32;
  box-shadow: var(--shadow-xl);
  font-size: 14px;
  font-weight: 700;
}
.toast:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 14px; }
.toast-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.toast-actions a,
.toast-actions button {
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.toast-actions a:hover,
.toast-actions button:hover { background: rgba(255, 255, 255, 0.12); }
.quantity { display: grid; grid-template-columns: 1fr 90px auto; align-items: end; gap: 8px; }

/* Responsive Media Queries */
@media (max-width: 1180px) {
  .site-header { grid-template-columns: minmax(280px, 380px) minmax(240px, 1fr) auto; }
  .hero-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .series-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 721px) {
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .form-grid .wide { grid-column: 1 / -1; }
}

@media (min-width: 721px) and (max-width: 959px) {
  .site-header {
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 8px 12px;
    min-height: auto;
    padding: 0 16px 10px 0;
  }
  .brand { min-height: 72px; }
  .header-search-slot {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 16px;
  }
  #primary-nav {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
}

@media (min-width: 960px) {
  .selection-workspace {
    grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
    gap: 20px;
  }
  .selection-workspace > .selection-auth-card,
  .selection-workspace > .selection-form {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 959px) {
  .detail-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "overview"
      "media"
      "purchase"
      "record";
    grid-template-rows: auto;
  }
  .detail-media-column { position: static; }
}

@media (max-width: 880px) {
  .editorial-mosaic-section,
  .editorial-catalog-section { grid-template-columns: 1fr; }
  .catalog-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .catalog-layout > .catalog-aside { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-media-column { position: static; }
}

@media (max-width: 720px) {
  .toast { bottom: calc(152px + env(safe-area-inset-bottom)); }
  .button.small { min-height: 44px; }

  html {
    scroll-padding-bottom: 180px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  .site-footer { padding-bottom: calc(152px + env(safe-area-inset-bottom)); }
  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
    padding: max(8px, env(safe-area-inset-top)) 12px 10px;
    box-shadow: 0 1px 0 var(--header-border);
  }
  .brand {
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 2px 8px;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .brand-logo { width: 144px; height: 52px; }
  .header-search-slot:empty { display: none; }

  .catalog-search { gap: 8px; }
  .catalog-search input,
  .catalog-search .button.search-button,
  .catalog-search .clear-button {
    min-height: 44px;
    height: 44px;
  }
  .catalog-search input { padding-left: 40px; font-size: 13px; }
  .catalog-search .button.search-button { padding: 0 17px; }

  #primary-nav {
    position: fixed;
    z-index: 60;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 10px;
    justify-content: space-around;
    overflow: visible;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-xl);
  }
  #primary-nav a, #primary-nav button {
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 50px;
    gap: 2px;
    padding: 5px 3px;
    overflow: hidden;
    border-radius: 14px;
    font-size: 10.5px;
    line-height: 1.15;
    text-overflow: ellipsis;
    justify-content: center;
  }
  #primary-nav .svg-icon { width: 20px; height: 20px; }
  #primary-nav a[aria-current="page"] { box-shadow: none; }
  .account-button, .login-link { border: 0 !important; background: transparent !important; }
  .theme-toggle-btn { display: none !important; }
  #primary-nav .nav-count-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 7px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 9px;
  }
  #primary-nav a { position: relative; }

  #app {
    width: 100%;
    min-height: calc(100vh - 100px);
    padding: 14px 14px 188px;
  }

  .button,
  input,
  textarea,
  select { border-radius: 12px; }
  .card,
  .state-card {
    margin-bottom: 14px;
    padding: 18px;
    border-radius: 16px;
  }
  .selection-item,
  .inbox-item,
  .draft-item {
    gap: 10px;
    padding: 15px;
    border-radius: 14px;
  }

  /* Mobile reporting selection: dense information without shrinking touch targets. */
  #app.selection-app { padding-bottom: 96px; }
  .selection-page-heading {
    align-items: center;
    margin-bottom: 10px;
  }
  .selection-page-heading h1 { font-size: 21px; line-height: 1.25; }
  .selection-page-heading p { margin-top: 2px; font-size: 11.5px; line-height: 1.35; }
  .selection-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .selection-toolbar .button { width: 100%; min-height: 44px; padding-inline: 8px; font-size: 12px; }
  .selection-workspace { gap: 10px; }
  .selection-list { gap: 8px; }
  .selection-list .selection-item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 12px;
    border-radius: 14px;
  }
  .selection-item-media { width: 58px; height: 58px; }
  .selection-item-copy { grid-column: 2; grid-row: 1; gap: 5px; }
  .selection-list .selection-item h3 {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.4;
  }
  .selection-item-spec { grid-template-columns: 34px minmax(0, 1fr); gap: 5px; }
  .selection-item-spec select { min-height: 44px; font-size: 12px; }
  .selection-item-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(96px, 1fr) auto;
    align-items: end;
    justify-content: stretch;
    gap: 8px;
  }
  .selection-item-quantity { gap: 4px; }
  .selection-item-quantity label { color: var(--muted); font-size: 11px; line-height: 1.2; }
  .selection-item-quantity input {
    width: 84px;
    min-height: 44px;
    padding: 8px 10px;
    appearance: textfield;
    -moz-appearance: textfield;
    text-align: center;
    font-weight: 800;
  }
  .selection-item-quantity input::-webkit-inner-spin-button,
  .selection-item-quantity input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }
  .button.selection-remove-button {
    min-width: 64px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 11px;
  }
  .selection-auth-card,
  .selection-form {
    gap: 10px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 14px;
  }
  .selection-auth-card h2,
  .selection-auth-card p { margin: 0; }
  .selection-auth-card h2 { font-size: 16.5px; line-height: 1.35; }
  .selection-auth-card p { font-size: 11.5px; line-height: 1.55; }
  .selection-auth-card .button { min-height: 44px; font-size: 13px; }
  .selection-form > .section-title { margin: 0; }
  .selection-form > .section-title h2 { font-size: 18px; }
  .selection-form > .section-title p { margin-top: 2px; font-size: 11.5px; line-height: 1.45; }
  .selection-form .form-grid { display: grid; gap: 10px; }
  .selection-form .field { gap: 4px; }
  .selection-form .field label { font-size: 12px; }
  .selection-form input,
  .selection-form textarea { min-height: 44px; padding: 9px 12px; font-size: 13px; }
  .selection-form textarea { min-height: 76px; }
  .selection-form .error-text { margin: 0; }
  .selection-form .error-text:empty { display: none; }
  .selection-list .state-card {
    margin-bottom: 0;
    padding: 28px 16px;
  }
  .selection-list .state-card p { margin: 0 0 12px; }

  .home-masthead {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-bottom: 16px;
    border-radius: 16px;
  }
  .home-masthead-image { min-height: 170px; }
  .home-masthead-copy { padding: 21px 20px 19px; }
  .home-masthead-kicker { margin-bottom: 9px; font-size: 10px; letter-spacing: 0.045em; }
  .home-masthead-copy h1 { font-size: 30px; line-height: 1.12; }
  .home-masthead-scope { margin: 10px 0 16px; font-size: 12.5px; letter-spacing: 0.055em; }
  .home-masthead-action { min-height: 44px; padding: 9px 14px; font-size: 12px; }
  .home-masthead-permit { margin-top: 16px; padding-top: 12px; font-size: 9.5px; }

  .editorial-mosaic-section {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .mosaic-intro-col { padding: 0; }
  .mosaic-intro-col .editorial-rail-top { gap: 0; }
  .mosaic-intro-col .editorial-col-desc,
  .mosaic-intro-col .editorial-action-link { display: none; }
  .mosaic-intro-col .editorial-col-title {
    font-size: 19px;
    line-height: 1.3;
  }
  .mosaic-grid-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
  }
  .mosaic-subgrid { display: contents; }
  .mosaic-card {
    min-height: 112px;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
  }
  .mosaic-card-large { grid-column: span 2; }
  .mosaic-overlay {
    min-height: 38px;
    justify-content: center;
    padding: 7px 8px;
  }
  .mosaic-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.25;
  }
  .mosaic-meta {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mosaic-link { display: none; }

  .editorial-catalog-section { gap: 12px; margin-bottom: 24px; }
  .catalog-intro-col { padding-top: 0; }
  .catalog-intro-col .editorial-rail-top { gap: 5px; }
  .catalog-intro-col .editorial-col-title { font-size: 19px; }
  .catalog-intro-col .editorial-col-desc { font-size: 11.5px; }
  .catalog-intro-col .editorial-action-link { margin-top: 5px; }
  .catalog-cards-grid { gap: 8px; }
  .catalog-cards-grid .catalog-product-card {
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
  }
  .catalog-cards-grid .product-media-wrap { height: 136px; padding: 8px; }
  .catalog-cards-grid .product-info-wrap { gap: 5px; padding: 9px; }
  .catalog-cards-grid .product-title {
    display: -webkit-box;
    min-height: 35px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
  }
  .catalog-cards-grid .product-sku-hint { font-size: 11px; }
  .catalog-cards-grid .product-purpose,
  .catalog-cards-grid .product-match-snippet { font-size: 10px; }
  .catalog-cards-grid .product-view-btn { font-size: 11px; }


  .carousel-slide-wrap { padding: 20px 18px 16px; }
  .carousel-title { font-size: 18px; }
  .carousel-desc { font-size: 13px; line-height: 1.5; }
  .category-feature-card {
    min-height: auto;
    padding: 22px 18px 24px;
  }
  .category-card-bg-layer img {
    object-position: center bottom;
  }
  .category-card-content {
    max-width: 100%;
    min-height: auto;
    gap: 12px;
  }
  .category-series-pill {
    padding: 3px 8px;
    font-size: 11px;
  }
  .featured-picks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .credentials-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .catalog-hero { padding: 20px 18px; border-radius: var(--radius-lg); }
  .hero-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-stat-card { padding: 10px 12px; }

  .catalog-taxonomy {
    margin-bottom: 12px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
  }
  .taxonomy-mobile-toggle {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border: 0;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
  }
  .taxonomy-mobile-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
  }
  .taxonomy-mobile-copy strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .taxonomy-mobile-copy small { color: var(--muted); font-size: 10.5px; line-height: 1.35; }
  .taxonomy-toggle-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--brand);
    transition: transform var(--transition-fast);
  }
  .catalog-taxonomy[data-mobile-expanded="false"] .taxonomy-controls { display: none; }
  .catalog-taxonomy[data-mobile-expanded="true"] .taxonomy-mobile-toggle { border-bottom: 1px solid var(--line); }
  .catalog-taxonomy[data-mobile-expanded="true"] .taxonomy-toggle-icon { transform: rotate(90deg); }
  .group-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .button.group-filter { min-height: 52px; font-size: 13px; padding: 6px 2px; }
  .button.group-filter:first-child { grid-column: 1 / -1; min-height: 40px; }
  .series-panel { min-height: 0; padding: 14px; }
  .series-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scroll-snap-type: x proximity;
  }
  .series-filter {
    min-width: max-content;
    min-height: 48px;
    padding: 6px 13px;
    border-radius: 11px;
    scroll-snap-align: start;
  }

  .category-view-top-bar { gap: 6px; margin-bottom: 10px; }
  .back-to-home-btn { min-height: 44px; padding: 7px 11px; border-radius: 10px; }
  .category-view-top-bar > .muted { font-size: 10.5px; }
  .catalog-main .section-title { margin-bottom: 12px; align-items: flex-start; }
  .catalog-main .section-title h2 { font-size: 19px; }
  .catalog-main .section-title p { margin-top: 3px; font-size: 11px; line-height: 1.4; }
  .catalog-heading-row { display: grid; gap: 0; }
  .catalog-heading-row > .section-title { margin-bottom: 10px; }
  .catalog-batch-toolbar { justify-content: flex-start; margin-bottom: 12px; }
  .catalog-batch-toolbar.active { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; }
  .catalog-batch-toolbar .button { min-height: 44px; padding-inline: 10px; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-grid .catalog-product-card {
    min-width: 0;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
  }
  .product-grid .product-card-link:active { background: var(--surface-subtle); }
  .product-grid .product-media-wrap { height: 124px; padding: 8px; }
  .product-grid .product-media-wrap img { max-width: 100%; max-height: 100%; }
  .product-grid .product-card-badge {
    max-width: calc(100% - 8px);
    height: 18px;
    padding: 2px 5px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .product-grid .product-info-wrap { gap: 4px; padding: 8px; }
  .product-grid .product-title {
    display: -webkit-box;
    min-height: 35px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
  }
  .product-grid .product-sku-hint {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
  }
  .product-grid .product-purpose,
  .product-grid .product-match-snippet { font-size: 10px; }
  .product-grid .product-card-meta { margin-top: 1px; }
  .product-grid .product-view-btn { font-size: 11px; }
  .product-card-actions { min-height: 54px; padding: 5px 7px 7px; }
  .button.product-quick-add { min-height: 44px; font-size: 11.5px; }
  .recent-viewed-section { min-height: 50vh; padding: 4px 0 24px; }
  .recent-viewed-heading { align-items: center; }
  .recent-viewed-heading h1 { font-size: 22px; }
  .recent-viewed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .recent-viewed-empty { min-height: 240px; padding-inline: 18px; }
  .sku-picker-list { grid-template-columns: 1fr; }
  .sku-picker-card { padding: 16px; }

  .catalog-selection-mobile {
    display: block;
    position: fixed;
    z-index: 55;
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 10px;
  }
  .selection-summary-mobile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 8px 8px 13px;
    border-radius: 18px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xl);
  }
  .selection-summary-mobile .selection-summary-heading { justify-content: start; gap: 8px; }
  .selection-summary-mobile .selection-summary-heading strong { color: var(--ink); font-size: 13px; }
  .selection-summary-mobile .selection-count { color: #ffffff; background: var(--brand); }
  .selection-mobile-copy { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .selection-summary-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border-radius: 11px;
    color: #ffffff;
    background: var(--brand);
    font-size: 12px;
    font-weight: 800;
  }

  .breadcrumbs {
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 12px;
    padding: 0 1px 2px;
    overflow-x: auto;
    color: var(--ink-tertiary);
    font-size: 11.5px;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .breadcrumbs::-webkit-scrollbar { display: none; }
  .breadcrumbs > *:not(:last-child)::after { margin-left: 6px; }
  .breadcrumbs a,
  .breadcrumbs button { display: inline-flex; min-height: 44px; align-items: center; }
  .detail-layout { gap: 18px; }
  .detail-media-stage {
    border-radius: 16px;
    box-shadow: var(--shadow-md);
  }
  .detail-media-stage > .media-frame,
  .detail-main-media .media-frame {
    height: min(30dvh, 280px);
    min-height: 220px;
    padding: 14px;
  }
  .zoom-label { right: 10px; bottom: 10px; padding: 6px 10px; font-size: 10.5px; }
  .detail-thumbnails {
    gap: 8px;
    margin-top: 10px;
    padding: 1px 1px 3px;
    scroll-snap-type: x proximity;
  }
  .detail-thumbnail { width: 72px; min-height: 72px; padding: 6px; border-radius: 12px; }
  .detail-thumbnail { scroll-snap-align: start; }
  .detail-thumbnail .media-frame { height: 48px; }
  .thumbnail-caption { font-size: 10px; }
  .product-detail-copy { padding-bottom: 0; }
  .detail-labels { gap: 6px; }
  .product-series { padding: 4px 8px; border-radius: 9px; font-size: 10.5px; }
  .product-detail-copy > h1 { margin: 10px 0 7px; font-size: 23px; line-height: 1.28; }
  .detail-purpose { margin-bottom: 12px; padding: 11px 12px; }
  .detail-summary { margin-top: 4px; font-size: 13px; line-height: 1.55; }
  .detail-quick-facts { grid-template-columns: 1fr; gap: 6px; }
  .detail-quick-facts > div {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
  }
  .detail-quick-facts dt { margin: 0; font-size: 10px; }
  .detail-quick-facts dd { font-size: 11.5px; }
  .detail-data-note { margin-top: 9px; padding: 8px 10px; font-size: 11px; }
  .detail-section { padding: 17px 0; }
  .detail-section h2 { margin-bottom: 10px; font-size: 16px; }
  .detail-section p { margin-bottom: 8px; font-size: 13px; line-height: 1.65; }
  .product-fact {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 0;
    font-size: 13px;
  }
  .product-fact dt,
  .product-fact dd { line-height: 1.65; overflow-wrap: anywhere; }
  .sku-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sku-option { min-width: 0; gap: 9px; padding: 10px; border-radius: 12px; }
  .sku-option strong { font-size: 13px; }
  .sku-option small { font-size: 11px; }
  .detail-add-panel {
    position: fixed;
    z-index: 56;
    right: 8px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 8px;
    grid-template-columns: 44px 132px minmax(0, 1fr) 52px;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-xl);
  }
  .detail-share-button { min-width: 44px; min-height: 48px; padding: 0; }
  .detail-share-button span { display: none; }
  .detail-quantity-field label { display: none; }
  .detail-quantity-field { min-width: 0; gap: 0; }
  .detail-add-panel .quantity-stepper {
    display: grid;
    grid-template-columns: 44px minmax(44px, 1fr) 44px;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-color: var(--line);
    border-radius: 12px;
    background: var(--surface-subtle);
  }
  .detail-add-panel .stepper-btn {
    width: 100%;
    height: 48px;
    min-height: 48px;
    border-radius: 0;
  }
  .detail-add-panel .quantity-stepper input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0;
    appearance: textfield;
    -moz-appearance: textfield;
    border-radius: 0;
    font-size: 15px;
  }
  .detail-add-panel .quantity-stepper input::-webkit-inner-spin-button,
  .detail-add-panel .quantity-stepper input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }
  .detail-add-button {
    min-width: 0;
    min-height: 48px;
    gap: 3px;
    padding: 0 2px;
    overflow: hidden;
    border-radius: 12px;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .detail-add-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .detail-selection-link {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 52px;
    min-height: 48px;
    padding: 2px 3px;
    font-size: 10px;
  }
  .detail-selection-link strong {
    min-width: 20px;
    height: 20px;
    padding-inline: 5px;
  }
  .lightbox { width: calc(100vw - 16px); height: calc(100vh - 24px); height: calc(100dvh - 24px); }
  .toast { bottom: calc(154px + env(safe-area-inset-bottom)); }
  .toast:not([hidden]) { width: max-content; max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center; padding: 10px 14px; border-radius: var(--radius-lg); }
}

@media (max-width: 380px) {
  .featured-picks-grid { grid-template-columns: 1fr; }
  .credentials-strip { grid-template-columns: 1fr; }
  .featured-picks-grid .product-media-wrap { height: 200px; }
  .product-grid .product-media-wrap { height: 112px; }
  .selection-mobile-copy { display: none; }
  .selection-item-actions { grid-template-columns: 78px 44px; gap: 6px; }
  .selection-item-quantity input { width: 78px; }
  .button.selection-remove-button { width: 44px; min-width: 44px; padding: 0; }
  .selection-remove-button span { display: none; }
  .detail-add-panel {
    right: 6px;
    left: 6px;
    grid-template-columns: 44px 132px minmax(0, 1fr) 48px;
    gap: 6px;
    padding: 6px;
  }
  .detail-add-panel .quantity-stepper { grid-template-columns: 44px minmax(44px, 1fr) 44px; }
  .detail-add-button { gap: 0; padding-inline: 2px; font-size: 11.5px; }
  .detail-add-button .svg-icon { display: none; }
  .product-fact { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
}

/* Reporting desk workspaces */
.request-progress-card,
.finance-report-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.request-progress-card:hover,
.finance-report-card:hover {
  border-color: var(--brand-soft-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.request-progress-card h2,
.staff-customer-card h2,
.admin-account-card h3,
.admin-customer-card h3,
.admin-exception-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
}
.request-progress-card p { margin: 0; }
.customer-create-card { margin-bottom: 20px; }
.staff-customer-card { margin: 0; gap: 14px; }
.customer-meta,
.finance-report-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  color: var(--ink-secondary);
  font-size: 13px;
}
.customer-card-actions,
.admin-card-actions,
.finance-detail-actions { align-items: center; flex-wrap: wrap; }
.customer-card-actions { justify-content: flex-start; gap: 10px; }
.customer-access-message { margin: 0; }
.admin-app,
.finance-app { padding-bottom: 96px; }
.admin-zone { min-width: 0; }
.admin-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.admin-create-grid .error-text,
.admin-create-grid .button { grid-column: 1 / -1; }
.admin-account-list,
.admin-customer-list,
.admin-exception-list { gap: 12px; }
.admin-account-card,
.admin-customer-card,
.admin-exception-card { margin: 0; padding: 18px; }
.admin-account-card .row,
.admin-customer-card .row,
.admin-exception-card .row { align-items: flex-start; }
.admin-card-actions { justify-content: flex-start; gap: 8px; }
.admin-card-actions .muted { margin: 0; }
.admin-reassignment-section { margin: 0; padding: 18px; }
.admin-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.admin-task-card p { margin: 3px 0 0; }
.admin-assignment-controls,
.admin-exception-controls { display: grid; gap: 10px; margin-top: 14px; }
.admin-assignment-controls .field { min-width: 0; }
.admin-assignment-controls > .row,
.admin-exception-controls > .row { justify-content: flex-start; flex-wrap: wrap; }
.admin-open-work-output { margin-top: 12px; }
.admin-open-work-output p { margin: 0; }
.admin-work-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 8px 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-subtle);
}
.admin-work-row > strong,
.admin-work-row > p { grid-column: 1 / -1; }
.admin-work-row > .row { justify-content: flex-start; flex-wrap: wrap; }
.admin-draft-close { align-items: center; flex-wrap: wrap; margin-top: 8px; }
.admin-draft-close input { max-width: 240px; min-height: 36px; }
.admin-exception-controls select { min-width: 0; }
.finance-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}
.finance-filter-form .error-text { grid-column: 1 / -1; margin: 0; }
.finance-report-card h2 { margin: 0; font-size: 16px; }
.finance-amount { color: var(--brand); font-size: 18px; font-weight: 900; white-space: nowrap; }
.finance-detail-card { gap: 18px; }
.finance-detail-total { font-size: 24px; }
.finance-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  padding: 14px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.finance-contact-grid p { margin: 0; overflow-wrap: anywhere; }
.finance-line-items { gap: 0; border-top: 1px solid var(--line-subtle); }
.finance-line-items .row { min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line-subtle); }
.finance-detail-actions { justify-content: flex-start; }
.finance-detail-actions .button { flex: 1 1 220px; }
.password-change-card h2 { margin: 0; font-size: 18px; }

@media (min-width: 960px) {
  .admin-app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .admin-app > .section-title,
  .admin-app > .admin-zone:last-child { grid-column: 1 / -1; }
  .admin-app > .admin-zone { margin: 0; }
}

@media (max-width: 720px) {
  .admin-app .button.small,
  .finance-app .button.small,
  .staff-customers-list .button.small { min-height: 44px; }
  .request-progress-card,
  .finance-report-card,
  .staff-customer-card,
  .admin-account-card,
  .admin-customer-card,
  .admin-exception-card { padding: 14px; border-radius: var(--radius-md); }
  .admin-create-grid,
  .finance-filter-form { grid-template-columns: 1fr 1fr; }
  .admin-create-grid .field:first-child,
  .admin-create-grid .field:nth-child(2),
  .admin-create-grid .error-text,
  .admin-create-grid .button,
  .finance-filter-form .field:first-child,
  .finance-filter-form .error-text,
  .finance-filter-form .button { grid-column: 1 / -1; }
  .admin-task-card { align-items: flex-start; flex-direction: column; }
  .admin-task-card .button { width: 100%; }
  .finance-filter-form .button { width: 100%; }
  .finance-detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .finance-detail-actions .button { min-width: 0; }
  .admin-work-row,
  .finance-contact-grid { grid-template-columns: 1fr; }
  .admin-work-row > strong,
  .admin-work-row > p { grid-column: 1; }
  .customer-card-actions { align-items: stretch; flex-direction: column; }
  .customer-card-actions .button { width: 100%; }
  .customer-access-message { min-height: 20px; }
}

@media print {
  :root { color-scheme: light; }
  body { background: #ffffff; color: #000000; }
  .site-header,
  .site-footer,
  #toast,
  .finance-filter-form,
  .finance-detail-actions,
  .button,
  .breadcrumbs { display: none !important; }
  #app { width: 100%; min-height: 0; margin: 0; padding: 0; }
  .card,
  .state-card,
  .finance-report-card { border: 0; box-shadow: none; background: #ffffff; }
  .finance-detail-card { padding: 0; }
  .report-text { border: 0; padding: 0; color: #000000; background: #ffffff; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .request-progress-card,
  .finance-report-card { transition: none; }
  .request-progress-card:hover,
  .finance-report-card:hover { transform: none; }
}

