/* ===== Blood on the Clocktower — direction artistique : celle du jeu lui-même (almanach Trouble Brewing).
   Un grimoire vieilli : fond brun grunge de la couverture, pages de parchemin tachées avec des ornements, encre noire,
   titres bleu encre pour le bien et rouge sang pour le mal, jetons ronds de parchemin avec l'illustration au centre et
   le nom en arc. Lettres : Pirata One (titres gothiques), Almendra SC (intitulés), IM Fell English (texte de livre),
   Nunito pour les petits textes d'interface. Illustrations : public/img/botc (tirées de l'almanach).
   Toutes les couleurs passent par les variables ci-dessous. ===== */

.bt {
  --bg: #120c0a;
  --bg-2: #22160f;
  --bg-3: #35241a;
  --parch: #e6d6b3;
  --parch-hi: #f3e8cc;
  --parch-lo: #c4ad7d;
  --ink: #231810;
  --ink-2: #5a4632;
  --text: #efe4cd;
  --text-2: #b9a98c;
  --blue: #1b7ba8;
  --blue-lo: #135a7e;
  --red: #9e1d2b;
  --red-hi: #c9323f;
  --gold: #c9a24a;
  --gold-hi: #ecd08a;
  --gold-lo: #8a6a28;
  --c-townsfolk: #2f86b8;
  --c-outsider: #3aa0b0;
  --c-minion: #b8452f;
  --c-demon: #9e1d2b;
  --line: rgb(236 208 138 / .22);
  --f-logo: 'Pirata One', 'UnifrakturCook', Georgia, serif;
  --f-title: 'Almendra SC', Georgia, serif;
  --f-book: 'IM Fell English', Georgia, serif;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --paper: linear-gradient(rgb(243 232 204 / .9), rgb(230 214 179 / .93)), url('/img/botc/parchment.jpg') center / cover;

  position: fixed; inset: 0; display: block; overflow: hidden; color: var(--text); font-family: var(--f-body);
  background: var(--bg) url('/img/botc/cover.jpg') center top / cover no-repeat;
}
/* voile : la nuit est presque noire, le jour laisse voir le grimoire */
.bt::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 100% 80% at 50% 20%, rgb(8 5 4 / .72), rgb(8 5 4 / .94)); transition: background .6s; }
.bt.is-day::before { background: radial-gradient(ellipse 100% 80% at 50% 10%, rgb(40 22 12 / .5), rgb(18 10 7 / .88)); }
.bt button, .bt select, .bt input { font-family: inherit; }
.bt h3 { font-family: var(--f-title); font-weight: 400; letter-spacing: .08em; margin: 0; }

.bt-main { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-width: 760px; margin: 0 auto; }

/* ----- décor : feuillage en bas à gauche, la Faucheuse la nuit et à la fin ----- */
.bt-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bt-deco::before { content: ''; position: absolute; left: -34px; bottom: 40px; width: 150px; height: 400px; background: url('/img/botc/leaves.png') left bottom / contain no-repeat; opacity: .26; }
.bt-deco::after { content: ''; position: absolute; right: 0; bottom: 48px; width: 130px; height: 262px; background: url('/img/botc/reaper.png') right bottom / contain no-repeat; opacity: 0; transition: opacity .8s; }
.bt.is-night .bt-deco::after, .bt.is-ended .bt-deco::after { opacity: .5; }

/* ----- en-tête ----- */
.bt-hud {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: calc(.5rem + env(safe-area-inset-top)) 14px .55rem; background: linear-gradient(rgb(0 0 0 / .55), rgb(0 0 0 / .25));
  border-bottom: 1px solid var(--gold-lo); box-shadow: 0 1px 0 rgb(0 0 0 / .6), 0 8px 18px -10px rgb(0 0 0 / .8);
}
.bt-title { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.bt-moon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--gold-hi); filter: drop-shadow(0 0 8px rgb(236 208 138 / .55)); }
.bt-moon.night { color: #c6d3f5; filter: drop-shadow(0 0 10px rgb(188 202 242 / .6)); }
.bt-moon svg { width: 100%; height: 100%; }
.bt-title b { display: block; font-family: var(--f-logo); font-weight: 400; font-size: 1.55rem; line-height: 1; letter-spacing: .03em; color: var(--gold-hi); text-shadow: 0 2px 0 #000, 0 0 14px rgb(158 29 43 / .55); }
.bt-title small { display: block; margin-top: 2px; color: var(--text-2); font-family: var(--f-title); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.bt-hud-r { display: flex; align-items: center; gap: .4rem; }
.bt-round {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold-lo); background: linear-gradient(#3c2a1e, #22160f); color: var(--gold-hi);
  font-size: 1.1rem; cursor: pointer; display: inline-grid; place-items: center; box-shadow: inset 0 1px 0 rgb(255 255 255 / .1);
}
.bt-round:hover { background: linear-gradient(#4a3426, #2b1c13); }

/* ----- navigation ----- */
.bt-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--gold-lo); background: linear-gradient(rgb(0 0 0 / .45), rgb(0 0 0 / .8)); padding-bottom: env(safe-area-inset-bottom); }
.bt-tab {
  position: relative; min-height: 54px; padding: .4rem .3rem; border: 0; background: none; color: var(--text-2); cursor: pointer;
  font-family: var(--f-title); font-size: .92rem; letter-spacing: .08em; text-transform: uppercase;
}
.bt-tab.on { color: var(--gold-hi); background: radial-gradient(ellipse at 50% 0, rgb(201 162 74 / .22), transparent 70%); }
.bt-tab.on::before { content: '◆'; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); color: var(--gold); font-size: .9rem; text-shadow: 0 0 8px rgb(201 162 74 / .8); }
.bt-tab.dot::after { content: ''; position: absolute; top: 9px; right: 16%; width: 10px; height: 10px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 0 2px #000, 0 0 10px var(--red-hi); }

.bt-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bt-page { display: flex; flex-direction: column; gap: .9rem; padding: 14px 14px 28px; }

/* ----- textes ----- */
.bt-say { margin: 0; text-align: center; font-family: var(--f-book); font-size: 1.15rem; line-height: 1.4; color: var(--text); }
.bt-say.small { font-size: 1rem; color: var(--text-2); }
.bt-say.dawn { color: var(--gold-hi); font-style: italic; font-size: 1.2rem; }
.bt-say-wrap { display: flex; flex-direction: column; gap: .4rem; }
.bt-hint { margin: 0; font-family: var(--f-body); font-size: .86rem; color: var(--text-2); line-height: 1.4; }
.bt-sec { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: 1.05rem; text-transform: uppercase; color: var(--gold-hi); padding-top: .4rem; }
.bt-sec::before, .bt-sec::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-lo)); }
.bt-sec::after { order: 3; background: linear-gradient(270deg, transparent, var(--gold-lo)); }
.bt-sec > span { order: 2; }
.bt-sent { margin: 0; text-align: center; color: var(--blue-lo); font-weight: 800; }
.bt-warn { color: #ff9aa5; font-weight: 800; }
.bt-status { margin: 0; padding: .7rem .9rem; border-radius: 6px; text-align: center; font-family: var(--f-book); font-size: 1.05rem; color: var(--ink); background: var(--paper); border: 1px solid var(--gold-lo); box-shadow: 0 0 0 3px rgb(0 0 0 / .35); }
.bt-status.dead { color: #fff; background: linear-gradient(rgb(100 20 30 / .92), rgb(60 12 20 / .95)); }

/* ----- boutons ----- */
.bt-btn {
  min-height: 48px; padding: .55rem 1rem; border-radius: 6px; border: 1px solid var(--gold-lo); color: var(--parch-hi);
  background: linear-gradient(#45311f, #26180f); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 3px 0 #0b0604;
  font-weight: 800; font-size: .98rem; cursor: pointer; transition: transform .1s, filter .15s;
}
.bt-btn:hover:not(:disabled) { filter: brightness(1.18); }
.bt-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 1px 0 #0b0604; }
.bt-btn:disabled { opacity: .45; cursor: not-allowed; }
.bt-btn:focus-visible, .bt-tab:focus-visible, .bt-pick:focus-visible, .bt-seat:focus-visible, .bt-input:focus-visible, .bt-round:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
.bt-btn.gold, .bt-btn.gold:hover:not(:disabled) {
  color: var(--ink); font-family: var(--f-title); font-weight: 400; font-size: 1.05rem; letter-spacing: .05em;
  background: linear-gradient(var(--gold-hi), var(--gold)); border-color: #fff0bf; box-shadow: inset 0 1px 0 #fff8dc, 0 3px 0 var(--gold-lo), 0 12px 22px -10px rgb(201 162 74 / .6);
}
.bt-btn.red, .bt-btn.red:hover:not(:disabled) { color: #fff; background: linear-gradient(var(--red-hi), #6d1019); border-color: #e48a94; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 3px 0 #3a0a10; }
.bt-btn.small { min-height: 40px; padding: .3rem .75rem; font-size: .88rem; }
.bt-btn.big { min-height: 58px; font-size: 1.2rem; width: 100%; }
.bt-btn.on { background: linear-gradient(var(--gold-hi), var(--gold)); color: var(--ink); }
.bt-btn.dead { opacity: .6; }
.bt-btn.num { min-width: 40px; padding: .3rem; }
.bt-row { display: flex; align-items: center; gap: .5rem; }
.bt-row.wrap { flex-wrap: wrap; }
.bt-row > .bt-input { flex: 1; min-width: 0; }
.bt-lab { color: var(--text-2); font-weight: 800; min-width: 52px; }
.bt-input {
  min-height: 46px; width: 100%; padding: .55rem .8rem; border-radius: 6px; border: 1px solid var(--gold-lo); background: rgb(0 0 0 / .45); color: var(--text); font-size: 1rem; font-weight: 600;
}
.bt-input::placeholder { color: var(--text-2); font-weight: 400; }
.bt-input option, .bt-input optgroup { color: #111; background: #fff; }

/* ----- pages de parchemin ----- */
.bt-card-panel {
  position: relative; display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem 1rem; border-radius: 4px; color: var(--ink);
  background: var(--paper); border: 1px solid #6e5430; box-shadow: inset 0 0 0 4px rgb(255 255 255 / .12), inset 0 0 0 5px rgb(110 84 48 / .5), 0 14px 30px -14px #000;
}
.bt-card-panel h3 { font-size: 1.15rem; text-transform: uppercase; color: var(--blue-lo); text-align: center; padding-bottom: .5rem; background: linear-gradient(90deg, transparent, var(--blue), transparent) bottom / 70% 1px no-repeat; }
.bt-card-panel .bt-say { color: var(--ink); }
.bt-card-panel .bt-say.small { color: var(--ink-2); }
.bt-card-panel .bt-say.dawn { color: var(--red); }
.bt-card-panel .bt-hint { color: var(--ink-2); }
.bt-card-panel .bt-warn { color: var(--red); }
.bt-card-panel.awake { box-shadow: inset 0 0 0 4px rgb(255 255 255 / .12), inset 0 0 0 5px rgb(110 84 48 / .5), 0 0 0 2px var(--gold), 0 0 44px -6px rgb(236 208 138 / .6); }
.bt-card-panel.suggest, .bt-card-panel.end.evil { background: linear-gradient(rgb(243 220 214 / .92), rgb(224 190 184 / .95)), url('/img/botc/parchment.jpg') center / cover; }
.bt-card-panel.suggest h3, .bt-card-panel.end.evil h3 { color: var(--red); background-image: linear-gradient(90deg, transparent, var(--red), transparent); }
.bt-card-panel.end { text-align: center; }
.bt-last { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding-top: .3rem; }
.bt-last small { color: var(--blue-lo); font-family: var(--f-title); letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; }
.bt-card-panel .bt-btn { box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 3px 0 #0b0604; }

/* ----- le cercle de la ville ----- */
.bt-ring { position: relative; width: min(100%, calc(66dvh * .833)); aspect-ratio: 5 / 6; margin: 30px auto 10px; }
/* la table : un cercle sombre cerclé d'or, comme le tapis du Grimoire */
.bt-table {
  position: absolute; left: 50%; top: 50%; width: 72%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgb(0 0 0 / .62), rgb(0 0 0 / .4) 62%, rgb(0 0 0 / .1) 70.5%, transparent 71%);
  box-shadow: 0 0 0 1px rgb(201 162 74 / .28), 0 0 0 7px rgb(0 0 0 / .25), 0 0 0 8px rgb(201 162 74 / .14), 0 0 60px rgb(0 0 0 / .6);
}
.bt-center {
  position: absolute; left: 50%; top: 50%; width: 46%; transform: translate(-50%, -50%); display: grid; place-items: center; text-align: center;
  padding: .8rem .4rem; border-radius: 50%; aspect-ratio: 1; background: radial-gradient(circle, rgb(0 0 0 / .55), transparent 72%); line-height: 1.25;
}
.bt-center b { font-family: var(--f-logo); font-weight: 400; font-size: 1.35rem; letter-spacing: .03em; color: var(--gold-hi); text-shadow: 0 2px 0 #000; }
.bt-center small { display: block; color: var(--text-2); font-family: var(--f-book); font-size: .92rem; }
.bt-center .bt-big { width: 46px; height: 46px; margin: 0 auto 2px; color: var(--gold-hi); filter: drop-shadow(0 0 14px rgb(236 208 138 / .6)); }
.bt.is-night .bt-center .bt-big { color: #c6d3f5; filter: drop-shadow(0 0 14px rgb(188 202 242 / .7)); }
.bt-big svg { width: 100%; height: 100%; }

.bt-seat {
  --tok: clamp(44px, 12.5vw, 68px);
  position: absolute; transform: translate(-50%, -50%); width: calc(var(--tok) + 22px); display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: center;
}
.bt-ring:not(.mid):not(.many) .bt-seat { --tok: clamp(52px, 15vw, 76px); }
.bt-ring.many .bt-seat { --tok: clamp(38px, 10.6vw, 56px); }
.bt-seat.pick { cursor: pointer; }
.bt-tok {
  position: relative; display: grid; place-items: center; width: var(--tok); height: var(--tok); border-radius: 50%;
  background: url('/img/botc/parchment.jpg') center / 220% no-repeat, var(--parch); border: 3px solid #1a110c;
  box-shadow: 0 0 0 2px var(--gold-lo), inset 0 0 10px rgb(70 45 20 / .55), 0 7px 12px -4px rgb(0 0 0 / .85); transition: transform .15s, box-shadow .15s;
}
.bt-face { position: relative; line-height: 1; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.bt-init { font-family: var(--f-logo); font-weight: 400; font-size: calc(var(--tok) * .5); color: var(--ink); opacity: .78; text-shadow: 0 1px 0 rgb(255 255 255 / .4); }
.bt-face .bt-ico { width: 84%; height: 84%; }
.bt-seat.has-role .bt-tok { box-shadow: 0 0 0 2px var(--tc), inset 0 0 10px rgb(70 45 20 / .55), 0 7px 12px -4px rgb(0 0 0 / .85); }
.bt-seat.pick:hover .bt-tok { transform: scale(1.08); }
.bt-seat.sel .bt-tok { transform: scale(1.14); box-shadow: 0 0 0 3px var(--gold-hi), 0 0 26px 5px rgb(236 208 138 / .75), inset 0 0 10px rgb(70 45 20 / .55); }
.bt-seat.cur .bt-tok { box-shadow: 0 0 0 3px var(--red-hi), 0 0 24px 5px rgb(201 50 63 / .8), inset 0 0 10px rgb(70 45 20 / .55); animation: bt-pulse 1.4s ease-in-out infinite; }
.bt-seat.me .bt-tok { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 0 5px rgb(236 208 138 / .28), inset 0 0 10px rgb(70 45 20 / .55), 0 7px 12px -4px rgb(0 0 0 / .85); }
@keyframes bt-pulse { 50% { transform: scale(1.1); } }
.bt-seat.dead .bt-face { filter: grayscale(.8) brightness(.6); }
/* le linceul : drapé noir posé sur le haut du jeton */
.bt-shroud { position: absolute; left: 50%; top: -16%; width: 66%; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 3px 3px rgb(0 0 0 / .8)); }
/* jeton de vote d'un mort : un petit disque blanc */
.bt-vt {
  position: absolute; right: -5%; top: -5%; width: 30%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff, #e3ddd0 60%, #b9b0a0); border: 2px solid #1a110c; box-shadow: 0 2px 4px rgb(0 0 0 / .7);
}
.bt-hand { position: absolute; left: 50%; top: -15px; transform: translateX(-50%); font-style: normal; font-size: 1.2rem; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .7)); }
.bt-name {
  max-width: 100%; padding: 1px 8px; border-radius: 3px; background: rgb(0 0 0 / .7); border: 1px solid rgb(201 162 74 / .4); font-family: var(--f-title); font-size: .72rem; letter-spacing: .03em; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bt-seat.me .bt-name { background: var(--gold); color: var(--ink); border-color: #fff0bf; }
.bt-seat .cam-bubble { position: absolute; inset: 0; border-radius: 50%; }

/* ----- actions (sous le cercle) ----- */
.bt-actions { display: flex; flex-direction: column; gap: .7rem; }
.bt-votebox { display: flex; flex-direction: column; gap: .6rem; padding: .9rem; border-radius: 4px; background: linear-gradient(rgb(90 16 26 / .7), rgb(40 8 14 / .85)); border: 1px solid var(--red-hi); box-shadow: inset 0 0 0 3px rgb(0 0 0 / .3); }
.bt-votebox .bt-row { flex-direction: column; align-items: stretch; }
.bt-voters { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.bt-voter { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: url('/img/botc/parchment.jpg') center / 300%, var(--parch); color: var(--ink); border: 2px solid #1a110c; font-family: var(--f-logo); font-size: 1rem; opacity: .5; }
.bt-voter.now { opacity: 1; border-color: var(--red-hi); box-shadow: 0 0 12px var(--red-hi); animation: bt-pulse 1.2s ease-in-out infinite; }
.bt-voter.done { opacity: .85; }
.bt-voter.yes { background: var(--red); opacity: 1; }
.bt-noms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--text-2); }
.bt-noms li { padding: .45rem .8rem; border-radius: 4px; background: rgb(0 0 0 / .45); border-left: 3px solid var(--gold-lo); }
.bt-noms li b { color: var(--parch-hi); font-family: var(--f-title); font-weight: 400; letter-spacing: .04em; }
.bt-noms li.about { border-left-color: var(--red-hi); background: rgb(110 20 30 / .5); }
.bt-noms li.about b { color: #ffb0b8; }

/* ----- jetons de personnage ----- */
.t-townsfolk { --tc: var(--c-townsfolk); } .t-outsider { --tc: var(--c-outsider); } .t-minion { --tc: var(--c-minion); } .t-demon { --tc: var(--c-demon); }
.bt-ico { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .45)); }
.bt-token { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgb(0 0 0 / .75)); }
.bt-token-ring { fill: #1a110c; stroke: var(--gold-lo); stroke-width: 1.5; }
.bt-token-inner { fill: none; stroke: var(--tc); stroke-width: 2.5; opacity: .85; }
.bt-token-name { font-family: var(--f-title); fill: var(--ink); letter-spacing: .06em; }
.bt-card { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.bt-card .bt-token.md { width: 150px; }
.bt-card .bt-token.lg { width: min(78%, 270px); }
.bt-card-type { font-family: var(--f-title); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 1px 0 #000; }
.bt-card.t-minion .bt-card-type, .bt-card.t-demon .bt-card-type { color: #ff8e98; }
.bt-card.big { padding: .4rem 0 0; }
.bt-card-text { margin: .5rem 0 0; padding: 1rem 1.1rem; font-family: var(--f-book); font-size: 1.2rem; line-height: 1.4; color: var(--ink); background: var(--paper); border: 1px solid #6e5430; border-radius: 4px; box-shadow: inset 0 0 0 4px rgb(255 255 255 / .12), inset 0 0 0 5px rgb(110 84 48 / .5), 0 14px 30px -14px #000; }

/* ----- informations reçues ----- */
.bt-note { display: flex; flex-direction: column; gap: .6rem; padding: .9rem; border-radius: 4px; color: var(--ink); background: var(--paper); border: 1px solid #6e5430; box-shadow: inset 0 0 0 4px rgb(255 255 255 / .12), inset 0 0 0 5px rgb(110 84 48 / .5); }
.bt-note small { color: var(--blue-lo); font-family: var(--f-title); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
.bt-items { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; }
.bt-it { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; }
.bt-it.text { margin: 0; flex-basis: 100%; text-align: center; color: var(--ink); font-family: var(--f-book); font-size: 1.15rem; font-weight: 400; }
.bt-it.num { min-width: 58px; height: 58px; justify-content: center; border-radius: 50%; font-family: var(--f-logo); font-size: 2.1rem; font-weight: 400; color: var(--ink); background: url('/img/botc/parchment.jpg') center / 260%, var(--parch); border: 3px solid #1a110c; box-shadow: 0 0 0 2px var(--gold-lo), inset 0 0 10px rgb(70 45 20 / .5); }
.bt-it.sig { padding: .45rem 1rem; border-radius: 4px; font-family: var(--f-title); font-weight: 400; letter-spacing: .05em; font-size: 1.1rem; color: #fff; background: var(--blue-lo); border: 1px solid var(--blue); }
.bt-it.sig.evil, .bt-it.sig.no { background: var(--red); border-color: var(--red-hi); }
.bt-it.pl { padding: .3rem .9rem .3rem .35rem; border-radius: 999px; background: url('/img/botc/parchment.jpg') center / cover, var(--parch); color: var(--ink); border: 2px solid #1a110c; font-family: var(--f-title); font-weight: 400; letter-spacing: .03em; }
.bt-it.pl i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-family: var(--f-logo); font-size: 1.15rem; background: rgb(255 255 255 / .45); border: 1.5px solid #1a110c; }
.bt-it.ch { flex-direction: column; gap: 0; }
.bt-it.ch .bt-token.sm { width: 112px; }
.bt-it.ch small { font-family: var(--f-title); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-lo); }
.bt-it.ch.t-minion small, .bt-it.ch.t-demon small { color: var(--red); }

/* ----- messages / journal ----- */
.bt-thread { display: flex; flex-direction: column; gap: .5rem; }
.bt-msg { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .9rem; border-radius: 4px; max-width: 88%; color: var(--ink); background: var(--paper); border: 1px solid #6e5430; }
.bt-msg.mine { align-self: flex-end; background: linear-gradient(rgb(226 236 240 / .93), rgb(196 214 222 / .95)), url('/img/botc/parchment.jpg') center / cover; }
.bt-msg small { color: var(--ink-2); font-size: .72rem; font-weight: 800; }
.bt-msg p { margin: 0; overflow-wrap: anywhere; font-family: var(--f-book); font-size: 1.05rem; }
.bt-compose { display: flex; flex-direction: column; gap: .5rem; }
.bt-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.bt-log li { padding: .55rem .9rem; border-radius: 4px; background: rgb(0 0 0 / .5); border-left: 3px solid var(--gold-lo); font-family: var(--f-book); font-size: 1.02rem; }
.bt-log small { display: inline-block; min-width: 62px; margin-right: .4rem; color: var(--gold); font-family: var(--f-title); letter-spacing: .06em; }
.bt-reveal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; text-align: left; }
.bt-reveal li { display: flex; align-items: center; gap: .6rem; padding: .35rem .7rem; border-radius: 4px; background: rgb(255 255 255 / .35); border-left: 4px solid var(--tc); color: var(--ink); }
.bt-reveal .bt-ico { width: 34px; height: 34px; flex: none; }
.bt-reveal b { font-family: var(--f-title); font-weight: 400; letter-spacing: .04em; }
.bt-reveal span { color: var(--ink-2); font-size: .88rem; margin-left: auto; text-align: right; }
.bt-reveal em { color: var(--red); }

/* ----- le Conteur ----- */
.bt-group { display: flex; flex-direction: column; gap: .5rem; }
.bt-sec.t-townsfolk { color: #7ec3e6; } .bt-sec.t-outsider { color: #86d3dc; } .bt-sec.t-minion { color: #f09a82; } .bt-sec.t-demon { color: #f0808c; }
.bt-count { order: 2; padding: .1rem .7rem; border-radius: 999px; background: rgb(0 0 0 / .55); border: 1px solid var(--gold-lo); color: var(--text-2); font-family: var(--f-body); font-size: .85rem; letter-spacing: 0; }
.bt-count.ok { background: #2f7d4e; color: #fff; border-color: #6cc48e; }
.bt-count.over { background: var(--red); color: #fff; border-color: var(--red-hi); }
.bt-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: .5rem; }
.bt-pick {
  display: flex; align-items: flex-start; gap: .55rem; min-height: 56px; padding: .45rem .7rem .5rem .4rem; text-align: left; cursor: pointer; border-radius: 6px;
  border: 1px solid rgb(201 162 74 / .3); background: rgb(0 0 0 / .5); color: var(--text); font-family: var(--f-title); font-size: .92rem; letter-spacing: .02em; line-height: 1.15;
}
.bt-pick .bt-ico { width: 44px; height: 44px; flex: none; }
.bt-pick-txt { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.bt-pick-txt b { font-weight: 400; font-size: .98rem; }
.bt-pick-txt small { font-family: var(--f-book); font-size: .88rem; line-height: 1.3; letter-spacing: 0; opacity: .9; }
.bt-pick.on { background: var(--paper); color: var(--ink); border-color: var(--tc); box-shadow: 0 0 0 2px var(--tc), 0 6px 14px -6px #000; }
/* la feuille de nuit : une bande de parchemin, comme la feuille de l'édition (icône, nom en couleur de camp, consigne) */
.bt-steps {
  list-style: none; margin: 0; padding: .3rem 1rem; display: flex; flex-direction: column; color: var(--ink); border-radius: 4px;
  background: var(--paper); border: 1px solid #6e5430; box-shadow: inset 0 0 0 4px rgb(255 255 255 / .12), inset 0 0 0 5px rgb(110 84 48 / .5), 0 14px 30px -14px #000;
}
.bt-step { display: flex; align-items: flex-start; gap: .7rem; padding: .75rem .1rem; border-bottom: 1px solid rgb(110 84 48 / .32); }
.bt-step:last-child { border-bottom: 0; }
.bt-step.done { opacity: .42; }
.bt-step-icon { flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.bt-step-icon i { font-style: normal; font-size: 1.8rem; }
.bt-step-body { display: flex; flex-direction: column; gap: .4rem; flex: 1; min-width: 0; }
.bt-step-body > b { font-family: var(--f-title); font-weight: 400; font-size: 1.18rem; letter-spacing: .05em; color: var(--tc); }
.bt-step-body .bt-hint { color: var(--red); font-family: var(--f-book); font-style: italic; font-size: 1rem; }
.bt-check {
  flex: none; width: 30px; height: 30px; margin-top: 11px; border-radius: 3px; border: 2px solid var(--ink-2); background: rgb(255 255 255 / .35);
  color: var(--red); font-size: 1.15rem; font-weight: 900; line-height: 1; cursor: pointer;
}
.bt-steps .bt-btn.small { min-height: 38px; color: var(--ink); background: rgb(255 255 255 / .42); border-color: var(--ink-2); box-shadow: 0 2px 0 rgb(60 40 20 / .45); font-family: var(--f-title); font-weight: 400; letter-spacing: .03em; }
.bt-steps .bt-btn.small.on { background: linear-gradient(var(--gold-hi), var(--gold)); border-color: var(--gold-lo); }

/* ----- le Grimoire : le cercle des jetons ----- */
.bt-page.grim { padding-top: 8px; }
.bt-ring.grim { --gt: clamp(58px, 18vw, 96px); }
.bt-ring.grim.mid { --gt: clamp(48px, 13.5vw, 84px); }
.bt-ring.grim.many { --gt: clamp(40px, 10.4vw, 66px); }
@media (min-width: 640px) { .bt-ring.grim { aspect-ratio: 1; width: min(100%, 76dvh); } }
.bt-ring.grim .bt-center { width: 34%; }
.bt-gseat {
  position: absolute; transform: translate(-50%, -50%); width: calc(var(--gt) + 26px); display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: center; cursor: pointer; z-index: 2;
}
.bt-gseat:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; border-radius: 8px; }
.bt-gtok { position: relative; display: block; width: var(--gt); transition: transform .15s; }
.bt-gtok .bt-token { filter: drop-shadow(0 6px 8px rgb(0 0 0 / .85)); }
.bt-gseat:hover .bt-gtok { transform: scale(1.06); }
.bt-gseat.dead .bt-token { filter: grayscale(.55) brightness(.7) drop-shadow(0 6px 8px rgb(0 0 0 / .85)); }
.bt-gseat .bt-shroud { top: -12%; width: 60%; }
.bt-gseat.pending .bt-shroud { opacity: .55; }
.bt-gseat.awake .bt-gtok { animation: bt-glow 1.6s ease-in-out infinite; border-radius: 50%; }
@keyframes bt-glow { 50% { filter: drop-shadow(0 0 14px rgb(236 208 138 / .95)); } }
.bt-eye { position: absolute; left: -6%; top: -6%; width: 34%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--gold-hi); border: 2px solid #1a110c; font-style: normal; font-size: calc(var(--gt) * .17); }
/* ce que croit l'Ivrogne : une petite pastille à gauche du jeton */
.bt-gbel { position: absolute; left: -10%; bottom: -4%; width: 40%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: url('/img/botc/parchment.jpg') center / 300%, var(--parch); border: 2px solid var(--c-townsfolk); box-shadow: 0 3px 5px rgb(0 0 0 / .7); }
.bt-gbel .bt-ico { width: 82%; height: 82%; }
.bt-gseat .bt-name { margin-top: -4px; position: relative; z-index: 1; font-size: .74rem; }
.bt-ring.grim.many .bt-gseat { width: calc(var(--gt) + 14px); }
.bt-ring.grim.many .bt-gseat .bt-name { font-size: .66rem; padding: 0 5px; }
/* jetons de rappel : petits disques blancs posés devant la place, vers le centre */
.bt-rems { position: absolute; transform: translate(-50%, -50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; width: calc(var(--gt) * 1.3); z-index: 1; pointer-events: none; }
.bt-rem { width: max(30px, calc(var(--gt) * .6)); display: block; }
.bt-remtok { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .8)); }
.bt-remtok-disc { fill: #f4efe2; stroke: #1a110c; stroke-width: 3; }
.bt-remtok-txt { font-family: var(--f-title); fill: var(--ink); letter-spacing: .02em; }
.bt-bluffs { display: flex; justify-content: center; gap: .6rem; }
.bt-bluffs .bt-token { width: min(28vw, 112px); }
.bt-hint.center { text-align: center; }

/* la fiche d'un joueur (Grimoire) */
.bt-gp-top { display: flex; align-items: flex-start; gap: .9rem; }
.bt-gp-top .bt-token { width: 116px; flex: none; }
.bt-gp-id { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.bt-gp-id b { font-family: var(--f-title); font-weight: 400; letter-spacing: .05em; font-size: 1.3rem; color: var(--tc); }
.bt-gp-id small { color: var(--ink-2); font-weight: 700; font-size: .86rem; }
.bt-gp-id .bt-gp-team { font-family: var(--f-title); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--tc); }
.bt-gp-text { margin: .35rem 0 0; font-family: var(--f-book); font-size: 1.05rem; line-height: 1.35; color: var(--ink); }
.bt-sheet-sec { margin: .2rem 0 0; font-family: var(--f-title); font-weight: 400; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid rgb(110 84 48 / .4); padding-bottom: .25rem; }
.bt-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.bt-chip { min-height: 30px; padding: .1rem .65rem; border-radius: 999px; border: 1px solid var(--gold-lo); background: rgb(201 162 74 / .16); color: var(--gold-hi); font-size: .78rem; font-weight: 800; cursor: pointer; }
.bt-chip.add { background: transparent; border-style: dashed; }
.bt-compose-items { display: flex; flex-wrap: wrap; gap: .6rem; min-height: 70px; align-items: center; justify-content: center; padding: .8rem; border-radius: 4px; background: rgb(0 0 0 / .4); border: 1px dashed var(--gold-lo); }
.bt-compose-items .bt-hint { color: var(--text-2); }
.bt-compose-items .bt-it.text { color: var(--text); }
.bt-itbtn { padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }

/* ----- le Grimoire montré à l'Espion ----- */
.bt-it.grim { flex-direction: column; align-items: stretch; width: 100%; gap: .3rem; font-weight: 700; }
.bt-grow { display: grid; grid-template-columns: 38px 1fr; gap: 0 .6rem; align-items: center; padding: .35rem .6rem; border-radius: 4px; background: rgb(255 255 255 / .35); border-left: 4px solid var(--tc); text-align: left; color: var(--ink); }
.bt-grow .bt-ico { width: 34px; height: 34px; grid-row: span 2; }
.bt-grow b { font-family: var(--f-title); font-weight: 400; letter-spacing: .04em; }
.bt-grow span { font-size: .85rem; color: var(--ink-2); }
.bt-grow small { grid-column: 2; color: var(--red); font-size: .75rem; font-weight: 800; }
.bt-grow.dead { opacity: .6; }

/* ----- feuilles du bas ----- */
.bt-sheet-wrap { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgb(4 2 2 / .72); }
.bt-sheet {
  width: 100%; max-width: 560px; max-height: 88dvh; display: flex; flex-direction: column; border-radius: 10px 10px 0 0; color: var(--ink);
  background: var(--paper); border: 1px solid var(--gold-lo); border-bottom: 0; animation: bt-up .22s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 -16px 40px rgb(0 0 0 / .6);
}
@keyframes bt-up { from { transform: translateY(40px); opacity: 0; } }
.bt-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid rgb(110 84 48 / .5); }
.bt-sheet-head h3 { font-size: 1.1rem; text-transform: uppercase; color: var(--blue-lo); }
.bt-sheet-body { display: flex; flex-direction: column; gap: .8rem; padding: 1rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); overflow-y: auto; }
.bt-sheet .bt-hint { color: var(--ink-2); }
.bt-sheet .bt-chip { color: var(--ink); background: rgb(110 84 48 / .15); border-color: var(--ink-2); }
.bt-sheet .bt-pick { color: var(--parch-hi); }
.bt-sheet .bt-pick.on { color: var(--ink); }
.bt-sheet .bt-compose-items { background: rgb(255 255 255 / .35); border-color: var(--ink-2); }
.bt-sheet .bt-compose-items .bt-hint { color: var(--ink-2); }
.bt-sheet .bt-compose-items .bt-it.text { color: var(--ink); }
.bt-sheet .bt-input { color: var(--ink); background: rgb(255 255 255 / .55); border-color: var(--ink-2); }
.bt-sheet .bt-lab { color: var(--ink-2); }
.bt-sheet .bt-round { color: var(--gold-hi); }

/* ----- écran de test : voir comme le Conteur ou un bot ----- */
.bt-testbar { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; padding: .5rem 14px; background: rgb(0 0 0 / .55); border-bottom: 1px dashed var(--gold-lo); }
.bt-testbar > span { color: var(--text-2); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-right: .2rem; }
.bt-testchip { min-height: 32px; padding: .15rem .7rem; border-radius: 999px; border: 1px solid var(--gold-lo); background: rgb(201 162 74 / .1); color: var(--parch-hi); font-family: var(--f-title); font-size: .85rem; letter-spacing: .03em; cursor: pointer; }
.bt-testchip.on { background: linear-gradient(var(--gold-hi), var(--gold)); color: var(--ink); border-color: #fff0bf; }
.bt-testchip:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .bt *, .bt *::before, .bt *::after { animation: none !important; transition: none !important; }
}

/* ===== Écran de table : la place du village posée à plat au milieu (public/js/table.js) =====
   Vue de tous les côtés : chaque jeton est tourné vers sa place, ce qui se passe est écrit deux fois au centre
   (une fois retourné). Rien de secret, aucun bouton de jeu. */
.bt.table .bt-main { max-width: none; grid-template-rows: auto minmax(0, 1fr); }
.bt.table .bt-deco::before { opacity: .18; }
.bt-board { display: grid; place-items: center; overflow: hidden; padding: 1vmin; }
.bt.table .bt-ring { width: min(96vw, calc(100dvh - 84px)); aspect-ratio: 1; margin: 0; }
.bt.table .bt-table { width: 70%; }
.bt.table .bt-seat { --tok: clamp(58px, 10.5vmin, 132px); width: calc(var(--tok) + 46px); transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); gap: .5vmin; }
.bt.table .bt-ring.mid .bt-seat { --tok: clamp(50px, 8.6vmin, 112px); }
.bt.table .bt-ring.many .bt-seat { --tok: clamp(44px, 7.2vmin, 94px); width: calc(var(--tok) + 30px); }
.bt.table .bt-name { font-size: clamp(.8rem, 1.9vmin, 1.35rem); padding: .1em .6em; }
.bt.table .bt-init { font-size: calc(var(--tok) * .52); }
.bt.table .bt-hand { font-size: calc(var(--tok) * .42); top: calc(var(--tok) * -.32); }
.bt.table .bt-center { width: 54%; background: none; padding: 0; }
.bt-tc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vmin; width: 100%; height: 100%; }
.bt-tc-mid { display: flex; flex-direction: column; align-items: center; }
.bt-tc-mid b { font-family: var(--f-logo); font-weight: 400; font-size: clamp(1.7rem, 4.6vmin, 3.6rem); line-height: 1; color: var(--gold-hi); text-shadow: 0 2px 0 #000, 0 0 18px rgb(158 29 43 / .55); text-align: center; }
.bt.table .bt-center .bt-big { width: clamp(40px, 7vmin, 84px); height: clamp(40px, 7vmin, 84px); }
.bt-tc-lines { display: flex; flex-direction: column; gap: .35em; width: 100%; text-align: center; font-family: var(--f-book); font-size: clamp(.9rem, 2.2vmin, 1.65rem); line-height: 1.22; color: var(--text); }
.bt-tc-lines.flip { transform: rotate(180deg); }
.bt-tc-lines p { margin: 0; }
.bt-tc-lines .big { font-family: var(--f-title); font-size: 1.15em; letter-spacing: .03em; color: var(--parch-hi); }
.bt-tc-lines .dawn { color: var(--gold-hi); font-style: italic; }
.bt-tc-lines .warn { color: #ff9aa5; font-weight: 700; }
.bt-tc-lines .turn { color: var(--gold-hi); font-family: var(--f-title); letter-spacing: .05em; }
/* nomination, vote, exécution : sur la table comme sur les téléphones */
.bt-seat.nominee .bt-tok { box-shadow: 0 0 0 4px var(--red-hi), 0 0 30px 6px rgb(201 50 63 / .7), inset 0 0 10px rgb(70 45 20 / .55); }
.bt-seat.nominator .bt-name { border-color: var(--red-hi); color: #ffb0b8; }
.bt-seat.about .bt-tok { box-shadow: 0 0 0 3px var(--red), 0 0 0 7px rgb(158 29 43 / .35), inset 0 0 10px rgb(70 45 20 / .55), 0 7px 12px -4px rgb(0 0 0 / .85); }
.bt.table .bt-seat.cur .bt-tok { animation-duration: 1.1s; }

/* ===== Téléphone en manette : un écran de table est posé ===== */
.bt.pad .bt-page > .bt-ring { width: min(100%, calc(56dvh * .833)); }
