/* minority/styles.css — 少数决 viewer theme. Light, reusing the shared :root
 * variables (so it matches the global toolbar/chrome, like werewolf — unlike
 * clocktower, which re-themes to dark). All rules scoped to body.game-minority
 * so they never leak into the other games. A/B sides get their own accent
 * colors; private channels (self / huddle) get tinted block backgrounds. */

body.game-minority {
  --topic-a: #3b5998;          /* A side — blue */
  --topic-b: #b5762a;          /* B side — amber */
  --scope-self-bg: #f4f0e6;
  --scope-huddle-bg: #eef1f6;
  --scope-huddle-border: #9fb2d0;
  --minority-accent: #3f7a3f;
  --delta-pos: #2f7a3f;
  --delta-neg: #9c2323;
}

body.game-minority .chronicle-header h1 { font-size: 22px; margin: 6px 0 2px; color: var(--fg); }
body.game-minority .view-label { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

body.game-minority .config-line .meta-config {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

/* Seating */
body.game-minority .seating { margin-bottom: 24px; }
body.game-minority .seating h2 { font-size: 16px; margin: 8px 0; color: var(--muted); }
body.game-minority .seating-table { border-collapse: collapse; min-width: 280px; }
body.game-minority .seating-table th,
body.game-minority .seating-table td {
  border: 1px solid var(--border);
  padding: 4px 12px;
  text-align: left;
  font-size: 14px;
}
body.game-minority .seating-table th { background: #f1eee8; font-weight: 500; color: var(--muted); }
body.game-minority .seating-table .seating-points { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Phases + sections */
body.game-minority .phase { margin-top: 28px; }
body.game-minority .phase > h2 {
  font-size: 18px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border);
  color: var(--accent);
}
body.game-minority .phase-endgame > h2 { color: var(--accent); }
body.game-minority .h3 { margin: 16px 0; }
body.game-minority .h3 > h3 { font-size: 15px; margin: 10px 0 6px; color: var(--fg); }
body.game-minority .h3-votes > h3 { color: #6b5a8c; }
body.game-minority .h3-reveal > h3 { color: var(--minority-accent); }
body.game-minority .h3-react > h3 { color: #9a6b3f; }
/* 2.4 transfer steps. 结算后转账 / 终局 · 转账 are self-only (green = private money
   moving); 转账后 / 离席结算 are public reconciliations sharing the reveal accent. */
body.game-minority .h3-transfer > h3 { color: #3f7a55; }
body.game-minority .h3-transfer-notice > h3,
body.game-minority .h3-settlement > h3 { color: var(--minority-accent); }
body.game-minority .transfer-notice-line,
body.game-minority .settlement-line { font-size: 14px; margin: 4px 0; }

/* Speech blocks */
body.game-minority .block-stream { display: flex; flex-direction: column; gap: 10px; }
body.game-minority .speech-block {
  padding: 8px 12px;
  border-left: 3px solid var(--border);
  border-radius: 0 4px 4px 0;
  background: #fff;
}
body.game-minority .speech-block.scope-self   { background: var(--scope-self-bg);   border-left-color: #c9b98f; }
body.game-minority .speech-block.scope-huddle { background: var(--scope-huddle-bg); border-left-color: var(--scope-huddle-border); }

body.game-minority .speaker-line { font-size: 14px; }
body.game-minority .speaker-name { color: var(--fg); }
body.game-minority .speaker-tags { color: var(--muted); font-size: 13px; }

/* Monologue (collapsed by default) + perform */
body.game-minority details.speech-mono {
  margin: 4px 0;
  background: var(--mono-bg);
  border-left: 3px solid #c9c3b2;
  border-radius: 0 4px 4px 0;
}
body.game-minority details.speech-mono > summary {
  cursor: pointer;
  padding: 2px 8px;
  color: var(--muted);
  font-size: 13px;
}
body.game-minority .speech-mono-body { padding: 4px 12px; color: #4a4a44; font-size: 14px; }
body.game-minority .mono-line { padding: 1px 0; }

body.game-minority .speech-perform { margin: 4px 0; }
body.game-minority .perform-line { padding: 1px 0; font-size: 14px; }

body.game-minority ul.speech-instructions {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 2px;
}
body.game-minority ul.speech-instructions li {
  font-size: 13px;
  color: var(--accent);
  padding: 1px 0;
}
/* A scoped instruction is a private aside — a self:N 悄悄话 woven into a public
   turn (spec 2.6). The view layer already dropped any the viewer can't see;
   surface the survivors as private (self-scope tint + 🤫), not public speech. */
body.game-minority ul.speech-instructions li.instruction-scoped {
  background: var(--scope-self-bg);
  border-left: 2px solid #c9b98f;
  padding: 2px 8px;
  margin: 2px 0;
  border-radius: 3px;
  color: var(--minority-accent);
}
body.game-minority ul.speech-instructions li.instruction-scoped::before { content: "🤫 "; }

/* Event blocks */
body.game-minority .event-block { margin: 4px 0; }
body.game-minority .event-block.scope-huddle { background: var(--scope-huddle-bg); padding: 4px 10px; border-radius: 4px; }
body.game-minority ul.event-bullets { list-style: none; padding-left: 0; margin: 4px 0; }
body.game-minority ul.event-bullets > li { padding: 2px 0; font-size: 14px; }
body.game-minority ul.event-sub-bullets { list-style: none; padding-left: 16px; margin: 2px 0; }
body.game-minority ul.event-sub-bullets li { padding: 1px 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

body.game-minority .bullet-debug { color: var(--muted); font-family: var(--font-mono); font-size: 12px; font-style: italic; }
/* The toolbar 显示/隐藏调试信息 toggle (body.show-debug, viewer/styles.css) gates
   `.debug-info` blocks globally; the extracted-debug renderer now emits that.
   Inline `🐞` bullets/instructions kept inside event/speech blocks carry only
   `.bullet-debug`, so tie them to the same toggle here (minority-scoped — other
   games keep their own debug handling). When the toggle is on they render inline
   + subtly styled; off, they vanish. The :has() rule drops an event block whose
   every bullet is debug so no empty bordered box is left behind. */
body:not(.show-debug) .minority-chronicle .bullet-debug { display: none; }
body:not(.show-debug) .minority-chronicle .event-block:not(:has(li:not(.bullet-debug))) { display: none; }

/* 出题 topic A/B */
body.game-minority .topic {
  margin: 8px 0;
  padding: 8px 12px;
  background: #f7f5ef;
  border: 1px solid var(--border);
  border-radius: 6px;
}
body.game-minority .topic-q { font-weight: 500; margin-bottom: 6px; }
body.game-minority .topic-sides { display: flex; flex-wrap: wrap; gap: 8px; }
body.game-minority .topic-side {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #fff;
}
body.game-minority .topic-side.topic-a { background: var(--topic-a); }
body.game-minority .topic-side.topic-b { background: var(--topic-b); }

/* 发言意愿/订阅 心路 (spec 2.3) — per-player intent monologue beneath the topic */
body.game-minority .setter-intents { margin: 8px 0; }
body.game-minority .setter-intents-cap { color: var(--muted); font-size: 13px; margin: 6px 0 4px; }

/* Votes */
body.game-minority .vote-chip { font-weight: 600; padding: 0 4px; }
body.game-minority .vote-chip-a { color: var(--topic-a); }
body.game-minority .vote-chip-b { color: var(--topic-b); }
body.game-minority .vote-sealed {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  background: #f4f0e6;
  border: 1px dashed var(--border);
  border-radius: 6px;
}

/* 揭晓 reveal */
body.game-minority .reveal-narration { margin: 6px 0; font-style: italic; color: #4a4a44; }
body.game-minority .reveal-sides { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
body.game-minority .reveal-side {
  flex: 1 1 220px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
body.game-minority .reveal-side-a { border-top: 3px solid var(--topic-a); }
body.game-minority .reveal-side-b { border-top: 3px solid var(--topic-b); }
body.game-minority .reveal-side-minority { box-shadow: 0 0 0 2px var(--minority-accent) inset; }
body.game-minority .reveal-side-head { font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
body.game-minority .minority-badge {
  background: var(--minority-accent);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
body.game-minority .reveal-side-voters { color: var(--muted); font-size: 13px; }
body.game-minority .reveal-outcome {
  margin: 8px 0;
  padding: 8px 12px;
  background: #eef3ec;
  border-left: 3px solid var(--minority-accent);
  border-radius: 0 4px 4px 0;
  font-size: 14px;
}

/* Standings + ranking tables */
body.game-minority .standings-table,
body.game-minority .ranking-table {
  border-collapse: collapse;
  margin: 8px 0;
  min-width: 320px;
}
body.game-minority .standings-table th,
body.game-minority .standings-table td,
body.game-minority .ranking-table th,
body.game-minority .ranking-table td {
  border: 1px solid var(--border);
  padding: 3px 10px;
  font-size: 13px;
  text-align: left;
}
body.game-minority .standings-table th,
body.game-minority .ranking-table th { background: #f1eee8; color: var(--muted); font-weight: 500; }
body.game-minority .standings-points,
body.game-minority .ranking-points { font-variant-numeric: tabular-nums; }
body.game-minority .delta { font-weight: 600; font-variant-numeric: tabular-nums; }
body.game-minority .delta-pos { color: var(--delta-pos); }
body.game-minority .delta-neg { color: var(--delta-neg); }
body.game-minority .ranking-out { color: var(--muted); }
body.game-minority .ranking-out .ranking-status { color: var(--delta-neg); }

/* 小群 huddle — inline-expanded nested section (clocktower convention) */
body.game-minority section.huddle {
  margin: 6px 0;
  background: var(--scope-huddle-bg);
  border-left: 3px solid var(--scope-huddle-border);
  border-radius: 0 6px 6px 0;
  padding: 6px 0;
}
body.game-minority .huddle-head {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 2px 12px 6px;
}
body.game-minority .huddle-lock { font-weight: 600; color: #4a5b8c; }
body.game-minority .huddle-members { color: var(--muted); font-size: 13px; }
body.game-minority section.huddle .block-stream { padding: 0 12px; }

/* Endgame */
body.game-minority .winner-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 12px 16px;
  background: #f7f2e6;
  border: 1px solid #e0d3a8;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}
body.game-minority .winner-trophy { font-size: 22px; }
