* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05070d; color: #e8f0ff; overflow: hidden;
  font-family: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: 14px; }
[hidden] { display: none !important; }
.screen { position: fixed; inset: 0; }
.bgcv { position: absolute; inset: 0; width: 100%; height: 100%; }
h1 { font-size: 30px; letter-spacing: 3px; color: #4de1ff; margin: 0 0 6px; font-weight: 600; }
h2 { font-size: 14px; color: #8fa3c7; margin: 18px 0 8px; font-weight: 600; letter-spacing: 1px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.dim { color: #8fa3c7; }
.bad { color: #ff5d73; min-height: 1em; }
.good { color: #7dff6a; }
b { color: #fff; font-weight: 600; }

button, input, select { font: inherit; color: #e8f0ff; background: transparent; border: 1px solid #4de1ff88;
  padding: 7px 12px; border-radius: 2px; }
select { background: #05070d; padding: 4px 6px; }
button { cursor: pointer; }
button:hover:not(:disabled) { background: #4de1ff22; border-color: #4de1ff; }
button:disabled { opacity: 0.4; cursor: default; }
input:focus, select:focus { outline: none; border-color: #4de1ff; }
input[type=number] { width: 64px; margin-left: 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.lobbyWrap { position: relative; display: flex; gap: 22px; justify-content: center; align-items: flex-start; max-width: 1240px; margin: 3vh auto 0; padding: 0 16px; }
.lobbyBox { position: relative; flex: 1 1 760px; max-width: 820px; min-width: 0; padding: 0 4px 30px; max-height: 94vh; overflow-y: auto; }
.lobbyHead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.setBtn { flex: none; }
.sub { color: #8fa3c7; margin: 0 0 24px; }
#plist ul { list-style: none; padding: 0; margin: 0; }
#plist li { padding: 4px 0; display: flex; gap: 8px; align-items: center; }
#specBtn { margin: 8px 0 4px; font-size: 13px; }
.sw { display: inline-block; width: 10px; height: 10px; }
.help ul { padding-left: 18px; color: #c8d2e6; line-height: 1.6; margin: 0; }
.osec { border: 1px solid #4de1ff33; padding: 8px 12px 10px; margin-bottom: 10px; }
.osec h3 { color: #4de1ff; font-size: 13px; letter-spacing: 1px; margin: 0 0 8px; }
.ogrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-size: 13px; }
.ogrid label, .ogrid .kv { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { font-size: 11px; padding: 1px 5px; margin-left: 6px; border: 1px solid #8fa3c766; color: #8fa3c7; white-space: nowrap; }
.tag.leader { border-color: #ffd34d; color: #ffd34d; }
.tag.chaos { border-color: #ff5d7388; color: #ff9aa8; }

.box { background: #05070de6; border: 1px solid #4de1ff44; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
#board { position: absolute; top: 10px; left: 10px; padding: 8px 10px; min-width: 200px; font-size: 13px; }
#board .pl { display: flex; gap: 8px; align-items: center; padding: 1px 0; }
#board .pl.dead { opacity: 0.35; text-decoration: line-through; }
#board .pl .nm { flex: 1; }
#board .map { color: #8fa3c7; font-size: 12px; margin-top: 4px; }
#board .map.omen { max-width: 240px; line-height: 1.35; }
#msgs { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); width: min(560px, 56vw);
  display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
#msgs div { background: #05070dd9; border: 1px solid #8fa3c755; padding: 5px 10px; font-size: 13px; text-align: center; }
#msgs .warn { border-color: #ffd34d; color: #ffd34d; }
#msgs .bad { border-color: #ff5d73; color: #ff5d73; }
#msgs .good { border-color: #7dff6a; color: #7dff6a; }
#eventBanner { position: absolute; top: 140px; left: 50%; transform: translateX(-50%); padding: 10px 18px;
  background: #1a1033; border: 3px solid #f4b41b; color: #f4b41b; font-size: 16px; letter-spacing: 2px;
  box-shadow: 6px 6px 0 #e9445a; pointer-events: none; }
#singBanner { position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
#singBanner div { background: #12081f; border: 2px solid #c38bff; color: #e8d6ff; padding: 6px 14px; letter-spacing: 1px; box-shadow: 4px 4px 0 #4de1ff55; }
#singBanner .bar { height: 4px; background: #c38bff33; margin-top: 4px; }
#singBanner .bar i { display: block; height: 100%; background: #c38bff; }
#modeHint { position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); padding: 6px 14px;
  border: 1px dashed #ffd34d; color: #ffd34d; background: #05070de6; pointer-events: none; }
#panel { position: absolute; top: 10px; right: 10px; width: 320px; padding: 12px; max-height: calc(100vh - 80px); overflow-y: auto; }
#panel .tr { margin: 2px 0; font-size: 13px; }
#panel .tr small { display: block; color: #8fa3c7; }
#panel .acts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
#panel .acts button { text-align: left; font-size: 13px; }
#panel .kv, .kv { display: flex; justify-content: space-between; font-size: 13px; padding: 1px 0; gap: 8px; }
#panel .over { color: #ff5d73; }
#panel p { font-size: 13px; }

#research { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 14px;
  width: min(980px, 96vw); max-height: 90vh; overflow-y: auto; }
#research .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#research .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
#research .bh { font-weight: 600; margin: 10px 0 6px; display: flex; justify-content: space-between; }
#research .lvl { font-size: 11px; color: #8fa3c7; margin: 8px 0 3px; }
#research .opts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#research .op { border: 1px solid #8fa3c744; padding: 6px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
#research .op b { font-size: 12px; }
#research .op small { color: #8fa3c7; }
#research .op.active { border-color: #7dff6a; background: #7dff6a12; }
#research .op.owned { border-style: dashed; border-color: #7dff6a77; }
#research .op.cur { border-color: #ffd34d; }
#research .op.locked { opacity: 0.45; }
#research .op button { font-size: 11px; padding: 4px 6px; margin-top: auto; }
#research .sing { margin-top: 16px; border: 2px solid #c38bff; padding: 12px; background: #12081f;
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
#research .sing h3 { color: #e8d6ff; letter-spacing: 3px; margin: 0; }
#research .sing small { color: #b9a6d8; }
#research .trade { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
#research .trade button { font-size: 12px; padding: 4px 8px; }
.bar { height: 4px; background: #8fa3c733; margin-top: 4px; }
.bar i { display: block; height: 100%; background: #ffd34d; }
#hud { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 0;
  white-space: nowrap; font-size: 13px; }
#hud .res { padding: 7px 11px; border-right: 1px solid #4de1ff33; }
#hud .res:last-child { border-right: none; }
#hud .click { cursor: pointer; color: #4de1ff; }
#hud .click:hover { background: #4de1ff22; }
#hud .over, #hud .over b { color: #ff5d73; }
#hSpec { display: none; color: #ffd34d; }
#game.spec #hSpec { display: inline-block; }
#game.spec #hud .res:not(#hSpec):not(#hTime):not(#hSound) { display: none; }

#endScores { width: 100%; margin: 14px 0; border-collapse: collapse; }
#endScores td { padding: 4px 6px; border-bottom: 1px solid #8fa3c733; text-align: left; }
#endScores td.n { text-align: right; }

/* Mode équipes */
.team { font-size: 11px; color: #8fa3c7; border: 1px solid #8fa3c755; padding: 0 5px; margin-left: 6px; }
#board .tm { display: flex; gap: 8px; margin-top: 6px; padding-top: 4px; border-top: 1px solid #8fa3c733; color: #8fa3c7; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
#board .tm:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
#board .tm .nm { flex: 1; }
#board .tm.mine { color: #4de1ff; }

/* Choix de couleur */
#colorBox { align-items: center; gap: 10px; margin: 6px 0 10px; }
#colors { display: flex; gap: 6px; flex-wrap: wrap; }
.swb { width: 22px; height: 22px; padding: 0; border: 2px solid transparent; cursor: pointer; }
.swb.on { border-color: #ffffff; outline: 2px solid #05070d; outline-offset: -4px; }
.swb:disabled { opacity: 0.2; cursor: not-allowed; }

/* Tchat */
#chat { position: absolute; left: 10px; bottom: 54px; width: min(380px, 44vw); display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
#chatLog { display: flex; flex-direction: column; gap: 2px; font-size: 13px; max-height: 180px; overflow: hidden; }
#chatLog.open { pointer-events: auto; overflow-y: auto; max-height: 260px; background: #05070dd9; border: 1px solid #4de1ff33; padding: 6px; }
#chatLog div { background: #05070db3; padding: 2px 6px; overflow-wrap: anywhere; transition: opacity 1s; }
#chatLog.open div { background: none; padding: 1px 0; }
#chatLog div.fade { opacity: 0.35; }
#chatLog .cteam { color: #7dff6a; }
#chatBar { display: flex; gap: 0; pointer-events: auto; }
#chatBar input { flex: 1; min-width: 0; }
#chatScope { white-space: nowrap; font-size: 12px; }
#chatScope.team { color: #7dff6a; border-color: #7dff6a; }
#chatHint { font-size: 11px; }
#game.spec #chatHint { display: block; }

/* Rediffusions */
#replayList table { width: 100%; border-collapse: collapse; font-size: 13px; }
#replayList td { padding: 4px 8px 4px 0; border-bottom: 1px solid #8fa3c722; vertical-align: top; }
#replayList a { color: #4de1ff; }
#replayBar { position: fixed; bottom: 54px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 6px 10px; z-index: 6; }
#replayBar input[type=range] { width: min(360px, 30vw); }
#replayBar a { color: #4de1ff; }
#rpTime { font-variant-numeric: tabular-nums; min-width: 110px; }

/* Omniscient */
#omniNote { color: #c38bff; font-size: 13px; border: 1px solid #c38bff77; padding: 8px 10px; }
#godPanel { position: absolute; right: 10px; bottom: 54px; width: 340px; padding: 10px 12px; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 12px; border-color: #c38bff77; }
#godPanel h3 { margin: 0 0 6px; color: #c38bff; letter-spacing: 2px; }
#godPanel p { margin: 4px 0; }
#godPanel .warn { color: #ffd34d; }
#godPanel .gh { margin: 10px 0 4px; color: #8fa3c7; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
#godPanel .gbtns { display: flex; flex-wrap: wrap; gap: 4px; }
#godPanel .gbtns button { font-size: 11px; padding: 3px 6px; }
#godPanel .gtab { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#godPanel .gtab td, #godPanel .gtab th { padding: 2px 3px; text-align: right; font-weight: normal; }
#godPanel .gtab td:first-child { text-align: left; white-space: nowrap; }
#godPanel .gtab th { color: #8fa3c7; }
#godPanel .gtab tr.dead { opacity: .4; }
#game.omni #panel { max-height: 40vh; }

/* Dieu phénix */
#phoenixBox { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); padding: 22px 26px; border: 2px solid #ff9a3c; background: #0b0710f2; z-index: 20; display: flex; flex-direction: column; gap: 10px; }
#phoenixBox h2 { margin: 0; color: #ffd34d; letter-spacing: 3px; }
#phoenixBox p { margin: 0; line-height: 1.5; }
#phoenixBox .secret { color: #ff9a3c; }
#phoenixBox ul { margin: 0; padding-left: 1.2em; color: #c8d2e6; font-size: 13px; line-height: 1.5; }
#phoenixBox button { align-self: flex-start; color: #ffd34d; border-color: #ffd34d; }

/* Accueil : le lore */
.lore { border-left: 2px solid #c38bff; padding: 2px 0 2px 14px; margin: 0 0 18px; color: #c8d2e6; line-height: 1.6; }
.lore h2 { margin: 0 0 6px; color: #c38bff; letter-spacing: 2px; }
.lore p { margin: 0 0 8px; }

/* Options de la partie en onglets */
.osum { color: #c8d2e6; margin: 0 0 10px; line-height: 1.6; }
.osum b { color: #4de1ff; font-weight: normal; }
#presets { margin-bottom: 10px; }
#presets button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font-size: 13px; }
#presets button small { color: #8fa3c7; font-size: 11px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid #4de1ff55; }
.tabs button { border: 1px solid transparent; border-bottom: none; margin-bottom: -1px; padding: 8px 18px; color: #8fa3c7; }
.tabs button.on { border-color: #4de1ff55; background: #05070d; color: #4de1ff; }
.tabs button .cnt { font-size: 11px; color: #ffd34d; margin-left: 6px; }
#opts { border: 1px solid #4de1ff55; border-top: none; padding: 12px; }
.orows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
.orow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding-left: 8px; border-left: 2px solid transparent; }
.orow.chg { border-left-color: #ffd34d; }
.orow .ol { display: contents; }
.orow .ol span { grid-column: 1; grid-row: 1; }
.orow .ol small { grid-column: 1 / -1; grid-row: 2; color: #8fa3c7; font-size: 12px; line-height: 1.35; }
.orow select { grid-column: 2; grid-row: 1; max-width: 230px; }
.orow input[type=checkbox] { grid-column: 2; grid-row: 1; }
select:disabled, input:disabled { opacity: 0.75; cursor: default; }
.ogh { color: #8fa3c7; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin: 16px 0 6px; }
.ochecks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; font-size: 13px; }
.ochecks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.ochecks label.chg { color: #ffd34d; }
input[type=checkbox] { accent-color: #4de1ff; width: 16px; height: 16px; margin: 0; flex: none; }
@media (max-width: 640px) { .orows { grid-template-columns: 1fr; } .ochecks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Info-bulle (carte, ressources, panneau de l'omniscient) */
#tip { position: fixed; z-index: 30; max-width: 320px; padding: 8px 10px; background: #0a0f1ef2; border: 1px solid #4de1ff88; font-size: 12px; line-height: 1.45; color: #e8f0ff; pointer-events: none; white-space: pre-line; }
#tip b { display: block; color: #4de1ff; margin-bottom: 2px; }
#tip .tn { color: #8fa3c7; display: block; margin-top: 4px; }

/* Barre de ressources */
#resbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; font-size: 14px; }
#resbar .rb { display: flex; align-items: center; gap: 7px; padding: 6px 14px; border-right: 1px solid #4de1ff33; cursor: default; }
#resbar .rb:last-child { border-right: none; }
#resbar svg { width: 16px; height: 16px; flex: none; }
#resbar b { font-variant-numeric: tabular-nums; min-width: 34px; }
#resbar small { color: #7dff6a; font-size: 11px; font-variant-numeric: tabular-nums; }
#resbar small.zero { color: #8fa3c7; }
#game.spec #resbar { display: none; }
#hud .ready { color: #ffd34d; animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { 50% { background: #ffd34d22; } }

/* Recherche : un seul choix par niveau */
#research .opts2 { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
#research .or { align-self: center; width: 26px; height: 26px; display: grid; place-items: center; font-size: 10px; color: #ffd34d; border: 1px solid #ffd34d88; transform: rotate(45deg); margin: 0 2px; }
#research .or span { transform: rotate(-45deg); }
#research .op.alt { opacity: 0.5; }
#research .op .excl { color: #8fa3c7; font-size: 11px; }
#research .opts2.pick:hover .op:not(:hover) { opacity: 0.4; }

/* Fin de partie : abandon et vote */
#quitBox { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, 92vw); padding: 18px 20px; z-index: 20; display: flex; flex-direction: column; gap: 14px; }
#quitBox h2 { margin: 0; color: #4de1ff; }
#quitBox .qopt { display: flex; flex-direction: column; gap: 6px; }
#quitBox .qopt p { margin: 0; font-size: 13px; line-height: 1.45; }
#quitBox .qopt button { align-self: flex-start; }
#quitBox #qCancel { align-self: flex-end; }
button.danger { color: #ff5d73; border-color: #ff5d7388; }
button.danger:hover:not(:disabled) { background: #ff5d7322; border-color: #ff5d73; }
#voteBox { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); width: min(440px, 60vw); text-align: center; padding: 10px 12px; border-color: #ffd34d; font-size: 13px; z-index: 8; }
#voteBox p { margin: 0 0 8px; line-height: 1.4; }
#voteBox .row { justify-content: center; }
#voteBox .row button { padding: 5px 14px; }
#game.voting #msgs { top: 210px; }

/* Fin de partie : panneau repliable, la carte reste visible derrière */
#endPanel { position: absolute; top: 10px; left: 10px; width: min(460px, calc(100vw - 20px)); max-height: calc(100vh - 20px); overflow-y: auto; padding: 16px 18px; z-index: 12; display: flex; flex-direction: column; gap: 8px; }
#endPanel .endHead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#endPanel h1 { margin: 0; font-size: 22px; letter-spacing: 1px; }
#endPanel p { margin: 0; }
#endPanel .small { font-size: 12px; }
#endChart { width: 100%; height: 150px; display: block; margin: 4px 0; }
#endScores { width: 100%; border-collapse: collapse; font-size: 13px; }
#endScores th { color: #8fa3c7; font-weight: normal; font-size: 11px; text-align: right; padding: 4px 6px; border-bottom: 1px solid #4de1ff33; }
#endScores th:nth-child(2) { text-align: left; }
#endScores td { padding: 5px 6px; border-bottom: 1px solid #4de1ff1a; }
#endScores td.n { text-align: right; font-variant-numeric: tabular-nums; }
#endScores tr.out td { color: #8fa3c7; }
#endScores .el { display: block; font-size: 11px; color: #ff5d73; }
#endTab { position: absolute; top: 10px; left: 10px; z-index: 12; color: #4de1ff; padding: 8px 14px; }
#cineSkip { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #8fa3c7; font-size: 12px; z-index: 12; pointer-events: none; }
#game.ended #board, #game.ended #hud, #game.ended #resbar, #game.ended #voteBox, #game.ended #msgs { display: none; }
#game.cine #endPanel, #game.cine #endTab, #game.cine #panel { display: none; }

/* Titres de fin */
#endScores .ttl { display: block; font-size: 12px; color: #ffd34d; margin-top: 2px; cursor: help; }
#endScores .ttl i { font-style: normal; color: #8fa3c7; }
#endScores .ttl.rL { color: #ff9a3c; text-shadow: 0 0 8px #ff9a3c66; }
#endScores .ttl.rR { color: #c38bff; }

/* Salon : panneau « Comment jouer » à droite */
#tuto { flex: 0 0 360px; max-height: 94vh; overflow-y: auto; background: #0a0f1ecc; border: 1px solid #4de1ff44; padding: 14px 16px; font-size: 13px; line-height: 1.5; }
#tuto h2 { margin: 0 0 8px; color: #4de1ff; letter-spacing: 2px; }
#tuto details { border-top: 1px solid #4de1ff22; padding: 8px 0; }
#tuto summary { cursor: pointer; color: #ffd34d; font-size: 14px; letter-spacing: 1px; list-style: none; }
#tuto summary::before { content: '▸ '; color: #8fa3c7; }
#tuto details[open] summary::before { content: '▾ '; }
#tuto dl { margin: 8px 0 0; }
#tuto dt { display: flex; align-items: center; gap: 8px; color: #e8f0ff; margin-top: 10px; font-weight: bold; }
#tuto dt svg { width: 22px; height: 22px; flex: none; }
#tuto dd { margin: 2px 0 0 30px; color: #c8d2e6; }
#tuto .k-fer { color: #c8d2e6; } #tuto .k-glace { color: #7fd4ff; } #tuto .k-cri { color: #c38bff; }
#tuto .wins { padding-left: 20px; margin: 8px 0; color: #c8d2e6; }
#tuto .wins li { margin-bottom: 6px; }
#tuto .wins b { color: #ffd34d; }
#tuto .keys { padding-left: 16px; margin: 8px 0 0; color: #c8d2e6; }
#tuto .keys li { margin-bottom: 6px; }
kbd { display: inline-block; padding: 0 5px; border: 1px solid #8fa3c788; border-bottom-width: 2px; font: inherit; font-size: 12px; color: #e8f0ff; background: #05070d; }
@media (max-width: 1100px) { .lobbyWrap { flex-direction: column; align-items: stretch; } .lobbyBox, #tuto { flex: none; max-height: none; max-width: none; } }

/* Réglages */
#settings { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, 94vw); padding: 18px 20px; z-index: 60; background: #0a0f1e; box-shadow: 0 0 0 100vmax #05070daa; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
#settings h2 { margin: 0; color: #4de1ff; }
#settings .srow { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; }
#settings .srow > span { color: #c8d2e6; }
#settings .srow output { text-align: right; color: #8fa3c7; font-variant-numeric: tabular-nums; }
#settings .srow .seg { grid-column: 2 / 4; display: flex; }
#settings .seg button { flex: 1; padding: 6px 4px; font-size: 13px; }
#settings .seg button.on { background: #4de1ff; color: #05070d; }
#settings .srow.chk { grid-template-columns: 20px 1fr; align-items: start; cursor: pointer; }
#settings .srow.chk small { display: block; color: #8fa3c7; font-size: 12px; margin-top: 2px; }
#settings input[type=range] { accent-color: #4de1ff; width: 100%; }
#settings .sprev { display: flex; gap: 6px; }
#settings .sprev span { flex: 1; height: 14px; }
#settings #setClose { align-self: flex-end; }
#settings p { margin: 0; font-size: 12px; }

/* Taille de l'interface : tout ce qui n'est pas la carte */
#board, #panel, #hud, #resbar, #research, #godPanel, #chat, #msgs, #endPanel, #endTab, #quitBox, #voteBox, #tip, #eventBanner, #replayBar { zoom: var(--ui, 1); }

/* Logo du salon : l'étoile tombe sur le titre */
h1.logo { margin: 8px 0 10px; line-height: 0; max-width: 100%; }
h1.logo svg { width: min(400px, 78vw); height: auto; overflow: visible; }
h1.logo text { font-family: ui-monospace, 'Cascadia Mono', 'DejaVu Sans Mono', Menlo, Consolas, monospace; font-weight: bold; }
h1.logo .halo { animation: logoGlow 2.4s ease-in-out infinite; transform-origin: 216px 65px; }
h1.logo .streak { stroke-dasharray: 170; stroke-dashoffset: 170; animation: logoFall 1.1s 0.2s ease-out forwards; }
@keyframes logoGlow { 50% { opacity: .45; transform: scale(1.25); } }
@keyframes logoFall { to { stroke-dashoffset: 0; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Salon en équipes : une colonne par équipe */
.teamCols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 6px; }
.teamCol { border: 1px solid var(--tc); border-top-width: 3px; padding: 6px 10px 8px; background: #0a0f1e; }
.teamCol .th { color: var(--tc); font-size: 13px; letter-spacing: 1px; margin-bottom: 4px; display: flex; justify-content: space-between; }
.teamCol li { font-size: 14px; }
.joinTeam { margin-top: 6px; font-size: 12px; padding: 3px 10px; border-color: var(--tc); color: var(--tc); }
.botMove { display: inline-flex; gap: 4px; margin-left: auto; }
.botMove button { width: 14px; height: 14px; padding: 0; border: 2px solid currentColor; background: transparent; cursor: pointer; }
.botMove button:hover { background: currentColor; }
select.bprof { font-size: 12px; padding: 1px 4px; margin-left: 4px; }
span.bprof { font-size: 11px; color: #c38bff; border: 1px solid #c38bff55; padding: 0 5px; }
.sw.bot { background: transparent; border: 1px dashed #8fa3c7; box-sizing: border-box; }
.fileBtn { display: inline-block; padding: 5px 12px; border: 1px solid #4de1ff; color: #4de1ff; cursor: pointer; font-size: 13px; }
.fileBtn:hover { background: #4de1ff22; }
span.blvl { font-size: 11px; border: 1px solid; padding: 0 5px; }
.blvl.lv-facile { color: #7dff6a; } .blvl.lv-normal { color: #8fa3c7; } .blvl.lv-difficile { color: #ff9a3c; } .blvl.lv-expert { color: #ff5d73; }
select.blvl { margin-left: 4px; }

/* Choix du salon */
.roomCards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.roomCard { border: 1px solid #4de1ff44; background: #0a0f1e; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.roomCard.here { border-color: #ffd34d; }
.roomCard .rn { color: #4de1ff; font-size: 15px; }
.roomCard .rp { font-size: 13px; color: #c8d2e6; }
.roomCard button { margin-top: 4px; font-size: 13px; padding: 3px 12px; }
.roomHead { margin: 4px 0 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.roomHead b { color: #ffd34d; font-weight: normal; letter-spacing: 1px; }
button.small { font-size: 12px; padding: 2px 10px; }
