:root {
  --green: #1a3d2f;
  --green-light: #2a5c47;
  --green-soft: #e8f0ec;
  --gold: #c4a35a;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1a1f1c;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 24px rgba(26, 61, 47, 0.08);
  --radius: 14px;
  --sidebar-w-mobile: 40%;
  --sidebar-w-desktop: 300px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Noto Sans SC", "DM Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--card);
  box-shadow: var(--shadow);
}

@media (min-width: 992px) {
  body {
    padding: 16px;
    overflow: auto;
  }
  .app {
    height: calc(100vh - 32px);
    border-radius: 20px;
    overflow: hidden;
  }
}

/* Top bar */
.top-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.brand h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  margin: 0;
  font-size: 0.65rem;
  opacity: 0.85;
  font-weight: 400;
}

.store-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 52%;
  padding: 8px 10px 8px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  flex-shrink: 1;
  min-width: 0;
}

.store-pill:hover {
  background: rgba(255, 255, 255, 0.28);
}

.store-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.store-pill-change {
  flex-shrink: 0;
  padding: 2px 8px;
  margin-left: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.store-pill-change:active {
  background: rgba(255, 255, 255, 0.35);
}

.store-pill-chevron {
  opacity: 0.8;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Main layout — 始终左右两栏，禁止横向滚动 */
.main-layout {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.product-sidebar {
  width: var(--sidebar-w-mobile);
  flex-shrink: 0;
  background: #f8faf9;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 10px 8px 16px;
}

.detail-area {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  background: linear-gradient(180deg, #fafcfb 0%, var(--bg) 100%);
}

@media (min-width: 992px) {
  .product-sidebar {
    width: var(--sidebar-w-desktop);
    padding: 16px 12px;
  }
  .detail-area {
    padding: 24px 28px;
  }
  .brand-sub {
    font-size: 0.72rem;
  }
  .store-pill {
    max-width: 320px;
    font-size: 0.82rem;
  }
}

/* Categories & products */
.category {
  margin-bottom: 18px;
}

.category h3 {
  margin: 0 0 8px;
  padding-left: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  border-left: 3px solid var(--gold);
  letter-spacing: 0.04em;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-btn {
  width: 100%;
  border: none;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.product-btn:active {
  transform: scale(0.98);
}

.product-btn.selected {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 61, 47, 0.25);
}

@media (min-width: 992px) {
  .product-btn {
    font-size: 0.92rem;
    padding: 11px 14px;
  }
}

.sidebar-loading {
  padding: 24px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Detail empty */
.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Product detail */
.product-info {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.product-img-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
}

.product-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--green-soft);
  flex-shrink: 0;
}

.product-img-wrap.is-soldout .product-img {
  opacity: 0.55;
  filter: grayscale(0.25);
}

.product-soldout-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #efe2e0;
  color: #b42318;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.product-soldout-badge[hidden] {
  display: none !important;
}

@media (min-width: 992px) {
  .product-img {
    width: 88px;
    height: 88px;
  }
}

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
}

.product-change-btn,
.section-label {
  display: none;
}

.product-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.spec-group--required .spec-label {
  color: var(--green);
}

.spec-locked-value {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid rgba(26, 61, 47, 0.15);
}

.spec-group {
  margin-bottom: 14px;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.spec-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.specs-panel {
  display: contents;
}

.specs-panel-empty-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
}

.spec-option {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1.5px solid var(--border);
  background: var(--card) !important;
  color: var(--text) !important;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.spec-option:hover {
  border-color: var(--green-light);
}

.spec-option.selected,
.spec-option[aria-checked="true"] {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #fff !important;
}

.spec-option:active {
  transform: scale(0.98);
}

.spec-option.selected:active,
.spec-option[aria-checked="true"]:active {
  background: var(--green) !important;
  color: #fff !important;
}

.json-block {
  margin-top: 16px;
}

.json-block label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.json-area {
  background: #1e2421;
  color: #a8d5ba;
  padding: 14px;
  border-radius: var(--radius);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  overflow-y: auto;
  margin: 0;
}

@media (min-width: 992px) {
  .json-area {
    max-height: 240px;
    font-size: 0.78rem;
  }
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 90px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, filter 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-secondary {
  background: #4b5563;
  color: #fff;
}

.btn-danger {
  background: #b42318;
  color: #fff;
}

.btn-block {
  width: 100%;
  flex: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(26, 61, 47, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 3000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 20, 0.5);
  backdrop-filter: blur(4px);
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@media (min-width: 992px) {
  .modal {
    align-items: center;
  }
  .modal-sheet {
    border-radius: 20px;
    max-height: 80vh;
  }
  .modal-grabber {
    display: none;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--green);
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.modal-tabs {
  display: flex;
  gap: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.modal-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 8px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.modal-tab.active {
  color: var(--green);
  font-weight: 600;
  border-bottom-color: var(--green);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.location-panel,
.region-panel,
.search-panel {
  padding: 14px 18px 0;
}

.region-selects {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.region-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.region-field span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.region-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}

.region-field input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}

.city-search-field {
  position: relative;
}

.city-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 180px;
  overflow-y: auto;
}

.city-suggest-item {
  display: block;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}

.city-suggest-item:hover,
.city-suggest-item:active {
  background: var(--green-soft);
  color: var(--green);
}

.region-empty-cta {
  text-align: center;
  padding: 8px 0 4px;
}

.region-empty-cta .btn {
  margin-top: 8px;
}

.coord-display {
  margin: 10px 0;
  padding: 10px 12px;
  background: var(--green-soft);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--green);
  font-family: "Consolas", monospace;
  word-break: break-all;
}

.location-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.location-actions .btn {
  flex: 1;
  min-width: 0;
}

.list-hint {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px 0;
}

.modal-hint {
  padding: 8px 18px 0;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.modal .btn-block {
  margin: 12px 18px 0;
  width: calc(100% - 36px);
}

.store-list-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 18px 20px;
  margin-top: 0;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.15s ease;
}

.store-modal-header {
  padding-bottom: 4px;
}

.store-extra-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.store-extra-btn {
  flex: 0 0 auto;
  border: 1px solid #e5ebe7;
  background: #fff;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.store-extra-btn:active,
.store-extra-btn.is-active {
  background: var(--green-soft);
  border-color: rgba(26, 61, 47, 0.2);
}

.store-search-stack {
  position: relative;
  flex-shrink: 0;
  z-index: 30;
}

.store-search-guide {
  margin: 0 16px 6px;
  padding: 6px 10px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
  background: #f8fafc;
  border-radius: 8px;
  flex-shrink: 0;
}

.gps-debug-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 8px;
  padding: 6px 8px 6px 10px;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 8px;
  flex-shrink: 0;
}

.gps-debug-text {
  flex: 1;
  min-width: 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #92400e;
  word-break: break-all;
}

.gps-copy-btn {
  flex-shrink: 0;
  border: 1px solid #f59e0b;
  background: #fff;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.store-search-bar {
  display: flex;
  align-items: center;
  margin: 0 16px 8px;
  padding: 0 6px 0 12px;
  min-height: 44px;
  background: #f3f4f6;
  border-radius: 12px;
  flex-shrink: 0;
  gap: 4px;
}

.store-city-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  max-width: 38%;
}

.store-city-chevron {
  font-size: 0.72rem;
  color: var(--muted);
}

.store-search-divider {
  width: 1px;
  height: 18px;
  background: #d1d5db;
  margin: 0 10px;
  flex-shrink: 0;
}

.store-search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.store-search-icon {
  color: #9ca3af;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.store-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.86rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
}

.store-search-input::placeholder {
  color: #9ca3af;
}

.store-search-btn {
  flex-shrink: 0;
  border: none;
  background: #1a365d;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.store-search-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.store-city-dropdown {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% - 4px);
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 40;
}

.store-city-dropdown-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.store-city-filter {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  margin-bottom: 6px;
}

.store-city-list {
  max-height: 160px;
  overflow-y: auto;
}

.store-city-option {
  display: block;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 9px 8px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text);
}

.store-city-option:hover,
.store-city-option:active {
  background: var(--green-soft);
  color: var(--green);
}

.store-city-option.is-current {
  background: #eef2ff;
  color: #1a365d;
  font-weight: 600;
}

.store-list-area {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.store-list-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  touch-action: none;
}

.store-list-area.is-shielded .store-list-wrap {
  pointer-events: none;
  user-select: none;
}

.store-list-wrap.is-loading {
  opacity: 0.55;
}

.store-picker-drawer {
  margin: 0 16px 8px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}

.picker-quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.picker-quick-actions .btn {
  flex: 1;
  min-width: 0;
}

.picker-hint {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.region-selects-compact {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.region-selects-compact select {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-family: inherit;
}

.store-list-subline {
  margin: 0;
  padding: 0 16px 6px;
  font-size: 0.74rem;
  color: var(--muted);
  flex-shrink: 0;
}

.store-list-head,
.store-list-search,
.store-filter-toggle {
  display: none !important;
}

#storeModal .modal-sheet {
  display: flex;
  flex-direction: column;
}

.coord-display-sm {
  font-size: 0.72rem;
  padding: 8px 10px;
  margin: 6px 0;
}

.btn-compact {
  min-height: 42px;
  padding: 10px 16px;
}

.store-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.store-item:hover,
.store-item.selected {
  border-color: var(--green);
  background: var(--green-soft);
}

.store-item strong {
  display: block;
  font-size: 0.92rem;
  color: var(--green);
}

.store-item-hours {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.store-hours-status {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  line-height: 1.4;
}

.store-hours-status.is-open {
  color: #166534;
  background: #dcfce7;
}

.store-hours-status.is-closed {
  color: #dc2626;
  background: #fef2f2;
}

.store-hours-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.store-item-closed .store-hours-time {
  color: #64748b;
}

.store-item .store-dist {
  float: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.store-item .store-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
  word-break: break-all;
}

.store-item .store-meta.addr {
  margin-top: 6px;
}

.store-item .store-meta.hours {
  color: var(--green);
  font-size: 0.74rem;
  opacity: 0.9;
}

.store-item-closed {
  opacity: 0.72;
  cursor: not-allowed;
}

.store-item-closed:hover {
  border-color: var(--border);
  background: transparent;
}

.store-item-closed strong {
  color: var(--muted);
}

.store-hours-closed {
  color: #dc2626 !important;
}

.store-closed-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 4px;
  vertical-align: middle;
}

.store-item .addr {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.store-item .dist {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
}

/* 手机门店卡：桌面默认隐藏 */
.store-card-mobile {
  display: none;
}

/* ========== 手机端布局（上下流：门店 → 横滑商品 → 规格 → 下单） ========== */
@media (max-width: 991px) {
  html,
  body {
    overflow: hidden;
    height: 100%;
    height: 100dvh;
  }

  body {
    background: #f3f6f4;
    font-size: 15px;
  }

  .app {
    max-width: none;
    box-shadow: none;
    height: 100%;
    height: 100dvh;
    background: #f3f6f4;
  }

  /* 手机端去掉顶部 logo / 标题，直接从门店卡开始 */
  .top-bar-desktop {
    display: none !important;
  }

  .desktop-only-store {
    display: none !important;
  }

  .store-card-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 12px 8px;
    margin-top: calc(10px + env(safe-area-inset-top, 0px));
    padding: 12px 14px;
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(26, 61, 47, 0.08);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
  }

  .store-card-mobile.has-store {
    box-shadow: 0 4px 18px rgba(26, 61, 47, 0.12);
  }

  .store-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--green-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  .store-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .store-card-label {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 500;
  }

  .store-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--green);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .store-card-action {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .main-layout {
    flex-direction: column;
    border-top: none;
    min-height: 0;
  }

  /* 手机不再用横滑商品条，改「当前商品 + 点换商品」 */
  .product-sidebar {
    display: none !important;
  }

  .detail-area {
    flex: 1;
    min-height: 0;
    padding: 0 12px calc(88px + env(safe-area-inset-bottom, 0px));
    background: transparent;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .section-label {
    display: block;
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.02em;
  }

  .section-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
  }

  .detail-empty {
    min-height: min(240px, 42vh);
    padding: 28px 16px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  }

  .empty-icon {
    font-size: 2.6rem;
    margin-bottom: 10px;
    opacity: 0.4;
  }

  .detail-empty-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green);
  }

  .detail-empty-hint {
    margin: 0;
    font-size: 0.84rem;
    color: var(--muted);
  }

  .product-info {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 18px;
    gap: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: relative;
  }

  .product-info > div {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .product-img-wrap {
    align-self: center;
  }

  .product-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    align-self: center;
    margin: 0;
    flex-shrink: 0;
  }

  .product-picker-img-wrap {
    position: relative;
    display: block;
    width: 100%;
  }

  .product-picker-img-wrap img {
    display: block;
    width: 100%;
  }

  .product-picker-soldout {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(180, 35, 24, 0.92);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
  }

  .product-picker-item.is-soldout {
    opacity: 0.78;
  }

  .product-picker-item.is-soldout img {
    filter: grayscale(0.35);
    opacity: 0.85;
  }

  .product-name {
    font-size: 1.12rem;
    text-align: left;
    line-height: 1.3;
    width: auto;
    font-weight: 700;
  }

  .product-meta-hint {
    display: block;
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.35;
  }

  .product-change-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    padding: 10px 14px;
    border: none;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }

  .product-change-btn:active {
    background: var(--green);
    color: #fff;
  }

  /* 选商品弹层：分类 + 带图网格 */
  .product-picker-sheet {
    max-width: none;
    max-height: 88dvh;
    height: 88dvh;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex;
    flex-direction: column;
  }

  .product-picker-hint {
    margin: 0 16px 10px;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
  }

  .product-picker-cats {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 12px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
  }

  .product-picker-cats::-webkit-scrollbar {
    display: none;
  }

  .product-picker-cat {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid #e5ebe7;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }

  .product-picker-cat.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
  }

  .product-picker-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-content: start;
  }

  .product-picker-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 10px 12px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(26, 61, 47, 0.06);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    color: inherit;
  }

  .product-picker-item:active {
    transform: scale(0.98);
  }

  .product-picker-item.selected {
    border-color: var(--green);
    box-shadow: 0 4px 16px rgba(26, 61, 47, 0.16);
  }

  .product-picker-item img {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 14px;
    object-fit: cover;
    background: var(--green-soft);
  }

  .product-picker-item-name {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    color: var(--green);
  }

  .product-picker-item-tag {
    display: none;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green);
  }

  .product-picker-item.selected .product-picker-item-tag {
    display: block;
  }

  .product-picker-section {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
  }

  .specs-panel {
    display: block;
    background: var(--card);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 10px;
  }

  .specs-panel-empty {
    padding: 10px 12px;
  }

  .spec-group {
    padding: 7px 0;
    margin-bottom: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border-bottom: 1px solid var(--border);
  }

  .spec-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .spec-group:first-child {
    padding-top: 0;
  }

  .spec-label {
    font-size: 0.7rem;
    margin-bottom: 5px;
    color: var(--green);
  }

  .spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .spec-option {
    padding: 10px 14px;
    font-size: 0.86rem;
    line-height: 1.25;
    min-height: 40px;
    border-radius: 12px;
    white-space: nowrap;
    text-align: center;
    width: auto;
    flex: 0 0 auto;
  }

  .order-status-block-mobile {
    display: block;
    margin: 0 0 10px;
    padding: 10px 12px;
    background: #fff7e8;
    border-radius: 12px;
    border: 1px solid #f0e0c0;
  }

  .order-status-block-mobile .order-status-line {
    margin: 0;
    font-size: 0.82rem;
    color: #8a6a2f;
  }

  .json-block {
    margin-top: 12px;
  }

  .json-area {
    font-size: 0.68rem;
    max-height: 140px;
    padding: 12px;
    border-radius: 12px;
  }

  /* 底部固定下单栏 */
  .action-buttons {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    background: rgba(243, 246, 244, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(26, 61, 47, 0.08);
    box-shadow: 0 -6px 24px rgba(26, 61, 47, 0.08);
  }

  .action-buttons .btn {
    flex: 1;
    min-width: 0;
    padding: 14px 12px;
    font-size: 1rem;
    border-radius: 14px;
    font-weight: 700;
  }

  .action-buttons .btn-primary,
  .action-buttons .btn-order {
    flex: 1;
    letter-spacing: 0.04em;
    box-shadow: 0 6px 18px rgba(26, 61, 47, 0.28);
  }

  /* 门店弹窗 */
  #storeModal .modal-sheet {
    max-width: none;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  #storeModal .modal-header {
    padding: 10px 16px;
    flex-shrink: 0;
  }

  #storeModal .store-list-area {
    flex: 1;
    min-height: 52vh;
  }

  #storeModal .store-list-wrap {
    flex: 1;
    min-height: 0;
    padding: 6px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    margin-top: 0;
  }

  .modal-grabber {
    flex-shrink: 0;
    width: 40px;
    height: 4px;
    margin: 10px auto 4px;
    border-radius: 999px;
    background: #d1d5db;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-header h2 {
    font-size: 1rem;
  }

  .modal-tabs {
    margin: 0 12px 8px;
    padding: 4px;
    border: none;
    background: var(--bg);
    border-radius: 12px;
    gap: 4px;
    display: flex;
  }

  .modal-tab {
    flex: 1;
    padding: 10px 4px;
    font-size: 0.76rem;
    border-radius: 9px;
    border-bottom: none;
    margin-bottom: 0;
  }

  .modal-tab.active {
    background: var(--card);
    color: var(--green);
    box-shadow: 0 1px 4px rgba(26, 61, 47, 0.1);
    border-bottom: none;
  }

  .location-panel,
  .region-panel,
  .search-panel {
    padding: 6px 14px 0;
  }

  .modal-hint {
    padding: 0 14px;
    font-size: 0.68rem;
    line-height: 1.35;
    margin-bottom: 4px;
  }

  .coord-display {
    font-size: 0.68rem;
    padding: 7px 9px;
    margin: 6px 0;
  }

  .coord-display-sm {
    font-size: 0.65rem;
    padding: 6px 8px;
    margin: 4px 0 6px;
  }

  .location-actions {
    flex-direction: row;
    gap: 8px;
    margin-bottom: 2px;
  }

  .location-actions .btn {
    padding: 9px 8px;
    font-size: 0.76rem;
    min-height: 38px;
  }

  .region-selects {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin: 6px 0;
  }

  .region-field span {
    font-size: 0.62rem;
  }

  .region-field select {
    min-height: 38px;
    font-size: 0.8rem;
    border-radius: 10px;
    padding: 8px 6px;
  }

  .region-field input[type="text"] {
    min-height: 38px;
    font-size: 0.85rem;
    border-radius: 10px;
    padding: 8px 10px;
  }

  .city-suggest {
    max-height: 140px;
  }

  .modal .btn-block,
  .modal .btn-compact {
    margin: 6px 14px 2px;
    width: calc(100% - 28px);
    min-height: 40px;
    font-size: 0.85rem;
  }

  .store-list-wrap {
    padding: 6px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .store-item {
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 6px;
  }

  .store-item .store-meta.hours {
    display: none;
  }

  .store-item strong {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .store-item .addr {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .toast {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 32px);
    text-align: center;
  }
}

@media (max-width: 380px) {
  :root {
    --sidebar-w-mobile: 34vw;
  }

  .location-actions {
    flex-direction: column;
  }

  .action-buttons .btn {
    font-size: 0.75rem;
    padding: 10px 6px;
  }
}

/* ---------- 下单 / 成功 ---------- */
.order-status-block {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--green-soft);
  border-radius: 12px;
  border: 1px solid rgba(26, 61, 47, 0.08);
}

.order-status-line {
  margin: 0;
  font-size: 0.88rem;
  color: var(--green);
  line-height: 1.45;
}

.order-status-line.order-status-closed {
  color: #dc2626;
}

.btn-order {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-order:disabled,
.btn-order.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.order-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(26, 61, 47, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.order-overlay[hidden] {
  display: none !important;
}

.order-overlay-card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.order-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 4px solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: order-spin 0.85s linear infinite;
}

@keyframes order-spin {
  to {
    transform: rotate(360deg);
  }
}

.order-overlay-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
}

.order-overlay-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.order-overlay-warn {
  margin: 14px 0 0;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #b45309;
  background: #fff8e1;
  border-radius: 10px;
  border: 1px solid #ffe082;
}

.order-overlay-countdown {
  margin: 0 0 8px;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.order-overlay-countdown::after {
  content: "秒";
  font-size: 1rem;
  font-weight: 600;
  margin-left: 4px;
  color: var(--muted);
}

.order-wait-continue-sheet {
  text-align: center;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
}

.order-wait-continue-sheet h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--green);
}

.order-wait-continue-msg {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.order-wait-continue-meta {
  margin: 0 0 20px;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.order-wait-continue-actions {
  display: flex;
  gap: 10px;
}

.order-wait-continue-actions .btn {
  flex: 1;
  padding: 13px 10px;
  font-weight: 600;
}

.order-confirm-sheet {
  max-width: 440px;
}

.order-confirm-body {
  padding: 0 18px 16px;
  overflow-y: auto;
  max-height: 50vh;
}

.order-confirm-hint {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.order-confirm-product {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
}

.order-confirm-list {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 0.88rem;
}

.order-confirm-list dt {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.order-confirm-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

.order-confirm-store {
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.order-confirm-store-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.order-confirm-store-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.order-confirm-store-hours {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--green);
}

.order-confirm-store-hours.is-closed {
  color: #dc2626;
}

.order-confirm-actions {
  display: flex;
  gap: 10px;
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.order-confirm-actions .btn {
  flex: 1;
  padding: 13px 12px;
  font-weight: 600;
}

.order-success-modal .order-success-sheet {
  text-align: center;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.order-success-icon {
  width: 56px;
  height: 56px;
  margin: 8px auto 12px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 56px;
  font-weight: 700;
}

.order-success-modal h2 {
  margin: 0 0 10px;
  color: var(--green);
}

.order-success-code-label {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.order-success-code {
  margin: 0 0 14px;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--green);
  word-break: break-all;
  line-height: 1.15;
}

.order-success-qr-label {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.order-success-qr {
  display: flex;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(26, 61, 47, 0.08);
  max-width: 224px;
}

.order-success-qr img,
.order-success-qr canvas {
  display: block;
  width: 200px;
  height: 200px;
}

.order-success-meta {
  margin: 0 0 20px;
  font-size: 0.8rem;
  color: var(--muted);
}

.order-success-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #9a6700;
  background: #fff8e8;
  border-radius: 12px;
  border: 1px solid rgba(196, 163, 90, 0.35);
  text-align: left;
}

.pickup-result-view {
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: max(10px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(165deg, #fff9f0 0%, #f4f7f5 45%, #eef6f1 100%);
}

.pickup-result-view[hidden] {
  display: none !important;
}

.pickup-result-card {
  width: min(400px, 100%);
  background: var(--card);
  border-radius: 18px;
  padding: 14px 14px 12px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(26, 61, 47, 0.07);
  border: 1px solid rgba(168, 213, 186, 0.45);
}

.pickup-result-header {
  margin-bottom: 10px;
}

.pickup-result-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e7f6ee;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(26, 61, 47, 0.12);
}

.pickup-result-status.tone-wait {
  background: #fff4e5;
  color: #b86a00;
  border-color: rgba(184, 106, 0, 0.22);
}

.pickup-result-status.tone-done {
  background: #e7f6ee;
  color: var(--green);
  border-color: rgba(26, 61, 47, 0.12);
}

.pickup-result-status.tone-fail {
  background: #fdeeee;
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.18);
}

.pickup-timeline {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 12px 6px;
  text-align: left;
  background: #f8faf9;
  border: 1px solid rgba(26, 61, 47, 0.06);
  border-radius: 12px;
}

.pickup-timeline[hidden] {
  display: none !important;
}

.pickup-timeline-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 0 0 12px 2px;
}

.pickup-timeline-item:last-child {
  padding-bottom: 2px;
}

.pickup-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: rgba(26, 61, 47, 0.12);
}

.pickup-timeline-item.is-done:not(:last-child)::before,
.pickup-timeline-item.is-current:not(:last-child)::before {
  background: rgba(26, 61, 47, 0.28);
}

.pickup-timeline-dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  background: #d7e3dc;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(26, 61, 47, 0.12);
  z-index: 1;
}

.pickup-timeline-item.is-done .pickup-timeline-dot {
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(26, 61, 47, 0.2);
}

.pickup-timeline-item.is-current .pickup-timeline-dot {
  background: #e8a317;
  box-shadow: 0 0 0 1px rgba(184, 106, 0, 0.35);
}

.pickup-timeline-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pickup-timeline-label {
  font-size: 0.82rem;
  font-weight: 650;
  color: #3a4a42;
}

.pickup-timeline-item.is-current .pickup-timeline-label {
  color: #b86a00;
}

.pickup-timeline-item.is-done .pickup-timeline-label {
  color: var(--green);
}

.pickup-timeline-time {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.pickup-result-title {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 1.02rem;
  font-weight: 700;
}

.pickup-result-hint {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}

.pickup-result-card .pickup-order-summary {
  margin: 10px 0 0;
  padding: 8px 10px;
  text-align: left;
  background: #f8faf9;
  border: 1px solid rgba(26, 61, 47, 0.06);
  border-radius: 12px;
}

.pickup-result-card .pickup-order-row {
  gap: 8px;
  padding: 3px 0;
}

.pickup-result-card .pickup-order-label {
  flex: 0 0 34px;
  font-size: 0.72rem;
}

.pickup-result-card .pickup-order-value {
  font-size: 0.8rem;
  line-height: 1.35;
}

.pickup-result-card .pickup-order-product {
  font-weight: 600;
  color: var(--green);
}

.pickup-code-panel {
  margin: 0 0 0;
  padding: 12px 8px 10px;
  background: #f4faf7;
  border-radius: 14px;
}

.pickup-code-label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

.pickup-code-value {
  margin: 0 0 8px;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--green);
  line-height: 1.1;
}

.pickup-qr-box {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  padding: 6px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(26, 61, 47, 0.06);
  width: fit-content;
  max-width: 100%;
}

.pickup-qr-box[hidden] {
  display: none !important;
}

.pickup-qr-box img,
.pickup-qr-box canvas {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: min(152px, 42vw);
  max-height: min(152px, 42vw);
}

.pickup-result-meta {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
}

.pickup-order-summary {
  margin: 4px 0 16px;
  padding: 12px 14px;
  text-align: left;
  background: #f8faf9;
  border: 1px solid rgba(26, 61, 47, 0.08);
  border-radius: 14px;
}

.order-success-qr + .pickup-order-summary,
.order-success-code + .pickup-order-summary {
  margin-top: 4px;
}

.pickup-order-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
}

.pickup-order-row + .pickup-order-row {
  border-top: 1px dashed rgba(26, 61, 47, 0.08);
}

.pickup-order-label {
  flex: 0 0 42px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

.pickup-order-value {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

.pickup-order-value.pickup-order-store {
  white-space: pre-line;
}


.order-failed-modal .order-failed-sheet {
  text-align: center;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.order-failed-icon {
  width: 56px;
  height: 56px;
  margin: 8px auto 12px;
  background: #fdecea;
  color: #c62828;
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 56px;
  font-weight: 700;
}

.order-failed-modal h2 {
  margin: 0 0 12px;
  color: #c62828;
}

.order-failed-msg {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.order-failed-meta {
  margin: 0 0 20px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- 订单链接门禁 ---------- */
.voucher-gate[hidden],
.app[hidden] {
  display: none !important;
}

.voucher-gate {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(165deg, #fff9f0 0%, #f4f7f5 45%, #eef6f1 100%);
}

.voucher-gate-card {
  width: min(380px, 100%);
  background: var(--card);
  border-radius: 24px;
  padding: 36px 28px 32px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(26, 61, 47, 0.08);
  border: 2px dashed rgba(196, 163, 90, 0.35);
  position: relative;
  overflow: hidden;
}

.voucher-gate-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 214, 165, 0.25);
  pointer-events: none;
}

.voucher-gate-card::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(168, 213, 186, 0.2);
  pointer-events: none;
}

.voucher-gate-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  line-height: 1;
  animation: voucher-gate-float 2.8s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes voucher-gate-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.voucher-gate-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #b8860b;
  background: #fff6e8;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}

.voucher-gate-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.voucher-gate-msg {
  margin: 0 0 10px;
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.voucher-gate-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
