* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.visually-hidden {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
body {
  font-family: sans-serif;
  padding: 20px;
  padding-top: 68px;
  background-color: #f5f5f5;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.navbar-inner {
  display: flex;
  align-items: center;
  max-width: 100%;
  padding: 0 20px;
  height: 48px;
  gap: 16px;
}
.navbar-links {
  flex: 1;
  display: flex;
  gap: 4px;
  min-width: 0;
}
.navbar-spacer {
  flex: 1;
}
.navbar-menu {
  display: none;
}
.navbar-brand {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 16px;
  color: #333;
  text-decoration: none;
}
.navbar-link {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
}
.navbar-link:hover {
  background: #f0f0f0;
}
.navbar-link.active {
  background: #e7f3ff;
  color: #0969da;
  font-weight: 600;
}
.navbar-menu-login {
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.member-nav {
  display: flex;
  align-items: center;
}
.member-auth-btn {
  min-width: 72px;
  height: 34px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #24292f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.member-auth-btn:hover {
  background: #f6f8fa;
}
/* Cart toggle button */
.cart-toggle-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: white;
  color: #555;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.cart-toggle-btn:hover {
  background: #f0f0f0;
  border-color: #999;
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-block;
  background: #dc3545;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  border-radius: 9px;
}
/* ===== Cart Drawer (Shopify-style) ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: white;
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.cart-drawer.open {
  transform: translateX(0);
}
.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eaeef2;
  flex-shrink: 0;
}
.cart-drawer-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0;
}
.cart-drawer-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  border-radius: 6px;
}
.cart-drawer-close:hover {
  background: #f0f0f0;
}
.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}
.cart-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eaeef2;
  gap: 10px;
}
.cart-drawer-item:last-child {
  border-bottom: none;
}
.cart-drawer-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.cart-drawer-item-img {
  width: 44px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.cart-drawer-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cart-drawer-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-drawer-item-price {
  font-size: 12px;
  color: #666;
}
.cart-drawer-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.cart-drawer-qty {
  display: flex;
  align-items: center;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  overflow: hidden;
}
.cart-drawer-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: #f6f8fa;
  font-size: 14px;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-drawer-qty-btn:hover {
  background: #e9ecef;
}
.cart-drawer-qty-value {
  width: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.cart-drawer-remove {
  border: none;
  background: none;
  font-size: 11px;
  color: #dc3545;
  cursor: pointer;
  padding: 2px 4px;
}
.cart-drawer-remove:hover {
  text-decoration: underline;
}
.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid #eaeef2;
  flex-shrink: 0;
}
.cart-drawer-simulate-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: #0969da;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}
.cart-drawer-simulate-btn:hover {
  background: #0757b5;
}
/* ===== Container ===== */
.container {
  max-width: 100%;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
}
h1 {
  margin-bottom: 20px;
  color: #333;
}
.cards-page-title {
  margin-bottom: 14px;
  font-size: 22px;
  line-height: 1.25;
}
h2 {
  color: #333;
  font-size: 16px;
  margin-bottom: 12px;
}
.controls {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 200px;
}
.inventory-filter-field {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}
.inventory-filter-search {
  flex: 1 1 320px;
  min-width: 260px;
}
.inventory-filter-field span {
  color: #6a737d;
  font-size: 12px;
  font-weight: 600;
}
.inventory-filter-field .filter-input,
.inventory-filter-field .sort-select {
  width: 100%;
  min-width: 0;
}
.inventory-filter-field .sort-select {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: white;
  color: #24292f;
  font-size: 14px;
  padding: 8px 10px;
}
.clear-all-btn {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f8f9fa;
  color: #666;
  cursor: pointer;
}
.clear-all-btn:hover {
  background: #e9ecef;
  border-color: #999;
}
.inventory-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.inventory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eaeef2;
  padding-bottom: 16px;
}
.inventory-kpis {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.inventory-kpi-group {
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}
.inventory-kpi-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.inventory-kpi-group-heading span {
  color: #24292f;
  font-size: 12px;
  font-weight: 700;
}
.inventory-kpi-group-heading small {
  color: #6a737d;
  font-size: 11px;
}
.inventory-kpi-row {
  display: flex;
  gap: 8px;
}
.inventory-kpi {
  min-width: 118px;
  border: 1px solid #eaeef2;
  border-radius: 6px;
  background: #f6f8fa;
  padding: 10px 12px;
}
.inventory-kpi span {
  display: block;
  color: #6a737d;
  font-size: 12px;
  margin-bottom: 3px;
}
.inventory-kpi strong {
  color: #24292f;
  font-size: 20px;
}
.inventory-kpi .inventory-kpi-status {
  display: inline-block;
  color: #6a737d;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
}
.inventory-editor {
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}
.inventory-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.inventory-edit-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inventory-status-flow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.inventory-status-step {
  border: 1px solid #d8dee4;
  border-radius: 999px;
  background: #f6f8fa;
  color: #57606a;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}
.inventory-status-step.is-done {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}
.inventory-status-step.is-active {
  border-color: #0969da;
  background: #ddf4ff;
  color: #0969da;
  box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.12);
}
.inventory-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.inventory-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #57606a;
  font-size: 12px;
  font-weight: 600;
}
.inventory-field-hint {
  color: #6a737d;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}
.inventory-form-grid input,
.inventory-form-grid select,
.inventory-form-grid textarea,
.inventory-list select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: white;
  color: #24292f;
  font-size: 14px;
  padding: 7px 9px;
}
.ui-combobox {
  position: relative;
  min-width: 0;
}
.ui-combobox-control {
  position: relative;
}
.ui-combobox-control input {
  padding-right: 30px;
}
.ui-combobox-chevron {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #6a737d;
  font-size: 12px;
  pointer-events: none;
  transform: translateY(-50%);
}
.ui-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 20;
  overflow: auto;
  max-height: 220px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 35, 40, 0.16);
  padding: 4px;
}
.ui-combobox-option {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #24292f;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-align: left;
  padding: 7px 9px;
}
.ui-combobox-option:hover,
.ui-combobox-option.is-selected {
  background: #ddf4ff;
  color: #0969da;
}
.ui-combobox-empty {
  color: #6a737d;
  font-size: 13px;
  padding: 9px;
}
.inventory-form-grid textarea {
  min-height: 70px;
  resize: vertical;
}
.inventory-form-wide {
  grid-column: 1 / -1;
}
.inventory-form-section {
  grid-column: 1 / -1;
  border-left: 4px solid #0969da;
  background: #f6f8fa;
  color: #24292f;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 11px;
  border-radius: 6px;
}
.inventory-form-section:not(:first-child) {
  margin-top: 8px;
}
.inventory-input-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inventory-input-mode .member-secondary-btn.is-active {
  border-color: #0969da;
  background: #ddf4ff;
  color: #0969da;
}
.inventory-package-rows {
  display: grid;
  gap: 8px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}
.inventory-package-common-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #f6f8fa;
  padding: 12px;
}
.inventory-package-row {
  display: grid;
  grid-template-columns:
    minmax(110px, 0.8fr) minmax(180px, 1.6fr) minmax(110px, 0.8fr)
    minmax(90px, 0.6fr) 44px;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}
.inventory-package-row-head {
  color: #6a737d;
  font-size: 12px;
  font-weight: 700;
}
.inventory-package-row strong,
.inventory-package-row span {
  min-width: 0;
}
.inventory-package-row input {
  min-width: 0;
  width: 100%;
}
.inventory-package-row strong {
  color: #24292f;
  font-size: 13px;
}
.inventory-package-price {
  color: #24292f;
  font-weight: 700;
  text-align: right;
}
.inventory-package-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #cf222e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inventory-package-delete-btn:disabled {
  cursor: not-allowed;
  color: #8c959f;
  opacity: 0.45;
}
.inventory-package-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: #6a737d;
  font-size: 12px;
  font-weight: 700;
}
.inventory-package-add-btn {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  font-size: 18px;
  font-weight: 800;
  padding: 0;
}
.inventory-photo-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  border: 2px dashed #d0d7de;
  border-radius: 8px;
  background: #f6f8fa;
  color: #6a737d;
  overflow: hidden;
  cursor: pointer;
}
.inventory-photo-upload:hover {
  border-color: #0969da;
  background: #f0f7ff;
}
.inventory-photo-upload:focus-within {
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.14);
}
.inventory-photo-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.inventory-photo-preview {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: white;
}
.inventory-photo-replace {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(36, 41, 47, 0.86);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}
.inventory-centering-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}
.inventory-centering-result {
  display: grid;
  gap: 4px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #f6f8fa;
  color: #57606a;
  padding: 10px 12px;
}
.inventory-centering-result strong {
  color: #0969da;
  font-size: 16px;
}
.inventory-centering-result[data-failed="true"] strong {
  color: #cf222e;
}
.inventory-centering-result span {
  min-width: 0;
}
.inventory-allocation-preview {
  display: grid;
  gap: 4px;
  border-radius: 6px;
  background: #f6f8fa;
  color: #57606a;
  font-size: 13px;
  padding: 10px 12px;
}
.inventory-allocation-preview strong {
  color: #24292f;
  font-size: 18px;
}
.inventory-profit-preview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  border-radius: 6px;
  background: #f6f8fa;
  color: #57606a;
  font-size: 13px;
  padding: 12px;
}
.inventory-profit-preview strong {
  color: #24292f;
  font-size: 18px;
}
.inventory-financial-preview {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px 20px;
}
.inventory-financial-preview-heading {
  display: grid;
  gap: 2px;
}
.inventory-financial-preview-heading > span {
  color: #24292f;
  font-weight: 700;
}
.inventory-financial-preview-heading small,
.inventory-financial-preview-detail {
  color: #6a737d;
  font-size: 12px;
}
.inventory-financial-preview-metrics {
  display: flex;
  gap: 20px;
  margin: 0;
}
.inventory-financial-preview-metrics > div {
  display: grid;
  gap: 2px;
  min-width: 132px;
}
.inventory-financial-preview-metrics dt {
  color: #6a737d;
  font-size: 12px;
}
.inventory-financial-preview-metrics dd {
  color: #24292f;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.inventory-financial-preview-detail {
  grid-column: 1 / -1;
}
.inventory-net-proceeds .inventory-subtext {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
}
.inventory-profit-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #eef2f6;
  color: #57606a;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  padding: 2px 6px;
}
.inventory-storage-summary,
.inventory-lot-profit-summary {
  display: grid;
  gap: 10px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.inventory-storage-summary {
  margin-bottom: 16px;
}
.inventory-lot-group-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 16px;
  padding: 12px;
}
.inventory-selection-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #b6d7fe;
  border-radius: 8px;
  background: #f0f7ff;
  margin-bottom: 12px;
  padding: 10px 12px;
}
.inventory-selection-actions > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 720px) {
  .inventory-selection-actions { align-items: stretch; flex-direction: column; }
  .inventory-selection-actions > div { flex-wrap: wrap; }
}
.inventory-lot-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.inventory-lot-group-header h2 {
  margin: 0;
  font-size: 16px;
}
.inventory-lot-group-header span {
  color: #6a737d;
  font-size: 12px;
  font-weight: 700;
}
.inventory-lot-group-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}
.inventory-lot-group-fields label {
  display: grid;
  gap: 6px;
  color: #57606a;
  font-size: 12px;
  font-weight: 700;
}
.inventory-lot-group-fields input {
  min-width: 0;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #24292f;
  font: inherit;
  font-size: 14px;
  padding: 9px 10px;
}
.inventory-lot-group-readonly {
  display: grid;
  gap: 6px;
  color: #57606a;
  font-size: 12px;
  font-weight: 700;
}
.inventory-lot-group-readonly strong {
  min-height: 38px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #f6f8fa;
  color: #24292f;
  font-size: 14px;
  padding: 9px 10px;
}
.inventory-lot-group-actions {
  display: flex;
  justify-content: flex-end;
}
.inventory-storage-summary-header,
.inventory-lot-profit-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.inventory-storage-summary-header h2,
.inventory-lot-profit-header h3 {
  margin: 0;
}
.inventory-storage-summary-header span,
.inventory-lot-profit-header span {
  color: #6a737d;
  font-size: 12px;
  font-weight: 700;
}
.inventory-storage-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}
.inventory-lot-profit-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 10px;
  margin: 0;
}
.inventory-lot-profit-metrics div {
  display: grid;
  gap: 4px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #f6f8fa;
  padding: 10px 12px;
}
.inventory-lot-profit-metrics dt {
  color: #6a737d;
  font-size: 12px;
  font-weight: 700;
}
.inventory-lot-profit-metrics dd {
  margin: 0;
  color: #24292f;
  font-size: 18px;
  font-weight: 800;
}
.inventory-lot-profit-table-wrapper {
  overflow-x: auto;
  scrollbar-gutter: stable;
}
.inventory-lot-profit-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}
.inventory-lot-profit-table caption {
  padding-bottom: 8px;
  color: #24292f;
  font-weight: 800;
  text-align: left;
}
.inventory-lot-profit-table th,
.inventory-lot-profit-table td {
  border-bottom: 1px solid #eaeef2;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.inventory-lot-profit-table th {
  color: #6a737d;
  font-size: 12px;
}
.inventory-storage-card {
  display: grid;
  gap: 10px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #f6f8fa;
  padding: 11px 12px;
}
.inventory-storage-card-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.inventory-storage-card-main span {
  min-width: 0;
  color: #24292f;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.inventory-storage-card-main strong {
  color: #24292f;
  font-size: 18px;
  white-space: nowrap;
}
.inventory-storage-card-main strong.price-negative {
  color: #d73a49;
}
.inventory-storage-card-main strong.price-positive {
  color: #22863a;
}
.inventory-storage-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.inventory-storage-metric {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6a737d;
  font-size: 12px;
}
.inventory-storage-metric strong {
  color: #24292f;
}
.inventory-table-image {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #d8dee4;
  background: #f6f8fa;
}
.inventory-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.danger-action-btn {
  color: #cf222e;
}
.danger-action-btn:hover {
  background: #fff1f3;
  border-color: #ff8182;
}
.danger-action-btn:disabled {
  cursor: progress;
  opacity: 0.65;
}
.inventory-row-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #24292f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}
.inventory-row-select input {
  margin: 0;
}
.inventory-list .table-wrapper {
  max-height: calc(100vh - 330px);
}
.inventory-list table {
  min-width: 1120px;
}
.inventory-list .action-header,
.inventory-list .action-cell {
  position: sticky;
  right: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.84), #fff 18px),
    #fff;
  box-shadow: -6px 0 12px rgba(31, 35, 40, 0.06);
}
.inventory-list tbody tr:hover .action-cell {
  background:
    linear-gradient(90deg, rgba(248, 249, 250, 0.84), #f8f9fa 18px),
    #f8f9fa;
}
.inventory-list .inventory-lot-row {
  border-top: 2px solid #d8dee4;
  background: #f6f8fa;
}
.inventory-list .inventory-lot-row td {
  background: #f6f8fa;
}
.inventory-list .inventory-lot-row .action-cell {
  background:
    linear-gradient(90deg, rgba(246, 248, 250, 0.84), #f6f8fa 18px),
    #f6f8fa;
}
.inventory-lot-toggle-btn {
  min-width: 92px;
}
.inventory-list .inventory-lot-child-row .inventory-list-primary {
  padding-left: 22px;
  border-left: 4px solid #d8dee4;
}
.inventory-list th:first-child,
.inventory-list td:first-child,
.inventory-list th:nth-child(2),
.inventory-list td:nth-child(2) {
  position: static;
  min-width: auto;
  max-width: none;
  width: auto;
}
.inventory-list td:first-child,
.inventory-list td:nth-child(2) {
  background: transparent;
}
.inventory-list th {
  cursor: default;
}
.inventory-list th.inventory-sort-header {
  cursor: pointer;
  padding: 0;
}
.inventory-list th.inventory-sort-header:hover {
  background-color: #e9ecef;
}
.inventory-sort-header-button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: 12px;
}
.inventory-sort-header-button:hover,
.inventory-sort-header-button:focus-visible {
  color: #0969da;
}
.inventory-sort-header-button:focus-visible {
  outline: 2px solid #0969da;
  outline-offset: 3px;
}
.inventory-sort-indicator {
  color: #6a737d;
  font-size: 12px;
  line-height: 1;
}
.inventory-sort-header-button.is-active .inventory-sort-indicator {
  color: #0969da;
}
.inventory-list .row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.inventory-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
}
.inventory-settings-section {
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}
.inventory-settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.inventory-settings-section-header h2 {
  color: #24292f;
  font-size: 18px;
  margin: 0 0 4px;
}
.inventory-settings-section-header p {
  color: #57606a;
  font-size: 13px;
  margin: 0;
}
.inventory-settings-add-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid #eaeef2;
  padding-bottom: 14px;
  margin-bottom: 8px;
}
.inventory-settings-add-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #57606a;
  font-size: 12px;
  font-weight: 600;
}
.inventory-settings-add-form input {
  min-height: 36px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  color: #24292f;
  font-size: 14px;
  padding: 7px 9px;
}
.inventory-settings-list {
  display: grid;
  gap: 6px;
}
.inventory-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid #f0f2f4;
}
.inventory-settings-row > span {
  min-width: 0;
  color: #24292f;
  overflow-wrap: anywhere;
}
.inventory-settings-empty {
  border-radius: 6px;
  background: #f6f8fa;
  color: #6a737d;
  font-size: 13px;
  padding: 12px;
}
.inventory-item-name {
  color: #24292f;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.inventory-subtext {
  color: #6a737d;
  font-size: 12px;
  margin-top: 3px;
}
.inventory-code {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 5px;
  background: #eef5ff;
  color: #0969da;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
}
.inventory-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  border-radius: 999px;
  background: #eef2f6;
  color: #39424e;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}
.inventory-status.status-sold {
  background: #dafbe1;
  color: #1a7f37;
}
.inventory-status.status-in_stock,
.inventory-status.status-psa_submitted,
.inventory-status.status-psa_returned {
  background: #ddf4ff;
  color: #0969da;
}
.inventory-status.status-lost,
.inventory-status.status-pending_recheck {
  background: #fff8c5;
  color: #7d4e00;
}
.inventory-status.status-sale_processing_missing {
  background: #fff1e5;
  color: #9a3412;
}
.inventory-status.status-lost {
  background: #ffebe9;
  color: #cf222e;
}
.inventory-custody {
  border-left: 1px solid currentColor;
  font-weight: 600;
  opacity: 0.8;
  padding-left: 5px;
}
.inventory-count {
  color: #6a737d;
  font-size: 13px;
  margin-left: auto;
}
/* テーブルスクロールコンテナ */
.table-wrapper {
  overflow: auto;
  max-height: calc(100vh - 260px);
}
table {
  width: 100%;
  min-width: 1300px;
  border-collapse: separate;
  border-spacing: 0;
}
/* ヘッダー固定（縦スクロール） */
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f8f9fa;
}
th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
  cursor: pointer;
  user-select: none;
}
th:hover {
  background-color: #e9ecef;
}
th.sortable .th-title::after {
  content: " ↕";
  opacity: 0.5;
  font-size: 0.8em;
}
th.sort-asc .th-title::after {
  content: " ↑";
  opacity: 1;
}
th.sort-desc .th-title::after {
  content: " ↓";
  opacity: 1;
}
td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}
tr:hover {
  background-color: #f8f9fa;
}
/* カード名列固定（横スクロール） */
th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 200px;
  max-width: 200px;
  width: 200px;
}
td:first-child {
  background-color: white;
}
/* 画像列固定（横スクロール） */
th:nth-child(2),
td:nth-child(2) {
  position: sticky;
  left: 200px;
  z-index: 1;
  min-width: 84px;
  width: 84px;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}
td:nth-child(2) {
  background-color: white;
}
/* 操作列固定（横スクロール時も常に見える） */
#cardTable th:last-child,
#cardTable td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 176px;
  width: 176px;
}
#cardTable thead th:last-child {
  z-index: 4;
  background:
    linear-gradient(90deg, rgba(248, 249, 250, 0.78) 0%, #f8f9fa 18%),
    #f8f9fa;
  box-shadow: -1px 0 0 #d8dee4;
}
#cardTable td:last-child {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.98) 24%),
    #fff;
  box-shadow: -1px 0 0 #e5e9ef, -18px 0 24px rgba(15, 23, 42, 0.04);
}
/* ヘッダー × 固定列の交差セル（最高z-index） */
thead th:first-child,
thead th:nth-child(2) {
  z-index: 3;
}
/* ホバー時の背景色を維持 */
tr:hover td:first-child,
tr:hover td:nth-child(2) {
  background-color: #f8f9fa;
}
#cardTable tr:hover td:last-child {
  background:
    linear-gradient(90deg, rgba(248, 249, 250, 0.9) 0%, rgba(248, 249, 250, 0.98) 24%),
    #f8f9fa;
}
.card-img {
  width: 60px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
}
.card-title {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.price {
  text-align: right;
}
.price-negative {
  color: #dc3545;
  font-weight: 700;
}
.price-positive {
  color: #1a7f37;
  font-weight: 700;
}
.ratio {
  text-align: right;
}
/* ===== Member auth ===== */
.member-auth-page {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: #f6f8fa;
}
.member-auth-card {
  width: min(420px, 100%);
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(31, 35, 40, 0.12);
}
.member-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 58px 18px 18px;
  background: rgba(31, 35, 40, 0.24);
}
.member-auth-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: transparent;
  cursor: default;
}
.member-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(31, 35, 40, 0.18);
}
.member-auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eaeef2;
}
.member-auth-header h1,
.member-auth-header h2 {
  font-size: 16px;
  line-height: 1.4;
}
.member-auth-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #656d76;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.member-auth-close:hover {
  background: #f6f8fa;
  color: #24292f;
}
.member-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
}
.member-panel.signed-in {
  background: #f6f8fa;
}
.member-panel.signed-in div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.member-panel.signed-in span {
  color: #656d76;
  font-size: 12px;
}
.member-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) minmax(
      140px,
      1fr
    ) minmax(110px, 0.8fr);
  gap: 8px;
  flex: 1;
}
.member-input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #24292f;
  font-size: 14px;
}
.member-input-label {
  display: grid;
  gap: 6px;
}
.member-input-label span {
  color: #24292f;
  font-size: 13px;
  font-weight: 700;
}
.member-otp-input {
  font-variant-numeric: tabular-nums;
}
.member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.member-primary-btn,
.member-secondary-btn,
.favorite-filter-btn {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.member-primary-btn {
  border-color: #1f6feb;
  background: #1f6feb;
  color: #fff;
}
.member-primary-btn:hover {
  background: #1158c7;
}
.member-primary-btn:disabled {
  border-color: #d0d7de;
  background: #8c959f;
  color: #fff;
  cursor: not-allowed;
}
.member-secondary-btn,
.favorite-filter-btn {
  background: #fff;
  color: #24292f;
}
.member-secondary-btn:hover,
.favorite-filter-btn:hover:not(:disabled) {
  background: #f6f8fa;
}
.favorite-filter-btn.active {
  border-color: #bf8700;
  background: #fff8c5;
  color: #7d4e00;
}
.favorite-filter-btn:disabled {
  color: #8c959f;
  cursor: not-allowed;
}
.member-error {
  color: #cf222e;
  font-size: 13px;
  font-weight: 600;
}
.member-notice {
  color: #57606a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.member-auth-dialog .member-panel,
.member-auth-card .member-panel {
  align-items: stretch;
  flex-direction: column;
  margin: 0;
  border: none;
  border-radius: 0;
}
.member-auth-card .member-fields,
.member-auth-dialog .member-fields {
  grid-template-columns: 1fr;
}
.member-auth-card .member-actions,
.member-auth-dialog .member-actions {
  justify-content: flex-end;
}
.member-privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #57606a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}
.member-privacy-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}
.member-privacy-consent a {
  color: #0969da;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.profile-page {
  max-width: 560px;
}
.profile-lead {
  margin-bottom: 16px;
  color: #656d76;
  font-size: 14px;
  line-height: 1.7;
}
.profile-form {
  display: grid;
  gap: 14px;
}
.profile-field {
  display: grid;
  gap: 6px;
}
.profile-field span {
  color: #24292f;
  font-size: 13px;
  font-weight: 700;
}
.profile-field input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #24292f;
  font-size: 14px;
}
.profile-field input:disabled {
  background: #f6f8fa;
  color: #656d76;
}
.policy-page {
  max-width: 880px;
}
.policy-header {
  border-bottom: 1px solid #eaeef2;
  margin-bottom: 24px;
  padding-bottom: 20px;
}
.policy-kicker {
  margin-bottom: 8px;
  color: #0969da;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.policy-lead,
.policy-date,
.policy-section p {
  color: #57606a;
  line-height: 1.8;
}
.policy-lead {
  max-width: 680px;
  font-size: 15px;
}
.policy-date {
  margin-top: 10px;
  font-size: 13px;
}
.policy-sections {
  display: grid;
  gap: 22px;
}
.policy-section {
  display: grid;
  gap: 8px;
}
.policy-section h2 {
  margin: 0;
  color: #24292f;
  font-size: 17px;
}
.policy-section p {
  font-size: 14px;
}
.csv-guide-page {
  max-width: 1040px;
  color: #24292f;
}
.csv-guide-header {
  display: grid;
  gap: 10px;
}
.csv-guide-header h1 {
  margin: 0;
}
.csv-guide-back {
  width: fit-content;
  color: #0969da;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.csv-guide-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.csv-guide-section {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}
.csv-guide-section-heading p,
.csv-guide-lot-heading p {
  margin: 0 0 4px;
  color: #0969da;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.csv-guide-section-heading h2,
.csv-guide-lot-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}
.csv-guide-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  overflow: hidden;
  border: 1px solid #b6d6fa;
  border-radius: 12px;
  background: #f6faff;
}
.csv-guide-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  min-width: 0;
  padding: 18px 28px 18px 18px;
}
.csv-guide-flow li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: 8px;
  color: #54a3f3;
  content: "→";
  font-size: 20px;
  font-weight: 800;
  transform: translateY(-50%);
}
.csv-guide-step-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #0969da;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.csv-guide-flow h3 {
  margin: 1px 0 5px;
  font-size: 15px;
}
.csv-guide-flow p {
  margin: 0;
  color: #57606a;
  font-size: 13px;
  line-height: 1.55;
}
.csv-guide-lot {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
  padding: 24px;
  border: 2px solid #24292f;
  border-radius: 12px;
  background: #fff;
  box-shadow: 6px 6px 0 #d8e7f8;
}
.csv-guide-lot-heading span {
  display: block;
  margin-top: 8px;
  color: #57606a;
  font-size: 14px;
  line-height: 1.7;
}
.csv-guide-registration-choice {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.csv-guide-registration-choice > div {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px dashed #8c959f;
  border-radius: 8px;
  background: #f6f8fa;
}
.csv-guide-registration-choice > .is-lot {
  border-style: solid;
  border-color: #4ac26b;
  background: #edfff2;
}
.csv-guide-registration-choice span {
  color: #656d76;
  font-size: 12px;
  font-weight: 700;
}
.csv-guide-registration-choice strong {
  font-size: 14px;
}
.csv-guide-lot-example {
  min-width: 0;
}
.csv-guide-lot-example figcaption {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}
.csv-guide-table-scroll {
  overflow-x: auto;
  border: 1px solid #d0d7de;
  border-radius: 8px;
}
.csv-guide-table-scroll:focus-visible {
  outline: 3px solid #0969da;
  outline-offset: 3px;
}
.csv-guide-lot-example table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.csv-guide-lot-example th,
.csv-guide-lot-example td {
  padding: 11px 12px;
  border-right: 1px solid #d8dee4;
  border-bottom: 1px solid #d8dee4;
  text-align: left;
  white-space: nowrap;
}
.csv-guide-lot-example tr > :last-child {
  border-right: 0;
}
.csv-guide-lot-example thead th {
  background: #f6f8fa;
  color: #57606a;
  font-size: 12px;
}
.csv-guide-lot-example .is-price {
  background: #fff8c5;
  font-weight: 700;
}
.csv-guide-lot-example .is-code {
  background: #dafbe1;
  color: #116329;
  font-weight: 800;
}
.csv-guide-lot-example tfoot th,
.csv-guide-lot-example tfoot td {
  border-bottom: 0;
  background: #24292f;
  color: #fff;
  font-weight: 800;
}
.csv-guide-lot-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  list-style: none;
}
.csv-guide-lot-rules li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #39424e;
  font-size: 13px;
  font-weight: 700;
}
.csv-guide-lot-rules span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #1a7f37;
  color: #fff;
  font-size: 11px;
}
.csv-guide-notes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.csv-guide-note {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d8dee4;
  border-radius: 10px;
  background: #fff;
}
.csv-guide-note h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
.csv-guide-note p {
  margin: 0;
  color: #57606a;
  font-size: 13px;
  line-height: 1.65;
}
.csv-guide-note p + p {
  margin-top: 8px;
}
.csv-guide-file-mark,
.csv-guide-error-mark {
  display: grid;
  width: 48px;
  height: 54px;
  place-items: center;
  border: 2px solid #0969da;
  border-radius: 5px;
  background: #ddf4ff;
  color: #0969da;
  font-size: 11px;
  font-weight: 900;
}
.csv-guide-error-mark {
  width: 42px;
  height: 42px;
  border-color: #cf222e;
  border-radius: 50%;
  background: #ffebe9;
  color: #cf222e;
  font-size: 22px;
}
@media (max-width: 720px) {
  .csv-guide-flow,
  .csv-guide-registration-choice,
  .csv-guide-lot-rules,
  .csv-guide-notes {
    grid-template-columns: 1fr;
  }
  .csv-guide-flow li {
    padding: 16px 18px;
  }
  .csv-guide-flow li:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -11px;
    left: 27px;
    content: "↓";
    transform: none;
  }
  .csv-guide-lot {
    padding: 18px;
    box-shadow: 4px 4px 0 #d8e7f8;
  }
}
.app-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 14px 0 0;
  text-align: center;
}
.app-footer a {
  color: #57606a;
  font-size: 12px;
  text-decoration: none;
}
.app-footer a:hover {
  text-decoration: underline;
}
.updates-page {
  max-width: 780px;
}
.updates-list {
  display: grid;
  gap: 14px;
}
.updates-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #d8dee4;
}
.updates-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.updates-item time {
  color: #57606a;
  font-size: 13px;
  font-weight: 700;
}
.updates-item h2 {
  margin: 0 0 6px;
  color: #24292f;
  font-size: 16px;
}
.updates-item p {
  margin: 0;
  color: #57606a;
  font-size: 14px;
  line-height: 1.7;
}
@media (max-width: 560px) {
  .updates-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
/* ===== Quote cart stepper ===== */
.action-header {
  text-align: center;
  color: #24292f;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.action-cell {
  width: 228px;
  padding-left: 12px;
  text-align: center;
}
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.favorite-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #fff;
  color: #6e7781;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.favorite-btn:hover {
  border-color: #bf8700;
  background: #fff8c5;
  color: #9a6700;
}
.favorite-btn.active {
  border-color: #bf8700;
  background: #fff8c5;
  color: #bf8700;
}
.cart-stepper {
  display: grid;
  grid-template-columns: 34px minmax(84px, 1fr) 34px;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid #d0d7de;
  border-radius: 15px;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(27, 31, 36, 0.04),
    0 8px 24px rgba(140, 149, 159, 0.12);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.cart-stepper:hover {
  transform: translateY(-1px);
  border-color: #afb8c1;
  box-shadow:
    0 1px 0 rgba(27, 31, 36, 0.04),
    0 12px 28px rgba(140, 149, 159, 0.16);
}
.cart-stepper.in-cart {
  border-color: rgba(9, 105, 218, 0.28);
  box-shadow:
    0 1px 0 rgba(9, 105, 218, 0.08),
    0 12px 28px rgba(9, 105, 218, 0.12);
}
.cart-stepper-status {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 5px 0 4px;
  border: 1px solid #eaeef2;
  border-radius: 11px;
  background: #f6f8fa;
}
.cart-stepper-status-count {
  color: #24292f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cart-stepper-status-unit {
  color: #656d76;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}
.cart-stepper.in-cart .cart-stepper-status {
  border-color: rgba(9, 105, 218, 0.12);
  background: rgba(221, 244, 255, 0.45);
}
.cart-stepper.in-cart .cart-stepper-status-unit {
  color: #0969da;
}
.cart-stepper-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #fff;
  color: #57606a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
  box-shadow: 0 1px 0 rgba(27, 31, 36, 0.04);
}
.cart-stepper-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(140, 149, 159, 0.14);
}
.cart-stepper-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.cart-stepper-btn-dec:hover:not(:disabled) {
  border-color: #afb8c1;
  background: #f6f8fa;
  color: #24292f;
}
.cart-stepper-btn-inc {
  border-color: #1f6feb;
  background: #1f6feb;
  color: white;
}
.cart-stepper-btn-inc:hover:not(:disabled) {
  border-color: #1158c7;
  background: #1158c7;
  color: white;
}
/* レンジフィルター */
.range-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.range-filter input {
  width: 60px;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: right;
}
.range-filter input:focus {
  outline: none;
  border-color: #007bff;
}
.range-filter input.has-value {
  background-color: #e7f3ff;
  border-color: #007bff;
}
.range-separator {
  color: #666;
  font-size: 12px;
}
/* スピンボタンを非表示 */
.range-filter input::-webkit-outer-spin-button,
.range-filter input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.range-filter input[type="number"] {
  -moz-appearance: textfield;
}
/* ===== Simulation page ===== */
.sim-manual-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.sim-note-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #f6f8fa;
}
.sim-note-card strong {
  font-size: 13px;
  color: #1f2328;
}
.sim-note-card span {
  font-size: 12px;
  color: #59636e;
}
.sim-settings {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.sim-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.sim-setting-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sim-setting-item-wide {
  grid-column: 1 / -1;
}
.sim-setting-item label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.sim-input {
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 14px;
}
.sim-input:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}
.sim-helper-text {
  font-size: 12px;
  color: #656d76;
  line-height: 1.4;
}
.sim-settings-note {
  margin: 0 0 12px;
  color: #57606a;
  font-size: 13px;
  line-height: 1.5;
}
.sim-logic-panel,
.cart-item-logic-panel {
  margin: 16px 0;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}
.sim-logic-panel summary,
.cart-item-logic-panel summary {
  cursor: pointer;
  padding: 12px 14px;
  background: #f6f8fa;
  color: #1f2328;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.sim-logic-panel summary:hover,
.cart-item-logic-panel summary:hover {
  background: #eef2f7;
}
.sim-logic-panel[open] summary,
.cart-item-logic-panel[open] summary {
  border-bottom: 1px solid #d8dee4;
}
.sim-logic-content,
.cart-item-logic-content {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.sim-logic-section {
  padding: 12px;
  border: 1px solid #eaeef2;
  border-radius: 8px;
  background: #fbfcfe;
}
.sim-logic-title {
  margin: 0 0 10px;
  color: #24292f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.sim-logic-formula {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #ffffff;
  color: #24292f;
  font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}
.sim-logic-note {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff8c5;
  color: #57606a;
  font-size: 13px;
  line-height: 1.5;
}
.sim-setting-item select {
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 14px;
  background: white;
}
/* Mode toggle */
.sim-mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.sim-mode-toggle-top {
  margin-bottom: 24px;
}
.sim-mode-btn {
  padding: 8px 16px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.sim-mode-btn.active {
  background: #0969da;
  border-color: #0969da;
  color: white;
}
.bulk-settings {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.bulk-settings-intro {
  display: block;
  margin-bottom: 12px;
  color: #78350f;
}
.bulk-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.bulk-settings-mockup {
  background: white;
  border: 1px solid #d0d7de;
}
.bulk-settings-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  line-height: 1.5;
}
.bulk-purpose-toggle {
  margin-bottom: 16px;
}
.sim-fixed-value {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
  color: #24292f;
  font-size: 14px;
  font-weight: 700;
}
.bulk-summary-card {
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #d0d7de;
}
.bulk-summary-card-good {
  background: #f0fdf4;
  border-color: #86efac;
}
.bulk-summary-card-warning {
  background: #fffbeb;
  border-color: #fcd34d;
}
.bulk-summary-card-danger {
  background: #fef2f2;
  border-color: #fca5a5;
}
.bulk-summary-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}
.bulk-summary-card-good .bulk-summary-title {
  color: #15803d;
}
.bulk-summary-card-warning .bulk-summary-title {
  color: #b45309;
}
.bulk-summary-card-danger .bulk-summary-title {
  color: #b91c1c;
}
.bulk-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.bulk-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bulk-summary-meta {
  margin: 16px 0 0;
  font-size: 13px;
  color: #57606a;
}
.bulk-summary-meta-danger {
  color: #b91c1c;
}
.bulk-scenarios {
  margin-top: 16px;
}
.bulk-scenario-row-selected {
  background: #eff6ff;
}
.bulk-scenario-row-break-even {
  background: #fffbeb;
}
.bulk-scenario-note {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
}
/* Cart */
.sim-cart {
  margin-bottom: 16px;
}
.sim-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.clear-cart-btn {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #dc3545;
  border-radius: 6px;
  background: white;
  color: #dc3545;
  cursor: pointer;
}
.clear-cart-btn:hover {
  background: #dc3545;
  color: white;
}
.cart-empty {
  color: #888;
  font-size: 14px;
  padding: 24px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #d0d7de;
}
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  background: white;
}
.cart-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.cart-item-img {
  width: 48px;
  height: 67px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-item-psa10 {
  font-size: 13px;
  color: #555;
}
.cart-item-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #57606a;
}
.cart-item-market-link {
  color: #0969da;
  text-decoration: none;
}
.cart-item-market-link:hover {
  text-decoration: underline;
}
.cart-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.sim-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.ratio-good,
.badge-positive {
  background: #dcfce7;
  color: #166534;
}
.ratio-high,
.badge-warning {
  background: #fef3c7;
  color: #92400e;
}
.ratio-low {
  background: #dbeafe;
  color: #1d4ed8;
}
.cart-remove-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  color: #dc3545;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-remove-btn:hover {
  background: #dc3545;
  color: white;
}
.cart-item-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.cart-item-fields-secondary {
  margin-top: 8px;
}
.cart-item-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #555;
}
.cart-item-fields input,
.cart-item-fields select {
  width: 100%;
}
.cart-item-calc {
  display: flex;
  gap: 16px;
  font-size: 13px;
  padding-top: 8px;
  border-top: 1px solid #eaeef2;
}
.cart-item-calc-secondary {
  margin-top: 8px;
  color: #57606a;
}
.cart-item-logic-panel {
  margin-top: 12px;
  margin-bottom: 0;
}
.profit-positive {
  color: #16a34a;
}
.profit-caution {
  color: #b45309;
}
.profit-negative {
  color: #dc3545;
}
/* Summary */
.sim-summary {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 16px;
}
.sim-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.summary-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.summary-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: white;
  border: 1px solid #d0d7de;
  color: #57606a;
}
.chip-good {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}
.chip-warning {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.summary-label {
  font-size: 12px;
  color: #555;
}
.summary-value {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}
.summary-highlight {
  background: white;
  border-radius: 6px;
  padding: 8px;
  border: 1px solid #86efac;
}
/* ===== Mobile controls (hidden on desktop) ===== */
.controls-row {
  display: contents;
}
.filter-toggle-btn,
.mobile-sort,
.filter-panel {
  display: none;
}
/* Back to top button (mobile only, shown via .visible) */
.scroll-top-btn {
  display: none;
}

.feedback-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.feedback-fab {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #1d4ed8;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  cursor: pointer;
}

.feedback-fab:hover {
  background: #1d4ed8;
}

.feedback-fab-mark {
  display: block;
  width: 26px;
  height: 26px;
}

.feedback-panel {
  width: min(360px, calc(100vw - 32px));
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.feedback-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f5;
}

.feedback-panel-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.feedback-close-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d8dee8;
  border-radius: 50%;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.feedback-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.feedback-form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.feedback-form textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  color: #0f172a;
  font: inherit;
}

.feedback-form textarea:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
  border-color: #2563eb;
}

.feedback-attachment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-attachment-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  padding: 8px 10px;
  color: #1e3a8a;
  font-size: 12px;
}

.feedback-attachment-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-attachment-chip button {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-weight: 700;
  cursor: pointer;
}

.feedback-error,
.feedback-notice {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.feedback-error {
  color: #b91c1c;
}

.feedback-notice {
  color: #15803d;
}

.feedback-capture-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(15, 23, 42, 0.28);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.feedback-capture-toolbar {
  position: fixed;
  top: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  padding: 8px 10px 8px 14px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.feedback-capture-cancel {
  border-radius: 999px;
  padding: 4px 10px;
}

.feedback-capture-selection {
  position: fixed;
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 0 9999px rgba(15, 23, 42, 0.24);
  pointer-events: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  body {
    padding: 8px;
    padding-top: 56px;
  }
  .navbar-inner {
    padding: 0 12px;
    gap: 12px;
  }
  .navbar-links {
    display: none;
  }
  .navbar-menu {
    display: block;
    order: 3;
    flex: 0 0 auto;
  }
  .cart-toggle-btn {
    order: 2;
    margin-left: auto;
  }
  .navbar-menu-btn {
    display: grid;
    place-content: center;
    gap: 4px;
    width: 36px;
    height: 34px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    list-style: none;
  }
  .navbar-menu-btn::-webkit-details-marker {
    display: none;
  }
  .navbar-menu-btn span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: #24292f;
  }
  .navbar-menu-links {
    position: absolute;
    top: 48px;
    left: 8px;
    right: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
  }
  .navbar-menu[open] .navbar-menu-links {
    display: flex;
  }
  .member-nav {
    display: none;
  }
  .navbar-public .member-nav {
    display: flex;
  }
  .member-auth-btn {
    min-width: 58px;
    padding: 0 8px;
  }
  .navbar-link {
    font-size: 13px;
    padding: 6px 8px;
  }
  .container {
    padding: 12px;
    border-radius: 6px;
  }
  h1 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }
  .cards-page-title {
    margin-bottom: 10px;
    font-size: 18px;
  }
  .controls {
    gap: 8px;
    margin-bottom: 12px;
  }
  .member-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .member-auth-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 56px 8px 8px;
  }
  .member-fields {
    grid-template-columns: 1fr;
  }
  .member-actions {
    justify-content: flex-end;
  }
  .filter-input {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
  .clear-all-btn {
    flex: 1 1 100%;
  }
  .controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 100%;
  }
  .filter-toggle-btn {
    display: none;
  }
  .mobile-sort {
    display: flex;
    gap: 4px;
    flex: 1;
  }
  .favorite-filter-btn {
    flex: 1 1 100%;
  }
  .sort-select {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: white;
    color: #555;
  }
  .sort-dir-btn {
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #f6f8fa;
    color: #555;
    cursor: pointer;
    line-height: 1;
  }
  .filter-panel {
    margin-bottom: 12px;
    padding: 12px;
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 8px;
  }
  .filter-panel {
    display: block;
  }
  .filter-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .filter-panel-item {
    min-width: 0;
  }
  .filter-panel-item .filter-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #656d76;
    margin-bottom: 4px;
  }
  .filter-panel-range {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .filter-panel-range input {
    flex: 1;
    min-width: 0;
    padding: 6px;
    font-size: 13px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    text-align: right;
  }
  .filter-panel-range input:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
  }
  .filter-panel-range input.has-value {
    background-color: #ddf4ff;
    border-color: #54aeff;
  }
  .filter-panel-range span {
    color: #8c959f;
    font-size: 11px;
    flex-shrink: 0;
  }
  .filter-panel-range input::-webkit-outer-spin-button,
  .filter-panel-range input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .filter-panel-range input[type="number"] {
    -moz-appearance: textfield;
  }
  /* Hide thead range filters on mobile */
  thead .range-filter {
    display: none !important;
  }
  /* Table → Cards */
  .table-wrapper {
    max-height: none;
    overflow: visible;
  }
  table {
    min-width: 0;
  }
  thead {
    display: none;
  }
  th:first-child,
  td:first-child,
  th:nth-child(2),
  td:nth-child(2),
  #cardTable th:last-child,
  #cardTable td:last-child {
    position: static;
    left: auto;
    right: auto;
    min-width: 0;
    max-width: none;
    width: auto;
    box-shadow: none;
  }
  td:first-child,
  td:nth-child(2),
  #cardTable td:last-child {
    background: transparent;
  }
  tr:hover td:first-child,
  tr:hover td:nth-child(2),
  #cardTable tr:hover td:last-child {
    background: transparent;
  }
  tbody tr {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: white;
  }
  tbody tr:hover {
    background: white;
  }
  td {
    padding: 0;
    border-bottom: none;
  }
  td:nth-child(2) {
    order: -2;
    flex: 0 0 58px;
    padding-right: 10px;
    padding-bottom: 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid #eaeef2;
  }
  .card-img {
    width: 48px;
    height: 67px;
  }
  .card-title {
    order: -1;
    flex: 1 1 calc(100% - 58px);
    min-width: 0;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    padding-bottom: 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid #eaeef2;
  }
  .card-title a {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
  }
  td:nth-child(n + 3) {
    flex: 0 0 50%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 3px 4px;
    font-size: 13px;
  }
  td:nth-child(n + 3)::before {
    content: attr(data-label);
    font-size: 11px;
    color: #656d76;
    flex-shrink: 0;
    margin-right: 6px;
  }
  .action-cell {
    flex: 0 0 100%;
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid #eaeef2;
  }
  .action-cell::before {
    display: none !important;
  }
  .row-actions {
    width: 100%;
  }
  .cart-stepper {
    width: min(100%, 188px);
    grid-template-columns: 30px minmax(62px, 1fr) 30px;
    gap: 5px;
    padding: 5px;
    margin-left: auto;
    border-radius: 12px;
  }
  .favorite-btn {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }
  .cart-stepper-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 14px;
  }
  .cart-stepper-status {
    padding: 4px 0 3px;
    border-radius: 10px;
  }
  .cart-stepper-status-count {
    font-size: 16px;
  }
  .cart-stepper-status-unit {
    font-size: 8px;
  }
  .datetime {
    color: #656d76;
  }
  .inventory-header {
    flex-direction: column;
  }
  .inventory-kpis {
    width: 100%;
    justify-content: stretch;
  }
  .inventory-kpi-group {
    width: 100%;
  }
  .inventory-kpi-row {
    flex-wrap: wrap;
  }
  .inventory-kpi {
    flex: 1 1 120px;
  }
  .inventory-form-grid {
    grid-template-columns: 1fr;
  }
  .inventory-form-wide {
    grid-column: auto;
  }
  .inventory-package-common-fields {
    grid-template-columns: 1fr;
  }
  .inventory-package-row {
    grid-template-columns: 1fr;
  }
  .inventory-package-row-head {
    display: none;
  }
  .inventory-package-price {
    text-align: left;
  }
  .inventory-list .controls {
    align-items: stretch;
  }
  .inventory-filter-field,
  .inventory-filter-search,
  .inventory-count {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
  .inventory-list .action-header,
  .inventory-list .action-cell {
    position: static;
    right: auto;
    box-shadow: none;
  }
  .inventory-list tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .inventory-list table {
    width: 100%;
    min-width: 0;
  }
  .inventory-list td {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .inventory-list td:nth-child(2),
  .inventory-list td:first-child {
    order: 0;
    flex: initial;
    padding: 0;
    margin: 0;
    border-bottom: none;
  }
  .inventory-list .inventory-list-primary {
    order: -3;
    grid-column: 1 / -1;
    border-bottom: 1px solid #eaeef2;
    padding-bottom: 8px;
  }
  .inventory-list .inventory-list-media {
    order: -2;
  }
  .inventory-list .action-cell {
    grid-column: 1 / -1;
    border-top: 1px solid #eaeef2;
    padding-top: 8px;
  }
  .inventory-list .row-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .inventory-list .row-actions > * {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
  .inventory-profit-preview {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }
  .inventory-financial-preview-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .inventory-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    border-top: 1px solid #d8dee4;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 0 0;
  }
  /* Simulation responsive */
  .sim-settings-grid {
    grid-template-columns: 1fr;
  }
  .sim-mode-toggle {
    flex-direction: column;
  }
  .cart-item-fields,
  .cart-item-calc,
  .cart-item-calc-secondary,
  .sim-summary-header {
    flex-direction: column;
    gap: 8px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Back to top button */
  .scroll-top-btn {
    display: flex;
    position: fixed;
    bottom: 88px;
    right: 20px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d0d7de;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-size: 18px;
    color: #555;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .feedback-widget {
    right: 16px;
    bottom: 18px;
  }

  .feedback-fab {
    width: 50px;
    height: 50px;
  }
}
@media (max-width: 400px) {
  td:nth-child(n + 3) {
    flex: 0 0 100%;
  }
  .filter-panel-grid {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

.market-page {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 64px;
  color: #17202a;
}
.market-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 2px solid #17202a;
  padding-bottom: 20px;
}
.market-eyebrow { margin: 0 0 6px; color: #ad4d26; font-size: 12px; font-weight: 800; }
.market-header h1 { margin: 0; font-size: clamp(24px, 3vw, 38px); letter-spacing: 0; }
.market-header p:last-child { margin: 8px 0 0; color: #66717d; }
.market-total { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.market-total strong { font-size: 34px; }
.market-total span { color: #66717d; }
.market-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 12px;
  align-items: end;
  padding: 20px 0;
}
.market-filters label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: #4b5661; }
.market-filters input, .market-filters select {
  min-height: 42px;
  border: 1px solid #b8c1ca;
  border-radius: 4px;
  background: #fff;
  padding: 0 12px;
  font: inherit;
}
.market-filters button {
  min-height: 42px;
  border: 1px solid #17202a;
  border-radius: 4px;
  background: #17202a;
  color: #fff;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
}
.market-clear-filters {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8c1ca;
  border-radius: 4px;
  padding: 0 16px;
  color: #4b5661;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.market-clear-filters:hover { background: #f1f4f6; }
.snkrdunk-market-filters { grid-template-columns: minmax(260px, 1fr) 180px auto auto; }
.market-table-wrap { overflow-x: auto; border-top: 1px solid #cfd5db; }
.market-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.snkrdunk-market-table { min-width: 1120px; }
.market-table th { padding: 11px 12px; background: #f1f4f6; color: #5b6670; font-size: 12px; text-align: left; }
.market-table td { padding: 13px 12px; border-bottom: 1px solid #dce1e5; vertical-align: middle; }
.market-table tbody tr { content-visibility: auto; contain-intrinsic-size: auto 100px; }
.market-card-cell { display: grid; grid-template-columns: 54px minmax(220px, 1fr); gap: 13px; align-items: center; }
.market-card-cell strong, .market-card-cell span { display: block; }
.market-card-cell span { margin-top: 5px; color: #707a84; font-size: 12px; }
.market-image-frame { width: 54px; height: 74px; display: grid; place-items: center; overflow: hidden; background: #edf0f2; color: #8b949d; font-size: 8px; }
.market-image-frame img { width: 100%; height: 100%; object-fit: contain; }
.market-price { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.market-confidence { display: block; margin-top: 4px; color: #7a838c; font-size: 10px; font-weight: 700; white-space: nowrap; }
.market-confidence.verified { color: #126b3b; }
.market-confidence.inferred { color: #8b5a1f; }
.market-table small { display: block; margin-top: 3px; color: #7a838c; }
.market-change { display: inline-flex; min-width: 66px; justify-content: center; padding: 5px 8px; border-radius: 3px; font-weight: 700; font-variant-numeric: tabular-nums; }
.market-change.up { background: #e6f4ec; color: #126b3b; }
.market-change.down { background: #fbe9e7; color: #a33128; }
.market-change.neutral { background: #eef1f3; color: #66717d; font-size: 11px; }
.market-empty { border-block: 1px solid #d5dbe0; padding: 54px 20px; text-align: center; color: #66717d; }
.market-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 22px; }
.market-pagination a:last-child { justify-self: end; }
.market-pagination a { color: #1c5d86; font-weight: 700; }
.market-disclaimer { margin: 24px 0 0; color: #737d86; font-size: 12px; }
.snkrdunk-market-status {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #d5dbe0;
  padding: 12px 0;
  color: #66717d;
  font-size: 12px;
}
.snkrdunk-market-status strong { color: #17202a; }
.snkrdunk-market-status span:last-child { margin-left: auto; }
.market-missing { color: #8a949e; font-size: 12px; font-weight: 600; white-space: nowrap; }
.snkrdunk-sortable > a {
  display: inline-flex;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.snkrdunk-sortable[aria-sort="ascending"] > a,
.snkrdunk-sortable[aria-sort="descending"] > a { color: #17202a; }
.snkrdunk-source-link { display: block; margin-top: 5px; color: #1c5d86; font-size: 11px; font-weight: 700; text-decoration: none; }
.snkrdunk-price-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0; background: #d5dbe0; border: 1px solid #d5dbe0; }
.snkrdunk-price-summary article { display: grid; gap: 6px; background: #fff; padding: 18px; }
.snkrdunk-price-summary span { color: #66717d; font-size: 12px; font-weight: 700; }
.snkrdunk-price-summary strong { font-size: clamp(18px, 2vw, 26px); font-variant-numeric: tabular-nums; }
.market-chart-section { margin-top: 34px; }
.market-chart-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.market-chart-heading h2 { margin: 4px 0 0; font-size: clamp(21px, 2.2vw, 28px); letter-spacing: -.025em; }
.snkrdunk-chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; border: 1px solid #d9dfe3; border-bottom: 0; border-radius: 10px 10px 0 0; padding: 10px 14px; color: #17202a; background: #fff; }
.snkrdunk-chart-mode { color: #59636c; font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.snkrdunk-chart-series-summaries { display: flex; gap: 8px; }
.snkrdunk-chart-figure .psa10 { --snkrdunk-series-color: #bd5a30; }
.snkrdunk-chart-figure .condition-a { --snkrdunk-series-color: #24788d; }
.snkrdunk-chart-series-summary { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; min-width: 188px; border: 1px solid #dce2e6; border-left: 3px solid var(--snkrdunk-series-color); border-radius: 7px; padding: 8px 10px; background: #f8fafb; }
.snkrdunk-chart-series-summary > span { color: #68737d; font-size: 10px; font-weight: 800; }
.snkrdunk-chart-series-summary strong { grid-column: 1; font-size: 13px; font-variant-numeric: tabular-nums; }
.snkrdunk-chart-series-summary small { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #59636c; font-size: 10px; font-weight: 700; }
.snkrdunk-history-chart { min-height: 300px; }
.chart-grid-line { fill: none; stroke: #e4e9ed; stroke-width: 1; }
.snkrdunk-chart-axis text { fill: #66717d; font-size: 11px; font-variant-numeric: tabular-nums; }
.snkrdunk-chart-axis .chart-grid-line { vector-effect: non-scaling-stroke; }
.snkrdunk-chart-axis .snkrdunk-chart-axis-title { fill: #35404a; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.snkrdunk-chart-line { fill: none; stroke: var(--snkrdunk-series-color); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.snkrdunk-chart-trade-point { fill: var(--snkrdunk-series-color); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.snkrdunk-chart-hit-area { fill: transparent; cursor: crosshair; }
.snkrdunk-chart-cursor { pointer-events: none; }
.snkrdunk-chart-cursor line { stroke: #59636c; stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.snkrdunk-chart-cursor circle { fill: var(--snkrdunk-series-color); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.snkrdunk-chart-tooltip dt::before { background: var(--snkrdunk-series-color); }
@media (max-width: 760px) {
  .market-page { width: min(100% - 24px, 1440px); padding-top: 24px; }
  .market-header { align-items: start; }
  .market-header p:last-child { font-size: 13px; }
  .market-total strong { font-size: 25px; }
  .market-filters { grid-template-columns: 1fr 1fr; }
  .snkrdunk-market-filters { grid-template-columns: 1fr 1fr; }
  .market-filters label:first-child { grid-column: 1 / -1; }
  .market-filters button, .market-clear-filters { align-self: end; }
  .snkrdunk-market-status { align-items: flex-start; flex-wrap: wrap; }
  .snkrdunk-market-status span:last-child { width: 100%; margin-left: 0; }
  .snkrdunk-price-summary { grid-template-columns: 1fr; }
  .snkrdunk-chart-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .snkrdunk-chart-series-summaries { display: grid; grid-template-columns: 1fr 1fr; }
  .snkrdunk-chart-series-summary { min-width: 0; }
}
.market-card-cell a { color: inherit; text-decoration: none; }
.market-card-cell a:hover { text-decoration: underline; }
.market-back { display: inline-block; margin-bottom: 22px; color: #1c5d86; font-weight: 700; text-decoration: none; }
.market-detail-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; border-bottom: 2px solid #17202a; padding-bottom: 24px; }
.market-detail-identity { display: flex; gap: 20px; align-items: center; min-width: 0; }
.market-detail-identity h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: 0; }
.market-detail-identity p:last-child { margin: 7px 0 0; color: #66717d; }
.market-detail-image { width: 96px; height: 132px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; background: #edf0f2; color: #7a848e; font-size: 10px; }
.market-detail-image img { width: 100%; height: 100%; object-fit: contain; }
.market-detail-side { display: grid; justify-items: end; gap: 12px; }
.market-detail-latest { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.market-sold-link { display: inline-flex; min-height: 38px; align-items: center; border: 1px solid #17202a; border-radius: 4px; padding: 0 13px; color: #17202a; font-size: 13px; font-weight: 800; text-decoration: none; }
.market-sold-link:hover { background: #17202a; color: #fff; }
.market-detail-latest > span { color: #66717d; font-size: 13px; font-weight: 700; }
.market-detail-latest strong { font-size: 36px; font-variant-numeric: tabular-nums; }
.market-detail-latest small { font-weight: 800; }
.market-detail-latest small.up { color: #126b3b; }
.market-detail-latest small.down { color: #a33128; }
.market-detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #cfd5db; }
.market-detail-metrics div { display: grid; gap: 5px; padding: 20px 22px; border-right: 1px solid #dce1e5; }
.market-detail-metrics div:last-child { border-right: 0; }
.market-detail-metrics span { color: #66717d; font-size: 12px; font-weight: 700; }
.market-detail-metrics strong { font-size: 22px; }
.market-detail-section { padding-top: 34px; }
.market-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; margin-bottom: 15px; }
.market-section-heading h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.market-section-heading span { color: #727c85; font-size: 12px; }
.market-chart-wrap { border-block: 1px solid #d7dde2; padding: 18px 16px 10px; }
.market-chart-legend { display: flex; justify-content: flex-end; gap: 18px; color: #59636c; font-size: 12px; font-weight: 700; }
.market-chart-legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 7px; vertical-align: middle; background: #1c6b8c; }
.market-chart-legend .minimum::before { background: #b45630; }
.market-chart { display: block; width: 100%; height: clamp(240px, 34vw, 420px); overflow: visible; }
.market-chart-grid { stroke: #e1e5e8; stroke-width: 0.35; }
.market-chart-line { fill: none; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.market-chart-line.median { stroke: #1c6b8c; }
.market-chart-line.minimum { stroke: #b45630; }
.market-chart-point { fill: #1c6b8c; stroke: #fff; stroke-width: 0.7; vector-effect: non-scaling-stroke; }
.market-chart-axis { display: flex; justify-content: space-between; color: #727c85; font-size: 11px; }
.market-chart-empty { display: grid; gap: 7px; place-items: center; min-height: 180px; border-block: 1px solid #d7dde2; color: #66717d; text-align: center; }
.market-chart-empty strong { color: #35404a; }
.market-history-table { min-width: 660px; }
.visually-hidden { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; border: 0; margin: -1px; padding: 0; white-space: nowrap; }
.inventory-bulk-page { gap: 0; width: calc(100% + 40px); height: calc(100vh - 68px); min-height: 0; margin-inline: -20px; background: #f1f1f1; }
.inventory-bulk-header { position: sticky; z-index: 4; top: 48px; display: grid; grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: 36px auto; align-items: center; column-gap: 24px; min-height: 56px; border-bottom: 1px solid #d8dee4; background: rgba(255,255,255,.98); padding: 8px 16px; box-shadow: 0 1px 2px rgba(31,35,40,.05); backdrop-filter: blur(12px); }
.inventory-bulk-heading, .inventory-bulk-primary-actions { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.inventory-bulk-heading { grid-column: 1; grid-row: 1; }
.inventory-bulk-actions { display: grid; grid-column: 2; grid-row: 1 / span 2; min-width: 0; justify-self: end; justify-items: start; gap: 3px; }
.inventory-bulk-primary-actions { max-width: 100%; }
.inventory-bulk-heading a { color: #303030; font-size: 13px; font-weight: 600; text-decoration: none; }
.inventory-bulk-heading > span { width: 1px; height: 32px; background: #d8dee4; }
.inventory-bulk-heading strong { font-size: 14px; }
.inventory-bulk-primary-actions > :is(span, output) { color: #59636c; font-size: 12px; font-weight: 700; white-space: nowrap; }
.inventory-bulk-csv-buttons { display: flex; gap: 8px; }
.inventory-bulk-action-divider { width: 1px; height: 24px; flex: 0 0 1px; background: #d8dee4; }
.inventory-bulk-template-link { width: fit-content; border: 0; background: transparent; margin-inline-start: 3px; padding: 0; color: #66717d; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; line-height: 1.4; text-decoration: underline; text-decoration-color: #8c959f; text-underline-offset: 2px; }
.inventory-bulk-template-link:hover { color: #005bd3; }
.inventory-bulk-template-link:focus-visible { border-radius: 2px; outline: 2px solid #005bd3; outline-offset: 2px; }
.inventory-bulk-help-links { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.inventory-bulk-selection-status { border-radius: 999px; background: #eaf4ff; padding: 5px 9px; color: #005bd3 !important; }
.inventory-bulk-instructions { border-bottom: 1px solid #d8dee4; background: #fff; padding: 7px 16px; color: #616161; font-size: 12px; }
.inventory-bulk-message { display: block; border-bottom: 1px solid #b6d7fe; background: #ddf4ff; padding: 9px 16px; color: #0550ae; font-size: 13px; }
.psa-bulk-submission { margin: 0; border: 0; border-bottom: 1px solid #d8dee4; background: #fff; padding: 12px 16px 16px; }
.psa-bulk-submission legend { padding-top: 12px; color: #303030; font-size: 14px; font-weight: 700; }
.psa-bulk-submission small { color: #66717d; font-size: 11px; font-weight: 400; }
.inventory-bulk-sheet { min-height: 0; flex: 1 1 auto; overflow: auto; background: #fff; }
.inventory-bulk-sheet table { width: 100%; min-width: 1220px; border-collapse: separate; border-spacing: 0; }
.psa-bulk-sheet table { min-width: 820px; }
.inventory-bulk-sheet caption { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.inventory-bulk-sheet th { position: sticky; z-index: 2; top: 0; background: #f7f7f7; color: #303030; font-size: 12px; font-weight: 600; text-align: left; }
.inventory-bulk-sheet th, .inventory-bulk-sheet td { border-right: 1px solid #d8dee4; border-bottom: 1px solid #d8dee4; padding: 0; }
.inventory-bulk-sheet input { width: 100%; min-width: 128px; min-height: 39px; border: 0; border-radius: 0; background: transparent; padding: 8px 10px; color: #303030; font-size: 13px; }
.inventory-bulk-select-trigger { display: flex; width: 100%; min-width: 128px; min-height: 39px; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 0; background: transparent; padding: 8px 10px; color: #303030; font-size: 13px; text-align: left; }
.inventory-bulk-select-trigger .is-empty { color: #afb5bb; }
.inventory-bulk-select-chevron { position: relative; width: 12px; height: 18px; flex: 0 0 12px; color: #59636c; }
.inventory-bulk-select-chevron::before, .inventory-bulk-select-chevron::after { position: absolute; left: 2px; width: 8px; height: 8px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; content: ""; }
.inventory-bulk-select-chevron::before { top: 2px; transform: rotate(45deg); }
.inventory-bulk-select-chevron::after { bottom: 2px; transform: rotate(225deg); }
.inventory-bulk-select-dropdown { border-radius: 6px; }
.inventory-bulk-sheet input:focus { position: relative; z-index: 1; outline: 2px solid #005bd3; outline-offset: -2px; background: #fff; }
.inventory-bulk-sheet tr.is-changed td { background: #fff8c5; }
.inventory-bulk-sheet td.is-selected { position: relative; background: #eaf4ff !important; box-shadow: inset 2px 0 #005bd3, inset -2px 0 #005bd3; }
.inventory-bulk-sheet td.is-selected input { background: transparent; }
.inventory-bulk-sheet td.is-selected .inventory-bulk-select-trigger { background: transparent; }
.inventory-bulk-select-trigger:focus-visible { position: relative; z-index: 1; outline: 2px solid #005bd3; outline-offset: -2px; }
.inventory-bulk-sheet td:focus-visible { z-index: 3; outline: 2px solid #005bd3; outline-offset: -2px; }
.inventory-bulk-fill-handle { position: absolute; z-index: 5; right: -5px; bottom: -5px; width: 10px; min-width: 10px; height: 10px; min-height: 10px; border: 1px solid #fff; border-radius: 1px; background: #005bd3; cursor: crosshair; padding: 0; }
.inventory-bulk-fill-handle:hover { background: #004299; }
.inventory-bulk-row-number { width: 42px; min-width: 42px; padding-inline: 9px !important; text-align: right !important; }
.inventory-bulk-sheet tbody .inventory-bulk-row-number { background: #f7f7f7; color: #8c959f; font-weight: 600; }
.inventory-bulk-empty { padding: 48px; color: #66717d; text-align: center; }
@media (max-width: 1180px) {
  .inventory-bulk-header { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 6px; }
  .inventory-bulk-heading { grid-column: 1; grid-row: 1; }
  .inventory-bulk-actions { grid-column: 1; grid-row: 2; width: 100%; justify-self: stretch; overflow-x: auto; }
  .inventory-bulk-primary-actions { width: max-content; }
}
@media (max-width: 760px) {
  .inventory-bulk-page { height: auto; min-height: calc(100vh - 68px); }
  .inventory-bulk-header { position: static; }
  .inventory-bulk-sheet { max-height: none; }
  .market-detail-header { align-items: start; }
  .market-detail-image { width: 72px; height: 99px; }
  .market-detail-latest strong { font-size: 27px; }
  .market-detail-metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .market-detail-header { display: grid; }
  .market-detail-side, .market-detail-latest { justify-items: start; }
}

/* ===== Keepa release research: Commerce Hub tone ===== */
.release-research-page {
  width: min(1440px, calc(100% - 40px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 36px 0 64px;
  color: #17202a;
  background: transparent;
  font-family: sans-serif;
}
.release-research-page :where(a, button, input, select):focus-visible {
  outline: 3px solid rgba(9, 105, 218, 0.28);
  outline-offset: 2px;
}
.release-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #17202a;
}
.release-kicker,
.release-section-heading p,
.release-detail-subheading p,
.release-console-label {
  margin: 0 0 6px;
  color: #ad4d26;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.release-hero h1,
.release-error-page h1 {
  max-width: none;
  margin: 0;
  color: #17202a;
  font-family: sans-serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}
.release-lead { max-width: 720px; margin: 8px 0 0; color: #66717d; font-size: 14px; line-height: 1.65; }
.release-signal {
  min-width: 176px;
  padding: 12px 16px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  color: #24292f;
  background: #fff;
  box-shadow: none;
}
.release-signal span { color: #6a737d; font-size: 11px; }
.release-signal strong { margin-top: 2px; color: #24292f; font-size: 28px; line-height: 1.1; }
.release-signal small { margin-top: 3px; color: #6a737d; font-size: 11px; }
.release-date-console {
  grid-template-columns: minmax(190px, auto) 1fr;
  gap: 24px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  color: #24292f;
  background: #fff;
}
.release-date-console time { color: #24292f; font-family: sans-serif; font-size: 22px; }
.release-date-console .release-console-label { color: #6a737d; }
.release-collection-status,
.release-product-collection-notice {
  display: flex;
  align-items: center;
}
.release-collection-status {
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 0;
  color: #66717d;
  font-size: 11px;
}
.release-collection-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ad4d26;
  box-shadow: 0 0 0 3px rgb(173 77 38 / 12%);
}
.release-collection-status strong {
  margin-right: 2px;
  color: #ad4d26;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.release-collection-status.is-loading > span {
  animation: release-collection-pulse 1.2s ease-in-out infinite;
}
@keyframes release-collection-pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.75);
  }
}
@media (prefers-reduced-motion: reduce) {
  .release-collection-status.is-loading > span {
    animation: none;
  }
}
.release-date-actions { justify-content: end; }
.release-date-actions > a { color: #0969da; font-size: 13px; }
.release-date-form { gap: 8px; }
.release-date-form label { color: #4b5661; font-size: 12px; }
.release-date-select {
  position: relative;
  min-width: 0;
  border: 1px solid #b8c1ca;
  border-radius: 6px;
  color: #24292f;
  background: #fff;
  box-shadow: 0 1px 2px rgb(31 35 40 / 6%);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.release-date-select:hover { border-color: #8c959f; }
.release-date-select:focus-within {
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgb(9 105 218 / 14%);
}
.release-date-select select {
  width: 100%;
  min-height: 40px;
  appearance: none;
  border: 0;
  border-radius: inherit;
  padding: 0 38px 0 40px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.release-date-select select:focus-visible { outline: 0; }
.release-date-select-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  fill: none;
  stroke: #66717d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  pointer-events: none;
}
.release-date-select-chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #66717d;
  border-bottom: 1.5px solid #66717d;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
@media (forced-colors: active) {
  .release-date-select:focus-within {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
.release-date-form button {
  min-height: 40px;
  border: 1px solid #0969da;
  border-radius: 4px;
  padding: 0 16px;
  color: #fff;
  background: #0969da;
}
.release-date-form button:hover { background: #0757b5; }
.release-range-controls {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #d8dee4;
}
.release-range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.release-range-presets a {
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid #b8c1ca;
  border-radius: 999px;
  color: #4b5661;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.release-range-presets a:hover { border-color: #0969da; color: #0969da; }
.release-range-presets a[aria-current="true"] {
  border-color: #0969da;
  color: #fff;
  background: #0969da;
}
.release-custom-range-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.release-custom-range-form label {
  display: grid;
  gap: 4px;
  color: #4b5661;
  font-size: 11px;
  font-weight: 700;
}
.release-custom-range-form input {
  min-height: 38px;
  border: 1px solid #b8c1ca;
  border-radius: 6px;
  padding: 0 10px;
  color: #24292f;
  background: #fff;
  font: inherit;
}
.release-custom-range-form button {
  min-height: 38px;
  border: 1px solid #0969da;
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  background: #0969da;
  font: inherit;
  font-weight: 700;
}
.release-custom-range-form small { align-self: center; color: #66717d; font-size: 10px; }
.release-category-section { padding-top: 34px; }
.release-section-heading { align-items: end; padding-bottom: 12px; }
.release-section-heading h2 { margin: 0; color: #24292f; font-size: 22px; }
.release-section-heading > span { color: #727c85; font-size: 12px; }
.release-workbench { grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.7fr); gap: 24px; padding-top: 36px; }
.release-section-heading.compact { padding-bottom: 12px; border-bottom: 1px solid #cfd5db; }
.release-section-heading.compact h2,
.release-detail-panel { scroll-margin-top: 96px; }
.release-product-group > header { padding: 16px 10px 8px; border-bottom: 1px solid #dce1e5; }
.release-product-group h3 { color: #24292f; font-size: 13px; }
.release-product-group header span { color: #0969da; font-size: 11px; }
.release-product-link {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  block-size: 76px;
  padding: 9px 10px;
  border-bottom: 1px solid #e1e5e8;
  background: #fff;
}
.release-product-link:hover,
.release-product-link.selected { transform: none; background: #f6f8fa; }
.release-product-link.selected { box-shadow: inset 3px 0 0 #0969da; }
.release-product-thumb { width: 48px; height: 48px; border-radius: 4px; background: #edf0f2; }
.release-product-copy strong { color: #24292f; font-size: 12px; line-height: 1.45; }
.release-product-copy small { color: #707a84; font-size: 10px; }
.release-product-link > b { color: #0969da; font-size: 12px; }
.release-product-empty { border-bottom-color: #e1e5e8; color: #66717d; background: #fff; }
.release-detail-panel {
  top: 68px;
  max-block-size: calc(100dvh - 88px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 24px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  color: #24292f;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.release-detail-panel:focus-visible { outline: 3px solid rgba(9, 105, 218, 0.28); outline-offset: 2px; }
.release-detail-label { margin-bottom: 18px; color: #6a737d; font-family: sans-serif; font-size: 11px; letter-spacing: 0; }
.release-detail-header { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 24px; }
.release-detail-image { border: 1px solid #e1e5e8; border-radius: 6px; background: #f6f8fa; }
.release-detail-title > p { color: #66717d; font-size: 11px; letter-spacing: 0; }
.release-detail-title h2 { color: #24292f; font-family: sans-serif; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.4; }
.release-detail-title dl { margin-top: 20px; border-color: #dce1e5; }
.release-detail-title dl div { border-color: #dce1e5; }
.release-detail-title dt { color: #66717d; }
.release-detail-title dd { color: #24292f; }
.release-chart-section { padding-top: 30px; }
.release-detail-subheading h3 { margin: 0; color: #24292f; font-size: 20px; }
.release-chart-legend { color: #59636c; font-size: 11px; }
.release-chart-legend span::before { background: #1c6b8c; }
.release-chart-legend .buyBox::before { background: #b45630; }
.release-chart-legend .amazon::before { background: #7b61a8; }
.release-chart-legend .salesRank::before { background: #4b9560; }
.release-price-chart { aspect-ratio: 4 / 1; height: auto; border: 1px solid #d7dde2; background: #fff; }
.release-chart-gridline { stroke: #e1e5e8; }
.release-chart-axis-line { stroke: #b8c1ca; stroke-width: 0.35; }
.release-chart-y-label { fill: #727c85; font-size: 2.15px; font-variant-numeric: tabular-nums; }
.release-chart-line { stroke: #1c6b8c; }
.release-chart-line.buyBox { stroke: #b45630; }
.release-chart-line.amazon { stroke: #7b61a8; }
.release-chart-line.salesRank { stroke: #4b9560; }
.release-chart-axis,
.release-chart-figure figcaption { color: #727c85; }
.release-chart-empty { border-color: #d7dde2; color: #66717d; }
.release-market-links { gap: 8px; margin-top: 24px; border: 0; }
.release-market-links a {
  min-height: 40px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  color: #0969da;
  background: #fff;
  font-size: 12px;
}
.release-market-links a:first-child { color: #fff; border-color: #0969da; background: #0969da; }
.release-market-links a:hover { color: #24292f; background: #f6f8fa; }
.release-detail-empty h2 { color: #24292f; font-family: sans-serif; }
.release-detail-empty p { color: #66717d; }
.release-data-note { border-top: 1px solid #cfd5db; }
.release-data-note span { border-radius: 3px; color: #4b5661; background: #eef1f3; font-family: sans-serif; }
.release-data-note p { color: #737d86; }
.release-error-page div[role="alert"] { border-left-color: #dc3545; }
.release-loading-page { display: grid; align-content: start; gap: 24px; }
.release-loading-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #17202a;
}
.release-loading-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ad4d26;
  box-shadow: 0 0 0 0 rgba(173, 77, 38, 0.32);
  animation: release-loading-pulse 1.8s ease-out infinite;
}
.release-loading-status {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 20px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
}
.release-loading-status strong { color: #24292f; font-size: 16px; }
.release-loading-status p { margin: 5px 0 0; color: #66717d; font-size: 13px; line-height: 1.6; }
.release-loading-spinner {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 3px solid #d8dee4;
  border-top-color: #0969da;
  border-radius: 50%;
  animation: release-loading-spin 0.9s linear infinite;
}
.release-loading-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.release-loading-grid span {
  min-height: 122px;
  border: 1px solid #e1e5e8;
  border-radius: 6px;
  background: linear-gradient(100deg, #f6f8fa 30%, #eef1f4 50%, #f6f8fa 70%);
  background-size: 220% 100%;
  animation: release-loading-shimmer 1.8s ease-in-out infinite;
}
.release-detail-error { border-left: 3px solid #d29922; padding-left: 18px; }
.release-detail-error > span { color: #9a6700; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.release-detail-loading {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #24292f;
}
.release-detail-loading p { margin: 4px 0 0; color: #66717d; font-size: 12px; }
@keyframes release-loading-spin { to { transform: rotate(1turn); } }
@keyframes release-loading-pulse { 70%, 100% { box-shadow: 0 0 0 12px rgba(173, 77, 38, 0); } }
@keyframes release-loading-shimmer { to { background-position-x: -220%; } }
@media (prefers-reduced-motion: reduce) {
  .release-loading-pulse,
  .release-loading-spinner,
  .release-loading-grid span { animation: none; }
}
@media (max-width: 1050px) {
  .release-loading-grid { grid-template-columns: repeat(3, 1fr); }
  .release-workbench { grid-template-columns: 1fr; }
  .release-detail-panel { position: static; }
}
@media (max-width: 720px) {
  .release-research-page { width: min(100% - 24px, 1440px); padding: 24px 0 48px; }
  .release-hero { display: grid; align-items: start; }
  .release-signal { width: 100%; }
  .release-date-console { grid-template-columns: 1fr; padding: 16px; }
  .release-date-actions { grid-template-columns: 1fr 1fr; }
  .release-date-form { grid-column: 1 / -1; grid-row: 1; }
  .release-loading-grid { grid-template-columns: repeat(2, 1fr); }
  .release-detail-panel { padding: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
  .release-detail-header { grid-template-columns: 1fr; }
  .release-market-links { grid-template-columns: 1fr 1fr; }
  .release-market-links a:first-child { grid-column: 1 / -1; }
}

/* Release research layout primitives */
.release-research-page {
  --release-line: #d8dee4;
}
.release-hero > div:first-child { min-width: 0; }
.release-hero h1 { text-wrap: balance; }
.release-signal {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 0 7px;
  flex: 0 0 auto;
}
.release-signal strong { grid-row: span 2; font-variant-numeric: tabular-nums; }
.release-signal small { grid-column: 1; }
.release-date-console { display: grid; align-items: center; }
.release-date-console time { display: block; font-weight: 700; letter-spacing: -0.02em; }
.release-date-actions {
  display: grid;
  grid-template-columns: auto minmax(280px, auto) auto;
  align-items: end;
  gap: 12px;
}
.release-date-actions > a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--release-line);
  border-radius: 6px;
  padding: 0 12px;
  background: #f6f8fa;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.release-date-actions > a:hover { border-color: #b8c1ca; background: #eef2f6; }
.release-date-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  align-items: end;
}
.release-date-form label { grid-column: 1 / -1; font-weight: 700; }
.release-date-form button { font: inherit; font-weight: 700; cursor: pointer; }
.release-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.release-section-heading h2 { text-wrap: balance; }
.release-matrix-shell {
  position: relative;
  overflow-x: auto;
  margin-top: 2px;
  border: 1px solid var(--release-line);
  border-radius: 8px;
  background: #fff;
  scrollbar-gutter: stable;
  overscroll-behavior-inline: contain;
}
.release-matrix-shell:focus-visible {
  outline: 3px solid rgba(9, 105, 218, 0.28);
  outline-offset: 2px;
}
.release-matrix {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  table-layout: fixed;
}
.release-matrix :where(th, td) {
  padding: 0;
  border-right: 1px solid #e1e5e8;
  border-bottom: 1px solid #e1e5e8;
  text-align: start;
}
.release-matrix :where(th, td):last-child { border-right: 0; }
.release-matrix tbody tr:last-child :where(th, td) { border-bottom: 0; }
.release-matrix thead th {
  position: static;
  top: auto;
  width: 104px;
  min-width: 0;
  max-width: none;
  color: #66717d;
  background: #f6f8fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  cursor: default;
  user-select: text;
}
.release-matrix thead th:first-child {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 220px;
  padding: 0 16px;
  color: #4b5661;
  text-align: start;
}
.release-matrix thead th.anchor { box-shadow: inset 0 3px 0 #ad4d26; }
.release-matrix thead th[data-selected="true"] { background: #eaf3ff; }
.release-matrix thead a {
  display: grid;
  min-height: 70px;
  align-content: center;
  gap: 5px;
  padding: 10px;
  color: inherit;
  text-decoration: none;
}
.release-matrix thead a:hover { color: #0969da; background: #eef5ff; }
.release-matrix thead time {
  color: #24292f;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.release-matrix tbody th {
  position: sticky;
  z-index: 2;
  left: 0;
  padding: 12px 16px;
  background: #fff;
  cursor: default;
  user-select: text;
}
.release-matrix tbody th:hover { background: #fff; }
.release-matrix tbody th span {
  display: block;
  margin-bottom: 3px;
  color: #ad4d26;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.release-matrix tbody th strong {
  color: #35404a;
  font-size: 12px;
  line-height: 1.35;
}
.release-matrix tbody td {
  position: static;
  left: auto;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 64px;
  background: #fff;
  box-shadow: none;
  text-align: center;
}
.release-matrix tbody td.anchor { background: rgba(173, 77, 38, 0.035); }
.release-matrix tbody td[data-selected="true"] { background: #f2f7ff; }
.release-matrix tbody td > a {
  display: flex;
  min-height: 64px;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  padding: 12px 8px;
  color: #0969da;
  text-decoration: none;
}
.release-matrix tbody td > a:hover { background: rgba(9, 105, 218, 0.08); }
.release-matrix tbody td > a strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.release-matrix tbody td > a span { color: #66717d; font-size: 9px; }
.release-matrix-loading,
.release-matrix-unavailable {
  display: grid;
  min-height: 64px;
  place-items: center;
  color: #8c959f;
  font-size: 9px;
}
.release-matrix-loading {
  gap: 4px;
}
.release-matrix-loading .release-loading-spinner {
  width: 12px;
  height: 12px;
}
.release-matrix-scroll-hint {
  display: block;
  margin: 0;
  padding: 7px 12px;
  color: #66717d;
  background: #f6f8fa;
  font-size: 9px;
  text-align: end;
}
.release-workbench {
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(0, 1.15fr);
  align-items: start;
}
.release-product-rail { min-width: 0; }
.release-category-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
  overflow-x: auto;
  border: 1px solid #cbd4dc;
  border-bottom: 0;
  background: #f6f8fa;
}
.release-category-tabs > a {
  display: grid;
  min-width: 76px;
  gap: 2px;
  border-right: 1px solid #dce1e5;
  padding: 10px 8px 9px;
  color: #66717d;
  text-align: center;
  text-decoration: none;
}
.release-category-tabs > a:last-child { border-right: 0; }
.release-category-tabs > a:hover { background: #fff; }
.release-category-tabs > a.selected {
  position: relative;
  color: #0969da;
  background: #fff;
  box-shadow: inset 0 3px 0 #ad4d26;
}
.release-category-tabs small {
  color: #ad4d26;
  font-size: 8px;
  font-weight: 800;
}
.release-category-tabs strong { font-size: 11px; line-height: 1.25; }
.release-category-tabs span { font-size: 9px; font-variant-numeric: tabular-nums; }
.release-product-group {
  scroll-margin-top: 72px;
  border: 1px solid #cbd4dc;
}
.release-product-group > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.release-product-heading { min-width: 0; }
.release-product-group h3 { margin: 0; }
.release-product-group ul { margin: 0; padding: 0; list-style: none; }
.release-product-collection-notice {
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  color: #66717d;
  font-size: 10px;
  line-height: 1.4;
}
.release-product-collection-notice.is-loading { color: #ad4d26; }
.release-product-collection-notice > span:last-child { color: inherit; font-size: inherit; }
.release-product-collection-notice .release-loading-spinner {
  width: 12px;
  height: 12px;
  border-width: 2px;
}
.release-product-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 10px;
  border-bottom: 1px solid #dce1e5;
  background: #f6f8fa;
}
.release-product-toolbar label {
  grid-column: 1 / -1;
  color: #66717d;
  font-size: 9px;
  font-weight: 700;
}
.release-product-toolbar input {
  min-width: 0;
  border: 1px solid #afb8c1;
  border-radius: 5px;
  padding: 8px 10px;
  color: #24292f;
  background: #fff;
  font: inherit;
}
.release-product-toolbar input:focus-visible {
  border-color: #0969da;
  outline: 2px solid rgba(9, 105, 218, 0.24);
  outline-offset: 1px;
}
.release-product-toolbar > span {
  color: #66717d;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.release-product-list-viewport {
  max-block-size: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.release-product-list-spacer { pointer-events: none; }
.release-product-date-divider {
  display: flex;
  block-size: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #d8dee4;
  color: #24292f;
  background: #f6f8fa;
  font-size: 12px;
  font-weight: 700;
}
.release-product-date-divider span { color: #66717d; font-size: 10px; }
.release-product-link {
  display: grid;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.release-product-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #8c959f;
  font-size: 8px;
}
.release-product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.release-product-copy { min-width: 0; }
.release-product-copy strong,
.release-product-copy small { display: block; }
.release-product-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.release-product-link > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.release-product-empty { margin: 0; padding: 18px 10px; border-bottom: 1px solid; }
.release-product-empty-muted { color: #66717d; background: #f6f8fa; }
.release-detail-panel { position: sticky; min-width: 0; }
.release-detail-header { display: grid; align-items: start; }
.release-detail-image {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  color: #8c959f;
  font-size: 10px;
}
.release-detail-image img { width: 100%; height: 100%; object-fit: contain; }
.release-detail-title { min-width: 0; }
.release-detail-title h2 { margin: 6px 0 0; text-wrap: pretty; }
.release-detail-title dl { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid; }
.release-detail-title dl div { padding: 12px 10px; border-bottom: 1px solid; }
.release-detail-title dl div:nth-child(odd) { border-right: 1px solid; }
.release-detail-title dt { font-size: 11px; }
.release-detail-title dd { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
.release-detail-subheading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.release-chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.release-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.release-chart-figure { margin: 14px 0 0; }
.release-chart-interaction {
  position: relative;
  overflow: hidden;
  border: 1px solid #cbd4dc;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(9, 105, 218, 0.035), transparent 44%),
    #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.release-price-chart {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: crosshair;
  touch-action: pan-y;
}
.release-price-chart:focus-visible {
  outline: 3px solid rgba(9, 105, 218, 0.36);
  outline-offset: -3px;
}
.release-chart-gridline { stroke-width: 0.25; }
.release-chart-x-label { font-size: 2.1px; }
.release-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 1px rgba(28, 107, 140, 0.12));
}
.release-chart-hit-area { fill: transparent; }
.release-chart-cursor line {
  stroke: #24292f;
  stroke-dasharray: 1.2 1.2;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.release-chart-cursor circle {
  fill: #1c6b8c;
  stroke: #fff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(31, 35, 40, 0.28));
}
.release-chart-cursor circle.buyBox { fill: #b45630; }
.release-chart-cursor circle.amazon { fill: #7b61a8; }
.release-chart-cursor circle.salesRank { fill: #4b9560; }
.release-chart-tooltip {
  position: absolute;
  z-index: 2;
  top: 12px;
  width: max-content;
  min-width: 154px;
  max-width: calc(100% - 24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  color: #f6f8fa;
  background: rgba(31, 35, 40, 0.94);
  box-shadow: 0 8px 24px rgba(31, 35, 40, 0.22);
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.release-chart-tooltip time {
  display: block;
  margin-bottom: 7px;
  color: #b6c2cf;
  font-size: 10px;
  font-weight: 700;
}
.release-chart-tooltip dl { display: grid; gap: 5px; margin: 0; }
.release-chart-tooltip dl div {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.release-chart-tooltip dt {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d8dee4;
  font-size: 11px;
}
.release-chart-tooltip dt::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #43a6c6;
  content: "";
}
.release-chart-tooltip dt.buyBox::before { background: #e17c51; }
.release-chart-tooltip dt.amazon::before { background: #a995d4; }
.release-chart-tooltip dt.salesRank::before { background: #72b985; }
.release-chart-tooltip dd {
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.release-chart-instruction {
  margin: 8px 0 0;
  color: #66717d;
  font-size: 10px;
}
.release-chart-figure figcaption { margin-top: 10px; font-size: 11px; line-height: 1.6; }
.release-chart-figure.snkrdunk-chart-figure { margin: 0; }
.release-chart-interaction.snkrdunk-chart-interaction { border-color: #cbd4dc; border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #fbfcfd, #f6f8fa); box-shadow: 0 12px 30px rgba(23, 32, 42, .08); }
.release-chart-empty { display: grid; min-height: 180px; place-items: center; border-block: 1px solid; }
.release-market-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.release-market-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.release-market-links a:first-child:hover { color: #fff; background: #0757b5; }
.release-detail-empty { display: grid; min-height: 440px; align-content: center; justify-items: center; text-align: center; }
.release-detail-empty span { color: #8c959f; font-size: 11px; font-weight: 800; }
.release-detail-empty h2 { margin: 12px 0 6px; }
.release-detail-empty p { margin: 0; }
.release-data-note { display: flex; align-items: center; gap: 8px; margin-top: 36px; padding-top: 16px; }
.release-data-note span { padding: 5px 8px; font-size: 10px; font-weight: 700; }
.release-data-note p { margin: 0 0 0 auto; font-size: 11px; }
.release-error-page div[role="alert"] { margin-top: 24px; border-left: 3px solid; padding: 16px; background: #fff; }

@media (max-width: 1050px) {
  .release-workbench { grid-template-columns: 1fr; }
  .release-detail-panel {
    position: static;
    max-block-size: none;
    overflow-y: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }
  .release-market-links { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .release-category-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .release-category-tabs > a:nth-child(3) { border-right: 0; }
  .release-category-tabs > a:nth-child(-n + 3) { border-bottom: 1px solid #dce1e5; }
  .release-product-toolbar { grid-template-columns: 1fr; }
  .release-product-toolbar > span { white-space: normal; }
  .release-product-list-viewport {
    max-block-size: 360px;
  }
  .release-date-actions { grid-template-columns: 1fr 1fr; }
  .release-date-actions > a:first-child { grid-column: 1; }
  .release-date-form { grid-column: 1 / -1; grid-row: 1; }
  .release-matrix-shell { border-radius: 6px; }
  .release-matrix thead { display: table-header-group; }
  .release-matrix tbody { display: table-row-group; }
  .release-matrix tbody tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .release-matrix thead th:not(:first-child),
  .release-matrix tbody td {
    position: static;
    left: auto;
    display: table-cell;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    border-right: 1px solid #e1e5e8;
    border-bottom: 1px solid #e1e5e8;
    background: #fff;
    box-shadow: none;
  }
  .release-matrix thead th.anchor { background: #f6f8fa; box-shadow: inset 0 3px 0 #ad4d26; }
  .release-matrix thead th[data-selected="true"] { background: #eaf3ff; }
  .release-matrix tbody td.anchor { background: rgba(173, 77, 38, 0.035); }
  .release-matrix tbody td[data-selected="true"] { background: #f2f7ff; }
  .release-matrix tbody td::before { content: none; }
  .release-matrix tbody th {
    position: sticky;
    left: 0;
    display: table-cell;
    width: 20%;
    min-width: 0;
    max-width: none;
    box-shadow: none;
  }
  .release-matrix-scroll-hint { display: block; }
  .release-detail-header { grid-template-columns: 1fr; }
  .release-detail-image { max-width: 280px; margin-inline: auto; }
  .release-market-links { grid-template-columns: 1fr 1fr; }
  .release-data-note { flex-wrap: wrap; }
  .release-data-note p { width: 100%; margin-left: 0; }
}
@media (max-width: 460px) {
  .release-hero { gap: 16px; }
  .release-date-form { grid-template-columns: 1fr; }
  .release-date-form button { min-height: 44px; margin-top: 8px; }
  .release-range-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .release-range-presets a { text-align: center; }
  .release-custom-range-form { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; }
  .release-custom-range-form input { width: 100%; min-width: 0; }
  .release-custom-range-form button,
  .release-custom-range-form small { grid-column: 1 / -1; }
  .release-product-link { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .release-product-copy strong { -webkit-line-clamp: 1; }
  .release-detail-title dl { grid-template-columns: 1fr; }
  .release-detail-title dl div:nth-child(odd) { border-right: 0; }
  .release-chart-tooltip { top: 8px; min-width: 142px; padding: 8px 10px; }
}
.inventory-report-page {
  padding-block: 48px 80px;
}

.inventory-report-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.inventory-report-header p {
  color: var(--text-muted);
  margin: 8px 0 0;
}

.inventory-report-eyebrow {
  color: var(--primary) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 6px !important;
  text-transform: uppercase;
}

.inventory-report-kpis {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.inventory-report-kpis article,
.inventory-report-chart-card,
.inventory-report-table-card {
  background: linear-gradient(145deg, #ffffff 0%, #f7f8fb 100%);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgb(25 39 68 / 6%);
}

.inventory-report-kpis article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 22px;
}

.inventory-report-kpis span,
.inventory-report-kpis small,
.inventory-report-table-heading p,
.inventory-report-table-card td small {
  color: var(--text-muted);
}

.inventory-report-kpis strong {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: -0.04em;
}

.inventory-report-kpis small {
  align-self: end;
}

.inventory-report-charts {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 28px;
}

.inventory-report-chart-card {
  min-width: 0;
  padding: 22px 24px 16px;
}

.inventory-report-chart-card h2 {
  font-size: 1.05rem;
  margin: 0;
}

.line-chart {
  margin-top: 16px;
  min-width: 0;
}

.line-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: flex-end;
  min-height: 22px;
}

.line-chart-legend span {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 6px;
}

.line-chart-legend span::before {
  background: var(--series-color);
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.line-chart-svg {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

.line-chart-grid {
  stroke: #e8ebf0;
  stroke-width: 1;
}

.line-chart-series {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.line-chart-point {
  stroke: #fff;
  stroke-width: 2;
}

.line-chart-x-label,
.line-chart-y-label {
  fill: var(--text-muted);
  font-size: 16px;
}

.line-chart-y-label {
  text-anchor: end;
}

.inventory-report-table-card {
  overflow: hidden;
}

.inventory-report-table-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  padding: 24px 26px 18px;
}

.inventory-report-table-heading h2,
.inventory-report-table-heading p {
  margin: 0;
}

.inventory-report-table-scroll {
  overflow-x: auto;
}

.inventory-report-table-card table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.inventory-report-table-card th,
.inventory-report-table-card td {
  border-top: 1px solid var(--border-color);
  padding: 15px 18px;
  text-align: right;
  white-space: nowrap;
}

.inventory-report-table-card thead th {
  background: #f7f8fb;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.inventory-report-table-card th:first-child {
  padding-left: 26px;
  text-align: left;
}

.inventory-report-table-card td small {
  display: block;
  font-size: 0.72rem;
  margin-top: 2px;
}

.inventory-report-page .positive {
  color: #157347;
}

.inventory-report-page .negative {
  color: #c0392b;
}

@media (max-width: 820px) {
  .inventory-report-page {
    padding-block: 28px 60px;
  }

  .inventory-report-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-report-charts {
    grid-template-columns: 1fr;
  }

  .inventory-report-table-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .inventory-report-table-card thead {
    display: table-header-group;
  }

  .inventory-report-table-card tbody tr {
    background: transparent;
    border: 0;
    border-radius: 0;
    display: table-row;
    margin: 0;
    padding: 0;
  }

  .inventory-report-table-card tbody th,
  .inventory-report-table-card tbody td {
    background: transparent;
    border-top: 1px solid var(--border-color);
    display: table-cell;
    float: none;
    height: auto;
    margin: 0;
    max-width: none;
    padding: 15px 18px;
    position: static;
    width: auto;
  }
}

@media (max-width: 520px) {
  .inventory-report-kpis {
    grid-template-columns: 1fr;
  }
}
