:root {
  --bg: #120d0b;
  --card: #1d1512;
  --card-2: #261b16;
  --line: #3a2a22;
  --text: #f6ece6;
  --muted: #b39d91;
  --fire-1: #ff3d00;
  --fire-2: #ff9100;
  --fire-3: #ffd54f;
  --radius: 18px;
}

* { box-sizing: border-box; }

/* Classes that set `display` would otherwise override the hidden attribute. */
[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  background:
    radial-gradient(1200px 500px at 50% -200px, #ff3d0033, transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { width: min(920px, 100% - 32px); margin: 0 auto; flex: 1; padding-bottom: 48px; }

.hero { text-align: center; padding: 56px 0 28px; }
.hero h1 {
  font-size: clamp(48px, 10vw, 84px);
  margin: 0;
  letter-spacing: -0.04em;
}
.hero .wordmark {
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2), var(--fire-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .flame { display: inline-block; animation: flicker 1.6s infinite alternate; }
.tagline { color: var(--muted); font-size: 18px; margin: 8px 0 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px auto;
  max-width: 640px;
}

.dropzone {
  display: block;
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 40px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--fire-2); background: #ff910010; }
.dz-icon { font-size: 40px; }
.dz-title { font-weight: 700; font-size: 18px; margin-top: 6px; }
.dz-sub { color: var(--muted); }
code { background: var(--card-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

details { margin-top: 14px; color: var(--muted); }
details summary { cursor: pointer; }
details ol { padding-left: 20px; }
textarea {
  width: 100%;
  margin: 10px 0;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: 13px/1.4 ui-monospace, monospace;
}

.found { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
#found-summary b { color: var(--fire-3); }

.field { display: block; margin: 16px 0; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field small { color: var(--muted); font-weight: 400; }
select {
  width: 100%;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented button {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 6px;
  font: inherit;
  cursor: pointer;
}
.segmented button.active { border-color: var(--fire-2); background: #ff910022; }

.btn {
  font: inherit;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border: 1px solid var(--line);
}
.btn.primary {
  width: 100%;
  margin-top: 8px;
  font-size: 18px;
  border: 0;
  color: #1a0700;
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2));
  box-shadow: 0 6px 24px #ff3d0044;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--card-2); color: var(--text); }
.btn.secondary:hover { border-color: var(--fire-2); }
.btn:disabled { opacity: .6; cursor: wait; }
.link { background: none; border: 0; color: var(--fire-2); cursor: pointer; font: inherit; text-decoration: underline; }

.error { color: #ff8a80; margin: 12px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.loading { text-align: center; padding: 48px 24px; }
.grill { font-size: 72px; animation: flicker .5s infinite alternate; }
#loading-line { font-size: 18px; font-weight: 600; min-height: 1.6em; }

/* Results */
.r-title {
  text-align: center;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.15;
  margin: 24px 0 12px;
}
.strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 8px; }
.chip {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.chip b { color: var(--text); }

.group-roast { max-width: none; border-color: #ff910055; }
.group-roast h3 { margin-top: 0; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.person {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.person.me { border-color: var(--fire-1); box-shadow: 0 0 0 1px var(--fire-1), 0 8px 30px #ff3d0033; }
.person-head { display: flex; gap: 12px; align-items: center; }
.person-emoji { font-size: 38px; line-height: 1; }
.person-name { font-weight: 800; font-size: 19px; }
.person-arch { color: var(--fire-2); font-weight: 600; font-size: 14px; }
.person p { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.receipts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.receipts li {
  font-size: 13px;
  color: var(--muted);
  border-left: 3px solid var(--fire-2);
  padding-left: 10px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 16px 0;
  cursor: pointer;
}
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--fire-2); }
.check small { color: var(--muted); }

.exhibits { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.exhibit {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transform: rotate(-1deg);
}
.exhibit:nth-child(even) { transform: rotate(1deg); }
/* contain, not cover: exhibits are often screenshots or charts whose edges matter. */
.exhibit img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #0b0807; }
.exhibit figcaption { padding: 12px 14px 16px; font-size: 14px; }
.exhibit-label { color: var(--fire-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

.section-title { text-align: center; margin: 40px 0 8px; font-size: 26px; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.award { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.award-name { font-weight: 800; color: var(--fire-3); }
.award-winner { font-weight: 700; margin: 2px 0 6px; }
.award-reason { color: var(--muted); font-size: 14px; }

.verdict {
  margin: 40px auto 24px;
  max-width: 680px;
  text-align: center;
  font-size: 22px;
  font-style: italic;
  font-weight: 600;
}
.verdict::before { content: "⚖️ "; font-style: normal; }

.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 32px; border-top: 1px solid var(--line); }

@keyframes flicker {
  from { transform: scale(1) rotate(-3deg); filter: brightness(1); }
  to { transform: scale(1.08) rotate(3deg); filter: brightness(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  .hero .flame, .grill { animation: none; }
}
