/* MaliGames board games (2026-10-25): shared page bits for the wolf, insider,
   coup and boom pages, on top of arcade.css. spy.html keeps its own copy inline. */
.bgp { max-width: 560px; }
.bgp .panel { margin-bottom: 18px; }
.bg-field { display: grid; gap: 6px; margin-bottom: 14px; }
.bg-field label { font-size: 14px; font-weight: 800; }
.bg-in {
  width: 100%; min-width: 0; padding: 13px 14px; font: inherit; font-size: 16px; font-weight: 700; color: var(--text);
  background: var(--bg); border: 2px solid var(--edge); border-radius: 14px;
}
.bg-in.code { text-transform: uppercase; letter-spacing: .3em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; font-size: 22px; }
.bg-row { display: flex; gap: 10px; align-items: stretch; }
.bg-row > .bg-in { flex: 1; }
.bg-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.bg-or::before, .bg-or::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line-strong); }
.bg-full { width: 100%; justify-content: center; }
.bg-err { min-height: 20px; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--accent); text-align: center; }
.bg-err:empty { min-height: 0; margin: 0; }
.bg-note { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.55; }
.bg-rules { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; font-weight: 600; line-height: 1.55; color: var(--muted); }
.bg-rules b { color: var(--text); }

/* lobby */
.bg-code { text-align: center; margin-bottom: 6px; }
.bg-code small { display: block; font-size: 13px; font-weight: 800; color: var(--muted); }
.bg-code b {
  display: block; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(38px, 12vw, 54px); letter-spacing: .18em; font-weight: 800; color: var(--accent);
}
.bg-share { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 2px; }
.bg-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bg-players li, .bg-pick {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; width: 100%;
  background: var(--surface-soft); border: 2px solid var(--edge); border-radius: 14px;
  font: inherit; color: var(--text); text-align: left;
}
.bg-players li.me { background: var(--accent-soft); }
.bg-players li.dead, .bg-pick.dead { opacity: .5; }
.bg-players li.dead .bg-pn { text-decoration: line-through; }
.bg-pick { cursor: pointer; }
.bg-pick[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.bg-pick:disabled { opacity: .45; cursor: default; }
.bg-picks { display: grid; gap: 8px; }
.bg-av { width: 36px; height: 36px; border-radius: 11px; background: var(--t3); display: grid; place-items: center; flex: none; overflow: hidden; }
.bg-av img { width: 32px; height: 32px; }
.bg-av span { font-weight: 800; font-size: 16px; color: var(--ink); }
.bg-pn { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bg-pn small { font-weight: 700; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.bg-x { width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--edge); background: var(--surface); font-weight: 800; color: var(--muted); }
.bg-crown { display: grid; place-items: center; padding: 0; flex: none; }
.bg-crown img { width: 20px; height: 20px; }
.bg-pass-hint { margin: 10px 2px 0; }
.bg-mins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bg-mins button {
  padding: 11px 4px; border-radius: 12px; border: 2px solid var(--edge); background: var(--bg);
  font-weight: 800; font-size: 15px; color: var(--text);
}
.bg-mins button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.bg-acts { display: grid; gap: 10px; margin-top: 16px; }
.bg-acts.two { grid-template-columns: 1fr 1fr; }
.bg-gap { height: 18px; }

/* the secret card */
.bg-card {
  position: relative; display: grid; place-items: center; text-align: center; gap: 8px;
  min-height: 190px; padding: 22px 18px; width: 100%; cursor: pointer; color: var(--text);
  border: 2px solid var(--edge); border-radius: 22px; box-shadow: var(--hard);
  background: linear-gradient(160deg, var(--t4), var(--t3)); font: inherit;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.bg-card .k { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.bg-card .big { font-size: clamp(26px, 8vw, 34px); font-weight: 900; line-height: 1.15; }
.bg-card .role { font-size: 16px; font-weight: 700; line-height: 1.45; }
.bg-card img.ic { width: 74px; height: 74px; }
.bg-card.dark { background: linear-gradient(160deg, #3a3f55, #1d2030); color: #fff3e4; }
.bg-card.dark .k { color: #ffd9c2; }
.bg-card.closed .big { font-size: 22px; }

.bg-timer { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 6px; }
.bg-timer b { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; }
.bg-timer.low b { color: var(--accent); }
.bg-timer small { font-weight: 700; color: var(--muted); }
.bg-tag { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--gold); color: var(--ink); white-space: nowrap; }
.bg-tag.red { background: var(--accent); color: #fff; }
.bg-tag.soft { background: var(--surface); border: 1.5px solid var(--edge); color: var(--muted); }
.bg-res { text-align: center; padding: 6px 0 4px; }
.bg-res img.ic { width: 72px; height: 72px; }
.bg-res h2 { font-size: 26px; font-weight: 900; margin: 6px 0 4px; }
.bg-res p { font-weight: 700; color: var(--muted); }
.bg-wait { text-align: center; font-weight: 700; color: var(--muted); margin-top: 14px; }
.bg-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.bg-banner img { width: 48px; height: 48px; flex: none; }
.bg-banner b { display: block; font-size: 22px; font-weight: 900; line-height: 1.2; }
.bg-banner small { display: block; font-weight: 700; color: var(--muted); font-size: 14px; line-height: 1.45; }
.bg-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.45; }
.bg-log li { padding-left: 14px; position: relative; }
.bg-log li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.bg-log li:last-child { color: var(--text); }
.bg-log b { color: var(--text); }
.bg-confirm {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 18px;
  background: rgba(0,0,0,.45);
}
.bg-confirm .panel { width: min(100%, 380px); margin: 0; }
.bg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; border: 1.5px solid var(--edge); background: var(--surface); font-size: 13px; font-weight: 800; }
.bg-chip img { width: 18px; height: 18px; }
/* a panel with nothing under its header is just the header */
.panel .panel-b:empty { display: none; }
.panel:has(> .panel-b:empty) > .panel-h { border-bottom: 0; }

/* MaliWikis link under "how to play" (2026-10-25, app only) */
.bg-wiki { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface-soft); color: var(--text); text-decoration: none; }
.bg-wiki img { width: 36px; height: 36px; flex: none; }
.bg-wiki span { display: grid; gap: 2px; min-width: 0; }
.bg-wiki b { font-weight: 800; font-size: 15px; }
.bg-wiki small { font-size: 13px; font-weight: 600; color: var(--muted); }
.bg-wiki i { margin-left: auto; font-style: normal; font-size: 20px; color: var(--muted); }
