/* Polices hébergées par le site (licence SIL Open Font License, voir public/fonts) : aucune requête vers Google. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2-variations'), url(../fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/instrument-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/instrument-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/instrument-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/instrument-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/jetbrains-mono-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/jetbrains-mono-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2-variations'), url(../fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/instrument-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/instrument-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/instrument-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/instrument-sans-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/jetbrains-mono-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/jetbrains-mono-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/jetbrains-mono-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* Le Bistrot des Jeux — feuille de style
   Direction : une salle de jeu de nuit. Fond encre, tapis de feutre vert profond, dés ivoire en 3D,
   un accent par jeu (or pour le 10 000, corail pour le Yam's). Thème clair disponible. */
:root {
  --bg: #0B1214;
  --bg-2: #0F191C;
  --surface: #131E22;
  --surface-2: #19272C;
  --surface-3: #213238;
  --line: rgba(220, 240, 235, .09);
  --line-2: rgba(220, 240, 235, .16);
  --ink: #EAF2EF;
  --muted: #8EA29C;
  --faint: #5F726C;
  --felt: #12463C;
  --felt-2: #0A2B25;
  --felt-ink: #E6F2EC;
  --gold: #F2B84B;
  --coral: #FF7D5C;
  --sky: #6DB3F2;
  --violet: #B593F5;
  --rose: #F27BA0;
  --mint: #4FC48F;
  --amber: #F2994A;
  --teal: #5FD0D6;
  --good: #5CCB98;
  --bad: #F26B5B;
  --die: #FBF7EE;
  --die-2: #E9E2D2;
  --pip: #16201D;
  --pip-red: #C8402F;
  --die-hi: #FFFFFF; --pip-hi: #4b5753; --pip-red-hi: #e7705c; --pip-glow: rgba(255, 255, 255, .75);
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .25);
  --p0: #6DB3F2; --p1: #FF7D5C; --p2: #5CCB98; --p3: #C49BF2; --p4: #F2B84B; --p5: #5FD0D6;
  --accent: var(--gold);
  --accent-ink: #1E1503;
  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --f-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --f-num: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --r-sm: 10px; --r: 16px; --r-lg: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #EDF2EF; --bg-2: #E4EBE7; --surface: #FFFFFF; --surface-2: #F4F7F5; --surface-3: #E8EEEB;
  --line: rgba(12, 40, 33, .1); --line-2: rgba(12, 40, 33, .18);
  --ink: #0F1B18; --muted: #566A63; --faint: #8A9B95;
  --felt: #17604F; --felt-2: #0F4639; --felt-ink: #EAF5EF;
  --gold: #C4870F; --coral: #E0563A; --sky: #2F7BC0; --violet: #7B4FCB; --rose: #D2416F; --mint: #1F8A5B; --amber: #C76A16; --teal: #1E8E94; --good: #23885A; --bad: #C8402F;
  --shadow: 0 18px 40px rgba(15, 40, 33, .14); --shadow-sm: 0 6px 16px rgba(15, 40, 33, .1);
  --p0: #2F7BC0; --p1: #E0563A; --p2: #23885A; --p3: #8350C4; --p4: #C4870F; --p5: #1E9AA0;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #EDF2EF; --bg-2: #E4EBE7; --surface: #FFFFFF; --surface-2: #F4F7F5; --surface-3: #E8EEEB;
    --line: rgba(12, 40, 33, .1); --line-2: rgba(12, 40, 33, .18);
    --ink: #0F1B18; --muted: #566A63; --faint: #8A9B95;
    --felt: #17604F; --felt-2: #0F4639; --felt-ink: #EAF5EF;
    --gold: #C4870F; --coral: #E0563A; --sky: #2F7BC0; --violet: #7B4FCB; --rose: #D2416F; --mint: #1F8A5B; --amber: #C76A16; --teal: #1E8E94; --good: #23885A; --bad: #C8402F;
    --shadow: 0 18px 40px rgba(15, 40, 33, .14); --shadow-sm: 0 6px 16px rgba(15, 40, 33, .1);
    --p0: #2F7BC0; --p1: #E0563A; --p2: #23885A; --p3: #8350C4; --p4: #C4870F; --p5: #1E9AA0;
    color-scheme: light;
  }
}
[data-game="yams"] { --accent: var(--coral); --accent-ink: #250903; }
[data-game="10000"] { --accent: var(--gold); --accent-ink: #1E1503; }
[data-game="tarot"] { --accent: var(--violet); --accent-ink: #160B2E; }
[data-game="rami"] { --accent: var(--sky); --accent-ink: #04182B; }
[data-game="bataille"] { --accent: var(--rose); --accent-ink: #2B0412; }
[data-game="belote"] { --accent: var(--mint); --accent-ink: #052014; }
[data-game="crapette"] { --accent: var(--amber); --accent-ink: #2A1302; }
[data-game="421"] { --accent: var(--teal); --accent-ink: #03222A; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--felt) 35%, transparent), transparent 60%);
  background-attachment: fixed;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.1; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
.muted { color: var(--muted); }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 21px; letter-spacing: -.03em; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg, var(--felt), var(--felt-2)); display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px; gap: 1px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.brand-mark i { width: 4px; height: 4px; border-radius: 50%; place-self: center; background: transparent; }
.brand-mark i.on { background: var(--die); }
.top-center { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; justify-content: center; }
.top-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.navlink { text-decoration: none; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.navlink:hover, .navlink.on { color: var(--ink); background: var(--surface-2); }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; position: relative; }
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn.on { color: var(--accent); }
.iconbtn svg { width: 20px; height: 20px; flex: none; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.conn-dot.ok { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.conn-dot.ko { background: var(--bad); }
.profile-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font-weight: 600; font-size: 14px; max-width: 170px; }
.profile-chip span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.table-chip .gname { font-family: var(--f-display); font-size: 18px; font-weight: 800; white-space: nowrap; }
.code-pill { font-family: var(--f-num); font-size: 13px; letter-spacing: .12em; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.code-pill:hover { border-color: var(--accent); }

/* ---------- Boutons et champs ---------- */
.btn { --b: var(--surface-2); appearance: none; border: 1px solid transparent; background: var(--b); color: var(--ink); border-radius: 999px; padding: 11px 20px; font-weight: 650; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: transform .12s var(--ease), background .15s, box-shadow .15s, opacity .15s; user-select: none; }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); filter: none; }
.btn.outline { background: transparent; border-color: var(--line-2); }
.btn.outline:hover:not(:disabled) { border-color: var(--ink); filter: none; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.lg { padding: 15px 26px; font-size: 16px; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .kbd { font-family: var(--f-num); font-size: 11px; opacity: .55; font-weight: 500; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; cursor: pointer; }
.input, .select { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--muted); }
.field .help { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-sm); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--surface-2); font-size: 18px; font-weight: 600; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 34px; text-align: center; font-family: var(--f-num); font-weight: 600; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: 20px; }

/* ---------- Accueil ---------- */
.page { padding-block: 28px 64px; display: flex; flex-direction: column; gap: 28px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(42px, 7vw, 84px); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 48ch; margin-top: 16px; }
.hero-side { display: flex; flex-direction: column; gap: 14px; }
.hero-felt { position: relative; border-radius: var(--r-lg); background: radial-gradient(120% 100% at 50% 20%, var(--felt), var(--felt-2)); padding: 30px 18px; box-shadow: inset 0 2px 30px rgba(0,0,0,.35), var(--shadow); overflow: hidden; min-height: 170px; display: grid; place-items: center; }
.hero-felt::before, .felt::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px), repeating-linear-gradient(-45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 6px); }
.profile-card { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.profile-card .field { flex: 1; min-width: 180px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.game-card { --accent: var(--gold); position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.game-card[data-game="yams"] { --accent: var(--coral); }
.game-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); pointer-events: none; }
.game-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.game-card h2 { font-size: 34px; font-weight: 800; }
.game-card .tag { font-size: 14px; color: var(--muted); max-width: 40ch; }
.game-card .art { display: flex; gap: 8px; position: relative; z-index: 1; }
.game-card .gstats { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.game-card .gstats b { color: var(--ink); font-family: var(--f-num); font-weight: 600; }
.game-card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.soon-card { border-style: dashed; background: transparent; justify-content: center; }
.soon-card h2 { font-size: 24px; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.join-row { display: flex; gap: 10px; }
.join-row .input { font-family: var(--f-num); letter-spacing: .2em; text-transform: uppercase; max-width: 160px; }
.tables { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tables li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.tables li:first-child { border-top: 0; padding-top: 0; }
.tcode { font-family: var(--f-num); font-weight: 600; letter-spacing: .1em; font-size: 14px; padding: 6px 9px; border-radius: 9px; background: var(--surface-2); }
.tinfo { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tinfo .names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tinfo .meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; }
.status.lobby { color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, transparent); }
.status.playing { color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); }
.status.finished { color: var(--muted); background: var(--surface-2); }
.tacts { display: flex; gap: 6px; }
.empty { color: var(--muted); font-size: 14px; }

/* ---------- Avatars ---------- */
.avatar { --c: var(--p0); width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 15px; color: #0b1214; background: var(--c); position: relative; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 46px; height: 46px; font-size: 19px; }
.avatar .bot { position: absolute; right: -4px; bottom: -4px; font-size: 9px; font-family: var(--f-body); font-weight: 700; background: var(--surface-3); color: var(--ink); border: 2px solid var(--surface); border-radius: 6px; padding: 0 3px; line-height: 1.3; }

/* ---------- Fenêtres ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(4, 9, 8, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .2s ease; }
.modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: pop .28s var(--ease); display: flex; flex-direction: column; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h2 { font-size: 26px; font-weight: 800; }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.modal-foot { padding: 0 22px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: pop .25s var(--ease); pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- Règles ---------- */
.rules h3 { font-size: 17px; margin-top: 4px; }
.rules ol, .rules ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable td { padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.ptable td:last-child { text-align: right; font-family: var(--f-num); font-weight: 600; white-space: nowrap; }

/* ---------- Salon ---------- */
.lobby { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.lobby h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
.lobby h1 .code { font-family: var(--f-num); color: var(--accent); letter-spacing: .12em; }
.invite { display: flex; gap: 8px; }
.invite .input { font-family: var(--f-num); font-size: 13px; }
.seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.seat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.seat .n { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .tag { font-size: 12px; color: var(--muted); }
.seat.empty-seat { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); justify-content: center; }
.addbot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Table de jeu ---------- */
.table-page { padding-block: 18px 40px; }
.table-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 20px; align-items: start; }
[data-game="yams"] .table-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 480px); }
.play { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.players-bar { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
.players-bar::-webkit-scrollbar { display: none; }
.pcard { position: relative; flex: 1 0 140px; max-width: 240px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.pcard.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.pcard .pinfo { min-width: 0; display: flex; flex-direction: column; }
.pcard .pname { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .pscore { font-family: var(--f-num); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.pcard .plive { font-family: var(--f-num); font-size: 12px; color: var(--accent); }
.pcard .bar { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.pcard .bar i { display: block; height: 100%; background: var(--c, var(--accent)); transition: width .6s var(--ease); }
.pcard .flag { position: absolute; top: -9px; right: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.bubble { position: absolute; left: 50%; top: -8px; transform: translate(-50%, -100%); font-size: 30px; pointer-events: none; animation: bubble 2.2s var(--ease) forwards; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); z-index: 5; }
@keyframes bubble { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -110%) scale(1.15); } 30% { transform: translate(-50%, -100%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -170%); } }

.felt { position: relative; border-radius: 28px; padding: 22px 18px 18px; color: var(--felt-ink);
  background: radial-gradient(130% 100% at 50% 15%, var(--felt) 0%, var(--felt-2) 100%);
  box-shadow: inset 0 2px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.05), var(--shadow); overflow: hidden; }
.felt-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.turn-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.turn-who .label { color: color-mix(in srgb, var(--felt-ink) 65%, transparent); }
.turn-who .who { font-family: var(--f-display); font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn-pts { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.turn-pts .label { color: color-mix(in srgb, var(--felt-ink) 65%, transparent); }
.turn-pts .big { font-family: var(--f-display); font-size: clamp(34px, 5.4vw, 52px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; transition: color .2s; }
.turn-pts .sub { font-size: 13px; color: color-mix(in srgb, var(--felt-ink) 70%, transparent); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.rolls { display: inline-flex; gap: 6px; margin-top: 8px; }
.rolls i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--felt-ink) 60%, transparent); }
.rolls i.on { background: var(--accent); border-color: var(--accent); }
.felt-msg { position: relative; text-align: center; font-weight: 650; min-height: 1.5em; font-size: 15px; }
.felt-msg.good { color: #9BF0C6; }
.felt-msg.bad { color: #FFB2A6; }
.felt-msg.big { font-family: var(--f-display); font-size: 26px; font-weight: 800; color: var(--accent); animation: pop .4s var(--ease); }
.felt.shake { animation: shake .35s ease; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.controls .btn.lg { min-width: 180px; }
.subline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.subline b { color: var(--ink); font-family: var(--f-num); }
.coach { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--sky) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sky) 30%, transparent); font-size: 14px; animation: fade .25s ease; }
.coach .ico { width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--sky) 22%, transparent); color: var(--sky); display: grid; place-items: center; flex: none; font-weight: 800; font-family: var(--f-display); }
.coach p + p { margin-top: 4px; color: var(--muted); }
.coach .ctitle { font-weight: 700; color: var(--sky); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; }
.chat .reactions button { width: 38px; height: 38px; font-size: 18px; }
.reactions button { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.reactions button:hover { transform: translateY(-2px) scale(1.06); background: var(--surface-2); }
.kbd-hint { font-size: 12px; color: var(--faint); }

/* ---------- Dés (rangée fixe, saut et rotation au lancer) ---------- */
.dzone { display: flex; flex-direction: column; gap: 14px; padding-block: 26px 6px; }
.drow { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 2.6vw, 18px); min-height: calc(var(--ds) + 20px); --ds: clamp(52px, 13vw, 70px); }
.die2 { position: relative; width: var(--ds); height: var(--ds); padding: 0; border: 0; background: none; cursor: pointer; flex: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .22s var(--ease), opacity .25s; }
.die2:disabled { cursor: default; }
.die2:focus-visible { outline: none; }
.die2:focus-visible .dface { outline: 3px solid var(--accent); outline-offset: 3px; }
.dshadow { position: absolute; left: 10%; right: 10%; bottom: -9%; height: 22%; border-radius: 50%; background: rgba(0, 0, 0, .42); filter: blur(5px); transition: transform .22s var(--ease), opacity .22s; }
.dbody { position: absolute; inset: 0; will-change: transform; }
.dface { position: absolute; inset: 0; border-radius: 22%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 15%;
  background: linear-gradient(155deg, var(--die-hi) 0%, var(--die) 38%, var(--die-2) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .9), inset 0 -4px 0 rgba(0, 0, 0, .09), 0 1px 0 rgba(0, 0, 0, .12); transition: box-shadow .2s, filter .2s; }
.dface i { display: block; width: 72%; aspect-ratio: 1; border-radius: 50%; place-self: center; }
.dface i.on { background: radial-gradient(circle at 36% 30%, var(--pip-hi), var(--pip) 64%); box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, .55), 0 1px 0 var(--pip-glow); }
.dface.one i.on { width: 92%; background: radial-gradient(circle at 36% 30%, var(--pip-red-hi), var(--pip-red) 64%); }
.die2.held { transform: translateY(-10px); }
.die2.held .dshadow { transform: translateY(10px) scale(.82); opacity: .55; }
.die2.held .dface { box-shadow: 0 0 0 3px var(--accent), 0 0 20px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 2px 0 rgba(255, 255, 255, .9), inset 0 -4px 0 rgba(0, 0, 0, .09); }
.die2.held::after { content: "gardé"; position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.die2.blank { opacity: .32; }
.die2.dead .dface { filter: saturate(.35) brightness(.8); }
.die2.hint .dface { outline: 2px dashed var(--sky); outline-offset: 4px; }
@media (hover: hover) { .die2:not(:disabled):not(.held):hover { transform: translateY(-4px); } }
.dstrip { display: flex; align-items: center; gap: 12px; justify-content: center; border-top: 1px dashed color-mix(in srgb, var(--felt-ink) 26%, transparent); padding-top: 12px; }
.dstrip-dice { display: flex; gap: 6px; }
.dstrip .mini-die { --s: 30px; opacity: .85; }
.keep-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: color-mix(in srgb, var(--felt-ink) 60%, transparent); white-space: nowrap; }

/* ---------- Bulles et chat ---------- */
.bubble-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.bubble-layer .bubble { position: fixed; transform: translate(-50%, -100%); font-size: 34px; line-height: 1; animation: bubbleUp 2.2s var(--ease) forwards; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.bubble-layer .bubble.text { transform: none; font-size: 14px; font-weight: 600; line-height: 1.35; max-width: min(280px, 80vw); padding: 9px 13px; border-radius: 4px 16px 16px 16px; background: var(--ink); color: var(--bg); filter: none; box-shadow: var(--shadow-sm); animation: bubbleText 4.2s var(--ease) forwards; text-align: left; }
@keyframes bubbleUp { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -115%) scale(1.15); } 30% { transform: translate(-50%, -105%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -190%); } }
@keyframes bubbleText { 0% { opacity: 0; transform: translateY(-6px) scale(.92); } 8% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
.chat { display: flex; flex-direction: column; gap: 12px; }
.chat .card-head { margin-bottom: 0; }
.quick-msgs { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; touch-action: manipulation; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(.97); }
.chat-list { list-style: none; margin: 0; padding: 10px 12px; max-height: 190px; min-height: 64px; overflow-y: auto; border-radius: 12px; background: var(--bg-2); display: flex; flex-direction: column; gap: 6px; font-size: 14px; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 8px; }
.chat-form .input { flex: 1; min-width: 0; }
.mini-die { --s: 34px; width: var(--s); height: var(--s); border-radius: 22%; background: radial-gradient(120% 120% at 30% 25%, var(--die-hi), var(--die) 45%, var(--die-2)); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: calc(var(--s) * .15); box-shadow: 0 3px 8px rgba(0,0,0,.3); flex: none; }
.mini-die .pip { width: 72%; aspect-ratio: 1; border-radius: 50%; place-self: center; }
.mini-die .pip.on { background: radial-gradient(circle at 35% 30%, var(--pip-hi), var(--pip) 60%); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.mini-die.v1 .pip.on { background: radial-gradient(circle at 35% 30%, var(--pip-red-hi), var(--pip-red) 60%); width: 86%; }
.mini-die.sm { --s: 24px; }
.mini-die.lg { --s: 48px; }

/* ---------- Feuille du 10 000 ---------- */
.side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.side .card { padding: 18px; }
.hist-wrap { max-height: 46vh; overflow: auto; margin-inline: -4px; }
.hist { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.hist th { position: sticky; top: 0; background: var(--surface); text-align: right; font-weight: 650; padding: 6px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist th:first-child, .hist td:first-child { text-align: left; color: var(--muted); width: 34px; }
.hist td { text-align: right; padding: 6px; border-top: 1px solid var(--line); font-family: var(--f-num); }
.hist td small { display: block; font-size: 11px; color: var(--good); }
.hist td.bust { color: var(--muted); }
.hist td.bust small { color: var(--bad); }
.hist tr.fresh td { animation: flash 1.2s ease; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 25%, transparent); } }

/* ---------- Feuille du Yam's ---------- */
.ysheet-wrap { overflow-x: auto; margin-inline: -6px; }
.ysheet { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.ysheet th, .ysheet td { padding: 0; height: 36px; border-bottom: 1px solid var(--line); }
.ysheet thead th { height: auto; padding: 0 4px 10px; border-bottom: 1px solid var(--line-2); vertical-align: bottom; }
.ysheet thead .ph { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; max-width: 84px; margin: 0 auto; }
.ysheet thead .ph > span:not(.avatar) { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ysheet th.cat { text-align: left; font-weight: 600; padding-left: 8px; white-space: nowrap; }
.ysheet th.cat small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.ysheet td { text-align: center; font-family: var(--f-num); min-width: 56px; }
.ysheet td.cur { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ysheet tr.sum th, .ysheet tr.sum td { background: var(--surface-2); font-weight: 700; }
.ysheet tr.total th, .ysheet tr.total td { font-size: 16px; font-weight: 800; border-bottom: 0; height: 44px; }
.ysheet tr.sep td, .ysheet tr.sep th { height: 8px; border-bottom: 0; }
.ycell { width: 100%; height: 34px; border: 0; background: transparent; font-family: var(--f-num); font-size: 15px; cursor: default; border-radius: 9px; color: inherit; }
.ycell.pick { cursor: pointer; color: var(--accent); font-weight: 700; font-style: italic; }
.ycell.pick.zero { color: var(--faint); }
.ycell.pick:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ycell.pick.suggest { box-shadow: inset 0 0 0 2px var(--sky); }
.ycell.confirm { background: var(--bad); color: #fff; font-style: normal; font-size: 12px; font-family: var(--f-body); }
.ycell.filled { font-weight: 600; }
.ycell.fresh { animation: flash 1.4s ease; }
.ycell.zeroed { color: var(--faint); }
.bonus-prog { font-size: 11px; color: var(--muted); display: block; }

/* ---------- Fin de partie ---------- */
.podium { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 36px auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.rank-row.first { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, var(--surface-2)), var(--surface-2)); }
.rank-row .rk { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--muted); text-align: center; }
.rank-row.first .rk { color: var(--accent); }
.rank-row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .dt { grid-column: 3 / -1; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.rank-row .sc { font-family: var(--f-num); font-weight: 700; font-size: 20px; }
.win-title { font-size: clamp(30px, 5vw, 42px); font-weight: 800; }
canvas.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* ---------- Statistiques ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.kpi { padding: 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-family: var(--f-display); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .k { font-size: 12px; color: var(--muted); }
.h2h { width: 100%; border-collapse: collapse; font-size: 14px; }
.h2h th, .h2h td { padding: 10px 6px; border-top: 1px solid var(--line); text-align: right; }
.h2h th:first-child, .h2h td:first-child { text-align: left; }
.h2h thead th { border-top: 0; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.wl { display: inline-flex; height: 8px; width: 90px; border-radius: 8px; overflow: hidden; background: var(--line); vertical-align: middle; }
.wl i { display: block; height: 100%; }
.recent { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.recent li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.recent li:first-child { border-top: 0; }
.medal { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-family: var(--f-display); background: var(--surface-2); flex: none; }
.medal.gold { background: color-mix(in srgb, var(--gold) 25%, transparent); color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero, .home-grid, .lobby { grid-template-columns: minmax(0, 1fr); }
  .table-grid, [data-game="yams"] .table-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .hist-wrap { max-height: 260px; }
  .table-grid { display: flex; flex-direction: column; align-items: stretch; }
  .table-grid > .play { display: contents; }
  .table-grid > .play > *, .table-grid > .side { order: 1; }
  .table-grid > .play > .react-row { order: 5; }
}
@media (max-width: 560px) {
  .topbar .wrap { gap: 4px; min-height: 56px; }
  .brand .bname { display: none; }
  .profile-chip { padding: 3px; border: 0; background: transparent; }
  .profile-chip .n { display: none; }
  .iconbtn { width: 36px; height: 36px; }
  .table-chip .gname { font-size: 16px; }
  body:has(.table-page) .top-actions .hide-in-game { display: none; }
  body:has(.table-page) .table-chip .gname { display: none; }
  .top-center { justify-content: flex-start; }
  .hero-felt { padding-inline: 10px; }
  .card { padding: 18px; }
  .controls .btn.lg { min-width: 0; flex: 1; padding: 14px 14px; }
  .modal-head, .modal-body { padding-inline: 18px; }
  .modal-foot { padding-inline: 18px; }
  .kbd-hint { display: none; }
  .pcard { flex-basis: 128px; padding: 8px 10px; }
  .ysheet td { min-width: 48px; }
  .hide-sm { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Accueil (catalogue) ---------- */
.home { gap: 44px; }
.home-hero { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; max-width: 760px; }
.home-hero h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.home-hero .lede { font-size: 18px; color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.join-inline { display: flex; gap: 8px; }
.join-inline .input { width: 108px; font-family: var(--f-num); letter-spacing: .18em; text-transform: uppercase; text-align: center; }
.resume { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; align-self: flex-start; }
.features { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.features li { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 0 0; font-size: 14px; }
.features b { font-weight: 650; }
.features span { color: var(--muted); }
.shelf { display: flex; flex-direction: column; gap: 16px; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; }
.shelf-head h2 { font-size: 24px; font-weight: 800; }
.soon-chip { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { --accent: var(--gold); display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.tile[data-game="yams"] { --accent: var(--coral); }
.tile[data-game="tarot"] { --accent: var(--violet); }
.tile[data-game="rami"] { --accent: var(--sky); }
.tile[data-game="bataille"] { --accent: var(--rose); }
.tile[data-game="belote"] { --accent: var(--mint); }
.tile[data-game="crapette"] { --accent: var(--amber); }
.tile[data-game="421"] { --accent: var(--teal); }
.tile:not(.soon):hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.tile-art { position: relative; height: 128px; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; background: radial-gradient(120% 120% at 50% 0%, var(--felt), var(--felt-2)); border-bottom: 1px solid var(--line); }
.tile-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--accent) 18%, transparent)); pointer-events: none; }
.tile-dice { display: flex; gap: 8px; position: relative; z-index: 1; }
.tile-dice .mini-die { --s: 38px; }
.tile-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tile-title h3 { font-size: 22px; font-weight: 800; }
.tile-meta { font-size: 12px; color: var(--muted); }
.tile-tag { font-size: 14px; color: var(--muted); }
.tile-stats { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tile-actions .link { margin-left: 4px; font-size: 14px; }
.tile.soon .tile-art { cursor: default; filter: saturate(.55); }
.tile.soon .tile-body { opacity: .8; }
.tile-art.cards { display: flex; justify-content: center; align-items: center; }
@media (max-width: 760px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .btn.lg { padding: 13px 18px; }
}

/* ---------- Tactile : pas de zoom au double-tap, pas de délai ---------- */
html { touch-action: manipulation; }
button, a, .die2, .ycell, .chip, input, select { touch-action: manipulation; }
.die2, .ycell, .btn, .chip, .reactions button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (hover: none) {
  .btn:hover:not(:disabled) { filter: none; }
  .reactions button:hover { transform: none; }
}
@media (max-width: 560px) {
  .input, .select { font-size: 16px; } /* évite le zoom automatique d'iOS sur les champs */
}
@media (max-width: 560px) {
  .tiles:has(.tile.soon) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile.soon .tile-art { height: 84px; }
  .tile.soon .tile-cards .gcard { --cw: 34px; }
  .tile.soon .tile-body { padding: 10px 12px 12px; }
  .tile.soon .tile-title h3 { font-size: 17px; }
  .tile.soon .tile-tag, .tile.soon .tile-title .soon-chip { display: none; }
}

/* ---------- Partie rapide ---------- */
.searching { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-block: 8px; }
.search-dice { display: flex; gap: 10px; }
.search-dice .mini-die { --s: 40px; animation: searchHop 1.2s var(--ease) infinite; }
.search-dice .mini-die:nth-child(2) { animation-delay: .15s; }
.search-dice .mini-die:nth-child(3) { animation-delay: .3s; }
@keyframes searchHop { 0%, 60%, 100% { transform: none; } 25% { transform: translateY(-10px) rotate(-12deg); } 45% { transform: translateY(0) rotate(4deg); } }
#online-list li { grid-template-columns: auto minmax(0, 1fr) auto; }

/* =====================================================================
   v6 — mise en page centrée, cartes à jouer, profils, classement, chat
   ===================================================================== */

/* ---------- Centrage ---------- */
.home-hero { margin-inline: auto; align-items: center; text-align: center; max-width: 820px; }
.home-hero .lede { margin-inline: auto; }
.home-hero .hl { color: var(--accent); }
.hero-actions { justify-content: center; }
.resume { align-self: center; }
.features { width: 100%; }
.features li { align-items: center; text-align: center; padding: 14px 8px 0; }
.shelf-head { justify-content: center; flex-wrap: wrap; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; }
.page-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.page-head h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 800; }
.page-head .muted { max-width: 60ch; }
.home-grid > .shelf { min-width: 0; }
.linkish { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-weight: 600; color: inherit; }
.linkish:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* ---------- Avatars emoji ---------- */
.avatar.emoji { background: color-mix(in srgb, var(--c) 26%, var(--surface-2)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 55%, transparent); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 20px; line-height: 1; }
.avatar.emoji.sm { font-size: 15px; }
.avatar.emoji.lg { font-size: 26px; }
.felt .avatar.emoji { background: rgba(0, 0, 0, .25); }

/* ---------- Profil ---------- */
.profile-top { display: flex; gap: 16px; align-items: flex-start; }
.profile-top > span:first-child { padding-top: 22px; }
.name-hint { min-height: 1.4em; }
.name-hint.good { color: var(--good); }
.name-hint.bad { color: var(--bad); }
.avatar-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.avatar-pick { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 22px; cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform .12s var(--ease), border-color .15s, background .15s; }
.avatar-pick:hover { transform: translateY(-2px); }
.avatar-pick[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); box-shadow: 0 0 0 2px var(--accent); }
.code-box { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.code-box summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.input.mono { font-family: var(--f-num); font-size: 13px; letter-spacing: .04em; }
.tier-list { display: flex; flex-direction: column; gap: 6px; }
.tier-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.tier-item b { flex: 1; }
@media (max-width: 560px) { .avatar-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- Rangs et classement ---------- */
.tier { --t: var(--gold); display: inline-flex; align-items: baseline; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: 999px; color: var(--t); background: color-mix(in srgb, var(--t) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 35%, transparent); white-space: nowrap; vertical-align: middle; }
.tier small { font-size: 10px; opacity: .75; font-weight: 600; text-transform: none; letter-spacing: 0; }
.tier-ladder { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.tiers-card { text-align: center; }
.board-tabs { align-self: center; justify-content: center; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.board li, .mini-board li { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--line); border-radius: 10px; }
.board li:first-child, .mini-board li:first-child { border-top: 0; }
.board li.me, .mini-board li.me, .rating-table tr.me td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.board .who { flex: 1; }
.board .when { font-size: 12px; }
.mini-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-board li.empty { border: 0; }
.medal.m1 { background: color-mix(in srgb, #E2B044 28%, transparent); color: #E2B044; }
.medal.m2 { background: color-mix(in srgb, #A8B3B8 28%, transparent); color: #A8B3B8; }
.medal.m3 { background: color-mix(in srgb, #C08457 28%, transparent); color: #C08457; }
.who { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; min-width: 0; text-align: left; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who:hover span { text-decoration: underline; text-decoration-color: var(--accent); }
.rating-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rating-table th, .rating-table td { padding: 9px 6px; border-top: 1px solid var(--line); text-align: left; }
.rating-table thead th { border-top: 0; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.rating-table .num { text-align: right; }
.me-card { padding: 16px 18px; }
.me-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kpis.compact { grid-template-columns: repeat(3, minmax(90px, auto)); }
.kpis.compact .kpi { padding: 10px 12px; }
.kpis.compact .kpi .v { font-size: 22px; }
.rating-delta { align-self: flex-start; font-weight: 700; font-family: var(--f-num); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.rating-delta.up { color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); }
.rating-delta.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 15%, transparent); }
.game-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.game-pick .btn { box-shadow: none; }
@media (max-width: 560px) { .me-row .kpis.compact { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Cartes à jouer ---------- */
.gcard { --w: var(--cw, 64px); position: relative; flex: none; width: var(--w); aspect-ratio: 5 / 7; padding: 0; border: 0; border-radius: calc(var(--w) * .1);
  background: linear-gradient(160deg, #FFFFFF 0%, #FBF7EE 55%, #E9E2D2 100%); color: #16201D;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 0 0 1px rgba(0, 0, 0, .08), 0 4px 10px rgba(0, 0, 0, .28);
  font-family: var(--f-display); line-height: 1; transition: transform .18s var(--ease), box-shadow .18s, filter .18s; user-select: none; -webkit-user-select: none; }
.gcard.red { color: #C8402F; }
.gcard .corner { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px; font-weight: 800; font-size: calc(var(--w) * .2); letter-spacing: -.03em; }
.gcard .corner i { font-style: normal; font-size: .85em; }
.gcard .corner.tl { top: 6%; left: 8%; }
.gcard .corner.br { bottom: 6%; right: 8%; transform: rotate(180deg); }
.gcard .mid { position: absolute; inset: 24% 20%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%; }
.gcard .mid .sym { font-size: calc(var(--w) * .42); line-height: 1; }
.gcard.face .mid { border-radius: calc(var(--w) * .06); background: color-mix(in srgb, currentColor 8%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 30%, transparent); }
.gcard.face .mid .fig { font-size: calc(var(--w) * .32); font-weight: 800; }
.gcard.face .mid .sym { font-size: calc(var(--w) * .22); }
.gcard.trump { color: #3B2A80; background: linear-gradient(160deg, #FFFFFF 0%, #F5F1FF 55%, #E4DCF7 100%); }
.gcard.trump .mid { inset: 20% 16%; border-radius: calc(var(--w) * .06); box-shadow: inset 0 0 0 1.5px rgba(59, 42, 128, .25); }
.gcard.trump .mid b { font-size: calc(var(--w) * .36); font-weight: 800; }
.gcard.trump .mid small { font-family: var(--f-body); font-size: calc(var(--w) * .11); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.gcard.excuse { color: #8A5A00; background: linear-gradient(160deg, #FFFFFF 0%, #FFF6E0 55%, #F3E2B5 100%); }
.gcard.joker { color: #7B2E8E; }
.gcard.joker .mid b { font-size: calc(var(--w) * .4); }
.gcard.joker .mid small, .gcard.excuse .mid small { font-family: var(--f-body); font-size: calc(var(--w) * .11); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.gcard.back { background: linear-gradient(145deg, color-mix(in srgb, var(--felt) 80%, #fff 14%), var(--felt-2)); }
.gcard .pback { position: absolute; inset: 7%; border-radius: calc(var(--w) * .06); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .09) 0 3px, transparent 3px 7px), repeating-linear-gradient(-45deg, rgba(0, 0, 0, .12) 0 3px, transparent 3px 7px); }
.gcard.small { --cw: 40px; }
button.gcard { cursor: default; }
button.gcard.playable, button.gcard[aria-pressed] { cursor: pointer; }
.gcard.dim { filter: brightness(.62) saturate(.55); }
.gcard.selected { transform: translateY(-14px); box-shadow: 0 0 0 3px var(--accent), 0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.gcard.taken { box-shadow: 0 0 0 2px var(--sky), 0 4px 10px rgba(0, 0, 0, .28); }
.gcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { button.gcard.playable:not(.selected):hover { transform: translateY(-8px); } }
.tempty { display: inline-block; width: var(--cw, 62px); aspect-ratio: 5 / 7; border-radius: 8px; border: 1.5px dashed rgba(255, 255, 255, .2); }
.felt .label { color: color-mix(in srgb, var(--felt-ink) 65%, transparent); }

/* Tuiles de l'accueil */
.tile-cards { display: flex; justify-content: center; align-items: center; position: relative; z-index: 1; }
.tile-cards .gcard { --cw: 52px; margin: 0 -7px; transform: rotate(var(--r, 0deg)) translateY(calc(var(--r, 0deg) / 1deg * .25px)); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.tile-art:hover .tile-cards .gcard { transform: rotate(calc(var(--r, 0deg) * 1.4)); }
.search-cards { display: flex; gap: 8px; }
.search-cards .gcard { --cw: 42px; animation: searchHop 1.2s var(--ease) infinite; }
.search-cards .gcard:nth-child(2) { animation-delay: .15s; }
.search-cards .gcard:nth-child(3) { animation-delay: .3s; }

/* ---------- Plateau des jeux de cartes ---------- */
.felt-extra { position: relative; }
.felt-extra:empty { display: none; }
.turn-pts .big.small-big { font-size: clamp(22px, 3.4vw, 30px); }
.below { display: flex; flex-direction: column; gap: 12px; }
.below:empty { display: none; }
.hand { --cw: 74px; display: flex; justify-content: center; align-items: flex-end; padding: 18px 4px 4px; min-height: 120px; }
.hand > .gcard + .gcard { margin-left: min(6px, calc((100% - var(--n, 1) * var(--cw)) / (var(--n, 2) - 1))); }
@media (max-width: 560px) {
  .hand { --cw: min(66px, calc((100vw - 54px) / var(--n2, 9) + 14px)); display: grid; grid-template-columns: repeat(var(--n2, 9), minmax(0, 1fr)); row-gap: 10px; padding: 16px 22px 4px 0; justify-items: start; }
  .hand > .gcard + .gcard { margin-left: 0; }
}

/* Tarot : quatre places autour du tapis */
.trick-table { display: grid; grid-template-areas: ". r2 ." "r3 c r1" ". r0 ."; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px 8px; align-items: center; justify-items: center; padding: 14px 0 6px; }
.tslot { --cw: 62px; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; max-width: 100%; }
.tslot.r0 { grid-area: r0; } .tslot.r1 { grid-area: r1; } .tslot.r2 { grid-area: r2; } .tslot.r3 { grid-area: r3; }
.tslot.r0 { flex-direction: column-reverse; }
.tname { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 13px; font-weight: 650; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(0, 0, 0, .22); transition: box-shadow .2s; }
.tname > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tslot.active .tname { box-shadow: 0 0 0 2px var(--accent); }
.tcard .gcard { --cw: 62px; animation: deal .28s var(--ease); }
.tslot.won .tcard .gcard { box-shadow: 0 0 0 3px var(--accent), 0 0 26px color-mix(in srgb, var(--accent) 60%, transparent); }
@keyframes deal { from { opacity: 0; transform: translateY(16px) scale(.9); } }
.tcenter { grid-area: c; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-height: 40px; }
.tcenter .eyebrow { color: color-mix(in srgb, var(--felt-ink) 70%, transparent); }
.tcenter .muted { color: color-mix(in srgb, var(--felt-ink) 75%, transparent); font-size: 13px; }
.mini-row { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.mini-row .gcard { --cw: 38px; }
.res { font-family: var(--f-display); font-weight: 800; font-size: 22px; }
.res.good { color: #9BF0C6; } .res.bad { color: #FFB2A6; }
.bid-panel { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.controls { justify-content: center; }
.subline { justify-content: center; text-align: center; }
@media (max-width: 560px) {
  .tslot, .tcard .gcard { --cw: 50px; }
  .tname { font-size: 12px; }
  .tname > span:last-child { max-width: 74px; }
  .trick-table { gap: 8px 4px; }
}

/* Rami */
.rami-piles { display: flex; gap: 26px; justify-content: center; padding: 14px 0 10px; }
.pile { --cw: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pile .gcard.playable { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5px); } 90% { transform: translateY(0); } }
.melds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px 2px; }
.meld { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, .18); border: 1.5px solid transparent; color: inherit; text-align: left; font: inherit; min-width: 0; }
button.meld { cursor: pointer; }
.meld.fits { border-color: var(--accent); border-style: dashed; background: color-mix(in srgb, var(--accent) 14%, rgba(0, 0, 0, .18)); }
.meld-owner { font-size: 11px; font-weight: 700; color: var(--c, inherit); text-transform: uppercase; letter-spacing: .06em; flex: none; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meld-cards { display: flex; min-width: 0; }
.meld-cards .gcard { --cw: 36px; }
.meld-cards .gcard + .gcard { margin-left: -13px; }
.melds-empty { grid-column: 1 / -1; text-align: center; color: color-mix(in srgb, var(--felt-ink) 60%, transparent) !important; font-size: 14px; padding: 6px 0; }
.staged { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1.5px dashed var(--accent); display: flex; flex-direction: column; gap: 10px; }
.staged-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.staged-list { display: flex; flex-wrap: wrap; gap: 8px; }
.staged-meld { background: var(--surface-2); }
.rules-mini p { font-size: 13px; margin-top: 6px; }

/* Bataille */
.battle { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 4px; }
.bside { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 10px 16px; border-radius: 20px; transition: background .25s, box-shadow .25s; min-width: min(100%, 320px); }
.bside.won { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.bdeck { --cw: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gcard.deck { box-shadow: 2px 2px 0 var(--felt-2), 4px 4px 0 rgba(255, 255, 255, .18), 6px 6px 0 var(--felt-2), 0 10px 18px rgba(0, 0, 0, .35); }
.gcard.deck.playable { animation: nudge 1.6s ease-in-out infinite; cursor: pointer; }
.bcount { font-size: 12px; color: color-mix(in srgb, var(--felt-ink) 78%, transparent); font-weight: 600; text-align: center; }
.blaid { --cw: 78px; display: flex; align-items: center; min-width: 78px; }
.blaid .gcard { animation: deal .28s var(--ease); }
.blaid .gcard + .gcard { margin-left: -46px; }
.blaid .gcard.down { transform: rotate(-4deg); }
.bvs { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: color-mix(in srgb, var(--felt-ink) 55%, transparent); }
@media (max-width: 560px) { .bdeck { --cw: 54px; } .blaid { --cw: 66px; } .bside { gap: 14px; } }

/* ---------- Chat flottant ---------- */
.table-page { padding-bottom: 96px; }
.chat-dock { position: fixed; z-index: 50; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.chat-dock > * { pointer-events: auto; }
.chat-fab { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 40%, rgba(0, 0, 0, .3)); transition: transform .15s var(--ease); }
.chat-fab svg { width: 24px; height: 24px; }
.chat-fab:active { transform: scale(.95); }
.chat-fab.open { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-sm); }
.chat-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.chat-panel { width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100dvh - 120px)); display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .22s var(--ease); }
.chat-head { display: flex; justify-content: space-between; align-items: center; }
.chat-panel .reactions { justify-content: space-between; }
.chat-panel .reactions button { width: 38px; height: 38px; font-size: 18px; }
.chat-panel .chat-list { flex: 1; max-height: none; min-height: 90px; }
.chat-panel .chat-list li b { margin-right: 2px; }
@media (max-width: 560px) {
  .chat-dock { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .chat-fab { width: 50px; height: 50px; }
  .chat-panel { position: fixed; left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100dvh - 150px); }
}

/* ---------- Équité des dés ---------- */
.fair-card summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.fair-card summary::-webkit-details-marker { display: none; }
.fair-card summary h3 { font-size: 18px; }
.fair-card summary .muted { font-size: 12px; }
.fair-card[open] summary { margin-bottom: 12px; }
.fair { display: flex; flex-direction: column; gap: 12px; }
.fair-row { display: flex; flex-direction: column; gap: 6px; }
.fair-name { font-weight: 650; font-size: 13px; }
.fair-name small { color: var(--muted); font-weight: 500; }
.fair-bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.fair-bar { position: relative; height: 54px; border-radius: 8px; background: var(--surface-2); overflow: hidden; display: flex; align-items: flex-end; }
.fair-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 50%; border-top: 1px dashed var(--line-2); }
.fair-bar i { display: block; width: 100%; opacity: .8; transition: height .5s var(--ease); }
.fair-bar b { position: absolute; top: 3px; left: 0; right: 0; text-align: center; font-family: var(--f-num); font-size: 11px; color: var(--muted); }
.fair-card .help { font-size: 12px; color: var(--muted); margin-top: 10px; }
.felt.cards .turn-who .who { white-space: normal; overflow: visible; }
.chat-panel .reactions { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.chat-panel .reactions button { width: auto; aspect-ratio: 1; height: auto; }
@media (max-width: 560px) { .felt.cards .turn-who .who { font-size: 20px; } }
@media (max-width: 560px) { .controls > .btn { white-space: normal; text-align: center; max-width: 100%; } .controls > .btn.outline { flex: 1; } }

.fair-seg { margin-bottom: 12px; }
.fair-seg button { padding: 7px 12px; font-size: 13px; }
.fair-name { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.fair-verdict { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.fair-verdict.ok { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.fair-verdict.meh { color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.fair-verdict.odd { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.fair-verdict.few { color: var(--muted); background: var(--surface-2); }
.fair-bar em { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-style: normal; font-family: var(--f-num); font-size: 10px; font-weight: 600; color: var(--ink); }
.fair-bars.big .fair-bar { height: 80px; }

/* ---------- Rangs : badges (forme et couleur par rang) ---------- */
.rank-badge { --t: var(--muted); --s: 20px; display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; flex: none; line-height: 1; }
.rank-badge svg { width: var(--s); height: var(--s); flex: none; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); overflow: visible; }
.rank-badge svg .b { fill: var(--t); stroke: color-mix(in srgb, var(--t) 55%, #000); stroke-width: 1; }
.rank-badge svg .i { fill: color-mix(in srgb, var(--t) 70%, #fff); opacity: .55; }
.rank-badge svg .g { fill: #fff; opacity: .92; }
.rank-badge svg .l { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.rank-badge .rk-name { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--t); white-space: nowrap; }
.rank-badge .rk-pts { font-family: var(--f-num); font-size: 12px; color: var(--muted); }
.rank-badge.none .rk-name { color: var(--faint); }
.rank-badge.lg { --s: 40px; }
.rank-badge.xl { --s: 46px; }
.rank-badge.mini { --s: 15px; position: absolute; top: -5px; right: -6px; }
.avatar.sm .rank-badge.mini { --s: 13px; top: -5px; right: -6px; }
.avatar.lg .rank-badge.mini { --s: 19px; }
.avatar.ranked { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--t); }
.avatar.emoji.ranked { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 55%, transparent), 0 0 0 2px var(--surface), 0 0 0 4px var(--t); }
.felt .avatar.ranked, .tname .avatar.ranked { box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 0 3.5px var(--t); }

/* Progression vers le rang suivant */
.rank-progress { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 240px; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--t) 10%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent); }
.rp-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rp-line b { color: var(--t); font-family: var(--f-display); font-size: 18px; }
.rp-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin: 6px 0 4px; }
.rp-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--t) 70%, transparent), var(--t)); transition: width .6s var(--ease); }
.rp-next { font-size: 12px; }
.me-who { display: flex; align-items: center; gap: 12px; }
.me-row .kpis.compact { grid-template-columns: repeat(3, minmax(80px, auto)); }

/* Échelle des rangs */
.tier-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.tier-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 12px; border-radius: 16px; background: color-mix(in srgb, var(--t) 8%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--t) 22%, transparent); }
.tier-step b { color: var(--t); font-family: var(--f-display); font-size: 16px; }
.tier-step small { font-family: var(--f-num); font-size: 11px; color: var(--muted); }
.tier-step.mine { box-shadow: 0 0 0 2px var(--t); }
.tier-step .you { position: absolute; top: -9px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; background: var(--t); color: #111; }
.tiers-card > .muted { max-width: 60ch; margin: 6px auto 0; font-size: 14px; }
@media (max-width: 560px) { .tier-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rank-progress { min-width: 0; width: 100%; } }

/* Lignes du classement teintées par rang */
.rating-table tr.tier-row td:first-child { box-shadow: inset 3px 0 0 var(--t); }
.rating-table .rank-badge .rk-name { font-size: 10px; }

/* Ailleurs */
.seat .rank-badge { margin-left: auto; }
.seat .rank-badge + .tag { margin-left: 8px; }
.rk-where { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.rk-where .rank-badge { --s: 15px; }
.tile-stats .rank-badge { --s: 16px; }
.tier-item .rank-badge { --s: 18px; }
.rank-result { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--t) 10%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent); }
.rank-result b { font-family: var(--f-display); font-size: 18px; color: var(--t); }
.rank-result .rating-delta { padding: 0; background: none; margin-top: 2px; }
.rank-result.promo { animation: pop .5s var(--ease); box-shadow: inset 0 0 0 2px var(--t), 0 0 30px color-mix(in srgb, var(--t) 35%, transparent); }

.pname-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pname-row .pname { min-width: 0; }
.pname-row .rank-badge { --s: 14px; gap: 3px; }
.pname-row .rank-badge .rk-name { font-size: 9.5px; }
@media (max-width: 560px) { .pname-row .rank-badge .rk-name { display: none; } }

/* ---------- Yam's du jour ---------- */
.daily-home:empty { display: none; }
.daily-card { --accent: var(--coral); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; border-color: color-mix(in srgb, var(--coral) 35%, var(--line)); background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--coral) 14%, var(--surface)), var(--surface) 60%); }
.daily-head { display: flex; flex-direction: column; gap: 8px; }
.daily-title { display: flex; align-items: center; gap: 14px; }
.daily-title h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.daily-dice { display: flex; gap: 4px; flex: none; }
.daily-dice .mini-die { --s: 26px; }
.daily-dice .mini-die:nth-child(2) { transform: translateY(-5px) rotate(8deg); }
.daily-body { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start; }
.daily-mine { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.daily-mine b { font-family: var(--f-display); font-size: 20px; }
.daily-score { font-family: var(--f-display); font-size: 40px; font-weight: 800; color: var(--coral); line-height: 1; }
.daily-board li .who { flex: 1; }
.daily-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.daily-next { font-size: 13px; }
.daily-count { color: var(--ink); font-weight: 600; }
.daily-streak { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--coral) 15%, transparent); color: var(--coral); }
.daily-more { align-self: flex-start; font-size: 14px; }
.daily-yesterday { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.daily-page .daily-card { padding: 26px; }
.daily-result { padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--coral) 12%, var(--surface-2)); }
.daily-result b { font-family: var(--f-display); font-size: 20px; color: var(--coral); }
@media (max-width: 760px) { .daily-body { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Trophées ---------- */
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.trophy-grid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.trophy { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); opacity: .55; filter: grayscale(.8); }
.trophy.got { opacity: 1; filter: none; background: color-mix(in srgb, var(--gold) 10%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent); }
.trophy .ticon { font-size: 26px; line-height: 1; flex: none; width: 34px; text-align: center; }
.trophy b { display: block; font-size: 14px; }
.trophy small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.trophy small.tdate { margin-top: 2px; color: var(--gold); font-weight: 600; }
.trophy-grid.small .trophy { padding: 6px 8px; align-items: center; }
.trophy-grid.small .ticon { font-size: 18px; width: 22px; }
.trophy-grid.small b { font-size: 12px; }
.new-trophies { display: flex; flex-direction: column; gap: 8px; }
.new-trophies .eyebrow { color: var(--gold); }
.trophy.pop { animation: trophyPop .6s var(--ease) both; }
.trophy.pop:nth-of-type(2) { animation-delay: .12s; } .trophy.pop:nth-of-type(3) { animation-delay: .24s; }
@keyframes trophyPop { 0% { opacity: 0; transform: scale(.7) rotate(-4deg); } 60% { opacity: 1; transform: scale(1.04); } 100% { transform: none; } }

/* ---------- Rivalités ---------- */
.rivals { display: flex; flex-direction: column; gap: 10px; }
.rival { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who score" "bar bar" "meta meta"; gap: 6px 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.rival .who { grid-area: who; }
.rival-score { grid-area: score; font-family: var(--f-display); font-size: 22px; font-weight: 800; }
.rival-score .w { color: var(--good); } .rival-score .l { color: var(--bad); } .rival-score .sep { margin: 0 6px; color: var(--muted); }
.rival .wl { grid-area: bar; width: 100%; }
.rival-meta { grid-area: meta; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rival-games { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rg { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); }
.form { display: inline-flex; gap: 3px; margin-left: auto; }
.form i { width: 9px; height: 9px; border-radius: 3px; }
.form .f-w { background: var(--good); } .form .f-l { background: var(--bad); } .form .f-d { background: var(--faint); }
.rival-lines { display: flex; flex-direction: column; gap: 6px; }
.rival-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }

/* Langue */
.lang-btn { font-family: var(--f-num); font-size: 12px; font-weight: 700; letter-spacing: .05em; }

/* ---------- Couleur des points selon le jeu ---------- */
/* Yam's : tous les points en noir */
[data-game="yams"] .dface.one i.on, [data-game="yams"] .mini-die.v1 .pip.on { background: radial-gradient(circle at 36% 30%, var(--pip-hi), var(--pip) 64%); }
/* 10 000 : le 1 et le 5 (les dés qui rapportent) en rouge */
[data-game="10000"] .dface.five i.on, [data-game="10000"] .mini-die.v5 .pip.on { background: radial-gradient(circle at 36% 30%, var(--pip-red-hi), var(--pip-red) 64%); }
.join-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.join-code .join-inline .input { width: 104px; }
.home-hero .features { margin-top: 18px; }

/* ---------- Trophées : bandeau d'accueil et page ---------- */
.trophy-strip { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); text-decoration: none; color: inherit; transition: transform .2s var(--ease), box-shadow .2s; }
.trophy-strip:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.ts-icons { display: flex; flex: none; }
.ts-icons span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 35%, var(--surface)); margin-left: -8px; }
.ts-icons span:first-child { margin-left: 0; }
.ts-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ts-text b { font-family: var(--f-display); font-size: 18px; }
.ts-text .muted { font-size: 13px; }
.trophy-summary { display: flex; align-items: center; gap: 18px; }
.ts-big { display: flex; align-items: baseline; gap: 4px; flex: none; }
.ts-big .num { font-family: var(--f-display); font-size: 46px; font-weight: 800; color: var(--gold); line-height: 1; }
.ts-big small { color: var(--muted); font-size: 16px; }
.trophy-summary .rp-bar i { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 70%, transparent), var(--gold)); }
.trophy-cat .card-head h2 { font-size: 22px; }
.trophies-page .trophy.todo { opacity: .8; filter: grayscale(.85); }
.trophies-page .trophy.todo .ticon { opacity: .55; }
.tprog { margin-top: 6px; }
.tprog .rp-bar { margin: 0 0 3px; height: 6px; }
.tprog .rp-bar i { background: var(--gold); }
.tlock { margin-top: 4px; font-weight: 600; }
@media (max-width: 560px) {
  .trophy-strip { padding: 12px 14px; gap: 10px; }
  .trophy-strip .btn { display: none; }
  .ts-icons span { width: 28px; height: 28px; font-size: 15px; }
}

.tready { color: var(--gold); font-weight: 700; }

/* ---------- Personnalisation : tapis ---------- */
[data-felt="bleu"]     { --felt: #1A4C7A; --felt-2: #0B2340; }
[data-felt="bordeaux"] { --felt: #6E1F33; --felt-2: #33091A; }
[data-felt="ardoise"]  { --felt: #3A434C; --felt-2: #171C21; }
[data-felt="violet"]   { --felt: #4B2E83; --felt-2: #1E1238; }
[data-felt="petrole"]  { --felt: #0F5560; --felt-2: #06272D; }
[data-felt="cognac"]   { --felt: #7A4A26; --felt-2: #3A200E; }
[data-felt="vert"]     { --felt: #12463C; --felt-2: #0A2B25; }

/* ---------- Personnalisation : dés ---------- */
[data-dice="onyx"]   { --die: #2A3236; --die-2: #14191C; --die-hi: #4A565E; --pip: #F4F1EA; --pip-hi: #FFFFFF; --pip-red: #FF6B57; --pip-red-hi: #FFA294; --pip-glow: rgba(0, 0, 0, .35); }
[data-dice="rubis"]  { --die: #C42032; --die-2: #7A0D1B; --die-hi: #EE5A69; --pip: #FFFFFF; --pip-hi: #FFFFFF; --pip-red: #FFC94D; --pip-red-hi: #FFF0BF; --pip-glow: rgba(0, 0, 0, .25); }
[data-dice="saphir"] { --die: #2F6FD6; --die-2: #163A80; --die-hi: #79A6F3; --pip: #FFFFFF; --pip-hi: #FFFFFF; --pip-red: #FFC94D; --pip-red-hi: #FFF0BF; --pip-glow: rgba(0, 0, 0, .25); }
[data-dice="jade"]   { --die: #2C9E77; --die-2: #12654A; --die-hi: #6AD7AE; --pip: #FFFFFF; --pip-hi: #FFFFFF; --pip-red: #FFC94D; --pip-red-hi: #FFF0BF; --pip-glow: rgba(0, 0, 0, .25); }
[data-dice="or"]     { --die: #E6B547; --die-2: #A87612; --die-hi: #FFE59A; --pip: #3A2A08; --pip-hi: #6B5420; --pip-red: #B3261E; --pip-red-hi: #E0574F; --pip-glow: rgba(255, 240, 200, .6); }
[data-dice="glace"]  { --die: #E3EEFC; --die-2: #BCD2F0; --die-hi: #FFFFFF; --pip: #1E3A5F; --pip-hi: #4A6C99; --pip-red: #D23B3B; --pip-red-hi: #F07A7A; --pip-glow: rgba(255, 255, 255, .8); }

/* ---------- Fenêtre « Personnaliser » ---------- */
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.look-opt { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font: inherit; color: inherit; text-align: center; transition: transform .15s var(--ease), border-color .15s, box-shadow .15s; }
.look-opt:hover { transform: translateY(-2px); }
.look-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.look-opt[aria-checked="true"]::after { content: "✓"; position: absolute; top: 8px; right: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--accent); color: var(--accent-ink); }
.look-felt { height: 70px; border-radius: 11px; display: flex; gap: 5px; align-items: center; justify-content: center; background: radial-gradient(130% 100% at 50% 15%, var(--felt), var(--felt-2)); box-shadow: inset 0 2px 14px rgba(0, 0, 0, .4); position: relative; overflow: hidden; }
.look-felt::before { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 5px); }
.look-felt .mini-die { --s: 26px; position: relative; }
.look-opt b { font-size: 13px; font-weight: 650; }
.look-preview { border-radius: 20px; padding: 18px; display: flex; justify-content: center; gap: 10px; background: radial-gradient(130% 100% at 50% 15%, var(--felt), var(--felt-2)); box-shadow: inset 0 2px 20px rgba(0, 0, 0, .4); }
.look-preview .mini-die { --s: 42px; }
.look-preview .gcard { --cw: 44px; }
@media (max-width: 560px) { .look-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .look-felt { height: 56px; } .look-felt .mini-die { --s: 20px; } }
[data-dice="ivoire"] { --die: #FBF7EE; --die-2: #E9E2D2; --die-hi: #FFFFFF; --pip: #16201D; --pip-hi: #4b5753; --pip-red: #C8402F; --pip-red-hi: #e7705c; --pip-glow: rgba(255, 255, 255, .75); }
body:has(.table-page) #btn-look { display: none; }
.brand-mark { background: linear-gradient(145deg, #12463C, #0A2B25) !important; }
.brand-mark i.on { background: #FBF7EE !important; }


/* =====================================================================
   v8 — navigation lisible, accueil « jeux d'abord », nouveaux jeux
   ===================================================================== */

/* ---------- Barre du haut : liens avec libellés ---------- */
.top-nav { display: flex; align-items: center; gap: 2px; margin-right: 6px; }
.top-nav .navlink { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; transition: background .15s, color .15s; white-space: nowrap; }
.top-nav .navlink svg { width: 18px; height: 18px; }
.top-nav .navlink:hover { background: var(--surface-2); color: var(--ink); }
.top-nav .navlink.on { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (max-width: 1240px) { .top-nav .navlink[data-nav="/jour"] { display: none; } }
.topbar .brand .bname { display: inline; }
@media (max-width: 1080px) { .top-nav .navlink span { display: none; } .top-nav .navlink { padding: 8px 10px; } }

/* ---------- Barre d'onglets (téléphone) ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .top-nav { display: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--ink); background: var(--surface-2); }
  .tabbar a.on svg { color: var(--accent); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  body:has(.table-page) .tabbar { display: none; }
  body:has(.table-page) { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .toasts { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
  .topbar .brand .bname { display: inline; font-size: 18px; }
  body:has(.table-page) .topbar .brand .bname { display: none; }
}

/* ---------- Accueil : les jeux d'abord ---------- */
.home { gap: 34px; }
.home-hero.compact { padding-top: 6px; gap: 8px; }
.home-hero.compact h1 { font-size: clamp(30px, 4.6vw, 48px); }
.home-hero.compact .lede { font-size: 16px; }
.games-block { display: flex; flex-direction: column; gap: 16px; }
.games-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.games-head h2 { font-size: 24px; font-weight: 800; }
.game-filter button { padding: 8px 14px; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.game-tile .tile-art { height: 104px; }
.game-tile .tile-body { padding: 12px 14px 14px; gap: 4px; }
.game-tile .tile-title { align-items: center; flex-wrap: nowrap; }
.game-tile .tile-title h3 { font-size: 19px; }
.game-tile .tile-title .rank-badge { --s: 16px; }
.game-tile .tile-meta { margin: 0; }
.game-tile .tile-actions { padding-top: 8px; justify-content: space-between; }
.game-tile .tile-actions .btn { padding: 9px 16px; }
.game-tile .tile-dice .mini-die { --s: 32px; }
.game-tile .tile-cards .gcard { --cw: 46px; }
.new-chip { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.home-duo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.compact-card { padding: 16px 18px; }
.compact-card .card-head { margin-bottom: 8px; }
.compact-card .card-head h3 { font-size: 17px; }
.soon-tiles { grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); }
.home .features { border-top: 1px solid var(--line); margin-top: 0; }
@media (max-width: 1080px) { .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .home-duo { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game-tile .tile-art { height: 86px; }
  .game-tile .tile-title h3 { font-size: 17px; }
  .game-tile .tile-meta { font-size: 11px; }
  .game-tile .tile-actions .btn { padding: 8px 12px; font-size: 14px; flex: 1; }
  .game-tile .tile-actions .link { display: none; }
  .game-tile .tile-dice .mini-die { --s: 24px; }
  .game-tile .tile-cards .gcard { --cw: 38px; }
  .games-head { flex-direction: row; align-items: center; flex-wrap: nowrap; }
  .games-head h2 { font-size: 19px; white-space: nowrap; }
  .game-filter { padding: 3px; flex-wrap: nowrap; flex: none; }
  .game-filter button { white-space: nowrap; }
  .games-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .game-filter button { padding: 6px 10px; font-size: 13px; }
  .home-hero.compact { text-align: center; padding-top: 0; gap: 6px; }
  .home-hero.compact h1 { font-size: 29px; }
  .home-hero.compact .lede { font-size: 14px; }
  .home.page { gap: 18px; padding-top: 14px; }
}
@media (max-width: 380px) { .games-head h2 { font-size: 17px; } .game-filter button { padding: 6px 8px; } }

/* ---------- Choix du mode de jeu ---------- */
.mode-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: transform .15s var(--ease), border-color .15s, background .15s; }
.mode-opt:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.mode-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.mode-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.mode-txt b { font-size: 16px; }
.mode-txt small { color: var(--muted); font-size: 13px; }
.mode-go { font-size: 26px; color: var(--muted); line-height: 1; }

/* ---------- Crapette ---------- */
.crap-zone { color: color-mix(in srgb, var(--felt-ink) 65%, transparent); margin: 10px 0 6px; text-align: center; }
.crap-found { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; --cw: 50px; }
.cslot { border-radius: 8px; transition: box-shadow .15s; }
.found-empty { display: inline-grid !important; place-items: center; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--felt-ink) 55%, transparent); }
.crap-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; --cw: 54px; }
.ccol { display: flex; flex-direction: column; align-items: center; min-height: 92px; padding: 6px 2px; border-radius: 12px; background: rgba(0, 0, 0, .14); transition: box-shadow .15s, background .15s; }
.ccol .gcard + .gcard { margin-top: calc(var(--cw) * -1.05); }
.target { box-shadow: 0 0 0 2px var(--good), 0 0 18px color-mix(in srgb, var(--good) 45%, transparent) !important; cursor: pointer; }
.ccol.target { background: color-mix(in srgb, var(--good) 14%, rgba(0, 0, 0, .14)); }
.gcard.must { box-shadow: 0 0 0 3px var(--gold), 0 4px 10px rgba(0, 0, 0, .3); }
.crap-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin-top: 14px; }
.cplayer { padding: 8px 10px; border-radius: 14px; background: rgba(0, 0, 0, .16); border: 1.5px solid transparent; }
.cplayer.active { border-color: var(--accent); }
.cplayer.penalty { opacity: .75; }
.cp-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.cp-name small { margin-left: auto; font-family: var(--f-num); color: color-mix(in srgb, var(--felt-ink) 75%, transparent); }
.cp-cards { display: flex; gap: 10px; align-items: flex-end; --cw: 48px; }
.cp-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 8px; }
.cp-slot small { font-size: 10.5px; color: color-mix(in srgb, var(--felt-ink) 70%, transparent); white-space: nowrap; }
.cp-slot.drawn { margin-left: auto; }
.gcard.drawn-card { animation: deal .3s var(--ease); }
.btn.crap-btn { background: var(--bad); color: #fff; animation: pop .3s var(--ease); box-shadow: 0 8px 24px color-mix(in srgb, var(--bad) 40%, transparent); }
@media (max-width: 560px) {
  .crap-cols { --cw: 44px; gap: 5px; }
  .crap-found { --cw: 40px; gap: 5px; }
  .cp-cards { --cw: 40px; }
  .crap-players { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Belote ---------- */
.belote-hand { --cw: 82px; }
.gcard.turned { --cw: 66px; animation: deal .35s var(--ease); }
.gcard.hinted { box-shadow: 0 0 0 2px var(--sky), 0 4px 10px rgba(0, 0, 0, .28); }
.tslot.partner .tname { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.belote-say { position: absolute; transform: translateY(-34px); padding: 4px 10px; border-radius: 999px; background: var(--gold); color: #1E1503; font-size: 12px; font-weight: 800; animation: pop .3s var(--ease); white-space: nowrap; }
.tname { position: relative; }
.turn-pts .big.red { color: #FF8C7A; }
.team-scores { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.team-row.us { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.team-row .tn { font-weight: 800; font-family: var(--f-display); }
.team-row .tp { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row b { font-size: 20px; }

/* ---------- 421 ---------- */
.q-round { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.q-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 110px); align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: rgba(0, 0, 0, .14); border: 1.5px solid transparent; }
.q-row.cur { border-color: var(--accent); }
.q-row.best { background: color-mix(in srgb, var(--good) 18%, rgba(0, 0, 0, .14)); }
.q-row.worst { background: color-mix(in srgb, var(--bad) 20%, rgba(0, 0, 0, .14)); }
.q-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-dice { display: flex; gap: 4px; }
.q-dice .mini-die { --s: 22px; }
.q-combo { font-family: var(--f-num); font-size: 13px; font-weight: 700; text-align: right; }
.q-combos td:last-child { color: var(--accent); }

/* v8 : finitions mobiles des nouvelles tables */
.crap-found .found-empty { font-size: 11px; overflow: hidden; text-align: center; }
@media (max-width: 560px) {
  [data-game="421"] .pcard .pscore, [data-game="crapette"] .pcard .pscore { white-space: nowrap; }
}
@media (max-width: 560px) {
  [data-game="belote"] .tslot, [data-game="belote"] .tcard .gcard { --cw: 44px; }
  [data-game="belote"] .trick-table { padding-top: 4px; gap: 4px; }
  [data-game="belote"] .tcenter .gcard { --cw: 48px; }
}

/* Crapette : table plus grande */
[data-game="crapette"] .table-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); }
[data-game="crapette"] .crap-found { --cw: 62px; gap: 10px; }
[data-game="crapette"] .crap-cols { --cw: 70px; gap: 10px; }
[data-game="crapette"] .ccol { min-height: 124px; padding: 8px 4px; }
[data-game="crapette"] .cp-cards { --cw: 60px; gap: 12px; }
[data-game="crapette"] .cp-slot small { font-size: 11.5px; }
[data-game="crapette"] .crap-zone { margin: 14px 0 8px; }
@media (max-width: 980px) { [data-game="crapette"] .table-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  [data-game="crapette"] .crap-found { --cw: 50px; gap: 6px; }
  [data-game="crapette"] .crap-cols { --cw: 58px; gap: 5px; }
  [data-game="crapette"] .ccol { min-height: 100px; padding: 6px 2px; }
  [data-game="crapette"] .cp-cards { --cw: 50px; }
  [data-game="crapette"] .felt { padding-inline: 10px; }
}
[data-game="crapette"] .side .hist td:first-child { white-space: nowrap; }

/* À qui sont les dés ? Et bandeau « À toi de jouer ! » */
.felt { position: relative; }
.dice-owner { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 -4px; font-size: 14px; font-weight: 650; color: color-mix(in srgb, var(--felt-ink) 85%, transparent); }
.dice-owner[hidden] { display: none; }
.felt.theirs .drow { opacity: .82; filter: saturate(.85); }
.turn-flash { position: absolute; left: 50%; top: 50%; z-index: 40; transform: translate(-50%, -50%); padding: 14px 26px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--f-display); font-weight: 800; font-size: clamp(20px, 4vw, 30px); letter-spacing: -.02em; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); pointer-events: none; animation: turnflash 1.9s var(--ease) both; white-space: nowrap; }
@keyframes turnflash { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -56%) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .turn-flash { animation-duration: 1.9s; animation-name: none; } }

/* Crapette : glisser-déposer */
[data-game="crapette"] .gcard.draggable { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.gcard.dragging { opacity: .28; }
.crap-ghost { position: fixed; z-index: 200; pointer-events: none; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 20%; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .45)); }
.crap-ghost .gcard { margin: 0; }
.crap-ghost .gcard + .gcard { margin-top: calc(var(--cw) * -1.05); }
.crap-ghost .gcard.dragging, .crap-ghost .gcard.selected { opacity: 1; transform: none; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.drop-hover { box-shadow: 0 0 0 3px var(--good), 0 0 26px color-mix(in srgb, var(--good) 55%, transparent) !important; background: color-mix(in srgb, var(--good) 22%, rgba(0, 0, 0, .14)) !important; }

/* ---------- Grand écran (jeux de cartes) ---------- */
.felt-fs { position: absolute; right: 12px; bottom: 12px; z-index: 6; width: 38px; height: 38px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--felt-ink) 22%, transparent); background: rgba(0, 0, 0, .22); color: color-mix(in srgb, var(--felt-ink) 85%, transparent); display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s var(--ease), color .15s; }
.felt-fs svg { width: 19px; height: 19px; }
.felt-fs:hover { background: rgba(0, 0, 0, .38); color: var(--felt-ink); transform: scale(1.06); }
body.table-focus .topbar, body.table-focus .tabbar { display: none !important; }
body.table-focus { padding-bottom: 0 !important; }
body.table-focus .table-page.wrap { max-width: none; padding-inline: clamp(8px, 1.6vw, 24px); }
body.table-focus .table-page { padding-top: 10px; }
body.table-focus .table-grid { grid-template-columns: minmax(0, 1fr) !important; }
body.table-focus .table-grid > .side { display: none !important; }
body.table-focus .felt { padding-bottom: 26px; }
body.table-focus .kbd-hint { display: none; }
/* cartes plus grandes */
body.table-focus .tslot, body.table-focus .tcard .gcard { --cw: clamp(56px, 4.6vw, 76px); }
body.table-focus .trick-table { padding-top: 0; gap: 4px 8px; }
body.table-focus [data-game]:not([data-game="crapette"]) .felt.cards .felt-top { margin-bottom: -18px; }
@media (min-width: 761px) { body.table-focus .hand { --cw: clamp(74px, 6.2vw, 100px); } }
/* Crapette en grand écran : la taille des cartes dépend aussi de la hauteur, pour que tout tienne sans défiler */
body.table-focus [data-game="crapette"] { --cc: min(7.2vw, calc((100vh - 450px) / 4.2), 130px); }
@supports (height: 100dvh) { body.table-focus [data-game="crapette"] { --cc: min(7.2vw, calc((100dvh - 450px) / 4.2), 130px); } }
@media (max-width: 760px) {
  body.table-focus [data-game="crapette"] { --cc: min(15vw, calc((100vh - 450px) / 4.2)); }
  @supports (height: 100dvh) { body.table-focus [data-game="crapette"] { --cc: min(15vw, calc((100dvh - 450px) / 4.2)); } }
}
body.table-focus [data-game="crapette"] .crap-found { --cw: calc(var(--cc) * .82); gap: clamp(6px, 1vw, 14px); }
body.table-focus [data-game="crapette"] .crap-cols { --cw: var(--cc); gap: clamp(5px, 1vw, 16px); }
body.table-focus [data-game="crapette"] .ccol { min-height: calc(var(--cc) * 1.9); }
body.table-focus [data-game="crapette"] .cp-cards { --cw: calc(var(--cc) * .78); }
body.table-focus [data-game="crapette"] .crap-zone { margin: 8px 0 6px; }
body.table-focus [data-game="crapette"] .crap-players { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 10px; }
body.table-focus [data-game="crapette"] .felt { padding-top: 16px; }
/* le bouton « Retourner une carte » reste toujours accessible en bas de l'écran */
body.table-focus .table-page .controls { position: sticky; bottom: max(8px, env(safe-area-inset-bottom, 0px)); z-index: 25; }
body.table-focus .table-page .controls .btn { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
@media (max-width: 560px) { .felt-fs { right: 8px; bottom: 8px; width: 34px; height: 34px; } }

/* Crapette : cartes restantes de chacun, en haut à droite du tapis */
.crap-counts { display: flex; gap: 14px; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; max-width: 52vw; }
.crap-counts .cc { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; opacity: .78; }
.crap-counts .cc b { font-family: var(--f-display); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-size: clamp(24px, 3.4vw, 34px); font-variant-numeric: tabular-nums; }
.crap-counts .cc span { font-size: 12px; max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: color-mix(in srgb, var(--felt-ink) 72%, transparent); }
.crap-counts .cc.me { opacity: 1; }
.crap-counts .cc.me b { font-size: clamp(34px, 5.4vw, 52px); }
.crap-counts .cc.cur span { color: var(--c); font-weight: 700; }
.crap-counts .cc.cur span::before { content: "● "; }
.crap-counts.many .cc b { font-size: clamp(20px, 2.6vw, 28px); }
.crap-counts.many .cc.me b { font-size: clamp(30px, 4.4vw, 44px); }
@media (max-width: 560px) { .crap-counts { gap: 10px; max-width: 58vw; } }
body.table-focus [data-game="crapette"] .players-bar { display: none; }
/* téléphone en grand écran : les joueurs côte à côte et des cartes un peu plus grandes */
@media (max-width: 760px) {
  body.table-focus [data-game="crapette"] { --cc: min(15vw, calc((100vh - 330px) / 3.5)); }
  @supports (height: 100dvh) { body.table-focus [data-game="crapette"] { --cc: min(15vw, calc((100dvh - 330px) / 3.5)); } }
  body.table-focus [data-game="crapette"] .crap-players { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
  body.table-focus [data-game="crapette"] .cplayer { padding: 6px 7px; }
  body.table-focus [data-game="crapette"] .cp-cards { gap: 6px; }
  body.table-focus [data-game="crapette"] .cp-slot small { font-size: 10px; }
  body.table-focus .table-page .subline { display: none; }
}

/* ---------- Atouts illustrés (style tarot français ancien) ---------- */
.gcard.trump.tn { background: #FBF6E9; color: #1D1A17; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .25); }
.gcard.tn .tcart { position: absolute; left: 5%; right: 5%; height: 17%; display: flex; align-items: center; gap: 4%; }
.gcard.tn .tcart.top { top: 3.5%; }
.gcard.tn .tcart.bot { bottom: 3.5%; transform: rotate(180deg); }
.gcard.tn .tcart b { flex: none; display: grid; place-items: center; height: 100%; min-width: 30%; padding: 0 3%; border: max(1px, calc(var(--w) * .014)) solid #1D1A17; border-radius: calc(var(--w) * .07); background: #fff;
  font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: calc(var(--w) * .2); line-height: 1; letter-spacing: -.04em; }
.gcard.tn .tcart i { flex: 1; align-self: stretch; margin: 8% 0; border-radius: calc(var(--w) * .03); border: max(1px, calc(var(--w) * .01)) solid rgba(29, 26, 23, .55);
  background: repeating-linear-gradient(45deg, rgba(29, 26, 23, .45) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(29, 26, 23, .35) 0 1px, transparent 1px 3px), #F1EAD8; }
.gcard.tn .tscene { position: absolute; left: 6%; right: 6%; top: 22.5%; bottom: 22.5%; border: max(1px, calc(var(--w) * .012)) solid #1D1A17; border-radius: calc(var(--w) * .03); overflow: hidden; background: #9BD3D6; }
.gcard.tn .tscene svg { display: block; width: 100%; height: 100%; }
/* petites cartes : un seul numéro par cartouche, plus lisible */
.gcard.tn.small .tcart b.r, .meld-cards .gcard.tn .tcart b.r, .mini-row .gcard.tn .tcart b.r { display: none; }
.gcard.excuse.tn { background: #FBF6E9; color: #1D1A17; }
.gcard.excuse.tn .tcart b { color: #8A5A00; font-size: calc(var(--w) * .13); }

/* ---------- Yam's : les dés restent visibles pendant qu'on fait défiler la feuille de marque ---------- */
.play-head { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 961px) {
  /* ordinateur : la colonne des dés reste en place, la feuille (à droite) défile normalement */
  [data-game="yams"] .table-grid > .side { position: static; }
  [data-game="yams"] .table-grid > .play { position: sticky; top: 76px; }
}
@media (max-width: 960px) {
  /* téléphone / tablette : un bandeau collé en haut avec les dés et le bouton, la feuille passe dessous */
  [data-game="yams"] .play-head { position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 20; order: 1; gap: 8px;
    margin-inline: -16px; padding: 6px 16px 10px; background: var(--bg); box-shadow: 0 10px 18px -14px rgba(0, 0, 0, .45); }
  body.table-focus [data-game="yams"] .play-head { top: env(safe-area-inset-top, 0px); }
  [data-game="yams"] .play-head .felt { padding: 12px 14px 10px; border-radius: 22px; }
  [data-game="yams"] .play-head .turn-who .who { font-size: 20px; }
  [data-game="yams"] .play-head .controls .btn.lg { padding-block: 12px; }
}

/* Yam's : dés nécessaires pour la prime, sous chaque case du haut */
.ysheet th.cat .bonus-need { display: block; margin-top: 2px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.ysheet th.cat .bonus-need.easy { color: var(--good); }
.ysheet th.cat .bonus-need.hard { color: color-mix(in srgb, var(--bad) 85%, var(--ink)); }
.input.locked { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* Partie rapide : choix du nombre de joueurs */
.size-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; }
.size-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font: inherit; color: inherit; transition: transform .15s var(--ease), border-color .15s, background .15s; }
.size-opt b { font-family: var(--f-display); font-size: 34px; line-height: 1; font-weight: 800; }
.size-opt span { font-size: 13px; color: var(--muted); }
.size-opt small { margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--good); }
.size-opt:hover, .size-opt.on { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--surface-2)); transform: translateY(-1px); }

/* Bilan entre joueurs, au-dessus du tapis */
.h2h-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.h2h-bar[hidden] { display: none; }
.h2h-t { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h2h-item { display: inline-flex; align-items: baseline; gap: 2px; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.h2h-item .num { font-family: var(--f-num); font-weight: 800; }
.h2h-item.lead { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.h2h-item.lead .num { color: var(--good); }
.h2h-item.behind .num { color: var(--bad); }
.h2h-item small { color: var(--muted); }
body.table-focus [data-game="crapette"] .h2h-bar { display: none; }

/* ======================= v9 ======================= */
/* Accueil : missions, Yam's du jour, trophées */
.home-trio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .home-trio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .home-trio > .side-stack { grid-column: 1 / -1; } }
@media (max-width: 760px) { .home-trio { grid-template-columns: minmax(0, 1fr); } }
.game-tile.featured { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.new-chip.day-chip { background: var(--gold); color: #2A1E00; }
[data-game="president"] { --accent: #C2185B; --accent-ink: #fff; }
[data-game="solitaire"] { --accent: #2E7D5B; --accent-ink: #fff; }
.tile[data-game="president"] { --accent: #C2185B; }
.tile[data-game="solitaire"] { --accent: #2E7D5B; }

/* Missions du jour */
.missions-card { display: flex; flex-direction: column; gap: 10px; }
.missions-card .card-head { margin-bottom: 0; }
.missions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.missions li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.missions li .grow { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.missions li .rp-bar { height: 5px; }
.missions li small { color: var(--muted); font-weight: 700; }
.mcheck { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 2px solid var(--line-2); color: #fff; }
.missions li.done .mcheck, .mission-done .mcheck { background: var(--good); border-color: var(--good); }
.missions li.done > .grow > span { color: var(--ink); }
.missions li.done .rp-bar i { background: var(--good); }
.missions-card.perfect { box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm); }
.mfoot { font-size: 12px; margin: 0; }
.day-streak { display: inline-flex; align-items: baseline; gap: 2px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.day-streak.lit { background: color-mix(in srgb, #FF7A1A 16%, var(--surface-2)); color: var(--ink); }
.new-missions { display: flex; flex-direction: column; gap: 6px; }
.mission-done { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--good) 10%, var(--surface-2)); font-size: 14px; animation: pop .35s var(--ease); }

/* Trophées : paliers */
.trophy-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .trophy-top { grid-template-columns: minmax(0, 1fr); } }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tier-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.tier-card .tc-head { display: flex; align-items: center; gap: 12px; }
.tier-card .tc-head .grow { display: flex; flex-direction: column; min-width: 0; }
.tier-card .tc-head small { color: var(--muted); font-size: 12px; }
.tier-card .ticon { font-size: 26px; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); }
.tier-card.lvl-0 .ticon { filter: grayscale(1); opacity: .6; }
.tier-card .tc-foot { color: var(--muted); font-size: 12px; }
.tier-card .tc-foot b { color: var(--ink); }
.medals { display: flex; gap: 4px; flex: none; }
.md { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.md1.on { background: radial-gradient(circle at 35% 30%, #F2B98A, #C9814F 70%); box-shadow: none; }
.md2.on { background: radial-gradient(circle at 35% 30%, #F3F6F7, #9FB0B8 70%); box-shadow: none; }
.md3.on { background: radial-gradient(circle at 35% 30%, #FFF0B8, #E9B73E 70%); box-shadow: none; }
.trophy.tier-1 .ticon { box-shadow: 0 0 0 2px #C9814F; }
.trophy.tier-2 .ticon { box-shadow: 0 0 0 2px #9FB0B8; }
.trophy.tier-3 .ticon { box-shadow: 0 0 0 2px #E9B73E; }
.exploit-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.exploit-sections .trophy-cat { margin: 0; }

/* Président */
.pres-center { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 8px 0; }
.pres-cards { display: flex; justify-content: center; --cw: 78px; }
.pres-cards .gcard { animation: deal .3s var(--ease); box-shadow: 0 10px 22px rgba(0, 0, 0, .35); }
.pres-cards .gcard + .gcard { margin-left: calc(var(--cw) * -.45); }
.pres-cards.small { --cw: 52px; }
.pres-cards.fading { opacity: .45; transition: opacity .4s; }
.pres-by { font-weight: 700; font-size: 15px; }
.pres-empty { color: color-mix(in srgb, var(--felt-ink) 75%, transparent); max-width: 36ch; }
.pres-passed { font-size: 13px; color: color-mix(in srgb, var(--felt-ink) 70%, transparent) !important; }
.pres-order { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: min(320px, 90%); }
.pres-order li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
.pres-order li span { margin-left: auto; font-size: 13px; opacity: .85; }
.pres-order li em { font-style: normal; font-weight: 800; min-width: 2.5ch; text-align: right; }
.pres-order li.role-president { background: color-mix(in srgb, var(--gold) 28%, rgba(0, 0, 0, .18)); }
.pres-order li.role-trou { background: color-mix(in srgb, var(--bad) 22%, rgba(0, 0, 0, .18)); }
@media (max-width: 560px) { .pres-cards { --cw: 60px; } .pres-center { min-height: 150px; } }

/* Solitaire */
[data-game="solitaire"] .table-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, 280px); }
.sol-top, .sol-cols { --cw: min(88px, calc((100vw - 380px) / 8)); }
@media (max-width: 960px) {
  [data-game="solitaire"] .table-grid { grid-template-columns: minmax(0, 1fr); }
  .sol-top, .sol-cols { --cw: calc((100vw - 52px) / 7.7); }
}
.sol-top { display: flex; align-items: flex-start; gap: calc(var(--cw) * .14); margin-bottom: 14px; }
.sol-gap { flex: 1; }
.sol-stock { position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.sol-stock small { position: absolute; bottom: -2px; right: -4px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .5); color: #fff; border-radius: 999px; padding: 1px 6px; }
.sol-stock .recycle { display: grid; place-items: center; font-size: calc(var(--cw) * .4); color: color-mix(in srgb, var(--felt-ink) 60%, transparent); }
.sol-waste { display: flex; width: calc(var(--cw) * 1.7); }
.sol-waste .gcard + .gcard { margin-left: calc(var(--cw) * -.72); }
.sol-found { border-radius: 8px; }
.sol-found .found-empty { display: grid !important; place-items: center; font-size: calc(var(--cw) * .36); color: color-mix(in srgb, var(--felt-ink) 45%, transparent); }
.sol-found .found-empty.red { color: color-mix(in srgb, #E2574C 55%, transparent); }
.sol-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: calc(var(--cw) * .1); align-items: start; }
.sol-col { display: flex; flex-direction: column; align-items: center; min-height: calc(var(--cw) * 1.5); padding-bottom: 8px; border-radius: 10px; transition: background .15s; }
.sol-col .gcard + .gcard { margin-top: calc(var(--cw) * -1.06); }
.sol-col .gcard.down + .gcard { margin-top: calc(var(--cw) * -1.18); }
.sol-col .tempty { display: grid; place-items: center; font-weight: 800; color: color-mix(in srgb, var(--felt-ink) 35%, transparent); }
.sol-col.target { background: color-mix(in srgb, var(--good) 14%, transparent); }
.gcard.down .pback { opacity: .95; }
[data-game="solitaire"] .gcard.draggable { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.sol-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sol-stats div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.sol-stats b { font-size: 22px; font-family: var(--f-display); }
.sol-stats span { font-size: 12px; color: var(--muted); }
.sol-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.sol-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
body.table-focus .sol-top, body.table-focus .sol-cols { --cw: min(118px, calc((100vw - 60px) / 8.2)); }
[data-game="solitaire"] .players-bar { display: none; }
/* Belote / Tarot sur téléphone : table des plis plus compacte pour voir sa main sans défiler */
@media (max-width: 560px) {
  [data-game="belote"] .tslot, [data-game="belote"] .tcard .gcard, [data-game="tarot"] .tslot, [data-game="tarot"] .tcard .gcard { --cw: 40px; }
  [data-game="belote"] .trick-table, [data-game="tarot"] .trick-table { padding: 0; gap: 2px 4px; }
  [data-game="belote"] .tslot, [data-game="tarot"] .tslot { gap: 3px; }
  [data-game="belote"] .tslot .tname, [data-game="tarot"] .tslot .tname { font-size: 12px; }
  [data-game="belote"] .tcenter .gcard, [data-game="tarot"] .tcenter .gcard { --cw: 44px; }
  [data-game="belote"] .tcenter p, [data-game="tarot"] .tcenter p { margin: 2px 0; font-size: 12px; }
  [data-game="belote"] .felt, [data-game="tarot"] .felt { padding-top: 14px; padding-bottom: 12px; }
}
@media (max-width: 560px) {
  [data-game="belote"] .players-bar, [data-game="tarot"] .players-bar { display: none; }
  [data-game="belote"] .trick-table, [data-game="tarot"] .trick-table { margin-top: -8px; }
}

/* Yam's : cases du haut par rapport à 3 dés (vert au-dessus, rouge en dessous, gris pile) et aide pour la prime */
.ysheet .ycell.filled.up-good { color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); font-weight: 800; }
.ysheet .ycell.filled.up-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.ysheet .bonus-note { display: block; width: max-content; max-width: 100%; margin-top: 3px; padding: 2px 8px; border-radius: 999px; font-family: var(--f-body); font-size: 12px; font-weight: 700; line-height: 1.35; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ysheet .bonus-note.ok { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.ysheet .bonus-note.lost { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }

/* ======================= v10 : Cache-cache et Banco ======================= */
[data-game="cachecache"] { --accent: #3F6FD8; --accent-ink: #fff; }
[data-game="banco"] { --accent: #9C3FB8; --accent-ink: #fff; }
.tile[data-game="cachecache"] { --accent: #3F6FD8; }
.tile[data-game="banco"] { --accent: #9C3FB8; }

/* Cartes maison : même ivoire que les cartes classiques, chiffres en couleur */
.ncard { color: var(--tone, #16201D); }
.ncard .corner { font-size: calc(var(--w) * .19); }
.ncard .nmid { position: absolute; inset: 19% 14%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%;
  border-radius: calc(var(--w) * .12); background: color-mix(in srgb, var(--tone, #16201D) 13%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone, #16201D) 38%, transparent); }
.ncard .nmid b { font-size: calc(var(--w) * .42); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.ncard .nmid small { font-family: var(--f-body); font-size: calc(var(--w) * .115); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.ncard.back { color: inherit; }
.ncard.cc-neg { --tone: #3949AB; }
.ncard.cc-zero { --tone: #0E7FA0; }
.ncard.cc-low { --tone: #23885A; }
.ncard.cc-mid { --tone: #B57800; }
.ncard.cc-high { --tone: #C8402F; }
.bcard.bn { --tone: hsl(var(--hue) 62% 36%); }
.bcard.bmod { --tone: #8A5A00; background: linear-gradient(160deg, #FFFDF5 0%, #FFF1C9 55%, #F2D88A 100%); }
.bcard.bmod .nmid b { font-size: calc(var(--w) * .34); }
.bcard.bact { background: linear-gradient(160deg, #2E2645 0%, #1B1529 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 4px 10px rgba(0, 0, 0, .3); }
.bcard.bact .nmid b { font-size: calc(var(--w) * .36); }
.bcard.b-aF { --tone: #FF8A7A; }
.bcard.b-a3 { --tone: #FFD36E; }
.bcard.b-aS { --tone: #7EE0B5; }

/* Cache-cache */
.cc-grid { --cw: 64px; display: grid; grid-template-columns: repeat(4, var(--cw)); grid-auto-rows: auto; gap: calc(var(--cw) * .1); justify-content: center; }
.cc-grid .gcard { --cw: inherit; width: var(--cw); }
.cc-grid.small { --cw: 28px; gap: 3px; }
.cc-grid.small .gcard { box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 2px 4px rgba(0, 0, 0, .25); }
.cc-grid.small .gcard .corner { display: none; }
.cc-grid.small .ncard .nmid { inset: 10%; }
.cc-grid.small .ncard .nmid b { font-size: calc(var(--w) * .5); }
.cc-gone { width: var(--cw); border-style: dotted; opacity: .45; }
.cc-grid .gcard.fresh { animation: ccflip .45s var(--ease); }
@keyframes ccflip { 0% { transform: rotateY(90deg) scale(.96); } 100% { transform: none; } }
.cc-opps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0 6px; }
.cc-opp { padding: 8px 10px 10px; border-radius: 14px; background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .2s; }
.cc-opp.active { box-shadow: inset 0 0 0 2px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.cc-opp.done .cc-oname b::after { content: ' ✓'; color: var(--gold); }
.cc-oname { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 6px; max-width: 150px; }
.cc-oname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-oname .num { margin-left: auto; font-weight: 800; padding-left: 6px; }
.cc-play { display: flex; justify-content: center; align-items: center; gap: clamp(18px, 4vw, 48px); margin-top: 6px; }
.cc-mid { --cw: 70px; display: grid; grid-template-columns: auto auto; justify-items: center; align-items: end; gap: 14px 16px; padding: 4px 0; }
.cc-mid .cc-hold { grid-column: 1 / -1; }
.cc-pile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cc-pile small { font-size: 12px; font-weight: 650; color: color-mix(in srgb, var(--felt-ink) 72%, transparent); }
.cc-hold .gcard { box-shadow: 0 0 0 3px var(--gold), 0 10px 22px rgba(0, 0, 0, .35); transition: transform .2s var(--ease), opacity .2s; }
.cc-hold .gcard.dropping { opacity: .55; transform: rotate(-8deg) translateX(-10px); }
.gcard.drop-target { box-shadow: 0 0 0 3px var(--accent), 0 0 22px color-mix(in srgb, var(--accent) 50%, transparent); }
.cc-result { grid-column: 1 / -1; max-width: 260px; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 6px; }
.cc-mine { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cc-mine .cc-grid, .cc-opps .cc-grid { --cw: var(--ccw); }
[data-game="cachecache"] .felt-extra { --ccw: clamp(44px, calc((100vh - 330px) / 9), 70px); }
[data-game="cachecache"] .felt-extra[data-n="4"], [data-game="cachecache"] .felt-extra[data-n="5"], [data-game="cachecache"] .felt-extra[data-n="6"] { --ccw: clamp(40px, calc((100vh - 330px) / 13), 58px); }
.cc-opp { scroll-snap-align: center; }
.cc-opps .cc-oname { max-width: none; }
.cc-mine-head { color: color-mix(in srgb, var(--felt-ink) 80%, transparent); font-size: 14px; }
.cc-mine-head .muted { color: color-mix(in srgb, var(--felt-ink) 60%, transparent); }
[data-game="cachecache"] .players-bar { display: none; }
[data-game="cachecache"] .felt { padding-bottom: 14px; }
.cc-mine-head { display: flex; align-items: baseline; gap: 10px; }
.cc-mine .gcard.playable { cursor: pointer; }
@media (hover: hover) { .cc-mine button.gcard.playable:hover { transform: translateY(-5px); } }
.hist td.bad { color: var(--bad); font-weight: 700; }
.hist td.good { color: var(--good); font-weight: 700; }
@media (max-width: 560px) {
  .cc-grid.small { --cw: 22px; gap: 2px; }
  .cc-opps { gap: 6px; }
  .cc-opp { padding: 6px 7px 8px; }
  .cc-oname { font-size: 12px; max-width: 110px; }
  .cc-oname .avatar { display: none; }
  .cc-play { flex-direction: column; gap: 12px; }
  .cc-mid { --cw: 54px; display: flex; gap: 12px; align-items: flex-end; }
  /* téléphone : les grilles adverses défilent de côté, à la même taille que la sienne */
  [data-game="cachecache"] .felt-extra, [data-game="cachecache"] .felt-extra[data-n] { --ccw: min(66px, calc((100vw - 92px) / 4.5)); }
  .cc-opps { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 4px -4px 4px; -webkit-overflow-scrolling: touch; }
  [data-n="2"] > .cc-opps { justify-content: center; }
  .cc-opp { flex: 0 0 auto; }
}
body.table-focus [data-game="cachecache"] .felt-extra { --ccw: min(clamp(48px, calc((100vh - 240px) / 9), 84px), calc((100vw - 92px) / 4.5)); }
body.table-focus .cc-mid { --cw: 80px; }

/* Banco */
.bc-board { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 10px; }
.bc-deck { --cw: 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.bc-deck small { font-size: 12px; font-weight: 650; color: color-mix(in srgb, var(--felt-ink) 72%, transparent); }
.bc-lanes { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bc-lane { padding: 8px 10px; border-radius: 14px; background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .2s, opacity .2s; }
.bc-lane.active { box-shadow: inset 0 0 0 2px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.bc-lane.st-bust { opacity: .62; }
.bc-lane.st-stay, .bc-lane.st-seven { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 55%, transparent); }
.bc-lname { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; min-width: 0; }
.bc-lname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-pts { margin-left: auto; font-weight: 800; font-size: 15px; }
.bc-chip { flex: none; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); text-transform: uppercase; letter-spacing: .05em; }
.bc-lane.st-bust .bc-chip, .bc-chip.st-bust { background: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.bc-lane.st-stay .bc-chip, .bc-lane.st-seven .bc-chip, .bc-chip.st-stay, .bc-chip.st-seven { background: color-mix(in srgb, var(--gold) 26%, transparent); }
.bc-chip.sc { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.bc-cards { --cw: 34px; display: flex; flex-wrap: wrap; gap: 4px; min-height: calc(var(--cw) * 1.4); align-items: center; }
.bc-cards .gcard.small { --cw: inherit; width: var(--cw); }
.bc-cards .gcard.small .corner { display: none; }
.bc-cards .gcard.small .nmid { inset: 9%; }
.bc-cards .gcard.small .nmid b { font-size: calc(var(--w) * .46); }
.bc-cards .gcard.small .nmid small { display: none; }
.bc-cards.big { --cw: 68px; gap: 8px; justify-content: center; min-height: calc(68px * 1.4); }
.bc-cards.fresh > .gcard:last-child, .bc-lane.fresh .bc-cards > .gcard:last-child { animation: deal .35s var(--ease); }
.bc-none { font-size: 13px; }
.gcard.dupe { box-shadow: 0 0 0 3px var(--bad), 0 4px 10px rgba(0, 0, 0, .28); }
.gcard.busted { transform: rotate(9deg); }
.gcard.held { box-shadow: 0 0 0 2px var(--good), 0 4px 10px rgba(0, 0, 0, .28); }
.bc-mine { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bc-mine-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.bc-mine-head .bc-chip { color: var(--ink); background: var(--surface-3); }
.bc-mine-head .bc-chip.st-bust { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.bc-mine-head .bc-chip.sc { color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
.bc-dots { display: flex; gap: 6px; }
.bc-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .2s, transform .2s var(--ease); }
.bc-dots i.on { background: var(--accent); box-shadow: none; transform: scale(1.1); }
.bc-targets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bc-targets small { font-weight: 600; opacity: .8; }
.btn.hinted-btn { box-shadow: 0 0 0 3px var(--sky); }
@media (max-width: 560px) {
  .bc-board { grid-template-columns: minmax(0, 1fr); }
  .bc-deck { flex-direction: row; justify-content: center; --cw: 40px; }
  .bc-cards { --cw: 28px; }
  .bc-cards.big { --cw: min(60px, calc((100vw - 70px) / 5.6)); }
}

/* ======================= v11 : Bataille navale ======================= */
[data-game="navale"] { --accent: #2F7FC1; --accent-ink: #fff; }
.tile[data-game="navale"] { --accent: #2F7FC1; }
/* tuile d'accueil : une petite grille */
.tile-navale { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(10, 11px); gap: 2px; padding: 6px; border-radius: 10px; background: rgba(0, 0, 0, .18); transform: rotate(-4deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.tile-navale i { width: 11px; height: 11px; border-radius: 3px; background: rgba(120, 190, 240, .16); position: relative; }
.tile-navale i.sh { background: #F2EEE4; }
.tile-navale i.h1 { border-radius: 7px 2px 2px 7px; } .tile-navale i.h2 { border-radius: 2px 7px 7px 2px; }
.tile-navale i.v1x { border-radius: 7px 7px 2px 2px; } .tile-navale i.v2x { border-radius: 2px 2px 7px 7px; }
.tile-navale i.v1x, .tile-navale i.vx, .tile-navale i.v2x { background: #E2735F; }
.tile-navale i.m::after { content: ''; position: absolute; inset: 3.5px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.tile-navale i.x::after { content: ''; position: absolute; inset: 2.5px; border-radius: 50%; background: #E2574C; box-shadow: 0 0 0 2px rgba(226, 87, 76, .35); }

/* grilles */
.nv-area { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 3vw, 36px); margin-top: 8px; flex-wrap: wrap; }
.nv-col, .nv-place { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.nv-title { margin: 0; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--felt-ink) 78%, transparent); }
.nv-wait { margin: 4px 0 0; font-size: 14px; color: color-mix(in srgb, var(--felt-ink) 70%, transparent); }
.nv-board { --cs: 34px; display: grid; grid-template-columns: calc(var(--cs) * .62) repeat(10, var(--cs)); grid-auto-rows: var(--cs); gap: 2px; }
.nv-board.big { --cs: clamp(26px, calc((100vh - 360px) / 11.5), 40px); }
.nv-board.small { --cs: 21px; gap: 1px; }
.nv-board.small .nv-lab { font-size: 9px; }
.nv-lab { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: color-mix(in srgb, var(--felt-ink) 55%, transparent); font-family: var(--f-num); }
.nv-board > .nv-lab:nth-child(-n + 11) { align-self: end; padding-bottom: 2px; }
.nv-cell { position: relative; padding: 0; border: 0; border-radius: calc(var(--cs) * .18); background: rgba(120, 190, 240, .1); box-shadow: inset 0 0 0 1px rgba(160, 210, 245, .1); transition: background .15s, transform .12s var(--ease), box-shadow .15s; }
.nv-board.armed button.nv-cell { cursor: crosshair; }
@media (hover: hover) { .nv-board.armed button.nv-cell:hover { background: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: inset 0 0 0 2px var(--accent); } }
.nv-board.placing button.nv-cell { cursor: pointer; }
/* navires : ivoire, comme les cartes du site, bouts arrondis */
.nv-cell.ship { background: linear-gradient(160deg, #FFFFFF, #ECE5D6); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); border-radius: 3px; }
.nv-cell.ship.sh-h { margin: 3px -1px; } .nv-cell.ship.sh-v { margin: -1px 3px; }
.nv-cell.ship.sh-h.sh-first { border-radius: 999px 3px 3px 999px; margin-left: 2px; } .nv-cell.ship.sh-h.sh-last { border-radius: 3px 999px 999px 3px; margin-right: 2px; }
.nv-cell.ship.sh-v.sh-first { border-radius: 999px 999px 3px 3px; margin-top: 2px; } .nv-cell.ship.sh-v.sh-last { border-radius: 3px 3px 999px 999px; margin-bottom: 2px; }
.nv-cell.ship.sh-first.sh-last { border-radius: 999px; }
.nv-cell.ship.sel { background: linear-gradient(160deg, #FFF6D8, #F2D88A); box-shadow: 0 0 0 2px var(--gold), 0 6px 14px rgba(0, 0, 0, .3); z-index: 1; }
.nv-cell.ship.sunk { background: linear-gradient(160deg, #8B4A42, #6B342E); box-shadow: none; }
.nv-cell.ship.ghost { background: rgba(255, 255, 255, .22); }
/* tirs : à l'eau (petit point), touché (rond rouge) */
.nv-cell.miss::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 255, 255, .55); }
.nv-cell.hit::after { content: ''; position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; transform: translate(-50%, -50%); border-radius: 50%; background: #E2574C; box-shadow: 0 0 0 3px rgba(226, 87, 76, .3); }
.nv-cell.ship.sunk.hit::after { background: #FFB2A6; width: 30%; height: 30%; box-shadow: none; }
.nv-cell.water.hit { background: rgba(226, 87, 76, .16); }
.nv-cell.last { animation: nvShot .6s var(--ease); box-shadow: inset 0 0 0 2px var(--gold); z-index: 2; }
.nv-cell.hint { box-shadow: inset 0 0 0 2px var(--sky); background: color-mix(in srgb, var(--sky) 30%, transparent); }
@keyframes nvShot { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: none; } }
/* choix des navires pendant le placement */
.nv-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 460px; }
.nv-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--felt-ink) 20%, transparent); background: rgba(0, 0, 0, .16); color: var(--felt-ink); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.nv-chip.on { background: color-mix(in srgb, var(--gold) 30%, rgba(0, 0, 0, .16)); border-color: var(--gold); }
.nv-pips { display: inline-flex; gap: 2px; }
.nv-pips i { width: 7px; height: 7px; border-radius: 2px; background: currentColor; opacity: .75; }
.nv-pips i.x { background: #E2574C; opacity: 1; }
/* état des flottes (panneau de côté) */
.nv-fleet + .nv-fleet { margin-top: 12px; }
.nv-fname { margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.nv-fleet ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.nv-fleet li { display: flex; align-items: center; gap: 10px; }
.nv-fleet li .nv-pips { width: 56px; color: var(--muted); }
.nv-fleet li.sunk span:last-child { text-decoration: line-through; color: var(--muted); }
.nv-fleet li.sunk .nv-pips i { background: var(--bad); opacity: .8; }
[data-game="navale"] .controls .btn { min-width: 0; }
@media (max-width: 560px) {
  .nv-area { flex-direction: column; align-items: center; gap: 14px; }
  .nv-board.big { --cs: calc((100vw - 76px) / 10.8); gap: 1.5px; }
  .nv-board.small { --cs: calc((100vw - 120px) / 14); }
  [data-game="navale"] .controls { flex-wrap: wrap; }
}
body.table-focus .nv-board.big { --cs: clamp(28px, calc((100vh - 200px) / 11.5), 52px); }
/* en partie : le logo seul suffit (le nom du jeu prend la place du nom du site) */
body:has(.table-page) .topbar .brand .bname { display: none; }
@media (max-width: 420px) { .topbar .brand .bname { font-size: 16px; letter-spacing: -.03em; } }
@media (max-width: 560px) {
  .games-head { flex-wrap: wrap; row-gap: 10px; }
  .games-head h2 { flex-basis: 100%; white-space: normal; overflow: visible; }
  .games-head .game-filter { width: 100%; display: flex; }
  .games-head .game-filter button { flex: 1; }
  [data-game="navale"] .players-bar { display: none; }
}

/* ======================= v12 ======================= */
/* invité */
.profile-chip .guest-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--ink); }
.guest-save { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 14%, var(--surface-2)); font-size: 14px; }
.guest-save > span { flex: 1 1 220px; }
@media (max-width: 560px) { .profile-chip .guest-tag { display: none; } }
/* Bataille navale : glisser-déposer pendant le placement */
.nv-board.placing { touch-action: none; -webkit-user-select: none; user-select: none; }
.nv-board.placing .nv-cell.grab { cursor: grab; }
.nv-board.placing .nv-cell.grab:active { cursor: grabbing; }
.nv-cell.dragging { opacity: .35; }
.nv-cell.pv-ok { background: color-mix(in srgb, var(--good) 55%, transparent) !important; box-shadow: inset 0 0 0 2px var(--good); }
.nv-cell.pv-bad { background: color-mix(in srgb, var(--bad) 45%, transparent) !important; box-shadow: inset 0 0 0 2px var(--bad); }
/* Banco : une grande table, les joueurs autour, la carte tirée au milieu */
[data-game="banco"] .players-bar { display: none; }
.bc-table { position: relative; height: clamp(470px, 62vh, 620px); margin-top: 4px; }
.bc-oval { position: absolute; inset: 9% 6% 24% 6%; border-radius: 50%; background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, .07), rgba(0, 0, 0, .12) 70%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .07), inset 0 0 60px rgba(0, 0, 0, .25); }
.bc-seat { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: min(220px, 30%); padding: 8px 10px; border-radius: 14px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); transition: box-shadow .2s, opacity .2s; z-index: 1; }
.bc-table[data-n="4"] .bc-seat:not(.me) { width: min(200px, 26%); }
.bc-table[data-n="5"] .bc-seat:not(.me), .bc-table[data-n="6"] .bc-seat:not(.me) { width: min(170px, 17.5%); }
.bc-table[data-n="5"] .bc-seat:not(.me) .bc-cards, .bc-table[data-n="6"] .bc-seat:not(.me) .bc-cards { --cw: 24px; }
.bc-seat.me { left: 50%; top: auto; bottom: 0; transform: translateX(-50%); width: min(560px, 94%); padding: 10px 14px 12px; }
.bc-seat.active { box-shadow: inset 0 0 0 2px var(--accent), 0 0 22px color-mix(in srgb, var(--accent) 40%, transparent); }
.bc-seat.st-bust { opacity: .62; }
.bc-seat.st-stay, .bc-seat.st-seven { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 55%, transparent); }
.bc-seat.landed .bc-cards > .gcard:last-child { animation: deal .35s var(--ease); }
.bc-seat .bc-lname { margin-bottom: 6px; }
.bc-total { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: color-mix(in srgb, var(--felt-ink) 80%, transparent); }
.bc-total::after { content: ' pts'; }
.bc-seat.me .bc-lname b { font-size: 15px; }
.bc-seat .bc-cards { justify-content: center; }
.bc-seat.me .bc-cards.big { --cw: 62px; min-height: calc(62px * 1.4); }
.bc-seat.me .bc-dots { justify-content: center; margin-top: 8px; }
.bc-seat.st-bust .bc-chip { background: color-mix(in srgb, var(--bad) 30%, transparent); color: #FFB2A6; }
.bc-seat.st-stay .bc-chip, .bc-seat.st-seven .bc-chip { background: color-mix(in srgb, var(--gold) 26%, transparent); }
.bc-center { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 20px; z-index: 2; }
.bc-center .bc-deck { --cw: 60px; }
.bc-drawn { --cw: 78px; min-width: 170px; min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.bc-drawn .gcard.pop { animation: bcPop .35s var(--ease); box-shadow: 0 0 0 3px var(--gold), 0 14px 30px rgba(0, 0, 0, .45); }
.bc-drawn.bad .gcard.pop { box-shadow: 0 0 0 3px var(--bad), 0 14px 30px rgba(0, 0, 0, .45); }
.bc-drawn p { margin: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.bc-drawn p span { font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.bc-drawn.bad p span { color: #FFB2A6; }
.bc-drawn .cc-result { min-width: 240px; }
@keyframes bcPop { 0% { transform: translateY(-40px) scale(.6) rotate(-8deg); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }
@media (max-width: 560px) {
  .bc-table { height: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .bc-table .bc-oval { display: none; }
  .bc-seat, .bc-table[data-n] .bc-seat:not(.me) { position: static; transform: none; width: auto; }
  .bc-table[data-n="2"] .bc-seat:not(.me) { grid-column: 1 / -1; }
  .bc-center { position: static; transform: none; grid-column: 1 / -1; justify-content: center; padding: 6px 0; }
  .bc-seat.me { grid-column: 1 / -1; width: auto; transform: none; }
  .bc-seat.me .bc-cards.big { --cw: min(52px, calc((100vw - 80px) / 6.4)); }
  .bc-drawn { min-height: 110px; --cw: 62px; }
}
body.table-focus .bc-table { height: calc(100vh - 230px); }
.bc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-width: 0; }
.bc-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; }
.bc-who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-who small { font-size: 11px; color: color-mix(in srgb, var(--felt-ink) 65%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-head .bc-pts { font-size: 20px; font-weight: 800; margin-left: auto; }
.bc-seat.me .bc-head .bc-pts { font-size: 26px; }
.bc-seat.me .bc-who b { font-size: 15px; }
.bc-flag { position: absolute; top: -9px; right: 10px; z-index: 2; background: var(--surface) !important; color: var(--ink) !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.bc-seat.st-bust .bc-flag { background: #5A2620 !important; color: #FFD2CA !important; }
.bc-seat.st-stay .bc-flag, .bc-seat.st-seven .bc-flag { background: var(--gold) !important; color: #2A1E00 !important; }
.bc-table[data-n="5"] .bc-seat:not(.me) .avatar, .bc-table[data-n="6"] .bc-seat:not(.me) .avatar { display: none; }

/* ======================= v12 : Grimpette, Spider, Sudoku ======================= */
[data-game="grimpette"] { --accent: #2F9E6A; --accent-ink: #fff; }
[data-game="spider"] { --accent: #5A6C8C; --accent-ink: #fff; }
[data-game="sudoku"] { --accent: #C0802F; --accent-ink: #fff; }
.tile[data-game="grimpette"] { --accent: #2F9E6A; }
.tile[data-game="spider"] { --accent: #5A6C8C; }
.tile[data-game="sudoku"] { --accent: #C0802F; }

[data-game="grimpette"] .players-bar, [data-game="spider"] .players-bar, [data-game="sudoku"] .players-bar { display: none; }

/* --- Spider --- */
[data-game="spider"] .table-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, 280px); }
.sp-top, .sp-cols { --cw: min(78px, calc((100vw - 400px) / 11)); }
@media (max-width: 960px) {
  [data-game="spider"] .table-grid { grid-template-columns: minmax(0, 1fr); }
  .sp-top, .sp-cols { --cw: calc((100vw - 44px) / 10.6); }
}
body.table-focus .sp-top, body.table-focus .sp-cols { --cw: min(104px, calc((100vw - 60px) / 11)); }
.sp-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.sp-gap { flex: 1; }
.sp-stock { position: relative; display: flex; align-items: flex-start; padding: 0; border: 0; background: none; cursor: pointer; min-height: calc(var(--cw) * 1.4); }
.sp-stock:disabled { cursor: default; }
.sp-stock .gcard + .gcard { margin-left: calc(var(--cw) * -.84); }
.sp-stock small { position: absolute; bottom: -4px; right: -6px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 1px 6px; white-space: nowrap; }
.sp-stock.can .gcard:last-of-type { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, #fff), 0 4px 10px rgba(0, 0, 0, .28); }
.sp-done { display: flex; }
.sp-done > .gcard + * { margin-left: calc(var(--cw) * -.62); }
.sp-done .sp-slot { display: grid; place-items: center; font-family: var(--f-display); font-size: calc(var(--cw) * .26); color: color-mix(in srgb, var(--felt-ink) 50%, transparent); }
.sp-cols { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: calc(var(--cw) * .06); align-items: start; }
.sp-col { --gap: .26; display: flex; flex-direction: column; align-items: center; min-height: calc(var(--cw) * 1.6); padding-bottom: 10px; border-radius: 8px; transition: background .15s; }
.sp-col .gcard + .gcard { margin-top: calc(var(--cw) * (var(--gap) - 1.4)); }
.sp-col .gcard.down + .gcard { margin-top: calc(var(--cw) * -1.3); }
.sp-col.target { background: color-mix(in srgb, var(--good) 14%, transparent); }
.sp-col .gcard.blocked { filter: brightness(.9); }
[data-game="spider"] .gcard.draggable { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.sp-col .gcard.dragging { opacity: .25; }
.sp-ghost .gcard + .gcard { margin-top: calc(var(--cw) * -1.12); }
/* petites cartes (téléphone) : un grand coin lisible, sans le dessin du milieu */
@media (max-width: 960px) {
  .sp-cols .gcard .corner.tl { font-size: calc(var(--w) * .36); top: 3%; left: 6%; flex-direction: row; gap: 0; }
  .sp-cols .gcard .corner.br, .sp-cols .gcard .mid { display: none; }
  .sp-col .gcard + .gcard { margin-top: calc(var(--cw) * (var(--gap) * 1.55 - 1.4)); }
  .sp-ghost .gcard .corner.tl { font-size: calc(var(--w) * .36); flex-direction: row; gap: 0; }
  .sp-ghost .gcard .corner.br, .sp-ghost .gcard .mid { display: none; }
  .sp-ghost .gcard + .gcard { margin-top: calc(var(--cw) * -1.0); }
}

/* --- Grimpette --- */
.grcard.gr-low { --tone: #23885A; }
.grcard.gr-mid { --tone: #3949AB; }
.grcard.gr-high { --tone: #C8402F; }
.grcard.gr-joker { color: #FFD36E; background: linear-gradient(160deg, #3A2F52 0%, #1E1830 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 211, 110, .45), 0 4px 10px rgba(0, 0, 0, .3); }
.grcard.gr-joker .nmid { --tone: #FFD36E; }
.grcard.gr-joker .nmid b { font-size: calc(var(--w) * .4); }
.gr-felt { --cw: 64px; }
.gr-opps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.gr-opp .cc-oname { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.gr-opp .cc-oname .num { margin-left: auto; opacity: .8; }
.gr-opp { padding: 6px 8px 8px; border-radius: 14px; background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .2s; }
.gr-opp.active { box-shadow: inset 0 0 0 2px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.gr-orow { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; --cw: 32px; }
.gr-odiscs { display: flex; gap: 3px; }
.gr-odiscs .gr-disc { padding: 0; min-height: 0; }
.gr-ostock, .gr-stock { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gr-count { position: absolute; top: -6px; right: -8px; min-width: 20px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 800; text-align: center; color: #fff; background: var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.gr-center { display: flex; justify-content: center; align-items: flex-end; gap: clamp(14px, 3vw, 34px); margin: 6px 0 12px; }
.gr-pile, .gr-build { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gr-pile small, .gr-build small, .gr-stock small { font-size: 12px; font-weight: 650; color: color-mix(in srgb, var(--felt-ink) 72%, transparent); white-space: nowrap; }
.gr-builds { display: flex; gap: clamp(8px, 2vw, 18px); }
.gr-build { padding: 6px; border-radius: 12px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.gr-build.target { background: color-mix(in srgb, var(--good) 16%, transparent); }
.gr-build.hinted { box-shadow: 0 0 0 2px var(--sky); }
.gr-start { display: grid !important; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 22px; color: color-mix(in srgb, var(--felt-ink) 35%, transparent); }
.gr-build .gcard.fresh, .gr-disc.fresh .gcard:last-of-type { animation: deal .35s var(--ease); }
.gr-mine { padding: 10px 12px 12px; border-radius: 16px; background: rgba(0, 0, 0, .12); }
.gr-mine-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.gr-row { display: flex; align-items: flex-start; gap: clamp(12px, 3vw, 30px); }
.gr-discs { display: flex; gap: clamp(6px, 1.4vw, 12px); }
.gr-disc { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px; border-radius: 10px; min-height: calc(var(--cw) * 1.4 + 8px); transition: background .15s; }
.gr-disc.full .gcard + .gcard { margin-top: calc(var(--cw) * -1.12); }
.gr-disc.target { background: color-mix(in srgb, var(--good) 14%, transparent); cursor: pointer; }
.gr-disc .gr-more { position: absolute; top: -4px; left: -4px; font-size: 10px; font-style: normal; font-weight: 800; padding: 0 5px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; }
.gr-hand { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gr-felt .grsrc { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.gr-felt .gcard.dragging { opacity: .3; }
.gr-race { display: flex; flex-direction: column; gap: 8px; }
.gr-lane { display: grid; grid-template-columns: minmax(60px, 1fr) 2fr auto; align-items: center; gap: 10px; font-size: 13px; }
.gr-lane .sol-bar { margin: 0; }
.gr-lane .sol-bar i { background: var(--c); }
.gr-lane.active span { font-weight: 800; }
@media (max-width: 560px) {
  .gr-felt { --cw: 52px; }
  .gr-opps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .gr-opp { padding: 5px 6px 6px; min-width: 0; }
  .gr-opp .cc-oname { font-size: 12px; } .gr-opp .cc-oname .avatar { display: none; }
  .gr-opp .cc-oname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gr-orow { --cw: 25px; gap: 5px; }
  .gr-orow .gr-count { top: -5px; right: -6px; font-size: 9px; min-width: 15px; padding: 0 4px; }
  .gr-odiscs { gap: 2px; }
  .gr-odiscs .gr-more { font-size: 8px; }
  .gr-row { flex-direction: column; align-items: center; }
  .gr-stock { flex-direction: row; gap: 8px; }
  .gr-stock .gr-count { right: auto; left: calc(var(--cw) - 14px); }
  .gr-hand { --cw: 58px; gap: 5px; }
  .gr-builds { gap: 2px; }
  .gr-center { gap: 6px; --cw: 48px; }
  .gr-center .gr-pile { --cw: 34px; }
  .gr-build { padding: 3px; }
}

/* --- Sudoku --- */
.tile-sudoku { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(6, 14px); padding: 4px; border-radius: 8px; background: #FBF7EE; transform: rotate(-4deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.tile-sudoku i { width: 14px; height: 14px; display: grid; place-items: center; font-style: normal; font-family: var(--f-display); font-weight: 800; font-size: 9px; color: #16201D; box-shadow: inset -1px -1px 0 rgba(0, 0, 0, .1); }
.tile-sudoku i.br { box-shadow: inset -2px -1px 0 rgba(0, 0, 0, .45); }
.tile-sudoku i.bb { box-shadow: inset -1px -2px 0 rgba(0, 0, 0, .45); }
.tile-sudoku i.br.bb { box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .45); }
.tile-sudoku i.me { color: #C0802F; background: color-mix(in srgb, #C0802F 18%, transparent); }
[data-game="sudoku"] .table-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, 280px); }
@media (max-width: 960px) { [data-game="sudoku"] .table-grid { grid-template-columns: minmax(0, 1fr); } }
.sd-wrap { display: flex; justify-content: center; align-items: center; gap: clamp(16px, 3vw, 34px); flex-wrap: wrap; }
.sd-grid { --sz: min(520px, calc(100vw - 420px)); display: grid; grid-template-columns: repeat(9, 1fr); width: var(--sz); aspect-ratio: 1; padding: 3px; border-radius: 10px; background: #2B2A26; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); gap: 1px; }
.sd-cell { position: relative; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0; background: #FBF7EE; color: #2B5BA8; font-family: var(--f-display); font-weight: 700; font-size: calc(var(--sz) / 15); line-height: 1; cursor: pointer; transition: background .12s; }
.sd-cell.bx-r { box-shadow: inset -2px 0 0 #2B2A26; }
.sd-cell.bx-b { box-shadow: inset 0 -2px 0 #2B2A26; }
.sd-cell.bx-r.bx-b { box-shadow: inset -2px -2px 0 #2B2A26; }
.sd-cell.given { color: #16201D; font-weight: 800; }
.sd-cell.peer { background: #EFE8D6; }
.sd-cell.same { background: #F3DDB0; }
.sd-cell.sel { background: #F0C77A; }
.sd-cell.wrong { color: #C8402F; background: #F7D6CF; }
.sd-cell.wrong.sel { background: #F0B3A6; }
.sd-cell.hinted { box-shadow: inset 0 0 0 3px var(--sky); }
.sd-cell.fresh { animation: flash 1s ease; }
.sd-cell:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; z-index: 1; }
.sd-notes { position: absolute; inset: 6%; display: grid; grid-template-columns: repeat(3, 1fr); }
.sd-notes i { display: grid; place-items: center; font-style: normal; font-family: var(--f-body); font-weight: 700; font-size: calc(var(--sz) / 42); color: #6E6A5E; }
.sd-notes i.on { color: #16201D; background: #F3DDB0; border-radius: 4px; }
.sd-side { display: flex; flex-direction: column; gap: 12px; width: min(260px, 100%); }
.sd-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sd-key { position: relative; display: grid; place-items: center; aspect-ratio: 1.15; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .92); color: #16201D; font-family: var(--f-display); cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); transition: transform .1s, background .12s; }
.sd-key b { font-size: 26px; font-weight: 800; }
.sd-key small { position: absolute; top: 4px; right: 7px; font-size: 10px; font-weight: 700; color: #6E6A5E; }
.sd-key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.sd-key.on { background: #F0C77A; }
.sd-key:disabled { opacity: .35; cursor: default; }
.sd-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sd-tools .btn { justify-content: center; min-width: 0; padding-inline: 8px; color: var(--felt-ink); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.sd-tools .btn:disabled { opacity: .4; }
.sd-tools .btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
body.table-focus .sd-grid { --sz: min(640px, calc(100vh - 220px), calc(100vw - 380px)); }
@media (max-width: 960px) {
  .sd-grid { --sz: min(560px, calc(100vw - 76px)); }
  .sd-wrap { flex-direction: column; }
  .sd-side { width: min(560px, 100%); }
  .sd-pad { grid-template-columns: repeat(9, 1fr); gap: 4px; }
  .sd-key { aspect-ratio: .8; border-radius: 8px; }
  .sd-key b { font-size: 22px; }
  .sd-key small { top: 2px; right: 4px; font-size: 9px; }
  .sd-tools { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .sd-tools .btn { font-size: 13px; padding-inline: 4px; }
}

/* Donner mon avis */
.feedback-cta { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.feedback-cta .fb-icon { font-size: 30px; }
.feedback-cta p { margin: 2px 0 0; font-size: 14px; }
.fb-text { width: 100%; min-height: 120px; resize: vertical; font: inherit; line-height: 1.45; padding: 12px 14px; border-radius: 14px; }
@media (max-width: 560px) { .feedback-cta { flex-wrap: wrap; } .feedback-cta .btn { width: 100%; } }
.bot-soon { font-size: 13px; }

/* Compte : pseudo + mot de passe */
.pw-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pw-fields .help { grid-column: 1 / -1; margin: 0; }
@media (max-width: 560px) { .pw-fields { grid-template-columns: 1fr; } }
.account-box { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.account-box p { margin: 0; font-size: 14px; line-height: 1.45; }
.account-box.warn { background: color-mix(in srgb, var(--gold) 14%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.account-box.ok b { color: var(--good); }
.account-box details summary { cursor: pointer; font-weight: 650; font-size: 14px; margin-bottom: 8px; }
.account-box .btn { align-self: flex-start; }
.login-link, .login-line { margin: 0; font-size: 14px; color: var(--muted); }
.login-line { margin-top: 6px; }
.login-link .link, .login-line .link { font-weight: 700; }
.resume.protect { background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }

/* ======================= v13 : grand écran sur téléphone ======================= */
.chat-dock[hidden] { display: none; }
body.table-focus .chat-dock { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
/* portrait : les tailles des jeux tiennent aussi compte de la largeur de l'écran */
@media (max-width: 560px) {
  body.table-focus :is([data-game="belote"], [data-game="tarot"], [data-game="president"], [data-game="rami"]) .table-page .controls, body.table-focus:has(:is([data-game="belote"], [data-game="tarot"], [data-game="president"], [data-game="rami"], [data-game="banco"])) .table-page .controls { position: static; margin-top: 4px; }
  body.table-focus .table-page.wrap { padding-inline: 6px; }
  body.table-focus .felt { padding: 14px 10px 14px; border-radius: 20px; }
  body.table-focus .bc-table { height: auto; }
  body.table-focus .cc-mid { --cw: 54px; }
  body.table-focus .nv-board.big { --cs: min(clamp(28px, calc((100vh - 200px) / 11.5), 52px), calc((100vw - 40px) / 11)); }
  body.table-focus .sd-grid { --sz: min(560px, calc(100vw - 40px)); }
}
/* téléphone à l'horizontale (grand écran) : en-tête compact, boutons sur le côté, tout le tapis à l'écran */
@media (orientation: landscape) and (max-height: 520px) {
  body.table-focus .table-page.wrap { padding: 4px max(8px, env(safe-area-inset-right, 0px)) 4px max(8px, env(safe-area-inset-left, 0px)); }
  body.table-focus .players-bar, body.table-focus .h2h-bar, body.table-focus .subline, body.table-focus .coach { display: none !important; }
  body.table-focus .felt { padding: 8px 12px 10px; border-radius: 18px; min-height: calc(100vh - 8px); }
  @supports (height: 100dvh) { body.table-focus .felt { min-height: calc(100dvh - 8px); } }
  body.table-focus .felt-top { align-items: center; margin-bottom: 2px; }
  body.table-focus .turn-who .label { font-size: 10px; }
  body.table-focus .turn-who .who { font-size: 17px; }
  body.table-focus .turn-pts .label, body.table-focus .turn-pts .sub { font-size: 10px; min-height: 0; }
  body.table-focus .turn-pts .big, body.table-focus .turn-pts .big.small-big { font-size: 20px; }
  body.table-focus .felt-msg { font-size: 13px; min-height: 1.2em; margin: 2px 0 0; }
  /* les boutons d'action flottent en bas à droite, en colonne */
  body.table-focus .table-page .controls { position: fixed; right: max(10px, env(safe-area-inset-right, 0px)); bottom: 10px; top: auto; left: auto; z-index: 40; flex-direction: column; align-items: stretch; gap: 6px; width: 150px; }
  body.table-focus .table-page .controls { max-height: calc(100vh - 20px); overflow-y: auto; }
  body.table-focus .table-page .controls .btn { min-height: 40px; min-width: 0; width: 100%; flex: none; padding: 8px 12px; font-size: 14px; white-space: normal; line-height: 1.15; }
  /* jeux de plis : la main reste en bas de l'écran, par-dessus le bas du tapis */
  body.table-focus :is([data-game="belote"], [data-game="tarot"], [data-game="president"], [data-game="rami"]) .below { position: fixed; z-index: 30; left: max(8px, env(safe-area-inset-left, 0px)); right: 170px; bottom: 2px; margin: 0; pointer-events: none; }
  body.table-focus :is([data-game="belote"], [data-game="tarot"], [data-game="president"], [data-game="rami"]) .below > * { pointer-events: auto; }
  body.table-focus :is([data-game="belote"], [data-game="tarot"], [data-game="president"], [data-game="rami"]) .hand { --cw: calc((100vh - 40px) / 5.2); min-height: 0; padding: 0; }
  body.table-focus :is([data-game="belote"], [data-game="tarot"], [data-game="president"], [data-game="rami"]) .felt { padding-bottom: calc((100vh - 40px) / 5.2 * 1.4 + 6px); }
  body.table-focus :is([data-game="belote"], [data-game="tarot"], [data-game="president"], [data-game="rami"]) .chat-dock { bottom: auto; top: 50%; }
  body.table-focus .table-page .play:has(.controls:not([hidden]) > .btn:not([hidden])) .felt { margin-right: 160px; }
  body.table-focus .felt-fs { bottom: 8px; right: 8px; }
  body.table-focus .chat-dock { bottom: 10px; right: auto; left: max(10px, env(safe-area-inset-left, 0px)); }
  body.table-focus .chat-fab { width: 42px; height: 42px; }
  /* tailles par jeu, calculées sur la hauteur de l'écran */
  body.table-focus .bc-table { height: calc(100vh - 70px); min-height: 240px; }
  body.table-focus [data-game="cachecache"] .felt-extra, body.table-focus [data-game="cachecache"] .felt-extra[data-n] { --ccw: calc((100vh - 110px) / 4.6); }
  body.table-focus [data-game="cachecache"] .felt-extra { display: flex; align-items: flex-start; justify-content: center; gap: 16px; }
  body.table-focus .cc-opps { flex-wrap: nowrap; overflow-x: auto; margin: 0; max-width: 46%; scroll-snap-type: x mandatory; }
  body.table-focus .cc-play { flex-direction: row; margin: 0; gap: 14px; }
  body.table-focus .cc-mid { --cw: calc((100vh - 120px) / 3.2); display: flex; flex-direction: column; gap: 8px; }
  body.table-focus .nv-board.big { --cs: calc((100vh - 110px) / 11); }
  body.table-focus .sd-wrap { flex-direction: row; flex-wrap: nowrap; gap: 14px; }
  body.table-focus .sd-grid { --sz: calc(100vh - 70px); }
  body.table-focus .sd-side { width: min(300px, 40vw); }
  body.table-focus .sd-pad { grid-template-columns: repeat(5, 1fr); }
  body.table-focus .sd-tools { grid-template-columns: 1fr 1fr; }
  body.table-focus .sp-top, body.table-focus .sp-cols { --cw: min(64px, calc((100vw - 220px) / 10.6)); }
  body.table-focus .sol-top, body.table-focus .sol-cols { --cw: min(64px, calc((100vw - 220px) / 8)); }
  body.table-focus .gr-felt { --cw: calc((100vh - 120px) / 4.4); }
  body.table-focus .gr-opps { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  body.table-focus .gr-orow { --cw: 26px; }
  body.table-focus .gr-center { margin: 2px 0 6px; }
  body.table-focus .gr-felt { --cw: calc((100vh - 150px) / 4.2); }
  body.table-focus .gr-mine { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 14px; padding: 6px 10px; }
  body.table-focus .gr-mine-head { display: none; }
  body.table-focus .gr-disc.full .gcard + .gcard { margin-top: calc(var(--cw) * -1.25); }
  body.table-focus .gr-hand { gap: 4px; flex-wrap: nowrap; }
  body.table-focus .gr-hand { margin: 0; }
  body.table-focus .gr-row { flex-direction: row; }
}
/* conseil : certains jeux sont plus confortables à l'horizontale */
.rotate-tip { display: none; }
@media (orientation: portrait) and (max-width: 560px) {
  body.table-focus .rotate-tip { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 0 0 8px; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: rgba(255, 255, 255, .1); color: var(--felt-ink); }
  body.table-focus .rotate-tip button { background: none; border: 0; color: inherit; font-size: 16px; padding: 0 4px; cursor: pointer; }
}

/* ======================= v13 : Petits chevaux ======================= */
[data-game="chevaux"] { --accent: #B4562B; --accent-ink: #fff; }
.tile[data-game="chevaux"] { --accent: #B4562B; }
.pc-wrap { display: flex; justify-content: center; padding: 4px 0 2px; }
.pc-board { --cs: clamp(20px, calc((100vh - 370px) / 15.5), 38px); position: relative; display: grid; grid-template-columns: repeat(15, var(--cs)); grid-template-rows: repeat(15, var(--cs)); gap: 2px; padding: 8px; border-radius: 18px; background: #F4EEDF; box-shadow: 0 14px 34px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .08); }
@media (max-width: 960px) { .pc-board { --cs: min(36px, calc((100vw - 64px) / 15.6)); } }
body.table-focus .pc-board { --cs: min(calc((100vh - 170px) / 15.4), calc((100vw - 60px) / 15.6), 52px); }
.pc-yard { border-radius: 14px; background: color-mix(in srgb, var(--hc) 24%, #fff); box-shadow: inset 0 0 0 calc(var(--cs) * .4) var(--hc); }
.pc-spot { border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hc) 60%, transparent); margin: 8%; }
.pc-cell { border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); display: grid; place-items: center; font-size: calc(var(--cs) * .38); font-weight: 800; color: rgba(255, 255, 255, .9); transition: box-shadow .15s, background .15s; }
.pc-cell.start { background: var(--hc); }
.pc-cell.start::after { content: '★'; color: rgba(255, 255, 255, .85); font-size: calc(var(--cs) * .5); }
.pc-cell.stair { background: color-mix(in srgb, var(--hc) 78%, #fff); }
.pc-cell.dest { box-shadow: inset 0 0 0 3px #16201D, 0 0 0 2px rgba(255, 255, 255, .9); }
.pc-center { position: relative; overflow: hidden; border-radius: 6px; }
.pc-center .tri { position: absolute; inset: 0; background: var(--hc); }
.pc-center .t0 { clip-path: polygon(0 0, 50% 50%, 0 100%); }
.pc-center .t1 { clip-path: polygon(0 0, 100% 0, 50% 50%); }
.pc-center .t2 { clip-path: polygon(100% 0, 100% 100%, 50% 50%); }
.pc-center .t3 { clip-path: polygon(0 100%, 50% 50%, 100% 100%); }
.pc-tokens { display: contents; }
.pc-horse { position: relative; z-index: 3; display: grid; place-items: center; padding: 0; border: 0; margin: 4%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hc) 55%, #fff), var(--hc) 60%, color-mix(in srgb, var(--hc) 75%, #000)); box-shadow: 0 2px 5px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .7); color: #fff; transition: transform .25s var(--ease); }
.pc-horse b { font-size: calc(var(--cs) * .62); line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.pc-horse i { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #16201D; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.pc-horse.home { margin: 18%; }
.pc-horse.can { cursor: pointer; animation: pcPulse 1.1s ease-in-out infinite; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #16201D, 0 4px 10px rgba(0, 0, 0, .45); }
.pc-horse.can:hover, .pc-horse.can:focus-visible { transform: scale(1.15); animation: none; outline: none; }
.pc-horse.hinted { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sky), 0 4px 10px rgba(0, 0, 0, .45); }
.pc-horse.moved { animation: pcHop .45s var(--ease); }
@keyframes pcPulse { 50% { transform: scale(1.12); } }
@keyframes pcHop { 0% { transform: translateY(-40%) scale(1.2); } 100% { transform: none; } }
.pc-die { min-height: 40px; display: flex; justify-content: flex-end; }
.pc-die .mini-die { --s: 40px; }
.pc-die.rolling .mini-die { animation: pcRoll .55s var(--ease); }
@keyframes pcRoll { 0% { transform: rotate(-200deg) scale(.6); opacity: .3; } 100% { transform: none; opacity: 1; } }
.pc-nodie { font-family: var(--f-display); font-size: 28px; opacity: .6; }
.pc-stables { display: flex; flex-direction: column; gap: 8px; }
.pc-st { display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.pc-st .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--hc); }
.pc-st .muted { grid-column: 2; font-size: 12px; }
.pc-st.active { box-shadow: inset 0 0 0 2px var(--hc); }
.tile-chevaux { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(7, 11px); grid-template-rows: repeat(7, 11px); gap: 2px; padding: 5px; border-radius: 10px; background: #F4EEDF; transform: rotate(-5deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.tile-chevaux i { border-radius: 3px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); display: grid; place-items: center; font-style: normal; font-size: 10px; color: #fff; }
.tile-chevaux i.c { background: var(--hc); }
.tile-chevaux i.h { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hc) 55%, #fff), var(--hc) 65%); border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
@media (orientation: landscape) and (max-height: 520px) { body.table-focus .pc-board { --cs: calc((100vh - 80px) / 15.6); } }

/* ======================= v13 : défis à partager ======================= */
.defi-cta, .defi-result { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.defi-cta { flex-direction: row; align-items: center; flex-wrap: wrap; }
.defi-cta > span { flex: 1 1 260px; font-size: 14px; }
.defi-result.won { background: color-mix(in srgb, var(--gold) 18%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); }
.defi-result .eyebrow { margin: 0; }
.defi-verdict { font-family: var(--f-display); font-size: 22px; }
.defi-result p { margin: 0; font-size: 14px; }
.defi-result > .btn, .defi-cta > .btn { align-self: flex-start; }
.defi-link { width: 100%; display: flex; gap: 8px; }
.defi-link .input { flex: 1; min-width: 0; font-size: 13px; }
.defi-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.defi-board li { display: grid; grid-template-columns: 22px auto 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 14px; }
.defi-board li.me { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 700; }
.defi-board .rk { font-family: var(--f-num); font-weight: 800; color: var(--muted); text-align: center; }
.defi-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.defi-board .tx { font-variant-numeric: tabular-nums; font-weight: 700; }
.defi-page { display: flex; justify-content: center; padding-top: 24px; }
.defi-card { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 0 0 22px; overflow: hidden; }
.defi-card > *:not(.defi-art) { margin-inline: 22px; }
.defi-card h1 { margin: 0; font-size: clamp(28px, 6vw, 40px); }
.defi-card .eyebrow { margin: 0; }
.defi-art { width: 100%; height: 150px; border-radius: 0; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--felt) 90%, #fff 6%), var(--felt-2)); }
.defi-score { font-size: 18px; margin: 0; }
.defi-score b { color: var(--accent); }
.defi-done { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.defi-list { width: calc(100% - 44px); text-align: left; }
.defi-list h3 { font-size: 15px; margin: 8px 0; }
.bubble:has(.bubble-name) { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bubble-name { font-family: var(--f-body); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff; white-space: nowrap; }
/* Banco : le score de la partie en bandeau */
.bc-scorebar { display: none; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 26px 0 8px; }
body.table-focus .bc-scorebar { display: flex; }
@media (max-width: 960px) { .bc-scorebar { display: flex; } }
.bc-sb { position: relative; overflow: hidden; display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px 6px; border-radius: 999px; background: rgba(0, 0, 0, .28); font-size: 12px; }
.bc-sb b { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.bc-sb em { font-style: normal; font-weight: 800; font-size: 14px; }
.bc-sb i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--c); }
.bc-sb.me { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 80%, #fff); }
.bc-sb.cur { background: color-mix(in srgb, var(--accent) 35%, rgba(0, 0, 0, .28)); }
.bc-sb-goal { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }

/* Chat : bouton dans la barre du haut ; en grand écran, petit bouton dans le coin du tapis (à gauche) */
.chat-slot { display: contents; }
.iconbtn.chat-top { position: relative; }
.iconbtn.chat-top.on { color: var(--accent); }
.iconbtn.chat-top .chat-badge, .felt-chat .chat-badge { position: absolute; top: -4px; right: -4px; }
.chat-dock { top: calc(70px + env(safe-area-inset-top, 0px)); bottom: auto; }
.felt-chat { display: none; position: absolute; left: 12px; bottom: 12px; z-index: 6; width: 38px; height: 38px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--felt-ink) 22%, transparent); background: rgba(0, 0, 0, .22); color: color-mix(in srgb, var(--felt-ink) 85%, transparent); place-items: center; cursor: pointer; }
.felt-chat svg { width: 19px; height: 19px; }
body.table-focus .felt-chat:not([hidden]) { display: grid; }
body.table-focus .chat-dock { top: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); right: auto; align-items: flex-start; }
@media (max-width: 760px) {
  .chat-dock .chat-panel { top: calc(64px + env(safe-area-inset-top, 0px)); bottom: auto; max-height: calc(100dvh - 140px); }
  body.table-focus .chat-dock .chat-panel { top: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* Grimpette : les jeux des adversaires en plus grand */
.gr-orow { --cw: 46px; gap: 10px; }
.gr-odiscs { gap: 5px; }
.gr-opp .cc-oname { font-size: 14px; }
@media (max-width: 560px) {
  .gr-opps { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; justify-content: flex-start; padding-bottom: 6px; }
  .gr-opp { flex: 0 0 auto; scroll-snap-align: start; }
  .gr-orow { --cw: 40px; gap: 8px; }
  .gr-orow .gr-count { top: -6px; right: -8px; font-size: 11px; min-width: 18px; padding: 1px 5px; }
  .gr-odiscs { gap: 4px; }
  .gr-opp .cc-oname .avatar { display: inline-grid; }
}
@media (orientation: landscape) and (max-height: 520px) { body.table-focus .gr-orow { --cw: calc((100vh - 150px) / 6); } }
.resume.offline-note { background: color-mix(in srgb, var(--sky) 16%, var(--surface)); }
.resume[hidden] { display: none; }

/* Yam's : les scores possibles ne se confondent plus avec les cases remplies (vertes / rouges).
   Ils s'affichent en bleu, dans un cadre pointillé, avec un « + ». */
.ysheet .ycell.pick { color: #1F6FB2; font-style: normal; font-weight: 800; background: color-mix(in srgb, #3A8FD8 10%, transparent); outline: 1.5px dashed color-mix(in srgb, #3A8FD8 70%, transparent); outline-offset: -4px; }
.ysheet .ycell.pick:not(.zero):not(.confirm)::before { content: '+'; opacity: .65; margin-right: 1px; }
.ysheet .ycell.pick.zero { color: var(--faint); outline-color: color-mix(in srgb, var(--faint) 45%, transparent); background: transparent; }
.ysheet .ycell.pick:hover { background: color-mix(in srgb, #3A8FD8 22%, transparent); }
.ysheet .ycell.pick.confirm, .ysheet .ycell.confirm { outline: 0; color: #fff; background: var(--bad); }
:root[data-theme="dark"] .ysheet .ycell.pick { color: #7CC0F5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ysheet .ycell.pick { color: #7CC0F5; } }
@media (orientation: landscape) and (max-height: 520px) {
  body.table-focus .bc-scorebar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); margin: 0; z-index: 3; flex-wrap: nowrap; max-width: 46%; overflow-x: auto; }
  body.table-focus .bc-sb-goal { display: none; }
}
/* Banco en grand écran (ordinateur) : la table tient dans l'écran, les boutons restent sous le tapis */
body.table-focus [data-game="banco"] .controls, body.table-focus:has([data-game="banco"]) .table-page .controls { position: static; margin-top: 10px; }
@media (min-width: 561px) and (min-height: 521px) { body.table-focus .bc-table { height: max(340px, calc(100vh - 300px)); } }

/* ======================= v14 : Cache-cache plus grand ======================= */
.cc-mine .cc-grid { --cw: var(--ccmine, var(--ccw)); }
[data-game="cachecache"] .felt-extra { --ccw: clamp(46px, calc((100vh - 330px) / 9.4), 70px); --ccmine: clamp(58px, calc((100vh - 330px) / 6.6), 92px); }
[data-game="cachecache"] .felt-extra[data-n="4"], [data-game="cachecache"] .felt-extra[data-n="5"], [data-game="cachecache"] .felt-extra[data-n="6"] { --ccw: clamp(42px, calc((100vh - 330px) / 12), 60px); }
/* à deux, en grand écran sur ordinateur : la grille de l'adversaire, la pioche et la sienne côte à côte */
@media (min-width: 900px) and (min-height: 521px) {
  body.table-focus [data-game="cachecache"] .felt-extra[data-n="2"] { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 48px); --ccw: min(calc((100vh - 230px) / 4.6), calc((100vw - 380px) / 9.6), 110px); --ccmine: min(calc((100vh - 230px) / 4.4), calc((100vw - 380px) / 9), 118px); }
  body.table-focus [data-game="cachecache"] .felt-extra[data-n="2"] .cc-opps, body.table-focus [data-game="cachecache"] .felt-extra[data-n="2"] .cc-play { margin: 0; }
}
body.table-focus [data-game="cachecache"] .felt-extra:not([data-n="2"]) { --ccmine: clamp(64px, calc((100vh - 300px) / 6), 104px); }
@media (max-width: 560px) {
  [data-game="cachecache"] .felt-extra, [data-game="cachecache"] .felt-extra[data-n] { --ccw: min(60px, calc((100vw - 100px) / 4.5)); --ccmine: min(84px, calc((100vw - 56px) / 4.4)); }
  body.table-focus [data-game="cachecache"] .felt-extra, body.table-focus [data-game="cachecache"] .felt-extra[data-n] { --ccw: min(60px, calc((100vw - 100px) / 4.5)); --ccmine: min(88px, calc((100vw - 48px) / 4.4)); }
}
@media (orientation: landscape) and (max-height: 520px) {
  body.table-focus [data-game="cachecache"] .felt-extra, body.table-focus [data-game="cachecache"] .felt-extra[data-n] { --ccw: calc((100vh - 120px) / 4.8); --ccmine: calc((100vh - 110px) / 4.4); }
}
.cc-opp .cc-oname { font-size: 14px; }

/* Grimpette : jeux adverses encore plus grands */
.gr-orow { --cw: 56px; gap: 12px; }
.gr-opp { padding: 8px 12px 12px; }
.gr-opp .cc-oname { font-size: 15px; margin-bottom: 4px; }
@media (max-width: 560px) { .gr-orow { --cw: 48px; gap: 8px; } }
@media (orientation: landscape) and (max-height: 520px) { body.table-focus .gr-orow { --cw: calc((100vh - 140px) / 5.4); } }
/* à deux sur ordinateur (hors grand écran) : la pioche en haut, les deux grilles côte à côte en dessous */
@media (min-width: 900px) {
  body:not(.table-focus) [data-game="cachecache"] .felt-extra[data-n="2"] { display: grid; grid-template-columns: auto auto; grid-template-areas: "mid mid" "opp mine"; justify-content: center; align-items: end; gap: 6px clamp(20px, 3vw, 40px);
    --ccw: min(calc((100vh - 400px) / 4.5), calc((100vw - 640px) / 9.4), 80px); --ccmine: min(calc((100vh - 400px) / 4.3), calc((100vw - 640px) / 8.8), 88px); }
  body:not(.table-focus) [data-game="cachecache"] .felt-extra[data-n="2"] .cc-play { display: contents; }
  body:not(.table-focus) [data-game="cachecache"] .felt-extra[data-n="2"] .cc-opps { grid-area: opp; margin: 0; }
  body:not(.table-focus) [data-game="cachecache"] .felt-extra[data-n="2"] .cc-mid { grid-area: mid; justify-self: center; --cw: 62px; display: flex; gap: 16px; align-items: flex-end; }
  body:not(.table-focus) [data-game="cachecache"] .felt-extra[data-n="2"] .cc-mine { grid-area: mine; }
}
/* téléphone : la barre du haut est pleine, le bouton du chat va dans le coin du tapis */
@media (max-width: 560px) {
  .iconbtn.chat-top { display: none !important; }
  .felt-chat:not([hidden]) { display: grid; }
  .chat-dock, body.table-focus .chat-dock { top: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); left: 12px; right: auto; align-items: flex-start; }
  .chat-dock .chat-panel, body.table-focus .chat-dock .chat-panel { top: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ======================= v14 : Petits chevaux, nouveau plateau ======================= */
.pc-frame { padding: clamp(8px, 1.4vw, 14px); border-radius: 26px; background: linear-gradient(145deg, #8A5A34, #5E3A1E 60%, #4A2C15); box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .3); }
.pc-board { gap: 3px; padding: 10px; border-radius: 18px; background: radial-gradient(120% 120% at 30% 20%, #FFF9EC, #F1E6CC 70%, #E6D6B2); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, .25), inset 0 2px 12px rgba(90, 60, 30, .18); }
.pc-cell { border-radius: 7px; background: linear-gradient(160deg, #FFFFFF, #F6EFE0); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, .18), 0 1px 0 rgba(255, 255, 255, .8); color: rgba(255, 255, 255, .95); text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.pc-cell.start { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hc) 70%, #fff), var(--hc)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 2px 4px rgba(0, 0, 0, .15); }
.pc-cell.stair { background: linear-gradient(160deg, color-mix(in srgb, var(--hc) 62%, #fff), color-mix(in srgb, var(--hc) 85%, #000 0%)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pc-cell.trail { background: color-mix(in srgb, var(--hc) 30%, #fff); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hc) 70%, transparent); }
.pc-cell.dest { box-shadow: inset 0 0 0 3px var(--hc), 0 0 0 3px color-mix(in srgb, var(--hc) 35%, transparent), 0 0 14px color-mix(in srgb, var(--hc) 60%, transparent); }
.pc-yard { position: relative; border-radius: 18px; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--hc) 20%, #fff), color-mix(in srgb, var(--hc) 38%, #fff)); box-shadow: inset 0 0 0 calc(var(--cs) * .32) var(--hc), inset 0 0 0 calc(var(--cs) * .32 + 2px) rgba(0, 0, 0, .12), 0 3px 8px rgba(0, 0, 0, .15); }
.pc-yard.active { box-shadow: inset 0 0 0 calc(var(--cs) * .32) var(--hc), 0 0 0 3px #fff, 0 0 0 6px var(--hc), 0 0 22px color-mix(in srgb, var(--hc) 60%, transparent); }
.pc-yard.empty { filter: saturate(.35); opacity: .6; }
.pc-nest { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .7), rgba(255, 255, 255, .15) 70%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hc) 35%, transparent); }
.pc-yname { position: absolute; left: 50%; bottom: calc(var(--cs) * .02); transform: translateX(-50%); max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(var(--cs) * .36); font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.pc-spot { margin: 10%; background: rgba(255, 255, 255, .85); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .18), 0 0 0 2px color-mix(in srgb, var(--hc) 45%, transparent); }
.pc-center { position: relative; overflow: visible; border-radius: 10px; }
.pc-center .tri { opacity: .92; }
.pc-center .t0, .pc-center .t1, .pc-center .t2, .pc-center .t3 { border-radius: 10px; }
.pc-die { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; width: calc(var(--cs) * 2.3); height: calc(var(--cs) * 2.3); border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; align-content: center; gap: 2px; background: radial-gradient(circle at 35% 30%, #fff, #F3EBDD); box-shadow: 0 0 0 3px var(--hc, #888), 0 6px 16px rgba(0, 0, 0, .35); cursor: default; }
.pc-die .mini-die { --s: calc(var(--cs) * 1.2); }
.pc-die small { font-size: calc(var(--cs) * .3); font-weight: 800; color: var(--hc); text-transform: uppercase; letter-spacing: .04em; }
.pc-die .pc-nodie { font-size: calc(var(--cs) * .9); opacity: 1; }
.pc-die.can { cursor: pointer; animation: pcDie 1.2s ease-in-out infinite; box-shadow: 0 0 0 4px var(--hc), 0 0 0 8px color-mix(in srgb, var(--hc) 30%, transparent), 0 8px 22px rgba(0, 0, 0, .4); }
.pc-die.can:hover { transform: translate(-50%, -50%) scale(1.08); animation: none; }
@keyframes pcDie { 50% { transform: translate(-50%, -50%) scale(1.07); } }
.pc-die.rolling .mini-die { animation: pcRoll .6s var(--ease); }
.pc-horse { margin: 3%; background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--hc) 45%, #fff), var(--hc) 55%, color-mix(in srgb, var(--hc) 70%, #000)); box-shadow: 0 3px 0 color-mix(in srgb, var(--hc) 60%, #000), 0 5px 8px rgba(0, 0, 0, .4), inset 0 0 0 2px rgba(255, 255, 255, .75); }
.pc-pawn { font-size: calc(var(--cs) * .66); line-height: 1; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); transform: translateY(-4%); }
.pc-horse.can { box-shadow: 0 3px 0 color-mix(in srgb, var(--hc) 60%, #000), 0 0 0 3px #fff, 0 0 0 6px var(--hc), 0 6px 12px rgba(0, 0, 0, .45); }
.pc-turnchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(0, 0, 0, .25); font-size: 15px; }
.pc-turnchip i { width: 16px; height: 16px; border-radius: 50%; background: var(--hc); box-shadow: 0 0 0 2px #fff; }
.pc-turnchip b { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-board { --cs: clamp(20px, calc((100vh - 360px) / 15.8), 40px); }
@media (max-width: 960px) { .pc-board { --cs: min(36px, calc((100vw - 80px) / 16)); } .pc-frame { padding: 7px; border-radius: 18px; } .pc-board { padding: 6px; gap: 2px; } }
body.table-focus .pc-board { --cs: min(calc((100vh - 270px) / 16.6), calc((100vw - 80px) / 16), 52px); }
@media (orientation: landscape) and (max-height: 520px) { body.table-focus .pc-board { --cs: calc((100vh - 90px) / 16.4); } }

/* ======================= v14 : promo des défis entre amis (accueil) ======================= */
.defi-promo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; padding: clamp(18px, 3vw, 28px); border-radius: 22px; background: radial-gradient(140% 120% at 0% 0%, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface) 60%), var(--surface); box-shadow: var(--shadow-sm, 0 2px 10px rgba(0, 0, 0, .06)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); position: relative; overflow: hidden; }
.defi-promo::after { content: '🎯'; position: absolute; right: -14px; top: -22px; font-size: 120px; opacity: .08; transform: rotate(-12deg); pointer-events: none; }
.defi-promo h2 { margin: 4px 0 6px; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.defi-promo .row { gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.dp-new { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; letter-spacing: .06em; margin-right: 4px; }
.dp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.dp-steps li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line, rgba(0, 0, 0, .08)); }
.dp-steps .dp-ic { font-size: 24px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); flex: none; }
.dp-steps li div { display: flex; flex-direction: column; }
@media (max-width: 760px) { .defi-promo { grid-template-columns: 1fr; } .dp-steps li { padding: 8px 10px; } }

/* ======================= v14 : vraies coupes, vitrine et objectifs ======================= */
.cup { position: relative; display: inline-grid; place-items: center; flex: none; width: var(--cs); line-height: 0; }
.cup svg { display: block; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.cup .cup-ic { position: absolute; left: 50%; top: calc(var(--cs) * .3); transform: translate(-50%, -50%); font-size: calc(var(--cs) * .3); line-height: 1; }
.cup.lvl-0 svg { filter: grayscale(1) opacity(.55); }
.cup.lvl-0 .cup-ic { filter: grayscale(1); opacity: .55; }
.cup.lvl-3 svg { filter: drop-shadow(0 0 8px rgba(255, 205, 70, .55)) drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.cup-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 8px; padding: 18px 14px 14px; border-radius: 18px; background: linear-gradient(180deg, transparent calc(100% - 14px), #6B4423 calc(100% - 14px)), linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #A0703F), var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cup-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-bottom: 6px; }
.cup-slot small { font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.cup-slot.got small { color: var(--ink); }
.objectives .obj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.objectives .obj-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); }
.objectives .obj-list .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.objectives .obj-list small.muted { font-size: 12px; }
.objectives .obj-list .ticon { font-size: 24px; width: 34px; text-align: center; }
.objectives .obj-list > li > .num { font-size: 12px; color: var(--muted); white-space: nowrap; }
.avatar-closed { display: flex; align-items: center; gap: 12px; }
.avatar-closed[hidden], .avatar-grid[hidden] { display: none; }
.avatar-chosen { font-size: 30px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--accent); }
.defi-promo .hl { color: var(--accent); }
.dp-steps li { background: var(--surface); position: relative; z-index: 1; }

/* ======================= v15 : 8 américain ======================= */
.h8-center { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 8px 0; }
.h8-table { display: flex; align-items: center; gap: clamp(18px, 4vw, 44px); --cw: 84px; }
.h8-deck { position: relative; border: 0; padding: 0; background: none; cursor: default; border-radius: 10px; }
.h8-deck .gcard { box-shadow: 3px 3px 0 rgba(255, 255, 255, .25), 6px 6px 0 rgba(0, 0, 0, .25), 0 10px 22px rgba(0, 0, 0, .35); }
.h8-deck.can { cursor: pointer; }
.h8-deck.can .gcard { outline: 3px solid var(--gold); outline-offset: 3px; animation: pulse 1.6s ease-in-out infinite; }
.h8-count { position: absolute; right: -8px; bottom: -8px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.h8-pilewrap { position: relative; width: calc(var(--cw) * 1.5); height: calc(var(--cw) * 1.45); }
.h8-pile .h8-pc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(calc(var(--k) * -9deg)) translate(calc(var(--k) * -10px), 0); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); opacity: calc(1 - var(--k) * .12); }
.h8-pile .h8-pc.fresh { animation: h8In .35s var(--ease); }
@keyframes h8In { from { transform: translate(-50%, -80%) scale(1.15) rotate(8deg); opacity: 0; } }
.h8-announce { position: absolute; right: -14px; top: -14px; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #1B1B1B; display: grid; place-items: center; font-size: 22px; box-shadow: 0 0 0 3px var(--gold), 0 4px 10px rgba(0, 0, 0, .35); }
.h8-announce.red { color: #C8323C; }
.h8-badge { position: absolute; left: -10px; top: -12px; padding: 4px 10px; border-radius: 999px; background: #D9483B; color: #fff; font-weight: 900; font-size: 18px; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); animation: pulse 1.2s ease-in-out infinite; z-index: 2; }
.h8-badge[hidden] { display: none; }
.h8-dir { font-size: 30px; opacity: .7; min-width: 30px; text-align: center; }
.h8-msg { margin: 0; font-weight: 600; color: color-mix(in srgb, var(--felt-ink) 85%, transparent); text-align: center; }
.h8-suit { font-size: 40px !important; line-height: 1; }
.h8-suit.red { color: #FF8A8A; }
.h8-suitpick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.h8-suitpick[hidden] { display: none; }
.h8-sbtn { font-size: 26px; width: 54px; height: 54px; padding: 0; }
.h8-sbtn.red { color: #C8323C; }
@media (max-width: 560px) { .h8-table { --cw: 64px; gap: 18px; } .h8-center { min-height: 170px; } }

/* ======================= v15 : récompenses (images de profil) ======================= */
.avatar.reward { background: none !important; padding: 0; overflow: visible; }
.avatar.reward svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.reward-ic { display: inline-block; flex: none; line-height: 0; }
.reward-ic svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.avatar-pickers { display: flex; flex-direction: column; gap: 10px; }
.avatar-pickers[hidden] { display: none; }
.avatar-pickers .rw-title { margin: 6px 0 0; }
.avatar-pick.rw { padding: 2px; display: grid; place-items: center; }
.avatar-chosen .reward-ic { width: 44px; height: 44px; }
.rw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rw-game { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.rw-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rw-tiers { display: flex; gap: 10px; }
.rw-slot { position: relative; border: 0; background: var(--surface-2); border-radius: 14px; padding: 6px; display: grid; place-items: center; cursor: default; transition: transform .15s var(--ease, ease); }
.rw-slot.got { cursor: pointer; }
.rw-slot.got:hover { transform: translateY(-2px); }
.rw-slot.locked .reward-ic { filter: grayscale(1) brightness(.85); opacity: .35; }
.rw-slot.on { box-shadow: 0 0 0 2px var(--accent); }
.rw-slot .rw-lock { position: absolute; right: 2px; bottom: 0; font-size: 14px; }
.rw-slot small { position: absolute; right: 2px; bottom: 0; font-weight: 800; color: var(--accent); }
.rw-slot:disabled { opacity: 1; }
.new-rewards { display: flex; flex-direction: column; gap: 8px; }
.rw-new { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); animation: rwPop .5s var(--ease, ease) both; }
.rw-new .grow { display: flex; flex-direction: column; }
@keyframes rwPop { from { transform: scale(.9); opacity: 0; } }

/* ======================= v16 : le Kilo ======================= */
.kl-center { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 10px; }
.kl-opps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.kl-opp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 10px 8px; border-radius: 14px; background: rgba(0, 0, 0, .16); --cw: 46px; transition: box-shadow .2s; }
.kl-opp.on { box-shadow: 0 0 0 2px var(--gold); }
.kl-opp.out { opacity: .55; }
.kl-opp > b { font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--felt-ink); }
.kl-opp > small { font-size: 11.5px; color: color-mix(in srgb, var(--felt-ink) 75%, transparent); }
.kl-oslots { display: flex; gap: 4px; }
.kl-oslot { position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: 6px; background: rgba(255, 255, 255, .06); }
.kl-oslot .gcard { position: absolute; left: 0; top: 0; width: var(--cw); }
.kl-oslot .kl-up { top: 6px; }
.kl-table { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 44px); --cw: 80px; }
.kl-deck { position: relative; }
.kl-deck .gcard { box-shadow: 3px 3px 0 rgba(255, 255, 255, .2), 6px 6px 0 rgba(0, 0, 0, .25), 0 10px 22px rgba(0, 0, 0, .35); }
.kl-deck.empty .gcard { opacity: .25; }
.kl-count { position: absolute; right: -8px; bottom: -8px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.kl-pilewrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kl-pile { position: relative; width: calc(var(--cw) * 1.55); height: calc(var(--cw) * 1.5); border: 0; background: rgba(0, 0, 0, .12); border-radius: 14px; padding: 0; cursor: default; }
.kl-pile.can { cursor: pointer; }
.kl-pile.can:hover { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.kl-pile .kl-pc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(calc(var(--k) * -8deg)) translate(calc(var(--k) * -9px), 0); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.kl-pile .kl-pc.fresh { animation: h8In .35s var(--ease); }
.kl-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: color-mix(in srgb, var(--felt-ink) 60%, transparent); }
.kl-pilecount { font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--felt-ink) 80%, transparent); min-height: 16px; }
.kl-burnt { font-size: 13px; font-weight: 700; color: #FFB37A; min-width: 70px; }
.kl-msg { margin: 0; font-weight: 600; text-align: center; color: color-mix(in srgb, var(--felt-ink) 85%, transparent); min-height: 1.3em; }
.kl-mine { display: flex; justify-content: center; gap: 14px; --cw: 70px; margin: 2px auto 10px; padding: 8px 14px 14px; border-radius: 16px; width: fit-content; background: var(--surface-2); }
.kl-mine.active { box-shadow: 0 0 0 2px var(--accent); }
.kl-slot { position: relative; width: var(--cw); height: calc(var(--cw) * 1.4 + 12px); }
.kl-slot .gcard { position: absolute; left: 0; top: 0; width: var(--cw); }
.kl-slot .kl-up { top: 12px; }
.kl-slot .kl-down.playable { outline: 3px solid var(--gold); outline-offset: 2px; cursor: pointer; animation: pulse 1.6s ease-in-out infinite; }
.kl-gap { position: absolute; inset: 0 0 12px; border-radius: 8px; border: 2px dashed var(--line-2); }
@media (max-width: 560px) { .kl-table { --cw: 60px; gap: 16px; } .kl-opp { --cw: 34px; padding: 5px 7px 6px; } .kl-mine { --cw: 54px; gap: 10px; } }

/* ======================= v17 : fiches des jeux (référencement), pages légales, pied de page ======================= */
.seo[hidden], .site-foot[hidden] { display: none; }
.seo { max-width: 1200px; margin: 28px auto 0; padding: 0 20px; }
.seo-page { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 3vw, 34px); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.seo-page h1 { font-size: clamp(24px, 3.2vw, 34px); }
.seo-page h2 { font-size: clamp(19px, 2.2vw, 23px); margin-top: 18px; }
.seo-page h3 { font-size: 16px; margin-top: 8px; }
.seo-page p, .seo-page li { color: var(--ink-2, var(--ink)); line-height: 1.6; max-width: 78ch; }
.seo-page ul, .seo-page ol { padding-left: 1.3em; margin: 0; display: grid; gap: 4px; }
.seo-page a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.seo-page .ptable { border-collapse: collapse; max-width: 560px; }
.seo-page .ptable td { padding: 5px 10px; border-bottom: 1px solid var(--line); }
.seo-lead { font-size: 17px; }
.seo-crumbs { font-size: 13px; color: var(--muted); }
.seo-crumbs a { color: var(--muted); }
.seo-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-facts span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.seo-play { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink) !important; font-weight: 800; text-decoration: none; }
.seo-games { list-style: none; padding: 0 !important; display: grid !important; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px !important; }
.seo-games li { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.seo-games li a { font-weight: 700; text-decoration: none; }
.seo-games li span { font-size: 12.5px; color: var(--muted); }
.seo-page section { padding-top: 4px; }
.seo-optout { font: inherit; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); cursor: pointer; }
body[data-page="static"] #app { min-height: 0; }
.site-foot { max-width: 1200px; margin: 28px auto 24px; padding: 0 20px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; font-size: 13px; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot p { margin: 0; }
.delete-line { margin-top: 6px; }
.danger-link { color: #C8473A !important; }

/* ======================= v18 : Cache-cache, jeter la carte piochée ======================= */
.cc-pile.can-drop > :first-child { outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: 4px; border-radius: 10px; cursor: pointer; }
.cc-pile.can-drop.on > :first-child { outline: 3px solid var(--gold); }
.cc-dropbtn { align-self: center; margin-top: 8px; }

/* ======================= v18 : page de chaque jeu ======================= */
.hub-page { display: flex; flex-direction: column; gap: 18px; }
.hub-crumbs a { font-size: 14px; color: var(--muted); text-decoration: none; font-weight: 600; }
.hub-crumbs a:hover { color: var(--ink); }
.hub-hero { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 22px; align-items: center; padding: 18px; overflow: hidden; }
.hub-art { border-radius: 18px; min-height: 190px; display: grid; place-items: center; pointer-events: none; }
.hub-intro { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hub-intro h1 { font-size: clamp(30px, 4.5vw, 46px); }
.hub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.hub-actions .btn span { margin-right: 4px; }
.hub-defi { font-size: 13px; margin: 2px 0 0; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hub-grid > div > .card, .hub-me, .hub-board { height: 100%; }
.hub-me .card-head, .hub-board .card-head, .hub-trophies .card-head, .hub-rules .card-head { margin-bottom: 10px; }
.hub-board .board { margin: 0; }
.hub-trophies .rw-list.one { grid-template-columns: 1fr; max-width: 380px; }
.hub-rules h2 { font-size: 22px; }
.hub-daily .daily-card { margin: 0; }
.daily-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; color: inherit; }
.daily-link .grow { display: flex; flex-direction: column; gap: 2px; }
.daily-link .daily-dice { display: flex; gap: 4px; }
.daily-link .daily-dice .mini-die { --s: 22px; }
@media (max-width: 760px) {
  .hub-hero { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .hub-art { min-height: 150px; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .hub-actions .btn.lg { flex-basis: 100%; }
}
.tile-title h3 a { color: inherit; text-decoration: none; }

/* ======================= v18 : corrections d'affichage mobile ======================= */
/* le petit badge de rang chevauchait le pseudo dans la puce du profil : l'anneau de couleur suffit */
.profile-chip .rank-badge.mini { display: none; }
@media (max-width: 560px) {
  /* titre de page (Yam's du jour, Classement…) : il passait sous les boutons son, EN, thème ; la page a déjà son titre */
  body:not(:has(.table-page)) #top-center { display: none; }
  .ptable td:last-child { white-space: normal; text-align: right; font-size: 13px; }
  .ptable td:first-child { padding-right: 10px; }
}
/* glisser une carte sur le tapis */
.gcard.drag-src { opacity: .35; }
.drag-ghost { box-shadow: 0 18px 40px rgba(0, 0, 0, .45) !important; }
.drag-ghost.drop-ok { outline: 3px solid var(--gold); outline-offset: 2px; }
.felt.drop-target { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--gold) 70%, transparent), var(--shadow, none); }
/* Belote, Tarot, Président sur téléphone : le pli au milieu en plus grand */
@media (max-width: 560px) {
  [data-game="belote"] .tslot, [data-game="belote"] .tcard .gcard, [data-game="tarot"] .tslot, [data-game="tarot"] .tcard .gcard { --cw: min(17vw, 70px); }
  [data-game="belote"] .tcenter .gcard, [data-game="tarot"] .tcenter .gcard { --cw: min(17vw, 66px); }
  [data-game="belote"] .trick-table, [data-game="tarot"] .trick-table { padding-top: 16px; gap: 6px 4px; }
  /* grand écran en portrait : sous la barre d'état de l'iPhone, et tout centré verticalement */
  body.table-focus .table-page { min-height: 100vh; display: flex; flex-direction: column; justify-content: safe center; padding-top: max(10px, env(safe-area-inset-top, 0px)); padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
  @supports (height: 100dvh) { body.table-focus .table-page { min-height: 100dvh; } }
  body.table-focus [data-game="belote"] .tslot, body.table-focus [data-game="belote"] .tcard .gcard, body.table-focus [data-game="tarot"] .tslot, body.table-focus [data-game="tarot"] .tcard .gcard { --cw: min(17vw, calc((100vh - 400px) / 5.2), 70px); }
  @supports (height: 100dvh) { body.table-focus [data-game="belote"] .tslot, body.table-focus [data-game="belote"] .tcard .gcard, body.table-focus [data-game="tarot"] .tslot, body.table-focus [data-game="tarot"] .tcard .gcard { --cw: min(17vw, calc((100dvh - 400px) / 5.2), 70px); } }
  body.table-focus [data-game="belote"] .hand { --cw: min(16vw, 66px); }
  body.table-focus :is([data-game="belote"], [data-game="tarot"]) .trick-table { padding-top: 22px; gap: 2px 4px; }
  body.table-focus :is([data-game="belote"], [data-game="tarot"]) .tcenter .eyebrow { display: none; }
  body.table-focus :is([data-game="belote"], [data-game="tarot"]) .tcenter .gcard { --cw: min(15vw, 54px); }
  body.table-focus :is([data-game="belote"], [data-game="tarot"]) .tcenter .muted { font-size: 12px; margin: 0; }
  body.table-focus .hand { min-height: 0; padding-top: 8px; }
  body.table-focus .felt { padding-bottom: 12px; }
  body.table-focus .table-page { gap: 6px; }
}
@media (max-width: 560px) {
  /* grand écran : les boutons restent sous la main, ils ne recouvrent plus les cartes */
  body.table-focus .table-page .controls { position: static !important; margin-top: 4px; }
  /* Kilo, Oti : les cartes des adversaires ne passent plus sur le titre */
  .kl-center { padding-top: 12px; }
}
.kl-center { margin-top: 6px; }
.cc-dropbtn.btn { background: rgba(255, 255, 255, .94); color: #13201C; border-color: transparent; font-weight: 700; } .cc-dropbtn.btn.accent { background: var(--gold); color: #1E1503; }
