:root {
  --paper: #fff7ec;
  --ink: #1b1b1f;
  --muted: #6b6560;
  --red: #e63b2e;
  --yolk: #f5b841;
  --nori: #2f5d50;
  --card: #ffffff;
  --line: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, sans-serif;
  background-image: radial-gradient(rgba(27,27,31,.07) 1px, transparent 1px);
  background-size: 18px 18px;
}
a { color: inherit; }
h1, h2, h3, .word { font-family: "Bricolage Grotesque", Inter, sans-serif; letter-spacing: -0.02em; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--paper); border-bottom: var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.word { font-weight: 800; font-size: 28px; }
.bowl {
  width: 34px; height: 34px; border-radius: 0 0 50% 50% / 0 0 70% 70%;
  background: var(--red); border: var(--line); position: relative; top: 4px;
}
.bowl::before, .bowl::after {
  content: ""; position: absolute; width: 3px; height: 30px; background: var(--ink);
  border-radius: 2px; top: -24px; transform-origin: bottom;
}
.bowl::before { left: 9px; transform: rotate(-18deg); }
.bowl::after { left: 17px; transform: rotate(-8deg); }
.search { flex: 1; min-width: 200px; max-width: 460px; margin-left: auto; }
.search input {
  width: 100%; padding: 10px 14px; font: inherit; border: var(--line); border-radius: 999px;
  background: var(--card); outline: none;
}
.search input:focus { box-shadow: 3px 3px 0 var(--red); }

main { max-width: 1120px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 56px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center;
  margin: 8px 0 36px;
}
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1; margin: 0 0 14px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 18px; max-width: 34ch; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--card); border: var(--line); border-radius: var(--radius); padding: 8px 14px; box-shadow: var(--shadow); }
.stat b { font-family: "Bricolage Grotesque"; font-size: 22px; display: block; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.panel {
  background: var(--yolk); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; transform: rotate(1.5deg);
}
.panel h3 { margin: 0 0 6px; font-size: 22px; }
.panel p { margin: 0; font-size: 15px; color: var(--ink); }
.panel .speech { background: var(--card); border: var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-weight: 600; }

/* Sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-head h2 { margin: 0; font-size: 28px; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  background: var(--card); border: var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.card .num { font: 800 13px "Bricolage Grotesque"; color: var(--red); }
.card h3 { margin: 0; font-size: 19px; line-height: 1.2; }
.card .show { font-size: 14px; color: var(--muted); }
.card .meta { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; }
.chip { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); white-space: nowrap; }
.chip.fictional { background: #efe2ff; }
.chip.mixed { background: #ffe7c7; }
.chip.real { background: #dff2ea; }
.chip.recipe { background: var(--red); color: #fff; border-color: var(--red); }

/* Anime list */
.anime-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.anime-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: var(--line); border-radius: 12px; padding: 10px 14px; text-decoration: none;
}
.anime-row:hover { background: #fffdf8; box-shadow: 3px 3px 0 var(--ink); }
.rank { font: 800 15px "Bricolage Grotesque"; color: var(--muted); text-align: center; }
.anime-row .t { font-weight: 600; line-height: 1.3; }
.anime-row .s { font-size: 13px; color: var(--muted); }
.count { font: 700 14px "Bricolage Grotesque"; background: var(--yolk); border: 1.5px solid var(--ink); border-radius: 999px; padding: 1px 10px; }

/* Anime page */
.crumbs { font-size: 14px; margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.page-title { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 0 0 8px; }
.lede { color: var(--muted); max-width: 70ch; margin: 0 0 8px; }
.dish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dish {
  display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  background: var(--card); border: var(--line); border-radius: 12px; padding: 10px 14px;
}
.dish .n { font-weight: 600; }
.dish .e { font-size: 13px; color: var(--muted); }
.dish.listed { border-style: dashed; background: transparent; }
.dish .parts { width: 100%; font-size: 14px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); font-style: italic; }

/* Recipe */
.recipe { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.recipe article { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 4vw, 40px); }
.recipe article h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.05; margin: 0 0 12px; }
.recipe article h2 { font-size: 24px; margin: 30px 0 10px; padding-bottom: 4px; border-bottom: 3px solid var(--yolk); display: inline-block; }
.recipe article table { border-collapse: collapse; width: 100%; margin: 8px 0 4px; font-size: 15px; }
.recipe article th, .recipe article td { border: 1.5px solid var(--ink); padding: 8px 10px; text-align: left; vertical-align: top; }
.recipe article th { background: var(--paper); }
.recipe article ol li, .recipe article ul li { margin: 6px 0; }
.recipe article ol { padding-left: 22px; }
.recipe article ol li::marker { font-weight: 800; color: var(--red); }
.side { position: sticky; top: 96px; display: grid; gap: 14px; }
.side .box { background: var(--card); border: var(--line); border-radius: var(--radius); padding: 16px; }
.side .box h4 { margin: 0 0 6px; font: 700 15px "Bricolage Grotesque"; }
.side .box p { margin: 0; font-size: 14px; color: var(--muted); }
.side .soon { background: var(--yolk); box-shadow: var(--shadow); }
.btn { display: inline-block; font-weight: 700; padding: 8px 14px; border: var(--line); border-radius: 999px; background: var(--card); text-decoration: none; cursor: pointer; font: inherit; }
.btn:hover { background: var(--paper); }

.loading, .empty { color: var(--muted); padding: 40px 0; text-align: center; }
.foot { border-top: var(--line); padding: 18px clamp(16px, 4vw, 40px); font-size: 13px; color: var(--muted); text-align: center; }
.foot p { max-width: 70ch; margin: 0 auto; }

@media (max-width: 820px) {
  .hero, .recipe { grid-template-columns: 1fr; }
  .panel { transform: none; }
  .side { position: static; }
  .search { max-width: none; margin-left: 0; flex-basis: 100%; }
}
