/* main.css — Celsius digital. Langage visuel du mockup v3 :
   table bois SVG-noise, plateaux carton crème, jetons punchboard dorés,
   jetons PH gris, cubes pollution noirs, cartes texturées, nameplates gravées. */

*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{
  color:#2b2620;
  background-color:#503623;
  /* stitchTiles="stitch" : le grain du bois se répète sans couture visible */
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600"><filter id="w" x="0" y="0" width="100%25" height="100%25"><feTurbulence type="fractalNoise" baseFrequency="0.006 0.09" numOctaves="4" seed="7" stitchTiles="stitch"/><feColorMatrix values="0 0 0 0 0.16  0 0 0 0 0.09  0 0 0 0 0.04  0 0 0 0.55 0"/></filter><rect width="600" height="600" filter="url(%23w)"/></svg>'),
    linear-gradient(115deg,#5a3d27 0%,#4c331f 45%,#553a24 70%,#472f1c 100%);
  background-attachment:fixed;
  font:15px/1.5 -apple-system,"Helvetica Neue","Segoe UI",sans-serif;
}
#app{min-width:1280px;max-width:1500px;margin:0 auto;padding:18px 26px 40px}
button{font:inherit;cursor:pointer}
svg.ic{width:1em;height:1em;vertical-align:-.12em;fill:currentColor}

/* ============ matière carton / plateaux ============ */
.board{
  background-color:#efe6d0;
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240"><filter id="p"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" seed="3"/><feColorMatrix values="0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.08  0 0 0 0.05 0"/></filter><rect width="240" height="240" filter="url(%23p)"/></svg>');
  border-radius:14px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 -2px 0 rgba(93,64,35,.18) inset,
    0 10px 22px rgba(20,10,2,.45),
    0 2px 6px rgba(20,10,2,.35);
  position:relative;
}
.board::after{content:"";position:absolute;inset:7px;border:1.5px solid rgba(93,70,40,.35);
  border-radius:9px;pointer-events:none}
.board.bg-pj{background-image:url('../assets/plateau_joueur.jpg');background-size:100% 100%;background-color:#f2ead6}
.board.bg-pj::after{display:none}
.board.bg-pc{background-image:url('../assets/plateau_central.jpg');background-size:100% 100%;background-color:#f2ead6}
.board.bg-pc::after{display:none}

/* nameplate gravée */
.plate{display:inline-flex;align-items:baseline;gap:8px;
  background:linear-gradient(#3c2c1a,#2c1f10);color:#e9dcbd;
  border-radius:6px;padding:3px 12px 4px;
  box-shadow:0 1px 0 rgba(255,255,255,.14) inset,0 2px 4px rgba(0,0,0,.4);
  font-family:"Iowan Old Style",Palatino,Georgia,serif}
.plate b{font-size:15px;letter-spacing:.02em}
.plate span{font-size:10.5px;letter-spacing:.18em;text-transform:uppercase;color:#c8b489}

/* carte Pays déployée au survol de la plaque */
.platewrap{position:relative;display:inline-flex;cursor:help}
.plate-fly{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%);z-index:130;
  opacity:0;pointer-events:none;transition:opacity .15s;
  filter:drop-shadow(0 16px 30px rgba(10,5,1,.6))}
.platewrap:hover .plate-fly{opacity:1}
.plate-fly .pcard{margin:0}
/* pas de double volet : la carte Pays prime sur le détail adversaire ;
   et aucun volet pendant un drag ou une sélection */
.opp2:has(.platewrap:hover) .opp-fly{opacity:0;pointer-events:none}
body.dragging .plate-fly,body.selecting .plate-fly{opacity:0 !important}

/* jetons punchboard */
.token{width:34px;height:34px;border-radius:50%;flex:none;
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:800;font-size:13.5px;color:#3d2c10;
  background:radial-gradient(circle at 35% 30%,#f2d98c,#d9b455 55%,#b78f33);
  box-shadow:0 1px 0 rgba(255,255,255,.5) inset,0 -2px 3px rgba(107,77,22,.5) inset,0 2px 4px rgba(0,0,0,.35);
  border:1px solid #96742a}
/* pollution : un seul jeton carré noir chiffré */
.polchip{width:26px;height:26px;border-radius:5px;flex:none;display:inline-flex;align-items:center;justify-content:center;
  font-weight:800;font-size:12px;color:#f1f1f4;background:linear-gradient(160deg,#4d4a52 0%,#26242b 60%);
  box-shadow:0 1px 0 rgba(255,255,255,.25) inset,0 2px 3px rgba(0,0,0,.45);vertical-align:middle}
/* pile de jetons Pollueur Historique : médaille illustrée, comptable à l'œil */
.phstack{position:relative;display:inline-block;width:28px;flex:none;vertical-align:middle}
.phstack .ph{position:absolute;left:0;width:28px;height:28px;border-radius:50%;
  background-image:url('../assets/jeton_ph.jpg');background-size:cover;background-position:center;
  border:1px solid #33502f;
  box-shadow:0 1px 0 rgba(255,255,255,.4) inset,0 -2px 3px rgba(30,50,30,.45) inset,0 2px 4px rgba(0,0,0,.4)}
.tokstack{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#5f5138;
  background:rgba(249,243,226,.72);border-radius:8px;padding:3px 9px}

/* ============ écran table plein écran (sans scroll dès 1280×~700) ============ */
body.noscroll{overflow:hidden}
body.noscroll #app{padding:12px 16px}
@media (max-height:700px){body.noscroll{overflow:auto}}
.ts{display:grid;grid-template-columns:76px minmax(0,1fr) 68px;gap:12px;
  height:calc(100vh - 24px);min-height:640px}
@media (max-height:700px){.ts{height:auto}}
.ts-c{display:flex;flex-direction:column;gap:9px;min-width:0;min-height:0;position:relative}
.ts-hud{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ts-hud .title{font-family:"Iowan Old Style",Palatino,Georgia,serif;color:#efe2c2;
  font-size:17px;letter-spacing:.28em;text-transform:uppercase;text-shadow:0 2px 3px rgba(0,0,0,.5);margin-right:4px}
.ts-hud .tag{background:rgba(20,12,4,.55);border:1px solid rgba(233,220,189,.25);
  color:#e9dcbd;border-radius:6px;padding:4px 11px;font-size:11.5px}
.ts-hud .tag b{color:#fff}
.ts-err{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);z-index:60;margin:0;
  background:#8f3413;color:#fff;font-weight:700;font-size:12px;border-radius:8px;padding:7px 16px;
  box-shadow:0 6px 16px rgba(0,0,0,.5)}

/* docks (panneaux sombres fixés aux bords) */
.dock{background:linear-gradient(#241609,#1a0f06);border:1px solid rgba(233,220,189,.18);
  border-radius:12px;display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:12px 0;position:relative;z-index:40}
.dk-lb{writing-mode:vertical-rl;transform:rotate(180deg);font-size:8.5px;letter-spacing:.22em;
  text-transform:uppercase;color:#bda87c;font-weight:700}
.dock-l{cursor:pointer}
.dk-deg{font-family:"Iowan Old Style",Palatino,Georgia,serif;color:#efe2c2;font-size:13px;font-weight:700}
.dk-col{flex:1;width:26px;border-radius:13px;background:#f7f0dc;border:1px solid #8a7550;
  position:relative;overflow:hidden;min-height:120px}
.dk-col .fill{position:absolute;left:0;right:0;bottom:0;display:block;
  background:linear-gradient(#d4602a,#8f3413);border-radius:0 0 12px 12px}
.dk-col .tick{position:absolute;left:0;right:0;height:1px;display:block;background:rgba(93,70,40,.55)}
.dk-col .tick.major{height:2px;background:#6d5a3a}
.dk-bulb{width:44px;height:44px;border-radius:50%;flex:none;
  background:radial-gradient(circle at 35% 30%,#e0703d,#b6431f 60%,#8f3413);
  box-shadow:0 2px 6px rgba(0,0,0,.4),0 2px 0 rgba(255,255,255,.3) inset;
  color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center}
.dk-mini{font-size:9px;color:#bda87c;text-align:center;line-height:1.4}
.dk-mini b{color:#efe2c2;font-size:11px;font-family:"Iowan Old Style",Palatino,Georgia,serif}

/* volets : ouverts au survol OU au tap (classe .open) */
.vol .vol-drawer{position:absolute;top:0;z-index:80;opacity:0;pointer-events:none;
  transition:opacity .16s,transform .16s;cursor:default;
  filter:drop-shadow(0 18px 34px rgba(10,5,1,.65))}
.dock-l .vol-drawer{left:calc(100% + 10px);transform:translateX(-8px);
  display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 40px);overflow:auto;padding-right:4px}
.dock-l .vol-drawer .thermo{width:340px}
.dock-l .vol-drawer .time{width:340px}
.vol:hover .vol-drawer,.vol.open .vol-drawer{opacity:1;pointer-events:auto;transform:none}

/* dock droit : tranches de cartes */
.dock-r{gap:14px}
.spinewrap{position:relative}
.spine{display:block;width:42px;height:116px;border-radius:5px;border:1px solid rgba(0,0,0,.4);
  background-size:cover;background-position:center;box-shadow:0 3px 8px rgba(0,0,0,.5);
  position:relative;cursor:pointer;padding:0}
.spine .sp-lb{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(90deg);
  white-space:nowrap;font-size:8px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;
  color:#f5eed6;text-shadow:0 1px 2px rgba(0,0,0,.75);max-width:none}
.spine .flag{position:absolute;top:-6px;right:-6px;width:15px;height:15px;border-radius:50%;
  background:#b6431f;border:1.5px solid #f2d0c2;box-shadow:0 1px 3px rgba(0,0,0,.5)}
.spine .flag.on{background:#2c6247;border-color:#c9e4c5}
.sp-under{font-size:8.5px;color:#8a7550;text-align:center;margin-top:4px}
.dock-r .vol-drawer{right:calc(100% + 10px);transform:translateX(8px);width:230px}
.dock-r .vol-drawer .pcard{margin:0 auto}
.slide-note{padding:12px 14px;font-size:11.5px;color:#4c4432;line-height:1.5;width:216px}
.slide-foot{margin-top:8px;background:rgba(20,12,4,.85);border:1px solid rgba(233,220,189,.25);
  color:#d9c9a4;border-radius:8px;padding:7px 10px;font-size:10.5px;line-height:1.5;text-align:center}
.linkbtn{background:none;border:0;color:#e9bd5f;text-decoration:underline;font-size:10.5px;
  padding:0;display:inline-block;margin-top:3px}

/* ============ adversaires compacts ============ */
.opps2{display:grid;gap:10px}
.opps2.n1{grid-template-columns:minmax(0,420px)}
.opps2.n2{grid-template-columns:repeat(2,1fr)}
.opps2.n3{grid-template-columns:repeat(3,1fr)}
.opps2.n3x2{grid-template-columns:repeat(3,1fr)}
.opp2{padding:14px 12px 9px;position:relative}
.opp2 .head{display:flex;justify-content:space-between;align-items:center;gap:6px}
.opp2 .tokens{display:flex;align-items:center;gap:6px}
.opp2.validated .plate::after{content:"";display:inline-block;width:8px;height:8px;
  border-radius:50%;background:#9fd08a;margin-left:6px;
  box-shadow:0 0 0 2px rgba(159,208,138,.3)}
.opp2 .row2{display:flex;gap:6px;align-items:center;margin-top:7px;flex-wrap:wrap}
.opp2 .opp-fly{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:70;padding:12px;
  opacity:0;pointer-events:none;transform:translateY(-6px);transition:opacity .15s,transform .15s;cursor:default}
.opp2:hover{z-index:75}
.opp2:hover .opp-fly{opacity:1;pointer-events:auto;transform:none}
.mixchip{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;
  background:rgba(249,243,226,.72);border-radius:6px;padding:2px 7px 2px 3px}
.swimg{width:26px;height:14px;border-radius:3px;border:1px solid #1a1a18;flex:none;
  background-size:cover;box-shadow:0 1px 2px rgba(0,0,0,.35);display:inline-block}
.ofr{display:flex;align-items:center;gap:9px;margin-bottom:6px}
.ofband{flex:1;height:26px;border:2px solid #1a1a18;border-radius:5px;background-size:cover;
  position:relative;box-shadow:0 1px 3px rgba(0,0,0,.35)}
.oflab{position:absolute;left:6px;top:50%;transform:translateY(-50%);
  background:rgba(245,238,214,.94);border:1px solid rgba(43,38,32,.5);border-radius:3px;
  padding:0 6px;font-size:7.5px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.ofr-foot{font-size:10.5px;color:#5f5138;line-height:1.5;margin-top:4px}
.tpol{font-size:10px;background:#f7f0dc;border:1px solid #b8a983;border-radius:4px;
  padding:2px 6px 2px 3px;color:#4c4432;box-shadow:0 1px 2px rgba(0,0,0,.25);
  display:inline-flex;align-items:center;gap:5px}
.tpol.inactive{opacity:.55;border-style:dashed}
.tpol-thumb{width:24px;height:15px;border-radius:2px;overflow:hidden;flex:none;display:inline-block;
  border:1px solid rgba(29,71,51,.5);background-size:cover;background-position:center}
.tpol-thumb .exlibris{width:100%;height:100%;display:block}
.cardback-s{width:24px;height:34px;border-radius:3px;flex:none;display:inline-block;
  background-size:cover;background-position:center;
  border:1px solid #123024;box-shadow:0 1px 3px rgba(0,0,0,.4)}

/* panneaux réutilisés dans le tiroir gauche et les écrans scriptés */
.thermo h5,.time h5{margin:0 0 12px;font-size:10.5px;letter-spacing:.22em;
  text-transform:uppercase;color:#8a7550;font-weight:700;text-align:center}

/* thermomètre */
.thermo{padding:16px 18px}
.thermo h5{background:rgba(249,243,226,.88);border-radius:6px;padding:4px 8px}
.th-grid{display:flex;flex-direction:column-reverse;margin:0 4px;
  background:rgba(249,243,226,.85);border-radius:10px;padding:8px 10px;
  box-shadow:0 1px 4px rgba(60,40,10,.15)}
.th-row{display:flex;align-items:center;gap:9px;padding:4.5px 0;border-top:1px solid rgba(93,70,40,.25)}
.th-row:last-child{border-top:0}
.th-deg{width:58px;font-family:"Iowan Old Style",Palatino,Georgia,serif;
  font-size:14px;font-weight:600;color:#2b2620;font-variant-numeric:tabular-nums;text-align:right;flex:none}
.th-fires{width:66px;display:flex;gap:1px;color:#b6431f;flex:none}
.th-fires svg{width:11px;height:11px;fill:currentColor;opacity:.9}
.th-cells{display:flex;gap:3px;flex-wrap:wrap}
.th-c{width:16px;height:16px;border-radius:3.5px;background:#f7f0dc;
  border:1px solid #b8a983;box-shadow:0 1px 1px rgba(0,0,0,.08) inset}
.th-c.full{background:linear-gradient(160deg,#d4602a,#b6431f);border-color:#8f3413;
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset}
.th-row.reached .th-deg{color:#b6431f}
.th-row.current{background:rgba(182,67,31,.09);border-radius:6px;outline:1.5px solid rgba(182,67,31,.55);outline-offset:-1px}
.th-bulb{display:flex;justify-content:center;margin-top:10px}
.th-bulb .b{width:54px;height:54px;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#e0703d,#b6431f 60%,#8f3413);
  box-shadow:0 2px 6px rgba(0,0,0,.3),0 2px 0 rgba(255,255,255,.35) inset;
  display:flex;align-items:center;justify-content:center;color:#fff;
  font-weight:800;font-size:15px;font-variant-numeric:tabular-nums}
.th-note{text-align:center;font-size:11px;color:#4c4432;margin-top:9px;line-height:1.5;
  background:rgba(249,243,226,.88);border-radius:6px;padding:5px 8px}

/* timeline + tours */
.time{padding:16px 18px;display:flex;flex-direction:column}
.tl-track{display:flex;align-items:center;gap:0;margin:4px 6px 14px}
.tl-stop{width:56px;height:56px;border-radius:50%;border:2px solid #8a7550;flex:none;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  font-family:"Iowan Old Style",Palatino,Georgia,serif;font-weight:700;font-size:13.5px;color:#5f5138;
  background:#f4ecd8;position:relative}
.tl-stop small{font-size:8.5px;letter-spacing:.14em;font-family:-apple-system,sans-serif;color:#8a7550}
.tl-stop.past{background:#ddd2b6;color:#8a7550}
.tl-bar{flex:1;height:3px;background:#8a7550}
.tl-stop.now{border-color:#b6431f;box-shadow:0 0 0 4px rgba(182,67,31,.18)}
.pawn{position:absolute;top:-17px;left:50%;transform:translateX(-50%);width:16px;height:16px;
  border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;
  background:radial-gradient(circle at 35% 30%,#e0703d,#a03a18);
  box-shadow:0 2px 3px rgba(0,0,0,.4)}
.tour-strip{display:flex;gap:10px}
.tour{flex:1;border:1.5px dashed rgba(93,70,40,.45);border-radius:9px;min-height:92px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  font-size:11px;color:#8a7550;letter-spacing:.1em;text-transform:uppercase;font-weight:700;text-align:center}
.tour .played{width:44px;height:62px;border-radius:5px;background-size:cover;background-position:center;
  border:1px solid #123024;box-shadow:0 2px 4px rgba(0,0,0,.35)}
.tour.now{border:2px solid #b6431f;color:#b6431f;background:rgba(182,67,31,.06)}
.tour .cross{font-size:20px;color:#b8a983;font-weight:400;font-style:normal}
.time .foot{margin-top:auto;font-size:11.5px;color:#6d5a3a;text-align:center;line-height:1.55;padding-top:10px}

/* ============ joueur actif ============ */
.me2{flex:1;min-height:0;display:flex;gap:12px;align-items:stretch}
.me2-main{flex:1;min-width:0;padding:20px 16px 14px;display:flex;flex-direction:column;gap:8px}
.me2-main .headline{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.me2-main .tokens{display:flex;align-items:center;gap:10px}
.me2-mid{display:flex;gap:14px;align-items:flex-start;flex:1;min-height:92px}
.me2-notes{display:flex;flex-direction:column;gap:7px;align-items:flex-start;min-width:0;padding-top:4px}
.paycard{border:1px solid #b8a983;border-radius:9px;background:#f7f0dc;padding:11px 12px;
  box-shadow:0 2px 5px rgba(0,0,0,.18)}
.paycard h4{margin:0 0 2px;font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:17px;font-weight:600}
.paycard .sub{font-size:9px;letter-spacing:.16em;text-transform:uppercase;color:#8a7550;margin-bottom:6px}
.paycard p{margin:0;font-size:10.8px;line-height:1.45;color:#4c4432;font-style:italic}
.cardback-l{width:74px;height:110px;border-radius:8px;margin:4px auto 8px;display:block;
  background-size:cover;background-position:center;
  border:1px solid #123024;box-shadow:0 3px 8px rgba(0,0,0,.35)}
.cardback-r{width:54px;height:78px;border-radius:6px;margin:2px auto 0;display:block;
  background-size:cover;background-position:center;
  border:1px solid #123024;box-shadow:0 3px 7px rgba(0,0,0,.4)}
/* emplacement « carte jouée ce tour » */
.playslot{width:100%;min-height:118px;flex:none;border:2px dashed #d9c9a4;border-radius:10px;
  background:rgba(249,243,226,.14);padding:8px 10px;display:flex;flex-direction:column;gap:5px;
  align-items:center;justify-content:center;text-align:center;position:relative;
  transition:box-shadow .12s,background .12s}
.playslot .ps-lab{font-size:9px;letter-spacing:.16em;text-transform:uppercase;font-weight:700;color:#d9c9a4}
.playslot .ps-note{font-size:10px;color:#bda87c;line-height:1.45}
.playslot.filled{border-style:solid;border-color:#9a7322;background:rgba(249,243,226,.92)}
.playslot.filled .ps-lab{color:#8a7550}
.playslot.filled .ps-note{color:#6d5a3a}
/* carte jouée : mini-aperçu (titre + illustration) contenu dans la case,
   carte entière en survol */
.ps-mini{width:100%;display:flex;flex-direction:column;gap:4px;min-width:0}
.ps-mini .ps-nom{font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:13.5px;font-weight:600;
  color:#2b2620;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-mini .art{height:68px;border-radius:5px;border:1px solid rgba(93,70,40,.35);
  background-size:cover;background-position:center;overflow:hidden;margin:0}
.ps-mini .art .exlibris{width:100%;height:100%;display:block}
.playslot .ps-fly{position:absolute;right:calc(100% + 12px);bottom:0;z-index:120;
  opacity:0;pointer-events:none;transition:opacity .15s;cursor:default;
  filter:drop-shadow(0 16px 30px rgba(10,5,1,.6))}
.playslot:hover .ps-fly{opacity:1}
body.dragging .playslot .ps-fly,body.selecting .playslot .ps-fly{opacity:0 !important}
/* réserve : objet posé, carte réelle au survol, cible d'échange */
.side-objects{width:184px;flex:none;display:flex;flex-direction:column;gap:10px}
.reserve-obj{text-align:center;background:rgba(249,243,226,.55);border:1.5px dashed rgba(93,70,40,.45);
  border-radius:9px;padding:8px 8px 9px;position:relative;transition:box-shadow .12s,background .12s}
.reserve-obj .lb{font-size:8.5px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:#6d5a3a;margin-bottom:4px}
.reserve-obj .hint2{font-size:8.5px;color:#8a7550;font-style:italic;margin-top:5px;line-height:1.35}
/* la colonne pays/réserve est à GAUCHE du plateau : la carte se déploie vers la droite */
.reserve-fly{position:absolute;left:calc(100% + 12px);top:50%;transform:translateY(-50%);z-index:85;
  display:flex;gap:10px;opacity:0;pointer-events:none;transition:opacity .15s;cursor:default;
  filter:drop-shadow(0 16px 30px rgba(10,5,1,.6))}
.reserve-obj:hover .reserve-fly{opacity:1;pointer-events:auto}
body.dragging .reserve-fly{opacity:0 !important;pointer-events:none !important}
/* bande basse : les 3 zones illustrées du plateau réel */
.pj-strip{margin-top:auto}
.pj-sentence{font-size:9.5px;color:#4c4432;text-align:center;margin:0 auto 7px;line-height:1.35;
  background:rgba(249,243,226,.78);border-radius:6px;padding:3px 12px;display:table}
.pj-sentence b{font-weight:800}
.pj-zones{display:flex;gap:0;align-items:flex-start}
.pj-zcell{flex:1;display:flex;flex-direction:column;min-width:0}
.pj-zcell + .pj-zcell{margin-left:-3px}
.pj-zcell:first-child .pj-zone{border-radius:10px 0 0 10px}
.pj-zcell:last-child .pj-zone{border-radius:0 10px 10px 0}
.pj-zone{height:52px;border:3px solid #1a1a18;border-radius:0;position:relative;min-width:0;z-index:2;
  background-size:cover;background-position:center;
  box-shadow:0 1px 0 rgba(255,255,255,.3) inset,0 3px 7px rgba(20,10,2,.35);
  transition:box-shadow .12s}
.pj-zone.blocked{filter:saturate(.5) brightness(.85)}
.pj-zone .zplate{position:absolute;left:11px;top:50%;transform:translateY(-50%);
  display:inline-flex;align-items:center;gap:7px;background:rgba(245,238,214,.94);
  border:1px solid rgba(43,38,32,.55);border-radius:5px;padding:2.5px 9px;
  box-shadow:0 1px 3px rgba(0,0,0,.4);white-space:nowrap}
.pj-zone .zplate .nm{font-size:11.5px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.pj-zone .zplate .val{display:inline-flex;align-items:flex-end}
.pj-zone .zplate .val .zvic{width:14px;height:14px}
.pj-zone .zplate .val b{font-size:9.5px;line-height:1;color:#1a1a18;margin-left:-1px}
/* compte de cartes + énergie disponible, intégrés à l'étiquette (variante « étiquette unique ») */
.pj-zone .zplate .sep{width:1px;height:13px;background:rgba(43,38,32,.35)}
.pj-zone .zplate .cnt{font-size:10px;font-weight:800;color:#6d5a3a;font-variant-numeric:tabular-nums}
.pj-zone .zplate .cnt b{font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:13px;color:#1a1a18;font-weight:700}
.under-cards{display:flex;gap:6px;align-items:flex-start;padding:0 16px;margin-top:-2px;height:29px;z-index:1}
.ucard{width:26px;height:23px;border-radius:0 0 4px 4px;background-size:cover;background-position:center top;
  border:1px solid #123024;border-top:0;transform-origin:top center;flex:none;
  box-shadow:0 6px 7px -4px rgba(0,0,0,.55) inset,0 3px 5px rgba(0,0,0,.35)}
.ucard.pending{outline:2px solid #d9a437;outline-offset:1px}
.uc-note{margin-left:auto;font-family:"Iowan Old Style",Palatino,Georgia,serif;font-style:italic;
  font-size:11px;color:#5f5138;padding-top:3px;white-space:nowrap;font-variant-numeric:tabular-nums}
/* cibles de dépôt */
.droplabel{position:absolute;inset:0;margin:0;display:none;align-items:center;justify-content:center;
  background:rgba(238,176,44,.9);border-radius:inherit;color:#3a2a08;font-size:9px;font-weight:800;
  letter-spacing:.08em;text-transform:uppercase;z-index:3;text-align:center;pointer-events:none}
.playslot .droplabel,.reserve-obj .droplabel{border-radius:8px}
body.dragging [data-drop] .droplabel,body.selecting [data-drop] .droplabel{display:flex}
body.dragging .pj-zone.blocked .droplabel,body.selecting .pj-zone.blocked .droplabel{background:rgba(143,52,19,.85);color:#f5eed6}
body.dragging .pj-zone,body.dragging .playslot,body.dragging .reserve-obj,
body.selecting .pj-zone,body.selecting .playslot,body.selecting .reserve-obj{box-shadow:0 0 0 2.5px #d9a437}
body.selecting [data-drop]{cursor:pointer}
body.selecting .reserve-fly{opacity:0 !important;pointer-events:none !important}
[data-drop].over{box-shadow:0 0 0 3px #b6431f !important}
.pj-zone.over{z-index:4}
/* fantôme de drag */
.pcard.ghosted{opacity:.35}
.pcard.drag-ghost,.drag-ghost{position:fixed !important;z-index:200;pointer-events:none;margin:0;left:0;top:0;
  width:172px;height:248px;padding:10px 11px;
  transform:translate(-50%,-62%) scale(.92) rotate(-2.5deg);
  box-shadow:0 24px 50px rgba(10,5,1,.6);transition:none}
.drag-ghost .art{height:86px}
/* éléments repris ailleurs */
.ecard{width:54px;height:76px;border-radius:6px;position:relative;
  box-shadow:0 3px 6px rgba(0,0,0,.35);border:1px solid rgba(20,40,25,.55);
  background-size:cover;background-position:center}
.ecard .v{position:absolute;bottom:4px;right:4px;font-size:10.5px;font-weight:800;color:#f7f0dc;
  background:rgba(18,32,22,.78);border-radius:4px;padding:1px 5px}
.prod-note{font-size:11px;color:#4c4432;background:rgba(249,243,226,.72);
  border-radius:8px;padding:5px 10px;display:inline-block}
.me-terrain-pol{display:flex;gap:6px;flex-wrap:wrap}
.me-terrain-pol .tpol{font-size:10.5px;padding:3px 7px 3px 4px}
.rules-block{margin-top:12px;background:rgba(249,243,226,.92);border:1px solid #b8a983;
  border-radius:9px;padding:10px 14px;font-size:11px;line-height:1.55;color:#4c4432;
  columns:3;column-gap:18px}
.rules-block h6{margin:0 0 3px;font-size:10px;letter-spacing:.16em;text-transform:uppercase;
  color:#8a7550;break-after:avoid}
.rules-block ol{margin:0 0 8px;padding-left:16px}
.rules-block li{margin-bottom:1px}

/* ============ main de cartes ============ */
.hand-zone{display:flex;justify-content:center;align-items:flex-end;margin-top:22px;min-height:260px}
/* rangée main + validation sur l'écran table : la main ne recouvre pas le plateau */
.handrow{display:flex;align-items:flex-end;gap:14px}
.handrow .hand-zone{flex:1;margin-top:0;min-height:236px}
.handside{display:flex;flex-direction:column;gap:8px;align-items:stretch;width:216px;flex:none;padding-bottom:14px}
.handside .passnote{font-size:10.5px;line-height:1.45}
.ts .hand-zone .pcard{width:158px;height:228px;padding:10px 11px;touch-action:none;
  -webkit-user-select:none;user-select:none}
.ts .hand-zone .pcard .art{height:80px}
.ts .hand-zone .pcard h4{font-size:14.5px;margin-bottom:5px}
.ts .hand-zone .pcard p{font-size:10px}
.ts .hand-zone .pcard.illegal::after{top:100px}
.ts .hand-zone .pcard .cost{bottom:7px;right:9px;font-size:11px}
.ts .hand-zone .pcard .tags{bottom:7px;left:9px}
.pcard{width:196px;height:284px;background:#f9f3e2;border-radius:11px;
  border:1px solid #c3b48d;margin:0 -12px;position:relative;
  box-shadow:0 10px 24px rgba(15,8,2,.5),0 1px 0 rgba(255,255,255,.6) inset;
  padding:12px 13px;transition:transform .18s ease;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240"><filter id="p"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" seed="9"/><feColorMatrix values="0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.08  0 0 0 0.04 0"/></filter><rect width="240" height="240" filter="url(%23p)"/></svg>')}
.hand-zone .pcard{cursor:pointer}
.hand-zone .pcard:nth-child(1){transform:rotate(-5deg) translateY(16px)}
.hand-zone .pcard:nth-child(2){transform:rotate(-1.6deg) translateY(2px)}
.hand-zone .pcard:nth-child(3){transform:rotate(1.8deg) translateY(4px)}
.hand-zone .pcard:nth-child(4){transform:rotate(5.2deg) translateY(18px)}
.hand-zone .pcard:nth-child(5){transform:rotate(8deg) translateY(30px)}
.hand-zone .pcard:hover{transform:translateY(-22px) rotate(0);z-index:6}
.hand-zone .pcard.selected{transform:translateY(-30px) rotate(0);z-index:7;
  outline:3px solid #d9a437;outline-offset:2px}
/* carte injouable : l'objet physique reste intact, seule une étiquette le signale */
.hand-zone .pcard.illegal{box-shadow:0 10px 24px rgba(15,8,2,.5),0 1px 0 rgba(255,255,255,.6) inset}
.hand-zone .pcard.illegal::after{content:"injouable ce tour";position:absolute;top:126px;right:-6px;
  background:#8f3413;color:#f5eed6;font-size:9px;font-weight:700;letter-spacing:.08em;
  text-transform:uppercase;padding:3px 8px;border-radius:4px;transform:rotate(3deg);
  box-shadow:0 2px 4px rgba(0,0,0,.4)}
.hand-zone .pcard.illegal::before{content:attr(data-reason);position:absolute;left:8px;right:8px;bottom:34px;
  z-index:5;background:rgba(143,52,19,.92);color:#fff;font-size:10px;line-height:1.35;
  border-radius:5px;padding:4px 6px;opacity:0;transition:opacity .15s}
.hand-zone .pcard.illegal:hover::before{opacity:1}
.pcard .frame{position:absolute;inset:6px;border:1px solid rgba(93,70,40,.4);border-radius:7px;pointer-events:none}
.pcard .kind{font-size:8.5px;letter-spacing:.16em;text-transform:uppercase;color:#8a7550;
  font-weight:700;display:block;margin-bottom:4px}
.pcard h4{margin:0 0 7px;font-family:"Iowan Old Style",Palatino,Georgia,serif;
  font-size:16.5px;font-weight:600;line-height:1.12}
.pcard .art{height:100px;border-radius:6px;margin-bottom:8px;border:1px solid rgba(93,70,40,.35);
  background-size:cover;background-position:center;overflow:hidden}
.pcard .art-ph{background:#f5eed6}
.pcard .art-ph .exlibris{width:100%;height:100%;display:block}
.pcard p{margin:0;font-size:11px;line-height:1.42;color:#4c4432}
.pcard .cost{position:absolute;bottom:9px;right:11px;display:flex;align-items:center;gap:3px;
  font-size:12.5px;font-weight:800;color:#1d5c33}
.pcard .cost svg{width:12px;height:12px;fill:#1d5c33}
.pcard .tags{position:absolute;bottom:9px;left:11px;display:flex;gap:4px}
.pcard .tags i{font-style:normal;font-size:8.5px;letter-spacing:.08em;text-transform:uppercase;
  font-weight:700;background:#1d4733;color:#f5eed6;border-radius:4px;padding:2px 5px}
.pcard .paysmeta{position:absolute;bottom:9px;left:11px;right:11px;display:flex;gap:6px;align-items:center;
  font-size:11px;color:#4c4432}
.pcard .paysmeta .mixdot svg{width:13px;height:13px}
.pcard.catastrophe .kind{color:#8f3413}
.pcard.resolution .kind{color:#1d4733}
.pcard .sevrow{position:absolute;bottom:8px;left:11px;right:11px;display:flex;gap:4px}
.pcard .sevrow i{flex:1;text-align:center;font-style:normal;background:#f2e6cf;border:1px solid #b8a983;
  border-radius:4px;padding:1px 0;line-height:1.1}
.pcard .sevrow i b{display:block;font-size:11px}
.pcard .sevrow i small{font-size:8px;color:#8a7550;text-transform:uppercase}
.pcard .sevrow i.on{background:#b6431f;border-color:#8f3413;color:#fff}
.pcard .sevrow i.on small{color:#f2d0c2}

/* ============ menu en jeu ============ */
.menu-fab{position:fixed;top:12px;right:14px;z-index:150;width:40px;height:40px;border-radius:10px;
  background:linear-gradient(#3c2c1a,#2c1f10);border:1px solid rgba(233,220,189,.35);color:#e9dcbd;
  display:flex;align-items:center;justify-content:center;font-size:17px;
  box-shadow:0 3px 8px rgba(0,0,0,.45)}
.menu-fab:hover{background:linear-gradient(#4a3722,#372817)}
.menu-fab svg.ic{width:1.15em;height:1.15em}
.ts .dock-r{margin-top:58px}
.panel-menu{max-width:600px}
.panel-menu .rules-block{columns:2;margin-top:10px}
.choice-btn.danger{background:#f7ded6;border-color:#9c3014}
.choice-btn.danger:hover{background:#f2c4b4}
/* historique des parties (menu) */
.glog{display:flex;flex-direction:column;gap:9px;position:relative;margin-bottom:6px}
.gl-row{background:#fdf8ea;border:1px solid #b8a983;border-radius:9px;padding:9px 13px;
  box-shadow:0 2px 4px rgba(60,40,10,.14)}
.gl-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:5px}
.gl-head b{font-size:12.5px;color:#2b2620}
.gl-status{font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:800;
  color:#f5eed6;background:#1d4733;border-radius:4px;padding:2px 7px}
.gl-status.aband{background:#8a7550}
.gl-warm{font-size:11px;font-weight:700;color:#8f3413;font-variant-numeric:tabular-nums}
.gl-players{display:flex;gap:6px;flex-wrap:wrap}
.gl-p{font-size:11.5px;color:#4c4432;background:rgba(249,243,226,.9);border:1px solid rgba(184,169,131,.7);
  border-radius:6px;padding:2px 8px;font-variant-numeric:tabular-nums}
.gl-p.win{background:rgba(238,176,44,.32);border-color:#9a7322;font-weight:800;color:#3a2a08}

/* pastilles ±développement / ±pollution (style des étiquettes de cartes) */
.deltas{display:flex;justify-content:center;gap:7px;margin-top:8px}
.delta{font-size:12px;font-weight:800;border-radius:4px;padding:2.5px 8px;color:#f5eed6;
  display:inline-flex;align-items:baseline;gap:5px;box-shadow:0 1px 2px rgba(0,0,0,.3);
  font-variant-numeric:tabular-nums}
.delta small{font-size:8px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;opacity:.85}
.delta.good{background:#1d4733}
.delta.bad{background:#dd4a26}
.delta.nul{background:#e6dcc0;color:#8a7550;box-shadow:none}

/* retour en arrière pendant les séquences scriptées */
.linkbtn2{background:none;border:0;color:#7a5c26;text-decoration:underline;font-size:11.5px;padding:0}
.undo-row{display:flex;justify-content:center;margin-top:12px;position:relative}

/* ============ barre d'action ============ */
.actionbar{display:flex;gap:14px;justify-content:center;align-items:center;margin-top:20px;flex-wrap:wrap}
.btn{font-size:13px;font-weight:700;letter-spacing:.06em;
  border-radius:9px;padding:11px 26px;border:1px solid rgba(0,0,0,.35)}
.btn.primary{background:linear-gradient(#e9bd5f,#d9a437);color:#3a2a08;
  box-shadow:0 3px 0 #9a7322,0 1px 0 rgba(255,255,255,.5) inset}
.btn.primary:disabled{filter:saturate(.4) brightness(.8);cursor:not-allowed;box-shadow:none}
.btn.ghosted{background:rgba(20,12,4,.4);color:#e9dcbd;border-color:rgba(233,220,189,.35)}
.btn.ghosted:disabled{opacity:.45;cursor:not-allowed}
.btn.small{padding:7px 14px;font-size:12px}
.passnote{font-size:12.5px;color:#d9c9a4;font-style:italic}

/* ============ écran de passage ============ */
.pass-screen{min-height:92vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px}
.pass-screen .banner{font-family:"Iowan Old Style",Palatino,Georgia,serif;color:#efe2c2;
  font-size:44px;text-align:center;text-shadow:0 3px 6px rgba(0,0,0,.55);max-width:16em;line-height:1.25}
.pass-screen .sub{color:#d9c9a4;font-size:15px;font-style:italic}
.pass-screen .cardback-l{width:110px;height:160px}

/* ============ modales / invites ============ */
.overlay{position:fixed;inset:0;background:rgba(24,14,5,.62);display:flex;
  align-items:center;justify-content:center;z-index:40;padding:24px}
.panel{background:#f6efdc;border:1px solid #c3b48d;border-radius:14px;max-width:720px;width:100%;
  max-height:88vh;overflow:auto;padding:22px 26px;
  box-shadow:0 24px 70px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.6) inset;position:relative}
.panel::before{content:"";position:absolute;inset:7px;border:1.5px solid rgba(93,70,40,.3);
  border-radius:9px;pointer-events:none}
.panel h3{margin:0 0 4px;font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:22px}
.panel .for{font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;color:#8a7550;
  font-weight:700;margin-bottom:10px}
.panel p.desc{margin:0 0 16px;font-size:13.5px;line-height:1.55;color:#4c4432}
.panel .choices{display:flex;flex-direction:column;gap:9px;position:relative}
.choice-btn{text-align:left;background:#fdf8ea;border:1px solid #b8a983;border-radius:9px;
  padding:11px 14px;font-size:13.5px;color:#2b2620;
  box-shadow:0 2px 4px rgba(60,40,10,.14)}
.choice-btn:hover{background:#f4e6c3;border-color:#9a7322}
.choice-btn b{display:block}
.choice-btn small{color:#6d5a3a}
.panel .cards-row{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:8px 0 14px;position:relative}
.choices.vote-row{flex-direction:row;justify-content:center;gap:14px}
.choice-btn.vote{flex:0 1 200px;text-align:center;font-size:15px;font-weight:800;
  letter-spacing:.08em;text-transform:uppercase;padding:14px;border-radius:10px;color:#f5eed6}
.choice-btn.vote-pour{background:linear-gradient(#2c6247,#1d4733);border-color:#123024;
  box-shadow:0 3px 0 #0d241a,0 1px 0 rgba(255,255,255,.25) inset}
.choice-btn.vote-pour:hover{background:linear-gradient(#357355,#245640)}
.choice-btn.vote-contre{background:linear-gradient(#e05a35,#dd4a26);border-color:#9c3014;
  box-shadow:0 3px 0 #7d2812,0 1px 0 rgba(255,255,255,.3) inset}
.choice-btn.vote-contre:hover{background:linear-gradient(#e86c48,#c94526)}
.panel .cards-row .pcard{margin:0}
.counter{display:flex;align-items:center;gap:14px;justify-content:center;margin:14px 0;position:relative}
.counter button{width:42px;height:42px;border-radius:50%;font-size:20px;font-weight:800;
  border:1px solid #96742a;background:linear-gradient(#e9bd5f,#d9a437);color:#3a2a08}
.counter .val{font-size:26px;font-weight:800;min-width:2ch;text-align:center;font-variant-numeric:tabular-nums}
.energy-pick{display:flex;gap:14px;justify-content:center;margin:12px 0;position:relative}
.energy-pick .zonepick{text-align:center;background:#fdf8ea;border:1px solid #b8a983;border-radius:9px;padding:10px 14px}
.energy-pick .zonepick .lab{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin-bottom:6px}
.panel .confirmrow{display:flex;justify-content:center;gap:12px;margin-top:14px;position:relative}

/* ============ écrans scriptés (révélation / décennie) ============ */
.script-screen{max-width:1180px;margin:0 auto}
.script-screen .step-title{font-family:"Iowan Old Style",Palatino,Georgia,serif;color:#efe2c2;
  font-size:32px;text-align:center;margin:26px 0 6px;text-shadow:0 3px 6px rgba(0,0,0,.55)}
.script-screen .step-sub{color:#d9c9a4;text-align:center;font-size:14px;font-style:italic;margin-bottom:22px}
.reveal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;margin-bottom:22px}
.reveal-cell{padding:14px;text-align:center}
.reveal-cell .plate{margin-bottom:10px}
.reveal-cell .pcard{margin:0 auto;transform:scale(.92);transform-origin:top center}
.reveal-cell .buildinfo,.rc-card .buildinfo{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 0}
.reveal-cell .buildinfo .lab,.rc-card .buildinfo .lab{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
/* récap du tour fusionné : 4 rangées de même gabarit dans chaque boîte
   (plaque / action / récap fixe / effets à hauteur libre) */
.rc-cell{padding:14px 12px 12px;text-align:center;display:grid;
  grid-template-rows:34px 252px 88px auto;row-gap:10px;align-items:start}
.rc-plate{display:flex;justify-content:center;align-items:center;height:100%}
.rc-card{display:flex;justify-content:center;align-items:flex-start;min-height:0}
.rc-card .pcard{margin:0;transform:scale(.86);transform-origin:top center}
.rc-card .buildinfo{height:100%;justify-content:center;padding:0}
.rc-card .buildinfo .small-muted{max-width:190px}
.rc-recap{background:rgba(60,44,26,.09);border:1px solid rgba(93,70,40,.3);border-radius:9px;
  display:flex;flex-direction:column;justify-content:center;gap:8px;padding:8px 6px;height:88px}
.rc-recap .deltas{margin:0}
.rc-recap .totline{display:flex;justify-content:center;gap:8px;align-items:center;flex-wrap:wrap}
.rc-fx{background:rgba(249,243,226,.85);border:1px solid rgba(184,169,131,.7);border-radius:9px;
  padding:7px 12px;font-size:12px;line-height:1.55;color:#2b2620;text-align:left}
.rc-fx .jentry{padding:2.5px 0}
.journal{background:rgba(249,243,226,.92);border-radius:12px;border:1px solid #b8a983;
  padding:16px 22px;font-size:13.5px;line-height:1.7;color:#2b2620;max-width:860px;margin:0 auto 22px;
  box-shadow:0 10px 26px rgba(20,10,2,.4)}
.journal .jentry{padding:3px 0;border-bottom:1px dotted rgba(93,70,40,.3)}
.journal .jentry:last-child{border-bottom:0}
.journal .jentry.head{font-weight:700;color:#8f3413;border-bottom:1px solid rgba(93,70,40,.4)}
.journal .jentry b{font-weight:700}
.journal .jentry .neg{color:#bf5b16;font-weight:600}
.journal .jentry .pos{color:#2f7a44;font-weight:600}
.center-actions{display:flex;justify-content:center;gap:14px;margin:10px 0 40px}
.cata-layout{display:flex;justify-content:center;align-items:flex-start;gap:26px;margin-bottom:22px}
.cata-layout .cata-card .pcard{margin:0;transform:rotate(-1.5deg)}
.cata-layout .cata-journal{flex:0 1 620px}
.cata-layout .cata-journal .journal{margin:0}

/* ============ setup ============ */
.setup{max-width:860px;margin:6vh auto 0}
.setup .board{padding:34px 40px}
.setup h1{font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:42px;letter-spacing:.22em;
  text-transform:uppercase;text-align:center;margin:0 0 2px;color:#1d4733}
.setup .tagline{text-align:center;color:#6d5a3a;font-style:italic;margin:0 0 26px;font-size:14px}
.setup label{display:block;font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:#8a7550;font-weight:700;margin:16px 0 6px}
.setup .njoueurs{display:flex;gap:8px}
.setup .nbtn{width:46px;height:46px;border-radius:9px;border:1px solid #b8a983;background:#fdf8ea;
  font-size:17px;font-weight:800;color:#5f5138}
.setup .nbtn.on{background:linear-gradient(#e9bd5f,#d9a437);border-color:#96742a;color:#3a2a08;
  box-shadow:0 2px 0 #9a7322}
.setup input[type=text]{width:100%;font:inherit;padding:9px 12px;border-radius:8px;
  border:1px solid #b8a983;background:#fdf8ea;color:#2b2620}
.setup .names{display:flex;flex-direction:column;gap:10px}
.setup .seatrow{display:flex;gap:8px;align-items:center}
.setup .seatrow input[type=text]{flex:1;min-width:0}
.setup .seatmode{display:flex;border:1px solid #b8a983;border-radius:8px;overflow:hidden;flex:none}
.setup .mbtn{font:inherit;font-size:12.5px;padding:8px 12px;border:0;background:#fdf8ea;
  color:#6d5a3a;cursor:pointer}
.setup .mbtn+.mbtn{border-left:1px solid #b8a983}
.setup .mbtn.on{background:linear-gradient(#e9bd5f,#d9a437);color:#3a2a08;font-weight:700}
.setup .botsel{font:inherit;font-size:12.5px;padding:8px 8px;border-radius:8px;flex:none;
  border:1px solid #b8a983;background:#fdf8ea;color:#2b2620;max-width:190px}
.setup .actions{display:flex;gap:12px;justify-content:center;margin-top:28px;flex-wrap:wrap}

/* ============ bibliothèque ============ */
.library{max-width:1420px;margin:0 auto}
.library h2{font-family:"Iowan Old Style",Palatino,Georgia,serif;color:#efe2c2;font-size:30px;
  text-shadow:0 2px 4px rgba(0,0,0,.5);margin:18px 0 4px}
.library .libnote{color:#d9c9a4;font-size:13px;margin-bottom:16px}
.lib-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;margin-bottom:30px}
.lib-grid .pcard{margin:0;width:auto;cursor:default}
.lib-section{margin-bottom:8px}

/* ============ victoire ============ */
.victory{max-width:1050px;margin:0 auto}
.victory .winner-banner{font-family:"Iowan Old Style",Palatino,Georgia,serif;color:#efe2c2;
  font-size:40px;text-align:center;margin:30px 0 4px;text-shadow:0 3px 8px rgba(0,0,0,.6)}
.victory table{width:100%;border-collapse:collapse;font-size:13.5px;background:rgba(249,243,226,.95);
  border-radius:12px;overflow:hidden;box-shadow:0 10px 26px rgba(20,10,2,.4)}
.victory th{background:#1d4733;color:#f5eed6;font-size:11px;letter-spacing:.12em;text-transform:uppercase;
  padding:9px 12px;text-align:left}
.victory td{padding:9px 12px;border-bottom:1px dotted rgba(93,70,40,.35);font-variant-numeric:tabular-nums}
.victory tr.winner td{background:rgba(238,176,44,.28);font-weight:700}
.victory .recap{margin:22px 0;padding:18px 22px}
.victory .recap h5{margin:0 0 10px;font-size:10.5px;letter-spacing:.22em;text-transform:uppercase;
  color:#8a7550;font-weight:700}
.curve{width:100%;height:auto;display:block}

.small-muted{font-size:11.5px;color:#8a7550}
.hidden{display:none !important}

/* ============ mode en ligne (V3) — mockup « compteur gravé » ============ */

/* cartouche compteur gravé : carton crème, chiffre X/N, pips or */
.sealwrap{position:relative;display:block;width:100%}
.seal{display:flex;align-items:center;gap:12px;background:#f5eed6;border:1px solid #b8a983;border-radius:10px;
  padding:8px 14px;color:#3a2a08;box-shadow:0 2px 5px rgba(0,0,0,.4);cursor:help}
.seal .big{font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:23px;font-weight:700;
  font-variant-numeric:tabular-nums;line-height:1}
.seal .lbl{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:#6d5a3a;display:block}
.pips{display:flex;gap:5px;margin-top:5px}
.pip{width:9px;height:9px;border-radius:50%;border:1px solid #9a7322;display:inline-block}
.pip.on{background:linear-gradient(#e9bd5f,#d9a437)}
.pip.off{background:transparent;border-style:dashed;border-color:#6d5a3a}
.seal.lit{outline:2px solid rgba(233,189,95,.7);outline-offset:1px}

/* volet au survol/focus : liste prêts (coche sapin) / attendus (cercle pointillé) */
.seal-fly{position:absolute;bottom:calc(100% + 10px);left:0;z-index:160;min-width:196px;
  background:#fdf8ea;border:1px solid #b8a983;border-radius:10px;padding:10px 12px;color:#3a2a08;
  opacity:0;pointer-events:none;transition:opacity .15s;
  filter:drop-shadow(0 12px 24px rgba(10,5,1,.55))}
.sealwrap:hover .seal-fly,.sealwrap:focus-within .seal-fly{opacity:1}
.fly-row{display:flex;align-items:center;gap:8px;padding:2.5px 0;font-size:13px}
.fly-row .nm{font-family:"Iowan Old Style",Palatino,Georgia,serif;font-weight:700;flex:1}
.fly-row .sub{font-size:9.5px;letter-spacing:.13em;text-transform:uppercase;color:#6d5a3a}
.fly-row.wait .nm{color:#6d5a3a}
svg.olic{display:inline-block;vertical-align:-2px;flex:none}

/* pulse « dernier attendu » (halo or) — statique sous prefers-reduced-motion */
@keyframes lastpulse{
  0%,100%{box-shadow:0 1px 0 rgba(255,255,255,.5) inset,0 3px 7px rgba(0,0,0,.35),0 0 0 0 rgba(233,189,95,0)}
  50%{box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 3px 10px rgba(0,0,0,.4),0 0 0 7px rgba(233,189,95,.28)}
}
.btn.last,.choice-btn.vote.last{animation:lastpulse 1.15s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){
  .btn.last,.choice-btn.vote.last{animation:none;outline:3px solid rgba(233,189,95,.55);outline-offset:2px}
}

/* après validation : bouton désaturé (style disabled existant) */
.btn.done{filter:saturate(.35) brightness(.82);cursor:default}

/* vote : choix fait = liseré or, l'autre désaturé */
.choice-btn.vote.sel{outline:3px solid rgba(233,189,95,.8);outline-offset:1.5px}
.choice-btn.vote.off{filter:saturate(.3) brightness(.75)}
.choice-btn.vote:disabled{cursor:default}
.ol-sealrow{display:flex;justify-content:center;margin-top:10px}
.ol-sealrow .sealwrap{width:auto;min-width:230px}
.handside .ol-sealrow{justify-content:stretch;margin-top:0}
.ol-ackrow{flex-direction:column;align-items:center;gap:12px}
.ol-ackrow .sealwrap{width:auto;min-width:190px}

/* pastille d'attente séquentielle : sablier animé + nom */
.waitwrap{position:relative;display:inline-block}
.waitchip{display:inline-flex;align-items:center;gap:7px;background:#f5eed6;border:1px solid #b8a983;
  border-radius:999px;padding:6px 14px 6px 10px;color:#3a2a08;box-shadow:0 2px 5px rgba(0,0,0,.4);cursor:help}
.waitchip b{font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:13.5px}
@keyframes sandflip{0%,42%{transform:rotate(0)}50%,92%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}
.flip{animation:sandflip 3.2s ease-in-out infinite;transform-origin:50% 50%}
@media(prefers-reduced-motion:reduce){.flip{animation:none}}
.wait-fly{position:absolute;bottom:calc(100% + 8px);left:0;z-index:160;white-space:nowrap;
  background:#fdf8ea;border:1px solid #b8a983;border-radius:8px;padding:7px 11px;color:#3a2a08;font-size:12.5px;
  opacity:0;pointer-events:none;transition:opacity .15s;filter:drop-shadow(0 10px 20px rgba(10,5,1,.55))}
.waitwrap:hover .wait-fly{opacity:1}
.wait-fly b{font-family:"Iowan Old Style",Palatino,Georgia,serif}
.ol-chiprow{display:flex;justify-content:center}
.ol-waitcenter{display:flex;justify-content:center;margin:40px 0}
.ol-wait .waitchip{padding:10px 20px 10px 14px}
.ol-wait .waitchip b{font-size:16px}
.ol-plate-echo{display:inline-flex;margin-left:2px}

/* main inerte après validation (tour envoyé au relay) */
.pcard.inert{cursor:default;opacity:.85}

/* bandeaux d'état (déconnexion / pause / remplacement) */
.ol-banners{position:fixed;top:0;left:0;right:0;z-index:200;display:flex;flex-direction:column;gap:2px}
.ol-banner{background:#f5eed6;color:#3a2a08;border-bottom:1px solid #b8a983;padding:7px 16px;
  font-size:13px;display:flex;align-items:center;gap:9px;box-shadow:0 4px 14px rgba(10,5,1,.35)}
.ol-banner b{font-family:"Iowan Old Style",Palatino,Georgia,serif}
.ol-banner.warn{background:#f4e0c8}
.ol-banner.note{background:#fdf8ea}
.olb-host{display:inline-flex;align-items:center;gap:8px;margin-left:auto}
.olb-sel{font-size:12px;padding:4px 6px;border-radius:7px;border:1px solid #b8a983;background:#fdf8ea;color:#3a2a08}

/* accueil / salon en ligne */
.ol-cols{display:flex;gap:26px;margin-top:8px}
.ol-col{flex:1;display:flex;flex-direction:column;gap:9px}
.ol-col input{width:100%}
.ol-linkrow{display:flex;align-items:center;gap:10px;margin:10px 0 16px}
.ol-link{flex:1;background:rgba(20,12,4,.35);border:1px solid rgba(233,220,189,.3);border-radius:8px;
  padding:8px 12px;font-size:12.5px;color:#e9dcbd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ol-seatrow{align-items:center}
.ol-seatnum{font-family:"Iowan Old Style",Palatino,Georgia,serif;font-weight:700;width:18px;color:#c8b489}
.ol-tag{display:inline-flex;align-items:center;gap:7px;font-size:13px;flex:1;min-width:0}
.ol-tag.wait{color:#c8b489}
.ol-tag.bot{color:#e9dcbd}
