/* FamiCards — habillage « tapis de la table » de l'accueil et du salon.
   Portée : uniquement body[data-screen="home"] et body[data-screen="lobby"] ; les tables de jeu ne sont pas concernées.
   Aucune règle de jeu, aucun moteur : seulement de l'apparence. Pas d'image externe, pas d'animation continue. */
body[data-screen="home"],body[data-screen="lobby"]{
  --bg:#0d2c22;--fg:#f8f0db;--muted:#cfc3a1;--panel:rgba(9,34,26,.84);--line:rgba(214,170,84,.5);
  --accent:#e2573a;--accent-fg:#fff;--gold:#d6aa54;--gold2:#f2d58a;--ink:#2a2118;--card:#fbf6ea;
  --serif:'Iowan Old Style','Palatino Linotype',Palatino,'Book Antiqua',Georgia,serif;
  color-scheme:dark;color:var(--fg);
  background:
    radial-gradient(55% 38% at 6% 0%,rgba(255,196,96,.30),transparent 70%),
    radial-gradient(55% 38% at 94% 0%,rgba(255,196,96,.24),transparent 70%),
    radial-gradient(130% 95% at 50% 18%,#1f6a50 0%,#14432f 46%,#0a241b 100%) fixed;
  background-color:#0d2c22;
}
body[data-screen="home"] h1,body[data-screen="home"] h2,body[data-screen="lobby"] h1,body[data-screen="lobby"] h2{font-family:var(--serif);font-weight:400;letter-spacing:.01em}
body[data-screen="home"] #app,body[data-screen="lobby"] #app{max-width:640px}
@media(min-width:1000px){body[data-screen="home"] #app,body[data-screen="lobby"] #app{max-width:1180px;padding:28px 0}}

/* ——— composants communs, repeints aux couleurs de la table ——— */
[data-screen="home"] .panel,[data-screen="lobby"] .panel{background:var(--panel);border:1px solid var(--line);border-radius:22px;box-shadow:0 10px 24px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.06)}
[data-screen="home"] .btn,[data-screen="lobby"] .btn{background:linear-gradient(#ef6a4c,#dc4a2d);color:#fff;border-radius:16px;box-shadow:0 3px 0 #a63a24,0 10px 20px rgba(0,0,0,.35);text-shadow:0 1px 0 rgba(0,0,0,.18)}
[data-screen="home"] .btn:active,[data-screen="lobby"] .btn:active{transform:translateY(2px);box-shadow:0 1px 0 #a63a24,0 4px 10px rgba(0,0,0,.35)}
[data-screen="home"] .btn.alt,[data-screen="lobby"] .btn.alt{background:rgba(0,0,0,.22);border:2px solid var(--gold);color:var(--fg);box-shadow:none;text-shadow:none}
[data-screen="home"] .btn:disabled,[data-screen="lobby"] .btn:disabled{opacity:.45;box-shadow:none}
[data-screen="home"] input:not([type=checkbox]),[data-screen="lobby"] input[type=text],[data-screen="home"] .acf,.modal .acf{background:rgba(0,0,0,.32);border:2px solid var(--line);color:var(--fg)}
[data-screen="home"] input::placeholder,.modal .acf::placeholder{color:rgba(248,240,219,.55)}
[data-screen="home"] .chip,[data-screen="lobby"] .chip{border-color:var(--line);color:var(--fg);background:rgba(0,0,0,.18)}
[data-screen="home"] .chip.on,[data-screen="lobby"] .chip.on{background:var(--gold);border-color:var(--gold);color:var(--ink)}
[data-screen="home"] .av,[data-screen="lobby"] .av{border-color:#fbf6ea;box-shadow:0 0 0 2px var(--gold),0 4px 10px rgba(0,0,0,.45)}
[data-screen="home"] .pf{border-color:var(--line);color:var(--fg)}
[data-screen="home"] .pf.on{border-color:var(--gold);background:rgba(214,170,84,.16)}
[data-screen="home"] label.chk input,[data-screen="lobby"] label.chk input{accent-color:var(--gold)}
[data-screen="home"] .err,[data-screen="lobby"] .err{color:#ffb4a3}
[data-screen="home"] a,[data-screen="lobby"] a{color:inherit}
[data-screen="home"] :focus-visible,[data-screen="lobby"] :focus-visible{outline:3px solid var(--gold2);outline-offset:2px}
[data-screen="home"] .modal .box,[data-screen="lobby"] .modal .box{background:#10281f;border:1px solid var(--line);color:var(--fg)}

/* ——— accueil ——— */
.home-grid{display:grid;gap:16px}
.hero{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:4px 0 0;isolation:isolate}
.hero .fc-deco{position:absolute;inset:0;width:100%;height:100%;opacity:.13;z-index:-1;pointer-events:none}
.hero-art{width:min(290px,78%);margin-top:6px}
.fc-cham{display:block;width:100%;height:auto;overflow:visible}
.mascots{position:relative;width:100%;display:flex;justify-content:center;align-items:flex-end}
.mascots .fc-cham{width:74%;margin-right:13%}
.m-horse{position:absolute;right:2%;bottom:3%;width:23%;height:auto;filter:drop-shadow(0 6px 8px rgba(0,0,0,.45));transform:rotate(7deg)}
.m-bub{position:absolute;border-radius:50%;border:1.5px solid rgba(255,255,255,.55);background:rgba(255,255,255,.14)}
.m-bub.b1{width:11px;height:11px;right:20%;top:6%}.m-bub.b2{width:7px;height:7px;right:12%;top:16%}.m-bub.b3{width:5px;height:5px;right:26%;top:20%}
.hero-txt h1{font-size:2.6rem;line-height:1.05;background:linear-gradient(#fff4c8,#d6aa54);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.4))}
.hero-txt .muted{margin-top:4px;font-size:1rem;color:#e8dfc4}
.hero .disc{display:inline-block;margin-top:8px;font-weight:800;text-decoration:underline;text-decoration-color:var(--gold);text-underline-offset:4px;color:var(--fg);min-height:32px}
.hero-fam{display:flex;gap:10px;justify-content:center;margin:4px 0 2px}
.hero-fam .av{width:50px;height:50px}
.hero-fam .av:nth-child(2n){transform:translateY(5px)}
@media(min-width:1000px){
  body[data-screen="home"] #app{min-height:calc(100vh - 56px);display:flex;flex-direction:column;justify-content:center}
  .hero-txt .muted{max-width:520px;margin-inline:auto}
  .home-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);align-items:center;gap:56px}
  .hero-art{width:min(430px,100%)}
  .hero-txt h1{font-size:3.8rem}
  .hero-txt .muted{font-size:1.15rem}
  .hero-fam .av{width:64px;height:64px}
}

/* ——— salon ——— */
.lobby{display:flex;flex-direction:column;gap:14px}
/* ordre sur iPhone : code et partage → table et joueurs → réglages → catalogue et votes → lancement */
.lb-left,.lb-right{display:contents}
.lb-code{order:1}.lb-players{order:2}.lb-set{order:3}.lb-cat{order:4}.lb-fm{order:5}.lb-launch{order:6}.lb-msg{order:7}.lb-leave{order:8}
/* code de la table : parchemin + quatre cartes */
[data-screen="lobby"] .lb-code{background:linear-gradient(#f6e9c6,#ecd8a6);border:2px solid var(--gold);color:var(--ink);--fg:#2a2118;--muted:#6b5a3a;--line:#c9a04a}
[data-screen="lobby"] .lb-code h2{color:var(--ink)}
[data-screen="lobby"] .lb-code .btn.alt{background:rgba(255,255,255,.55);border-color:#b4872f;color:var(--ink)}
[data-screen="lobby"] .lb-code .btn:not(.alt){box-shadow:0 3px 0 #a63a24}
.code{font-size:0;letter-spacing:0;line-height:0;padding:4px 0}
.code span{display:inline-block;width:58px;height:80px;line-height:80px;margin:0 5px;border-radius:10px;background:#fffdf6;border:2px solid #c9a04a;font:400 2.5rem/80px var(--serif);color:#2a2118;box-shadow:0 5px 10px rgba(60,40,10,.28);position:relative}
.code span::before{content:"";position:absolute;left:6px;top:6px;width:7px;height:7px;background:#c9a04a;transform:rotate(45deg)}
.code span:nth-child(1){transform:rotate(-5deg)}.code span:nth-child(2){transform:rotate(-1.5deg) translateY(-3px)}.code span:nth-child(3){transform:rotate(1.5deg) translateY(-3px)}.code span:nth-child(4){transform:rotate(5deg)}
[data-screen="lobby"] .lb-code #qr{background:#fff;border-radius:14px;padding:10px;width:fit-content;margin:0 auto;box-shadow:0 0 0 2px #c9a04a}
/* la table : ovale feutre, liseré bois, joueurs assis autour */
.tbl{position:relative;width:100%;aspect-ratio:1.1/1;max-height:430px;margin:4px auto 0}
.tbl-felt{position:absolute;inset:17% 8%;border-radius:50%;background:radial-gradient(ellipse at 50% 38%,#348a66,#1d5d44 62%,#134433);border:9px solid #7b4e2b;box-shadow:0 0 0 2px #3d2916,0 0 0 4px rgba(214,170,84,.55),inset 0 0 38px rgba(0,0,0,.5),0 14px 26px rgba(0,0,0,.5);display:grid;place-items:center;overflow:hidden}
.tbl-art{width:56%;opacity:.95}
.seatx{position:absolute;transform:translate(-50%,-50%);width:88px;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.seatx .av{width:56px;height:56px}
.seatx .crown{position:absolute;top:-14px;left:50%;margin-left:-11px;width:22px;height:22px;z-index:2;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5))}
.seatx .sn{font-weight:800;font-size:.8rem;max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:rgba(7,26,20,.88);border:1px solid rgba(214,170,84,.4);border-radius:999px;padding:1px 9px;color:var(--fg)}
.seatx .sr{font-size:.68rem;color:var(--muted);line-height:1.1}
.seatx.off{opacity:.5}
.seatx .kick{position:absolute;top:-6px;right:4px;width:26px;height:26px;border-radius:50%;padding:0;background:#1b1209;border:1.5px solid var(--gold);color:#fff;font-size:.72rem;line-height:1;display:grid;place-items:center}
.seatx .kick::after{content:"";position:absolute;inset:-10px}
.slotx .addcpu{width:56px;height:56px;border-radius:50%;border:2px dashed var(--gold);background:rgba(0,0,0,.25);color:var(--gold2);font-size:1.7rem;line-height:1;padding:0;display:grid;place-items:center}
.slotx .addcpu::after{content:"";position:absolute}
.tbl.crowded{aspect-ratio:1/1.02}
.tbl.crowded .seatx{width:70px}
.tbl.crowded .seatx .av{width:46px;height:46px}
.tbl.crowded .seatx .sn{font-size:.72rem;max-width:70px;padding:0 7px}
.tbl.crowded .seatx .sr{display:none}
.tbl.crowded .seatx .crown{top:-12px;width:18px;height:18px;margin-left:-9px}
.tbl.crowded .seatx .kick{width:22px;height:22px;right:2px;top:-4px;font-size:.62rem}
.tbl.crowded .slotx .addcpu{width:46px;height:46px}
/* catalogue de jeux : tuiles sombres cerclées d'or, médaillon rond (aucune case de couleur) */
.cat-grid{display:flex;flex-direction:column;gap:10px}
.cat-sec{border-radius:16px}
.cat-title{width:100%;display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:14px;border:1.5px solid rgba(214,170,84,.55);background:linear-gradient(165deg,#1a4332,#0b231a);color:#fbf2d8;font-family:var(--serif);font-size:1.1rem;text-align:left;cursor:pointer}
.cat-title .tri{display:inline-block;font-size:.85rem;color:var(--gold2);transition:transform .2s}
.cat-sec.open .cat-title .tri{transform:rotate(90deg)}
.cat-title .cat-lbl{flex:1}
.cat-title .cat-n{background:var(--gold);color:#2a2118;border-radius:999px;font-family:inherit;font-size:.78rem;font-weight:800;padding:1px 9px}
.cat-body{display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.cat-sec.open .cat-body{display:grid}
.game{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;min-height:132px;padding:14px 10px 12px;border-radius:18px;border:1.5px solid rgba(214,170,84,.55);background:linear-gradient(165deg,#1a4332,#0b231a);color:var(--fg);text-align:center;box-shadow:inset 0 0 0 1px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.07),0 6px 14px rgba(0,0,0,.35);overflow:hidden}
.game .e{flex:none;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;font-size:1.9rem;line-height:1;background:radial-gradient(circle at 35% 30%,#2c6a52,#0f2d22 70%);box-shadow:0 0 0 2px var(--gold),0 0 0 4px rgba(0,0,0,.35),0 4px 8px rgba(0,0,0,.45)}
.game .gtxt{display:block;min-width:0;margin-top:auto;width:100%}
.game b{font-family:var(--serif);font-weight:400;font-size:1.05rem;line-height:1.15;display:block;color:#fbf2d8}
.game .muted{display:block;margin-top:3px;font-size:.72rem;line-height:1.3;color:var(--muted)}
.game .n{position:absolute;right:9px;bottom:9px;margin:0;background:var(--gold);color:#2a2118;border-radius:999px;font-size:.78rem;font-weight:800;padding:1px 9px}
.game .n.z{display:none}
.game .gbadge{position:absolute;right:9px;top:9px;border-radius:999px;font-size:.68rem;font-weight:800;padding:3px 9px}
.game .gbadge.free{background:var(--gold);color:#2a2118}
.game .gbadge.new{right:auto;left:9px;background:#ff5d73;color:#fff;box-shadow:0 0 10px rgba(255,93,115,.55)}
.game .gbadge.home{right:auto;left:9px;background:rgba(242,213,138,.16);color:var(--gold2);border:1px solid var(--gold2)}
.game[data-new]{border-color:#ff5d73;box-shadow:0 0 0 1px rgba(255,93,115,.45),0 0 18px rgba(255,93,115,.22)}
.game .gbadge.prem{background:rgba(0,0,0,.45);color:var(--gold2);border:1px solid rgba(214,170,84,.6)}
.game:hover{border-color:var(--gold2)}
[data-screen="lobby"] .game.on{background:linear-gradient(165deg,#245a43,#103326);border-color:var(--gold2);box-shadow:0 0 0 3px var(--gold2),0 0 22px rgba(242,213,138,.35),0 8px 18px rgba(0,0,0,.5)}
.game.on .e{background:radial-gradient(circle at 35% 30%,#f2d58a,#c9962e);box-shadow:0 0 0 2px #fff4c8,0 4px 8px rgba(0,0,0,.45)}
.game.soon{opacity:.8}
.game.soon .e{filter:saturate(.6)}
.game.nok{opacity:.6}
/* lancer la partie : dernier bloc du salon, dans le flux (ne recouvre jamais les jeux) */
.lb-launch{display:flex;flex-direction:column;gap:10px;position:static;margin-top:2px}
.slotx{z-index:2;cursor:pointer}.slotx .addcpu{cursor:pointer}
.lb-set .themes{display:flex;gap:8px;flex-wrap:wrap}
@media(min-width:1000px){
  .lobby{display:grid;grid-template-columns:400px minmax(0,1fr);gap:20px 40px;align-items:start}
  .lb-left,.lb-right{display:flex;flex-direction:column;gap:14px;min-width:0}
  .lb-left{grid-column:1}.lb-right{grid-column:2}
  .cat-body{grid-template-columns:repeat(3,minmax(0,1fr))}
  .game{min-height:150px}
  .lb-leave{justify-self:start}
}
@media(max-width:380px){.code span{width:50px;height:70px;line-height:70px;font-size:2.1rem;margin:0 3px}.seatx{width:78px}.seatx .av{width:50px;height:50px}}
@media(prefers-reduced-motion:reduce){[data-screen="home"] *,[data-screen="lobby"] *{transition:none!important;animation:none!important}}
[data-screen="lobby"] .lb-code #qr:empty{display:none}

/* ——— scène de famille (fichier graphique fourni : /img/famille-accueil.webp) ———
   Tant que le fichier n'existe pas, la scène vectorielle de secours (caméléon + hippocampe + avatars) s'affiche. */
.hero{gap:8px}
.hero-txt{order:1}.hero-scene{order:2}.hero .disc{order:3}
.hero-txt h1{font-size:2.3rem}
.hero-scene{position:relative;width:100%;aspect-ratio:5/3;display:grid;place-items:center}
.hero-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:none;
  -webkit-mask-image:linear-gradient(#000 90%,transparent);mask-image:linear-gradient(#000 90%,transparent);filter:drop-shadow(0 8px 14px rgba(0,0,0,.35))}
.hero-scene.ok .hero-photo{display:block}
.hero-scene.ok .hero-fallback{display:none}
.hero-fallback{display:none;width:100%;flex-direction:column;align-items:center;gap:6px}
.hero-scene.nofile .hero-fallback{display:flex}
.hero-scene.nofile{aspect-ratio:auto}
.hero-scene:not(.ok):not(.nofile){min-height:180px}
.lb-banner{order:0;position:relative;height:92px;overflow:hidden}
.lb-banner img{width:100%;height:100%;object-fit:cover;object-position:50% 8%;-webkit-mask-image:linear-gradient(#000 62%,transparent);mask-image:linear-gradient(#000 62%,transparent)}
@media(min-width:1000px){
  .hero-txt h1{font-size:3.8rem}
  .hero-scene{aspect-ratio:5/3;max-width:640px}
  .lb-banner{grid-column:1/-1}
}
/* dès que l'écran est assez large, l'image est montrée en entier (visages et caméléon jamais coupés) */
@media(min-width:480px){
  .lb-banner{height:auto;aspect-ratio:1000/444;max-height:190px;width:auto;max-width:100%;align-self:center}
  .lb-banner img{width:auto;height:100%;object-fit:contain;object-position:50% 0}
}

/* Salon V2 : recherche accessible, sans toucher aux moteurs de jeux. */
[data-screen="lobby"] .catalog-search-label{font-size:.9rem;font-weight:700;color:var(--gold2)}
[data-screen="lobby"] .catalog-search{display:block;width:100%;min-height:46px;padding:11px 14px;border:1.5px solid var(--gold);border-radius:12px;background:rgba(0,0,0,.27);color:var(--fg);font-size:16px}
[data-screen="lobby"] .catalog-search:focus-visible{outline:3px solid var(--gold2);outline-offset:2px}
[data-screen="lobby"] .catalog-search-empty{padding:16px;text-align:center;color:var(--muted)}
[data-screen="lobby"] .game[hidden],[data-screen="lobby"] .cat-sec[hidden],[data-screen="lobby"] .catalog-search-empty[hidden]{display:none!important}

/* Salon V2 : catalogue compact et favoris */
[data-screen="lobby"] .catalog-filters{display:flex;gap:7px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:thin}
[data-screen="lobby"] .catalog-filter{flex:none;border:1px solid var(--line);border-radius:999px;padding:9px 13px;background:rgba(0,0,0,.2);color:var(--fg);font:inherit;font-size:.85rem;min-height:42px}
[data-screen="lobby"] .catalog-filter.on{background:var(--gold);color:#2a2118;font-weight:800}
[data-screen="lobby"] .catalog-item{position:relative;min-width:0}
[data-screen="lobby"] .catalog-item[hidden]{display:none!important}
[data-screen="lobby"] .catalog-item>.game{width:100%;height:100%}
[data-screen="lobby"] .catalog-favorite{position:absolute;z-index:2;top:7px;left:7px;min-width:34px;min-height:34px;border-radius:50%;border:1px solid var(--gold);background:#10291f;color:var(--gold2);font-size:1.3rem;line-height:1;cursor:pointer}
[data-screen="lobby"] .catalog-favorite[aria-pressed="true"]{color:#ffe091}
@media(max-width:600px){[data-screen="lobby"] .lb-banner{display:none}[data-screen="lobby"] .lb-code #qr canvas{max-height:168px;max-width:168px}[data-screen="lobby"] .lb-code .code span{height:57px;line-height:57px;font-size:1.9rem}[data-screen="lobby"] .cat-body{gap:8px}[data-screen="lobby"] .game{min-height:126px;padding:11px 6px}}

/* Salon lisible : une ligne par jeu (médaillon, nom, une ligne d'info, pastille Gratuit/Premium, favori) au lieu de grandes tuiles.
   Moins de défilement, des noms jamais coupés, aucune étiquette décorative : seuls « Gratuit », « Premium » et « Nouveauté » restent. */
[data-screen="lobby"] .cat-body{grid-template-columns:minmax(0,1fr);gap:6px;margin-top:8px}
[data-screen="lobby"] .catalog-item>.game{height:auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;min-height:64px;padding:8px 58px 8px 10px;text-align:left;border-radius:14px;border-width:1px;box-shadow:none}
[data-screen="lobby"] .game .e{width:44px;height:44px;font-size:1.5rem;box-shadow:0 0 0 1.5px var(--gold),0 2px 5px rgba(0,0,0,.4)}
[data-screen="lobby"] .game .gtxt{margin:0;flex:1;min-width:0}
[data-screen="lobby"] .game b{font-size:1.02rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-screen="lobby"] .game .muted{margin-top:2px;font-size:.76rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-screen="lobby"] .game .gbadge{position:static;order:3;flex:none;font-size:.7rem;padding:3px 8px;white-space:nowrap}
[data-screen="lobby"] .game .gbadge.new{order:2;box-shadow:none}
[data-screen="lobby"] .game .n{position:static;order:4;flex:none}
[data-screen="lobby"] .game[data-new]{box-shadow:none}
[data-screen="lobby"] .catalog-favorite{top:50%;left:auto;right:6px;transform:translateY(-50%);min-width:44px;min-height:44px;border:0;background:transparent;font-size:1.45rem}
[data-screen="lobby"] .game.nok{opacity:.78}
[data-screen="lobby"] .game.soon{opacity:.85}
[data-screen="lobby"] .game.on{box-shadow:0 0 0 2px var(--gold2)}
@media(min-width:700px){[data-screen="lobby"] .cat-body{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1000px){[data-screen="lobby"] .cat-body{grid-template-columns:repeat(2,minmax(0,1fr))}[data-screen="lobby"] .game{min-height:64px}}
[data-screen="lobby"] .game .muted{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
[data-screen="lobby"] .lb-launch{margin-bottom:84px}

/* ───────── Refonte du catalogue : identité, badges par sens, créations FamiCards ───────── */
[data-screen="lobby"] .catalog-item{--g1:#2f9a72;--g2:#0e3d2d}
[data-screen="lobby"] .catalog-item>.game{align-items:center;min-height:78px;padding:9px 52px 9px 10px;gap:12px;border:1px solid rgba(214,170,84,.4);border-left:4px solid var(--g1);background:linear-gradient(100deg,rgba(255,255,255,.05),rgba(0,0,0,.18)),linear-gradient(165deg,#173d2e,#0b231a);transition:transform .15s ease,border-color .15s,box-shadow .15s}
[data-screen="lobby"] .catalog-item>.game:hover{transform:translateY(-1px);border-color:var(--gold2);border-left-color:var(--g1)}
[data-screen="lobby"] .catalog-item>.game:active{transform:scale(.99)}
[data-screen="lobby"] .game .e{width:52px;height:52px;border-radius:15px;background:linear-gradient(145deg,var(--g1),var(--g2));box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.28),0 3px 7px rgba(0,0,0,.4);font-size:1.7rem;overflow:hidden}
[data-screen="lobby"] .game .e svg{width:38px;height:38px;display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.35))}
[data-screen="lobby"] .game .e i{font-style:normal;line-height:1}
[data-screen="lobby"] .game.on .e{background:linear-gradient(145deg,var(--g1),var(--g2));box-shadow:inset 0 0 0 2px #fff4c8,0 3px 7px rgba(0,0,0,.4)}
[data-screen="lobby"] .game .muted{font-size:.78rem;-webkit-line-clamp:1;line-clamp:1;white-space:nowrap;display:block;overflow:hidden;text-overflow:ellipsis}
[data-screen="lobby"] .game .gchips{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
[data-screen="lobby"] .game .gbadge.gchip{position:static;order:0;display:inline-flex;align-items:center;gap:3px;font-size:.68rem;font-weight:800;line-height:1.1;padding:3px 8px;border-radius:999px;white-space:nowrap;border:1px solid transparent;box-shadow:none;text-shadow:none}
.gchip.c-free{background:#d8f5c9;color:#1b4a12;border-color:#9fdc86}
.gchip.c-prem{background:#2a2118;color:#ffd978;border-color:#d6aa54}
.gchip.c-new{background:#ff5d73;color:#fff}
.gchip.c-beta{background:#ffe9b0;color:#6a3d00;border-color:#e8b440}
.gchip.c-info{background:#d6ecff;color:#0d3a63;border-color:#8cc4f2}
.gchip.c-live{background:#e7defa;color:#35207a;border-color:#b7a2ee}
.gchip.c-coop{background:#cdf3ee;color:#0a4a44;border-color:#7fd8cc}
.gchip.c-pl{background:rgba(255,255,255,.12);color:#f4ead0;border-color:rgba(255,255,255,.22)}
.gchip.c-warn{background:#ffd9c9;color:#7a2a08;border-color:#f2a07e}
[data-screen="lobby"] .game .n{position:absolute;right:52px;top:8px;order:0}
[data-screen="lobby"] .game .n:not(.z)::before{content:"🗳 "}
[data-screen="lobby"] .catalog-favorite{right:4px}
[data-screen="lobby"] .game.on{box-shadow:0 0 0 2px var(--gold2),0 0 18px rgba(242,213,138,.25)}
[data-screen="lobby"] .game.on::after{content:"✓";position:absolute;right:14px;bottom:8px;width:22px;height:22px;border-radius:50%;background:var(--gold2);color:#2a2118;font-weight:900;display:grid;place-items:center;font-size:.8rem}
[data-screen="lobby"] .game.nok .gtxt b{opacity:.9}
/* Créations FamiCards */
[data-screen="lobby"] .cat-feat .cat-title{background:linear-gradient(110deg,#6b4a12,#d6aa54 55%,#8a5f17);color:#2a2118;border-color:#fff0b8;box-shadow:0 4px 14px rgba(214,170,84,.28)}
[data-screen="lobby"] .cat-feat .cat-title .tri{color:#2a2118}
[data-screen="lobby"] .cat-feat .cat-title .cat-n{background:#2a2118;color:var(--gold2)}
[data-screen="lobby"] .cat-sub{display:none;margin:7px 4px 0;font-size:.82rem;color:var(--gold2)}
[data-screen="lobby"] .cat-sec.open .cat-sub{display:block}
[data-screen="lobby"] .cat-feat .cat-body{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
[data-screen="lobby"] .catalog-item.feat>.game{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;min-height:176px;padding:12px 12px 12px;border:1.5px solid rgba(255,240,184,.55);border-left-width:1.5px;background:radial-gradient(120% 90% at 85% 0%,var(--g1),transparent 60%),linear-gradient(165deg,var(--g2),#0a1d16)}
[data-screen="lobby"] .catalog-item.feat .e{width:64px;height:64px;border-radius:18px;background:rgba(255,255,255,.14);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.35)}
[data-screen="lobby"] .catalog-item.feat .e svg{width:50px;height:50px}
[data-screen="lobby"] .catalog-item.feat .gtxt{margin-top:auto}
[data-screen="lobby"] .catalog-item.feat .game b{font-size:1.12rem;white-space:normal}
[data-screen="lobby"] .catalog-item.feat .game .muted{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;min-height:2.5em}
[data-screen="lobby"] .catalog-item.feat .catalog-favorite{top:8px;right:8px;transform:none;background:rgba(0,0,0,.35);border-radius:50%;min-width:40px;min-height:40px}
[data-screen="lobby"] .catalog-item.feat .game .n{top:auto;bottom:8px;right:10px}
[data-screen="lobby"] .catalog-item.feat .game.on::after{right:10px;bottom:auto;top:56px}
[data-screen="lobby"] .catalog-item.feat:last-child:nth-child(odd){grid-column:1/-1}
[data-screen="lobby"] .catalog-item.feat:last-child:nth-child(odd)>.game{min-height:120px;flex-direction:row;align-items:center;padding-right:56px}
[data-screen="lobby"] .catalog-item.feat:last-child:nth-child(odd) .gtxt{margin-top:0}
@media(max-width:359px){[data-screen="lobby"] .cat-feat .cat-body{grid-template-columns:minmax(0,1fr)}[data-screen="lobby"] .catalog-item.feat>.game{min-height:0;flex-direction:row;align-items:center;padding-right:56px}[data-screen="lobby"] .catalog-item.feat .gtxt{margin-top:0}[data-screen="lobby"] .catalog-item.feat .game .muted{min-height:0}}
@media(min-width:700px){[data-screen="lobby"] .cat-feat .cat-body{grid-template-columns:repeat(4,minmax(0,1fr))}[data-screen="lobby"] .catalog-item.feat:last-child:nth-child(odd){grid-column:1/-1}}
@media(min-width:1000px){[data-screen="lobby"] .cat-feat .cat-body{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1280px){[data-screen="lobby"] .cat-feat .cat-body{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(prefers-reduced-motion:no-preference){
  [data-screen="lobby"] .catalog-item.orig .e svg{animation:fcFloat 4.5s ease-in-out infinite}
  [data-screen="lobby"] .catalog-item.orig:nth-child(2n) .e svg{animation-delay:-2s}
  @keyframes fcFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px) rotate(-2deg)}}
  [data-screen="lobby"] .cat-sec.open .catalog-item{animation:fcIn .28s ease both}
  @keyframes fcIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
}
@media(prefers-reduced-motion:reduce){[data-screen="lobby"] .game{transition:none}}
/* iPhone : zones sûres */
[data-screen="lobby"] .lobby{padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}
[data-screen="lobby"] .lb-launch{margin-bottom:calc(84px + env(safe-area-inset-bottom))}

/* Mobile : « Lancer la partie » reste collé en bas de l'écran, sans avoir à descendre (la refonte l'avait remis en bas de page) */
@media(max-width:999px){
  [data-screen="lobby"] .lb-launch{position:sticky;bottom:0;z-index:20;margin:0 -8px;padding:12px calc(66px + env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) 8px;background:linear-gradient(to bottom,transparent,var(--bg,#1d3a2a) 18px)}
  [data-screen="lobby"] .lobby{padding-bottom:8px}
}
/* fiche du jeu choisi : aperçu sous la carte (principe, joueurs, durée, comment ça marche) */
[data-screen="lobby"] .catalog-item.sel{grid-column:1/-1}
[data-screen="lobby"] .g-detail{margin:-4px 4px 4px;padding:12px 14px;border-radius:0 0 14px 14px;background:rgba(0,0,0,.28);border:1px solid rgba(214,170,84,.35);border-top:0;animation:gdIn .25s ease-out}
@keyframes gdIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.g-pitch{font-weight:700;font-size:1rem;line-height:1.35;margin-bottom:8px}
.g-facts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.g-facts span{background:rgba(255,255,255,.12);border-radius:999px;padding:3px 10px;font-size:.8rem;white-space:nowrap}
.g-how{margin:0 0 8px;padding-left:22px;font-size:.9rem;line-height:1.45}
.g-how li{margin:2px 0}

@media (prefers-reduced-motion:reduce){[data-screen="lobby"] .g-detail{animation:none}}
[data-screen="lobby"] .catalog-item.sel .catalog-favorite{top:20px;transform:none}
