:root {
  --ink: #0a2233;
  --muted: #5f7280;
  --line: #dce5e9;
  --paper: #f5f1e9;
  --white: #fff;
  --navy: #07324a;
  --teal: #0c6570;
  --red: #d71920;
  --orange: #f39b22;
  --soft: #f8faf9;
  --shadow: 0 8px 28px rgba(7, 50, 74, .12);
  --rail-width: 72px;
  --header-height: 52px;
  --cart-bar-height: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.45;
  overflow: hidden;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-height);
  padding: 0 10px;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-top {
  display: contents;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  max-width: 128px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 32px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  border-radius: 4px;
}
.brand-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  white-space: nowrap;
}
.brand-copy {
  display: block;
  min-width: 0;
}
.brand-site {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
}

.header-search { flex: 1; min-width: 0; }
.header-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.member-badge {
  max-width: 96px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--teal);
  border-radius: 16px;
  background: #e8f3f2;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-badge {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--orange);
  border-radius: 16px;
  background: #fff7eb;
  color: #b86a00;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.lang-select {
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}

.shop-layout {
  display: flex;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: calc(var(--cart-bar-height) + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.category-rail {
  width: var(--rail-width);
  flex-shrink: 0;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  padding: 8px 4px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  touch-action: manipulation;
}
.rail-item .rail-thumb {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}
.rail-item .rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}
.rail-item .rail-initials {
  font-size: 13px;
  font-weight: 900;
  color: var(--navy);
}
.rail-item.active .rail-thumb {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}
.rail-item.active {
  color: var(--navy);
  background: #f0f7fa;
}

.product-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
}

.activity-zone {
  padding: 10px 10px 0;
}

.activity-zone-pinned {
  position: sticky;
  top: var(--header-h);
  z-index: 18;
  padding: 8px 10px 2px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 250, 251, 0.96);
  backdrop-filter: blur(8px);
}

.activity-zone-pinned .activity-zone-track {
  grid-auto-columns: minmax(112px, 26vw);
}

.activity-zone-pinned {
  padding: 10px 12px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(7, 50, 74, 0.06);
}

.activity-zone-pinned .activity-zone-track {
  max-width: 1200px;
  margin: 0 auto;
}

.activity-zone-pinned .activity-zone-header {
  max-width: 1200px;
  margin: 0 auto 8px;
}

.activity-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.activity-zone-header h2 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

.activity-zone-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 34vw);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.activity-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
  padding: 8px;
  border: 1px solid #f0c9c4;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff7f5, #fff);
  text-align: left;
  cursor: pointer;
}

.activity-card-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f4f6f7;
}

.activity-card-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
}

.activity-card-info {
  display: grid;
  gap: 4px;
}

.activity-card-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card-prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.activity-price {
  color: var(--red);
  font-size: 15px;
}

.activity-price-old {
  color: var(--muted);
  font-size: 11px;
  text-decoration: line-through;
}

.activity-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.product-price.has-activity {
  color: var(--red);
}

.product-list {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.product-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.product-card:active { background: #f7faf9; }

.product-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: #f4f6f7;
  border: 1px solid var(--line);
}
.product-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #fff;
  font-size: 24px;
  font-weight: 900;
}

.product-info { min-width: 0; }
.product-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}
.product-specs {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}
.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.product-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--red);
}
.stock-label {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f3f2;
  color: var(--teal);
}
.stock-label.low { background: #fff3e0; color: #c45a00; }
.wholesale-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
}

.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.app-footer {
  display: none;
}
.geo-attribution {
  padding: 18px 16px 92px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.geo-attribution a {
  color: inherit;
}
.link-btn {
  border: none;
  background: none;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
}

.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(7, 50, 74, .08));
}
.cart-bar.hidden { display: none; }
.cart-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.cart-count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 14px;
  background: var(--red);
  font-size: 13px;
  font-weight: 900;
}
.cart-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.cart-summary strong { font-size: 17px; }
.cart-summary small { font-size: 11px; opacity: .8; }
.cart-cta {
  font-size: 14px;
  font-weight: 900;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .15);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 50, 74, .45);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-height: 92vh;
  max-width: 520px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}
.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.sku-panel {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
}

.sku-modal-body {
  flex: 1;
  min-height: 0;
  padding: 12px 16px;
  overflow-y: auto;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
}

.sku-action-panel {
  flex-shrink: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -4px 12px rgba(7, 50, 74, .08);
}

.sku-action-panel .sku-detail-grid {
  margin-bottom: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  font-size: 11px;
}

.sku-action-panel .sku-detail-grid strong {
  font-size: 13px;
  line-height: 1.15;
}

.sku-action-panel .qty-row {
  margin-bottom: 10px;
}

.sku-gallery {
  position: relative;
  margin-bottom: 10px;
}
.sku-gallery.hidden { display: none; }
.sku-gallery-viewport {
  overflow: hidden;
  border-radius: 8px;
  background: #f4f6f7;
  touch-action: pan-y;
}
.sku-gallery-track {
  display: flex;
  transition: transform .28s ease;
}
.sku-gallery-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.sku-gallery-slide img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
}
.sku-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 6px rgba(7, 50, 74, .15);
  font-size: 22px;
  line-height: 1;
  color: var(--navy);
  cursor: pointer;
  z-index: 1;
}
.sku-gallery-nav.prev { left: 6px; }
.sku-gallery-nav.next { right: 6px; }
.sku-gallery-single .sku-gallery-nav,
.sku-gallery-single .sku-gallery-dots { display: none; }
.sku-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.sku-gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #c8d4dc;
  cursor: pointer;
}
.sku-gallery-dot.active { background: var(--navy); }

.sku-detail-images {
  margin-bottom: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.sku-detail-images.hidden { display: none; }
.sku-detail-images-title {
  margin: 10px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.sku-detail-images-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sku-detail-image {
  width: 100%;
  display: block;
  object-fit: contain;
  background: #f8f9fa;
}

.sku-modal-summary {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.sku-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sku-chip {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sku-chip.active {
  border-color: var(--navy);
  background: #eef6fb;
  color: var(--navy);
}
.sku-chip.out { opacity: .45; }

.sku-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
  font-size: 12px;
}
.sku-detail-grid span { display: block; color: var(--muted); margin-bottom: 2px; }
.sku-detail-grid strong { font-size: 14px; }

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-weight: 800;
}
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.stepper button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--soft);
  font-size: 18px;
  cursor: pointer;
}
.stepper input {
  width: 56px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
}
.btn-primary {
  color: #fff;
  background: var(--navy);
}
.btn-secondary {
  color: var(--navy);
  background: #eef6fb;
  border: 1px solid var(--line);
}
.btn-quiet {
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
  min-height: 40px;
  font-size: 13px;
  font-weight: 800;
}
.btn-block { width: 100%; }
.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.cart-panel, .member-panel { max-height: 95vh; }

.quote-workspace-panel {
  display: flex;
  flex-direction: column;
  max-height: 95vh;
  min-height: 0;
  overflow: hidden;
}

.quote-workspace-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quote-workspace-section {
  border-top: 1px solid var(--line);
  background: #fff;
}

.quote-workspace-panel .quote-document {
  flex: none;
  overflow: visible;
  max-height: none;
}

.quote-workspace-panel .quote-toolbar {
  padding-top: 10px;
}

.quote-workspace-panel .quote-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-actions-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quote-actions-primary .btn {
  min-height: 44px;
  font-size: 14px;
  padding: 0 10px;
}

.quote-workspace-form {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fafcfd;
}

.quote-workspace-form.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}
.cart-totals {
  display: flex;
  flex: 1;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.cart-totals strong { font-size: 16px; color: var(--red); }

.cart-action-stack {
  display: none;
}

.inquiry-form {
  border-top: 1px solid var(--line);
  background: #fff;
}

.quote-share-fields {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.quote-share-title,
.quote-hide-brand {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.quote-share-title input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}
.quote-hide-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.quote-share-link {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef6fb;
  color: var(--navy);
  font-size: 12px;
  word-break: break-all;
}

.contact-panel,
.lead-panel {
  max-height: 92vh;
}
.contact-body {
  padding: 12px 16px 20px;
  display: grid;
  gap: 12px;
}
.contact-row {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.contact-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.contact-value strong {
  font-size: 16px;
  color: var(--ink);
}
.contact-qr-placeholder {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.contact-qr-placeholder.has-image {
  min-height: 0;
  padding: 10px;
  background: #fff;
}
.contact-qr-placeholder.has-image span {
  display: none;
}
.contact-qr-image {
  width: min(220px, 70vw);
  aspect-ratio: 1;
  object-fit: contain;
}

.quote-page-body {
  overflow: auto;
  background: var(--paper);
}
.quote-page-root {
  min-height: 100%;
  padding: 16px;
  display: flex;
  justify-content: center;
}
.shared-quote-panel {
  width: min(640px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.shared-quote-header {
  text-align: center;
  margin-bottom: 12px;
}
.shared-quote-brand {
  font-size: 12px;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 4px;
}
.shared-quote-header h1 {
  margin: 0;
  font-size: 18px;
  color: var(--navy);
}
.shared-quote-table { margin-top: 8px; }
.shared-quote-total { margin-top: 8px; }
.shared-quote-foot {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.quote-toolbar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.quote-mode-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quote-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}
.quote-mode-option.active {
  border-color: var(--navy);
  background: #eef6fb;
}
.quote-mode-option input { accent-color: var(--navy); }

.quote-document {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}
.quote-doc-title {
  margin: 0 0 8px;
  font-size: 16px;
  text-align: center;
}
.quote-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11px;
}
.quote-table th,
.quote-table td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.quote-table th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 800;
}
.quote-table th:nth-child(1),
.quote-table td:nth-child(1) { width: 44%; }
.quote-table th:nth-child(2),
.quote-table td:nth-child(2) { width: 12%; }
.quote-table th:nth-child(3),
.quote-table td:nth-child(3) { width: 17%; }
.quote-table th:nth-child(4),
.quote-table td:nth-child(4) { width: 17%; }
.quote-table th:nth-child(5),
.quote-table td:nth-child(5) { width: 10%; }
.quote-action-col,
.quote-action-cell {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}
.quote-empty {
  margin: 0;
  padding: 16px 4px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.quote-item-cell { min-width: 0; }
.quote-item-with-thumb {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.quote-item-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.quote-item-text { min-width: 0; }
.quote-line-name {
  font-weight: 800;
  line-height: 1.3;
}
.quote-line-spec {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}
.quote-num-cell {
  text-align: right;
  white-space: nowrap;
}
.quote-line-total-cell { font-weight: 800; }
.quote-price-input {
  width: 100%;
  max-width: 64px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}
.quote-qty-input {
  width: 100%;
  max-width: 52px;
  padding: 4px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  -moz-appearance: textfield;
}
.quote-qty-input::-webkit-outer-spin-button,
.quote-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.quote-row-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.quote-row-remove:hover,
.quote-row-remove:focus-visible {
  color: var(--red);
  background: #fff0f0;
}
.quote-doc-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.quote-doc-total strong {
  font-size: 16px;
  color: var(--red);
}
.quote-actions {
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
.quote-panel .modal-header {
  padding: 12px 16px;
}
.quote-panel .modal-header h2 { font-size: 16px; }

.order-form {
  padding: 12px 16px 20px;
  display: grid;
  gap: 10px;
}
.order-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 360px) {
  .order-form-row { grid-template-columns: 1fr; }
}
.order-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.order-form input,
.order-form textarea,
.order-form select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
}
.form-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.form-message {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #1f7b55;
}
.form-message.error { color: var(--red); }

.member-level-list {
  padding: 12px 16px;
  display: grid;
  gap: 8px;
}
.level-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.level-option.active {
  border-color: var(--navy);
  background: #eef6fb;
}
.level-option strong { font-size: 14px; }
.level-option small { color: var(--muted); font-size: 11px; }

@media (max-width: 640px) {
  :root {
    --header-height: 84px;
  }
  .app-header {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 6px 10px 8px;
    gap: 6px;
  }
  .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }
  .header-search {
    width: 100%;
    flex: none;
  }
  .header-search input {
    height: 34px;
    font-size: 16px;
  }
  .member-badge {
    max-width: 52px;
    min-width: 36px;
    padding: 0 6px;
    font-size: 10px;
  }
  .contact-badge {
    padding: 0 8px;
    font-size: 10px;
  }
  .lang-select {
    height: 28px;
    min-width: 44px;
    padding: 0 4px;
    font-size: 11px;
  }
  .brand {
    max-width: none;
    flex: 1;
    min-width: 0;
  }
  .brand-name {
    font-size: 12px;
  }
  .shop-layout {
    top: var(--header-height);
  }
  .sku-panel {
    max-height: 92vh;
  }
}

@media (min-width: 641px) {
  .app-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 8px;
  }
  .header-top {
    display: contents;
  }
  .brand {
    grid-column: 1;
  }
  .header-search {
    grid-column: 2;
  }
  .header-actions {
    grid-column: 3;
  }
}

@media (min-width: 768px) {
  :root {
    --rail-width: 96px;
    --header-height: 56px;
  }
  .shop-layout {
    bottom: calc(var(--cart-bar-height) + 28px);
  }
  .product-list {
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
  }
  .modal-panel {
    border-radius: 16px;
    margin-bottom: 24px;
  }
  .modal { align-items: center; }
}

@media (min-width: 1100px) {
  .product-list { grid-template-columns: repeat(3, 1fr); }
}
