:root {
  --bg: #f4f1e9;
  --surface: #fffdf7;
  --ink: #111612;
  --muted: #5c655d;
  --green: #173f2c;
  --green-light: #e6efe7;
  --gold: #dda72a;
  --error: #8c3028;
  --line: #ddd8cc;
  --shadow: 0 18px 45px rgba(23, 31, 25, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0%, rgba(221, 167, 42, 0.17), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
}

.page {
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 7rem) 0 2rem;
}

.hero {
  max-width: 31rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 14vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.intro {
  margin: 1.35rem 0 2.2rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.55;
}

.capture {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 12px 30px rgba(23, 63, 44, 0.2);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 1rem 1.55rem 1rem 1.15rem;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.capture:active {
  transform: translateY(1px);
  box-shadow: 0 7px 18px rgba(23, 63, 44, 0.2);
}

.capture:disabled {
  cursor: wait;
  opacity: 0.78;
}

.lens {
  position: relative;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: #fff;
}

.lens::after {
  position: absolute;
  inset: 0.52rem;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.workspace {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.workspace.is-hidden {
  display: none;
}

.photo-panel,
.result-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.photo-panel {
  background: #ede7da;
}

.preview {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
}

.result-panel {
  padding: clamp(1.15rem, 5vw, 1.7rem);
}

.status {
  min-height: 1.6rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.status.is-loading::before {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--gold);
  content: "";
  animation: pulse 900ms infinite alternate;
}

.status.is-error {
  color: var(--error);
}

@keyframes pulse {
  to {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

.identity {
  margin: 1.1rem 0 1.35rem;
}

.identity h2 {
  margin: 0 0 0.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 7vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.identity p {
  margin: 0;
  color: var(--muted);
}

.listing {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.listing:first-of-type {
  margin-top: 0;
}

.listing-title {
  margin: 0 0 0.32rem;
  font-size: 1.05rem;
}

.set-name {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.prices {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
}

.price {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.58rem 0.7rem;
  border-radius: 0.65rem;
  background: #f4f1e8;
  font-size: 0.92rem;
}

.price dd {
  margin: 0;
  font-weight: 700;
}

.source {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
}

@media (min-width: 48rem) {
  .page {
    padding-top: 4rem;
  }

  .workspace {
    grid-template-columns: minmax(16rem, 0.9fr) minmax(20rem, 1.1fr);
    align-items: start;
  }
}
