:root {
  --pixel: 'Silkscreen', ui-monospace, monospace;
}
* { box-sizing: border-box; }
/* L'attribut hidden doit toujours masquer, même si une classe impose un display (modale, carte MOTD...) */
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---------- barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(15, 20, 18, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--pixel); font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-cube {
  width: 22px; height: 22px; border-radius: 3px;
  background: linear-gradient(180deg, var(--green) 0 35%, #7a5a3a 35% 100%);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25);
}
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500; }
nav a:hover { color: var(--text); background: var(--card); text-decoration: none; }
nav a.active { color: var(--text); background: var(--card-2); }
.status-pill { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); background: var(--card); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(95,191,74,.2); }
.dot.off { background: var(--red); }

/* ---------- mise en page */
.container { max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 64px; }
.section-title { font-family: var(--pixel); font-size: 18px; font-weight: 400; margin: 40px 0 16px; display: flex; align-items: baseline; gap: 12px; }
.section-title .more { font-family: Inter, sans-serif; font-size: 14px; margin-left: auto; }
.page-title { font-family: var(--pixel); font-weight: 400; font-size: clamp(22px, 4vw, 30px); margin: 0 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 28px; }

/* ---------- accueil */
.hero {
  background:
    linear-gradient(180deg, rgba(15,20,18,.2), var(--bg)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 32px, transparent 32px 64px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 32px, transparent 32px 64px),
    radial-gradient(ellipse at top, #24402a, var(--bg) 70%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 8vw, 88px) clamp(16px, 4vw, 40px) 48px; }
.eyebrow { font-family: var(--pixel); color: var(--green); margin: 0 0 8px; font-size: 13px; }
.hero h1 { font-family: var(--pixel); font-weight: 700; font-size: clamp(30px, 6vw, 54px); line-height: 1.1; margin: 0 0 12px; text-shadow: 3px 3px 0 rgba(0,0,0,.45); }
.lead { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 32px; }
.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 1023px; }
.join-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.join-card h3 { margin: 0 0 4px; font-size: 16px; }
.join-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.join-card small { display: block; margin-top: 8px; color: var(--muted); }
.copy { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; }
.copy:hover { border-color: var(--green-2); }
.copy code { font-size: 14px; overflow-wrap: anywhere; text-align: left; }
.copy span { font-size: 12px; color: var(--green); flex-shrink: 0; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.online-list { display: flex; flex-wrap: wrap; gap: 10px; }
.online-chip { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px 4px 4px; }
.online-chip img { width: 28px; height: 28px; border-radius: 50%; image-rendering: pixelated; }
.empty { color: var(--muted); background: var(--bg-2); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; width: 100%; }

/* MOTD façon liste des serveurs Minecraft */
.motd-card { display: flex; gap: 12px; align-items: center; max-width: 620px; margin: -12px 0 28px; padding: 10px 14px 10px 10px;
  background: rgba(0,0,0,.55); border: 2px solid #3a3a3a; border-radius: 4px; }
.motd-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 3px; image-rendering: pixelated;
  background: linear-gradient(180deg, var(--green) 0 35%, #7a5a3a 35% 100%); box-shadow: inset 0 0 0 3px rgba(0,0,0,.25); }
.motd-body { min-width: 0; flex: 1; }
.motd-top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--pixel); font-size: 14px; color: #fff; }
.motd-players { color: #aaa; }
.motd { font-family: var(--pixel); font-size: 13px; line-height: 1.5; color: #aaa; overflow-wrap: anywhere; margin-top: 2px; }

/* ---------- classements */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.board { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board h3 { margin: 0; padding: 14px 16px; font-size: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); background: var(--card-2); }
.board ol { list-style: none; margin: 0; padding: 6px 0; }
.board li { display: grid; grid-template-columns: 28px 30px 1fr auto; align-items: center; gap: 10px; padding: 7px 16px; }
.board li + li { border-top: 1px solid rgba(255,255,255,.03); }
.rank { font-family: var(--pixel); color: var(--muted); text-align: center; }
.rank-1 { color: var(--gold); } .rank-2 { color: var(--silver); } .rank-3 { color: var(--bronze); }
.board img { width: 30px; height: 30px; border-radius: 5px; image-rendering: pixelated; background: var(--bg); }
.pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-bedrock { font-size: 10px; font-weight: 600; color: var(--bedrock); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 6px; vertical-align: middle; }
.pval { font-variant-numeric: tabular-nums; font-weight: 600; }
.pval.pos { color: var(--green); }
.pval.neg { color: var(--red); }
.pval small { color: var(--muted); font-weight: 400; margin-left: 2px; }
.board .empty { border: 0; border-radius: 0; background: none; padding: 16px; }
.lb-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.lb-tabs button { background: var(--card); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font: inherit; cursor: pointer; }
.lb-tabs button.active, .lb-tabs button:hover { color: var(--text); border-color: var(--green-2); }
.footnote { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---------- carte */
.map-wrap { position: relative; height: calc(100vh - 62px); height: calc(100dvh - 62px); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }

/* ---------- wiki */
.wiki { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.wiki-side { position: sticky; top: 80px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; max-height: calc(100vh - 100px); overflow: auto; }
.wiki-side input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; margin-bottom: 8px; }
.wiki-side h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 8px 6px; }
.wiki-side a { display: flex; justify-content: space-between; gap: 8px; color: var(--text); padding: 6px 8px; border-radius: 6px; font-size: 14px; }
.wiki-side a small { color: var(--muted); }
.wiki-side a:hover { background: var(--card-2); text-decoration: none; }
.wiki-side a.active { background: var(--card-2); color: var(--green); }
.wiki-content { min-width: 0; }
.wiki-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.badge { background: var(--card-2); border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.prose h1 { font-family: var(--pixel); font-weight: 400; font-size: 24px; margin-top: 0; }
.prose h2 { font-size: 19px; margin-top: 28px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.prose code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 13px; }
.prose pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.prose pre code { border: 0; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.prose th { background: var(--card-2); }
.prose blockquote { margin: 0; border-left: 3px solid var(--green); padding: 4px 14px; color: var(--muted); background: var(--bg-2); border-radius: 0 6px 6px 0; }
.cmd-table-wrap { overflow-x: auto; }
.wiki-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.wiki-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.wiki-card:hover { border-color: var(--green-2); text-decoration: none; }
.wiki-card strong { display: flex; justify-content: space-between; gap: 8px; }
.wiki-card p { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .wiki { grid-template-columns: 1fr; }
  .wiki-side { position: static; max-height: none; }
  .status-pill { margin-left: 0; }
  .map-wrap { height: calc(100dvh - 110px); }
}

/* Icônes Minecraft (textures 16x16 agrandies sans flou) */
.mci { width: 20px; height: 20px; image-rendering: pixelated; vertical-align: -4px; margin-right: 6px; }
.board h3 .mci { width: 22px; height: 22px; margin-right: 2px; }
.lb-tabs .mci { width: 16px; height: 16px; vertical-align: -3px; }
.prose .mci { width: 20px; height: 20px; }

/* ---------- compte, fenêtre de connexion */
.account-btn { display: inline-flex; align-items: center; gap: 6px; background: none; color: var(--muted); border: 1px solid transparent;
  border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.account-btn:hover { color: var(--text); border-color: var(--line); }
.account-btn .mci { width: 16px; height: 16px; margin: 0; vertical-align: 0; }
.account-btn.logged { color: var(--text); border-color: var(--line); background: var(--card); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; }
.modal-box h2 { margin: 0; font-family: var(--pixel); font-weight: 400; }
.modal-box label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.modal-box input, .chat-form input, .wl-form input, .cas-bet input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }
.login-steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.login-steps code, .muted code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.form-error { color: var(--red); margin: 0; font-size: 14px; }
.form-ok { color: var(--green); margin: 0; font-size: 14px; }

/* ---------- chat */
.chat-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; height: min(65vh, 640px); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.chat-line { display: flex; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.chat-line time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.chat-line .who { font-weight: 600; color: var(--gold); flex-shrink: 0; }
.chat-line.web .who::before { content: '[Web] '; color: var(--bedrock); font-weight: 400; }
.chat-line.event { color: var(--muted); font-style: italic; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; }
.chat-more { align-self: center; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font: inherit; font-size: 13px; cursor: pointer; margin-bottom: 6px; }
.chat-more:hover { border-color: var(--green-2); }
.chat-note { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- whitelist */
.wl-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.wl-form input { flex: 1; min-width: 200px; }
.wl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 20px; }
.wl-item { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.wl-item img { width: 24px; height: 24px; image-rendering: pixelated; border-radius: 4px; }

.wl-bedrock { display: inline-flex; align-items: center; gap: 6px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; cursor: pointer; user-select: none; }
.wl-bedrock input { width: 16px; height: 16px; accent-color: var(--green); margin: 0; }
.wl-bedrock .mci { margin: 0; }

/* ---------- casino */
.cas-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cas-back { font-size: 14px; }
.cas-balance { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-family: var(--pixel); color: var(--gold); margin-bottom: 14px; }
.cas-balance .mci { width: 20px; height: 20px; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.cas-feed { display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px; }
.feed-item { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.feed-item .mci { width: 18px; height: 18px; image-rendering: pixelated; }
.feed-item span { flex: 1; min-width: 0; }
.feed-item time { color: var(--muted); font-size: 12px; }
.section-title .mci { width: 22px; height: 22px; vertical-align: -4px; image-rendering: pixelated; }
.cas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cas-tile { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); }
.cas-tile:hover { border-color: var(--green-2); text-decoration: none; }
.cas-tile.big { background: linear-gradient(135deg, #22301f, var(--card)); }
.cas-tile .muted { font-size: 13px; }
.tile-foot { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tile-foot .live { color: var(--green); }
.seats-dots { display: inline-flex; gap: 3px; }
.seats-dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--line); }
.seats-dots i.on { background: var(--green); }
.cas-bet { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cas-bet label { display: flex; align-items: center; gap: 8px; color: #cfe3d6; }
.cas-bet input, .ctl-row input, .ctl-inline input { width: 120px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
.cas-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cas-chips button { background: rgba(0,0,0,.3); color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: 600 13px/1 var(--pixel); cursor: pointer; }
.cas-chips button:hover { border-color: var(--gold); }
.cas-table, .felt { background: radial-gradient(ellipse at center, #1f4d33 0%, #143524 75%); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(14px, 4vw, 28px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.felt { border-radius: 120px / 60px; box-shadow: inset 0 0 0 6px #4a3522, inset 0 0 40px rgba(0,0,0,.5); min-height: 200px; justify-content: center; text-align: center; }
.cas-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cas-actions .btn-ghost, .felt .btn-ghost { color: var(--text); background: rgba(0,0,0,.25); }
.cas-msg { min-height: 1.5em; text-align: center; font-weight: 600; margin: 12px 0; }
.cas-msg.good { color: var(--gold); }
.cas-msg.bad { color: var(--red); }
.cas-note { color: var(--muted); font-size: 14px; }
.cas-pay { border-collapse: collapse; min-width: min(100%, 360px); background: var(--card); border-radius: var(--radius); overflow: hidden; }
.cas-pay th, .cas-pay td { padding: 6px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.cas-pay th { color: var(--muted); font-weight: 500; font-size: 13px; }
.cas-pay tr.hit td { color: var(--gold); font-weight: 700; }
.cas-pay .mci { width: 24px; height: 24px; image-rendering: pixelated; vertical-align: middle; }
/* machines à sous */
.room { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.jackpot { text-align: center; background: linear-gradient(180deg, #3b2a12, #20170a); border: 2px solid var(--gold); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; font-family: var(--pixel); color: var(--gold); }
.jackpot b { display: block; font-size: clamp(24px, 6vw, 36px); text-shadow: 0 0 12px rgba(242,193,78,.5); }
.jackpot small { font: 12px Inter, sans-serif; color: #e5d3a7; }
.jackpot .mci { width: 16px; height: 16px; vertical-align: -3px; image-rendering: pixelated; }
.room-live, .tchat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.room-live h3, .tchat h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
#room-log { display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow-y: auto; }
.spin-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 6px; animation: pop .4s; }
.spin-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spin-row.won { background: rgba(242,193,78,.12); color: var(--gold); }
.mini-reels .mci { width: 18px; height: 18px; image-rendering: pixelated; }
.slots { display: flex; gap: clamp(8px, 3vw, 18px); }
.reel { width: clamp(72px, 20vw, 110px); aspect-ratio: 1; display: grid; place-items: center; background: #0c110f; border: 3px solid #5a4630; border-radius: 8px; box-shadow: inset 0 0 18px rgba(0,0,0,.7); }
.reel .mci { width: 64%; height: 64%; image-rendering: pixelated; }
.reel.spinning .mci { filter: blur(1px); opacity: .8; }
/* cartes */
.hand { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pk-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 452px; justify-items: center; }
.pk-board .card { width: 100%; min-width: 0; }
.card { width: clamp(46px, 12vw, 66px); aspect-ratio: 5 / 7; background: #fbfaf5; color: #1a1a1a; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.4); display: flex; flex-direction: column; justify-content: space-between; padding: 4px 6px; font-family: var(--pixel); user-select: none; }
.card span { font-size: clamp(13px, 3.4vw, 17px); line-height: 1; text-align: left; }
.card b { align-self: flex-end; font-size: clamp(18px, 5vw, 28px); line-height: 1; font-weight: 400; }
.card.red { color: #c62828; }
.card.back { background: repeating-linear-gradient(45deg, #3f8f2f 0 6px, #2f6f23 6px 12px); border: 3px solid #fbfaf5; }
.card.slot { background: rgba(0,0,0,.18); box-shadow: none; border: 1px dashed rgba(255,255,255,.2); }
.card.held { outline: 3px solid var(--gold); transform: translateY(-6px); }
.card.sm { width: 38px; padding: 3px 4px; }
.card.sm span { font-size: 12px; }
.card.sm b { font-size: 17px; }
.pk-card { background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pk-card small { font: 11px/1 var(--pixel); color: var(--gold); min-height: 11px; }
/* tables */
.tbl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.tchat summary { cursor: pointer; font-size: 14px; color: var(--muted); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tchat summary::-webkit-details-marker { display: none; }
.tchat:not([open]) summary { margin: 0; }
.tchat summary::after { content: '▾'; margin-left: auto; transition: transform .2s; }
.tchat[open] summary::after { transform: rotate(180deg); }
.tchat .unread { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.tchat-log { overflow-wrap: anywhere; overflow-anchor: none; flex: 1; overflow-y: auto; min-height: 160px; max-height: 480px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.tchat-log time { color: var(--muted); font-size: 11px; margin-right: 6px; }
.tchat-log b { color: var(--gold); margin-right: 4px; }
.tchat form { display: flex; gap: 6px; margin-top: 8px; }
.tchat input { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.tchat .btn { padding: 8px 12px; }
.felt-status { color: #e7f3ea; min-height: 1.4em; }
.pot { font-family: var(--pixel); color: #fff; }
.pot b { color: var(--gold); }
.my-hand { font-size: 14px; color: #cfe3d6; }
.bj-label { color: #cfe3d6; font-size: 14px; }
.bj-label b { font-family: var(--pixel); color: #fff; margin-left: 4px; }
.seats { display: grid; gap: 10px; margin-top: 14px; }
.poker-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bj-seats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 124px; min-width: 0; }
.seat.empty { align-items: center; justify-content: center; border-style: dashed; background: var(--bg-2); }
.seat.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242,193,78,.35); }
.seat.mine { background: #1f2c25; }
.seat.folded:not(.mine) .seat-cards { opacity: .55; }
.seat.winner { border-color: var(--green); box-shadow: 0 0 0 2px rgba(95,191,74,.35); }
.seat-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.seat-top img { border-radius: 4px; width: 22px; height: 22px; flex: none; }
.seat-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.seat-cards { display: flex; gap: 4px; min-height: 30px; flex-wrap: wrap; }
.seat-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.seat-res { font-size: 13px; color: var(--green); font-weight: 600; }
.chip-bet { background: rgba(242,193,78,.15); color: var(--gold); border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.badge-d { font-style: normal; background: #fff; color: #111; border-radius: 50%; width: 18px; height: 18px; display: inline-grid; place-items: center; font: 700 11px/1 var(--pixel); }
.tag { font-style: normal; font-size: 11px; background: var(--card-2); color: var(--muted); border-radius: 4px; padding: 1px 6px; }
.tag.gold { color: var(--gold); }
.cd { font: 12px/1 var(--pixel); color: var(--gold); background: rgba(0,0,0,.35); border-radius: 4px; padding: 3px 5px; }
.cd.urgent { color: var(--red); }
.tbl-controls { margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.ctl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ctl-row label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.ctl-row.small .btn-ghost { padding: 7px 12px; font-size: 14px; }
.ctl-inline { display: flex; gap: 6px; }
.ctl-inline input { width: 100px; padding: 7px; }
.btn-ghost.danger { color: var(--red); border-color: rgba(229,83,75,.5); }
.btn-ghost.voted { color: var(--gold); border-color: var(--gold); }
/* undercover */
.uc-secret { font-size: 18px; background: rgba(0,0,0,.3); border-radius: 8px; padding: 8px 16px; }
.uc-secret b { font-family: var(--pixel); color: var(--gold); font-size: 22px; }
.uc-secret.white b { color: #fff; }
.uc-lobby { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.uc-player { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.uc-lobby .uc-player { flex-direction: row; align-items: center; }
.uc-player.ready { border-color: var(--green-2); }
.uc-player.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242,193,78,.35); }
.uc-player.mine { background: #1f2c25; }
.uc-player.dead { opacity: .5; }
.uc-player > span:first-of-type, .uc-player .seat-name { font-weight: 600; }
.uc-role { font-size: 12px; color: var(--muted); }
.uc-clues { display: flex; gap: 4px; flex-wrap: wrap; }
.uc-clues span { background: var(--card-2); border-radius: 4px; padding: 2px 8px; font-size: 13px; }
@media (max-width: 860px) {
  .room { grid-template-columns: 1fr; }
  .poker-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bj-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .felt { border-radius: 40px; }
}

/* ---------- animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes deal { from { opacity: 0; transform: translate(-30px, -70px) rotate(-18deg) scale(.6); } }
@keyframes flip { 0% { transform: rotateY(90deg) scale(1.05); } 60% { transform: rotateY(-8deg) scale(1.05); } 100% { transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: none; } }
@keyframes pulseTxt { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: #fff; } 100% { transform: scale(1); } }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(8px) scale(.8); } 30% { opacity: 1; transform: translateY(-4px) scale(1.1); } 100% { transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px) rotate(-1deg); } 40%, 80% { transform: translateX(6px) rotate(1deg); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 2px rgba(95,191,74,.35); } 50% { box-shadow: 0 0 0 4px rgba(95,191,74,.6), 0 0 24px rgba(95,191,74,.35); } }
@keyframes turnGlow { 0%, 100% { box-shadow: 0 0 0 2px rgba(242,193,78,.3); } 50% { box-shadow: 0 0 0 3px rgba(242,193,78,.7), 0 0 18px rgba(242,193,78,.3); } }
@keyframes flashUp { 0% { background: rgba(95,191,74,.45); } 100% { background: var(--card); } }
@keyframes flashDown { 0% { background: rgba(229,83,75,.35); } 100% { background: var(--card); } }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes jackpotHit { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,193,78,.0); } 50% { box-shadow: 0 0 0 6px rgba(242,193,78,.5), 0 0 40px rgba(242,193,78,.6); } }
@keyframes reelWin { 0%, 100% { border-color: #5a4630; } 50% { border-color: var(--gold); box-shadow: inset 0 0 18px rgba(0,0,0,.7), 0 0 18px rgba(242,193,78,.7); } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

#view > section, #view > .map-wrap { animation: fadeUp .35s ease-out; }
.anim-deal { animation: deal .5s cubic-bezier(.2,.8,.25,1) backwards; }
.anim-flip { animation: flip .55s ease-out backwards; }
.anim-pop { animation: pop .35s ease-out backwards; }
.anim-pulse { display: inline-block; animation: pulseTxt .5s ease-out; }
.anim-float { animation: floatUp .6s ease-out backwards; }
.anim-slide { animation: slideIn .4s ease-out backwards; }
.anim-shake { animation: shake .5s ease-in-out; }
.seat.winner, .uc-player.winner { animation: glow 1.4s ease-in-out infinite; }
.seat.active, .uc-player.active { animation: turnGlow 1.4s ease-in-out infinite; }
.cas-balance.up { animation: flashUp 1.2s ease-out; }
.cas-balance.down { animation: flashDown 1.2s ease-out; }
#jackpot.bump { animation: bump .4s ease-out; }
.jackpot.hit { animation: jackpotHit .6s ease-in-out 5; }
.reel { overflow: hidden; position: relative; }
.reel .strip { position: absolute; inset: 0 0 auto 0; }
.reel .strip > div { height: var(--h); display: grid; place-items: center; }
.reel .strip .mci { width: 64%; height: auto; aspect-ratio: 1; margin: 0; filter: blur(.6px); }
.reel.win { animation: reelWin .5s ease-in-out 4; }
.tile-foot .live { animation: livePulse 1.6s ease-in-out infinite; }
.cas-tile, .wiki-card, .join-card, .board { transition: transform .15s, border-color .15s; }
.cas-tile:hover, .wiki-card:hover { transform: translateY(-2px); }
.btn, .btn-ghost, .cas-chips button { transition: transform .08s, filter .15s; }
.btn:active, .btn-ghost:active, .cas-chips button:active, .tabbar a:active { transform: scale(.95); }
.card { transform-origin: center; backface-visibility: hidden; }
.particle { position: fixed; width: 22px; height: 22px; image-rendering: pixelated; pointer-events: none; z-index: 100; }
.tbar, .pbar { display: block; position: relative; height: 6px; background: #1a211f; border-radius: 3px; overflow: hidden; margin-top: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.tbar b, .pbar b { position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: #4fc4a0; box-shadow: 0 0 6px rgba(79,196,160,.6); transition: width .25s linear, background .3s; }
.tbar b.urgent, .pbar b.urgent { background: var(--red); box-shadow: 0 0 6px rgba(229,83,75,.6); }
.pbar { margin: 0 0 10px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- mini-jeux : cartes des jeux */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.game-card { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, #1f2b24, var(--card)); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s; }
.game-card:hover { text-decoration: none; border-color: var(--green-2); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.game-icon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: rgba(0,0,0,.3); border-radius: 12px; }
.game-icon .mci { width: 40px; height: 40px; margin: 0; }
.game-card:hover .game-icon .mci { animation: bump .5s ease-out; }
.game-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.game-body strong { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-body .muted { font-size: 13px; }
.game-tag { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 4px; padding: 2px 6px; background: var(--card-2); color: var(--muted); }
.game-tag.multi { background: rgba(95,191,74,.15); color: var(--green); }
.hist-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.hchip { font: 600 12px/1 Inter, sans-serif; border-radius: 999px; padding: 4px 8px; background: var(--card-2); }
.hchip.bad { color: var(--red); } .hchip.good { color: var(--green); } .hchip.gold { color: var(--gold); }
.rnum { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; font: 700 11px/1 Inter, sans-serif; color: #fff; padding: 0 4px; }
.rnum.red { background: #c62828; } .rnum.black { background: #1b1b1b; border: 1px solid #444; } .rnum.green { background: #2e7d32; }

/* ---------- crash */
.crash { display: flex; flex-direction: column; gap: 10px; }
.crash-screen { position: relative; height: clamp(230px, 42vh, 380px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 20% 100%, #243a2c 0%, #101714 70%); }
.crash-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crash-screen.shake { animation: shake .45s ease-in-out; }
.crash-rocket { position: absolute; left: 0; top: 0; width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(242,193,78,.8)); pointer-events: none; }
.crash-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.crash-mult { font-family: var(--pixel); font-size: clamp(38px, 11vw, 72px); color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.5); font-variant-numeric: tabular-nums; }
.crash-mult.betting { font-size: clamp(20px, 6vw, 30px); color: var(--muted); }
.crash-mult.good { color: var(--green); } .crash-mult.gold { color: var(--gold); } .crash-mult.low { color: #e8a0a0; }
.crash-mult.crashed { color: var(--red); animation: pulseTxt .5s ease-out; }
.crash-sub { font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.crash-mult.crashed + .crash-sub { color: var(--red); }
.crash-players, .roul-players { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 14px; }
.cp-head, .cp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(90px, auto); gap: 10px; padding: 4px 2px; align-items: center; }
.cp-head { color: var(--muted); font-size: 12px; }
.cp-row + .cp-row { border-top: 1px solid rgba(255,255,255,.04); }
.cp-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row > span:last-child { text-align: right; }
.cp-row.me .who { color: var(--gold); font-weight: 700; }
.cp-row.won > span:last-child { color: var(--green); font-weight: 600; }
.cp-row.lost > span:last-child { color: var(--red); }
.cash-btn { flex: 1; min-height: 58px; font-size: 20px; background: linear-gradient(180deg, #f2c14e, #d39a1c); color: #2a1d00; box-shadow: 0 4px 0 #8a6412; animation: turnGlow 1s ease-in-out infinite; }
.cash-btn span { font-family: var(--pixel); margin-left: 6px; }
.ctl-info { flex: 1; color: var(--text); }
.ctl-info.good { color: var(--green); font-weight: 700; }
.ctl-info.bad { color: var(--red); font-weight: 700; }
.small-note { font-size: 12px; margin: 0; }

/* ---------- roulette */
.roul { display: flex; flex-direction: column; gap: 14px; }
.roul-top { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 16px; align-items: center; }
.wheel-wrap { position: relative; width: 100%; aspect-ratio: 1; }
.wheel-wrap canvas, .ball-track { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.wheel-wrap canvas { box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.ball-track .ball { position: absolute; left: 50%; top: 6.5%; width: 5%; height: 5%; margin-left: -2.5%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #bbb); box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.wheel-pointer { position: absolute; left: 50%; top: -4px; margin-left: -9px; border: 9px solid transparent; border-top: 14px solid var(--gold); filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.wheel-result { position: absolute; left: 50%; top: 50%; width: 34%; height: 34%; transform: translate(-50%, -50%) scale(0); border-radius: 50%; display: grid; place-items: center; font: 700 clamp(24px, 7vw, 40px)/1 var(--pixel); color: #fff; transition: transform .35s cubic-bezier(.2,1.6,.4,1); }
.wheel-result.show { transform: translate(-50%, -50%) scale(1); }
.wheel-result.red { background: #c62828; } .wheel-result.black { background: #1b1b1b; } .wheel-result.green { background: #2e7d32; }
.roul-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.roul-status { font-size: 16px; min-height: 1.5em; }
.roul-board { display: flex; flex-direction: column; gap: 4px; max-width: 460px; width: 100%; margin: 0 auto; }
.rb-zero, .rb-nums, .rb-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.rb-zero .rb { grid-column: 1 / -1; }
.rb { position: relative; min-height: 44px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: #fff; font: 700 15px/1 Inter, sans-serif; cursor: pointer; background: #1b1b1b; transition: transform .08s, filter .15s; }
.rb.red { background: #b72424; } .rb.black { background: #1b1b1b; } .rb.green { background: #2e7d32; }
.rb.out { background: #1c4a31; font-size: 13px; }
.rb.out.red { background: #b72424; } .rb.out.black { background: #1b1b1b; }
.rb:hover { filter: brightness(1.2); }
.rb:active { transform: scale(.94); }
.rb.win { animation: reelWin .5s ease-in-out 6; border-color: var(--gold); }
.rchip { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); min-width: 26px; height: 26px; padding: 0 4px; border-radius: 50%; display: grid; place-items: center;
  font: 700 10px/1 Inter, sans-serif; background: #d8d8d8; color: #222; border: 3px dashed #888; }
.rchip.mine { background: var(--gold); border-color: #8a6412; }
.rchips { justify-content: center; }
.rtoken { width: 46px; height: 46px; border-radius: 50%; font: 700 12px/1 Inter, sans-serif; color: #fff; cursor: pointer; border: 4px dashed rgba(255,255,255,.55); transition: transform .12s, box-shadow .12s; }
.rtoken.v10 { background: #3f7fbf; } .rtoken.v50 { background: #3f8f2f; } .rtoken.v100 { background: #1b1b1b; } .rtoken.v500 { background: #7b3fbf; } .rtoken.v1000 { background: #c9a44c; color: #2a1d00; }
.rtoken.sel { transform: translateY(-4px) scale(1.12); box-shadow: 0 0 0 3px var(--gold), 0 6px 12px rgba(0,0,0,.4); }
@media (max-width: 1023px) {
  .game-grid { grid-template-columns: 1fr; gap: 10px; }
  .game-card { padding: 12px; gap: 12px; }
  .game-icon { width: 48px; height: 48px; }
  .game-icon .mci { width: 34px; height: 34px; }
  .roul-top { grid-template-columns: 44% 1fr; gap: 10px; align-items: start; }
  .roul-status { font-size: 14px; }
  .roul-players { font-size: 12px; padding: 6px; }
  .rb { min-height: var(--target); }
  .crash-screen { height: 36vh; }
  .rtoken { width: 44px; height: 44px; }
  .ctl-row.rchips { gap: 8px; }
}


/* ---------- accueil allégé */
.hero-status { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0 0 18px; }
.hero-status b { color: var(--text); }
.hero-copy { max-width: 420px; padding: 14px 16px; font-size: 16px; }
.hero-copy code { font-size: 17px; }
.hero-hint { display: block; color: var(--muted); margin-top: 8px; font-size: 13px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.quick { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--text); transition: transform .15s, border-color .15s; }
.quick:hover { text-decoration: none; border-color: var(--green-2); transform: translateY(-2px); }
.quick .mci { width: 36px; height: 36px; margin: 0; flex: none; }
.quick span { display: flex; flex-direction: column; gap: 2px; }
.quick small { color: var(--muted); font-size: 13px; }

/* ---------- en jeu */
.ig-online { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; font-size: 14px; }
.ig-online .online-chip { padding: 2px 10px 2px 2px; }
.ig-online .online-chip img { width: 24px; height: 24px; }

/* ---------- whitelist : rôle adulte, connexion Bedrock */
.wl-item { justify-content: flex-start; }
.wl-item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.adult-toggle { flex: none; font: 700 11px/1 Inter, sans-serif; border-radius: 6px; padding: 6px 8px; min-height: 30px; cursor: pointer; background: none; color: var(--muted); border: 1px dashed var(--line); }
.adult-toggle.on { background: rgba(95,191,74,.15); color: var(--green); border: 1px solid var(--green-2); }
.login-bedrock { flex-direction: row !important; align-items: center; gap: 8px !important; padding: 10px 12px; font-size: 14px !important; }
.login-bedrock .mci { margin: 0; }
.spin-btn { flex: 1; min-height: 52px; font-size: 17px; }
@media (max-width: 1023px) {
  .hero-inner { padding-top: 24px; }
  .hero-copy { max-width: none; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .seg.big a { font-size: 15px; }
}


/* ---------- mise en jetons (tous les jeux) */
.chipbet { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.chipbet-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.stake-val { font-family: var(--pixel); color: var(--gold); font-size: 18px; min-width: 90px; text-align: center; }
.chipbet .rchips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rtoken.v5000 { background: #b33a3a; }
.tbl-controls .chipbet { align-items: stretch; }
.tbl-controls .chipbet-top { justify-content: flex-start; }
.tbl-controls .chipbet .rchips { justify-content: flex-start; }

/* ---------- mines */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: min(100%, 380px); }
.tile { aspect-ratio: 1; border-radius: 6px; border: 0; cursor: pointer; background: url(/mc/block/stone.png) center / cover; image-rendering: pixelated; box-shadow: inset 0 -4px 0 rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.25); display: grid; place-items: center; transition: transform .08s, filter .15s; }
.tile:not(:disabled):hover { filter: brightness(1.2); transform: translateY(-2px); }
.tile:not(:disabled):active { transform: scale(.92); }
.tile:disabled { cursor: default; }
.tile .mci { width: 60%; height: 60%; margin: 0; }
.tile.gem { background: #16241e; box-shadow: inset 0 0 0 2px var(--green-2), 0 0 12px rgba(95,191,74,.25); }
.tile.boom { background: #4a1616; box-shadow: inset 0 0 0 2px var(--red), 0 0 18px rgba(229,83,75,.6); }
.tile.bomb-shown { background: #241818; opacity: .7; }
.mines-info { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; font-size: 14px; color: #cfe3d6; }
.mines-info b { font-family: var(--pixel); color: var(--gold); }
.small-seg { margin: 0; width: min(100%, 380px); }
.small-seg :is(a, button) { font-size: var(--font-sm); }

/* ---------- plinko */
.plinko-board { width: min(100%, 520px); }
.plinko-board canvas { width: 100%; display: block; }
.plinko-bins { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; width: min(100%, 520px); }
.pbin { text-align: center; font: 700 10px/1 Inter, sans-serif; padding: 6px 0; border-radius: 4px; background: #2a3a31; color: #cfe3d6; }
.pbin.cold { background: #243029; color: var(--muted); }
.pbin.warm { background: #6b5a1c; color: #fff; }
.pbin.hot { background: #8a2a2a; color: #fff; }
.pbin.hit { animation: bump .45s ease-out, reelWin .5s ease-in-out 2; outline: 2px solid var(--gold); }

/* ---------- pile ou face */
.duel { display: flex; flex-direction: column; gap: 10px; }
.coin-wrap { perspective: 800px; display: grid; place-items: center; padding: 10px; }
.coin { width: 120px; height: 120px; position: relative; transform-style: preserve-3d; }
.coin .face { position: absolute; inset: 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; backface-visibility: hidden; font: 700 12px/1 var(--pixel); }
.coin .face .mci { width: 48px; height: 48px; margin: 0; }
.coin .or { background: radial-gradient(circle at 35% 30%, #ffe08a, #c9962a); color: #3a2a00; box-shadow: inset 0 0 0 6px #a87a1c; }
.coin .fer { background: radial-gradient(circle at 35% 30%, #f2f2f2, #9aa0a6); color: #222; box-shadow: inset 0 0 0 6px #7a8086; transform: rotateY(180deg); }
.duel-result { text-align: center; min-height: 1.5em; }
.duel-list, .duel-hist { display: flex; flex-direction: column; gap: 6px; }
.duel-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.duel-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.duel-row.mine { border-color: var(--green-2); }
.duel-hist .cp-row { background: var(--card); border-radius: 8px; padding: 6px 10px; }
@media (max-width: 1023px) {
  .pbin { font-size: 8px; padding: 5px 0; }
  .stake-val { font-size: 16px; }
}


/* ---------- page perso */
.pf-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.pf-avatar { width: 72px; height: 144px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.pf-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-id .page-title { margin: 0; }
.pf-money { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-family: var(--pixel); color: var(--gold); font-size: 18px; }
.pf-logout { align-self: flex-start; }
.profile .stat .mci { width: 22px; height: 22px; }
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pf-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pf-friend { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.pf-friend img { width: 28px; height: 28px; border-radius: 5px; image-rendering: pixelated; }
.pf-friend > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.pf-friend small { font-weight: 400; color: var(--muted); font-size: 12px; }
.pf-friend small.on { color: var(--green); }
.pf-friend.req { border-color: #8a4f9e; background: #251d29; }
.pf-friend.out { opacity: .7; }
.profile .pos { color: var(--green); } .profile .neg { color: var(--red); }
.pf-pay { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-pay input { flex: 1; min-width: 140px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }
.muted.small { font-size: 13px; margin-top: -8px; }
@media (max-width: 1023px) {
  .pf-cols { grid-template-columns: 1fr; }
  .pf-avatar { width: 54px; height: 108px; }
  .pf-pay input, .pf-pay .btn { flex-basis: 100%; font-size: 16px; }
}


/* roulette compacte (onglets) */
.rtabs { width: 100%; margin: 0 0 6px; }
.rb-nums6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.rb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rb-row2 .rb, .rb-row3.tall .rb { min-height: 58px; font-size: 16px; }
.rb-hint { color: var(--muted); font-size: 12px; text-align: center; margin: 4px 0 0; }
.bj-seats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; }
@media (max-width: 1023px) {
  .rb-nums6 .rb { min-height: var(--target); font-size: 13px; }
  .rb-zero .rb { min-height: var(--target); }
  .rb-nums6, .rb-zero { gap: 3px; }
  .roul .rb-hint { display: none; }
  .rb-row2 .rb, .rb-row3.tall .rb { min-height: 50px; }
  .bj-seats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .roul-top { grid-template-columns: 34% 1fr; }
}


.pf-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; align-self: flex-start; }
.pf-actions .mci { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.pf-public { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
a.pf-friend { color: var(--text); text-decoration: none; }
a.pf-friend:hover { border-color: var(--green-2); }
.pf-friend a { color: var(--text); }
.pf-visit { margin-top: 16px; }
.pf-visit .pf-pay input { max-width: 160px; }
a.pname { color: var(--text); }
a.pname:hover { color: var(--green); text-decoration: none; }


/* ---------- hôtel des ventes */
.hdv-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hdv-bar input, .hdv-bar select, .ad-cp input, .ad-card input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }
.hdv-bar input { flex: 1; min-width: 200px; }
.hdv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.hdv-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.hdv-card.mine { border-color: var(--green-2); }
.hdv-icon { position: relative; flex: none; width: 48px; height: 48px; display: grid; place-items: center; background: rgba(0,0,0,.3); border-radius: 8px; }
.hdv-icon img { width: 36px; height: 36px; image-rendering: pixelated; }
.hdv-icon b { position: absolute; right: 2px; bottom: 0; font: 700 12px/1 var(--pixel); color: #fff; text-shadow: 1px 1px 0 #000; }
.hdv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hdv-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdv-body strong.fancy { color: #6fe3ff; }
.hdv-ench { font-size: 12px; color: #b58cff; }
.hdv-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hdv-price { font-family: var(--pixel); color: var(--gold); white-space: nowrap; }
.hdv-note { background: #1f2c25; border: 1px solid var(--green-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.muted.small { font-size: 12px; }
/* ---------- admin */
.ad-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ad-card .ctl-row input { flex: 1; min-width: 120px; }
.btn-ghost.on { color: var(--green); border-color: var(--green-2); }
.ad-cp { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ad-cp input { width: 110px; }
.ad-cp-list, .ad-log { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.ad-cp-list time { color: var(--muted); font-size: 12px; margin-right: 6px; }
.ad-cp-list .rb { opacity: .55; }
.ad-log div { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.pf-actions a.btn-ghost { text-align: center; color: var(--text); text-decoration: none; }
@media (max-width: 1023px) { .hdv-grid { grid-template-columns: 1fr; } .ad-cp input { width: calc(33% - 6px); } }


/* ---------- installation de l'application */
button.quick { font: inherit; text-align: left; cursor: pointer; }
.quick.install-app { border-color: var(--green-2); background: linear-gradient(135deg, #1f3326, var(--card)); }
.install-box h2 { display: flex; align-items: center; gap: 10px; }
.install-box h2 .mci { width: 32px; height: 32px; margin: 0; border-radius: 6px; }
.install-steps { margin: 4px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; }
.install-steps b { color: var(--text); }
.pf-actions .install-app .mci { width: 18px; height: 18px; border-radius: 3px; }

/* ---------- barre d'onglets (téléphone) */
.tabbar { display: none; }
@media (max-width: 1023px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .topbar { gap: 10px; padding: 8px 12px; flex-wrap: nowrap; }
  .topbar > nav { display: none; }
  .brand { font-size: 15px; min-width: 0; }
  .status-pill { margin-left: auto; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
  .account-btn { padding: 6px 8px; max-width: 120px; min-height: 36px; }
  .account-btn:not(.logged) { border-color: var(--line); background: var(--card); color: var(--text); }
  .account-btn { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    background: rgba(15, 20, 18, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px;
    color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 10px; text-decoration: none; transition: color .15s, background .15s; white-space: nowrap; min-width: 0; }
  .tabbar a img { width: 24px; height: 24px; image-rendering: pixelated; opacity: .75; transition: transform .2s, opacity .2s; }
  .tabbar a.active { color: var(--text); background: var(--card-2); }
  .tabbar a.active img { opacity: 1; transform: translateY(-2px) scale(1.12); }

  .container { padding: 18px 14px 28px; }
  .page-title { font-size: 21px; }
  .page-sub { margin-bottom: 18px; font-size: 14px; }
  .section-title { font-size: 15px; margin: 26px 0 12px; }
  .hero-inner { padding: 28px 14px 28px; }
  .lead { font-size: 15px; margin-bottom: 20px; }
  .motd-card { margin: 0 0 20px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; }
  .stat-value { font-size: 18px; }
  .btn, .btn-ghost { min-height: 44px; }

  /* carte : tout l'écran entre les deux barres */
  .map-wrap { height: calc(100dvh - 53px - 64px - env(safe-area-inset-bottom)); }

  /* classements : onglets en bande qui défile au doigt */
  .lb-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 16px; padding: 0 14px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .lb-tabs::-webkit-scrollbar { display: none; }
  .lb-tabs button { flex: none; min-height: 40px; scroll-snap-align: start; }
  .boards { grid-template-columns: 1fr; }
  .board li { padding: 8px 12px; }

  /* wiki : la liste OU la page */
  .wiki { gap: 12px; }
  .wiki.has-page .wiki-side { display: none; }
  .wiki:not(.has-page) .wiki-content { display: none; }
  .wiki-side a { padding: 12px 10px; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.03); }
  .wiki-side input { padding: 12px; font-size: 16px; }
  .wiki-back { display: inline-flex !important; align-items: center; min-height: 44px; margin-bottom: 8px; font-weight: 600; }
  .prose { padding: 16px; font-size: 15px; }

  /* chat : occupe la hauteur de l'écran, saisie en bas sous le pouce */
  .chat-box { height: calc(100dvh - 53px - 64px - 150px - env(safe-area-inset-bottom)); min-height: 320px; }
  .chat-form input, .wl-form input, .modal-box input { font-size: 16px; padding: 12px; }
  .wl-form input { min-width: 0; flex-basis: 100%; }
  .wl-form .btn, .wl-bedrock { min-height: 46px; }

  /* fenêtre de connexion : panneau en bas de l'écran */
  .modal { place-items: end center; padding: 0; }
  .modal-box { width: 100%; border-radius: 16px 16px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: fadeUp .25s ease-out; }
  .modal-actions .btn, .modal-actions .btn-ghost { flex: 1; }

  /* casino */
  .cas-head { align-items: center; }
  .cas-head .page-title { font-size: 18px; }
  .cas-back { display: inline-flex; min-height: 36px; align-items: center; }
  .cas-balance { margin: 0; padding: 6px 12px; font-size: 13px; }
  .cas-feed .feed-item:nth-child(n+3) { display: none; }
  .cas-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cas-tile { padding: 12px; }
  .cas-tile.big { grid-column: span 2; }
  .cas-tile strong { font-size: 15px; }
  .cas-bet { gap: 8px; }
  .cas-bet input, .ctl-row input { font-size: 16px; padding: 11px; width: 110px; }
  .cas-chips { justify-content: center; }
  .cas-chips button { min-height: 38px; padding: 8px 12px; }
  .room { gap: 12px; }
  .room-live { order: 2; }
  #room-log { max-height: 260px; }
  .cas-table { padding: 16px 10px; gap: 14px; }
  .cas-actions .btn { min-width: 60%; font-size: 17px; min-height: 52px; }
  .felt { padding: 14px 10px; min-height: 0; gap: 10px; border-radius: 28px; box-shadow: inset 0 0 0 4px #4a3522, inset 0 0 30px rgba(0,0,0,.5); }
  .card { width: 44px; padding: 3px 4px; }
  .card span { font-size: 13px; }
  .card b { font-size: 19px; }
  .card.sm { width: 30px; border-radius: 4px; padding: 2px 3px; }
  .card.sm span { font-size: 10px; }
  .card.sm b { font-size: 14px; }
  .hand, .pk-board { gap: 5px; }
  .felt-status { font-size: 14px; }
  .seats { gap: 6px; margin-top: 10px; }
  .poker-seats, .bj-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seat { min-height: 0; padding: 6px; gap: 4px; }
  .seat.empty { min-height: 70px; }
  .seats.seated .seat.empty { display: none; }
  .seat-top img { width: 18px; height: 18px; }
  .seat-name { font-size: 12px; }
  .seat-foot { font-size: 12px; gap: 4px; }
  .seat-res { font-size: 12px; }
  .seat-cards { min-height: 0; }
  .tag { font-size: 10px; }
  .seat.mine { order: 99; grid-column: 1 / -1; }
  .seat.mine .card.sm { width: 44px; padding: 3px 4px; }
  .seat.mine .card.sm span { font-size: 13px; }
  .seat.mine .card.sm b { font-size: 19px; }
  .seat.mine .seat-top, .seat.mine .seat-foot { font-size: 14px; }
  .seat.mine .seat-name { font-size: 14px; }
  /* commandes de jeu collées en bas, juste au-dessus des onglets : jouable d'une main */
  .tbl-controls:not(:empty) {
    position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 20;
    margin: 10px -14px 0; padding: 10px 14px; gap: 8px;
    background: rgba(15, 20, 18, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 20px rgba(0,0,0,.35);
  }
  .ctl-row { gap: 6px; }
  .ctl-row > .btn, .ctl-row > .btn-ghost { flex: 1; min-height: 50px; font-size: 16px; }
  .ctl-row label { flex: 1; font-size: 14px; }
  .ctl-row label input { flex: 1; min-width: 0; width: auto; }
  .ctl-row.small > .btn-ghost, .ctl-row.small .ctl-inline { flex: 1; }
  .ctl-row.small .btn-ghost { min-height: 42px; font-size: 13px; }
  .ctl-inline input { flex: 1; min-width: 0; width: auto; font-size: 16px; }
  .ctl-row .muted { flex-basis: 100%; font-size: 12px; }
  #tbl-rules { font-size: 13px; }
  .tchat { margin-top: 4px; }
  .tchat-log { max-height: 240px; min-height: 100px; }
  .tchat input { font-size: 16px; }
  .uc-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .uc-player { padding: 6px 8px; }
  .uc-player .btn-ghost { min-height: 44px; }
  .uc-secret { font-size: 15px; }
  .uc-secret b { font-size: 19px; }
  .cas-pay { width: 100%; }
}
.wiki-back { display: none; }

/* ---------- logo, appli installée (zones sûres de l'iPhone) */
.topbar { padding-top: calc(12px + env(safe-area-inset-top)); padding-left: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left)); padding-right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right)); }
html, body { min-height: 100%; }
@media (max-width: 1023px) {
  .topbar { padding-top: calc(8px + env(safe-area-inset-top)); }
}
.short { display: none; }
@media (max-width: 1023px) {
  .status-pill .long, .account-btn .long { display: none; }
  .account-btn .short { display: inline; }
  .brand { gap: 8px; }
  #brand-name { font-size: 14px; }
  .topbar { gap: 8px; }
}

/* ---- bandeau d'événement (accueil) ---- */
.event-banner{display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:12px 16px;border-radius:12px;background:linear-gradient(135deg,rgba(255,170,0,.14),rgba(255,170,0,.05));border:1px solid rgba(255,170,0,.35);color:inherit;text-decoration:none}
.event-banner .mci{width:32px;height:32px;flex:none}
.event-banner span{display:flex;flex-direction:column;gap:2px;min-width:0}
.event-banner small{opacity:.8;overflow-wrap:anywhere}
.event-banner.live{border-color:#ffaa00;box-shadow:0 0 0 1px rgba(255,170,0,.25),0 0 18px rgba(255,170,0,.18)}
.event-banner.live b::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#ff5a3c;margin-right:8px;vertical-align:middle;animation:evpulse 1.2s infinite}
@keyframes evpulse{50%{opacity:.3}}
/* ---- notifications (page perso) ---- */
.pf-push{padding:12px 0}
.push-prefs{display:flex;flex-wrap:wrap;gap:8px 16px;margin:8px 0 12px}
/* ---- récompense du jour (page perso) ---- */
.daily{margin:16px 0;padding:14px;border-radius:12px;background:var(--panel,rgba(255,255,255,.04));border:1px solid rgba(255,255,255,.08)}
.daily-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.daily-head .mci{width:28px;height:28px}
.daily-head small{flex-basis:100%;opacity:.85}
.daily-days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:8px}
.dd{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px;border-radius:8px;background:rgba(255,255,255,.05);font-weight:700;font-size:13px}
.dd small{font-weight:500;opacity:.7;font-size:11px}
.dd.done{background:rgba(85,255,85,.14);color:#7dff7d}
.dd.cur{background:rgba(255,170,0,.2);outline:2px solid #ffaa00;color:#ffcf66}

/* ---- mini-jeux : écran commun (tapis + commandes + règles) ---- */
.tbl-controls:not(:empty) { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.dock-info { font-size: 14px; color: #cfe3d6; text-align: center; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.dock-info .seg { margin: 0; }
.dock-info .good { color: var(--gold); font-weight: 600; }
.dock-info .bad { color: var(--red); font-weight: 600; }
.dock-main { justify-content: center; }
.dock-main > .btn, .dock-main > .btn-ghost { min-width: 140px; min-height: 48px; font-size: 16px; }
.tbl-controls .ctl-row.small { justify-content: center; }
.tbl-controls .chipbet { align-items: center; }
.tbl-controls .chipbet-top, .tbl-controls .chipbet .rchips { justify-content: center; }
.auto-in { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.auto-in input { width: 70px !important; }
.cas-rules { margin: 12px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.cas-rules summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.cas-rules[open] summary { margin-bottom: 8px; }
.cas-rules .cas-pay { margin-top: 6px; }
#game-extra:not(:empty) { margin-top: 12px; }
/* vidéo poker : cartes à rendre */
.card.discard { opacity: .45; transform: translateY(10px); filter: grayscale(.4); }
.pk-card.out small { color: var(--red); }
.vp-hand { gap: 10px; }
.vp-hand .pk-card { transition: transform .15s; }
@media (max-width: 1023px) {
  .tbl-controls:not(:empty) { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .dock-info { font-size: 13px; }
  .dock-main > .btn, .dock-main > .btn-ghost { min-width: 0; }
  .tbl-controls .chipbet { gap: 6px; }
  .tbl-controls .chipbet .rchips { flex-wrap: wrap; gap: 6px; }
  .vp-hand { gap: 6px; flex-wrap: nowrap; }
  .vp-hand .card { width: clamp(44px, 12vw, 58px); }
  .vp-hand .card span { font-size: 15px; }
  .vp-hand .card b { font-size: 24px; }
  .cas-rules { font-size: 13px; }
}

@media (max-width: 1023px) { .tbl-layout { grid-template-columns: minmax(0, 1fr); } }

/* Moumoute : habillage de l'application (chargé après style.css, qui garde les styles des mini-jeux).
   Une seule colonne, des cartes, des listes de lignes, de gros boutons ; tout reste à portée du pouce. */
:root {
  --z: 1; --appbar: 61px; --tabbar: 64px; --safe-b: env(safe-area-inset-bottom);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --radius-sm: 10px; --radius-control: 12px; --radius-card: 16px; --radius-sheet: 22px; --radius-pill: 999px;
  --r: var(--radius-card); --radius: var(--radius-card); --target: 44px;
  --font-xs: 12px; --font-sm: 14px; --font-body: 15px; --font-title: 22px;
}
html { overflow-x: clip; }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
a:hover { text-decoration: none; }

/* ---------- barre du haut */
.topbar { display: none; }
.appbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-3);
  padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  min-height: var(--appbar); background: rgba(15, 20, 18, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.appbar .brand { font-size: 15px; gap: var(--space-2); margin-right: auto; }
.deskbar { display: flex; flex-wrap: nowrap; gap: 2px; margin-right: auto; }
.deskbar a { display: flex; align-items: center; min-height: var(--target); color: var(--muted); padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 600; }
.deskbar a:hover { color: var(--text); background: var(--card); }
.deskbar a.active { color: var(--text); background: var(--card-2); }
.me-btn { min-width: var(--target); display: flex; align-items: center; gap: var(--space-2); height: var(--target); padding: 0 14px 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: 600 14px Inter, sans-serif; cursor: pointer; max-width: 170px; }
.me-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-btn .mci, .me-btn .av { width: 22px; height: 22px; border-radius: 5px; flex: none; image-rendering: pixelated; }
.me-btn:not(.logged) { background: var(--green-2); border-color: var(--green-2); }

/* ---------- onglets du bas (téléphone) */
.tabbar { display: none; }
@media (max-width: 1023px) {
  body { padding-bottom: calc(var(--tabbar) + var(--safe-b)); }
  .deskbar { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 4px 4px calc(4px + var(--safe-b)); background: rgba(15, 20, 18, .97); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .tabbar a { padding: 4px 0; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
    color: var(--muted); font-size: 11px; font-weight: 600; border-radius: var(--radius-control); white-space: nowrap; }
  .tabbar a img { width: 26px; height: 26px; image-rendering: pixelated; opacity: .7; transition: transform .2s, opacity .2s; }
  .tabbar a.active { color: var(--text); background: var(--card-2); }
  .tabbar a.active img { opacity: 1; transform: translateY(-2px) scale(1.1); }
}

/* ---------- pages */
.page { max-width: 680px; margin: 0 auto; padding: var(--space-4) max(16px, env(safe-area-inset-right)) var(--space-6) max(16px, env(safe-area-inset-left)); }
.page-head { margin: var(--space-1) 2px var(--space-4); }
.page-head h1, .casino .page-title, .wiki-page .prose h1 { font: 400 var(--font-title)/1.35 var(--pixel); margin: 0; overflow-wrap: anywhere; }
.page-head p { color: var(--muted); margin: 4px 0 0; font-size: var(--font-sm); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: var(--space-3); }
.list-title { font: 700 12px Inter, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 6px 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.foot { color: var(--muted); font-size: 12px; text-align: center; margin: 10px 0; }
.empty-state { text-align: center; color: var(--muted); padding: 36px 16px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); }
.pos { color: var(--green); } .neg { color: var(--red); } .gold { color: var(--gold); }
.mci { image-rendering: pixelated; }
.av { border-radius: 6px; image-rendering: pixelated; flex: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(95,191,74,.2); } .dot.off { background: var(--red); }
.tag { font-style: normal; font-size: 11px; background: var(--card-2); color: var(--muted); border-radius: 6px; padding: 1px 6px; }

/* listes de lignes */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: var(--space-3); }
.row { display: flex; align-items: center; gap: var(--space-3); min-height: 58px; padding: 9px 14px; color: var(--text); border: 0; border-bottom: 1px solid var(--line);
  background: none; width: 100%; text-align: left; font: inherit; }
.list > .row:last-child { border-bottom: 0; }
a.row, button.row, .row.tap { cursor: pointer; }
a.row:active, button.row:active, .row.tap:active { background: var(--card-2); }
@media (hover: hover) { a.row:hover, button.row:hover, .row.tap:hover { background: var(--card-2); } }
.row-lead { display: flex; align-items: center; gap: var(--space-2); flex: none; }
.row-lead:empty { display: none; }
.row-lead .mci { width: 28px; height: 28px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row-text small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-right { flex: none; display: flex; align-items: center; gap: 6px; }
.chev { color: var(--muted); font-size: 22px; line-height: 1; flex: none; }
.list-empty { padding: 22px 16px; color: var(--muted); text-align: center; font-size: var(--font-sm); }
.rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12px Inter; background: var(--card-2); color: var(--muted); }
.rank.r1 { background: var(--gold); color: #2a1d00; } .rank.r2 { background: var(--silver); color: #222; } .rank.r3 { background: var(--bronze); color: #2a1200; }

/* onglets internes, puces, recherche */
/* Liens de navigation et boutons de sélection partagent le même segment. */
.segbar, .seg, .theme-seg { display: flex; gap: var(--space-1); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: var(--space-1); margin: 0 0 var(--space-3); }
:is(.segbar, .seg, .theme-seg) > :is(a, button) { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  gap: var(--space-1); min-height: var(--target); padding: var(--space-1) var(--space-2); border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--muted); font: 600 var(--font-sm)/1.35 Inter, sans-serif; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
:is(.segbar, .seg, .theme-seg) > :is(.on, .active) { background: var(--card); color: var(--text); box-shadow: var(--shadow-1); }
.theme-seg { margin: 0; }
.theme-seg button { flex-direction: column; min-height: 64px; }
.theme-seg button span { font-size: 20px; }
.seg-count { font-style: normal; font-size: var(--font-xs); background: var(--green); color: #fff; border-radius: var(--radius-pill); padding: 1px 7px; }
.count { font-style: normal; font-size: 11px; background: var(--green-2); color: #fff; border-radius: var(--radius-pill); padding: 1px 7px; }
.chips { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.box .chips, .form .chips, .sheet .chips { margin: 0; padding: 0; flex-wrap: wrap; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: 600 14px Inter, sans-serif; cursor: pointer; white-space: nowrap; }
.chip .mci { width: 18px; height: 18px; }
.chip.on { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.searchbar { margin-bottom: 10px; }
.searchbar input, .form input:not([type=checkbox]):not([type=radio]), .form select,
.sheet :is(input:not(:where([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=hidden], [type=button], [type=submit], [type=reset], [type=image])), select, textarea) { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius-control); border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: 16px Inter, sans-serif; }
.sheet textarea { padding: 12px 14px; resize: vertical; }
.searchbar input:focus-visible, .form input:focus-visible, .sheet :is(input, select, textarea):focus-visible { outline: 3px solid var(--green-ink); }

/* formulaires et boutons */
.form { display: flex; flex-direction: column; gap: 10px; }
.row-form { flex-direction: row; margin-top: 10px; }
.row-form input { flex: 1; min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; color: var(--text); cursor: pointer; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.check .mci { width: 20px; height: 20px; vertical-align: -4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 48px; cursor: pointer; border-bottom: 1px solid var(--line); }
.switch:last-of-type { border-bottom: 0; }
.switch { position: relative; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch i { width: 46px; height: 28px; border-radius: var(--radius-pill); background: var(--card-2); position: relative; flex: none; transition: background .2s; border: 1px solid var(--line); }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #cfd8d3; transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.btn, .btn-ghost { padding: 10px var(--space-4); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 46px; border-radius: var(--radius-control); font: 600 var(--font-body) Inter, sans-serif; cursor: pointer; }
.btn.big, .btn-ghost.big { width: 100%; min-height: 52px; font-size: 16px; }
.btn.sm, .btn-ghost.sm { min-height: var(--target); padding: 0 12px; font-size: 13px; }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn-ghost.danger { color: var(--red); border-color: rgba(229,83,75,.5); }
.actions { display: flex; flex-direction: column; gap: var(--space-2); margin: 14px 0; }
.box .actions { margin-bottom: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--card-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn .mci { width: 22px; height: 22px; }
.pill-toggle { min-width: 52px; min-height: 36px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--card-2); color: var(--muted); font: 700 13px Inter; cursor: pointer; }
.pill-toggle.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.form-error { color: var(--red); margin: 0; font-size: var(--font-sm); }
.tag-bedrock { font-size: 10px; font-weight: 700; color: var(--bedrock); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 6px; vertical-align: 2px; }

/* panneau du bas + message */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background .18s; }
.sheet-bg.open { background: rgba(0,0,0,.55); }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; padding: 8px 18px calc(18px + var(--safe-b)); transform: translateY(100%); transition: transform .2s ease-out; }
.sheet-bg.open .sheet { transform: none; }
.sheet.dragging { transition: none; }
.sheet-grip { width: 64px; height: var(--target); display: grid; place-items: center; margin: 0 auto 4px; }
.sheet-grip::before { content: ''; width: 42px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-grip, .sheet-heading { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.sheet .sheet-heading { min-height: var(--target); }
.sheet.dragging :is(.sheet-grip, .sheet-heading) { cursor: grabbing; }
.sheet h2 { font: 700 19px Inter, sans-serif; margin: 0 0 8px; display: flex; align-items: center; gap: var(--space-2); }
.sheet h2 .mci { width: 26px; height: 26px; }
.sheet-actions { display: flex; flex-direction: column; gap: var(--space-2); margin-top: 16px; }
.sheet-actions .btn, .sheet-actions .btn-ghost { width: 100%; min-height: 52px; }
.steps { margin: 6px 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 70; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: var(--radius-card); background: #23302a; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.5); font-weight: 600; text-align: center; animation: toastIn .2s ease-out; }
.toast.ok { border-color: var(--green-2); } .toast.bad { border-color: var(--red); color: #ffb3ae; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (min-width: 1024px) { .toast { bottom: 24px; } .sheet-bg { align-items: center; } .sheet { border-radius: var(--radius-sheet); border-bottom: 1px solid var(--line); } }

/* ---------- accueil */
.box.home-hero { display: flex; flex-direction: column; gap: var(--space-3); background: radial-gradient(ellipse at top left, #24452f, var(--card) 70%); }
.hero-top { display: flex; align-items: center; gap: var(--space-3); }
.hero-top h1 { font: 400 24px var(--pixel); margin: 0; }
.hero-logo { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.1); }
.status-line { margin: 2px 0 0; color: var(--muted); font-size: var(--font-sm); }
.addr { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 60px; padding: 8px 8px 8px 14px; border-radius: var(--radius-card);
  background: rgba(0,0,0,.28); border: 1px solid var(--line); color: var(--text); cursor: pointer; text-align: left; }
.addr small { display: block; color: var(--muted); font-size: 12px; }
.addr b { font: 600 16px ui-monospace, monospace; word-break: break-all; }
.addr-copy { background: var(--green-2); color: #fff; border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 700; font-size: var(--font-sm); flex: none; }
.online-strip { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; min-height: 36px; }
.online-strip .av { margin-right: -6px; box-shadow: 0 0 0 2px var(--card); }
.online-strip span { margin-left: 14px; }
.box.cta { display: flex; align-items: center; gap: var(--space-3); }
.box.cta > .mci { width: 32px; height: 32px; }
.box.cta div { flex: 1; display: flex; flex-direction: column; }
.box.cta small, .me-card small { color: var(--muted); font-size: 13px; }
.me-card { display: flex; align-items: center; gap: var(--space-3); color: var(--text); }
.me-card div { flex: 1; display: flex; flex-direction: column; }
.me-card .mci { width: 16px; height: 16px; vertical-align: -3px; }
.box.event { border-color: rgba(242,193,78,.35); background: linear-gradient(135deg, rgba(242,193,78,.1), var(--card) 60%); }
.box.event.live { border-color: var(--gold); box-shadow: 0 0 20px rgba(242,193,78,.12); }
.box.event p { margin: 8px 0; font-size: var(--font-sm); }
.event-head { display: flex; align-items: center; gap: var(--space-3); }
.event-head .mci { width: 32px; height: 32px; }
.event-head div { display: flex; flex-direction: column; }
.event-head small { color: var(--gold); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.box.event.live .event-head small::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; animation: evpulse 1.2s infinite; }
.podium { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; counter-reset: p; }
.podium li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: var(--radius-sm); background: rgba(0,0,0,.2); counter-increment: p; }
.podium li::before { content: counter(p); font-weight: 700; color: var(--gold); margin-right: 10px; }
.podium li span { flex: 1; }
.box.daily { padding: 12px; }
.daily-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: 10px; }
.daily-head .mci { width: 24px; height: 24px; }
.daily-head small { margin-left: auto; color: var(--muted); font-size: 13px; }
.daily-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.dd { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: var(--radius-sm); background: rgba(255,255,255,.05); font-weight: 700; font-size: 13px; }
.dd small { font-weight: 500; opacity: .6; font-size: 10px; }
.dd.done { background: rgba(95,191,74,.16); color: #8fe07a; }
.dd.cur { background: rgba(242,193,78,.2); box-shadow: inset 0 0 0 2px var(--gold); color: #ffd978; }

/* ---------- carte */
.map-wrap { position: relative; height: calc(100dvh - var(--appbar) - env(safe-area-inset-top)); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 1023px) { .map-wrap { height: calc(100dvh - var(--appbar) - var(--tabbar) - var(--safe-b) - env(safe-area-inset-top)); } }

/* ---------- en jeu : chat en bulles, saisie collée en bas */
.page-chat { display: flex; flex-direction: column; height: calc(100dvh - var(--appbar) - env(safe-area-inset-top)); padding-bottom: 0; }
@media (max-width: 1023px) { .page-chat { height: calc(100dvh - var(--appbar) - var(--tabbar) - var(--safe-b) - env(safe-area-inset-top)); } }
.page-chat #ig-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 10px; overscroll-behavior: contain; }
.msg { align-self: flex-start; max-width: 86%; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 6px 12px 8px; }
.msg.mine { align-self: flex-end; background: #1f3a2a; border-color: #2e5a3c; border-radius: 16px 16px 4px 16px; }
.msg-meta { display: flex; gap: var(--space-2); align-items: baseline; font-size: 12px; }
.msg-meta b { color: var(--gold); }
.msg-meta time { color: var(--muted); }
.msg-meta i { font-style: normal; color: var(--bedrock); }
.msg-text { overflow-wrap: anywhere; }
.msg.event { align-self: center; background: none; border: 0; color: var(--muted); font-size: 12px; padding: 2px; }
.chat-more { align-self: center; background: var(--card-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-pill); padding: 8px 14px; cursor: pointer; font: 600 13px Inter; }
.chat-bar { display: flex; gap: var(--space-2); padding: 10px 0 12px; border-top: 1px solid var(--line); }
.chat-bar input { flex: 1; min-width: 0; min-height: 48px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--bg-2); color: var(--text); padding: 0 18px; font: 16px Inter; }
.chat-bar .btn:not(.big) { width: 48px; min-height: 48px; border-radius: 50%; padding: 0; font-size: 18px; }

/* ---------- ventes */
.item-ic { position: relative; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--bg-2); display: grid; place-items: center; flex: none; }
.item-ic img { width: 30px; height: 30px; image-rendering: pixelated; }
.item-ic b { position: absolute; right: 2px; bottom: 0; font: 700 12px Inter; text-shadow: 1px 1px 0 #000; }
.item-ic.big { width: 64px; height: 64px; } .item-ic.big img { width: 44px; height: 44px; }
.price { color: var(--gold); font-size: 15px; white-space: nowrap; }
.fancy { color: #7fe3ff; }
.box.note { display: flex; align-items: center; gap: 10px; font-size: var(--font-sm); }
.box.note .mci { width: 26px; height: 26px; }
.item-sheet { display: flex; gap: 14px; align-items: center; }
.item-sheet h2 { margin: 0; }
.item-sheet p { margin: 2px 0 0; font-size: var(--font-sm); }
.ench { color: #b9a4ff; font-size: var(--font-sm); background: var(--card); border-radius: var(--radius-control); padding: 10px 12px; }

/* ---------- guide */
.crumb { color: var(--green); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin: 0 2px 6px; }
.wiki-page .prose { background: none; border: 0; padding: 0; font-size: 16px; line-height: 1.6; }
.wiki-page .prose h1 { margin: 0 0 var(--space-3); }
.wiki-page .prose h2 { font-size: 18px; margin: 24px 0 8px; }
.wiki-page .prose img.mci { width: 20px; height: 20px; vertical-align: -4px; }
.wiki-page .prose table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; margin: 12px 0; }
.wiki-page .prose th, .wiki-page .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.wiki-page .prose tr:last-child td { border-bottom: 0; }
.wiki-page .prose blockquote { margin: 12px 0; padding: 10px 14px; background: var(--card); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); }
.wiki-page .prose code { background: var(--card-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.wiki-nextprev { margin: 24px 0 8px; display: flex; flex-direction: column; gap: var(--space-2); }
.wiki-nextprev .row { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
@media (max-width: 1023px) {
    /* tableaux → petites fiches */
  .wiki-page .prose table.rtable, .wiki-page .prose table.rtable tbody, .wiki-page .prose table.rtable tr, .wiki-page .prose table.rtable td { display: block; }
  .wiki-page .prose table.rtable thead { display: none; }
  .wiki-page .prose table.rtable tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .wiki-page .prose table.rtable tr:last-child { border-bottom: 0; }
  .wiki-page .prose table.rtable td { border: 0; padding: 2px 0; }
  .wiki-page .prose table.rtable td:first-child { font-weight: 700; }
  .wiki-page .prose table.rtable td + td::before { content: attr(data-label) " : "; color: var(--muted); font-size: 13px; }
}

/* ---------- profil */
.pf-head { display: flex; align-items: center; gap: 14px; }
.pf-head > .av { border-radius: var(--radius-control); }
.pf-head > div { flex: 1; min-width: 0; }
.pf-head h1 { font: 700 20px Inter, sans-serif; margin: 0; overflow: hidden; text-overflow: ellipsis; }
.pf-money { margin: 4px 0 0; font: 400 15px var(--pixel); color: var(--gold); }
.pf-money .mci { width: 18px; height: 18px; vertical-align: -3px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-3); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stats small { color: var(--muted); font-size: 12px; }
.stats b { font-size: 18px; }
.ad-log { font: 12px ui-monospace, monospace; max-height: 260px; overflow: auto; }
.ad-cp-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 13px; }
.ad-cp-list time { color: var(--muted); margin-right: 6px; }

/* Admin : mêmes segments que le profil, défilables au doigt. */
.admin-tabs .segbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.admin-tabs .segbar::-webkit-scrollbar { display: none; }
.admin-tabs .segbar > a { flex: 0 0 auto; min-height: var(--target); padding: 8px 14px; font-size: 14px; white-space: nowrap; scroll-snap-align: start; }
.admin-page .chip { min-height: var(--target); }
.admin-page :is(.ad-log, .ad-cp-list) { overflow-wrap: anywhere; }
.admin-page .ad-log { display: block; }
.admin-page .ad-log > div { padding: 4px 0; }
.admin-page .stats > .empty-state { grid-column: 1 / -1; }
@media (min-width: 1024px) { .page.admin-page { max-width: 900px; } }

/* ---------- mini-jeux : même en-tête que les autres pages */
.casino.page { max-width: 900px; }
.casino .cas-head { margin: 0 2px 10px; }
@media (max-width: 1023px) { .casino .tbl-controls:not(:empty) { margin: 10px -16px 0; } }

/* compteur de joueurs en ligne (barre du haut) */
.online-btn { display: flex; align-items: center; gap: 2px; height: var(--target); padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: 700 14px Inter, sans-serif; cursor: pointer; flex: none; }
.online-btn .dot { margin-right: 6px; }
.online-strip { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.sheet .list { margin-top: 8px; }
@media (max-width: 370px) { #brand-name { display: none; } }

/* bouton retour (mini-jeux) */
.back-btn, .back-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); padding: 0 16px 0 10px; margin-bottom: 10px; border-radius: var(--radius-pill);
  background: var(--card); border: 1px solid var(--line); color: var(--text); font: 600 14px Inter, sans-serif; }
.back-btn span { font-size: 22px; line-height: 1; color: var(--muted); margin-top: -2px; }
.back-btn:active, .back-link:active { background: var(--card-2); }
.table-seats b { font-size: var(--font-sm); color: var(--muted); }
.live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: evpulse 1.2s infinite; }
.table-row .row-text small { white-space: normal; }

/* ---- mini-jeux au téléphone : en-tête sur une ligne, jeu à la taille de l'écran */
.casino .cas-head { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.casino .cas-head > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; flex: 1 1 auto; }
.casino .cas-head .back-btn, .back-link { margin: 0; flex: none; }
.mines-tnt { margin: 0 0 4px; width: 100%; }
@media (max-width: 1023px) {
  .casino .cas-head .page-title { font-size: var(--font-title); margin: 0; }
  .casino .cas-head .cas-balance { flex: none; }
  .casino.in-game .cas-feed { display: none; }
  .casino.in-game .page-sub { display: none; }
  .casino.in-game { padding-top: 10px; }
  /* la grille des Mines tient entre l'en-tête et les commandes, sans défiler */
  .mines .mines-grid { width: min(100%, max(244px, calc(100dvh - 560px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))); margin: 0 auto; gap: 6px; }
  .cas-table.mines { padding: 10px; gap: var(--space-2); }
}
/* onglets : pas de surbrillance « collée » après un toucher sur iPhone */
@media (hover: none) { nav a:hover:not(.active) { background: none; color: var(--muted); } }

/* ---- discussions */
.topic-ic { width: 40px; height: 40px; border-radius: var(--radius-control); background: var(--green-2); color: #fff; display: grid; place-items: center; font: 700 20px Inter, sans-serif; flex: none; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 6px 8px 0; }
.list-head .list-title { margin: 0 6px; }
.dm-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row.unread .row-text b { color: #fff; }
.row.unread .row-text small { color: var(--text); font-weight: 600; }
.conv-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.conv-head .back-btn, .back-link { margin: 0; flex: none; }
.conv-title { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.conv-title .topic-ic { width: 32px; height: 32px; font-size: 16px; border-radius: var(--radius-sm); }
.conv-title span { display: flex; flex-direction: column; min-width: 0; }
.conv-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-title small { color: var(--muted); font-size: 12px; }
.msg .via { font-style: normal; color: var(--gold); }
.msg-text + .msg-meta { justify-content: flex-end; margin-top: 2px; }
.tabbar a, .deskbar a { position: relative; }
.tab-badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--red); color: #fff;
  font: 700 11px/18px Inter, sans-serif; font-style: normal; text-align: center; }
.deskbar .tab-badge { top: 0; right: 0; }

/* ---- mini-jeux : liste des jeux et salle en direct */
.game-ic { width: 44px; height: 44px; border-radius: var(--radius-control); background: var(--bg-2); display: grid; place-items: center; }
.game-ic .mci { width: 30px; height: 30px; }
.games-list .row-text small { white-space: normal; }
.game-live { color: var(--muted); }
.game-live .gold { color: var(--gold); }
.live { color: var(--red); }
.room-live { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.room-live h3 { margin: 0 0 8px; font-size: var(--font-sm); color: var(--muted); font-weight: 700; }
#room-log { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.play-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: var(--font-sm); }
.play-row.me { background: rgba(95,191,74,.08); }
.play-row.won { background: rgba(242,193,78,.1); }
.play-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.play-row .who small { color: var(--muted); font-size: 12px; }
.play-row .mini-reels .mci { width: 16px; height: 16px; }

/* ---- fluidité (téléphones) : pas de flou derrière les barres fixes, pas d'animations sans fin qui repeignent la page */
.appbar, .tabbar, .topbar, .tbl-controls:not(:empty) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.appbar { background: #0f1412; }
.tabbar { background: #0f1412 !important; }
.tbl-controls:not(:empty) { background: #141a17; }
.seat.active, .uc-player.active { animation: none; box-shadow: 0 0 0 2px rgba(242,193,78,.55); }
.seat.winner, .uc-player.winner { animation: none; box-shadow: 0 0 0 2px rgba(95,191,74,.6); }
.tile-foot .live { animation: none; }
/* barres de temps : réduites par le navigateur (transform), sans recalcul de la page */
.tbar b, .pbar b { transition: background .3s; transform-origin: left center; will-change: transform; transform: scaleX(var(--from, 1)); }
@keyframes tbarShrink { from { transform: scaleX(var(--from, 1)); } to { transform: scaleX(0); } }
.crash-screen, .wheel-wrap, .plinko-board { contain: layout paint; }

/* ---------- application compagnon (accueil connecté) */
.companion { display: flex; flex-direction: column; gap: var(--space-3); }
.companion > :not(.sr-only) { flex-shrink: 0; }
.companion > div:empty { display: none; }
.companion > .box, .companion > div > .box { margin: 0; }
.c-skel { height: 64px; border-radius: var(--radius-control); background: linear-gradient(90deg, var(--card), var(--card-2), var(--card)); background-size: 200% 100%; animation: c-skel 1.2s infinite; }
@keyframes c-skel { to { background-position: -200% 0; } }
.c-me { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 12px; align-items: center; background: radial-gradient(ellipse at top left, #24452f, var(--card) 70%); }
.c-id { display: flex; align-items: center; gap: var(--space-3); color: var(--text); min-width: 0; }
.c-id .av { border-radius: var(--radius-sm); image-rendering: pixelated; }
.c-id .c-identity { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.c-id .c-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.c-id .c-name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.c-id small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-xyz { font-variant-numeric: tabular-nums; color: var(--text); }
.c-money { text-align: left; display: flex; flex: none; margin: 0; }
.c-money b { font-size: 20px; color: var(--gold); white-space: nowrap; }
.c-vitals { grid-column: 1 / -1; display: flex; gap: var(--space-2); }
.c-vitals span { flex: 1; text-align: center; padding: 6px 0; border-radius: var(--radius-sm); background: rgba(0,0,0,.2); font-size: 13px; font-weight: 600; }
#c-daily { grid-column: 1 / -1; }
#c-daily:empty { display: none; }
.daily-inline { border-top: 1px solid var(--line); padding-top: 10px; }
.daily-inline .daily-head { margin-bottom: 6px; }
.daily-inline .daily-head small { margin: 0; }
.daily-inline .daily-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0; }
.daily-inline .dd { padding: 4px 0; }
.c-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.c-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 68px; border-radius: var(--radius-card); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: 600 12px Inter, sans-serif; cursor: pointer; }
.c-act .mci { width: 28px; height: 28px; }
.c-act:active { transform: scale(.97); }
.c-qhead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: 10px; }
.c-qhead b { display: flex; align-items: center; gap: var(--space-2); }
.c-qhead .mci { width: 20px; height: 20px; }
.c-qhead small { color: var(--muted); font-size: 12px; }
.c-quests .segbar { margin-bottom: 10px; }
.c-q { padding: 10px 0; border-top: 1px solid var(--line); }
.c-q:first-child { border-top: 0; }
.c-q.done { opacity: .55; }
.c-q-top { display: flex; align-items: center; gap: 10px; }
.c-q-top .mci { width: 28px; height: 28px; flex: none; }
.c-q-top div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.c-q-top small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.c-q-top .chip { min-height: 0; padding: 1px 8px; font-size: 11px; }
.chip.d-easy { color: #7ee08a; border-color: rgba(126,224,138,.4); }
.chip.d-med { color: var(--gold); border-color: rgba(242,193,78,.4); }
.chip.d-hard { color: #ff7a7a; border-color: rgba(255,122,122,.4); }
.c-ok { color: #7ee08a; font-weight: 700; font-size: 18px; }
.c-task { margin: 6px 0 0 38px; }
.c-task small { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: var(--space-2); }
.c-task small b { color: var(--text); white-space: nowrap; }
.bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3fa34d, #7ee08a); }
.c-adv { padding: 8px 0; }
.c-adv-top { display: flex; justify-content: space-between; font-size: var(--font-sm); }
.c-adv-top small { color: var(--muted); }
.c-hint { font-size: 12px; margin: 8px 0 0; }
.c-fr { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 5px 5px 4px; margin: -5px -5px 0; }
.c-f { flex: none; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); background: none; border: 0; cursor: pointer; font: inherit; }
.c-f .av { border-radius: var(--radius-sm); filter: grayscale(1) brightness(.6); }
.c-f.on .av { filter: none; box-shadow: 0 0 0 2px #3fa34d; }
.c-f small { font-size: 11px; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-f.on small { color: var(--text); }
.sheet .c-fr { margin-bottom: var(--space-3); }

/* ---------- nouvelle version disponible (application installée) */
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + var(--safe-b) + 14px); z-index: 71;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: var(--radius-pill); background: var(--card); border: 1px solid var(--green-2);
  box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: var(--font-sm); font-weight: 600; white-space: nowrap; max-width: calc(100% - 32px); }
.update-bar .update-x { background: none; border: 0; color: var(--muted); font-size: 16px; padding: 4px 8px; cursor: pointer; }
@media (min-width: 1024px) { .update-bar { bottom: 24px; } }

/* ---------- connexion perdue */
.net-bar { position: fixed; top: calc(var(--appbar) + env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 72;
  padding: 7px 14px; border-radius: var(--radius-pill); background: #e2a83a; color: #2b2410; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.net-err { text-align: center; }
.net-err .btn { margin: -4px auto 12px; display: inline-flex; }
.box .net-err .empty-state { border: 0; padding-top: 4px; }

/* ---------- visiteur : Chat / Rejoindre au lieu de Social / Marché */
html:not(.logged) [data-member] { display: none !important; }
html.logged [data-visitor] { display: none !important; }

/* ---------- accueil visiteur */
.v-hero { gap: 16px; padding: 20px; }
.v-hero-main { display: flex; align-items: center; gap: 16px; }
.v-mascot { width: 84px; height: 84px; image-rendering: pixelated; flex: none; animation: v-bob 3s ease-in-out infinite; }
@keyframes v-bob { 50% { transform: translateY(-4px) rotate(-2deg); } }
.v-hero h1 { font: 400 30px var(--pixel); margin: 0; }
.v-tag { margin: 4px 0 6px; color: var(--text); font-weight: 600; }
.v-cta { display: flex; flex-direction: column; gap: var(--space-2); }
.v-cta .btn { justify-content: center; gap: var(--space-2); }
.v-cta .btn .mci { width: 22px; height: 22px; }
.v-app { display: grid; gap: 16px; }
.v-app h2 { margin: 0 0 6px; font-size: 19px; }
.v-app p { margin: 0 0 8px; color: var(--muted); }
.v-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; }
.v-list li { padding-left: 24px; position: relative; font-size: var(--font-sm); }
.v-list li::before { content: '✓'; position: absolute; left: 2px; color: var(--green); font-weight: 800; }
.v-preview { position: relative; display: grid; gap: var(--space-2); padding: 12px; border-radius: var(--radius-card); background: var(--card-2); border: 1px solid var(--line); overflow: hidden; }
.v-preview .vp-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-control); background: var(--card); border: 1px solid var(--line); filter: blur(1.6px); }
.vp-card.col { flex-direction: column; align-items: stretch; gap: 6px; }
.vp-card small { display: block; color: var(--muted); font-size: 12px; }
.vp-card em { margin-left: auto; font-style: normal; font-weight: 800; color: var(--gold, #c79a2e); }
.vp-av { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #8a5a3b, #c8926a); }
.vp-q { display: grid; gap: 3px; font-size: 12px; }
.vp-q i { height: 6px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.vp-q i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--green); border-radius: 3px; }
.vp-card.row7 { justify-content: space-between; gap: 4px; }
.vp-card.row7 span { flex: 1; text-align: center; padding: 6px 0; border-radius: 8px; background: var(--card-2); font-size: 11px; font-weight: 700; }
.vp-card.row7 span.ok { background: var(--green-soft); color: var(--green-ink); }
.vp-lock { position: absolute; inset: auto 12px 12px 12px; display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 10px; border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); font-weight: 700; font-size: var(--font-sm); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.vp-lock .mci { width: 22px; height: 22px; }
.v-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.v-feat { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--line); }
.v-feat .mci { width: 30px; height: 30px; margin-bottom: 2px; }
.v-feat b { font-size: var(--font-sm); }
.v-feat small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.v-live { display: grid; gap: var(--space-3); margin-top: 12px; }
.v-live .box { margin: 0; }
.v-chat { display: block; color: var(--text); text-decoration: none; }
.v-chat-lines p { margin: 6px 0 0; font-size: var(--font-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-chat-lines b { color: var(--green-ink); margin-right: 4px; }
.v-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; counter-reset: st; }
.v-steps li { counter-increment: st; display: grid; grid-template-columns: 36px 1fr; column-gap: var(--space-3); align-items: center; padding: 12px 14px; border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--line); }
.v-steps li::before { content: counter(st); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font: 400 16px var(--pixel); }
.v-steps small { color: var(--muted); font-size: 13px; }
.addr.mini { min-height: 40px; margin-top: 6px; padding: 4px 4px 4px 10px; }
.addr.mini b { font-size: var(--font-sm); }
.addr.mini .addr-copy { padding: 7px 10px; font-size: 13px; }
.v-final { margin: 4px 0 12px; }
.v-final .mci { width: 32px; height: 32px; }

/* ---------- rejoindre */
.join-page .form { gap: var(--space-2); }
.lbl { font-weight: 700; font-size: var(--font-sm); margin-top: 6px; }
.hint { margin: 0; color: var(--muted); font-size: 13px; }
.join-ed { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin: 0; padding: 0; background: none; border: 0; }
.join-ed label { cursor: pointer; }
.join-ed input { position: absolute; opacity: 0; pointer-events: none; }
.join-ed span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: var(--radius-card); border: 2px solid var(--line); background: var(--card-2); font-weight: 700; text-align: center; }
.join-ed span .mci { width: 28px; height: 28px; }
.join-ed small { color: var(--muted); font-weight: 500; font-size: 12px; }
.join-ed input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green-ink); }
.join-ed input:focus-visible + span { outline: 2px solid var(--green-2); }
.join-st { display: flex; align-items: center; gap: var(--space-3); }
.join-st .join-ic { font-size: 28px; }
.join-st div { display: flex; flex-direction: column; gap: 2px; }
.join-st small { color: var(--muted); }
.join-st.ok { background: var(--green-soft); border-color: var(--green-2); }
.join-st.wait { border-color: #e2b84a; }

/* ---------- chat en lecture seule */
.chat-visitor { display: flex; align-items: center; gap: var(--space-2); }
.chat-visitor span { flex: 1; color: var(--muted); font-size: var(--font-sm); }

/* ---------- demandes de whitelist (Whitelisteurs) */
.wl-req { flex-wrap: wrap; }
.wl-req .row-text small { white-space: normal; }
.wl-req-act { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.wl-req-act .check { min-height: 32px; font-size: 13px; }

@media (min-width: 1024px) {
  .home-visitor { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; grid-template-areas: none; }
  .home-visitor > * { grid-column: 1 / -1; margin: 0; }
  .home-visitor > .v-hero { grid-column: 1 / 6; }
  .home-visitor > .v-app { grid-column: 6 / -1; grid-template-columns: 1fr 1fr; align-items: center; }
  .home-visitor > .v-live { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; margin: 0; }
  .home-visitor .list-title { margin: 8px 0 -4px; }
  .v-features { grid-template-columns: repeat(4, 1fr); }
  .v-steps { grid-template-columns: repeat(3, 1fr); margin: 0; }
  .join-page { max-width: 720px; }
}
.wl-req .row-text { flex: 1 1 60%; min-width: 0; }
.wl-req .wl-req-act { flex: 1 0 100%; justify-content: flex-end; padding-top: 6px; }
.chat-visitor { flex-wrap: nowrap; }
.chat-visitor span { font-size: 13px; line-height: 1.3; }
.chat-visitor .btn, .chat-visitor .btn-ghost { flex: none; padding: 0 14px; min-height: 42px; }
.chat-bar.chat-visitor .btn, .chat-bar.chat-visitor .btn-ghost { width: auto; height: auto; padding: 0 16px; min-height: 44px; border-radius: var(--radius-control); font-size: 15px; display: inline-flex; align-items: center; }

/* ---------- santé du serveur (espace admin) */
.stats.health > div { border-left: 4px solid var(--line); }
.stats.health > div.ok { border-left-color: var(--green); }
.stats.health > div.warn { border-left-color: #e2a83a; }
.stats.health > div.bad { border-left-color: var(--red, #d9483f); }
.stats.health > div.bad b { color: var(--red, #d9483f); }
.ad-alerts { background: #fbe9e7; border-color: #e8a79f; color: #8a2a20; font-weight: 600; display: grid; gap: 4px; }
[data-theme="dark"] .ad-alerts { background: #3a1f1c; border-color: #6b2e2a; color: #ffb3ae; }
.row.sus b { color: var(--red, #d9483f); }

/* ---------- cosmétiques */
.pf-title { margin: 0 0 2px; font: 400 13px var(--pixel); letter-spacing: .04em; }
.cos-boss-head { display: flex; align-items: center; gap: var(--space-3); }
.cos-boss-head > div { flex: 1; display: flex; flex-direction: column; }
.cos-boss-head small { color: var(--muted); font-size: 12px; }
.cos-boss-head b { font-size: 18px; }
.cos-boss-head .mci { width: 32px; height: 32px; }
.cos-boss .tag.ok { background: var(--green-soft); color: var(--green-ink); }
.cos-sub { margin: -4px 4px 8px; }
.cos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: var(--space-2); margin-bottom: 8px; }
.cos-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: var(--radius-card); background: var(--card); border: 2px solid var(--line); cursor: pointer; text-align: center; color: var(--text); font: inherit; }
.cos-card .mci { width: 32px; height: 32px; }
.cos-card b { font-size: 13.5px; }
.cos-card small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.cos-card.on { border-color: var(--green); background: var(--green-soft); }
.cos-card.locked { opacity: .55; cursor: default; filter: grayscale(.6); }
@media (hover: hover) { .cos-card:not(.locked):hover { transform: translateY(-2px); } }

/* ---------- clavier, cibles tactiles et contenus longs */
:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 3px; }
#view:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 12px 16px; background: var(--card); color: var(--text); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
button:disabled { cursor: default; }
:is(.switch, .pt-ic, .pt-c, .join-ed) input:focus-visible + :is(i, span), label.check:has(input:focus-visible) {
  outline: 3px solid var(--green-ink); outline-offset: 3px;
}
button.chip, a.chip, .adv-cats button, .pill-toggle, .map-btn, .map-hint button,
.online-strip, label.check, .wl-req-act .check, .chat-more, .cas-rules summary, .tchat summary { min-height: var(--target); }
.ev-close, .pt-del, .update-bar .update-x { min-width: var(--target); min-height: var(--target); }
.page, .box, .wk-main, .prose, .tbl-layout > *, .companion > *, .home-visitor > *, .v-app > *, .row > *, .stats > div { min-width: 0; }
.page, .sheet { overflow-wrap: anywhere; }
input, select, textarea { min-width: 0; max-width: 100%; }
.row-right { max-width: 55%; flex-wrap: wrap; justify-content: flex-end; }
.row-right .price { white-space: normal; overflow-wrap: anywhere; text-align: right; }
.stats b, .pf-money { overflow-wrap: anywhere; white-space: normal; }
.chips, .adv-cats, .c-fr { max-width: 100%; }
.chips, .adv-cats { flex-wrap: wrap; overflow: visible; }
.adv-cats { padding: var(--space-1); }
.v-hero-main { flex-wrap: wrap; justify-content: center; text-align: center; }
.v-hero h1 { font-size: clamp(24px, 5vw, 30px); }
.c-me { grid-template-columns: minmax(0, 1fr); }
.c-money { text-align: left; }
.box.cta { flex-wrap: wrap; }
.box.cta > div { min-width: 140px; }
.update-bar { white-space: normal; border-radius: var(--radius-card); width: max-content; flex-wrap: wrap; justify-content: center; }
.net-bar { max-width: calc(100% - 32px); white-space: normal; text-align: center; }
.conv-head { flex-wrap: wrap; }
.conv-title { flex: 1; }
.conv-title h1 { font: 600 18px/1.35 Inter, sans-serif; margin: 0; overflow-wrap: anywhere; }
.map-hint { width: max-content; max-width: calc(100% - 24px); white-space: normal; border-radius: var(--radius-card); }
.map-hint span { min-width: 0; }
.pt-colors { flex-wrap: wrap; gap: var(--space-1); }
.pt-c { display: grid; place-items: center; width: var(--target); height: var(--target); }
.sheet-bg { overscroll-behavior: contain; }
.pt-ic, .pt-c, .join-ed label { position: relative; }
.pt-ic input, .pt-c input, .join-ed input { width: 1px; height: 1px; }
.sheet { overscroll-behavior: contain; }
body.sheet-open { overflow: hidden; }
.sheet-close { display: flex; margin: var(--space-4) auto 0; }
.prose pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.wiki-page { padding-bottom: var(--space-6); }
@media (max-width: 1023px) {
  .appbar { gap: var(--space-2); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .tabbar { flex-wrap: nowrap; }
  .segbar { flex-wrap: wrap; }
  .segbar > :is(a, button) { flex-basis: calc(50% - var(--space-1)); }
  .c-quests .segbar > button { flex-basis: 0; }
  .form.row-form { flex-wrap: wrap; }
  .row-form input { flex-basis: 140px; }
  .casino .cas-head .cas-balance { margin-bottom: 0; }
}

/* La couleur gagnée en jeu reste visible ; le texte garde son contraste. */
.cos-swatch, .pf-title::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--cos-color); border: 1px solid var(--line); }

.row:focus-visible { outline-offset: -3px; }

/* Interrupteur intégré à une ligne de liste (Plus > Admin > Mode staff) */
.row-switch { cursor: pointer; position: relative; }
.row-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.row-switch i { width: 46px; height: 28px; border-radius: var(--radius-pill); background: var(--card-2); position: relative; flex: none; transition: background .2s; border: 1px solid var(--line); }
.row-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #cfd8d3; transition: transform .2s; }
.row-switch input:checked + i { background: var(--green); }
.row-switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.row-switch input:focus-visible + i { outline: 2px solid var(--green); outline-offset: 2px; }

/* Le point du salon accompagne toujours un état écrit. */
.casino .live-dot { animation: none; }
.casino .table-seats { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

/* Moumoute · thème « compagnon » : sobre et clair.
   Fond crème légèrement chaud, panneaux blancs, vert Moumoute pour les actions, ombres discrètes, coins arrondis.
   Minecraft par petites touches : icônes du jeu, pixels flottants, mascotte en pixel-art. Chargé après app.css. */
:root {
  --bg: #f5f2ec;
  --bg-2: #ede8df;
  --card: #ffffff;
  --card-2: #f6f3ee;
  --line: #e7e1d6;
  --text: #23271f;
  --muted: #62685b;
  --green: #327d3d;
  --green-2: var(--green);
  --green-ink: #2c7437;
  --green-soft: #e7f3e6;
  --gold: #8a630b;
  --gold-soft: #fbf1d9;
  --red: #b93830;
  --bedrock: #355fba;
  --positive-line: #bfe0bd;
  --negative-soft: #fdecea;
  --negative-line: #f2c2be;
  --gold-line: #eedcae;
  --switch-off: #d9d3c8;
  --silver: #9aa3a8;
  --bronze: #b8743f;
  --shadow-1: 0 1px 2px rgba(60, 50, 30, .06), 0 2px 8px rgba(60, 50, 30, .05);
  --shadow-2: 0 2px 4px rgba(60, 50, 30, .07), 0 10px 24px rgba(60, 50, 30, .09);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
html, body { background: var(--bg); color: var(--text); }
a { color: var(--green-ink); }
::selection { background: #cfe8cc; }

/* ---------- barres */
.appbar { background: rgba(245, 242, 236, .86) !important; backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.deskbar a { color: var(--muted); }
.deskbar a:hover { color: var(--text); background: var(--card-2); }
.deskbar a.active { color: var(--green-ink); background: var(--green-soft); }
.me-btn { background: var(--card); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-1); }
.me-btn:not(.logged) { background: var(--green); border-color: var(--green); color: #fff; }
.online-btn { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--text) !important; box-shadow: var(--shadow-1); }
@media (max-width: 1023px) {
  .tabbar { background: rgba(255, 255, 255, .92) !important; backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(60,50,30,.05); }
  .tabbar a { color: var(--muted); }
  .tabbar a.active { color: var(--green-ink); background: var(--green-soft); }
}

/* ---------- panneaux, listes */
.box, .list, .c-act, .stats > div, .cos-card { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.box, .list { transition: transform .25s var(--ease); }
@media (hover: hover) {
  a.box:hover, .c-act:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .row:hover { background: var(--card-2); }
}
.list { overflow: hidden; }
.row { border-color: var(--line) !important; }
.row .chev { color: #c3bcaf; }
.list-title { color: var(--muted); }
.muted, small { color: var(--muted); }

/* ---------- boutons : petit déplacement */
.btn, button.btn, .addr-copy, .chip, .c-act, .btn-ghost { transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s; }
.btn { background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-ink), var(--shadow-1); }
@media (hover: hover) { .btn:hover, .addr-copy:hover, .chip:hover { transform: translateY(-2px); } .btn:hover { box-shadow: 0 4px 0 var(--green-ink), var(--shadow-2); } }
.btn:active, .c-act:active, .chip:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--green-ink); }
.btn.danger { background: var(--red); box-shadow: 0 2px 0 #a8342d; }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--text); }
.chip { background: var(--card); border-color: var(--line); color: var(--text); }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.count { background: var(--green); }
input, select, textarea { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--text) !important; }
input:focus, select:focus, textarea:focus { border-color: var(--green) !important; }
.switch i { background: var(--switch-off); }

/* ---------- panneau du bas, notification */
.sheet-bg.open { background: rgba(35, 39, 31, .35); }
.sheet { background: var(--card) !important; border: 0 !important; box-shadow: 0 -10px 40px rgba(0,0,0,.12); }
.sheet-grip::before { background: var(--line); }
.toast { background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 10px; }
.toast::before { content: ''; width: 28px; height: 28px; flex: none; background: url(/mascotte-pixel.png?v=4) center / contain no-repeat; image-rendering: pixelated; }
.toast.ok { border-color: var(--positive-line); } .toast.bad { border-color: var(--negative-line); color: var(--red); }
.toast.bad::before { background-image: url(/mascotte-pixel-clin.png?v=4); }

/* ---------- accueil / compagnon */
.box.home-hero, .c-me { background: var(--card); position: relative; overflow: hidden; }
.box.home-hero::before, .c-me::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: url(/mc/block/grass_block_side.png) 0 0 / 16px 16px repeat-x; image-rendering: pixelated; opacity: .9; }
.hero-logo { box-shadow: 0 0 0 3px #fff, var(--shadow-1); animation: bob 4s ease-in-out infinite; }
.addr { background: var(--card-2) !important; border-color: var(--line) !important; }
.addr-copy { background: var(--green); }
.box.cta { background: var(--green-soft); border-color: #cfe6cc; }
.c-id small, .c-money small { color: var(--muted); }
.c-money b { color: var(--gold); }
.c-money b::after { content: ''; display: inline-block; width: 18px; height: 18px; margin-left: 6px; vertical-align: -2px; background: url(/mc/item/gold_ingot.png) center / contain no-repeat; image-rendering: pixelated; }
.c-vitals span { background: var(--card-2); border: 1px solid var(--line); }
.c-act { color: var(--text); }
.dd { background: var(--card-2); border: 1px solid var(--line); }
.dd.done { background: var(--green-soft); color: var(--green-ink); border-color: #cfe6cc; }
.dd.cur { background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 2px #e9c46a; }
.box.event { background: linear-gradient(135deg, var(--gold-soft), #fff 65%); border-color: var(--gold-line); }
.box.event.live { border-color: #e2b84a; box-shadow: 0 0 0 3px rgba(226,184,74,.15), var(--shadow-1); }
.podium li { background: var(--card-2); }
.bar { background: #ece7de; }
.bar i { background: linear-gradient(90deg, #3f9a4b, #6cc070); transition: width .9s var(--ease); }
.chip.d-easy { color: var(--green-ink); border-color: var(--positive-line); background: var(--green-soft); }
.chip.d-med { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.chip.d-hard { color: var(--red); border-color: var(--negative-line); background: var(--negative-soft); }
.c-ok { color: var(--green); }
.c-f .av { filter: grayscale(1) opacity(.55); }
.c-f.on .av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--green); }
.dot.on { box-shadow: 0 0 0 3px rgba(63,154,75,.18); }

/* ---------- états vides : la mascotte */
.empty-state, .list-empty { text-align: center; color: var(--muted); }
.mascot-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px; color: var(--muted); text-align: center; }
.mascot-empty img { width: 48px; height: 48px; image-rendering: pixelated; animation: bob 3.4s ease-in-out infinite; }
.onboard { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.onboard img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--green-soft); }

/* ---------- chat, ventes, divers */
.msg { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--text); }
.msg.mine { background: var(--green-soft) !important; border-color: #cfe6cc !important; }
.row.unread .row-text b { color: var(--text); }
.topic-ic { background: var(--green); }
.map-wrap { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-1); }
.item-ic { background: var(--card-2) !important; border: 1px solid var(--line); }
.item-ic b { color: #fff; }
.fancy { color: #1f8aa6; } .ench { color: #6b52c8; background: var(--card-2); }
.play-row.me { background: var(--green-soft); } .play-row.won { background: var(--gold-soft); }
.rank.r1 { background: #f2c14e; } .prose code, code { background: var(--bg-2) !important; color: var(--text) !important; }
.prose { color: var(--text); } .prose a { color: var(--green-ink); }
.prose table, .rtable { border-color: var(--line) !important; } .prose th { background: var(--card-2) !important; }
.tab-badge { box-shadow: 0 0 0 2px #fff; }

/* ---------- succès (profil) */
.adv-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.adv-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #ece7de 0); position: relative; }
.adv-ring::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.adv-ring span { position: relative; z-index: 1; }
.adv-head b { font-size: 17px; display: block; }
.adv-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.adv-cats button { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: 600 12px Inter, sans-serif; cursor: pointer; transition: transform .18s var(--ease); }
.adv-cats button.on { background: var(--green-soft); border-color: var(--positive-line); color: var(--green-ink); }
.adv-cats button img { width: 16px; height: 16px; image-rendering: pixelated; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.adv { aspect-ratio: 1; border-radius: var(--radius-control); display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); cursor: pointer; position: relative;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease); padding: 0; }
.adv img { width: 60%; height: 60%; image-rendering: pixelated; }
.adv.off img { filter: grayscale(1) opacity(.3); }
.adv.done { background: var(--card); box-shadow: var(--shadow-1); }
.adv.done.goal { border-color: var(--positive-line); } .adv.done.challenge { border-color: #d9c2f2; background: linear-gradient(135deg, #fff, #f6f0fe); }
.adv.secret::after { content: '?'; position: absolute; font: 700 16px var(--pixel); color: #b8b1a4; }
@media (hover: hover) { .adv:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); } }
.adv-detail { display: flex; gap: 14px; align-items: center; }
.adv-detail .adv { width: 64px; flex: none; cursor: default; }

/* ---------- particules : quelques pixels qui flottent */
.pixels { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pixels i { position: absolute; bottom: -12px; width: 6px; height: 6px; opacity: 0; animation: float-up linear infinite; }
#view, .appbar, .tabbar { position: relative; z-index: 1; }
.appbar { position: sticky; z-index: 30; } .tabbar { z-index: 40; }
@media (max-width: 1023px) { .tabbar { position: fixed; } }
@keyframes float-up { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .35; } 85% { opacity: .25; } 100% { transform: translateY(-105vh) rotate(90deg); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-2deg); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.pop { animation: pop .35s var(--ease) both; }
/* pluie d'alpagas (easter egg) */
.alpaca-rain { position: fixed; top: -40px; width: 32px; height: 32px; z-index: 90; pointer-events: none; image-rendering: pixelated; animation: rain linear forwards; }
@keyframes rain { to { transform: translateY(110vh) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pixels, .alpaca-rain { display: none; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* l'As porte la mascotte, le jackpot aussi */
.card-ace-mascot { width: 44%; image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgba(0,0,0,.2)); }
.jackpot { position: relative; }
.jackpot::before { content: ''; position: absolute; left: 10px; top: 50%; width: 30px; height: 30px; margin-top: -15px; background: url(/mascotte-pixel.png?v=4) center / contain no-repeat;
  image-rendering: pixelated; animation: bob 2.6s ease-in-out infinite; }
.jackpot.hit::before { background-image: url(/mascotte-pixel-clin.png?v=4); animation: pop .4s var(--ease) infinite alternate; }
.card.ace .card-ace-mascot { align-self: center; margin: -2px 0; }
.card.sm.ace .card-ace-mascot { width: 50%; }

/* ---------- mascotte en haut à gauche : salut + astuce, humeur selon ce qui se passe */
.appbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; font-family: Inter, sans-serif; letter-spacing: 0; text-decoration: none; }
.brand-mascot { width: 40px; height: 40px; flex: none; image-rendering: pixelated; cursor: pointer; animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.brand-mascot.react { animation: react .55s var(--ease), bob 3.2s ease-in-out .55s infinite; }
.brand-mascot[data-mood="super"] { animation: hop .5s var(--ease) 3, bob 3.2s ease-in-out 1.5s infinite; }
.brand-mascot[data-mood="triste"] { animation: droop .6s var(--ease) both; }
@keyframes react { 0% { transform: scale(1); } 40% { transform: scale(1.22) rotate(-6deg); } 100% { transform: none; } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-6px) rotate(4deg); } }
@keyframes droop { to { transform: translateY(2px) rotate(-4deg); } }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text b { font: 700 14px Inter, sans-serif; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip-in { animation: fadeUp .4s ease-out; }
@media (min-width: 1024px) { .appbar .brand { flex: 0 1 320px; } }
@media (max-width: 380px) { .brand-text small { display: none; } }
@media (max-width: 1023px) {
  .me-btn.logged { padding: 0 6px; }
  .me-btn.logged span { display: none; }
}
.hero-logo { border-radius: 0 !important; box-shadow: none !important; image-rendering: pixelated; }

/* ---------- bandeau d'événement (en haut de l'accueil, seulement pendant / juste après) */
.ev-banner { display: flex; align-items: center; gap: 12px; color: var(--text); background: linear-gradient(135deg, var(--gold-soft), #fff 70%); border-color: var(--gold-line); }
.ev-banner.live { border-color: #e2b84a; box-shadow: 0 0 0 3px rgba(226,184,74,.15), var(--shadow-1); }
.ev-banner > .mci { width: 34px; height: 34px; flex: none; }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-main small { color: var(--gold); font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.ev-main b { font-size: 15px; }
.ev-podium { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ev-podium i { font-style: normal; } .ev-podium em { font-style: normal; font-weight: 700; color: var(--text); }
.ev-podium .p1 { color: var(--gold); }
.ev-need { color: var(--red) !important; font-weight: 500 !important; }
.ev-rank { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 8px; border-radius: var(--radius-control); background: var(--card); border: 1px solid #eedcae; }
.ev-rank b { font-size: 18px; color: var(--gold); line-height: 1.1; } .ev-rank small { font-size: 10px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(217,72,63,.2); }
.ev-close { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 18px; cursor: pointer; }
#home-event:empty { display: none; }
.ev-banner.live { color: var(--text); } .ev-banner.live .ev-main b { color: var(--text); }
.code-input { text-align: center; font: 700 28px/1 var(--pixel) !important; letter-spacing: .35em; text-transform: uppercase; padding: 14px 10px !important; }
.code-input::placeholder { color: #cfc8bb; }
.c-server { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 4px; }
.prose .c-server { margin: 4px 0 16px; }

/* ---------- carte : points personnels */
.map-wrap { position: relative; }
.map-controls { position: absolute; left: 12px; right: 12px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; z-index: 5; pointer-events: none; }
.map-controls > * { pointer-events: auto; }
.map-tools { display: flex; gap: 8px; max-width: 100%; min-width: 0; }
.map-tools .map-btn { min-width: 0; overflow-wrap: anywhere; padding: 8px 14px; }
.map-btn { min-height: var(--target); padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.96); color: var(--text);
  font: 600 14px Inter, sans-serif; box-shadow: var(--shadow-2); cursor: pointer; transition: transform .18s var(--ease); }
.map-btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.map-follow-row { cursor: pointer; }
.map-follow-row:has(input:checked) { background: var(--green-soft); }
.map-follow-check { appearance: none; flex: none; width: var(--target); height: var(--target); min-width: 44px; min-height: 44px; margin: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); cursor: pointer; }
.map-follow-check:checked { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px no-repeat; }
.map-follow-check:disabled { cursor: wait; opacity: .6; }
@media (hover: hover) { .map-btn:hover { transform: translateY(-2px); } }
.map-hint { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px;
  border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-2); font-weight: 600; font-size: var(--font-sm); white-space: normal; animation: pop .3s var(--ease); }
.map-hint img { width: 28px; height: 28px; image-rendering: pixelated; animation: bob 2s ease-in-out infinite; }
.map-hint button { border: 0; background: var(--card-2); border-radius: 999px; padding: 8px 12px; font: 600 13px Inter, sans-serif; cursor: pointer; }
.pt-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pt-ic input, .pt-c input { position: absolute; opacity: 0; pointer-events: none; }
.pt-ic span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--card-2);
  font-size: 11px; color: var(--muted); cursor: pointer; }
.pt-ic img { width: 24px; height: 24px; image-rendering: pixelated; }
.pt-ic input:checked + span { background: var(--green-soft); border-color: var(--green); color: var(--green-ink); }
.pt-colors { display: flex; gap: 10px; justify-content: center; }
.pt-c span { display: block; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.pt-c input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--text); }
.pt-dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-control); background: var(--card-2); border: 2px solid var(--c); }
.pt-dot .mci { width: 24px; height: 24px; }
.pt-del { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 24px; cursor: pointer; }
.pt-delete { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
.c-quests .segbar button { font-size: 13px; padding: 0 4px; } .adv-in { padding-top: 4px; }

/* ---------- classements : ma place (accueil), podium (visiteurs), page à part */
a.c-ranks, a.c-podium { color: var(--text); display: block; }
.c-rk { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.c-rk div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: var(--radius-control); background: var(--card-2); border: 1px solid var(--line); }
.c-rk div.top { background: var(--gold-soft); border-color: var(--gold-line); }
.c-rk span { font-size: 18px; line-height: 1; }
.c-rk b { font-size: 17px; line-height: 1.2; } .c-rk b sup { font-size: 10px; }
.c-rk div.top b { color: var(--gold); }
.c-rk small { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.1; }
.podium3 { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; }
.podium3 > div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
.podium3 .p1 { background: var(--gold-soft); border-color: var(--gold-line); padding-top: 16px; }
.podium3 b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium3 small { font-size: 11px; color: var(--muted); }
.podium3 .av { border-radius: 10px; }
.podium3 span { position: absolute; top: -9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px Inter, sans-serif; background: var(--card); box-shadow: var(--shadow-1); }
.podium3 .p1 span { background: #f2c14e; } .podium3 .p2 span { background: #d9dde0; } .podium3 .p3 span { background: #e6b58c; }
.podium3 > div:empty { visibility: hidden; }

/* ---------- cases à cocher : pastille sélectionnable (au lieu de la case du navigateur) */
label.check { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 14px 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; user-select: none;
  box-shadow: var(--shadow-1); transition: background .18s, border-color .18s, transform .18s var(--ease); align-self: flex-start; }
label.check input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
label.check span { display: inline-flex; align-items: center; gap: 8px; }
label.check span::before { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cfc8bb; background: var(--card); flex: none;
  transition: background .18s, border-color .18s; box-sizing: border-box; }
label.check .mci { width: 20px; height: 20px; }
label.check:has(input:checked) { background: var(--green-soft); border-color: var(--green); color: var(--green-ink); }
label.check input:checked + span::before { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; border-color: var(--green); }
label.check input:focus-visible + span::before { box-shadow: 0 0 0 3px rgba(63,154,75,.25); }
@media (hover: hover) { label.check:hover { transform: translateY(-2px); } }
.box > form + p.muted, .box > .form + p.muted { margin: 14px 2px 0; line-height: 1.45; }
/* quêtes d'aventure en grille (comme les succès) */
.adv.open { background: var(--card); border-color: var(--positive-line); }
.adv.open img { filter: none; }
.adv .adv-pct { position: absolute; left: 6px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--green); max-width: calc(100% - 12px); }
.adv .mci { width: 60%; height: 60%; }
.adv-cats .mci { width: 16px; height: 16px; }
.adv-detail small .chip { min-height: 0; padding: 1px 8px; font-size: 11px; vertical-align: 1px; }
mark { background: #fbe7a8; color: inherit; border-radius: 3px; padding: 0 2px; } [data-theme="dark"] mark { background: #5a4a18; }
.wiki-hit .row-text small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prose h2.flash { animation: flashh 1.6s ease-out; border-radius: 8px; } @keyframes flashh { 0%, 40% { background: var(--gold-soft); box-shadow: 0 0 0 6px var(--gold-soft); } 100% { background: transparent; box-shadow: none; } }
.prose h2 { scroll-margin-top: calc(var(--appbar) + 16px); }
/* rôle du joueur (page perso) */
.roles { display: flex; gap: 6px; margin: 4px 0 2px; flex-wrap: wrap; }
.role { font: 700 11px Inter, sans-serif; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; border: 1px solid; }
.r-joueur { color: var(--muted); border-color: var(--line); background: var(--card-2); }
.r-whitelist { color: #9a6a06; border-color: var(--gold-line); background: var(--gold-soft); }
.r-admin { color: #b85a14; border-color: #f2cfae; background: #fdf0e3; }
.r-sadmin { color: #b3322a; border-color: var(--negative-line); background: var(--negative-soft); }
.r-18 { color: #6b52c8; border-color: #ddd1f5; background: #f4f0fd; }
[data-theme="dark"] .r-whitelist { color: var(--gold); border-color: #4d4020; }
[data-theme="dark"] .r-admin { color: #f0a067; border-color: #5a3a1e; background: #2e2116; }
[data-theme="dark"] .r-sadmin { color: #ff8a80; border-color: #6b2e2a; background: #3a1f1c; }
[data-theme="dark"] .r-18 { color: #b9a4ff; border-color: #463a66; background: #26203a; }

/* ---------- guide : lecture en panneaux */
.wiki-page .prose { font-size: 15px; line-height: 1.55; }
.wiki-page .prose h1 { margin: 2px 0 14px; }
.wk-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); padding: 14px 16px; margin: 0 0 12px; }
.wk-block > h2 { font-size: 16px !important; margin: 0 0 10px !important; padding: 0 !important; border: 0 !important; display: flex; align-items: center; gap: 8px; }
.wk-block > h2::before { content: ''; width: 4px; height: 18px; border-radius: 4px; background: var(--green); }
.wk-block > :last-child { margin-bottom: 0; }
.wk-block p { margin: 0 0 8px; }
.wk-block ul, .wk-block ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.wk-block table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; border: 1px solid var(--line); border-radius: var(--radius-control); overflow: hidden; }
.wk-block th { background: var(--card-2); font-weight: 600; text-align: left; padding: 8px 10px; color: var(--muted); font-size: 12px; }
.wk-block td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.wk-block blockquote { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-control); background: var(--gold-soft); border: 1px solid #eedcae; color: var(--text); }
[data-theme="dark"] .wk-block blockquote { border-color: #4d4020; }
.wk-block code { font-size: 13px; padding: 1px 6px; border-radius: 6px; }
@media (max-width: 1023px) {
  .wk-block table.rtable, .wk-block table.rtable tbody, .wk-block table.rtable tr, .wk-block table.rtable td { border: 0; }
}
.me-btn.active { background: var(--green-soft); border-color: var(--green); }
.btn:disabled, .btn-ghost:disabled { transform: none; opacity: .55; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Nouvelles pages (accueil, Marché, Plus, Social) : mise en page uniquement, l'apparence reste celle d'origine. */
.home-section, #c-now:not(:empty) { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow-1); margin: 0; }
.home-section h2, #c-now h2 { margin: 0 0 10px; font-size: 16px; }
#c-now .list { border: 0; box-shadow: none; background: none; }
#c-life #c-ranks .box, #c-life .box.event { box-shadow: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading :is(h1, h2) { margin: 0; }
.section-heading > a { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
#c-now:empty { display: none; }
.home-section .c-fr { gap: 14px; }
.home-section .c-f { width: 72px; }
.home-section .c-f small { max-width: 72px; }
.quest-preview { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.quest-preview .mci { width: 28px; height: 28px; }
.quest-preview > div { min-width: 0; flex: 1; }
.quest-preview b, .quest-preview small { display: block; }
.quest-preview small { margin-top: 4px; }
.quest-preview progress { display: block; width: 100%; height: 8px; margin-top: 8px; }
.market-balance { font-size: 18px; font-weight: 600; margin: 0 0 16px; font-variant-numeric: tabular-nums; }
.market-page .section-heading .page-head { margin: 0; }
.market-help { min-width: var(--target); justify-content: center; }
.messages-sidebar .row.selected { background: var(--green-soft); }
.discussion .conv-head, .conv-friends { flex-shrink: 0; }
@media (max-width: 1023px) {
  .map-controls { bottom: 16px; }
  .map-tools { display: grid; width: calc(100% - 68px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-tools .map-btn { padding: 8px 10px; }
}
@media (max-width: 420px) {
    .companion .c-me { grid-template-columns: minmax(0, 1fr); }
  .companion .c-money { text-align: left; }
  .map-tools { gap: 6px; }
  .map-btn { padding: 8px 10px; font-size: 13px; }
}
.companion .c-id small { white-space: normal; overflow-wrap: anywhere; }
#c-now .row-text small { white-space: normal; }
.stats b.pos { color: var(--green); } .stats b.neg { color: var(--red); }

/* Titres de page : tous comme « Social » (Inter gras, même taille) */
.page-head h1, .page-title, .casino .page-title, .casino .cas-head .page-title, .wiki-page .prose h1, .messages-sidebar .section-heading h1 {
  font: 700 24px/1.3 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; text-shadow: none; }
@media (max-width: 1023px) { .market-page .segbar { flex-wrap: nowrap; } .market-page .segbar > :is(a, button) { flex-basis: 0; padding: 0 4px; } }

/* Accès staff : pastilles et console lisibles dans les deux thèmes. */
.r-modo { color: #267650; border-color: #b5d9c6; background: #e9f5ed; }
.r-reboot { color: #386aa3; border-color: #b9cfe8; background: #eaf1fa; }
[data-theme="dark"] .r-modo { color: #8fd5ad; border-color: #345443; background: #1f3328; }
[data-theme="dark"] .r-reboot { color: #9fc5f6; border-color: #354c69; background: #202e42; }
.staff-badge { color: var(--gold); font-size: 10px; }
.console-output { margin: 12px 0 0; padding: 12px; min-height: 60px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 monospace; color: var(--text); background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 3px; }
.switch:has(input:disabled) { opacity: .6; cursor: wait; }

/* Moumoute · mini-jeux dans le style « compagnon » : même fond crème, panneaux blancs, vert Moumoute pour agir.
   Les tables de jeu sont un tapis vert sauge clair ; cartes blanches, dos vert avec la mascotte. Chargé après theme.css. */

/* ---------- salon : liste des jeux, solde, fil */
.cas-balance { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--gold); }
.cas-balance.up { animation: flashUpL 1.2s ease-out; } .cas-balance.down { animation: flashDownL 1.2s ease-out; }
@keyframes flashUpL { 0% { background: var(--green-soft); } 100% { background: var(--card); } }
@keyframes flashDownL { 0% { background: var(--negative-soft); } 100% { background: var(--card); } }
.feed-item { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-1); }
.game-ic { background: var(--green-soft); border: 1px solid #d6ead3; }
.games-list .row { transition: background .2s; }
.game-live, .tile-foot { color: var(--muted); }
.live { color: var(--red); }
.game-card, .cas-tile { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-1); }
.game-card:hover, .cas-tile:hover { box-shadow: var(--shadow-2); border-color: #cfe6cc; }
.game-icon { background: var(--green-soft); }
.game-tag { background: var(--card-2); } .game-tag.multi { background: var(--green-soft); color: var(--green-ink); }
.hchip { background: var(--card-2); border: 1px solid var(--line); }
.hchip.good { color: var(--green-ink); }

/* ---------- tables de jeu : tapis vert sauge clair */
.cas-table, .felt {
  background: radial-gradient(ellipse at 50% 35%, #eef7ec 0%, #e1efdd 80%);
  border: 1px solid #cfe3cb; box-shadow: inset 0 0 0 6px rgba(255,255,255,.55), inset 0 0 0 7px #cfe3cb, var(--shadow-1);
  color: var(--text);
}
.felt { border-radius: 36px; }
.felt-status, .my-hand, .bj-label, .dock-info, .mines-info, .cas-bet label { color: var(--text); }
.bj-label b, .pot { color: var(--text); }
.pot b, .mines-info b, .stake-val { color: var(--gold); }
.cas-actions .btn-ghost, .felt .btn-ghost, .btn-ghost.sm { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.cas-msg.good { color: var(--green-ink); }

/* ---------- cartes */
.card { background: #fff; color: #23271f; box-shadow: 0 1px 2px rgba(60,50,30,.12), 0 4px 10px rgba(60,50,30,.1); border: 1px solid #ece6db; }
.card.red { color: #d9483f; }
.card.back { background: url(/mascotte-pixel.png?v=4) center / 55% no-repeat, repeating-linear-gradient(45deg, #3f9a4b 0 6px, #368a42 6px 12px); border: 3px solid #fff; image-rendering: pixelated; }
.card.slot { background: rgba(255,255,255,.45); border: 1px dashed #b9d6b4; box-shadow: none; }
.card.held { outline-color: #e2b84a; }
.pk-card small { color: var(--gold); }

/* ---------- places autour de la table */
.seat, .uc-player { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-1); }
.seat.empty { background: rgba(255,255,255,.5); border-color: #cfe3cb; box-shadow: none; color: var(--muted); }
.seat.mine, .uc-player.mine { background: var(--green-soft); border-color: var(--positive-line); }
.seat.active, .uc-player.active { border-color: #e2b84a; box-shadow: 0 0 0 3px rgba(226,184,74,.3) !important; }
.seat.winner, .uc-player.winner { border-color: var(--green); box-shadow: 0 0 0 3px rgba(63,154,75,.28) !important; }
.seat-res { color: var(--green-ink); }
.chip-bet { background: var(--gold-soft); color: var(--gold); }
.badge-d { background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.tag { background: var(--card-2); border: 1px solid var(--line); }
.cd { background: var(--gold-soft); color: var(--gold); } .cd.urgent { background: #fdecea; color: var(--red); }
.tbar, .pbar { background: #ece7de; box-shadow: none; }
.tbar b, .pbar b { background: var(--green); box-shadow: none; }
.tbar b.urgent, .pbar b.urgent { background: var(--red); box-shadow: none; }

/* ---------- commandes (dock) et règles */
.tbl-controls:not(:empty) { background: var(--card) !important; border: 1px solid var(--line); box-shadow: var(--shadow-1); border-radius: var(--r); }
@media (max-width: 1023px) {
  .tbl-controls:not(:empty) { background: var(--card) !important; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 20px rgba(60,50,30,.08); border-bottom: 0; }
}
.cas-rules, .room-live, .tchat, .crash-players, .roul-players, .duel-row, .duel-hist .cp-row { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-1); }
.cas-pay { background: var(--card); } .cas-pay tr.hit td { color: var(--green-ink); background: var(--green-soft); }
.tchat input { background: #fff; color: var(--text); }
.tchat-log b { color: var(--green-ink); }
.cp-row + .cp-row { border-top-color: var(--line); }
.cp-row.me .who { color: var(--green-ink); }
.cp-row.won > span:last-child { color: var(--green-ink); }
.play-row.me { background: var(--green-soft); } .play-row.won { background: var(--gold-soft); }
.spin-row.won { background: var(--gold-soft); }

/* ---------- jetons de mise */
.rtoken { border: 3px dashed rgba(255,255,255,.75); box-shadow: 0 2px 0 rgba(0,0,0,.15), var(--shadow-1); }
.rtoken.v10 { background: #5b8fd1; } .rtoken.v50 { background: #3f9a4b; } .rtoken.v100 { background: #3a3f37; } .rtoken.v500 { background: #8a62c9; }
.rtoken.v1000 { background: #e2b84a; color: #4a3500; } .rtoken.v5000 { background: #d9483f; }
.rtoken.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--green), 0 6px 12px rgba(60,50,30,.18); }
.cas-chips button { background: var(--card); color: var(--gold); border-color: var(--line); }

/* ---------- machines à sous */
.jackpot { background: linear-gradient(180deg, #fff8e6, var(--gold-soft)); border: 2px solid #e9c46a; color: var(--gold); box-shadow: var(--shadow-1); }
.jackpot b { text-shadow: none; color: #9a6a06; }
.jackpot small { color: #8a7a55; }
.reel { background: #fff; border: 3px solid #e7e1d6; box-shadow: inset 0 -8px 16px rgba(60,50,30,.08), var(--shadow-1); border-radius: 14px; }
@keyframes reelWin { 0%, 100% { border-color: #e7e1d6; } 50% { border-color: #e2b84a; box-shadow: 0 0 0 4px rgba(226,184,74,.35); } }
@keyframes jackpotHit { 0%, 100% { box-shadow: 0 0 0 0 rgba(226,184,74,0); } 50% { box-shadow: 0 0 0 6px rgba(226,184,74,.4), 0 0 30px rgba(226,184,74,.45); } }

/* ---------- crash */
.crash-screen { background: linear-gradient(180deg, #ffffff 0%, #eef6ec 100%); border-color: var(--line); box-shadow: var(--shadow-1); }
.crash-rocket { filter: drop-shadow(0 2px 3px rgba(60,50,30,.3)); }
.crash-mult { color: var(--text); text-shadow: 0 2px 0 rgba(255,255,255,.8); }
.crash-mult.betting { color: var(--muted); text-shadow: none; }
.crash-mult.good { color: var(--green-ink); } .crash-mult.gold { color: var(--gold); } .crash-mult.low { color: #c0736c; }
.cash-btn { background: linear-gradient(180deg, #f0c85a, #d9a52a); color: #3d2b00; box-shadow: 0 4px 0 #a8791a; animation: none; }

/* ---------- roulette */
.wheel-wrap canvas { box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--line), var(--shadow-2); }
.ball-track .ball { background: radial-gradient(circle at 35% 35%, #fff, #d9d3c8); box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 2px 3px rgba(0,0,0,.3); }
.wheel-pointer { border-top-color: var(--green); filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.wheel-result.red { background: #d9483f; } .wheel-result.black { background: #2b2f2a; } .wheel-result.green { background: #3f9a4b; }
.rb { border: 1px solid rgba(0,0,0,.06); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.rb.red, .rb.out.red { background: #d9483f; } .rb.black, .rb.out.black { background: #2b2f2a; } .rb.green { background: #3f9a4b; }
.rb.out { background: #fff; color: var(--text); border-color: var(--line); }
.rb.out.red, .rb.out.black, .rb.red, .rb.black, .rb.green { color: #fff; }
.rb:hover { filter: brightness(1.06); }
.rchip { background: #fff; border-color: #b9b2a4; color: var(--text); }
.rchip.mine { background: #e2b84a; border-color: #a8791a; }
.rnum.black { border: 0; background: #2b2f2a; } .rnum.red { background: #d9483f; } .rnum.green { background: #3f9a4b; }

/* ---------- mines, plinko, pile ou face */
.tile { box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 1px 3px rgba(60,50,30,.15); border-radius: 10px; }
.tile.gem { background: var(--green-soft); box-shadow: inset 0 0 0 2px #9fd09a; }
.tile.boom { background: #fdecea; box-shadow: inset 0 0 0 2px var(--red), 0 0 14px rgba(217,72,63,.3); }
.tile.bomb-shown { background: #f4efe7; opacity: .8; }
.pbin { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.pbin.cold { background: var(--card-2); } .pbin.warm { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }
.pbin.hot { background: #fdecea; color: var(--red); border-color: #f2c2be; }
.plinko-board { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); padding: 6px; }
.coin .or { box-shadow: inset 0 0 0 6px #b98a22, 0 6px 14px rgba(60,50,30,.18); } .coin .fer { box-shadow: inset 0 0 0 6px #8a9096, 0 6px 14px rgba(60,50,30,.18); }
.duel-row.mine { border-color: var(--positive-line); background: var(--green-soft); }

/* ---------- undercover */
.uc-secret { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.uc-secret b { color: var(--green-ink); } .uc-secret.white b { color: var(--text); }
.uc-player.ready { border-color: var(--positive-line); }
.uc-role { color: var(--muted); }
.uc-clues span { background: var(--card-2); border: 1px solid var(--line); }
.btn-ghost.voted { color: var(--gold); border-color: #e2b84a; background: var(--gold-soft); }

/* ---------- gains : pépites qui jaillissent (déjà) + petit alpaga content */
.cas-msg.good::before { content: ''; display: inline-block; width: 20px; height: 20px; margin-right: 6px; vertical-align: -4px;
  background: url(/mascotte-pixel-clin.png?v=4) center / contain no-repeat; image-rendering: pixelated; }
.game-ic, .game-icon, [data-theme="dark"] .game-ic { background: none !important; border: 0 !important; box-shadow: none !important; }
.game-ic .mci, .game-icon .mci { width: 36px; height: 36px; }
/* blackjack : deux mains après « séparer » */
.bj-hands { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bj-hand { padding: 4px; border-radius: 10px; border: 1px dashed var(--line); display: flex; flex-direction: column; gap: 4px; }
.bj-hand.on { border: 2px solid #e2b84a; background: var(--gold-soft); }
/* machine à sous 3×3 */
.slots3 { display: flex; gap: clamp(6px, 2vw, 12px); }
.reel3 { --cell: clamp(58px, 17vw, 82px); position: relative; overflow: hidden; width: clamp(72px, 22vw, 104px); height: calc(var(--cell) * 3);
  background: #fff; border: 3px solid #e7e1d6; border-radius: 14px; box-shadow: inset 0 -8px 16px rgba(60,50,30,.08), var(--shadow-1); }
.reel3 > .cell, .reel3 .strip > .cell { height: var(--cell); display: grid; place-items: center; }
.reel3 .strip { position: absolute; inset: 0 0 auto 0; }
.reel3 .cell .mci { width: 62%; height: 62%; }
.reel3 .strip .mci { filter: blur(.5px); }
.reel3 > .cell.win { background: var(--gold-soft); box-shadow: inset 0 0 0 2px #e2b84a; border-radius: 10px; animation: pop .35s var(--ease); }
.reel3 > .cell:nth-child(2) { background: rgba(63,154,75,.05); }
.reel3 > .cell.win:nth-child(2) { background: var(--gold-soft); }
.free-banner { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #efe6fb; color: #5b3d99; font-weight: 600; font-size: 14px; }
.free-banner .mci { width: 22px; height: 22px; }
.auto-row { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
[data-theme="dark"] .reel3 { background: var(--card-2); border-color: var(--line); }
[data-theme="dark"] .free-banner { background: #2d2538; color: #cdb7f5; }
/* double ou rien, hi-lo */
.big-card .card { width: clamp(78px, 22vw, 104px); padding: 6px 8px; }
.big-card .card span { font-size: clamp(20px, 5vw, 26px); }
.big-card .card b { font-size: clamp(32px, 9vw, 44px); }
.dbl-row { display: flex; align-items: center; gap: 14px; justify-content: center; }
.dbl-prev { opacity: .5; }
.dbl-amount { font-size: 15px; color: var(--text); } .dbl-amount b { color: var(--gold); font-size: 18px; }
.hilo-hist { display: flex; gap: 4px; justify-content: center; min-height: 30px; opacity: .7; }
.hl-btn { display: flex; flex-direction: column; line-height: 1.15; }
.hl-btn small { font-size: 11px; font-weight: 600; opacity: .85; color: inherit; }
.double-btn { border-color: #e2b84a !important; color: var(--gold) !important; }
/* la tour */
.tw-grid { display: flex; flex-direction: column; gap: 5px; width: min(100%, 380px); }
.tw-row { display: grid; grid-template-columns: 20px 1fr 52px; gap: 8px; align-items: center; opacity: .55; }
.tw-row.cur { opacity: 1; } .tw-row.passed { opacity: .9; }
.tw-n { font: 700 11px var(--pixel); color: var(--muted); text-align: right; }
.tw-m { font: 700 12px Inter, sans-serif; color: var(--muted); }
.tw-row.cur .tw-m { color: var(--gold); }
.tw-cells { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 5px; }
.tw-cell { min-height: var(--target); border-radius: 8px; border: 0; background: url(/mc/block/stone_bricks.png) center / 32px; image-rendering: pixelated;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); display: grid; place-items: center; cursor: default; }
.tw-cell .mci { width: 24px; height: 24px; }
.tw-cell.open { background-image: url(/mc/block/oak_planks.png); cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 2px #e2b84a; transition: transform .12s; }
.tw-cell.open:hover { transform: translateY(-2px); }
.tw-cell.safe { background: var(--green-soft); box-shadow: inset 0 0 0 2px #9fd09a; }
.tw-cell.tw-boom { background: #fdecea; box-shadow: inset 0 0 0 2px var(--red); }
.tw-cell.trap { background: #f4efe7; opacity: .8; }
[data-theme="dark"] .tw-cell.tw-boom { background: #3a1f1c; } [data-theme="dark"] .tw-cell.trap { background: #2b2a25; }
/* double ou rien : carte du croupier + 4 cartes cachées */
.dbl-row { flex-wrap: wrap; }
.dbl-dealer { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-right: 14px; border-right: 1px dashed var(--line); }
.dbl-dealer small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dbl-picks { display: flex; gap: 8px; }
.dbl-picks button.pk-card { cursor: pointer; transition: transform .15s; background: none; border: 0; padding: 0; }
.dbl-picks button.pk-card:hover { transform: translateY(-4px); }
.dbl-other { opacity: .45; }
.dbl-mine .card { box-shadow: 0 0 0 3px var(--gold); }

/* Les commandes gardent une cible tactile entière, même dans les jeux compacts. */
.cas-chips button, .ctl-row.small .btn-ghost { min-height: var(--target); }
.rb-nums6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rb-nums6 .rb { min-width: var(--target); }
.rchip { pointer-events: none; }
.roul-side .cp-row { grid-template-columns: minmax(0, 1fr) auto; }
.roul-side .cp-row > span:last-child:not(:empty) { grid-column: 1 / -1; }
@media (max-width: 1023px) {
  .vp-hand { width: 100%; }
  .vp-hand .pk-card { flex: 1; min-width: 0; }
  .vp-hand .card { width: 100%; max-width: 58px; }
  .vp-hand .pk-card small { font: 600 10px/1.2 Inter, sans-serif; overflow-wrap: anywhere; }
  .tbl-controls .chipbet .rchips { flex-wrap: wrap; }
  .tw-cell { min-width: var(--target); }
}

/* ---------- salon des mini-jeux : argent à droite du titre, titre comme « Social », historique en un seul bloc */
.casino.hub .cas-head { flex-wrap: nowrap; }
.casino.hub .cas-head > div:first-child { flex: 1 1 auto; }
.casino.hub .cas-head > .cas-balance { margin: 0; flex: none; flex-direction: row; align-items: center; }
.cas-feed { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.cas-feed .feed-item { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 10px 14px; }
.cas-feed .feed-item + .feed-item { border-top: 1px solid var(--line); }
.cas-feed .feed-item:nth-child(n+3) { display: flex; }

/* description courte d'un jeu : une seule ligne */
.games-list .row-text { min-width: 0; }
.games-list .row-text > .game-desc { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- en-tête des mini-jeux : retour rond, titre, argent à droite ; reste en haut au défilement */
.casino .cas-head { position: sticky; top: calc(var(--appbar) + env(safe-area-inset-top)); z-index: 20; display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-2);
  margin: 0 -16px 12px; padding: 8px 16px; background: var(--bg); border-bottom: 0; }
.casino .cas-head .page-title { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.casino .cas-back { flex: none; width: var(--target); height: var(--target); display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line);
  color: var(--text); font: 400 26px/1 Inter, sans-serif; padding-bottom: 3px; }
.casino .cas-back:active { background: var(--card-2); }
.casino .cas-head > .cas-balance { flex: none; margin: 0; }

/* ---------- mise : « Mise » au centre, Effacer et ×2 de part et d'autre des jetons */
.chipbet-top { gap: 10px; }
.chipbet-row { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.chipbet-row > .btn-ghost { flex: none; min-height: var(--target); padding: 0 12px; }
.chipbet-row .rchips { flex: 0 1 auto; justify-content: center; gap: 8px; }
@media (max-width: 1023px) {
  .casino.in-game { padding-bottom: calc(var(--dock-h, 0px) + var(--space-6)); }
  /* commandes fixées juste au-dessus des onglets, en permanence */
  .casino.in-game .tbl-controls:not(:empty) { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--safe-b)); margin: 0; z-index: 25;
    padding: 10px 12px; border-radius: 18px 18px 0 0; }
  .chipbet-row { gap: 6px; }
  .chipbet-row .rchips { gap: 5px; }
  .chipbet-row .rtoken { width: 40px; height: 40px; border-width: 3px; font-size: 11px; }
  .chipbet-row > .btn-ghost { padding: 0 8px; font-size: 13px; }
}

/* ---------- jeux de cartes (blackjack, poker) : autres joueurs en haut, tapis au centre, notre place en bas collée aux mises */
.cardtbl { display: flex; flex-direction: column; gap: 10px; }
.cardtbl > .seats { margin: 0; }
.seats.mine-row { grid-template-columns: minmax(0, 1fr) !important; }
.seats.mine-row .seat.mine { grid-column: auto; }
.cardtbl > .seats.others.poker-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cardtbl > .seats.others .seat.empty { min-height: 60px; }
@media (max-width: 1023px) {
  /* le bloc remplit l'écran entre l'en-tête et les commandes : notre place descend contre les mises */
  .casino.in-game .cardtbl { min-height: 0; }
    .cardtbl > .seats.others { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .cardtbl > .seats.others .seat-cards .card.sm { width: 34px; }
}
/* une seule barre de temps (celle du haut) ; notre place est centrée */
.cardtbl .tbar { display: none; }
.seats.mine-row .seat-top, .seats.mine-row .seat-cards, .seats.mine-row .seat-foot,
.seats.mine-row .bj-hands { justify-content: center; }
.seats.mine-row .seat { align-items: center; text-align: center; }

/* grand tapis, cartes plus grandes (croupier, board, nos cartes) */
@media (max-width: 1023px) {
  .casino.in-game .cardtbl > .felt { flex: 1 1 auto; }
  .cardtbl > .felt .card { width: clamp(64px, 19vw, 84px); padding: 5px 6px; }
  .cardtbl > .felt .card span { font-size: 18px; }
  .cardtbl > .felt .card b { font-size: 30px; }
  .seats.mine-row .seat .card.sm { width: clamp(52px, 15vw, 64px); padding: 4px 5px; border-radius: 6px; }
  .seats.mine-row .seat .card.sm span { font-size: 15px; }
  .seats.mine-row .seat .card.sm b { font-size: 22px; }
  .cardtbl > .seats.others .seat-cards .card.sm { width: 38px; }
}
@media (min-width: 1024px) {
  .cardtbl > .felt .card { width: 84px; padding: 6px 7px; }
  .seats.mine-row .seat .card.sm { width: 76px; padding: 5px 6px; }
  .seats.mine-row .seat .card.sm b { font-size: 26px; }
  .seats.mine-row .seat .card.sm span { font-size: 16px; }
}
.seats.mine-row .seat-foot .cd { display: none; }

/* notre place est dans le bloc des commandes, juste au-dessus des mises */
.tbl-controls > .seats.mine-row { margin: 0 0 8px; grid-template-columns: minmax(0, 1fr) !important; }
.tbl-controls > .seats.mine-row .seat { background: var(--green-soft); }

/* notre place : ni pseudo ni avatar ; la mise et le score passent en haut, au-dessus des cartes */
.seats.mine-row .seat-top > img, .seats.mine-row .seat-top .seat-name, .seats.mine-row .seat-top .avatar { display: none; }
.seats.mine-row .seat > .seat-foot { order: -1; }
.seats.mine-row .seat-foot { font-size: 15px; }

/* Lot 1 : état visible dans les commandes, sans déplacer le tapis ni les onglets. */
.casino .dock-status { margin: 0; min-height: 1.4em; font: 600 12px/1.4 Inter, sans-serif; text-align: center; overflow-wrap: anywhere; }
.casino .dock-status.good::before { content: none; }
.casino .dock-status.bad { color: var(--red); }
.casino .dock-status.good { color: var(--green-ink); }
#cas-connection { flex-basis: 100%; text-align: right; font: 12px/1.2 Inter, sans-serif; color: var(--muted); }
.casino .cas-head:has(#cas-connection:not([hidden])) { flex-wrap: wrap; }
.casino button[aria-busy="true"] { cursor: wait; }
.chipbet-top { flex-wrap: wrap; gap: 4px 10px; }
.chipbet-top small, .stake-hint { font: 12px/1.3 Inter, sans-serif; color: var(--text); text-align: center; }
.stake-hint { min-height: 1.3em; }
/* Cible de 44 px, dessin de 40 px ; les couleurs restent identiques dans les deux thèmes. */
.chipbet-row .rtoken { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 2px; flex: none; border: 0; background: transparent; box-shadow: none; }
.chipbet-row .rtoken span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.75); background: var(--chip-color); box-shadow: 0 2px 0 rgba(0,0,0,.15); color: #fff; }
.chipbet-row .rtoken.v10 { --chip-color: #326da9; }
.chipbet-row .rtoken.v50 { --chip-color: #2d7936; }
.chipbet-row .rtoken.v100 { --chip-color: #3a3f37; }
.chipbet-row .rtoken.v500 { --chip-color: #7045a9; }
.chipbet-row .rtoken.v1000 { --chip-color: #e2b84a; }
.chipbet-row .rtoken.v1000 span { color: #4a3500; }
.chipbet-row .rtoken.v5000 { --chip-color: #b3342c; }
/* Les rouleaux contiennent exactement trois cases, plus leurs bordures. */
.reel3 { height: calc(var(--cell) * 3 + 6px); }
.jackpot::before { animation: none; }
.jackpot.hit::before { animation: pop .4s var(--ease) 2 alternate; }
.jackpot.hit { animation: jackpotHit .6s ease-in-out 2; }
.hl-btn small { font-size: 12px; opacity: 1; }
.hilo-hist { opacity: 1; }
.hl-history-card { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hl-history-card small { font: 12px/1.2 Inter, sans-serif; color: var(--text); }
.vp-hand .pk-card small { min-height: 16px; font: 600 12px/1.3 Inter, sans-serif; color: var(--text); }
.vp-hand .pk-card.out .card { opacity: 1; filter: none; outline: 2px solid var(--red); outline-offset: 2px; transform: translateY(3px); }
.vp-hand .pk-card.out { opacity: 1; filter: none; }
.vp-hand .pk-card.out small { color: var(--red); }
.tw-row { opacity: 1; }
.tw-row:not(.cur) .tw-cell { min-height: 22px; }
.tw-row:not(.cur) .tw-cell:not(.safe):not(.tw-boom) { opacity: .6; }
.tw-row.cur .tw-cell { min-height: max(52px, calc(var(--game-target, 44px) / var(--game-zoom, 1))); }
.tw-row.fatal .tw-cell.tw-boom { opacity: 1; outline: 3px solid var(--red); outline-offset: 1px; min-height: 38px; }
.tw-n, .tw-m { font-size: 12px; }
.keyboard-help { font-size: 12px; }
@media (max-width: 1023px) {
  .keyboard-help { display: none; }
  .casino.in-game .tbl-controls { gap: 6px; }
  .casino .chipbet { gap: 3px; }
  .casino .chipbet-row { flex-wrap: wrap; justify-content: center; gap: 3px; }
  .casino .chipbet-row .rchips { gap: 2px; flex-wrap: wrap; }
  .casino .chipbet-row > .btn-ghost { min-height: 44px; }
  .cas-table.mines .mines-grid { width: min(100%, calc((var(--game-target, 44px) * 5 + 16px) / var(--game-zoom, 1))); gap: 4px; }
  .mines-grid .tile:not(:disabled) { min-height: calc(var(--game-target, 44px) / var(--game-zoom, 1)); }
  .mines-info { flex-wrap: wrap; gap: 3px 8px; font-size: 12px; }
  #tbl-game.fit-compact > .cas-table, #tbl-game.fit-compact > .felt { padding: 8px; gap: 4px; }
  #tbl-game.fit-compact .jackpot { margin-bottom: 4px; padding: 6px 8px; }
  #tbl-game.fit-compact .jackpot b { font-size: 24px; }
  #tbl-game.fit-compact .hilo-hist { min-height: 0; }
  #tbl-game.fit-compact .tw-grid { gap: 3px; }
  #tbl-game.fit-compact .felt-status { margin: 0; }
  .dbl-row { flex-direction: column; gap: 10px; width: 100%; }
  .dbl-dealer { padding: 0; border-right: 0; }
  .dbl-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 360px; gap: 8px; }
  .dbl-picks .pk-card { min-width: 0; }
  .dbl-picks .card { width: 100%; max-width: 64px; }
  .dbl-picks button.pk-card { min-height: calc(var(--game-target, 44px) / var(--game-zoom, 1)); }
}
@media (prefers-reduced-motion: reduce) {
  .jackpot.hit, .jackpot::before, .jackpot.hit::before { animation: none; }
  .vp-hand .pk-card, .tw-cell.open { transition: none; }
}
@media (max-width: 1023px) {
  .vp-hand button.pk-card:not(:disabled) { min-height: calc(var(--game-target, 44px) / var(--game-zoom, 1)); min-width: calc(var(--game-target, 44px) / var(--game-zoom, 1)); }
  #tbl-game.fit-compact .vp-hand { gap: 4px; }
}

.hl-btn:disabled { opacity: 1; background: var(--card-2); color: var(--text); border-color: var(--line); }

@media (max-width: 1023px) {
  .tw-row.cur .tw-cell { min-width: calc(var(--game-target, 44px) / var(--game-zoom, 1)); }
  .dbl-picks { grid-template-columns: repeat(4, minmax(calc(var(--game-target, 44px) / var(--game-zoom, 1)), 1fr)); }
}

/* Lot 2 : tables lisibles, résultats par main et discussion dans la place disponible. */
.casino .pk-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(3px, 1vw, 8px); width: 100%; max-width: 452px; }
.casino .cardtbl > .felt .pk-board .card { width: 100%; max-width: 84px; min-width: 0; }
.casino .card.red { color: #b93830; }
.casino .card.best-card { border-bottom: 4px solid #8a630b; box-shadow: 0 3px 0 #8a630b; }
.casino .badge-d { width: auto; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 5px; color: var(--text); }
.casino .seat.folded { opacity: 1; }
.casino .seat-res.neutral { color: var(--text); }
.casino .seat-res.victory, .casino .bj-hand.victory .seat-res { color: var(--green-ink); }
.casino .seat-res.defeat, .casino .bj-hand.defeat .seat-res { color: var(--table-loss, var(--red)); }
.casino .bj-hand.victory { border-bottom: 2px solid var(--green-ink); }
.casino .bj-hand.defeat { border-bottom: 2px solid var(--table-loss, var(--red)); }
.casino .bj-hand.neutral { border-bottom: 2px solid var(--line); }
.casino .bj-hand { min-width: 0; }
.casino .bj-hand-label { font: 600 12px/1.3 Inter, sans-serif; color: var(--text); }
.casino .seat.selected { border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.casino .seat.empty button { min-height: calc(44px / var(--game-zoom, 1)); width: 100%; padding: 6px; white-space: normal; }
.casino .more-players, .casino .return-note { margin: 0; text-align: center; color: var(--text); font: 12px/1.3 Inter, sans-serif; }
.casino .tchat-body { display: flex; flex-direction: column; min-height: 0; }
.casino .tchat-log > div { flex: none; }
.casino .tchat-log, .casino .tchat-log b, .casino .tchat summary { color: var(--text); }
.casino #tchat-new { min-height: 44px; margin-top: 4px; }
.casino #tchat-new[hidden] { display: none; }
.casino .page-sub { display: block; }
@media (max-width: 1023px) {
  .casino .tchat[open] { position: fixed; z-index: 35; left: 8px; right: 8px; top: var(--chat-top, 120px); height: var(--chat-height, 45dvh); max-height: var(--chat-height, 45dvh); margin: 0; display: flex; flex-direction: column; overflow-y: auto; }
  .casino .tchat[open] summary { flex: none; }
  .casino .tchat[open] .tchat-body { height: var(--chat-body-height, calc(var(--chat-height, 45dvh) - 76px)); overflow-y: auto; flex: none; }
  .casino .tchat[open] .tchat-log { min-height: 0; max-height: none; flex: 1 1 0; }
  .casino .tchat[open] form, .casino #tchat-new { flex: none; }
  .casino .cardtbl > .felt .pk-board .card { max-width: 76px; padding: 4px; }
  .casino .pk-board .card span { font-size: clamp(13px, 4vw, 18px); }
  .casino .pk-board .card b { font-size: clamp(20px, 6vw, 30px); }
  .casino .cardtbl { gap: 6px; }
  .casino .cardtbl > .seats.others .seat { min-height: 0; padding: 5px; gap: 3px; }
  .casino .cardtbl > .seats.others .seat-foot, .casino .cardtbl > .seats.others .seat-res { font-size: 12px; }
  .casino #tbl-game.fit-compact .cardtbl > .felt { padding: 8px; gap: 5px; min-height: 0; }
  .casino .games-list .row-text > .game-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .casino .tchat summary::after { transition: none; }
}

.casino .bj-hands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.casino .bj-hands:not(.split) { grid-template-columns: minmax(0, 1fr); }
.casino .mine-row .bj-hands { width: 100%; max-width: 480px; }
@media (max-width: 1023px) {
  .casino .tchat:not([open]) { position: fixed; z-index: 26; right: 12px; bottom: calc(var(--dock-h, 0px) + var(--tabbar) + var(--safe-b) + 8px); max-width: calc(100% - 24px); padding: 4px 10px; margin: 0; }
  .casino .cardtbl > .seats.others .bj-hands.split { grid-template-columns: minmax(0, 1fr); }
  /* Sur écran court, toutes les commandes restent accessibles sans recouvrir l'en-tête. */
  .casino:has(.cardtbl) .tbl-controls { max-height: min(62dvh, calc(100dvh - var(--appbar) - var(--tabbar) - var(--safe-b) - 140px)); overflow-y: auto; }
}

[data-theme="dark"] .casino { --table-loss: #f47d73; }
.casino .seats .seat.winner { border-color: var(--green-ink); }

/* Moumoute · mode sombre (réglage du profil : activé / auto / désactivé → html[data-theme="dark"]).
   Même direction que le thème clair, en version nuit : fond brun-noir chaud, panneaux gris foncé, vert Moumoute plus lumineux. */
:root[data-theme="dark"] {
  --bg: #161512;
  --bg-2: #1e1d19;
  --card: #23221e;
  --card-2: #2b2a25;
  --line: #3a3831;
  --text: #ece8df;
  --muted: #a39e92;
  --green: #327d3d;
  --green-2: var(--green);
  --bedrock: #9ebcff;
  --positive-line: #2f5a34;
  --negative-soft: #3a1f1c;
  --negative-line: #6b2e2a;
  --gold-line: #4d4020;
  --switch-off: #4a463d;
  --green-ink: #86d690;
  --green-soft: #1f3222;
  --gold: #e6bd55;
  --gold-soft: #332a14;
  --red: #ec6a60;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 28px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
:root[data-theme="dark"] ::selection { background: #2f5a34; }

/* barres */
[data-theme="dark"] .appbar { background: rgba(22, 21, 18, .92) !important; }
@media (max-width: 1023px) { [data-theme="dark"] .tabbar { background: rgba(30, 29, 25, .96) !important; box-shadow: 0 -4px 20px rgba(0,0,0,.35); } }
[data-theme="dark"] .row .chev { color: #6d685d; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--bg-2) !important; }
[data-theme="dark"] .code-input::placeholder { color: #57534a; }
[data-theme="dark"] .sheet-bg.open { background: rgba(0, 0, 0, .55); }
[data-theme="dark"] .sheet-grip::before { background: var(--muted); }
[data-theme="dark"] .toast { background: var(--card-2); }
[data-theme="dark"] .toast.ok { border-color: #2f5a34; } [data-theme="dark"] .toast.bad { border-color: #6b2e2a; }
[data-theme="dark"] label.check span::before { background: var(--bg-2); border-color: #5a564c; }
[data-theme="dark"] .btn { box-shadow: 0 2px 0 #2c7437, var(--shadow-1); }

/* accueil, quêtes, événement, classements */
[data-theme="dark"] .box.event, [data-theme="dark"] .ev-banner { background: linear-gradient(135deg, var(--gold-soft), var(--card) 70%); border-color: #4d4020; }
[data-theme="dark"] .ev-rank, [data-theme="dark"] .ev-close { background: var(--card); border-color: #4d4020; }
[data-theme="dark"] .box.cta { border-color: #2f5a34; }
[data-theme="dark"] .dd.done, [data-theme="dark"] .chip.d-easy { border-color: #2f5a34; }
[data-theme="dark"] .dd.cur { box-shadow: inset 0 0 0 2px #8a6d22; }
[data-theme="dark"] .chip.d-med { border-color: #4d4020; }
[data-theme="dark"] .chip.d-hard { background: #3a1f1c; border-color: #6b2e2a; }
[data-theme="dark"] .bar, [data-theme="dark"] .adv-ring::before { background: #33312b; }
[data-theme="dark"] .adv-ring { background: conic-gradient(var(--green) calc(var(--p) * 1%), #33312b 0); }
[data-theme="dark"] .adv.done { background: var(--card-2); }
[data-theme="dark"] .adv.done.challenge { background: linear-gradient(135deg, var(--card-2), #2d2538); border-color: #5b4a78; }
[data-theme="dark"] .c-rk div.top, [data-theme="dark"] .podium3 .p1 { border-color: #4d4020; }
[data-theme="dark"] .podium3 span { background: var(--card-2); color: var(--text); }
[data-theme="dark"] .podium3 .p1 span, [data-theme="dark"] .podium3 .p2 span, [data-theme="dark"] .podium3 .p3 span { color: #1b1a16; }
[data-theme="dark"] .c-f.on .av { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--green); }
[data-theme="dark"] .tab-badge { box-shadow: 0 0 0 2px var(--card); }
[data-theme="dark"] .msg.mine { border-color: #2f5a34 !important; }
[data-theme="dark"] .fancy { color: #6fd0e8; } [data-theme="dark"] .ench { color: #b9a4ff; }

/* carte */
[data-theme="dark"] .map-btn, [data-theme="dark"] .map-hint { background: rgba(35, 34, 30, .96) !important; color: var(--text) !important; border-color: var(--line); }
[data-theme="dark"] .map-btn.primary { background: var(--green) !important; color: #fff !important; }
[data-theme="dark"] .pt-del { background: var(--card); }
[data-theme="dark"] .pt-c span { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
[data-theme="dark"] .pt-c input:checked + span { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--text); }

/* mini-jeux : tapis vert profond, cartes restent blanches */
[data-theme="dark"] .cas-table, [data-theme="dark"] .felt {
  background: radial-gradient(ellipse at 50% 35%, #22402a 0%, #182e1e 80%); border-color: #2c4a33;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.04), inset 0 0 0 7px #2c4a33, var(--shadow-1); }
[data-theme="dark"] .card { border-color: #d9d3c8; }
[data-theme="dark"] .card.back { border-color: #2b2a25; }
[data-theme="dark"] .card.slot { background: rgba(255,255,255,.04); border-color: #3b5c43; }
[data-theme="dark"] .seat.empty { background: rgba(255,255,255,.03); border-color: #2c4a33; }
[data-theme="dark"] .seat.mine, [data-theme="dark"] .uc-player.mine, [data-theme="dark"] .duel-row.mine { border-color: #2f5a34; }
[data-theme="dark"] .tbl-controls:not(:empty) { background: var(--card) !important; }
@media (max-width: 1023px) { [data-theme="dark"] .tbl-controls:not(:empty) { background: var(--card) !important; box-shadow: 0 -6px 20px rgba(0,0,0,.4); } }
[data-theme="dark"] .badge-d { background: var(--card-2); }
[data-theme="dark"] .cd.urgent { background: #3a1f1c; }
[data-theme="dark"] .tbar, [data-theme="dark"] .pbar { background: #33312b; }
[data-theme="dark"] .rtoken { border-color: rgba(255,255,255,.6); }
[data-theme="dark"] .rtoken.sel { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--green), 0 6px 12px rgba(0,0,0,.4); }
[data-theme="dark"] .jackpot { background: linear-gradient(180deg, #3a3018, var(--gold-soft)); border-color: #8a6d22; }
[data-theme="dark"] .jackpot b { color: var(--gold); } [data-theme="dark"] .jackpot small { color: #b8a57a; }
[data-theme="dark"] .reel { background: var(--card-2); border-color: var(--line); }
[data-theme="dark"] .crash-screen { background: linear-gradient(180deg, #23221e 0%, #1c2a1f 100%); }
[data-theme="dark"] .crash-mult { text-shadow: none; }
[data-theme="dark"] .rb.out { background: var(--card-2); color: var(--text); }
[data-theme="dark"] .rb.out.red { background: #d9483f; color: #fff; border-color: #d9483f; }
[data-theme="dark"] .rchip { background: var(--card-2); color: var(--text); }
[data-theme="dark"] .wheel-wrap canvas { box-shadow: 0 0 0 6px var(--card), 0 0 0 7px var(--line), var(--shadow-2); }
[data-theme="dark"] .tile.gem { box-shadow: inset 0 0 0 2px #2f7a3a; }
[data-theme="dark"] .tile.boom { background: #3a1f1c; }
[data-theme="dark"] .tile.bomb-shown { background: #2b2a25; }
[data-theme="dark"] .pbin { background: var(--card-2); }
[data-theme="dark"] .pbin.warm { border-color: #4d4020; } [data-theme="dark"] .pbin.hot { background: #3a1f1c; border-color: #6b2e2a; }
[data-theme="dark"] .plinko-board { background: var(--card-2); }
[data-theme="dark"] .uc-secret { background: var(--card-2); }
[data-theme="dark"] .btn-ghost.voted { border-color: #8a6d22; }

[data-theme="dark"] .rb.black, [data-theme="dark"] .rb.out.black, [data-theme="dark"] .rnum.black, [data-theme="dark"] .wheel-result.black { background: #0c0c0b; border: 1px solid #45423a; }
[data-theme="dark"] .adv.open { border-color: #2f5a34; }

/* Petits textes de jeu : lisibles sur les panneaux de nuit. */
[data-theme="dark"] .pos, [data-theme="dark"] .c-ok { color: var(--green-ink); }
[data-theme="dark"] .pbin.warm { background: var(--gold-soft); }
[data-theme="dark"] .crash-mult.low { color: #f0a8a0; }

/* Moumoute : navigation stable et largeurs de lecture, sans agrandissement global. */
.wk-side { display: none; }
.messages-sidebar { min-width: 0; }
.discussion { min-width: 0; }
.conversation-empty { margin: auto; text-align: center; color: var(--muted); }

@media (max-width: 1023px) {
  .messages-page:not(.conversation-open) .discussion, .conversation-open .messages-sidebar { display: none; }
  .messages-page.conversation-open { padding: 0; }
  .discussion { padding: 16px 16px 0; }
}

@media (min-width: 1024px) {
  :root { --font-title: 26px; --sidebar: 208px; }
  #view { margin-left: var(--sidebar); }
  .appbar .brand { flex: 1; max-width: none; }
  .deskbar { position: fixed; left: 0; top: calc(var(--appbar) + env(safe-area-inset-top)); bottom: 0; width: var(--sidebar);
    display: flex; flex-direction: column; gap: 8px; padding: 24px 12px; margin: 0; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; }
  .deskbar a { gap: 12px; padding: 12px; min-height: 48px; }
  .deskbar a img { width: 26px; height: 26px; image-rendering: pixelated; }
  .deskbar .tab-badge { top: 6px; right: 8px; }
  .page { max-width: 1120px; padding: 24px 28px 48px; }
  .plus-page, .quests-page { max-width: 800px; }

  /* Accueil connecté : colonne « moi » à gauche, quêtes à droite */
  .companion { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 16px 24px; align-items: start;
    grid-template-areas: "ev ev" "me q" "friends q" "ranks q"; grid-template-rows: auto auto auto 1fr; }
  .companion > #home-event { grid-area: ev; } .companion > #c-me { grid-area: me; }
  .companion > #c-quests { grid-area: q; } .companion > #c-ranks { grid-area: ranks; } .companion > #c-friends { grid-area: friends; }
  .companion > #home-event:empty { display: none; }
  .companion .c-me { grid-template-columns: minmax(0, 1fr); }
  .companion .c-money { text-align: left; }
  .companion .adv-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
  .pf-resume .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Le marché garde ses lignes pleine largeur, les mini-jeux leurs deux colonnes. */
  .games-list, .tables-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games-list > .row, .tables-list > .row { border-bottom: 1px solid var(--line); }
  .games-list > .row:nth-child(odd), .tables-list > .row:nth-child(odd) { border-right: 1px solid var(--line); }
  .games-list > .row:last-child, .tables-list > .row:last-child,
  .games-list > .row:nth-last-child(2):nth-child(odd), .tables-list > .row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .casino.page { max-width: 1160px; }
  .casino .cardtbl > .felt .pk-board .card { width: 100%; max-width: 84px; }
  .casino .seat.mine.winner { border-color: var(--green-ink); }
  .casino .tbl-layout { grid-template-columns: minmax(0, 1fr) 280px; }

  .messages-page { max-width: 1320px; display: grid; grid-template-columns: minmax(250px, 32%) minmax(0, 1fr); gap: 24px;
    height: calc(100dvh - var(--appbar) - env(safe-area-inset-top)); padding-bottom: 0; }
  .messages-sidebar { overflow-y: auto; padding: 0 16px 24px 0; border-right: 1px solid var(--line); }
  .discussion { height: 100%; padding: 0; }
  .discussion .back-btn { display: none; }
  .page-chat:not(.discussion) { max-width: 900px; }
  .messages-sidebar .row { padding-left: 4px; padding-right: 4px; }
  .messages-sidebar .row-lead { width: 36px; }

  .wk-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .wk-group { margin: 0; }
  .wk-group .list-title { margin-top: 4px; }
  .wiki-page { display: grid; grid-template-columns: 210px minmax(0, 720px); gap: 28px; justify-content: center; }
  .wk-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--appbar) + 20px); align-self: start;
    max-height: calc(100dvh - var(--appbar) - 40px); overflow-y: auto; padding-right: 6px; }
  .wk-side small { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 10px 4px; }
  .wk-side small:first-child { margin-top: 0; }
  .wk-side a { min-height: var(--target); padding: 10px; border-radius: 10px; color: var(--text); font-size: 14px; }
  .wk-side a:hover { background: var(--card); }
  .wk-side a.on { background: var(--green-soft); color: var(--green-ink); font-weight: 600; }
  .wk-block { padding: 18px 22px; }
  .sheet { max-width: 520px; }
}

@media (min-width: 1600px) {
  :root { --sidebar: 232px; }
  .page { max-width: 1240px; }
  .plus-page, .quests-page { max-width: 800px; }
  .companion { grid-template-columns: minmax(320px, 380px) minmax(0, 1fr); gap: 16px 28px; }
  .messages-page { max-width: 1380px; grid-template-columns: 340px minmax(0, 1fr); }
  .wk-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) { .discussion .conv-friends { display: none; } }

/* Très grands écrans (ultra-larges) : en plus des colonnes adaptées, l'interface est agrandie proportionnellement,
   sinon textes et boutons y deviennent minuscules. --z corrige les hauteurs calculées sur l'écran (carte, messages, guide). */
@media (min-width: 1900px) {
  :root { --z: 1.2; zoom: 1.2; }
  .map-wrap { height: calc(100dvh / var(--z) - var(--appbar)); }
  .map-wrap iframe { zoom: calc(1 / var(--z)); width: calc(100% * var(--z)); height: calc(100% * var(--z)); }
  .messages-page, .page-chat { height: calc(100dvh / var(--z) - var(--appbar)); }
  .wk-side { max-height: calc(100dvh / var(--z) - var(--appbar) - 40px); }
}
@media (min-width: 2300px) { :root { --z: 1.35; zoom: 1.35; } }
@media (min-width: 3000px) { :root { --z: 1.6; zoom: 1.6; } }
@media (min-width: 1900px) and (max-height: 900px) { :root { --z: 1.1; zoom: 1.1; } }
