:root {
  --bg: 24 25% 97%;
  --fg: 24 15% 15%;
  --card: 0 0% 100%;
  --muted: 24 8% 45%;
  --border: 24 15% 90%;
  --primary: 24 100% 58%;
  --on-primary: 0 0% 100%;
  --mint: 158 64% 32%;
  --ember: 24 90% 46%;
  --chili: 6 78% 50%;
}
.dark {
  color-scheme: dark;
  --bg: 24 25% 8%;
  --fg: 24 15% 90%;
  --card: 24 25% 10%;
  --muted: 24 8% 58%;
  --border: 24 15% 18%;
  --primary: 24 100% 65%;
  --on-primary: 24 25% 8%;
  --mint: 156 66% 52%;
  --ember: 28 100% 58%;
  --chili: 10 100% 62%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: hsl(var(--bg));
  color: hsl(var(--fg));
  font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 12% 0%, hsl(var(--ember) / 0.16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 92% 100%, hsl(var(--chili) / 0.1), transparent 70%);
}
a { color: hsl(var(--primary)); }
h1, h2, .brand, .cta-title { font-family: Fredoka, Inter, system-ui, sans-serif; line-height: 1.15; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: hsl(var(--card) / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}
.brand { display: flex; align-items: center; gap: 8px; color: hsl(var(--fg)); text-decoration: none; font-size: 18px; font-weight: 600; }
.play-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: hsl(var(--primary));
  color: hsl(var(--on-primary));
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.play-btn.big { padding: 12px 26px; font-size: 17px; }

main { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }

.hero { margin: 0 0 20px; }
.hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  max-height: 60vh;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.hero figcaption { margin-top: 6px; font-size: 12px; color: hsl(var(--muted)); text-align: right; }
.hero figcaption a { color: inherit; }

h1 { font-size: clamp(32px, 7vw, 48px); margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 24px; margin: 36px 0 10px; font-weight: 600; }
.aka { margin: -14px 0 20px; color: hsl(var(--muted)); font-size: 15px; font-style: italic; }
.origin { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; color: hsl(var(--muted)); font-weight: 600; }
.flag { width: 27px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px hsl(var(--border)); }
article p { margin: 0 0 14px; }

.vote { min-height: 52px; max-width: 360px; }
.vote-buttons { display: flex; gap: 8px; }
.vote-buttons[hidden], .vote-result[hidden] { display: none; }
.vote button {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.vote button:hover { transform: scale(1.04); }
.vote button:active { transform: scale(0.96); }
.vote button:disabled { opacity: 0.6; cursor: default; transform: none; }
.vote button:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.vote .meh { background: hsl(var(--fg) / 0.08); color: hsl(var(--muted)); }
.vote .meh:hover { background: hsl(var(--fg) / 0.14); }
.vote .tasty { background: hsl(var(--mint) / 0.16); color: hsl(var(--mint)); }
.vote .tasty:hover { background: hsl(var(--mint) / 0.26); }
.bar { display: flex; height: 32px; border-radius: 999px; overflow: hidden; font-size: 12px; font-weight: 700; color: #fff; }
.bar-meh, .bar-tasty { display: flex; align-items: center; gap: 4px; transition: width 0.7s ease-out; }
.bar-meh { justify-content: flex-start; padding-left: 10px; background: hsl(var(--fg) / 0.3); }
.bar-tasty { justify-content: flex-end; padding-right: 10px; background: hsl(var(--mint)); }
.bar-labels { display: flex; justify-content: space-between; padding: 2px 4px 0; font-size: 12px; font-weight: 600; }
.l-meh { color: hsl(var(--muted)); }
.l-tasty { color: hsl(var(--mint)); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.8);
  font-size: 15px;
}
.chips li::first-letter { text-transform: uppercase; }

.cta {
  margin: 40px 0 0;
  padding: 24px 16px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.86);
}
.cta-title { margin: 0 0 14px; font-size: 22px; font-weight: 600; }

.related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.related a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.86);
  color: hsl(var(--fg));
  text-decoration: none;
  transition: transform 0.15s ease;
}
.related a:hover { transform: translateY(-2px); }
.related img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.related span { padding: 8px 10px 0; font-weight: 600; line-height: 1.3; }
.related small { padding: 0 10px 10px; color: hsl(var(--muted)); font-size: 13px; }

footer { display: flex; justify-content: center; gap: 20px; padding: 24px 16px 40px; font-size: 14px; }
footer a { color: hsl(var(--muted)); }
