:root {
  --bg: #12141a;
  --card: #1c1f28;
  --ink: #f4efe6;
  --muted: #b5ad9f;
  --gold: #d4b36a;
  --line: #2c3140;
  --site: #7dcea0;
  --ebay: #8ab4f8;
  --shop: #e6c27a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Palatino Linotype", Palatino, "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
}
.preview-banner {
  margin: 0;
  padding: 0.7rem 1rem;
  text-align: center;
  background: #2a2418;
  border-bottom: 1px solid var(--gold);
  color: var(--gold);
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
}
.top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
h1 { margin: 0; font-weight: 600; letter-spacing: 0.02em; }
.tag, .legend p { margin: 0.35rem 0 0; color: var(--muted); }
.ship-line {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-size: 0.86rem;
  max-width: 38rem;
  line-height: 1.4;
}
.legend {
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
  max-width: 22rem;
}
.legend strong { color: var(--ink); }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.75rem;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 16rem;
  min-width: min(16rem, 100%);
}
.search-label {
  flex: 0 0 auto;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
#q, #sport {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font: 1rem system-ui, sans-serif;
}
#q {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  flex: 1;
  width: 100%;
}
#q::placeholder {
  color: var(--muted);
  opacity: 1;
}
.status { margin: 0; color: var(--muted); font-family: system-ui, sans-serif; font-size: 0.9rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  padding: 0 1.75rem 2.5rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.photo, .photo-fallback {
  aspect-ratio: 0.72;
  background: #0d0f14;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  position: relative;
}
.photo img { width: 100%; height: 100%; object-fit: contain; background: #0d0f14; }
.photo-fallback {
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem;
  text-align: center;
}
.ebay-photos {
  color: var(--gold);
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}
.ebay-photos:hover, .ebay-photos:focus {
  color: var(--ink);
}
.photo-caption-block {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.55rem 0.5rem 0.4rem;
  background: linear-gradient(transparent, #0d0f14f2 35%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  pointer-events: none;
  text-align: center;
}
.photo-caption {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-wrap: balance;
}
.photo-caption-block .ebay-photos {
  pointer-events: auto;
  font-size: 0.68rem;
}
.photo.has-caption .flip { bottom: 2.7rem; }
.flip {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #1c1f28cc;
  color: var(--ink);
  font: 0.7rem system-ui, sans-serif;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}
.body { padding: 0.8rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.title { margin: 0; font-size: 0.98rem; line-height: 1.3; }
.meta { margin: 0; font-family: system-ui, sans-serif; font-size: 0.75rem; color: var(--muted); }
.price-block { font-family: system-ui, sans-serif; margin: 0.15rem 0 0; }
.price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
}
.site-price {
  color: var(--site);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.site-price .lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.1rem;
}
.alongside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.alongside .ebay { color: var(--ebay); }
.alongside .shop { color: var(--shop); }
.save {
  margin: 0.35rem 0 0;
  color: var(--site);
  font-size: 0.78rem;
  font-weight: 600;
}
.ship { margin: 0.35rem 0 0; font-family: system-ui, sans-serif; font-size: 0.75rem; color: var(--muted); }
.coming-soon {
  margin-top: auto;
  width: 100%;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #2a2f3b;
  color: var(--muted);
  font: 0.85rem system-ui, sans-serif;
  text-align: center;
}
.empty { text-align: center; color: var(--muted); padding: 2rem; }
footer {
  padding: 1rem 1.75rem 2rem;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}
footer p { margin: 0.35rem 0 0; }
footer p:first-child { margin-top: 0; }
footer a { color: var(--gold); }
footer .ship-line { color: var(--ink); max-width: none; font-size: 0.82rem; margin-bottom: 0.5rem; }

@media (max-width: 640px) {
  .top, .toolbar, .grid, footer { padding-left: 1rem; padding-right: 1rem; }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    padding-bottom: 2rem;
  }
  h1 { font-size: 1.55rem; }
  .site-price { font-size: 1.3rem; }
  .search-field {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  #q { min-width: 0; width: 100%; }
  .preview-banner { font-size: 0.86rem; padding: 0.65rem 0.85rem; }
}
