:root {
  --background: 0 0% 4%;
  --foreground: 0 0% 98%;
  --card-token: 0 0% 7%;
  --muted-token: 0 0% 12%;
  --muted-foreground: 0 0% 55%;
  --border-token: 0 0% 14%;
  --primary: 20 100% 60%;
  --orange: 20 100% 60%;
  --blue: 214 100% 64%;
  --radius: 0.75rem;
  --gradient-hero: linear-gradient(135deg, hsl(var(--orange)) 0%, hsl(var(--blue)) 100%);
  --gradient-orange: linear-gradient(135deg, hsl(var(--orange)) 0%, hsl(30 100% 55%) 100%);
  --glow-orange: 0 0 80px -20px hsl(var(--orange) / 0.4);
  --ink: hsl(var(--foreground));
  --ink-muted: hsl(var(--muted-foreground));
  --radius-xl: 24px;
  --radius-md: 12px;
  --gutter: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: hsl(var(--background));
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, "Avenir Next", "SF Pro Text", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: #000;
  display: grid;
  place-items: center;
  padding: 0;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

body.image-viewer-open {
  overflow: hidden;
}

.app-shell {
  width: min(460px, 100%);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  overscroll-behavior-y: contain;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  box-shadow: none;
}

.top-bar {
  min-height: calc(82px + var(--safe-top));
  padding: calc(18px + var(--safe-top)) 18px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid hsl(var(--foreground) / 0.08);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: hsl(var(--foreground));
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.logo-dot {
  width: 17px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: hsl(var(--orange));
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.desktop-nav-btn {
  min-width: 0;
  height: 30px;
  padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-muted);
  background: transparent;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  opacity: 0.88;
}

.desktop-nav-btn:not(:disabled) {
  cursor: pointer;
}

.desktop-nav-btn:active {
  background: transparent;
}

.desktop-nav-mobile-icon {
  display: none;
}

.desktop-nav-label {
  color: hsl(var(--foreground) / 0.52);
}

.desktop-nav-count {
  color: hsl(var(--foreground) / 0.42);
  font-weight: 500;
}

.desktop-nav-btn-wishlist svg {
  color: hsl(var(--foreground) / 0.94);
  fill: currentColor;
  stroke: currentColor;
}

.desktop-nav-divider {
  width: 1px;
  height: 38px;
  margin: 0 8px 0 6px;
  background: hsl(var(--foreground) / 0.1);
}

.sign-in-btn {
  height: 31px;
  padding: 0 15px;
  color: hsl(var(--foreground) / 0.88);
  border: 1px solid rgb(44 44 51);
  border-radius: 999px;
  background: transparent;
}

.desktop-nav-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.camera-stage {
  position: relative;
  margin: 0 var(--gutter);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 0;
  background: #050505;
  aspect-ratio: 3 / 4;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  transform-origin: top center;
  max-height: 1200px;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.18s ease;
  box-shadow: none;
}

.camera-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, transparent 58%, hsl(0 0% 0% / 0.2) 100%);
  z-index: 1;
}

@supports not (aspect-ratio: 1 / 1) {
  .camera-stage::before {
    content: "";
    display: block;
    padding-top: 133.3333%;
  }
}

.app-shell.has-frozen-capture:not(.is-reviewing-capture) .camera-stage {
  opacity: 0;
  transform: translateY(-10px) scale(0.965);
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-color: transparent;
  pointer-events: none;
}

.app-shell.is-reviewing-capture .camera-stage {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 1200px;
  margin-top: 0;
  margin-bottom: 0;
  border-color: transparent;
  pointer-events: auto;
}

#video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #060606;
  transform: scaleX(-1);
}

.captured-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
  background: #060606;
  opacity: 1;
  transition: opacity 0.24s ease;
  will-change: opacity;
}

.captured-preview.is-fading-out {
  opacity: 0;
}

.video-environment #video {
  transform: none;
}

.scan-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  border: 1px solid hsl(var(--foreground) / 0.16);
  box-shadow:
    inset 0 0 0 2px hsl(0 0% 0% / 0.1),
    0 0 38px hsl(var(--blue) / 0.16);
  pointer-events: none;
}

.scan-frame::before,
.scan-frame::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--orange) / 0.92), hsl(var(--blue) / 0.92), transparent);
  animation: pulse 1.8s infinite;
  opacity: 0;
}

.scan-active .scan-frame::before,
.scan-active .scan-frame::after {
  opacity: 1;
}

.scan-frame::before {
  top: 33.333%;
  animation-delay: 0.12s;
}

.scan-frame::after {
  top: 66.666%;
  animation-delay: 0.44s;
}

.stage-hint {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  color: rgba(238, 243, 255, 0.94);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  transition: opacity 0.18s ease;
  opacity: 0.95;
}

.stage-hint.hidden {
  opacity: 0;
}

.zoom-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  pointer-events: none;
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border-token));
  background: hsl(var(--card-token) / 0.72);
  color: rgba(238, 243, 255, 0.98);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.capture-review {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 22px 18px 18px;
  background:
    linear-gradient(180deg, hsl(0 0% 3% / 0.06) 0%, hsl(0 0% 3% / 0.12) 42%, hsl(0 0% 3% / 0.88) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-shell.is-reviewing-capture .capture-review {
  opacity: 1;
  pointer-events: auto;
}

.capture-review-copy {
  display: grid;
  gap: 6px;
  max-width: 86%;
}

.capture-review.is-loading .capture-review-copy,
.capture-review.is-loading .capture-review-choices,
.capture-review.is-loading .capture-review-actions {
  visibility: hidden;
  pointer-events: none;
}

.capture-review-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 144px;
}

.capture-review-loading.hidden {
  display: none;
}

.capture-review-spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: hsl(var(--orange));
  animation: spin 0.8s linear infinite;
}

.capture-review-loading-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(238, 243, 255, 0.92);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
}

.capture-review-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 2px 4px;
}

.capture-review-choices.hidden {
  display: none;
}

.capture-review-choices::-webkit-scrollbar {
  display: none;
}

.capture-review-choice {
  border: 1px solid hsl(var(--border-token));
  border-radius: 12px;
  padding: 5px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  background: hsl(var(--card-token) / 0.82);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.capture-review-choice.is-selected {
  border-color: hsl(var(--orange));
  background: hsl(var(--muted-token) / 0.9);
  box-shadow: 0 14px 28px hsl(var(--orange) / 0.22);
  transform: translateY(-1px);
}

.capture-review-choice-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: #060606;
}

.capture-review-title {
  font-family: Outfit, Inter, "Avenir Next", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.capture-review-sub {
  font-size: 0.83rem;
  line-height: 1.45;
  color: rgba(238, 243, 255, 0.84);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.capture-review-sub:empty {
  display: none;
}

.capture-review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.capture-review-actions .action-btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  line-height: 1.1;
}

.capture-review-actions .action-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#captureReviewRetakeBtn span {
  white-space: nowrap;
}

.app-shell.is-reviewing-capture .scan-frame,
.app-shell.is-reviewing-capture .stage-hint,
.app-shell.is-reviewing-capture .zoom-badge {
  display: none;
}

.app-shell.is-preparing-capture-review #video {
  opacity: 0;
}

.camera-fallback {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.93rem;
  line-height: 1.45;
  background: #000;
  z-index: 3;
  pointer-events: auto;
}

.camera-fallback-brand {
  position: relative;
  font-family: Outfit, Inter, sans-serif;
  font-size: clamp(2.35rem, 13vw, 3.7rem);
  font-weight: 800;
  line-height: 0.96;
  text-align: left;
}

.camera-fallback-brand::before {
  content: "";
  position: absolute;
  inset: -24px -34px -18px -30px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 32% 38%, hsl(var(--orange) / 0.18), transparent 42%),
    radial-gradient(circle at 78% 68%, hsl(var(--blue) / 0.14), transparent 42%);
  filter: blur(18px);
}

.camera-fallback-brand span {
  display: block;
}

.hero-line-plain {
  color: hsl(var(--foreground));
}

.hero-line-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.camera-fallback-message {
  max-width: 22ch;
}

.camera-fallback.is-loading .camera-fallback-message {
  color: rgba(238, 243, 255, 0.9);
}

.camera-fallback-spinner {
  width: 30px;
  height: 30px;
}

.camera-fallback.hidden {
  display: none;
}

.actions {
  position: relative;
  z-index: 6;
  margin-top: 12px;
  margin-bottom: 22px;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: flex-end;
  max-height: 56px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.app-shell.has-frozen-capture .actions {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  pointer-events: none;
}

.action-btn {
  border: none;
  border-radius: 12px;
  padding: 13px 12px;
  min-height: 56px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  color: hsl(var(--foreground));
  background: var(--gradient-orange);
  box-shadow: 0 14px 30px hsl(var(--orange) / 0.24);
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.action-btn.secondary {
  color: var(--ink);
  background: hsl(var(--muted-token) / 0.86);
  border: 1px solid hsl(var(--border-token));
  box-shadow: none;
}

.action-btn:active {
  transform: translateY(1px) scale(0.99);
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.action-btn.secondary.upload-action {
  min-height: 0;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 0;
  color: hsl(var(--foreground) / 0.72);
  background: transparent;
  border: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.action-btn.secondary.upload-action:hover {
  color: hsl(var(--foreground) / 0.9);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.action-btn.secondary.upload-action:focus,
.action-btn.secondary.upload-action:focus-visible {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

.action-btn.secondary.upload-action:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: hsl(var(--foreground) / 0.66);
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-action span {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.desktop-upload-panel {
  display: none;
}

.desktop-query-preview,
.upload-label-compact,
.desktop-reset-btn,
.desktop-upload-meta {
  display: none;
}

.result-star {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--foreground) / 0.86);
  background: hsl(var(--background) / 0.56);
  border: 1px solid hsl(var(--foreground) / 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.result-star svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-star.is-starred {
  color: hsl(var(--primary));
}

.result-star.is-starred svg {
  fill: currentColor;
}

.result-star.is-saving {
  opacity: 0.72;
  pointer-events: none;
}

.result-star.is-error {
  border-color: hsl(var(--primary) / 0.72);
}

.fallback-open-btn {
  position: relative;
  z-index: 2;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  color: hsl(var(--foreground));
  background-color: hsl(var(--primary));
  background-image: none;
  box-shadow: var(--glow-orange);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fallback-open-btn:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.scan-meter {
  margin: 0 var(--gutter);
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: hsl(var(--card-token) / 0.82);
  backdrop-filter: blur(8px);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.18s ease;
}

.scan-meter.active {
  margin: 12px var(--gutter) 2px;
  padding: 12px;
  border-color: hsl(var(--border-token));
  max-height: 120px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.scan-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: hsl(var(--muted-token));
  overflow: hidden;
}

.scan-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-hero);
  transition: width 0.2s linear;
}

.scan-sub {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  min-height: 2.4em;
}

.result-sheet {
  margin: 12px var(--gutter) 0;
  border-radius: 20px 20px 0 0;
  border: 1px solid hsl(var(--border-token));
  border-bottom: 0;
  background:
    radial-gradient(circle at 100% 0%, hsl(var(--blue) / 0.1), transparent 32%),
    linear-gradient(160deg, hsl(var(--card-token) / 0.98), hsl(var(--background) / 0.98));
  padding: 0 14px 0;
  min-height: 0;
  opacity: 0;
  transform: translateY(16px);
  max-height: 0;
  margin-top: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.22s ease, transform 0.24s ease;
}

.result-sheet.is-dragging {
  transition: none;
}

.result-sheet.visible,
html.is-scan-route .result-sheet {
  opacity: 1;
  transform: translateY(0);
  max-height: 9999px;
  margin-top: 12px;
  padding: 10px 14px calc(14px + var(--safe-bottom));
  min-height: calc(100dvh - 82px - var(--safe-top) - 12px);
  pointer-events: auto;
}

html.is-scan-route .camera-stage,
html.is-scan-route .actions,
html.is-scan-route .desktop-upload-panel,
html.is-scan-route .scan-meter {
  display: none;
}

.sheet-handle {
  position: relative;
  display: block;
  width: 112px;
  height: 34px;
  margin: -4px auto 8px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.sheet-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: hsl(var(--foreground) / 0.28);
  transform: translate(-50%, -50%);
}

.sheet-handle:active {
  cursor: grabbing;
}

.sheet-handle:focus-visible {
  outline: 2px solid hsl(var(--orange) / 0.8);
  outline-offset: 3px;
}

.sheet-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 12px;
}

.sheet-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.sheet-query {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid hsl(var(--border-token));
  background: hsl(var(--background) / 0.72);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.sheet-query img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.18;
}

.sheet-subtitle {
  display: none;
}

.sheet-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

.sheet-link-action {
  width: max-content;
  min-height: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: hsl(var(--primary));
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  line-height: 0.85rem;
  cursor: pointer;
  transition: border-color 0.11s ease;
}

.sheet-link-action:hover {
  border-bottom-color: transparent;
}

.sheet-link-action.is-copied {
  color: hsl(var(--foreground) / 0.78);
}

.sheet-link-action svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.provider-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.provider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.provider-title {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
  color: hsl(var(--foreground) / 0.94);
}

.provider-status {
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-align: right;
}

.provider-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  align-items: stretch;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--border-token));
  background: hsl(var(--card-token) / 0.9);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 8px 20px hsl(0 0% 0% / 0.22);
}

.result-thumb {
  position: relative;
  background: hsl(var(--muted-token));
  width: 112px;
  height: 144px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--ink-muted);
  overflow: hidden;
}

.result-thumb.is-expandable {
  cursor: zoom-in;
}

.result-thumb.empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.result-thumb-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.result-thumb-track::-webkit-scrollbar {
  display: none;
}

.result-thumb-frame {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  background: hsl(var(--muted-token));
}

.result-thumb-frame.is-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  line-height: 1.3;
}

.result-thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.scans-modal-open {
  overflow: hidden;
}

.scans-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 160ms;
}

.scans-modal.is-visible {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.scans-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 160ms ease;
}

.scans-modal.is-visible .scans-modal-backdrop {
  opacity: 1;
}

.scans-modal-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: min(72vh, 620px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: .5px solid hsl(var(--border-token));
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: hsl(var(--card-token) / 0.98);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 0, 0.2, 1);
}

.scans-modal.is-visible .scans-modal-panel {
  opacity: 1;
  transform: translateY(0);
}

.scans-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}

.scans-modal-head h2 {
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.scans-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid hsl(var(--border-token));
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--foreground));
  background: hsl(var(--background) / 0.72);
  cursor: pointer;
}

.scans-modal-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scans-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 14px calc(14px + var(--safe-bottom));
  overflow-y: auto;
}

.scans-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius-md);
  padding: 9px;
  color: hsl(var(--foreground));
  background: hsl(var(--background) / 0.62);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.scans-row:hover {
  border-color: hsl(var(--foreground) / 0.24);
  background: hsl(var(--muted-token) / 0.76);
}

.saved-row {
  grid-template-columns: 56px minmax(0, 1fr) 34px;
  text-decoration: none;
}

.saved-row.is-unsaved {
  opacity: 0.48;
}

.saved-row-star {
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  color: hsl(var(--orange));
  background: transparent;
  cursor: pointer;
}

.saved-row-star:hover {
  border-color: hsl(var(--orange) / 0.34);
  background: hsl(var(--orange) / 0.12);
}

.saved-row-star:disabled {
  cursor: default;
}

.saved-row-star svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.saved-row.is-unsaved .saved-row-star {
  color: hsl(var(--foreground) / 0.86);
}

.saved-row.is-unsaved .saved-row-star svg {
  fill: none;
}

.scans-row-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: hsl(var(--muted-token));
}

.scans-row-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.scans-row-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.scans-row-title {
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

.scans-row-meta,
.scans-empty {
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.scans-empty {
  padding: 20px 8px 24px;
  text-align: center;
}

.result-thumb-status {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 26px;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: hsl(var(--foreground));
  background: hsl(var(--background) / 0.72);
}

.gallery-nav {
  position: absolute;
  z-index: 4;
  width: 26px;
  height: 26px;
  border: 1px solid hsl(var(--foreground) / 0.12);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--foreground) / 0.82);
  background: hsl(var(--background) / 0.28);
  box-shadow: 0 8px 18px hsl(0 0% 0% / 0.12);
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.gallery-nav:hover {
  opacity: 0.9;
  background: hsl(var(--background) / 0.44);
}

.gallery-nav:disabled {
  opacity: 0.24;
  cursor: default;
}

.gallery-nav svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-gallery-nav {
  top: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.result-thumb:not(:hover):not(:focus-within) .result-gallery-nav {
  opacity: 0;
  pointer-events: none;
}

.result-thumb:hover .result-gallery-nav,
.result-thumb:focus-within .result-gallery-nav {
  opacity: 0.42;
  pointer-events: auto;
}

.result-thumb:hover .result-gallery-nav:hover,
.result-thumb:focus-within .result-gallery-nav:hover {
  opacity: 0.72;
}

.result-thumb:hover .result-gallery-nav:disabled,
.result-thumb:focus-within .result-gallery-nav:disabled {
  opacity: 0.08;
}

.result-gallery-nav-prev {
  left: 7px;
}

.result-gallery-nav-next {
  right: 7px;
}

.result-body {
  padding: 10px 10px 9px 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.result-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.result-name {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.26;
  max-height: 2.52em;
  overflow: hidden;
}

.result-meta {
  color: var(--ink-muted);
  font-size: 0.73rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.result-reference {
  color: hsl(var(--foreground) / 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
}

.result-price {
  color: hsl(var(--orange));
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.result-rank {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.result-match-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  padding: 2px 5px;
  border-radius: 0;
  color: hsl(var(--foreground));
  background: hsl(var(--background) / 0.72);
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.empty-state {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 36px 12px;
  border: 1px dashed hsl(var(--border-token));
  border-radius: 12px;
  background: hsl(var(--muted-token) / 0.38);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: calc(18px + var(--safe-top)) 16px calc(18px + var(--safe-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overscroll-behavior: contain;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

.image-viewer.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.24s ease;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: hsl(var(--background) / 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.image-viewer-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  height: min(78vh, 640px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.image-viewer.is-visible .image-viewer-backdrop {
  opacity: 1;
}

.image-viewer.is-visible .image-viewer-shell {
  opacity: 1;
}

.image-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.image-viewer-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: hsl(var(--foreground) / 0.94);
  background: hsl(var(--card-token) / 0.78);
  border: 1px solid hsl(var(--border-token));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}

.image-viewer-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-viewer-stage {
  position: relative;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid hsl(var(--border-token));
  background: hsl(var(--card-token) / 0.9);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.image-viewer-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.image-viewer-track::-webkit-scrollbar {
  display: none;
}

.image-viewer-frame {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  padding: 18px 18px 96px;
}

.image-viewer-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.image-viewer-status {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: hsl(var(--foreground) / 0.96);
  background: hsl(var(--background) / 0.72);
  border: 1px solid hsl(var(--border-token));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-viewer-nav {
  top: 50%;
  width: 42px;
  height: 42px;
  pointer-events: none;
  transform: translateY(-50%);
}

.image-viewer-stage:hover .image-viewer-nav,
.image-viewer-stage:focus-within .image-viewer-nav {
  opacity: 0.64;
  pointer-events: auto;
}

.image-viewer-stage:hover .image-viewer-nav:hover,
.image-viewer-stage:focus-within .image-viewer-nav:hover {
  opacity: 0.9;
}

.image-viewer-stage:hover .image-viewer-nav:disabled,
.image-viewer-stage:focus-within .image-viewer-nav:disabled {
  opacity: 0.16;
}

.image-viewer-nav.hidden {
  display: none;
}

.image-viewer-nav-prev {
  left: 16px;
}

.image-viewer-nav-next {
  right: 16px;
}

.image-viewer-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 58px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, hsl(var(--card-token) / 0.9), hsl(var(--background) / 0.96));
  border-top: 1px solid hsl(var(--border-token));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.image-viewer-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.image-viewer-title {
  color: hsl(var(--foreground) / 0.96);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-viewer-subtitle {
  color: hsl(var(--muted-foreground) / 0.96);
  font-size: 0.74rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-viewer-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: hsl(var(--blue));
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.image-viewer-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  0% { transform: scaleX(0.94); opacity: 0.15; }
  50% { transform: scaleX(1); opacity: 0.85; }
  100% { transform: scaleX(0.94); opacity: 0.15; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scans-modal,
  .scans-modal-backdrop,
  .scans-modal-panel {
    transition: none;
  }
}

@media (max-width: 759px) {
  .top-bar {
    padding-inline: 14px;
    gap: 10px;
  }

  .logo-mark {
    gap: 6px;
    font-size: 0.88rem;
  }

  .desktop-nav {
    gap: 6px;
  }

  .desktop-nav-btn {
    height: 34px;
    padding: 0;
    border-radius: 999px;
  }

  .desktop-nav-btn svg {
    width: 16px;
    height: 16px;
  }

  .desktop-nav-btn-recent {
    min-width: 34px;
  }

  .desktop-nav-label {
    display: none;
  }

  .desktop-nav-count {
    display: inline;
    color: currentColor;
    font-size: 0.72rem;
  }

  .desktop-nav-btn-recent .desktop-nav-mobile-icon {
    display: block;
    color: hsl(var(--foreground) / 0.56);
  }

  .desktop-nav-btn-wishlist {
    min-width: 34px;
    color: hsl(var(--foreground) / 0.92);
  }

  .desktop-nav-btn-recent,
  .desktop-nav-btn-wishlist {
    width: auto;
    padding: 0 8px;
    gap: 5px;
  }

  .sign-in-btn {
    width: auto;
    min-width: 64px;
    padding: 0 14px;
    border-radius: 999px;
  }

  .desktop-nav-btn.is-active {
    border-color: hsl(var(--orange) / 0.42);
    color: hsl(var(--orange));
    background: hsl(var(--orange) / 0.12);
  }

  .desktop-nav-btn.is-active .desktop-nav-mobile-icon,
  .desktop-nav-btn.is-active svg {
    color: hsl(var(--orange));
  }

  .desktop-nav-divider {
    display: none;
  }

  .result-gallery-nav {
    display: none;
  }
}

@media (max-width: 380px) {

  .capture-review {
    padding: 20px 16px 16px;
  }

  .capture-review-copy {
    max-width: 100%;
  }

  .capture-review-title {
    font-size: 1.12rem;
  }
}

@media (min-width: 760px) {
  body {
    align-items: start;
    padding: 0;
    overflow-y: auto;
  }

  .app-shell {
    width: min(980px, 100%);
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 0 36px 32px;
    overflow: visible;
  }

  .top-bar {
    min-height: 66px;
    padding: 0;
  }

  .scans-modal {
    inset: 66px 0 0;
    align-items: stretch;
    justify-content: flex-end;
  }

  .scans-modal-backdrop {
    background: rgba(0, 0, 0, 0.42);
  }

  .scans-modal-panel {
    width: min(430px, 36vw);
    min-width: 360px;
    max-height: none;
    height: 100%;
    border-block: 0;
    border-right: 0;
    border-radius: 0;
    transform: translateX(14px);
  }

  .scans-modal.is-visible .scans-modal-panel {
    transform: translateX(0);
  }

  .scans-modal-head {
    padding: 22px 24px 16px;
    border-bottom: 1px solid hsl(var(--border-token));
  }

  .scans-modal-close {
    border-color: transparent;
    background: transparent;
  }

  .scans-list {
    padding: 18px 24px 28px;
  }

  .desktop-nav {
    gap: 26px;
  }

  .desktop-nav-btn {
    height: 32px;
    padding: 0;
    gap: 10px;
    font-size: 0.86rem;
  }

  .desktop-nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .desktop-nav-divider {
    margin-left: -4px;
    margin-right: -8px;
  }

  .sign-in-btn {
    padding: 0 18px;
  }

  .camera-stage {
    display: none;
    margin: 0;
    width: 100%;
    max-width: 390px;
    justify-self: center;
  }

  .actions {
    display: none;
  }

  .desktop-upload-panel {
    display: grid;
    grid-template-columns: minmax(min(320px, 38vw), 0.9fr) minmax(min(390px, 48vw), 1fr);
    align-items: center;
    gap: clamp(28px, 4vw, 52px);
    width: 100%;
    justify-self: center;
    padding: 54px 0 0;
  }

  .desktop-upload-copy {
    font-family: Outfit, Inter, sans-serif;
    display: grid;
    justify-items: start;
    gap: 18px;
    text-align: left;
  }

  .desktop-upload-eyebrow {
    color: hsl(var(--orange));
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .desktop-upload-title {
    display: grid;
    gap: 0.2em;
    color: hsl(var(--foreground));
    font-size: clamp(4.5rem, 6vw, 4.8rem);
    font-weight: 800;
    line-height: 0.85;
  }

  .desktop-upload-title span {
    display: inline-block;
  }

  .desktop-query-preview {
    width: 112px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid hsl(var(--border-token));
    background: hsl(var(--muted-token) / 0.7);
  }

  .desktop-query-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .desktop-upload-card {
    display: grid;
    min-width: 0;
  }

  .desktop-dropzone {
    min-height: 280px;
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    padding: 36px 30px 54px;
    border: 1px dashed hsl(var(--foreground) / 0.22);
    border-radius: 12px;
    color: hsl(var(--foreground) / 0.92);
    background: hsl(var(--background) / 0.38);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  }

  .desktop-dropzone:hover,
  .desktop-dropzone:focus-visible,
  .desktop-dropzone.is-dragging {
    border-color: hsl(var(--primary) / 0.7);
    background: hsl(var(--muted-token) / 0.58);
  }

  .desktop-upload-icon {
    width: 58px;
    aspect-ratio: 1;
    border: 1px solid hsl(var(--orange) / 0.42);
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: hsl(var(--orange) / 0.12);
  }

  .desktop-dropzone svg {
    width: 24px;
    height: 24px;
    stroke: hsl(var(--primary));
    stroke-width: 2.1;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .desktop-dropzone .upload-label-initial,
  .desktop-dropzone .upload-label-compact {
    font-size: 1.1rem;
  }

  .desktop-dropzone small {
    color: var(--ink-muted);
    font-size: 0.85rem;
    font-weight: 600;
  }

  .desktop-dropzone small span {
    color: hsl(var(--foreground) / 0.88);
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .desktop-upload-meta {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 22px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: hsl(var(--foreground) / 0.36);
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.14em;
  }

  .desktop-url-form {
    display: none;
    grid-template-columns: 118px 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .desktop-url-or {
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 600;
  }

  .desktop-url-form input {
    min-width: 0;
    min-height: 50px;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border-token));
    padding: 0 14px;
    color: hsl(var(--foreground));
    background: hsl(var(--background) / 0.64);
    font: inherit;
  }

  .desktop-url-form input:focus {
    outline: 2px solid hsl(var(--primary) / 0.72);
    outline-offset: 2px;
  }

  .desktop-url-form .action-btn {
    min-height: 50px;
    padding-inline: 18px;
    color: hsl(var(--foreground));
    background-color: hsl(var(--primary));
    background-image: none;
    box-shadow: var(--glow-orange);
    border-radius: calc(var(--radius) - 2px);
  }

  .desktop-url-form .action-btn:hover {
    background-color: hsl(var(--primary) / 0.9);
  }

  .desktop-upload-status {
    min-height: 1.4em;
    color: var(--ink-muted);
    font-size: 0.84rem;
  }

  .desktop-upload-status.is-error {
    color: hsl(var(--primary));
  }

  .desktop-sample-row {
    color: var(--ink-muted);
    text-align: center;
    font-size: 0.84rem;
  }

  .desktop-sample-row button {
    border: 0;
    padding: 0;
    color: hsl(var(--primary));
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  .app-shell.has-search-results .desktop-upload-panel {
    display: none;
  }

  .app-shell.is-reviewing-capture .desktop-upload-panel {
    display: none;
  }

  .app-shell.is-reviewing-capture .camera-stage {
    display: block;
    width: 100%;
    max-width: none;
    max-height: min(62vh, 620px);
    margin-bottom: 74px;
    aspect-ratio: 16 / 9;
    border: 1px solid hsl(var(--foreground) / 0.08);
    border-radius: calc(var(--radius-xl) + 2px);
    background: #000;
    overflow: visible;
    box-shadow: inset 0 0 0 1px hsl(var(--foreground) / 0.03);
    touch-action: auto;
  }

  .app-shell.is-reviewing-capture .captured-preview {
    object-fit: contain;
    background: #000;
    border-radius: inherit;
  }

  .app-shell.is-reviewing-capture .capture-review {
    gap: 18px;
    padding: 24px;
    border-radius: inherit;
    background:
      linear-gradient(180deg, hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.08) 38%, hsl(0 0% 0% / 0.72) 100%);
  }

  .app-shell.is-reviewing-capture .capture-review-copy {
    display: none;
  }

  .app-shell.is-reviewing-capture .capture-review-choices {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 0;
  }

  .app-shell.is-reviewing-capture .capture-review-choices.hidden {
    display: none;
  }

  .app-shell.is-reviewing-capture .capture-review-choice {
    position: relative;
    width: clamp(126px, 14vw, 178px);
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 16px;
    background: hsl(var(--card-token) / 0.36);
    box-shadow: 0 18px 42px hsl(0 0% 0% / 0.35);
  }

  .app-shell.is-reviewing-capture .capture-review-choice.is-selected {
    border-color: hsl(var(--primary));
    background: hsl(var(--card-token) / 0.44);
    box-shadow: 0 16px 36px hsl(var(--primary) / 0.28);
    transform: none;
  }

  .app-shell.is-reviewing-capture .capture-review-choice.is-selected::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: hsl(var(--primary));
    box-shadow: 0 8px 18px hsl(var(--primary) / 0.36);
  }

  .app-shell.is-reviewing-capture .capture-review-choice.is-selected::before {
    content: "";
    position: absolute;
    top: 17px;
    right: 18px;
    z-index: 1;
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
  }

  .app-shell.is-reviewing-capture .capture-review-choice-thumb {
    height: 100%;
    aspect-ratio: auto;
    border-radius: 14px;
  }

  .app-shell.is-reviewing-capture .capture-review-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -74px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
  }

  .app-shell.is-reviewing-capture .capture-review-actions .action-btn {
    width: auto;
    min-width: 0;
    min-height: 54px;
    padding: 0 24px;
    border-radius: calc(var(--radius) - 2px);
  }

  .app-shell.is-reviewing-capture #captureReviewRetakeBtn {
    color: hsl(var(--foreground) / 0.92);
    background: hsl(var(--card-token) / 0.78);
    border: 1px solid hsl(var(--foreground) / 0.12);
    box-shadow: none;
  }

  .app-shell.is-reviewing-capture #captureReviewSearchBtn {
    color: hsl(var(--primary-foreground));
    background-color: hsl(var(--primary));
    background-image: none;
    box-shadow: var(--glow-orange);
  }

  .app-shell.is-reviewing-capture #captureReviewSearchBtn:hover {
    background-color: hsl(var(--primary) / 0.9);
  }

  .camera-stage #video,
  .camera-stage .camera-fallback,
  .camera-stage .scan-frame,
  .camera-stage .stage-hint,
  .camera-stage .zoom-badge {
    display: none;
  }

  .scan-meter {
    margin-inline: 0;
  }

  .result-sheet {
    margin-inline: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .result-sheet.visible {
    max-height: none;
    min-height: 0;
    margin-top: 6px;
    padding: 0 0 18px;
    transform: none;
    padding-bottom: 18px;
  }

  html.is-scan-route .result-sheet {
    padding-inline: 0;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-head {
    margin: 16px 0 24px;
  }

  .sheet-head-main {
    gap: 18px;
  }

  .sheet-copy {
    display: grid;
    gap: 5px;
    margin-right: auto;
  }

  .sheet-subtitle {
    display: block;
    color: var(--ink-muted);
    font-size: 0.86rem;
  }

  .sheet-query:not(.hidden) {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 12px;
  }

  .desktop-results-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding-bottom: 64px;
  }

  .desktop-results-list .result-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    border-color: hsl(var(--foreground) / 0.08);
    background: hsl(var(--card-token));
    box-shadow: none;
    transition: border-color 0.18s ease;
  }

  .desktop-results-list .result-card:hover {
    border-color: hsl(var(--primary) / 0.34);
  }

  .desktop-results-list .result-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .desktop-results-list .result-body {
    padding: 11px 11px 13px;
    gap: 7px;
    align-content: start;
  }

  .desktop-results-list .result-name {
    min-height: 2.7em;
    font-size: 0.86rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .desktop-results-list .result-meta,
  .desktop-results-list .result-rank {
    font-size: 0.74rem;
  }

  .desktop-results-list .result-price {
    color: hsl(var(--foreground));
    font-size: 0.86rem;
  }

  .desktop-results-list .result-star {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--foreground) / 0.86);
    background: hsl(var(--background) / 0.56);
    border: 1px solid hsl(var(--foreground) / 0.12);
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .desktop-results-list .result-star svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .desktop-results-list .result-star.is-starred {
    color: hsl(var(--primary));
  }

  .desktop-results-list .result-star.is-starred svg {
    fill: currentColor;
  }

  .result-notice {
    margin-top: 12px;
    color: var(--ink-muted);
    font-size: 0.82rem;
  }

  .provider-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}
