:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --text: #2a2522;
  --muted: #7a706a;
  --line: #ece5dd;
  --accent: #c2185b;
  --meri-bg: #fdeef4;
  --meri-line: #f2b8cf;
  --meri-text: #8e0f43;
  --shadow: 0 1px 2px rgb(60 40 30 / 0.05), 0 4px 16px rgb(60 40 30 / 0.04);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #16130f;
  --surface: #211d19;
  --text: #f2ece6;
  --muted: #a49a92;
  --line: #342e29;
  --accent: #f48fb1;
  --meri-bg: #3a1a28;
  --meri-line: #7a2f50;
  --meri-text: #ffc2d9;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: background-color .2s, color .2s;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.top { padding: 40px 0 20px; }
.top-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font: 700 clamp(28px, 6vw, 42px)/1.1 Fraunces, Georgia, serif; letter-spacing: -.01em; }

.theme-toggle {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s;
}
.theme-toggle:hover { transform: rotate(-12deg); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

.status { color: var(--muted); padding: 8px 0 16px; }
.status.error { color: var(--accent); }

.meri {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0 28px; padding: 14px 18px; border-radius: 14px;
  background: var(--meri-bg); border: 1px solid var(--meri-line); color: var(--meri-text);
  font-weight: 600;
}
.meri .emoji { font-size: 24px; }
.meri.absent { background: var(--surface); border-color: var(--line); color: var(--muted); font-weight: 500; }

.cat { margin: 0 0 32px; }
.cat h2 {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 12px; font: 600 22px/1.2 Fraunces, Georgia, serif;
}
.cat h2 .count { font: 500 13px Inter, sans-serif; color: var(--muted); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.flavor {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow);
}
.flavor .name { font-weight: 600; }
.flavor .desc { margin-top: 2px; font-size: 14px; color: var(--muted); }

.flavor.meris-joy {
  background: var(--meri-bg); border: 2px solid var(--accent);
  padding: 11px 13px; position: relative;
}
.flavor.meris-joy .name { color: var(--meri-text); }
.flavor.meris-joy .badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: var(--accent); color: var(--surface); vertical-align: 2px;
}

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.foot a { color: var(--accent); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
#lastUpdated { color: var(--muted); }
.top-inner > div { min-width: 0; }
.nw { white-space: nowrap; }
