/* 彩民端移动动效：N 焦点 / D 结果托盘 / B 日上限 / A 两店堆叠。扫码中与减少动态效果时降级。 */

.scan-entry-grid:not(.scan-entry-grid--single) .scan-entry {
  transform: scale(.97);
  opacity: .78;
  transition: transform .22s ease, opacity .22s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.scan-entry-grid:not(.scan-entry-grid--single) .scan-entry.active {
  transform: scale(1.03);
  opacity: 1;
  z-index: 1;
}

.scan-daily-cap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.scan-daily-cap-track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #ececec;
  overflow: hidden;
}
.scan-daily-cap-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #43a047, #2e7d32);
  transition: width .28s ease, filter .26s ease;
  transform-origin: left center;
}
.scan-daily-cap.is-full .scan-daily-cap-fill {
  filter: brightness(1.12);
  background: linear-gradient(90deg, #fb8c00, #e65100);
}

.scan-result-tray {
  position: sticky;
  bottom: calc(var(--nav-h, 68px) + var(--safe-bottom, 0px) + 8px);
  z-index: 45;
  margin: 12px 0 4px;
  border-radius: 16px;
  background: #2c2c31;
  color: #f4f4f5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  overflow: hidden;
}
.scan-result-tray-handle {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scan-result-tray-knob {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .35);
}
.scan-result-tray-summary {
  width: 100%;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}
.scan-result-tray #scanResult {
  display: block;
  margin: 0;
  padding: 0 10px;
  max-height: 0;
  overflow: hidden;
  min-height: 0;
  background: #fff;
  color: var(--text, #1a1a1a);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: max-height .28s ease, padding .28s ease;
}
.scan-result-tray #scanResult > * {
  overflow: hidden;
  min-height: 0;
}
.scan-result-tray.is-open #scanResult {
  height: fit-content;
  max-height: 42vh;
  min-height: 0;
  padding: 0 10px 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.scan-result-tray.is-open #scanResult > * {
  overflow: visible;
  min-height: 0;
}
.scan-result-tray.is-empty .scan-result-tray-summary {
  color: rgba(255, 255, 255, .72);
  font-weight: 500;
}

.dual-store-stack {
  display: flex;
  align-items: center;
  cursor: pointer;
  min-height: 28px;
}
.dual-store-stack .dual-store-pill {
  position: relative;
  margin-left: -18px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff8e8;
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  color: #9a1818;
  transition: margin .28s ease, transform .22s ease;
  z-index: 1;
}
.dual-store-stack .dual-store-pill:first-child {
  margin-left: 0;
}
.dual-store-stack .dual-store-pill:nth-child(2) { z-index: 2; }
.dual-store-stack .dual-store-pill:nth-child(3) { z-index: 3; }
.dual-store-more {
  margin-left: -10px;
  z-index: 4;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e8d9a8;
  font-size: 12px;
  font-weight: 700;
  color: #8d6e1b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dual-store-stack.is-spread .dual-store-pill {
  margin-left: 6px;
}
.dual-store-stack.is-spread .dual-store-pill:nth-child(1) { transition-delay: 0ms; }
.dual-store-stack.is-spread .dual-store-pill:nth-child(2) { transition-delay: 45ms; }
.dual-store-stack.is-spread .dual-store-pill:nth-child(3) { transition-delay: 90ms; }
.dual-store-stack.is-spread .dual-store-more { display: none; }

body.scanner-live .scan-entry,
body.scanner-live .scan-daily-cap-fill,
body.scanner-live .scan-result-tray #scanResult,
body.scanner-live .dual-store-stack .dual-store-pill {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .scan-entry,
  .scan-daily-cap-fill,
  .scan-result-tray #scanResult,
  .dual-store-stack .dual-store-pill {
    transition: none !important;
  }
  .scan-entry-grid:not(.scan-entry-grid--single) .scan-entry,
  .scan-entry-grid:not(.scan-entry-grid--single) .scan-entry.active {
    transform: none;
    opacity: 1;
  }
}
