.head-actions {
  display: flex;
  gap: 7px;
}
.scan-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 750;
  background: #dff6e9;
  color: #0a5334;
  display: flex;
  gap: 5px;
  align-items: center;
}
.scan-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.sheet-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: -10px 0 16px;
}
.upload-zone {
  border: 2px dashed #b8c9bf !important;
  border-radius: 18px;
  padding: 22px !important;
  text-align: center;
  place-items: center;
  background: #f5faf7;
}
.native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}
.scan-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 12px 10px max(12px, env(safe-area-inset-bottom));
  background: rgba(1, 12, 7, 0.66);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.scan-overlay[hidden] {
  display: none;
}
.scan-overlay .scan-sheet {
  width: min(100%, 460px);
  max-height: calc(100dvh - 24px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.upload-zone strong {
  font-size: 0.9rem;
  color: var(--ink);
}
.upload-zone small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}
.upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #dff6e9;
  color: #0a633d;
  font-size: 1.3rem;
}
.photo-actions {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.photo-button {
  position: relative;
  display: grid !important;
  place-items: center;
  min-height: 44px;
  margin: 0 !important;
  padding: 10px 8px !important;
  border: 1px solid #bdd0c5 !important;
  border-radius: 12px;
  background: #fff;
  color: #0a5334;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.photo-button.primary-photo {
  border-color: #137a4d !important;
  background: #137a4d;
  color: #fff;
}
.photo-button:focus-within {
  outline: 3px solid rgba(19, 122, 77, 0.2);
  outline-offset: 2px;
}
.scan-preview {
  display: none;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  background: #eef2ef;
  border-radius: 15px;
  margin: 12px 0;
}
.scan-preview.visible {
  display: block;
}
.scan-progress {
  margin: 16px 0;
}
.scan-progress > div {
  height: 8px;
  background: #e5ebe7;
  border-radius: 9px;
  overflow: hidden;
}
.scan-progress span {
  display: block;
  width: 5%;
  height: 100%;
  background: var(--green);
  transition: width 0.2s;
}
.scan-progress p {
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
}
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 9px;
}
.results-head span {
  font-size: 0.72rem;
  color: var(--muted);
}
.detected-item {
  display: grid !important;
  grid-template-columns: auto minmax(90px, 1fr) 78px 76px;
  gap: 9px !important;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e8edea;
  margin: 0 !important;
}
.detected-item input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #15965a;
}
.detected-item input[type="text"],
.detected-item input[type="number"],
.detected-item select {
  min-width: 0;
  width: 100%;
  border: 1px solid #d5dcd8;
  border-radius: 9px;
  padding: 9px;
  font-size: 16px;
}
.price-field {
  position: relative;
}
.price-field:before {
  content: "$";
  position: absolute;
  left: 9px;
  top: 9px;
  color: #647168;
}
.price-field input {
  padding-left: 21px !important;
}
.privacy-note {
  text-align: center;
  color: #65736b;
  font-size: 0.68rem;
  margin: 15px 0 0;
}
@media (max-width: 390px) {
  .photo-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 600px) {
  .scan-overlay {
    align-items: center;
    padding: 24px;
  }

  .scan-overlay .scan-sheet {
    width: min(100%, 720px);
    max-height: calc(100dvh - 48px);
  }

  .upload-zone {
    padding: 30px !important;
  }

  .detected-item {
    grid-template-columns: auto minmax(180px, 1fr) 120px 120px;
    gap: 12px !important;
  }
}
