/* ===== salle d'attente : options ===== */
.room { display: block; max-width: 900px; margin: 0 auto; }
.optgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px 20px; margin-top: 12px; }
.opt { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13px; color: var(--muted); }
.opt b { color: var(--text); font-weight: 600; }
.player-list .p select, .botbar select { width: auto; padding: 4px 8px; font-size: 13px; }
.botbar { background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.page.wide { max-width: none; padding: 14px 18px; }

/* ===== chat ===== */
.chat { position: fixed; right: 16px; bottom: 0; width: 340px; max-width: calc(100vw - 24px); z-index: 18; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.4); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer; font-weight: 600; user-select: none; background: var(--panel2); border-radius: 12px 12px 0 0; }
.chat-unread { background: var(--red); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 8px; }
.chat-caret { display: inline-flex; color: var(--muted); }
.chat-caret .ic { transform: rotate(-90deg); transition: transform .15s; }
.chat.open .chat-caret .ic { transform: rotate(90deg); }
.chat-body { display: none; position: relative; }
.chat.open .chat-body { display: flex; flex-direction: column; }
.chat-log { height: 270px; overflow-y: auto; overscroll-behavior: contain; padding: 10px; font-size: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.cm { align-self: flex-start; max-width: 88%; padding: 6px 10px; border-radius: 4px 14px 14px 14px; background: #232b37; line-height: 1.35; overflow-wrap: anywhere; }
.cm.mine { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: rgba(245,185,66,.2); }
.cm.sys { align-self: center; max-width: 100%; padding: 2px 6px; background: none; color: var(--muted); font-style: italic; font-size: 12px; text-align: center; }
.cm.priv { background: rgba(168,85,247,.22); }
.cm.ment { box-shadow: inset 3px 0 0 var(--accent); }
.cmh { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; }
.cmh .ct { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 11px; }
.ctag { font-size: 11px; color: #c9a5ff; }
.mention { color: #7cc4ff; font-weight: 600; }
.mention.me { background: rgba(245,185,66,.3); color: #ffe08a; border-radius: 4px; padding: 0 3px; }
#chatForm { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
#chatForm input { flex: 1; min-width: 0; }
#chatForm button { display: grid; place-items: center; padding: 0 14px; }
.chat-suggest { position: absolute; bottom: 52px; left: 8px; right: 8px; background: var(--panel2); border: 1px solid var(--accent); border-radius: 8px; z-index: 3; overflow: hidden; }
.sug { padding: 7px 12px; cursor: pointer; }
.sug:hover { background: var(--line); }
@media (max-width: 1150px) {
  .chat { right: 10px; bottom: 10px; width: auto; max-width: none; border: 1px solid var(--line); border-radius: 99px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
  .chat-head { padding: 9px 16px; border-radius: 99px; }
  .chat:not(.open) .chat-caret { display: none; }
  .chat.open { left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; height: min(58vh, 440px); border-radius: 14px; }
  .chat.open .chat-head { border-radius: 14px 14px 0 0; padding: 10px 14px; }
  .chat.open .chat-body { flex: 1; min-height: 0; }
  .chat.open .chat-log { flex: 1; height: auto; min-height: 0; }
  #chatForm input { font-size: 16px; }
}

/* ===== Risk (plein écran) ===== */
:root { --rkb: 252px; }
.pdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); vertical-align: middle; flex: none; }
.rk.full { display: flex; flex-direction: column; height: 100vh; background: #10131a; }
.rk-loading { margin: auto; color: var(--muted); }
.rk-top { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: #151a23; border-bottom: 1px solid #2a3140; min-height: 46px; flex: none; overflow-x: auto; white-space: nowrap; }
.rk-top b { font-size: 14px; }
.rk-top select { width: auto; padding: 3px 6px; font-size: 12px; }
.rk .banner { margin: 0; border-radius: 0; padding: 6px 12px; font-size: 13px; }
.rk-mapbox { position: relative; flex: 1; min-height: 260px; overflow: hidden; background: #d9c48f; }
.rk-slot { position: absolute; inset: 0; }
.rk-svgwrap { position: absolute; inset: 0; background: #d9c48f; touch-action: none; cursor: grab; }
.rk-svgwrap.grab { cursor: grabbing; }
.rk-svg { width: 100%; height: 100%; display: block; user-select: none; }
.rk-svg .seas text { font-family: Georgia, 'Times New Roman', serif; font-style: italic; letter-spacing: .34em; fill: rgba(96,76,40,.5); text-anchor: middle; pointer-events: none; }
.rk-svg .lk line { stroke: #5b4a2a; stroke-width: 2.2; stroke-dasharray: 8 8; opacity: .55; }
.rk-svg path.terr { stroke: #fffbe8; stroke-width: 0.8; stroke-linejoin: round; cursor: pointer; transition: fill .25s; }
.rk-svg path.terr:hover { filter: brightness(1.13); }
.rk-svg path.terr.mine { stroke: #fff6c8; stroke-width: 1.2; }
.rk-svg path.terr.sel { stroke: #fff; stroke-width: 1.2; filter: drop-shadow(0 0 3px #fff); }
.rk-svg path.terr.tgt { stroke: #ffe14d; stroke-width: 1.2; stroke-dasharray: 9 5; animation: rkdash .8s linear infinite; }
.rk-svg path.terr.conq { filter: drop-shadow(0 0 4px #fff); }
@keyframes rkdash { to { stroke-dashoffset: -14; } }
.rk-svg .tname { font-weight: 700; text-anchor: middle; fill: #fff; stroke: rgba(15,15,15,.85); stroke-width: 3.2px; paint-order: stroke; pointer-events: none; display: none; }
.rk-svg.names .tname { display: block; }
.rk-svg .badge { cursor: pointer; }
.rk-svg .badge .disc { stroke: #fff; stroke-width: 3.2; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.rk-svg .badge text { fill: #fff; font-weight: 800; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 2.6px; pointer-events: none; transform-box: fill-box; transform-origin: center; }
.rk-svg .badge .ring { display: none; fill: none; stroke: #ffd54a; stroke-width: 3; stroke-dasharray: 6 5; transform-box: fill-box; transform-origin: center; animation: rkspin 9s linear infinite; pointer-events: none; }
.rk-svg .badge.act .ring { display: block; }
@keyframes rkspin { to { transform: rotate(360deg); } }
.rk-svg .badge.pop .disc, .rk-svg .badge.pop text { animation: rkpop .5s; }
@keyframes rkpop { 0% { transform: scale(1); } 35% { transform: scale(1.6); } 100% { transform: scale(1); } }
.rk-tools { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; z-index: 2; }
.rk-tools button { background: #fff; color: #222; border: 1px solid #b9b19a; width: 34px; height: 34px; padding: 0; font-size: 18px; border-radius: 8px; }
.rk-tools button.on { background: var(--accent); border-color: var(--accent); }
.rk-hint { background: rgba(255,255,255,.78); color: #3a3a3a; font-size: 12px; padding: 7px 11px; border-radius: 8px; }
.rk-bottom { flex: none; height: var(--rkb); display: grid; grid-template-columns: 1.25fr 1fr 1fr 1.25fr 350px; gap: 8px; padding: 8px; background: #12161e; border-top: 1px solid #2a3140; }
.rk-chatspace { min-width: 0; }
.rkb { background: #171c26; border: 1px solid #2a3140; border-radius: 10px; padding: 10px 12px; overflow: auto; min-height: 0; }
.rkb.rk-action { display: flex; flex-direction: column; }
.rkb.rk-action.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.rkh { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #b7c0d0; margin-bottom: 8px; font-weight: 700; }
.rkh span { text-transform: none; letter-spacing: 0; font-weight: 400; color: #8b98a9; }
.rk-title { font-size: 19px; font-weight: 700; color: #ffd36a; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.rk-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.rk-tab { flex: 1; text-align: center; padding: 4px 0; border-radius: 6px; background: #0d1017; color: #9aa6b8; font-size: 12px; }
.rk-tab.on { background: #2a3346; color: #fff; font-weight: 700; box-shadow: 0 0 0 1px var(--accent) inset; }
.rk-abody { font-size: 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rk-abody .muted { font-size: 12.5px; }
.rk-abody input[type=range] { width: 150px; padding: 0; }
.rk-abody button.on { background: var(--accent); color: #241a00; border-color: var(--accent); }
.rk-big { font-size: 15px; }
.rk-big b { font-size: 28px; color: #ffd36a; margin: 0 8px; }
.rk-next { margin-top: auto; }
.rk-win { font-size: 17px; color: #9be3b6; }
.warn { color: #ffb3b3; font-weight: 700; }
.rkp { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 8px; font-size: 14px; border: 1px solid transparent; }
.rkp.turn { border-color: var(--accent); background: rgba(245,185,66,.1); }
.rkp.dead { opacity: .4; text-decoration: line-through; }
.rkp.me b { color: var(--accent); }
.rkp .bot { font-size: 12px; opacity: .75; }
.rkstats { margin-left: auto; color: #9aa6b8; font-size: 12.5px; white-space: nowrap; }
.rkcards { display: flex; flex-wrap: wrap; gap: 6px; }
.rkcard { width: 84px; padding: 6px; border-radius: 8px; background: #f4ecd4; color: #241a00; text-align: center; cursor: pointer; border: 3px solid transparent; font-size: 11px; line-height: 1.2; user-select: none; }
.rkcard .ci { display: block; font-size: 22px; }
.rkcard.sel { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.rkbat { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.rkdie { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; font-weight: 800; font-size: 13px; }
.rkdie.att { background: #e5484d; color: #fff; }
.rkdie.def { background: #f4f4f4; color: #111; }
.rklog { padding: 3px 0; font-size: 12.5px; border-bottom: 1px solid rgba(255,255,255,.05); }

/* chat ancré dans la barre du bas (Risk, grand écran) */
.chat.dock { right: 8px; bottom: 8px; width: 342px; height: calc(var(--rkb) - 16px); border-radius: 10px; border: 1px solid #2a3140; display: flex; flex-direction: column; box-shadow: none; background: #171c26; z-index: 12; }
.chat.dock .chat-head { cursor: default; border-radius: 10px 10px 0 0; background: #171c26; padding: 7px 12px; }
.chat.dock .chat-caret { display: none; }
.chat.dock .chat-body { flex: 1; min-height: 0; }
.chat.dock .chat-log { flex: 1; height: auto; min-height: 0; }
.chat-chips { display: flex; gap: 5px; padding: 6px 8px 0; overflow-x: auto; scrollbar-width: none; }
.chat-chips:empty { display: none; }
.chat-chips span { flex: none; white-space: nowrap; background: #0d1017; border: 1px solid #2f3a49; border-radius: 8px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.chat-chips span:hover { border-color: var(--accent); }
@media (max-width: 1150px) {
  .rk.full { height: auto; }
  .rk-mapbox { flex: none; height: 62vh; }
  .rk-bottom { height: auto; grid-template-columns: 1fr 1fr; padding-bottom: 60px; }
  .rk-chatspace { display: none; }
}

.top .brand { text-decoration: none; color: inherit; }
.rk-god { padding: 12px 16px; }

/* pions et noms à taille réglée */
.rk-svg .badge .bi { transform: scale(var(--bs, 1)); }
.rk-svg .badge .disc { stroke-width: 2.4; }
.rk-svg .tname { font-size: var(--nf, 12px); stroke-width: calc(var(--nf, 12px) * 0.3); transform: translateY(var(--noff, 16px)); }
.rk-svg .badge .ring { stroke-width: 2.2; }

/* fenêtre d'occupation et résultat des dés (comme sur le site de référence) */
.rk-veil { position: absolute; inset: 0; background: rgba(8,10,14,.62); display: grid; place-items: center; z-index: 6; }
.rk-dialog { background: #131822; border: 1px solid #38425a; border-radius: 12px; padding: 22px 26px; width: min(480px, 92%); box-shadow: 0 20px 60px rgba(0,0,0,.6); color: #eef2f8; }
.rk-dialog h3 { font-size: 17px; margin-bottom: 8px; }
.rk-dialog p { color: #c8d0de; font-size: 14px; margin: 0 0 14px; }
.rk-dialog input[type=range] { width: 100%; padding: 0; margin: 6px 0 10px; accent-color: #3b82f6; }
.rk-occval { text-align: center; font-size: 20px; color: #ffd36a; margin-bottom: 14px; }
.rk-occval b { font-size: 28px; }
.rk-dbtn { display: flex; justify-content: flex-end; gap: 10px; }
.rk-battle { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; background: #efe0b4; color: #3a2d12; border: 2px solid #6b5628; border-radius: 12px; padding: 8px 14px 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); text-align: center; pointer-events: none; animation: rkfade .25s ease-out; }
@keyframes rkfade { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.rk-btitle { font-family: Georgia, serif; letter-spacing: .08em; font-weight: 700; font-size: 13px; margin: -20px auto 6px; background: #efe0b4; border: 2px solid #6b5628; border-radius: 8px; padding: 2px 12px; display: table; }
.rk-bbody { display: flex; align-items: center; gap: 14px; }
.rk-bside .who { font-size: 12px; font-weight: 700; display: block; margin-bottom: 3px; }
.rk-bside { text-align: center; }
.ctr { font-family: Georgia, serif; font-style: italic; color: #7a6a44; }
.rkdie2 { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; font-size: 32px; line-height: 1; margin: 0 3px; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.rkdie2.att { background: #d8352f; color: #fff; }
.rkdie2.def { background: #f3f0e6; color: #222; }
.loss { display: flex; flex-direction: column; font-weight: 800; color: #b3261e; font-size: 15px; gap: 2px; }

/* attaque / placement : plus de contour jaune sur les pays, un filtre rouge sur les cibles, le reste atténué */
.rk-svg path.terr.dim { filter: brightness(.6) saturate(.55); }
.rk-svg path.terr.sel { stroke: #fff; stroke-width: 1.2; stroke-dasharray: none; animation: none; filter: drop-shadow(0 0 3px #fff); }
.rk-svg path.terr.tgtA { stroke: #ff3535; stroke-width: 1.7; stroke-dasharray: none; animation: none; filter: drop-shadow(0 0 3px rgba(255,40,40,.9)); }
.rk-svg path.terr.tgtF { stroke: #4be07a; stroke-width: 1.2; stroke-dasharray: none; animation: none; filter: drop-shadow(0 0 3px rgba(60,230,110,.8)); }
.rk-svg path.terr.tgtC { stroke: #fff; stroke-width: 1.2; stroke-dasharray: none; animation: none; filter: drop-shadow(0 0 3px rgba(255,255,255,.85)); }
.rk-svg path.terr.mine { stroke: #fffbe8; stroke-width: 0.8; }
.rk-svg .badge.dimb .disc { opacity: .55; }
.rk-svg .badge.rt .ring { display: block; stroke: #ff5555; }


/* sélecteur de dés + Attaquer / Attaque totale */
.rk-atk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.segwrap { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segwrap .seg { border: 0; border-radius: 0; background: #0d1017; min-width: 34px; padding: 7px 12px; font-weight: 700; }
.segwrap .seg + .seg { border-left: 1px solid var(--line); }
.segwrap .seg.on { background: var(--accent); color: #241a00; }

/* dés animés */
.rkpop { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 40; background: #efe0b4; color: #3a2d12; border: 2px solid #6b5628; border-radius: 14px; padding: 16px 20px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); pointer-events: none; text-align: center; min-width: 330px; }
.rkpop.hidden { display: none; }
.rkpop .pt { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: Georgia, serif; letter-spacing: .08em; font-weight: 700; font-size: 13px; background: #efe0b4; border: 2px solid #6b5628; border-radius: 8px; padding: 2px 12px; }
.rkpop .pb { display: flex; align-items: center; gap: 16px; justify-content: center; }
.rkpop .ps { text-align: center; }
.rkpop .who { font-size: 12px; font-weight: 700; display: block; margin-bottom: 6px; }
.rkpop .dice { display: flex; gap: 8px; justify-content: center; min-height: 48px; }
.rkpop .ctr { font-family: Georgia, serif; font-style: italic; color: #7a6a44; }
.rkpop .loss { display: flex; flex-direction: column; font-weight: 800; color: #b3261e; font-size: 16px; min-width: 26px; }
.die3 { width: 44px; height: 44px; border-radius: 9px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 6px; gap: 2px; box-shadow: 0 3px 6px rgba(0,0,0,.4), inset 0 -3px 0 rgba(0,0,0,.18); transition: opacity .25s, box-shadow .25s; }
.die3 i { border-radius: 50%; }
.die3 i.on { background: currentColor; }
.die3.att { background: #d8352f; color: #fff; }
.die3.def { background: #f6f3ea; color: #1d1d1d; }
.die3.win { box-shadow: 0 0 0 3px #2fb344, 0 0 14px rgba(47,179,68,.8); }
.die3.lose { opacity: .42; }

/* fluidité : pas de transition, pas de filtre sur les pions, pas d'animation permanente */
.rk-svg path.terr { transition: none; }
.rk-svg path.terr.dim { filter: none; }
.rk-svg .badge .disc { filter: none; }
.rk-svg .badge .ring { animation: none; }
.rk-svg.far .nm { display: none; }
.rk-svgwrap.grab .nm { display: none; }
.rk-svgwrap.grab path.terr { filter: none !important; shape-rendering: optimizeSpeed; }
.rk-svg .badge text { paint-order: normal; }
.rk-svg .badge text { stroke: none; }
.rkcard { width: 98px; }
.rkcard .ct { display: block; font-size: 12px; margin: 1px 0 2px; }

.rkcard .cshape { display: block; width: 100%; height: 48px; margin: 0 auto 2px; }
.rkcard svg.cshape path { fill: #6b5628; stroke: #3a2d12; stroke-width: .6; vector-effect: non-scaling-stroke; }
.rkcard .wildmark { font-size: 34px; line-height: 48px; color: #b8860b; }
.rkcard .ci { display: inline-block; font-size: 16px; vertical-align: middle; }
.rkcard .ct { display: inline; font-size: 12px; margin-left: 4px; vertical-align: middle; }
.rkcard .cl { display: block; font-size: 11px; font-weight: 600; margin-top: 2px; }

/* chat intégré : suit le défilement de la page, comme les autres zones */
.chat.dock.placed { position: absolute; }

/* thème « espace » (Étoile de la Mort) */
.rk-svgwrap.theme-space, .rk-mapbox:has(.theme-space) { background: radial-gradient(ellipse at 50% 45%, #10182b 0%, #070a12 70%, #03050a 100%); }
.theme-space .lk line { stroke: #ff6a4d; stroke-width: 3; stroke-dasharray: 3 9; stroke-linecap: round; opacity: .85; pointer-events: none; }
.theme-space path.terr { stroke: #0b0f16; stroke-width: 1.6; fill-opacity: .9; }
.theme-space path.terr.mine { stroke: #cfe3ff; stroke-width: 1; }
.theme-space .decor-top { pointer-events: none; }
.theme-space .pulse { animation: dspulse 2.6s ease-in-out infinite; }
.theme-space .beam { animation: dsbeam 1.6s linear infinite; }
@keyframes dspulse { 0%, 100% { opacity: .95; } 50% { opacity: .3; } }
@keyframes dsbeam { to { stroke-dashoffset: -28; } }

/* ===== thème Star Wars (Étoile de la Mort) ===== */
.rk.theme-space { background: #04060b; font-family: 'Orbitron', 'Trebuchet MS', sans-serif; --sw: #ffd54a; --hud: #4cc9ff; }
.rk.theme-space button, .rk.theme-space select, .rk.theme-space input { font-family: inherit; }
.rk.theme-space .rk-top { background: linear-gradient(180deg, #0d1626, #080d17); border-bottom: 1px solid #1c5f86; box-shadow: 0 1px 14px rgba(76,201,255,.22); letter-spacing: .04em; }
.rk.theme-space .rk-top b { color: var(--sw); text-shadow: 0 0 8px rgba(255,213,74,.35); }
.rk.theme-space .rk-bottom { background: #05080f; border-top: 1px solid #1c5f86; }
.rk.theme-space .rkb { background: linear-gradient(180deg, #0b1424, #08101c); border: 1px solid #17486a; box-shadow: inset 0 0 22px rgba(76,201,255,.06); }
.rk.theme-space .rkb.rk-action.mine { border-color: var(--hud); box-shadow: 0 0 0 1px var(--hud) inset, 0 0 18px rgba(76,201,255,.35); }
.rk.theme-space .rkh { color: var(--hud); letter-spacing: .18em; font-size: 11px; }
.rk.theme-space .rk-title { color: var(--sw); text-shadow: 0 0 10px rgba(255,213,74,.45); font-size: 17px; letter-spacing: .05em; }
.rk.theme-space .rklog { border-color: #12324a; }
.rk.theme-space .rkcard { background: linear-gradient(160deg, #0d2238, #081525); color: #bfe9ff; border: 2px solid #1d5f86; box-shadow: 0 0 10px rgba(76,201,255,.15); }
.rk.theme-space .rkcard svg.cshape path { fill: #2aa8e0; stroke: #a8e6ff; }
.rk.theme-space .rkcard.sel { border-color: var(--sw); box-shadow: 0 0 16px rgba(255,213,74,.5); }
.rk.theme-space .rkcard .wildmark { color: var(--sw); }
.rk.theme-space .rkcard .ct { font-size: 10.5px; letter-spacing: .03em; }
.rk.theme-space .rk-dialog { background: #0a1424; color: #cfefff; border: 2px solid #1d7fb3; box-shadow: 0 0 40px rgba(76,201,255,.35); }
.rk.theme-space .rk-dialog h3 { color: var(--sw); }
.rk.theme-space .rk-hint { background: rgba(6,12,22,.85); color: #9fd6f0; }
.rk.theme-space .rk-tools button { background: #0b1626; color: #cfefff; border-color: #1d5f86; }
.rk.theme-space .rk-tools button.on { background: var(--hud); color: #04101a; border-color: var(--hud); }
.rk.theme-space .rk-win { color: var(--sw); }

/* dés : écran d'holo-projection */
.rkpop.space { background: rgba(6,14,28,.94); color: #cfefff; border: 2px solid #2aa8e0; box-shadow: 0 0 34px rgba(76,201,255,.45), 0 10px 30px rgba(0,0,0,.6); font-family: 'Orbitron', sans-serif; }
.rkpop.space .pt { background: #061222; border-color: #2aa8e0; color: var(--sw, #ffd54a); text-shadow: 0 0 8px rgba(255,213,74,.5); }
.rkpop.space .ctr { color: #6fb6d8; }
.rkpop.space .loss { color: #ff6a5a; }
.die3.att { box-shadow: 0 0 12px rgba(255,60,50,.7), inset 0 -3px 0 rgba(0,0,0,.25); }
.rkpop.space .die3.def { background: #d9f3ff; }

/* bandeaux d'événements */
.rkban { position: fixed; left: 50%; top: 24%; transform: translate(-50%, -20px) scale(.9); z-index: 55; padding: 14px 30px; border-radius: 6px; font-family: 'Orbitron', sans-serif; font-weight: 900; letter-spacing: .12em; font-size: clamp(15px, 3vw, 26px); text-align: center; color: #fff; background: rgba(4,8,16,.92); border: 2px solid #ff4d3d; box-shadow: 0 0 40px rgba(255,77,61,.7); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; white-space: nowrap; max-width: 96vw; }
.rkban.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.rkban.orange { border-color: #ff9a3d; box-shadow: 0 0 40px rgba(255,154,61,.7); }
.rkban.gold, .rkban.win { border-color: #ffd54a; box-shadow: 0 0 44px rgba(255,213,74,.75); color: #ffe27a; }
.rkban.blue { border-color: #4cc9ff; box-shadow: 0 0 40px rgba(76,201,255,.7); }

/* générique d'ouverture */
#rkcrawl { position: fixed; inset: 0; z-index: 80; background: #000; overflow: hidden; cursor: pointer; font-family: 'Orbitron', 'Trebuchet MS', sans-serif; transition: opacity .5s; }
#rkcrawl.out { opacity: 0; }
#rkcrawl .cr-intro { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(560px, 86vw); color: #4bd5ff; font-size: clamp(16px, 2.6vw, 24px); line-height: 1.5; text-align: center; opacity: 0; animation: cr-intro 5s ease-in-out 0.4s forwards; }
@keyframes cr-intro { 0% { opacity: 0; } 18% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
#rkcrawl .cr-title { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(2.2); color: #ffd54a; font-weight: 900; font-size: clamp(50px, 12vw, 130px); letter-spacing: .1em; text-align: center; line-height: .95; opacity: 0; animation: cr-title 7s ease-in 5.6s forwards; }
#rkcrawl .cr-title small { display: block; font-size: .22em; letter-spacing: .3em; margin-top: 10px; }
@keyframes cr-title { 0% { opacity: 1; transform: translate(-50%, -50%) scale(2.2); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.05); } }
#rkcrawl .cr-wrap { position: absolute; left: 0; right: 0; bottom: 0; top: 0; perspective: 380px; perspective-origin: 50% 20%; }
#rkcrawl .cr-text { position: absolute; left: 50%; bottom: -10%; width: min(640px, 80vw); margin-left: min(-320px, -40vw); color: #ffd54a; text-align: justify; font-weight: 700; font-size: clamp(20px, 3.4vw, 34px); line-height: 1.5; transform-origin: 50% 100%; transform: rotateX(28deg) translateY(120%); opacity: 0; animation: cr-crawl 22s linear 9.5s forwards; }
#rkcrawl .cr-text h4, #rkcrawl .cr-text h5 { text-align: center; margin: 0 0 .5em; font-size: 1.15em; }
#rkcrawl .cr-text p { margin: 0 0 1.1em; }
@keyframes cr-crawl { 0% { opacity: 1; transform: rotateX(28deg) translateY(120%); } 100% { opacity: 1; transform: rotateX(28deg) translateY(-330%); } }
#rkcrawl .cr-skip { position: absolute; right: 18px; bottom: 16px; background: transparent; border: 1px solid #ffd54a; color: #ffd54a; font-family: inherit; z-index: 2; }

/* légende des bonus de continent */
.rk-bonus { position: absolute; right: 10px; top: 10px; z-index: 2; background: rgba(255,251,232,.93); color: #3b3320; border: 1px solid #b9b19a; border-radius: 8px; padding: 6px 10px; font-size: 12px; pointer-events: none; }
.rk-bonus .rkh { font-weight: 700; margin-bottom: 4px; color: #6b5d3a; }
.rk.theme-space .rk-bonus .rkh { color: #7fd0ff; }
.rkbo { display: flex; align-items: center; gap: 6px; white-space: nowrap; line-height: 1.5; }
.rkbo .sw { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.4); }
.rkbo b { margin-left: auto; padding-left: 12px; }
.rkbo .pdot.none { visibility: hidden; }
.rk.theme-space .rk-bonus { background: rgba(11,22,38,.9); color: #cfefff; border-color: #1d5f86; }

/* écran de victoire */
.rk-victory { position: absolute; inset: 0; z-index: 6; background: rgba(10,12,18,.78); display: flex; align-items: center; justify-content: center; overflow: auto; padding: 36px 12px 12px; color: #fff; }
.rk-victory canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rk-vcard { position: relative; min-width: 290px; max-width: 94%; margin: auto; padding: 34px 26px 16px; text-align: center; background: rgba(16,19,26,.93); border: 1px solid var(--wc); border-radius: 14px; animation: rkvpop .6s .2s both; }
.rk-vcard.wide { padding-top: 18px; width: min(780px, 96%); }
.rk-vcrown { position: absolute; top: -24px; left: calc(50% - 24px); width: 48px; height: 48px; border-radius: 50%; background: var(--wc); display: flex; align-items: center; justify-content: center; font-size: 26px; animation: rkvdrop .8s .5s cubic-bezier(.3,1.6,.5,1) both; }
.rk-vsmall { font-size: 12px; letter-spacing: .16em; color: #b9bccb; margin-top: 6px; }
.rk-vname { font-size: 28px; font-weight: 700; color: var(--wc); filter: brightness(1.25); margin: 2px 0; animation: rkvfade .5s .6s both; }
.rk-vstats { display: flex; justify-content: center; gap: 26px; margin: 12px 0 14px; font-size: 12px; color: #b9bccb; animation: rkvfade .5s .9s both; }
.rk-vstats b { display: block; font-size: 20px; color: #fff; }
.rk-vbtn { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; animation: rkvfade .5s 1.1s both; }
.rk-vpod { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 8px 0 14px; }
.rk-vcol { width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.rk-vcrownS { height: 22px; font-size: 18px; animation: rkvdrop .8s .9s cubic-bezier(.3,1.6,.5,1) both; }
.rk-vpn { font-size: 13px; font-weight: 700; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-vps { font-size: 11px; color: #b9bccb; margin-bottom: 4px; }
.rk-vbar { width: 100%; border-radius: 6px 6px 0 0; transform-origin: bottom; animation: rkvgrow .6s both; font-size: 20px; font-weight: 700; padding-top: 4px; }
.rk-vtw { overflow-x: auto; animation: rkvfade .5s .7s both; }
.rk-vtab { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.rk-vtab th { color: #b9bccb; font-weight: 600; padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.2); }
.rk-vtab td { padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.rk-vtab td:nth-child(2), .rk-vtab th:nth-child(2) { text-align: left; }
.rk-vtab tr.win td { font-weight: 700; background: rgba(255,255,255,.07); }
.rk-victory.seen, .rk-victory.seen * { animation: none !important; }
@keyframes rkvpop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rkvdrop { 0% { transform: translateY(-90px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes rkvfade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rkvgrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* combinaisons de cartes */
.rkcombos { margin: 4px 0 8px; font-size: 12px; }
.rkcombo { padding: 2px 8px; }
.rkcombo.on { background: var(--accent); border-color: var(--accent); color: #fff; }
