:root {
  --bg: #fbf7f3;
  --fg: #1f1d1a;
  --muted: #6b6760;
  --rule: #f0d4e0;
  --accent: #4a2a3f;
  --accent-light: #6b2548;
  --header-fg: #fde4ef;
  --card: #ffffff;
  --tag-bg: #fde7f0;
  --tag-fg: #6b2548;
  --max: 880px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Helvetica Neue",
        "PingFang SC", "Microsoft YaHei", sans-serif;
}
header.site {
  border-bottom: 1px solid var(--accent);
  padding: 1.5rem 1rem;
  background: var(--accent);
  color: var(--header-fg);
}
header.site .inner { max-width: var(--max); margin: 0 auto; }
header.site h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--header-fg);
}
header.site .subtitle { color: #f7c8de; font-size: 0.9rem; }
main { max-width: var(--max); margin: 0 auto; padding: 1.5rem 1rem 4rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Index */
.controls { margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.controls button {
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--fg);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
}
.controls button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  transition: transform 0.05s ease;
}
.card:hover { transform: translateY(-1px); }
.card a.title {
  display: block;
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.card a.title:hover { color: var(--accent); text-decoration: none; }
.card .meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.card .title-zh {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-style: italic;
}
.tag {
  background: var(--tag-bg);
  color: var(--tag-fg);
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tag.strategy   { background: #e8efe1; color: #4a6536; }
.tag.announcement { background: #fbe8d8; color: #8c4a18; }
.tag.activity   { background: #ecdff0; color: #6a3672; }

/* Derived topical tags (from classifier.classify) — dashed border, lighter
   weight, to distinguish them from the original source-frontmatter tags. */
.tag.derived {
  background: transparent;
  border: 1px dashed #c4bca8;
  color: #6b6760;
}
.tag.derived.flower-spotlight { color: #a3357c; border-color: #e1b8d2; }
.tag.derived.seasonal         { color: #6b6116; border-color: #d8d09b; }
.tag.derived.update           { color: #2c6f6c; border-color: #a8d6d3; }
.tag.derived.guide            { color: #4a6536; border-color: #b9cba6; }
.tag.derived.collab           { color: #8a3a18; border-color: #e3b89e; }
.tag.derived.news             { color: #3a4a78; border-color: #b1bbd6; }
.tag.derived.community        { color: #7a3470; border-color: #d6b3d2; }
.tag.derived.wallpaper        { color: #2f5a7e; border-color: #b0c8d8; }
.tag.derived.pet              { color: #8a5a1c; border-color: #e5cfa3; }
.tag.derived.lore             { color: #6a4a8a; border-color: #c8b9d8; }
.tag.derived.misc             { color: #6b6760; border-color: #d6cfb9; }

/* Event-type tags (from classifier.event_type) — solid pill with a leading
   marker so they read as a different dimension at a glance. */
.tag.event-type {
  background: #1f1d1a;
  color: #f5efe0;
  border: 1px solid #1f1d1a;
  position: relative;
  padding-left: 1.05rem;
}
.tag.event-type::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 50%;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
  opacity: 0.75;
}
.tag.event-type.gacha-launch        { background: #5a1a4d; border-color: #5a1a4d; color: #ffd6f0; }
.tag.event-type.flower-debut        { background: #7a2f4f; border-color: #7a2f4f; color: #ffe2ec; }
.tag.event-type.feature-launch      { background: #1f4a6e; border-color: #1f4a6e; color: #d6eaff; }
.tag.event-type.update-preview      { background: #3a3a78; border-color: #3a3a78; color: #dcdcff; }
.tag.event-type.weekly-gift         { background: #6e5316; border-color: #6e5316; color: #ffe9b5; }
.tag.event-type.offline-event       { background: #2f5a3a; border-color: #2f5a3a; color: #d6f0d6; }
.tag.event-type.endorsement         { background: #8c3a18; border-color: #8c3a18; color: #ffe1cc; }
.tag.event-type.marketing           { background: #6a3672; border-color: #6a3672; color: #f0d6f5; }
.tag.event-type.flower-encyclopedia { background: #4a6536; border-color: #4a6536; color: #e6f2cd; }
.tag.event-type.seasonal-content    { background: #8c6a18; border-color: #8c6a18; color: #fff0c4; }
.tag.event-type.lore                { background: #4a3a6a; border-color: #4a3a6a; color: #e0d6f0; }

/* Filter dimension groups: stacked rows so the user can read off which
   dimension they're filtering on. */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.filter-group .label {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 0.4rem;
  min-width: 5.5rem;
}
.filter-group.event button {
  background: #1f1d1a;
  color: #f5efe0;
  border-color: #1f1d1a;
}
.filter-group.event button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Article */
article.post header h1 { margin-top: 0; line-height: 1.25; }
article.post .meta {
  color: var(--muted);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
article.post .meta .title-zh {
  margin-top: 0.4rem;
  font-style: italic;
}
article.post img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 1rem auto;
}
article.post h2 { margin-top: 2rem; }
article.post blockquote {
  margin: 1rem 0;
  padding: 0.4rem 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}
article.post hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}
article.post table {
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
article.post thead th {
  background: var(--tag-bg);
  color: var(--tag-fg);
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}
article.post tbody td {
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--rule);
  vertical-align: top;
}
article.post tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.015);
}
.img-missing {
  display: inline-block;
  margin: 1rem auto;
  padding: 1.5rem 2rem;
  background: var(--tag-bg);
  color: var(--muted);
  border: 1px dashed var(--rule);
  border-radius: 6px;
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
}
.post-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}

/* Site nav (in <header.site>) */
.site-nav {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: #f7c8de;
}
.site-nav a { color: #f7c8de; }
.site-nav a:hover { color: #ffffff; }

/* Pools catalog page */
.pool-section { margin-top: 2.25rem; }
.pool-section > h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.pool-section .summary {
  color: var(--muted);
  font-size: 0.875rem;
  margin: -0.5rem 0 1rem;
}
.pool-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.pool {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.pool.ghost {
  border-color: #e8c1d4;
  background: #fdf3f6;
}
.pool .header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
}
.pool .section-num {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-fg);
  padding: 0.05rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}
.pool .name-en { font-weight: 600; font-size: 1.02rem; }
.pool .name-zh { color: var(--muted); font-style: italic; font-size: 0.92rem; }
/* Traditional-Chinese form — captured from the live game build's localization
   table (assets/resources/native/84/841a0d32-…e2462.text). Rendered in a
   subdued tan tint so it reads as supplementary metadata next to the
   simplified mainland-marketing form. */
.pool .name-zh-t {
  color: #8a5a1c;
  font-style: italic;
  font-size: 0.85rem;
  border-left: 2px solid #efd9c4;
  padding-left: 0.45rem;
  margin-left: 0.1rem;
}
.pool .ghost-badge {
  display: inline-block;
  background: #c1392b;
  color: #fff;
  padding: 0.1rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Confirmed-in-live-localization variant of the ghost badge — still red but
   muted to a deep maroon to flag "yes, this is a real shipped pool, just
   never announced in the news feed". */
.pool .ghost-badge.confirmed-live {
  background: #6b2548;
  color: #fde4ef;
}
/* Datamined-only pools (3 entries) — captured in the live localization
   table but absent from the probability article AND every community wiki.
   Distinct slate-blue palette so it doesn't read as just-another-ghost. */
.pool .datamined-badge {
  display: inline-block;
  background: #2d4a6e;
  color: #e8f0fa;
  padding: 0.1rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Truly publisher-private — small, low-key, italic. Currently only one
   pool (绯梦花弦) qualifies; the badge is meant to read as an annotation,
   not a primary classifier. */
.pool .private-badge {
  display: inline-block;
  background: #fff1e3;
  color: #8a5a1c;
  border: 1px solid #efd9c4;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-style: italic;
  font-weight: 500;
}
.pool .announcements {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
}
.pool .announcements li { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; }
.pool .announcements .date {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pool .announcements .match-flag {
  display: none;
}
.pool .label-row { color: var(--muted); font-size: 0.82rem; margin-top: 0.45rem; }
.pool .perm-caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.45rem;
  font-style: italic;
}

/* Ghost-pool detective enrichment block — soft callout, distinct from the
   red GHOST badge but related (warm tan border-left, indented body). */
.pool .ghost-resolution {
  margin-top: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: #fbf3ec;
  border: 1px solid #efd9c4;
  border-left: 3px solid #c97a3e;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
}
.pool .ghost-resolution .gr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  margin: 0.2rem 0;
}
.pool .ghost-resolution .gr-label {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 6.2rem;
}
.pool .ghost-resolution .gr-theme {
  display: inline-block;
  background: #f1ddc4;
  color: #6e4318;
  padding: 0.05rem 0.55rem;
  border-radius: 4px;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.pool .ghost-resolution .gr-launch {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  color: #6e4318;
}
.pool .ghost-resolution .gr-confidence {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pool .ghost-resolution ul.gr-candidates {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}
.pool .ghost-resolution ul.gr-candidates li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
}
.pool .ghost-resolution ul.gr-candidates .date {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pool .ghost-resolution .inferred-badge {
  font-size: 0.68rem;
  color: #8a4a18;
  background: #f5e1cc;
  border: 1px solid #e3c8a3;
  padding: 0.05rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pool .ghost-resolution .gr-featured {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: baseline;
}
.pool .ghost-resolution .gr-featured .item { color: var(--fg); }
.pool .ghost-resolution .gr-featured .overflow { color: var(--muted); font-size: 0.8rem; }
.pool .ghost-resolution .gr-evidence {
  margin-top: 0.4rem;
  font-style: italic;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
}

/* Probability disclosures callout on individual article pages.
   Soft tinted card with an accent border-left, sitting between the
   article meta block and the body. */
.prob-callout {
  background: #fbf3f7;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
}
.prob-callout .callout-header {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
}
.prob-callout ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.prob-callout li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}
.prob-callout .section-num {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-fg);
  padding: 0.05rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.prob-callout .section-num:hover { color: var(--accent); }
.prob-callout .name-en { font-weight: 600; }
.prob-callout .name-zh { color: var(--muted); font-style: italic; font-size: 0.88rem; }
.prob-callout .match-badge {
  font-size: 0.68rem;
  padding: 0.05rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--muted);
}
.prob-callout .match-badge.title-match { color: #4a6536; border-color: #b9cba6; }
.prob-callout .match-badge.body-match  { color: #8a5a1c; border-color: #e3c8a3; }
