/* ===== Leaders — la lumière du livret : nuit violette qui rougit à l'horizon, plateau de pierre crème, or pour ce qu'on
   peut faire, un pion noir et un pion blanc. Tout est préfixé « ld- ». ===== */

.ld, .rb {
  --ld-night: #1a1030;
  --ld-dusk: #3b2250;
  --ld-glow: #f5873b;
  --ld-cream: #f6ecd7;
  --ld-ink: #231a30;
  --ld-gold: #f1b83a;
  --ld-gold-d: #a8760f;
  --ld-teal: #14ae94;
  --ld-red: #e5483f;
  --ld-green: #6fb64a;
  --ld-line: rgb(255 255 255 / .2);
  --ld-text: #f7efe0;
  --ld-text-2: #cdbfe0;
  --ld-display: 'Anton', 'Barlow Condensed', Impact, sans-serif;
  --ld-label: 'Barlow Condensed', 'Nunito', system-ui, sans-serif;
  --ld-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.ld {
  position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; overflow: clip; color: var(--ld-text); font-family: var(--ld-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 120% 55% at 50% 108%, rgb(245 135 59 / .55) 0, rgb(245 135 59 / 0) 70%),
    radial-gradient(ellipse 90% 60% at 50% 30%, var(--ld-dusk) 0, var(--ld-night) 100%);
}
.ld [hidden] { display: none !important; }
.ld h1, .ld h2, .ld h3, .ld p, .ld ol, .ld ul { margin: 0; padding: 0; }
.ld .icon { width: 1.15em; height: 1.15em; flex: none; display: block; }
.ld :focus-visible { outline: 3px solid var(--ld-gold); outline-offset: 2px; }
.ld button { font-family: inherit; }

/* ---- haut de l'écran ---- */
.ld-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; order: 1; }
.ld-hud-r { display: flex; align-items: center; gap: 6px; flex: none; }
.ld-pill {
  display: flex; align-items: center; gap: 8px; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  background: rgb(0 0 0 / .35); border: 2px solid rgb(255 255 255 / .35); font: 800 .95rem/1 var(--ld-body);
}
.ld-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ld-text-2); flex: none; }
.ld-pill.mine { background: var(--ld-gold); border-color: #fff0bf; color: #2d1d00; }
.ld-pill.mine .ld-dot { background: #2d1d00; animation: ld-blink 1.1s ease-in-out infinite; }
.ld-pill-t { overflow: hidden; text-overflow: ellipsis; }
.ld-round {
  width: 38px; height: 38px; border-radius: 999px; border: 2px solid rgb(255 255 255 / .35); background: rgb(0 0 0 / .35); color: var(--ld-text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; font: 800 1.15rem var(--ld-body);
}
@media (hover: hover) { .ld-round:hover { background: rgb(0 0 0 / .55); } }
.ld-round b { font-weight: 800; }

/* ---- les équipes ---- */
.ld-team { padding: 4px 12px; order: 2; max-width: 760px; width: 100%; margin: 0 auto; transition: background .25s; border-radius: 14px; }
.ld-team.me { order: 4; padding-top: 2px; }
.ld-team.active { background: linear-gradient(90deg, rgb(241 184 58 / .22), rgb(241 184 58 / .06)); box-shadow: inset 0 0 0 2px rgb(241 184 58 / .8); }
.ld-team-in { display: grid; gap: 4px; }
.ld-team-h { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ld-av { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #fff; font: normal 800 .72rem var(--ld-body); }
.ld-av i { font-style: normal; position: relative; z-index: 1; }
.ld-av.s0, .ld-av.s1 { box-shadow: 0 0 0 1px rgb(0 0 0 / .4); }
.ld-av.s0 { background: #2b2335; color: #f4dfa0; }
.ld-av.s1 { background: #f8f1e1; color: #3a2d12; }
.ld-av .cam-bubble { position: absolute; inset: 0; border-radius: 50%; z-index: 0; }
.ld-av.big { width: 46px; height: 46px; font-size: 1.1rem; border-width: 3px; }
.ld-team-n { font-weight: 800; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ld-team-h em { font-style: normal; font-size: .62rem; color: var(--ld-gold); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ld-first { font: 800 .6rem var(--ld-label); letter-spacing: .1em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: rgb(255 255 255 / .16); color: var(--ld-text-2); }
.ld-press { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: rgb(0 0 0 / .3); font: 800 .72rem var(--ld-label); letter-spacing: .04em; }
.ld-pips { display: inline-flex; gap: 3px; }
.ld-pips i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ld-text-2); }
.ld-pips i.on { background: var(--ld-red); border-color: #ffb3ab; box-shadow: 0 0 8px rgb(229 72 63 / .8); }
.ld-free { color: var(--ld-text-2); }

.ld-chips { display: flex; gap: 6px; align-items: center; }
.ld-chip-t { position: relative; flex: none; display: inline-flex; align-items: flex-end; padding: 0; margin: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ld-chip-t.empty { width: 38px; height: 38px; border: 2px dashed rgb(255 255 255 / .25); cursor: default; }
/* Les portraits des équipes sont des jetons : un anneau à la couleur du joueur, une tranche dessous, une ombre. */
.ld-chip-t.s0 .ld-por { box-shadow: 0 0 0 3px #2b2335, 0 0 0 4.5px #8b7bb0, 0 3px 0 4.5px #120b1a, 0 6px 8px 3px rgb(10 4 20 / .45); }
.ld-chip-t.s1 .ld-por { box-shadow: 0 0 0 3px #f8f1e1, 0 0 0 4.5px #bba97f, 0 3px 0 4.5px #9c8a62, 0 6px 8px 3px rgb(10 4 20 / .45); }
.ld-chip-t .ld-por.small { margin-left: -12px; --s: 26px; }

.ld-por {
  --s: 38px; position: relative; display: block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff1cd 0, #f6c879 70%, #e69a4a 100%);
}
.ld-por img { position: absolute; left: 50%; bottom: -4%; width: 118%; height: auto; transform: translateX(-50%); pointer-events: none; }
.ld-por::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 32% 22%, rgb(255 255 255 / .42), rgb(255 255 255 / 0) 42%); box-shadow: inset 0 -3px 6px rgb(80 30 0 / .3); }
.ld-por.leader { background: radial-gradient(circle at 50% 35%, #fff6d8 0, #f1b83a 80%); color: #5b3a00; display: grid; place-items: center; }
.ld-por-crown { font-size: calc(var(--s) * .62); line-height: 1; }
.ld-por.big { --s: 58px; }
.ld-por.ban { --s: 32px; filter: grayscale(1); opacity: .6; }

/* ---- le plateau ---- */
.ld-boardwrap { order: 3; flex: 1 1 0; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 2px 6px; overflow: hidden; }
.ld-board { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; overflow: visible; }
/* Le plateau en 2,5D : une dalle de pierre crème vue un peu de biais, avec sa tranche, son ombre sur la nuit, des
   alvéoles creusées ; dessus, des jetons épais et des figurines debout (voir `token()` et `Board` dans le JS). */
.ld-plate-shadow { fill: rgb(10 4 20 / .55); stroke: rgb(10 4 20 / .55); stroke-width: 34; filter: blur(12px); }
.ld-plate-side { stroke-width: 26; }
.ld-plate { stroke: #c9b98f; stroke-width: 26; }
.ld-plate-edge { fill: none; stroke: rgb(255 255 255 / .6); stroke-width: 3; transform: scale(.985); transform-origin: center; transform-box: fill-box; }
.ld-cell-lip { fill: #fffbf2; }
.ld-cell { stroke: #b3a27a; stroke-width: 2.5; }
.ld-zone { fill: none; stroke: #d9a31f; stroke-width: 3; stroke-dasharray: 5 7; opacity: .95; }
.ld-zone.start { stroke-dasharray: none; stroke-width: 4; }
.ld-start { color: #c78f16; opacity: .65; }

.ld-base, .ld-fig { transition: transform .55s cubic-bezier(.3, .8, .25, 1); }
.ld-base { cursor: pointer; }
.ld-base.s0 { --c: #2b2335; --c2: #9a89c2; --edge: #0d0913; --rim: #1a1226; color: #f4dfa0; }
.ld-base.s1 { --c: #f8f1e1; --c2: #cfc09c; --edge: #8a7a58; --rim: #c9b78e; color: #4a3600; }
.ld-rim { fill: var(--rim); stroke: var(--edge); stroke-width: 2; }
.ld-rim-sh { pointer-events: none; }
.ld-disc { fill: var(--c); stroke: var(--edge); stroke-width: 2.5; }
.ld-disc2 { fill: none; stroke: var(--c2); stroke-width: 2; opacity: .65; }
.ld-gloss { pointer-events: none; }
.ld-base.s0 .ld-gloss { opacity: .5; }
.ld-ring { fill: none; stroke: transparent; stroke-width: 4; transition: stroke .2s; }
.ld-base.can .ld-ring { stroke: var(--ld-gold); animation: ld-ring 1.4s ease-in-out infinite; }
.ld-base.sel .ld-ring { stroke: #fff; stroke-width: 6; filter: drop-shadow(0 0 6px var(--ld-gold)); animation: none; }
.ld-base.moved .ld-ring { stroke: #7ee0c3; stroke-width: 5; }
.ld-base.lost .ld-ring { stroke: #ff5a4a; stroke-width: 7; animation: ld-ring .8s ease-in-out infinite; }
.ld-base.acted .ld-base-in, .ld-fig.acted .ld-fig-in { opacity: .5; }
.ld-base.leader .ld-disc { stroke-width: 3.5; }
.ld-base.leader.s0 .ld-disc2 { stroke: var(--ld-gold); opacity: .9; }
.ld-base.leader.s1 .ld-disc2 { stroke: #c78f16; opacity: .9; }
.ld-crown.up path { stroke: var(--edge); stroke-width: 1.1px; paint-order: stroke; stroke-linejoin: round; }
.ld-base.leader.s0 .ld-crown.up { color: var(--ld-gold); filter: drop-shadow(0 2px 1.5px rgb(0 0 0 / .55)); }
.ld-base.leader.s1 .ld-crown.up { color: #e2a52a; filter: drop-shadow(0 2px 1.5px rgb(60 40 0 / .45)); }
/* Un Leader illustré (Roi, Reine, Empereur Vermillon) : la figurine porte sa couronne, le jeton n'en a plus besoin. */
.ld-base.leader.has-fig .ld-crown { display: none; }
/* Changé en Grenouille par le Chaman : un anneau vert d'eau, et la figurine qui se transforme dans un petit nuage. */
.ld-base.frog .ld-disc2 { stroke: #46c7a8; opacity: 1; stroke-width: 3; }
.ld-base.frog:not(.can):not(.sel):not(.moved) .ld-ring { stroke: rgb(70 199 168 / .7); stroke-dasharray: 6 5; }
.ld-fig.morph image { animation: ld-morph .6s cubic-bezier(.2, .9, .2, 1); transform-box: fill-box; transform-origin: 50% 100%; }
.ld-fig image { filter: drop-shadow(0 2px 1.5px rgb(10 4 20 / .45)); }
.ld-fig.sel image { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 2px 1.5px rgb(10 4 20 / .45)); }

/* Un pion qu'on survole ou qu'on choisit se soulève de son alvéole ; un pion qui vient de bouger fait un petit saut. */
.ld-lift, .ld-fig image, .ld-shadow { transition-property: translate, scale, opacity; transition-duration: .2s; transition-timing-function: cubic-bezier(.2, 0, 0, 1); }
.ld-shadow { transform-box: fill-box; transform-origin: center; }
.ld-base.hov .ld-lift, .ld-fig.hov image { translate: 0 -3px; }
.ld-base.sel .ld-lift, .ld-fig.sel image { translate: 0 -8px; }
.ld-base.hov .ld-shadow { scale: 1.04; }
.ld-base.sel .ld-shadow { scale: 1.12; opacity: .75; }
.ld-base.hop .ld-lift, .ld-fig.hop image { animation: ld-hop .55s cubic-bezier(.3, .8, .25, 1); }
.ld-base.hop .ld-shadow { animation: ld-hop-sh .55s cubic-bezier(.3, .8, .25, 1); }

.ld-base.enter .ld-base-in, .ld-fig.enter .ld-fig-in { animation: ld-enter .55s cubic-bezier(.2, .9, .2, 1) both; }
.ld-base.ghost, .ld-fig.ghost { transition: none; pointer-events: none; }
.ld-base.ghost .ld-base-in { opacity: .55; }
.ld-base.ghost .ld-shadow { display: none; }
.ld-fig.ghost .ld-fig-in { opacity: .7; }
.ld-base.ghost .ld-disc { stroke-dasharray: 8 6; }

.ld-hl { stroke-width: 4; animation: ld-hl 1.3s ease-in-out infinite; }
.ld-hl.move { fill: rgb(20 174 148 / .26); stroke: #19c4a6; }
.ld-hl.dest, .ld-hl.recruit { fill: rgb(241 184 58 / .3); stroke: var(--ld-gold); }
.ld-hl.target { fill: rgb(229 72 63 / .24); stroke: #ff6a5c; }
.ld-hl.sel { fill: rgb(255 255 255 / .3); stroke: #fff; animation: none; }
.ld-dot-hl, .ld-hl.move + .ld-dot { fill: #19c4a6; }
.ld-dot { fill: var(--ld-gold); pointer-events: none; }
.ld-hl.move ~ .ld-dot { fill: #19c4a6; }
.ld-num circle { fill: var(--ld-gold); stroke: #fff; stroke-width: 2; }
.ld-num text { font: 800 20px var(--ld-body); fill: #2d1d00; }
.ld-hit { fill: transparent; cursor: pointer; pointer-events: all; }

/* ---- ce qu'on me demande ---- */
.ld-dock { order: 5; display: grid; gap: 7px; align-content: start; margin: 4px 10px calc(8px + env(safe-area-inset-bottom)); padding: 9px 10px; border-radius: 16px; background: rgb(14 8 28 / .72); border: 2px solid var(--ld-line); max-width: 740px; width: calc(100% - 20px); align-self: center; transition: border-color .25s; }
.ld-dock.ask { border-color: var(--ld-gold); }
.ld-ask { font-size: .9rem; font-weight: 700; line-height: 1.28; }
.ld-ask b { font-weight: 800; color: var(--ld-gold); }
.ld-note { font-size: .8rem; color: #ffd2cc; }
.ld-note.warn { padding: 7px 10px; border-radius: 10px; background: rgb(229 72 63 / .18); border: 1px solid rgb(255 106 92 / .55); color: #ffe1dc; font-weight: 700; }
.ld-note.good { padding: 7px 10px; border-radius: 10px; background: rgb(241 184 58 / .14); border: 1px solid rgb(241 184 58 / .5); color: #fff0c8; font-weight: 700; }
.ld-note.frog { color: #b9f3e3; }
/* Le choix du Leader : trois figurines debout sur un socle doré. */
.ld-leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.ld-leader-pick {
  display: grid; justify-items: center; gap: 4px; padding: 8px 6px 10px; cursor: pointer; border-radius: 14px; touch-action: manipulation;
  border: 2px solid #fff0bf; background: radial-gradient(120% 90% at 50% 20%, #fff6d8, #f1b83a); color: #2d1d00;
  box-shadow: 0 3px 0 var(--ld-gold-d), 0 8px 14px rgb(10 4 20 / .35); transition-property: transform, filter; transition-duration: .15s; transition-timing-function: ease-out;
}
.ld-leader-pick.ext { background: radial-gradient(120% 90% at 50% 20%, #ffe2cf, #e0583b); border-color: #ffd1b8; box-shadow: 0 3px 0 #8f2a18, 0 8px 14px rgb(10 4 20 / .35); }
.ld-leader-pick img { width: 100%; max-width: 96px; aspect-ratio: 1; object-fit: contain; object-position: bottom; filter: drop-shadow(0 3px 2px rgb(60 20 0 / .35)); pointer-events: none; }
.ld-leader-pick b { font: 400 1rem/1.05 var(--ld-display); letter-spacing: .03em; text-transform: uppercase; text-align: center; }
.ld-leader-pick:not(:disabled):active { transform: scale(.96); }
@media (hover: hover) { .ld-leader-pick:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-2px); } }
.ld-por.leader.fig { display: block; }
.ld-por.frog { border: 2px solid #46c7a8; }
.ld-chip-t .ld-por.small.frog { margin-left: -16px; }
.ld-card-crown { display: grid; place-items: center; height: 100%; font-size: 5rem; color: #f1b83a; }
.ld-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-btn {
  flex: 1 1 140px; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border-radius: 12px; border: 2px solid transparent; font: 800 .96rem/1.15 var(--ld-body); text-align: center; touch-action: manipulation; transition: transform .12s, filter .12s;
}
.ld-btn:active:not(:disabled) { transform: translateY(1px); }
.ld-btn:disabled { opacity: .5; cursor: default; }
.ld-btn.primary { background: var(--ld-gold); color: #2d1d00; border-color: #ffeaa6; box-shadow: 0 3px 0 var(--ld-gold-d); }
.ld-btn.alt { background: var(--ld-cream); color: var(--ld-ink); border-color: #fff; box-shadow: 0 3px 0 #a99a78; }
.ld-btn.ghost { background: transparent; color: var(--ld-text); border-color: rgb(255 255 255 / .4); }
@media (hover: hover) { .ld-btn:hover:not(:disabled) { filter: brightness(1.06); } }
.ld-bolt { font-style: normal; }

/* ---- les cartes à recruter ---- */
.ld-market { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ld-tiles { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; min-width: 0; flex: 1; }
.ld-market.classic .ld-tiles { justify-content: center; }
.ld-tile {
  --ld-tile-sh: inset 0 1px 0 rgb(255 255 255 / .16), 0 1px 1px rgb(10 4 20 / .4), 0 6px 12px -5px rgb(10 4 20 / .65);
  position: relative; flex: none; display: grid; justify-items: center; gap: 3px; width: 88px; padding: 8px 4px 6px; border-radius: 12px; cursor: pointer; color: var(--ld-text);
  background: linear-gradient(#30244a, #1b1229); border: 2px solid rgb(255 255 255 / .22); font: 700 .72rem/1.1 var(--ld-body); text-align: center;
  box-shadow: var(--ld-tile-sh); transition: translate .15s ease-out, scale .15s ease-out;
}
.ld-tile b { font-weight: 800; }
.ld-tile i { position: absolute; top: 3px; right: 6px; font-style: normal; font-size: .85rem; }
.ld-tile.act i { color: #ff8a7e; } .ld-tile.pas i { color: #55d8bd; } .ld-tile.spe i { color: #a6e07e; }
.ld-tile.can { --ld-tile-sh: inset 0 1px 0 rgb(255 255 255 / .2), 0 2px 2px rgb(10 4 20 / .35), 0 10px 16px -6px rgb(10 4 20 / .7); border-color: var(--ld-gold); translate: 0 -3px; animation: ld-glow 1.4s ease-in-out infinite; }
.ld-tile.on { background: linear-gradient(#4a3510, #2b1d06); border-color: #fff; }
.ld-tile.off { opacity: .45; }
.ld-tile:active:not(.off) { scale: .96; }
@media (hover: hover) { .ld-tile:not(.off):hover { translate: 0 -4px; } }
.ld-tile .ld-por.small { position: absolute; left: 6px; top: 36px; --s: 28px; }
.ld-pile { position: relative; flex: none; display: grid; justify-items: center; align-content: center; gap: 2px; width: 62px; height: 78px; }
.ld-pile i { position: absolute; inset: 6px 8px; border-radius: 7px; background: linear-gradient(#3a2862, #241840); border: 2px solid #8b7bb0; box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 2px 3px rgb(10 4 20 / .5); }
.ld-pile i:nth-child(1) { transform: translate(-4px, -4px); } .ld-pile i:nth-child(2) { transform: translate(-2px, -2px); }
.ld-pile b { position: relative; font: 800 1.1rem var(--ld-body); }
.ld-pile small { position: relative; font: 800 .55rem var(--ld-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ld-text-2); }
.ld-banned { display: flex; align-items: center; gap: 4px; padding-left: 8px; border-left: 1px solid var(--ld-line); }
.ld-banned small { font: 800 .6rem var(--ld-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ld-text-2); }

/* ---- la carte d'un Personnage ---- */
.ld-card {
  --t: var(--ld-red); --px: 0; --py: 0; position: relative; display: grid; border-radius: 16px; overflow: hidden; background: linear-gradient(#23183a, #1b1229 40%); border: 3px solid var(--t); color: var(--ld-text); text-align: left; max-width: 420px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 1px 2px rgb(10 4 20 / .35), 0 10px 20px -8px rgb(10 4 20 / .6), 0 26px 44px -20px rgb(10 4 20 / .7);
  transform: perspective(800px) rotateX(calc(var(--py) * -7deg)) rotateY(calc(var(--px) * 9deg));
  transition: transform .45s cubic-bezier(.2, 0, 0, 1);
}
.ld-card.tilt { transition-duration: .08s; }
.ld-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at calc(50% + var(--px) * 45%) calc(50% + var(--py) * 45%), rgb(255 246 222 / .26), rgb(255 246 222 / 0) 55%);
}
.ld-card.tilt::after { opacity: 1; }
.ld-sheet > .ld-card { animation: ld-card-in .5s cubic-bezier(.2, 0, 0, 1) both; }
.ld-card.pas { --t: var(--ld-teal); } .ld-card.spe { --t: var(--ld-green); } .ld-card.lead { --t: var(--ld-gold); }
.ld-card-art { position: relative; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; height: 190px; background: radial-gradient(ellipse 80% 70% at 50% 85%, #f6b469 0, #c75d5a 55%, #3b2250 100%); box-shadow: inset 0 -10px 16px -10px rgb(10 4 20 / .55); }
.ld-card-art::before { content: ''; position: absolute; left: 22%; right: 22%; bottom: 4px; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, rgb(40 12 30 / .5), rgb(40 12 30 / 0)); }
.ld-card-art img { position: relative; height: 100%; width: auto; max-width: 80%; object-fit: contain; filter: drop-shadow(0 6px 6px rgb(0 0 0 / .45)); translate: calc(var(--px) * -7px) calc(var(--py) * -4px); transition: translate .45s cubic-bezier(.2, 0, 0, 1); }
.ld-card.tilt .ld-card-art img { transition-duration: .08s; }
.ld-card-art .ld-card-art2 { position: absolute; right: 8%; bottom: 0; height: 52%; }
.ld-card-art img:first-child:not(:only-child) { margin-right: 18%; }
.ld-card-body { padding: 10px 14px 14px; display: grid; gap: 6px; }
.ld-card-body h3 { font: 400 1.5rem/1 var(--ld-display); letter-spacing: .02em; text-transform: uppercase; }
.ld-card-body p { font-size: .88rem; line-height: 1.38; font-weight: 600; }
.ld-chip { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: 999px; background: var(--t); color: #fff; font: 800 .74rem var(--ld-label); letter-spacing: .06em; text-transform: uppercase; }
.ld-chip i { font-style: normal; font-size: .9rem; }
.ld-card.compact { max-width: 150px; }
.ld-card.compact .ld-card-art { height: 100px; }
.ld-card.compact .ld-card-body { padding: 6px 8px 8px; }
.ld-card.compact h3 { font-size: 1rem; }
.ld-card.compact .ld-chip { font-size: .6rem; padding: 1px 7px 1px 4px; }

/* ---- fenêtres ---- */
.ld-sheet-wrap { position: fixed; inset: 0; z-index: 30; display: none; align-items: flex-end; justify-content: center; background: rgb(8 4 18 / .62); }
.ld-sheet-wrap.open { display: flex; }
.ld-sheet { width: min(100%, 460px); max-height: 92dvh; overflow: auto; display: grid; gap: 12px; justify-items: center; padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--ld-night); border: 2px solid var(--ld-line); border-bottom: 0; animation: ld-up .25s ease-out; }
.ld-sheet h2 { font: 400 1.4rem var(--ld-display); letter-spacing: .03em; text-transform: uppercase; justify-self: start; }
.ld-sheet-btns { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; justify-content: center; }
.ld-owner { display: flex; align-items: center; gap: 8px; font-weight: 800; justify-self: start; }
.ld-journal { list-style: none; display: grid; gap: 4px; width: 100%; max-height: 50dvh; overflow: auto; font-size: .82rem; color: var(--ld-text-2); }
.ld-journal li { padding: 3px 0; border-bottom: 1px solid rgb(255 255 255 / .08); }
.ld-journal li:first-child { color: var(--ld-text); font-weight: 800; }
.ld-muted { color: var(--ld-text-2); } .ld-muted.small { font-size: .8rem; }
.ld-overlay { position: fixed; inset: 0; z-index: 40; display: none; place-items: center; padding: 16px; background: rgb(8 4 18 / .7); }
.ld-overlay.open { display: grid; }
.ld-over-card { width: min(100%, 440px); display: grid; gap: 12px; justify-items: center; text-align: center; padding: 22px 18px; border-radius: 22px; background: linear-gradient(#34224a, #1a1030); border: 2px solid var(--ld-gold); box-shadow: 0 20px 50px rgb(0 0 0 / .6); animation: ld-pop .35s cubic-bezier(.2, .9, .2, 1); }
.ld-over-card h1 { font: 400 clamp(2rem, 8vw, 3rem)/1 var(--ld-display); letter-spacing: .03em; text-transform: uppercase; color: var(--ld-gold); }
.ld-kicker { font: 800 .8rem var(--ld-label); letter-spacing: .18em; text-transform: uppercase; color: var(--ld-text-2); }
.ld-overlay.lose .ld-over-card { border-color: rgb(255 255 255 / .35); }
.ld-overlay.lose h1 { color: var(--ld-text); }
.ld-mode { width: 100%; display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; cursor: pointer; text-align: left; border: 2px solid #fff0bf; background: var(--ld-gold); color: #2d1d00; box-shadow: 0 3px 0 var(--ld-gold-d); }
.ld-mode.alt { background: var(--ld-cream); border-color: #fff; box-shadow: 0 3px 0 #a99a78; color: var(--ld-ink); }
.ld-mode b { font: 400 1.25rem var(--ld-display); letter-spacing: .03em; text-transform: uppercase; }
.ld-mode span { font-size: .84rem; font-weight: 700; line-height: 1.3; }

/* ---- téléphone avec un écran de table : le plateau n'apparaît que pour choisir ---- */
.ld.board-off .ld-boardwrap { display: none; }
.ld.board-off .ld-dock { flex: 1 1 auto; align-content: start; overflow: auto; }

/* ---- ordinateur : le plateau à gauche, tout le reste à droite ---- */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .ld:not(.ld-tb) { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr); }
  .ld:not(.ld-tb) .ld-hud { grid-column: 1 / -1; }
  .ld:not(.ld-tb) .ld-boardwrap { grid-column: 1; grid-row: 2; padding: 6px 16px 16px; }
  .ld:not(.ld-tb) .ld-side { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 4px 14px 14px 0; }
  .ld:not(.ld-tb) .ld-side > * { order: 0; width: 100%; max-width: none; margin: 0; }
  .ld:not(.ld-tb) .ld-team.foe { order: 1; padding: 6px 10px; background: rgb(0 0 0 / .22); }
  .ld:not(.ld-tb) .ld-dock { order: 2; align-self: stretch; }
  .ld:not(.ld-tb) .ld-team.me { order: 3; margin-top: auto; padding: 6px 10px; background: rgb(0 0 0 / .22); }
  .ld:not(.ld-tb) .ld-market .ld-tiles { flex-wrap: wrap; overflow: visible; justify-content: center; }
  .ld.board-off .ld-boardwrap { display: grid; }
}
@media (min-width: 900px) and (min-aspect-ratio: 5/4) { .ld .ld-side { display: flex; } }
.ld-side { display: contents; }

/* ---- l'écran de table : un plateau à plat, un côté par joueur ---- */
.ld-tb { display: grid; gap: 0; padding: env(safe-area-inset-top) 0 0; }
.ld-tb[data-orient="v"] {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(124px, auto) minmax(0, 1fr) auto auto minmax(124px, auto);
  grid-template-areas: "s1" "mid" "status" "market" "s0";
}
.ld-tb[data-orient="h"] {
  grid-template-columns: minmax(170px, 21vw) minmax(0, 1fr) minmax(170px, 21vw); grid-template-rows: minmax(0, 1fr) auto auto;
  grid-template-areas: "s0 mid s1" "s0 market s1" "s0 status s1";
}
.ld-tb .ld-tb-seat.s0 { grid-area: s0; } .ld-tb .ld-tb-seat.s1 { grid-area: s1; }
.ld-tb .ld-tb-mid { grid-area: mid; min-height: 0; min-width: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 6px; }
.ld-tb .ld-tb-mid .ld-board { max-height: 100%; }
.ld-tb .ld-tb-status { grid-area: status; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 14px; font: 800 1.15rem var(--ld-body); }
.ld-tb .ld-tb-market { grid-area: market; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 10px; }
.ld-tb .ld-tb-ticker { display: none; list-style: none; }
.ld-tb[data-orient="v"] .ld-tb-ticker { display: none; }
.ld-tb-seat { position: relative; container-type: size; min-width: 0; min-height: 0; border-radius: 0; transition: background .3s; }
.ld-tb-seat.active { background: linear-gradient(rgb(241 184 58 / .25), rgb(241 184 58 / .06)); box-shadow: inset 0 0 0 4px rgb(241 184 58 / .85); }
.ld-tb-seat-in { position: absolute; left: 50%; top: 50%; width: 100cqw; height: 100cqh; transform: translate(-50%, -50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; padding: 8px 18px; }
.ld-tb[data-orient="v"] .ld-tb-seat.s1 .ld-tb-seat-in { transform: translate(-50%, -50%) rotate(180deg); }
.ld-tb[data-orient="h"] .ld-tb-seat-in { width: 100cqh; height: 100cqw; gap: 6px 18px; padding: 6px 14px; }
.ld-tb[data-orient="h"] .ld-tb-seat.s0 .ld-tb-seat-in { transform: translate(-50%, -50%) rotate(90deg); }
.ld-tb[data-orient="h"] .ld-tb-seat.s1 .ld-tb-seat-in { transform: translate(-50%, -50%) rotate(-90deg); }
.ld-tb-who { display: flex; align-items: center; gap: 10px; }
.ld-tb-who b { display: block; font: 800 1.5rem/1.05 var(--ld-body); }
.ld-tb-who small { display: block; font: 800 .7rem var(--ld-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ld-text-2); }
.ld-tb-turn { padding: 3px 12px; border-radius: 999px; background: var(--ld-gold); color: #2d1d00; font: 800 .85rem var(--ld-label); letter-spacing: .08em; text-transform: uppercase; animation: ld-blink 1.4s ease-in-out infinite; }
.ld-chips.big { gap: 12px; flex-wrap: wrap; justify-content: center; }
.ld-chip-t.big { flex-direction: column; align-items: center; gap: 3px; border-radius: 12px; }
.ld-chip-t.big .ld-por { --s: 56px; }
.ld-chip-t.big small { font: 800 .62rem var(--ld-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ld-text-2); max-width: 78px; text-align: center; line-height: 1.05; }
.ld-chip-t.big.empty { width: 56px; height: 56px; border-radius: 50%; }
.ld-tb-press { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ld-text-2); }
.ld-tb .ld-tiles { flex-wrap: wrap; justify-content: center; overflow: visible; }
.ld-tb .ld-tile { width: 78px; padding: 6px 2px 4px; cursor: default; font-size: .66rem; }
.ld-tb .ld-tile .ld-por { --s: 46px; }
.ld-tb .ld-tile .ld-por.small { top: 30px; --s: 24px; }


/* ---- écran de table, face à face : les cartes posées devant chaque joueur, les cartes à recruter de chaque côté du plateau ---- */
.ld-tb-rot { position: fixed; right: 10px; bottom: 10px; z-index: 6; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .35); background: rgb(0 0 0 / .45); color: var(--ld-text); font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: .55; }
@media (hover: hover) { .ld-tb-rot:hover { opacity: 1; } }
.ld-tb .ld-tb-market.side, .ld-tb .ld-tb-msg { display: none; }
.ld-tb[data-orient="v"][data-wide="1"] {
  grid-template-columns: minmax(150px, 22vw) minmax(0, 1fr) minmax(150px, 22vw);
  grid-template-rows: minmax(92px, 16vh) minmax(0, 1fr) minmax(92px, 16vh);
  grid-template-areas: "s1 s1 s1" "mkl mid mkr" "s0 s0 s0";
}
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-market.c,
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-status,
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-ticker { display: none; }
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-market.side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 6px; min-height: 0; overflow: hidden; }
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-market.side .ld-tiles { flex: 0 1 auto; flex-direction: row; max-height: 100%; }
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-market.l { grid-area: mkl; }
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-market.r { grid-area: mkr; transform: rotate(180deg); }
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-msg { display: block; max-width: 22ch; font: 800 .95rem/1.2 var(--ld-body); color: var(--ld-text); }
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-seat-in { flex-wrap: nowrap; gap: 6px 22px; padding: 4px 18px; }
.ld-tb[data-orient="v"][data-wide="1"] .ld-tb-mid { padding: 0; }

.ld-tb-hand { display: flex; gap: 8px; align-items: stretch; }
.ld-mini { position: relative; flex: none; width: 58px; height: 80px; padding: 0; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; border-radius: 8px; overflow: hidden; border: 2px solid var(--t, var(--ld-red)); background: #1b1229; color: var(--ld-text); cursor: pointer; box-shadow: 0 1px 1px rgb(10 4 20 / .4), 0 6px 10px -4px rgb(10 4 20 / .7); }
.ld-mini:not(.empty)::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgb(255 255 255 / .2), rgb(255 255 255 / 0) 38%); }
.ld-mini.pas { --t: var(--ld-teal); } .ld-mini.spe { --t: var(--ld-green); } .ld-mini.lead { --t: var(--ld-gold); }
.ld-mini-art { position: relative; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: radial-gradient(ellipse 80% 70% at 50% 90%, #f6b469, #c75d5a 60%, #3b2250); }
.ld-mini-art img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.ld-mini-art .ld-mini-art2 { position: absolute; right: 0; bottom: 0; height: 52%; }
/* La carte de la Grenouille posée sur celle du Personnage transformé. */
.ld-mini.frog .ld-mini-art img:not(.ld-mini-frog) { opacity: .35; filter: grayscale(.6); }
.ld-mini-art .ld-mini-frog { position: absolute; inset: 8% 8% 0; height: 92%; width: auto; margin: 0 auto; }
.ld-mini.frog { outline: 2px solid #46c7a8; outline-offset: 1px; }
.ld-tb-sniper { margin: 0; padding: 5px 8px; border-radius: 8px; background: rgb(229 72 63 / .2); border: 1px solid rgb(255 106 92 / .55); color: #ffe1dc; font-size: .78rem; font-weight: 700; }
.ld-mini-n { padding: 2px 1px 3px; background: var(--t); color: #fff; font: 800 .56rem/1.05 var(--ld-label); letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.ld-mini i { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: .72rem; color: #fff; text-shadow: 0 0 3px #000; }
.ld-mini.empty { border: 2px dashed rgb(255 255 255 / .25); background: none; box-shadow: none; cursor: default; }
.ld-mini-crown { margin: auto; font-size: 2.1rem; line-height: 1; color: #f1b83a; font-weight: 400; }
.ld-mini.lead.s0 .ld-mini-art { background: #2b2335; }
.ld-mini.lead.s1 .ld-mini-art { background: #f8f1e1; }
.ld-mini.lead.s1 .ld-mini-crown { color: #7a5a10; }

/* ---- schémas du carnet de règles ---- */
.ld-diagram { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
.ld-diagram .ld-board { height: auto; max-height: 340px; }
.rb-art .ld-diagram { max-width: 150px; }
.rb-art .ld-diagram .ld-board { max-height: 150px; }
.rb-block .ld-diagram { padding: 6px 0; }
.ld-facewrap { display: inline-flex; align-items: flex-end; }
.ld-facewrap .ld-por { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #c9b98f; }
.ld-facewrap .ld-por.small { margin-left: -16px; }

/* ---- la boîte de l'accueil ---- */
.pl-box[data-game="leaders"] { background: #f4eddc url("/img/leaders/cover.jpg") 62% 40% / cover no-repeat; padding: 0; }
.pl-box[data-game="leaders"] .pl-box-art { display: none; }

@keyframes ld-blink { 50% { opacity: .35; } }
@keyframes ld-ring { 50% { opacity: .35; } }
@keyframes ld-hl { 50% { opacity: .55; } }
@keyframes ld-glow { 50% { box-shadow: var(--ld-tile-sh, 0 0 0 transparent), 0 0 14px 3px rgb(241 184 58 / .6); } }
@keyframes ld-card-in { from { transform: perspective(800px) rotateX(16deg) translateY(16px); opacity: 0; } }
@keyframes ld-enter { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ld-hop { 45% { translate: 0 -16px; } }
@keyframes ld-morph { 0% { scale: .2; opacity: 0; filter: blur(4px) drop-shadow(0 0 10px #7ff0d2); } 60% { scale: 1.08; opacity: 1; } 100% { scale: 1; } }
@keyframes ld-hop-sh { 45% { scale: .78; opacity: .55; } }
@keyframes ld-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes ld-pop { from { transform: scale(.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ld *, .ld-card, .ld-over-card { animation: none !important; transition: none !important; } }
