/* ===== Complots — l'esprit du jeu : la Cour au Moyen Âge finissant. Fond de bois sombre et de vin, parchemin, dorures, lettres
   gothiques (Pirata One, comme le titre de la boîte). Les cartes sont celles du jeu (public/img/complots). Préfixe « cp- ». ===== */

.cp {
  --cp-ink: #1b120e;
  --cp-night: #1c1210;
  --cp-wine: #3a1418;
  --cp-wine-2: #5a1f24;
  --cp-gold: #d9a53b;
  --cp-gold-hi: #f3d58a;
  --cp-parch: #f1e4c3;
  --cp-text: #f6ebd3;
  --cp-text-2: #cdb894;
  --cp-line: rgb(243 213 138 / .26);
  --cp-red: #c9453a;
  --cp-green: #7fd08c;
  --cp-display: 'Pirata One', 'Almendra SC', Georgia, serif;
  --cp-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --cw: clamp(62px, min(21vw, calc((100dvh - 560px) / 1.5)), 108px); /* mes cartes */
  --aw: clamp(40px, 13.5vw, 64px); /* cartes des actions */
  --pw: clamp(34px, min(10vw, 7dvh), 58px); /* la Cour */
  --sw: clamp(50px, min(15vw, 11dvh), 88px); /* carte annoncée au centre */

  position: fixed; inset: 0; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto;
  color: var(--cp-text); font-family: var(--cp-body); font-weight: 600; line-height: 1.3;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(ellipse 90% 50% at 50% -8%, rgb(217 165 59 / .22) 0, rgb(217 165 59 / 0) 70%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgb(122 36 44 / .55) 0, rgb(122 36 44 / 0) 70%),
    linear-gradient(180deg, #2a1a14 0, #1c1210 55%, #150d0c 100%);
}
.cp [hidden] { display: none !important; }
.cp h1, .cp h2, .cp h3, .cp p, .cp ol, .cp ul { margin: 0; padding: 0; }
.cp .icon { width: 1.15em; height: 1.15em; flex: none; display: block; }
.cp :focus-visible { outline: 3px solid var(--cp-gold-hi); outline-offset: 2px; }
.cp button { font-family: inherit; }
.cp.shake { animation: cp-shake .65s cubic-bezier(.36, .07, .19, .97); }
@keyframes cp-shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -3px); } }

/* ---- une carte (partout : partie, carnet, accueil) ---- */
.cp-card {
  --w: 84px;
  position: relative; display: block; flex: none; width: var(--w); aspect-ratio: 190 / 287; padding: 0; border: 0; background: none;
  border-radius: calc(var(--w) * .075); box-shadow: 0 calc(var(--w) * .05) calc(var(--w) * .1) -2px rgb(0 0 0 / .65);
  font: inherit; color: inherit; cursor: default; transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), box-shadow .18s, filter .2s;
  appearance: none; -webkit-appearance: none;
}
.cp-card img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; pointer-events: none; }
button.cp-card { cursor: pointer; }
.cp-card.gone { visibility: hidden; }
.cp-card.up img { filter: grayscale(.95) brightness(.5) contrast(.92); }
.cp-lost {
  position: absolute; left: -4%; right: -4%; top: 50%; transform: translateY(-50%) rotate(-11deg); text-align: center;
  font: 400 calc(var(--w) * .2)/1 var(--cp-display, 'Pirata One', serif); letter-spacing: .08em; text-transform: uppercase; color: #fff4d6;
  background: rgb(163 39 47 / .94); padding: .14em 0; border-block: 2px solid #1b120e; box-shadow: 0 2px 6px rgb(0 0 0 / .5);
}
.cp-card.mini { --w: 30px; box-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.cp-card.mini .cp-lost { display: none; }
.cp-card.mini.up::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: #ffb4a8; font: 800 calc(var(--w) * .55)/1 system-ui, sans-serif; text-shadow: 0 1px 2px #000; }
.cp-card.pop { animation: cp-pop .42s cubic-bezier(.3, 1.5, .5, 1); }
.cp-card.dim img { filter: brightness(.7) saturate(.8); }
@keyframes cp-pop { from { transform: scale(.4) rotate(-10deg); opacity: 0; } }

/* Le visage d'un personnage, rogné dans sa carte. */
.cp-face { display: inline-block; flex: none; width: 1.9em; height: 1.9em; background-size: 260% auto; background-position: 50% 20%; border-radius: 50%; background-size: 230% auto; background-position: 50% 21%; background-repeat: no-repeat; box-shadow: 0 0 0 2px var(--cp-gold, #d9a53b), 0 1px 3px rgb(0 0 0 / .6); background-color: #d9c79b; }

/* Les pièces. */
.cp-coin { display: inline-flex; align-items: center; gap: 4px; font: 400 1.05rem/1 var(--cp-display, 'Pirata One', serif); letter-spacing: .03em; white-space: nowrap; }
.cp-coin i { position: relative; width: 1.2em; height: 1.2em; border-radius: 50%; flex: none; background: radial-gradient(circle at 34% 28%, #fff4b8, #e3ae30 52%, #9b6a12); box-shadow: inset 0 0 0 2px #8a5c0e, 0 1px 0 rgb(0 0 0 / .5); }
.cp-coin i::after { content: ''; position: absolute; inset: 27%; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgb(138 92 14 / .75); }
.cp-coin b { font: 900 1rem/1 var(--cp-body, 'Nunito', sans-serif); letter-spacing: 0; }
.cp-coin.big { font-size: 1.3rem; }

/* ---- haut de l'écran ---- */
.cp-hud { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(7px + env(safe-area-inset-top)) 12px 5px; flex: none; }
.cp-hud-r { display: flex; align-items: center; gap: 6px; flex: none; }
.cp-pill { display: flex; align-items: center; gap: 8px; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--cp-night); border: 2px solid var(--cp-line); font: 800 .95rem/1 var(--cp-body); white-space: nowrap; }
.cp-pill .cp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cp-text-2); flex: none; }
.cp-pill.mine { background: var(--cp-gold); border-color: #fff4d6; color: #2b1900; }
.cp-pill.mine .cp-dot { background: #2b1900; animation: cp-blink 1.1s ease-in-out infinite; }
.cp-pill-t { overflow: hidden; text-overflow: ellipsis; }
.cp-round-btn { width: 38px; height: 38px; border-radius: 999px; border: 2px solid var(--cp-line); background: var(--cp-night); color: var(--cp-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; font: 400 1.35rem var(--cp-display); }
.cp-round-btn:hover { background: #3a2018; }
.cp-round-btn b { font-weight: 400; }
@keyframes cp-blink { 50% { opacity: .3; } }

/* ---- les autres joueurs ---- */
.cp-opps { flex: none; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 4px 10px 6px; scrollbar-width: none; justify-content: safe center; align-items: flex-start; max-width: 1100px; width: 100%; margin: 0 auto; }
.cp-opps::-webkit-scrollbar { display: none; }
.cp-opp {
  position: relative; flex: none; display: grid; gap: 5px; justify-items: center; min-width: 92px; padding: 7px 9px 8px; border-radius: 14px; cursor: default; color: inherit; font: inherit;
  background: rgb(255 240 210 / .07); border: 0; box-shadow: inset 0 0 0 1.5px var(--cp-line); transition: background .25s, box-shadow .25s;
}
.cp-opp.active { background: rgb(217 165 59 / .22); box-shadow: inset 0 0 0 2.5px var(--cp-gold); }
.cp-opp.doing { box-shadow: inset 0 0 0 2.5px #8fb8ec; background: rgb(106 160 216 / .16); }
.cp-opp.aimed { box-shadow: inset 0 0 0 2.5px var(--cp-red); background: rgb(201 69 58 / .22); }
.cp-opp.dead { opacity: .55; filter: grayscale(.7); }
.cp-opp.pickable { cursor: pointer; box-shadow: inset 0 0 0 2.5px #fff, 0 0 0 2px var(--cp-gold); animation: cp-glow 1.3s ease-in-out infinite; }
.cp-opp.picked { background: var(--cp-gold); color: #2b1900; box-shadow: inset 0 0 0 2.5px #fff; animation: none; }
.cp-opp-top { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.cp-av { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; background: var(--c, #555); border: 2px solid #fff4d6; flex: none; overflow: hidden; }
.cp-av .cam-bubble { position: absolute; inset: 0; border-radius: 50%; }
.cp-av.v-talk { box-shadow: 0 0 0 3px var(--cp-green), 0 0 16px 2px rgb(127 208 140 / .6); }
.cp-opp-n { min-width: 0; font-size: .8rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 84px; }
.cp-opp-cards { display: flex; gap: 4px; align-items: flex-end; }
.cp-opp-cards .cp-card { --w: 30px; }
.cp-opp .cp-coin { font-size: .95rem; }
.cp-out { font: 400 .95rem/1 var(--cp-display); letter-spacing: .06em; color: var(--cp-text-2); text-transform: uppercase; }
@keyframes cp-glow { 50% { box-shadow: inset 0 0 0 2.5px #fff, 0 0 0 4px var(--cp-gold), 0 0 18px 2px rgb(217 165 59 / .6); } }

/* ---- le centre ---- */
.cp-mid { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 4px 10px; min-height: 0; }
.cp-table { display: flex; gap: clamp(8px, 3vw, 18px); align-items: center; justify-content: center; width: 100%; max-width: 560px; }
.cp-court { display: grid; justify-items: center; gap: 4px; flex: none; }
.cp-stack { position: relative; display: block; width: var(--pw); aspect-ratio: 190 / 287; }
.cp-stack .cp-card { --w: var(--pw); position: absolute; inset: 0; }
.cp-stack .s2 { transform: translate(-3px, -3px); }
.cp-stack .s3 { transform: translate(-6px, -6px); }
.cp-stack .s1 { position: relative; }
.cp-lbl { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; line-height: 1; }
.cp-lbl b { font: 900 1.1rem/1 var(--cp-body); }
.cp-lbl small { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cp-text-2); font-weight: 800; }

.cp-stage { flex: 1 1 auto; min-width: 0; max-width: 400px; display: grid; justify-items: center; align-content: center; gap: 6px; padding: 8px 10px; border-radius: 16px; background: rgb(0 0 0 / .24); border: 2px dashed var(--cp-line); min-height: calc(var(--sw) * 1.5 + 14px); }
.cp-stage .cp-card { --w: var(--sw); }
.cp-stage.claim { border-style: solid; border-color: var(--cp-gold); background: rgb(217 165 59 / .1); }
.cp-stage.claim.counter { border-color: #8fb8ec; background: rgb(106 160 216 / .12); }
.cp-stage.lose { border-style: solid; border-color: var(--cp-red); background: rgb(201 69 58 / .12); }
.cp-stage.reveal { border-style: solid; }
.cp-stage.reveal.proof { border-color: var(--cp-green); background: rgb(127 208 140 / .12); }
.cp-stage.reveal.lie { border-color: var(--cp-red); background: rgb(201 69 58 / .16); }
.cp-stage.idle { border-style: dotted; background: none; }
.cp-stage-t { font-size: .84rem; font-weight: 700; text-align: center; line-height: 1.22; max-width: 100%; }
.cp-stage-t b { font-weight: 800; color: var(--cp-gold-hi); }
.cp-stage-t em { font-style: normal; color: var(--cp-text-2); }
.cp-stage-t em.tg { color: #ff9d8e; font-weight: 800; }
.cp-stage.idle .cp-stage-t { color: var(--cp-text-2); }
.cp-sub { font-size: .74rem; color: var(--cp-text-2); text-align: center; }
.cp-sub.warn { color: #ffb4a8; font-weight: 800; }
.cp-bigcoin .cp-coin { font-size: 2.2rem; }

.cp-tally { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; font-size: .8rem; }
.cp-tally li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgb(0 0 0 / .26); }
.cp-tally li.full { opacity: .55; }
.cp-tally .cp-face { width: 28px; height: 28px; }
.cp-tally b { font: 900 1.05rem/1 var(--cp-body); }
.cp-tally small { font-size: .68rem; color: var(--cp-text-2); font-weight: 800; margin-left: -2px; }

.cp-ticker { list-style: none; display: grid; text-align: center; font-size: .78rem; line-height: 1.25; color: var(--cp-text-2); max-width: 640px; }
.cp-ticker li { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cp-ticker li.new { color: var(--cp-text); font-weight: 800; animation: cp-in .35s ease-out; }
.cp-ticker li.priv, .cp-journal li.priv { color: var(--cp-gold-hi); }
@keyframes cp-in { from { opacity: 0; transform: translateY(4px); } }

/* ---- mon côté : mes deux personnages et le panneau d'action ---- */
.cp-dock { flex: none; display: grid; gap: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); max-width: 820px; width: 100%; margin: 0 auto; min-width: 0; }
.cp-me { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 0 12px; min-width: 0; }
.cp-hand { display: flex; align-items: flex-end; justify-content: flex-start; gap: 8px; padding: 12px 4px 4px 2px; }
.cp-hand .cp-card { --w: var(--cw); }
.cp-hand .cp-card.can { cursor: pointer; }
.cp-hand .cp-card.can:hover { transform: translateY(-6px); }
.cp-hand .cp-card.sel { transform: translateY(-12px) scale(1.04); z-index: 3; box-shadow: 0 0 0 3px var(--cp-gold), 0 0 0 6px #fff4d6, 0 12px 18px -6px rgb(0 0 0 / .8); }
.cp-hand.pick .cp-card.can { box-shadow: 0 0 0 3px var(--cp-gold), 0 0 12px 1px rgb(217 165 59 / .5); animation: cp-glow2 1.3s ease-in-out infinite; }
@keyframes cp-glow2 { 50% { box-shadow: 0 0 0 3px var(--cp-gold-hi), 0 0 22px 4px rgb(217 165 59 / .8); } }
.cp-empty { color: var(--cp-text-2); font-size: .85rem; align-self: center; padding: 14px; }
.cp-me-h { display: grid; gap: 6px; justify-items: start; padding: 8px 10px; border-radius: 16px; transition: background .25s, box-shadow .25s; }
.cp-me-h.active { background: rgb(217 165 59 / .2); box-shadow: inset 0 0 0 2.5px var(--cp-gold); }
.cp-me-h .cp-av { width: 34px; height: 34px; font-size: 1.15rem; }
.cp-me-h > .cp-av, .cp-me-h > span:first-child { justify-self: start; }
.cp-me-n { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.cp-me-n b { font-weight: 800; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.cp-me-n em { font-style: normal; font-size: .62rem; color: var(--cp-gold-hi); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.cp-me-stats { display: flex; gap: 8px; align-items: center; }
.cp-stat { display: grid; justify-items: center; line-height: 1; padding: 3px 9px; border-radius: 10px; background: rgb(0 0 0 / .3); }
.cp-stat small { font-size: .55rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cp-text-2); font-weight: 800; }
.cp-stat b { font: 900 1.2rem/1.1 var(--cp-body); }

.cp-panel { margin: 0 10px; padding: 10px; min-height: 84px; display: flex; flex-direction: column; justify-content: center; gap: 8px; background: rgb(21 10 9 / .88); border: 2px solid var(--cp-line); border-radius: 16px; transition: border-color .25s; }
.cp-panel.ask { border-color: var(--cp-gold); }
.cp-ask { font-size: .88rem; font-weight: 700; line-height: 1.28; }
.cp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-btn {
  flex: 1 1 150px; min-height: 46px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border-radius: 12px; border: 2px solid var(--cp-ink); font: 400 1.2rem/1.1 var(--cp-display); letter-spacing: .05em; text-align: center; touch-action: manipulation;
  transition: transform .12s, filter .12s; box-shadow: 0 3px 0 var(--cp-ink);
}
.cp-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--cp-ink); }
.cp-btn:disabled { opacity: .45; cursor: not-allowed; }
.cp-btn.primary { background: var(--cp-gold); color: #2b1900; }
.cp-btn.alt { background: #8fb8ec; color: #0e2644; }
.cp-btn.danger { background: var(--cp-red); color: #fff; }
.cp-btn.small { flex: 0 1 auto; min-width: 110px; font-size: 1.05rem; }
.cp-btn.ghost { background: #3a2018; color: var(--cp-text); border-color: var(--cp-line); box-shadow: none; }
.cp-btn:hover:not(:disabled) { filter: brightness(1.08); }

.cp-acts { display: grid; gap: 6px; }
.cp-acts.money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cp-acts.chars { grid-template-columns: repeat(auto-fit, minmax(66px, 1fr)); }
.cp-act { display: grid; justify-items: center; align-content: start; gap: 3px; padding: 7px 4px 8px; min-width: 0; border-radius: 12px; border: 2px solid var(--cp-line); background: #2b1814; color: var(--cp-text); font: inherit; cursor: pointer; text-align: center; transition: background .15s, transform .1s; }
.cp-act b { font: 400 1.02rem/1 var(--cp-display); letter-spacing: .02em; max-width: 100%; }
@media (max-width: 420px) { .cp-act b { font-size: .92rem; } }
.cp-act small { font: 700 .62rem/1.15 var(--cp-body); color: var(--cp-text-2); }
.cp-act:hover:not(:disabled) { background: #3a2018; }
.cp-act.on { background: var(--cp-gold); color: #2b1900; border-color: #fff4d6; }
.cp-act.on small { color: #3b2606; }
.cp-act:disabled { opacity: .38; cursor: not-allowed; }
.cp-act.bad:not(:disabled):not(.on) { border-color: rgb(201 69 58 / .6); }
.cp-act .cp-coin { height: 26px; align-items: center; }
.cp-act .cp-coin b { display: none; }
.cp-act .cp-coin i { width: 24px; height: 24px; }
.cp-act .cp-dag { display: grid; place-items: center; height: 26px; font-size: 1.3rem; line-height: 1; }
.cp-act .cp-face.big { width: 42px; height: 42px; margin-top: 1px; }
.cp-act:disabled .cp-face { filter: grayscale(.8); }

.cp-targets { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--cp-line); background: #3a2018; color: var(--cp-text); font: 800 .82rem var(--cp-body); cursor: pointer; }
.cp-chip.on { background: var(--cp-gold); color: #2b1900; border-color: #fff4d6; }
.cp-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 4px; scrollbar-width: thin; justify-content: safe center; }
.cp-strip .cp-card { cursor: pointer; }
.cp-strip .cp-card.sel { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--cp-gold), 0 6px 10px -4px rgb(0 0 0 / .7); }
.cp-ex { display: grid; justify-items: center; gap: 3px; flex: none; }
.cp-ex small { font: 800 .6rem/1 var(--cp-body); text-transform: uppercase; letter-spacing: .08em; color: var(--cp-text-2); }
.cp-judge { display: flex; justify-content: center; padding: 4px 0; }

/* ---- fenêtres ---- */
.cp-sheet-wrap { position: absolute; inset: 0; z-index: 30; display: none; align-items: flex-end; justify-content: center; background: rgb(10 4 3 / .72); }
.cp-sheet-wrap.open { display: flex; }
.cp-sheet { width: min(100%, 560px); max-height: 82dvh; overflow: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #2a1714; border: 2px solid var(--cp-line); border-bottom: 0; display: grid; gap: 12px; animation: cp-up .25s ease-out; }
@media (min-width: 700px) { .cp-sheet-wrap { align-items: center; } .cp-sheet { border-radius: 22px; border-bottom: 2px solid var(--cp-line); } }
@keyframes cp-up { from { transform: translateY(24px); opacity: 0; } }
.cp-sheet h2 { font: 400 1.9rem/1 var(--cp-display); letter-spacing: .05em; }
.cp-muted { color: var(--cp-text-2); font-size: .88rem; }
.cp-muted.small { font-size: .78rem; }
.cp-sheet-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-sheet-btns .cp-btn { flex: 1 1 140px; }
.cp-journal { list-style: none; display: grid; gap: 4px; font-size: .84rem; max-height: 46dvh; overflow: auto; }
.cp-journal li { padding: 5px 8px; border-radius: 8px; background: rgb(255 255 255 / .05); }
.cp-jt { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--cp-gold); color: #2b1900; font-size: .68rem; font-weight: 800; }

.cp-overlay { position: absolute; inset: 0; z-index: 40; display: none; place-items: center; padding: 16px; background: rgb(10 4 3 / .84); overflow-y: auto; }
.cp-overlay.open { display: grid; }
.cp-over-card { width: min(100%, 460px); display: grid; gap: 12px; justify-items: center; text-align: center; padding: 22px 18px; border-radius: 24px; background: linear-gradient(170deg, #4a1c20, #2a1714); border: 3px solid var(--cp-gold); box-shadow: 0 0 0 5px var(--cp-ink), 0 24px 60px -10px #000; animation: cp-pop .5s cubic-bezier(.3, 1.4, .5, 1); }
.cp-over-card h1 { font: 400 2.8rem/1 var(--cp-display); letter-spacing: .05em; color: var(--cp-gold-hi); text-shadow: 0 3px 0 var(--cp-ink); }
.cp-overlay.win .cp-over-card { border-color: var(--cp-green); }
.cp-overlay.win h1 { color: var(--cp-green); }
.cp-over-art .cp-card { transform: rotate(-4deg); }
.cp-mode { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--cp-gold); background: rgb(217 165 59 / .14); color: var(--cp-text); text-align: left; cursor: pointer; font: inherit; }
.cp-mode:hover { background: rgb(217 165 59 / .26); }
.cp-mode.alt { border-color: #8fb8ec; background: rgb(106 160 216 / .12); }
.cp-mode span { display: grid; gap: 3px; }
.cp-mode b { font: 400 1.5rem/1 var(--cp-display); letter-spacing: .04em; }
.cp-mode small { font-size: .8rem; color: var(--cp-text-2); font-weight: 600; }
.cp-final { list-style: none; display: grid; gap: 6px; width: 100%; }
.cp-final li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 7px 12px; border-radius: 12px; background: rgb(255 255 255 / .07); text-align: left; }
.cp-final li.alive { background: rgb(127 208 140 / .2); box-shadow: inset 0 0 0 2px var(--cp-green); }
.cp-final .cp-final-c { grid-row: span 2; display: flex; gap: 4px; }
.cp-final .cp-final-c .cp-card { --w: 34px; }
.cp-final li b { font-weight: 800; }
.cp-final li em { font-style: normal; font-size: .75rem; color: var(--cp-text-2); }

/* ---- effets ---- */
.cp-fx { position: fixed; inset: 0; pointer-events: none; z-index: 35; overflow: hidden; }
.cp-float { position: absolute; transform: translate(-50%, -50%); font: 400 clamp(2rem, 9vw, 3.6rem)/1 var(--cp-display); letter-spacing: .06em; color: var(--cp-gold-hi); text-shadow: 0 3px 0 var(--cp-ink), 0 0 20px rgb(217 165 59 / .8); -webkit-text-stroke: 2px var(--cp-ink); paint-order: stroke fill; white-space: nowrap; animation: cp-float 1.6s cubic-bezier(.2, .8, .3, 1) forwards; }
.cp-float.lie, .cp-float.kill, .cp-float.elim, .cp-float.challenge { color: #ff8070; }
.cp-float.proof { color: var(--cp-green); }
.cp-float.counter { color: #8fb8ec; }
@keyframes cp-float { 0% { transform: translate(-50%, -30%) scale(.3) rotate(-8deg); opacity: 0; } 18% { transform: translate(-50%, -50%) scale(1.15) rotate(3deg); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -140%) scale(1) rotate(0); opacity: 0; } }

/* ---- grand écran : plus d'air ---- */
@media (min-width: 900px) {
  .cp { --cw: clamp(80px, min(8vw, calc((100dvh - 520px) / 1.5)), 124px); --aw: clamp(46px, 5vw, 70px); --pw: clamp(44px, min(6vw, 9dvh), 72px); --sw: clamp(58px, min(7vw, 12dvh), 104px); }
  .cp-stage { max-width: 460px; }
  .cp-opp { min-width: 124px; }
}
@media (prefers-reduced-motion: reduce) {
  .cp *, .cp *::before, .cp *::after { animation: none !important; transition: none !important; }
}

/* ---- l'accueil : la boîte ---- */
.pl-box[data-game="complots"] { background: radial-gradient(circle at 50% 45%, #f3e4bd 0, #d8b878 58%, #8a5a2c 100%); padding: 8px; color: #1b120e; }
.pl-cp { position: relative; display: flex; align-items: center; justify-content: center; gap: 3cqw; width: 100%; height: 100%; }
.pl-cp-logo { display: block; height: 100%; width: auto; max-width: 48%; object-fit: contain; filter: drop-shadow(0 2px 2px rgb(60 30 10 / .35)); }
.pl-cp-fan { display: flex; justify-content: center; align-items: flex-end; }
.pl-cp-c { display: block; margin: 0 -2.6cqw; transform: translateY(var(--y)) rotate(var(--r)); transform-origin: 50% 120%; }

/* ---- le carnet de règles ---- */
.rb-art.g-complots { width: auto; display: block; }
.rb-art.g-complots .cp-card { --w: 60px; }
.rb-art.rb-mini.g-complots .cp-card { --w: 42px; }
.rb-art.rb-mid.g-complots .cp-card { --w: 74px; }

/* ---- téléphone en manette (un écran de table est posé) : seulement ce qui est à soi ---- */
.cp.pad .cp-opps, .cp.pad .cp-table, .cp.pad .cp-tally { display: none; }
.cp.pad .cp-mid { flex: 0 0 auto; padding-top: 0; }
.cp.pad .cp-dock { margin-top: auto; }

/* ---- écran de table : posé à plat, lu de tous les côtés ---- */
.cp.table {
  --tw: clamp(150px, 25vmin, 250px); /* largeur d'un siège */
  --tc: clamp(34px, 7.6vmin, 70px); /* largeur d'une carte devant un joueur */
  overflow: hidden; display: block;
}
.cp-tseats { position: absolute; inset: 0; }
.cp-tseat {
  position: absolute; width: var(--tw); display: grid; gap: 6px; justify-items: center; padding: 8px 8px 9px; border-radius: 16px;
  /* sur l'ellipse des sièges ; l'espace pris une fois tourné compte pour moitié dans les deux sens */
  left: calc(50% + (50% - var(--tw) * .58 - 8px) * var(--cos));
  top: calc(50% + (50% - var(--tw) * .58 - 8px) * var(--sin));
  translate: -50% -50%; rotate: var(--rot);
  background: rgb(255 240 210 / .07); box-shadow: inset 0 0 0 1.5px var(--cp-line); transition: background .25s, box-shadow .25s;
}
.cp-tseat.active { background: rgb(217 165 59 / .24); box-shadow: inset 0 0 0 3px var(--cp-gold), 0 0 26px 4px rgb(217 165 59 / .35); }
.cp-tseat.doing { background: rgb(106 160 216 / .18); box-shadow: inset 0 0 0 3px #8fb8ec; }
.cp-tseat.aimed { background: rgb(201 69 58 / .24); box-shadow: inset 0 0 0 3px var(--cp-red); }
.cp-tseat.won { background: rgb(127 208 140 / .22); box-shadow: inset 0 0 0 3px var(--cp-green); }
.cp-tseat.dead { opacity: .6; filter: grayscale(.6); }
.cp-tseat-top { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.cp-tseat .cp-av { width: clamp(30px, 5vmin, 44px); height: clamp(30px, 5vmin, 44px); font-size: clamp(1.1rem, 2.6vmin, 1.6rem); }
.cp-tname { min-width: 0; font-size: clamp(1rem, 2.3vmin, 1.4rem); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-tcards { display: flex; gap: 6px; align-items: flex-end; justify-content: center; }
.cp-tcards .cp-card { --w: var(--tc); }
.cp-tseat .cp-coin.big { font-size: clamp(1.2rem, 3vmin, 1.8rem); }
.cp-tseat .cp-out { font-size: 1.2rem; }

.cp-tcenter {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(40vmin, 38vw); display: grid; gap: 1.2vmin; justify-items: center; text-align: center;
}
.cp-tline { font-size: clamp(.82rem, 1.85vmin, 1.2rem); font-weight: 800; line-height: 1.2; color: var(--cp-text); max-width: 100%; }
.cp-tline.far { rotate: 180deg; }
.cp-trow { display: flex; gap: clamp(10px, 2.4vmin, 26px); align-items: center; justify-content: center; }
.cp-tcenter .cp-stack { --pw: clamp(36px, 7vmin, 66px); }
.cp-tstage { display: grid; place-items: center; min-width: clamp(60px, 11vmin, 108px); min-height: clamp(90px, 16.6vmin, 164px); border-radius: 14px; border: 2px dashed var(--cp-line); }
.cp-tstage.on { border-style: solid; border-color: var(--cp-gold); background: rgb(217 165 59 / .1); padding: 6px; }
.cp-tstage .cp-card { --w: clamp(56px, 10.6vmin, 104px); }
.cp-tstage .cp-card.reveal-proof { box-shadow: 0 0 0 4px var(--cp-green), 0 0 26px 6px rgb(127 208 140 / .5); }
.cp-tstage .cp-card.reveal-lie { box-shadow: 0 0 0 4px var(--cp-red), 0 0 26px 6px rgb(201 69 58 / .5); }
.cp-tcenter .cp-tally li { padding: 2px 10px 2px 4px; }
.cp-tcenter .cp-tally .cp-face { width: clamp(26px, 4vmin, 38px); height: clamp(26px, 4vmin, 38px); }
.cp-tcenter .cp-tally b { font-size: clamp(1rem, 2.2vmin, 1.4rem); }
.cp-tcenter .cp-lbl b { font-size: clamp(1.1rem, 2.4vmin, 1.5rem); }
.cp-thud { position: absolute; right: 0; top: 0; z-index: 8; display: flex; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; opacity: .5; }
.cp-thud:hover { opacity: 1; }
