@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/static/fonts/sora-latin.woff2") format("woff2");
}

:root {
  --fm-font: "Sora", system-ui, sans-serif;
  --fm-radius-sm: 6px;
  --fm-radius-md: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: #17130f; }
body {
  margin: 0;
  background: #17130f;
  color: var(--fm-text);
  font-family: var(--fm-font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button { color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--fm-amber-200); outline-offset: 3px; }
[hidden] { display: none !important; }

.app {
  position: relative;
  width: 100%;
  min-height: 100svh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--fm-bg);
}

.landing {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 max(28px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(28px, env(safe-area-inset-right));
}
.wordmark-row { padding: max(34px, calc(env(safe-area-inset-top) + 12px)) 0 0; display: flex; justify-content: center; }
.wordmark { font-size: 16px; font-weight: 600; letter-spacing: -0.03em; }

.event {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.kicker {
  color: var(--fm-text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 12px 0 22px;
}
.event-name {
  margin: 0.67em 0;
  font-size: 33px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.rule { width: 28px; height: 1px; background: var(--fm-border); margin: 28px 0; }
.event-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--fm-text-secondary);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
}
.event-meta .lineup { color: var(--fm-text-muted); }

.photo-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.photo-strip .tile {
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--fm-radius-sm);
  display: block;
}
.tile:nth-child(1) { background: #7A6152; }
.tile:nth-child(2) { background: #4A4038; }
.tile:nth-child(3) { background: #8C7B6B; }
.tile:nth-child(4) { background: #5A5248; }

.teaser { text-align: center; color: var(--fm-text-muted); font-size: 13px; margin: 18px 0 0; }
.footnote { text-align: center; color: var(--fm-text-muted); font-size: 13px; line-height: 1.5; margin: 12px 0 max(44px, calc(env(safe-area-inset-bottom) + 16px)); }

.cta-wrap { position: relative; display: flex; justify-content: center; margin-bottom: 26px; }
.cta-halo {
  position: absolute;
  inset: 2px 8px;
  border-radius: 8px;
  background: radial-gradient(ellipse at center, rgb(255 176 32 / 22%) 0%, rgb(255 176 32 / 0%) 74%);
  animation: fm-halo 4s ease-in-out infinite;
  pointer-events: none;
}
.cta {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: rgb(255 176 32 / 7%);
  border: 1px solid var(--fm-accent);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-accent);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 180ms ease;
}
.cta:hover { background: rgb(255 176 32 / 15%); }
.cta:active { background: rgb(255 176 32 / 22%); }
.cta-label { position: relative; display: flex; align-items: center; gap: 11px; }
.cta-corner { position: absolute; width: 16px; height: 16px; pointer-events: none; }
.cta-corner.tl {
  top: 8px; left: 8px;
  border-top: 2px solid var(--fm-accent);
  border-left: 2px solid var(--fm-accent);
  animation: fm-drift-tl 3.6s ease-in-out infinite;
}
.cta-corner.br {
  right: 8px; bottom: 8px;
  border-right: 2px solid var(--fm-accent);
  border-bottom: 2px solid var(--fm-accent);
  animation: fm-drift-br 3.6s ease-in-out infinite;
}
.cta-scan {
  position: absolute;
  right: 0; left: 0;
  height: 34px;
  background: linear-gradient(180deg, rgb(255 176 32 / 0%) 0%, rgb(255 176 32 / 16%) 50%, rgb(255 176 32 / 0%) 100%);
  animation: fm-scan 5s linear infinite;
  pointer-events: none;
}

.overlay-layer { position: absolute; z-index: 20; inset: 0; }
.scrim { position: absolute; inset: 0; background: rgb(12 10 8 / 78%); animation: fm-fade 200ms ease both; }
.sheet {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  max-height: calc(100dvh - env(safe-area-inset-top));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--fm-surface);
  border: 0;
  border-top: 1px solid var(--fm-border);
  border-radius: 16px 16px 0 0;
  padding: 22px max(24px, env(safe-area-inset-right)) max(32px, calc(env(safe-area-inset-bottom) + 16px)) max(24px, env(safe-area-inset-left));
  animation: fm-sheet-up 280ms cubic-bezier(0.16, 0.84, 0.28, 1) both;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.grabber { width: 38px; height: 4px; border-radius: var(--fm-radius-pill); background: var(--fm-border); margin: 0 auto 20px; }
.sheet-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.sheet-icon {
  width: 34px; height: 34px;
  border: 1px solid var(--fm-accent);
  border-radius: 8px;
  color: var(--fm-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.sheet-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.sheet-intro { color: var(--fm-text-secondary); font-size: 14px; line-height: 1.55; margin: 0 0 20px; text-wrap: pretty; }
.steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--fm-surface-raised);
  color: var(--fm-accent);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 1px;
}
.step span:last-child { font-size: 14px; line-height: 1.45; }
.privacy-card { border: 1px solid var(--fm-border); border-radius: var(--fm-radius-md); padding: 14px 16px; margin-bottom: 20px; }
.privacy-card h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.privacy-card p { margin: 0; color: var(--fm-text-secondary); font-size: 13px; line-height: 1.5; text-wrap: pretty; }
.consent { color: var(--fm-accent); font-size: 13px; line-height: 1.5; margin: 0 0 18px; text-wrap: pretty; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.btn-primary,
.btn-secondary { width: 100%; border-radius: 8px; cursor: pointer; }
.btn-primary {
  background: var(--fm-accent);
  color: var(--fm-accent-ink);
  border: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 17px 0;
}
.btn-primary:active { background: var(--fm-accent-pressed); }
.btn-secondary {
  background: transparent;
  color: var(--fm-text-secondary);
  border: 1px solid var(--fm-border);
  font-size: 17px;
  font-weight: 500;
  padding: 16px 0;
  transition: color 160ms ease, border-color 160ms ease;
}
.btn-secondary:hover { color: var(--fm-text); border-color: var(--fm-border-strong); }
.actions .caption { text-align: center; color: var(--fm-text-muted); font-size: 13px; margin: 2px 0 13px; }

.product-screen {
  position: absolute;
  z-index: 10;
  inset: 0;
  min-height: 100%;
  overflow-y: auto;
  background: var(--fm-bg);
  padding: max(32px, calc(env(safe-area-inset-top) + 16px)) max(24px, env(safe-area-inset-right)) max(32px, calc(env(safe-area-inset-bottom) + 16px)) max(24px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}
.product-screen > p { color: var(--fm-text-secondary); font-size: 15px; }
.search-mark { position: relative; width: 78px; height: 78px; border: 1px solid var(--fm-accent); border-radius: 10px; box-shadow: 0 0 36px rgb(255 176 32 / 18%); overflow: hidden; }
.search-mark::before,
.search-mark::after { content: ""; position: absolute; width: 18px; height: 18px; }
.search-mark::before { top: 8px; left: 8px; border-top: 2px solid var(--fm-accent); border-left: 2px solid var(--fm-accent); }
.search-mark::after { right: 8px; bottom: 8px; border-right: 2px solid var(--fm-accent); border-bottom: 2px solid var(--fm-accent); }
.search-mark span { position: absolute; right: 0; left: 0; height: 24px; background: linear-gradient(180deg, transparent, rgb(255 176 32 / 24%), transparent); animation: fm-scan 1.8s linear infinite; }

.gallery-screen { align-items: stretch; justify-content: flex-start; text-align: left; }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.gallery-wordmark { color: var(--fm-text-muted); }
.gallery-head h1 { margin: 8px 0 0; font-size: 26px; font-weight: 400; letter-spacing: -0.03em; }
.live-dot { color: var(--fm-text-secondary); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.live-dot i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--fm-accent); box-shadow: 0 0 10px rgb(255 176 32 / 60%); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.grid button { padding: 0; border: 0; border-radius: var(--fm-radius-sm); background: transparent; overflow: hidden; cursor: pointer; }
.grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; image-orientation: from-image; }
.grid img.fresh { animation: fm-pop .4s ease; }
.empty-card,
.error-card { border: 1px solid var(--fm-border); border-radius: var(--fm-radius-md); background: var(--fm-surface); padding: 20px; color: var(--fm-text-secondary); font-size: 14px; line-height: 1.55; }
.empty-card p { margin: 0; }
.retake-btn { align-self: center; margin-top: auto; background: transparent; border: 0; color: var(--fm-text-secondary); font-size: 13px; padding: 14px; cursor: pointer; }
.error-card { width: 100%; text-align: center; }
.error-card h2 { margin: 12px 0 8px; font-size: 20px; }
.error-card p { margin: 0 0 20px; }
.error-icon { width: 34px; height: 34px; margin: 0 auto; border: 1px solid var(--fm-accent); border-radius: 50%; color: var(--fm-accent); display: grid; place-items: center; font-weight: 600; }
.toast { position: absolute; z-index: 50; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); border: 1px solid var(--fm-border); border-radius: var(--fm-radius-pill); background: var(--fm-surface-raised); color: var(--fm-text); padding: 10px 18px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.toast::before { content: "● "; color: var(--fm-accent); }
.viewer { position: absolute; z-index: 60; inset: 0; width: 100%; padding: 0; border: 0; background: rgb(0 0 0 / 95%); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.viewer img { max-width: 100%; max-height: 100%; image-orientation: from-image; }

@keyframes fm-halo { 0%,100% { opacity: .4; transform: scale(1); } 50% { opacity: .95; transform: scale(1.04,1.18); } }
@keyframes fm-scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(400%); } }
@keyframes fm-drift-tl { 0%,100% { opacity: .6; transform: translate(0); } 50% { opacity: 1; transform: translate(2px,2px); } }
@keyframes fm-drift-br { 0%,100% { opacity: .6; transform: translate(0); } 50% { opacity: 1; transform: translate(-2px,-2px); } }
@keyframes fm-sheet-up { from { transform: translate3d(0, 100%, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes fm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fm-pop { from { opacity: 0; transform: scale(.92); } }

@media (min-width: 600px) {
  body { display: grid; place-items: center; }
  .app { max-width: 375px; max-height: 812px; box-shadow: 0 24px 80px rgb(0 0 0 / 35%); }
}

@media (max-height: 760px) {
  .wordmark-row { padding-top: 24px; }
  .kicker { margin-bottom: 14px; }
  .rule { margin: 18px 0; }
  .cta-wrap { margin-bottom: 18px; }
  .teaser { margin: 12px 0 0; }
  .footnote { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
