:root {
  --ink: #2a140c;
  --brown: #4e1e00;
  --gold: #c4923a;
  --gold-deep: #6e3f0c;
  --muted: #8a7568;
  --paper: #f3e9db;
  --card: #fffcf7;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --shadow: 0 10px 28px rgba(42, 20, 12, 0.06);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(1100px 420px at 50% -120px, rgba(255, 250, 242, 0.95), transparent 62%),
    radial-gradient(700px 380px at 110% 110%, rgba(196, 146, 58, 0.09), transparent 55%),
    var(--paper);
  color-scheme: light;
}

body.no-scroll { overflow: hidden; }

.gold-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 40;
  background: linear-gradient(90deg, #8c5a08, #e8c56a 50%, #8c5a08);
}

img { max-width: 100%; }

button, input { font-family: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1040px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}

.hero {
  padding: 28px 16px 6px;
  text-align: center;
}

.logo {
  display: block;
  width: min(270px, 100%);
  height: auto;
  margin: 0 auto;
}

.kicker {
  margin: 2px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.hero-note {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--brown);
}

.toolbar {
  position: sticky;
  top: 3px;
  z-index: 20;
  padding: 12px 0 8px;
  background: rgba(243, 233, 219, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(78, 30, 0, 0.06);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid rgba(78, 30, 0, 0.12);
  border-radius: 999px;
}

.search svg {
  flex: 0 0 auto;
  color: var(--gold-deep);
}

.search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search input::placeholder { color: #a89486; }

.search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 146, 58, 0.22);
}

.cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin-top: 10px;
  padding: 4px;
  background: rgba(78, 30, 0, 0.06);
  border-radius: 999px;
}

.cat {
  border: 0;
  background: transparent;
  color: var(--brown);
  border-radius: 999px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 4px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
}

.cat.is-active {
  background: #3a2014;
  color: #f6efe4;
  box-shadow: 0 6px 16px rgba(42, 20, 12, 0.16);
}

.cat:focus-visible,
.photo:focus-visible,
.btn:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.count {
  margin: 8px 4px 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section { margin: 6px 0 26px; }

.section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 14px;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 2rem;
  color: var(--brown);
}

.section h2::before,
.section h2::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.grid {
  display: grid;
  gap: 12px;
}

.item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px 14px;
  align-items: center;
  padding: 8px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(78, 30, 0, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.photo {
  width: 112px;
  height: 112px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #efe4d4;
  cursor: zoom-in;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-body { min-width: 0; }

.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.12;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.detail {
  margin: 4px 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.price {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 3px 10px 4px;
  border-radius: 999px;
  background: rgba(196, 146, 58, 0.16);
  color: var(--gold-deep);
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.empty {
  margin: 28px 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
}

.footer {
  padding: 12px 16px 40px;
  text-align: center;
}

.footer img {
  width: 52px;
  height: auto;
  margin-bottom: 4px;
}

.footer p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--brown);
}

.footer .footer-sub {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 28px;
  background: rgba(26, 12, 8, 0.92);
}

.lightbox figure {
  margin: 0;
  width: min(560px, 100%);
}

.lightbox img {
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  border-radius: 18px;
  background: #f4ebdd;
}

.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: 14px;
}

.lightbox .name {
  color: #f6efe4;
  font-size: 1.7rem;
}

.lightbox .detail { color: #e7d3bc; }

.lightbox .price {
  flex: 0 0 auto;
  margin: 0;
  background: transparent;
  color: #e8c56a;
  font-size: 1.25rem;
  padding: 0;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid rgba(246, 239, 228, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #f6efe4;
  font-size: 0.92rem;
  cursor: pointer;
}

.page-qr .logo { width: min(230px, 100%); }

.gate,
.qr-app {
  width: min(460px, 100%);
  margin: 8px auto 48px;
  padding-inline: 16px;
  text-align: center;
}

.gate h1,
.qr-app h1 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.3rem;
  color: var(--brown);
}

.lede {
  margin: 0 auto 16px;
  max-width: 34em;
  color: #6d5b50;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.poster-wrap {
  display: flex;
  justify-content: center;
}

#poster {
  width: min(420px, 100%);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(42, 20, 12, 0.16);
  background: #f4ebdd;
}

.qr-status {
  min-height: 1.3em;
  margin: 12px 0 0;
  color: var(--gold-deep);
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  appearance: none;
  min-height: 48px;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  border: 0;
  background: #3a2014;
  color: #f6efe4;
}

.btn-secondary {
  background: transparent;
  color: #3a2014;
  border: 1.5px solid rgba(58, 32, 20, 0.38);
}

.btn:active { transform: translateY(1px); }

.link-box {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.75);
  border: 1px dashed rgba(78, 30, 0, 0.22);
  color: var(--brown);
  font-size: 0.95rem;
  word-break: break-all;
}

.copied {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: var(--gold-deep);
  font-size: 0.88rem;
}

@media (hover: hover) {
  .item {
    transition: border-color 0.2s ease, transform 0.2s ease;
  }

  .item:hover {
    border-color: rgba(196, 146, 58, 0.5);
    transform: translateY(-1px);
  }
}

@media (min-width: 720px) {
  .logo { width: min(380px, 70%); }
  .hero { padding-top: 36px; }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .item { grid-template-columns: 128px 1fr; }
  .photo { width: 128px; height: 128px; }
  .name { font-size: 1.42rem; }
}

@media (min-width: 1100px) {
  .grid { gap: 16px; }
}

::selection {
  background: #e7c48a;
  color: var(--ink);
}
