:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #10271f;
  color: #f7f4e9;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, a { font: inherit; }

.welcome {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  background: radial-gradient(circle at 50% 25%, #315947, #10271f 55%, #08140f);
}

.brand { font-size: .82rem; font-weight: 750; letter-spacing: .27em; }
.brand.small { font-size: .68rem; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(3rem, 12vw, 5.6rem); font-weight: 400; }
.welcome p { margin: .15rem 0; font-size: 1.1rem; }
.primary {
  min-height: 3.6rem;
  margin-top: 1.2rem;
  padding: 0 1.8rem;
  border: 0;
  border-radius: 999px;
  background: #e7ff6b;
  color: #10271f;
  font-weight: 750;
}
.primary:disabled { opacity: .55; }
.privacy { max-width: 30rem; opacity: .65; font-size: .78rem !important; }
.error { color: #ffbaa9; max-width: 30rem; }

.scanner { position: fixed; inset: 0; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.shade { position: absolute; inset: 0; background: linear-gradient(#0008, transparent 24%, transparent 67%, #000c); pointer-events: none; }
.reticle { position: absolute; left: 50%; top: 46%; width: min(72vw, 42vh); aspect-ratio: 1; transform: translate(-50%, -50%); }
.reticle span { position: absolute; width: 3rem; height: 3rem; border-color: #e7ff6b; border-style: solid; }
.reticle span:nth-child(1) { left: 0; top: 0; border-width: 3px 0 0 3px; border-radius: 1rem 0 0 0; }
.reticle span:nth-child(2) { right: 0; top: 0; border-width: 3px 3px 0 0; border-radius: 0 1rem 0 0; }
.reticle span:nth-child(3) { right: 0; bottom: 0; border-width: 0 3px 3px 0; border-radius: 0 0 1rem 0; }
.reticle span:nth-child(4) { left: 0; bottom: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 1rem; }
.scanner-header { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 1.1rem) 1.2rem 1rem; }
.engine-badge { padding: .42rem .65rem; border: 1px solid #fff5; border-radius: 999px; background: #0005; font-size: .65rem; letter-spacing: .09em; }
.search-status { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 2rem); transform: translateX(-50%); display: flex; align-items: center; gap: .65rem; width: max-content; max-width: 88vw; padding: .8rem 1.1rem; border-radius: 999px; background: #10271fe8; backdrop-filter: blur(14px); }
.pulse { width: .65rem; height: .65rem; border-radius: 50%; background: #e7ff6b; box-shadow: 0 0 0 0 #e7ff6b80; animation: pulse 1.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.product-card { position: absolute; left: 1rem; right: 1rem; bottom: calc(env(safe-area-inset-bottom) + 5.7rem); padding: 1.1rem 1.2rem; border: 1px solid #fff3; border-radius: 1.35rem; background: #10271ff2; box-shadow: 0 1rem 3rem #0008; backdrop-filter: blur(18px); }
.product-title { font-size: 1.1rem; font-weight: 750; }
.product-variant { margin-top: .2rem; color: #d6dfd8; }
.product-price { margin: .65rem 0 .35rem; color: #e7ff6b; font-family: Georgia, serif; font-size: clamp(2.8rem, 13vw, 4.8rem); line-height: .95; }
.product-availability { color: #b8d7c5; font-size: .82rem; }
.details { position: absolute; right: 1.2rem; top: 1.1rem; color: #f7f4e9; }
[data-state="CONFIRMED"] .reticle span { border-color: #9ef3c4; }
[data-state="UNCERTAIN"] .reticle span { border-color: #ffcc72; }
