/* ===== The Crew — direction artistique du livret : nuit étoilée, cartes aux scènes teintées (rose, bleu, vert, jaune),
   Fusées noires, jetons Tâche violets, jeton Radio vert, titres rouge orangé du journal de bord. Tout est préfixé
   « cr- ». ===== */

.cr, .rb {
  --cr-night: #060b1f;
  --cr-deep: #0d1633;
  --cr-card: #131d42;
  --cr-line: rgb(255 255 255 / .16);
  --cr-text: #eef3ff;
  --cr-text-2: #9fb0d6;
  --cr-orange: #ff9b2f;
  --cr-orange-d: #7a3f00;
  --cr-red: #ef4a3c;
  --cr-cyan: #5ad1ff;
  --cr-green: #6fdc8c;
  --cr-gold: #f2c14e;
  --cr-paper: #e8d6c1;
  --cr-pink: #e0509a;
  --cr-blue: #1693d6;
  --cr-leaf: #6fb91f;
  --cr-sun: #eaa915;
  --cr-display: 'Barlow Condensed', 'Anton', Impact, sans-serif;
  --cr-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.cr {
  --hw: 62px; --step: 28px;
  --pw: clamp(54px, min(15vw, 9.6dvh), 88px); /* cartes du pli */
  --tkw: clamp(46px, min(13vw, 8dvh), 72px); /* cartes Tâche */
  position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  overflow: hidden; overflow: clip; color: var(--cr-text); font-family: var(--cr-body); font-weight: 600; line-height: 1.3;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, rgb(6 11 31 / .55), rgb(6 11 31 / .82)), var(--cr-night) url("/img/crew/space.jpg") center / cover no-repeat;
}
.cr [hidden] { display: none !important; }
.cr h1, .cr h2, .cr h3, .cr p, .cr ol, .cr ul { margin: 0; padding: 0; }
.cr .icon { width: 1.15em; height: 1.15em; flex: none; display: block; }
.cr :focus-visible { outline: 3px solid var(--cr-orange); outline-offset: 2px; }
.cr button { font-family: inherit; }

/* ---- haut de l'écran ---- */
.cr-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; }
.cr-hud-r { display: flex; align-items: center; gap: 6px; flex: none; }
.cr-pill { display: flex; align-items: center; gap: 8px; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--cr-deep); border: 1.5px solid var(--cr-line); font: 800 .92rem/1 var(--cr-body); white-space: nowrap; }
.cr-pill .cr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cr-text-2); flex: none; }
.cr-pill.mine { background: var(--cr-orange); border-color: #fff; color: #2a1500; }
.cr-pill.mine .cr-dot { background: #2a1500; animation: cr-blink 1.1s ease-in-out infinite; }
.cr-pill-t { overflow: hidden; text-overflow: ellipsis; }
.cr-chip, .cr-round-btn { height: 38px; border-radius: 999px; border: 1.5px solid var(--cr-line); background: var(--cr-deep); color: var(--cr-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0; font: 800 .85rem var(--cr-body); }
.cr-chip { padding: 0 12px; }
.cr-round-btn { width: 38px; font: 700 1.2rem var(--cr-display); }
.cr-chip:hover, .cr-round-btn:hover { background: var(--cr-card); }
.cr-chip .icon { width: 1.05em; height: 1.05em; }

/* ---- la mission : numéro en pentagone (doré si la règle à 5 joueurs s'applique), règle, symboles ---- */
.cr-mission { padding: 2px 12px 4px; max-width: 980px; width: 100%; margin: 0 auto; }
.cr-mission-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--cr-line); background: rgb(13 22 51 / .82); color: inherit; cursor: pointer; }
.cr-mission-btn:hover { border-color: rgb(255 255 255 / .35); }
.cr-mnum { position: relative; flex: none; width: 42px; height: 40px; display: grid; place-items: center; font: 700 1.25rem/1 var(--cr-display); color: #fff; clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); background: #fff; padding-top: 3px; }
.cr-mnum::before { content: ''; position: absolute; inset: 3px; clip-path: inherit; background: #1b1b22; z-index: -1; }
.cr-mnum.gold { background: linear-gradient(135deg, #ffe08a, #d79a1e); }
.cr-mnum { isolation: isolate; }
.cr-mtxt { flex: 1; min-width: 0; display: grid; gap: 5px; }
.cr-mrule { font-size: .84rem; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cr-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.cr-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; background: rgb(255 255 255 / .1); color: var(--cr-text-2); white-space: nowrap; }
.cr-badge .icon { width: .95em; height: .95em; }
.cr-badge.dead, .cr-badge.until { color: #bff0c9; background: rgb(111 220 140 / .16); }
.cr-badge.gold { color: #2a1a00; background: linear-gradient(135deg, #ffe08a, #d79a1e); }
.cr-mtokens { display: flex; gap: 4px; flex: none; flex-wrap: wrap; max-width: 34%; justify-content: flex-end; }

/* ---- les cartes ---- */
.cr-card {
  --w: 56px; --cc: #444;
  position: relative; display: block; flex: none; width: var(--w); aspect-ratio: 5 / 7; container-type: inline-size; padding: 0; margin: 0; border: 0;
  border-radius: 9% / 6.4%; background: #fff; color: var(--cc); cursor: default; text-align: left; font: inherit; overflow: hidden;
  box-shadow: 0 0 0 1.5px rgb(0 0 0 / .55), 0 5px 9px -4px rgb(0 0 0 / .8); transition: transform .18s, box-shadow .18s, filter .18s, opacity .25s;
}
button.cr-card { cursor: pointer; }
.cr-card.s-pink { --cc: var(--cr-pink); }
.cr-card.s-blue { --cc: var(--cr-blue); }
.cr-card.s-green { --cc: #5fa615; }
.cr-card.s-yellow { --cc: #d89a05; }
.cr-card.s-rocket { --cc: #fff; background: #fff; }
.cr-art { position: absolute; inset: 4.5cqw; border-radius: 7cqw; background-repeat: no-repeat; background-size: auto 100%; background-position: var(--slice, 50%) 50%; background-color: #1a2147; }
.cr-card.s-rocket .cr-art { background-size: cover; background-position: center; }
.cr-card.s-pink .cr-art { background-color: #4a1534; }
.cr-card.s-blue .cr-art { background-color: #0a2c4a; }
.cr-card.s-green .cr-art { background-color: #213a0b; }
.cr-card.s-yellow .cr-art { background-color: #43300a; }
.cr-cn { position: absolute; display: grid; justify-items: center; align-content: center; gap: 0; width: 27cqw; padding: 1cqw 0 .5cqw; border-radius: 6cqw; background: #fff; color: var(--cc); line-height: 1; }
.cr-cn b { font: 700 24cqw/1 var(--cr-display); letter-spacing: -.01em; }
.cr-sym { width: 16cqw; height: 16cqw; }
.cr-cn.tl { left: 2.5cqw; top: 2.5cqw; }
.cr-cn.br { right: 2.5cqw; bottom: 2.5cqw; transform: rotate(180deg); }
.cr-card.s-rocket .cr-cn { background: #0a0e1d; color: #fff; }
@container (max-width: 34px) { .cr-cn { width: 38cqw; border-radius: 8cqw; } .cr-cn b { font-size: 30cqw; } .cr-sym, .cr-cn.br { display: none; } }
.cr-card.back { background: #efe3cf; }
.cr-planet { position: absolute; inset: 6cqw; background: var(--cr-paper) url("/img/crew/planet9.png") center / 112% auto no-repeat; border-radius: 6cqw; box-shadow: inset 0 0 0 .8cqw rgb(120 90 50 / .35); }
.cr-card.gone { background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .16); }
.cr-card.can { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--cr-orange), 0 6px 12px -4px rgb(0 0 0 / .8); animation: cr-glow 1.4s ease-in-out infinite; }
button.cr-card.can:hover { transform: translateY(-3px); }
.cr-card.sel { transform: translateY(-10px) scale(1.05); z-index: 3; animation: none; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--cr-orange), 0 12px 18px -4px rgb(0 0 0 / .8); }
.cr-card.played { opacity: .5; }
.cr-card.enter { animation: cr-drop .35s cubic-bezier(.2, .8, .2, 1); }

/* jetons */
.cr-token { --tw: 34px; display: inline-block; flex: none; width: var(--tw); height: var(--tw); border-radius: 20%; overflow: hidden; padding: 0; border: 0; background: #1c0f3a; box-shadow: 0 0 0 1.5px rgb(255 255 255 / .35), 0 3px 6px -2px rgb(0 0 0 / .7); }
.cr-token img { display: block; width: 100%; height: 100%; }
button.cr-token { cursor: pointer; }
.cr-radio { --rw: 26px; position: relative; display: inline-block; flex: none; width: var(--rw); height: var(--rw); vertical-align: middle; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .6)); }
.cr-radio img { display: block; width: 100%; height: 100%; }
.cr-radio.red img { filter: hue-rotate(205deg) saturate(1.7) brightness(1.02); }

/* ---- l'équipage ---- */
.cr-crew { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 4px 10px 6px; scrollbar-width: none; scroll-snap-type: x proximity; justify-content: safe center; align-items: flex-start; max-width: 1240px; width: 100%; margin: 0 auto; }
.cr-crew::-webkit-scrollbar { display: none; }
.cr-seat { flex: 1 1 150px; scroll-snap-align: center; display: grid; align-content: start; gap: 4px; min-width: 140px; max-width: 232px; padding: 7px 8px 6px; border-radius: 14px; background: rgb(13 22 51 / .82); border: 1.5px solid var(--cr-line); color: inherit; text-align: left; font: inherit; transition: background .25s, border-color .25s; }
button.cr-seat { cursor: pointer; }
.cr-seat.can { border-color: var(--cr-orange); box-shadow: 0 0 0 3px rgb(255 155 47 / .3); animation: cr-glow 1.4s ease-in-out infinite; }
.cr-seat.active { background: rgb(255 155 47 / .18); border-color: var(--cr-orange); box-shadow: inset 0 0 0 1.5px var(--cr-orange); }
.cr-seat.picking { border-color: var(--cr-cyan); box-shadow: inset 0 0 0 1.5px var(--cr-cyan); }
.cr-seat.jarvis { min-width: 232px; max-width: 360px; }
.cr-seat-h { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cr-av { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; background: var(--c, #555); border: 2px solid #fff; flex: none; }
.cr-av .cam-bubble { position: absolute; inset: 0; border-radius: 50%; }
.cr-av.v-talk { box-shadow: 0 0 0 3px #6fdc8c, 0 0 16px 2px rgb(111 220 140 / .6); }
.cr-av.jarvis { background: linear-gradient(135deg, #2a4a78, #5f7fa6); }
.cr-jv { font: 700 1.1rem var(--cr-display); }
.cr-seat-n { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
.cr-seat-n b { font-size: .88rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-seat-n small { font-size: .66rem; color: var(--cr-text-2); font-weight: 700; }
.cr-won { flex: none; display: grid; justify-items: center; line-height: 1; padding: 2px 7px; border-radius: 9px; background: rgb(255 255 255 / .1); }
.cr-won b { font: 700 1.1rem var(--cr-display); }
.cr-won small { font-size: .55rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cr-text-2); font-weight: 800; }
.cr-badges-s { display: flex; flex-wrap: wrap; gap: 4px; }
.cr-b { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 3px; border-radius: 999px; font-size: .66rem; font-weight: 800; background: rgb(255 255 255 / .12); }
.cr-b.cmd { background: #232733; color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); }
.cr-b.cmd img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.cr-b.warn { background: rgb(239 74 60 / .22); color: #ffc4be; padding-left: 8px; }
.cr-b.pink { background: rgb(224 80 154 / .25); color: #ffc2e0; padding-left: 8px; }
.cr-seat-f { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; min-height: 28px; }
.cr-radiob { display: inline-flex; align-items: center; gap: 4px; }
.cr-radiob .cr-pos { position: relative; display: inline-block; }
.cr-radiob .cr-pos.high { align-self: flex-start; }
.cr-radiob .cr-pos.low { align-self: flex-end; }
.cr-radiob .cr-pos.only { align-self: center; }
.cr-radiob { align-items: stretch; }
.cr-radiob .cr-pos { display: flex; }
.cr-radiob .cr-pos.high { align-items: flex-start; }
.cr-radiob .cr-pos.low { align-items: flex-end; }
.cr-radiob .cr-pos.only { align-items: center; }
.cr-radiob .cr-radio.beside { align-self: center; }
.cr-noradio { opacity: .5; }
.cr-mytasks { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; justify-content: flex-end; }
.cr-mytasks.me { justify-content: flex-start; align-items: center; padding: 2px 4px; gap: 6px; }
.cr-mytasks.me small { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cr-text-2); font-weight: 800; }
.cr-mini { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.cr-mini.done { opacity: .5; }
.cr-mini .cr-tick { position: absolute; right: -3px; bottom: -3px; }
.cr-tick { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--cr-green); color: #04230f; font: 800 .62rem/1 var(--cr-body); font-style: normal; }
.cr-tick.big { position: absolute; inset: 0; margin: auto; width: 56%; height: auto; aspect-ratio: 1; font-size: 1.4rem; box-shadow: 0 0 0 3px #fff; }
.cr-jcols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cr-jcol { position: relative; display: block; }
.cr-jcol .cr-card { --w: 100%; width: 100%; box-shadow: 0 0 0 1px rgb(0 0 0 / .6); }
.cr-jcol.under::after { content: ''; position: absolute; left: 7%; right: 7%; bottom: -3px; height: 5px; border-radius: 0 0 4px 4px; background: #efe3cf; box-shadow: 0 0 0 1px rgb(0 0 0 / .5); z-index: -1; }
.cr-jcol .cr-card.can { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cr-orange); }
.cr-jcol .cr-card.sel { transform: translateY(-4px); }
.cr-jcol.empty { aspect-ratio: 5 / 7; border-radius: 4px; border: 1px dashed var(--cr-line); }

/* ---- le centre : tâches et pli ---- */
.cr-board { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; max-width: 980px; width: 100%; margin: 0 auto; }
.cr-board > * { flex: none; }
.cr-tasks { display: flex; flex-wrap: wrap; gap: 8px 7px; justify-content: center; padding: 6px 4px 2px; max-width: 100%; }
.cr-tasks.many { --tkw: clamp(40px, min(10.4vw, 6.6dvh), 60px); gap: 6px 5px; }
.cr-task { position: relative; display: grid; justify-items: center; gap: 3px; width: var(--tkw); }
.cr-task-tok { height: calc(var(--tkw) * .46); display: grid; place-items: end center; }
.cr-task-tok .cr-token { --tw: calc(var(--tkw) * .46); }
.cr-notok { display: block; width: calc(var(--tkw) * .46); height: calc(var(--tkw) * .46); border-radius: 20%; border: 1.5px dashed rgb(255 255 255 / .14); }
.cr-task-card { position: relative; display: block; width: 100%; }
.cr-task-card .cr-card { --w: var(--tkw); width: 100%; }
.cr-task.owned .cr-task-card .cr-card { box-shadow: 0 0 0 2px var(--c), 0 4px 8px -4px rgb(0 0 0 / .8); }
.cr-task.done .cr-task-card .cr-card { opacity: .45; filter: grayscale(.4); }
.cr-task.now .cr-task-card .cr-card { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--cr-cyan); }
.cr-task.sel .cr-task-tok .cr-token { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--cr-orange); }
.cr-task.tweakable .cr-task-tok .cr-token, .cr-task.tweakable .cr-notok { box-shadow: 0 0 0 2px var(--cr-orange); animation: cr-glow 1.4s ease-in-out infinite; }
.cr-owner { display: block; max-width: 100%; }
.cr-owner-n { display: block; max-width: calc(var(--tkw) + 10px); padding: 0 6px; border-radius: 999px; font-size: .62rem; font-weight: 800; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; background: var(--c, rgb(255 255 255 / .1)); color: #fff; }
.cr-owner-n.free { background: transparent; color: var(--cr-text-2); }
.cr-task.can .cr-task-card .cr-card { cursor: pointer; }
.cr-trick { display: grid; gap: 6px; justify-items: center; padding: 8px 12px 10px; border-radius: 16px; background: rgb(13 22 51 / .6); border: 1.5px solid var(--cr-line); min-width: min(100%, 220px); }
.cr-trick.won { border-color: var(--cr-orange); background: rgb(255 155 47 / .14); }
.cr-trick-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 24px; }
.cr-trick-t { font: 700 .95rem/1 var(--cr-display); letter-spacing: .06em; text-transform: uppercase; color: var(--cr-orange); }
.cr-lastbtn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--cr-line); background: var(--cr-deep); color: var(--cr-text); font: 800 .72rem var(--cr-body); cursor: pointer; }
.cr-trick-cards { display: flex; gap: clamp(6px, 2vw, 14px); justify-content: center; flex-wrap: wrap; min-height: calc(var(--pw) * 1.4 + 18px); align-items: flex-start; }
.cr-play { display: grid; justify-items: center; gap: 4px; width: var(--pw); }
.cr-play .cr-card { --w: var(--pw); width: 100%; }
.cr-play-n { display: block; max-width: calc(var(--pw) + 14px); padding: 0 8px; border-radius: 999px; font-size: .66rem; font-weight: 800; line-height: 1.5; background: var(--c); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-play.win .cr-card { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--cr-orange), 0 0 22px 4px rgb(255 155 47 / .65); transform: translateY(-4px); }
.cr-trick-hint { align-self: center; color: var(--cr-text-2); font-size: .85rem; text-align: center; max-width: 280px; padding: 8px; }
.cr-trick-cards.sheet { justify-content: center; }
.cr-empty-board { display: grid; justify-items: center; gap: 8px; padding: 8px; color: var(--cr-text-2); text-align: center; font-size: .88rem; }
.cr-empty-board img { height: clamp(70px, 14dvh, 130px); width: auto; filter: drop-shadow(0 8px 14px rgb(0 0 0 / .6)); }
.cr-status { max-width: 520px; text-align: center; font-size: .84rem; font-weight: 700; padding: 6px 14px; border-radius: 12px; background: rgb(255 155 47 / .16); border: 1.5px solid rgb(255 155 47 / .5); }

/* ---- moi : en-tête, main, panneau ---- */
.cr-dock { display: grid; gap: 4px; max-width: 980px; width: 100%; margin: 0 auto; padding: 0 8px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgb(6 11 31 / .75) 24%); }
.cr-me-h { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgb(13 22 51 / .82); border: 1.5px solid var(--cr-line); min-width: 0; flex-wrap: wrap; }
.cr-me-h.active { background: rgb(255 155 47 / .22); border-color: var(--cr-orange); }
.cr-me-n { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cr-me-n b { font-size: .95rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-me-n em { font-style: normal; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cr-text-2); font-weight: 800; }
.cr-me-stats { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cr-hand { display: flex; justify-content: center; align-items: flex-end; padding: 16px 6px 4px; min-height: calc(var(--hw) * 1.4 + 20px); max-width: 100%; }
.cr-hc { position: relative; flex: none; width: var(--hw); margin-left: calc(var(--step) - var(--hw)); transition: transform .18s; }
.cr-hc:first-child { margin-left: 0; }
.cr-hc .cr-card { --w: var(--hw); width: 100%; }
.cr-hc.sel { z-index: 4; }
.cr-hc.dim .cr-card { filter: brightness(.55) saturate(.7); }
.cr-hc.radioed .cr-card { box-shadow: 0 0 0 2px var(--cr-green), 0 5px 9px -4px rgb(0 0 0 / .8); }
.cr-reminder { position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%); padding: 0 7px; border-radius: 999px; background: var(--cr-green); color: #04230f; font: 800 .58rem/1.6 var(--cr-body); text-transform: uppercase; letter-spacing: .06em; pointer-events: none; }
.cr-panel { display: grid; gap: 8px; padding: 8px 10px; border-radius: 16px; background: rgb(13 22 51 / .9); border: 1.5px solid var(--cr-line); min-height: 48px; align-content: center; }
.cr-panel.ask { border-color: var(--cr-orange); box-shadow: 0 0 0 3px rgb(255 155 47 / .22); }
.cr-ask { font-size: .9rem; font-weight: 800; line-height: 1.3; }
.cr-hint { font-size: .8rem; color: var(--cr-text-2); line-height: 1.3; }
.cr-hint.warn { color: #ffd8a8; }
.cr-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-btn { flex: 1 1 130px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 2px solid transparent; background: var(--cr-card); color: var(--cr-text); font: 800 .92rem/1.15 var(--cr-body); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.cr-btn:hover:not(:disabled) { filter: brightness(1.15); }
.cr-btn:disabled { opacity: .45; cursor: not-allowed; }
.cr-btn.primary { background: var(--cr-orange); color: #2a1500; border-color: #ffd29c; }
.cr-btn.alt { background: #1c4a86; border-color: #5b95dd; }
.cr-btn.ghost { background: transparent; border-color: var(--cr-line); }
.cr-btn.radio { flex: 0 1 auto; background: rgb(111 220 140 / .18); border-color: rgb(111 220 140 / .6); color: #cfffd9; }
.cr-btn.radio.off { background: transparent; border-color: var(--cr-line); color: var(--cr-text-2); }
.cr-btn.sos { flex: none; background: #3a1330; border-color: #c64a8e; }
.cr-btn.sos img { width: 24px; height: 24px; border-radius: 50%; }
.cr-radio-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-radio-row small { color: var(--cr-text-2); font-size: .72rem; }
.cr-chipbtn { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--cr-line); background: transparent; color: var(--cr-text); font: 800 .8rem var(--cr-body); cursor: pointer; }
.cr-chipbtn.on { background: var(--cr-orange); border-color: #ffd29c; color: #2a1500; }
.cr-chipbtn.alt { background: #1c4a86; border-color: #5b95dd; }
.cr-jseat, .cr-rolerow, .cr-give-row, .cr-dirs, .cr-readyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cr-jseat small, .cr-rolerow small, .cr-give small { color: var(--cr-text-2); font-size: .72rem; font-weight: 800; margin-right: 4px; }
.cr-prep { display: grid; gap: 10px; }
.cr-give { display: grid; gap: 6px; }
.cr-dist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-dist small { flex-basis: 100%; color: var(--cr-text-2); font-size: .72rem; }
.cr-rdy { padding: 1px 9px; border-radius: 999px; background: rgb(255 255 255 / .1); font-size: .72rem; font-weight: 800; color: var(--cr-text-2); }
.cr-rdy.on { background: rgb(111 220 140 / .22); color: #bff0c9; }

/* ---- animations ---- */
.cr-fx { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.cr-float { position: fixed; transform: translate(-50%, -50%); padding: 6px 16px; border-radius: 999px; background: var(--cr-green); color: #04230f; font: 700 1.2rem/1.1 var(--cr-display); letter-spacing: .04em; text-transform: uppercase; border: 3px solid #fff; box-shadow: 0 6px 16px rgb(0 0 0 / .45); white-space: nowrap; animation: cr-float 1.6s ease-out forwards; }
.cr-float.win { background: var(--cr-orange); color: #2a1500; }
@keyframes cr-blink { 50% { opacity: .35; } }
@keyframes cr-glow { 50% { filter: brightness(1.14); } }
@keyframes cr-fade { from { opacity: 0; } }
@keyframes cr-rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes cr-drop { from { transform: translateY(-26px) scale(.82) rotate(-4deg); opacity: 0; } }
@keyframes cr-float { from { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 18% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 75% { opacity: 1; transform: translate(-50%, -70%) scale(1); } to { opacity: 0; transform: translate(-50%, -120%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .cr *, .cr *::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---- fenêtres : journal de bord, récit, communication, menu ---- */
.cr-sheet-wrap { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-end; justify-content: center; background: rgb(3 6 20 / .78); backdrop-filter: blur(3px); }
.cr-sheet-wrap.open { display: flex; animation: cr-fade .2s ease both; }
.cr-sheet { width: 100%; max-width: 680px; max-height: 88dvh; overflow: auto; display: grid; gap: 12px; align-content: start; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--cr-deep); border: 1.5px solid var(--cr-line); border-bottom: 0; border-radius: 22px 22px 0 0; animation: cr-rise .28s cubic-bezier(.2, .8, .2, 1) both; }
@media (min-width: 700px) { .cr-sheet-wrap { align-items: center; } .cr-sheet { border-radius: 22px; border-bottom: 1.5px solid var(--cr-line); } }
.cr-sheet h2, .cr-over-card h1 { font: 700 1.7rem/1.05 var(--cr-display); letter-spacing: .05em; text-transform: uppercase; color: var(--cr-orange); }
.cr-sheet h2 em { font: 700 .85rem var(--cr-body); font-style: normal; color: var(--cr-text-2); text-transform: none; letter-spacing: 0; }
.cr-sheet-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cr-sheet-btns .cr-btn { flex: 1 1 140px; }
.cr-muted { color: var(--cr-text-2); font-size: .88rem; font-weight: 600; }
.cr-muted.small { font-size: .78rem; }
.cr-journal { list-style: none; display: grid; gap: 4px; max-height: 46dvh; overflow: auto; font-size: .85rem; }
.cr-journal li { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--cr-line); }
.cr-jt { flex: none; width: 2.4em; color: var(--cr-orange); font-weight: 800; }
.cr-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.cr-mcell { display: grid; justify-items: center; gap: 0; padding: 6px 0 4px; border-radius: 10px; border: 1.5px solid var(--cr-line); background: var(--cr-card); color: var(--cr-text); cursor: pointer; line-height: 1.1; }
.cr-mcell b { font: 700 1.15rem var(--cr-display); }
.cr-mcell small { font-size: .66rem; color: var(--cr-text-2); font-weight: 800; }
.cr-mcell.gold { box-shadow: inset 0 0 0 1.5px var(--cr-gold); }
.cr-mcell.done { background: rgb(111 220 140 / .18); border-color: rgb(111 220 140 / .6); }
.cr-mcell.done small { color: #bff0c9; }
.cr-mcell.skip { background: rgb(239 74 60 / .16); border-color: rgb(239 74 60 / .5); }
.cr-mcell.cur { outline: 3px solid var(--cr-orange); outline-offset: 1px; }
.cr-mcell:disabled { opacity: .55; cursor: not-allowed; }
.cr-story { font-size: .95rem; line-height: 1.5; color: #dde6ff; }
.cr-story.intro { font-style: italic; color: var(--cr-text-2); }
.cr-rule { padding: 10px 12px; border-radius: 12px; background: rgb(255 155 47 / .16); border: 1.5px solid rgb(255 155 47 / .55); font-size: .95rem; font-weight: 800; line-height: 1.45; }
.cr-facts { list-style: none; display: grid; gap: 8px; }
.cr-facts li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; font-size: .85rem; }
.cr-facts li b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(255 255 255 / .1); font: 700 1.15rem var(--cr-display); }
.cr-tokrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cr-tokrow > small { flex-basis: 100%; color: var(--cr-text-2); font-weight: 800; font-size: .74rem; }
.cr-tokexp { display: grid; justify-items: center; gap: 3px; }
.cr-tokexp small { font-size: .62rem; color: var(--cr-text-2); font-weight: 700; }
.cr-radio-cards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px 0; }
.cr-radio-pos { display: grid; gap: 8px; }

/* ---- plein écran : résultat d'une tentative ---- */
.cr-overlay { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 14px; overflow: auto; background: rgb(3 6 20 / .84); backdrop-filter: blur(4px); }
.cr-overlay.open { display: flex; animation: cr-fade .3s ease both; }
.cr-over-card { width: min(100%, 480px); margin: auto; display: grid; gap: 12px; justify-items: center; text-align: center; padding: 18px 16px 16px; border-radius: 22px; background: radial-gradient(ellipse 120% 70% at 50% 0%, #1b2f66, var(--cr-deep) 72%); border: 1.5px solid var(--cr-line); box-shadow: 0 24px 60px -10px rgb(0 0 0 / .7); animation: cr-rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.cr-overlay.ok .cr-over-card h1 { color: var(--cr-green); }
.cr-overlay.ko .cr-over-card h1 { color: var(--cr-red); }
.cr-logo { width: min(58%, 200px); height: auto; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .5)); }
.cr-reason { font-size: 1rem; font-weight: 700; max-width: 380px; }
.cr-score { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.cr-score b { font: 700 3rem/1 var(--cr-display); color: #fff; }
.cr-score span { font-size: .88rem; color: var(--cr-text-2); font-weight: 700; }
.cr-epilogue { display: grid; gap: 8px; text-align: left; max-height: 30dvh; overflow: auto; font-size: .85rem; color: #dde6ff; }
.cr-over-card .cr-sheet-btns { width: 100%; }

@media (min-width: 900px) {
  .cr { --hw: 76px; --pw: clamp(64px, min(7vw, 11dvh), 100px); --tkw: clamp(52px, min(6vw, 9dvh), 80px); }
  .cr-hud { padding-left: 20px; padding-right: 20px; }
  .cr-seat { min-width: 190px; }
  .cr-seat-n b { font-size: .95rem; }
}
@media (max-height: 640px) {
  .cr-mrule { -webkit-line-clamp: 2; }
  .cr-btn { min-height: 40px; }
  .cr-panel { padding: 6px 8px; }
}
@media (max-width: 420px) {
  .cr-pill { padding: 0 11px; font-size: .86rem; }
  .cr-chip .cr-mn { display: none; }
}

/* ---- dans le carnet de règles : les vraies cartes ---- */
.rb-art.g-crew { width: auto; display: block; }
.rb-art.g-crew .cr-card { --w: 60px; }
.rb-art.g-crew .cr-token { --tw: 46px; }
.rb-art.g-crew .cr-radio { --rw: 52px; }
.rb-art.rb-mini.g-crew .cr-card { --w: 42px; }
.rb-art.rb-mini.g-crew .cr-token { --tw: 36px; }
.rb-art.rb-mini.g-crew .cr-radio { --rw: 38px; }
.rb-art.rb-card-art.g-crew .cr-token { --tw: 44px; }

/* ---- briefing : le récit de la mission directement sur la table ---- */
.cr-brief { display: grid; gap: 12px; width: min(100%, 680px); padding: 14px 16px 16px; border-radius: 18px; background: rgb(13 22 51 / .86); border: 1.5px solid var(--cr-line); }
.cr-brief h2 { font: 700 1.6rem/1 var(--cr-display); letter-spacing: .06em; text-transform: uppercase; color: var(--cr-orange); }
.cr-hand:empty { display: none; }

.cr-sos-ico { width: 22px; height: 22px; border-radius: 50%; }
.cr-opt { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgb(255 255 255 / .06); border: 1.5px solid var(--cr-line); }
.cr-opt h3 { font: 700 1.1rem/1 var(--cr-display); letter-spacing: .06em; text-transform: uppercase; color: var(--cr-cyan); }

/* Le centre défile si l'écran est trop petit ; mes cartes et le panneau restent en bas. */
.cr-main { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.cr-main::-webkit-scrollbar { display: none; }
.cr-main > * { flex: none; }
.cr-main > .cr-board { flex: 1 0 auto; min-height: 150px; }
.cr-main > .cr-mission, .cr-main > .cr-crew { margin-left: auto; margin-right: auto; }

/* Écrans courts : tout est un peu plus compact pour que le pli reste en vue. */
@media (max-height: 820px) {
  .cr { --pw: clamp(46px, min(13vw, 8dvh), 70px); --tkw: clamp(38px, min(11vw, 6.6dvh), 56px); }
  .cr-mrule { -webkit-line-clamp: 1; }
  .cr-mission-btn { padding: 5px 10px; }
  .cr-mnum { width: 34px; height: 32px; font-size: 1.05rem; }
  .cr-hud { padding-top: calc(5px + env(safe-area-inset-top)); padding-bottom: 3px; }
  .cr-pill, .cr-chip, .cr-round-btn { height: 34px; }
  .cr-hand { padding-top: 12px; min-height: 0; }
  .cr-me-h { padding: 2px 10px 2px 3px; }
  .cr-me-h .cr-av { width: 26px; height: 26px; }
  .cr-panel { padding: 6px 8px; gap: 6px; }
  .cr-btn { min-height: 38px; padding: 6px 12px; }
  .cr-trick { padding: 6px 10px 8px; gap: 4px; }
  .cr-trick-cards { min-height: calc(var(--pw) * 1.4 + 16px); }
  .cr-board { gap: 6px; padding: 4px 10px; }
  .cr-main > .cr-board { min-height: 0; }
  .cr-seat-n small { display: none; }
}

/* Les grilles à une colonne ne s'élargissent jamais au contenu (la main, un long texte). */
.cr-dock, .cr-panel, .cr-seat, .cr-opt, .cr-sheet, .cr-over-card, .cr-brief, .cr-prep, .cr-give { grid-template-columns: minmax(0, 1fr); }
@media (max-height: 820px) { .cr-mrule { -webkit-line-clamp: 2; font-size: .78rem; } }

.cr-notok.tap { cursor: pointer; background: rgb(255 155 47 / .12); padding: 0; }

.cr-tasks.few { --tkw: clamp(54px, min(18vw, 11dvh), 88px); gap: 10px 10px; }
