/* VOICE   joyeux et complice : la pause café entre collègues
   IDEA    une table de café en noyer sur laquelle on pose les cartes
   PICTURE la table elle-même : pioche, défausse et halo de la couleur en cours au centre
   COLOUR  noyer + quatre couleurs franches (corail, safran, lagon, indigo), papier blanc pour les panneaux
   TYPE    Fredoka (titres, cartes) + Nunito (texte) ; LAYOUT plein écran, adversaires en haut, ta main en bas */

:root {
  --k-corail: #ef5b5b; --k-safran: #f5b31a; --k-lagon: #13a398; --k-indigo: #5563d8; --k-noir: #27212c;
  --wood: #4a2e20; --paper: #fffdf9; --ink: #2a1d16; --ink-2: #6e5c51; --line: #ebe0d6; --sand: #f5ede5;
  --on-wood: #fff3e6; --on-wood-2: #dcc3ad;
  --display: Fredoka, 'Trebuchet MS', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; min-width: 0; }
html, body { height: 100%; }
body {
  margin: 0; font: 16px/1.5 Nunito, system-ui, sans-serif; color: var(--on-wood); overflow-x: clip;
  background-color: var(--wood);
  background-image:
    radial-gradient(120% 85% at 50% 42%, rgba(255, 205, 150, .13), transparent 62%),
    repeating-linear-gradient(91deg, rgba(0, 0, 0, .09) 0 2px, transparent 2px 9px, rgba(255, 255, 255, .03) 9px 11px, transparent 11px 23px),
    repeating-linear-gradient(89deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 41px);
  background-attachment: fixed;
}
body[data-screen=table] { overflow: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--k-safran); outline-offset: 2px; }
[hidden] { display: none !important; }
.splash { min-height: 100dvh; display: grid; place-content: center; text-align: center; gap: 16px; margin: 0; font: 600 20px var(--display); }

/* ---------- boutons & champs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  font: 800 15px/1 Nunito, system-ui, sans-serif; color: inherit;
  background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .22);
  transition: transform .1s, background .15s;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn.primary { background: var(--k-corail); border-color: transparent; color: #fff; box-shadow: 0 3px 0 #b63c3c; }
.btn.primary:hover:not(:disabled) { background: #f36a6a; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn.big { min-height: 56px; font-size: 18px; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
:is(.ticket, .panel, .results, .picker, .chat) .btn:not(.primary) { background: #fff; border-color: var(--line); color: var(--ink); }
:is(.ticket, .panel, .results, .picker, .chat) .btn:not(.primary):hover:not(:disabled) { background: var(--sand); }
input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  font: 700 17px Nunito, system-ui, sans-serif; color: var(--ink); background: #fff; border: 2px solid var(--line);
}
input:focus { border-color: var(--k-lagon); outline: none; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--k-corail); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.hint { color: var(--ink-2); font-size: 14px; margin: 10px 0 0; }

/* ---------- barre du haut */
.bar {
  display: flex; align-items: center; gap: 10px; min-height: 56px;
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, .2);
}
.brand { display: flex; align-items: center; gap: 8px; font: 700 21px var(--display); white-space: nowrap; }
.cup { width: 30px; height: 30px; color: #d9c6b6; flex: none; }
.crumb { color: var(--on-wood-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb b { color: var(--on-wood); letter-spacing: .08em; }
.grow { flex: 1; }

/* ---------- accueil */
.home { display: grid; place-items: center; padding: 24px 16px 48px; min-height: calc(100dvh - 56px); }
.ticket {
  width: min(480px, 100%); background: var(--paper); color: var(--ink); border-radius: 24px; padding: clamp(22px, 5vw, 34px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 2px 0 #fff inset;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo .cup { width: 60px; height: 60px; color: #c8b5a6; }
.logo h1 { font-size: 46px; margin: 0; }
.lead { color: var(--ink-2); margin: 10px 0 20px; }
.field > span { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.game-tile { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--sand); margin: 18px 0 14px; }
.game-tile h2 { margin: 0; font-size: 24px; }
.game-tile p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.game-tile .meta { font-weight: 800; color: var(--k-lagon); }
.mini-fan { display: flex; padding: 6px 4px 6px 30px; }
.mini-fan .card { --cw: 46px; margin-left: -28px; transform: rotate(-12deg); }
.mini-fan .card:nth-child(2) { transform: rotate(0deg) translateY(-4px); }
.mini-fan .card:nth-child(3) { transform: rotate(12deg); }
.or { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; color: var(--ink-2); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
#code { text-transform: uppercase; letter-spacing: .3em; text-align: center; font: 700 20px var(--display); }
.joining { margin: 18px 0 12px; }
.ticket .btn.ghost { width: 100%; margin-top: 10px; }

/* ---------- salon */
.lobby {
  max-width: 1120px; margin: 0 auto; padding: 20px 16px 56px; display: grid; gap: 16px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.panel { background: var(--paper); color: var(--ink); border-radius: 20px; padding: 20px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.panel h2 { margin: 0 0 10px; font-size: 22px; display: flex; justify-content: space-between; align-items: baseline; }
.panel h2 span { font: 700 15px Nunito, sans-serif; color: var(--ink-2); }
.label { margin: 0; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.code { margin: 2px 0 14px; font: 700 clamp(56px, 12vw, 88px)/1 var(--display); letter-spacing: .14em; color: var(--k-corail); }
.share { display: flex; gap: 8px; align-items: center; background: var(--sand); border-radius: 14px; padding: 6px 6px 6px 14px; }
.share .link { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.people { list-style: none; margin: 0 0 12px; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.people li.off { opacity: .55; }
.who { flex: 1; }
.who em { font-style: normal; color: var(--ink-2); }
.tags i { font-style: normal; font-size: 12px; font-weight: 800; background: #f1e4d8; color: var(--ink-2); padding: 2px 8px; border-radius: 99px; margin-left: 6px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--av); color: #fff; font: 600 15px var(--display); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
}
.avatar.bot { border-radius: 12px; }
.switch { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { width: 48px; height: 28px; border-radius: 99px; background: #d8cabe; position: relative; transition: background .2s; margin-top: 2px; }
.track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + .track { background: var(--k-lagon); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--k-safran); outline-offset: 2px; }
.switch input:disabled ~ * { cursor: default; }
.switch small { display: block; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.seg-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; background: #f1e4d8; border-radius: 12px; padding: 3px; }
.seg button { min-height: 40px; min-width: 50px; padding: 0 10px; border: 0; background: none; font: 800 15px Nunito, sans-serif; border-radius: 9px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.seg button:disabled { cursor: default; }
.scores ol, .standings { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: r; }
.scores li, .standings li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; counter-increment: r; }
.scores li span::before, .standings li span::before { content: counter(r) ". "; color: var(--ink-2); }
.scores li b, .standings li b { font-variant-numeric: tabular-nums; }
.go { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; }
.go .btn.big { max-width: 520px; }
.go .hint, .waiting { color: var(--on-wood-2); text-align: center; }
.waiting { font: 600 19px var(--display); color: var(--on-wood); margin: 6px 0; }
.howto { grid-column: 1 / -1; }
.howto summary { font: 700 20px var(--display); cursor: pointer; min-height: 32px; }
.rules-list { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; max-width: 75ch; }

/* ---------- cartes */
.card {
  --cw: 78px; --kc: var(--k-noir);
  position: relative; flex: none; width: var(--cw); aspect-ratio: 2 / 3; padding: 0; overflow: hidden;
  display: grid; place-items: center; border-radius: calc(var(--cw) * .13);
  background: var(--kc); color: #fff; border: calc(var(--cw) * .05) solid #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .22), 0 8px 18px rgba(0, 0, 0, .3);
  font-family: var(--display); font-weight: 700;
}
.k-corail { --kc: var(--k-corail); } .k-safran { --kc: var(--k-safran); } .k-lagon { --kc: var(--k-lagon); }
.k-indigo { --kc: var(--k-indigo); } .k-noir { --kc: var(--k-noir); }
.card.k-safran { color: #3a2500; }
.card::before { /* la « rafale » : trois traits de vent en travers de la carte */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(118deg, transparent 0 calc(var(--cw) * .2), rgba(255, 255, 255, .16) calc(var(--cw) * .2) calc(var(--cw) * .26));
  -webkit-mask: linear-gradient(118deg, transparent 22%, #000 40% 60%, transparent 78%);
  mask: linear-gradient(118deg, transparent 22%, #000 40% 60%, transparent 78%);
}
.face { position: relative; display: grid; place-items: center; }
.face .num { font-size: calc(var(--cw) * .64); line-height: 1; text-shadow: 0 calc(var(--cw) * .035) 0 rgba(0, 0, 0, .2); }
.face .num.plus { font-size: calc(var(--cw) * .44); letter-spacing: -.02em; }
.num.u { text-decoration: underline; text-decoration-thickness: calc(var(--cw) * .04); text-underline-offset: calc(var(--cw) * .06); }
.face .ico { width: calc(var(--cw) * .56); fill: currentColor; filter: drop-shadow(0 calc(var(--cw) * .03) 0 rgba(0, 0, 0, .2)); }
.face .flower { width: calc(var(--cw) * .66); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .3)); }
.wdraw { display: grid; justify-items: center; gap: calc(var(--cw) * .04); }
.wdraw .flower { width: calc(var(--cw) * .36); }
.card .ico.st { fill: none; }
.card .ico.st .dot { fill: currentColor; stroke: none; }
.pip { position: absolute; display: grid; justify-items: center; gap: 1px; line-height: 1; font-size: calc(var(--cw) * .17); }
.pip.tl { top: 5%; left: 8%; }
.pip.br { bottom: 5%; right: 8%; transform: rotate(180deg); }
.pip .mini { width: calc(var(--cw) * .12); fill: currentColor; opacity: .9; }
.pip .ico { width: calc(var(--cw) * .17); fill: currentColor; }
.pip .flower { width: calc(var(--cw) * .2); }
.card.tiny .pip { display: none; }
.card.back {
  background:
    linear-gradient(118deg, transparent 34%, var(--k-corail) 34% 42%, var(--k-safran) 42% 50%, var(--k-lagon) 50% 58%, var(--k-indigo) 58% 66%, transparent 66%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 3px, transparent 3px 7px), #2c1f2d;
}
.card.back::before { display: none; }
.back-mark { font: 700 calc(var(--cw) * .36)/1 var(--display); color: #fff; width: 46%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #2c1f2d; box-shadow: 0 0 0 calc(var(--cw) * .03) #fff; }
.card.tiny .back-mark { display: none; }

/* ---------- table */
.table { height: calc(100dvh - 56px - env(safe-area-inset-top)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; }
.seats-wrap { padding: 10px 12px 0; }
.flow { margin: 0 0 8px; text-align: center; font-size: 13px; font-weight: 700; color: var(--on-wood-2); }
.seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 10px; }
.seat {
  position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
  padding: 10px 14px 10px 10px; border-radius: 16px; min-width: 150px; max-width: 220px;
  background: rgba(0, 0, 0, .22); border: 2px solid transparent; transition: background .2s, border-color .2s;
}
.seat.turn { border-color: var(--k-safran); background: rgba(0, 0, 0, .34); }
.seat.off { opacity: .55; }
.seat-av { position: relative; display: grid; border-radius: 50%; }
.seat .seat-av { grid-row: span 2; }
.seat-av.timed::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(var(--k-safran) calc(var(--p, 1) * 360deg), rgba(255, 255, 255, .14) 0);
  -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px);
  mask: radial-gradient(circle, transparent 23px, #000 24px);
}
.seat-av.hurry::before { background: conic-gradient(var(--k-corail) calc(var(--p, 1) * 360deg), rgba(255, 255, 255, .14) 0); }
.seat-txt { display: grid; }
.seat-name { font: 600 16px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-count { font-size: 13px; color: var(--on-wood-2); white-space: nowrap; }
.backs { grid-column: 1 / -1; display: flex; margin-top: 8px; padding-left: 6px; height: 24px; }
.backs .card { --cw: 16px; margin-left: -7px; border-width: 1.5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); border-radius: 3px; }
.flag { position: absolute; top: -11px; right: -6px; background: var(--k-safran); color: #3a2500; font: 700 12px var(--display); padding: 3px 9px; border-radius: 99px; transform: rotate(4deg); }
.btn.catch { position: absolute; bottom: -16px; right: -6px; min-height: 38px; background: var(--k-corail); color: #fff; border: 0; box-shadow: 0 3px 0 #b63c3c; animation: pulse .7s infinite alternate; z-index: 2; }

.center { display: grid; align-content: center; justify-items: center; gap: 10px; padding: 8px 12px; overflow: hidden; }
.piles { display: flex; align-items: flex-start; gap: clamp(28px, 7vw, 72px); }
.pile { position: relative; display: grid; justify-items: center; gap: 16px; background: none; border: 0; color: inherit; padding: 0; }
.piles { --pw: clamp(74px, 10.5vw, 108px); }
.pile .card { --cw: var(--pw); }
.stack { display: grid; }
.stack .card { grid-area: 1 / 1; }
.stack .card:nth-child(2) { transform: translate(3px, -3px); }
.stack .card:nth-child(3) { transform: translate(6px, -6px); }
.draw.can { cursor: pointer; }
.draw.can .stack .card:last-child { box-shadow: 0 0 0 4px var(--k-safran), 0 8px 18px rgba(0, 0, 0, .35); }
.draw:disabled { cursor: default; }
.pile-label { font-size: 14px; font-weight: 800; color: var(--on-wood-2); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.pile-label.cur { color: var(--on-wood); }
.discard .halo {
  position: absolute; left: 50%; top: calc(var(--pw) * .75); width: calc(var(--pw) * 1.62); aspect-ratio: 1;
  translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cur) 60%, transparent) 0 38%, transparent 70%);
  border: 5px solid color-mix(in srgb, var(--cur) 85%, transparent);
  transition: background .3s, border-color .3s;
}
.discard > .card { transform: rotate(var(--tilt, 0deg)); }
.card.land { animation: land .38s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes land { from { transform: translateY(90px) rotate(calc(var(--tilt, 0deg) + 24deg)) scale(1.15); opacity: .3; } }
.shape.inline { width: 16px; height: 16px; fill: var(--cur); }
.feed .shape.inline { fill: var(--kc); vertical-align: -2px; }
.pending { margin: 0; padding: 4px 16px; border-radius: 99px; background: var(--k-corail); color: #fff; font: 700 20px var(--display); }
.feed { list-style: none; margin: 4px 0 0; padding: 0; text-align: center; font-size: 14px; color: var(--on-wood-2); min-height: 4.4em; }
.feed li:first-child { color: var(--on-wood); font-size: 16px; }
.feed li:nth-child(3) { opacity: .6; }

.mebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: rgba(0, 0, 0, .26); }
.mebar.turn { background: rgba(245, 179, 26, .18); }
.status { display: flex; align-items: center; gap: 14px; }
.status p { margin: 0; font: 600 18px/1.2 var(--display); }
.secs { color: var(--k-safran); font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.announce { background: var(--k-safran); color: #3a2500; border: 0; box-shadow: 0 3px 0 #b8840d; }
.btn.announce:disabled { background: rgba(255, 255, 255, .08); color: var(--on-wood-2); box-shadow: none; opacity: 1; }
.btn.announce.ready { animation: pulse .8s infinite alternate; }
@keyframes pulse { to { transform: scale(1.07); } }

.hand {
  --cw: clamp(62px, 8.6vw, 92px);
  display: flex; justify-content: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  padding: 22px 12px calc(14px + env(safe-area-inset-bottom));
}
.hand.scrolls { justify-content: flex-start; }
.hand .card { --cw: inherit; transition: transform .15s, filter .15s; cursor: default; }
.hand .card + .card { margin-left: var(--gap, 6px); }
.hand.live .card[aria-disabled=true] { filter: saturate(.5) brightness(.68); }
.hand .card.ok { transform: translateY(-14px); cursor: pointer; }
.hand .card.ok:hover, .hand .card.ok:focus-visible { transform: translateY(-22px); z-index: 1; }

/* ---------- cartes spéciales */
.face .num.plus.xl { font-size: calc(var(--cw) * .36); }
.seat.out { opacity: .4; filter: grayscale(.8); }
.seat.spied .backs { height: auto; max-height: 50px; overflow: hidden; flex-wrap: wrap; gap: 2px; padding-left: 0; }
.seat.spied .backs .card { --cw: 15px; margin-left: 0; border-radius: 3px; border-width: 1px; }
.seat-count.danger, .danger-note { color: #ff8f80; font-weight: 800; }
.danger-note { display: block; font: 800 13px Nunito, sans-serif; margin-top: 2px; }
.flag.power { top: auto; bottom: -10px; right: auto; left: 8px; background: var(--k-indigo); color: #fff; transform: rotate(-3deg); }
.xray { display: grid; justify-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; background: rgba(0, 0, 0, .28); font-size: 13px; font-weight: 800; color: var(--on-wood-2); }
.xray > div { display: flex; gap: 6px; }
.xray .card { --cw: 34px; border-radius: 5px; }
.targets { display: grid; gap: 10px; }
.target { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--ink); font: 700 17px var(--display); text-align: left; cursor: pointer; }
.target:hover { border-color: var(--k-corail); background: #fff4f2; }
.target span { font: 800 14px Nunito, sans-serif; color: var(--ink-2); }
.lo-cards em { color: #b63c3c; font-weight: 800; font-style: normal; }

/* ---------- fenêtres */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(25, 12, 6, .58); }
.picker, .results { width: min(480px, 100%); max-height: 92dvh; overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 24px; padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.picker h2, .results h2 { margin: 0 0 16px; font-size: 28px; }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swatch { min-height: 100px; border: 0; border-radius: 18px; background: var(--kc); color: #fff; display: grid; place-content: center; justify-items: center; gap: 6px; font: 700 19px var(--display); cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
.swatch.k-safran { color: #3a2500; }
.swatch .shape { width: 34px; height: 34px; fill: currentColor; }
.swatch:hover { filter: brightness(1.07); }
.kicker { margin: 0 0 4px; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.results h2 { margin-bottom: 4px; }
.gain { margin: 0 0 14px; font: 700 22px var(--display); color: var(--k-lagon); }
.leftovers { list-style: none; margin: 0 0 16px; padding: 0; }
.leftovers li { display: grid; grid-template-columns: minmax(0, 7em) 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lo-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-cards { display: flex; flex-wrap: wrap; gap: 3px; }
.lo-cards .card { --cw: 26px; border-radius: 4px; box-shadow: none; }
.results h3 { margin: 0 0 6px; font-size: 18px; }
.standings li.me { background: #fff0d1; }
.res-actions { display: grid; gap: 10px; margin-top: 8px; }
.res-actions .waiting { color: var(--ink-2); font-size: 17px; text-align: center; }

/* ---------- discussion & notifications */
.chat { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(370px, 92vw); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; background: var(--paper); color: var(--ink); box-shadow: -12px 0 40px rgba(0, 0, 0, .4); }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0; font-size: 21px; }
.chat-list { list-style: none; margin: 0; padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.chat-list li { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--sand); overflow-wrap: anywhere; }
.chat-list li b { display: block; font-size: 13px; color: var(--ink-2); }
.chat-list li.mine { align-self: flex-end; background: #ffe2dc; }
.chat-list li.sys { align-self: center; max-width: 100%; background: none; padding: 0; text-align: center; font-size: 13px; color: var(--ink-2); }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 99px; border: 2px solid var(--line); background: #fff; color: var(--ink); font: 800 14px Nunito, sans-serif; cursor: pointer; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.toasts { position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 50%; translate: -50% 0; z-index: 40; width: min(420px, 92vw); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 14px; background: #1f1612; color: #fff; font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: opacity .4s, transform .4s; overflow-wrap: anywhere; }
.toast.error { background: #9b2c2c; }
.toast.chat { background: #2b2546; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.conn { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; padding: 10px; text-align: center; background: #9b2c2c; color: #fff; font-weight: 800; }

/* ---------- petits écrans */
@media (max-width: 600px) {
  .seat.spied .backs { display: flex; max-height: 34px; }
  .brand span, .crumb { display: none; }
  .bar .btn.small { padding: 0 10px; }
  .seats { gap: 10px 8px; }
  .seat { min-width: 0; max-width: 46vw; padding: 7px 10px 7px 7px; column-gap: 8px; }
  .seat .avatar { width: 34px; height: 34px; font-size: 13px; }
  .seat-av.timed::before { inset: -5px; -webkit-mask: radial-gradient(circle, transparent 20px, #000 21px); mask: radial-gradient(circle, transparent 20px, #000 21px); }
  .seat-name { font-size: 15px; max-width: 7.5em; }
  .backs { display: none; }
  .status p { font-size: 16px; }
  .status .seat-av { display: none; }
  .mebar { padding: 8px 12px; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; }
  .hand { padding-top: 20px; }
  .leftovers li { grid-template-columns: minmax(0, 5em) 1fr auto; }
}
@media (max-height: 640px) and (min-width: 601px) {
  .backs { display: none; }
}
@media (max-height: 720px) {
  .piles { --pw: 66px; }
  .feed li:nth-child(n+2) { display: none; }
  .feed { min-height: 0; }
  .flow { display: none; }
}
/* Émotes */
.emote-btn { font-size: 20px; line-height: 1; padding: 0 10px; }
.emote-btn img { width: 22px; height: 22px; object-fit: contain; display: block; }
.emotes { position: fixed; z-index: 35; display: grid; grid-template-columns: repeat(4, 60px); gap: 6px; padding: 8px; max-width: calc(100vw - 16px); background: var(--paper); border-radius: 18px; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
.emotes[hidden] { display: none; }
.emote-opt { width: 60px; height: 60px; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--sand); font-size: 34px; line-height: 1; cursor: pointer; }
.emote-opt:hover, .emote-opt:focus-visible { background: #ffe2dc; }
.emote-opt:focus-visible { outline: 3px solid var(--wood); outline-offset: 2px; }
.emote-opt img { width: 44px; height: 44px; object-fit: contain; }
.emote-layer { position: fixed; inset: 0; z-index: 38; pointer-events: none; overflow: hidden; }
.emote-pop { position: absolute; translate: -50% -100%; display: grid; justify-items: center; font-size: 64px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); animation: emote-pop 2.6s ease-out forwards; }
.emote-pop img { width: 84px; height: 84px; object-fit: contain; }
.emote-pop.free { left: 50%; top: calc(150px + env(safe-area-inset-top)); }
.emote-pop b { margin-top: 4px; padding: 2px 10px; border-radius: 99px; background: var(--paper); color: var(--ink); font: 800 14px Nunito, system-ui, sans-serif; }
@keyframes emote-pop {
  0% { scale: .3; opacity: 0; }
  12% { scale: 1.15; opacity: 1; }
  20% { scale: 1; }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
