/* Confute (Das Plädoyer): one mobile-first stylesheet, in the look of the printed cards:
   cream paper, black ink, hard shadows, and ranks running from angel (1) to devil (last). */

/* Fonts (static/fonts, OFL). Latin + Latin Extended, which cover Turkish and German. */
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(../fonts/poppins-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(../fonts/poppins-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url(../fonts/poppins-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url(../fonts/poppins-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url(../fonts/open-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url(../fonts/open-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url(../fonts/open-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url(../fonts/open-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-weight: 700; font-style: italic; font-display: swap; src: url(../fonts/open-sans-latin-700-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-weight: 700; font-style: italic; font-display: swap; src: url(../fonts/open-sans-latin-ext-700-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-weight: 800; font-display: swap; src: url(../fonts/playfair-display-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-weight: 800; font-display: swap; src: url(../fonts/playfair-display-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-weight: 800; font-style: italic; font-display: swap; src: url(../fonts/playfair-display-latin-800-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-weight: 800; font-style: italic; font-display: swap; src: url(../fonts/playfair-display-latin-ext-800-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(../fonts/baloo-2-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(../fonts/baloo-2-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f5eedc;
  --card: #fffaf3;
  --tan: #eddcb8;
  --ink: #161412;
  --muted: #6b6155;
  --frame: #303030;
  --red: #c8282b;
  --navy: #10244c;
  --gold: #c79d5d;
  /* rank colours, most innocent to most guilty */
  --rank-0: #ffffff;
  --rank-1: #f6e3b5;
  --rank-2: #eba43f;
  --rank-3: #ee4b2b;
  --rank-4: #b91009;
  --radius: 16px;
  --shadow: 4px 5px 0 var(--ink);
  --font-heading: "Poppins", system-ui, sans-serif;
  --font-text: "Open Sans", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --font-card: "Baloo 2", "Poppins", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--font-text);
}

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
form { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

.page {
  max-width: 34rem;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.screen > * + * { margin-top: 1.25rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.lead { font-size: 1.1rem; }
.small { font-size: .85rem; }
.eyebrow { font: 700 .75rem var(--font-heading); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .2rem; }

/* Headings: "✦ First ranking ✦" titles, and rule-underlined section titles ("THE GAME" in the rules). */
.display {
  font: italic 800 clamp(1.6rem, 7.5vw, 2.1rem)/1.15 var(--font-display);
  text-align: center;
  margin: 1.5rem 0 .75rem;
}
.display::before, .display::after { content: "✦"; font-size: .45em; vertical-align: .35em; margin: 0 .55em; font-style: normal; }
.rule { text-transform: uppercase; letter-spacing: .02em; padding-bottom: .45rem; border-bottom: 2px solid var(--ink); margin-bottom: .75rem; }

/* Cards and callouts */
.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}
.card.secret { background: var(--tan); }
.card > h3 { margin-bottom: .75rem; }
.card > :last-child { margin-bottom: 0; }

.callout, .alert, .notice {
  margin-bottom: 0; /* the top margin is the screen's gap between blocks */
  padding: .8rem 1rem;
  background: var(--tan);
  border-left: 6px solid var(--ink);
  border-radius: 4px 12px 12px 4px;
}
.alert { border-left-color: var(--red); font-weight: 700; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }

details > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  list-style: none;
  font: 700 1rem var(--font-heading);
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; }
details[open] > summary::after { content: "−"; }
details[open] > summary { margin-bottom: 1rem; }

/* Buttons: pills, like the "more guilty / more innocent" labels on the cards */
.btn, .tile, .lang-switch button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: .65rem 1.3rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 700 .95rem/1.2 var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .08s;
}
.btn:active:not(:disabled) { transform: translate(2px, 2px); }
.btn.primary { background: var(--ink); color: var(--card); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: .3rem .8rem; font-size: .72rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: default; }
.action .btn.block { margin-top: .25rem; }
.action + p { margin: .8rem 0 0; }
.btn:focus-visible, .tile:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Forms */
.stack { display: grid; gap: .9rem; }
.stack label { display: block; font: 700 .9rem var(--font-heading); margin-bottom: .4rem; }
.stack input[type="text"], .stack select {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: .6rem .9rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: 400 1.05rem var(--font-text);
}
.stack select {
  margin-top: .3rem;
  padding-right: 2.6rem;
  -webkit-appearance: none;
  appearance: none;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23161412' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right .95rem center;
}
.code-input { text-transform: uppercase; letter-spacing: .3em; font-family: var(--font-heading) !important; font-weight: 800 !important; }
.errorlist { list-style: none; margin: .3rem 0 0; padding: 0; color: var(--red); font-weight: 700; font-size: .9rem; }

/* Landing: the cover */
.brand { margin-bottom: 1.5rem; text-align: center; }
.brand-title { font: 800 clamp(2.6rem, 13vw, 3.6rem)/1 var(--font-display); color: var(--navy); margin: 1rem 0 0; }
.hero { width: 100%; max-width: 420px; margin: 1rem auto .5rem; }
.tagline { font-size: 1.05rem; margin: .25rem 0 0; }
.page > .card + .card { margin-top: 1.25rem; }
.page-footer { margin-top: 2rem; text-align: center; font: 700 .8rem var(--font-heading); color: var(--muted); }
.page-footer a { color: inherit; }
.prose { max-width: 40rem; }

/* Language switch */
.lang-switch { display: flex; gap: .3rem; justify-content: flex-end; }
.lang-switch button {
  min-width: 40px;
  min-height: 34px;
  padding: .2rem .5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font: 700 .75rem var(--font-heading);
  color: var(--ink);
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--card); }

/* Game screen */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.room-code { font: 800 1rem var(--font-heading); letter-spacing: .18em; }
.code-big { font: 800 2.6rem/1.1 var(--font-heading); letter-spacing: .2em; margin: .2rem 0 1rem; }

/* Round steps: 1 Rank, 2 Bet, 3 Debate, 4 Re-rank, 5 Score */
.steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 1rem 0 0; padding: 0; }
.steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 16px; height: 2px; background: var(--ink); }
.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  font: 700 .6rem/1.15 var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .03em;
  text-align: center;
  color: var(--muted);
}
.steps span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 800;
}
.steps .past span, .steps .now span { background: var(--ink); color: var(--card); }
.steps .now { color: var(--ink); }
.steps .now span { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--gold); }

.tag {
  display: inline-block;
  padding: .1rem .5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  font: 800 .62rem/1.3 var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.players, .leaderboard { list-style: none; margin: 0; padding: 0; }
.players li, .leaderboard li {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem 0;
  border-top: 2px solid var(--ink);
}
.players li:first-child, .leaderboard li:first-child { border-top: 0; }
.dot { width: .75rem; height: .75rem; border: 2px solid var(--ink); border-radius: 50%; flex: none; }
.dot.on { background: var(--ink); }
.leaderboard .rank {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--card);
  font: 800 .8rem var(--font-heading);
}
.leaderboard strong { font: 800 1.1rem var(--font-heading); }
.leaderboard li.me .grow { font-weight: 700; }
.players-panel summary { color: var(--muted); }

/* Dilemma tiles: small scenario cards */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  height: 100%;
  min-height: 150px;
  padding: 1rem .6rem;
  text-align: center;
  background: var(--paper);
  border: 5px solid var(--frame);
  border-radius: 18px;
}
.tile img { width: 56px; height: 56px; object-fit: contain; }
.tile-ph {
  display: grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font: 700 1.2rem var(--font-heading);
}
.tile-title { font: 800 1.2rem/1.2 var(--font-card); }
.tile .tag { background: var(--ink); color: var(--card); }
.tile.played { opacity: .45; }
button.tile:active { transform: scale(.97); }

/* The dilemma: a scenario card in its dark frame */
.dilemma {
  position: relative;
  padding: 1rem 1.1rem .8rem;
  text-align: center;
  background: var(--paper);
  border: 7px solid var(--frame);
  border-radius: 22px;
  box-shadow: none;
}
.dilemma-title { font: 800 clamp(1.7rem, 8vw, 2.2rem)/1.15 var(--font-card); margin: .25rem 0 .8rem; }
.dilemma-icon + .dilemma-title { padding: 0 2.8rem; } /* keep clear of the icon */
.dilemma-icon { position: absolute; top: .7rem; right: .7rem; width: 52px; height: 52px; object-fit: contain; }
.dilemma .body { font-size: 1.02rem; line-height: 1.6; }
.dilemma .body p { margin: 0 0 .9rem; }
.dilemma .body p:last-child { margin-bottom: 0; }
.dilemma details > summary { justify-content: center; font-size: .95rem; }
.dilemma details > summary::after { margin-left: 0; }
.dilemma details .body { text-align: center; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 1.1rem; }
.card-foot img { width: 110px; }
.card-no {
  min-width: 2.6rem;
  padding: 0 .7rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font: 700 1.3rem/1.5 var(--font-heading);
}

/* Rank badges: white with wings for the most innocent, then yellow, orange, red,
   and dark red with horns for the most guilty. Made by the rank_badge tag; app.js repaints them on drop. */
.badge {
  --b: 36px;
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--b);
  height: var(--b);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font: 800 calc(var(--b) * .4)/1 var(--font-heading);
}
.lvl-0 { background: var(--rank-0); }
.lvl-1 { background: var(--rank-1); }
.lvl-2 { background: var(--rank-2); }
.lvl-3 { background: var(--rank-3); }
.lvl-4 { background: var(--rank-4); color: #fff; }
/* In the drag-and-drop list, the first and last badge get the wings and horns artwork (circle included).
   Every badge there keeps room for the right wing, so the names line up. */
.ranking .badge { margin-right: calc(var(--b) * .95); }
.ranking .badge:is(.angel, .devil) { background: none; border-color: transparent; }
.ranking .badge:is(.angel, .devil)::before {
  content: "";
  position: absolute;
  z-index: -1;
  background: 0 0 / 100% 100% no-repeat;
}
.ranking .badge.angel::before {
  left: calc(var(--b) * -1.3);
  top: calc(var(--b) * -.39);
  width: calc(var(--b) * 3.6);
  height: calc(var(--b) * 1.6);
  background-image: url(../img/badge-angel.webp);
}
.ranking .badge.devil::before {
  left: calc(var(--b) * -.24);
  top: calc(var(--b) * -.25);
  width: calc(var(--b) * 1.49);
  height: calc(var(--b) * 1.49);
  background-image: url(../img/badge-devil.webp);
}

/* Drag-and-drop ranking: the ranking card */
.rank-end {
  margin: .25rem 0 .6rem;
  font: 800 .75rem var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ranking-form .rank-end:last-of-type { margin: .9rem 0 1rem; }
.ranking {
  list-style: none;
  margin: 0;
  padding: .35rem 1rem .35rem 2.4rem; /* room for the wings */
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ranking li {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 62px;
  padding: .55rem .1rem;
  border-top: 3px solid var(--ink);
  font: 700 1.05rem/1.25 var(--font-heading);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ranking li:first-child { border-top: 0; }
.ranking li img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.ranking .grip { color: var(--muted); font-size: 1.2rem; padding: .6rem .8rem; margin: -.6rem -.8rem; touch-action: none; } /* dragging from the grip never turns into a page scroll */
.ranking .drag-ghost { opacity: .3; }
.ranking .drag-chosen { background: var(--tan); }
.ranking .sortable-fallback { /* the row under the finger */
  padding: .55rem .8rem .55rem 1.6rem;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Everyone's rankings: one small card per player */
.boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.box { padding: .6rem .7rem .7rem; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; }
.box.me { background: var(--tan); }
.box h4 { margin: 0 0 .6rem; }
.box ol { display: grid; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.box li { display: flex; align-items: center; gap: .5rem; font-size: .92rem; line-height: 1.25; }
.box .badge { --b: 24px; border-width: 1.5px; }

/* Bet: direction pills, as on the cards */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .85rem .4rem .7rem;
  border-radius: 999px;
  color: #fff;
  font: 800 .78rem/1 var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}
.pill.guilty { background: var(--red); }
.pill.innocent { background: var(--ink); }
.pill img { width: auto; height: 1.05em; }
.my-bet { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem .6rem; }
.directions { margin: 0 0 1rem; }
.directions dd { margin: .45rem 0 1rem; font-size: .92rem; line-height: 1.45; }

/* Progress */
.bar { height: 14px; overflow: hidden; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; }
.bar > span { display: block; height: 100%; background: var(--ink); }
.progress p { margin: .6rem 0 0; font: 700 .82rem var(--font-heading); color: var(--muted); }
.done { margin: .9rem 0 0; font: 700 .9rem/1.4 var(--font-heading); }

/* Results. Score chips from the rules: +n black, −n outlined, 0 tan. */
.points {
  display: inline-block;
  min-width: 5.5rem;
  margin: .25rem 0 0;
  padding: .2rem 1rem;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 14px;
  font: 800 2.2rem/1.25 var(--font-heading);
}
.points.up, .chip.up { background: var(--ink); color: var(--card); }
.points.down, .chip.down { background: transparent; }
.chip {
  display: inline-grid;
  place-items: center;
  min-width: 2.9rem;
  padding: .15rem .55rem;
  background: var(--tan);
  border: 2px solid var(--ink);
  border-radius: 10px;
  font: 800 1rem/1.3 var(--font-heading);
}
.bets { list-style: none; margin: 0; padding: 0; }
.bets li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .45rem .8rem;
  padding: .85rem 0;
  border-top: 2px solid var(--ink);
}
.bets li:first-child { border-top: 0; padding-top: .2rem; }
.bets li:last-child { padding-bottom: 0; }
.bets .who { font: 700 1rem var(--font-heading); }
.bets .chip { grid-column: 2; grid-row: 1 / span 2; }
.bets .what { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; }

/* Connection banner (toggled by app.js) */
.conn-banner {
  display: none;
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  padding: calc(env(safe-area-inset-top) + .4rem) 1rem .4rem;
  text-align: center;
  font: 700 .85rem var(--font-heading);
  background: var(--ink);
  color: var(--card);
}
body.offline .conn-banner { display: block; }
